@nk070281sjv/cli 2.3.21 → 2.3.23
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.
- package/README.md +7 -18
- package/dist/index.js +157 -147
- package/package.json +2 -3
- package/dist/dashboard/client/assets/_basePickBy-CZOJm2vF.js +0 -1
- package/dist/dashboard/client/assets/_baseUniq-BNrzwRTV.js +0 -1
- package/dist/dashboard/client/assets/arc-Bl8fh4M2.js +0 -1
- package/dist/dashboard/client/assets/architectureDiagram-VXUJARFQ-TTtHv-xF.js +0 -36
- package/dist/dashboard/client/assets/blockDiagram-VD42YOAC-Civ0_twg.js +0 -122
- package/dist/dashboard/client/assets/c4Diagram-YG6GDRKO-FpPihNtg.js +0 -10
- package/dist/dashboard/client/assets/channel-BXL5vtDv.js +0 -1
- package/dist/dashboard/client/assets/chunk-4BX2VUAB-DPa8WBIp.js +0 -1
- package/dist/dashboard/client/assets/chunk-55IACEB6-BxRzcpzA.js +0 -1
- package/dist/dashboard/client/assets/chunk-B4BG7PRW-DajTgf2c.js +0 -165
- package/dist/dashboard/client/assets/chunk-DI55MBZ5-iF7jh16b.js +0 -220
- package/dist/dashboard/client/assets/chunk-FMBD7UC4-BNfvHrjT.js +0 -15
- package/dist/dashboard/client/assets/chunk-QN33PNHL-DDEcP3Rr.js +0 -1
- package/dist/dashboard/client/assets/chunk-QZHKN3VN-CNrv8PPa.js +0 -1
- package/dist/dashboard/client/assets/chunk-TZMSLE5B-Cf7ruLpv.js +0 -1
- package/dist/dashboard/client/assets/classDiagram-2ON5EDUG-l6aRknEX.js +0 -1
- package/dist/dashboard/client/assets/classDiagram-v2-WZHVMYZB-l6aRknEX.js +0 -1
- package/dist/dashboard/client/assets/clone-DlyIkpMA.js +0 -1
- package/dist/dashboard/client/assets/cose-bilkent-S5V4N54A-BLdeLAXN.js +0 -1
- package/dist/dashboard/client/assets/cytoscape.esm-DtBltrT8.js +0 -331
- package/dist/dashboard/client/assets/dagre-6UL2VRFP-BJ4sOJMG.js +0 -4
- package/dist/dashboard/client/assets/defaultLocale-DX6XiGOO.js +0 -1
- package/dist/dashboard/client/assets/diagram-PSM6KHXK-6bnUwEUL.js +0 -24
- package/dist/dashboard/client/assets/diagram-QEK2KX5R-BVM40PZZ.js +0 -43
- package/dist/dashboard/client/assets/diagram-S2PKOQOG-Bymzcnfw.js +0 -24
- package/dist/dashboard/client/assets/erDiagram-Q2GNP2WA-BVADk0og.js +0 -60
- package/dist/dashboard/client/assets/flowDiagram-NV44I4VS-_eGXTmsk.js +0 -162
- package/dist/dashboard/client/assets/ganttDiagram-JELNMOA3-CX3MM-Kg.js +0 -267
- package/dist/dashboard/client/assets/gitGraphDiagram-V2S2FVAM-CkKtnGnz.js +0 -65
- package/dist/dashboard/client/assets/graph-DHnUlkk_.js +0 -1
- package/dist/dashboard/client/assets/index-Czwdh6UA.css +0 -1
- package/dist/dashboard/client/assets/index-D9drpDt3.js +0 -581
- package/dist/dashboard/client/assets/infoDiagram-HS3SLOUP-D9BnKoPB.js +0 -2
- package/dist/dashboard/client/assets/init-Gi6I4Gst.js +0 -1
- package/dist/dashboard/client/assets/journeyDiagram-XKPGCS4Q-DS_q4bTn.js +0 -139
- package/dist/dashboard/client/assets/kanban-definition-3W4ZIXB7-8_1dZaX4.js +0 -89
- package/dist/dashboard/client/assets/katex-DGN8GczM.js +0 -261
- package/dist/dashboard/client/assets/layout-CsLHITt3.js +0 -1
- package/dist/dashboard/client/assets/linear-CCtPUyi6.js +0 -1
- package/dist/dashboard/client/assets/mermaid-renderer-YLFCVv-z.js +0 -256
- package/dist/dashboard/client/assets/mindmap-definition-VGOIOE7T-DR-LlyOU.js +0 -68
- package/dist/dashboard/client/assets/ordinal-Cboi1Yqb.js +0 -1
- package/dist/dashboard/client/assets/pieDiagram-ADFJNKIX-Bb5Zk2R3.js +0 -30
- package/dist/dashboard/client/assets/quadrantDiagram-AYHSOK5B-jsjp4NWV.js +0 -7
- package/dist/dashboard/client/assets/requirementDiagram-UZGBJVZJ-fAoABRs-.js +0 -64
- package/dist/dashboard/client/assets/sankeyDiagram-TZEHDZUN-BTJZKbMB.js +0 -10
- package/dist/dashboard/client/assets/sequenceDiagram-WL72ISMW-D1CT5eZr.js +0 -145
- package/dist/dashboard/client/assets/stateDiagram-FKZM4ZOC-BOuyRm06.js +0 -1
- package/dist/dashboard/client/assets/stateDiagram-v2-4FDKWEC3-DtmMH8sN.js +0 -1
- package/dist/dashboard/client/assets/timeline-definition-IT6M3QCI-IT_de2GW.js +0 -61
- package/dist/dashboard/client/assets/treemap-GDKQZRPO-ChPy-xEn.js +0 -162
- package/dist/dashboard/client/assets/xychartDiagram-PRI3JC2R-CNHEwC5B.js +0 -7
- package/dist/dashboard/client/favicon-dark.ico +0 -0
- package/dist/dashboard/client/favicon-light.ico +0 -0
- package/dist/dashboard/client/index.html +0 -15
- package/dist/dashboard/server.js +0 -39726
|
@@ -1,581 +0,0 @@
|
|
|
1
|
-
function nN(e,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const l in a)if(l!=="default"&&!(l in e)){const o=Object.getOwnPropertyDescriptor(a,l);o&&Object.defineProperty(e,l,o.get?o:{enumerable:!0,get:()=>a[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))a(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function r(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(l){if(l.ep)return;l.ep=!0;const o=r(l);fetch(l.href,o)}})();function Pu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function v8(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,l.get?l:{enumerable:!0,get:function(){return e[a]}})}),r}var ih={exports:{}},Gl={};/**
|
|
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 Yb;function rN(){if(Yb)return Gl;Yb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,l,o){var c=null;if(o!==void 0&&(c=""+o),l.key!==void 0&&(c=""+l.key),"key"in l){o={};for(var f in l)f!=="key"&&(o[f]=l[f])}else o=l;return l=o.ref,{$$typeof:e,type:a,key:c,ref:l!==void 0?l:null,props:o}}return Gl.Fragment=t,Gl.jsx=r,Gl.jsxs=r,Gl}var Qb;function iN(){return Qb||(Qb=1,ih.exports=rN()),ih.exports}var d=iN(),ah={exports:{}},et={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Xb;function aN(){if(Xb)return et;Xb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),y=Symbol.iterator;function v(D){return D===null||typeof D!="object"?null:(D=y&&D[y]||D["@@iterator"],typeof D=="function"?D:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,N={};function S(D,B,C){this.props=D,this.context=B,this.refs=N,this.updater=C||w}S.prototype.isReactComponent={},S.prototype.setState=function(D,B){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,B,"setState")},S.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function O(){}O.prototype=S.prototype;function z(D,B,C){this.props=D,this.context=B,this.refs=N,this.updater=C||w}var F=z.prototype=new O;F.constructor=z,_(F,S.prototype),F.isPureReactComponent=!0;var $=Array.isArray;function j(){}var G={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function ie(D,B,C){var ue=C.ref;return{$$typeof:e,type:D,key:B,ref:ue!==void 0?ue:null,props:C}}function P(D,B){return ie(D.type,B,D.props)}function ee(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function te(D){var B={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(C){return B[C]})}var we=/\/+/g;function se(D,B){return typeof D=="object"&&D!==null&&D.key!=null?te(""+D.key):B.toString(36)}function Q(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(j,j):(D.status="pending",D.then(function(B){D.status==="pending"&&(D.status="fulfilled",D.value=B)},function(B){D.status==="pending"&&(D.status="rejected",D.reason=B)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function M(D,B,C,ue,be){var ye=typeof D;(ye==="undefined"||ye==="boolean")&&(D=null);var le=!1;if(D===null)le=!0;else switch(ye){case"bigint":case"string":case"number":le=!0;break;case"object":switch(D.$$typeof){case e:case t:le=!0;break;case g:return le=D._init,M(le(D._payload),B,C,ue,be)}}if(le)return be=be(D),le=ue===""?"."+se(D,0):ue,$(be)?(C="",le!=null&&(C=le.replace(we,"$&/")+"/"),M(be,B,C,"",function(Ue){return Ue})):be!=null&&(ee(be)&&(be=P(be,C+(be.key==null||D&&D.key===be.key?"":(""+be.key).replace(we,"$&/")+"/")+le)),B.push(be)),1;le=0;var xe=ue===""?".":ue+":";if($(D))for(var pe=0;pe<D.length;pe++)ue=D[pe],ye=xe+se(ue,pe),le+=M(ue,B,C,ye,be);else if(pe=v(D),typeof pe=="function")for(D=pe.call(D),pe=0;!(ue=D.next()).done;)ue=ue.value,ye=xe+se(ue,pe++),le+=M(ue,B,C,ye,be);else if(ye==="object"){if(typeof D.then=="function")return M(Q(D),B,C,ue,be);throw B=String(D),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return le}function Y(D,B,C){if(D==null)return D;var ue=[],be=0;return M(D,ue,"","",function(ye){return B.call(C,ye,be++)}),ue}function V(D){if(D._status===-1){var B=D._result;B=B(),B.then(function(C){(D._status===0||D._status===-1)&&(D._status=1,D._result=C)},function(C){(D._status===0||D._status===-1)&&(D._status=2,D._result=C)}),D._status===-1&&(D._status=0,D._result=B)}if(D._status===1)return D._result.default;throw D._result}var fe=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},A={map:Y,forEach:function(D,B,C){Y(D,function(){B.apply(this,arguments)},C)},count:function(D){var B=0;return Y(D,function(){B++}),B},toArray:function(D){return Y(D,function(B){return B})||[]},only:function(D){if(!ee(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return et.Activity=x,et.Children=A,et.Component=S,et.Fragment=r,et.Profiler=l,et.PureComponent=z,et.StrictMode=a,et.Suspense=h,et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,et.__COMPILER_RUNTIME={__proto__:null,c:function(D){return G.H.useMemoCache(D)}},et.cache=function(D){return function(){return D.apply(null,arguments)}},et.cacheSignal=function(){return null},et.cloneElement=function(D,B,C){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var ue=_({},D.props),be=D.key;if(B!=null)for(ye in B.key!==void 0&&(be=""+B.key),B)!R.call(B,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&B.ref===void 0||(ue[ye]=B[ye]);var ye=arguments.length-2;if(ye===1)ue.children=C;else if(1<ye){for(var le=Array(ye),xe=0;xe<ye;xe++)le[xe]=arguments[xe+2];ue.children=le}return ie(D.type,be,ue)},et.createContext=function(D){return D={$$typeof:c,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:o,_context:D},D},et.createElement=function(D,B,C){var ue,be={},ye=null;if(B!=null)for(ue in B.key!==void 0&&(ye=""+B.key),B)R.call(B,ue)&&ue!=="key"&&ue!=="__self"&&ue!=="__source"&&(be[ue]=B[ue]);var le=arguments.length-2;if(le===1)be.children=C;else if(1<le){for(var xe=Array(le),pe=0;pe<le;pe++)xe[pe]=arguments[pe+2];be.children=xe}if(D&&D.defaultProps)for(ue in le=D.defaultProps,le)be[ue]===void 0&&(be[ue]=le[ue]);return ie(D,ye,be)},et.createRef=function(){return{current:null}},et.forwardRef=function(D){return{$$typeof:f,render:D}},et.isValidElement=ee,et.lazy=function(D){return{$$typeof:g,_payload:{_status:-1,_result:D},_init:V}},et.memo=function(D,B){return{$$typeof:m,type:D,compare:B===void 0?null:B}},et.startTransition=function(D){var B=G.T,C={};G.T=C;try{var ue=D(),be=G.S;be!==null&&be(C,ue),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"&&ue.then(j,fe)}catch(ye){fe(ye)}finally{B!==null&&C.types!==null&&(B.types=C.types),G.T=B}},et.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},et.use=function(D){return G.H.use(D)},et.useActionState=function(D,B,C){return G.H.useActionState(D,B,C)},et.useCallback=function(D,B){return G.H.useCallback(D,B)},et.useContext=function(D){return G.H.useContext(D)},et.useDebugValue=function(){},et.useDeferredValue=function(D,B){return G.H.useDeferredValue(D,B)},et.useEffect=function(D,B){return G.H.useEffect(D,B)},et.useEffectEvent=function(D){return G.H.useEffectEvent(D)},et.useId=function(){return G.H.useId()},et.useImperativeHandle=function(D,B,C){return G.H.useImperativeHandle(D,B,C)},et.useInsertionEffect=function(D,B){return G.H.useInsertionEffect(D,B)},et.useLayoutEffect=function(D,B){return G.H.useLayoutEffect(D,B)},et.useMemo=function(D,B){return G.H.useMemo(D,B)},et.useOptimistic=function(D,B){return G.H.useOptimistic(D,B)},et.useReducer=function(D,B,C){return G.H.useReducer(D,B,C)},et.useRef=function(D){return G.H.useRef(D)},et.useState=function(D){return G.H.useState(D)},et.useSyncExternalStore=function(D,B,C){return G.H.useSyncExternalStore(D,B,C)},et.useTransition=function(){return G.H.useTransition()},et.version="19.2.4",et}var Zb;function vm(){return Zb||(Zb=1,ah.exports=aN()),ah.exports}var E=vm();const sN=Pu(E),lN=nN({__proto__:null,default:sN},[E]);var sh={exports:{}},Kl={},lh={exports:{}},oh={};/**
|
|
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 Wb;function oN(){return Wb||(Wb=1,(function(e){function t(M,Y){var V=M.length;M.push(Y);e:for(;0<V;){var fe=V-1>>>1,A=M[fe];if(0<l(A,Y))M[fe]=Y,M[V]=A,V=fe;else break e}}function r(M){return M.length===0?null:M[0]}function a(M){if(M.length===0)return null;var Y=M[0],V=M.pop();if(V!==Y){M[0]=V;e:for(var fe=0,A=M.length,D=A>>>1;fe<D;){var B=2*(fe+1)-1,C=M[B],ue=B+1,be=M[ue];if(0>l(C,V))ue<A&&0>l(be,C)?(M[fe]=be,M[ue]=V,fe=ue):(M[fe]=C,M[B]=V,fe=B);else if(ue<A&&0>l(be,V))M[fe]=be,M[ue]=V,fe=ue;else break e}}return Y}function l(M,Y){var V=M.sortIndex-Y.sortIndex;return V!==0?V:M.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var h=[],m=[],g=1,x=null,y=3,v=!1,w=!1,_=!1,N=!1,S=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function F(M){for(var Y=r(m);Y!==null;){if(Y.callback===null)a(m);else if(Y.startTime<=M)a(m),Y.sortIndex=Y.expirationTime,t(h,Y);else break;Y=r(m)}}function $(M){if(_=!1,F(M),!w)if(r(h)!==null)w=!0,j||(j=!0,te());else{var Y=r(m);Y!==null&&Q($,Y.startTime-M)}}var j=!1,G=-1,R=5,ie=-1;function P(){return N?!0:!(e.unstable_now()-ie<R)}function ee(){if(N=!1,j){var M=e.unstable_now();ie=M;var Y=!0;try{e:{w=!1,_&&(_=!1,O(G),G=-1),v=!0;var V=y;try{t:{for(F(M),x=r(h);x!==null&&!(x.expirationTime>M&&P());){var fe=x.callback;if(typeof fe=="function"){x.callback=null,y=x.priorityLevel;var A=fe(x.expirationTime<=M);if(M=e.unstable_now(),typeof A=="function"){x.callback=A,F(M),Y=!0;break t}x===r(h)&&a(h),F(M)}else a(h);x=r(h)}if(x!==null)Y=!0;else{var D=r(m);D!==null&&Q($,D.startTime-M),Y=!1}}break e}finally{x=null,y=V,v=!1}Y=void 0}}finally{Y?te():j=!1}}}var te;if(typeof z=="function")te=function(){z(ee)};else if(typeof MessageChannel<"u"){var we=new MessageChannel,se=we.port2;we.port1.onmessage=ee,te=function(){se.postMessage(null)}}else te=function(){S(ee,0)};function Q(M,Y){G=S(function(){M(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(M){switch(y){case 1:case 2:case 3:var Y=3;break;default:Y=y}var V=y;y=Y;try{return M()}finally{y=V}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(M,Y){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var V=y;y=M;try{return Y()}finally{y=V}},e.unstable_scheduleCallback=function(M,Y,V){var fe=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?fe+V:fe):V=fe,M){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=V+A,M={id:g++,callback:Y,priorityLevel:M,startTime:V,expirationTime:A,sortIndex:-1},V>fe?(M.sortIndex=V,t(m,M),r(h)===null&&M===r(m)&&(_?(O(G),G=-1):_=!0,Q($,V-fe))):(M.sortIndex=A,t(h,M),w||v||(w=!0,j||(j=!0,te()))),M},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(M){var Y=y;return function(){var V=y;y=Y;try{return M.apply(this,arguments)}finally{y=V}}}})(oh)),oh}var Jb;function cN(){return Jb||(Jb=1,lh.exports=oN()),lh.exports}var ch={exports:{}},Pn={};/**
|
|
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 ex;function uN(){if(ex)return Pn;ex=1;var e=vm();function t(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+h+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},l=Symbol.for("react.portal");function o(h,m,g){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:x==null?null:""+x,children:h,containerInfo:m,implementation:g}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Pn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Pn.createPortal=function(h,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return o(h,m,null,g)},Pn.flushSync=function(h){var m=c.T,g=a.p;try{if(c.T=null,a.p=2,h)return h()}finally{c.T=m,a.p=g,a.d.f()}},Pn.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))},Pn.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},Pn.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var g=m.as,x=f(g,m.crossOrigin),y=typeof m.integrity=="string"?m.integrity:void 0,v=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?a.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:y,fetchPriority:v}):g==="script"&&a.d.X(h,{crossOrigin:x,integrity:y,fetchPriority:v,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Pn.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=f(m.as,m.crossOrigin);a.d.M(h,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(h)},Pn.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,x=f(g,m.crossOrigin);a.d.L(h,g,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Pn.preloadModule=function(h,m){if(typeof h=="string")if(m){var g=f(m.as,m.crossOrigin);a.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(h)},Pn.requestFormReset=function(h){a.d.r(h)},Pn.unstable_batchedUpdates=function(h,m){return h(m)},Pn.useFormState=function(h,m,g){return c.H.useFormState(h,m,g)},Pn.useFormStatus=function(){return c.H.useHostTransitionStatus()},Pn.version="19.2.4",Pn}var tx;function Sv(){if(tx)return ch.exports;tx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ch.exports=uN(),ch.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 nx;function dN(){if(nx)return Kl;nx=1;var e=cN(),t=vm(),r=Sv();function a(n){var i="https://react.dev/errors/"+n;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+n+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function o(n){var i=n,s=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(s=i.return),n=i.return;while(n)}return i.tag===3?s:null}function c(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function f(n){if(n.tag===31){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function h(n){if(o(n)!==n)throw Error(a(188))}function m(n){var i=n.alternate;if(!i){if(i=o(n),i===null)throw Error(a(188));return i!==n?null:n}for(var s=n,u=i;;){var p=s.return;if(p===null)break;var b=p.alternate;if(b===null){if(u=p.return,u!==null){s=u;continue}break}if(p.child===b.child){for(b=p.child;b;){if(b===s)return h(p),n;if(b===u)return h(p),i;b=b.sibling}throw Error(a(188))}if(s.return!==u.return)s=p,u=b;else{for(var k=!1,T=p.child;T;){if(T===s){k=!0,s=p,u=b;break}if(T===u){k=!0,u=p,s=b;break}T=T.sibling}if(!k){for(T=b.child;T;){if(T===s){k=!0,s=b,u=p;break}if(T===u){k=!0,u=b,s=p;break}T=T.sibling}if(!k)throw Error(a(189))}}if(s.alternate!==u)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?n:i}function g(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n;for(n=n.child;n!==null;){if(i=g(n),i!==null)return i;n=n.sibling}return null}var x=Object.assign,y=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),z=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function te(n){return n===null||typeof n!="object"?null:(n=ee&&n[ee]||n["@@iterator"],typeof n=="function"?n:null)}var we=Symbol.for("react.client.reference");function se(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===we?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case _:return"Fragment";case S:return"Profiler";case N:return"StrictMode";case $:return"Suspense";case j:return"SuspenseList";case ie:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case w:return"Portal";case z:return n.displayName||"Context";case O:return(n._context.displayName||"Context")+".Consumer";case F:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case G:return i=n.displayName||null,i!==null?i:se(n.type)||"Memo";case R:i=n._payload,n=n._init;try{return se(n(i))}catch{}}return null}var Q=Array.isArray,M=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},fe=[],A=-1;function D(n){return{current:n}}function B(n){0>A||(n.current=fe[A],fe[A]=null,A--)}function C(n,i){A++,fe[A]=n.current,n.current=i}var ue=D(null),be=D(null),ye=D(null),le=D(null);function xe(n,i){switch(C(ye,i),C(be,n),C(ue,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?bb(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=bb(i),n=xb(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}B(ue),C(ue,n)}function pe(){B(ue),B(be),B(ye)}function Ue(n){n.memoizedState!==null&&C(le,n);var i=ue.current,s=xb(i,n.type);i!==s&&(C(be,n),C(ue,s))}function Re(n){be.current===n&&(B(ue),B(be)),le.current===n&&(B(le),Fl._currentValue=V)}var Tt,tt;function gt(n){if(Tt===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);Tt=i&&i[1]||"",tt=-1<s.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Tt+n+tt}var Et=!1;function ot(n,i){if(!n||Et)return"";Et=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(i){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(re){var J=re}Reflect.construct(n,[],he)}else{try{he.call()}catch(re){J=re}n.call(he.prototype)}}else{try{throw Error()}catch(re){J=re}(he=n())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(re){if(re&&J&&typeof re.stack=="string")return[re.stack,J.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=u.DetermineComponentFrameRoot(),k=b[0],T=b[1];if(k&&T){var I=k.split(`
|
|
44
|
-
`),Z=T.split(`
|
|
45
|
-
`);for(p=u=0;u<I.length&&!I[u].includes("DetermineComponentFrameRoot");)u++;for(;p<Z.length&&!Z[p].includes("DetermineComponentFrameRoot");)p++;if(u===I.length||p===Z.length)for(u=I.length-1,p=Z.length-1;1<=u&&0<=p&&I[u]!==Z[p];)p--;for(;1<=u&&0<=p;u--,p--)if(I[u]!==Z[p]){if(u!==1||p!==1)do if(u--,p--,0>p||I[u]!==Z[p]){var oe=`
|
|
46
|
-
`+I[u].replace(" at new "," at ");return n.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",n.displayName)),oe}while(1<=u&&0<=p);break}}}finally{Et=!1,Error.prepareStackTrace=s}return(s=n?n.displayName||n.name:"")?gt(s):""}function En(n,i){switch(n.tag){case 26:case 27:case 5:return gt(n.type);case 16:return gt("Lazy");case 13:return n.child!==i&&i!==null?gt("Suspense Fallback"):gt("Suspense");case 19:return gt("SuspenseList");case 0:case 15:return ot(n.type,!1);case 11:return ot(n.type.render,!1);case 1:return ot(n.type,!0);case 31:return gt("Activity");default:return""}}function Yn(n){try{var i="",s=null;do i+=En(n,s),s=n,n=n.return;while(n);return i}catch(u){return`
|
|
47
|
-
Error generating stack: `+u.message+`
|
|
48
|
-
`+u.stack}}var xr=Object.prototype.hasOwnProperty,yr=e.unstable_scheduleCallback,li=e.unstable_cancelCallback,wa=e.unstable_shouldYield,Li=e.unstable_requestPaint,Wt=e.unstable_now,Qn=e.unstable_getCurrentPriorityLevel,ae=e.unstable_ImmediatePriority,Ee=e.unstable_UserBlockingPriority,$e=e.unstable_NormalPriority,We=e.unstable_LowPriority,rt=e.unstable_IdlePriority,zn=e.log,ar=e.unstable_setDisableYieldValue,cn=null,rn=null;function Qt(n){if(typeof zn=="function"&&ar(n),rn&&typeof rn.setStrictMode=="function")try{rn.setStrictMode(cn,n)}catch{}}var At=Math.clz32?Math.clz32:ts,sr=Math.log,Cn=Math.LN2;function ts(n){return n>>>=0,n===0?32:31-(sr(n)/Cn|0)|0}var Kr=256,Lr=262144,Vr=4194304;function Tn(n){var i=n&42;if(i!==0)return i;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function U(n,i,s){var u=n.pendingLanes;if(u===0)return 0;var p=0,b=n.suspendedLanes,k=n.pingedLanes;n=n.warmLanes;var T=u&134217727;return T!==0?(u=T&~b,u!==0?p=Tn(u):(k&=T,k!==0?p=Tn(k):s||(s=T&~n,s!==0&&(p=Tn(s))))):(T=u&~b,T!==0?p=Tn(T):k!==0?p=Tn(k):s||(s=u&~n,s!==0&&(p=Tn(s)))),p===0?0:i!==0&&i!==p&&(i&b)===0&&(b=p&-p,s=i&-i,b>=s||b===32&&(s&4194048)!==0)?i:p}function ce(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function ze(n,i){switch(n){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Qe(){var n=Vr;return Vr<<=1,(Vr&62914560)===0&&(Vr=4194304),n}function Lt(n){for(var i=[],s=0;31>s;s++)i.push(n);return i}function Rt(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Me(n,i,s,u,p,b){var k=n.pendingLanes;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=s,n.entangledLanes&=s,n.errorRecoveryDisabledLanes&=s,n.shellSuspendCounter=0;var T=n.entanglements,I=n.expirationTimes,Z=n.hiddenUpdates;for(s=k&~s;0<s;){var oe=31-At(s),he=1<<oe;T[oe]=0,I[oe]=-1;var J=Z[oe];if(J!==null)for(Z[oe]=null,oe=0;oe<J.length;oe++){var re=J[oe];re!==null&&(re.lane&=-536870913)}s&=~he}u!==0&&Te(n,u,0),b!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=b&~(k&~i))}function Te(n,i,s){n.pendingLanes|=i,n.suspendedLanes&=~i;var u=31-At(i);n.entangledLanes|=i,n.entanglements[u]=n.entanglements[u]|1073741824|s&261930}function Ve(n,i){var s=n.entangledLanes|=i;for(n=n.entanglements;s;){var u=31-At(s),p=1<<u;p&i|n[u]&i&&(n[u]|=i),s&=~p}}function L(n,i){var s=i&-i;return s=(s&42)!==0?1:H(s),(s&(n.suspendedLanes|i))!==0?0:s}function H(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function W(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function me(){var n=Y.p;return n!==0?n:(n=window.event,n===void 0?32:Fb(n.type))}function ve(n,i){var s=Y.p;try{return Y.p=n,i()}finally{Y.p=s}}var Oe=Math.random().toString(36).slice(2),_e="__reactFiber$"+Oe,Ce="__reactProps$"+Oe,Ae="__reactContainer$"+Oe,He="__reactEvents$"+Oe,qe="__reactListeners$"+Oe,Ie="__reactHandles$"+Oe,_t="__reactResources$"+Oe,lt="__reactMarker$"+Oe;function Bt(n){delete n[_e],delete n[Ce],delete n[He],delete n[qe],delete n[Ie]}function Nt(n){var i=n[_e];if(i)return i;for(var s=n.parentNode;s;){if(i=s[Ae]||s[_e]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(n=Nb(n);n!==null;){if(s=n[_e])return s;n=Nb(n)}return i}n=s,s=n.parentNode}return null}function Jt(n){if(n=n[_e]||n[Ae]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}function ft(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(a(33))}function un(n){var i=n[_t];return i||(i=n[_t]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Ht(n){n[lt]=!0}var Yr=new Set,Un={};function mn(n,i){ge(n,i),ge(n+"Capture",i)}function ge(n,i){for(Un[n]=i,n=0;n<i.length;n++)Yr.add(i[n])}var Be=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Je={},St={};function Xt(n){return xr.call(St,n)?!0:xr.call(Je,n)?!1:Be.test(n)?St[n]=!0:(Je[n]=!0,!1)}function Xe(n,i,s){if(Xt(i))if(s===null)n.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":n.removeAttribute(i);return;case"boolean":var u=i.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+s)}}function It(n,i,s){if(s===null)n.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttribute(i,""+s)}}function dn(n,i,s,u){if(u===null)n.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttributeNS(i,s,""+u)}}function zt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function bt(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function oi(n,i,s){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,b=u.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return p.call(this)},set:function(k){s=""+k,b.call(this,k)}}),Object.defineProperty(n,i,{enumerable:u.enumerable}),{getValue:function(){return s},setValue:function(k){s=""+k},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function ci(n){if(!n._valueTracker){var i=bt(n)?"checked":"value";n._valueTracker=oi(n,i,""+n[i])}}function Ea(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var s=i.getValue(),u="";return n&&(u=bt(n)?n.checked?"true":"false":n.value),n=u,n!==s?(i.setValue(n),!0):!1}function ns(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var nd=/[\n"\\]/g;function Xn(n){return n.replace(nd,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function tl(n,i,s,u,p,b,k,T){n.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?n.type=k:n.removeAttribute("type"),i!=null?k==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+zt(i)):n.value!==""+zt(i)&&(n.value=""+zt(i)):k!=="submit"&&k!=="reset"||n.removeAttribute("value"),i!=null?rs(n,k,zt(i)):s!=null?rs(n,k,zt(s)):u!=null&&n.removeAttribute("value"),p==null&&b!=null&&(n.defaultChecked=!!b),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?n.name=""+zt(T):n.removeAttribute("name")}function _a(n,i,s,u,p,b,k,T){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(n.type=b),i!=null||s!=null){if(!(b!=="submit"&&b!=="reset"||i!=null)){ci(n);return}s=s!=null?""+zt(s):"",i=i!=null?""+zt(i):s,T||i===n.value||(n.value=i),n.defaultValue=i}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=T?n.checked:!!u,n.defaultChecked=!!u,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(n.name=k),ci(n)}function rs(n,i,s){i==="number"&&ns(n.ownerDocument)===n||n.defaultValue===""+s||(n.defaultValue=""+s)}function On(n,i,s,u){if(n=n.options,i){i={};for(var p=0;p<s.length;p++)i["$"+s[p]]=!0;for(s=0;s<n.length;s++)p=i.hasOwnProperty("$"+n[s].value),n[s].selected!==p&&(n[s].selected=p),p&&u&&(n[s].defaultSelected=!0)}else{for(s=""+zt(s),i=null,p=0;p<n.length;p++){if(n[p].value===s){n[p].selected=!0,u&&(n[p].defaultSelected=!0);return}i!==null||n[p].disabled||(i=n[p])}i!==null&&(i.selected=!0)}}function Uo(n,i,s){if(i!=null&&(i=""+zt(i),i!==n.value&&(n.value=i),s==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=s!=null?""+zt(s):""}function is(n,i,s,u){if(i==null){if(u!=null){if(s!=null)throw Error(a(92));if(Q(u)){if(1<u.length)throw Error(a(93));u=u[0]}s=u}s==null&&(s=""),i=s}s=zt(i),n.defaultValue=s,u=n.textContent,u===s&&u!==""&&u!==null&&(n.value=u),ci(n)}function Ze(n,i){if(i){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=i;return}}n.textContent=i}var Po=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function pn(n,i,s){var u=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?u?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":u?n.setProperty(i,s):typeof s!="number"||s===0||Po.has(i)?i==="float"?n.cssFloat=s:n[i]=(""+s).trim():n[i]=s+"px"}function Ut(n,i,s){if(i!=null&&typeof i!="object")throw Error(a(62));if(n=n.style,s!=null){for(var u in s)!s.hasOwnProperty(u)||i!=null&&i.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var p in i)u=i[p],i.hasOwnProperty(p)&&s[p]!==u&&pn(n,p,u)}else for(var b in i)i.hasOwnProperty(b)&&pn(n,b,i[b])}function Ii(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ui=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"]]),nl=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Bi(n){return nl.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Se(){}var Pe=null;function nt(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var xt=null,sn=null;function vr(n){var i=Jt(n);if(i&&(n=i.stateNode)){var s=n[Ce]||null;e:switch(n=i.stateNode,i.type){case"input":if(tl(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Xn(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var u=s[i];if(u!==n&&u.form===n.form){var p=u[Ce]||null;if(!p)throw Error(a(90));tl(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(i=0;i<s.length;i++)u=s[i],u.form===n.form&&Ea(u)}break e;case"textarea":Uo(n,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&On(n,!!s.multiple,i,!1)}}}var rl=!1;function Fo(n,i,s){if(rl)return n(i,s);rl=!0;try{var u=n(i);return u}finally{if(rl=!1,(xt!==null||sn!==null)&&(Cc(),xt&&(i=xt,n=sn,sn=xt=null,vr(i),n)))for(i=0;i<n.length;i++)vr(n[i])}}function il(n,i){var s=n.stateNode;if(s===null)return null;var u=s[Ce]||null;if(u===null)return null;s=u[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(a(231,i,typeof s));return s}var di=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rd=!1;if(di)try{var al={};Object.defineProperty(al,"passive",{get:function(){rd=!0}}),window.addEventListener("test",al,al),window.removeEventListener("test",al,al)}catch{rd=!1}var Ui=null,id=null,Ho=null;function xp(){if(Ho)return Ho;var n,i=id,s=i.length,u,p="value"in Ui?Ui.value:Ui.textContent,b=p.length;for(n=0;n<s&&i[n]===p[n];n++);var k=s-n;for(u=1;u<=k&&i[s-u]===p[b-u];u++);return Ho=p.slice(n,1<u?1-u:void 0)}function qo(n){var i=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&i===13&&(n=13)):n=i,n===10&&(n=13),32<=n||n===13?n:0}function $o(){return!0}function yp(){return!1}function Zn(n){function i(s,u,p,b,k){this._reactName=s,this._targetInst=p,this.type=u,this.nativeEvent=b,this.target=k,this.currentTarget=null;for(var T in n)n.hasOwnProperty(T)&&(s=n[T],this[T]=s?s(b):b[T]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?$o:yp,this.isPropagationStopped=yp,this}return x(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=$o)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=$o)},persist:function(){},isPersistent:$o}),i}var Na={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Go=Zn(Na),sl=x({},Na,{view:0,detail:0}),eE=Zn(sl),ad,sd,ll,Ko=x({},sl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:od,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==ll&&(ll&&n.type==="mousemove"?(ad=n.screenX-ll.screenX,sd=n.screenY-ll.screenY):sd=ad=0,ll=n),ad)},movementY:function(n){return"movementY"in n?n.movementY:sd}}),vp=Zn(Ko),tE=x({},Ko,{dataTransfer:0}),nE=Zn(tE),rE=x({},sl,{relatedTarget:0}),ld=Zn(rE),iE=x({},Na,{animationName:0,elapsedTime:0,pseudoElement:0}),aE=Zn(iE),sE=x({},Na,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),lE=Zn(sE),oE=x({},Na,{data:0}),kp=Zn(oE),cE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uE={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"},dE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fE(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=dE[n])?!!i[n]:!1}function od(){return fE}var hE=x({},sl,{key:function(n){if(n.key){var i=cE[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=qo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?uE[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:od,charCode:function(n){return n.type==="keypress"?qo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?qo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),mE=Zn(hE),pE=x({},Ko,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wp=Zn(pE),gE=x({},sl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:od}),bE=Zn(gE),xE=x({},Na,{propertyName:0,elapsedTime:0,pseudoElement:0}),yE=Zn(xE),vE=x({},Ko,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),kE=Zn(vE),wE=x({},Na,{newState:0,oldState:0}),EE=Zn(wE),_E=[9,13,27,32],cd=di&&"CompositionEvent"in window,ol=null;di&&"documentMode"in document&&(ol=document.documentMode);var NE=di&&"TextEvent"in window&&!ol,Ep=di&&(!cd||ol&&8<ol&&11>=ol),_p=" ",Np=!1;function Sp(n,i){switch(n){case"keyup":return _E.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zp(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var as=!1;function SE(n,i){switch(n){case"compositionend":return zp(i);case"keypress":return i.which!==32?null:(Np=!0,_p);case"textInput":return n=i.data,n===_p&&Np?null:n;default:return null}}function zE(n,i){if(as)return n==="compositionend"||!cd&&Sp(n,i)?(n=xp(),Ho=id=Ui=null,as=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Ep&&i.locale!=="ko"?null:i.data;default:return null}}var CE={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 Cp(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!CE[n.type]:i==="textarea"}function Tp(n,i,s,u){xt?sn?sn.push(u):sn=[u]:xt=u,i=Dc(i,"onChange"),0<i.length&&(s=new Go("onChange","change",null,s,u),n.push({event:s,listeners:i}))}var cl=null,ul=null;function TE(n){db(n,0)}function Vo(n){var i=ft(n);if(Ea(i))return n}function Ap(n,i){if(n==="change")return i}var Rp=!1;if(di){var ud;if(di){var dd="oninput"in document;if(!dd){var Op=document.createElement("div");Op.setAttribute("oninput","return;"),dd=typeof Op.oninput=="function"}ud=dd}else ud=!1;Rp=ud&&(!document.documentMode||9<document.documentMode)}function Mp(){cl&&(cl.detachEvent("onpropertychange",jp),ul=cl=null)}function jp(n){if(n.propertyName==="value"&&Vo(ul)){var i=[];Tp(i,ul,n,nt(n)),Fo(TE,i)}}function AE(n,i,s){n==="focusin"?(Mp(),cl=i,ul=s,cl.attachEvent("onpropertychange",jp)):n==="focusout"&&Mp()}function RE(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Vo(ul)}function OE(n,i){if(n==="click")return Vo(i)}function ME(n,i){if(n==="input"||n==="change")return Vo(i)}function jE(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var lr=typeof Object.is=="function"?Object.is:jE;function dl(n,i){if(lr(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var s=Object.keys(n),u=Object.keys(i);if(s.length!==u.length)return!1;for(u=0;u<s.length;u++){var p=s[u];if(!xr.call(i,p)||!lr(n[p],i[p]))return!1}return!0}function Dp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Lp(n,i){var s=Dp(n);n=0;for(var u;s;){if(s.nodeType===3){if(u=n+s.textContent.length,n<=i&&u>=i)return{node:s,offset:i-n};n=u}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Dp(s)}}function Ip(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?Ip(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function Bp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=ns(n.document);i instanceof n.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)n=i.contentWindow;else break;i=ns(n.document)}return i}function fd(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}var DE=di&&"documentMode"in document&&11>=document.documentMode,ss=null,hd=null,fl=null,md=!1;function Up(n,i,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;md||ss==null||ss!==ns(u)||(u=ss,"selectionStart"in u&&fd(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),fl&&dl(fl,u)||(fl=u,u=Dc(hd,"onSelect"),0<u.length&&(i=new Go("onSelect","select",null,i,s),n.push({event:i,listeners:u}),i.target=ss)))}function Sa(n,i){var s={};return s[n.toLowerCase()]=i.toLowerCase(),s["Webkit"+n]="webkit"+i,s["Moz"+n]="moz"+i,s}var ls={animationend:Sa("Animation","AnimationEnd"),animationiteration:Sa("Animation","AnimationIteration"),animationstart:Sa("Animation","AnimationStart"),transitionrun:Sa("Transition","TransitionRun"),transitionstart:Sa("Transition","TransitionStart"),transitioncancel:Sa("Transition","TransitionCancel"),transitionend:Sa("Transition","TransitionEnd")},pd={},Pp={};di&&(Pp=document.createElement("div").style,"AnimationEvent"in window||(delete ls.animationend.animation,delete ls.animationiteration.animation,delete ls.animationstart.animation),"TransitionEvent"in window||delete ls.transitionend.transition);function za(n){if(pd[n])return pd[n];if(!ls[n])return n;var i=ls[n],s;for(s in i)if(i.hasOwnProperty(s)&&s in Pp)return pd[n]=i[s];return n}var Fp=za("animationend"),Hp=za("animationiteration"),qp=za("animationstart"),LE=za("transitionrun"),IE=za("transitionstart"),BE=za("transitioncancel"),$p=za("transitionend"),Gp=new Map,gd="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(" ");gd.push("scrollEnd");function Ir(n,i){Gp.set(n,i),mn(i,[n])}var Yo=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},kr=[],os=0,bd=0;function Qo(){for(var n=os,i=bd=os=0;i<n;){var s=kr[i];kr[i++]=null;var u=kr[i];kr[i++]=null;var p=kr[i];kr[i++]=null;var b=kr[i];if(kr[i++]=null,u!==null&&p!==null){var k=u.pending;k===null?p.next=p:(p.next=k.next,k.next=p),u.pending=p}b!==0&&Kp(s,p,b)}}function Xo(n,i,s,u){kr[os++]=n,kr[os++]=i,kr[os++]=s,kr[os++]=u,bd|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function xd(n,i,s,u){return Xo(n,i,s,u),Zo(n)}function Ca(n,i){return Xo(n,null,null,i),Zo(n)}function Kp(n,i,s){n.lanes|=s;var u=n.alternate;u!==null&&(u.lanes|=s);for(var p=!1,b=n.return;b!==null;)b.childLanes|=s,u=b.alternate,u!==null&&(u.childLanes|=s),b.tag===22&&(n=b.stateNode,n===null||n._visibility&1||(p=!0)),n=b,b=b.return;return n.tag===3?(b=n.stateNode,p&&i!==null&&(p=31-At(s),n=b.hiddenUpdates,u=n[p],u===null?n[p]=[i]:u.push(i),i.lane=s|536870912),b):null}function Zo(n){if(50<jl)throw jl=0,Cf=null,Error(a(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}var cs={};function UE(n,i,s,u){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function or(n,i,s,u){return new UE(n,i,s,u)}function yd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function fi(n,i){var s=n.alternate;return s===null?(s=or(n.tag,i,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=i,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&65011712,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,i=n.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s.refCleanup=n.refCleanup,s}function Vp(n,i){n.flags&=65011714;var s=n.alternate;return s===null?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=s.childLanes,n.lanes=s.lanes,n.child=s.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=s.memoizedProps,n.memoizedState=s.memoizedState,n.updateQueue=s.updateQueue,n.type=s.type,i=s.dependencies,n.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),n}function Wo(n,i,s,u,p,b){var k=0;if(u=n,typeof n=="function")yd(n)&&(k=1);else if(typeof n=="string")k=$_(n,s,ue.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case ie:return n=or(31,s,i,p),n.elementType=ie,n.lanes=b,n;case _:return Ta(s.children,p,b,i);case N:k=8,p|=24;break;case S:return n=or(12,s,i,p|2),n.elementType=S,n.lanes=b,n;case $:return n=or(13,s,i,p),n.elementType=$,n.lanes=b,n;case j:return n=or(19,s,i,p),n.elementType=j,n.lanes=b,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case z:k=10;break e;case O:k=9;break e;case F:k=11;break e;case G:k=14;break e;case R:k=16,u=null;break e}k=29,s=Error(a(130,n===null?"null":typeof n,"")),u=null}return i=or(k,s,i,p),i.elementType=n,i.type=u,i.lanes=b,i}function Ta(n,i,s,u){return n=or(7,n,u,i),n.lanes=s,n}function vd(n,i,s){return n=or(6,n,null,i),n.lanes=s,n}function Yp(n){var i=or(18,null,null,0);return i.stateNode=n,i}function kd(n,i,s){return i=or(4,n.children!==null?n.children:[],n.key,i),i.lanes=s,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}var Qp=new WeakMap;function wr(n,i){if(typeof n=="object"&&n!==null){var s=Qp.get(n);return s!==void 0?s:(i={value:n,source:i,stack:Yn(i)},Qp.set(n,i),i)}return{value:n,source:i,stack:Yn(i)}}var us=[],ds=0,Jo=null,hl=0,Er=[],_r=0,Pi=null,Qr=1,Xr="";function hi(n,i){us[ds++]=hl,us[ds++]=Jo,Jo=n,hl=i}function Xp(n,i,s){Er[_r++]=Qr,Er[_r++]=Xr,Er[_r++]=Pi,Pi=n;var u=Qr;n=Xr;var p=32-At(u)-1;u&=~(1<<p),s+=1;var b=32-At(i)+p;if(30<b){var k=p-p%5;b=(u&(1<<k)-1).toString(32),u>>=k,p-=k,Qr=1<<32-At(i)+p|s<<p|u,Xr=b+n}else Qr=1<<b|s<<p|u,Xr=n}function wd(n){n.return!==null&&(hi(n,1),Xp(n,1,0))}function Ed(n){for(;n===Jo;)Jo=us[--ds],us[ds]=null,hl=us[--ds],us[ds]=null;for(;n===Pi;)Pi=Er[--_r],Er[_r]=null,Xr=Er[--_r],Er[_r]=null,Qr=Er[--_r],Er[_r]=null}function Zp(n,i){Er[_r++]=Qr,Er[_r++]=Xr,Er[_r++]=Pi,Qr=i.id,Xr=i.overflow,Pi=n}var Mn=null,en=null,kt=!1,Fi=null,Nr=!1,_d=Error(a(519));function Hi(n){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ml(wr(i,n)),_d}function Wp(n){var i=n.stateNode,s=n.type,u=n.memoizedProps;switch(i[_e]=n,i[Ce]=u,s){case"dialog":mt("cancel",i),mt("close",i);break;case"iframe":case"object":case"embed":mt("load",i);break;case"video":case"audio":for(s=0;s<Ll.length;s++)mt(Ll[s],i);break;case"source":mt("error",i);break;case"img":case"image":case"link":mt("error",i),mt("load",i);break;case"details":mt("toggle",i);break;case"input":mt("invalid",i),_a(i,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":mt("invalid",i);break;case"textarea":mt("invalid",i),is(i,u.value,u.defaultValue,u.children)}s=u.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||u.suppressHydrationWarning===!0||pb(i.textContent,s)?(u.popover!=null&&(mt("beforetoggle",i),mt("toggle",i)),u.onScroll!=null&&mt("scroll",i),u.onScrollEnd!=null&&mt("scrollend",i),u.onClick!=null&&(i.onclick=Se),i=!0):i=!1,i||Hi(n,!0)}function Jp(n){for(Mn=n.return;Mn;)switch(Mn.tag){case 5:case 31:case 13:Nr=!1;return;case 27:case 3:Nr=!0;return;default:Mn=Mn.return}}function fs(n){if(n!==Mn)return!1;if(!kt)return Jp(n),kt=!0,!1;var i=n.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=n.type,s=!(s!=="form"&&s!=="button")||qf(n.type,n.memoizedProps)),s=!s),s&&en&&Hi(n),Jp(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));en=_b(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));en=_b(n)}else i===27?(i=en,na(n.type)?(n=Yf,Yf=null,en=n):en=i):en=Mn?zr(n.stateNode.nextSibling):null;return!0}function Aa(){en=Mn=null,kt=!1}function Nd(){var n=Fi;return n!==null&&(tr===null?tr=n:tr.push.apply(tr,n),Fi=null),n}function ml(n){Fi===null?Fi=[n]:Fi.push(n)}var Sd=D(null),Ra=null,mi=null;function qi(n,i,s){C(Sd,i._currentValue),i._currentValue=s}function pi(n){n._currentValue=Sd.current,B(Sd)}function zd(n,i,s){for(;n!==null;){var u=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,u!==null&&(u.childLanes|=i)):u!==null&&(u.childLanes&i)!==i&&(u.childLanes|=i),n===s)break;n=n.return}}function Cd(n,i,s,u){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var b=p.dependencies;if(b!==null){var k=p.child;b=b.firstContext;e:for(;b!==null;){var T=b;b=p;for(var I=0;I<i.length;I++)if(T.context===i[I]){b.lanes|=s,T=b.alternate,T!==null&&(T.lanes|=s),zd(b.return,s,n),u||(k=null);break e}b=T.next}}else if(p.tag===18){if(k=p.return,k===null)throw Error(a(341));k.lanes|=s,b=k.alternate,b!==null&&(b.lanes|=s),zd(k,s,n),k=null}else k=p.child;if(k!==null)k.return=p;else for(k=p;k!==null;){if(k===n){k=null;break}if(p=k.sibling,p!==null){p.return=k.return,k=p;break}k=k.return}p=k}}function hs(n,i,s,u){n=null;for(var p=i,b=!1;p!==null;){if(!b){if((p.flags&524288)!==0)b=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var k=p.alternate;if(k===null)throw Error(a(387));if(k=k.memoizedProps,k!==null){var T=p.type;lr(p.pendingProps.value,k.value)||(n!==null?n.push(T):n=[T])}}else if(p===le.current){if(k=p.alternate,k===null)throw Error(a(387));k.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(Fl):n=[Fl])}p=p.return}n!==null&&Cd(i,n,s,u),i.flags|=262144}function ec(n){for(n=n.firstContext;n!==null;){if(!lr(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Oa(n){Ra=n,mi=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function jn(n){return e0(Ra,n)}function tc(n,i){return Ra===null&&Oa(n),e0(n,i)}function e0(n,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},mi===null){if(n===null)throw Error(a(308));mi=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else mi=mi.next=i;return s}var PE=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:function(s,u){n.push(u)}};this.abort=function(){i.aborted=!0,n.forEach(function(s){return s()})}},FE=e.unstable_scheduleCallback,HE=e.unstable_NormalPriority,gn={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Td(){return{controller:new PE,data:new Map,refCount:0}}function pl(n){n.refCount--,n.refCount===0&&FE(HE,function(){n.controller.abort()})}var gl=null,Ad=0,ms=0,ps=null;function qE(n,i){if(gl===null){var s=gl=[];Ad=0,ms=jf(),ps={status:"pending",value:void 0,then:function(u){s.push(u)}}}return Ad++,i.then(t0,t0),i}function t0(){if(--Ad===0&&gl!==null){ps!==null&&(ps.status="fulfilled");var n=gl;gl=null,ms=0,ps=null;for(var i=0;i<n.length;i++)(0,n[i])()}}function $E(n,i){var s=[],u={status:"pending",value:null,reason:null,then:function(p){s.push(p)}};return n.then(function(){u.status="fulfilled",u.value=i;for(var p=0;p<s.length;p++)(0,s[p])(i)},function(p){for(u.status="rejected",u.reason=p,p=0;p<s.length;p++)(0,s[p])(void 0)}),u}var n0=M.S;M.S=function(n,i){Ug=Wt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&qE(n,i),n0!==null&&n0(n,i)};var Ma=D(null);function Rd(){var n=Ma.current;return n!==null?n:Vt.pooledCache}function nc(n,i){i===null?C(Ma,Ma.current):C(Ma,i.pool)}function r0(){var n=Rd();return n===null?null:{parent:gn._currentValue,pool:n}}var gs=Error(a(460)),Od=Error(a(474)),rc=Error(a(542)),ic={then:function(){}};function i0(n){return n=n.status,n==="fulfilled"||n==="rejected"}function a0(n,i,s){switch(s=n[s],s===void 0?n.push(i):s!==i&&(i.then(Se,Se),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,l0(n),n;default:if(typeof i.status=="string")i.then(Se,Se);else{if(n=Vt,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=i,n.status="pending",n.then(function(u){if(i.status==="pending"){var p=i;p.status="fulfilled",p.value=u}},function(u){if(i.status==="pending"){var p=i;p.status="rejected",p.reason=u}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,l0(n),n}throw Da=i,gs}}function ja(n){try{var i=n._init;return i(n._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Da=s,gs):s}}var Da=null;function s0(){if(Da===null)throw Error(a(459));var n=Da;return Da=null,n}function l0(n){if(n===gs||n===rc)throw Error(a(483))}var bs=null,bl=0;function ac(n){var i=bl;return bl+=1,bs===null&&(bs=[]),a0(bs,n,i)}function xl(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}function sc(n,i){throw i.$$typeof===y?Error(a(525)):(n=Object.prototype.toString.call(i),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}function o0(n){function i(K,q){if(n){var X=K.deletions;X===null?(K.deletions=[q],K.flags|=16):X.push(q)}}function s(K,q){if(!n)return null;for(;q!==null;)i(K,q),q=q.sibling;return null}function u(K){for(var q=new Map;K!==null;)K.key!==null?q.set(K.key,K):q.set(K.index,K),K=K.sibling;return q}function p(K,q){return K=fi(K,q),K.index=0,K.sibling=null,K}function b(K,q,X){return K.index=X,n?(X=K.alternate,X!==null?(X=X.index,X<q?(K.flags|=67108866,q):X):(K.flags|=67108866,q)):(K.flags|=1048576,q)}function k(K){return n&&K.alternate===null&&(K.flags|=67108866),K}function T(K,q,X,de){return q===null||q.tag!==6?(q=vd(X,K.mode,de),q.return=K,q):(q=p(q,X),q.return=K,q)}function I(K,q,X,de){var Ge=X.type;return Ge===_?oe(K,q,X.props.children,de,X.key):q!==null&&(q.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===R&&ja(Ge)===q.type)?(q=p(q,X.props),xl(q,X),q.return=K,q):(q=Wo(X.type,X.key,X.props,null,K.mode,de),xl(q,X),q.return=K,q)}function Z(K,q,X,de){return q===null||q.tag!==4||q.stateNode.containerInfo!==X.containerInfo||q.stateNode.implementation!==X.implementation?(q=kd(X,K.mode,de),q.return=K,q):(q=p(q,X.children||[]),q.return=K,q)}function oe(K,q,X,de,Ge){return q===null||q.tag!==7?(q=Ta(X,K.mode,de,Ge),q.return=K,q):(q=p(q,X),q.return=K,q)}function he(K,q,X){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=vd(""+q,K.mode,X),q.return=K,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case v:return X=Wo(q.type,q.key,q.props,null,K.mode,X),xl(X,q),X.return=K,X;case w:return q=kd(q,K.mode,X),q.return=K,q;case R:return q=ja(q),he(K,q,X)}if(Q(q)||te(q))return q=Ta(q,K.mode,X,null),q.return=K,q;if(typeof q.then=="function")return he(K,ac(q),X);if(q.$$typeof===z)return he(K,tc(K,q),X);sc(K,q)}return null}function J(K,q,X,de){var Ge=q!==null?q.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return Ge!==null?null:T(K,q,""+X,de);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case v:return X.key===Ge?I(K,q,X,de):null;case w:return X.key===Ge?Z(K,q,X,de):null;case R:return X=ja(X),J(K,q,X,de)}if(Q(X)||te(X))return Ge!==null?null:oe(K,q,X,de,null);if(typeof X.then=="function")return J(K,q,ac(X),de);if(X.$$typeof===z)return J(K,q,tc(K,X),de);sc(K,X)}return null}function re(K,q,X,de,Ge){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return K=K.get(X)||null,T(q,K,""+de,Ge);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case v:return K=K.get(de.key===null?X:de.key)||null,I(q,K,de,Ge);case w:return K=K.get(de.key===null?X:de.key)||null,Z(q,K,de,Ge);case R:return de=ja(de),re(K,q,X,de,Ge)}if(Q(de)||te(de))return K=K.get(X)||null,oe(q,K,de,Ge,null);if(typeof de.then=="function")return re(K,q,X,ac(de),Ge);if(de.$$typeof===z)return re(K,q,X,tc(q,de),Ge);sc(q,de)}return null}function je(K,q,X,de){for(var Ge=null,Ot=null,Fe=q,at=q=0,vt=null;Fe!==null&&at<X.length;at++){Fe.index>at?(vt=Fe,Fe=null):vt=Fe.sibling;var Mt=J(K,Fe,X[at],de);if(Mt===null){Fe===null&&(Fe=vt);break}n&&Fe&&Mt.alternate===null&&i(K,Fe),q=b(Mt,q,at),Ot===null?Ge=Mt:Ot.sibling=Mt,Ot=Mt,Fe=vt}if(at===X.length)return s(K,Fe),kt&&hi(K,at),Ge;if(Fe===null){for(;at<X.length;at++)Fe=he(K,X[at],de),Fe!==null&&(q=b(Fe,q,at),Ot===null?Ge=Fe:Ot.sibling=Fe,Ot=Fe);return kt&&hi(K,at),Ge}for(Fe=u(Fe);at<X.length;at++)vt=re(Fe,K,at,X[at],de),vt!==null&&(n&&vt.alternate!==null&&Fe.delete(vt.key===null?at:vt.key),q=b(vt,q,at),Ot===null?Ge=vt:Ot.sibling=vt,Ot=vt);return n&&Fe.forEach(function(la){return i(K,la)}),kt&&hi(K,at),Ge}function Ye(K,q,X,de){if(X==null)throw Error(a(151));for(var Ge=null,Ot=null,Fe=q,at=q=0,vt=null,Mt=X.next();Fe!==null&&!Mt.done;at++,Mt=X.next()){Fe.index>at?(vt=Fe,Fe=null):vt=Fe.sibling;var la=J(K,Fe,Mt.value,de);if(la===null){Fe===null&&(Fe=vt);break}n&&Fe&&la.alternate===null&&i(K,Fe),q=b(la,q,at),Ot===null?Ge=la:Ot.sibling=la,Ot=la,Fe=vt}if(Mt.done)return s(K,Fe),kt&&hi(K,at),Ge;if(Fe===null){for(;!Mt.done;at++,Mt=X.next())Mt=he(K,Mt.value,de),Mt!==null&&(q=b(Mt,q,at),Ot===null?Ge=Mt:Ot.sibling=Mt,Ot=Mt);return kt&&hi(K,at),Ge}for(Fe=u(Fe);!Mt.done;at++,Mt=X.next())Mt=re(Fe,K,at,Mt.value,de),Mt!==null&&(n&&Mt.alternate!==null&&Fe.delete(Mt.key===null?at:Mt.key),q=b(Mt,q,at),Ot===null?Ge=Mt:Ot.sibling=Mt,Ot=Mt);return n&&Fe.forEach(function(tN){return i(K,tN)}),kt&&hi(K,at),Ge}function Gt(K,q,X,de){if(typeof X=="object"&&X!==null&&X.type===_&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case v:e:{for(var Ge=X.key;q!==null;){if(q.key===Ge){if(Ge=X.type,Ge===_){if(q.tag===7){s(K,q.sibling),de=p(q,X.props.children),de.return=K,K=de;break e}}else if(q.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===R&&ja(Ge)===q.type){s(K,q.sibling),de=p(q,X.props),xl(de,X),de.return=K,K=de;break e}s(K,q);break}else i(K,q);q=q.sibling}X.type===_?(de=Ta(X.props.children,K.mode,de,X.key),de.return=K,K=de):(de=Wo(X.type,X.key,X.props,null,K.mode,de),xl(de,X),de.return=K,K=de)}return k(K);case w:e:{for(Ge=X.key;q!==null;){if(q.key===Ge)if(q.tag===4&&q.stateNode.containerInfo===X.containerInfo&&q.stateNode.implementation===X.implementation){s(K,q.sibling),de=p(q,X.children||[]),de.return=K,K=de;break e}else{s(K,q);break}else i(K,q);q=q.sibling}de=kd(X,K.mode,de),de.return=K,K=de}return k(K);case R:return X=ja(X),Gt(K,q,X,de)}if(Q(X))return je(K,q,X,de);if(te(X)){if(Ge=te(X),typeof Ge!="function")throw Error(a(150));return X=Ge.call(X),Ye(K,q,X,de)}if(typeof X.then=="function")return Gt(K,q,ac(X),de);if(X.$$typeof===z)return Gt(K,q,tc(K,X),de);sc(K,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,q!==null&&q.tag===6?(s(K,q.sibling),de=p(q,X),de.return=K,K=de):(s(K,q),de=vd(X,K.mode,de),de.return=K,K=de),k(K)):s(K,q)}return function(K,q,X,de){try{bl=0;var Ge=Gt(K,q,X,de);return bs=null,Ge}catch(Fe){if(Fe===gs||Fe===rc)throw Fe;var Ot=or(29,Fe,null,K.mode);return Ot.lanes=de,Ot.return=K,Ot}finally{}}}var La=o0(!0),c0=o0(!1),$i=!1;function Md(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function jd(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Gi(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ki(n,i,s){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(jt&2)!==0){var p=u.pending;return p===null?i.next=i:(i.next=p.next,p.next=i),u.pending=i,i=Zo(n),Kp(n,null,s),i}return Xo(n,u,i,s),Zo(n)}function yl(n,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var u=i.lanes;u&=n.pendingLanes,s|=u,i.lanes=s,Ve(n,s)}}function Dd(n,i){var s=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var p=null,b=null;if(s=s.firstBaseUpdate,s!==null){do{var k={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};b===null?p=b=k:b=b.next=k,s=s.next}while(s!==null);b===null?p=b=i:b=b.next=i}else p=b=i;s={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:b,shared:u.shared,callbacks:u.callbacks},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=i:n.next=i,s.lastBaseUpdate=i}var Ld=!1;function vl(){if(Ld){var n=ps;if(n!==null)throw n}}function kl(n,i,s,u){Ld=!1;var p=n.updateQueue;$i=!1;var b=p.firstBaseUpdate,k=p.lastBaseUpdate,T=p.shared.pending;if(T!==null){p.shared.pending=null;var I=T,Z=I.next;I.next=null,k===null?b=Z:k.next=Z,k=I;var oe=n.alternate;oe!==null&&(oe=oe.updateQueue,T=oe.lastBaseUpdate,T!==k&&(T===null?oe.firstBaseUpdate=Z:T.next=Z,oe.lastBaseUpdate=I))}if(b!==null){var he=p.baseState;k=0,oe=Z=I=null,T=b;do{var J=T.lane&-536870913,re=J!==T.lane;if(re?(yt&J)===J:(u&J)===J){J!==0&&J===ms&&(Ld=!0),oe!==null&&(oe=oe.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var je=n,Ye=T;J=i;var Gt=s;switch(Ye.tag){case 1:if(je=Ye.payload,typeof je=="function"){he=je.call(Gt,he,J);break e}he=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=Ye.payload,J=typeof je=="function"?je.call(Gt,he,J):je,J==null)break e;he=x({},he,J);break e;case 2:$i=!0}}J=T.callback,J!==null&&(n.flags|=64,re&&(n.flags|=8192),re=p.callbacks,re===null?p.callbacks=[J]:re.push(J))}else re={lane:J,tag:T.tag,payload:T.payload,callback:T.callback,next:null},oe===null?(Z=oe=re,I=he):oe=oe.next=re,k|=J;if(T=T.next,T===null){if(T=p.shared.pending,T===null)break;re=T,T=re.next,re.next=null,p.lastBaseUpdate=re,p.shared.pending=null}}while(!0);oe===null&&(I=he),p.baseState=I,p.firstBaseUpdate=Z,p.lastBaseUpdate=oe,b===null&&(p.shared.lanes=0),Zi|=k,n.lanes=k,n.memoizedState=he}}function u0(n,i){if(typeof n!="function")throw Error(a(191,n));n.call(i)}function d0(n,i){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;n<s.length;n++)u0(s[n],i)}var xs=D(null),lc=D(0);function f0(n,i){n=_i,C(lc,n),C(xs,i),_i=n|i.baseLanes}function Id(){C(lc,_i),C(xs,xs.current)}function Bd(){_i=lc.current,B(xs),B(lc)}var cr=D(null),Sr=null;function Vi(n){var i=n.alternate;C(fn,fn.current&1),C(cr,n),Sr===null&&(i===null||xs.current!==null||i.memoizedState!==null)&&(Sr=n)}function Ud(n){C(fn,fn.current),C(cr,n),Sr===null&&(Sr=n)}function h0(n){n.tag===22?(C(fn,fn.current),C(cr,n),Sr===null&&(Sr=n)):Yi()}function Yi(){C(fn,fn.current),C(cr,cr.current)}function ur(n){B(cr),Sr===n&&(Sr=null),B(fn)}var fn=D(0);function oc(n){for(var i=n;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Kf(s)||Vf(s)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var gi=0,it=null,qt=null,bn=null,cc=!1,ys=!1,Ia=!1,uc=0,wl=0,vs=null,GE=0;function ln(){throw Error(a(321))}function Pd(n,i){if(i===null)return!1;for(var s=0;s<i.length&&s<n.length;s++)if(!lr(n[s],i[s]))return!1;return!0}function Fd(n,i,s,u,p,b){return gi=b,it=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,M.H=n===null||n.memoizedState===null?X0:nf,Ia=!1,b=s(u,p),Ia=!1,ys&&(b=p0(i,s,u,p)),m0(n),b}function m0(n){M.H=Nl;var i=qt!==null&&qt.next!==null;if(gi=0,bn=qt=it=null,cc=!1,wl=0,vs=null,i)throw Error(a(300));n===null||xn||(n=n.dependencies,n!==null&&ec(n)&&(xn=!0))}function p0(n,i,s,u){it=n;var p=0;do{if(ys&&(vs=null),wl=0,ys=!1,25<=p)throw Error(a(301));if(p+=1,bn=qt=null,n.updateQueue!=null){var b=n.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}M.H=Z0,b=i(s,u)}while(ys);return b}function KE(){var n=M.H,i=n.useState()[0];return i=typeof i.then=="function"?El(i):i,n=n.useState()[0],(qt!==null?qt.memoizedState:null)!==n&&(it.flags|=1024),i}function Hd(){var n=uc!==0;return uc=0,n}function qd(n,i,s){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~s}function $d(n){if(cc){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}cc=!1}gi=0,bn=qt=it=null,ys=!1,wl=uc=0,vs=null}function $n(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bn===null?it.memoizedState=bn=n:bn=bn.next=n,bn}function hn(){if(qt===null){var n=it.alternate;n=n!==null?n.memoizedState:null}else n=qt.next;var i=bn===null?it.memoizedState:bn.next;if(i!==null)bn=i,qt=n;else{if(n===null)throw it.alternate===null?Error(a(467)):Error(a(310));qt=n,n={memoizedState:qt.memoizedState,baseState:qt.baseState,baseQueue:qt.baseQueue,queue:qt.queue,next:null},bn===null?it.memoizedState=bn=n:bn=bn.next=n}return bn}function dc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function El(n){var i=wl;return wl+=1,vs===null&&(vs=[]),n=a0(vs,n,i),i=it,(bn===null?i.memoizedState:bn.next)===null&&(i=i.alternate,M.H=i===null||i.memoizedState===null?X0:nf),n}function fc(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return El(n);if(n.$$typeof===z)return jn(n)}throw Error(a(438,String(n)))}function Gd(n){var i=null,s=it.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var u=it.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(i={data:u.data.map(function(p){return p.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=dc(),it.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(n),u=0;u<n;u++)s[u]=P;return i.index++,s}function bi(n,i){return typeof i=="function"?i(n):i}function hc(n){var i=hn();return Kd(i,qt,n)}function Kd(n,i,s){var u=n.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=s;var p=n.baseQueue,b=u.pending;if(b!==null){if(p!==null){var k=p.next;p.next=b.next,b.next=k}i.baseQueue=p=b,u.pending=null}if(b=n.baseState,p===null)n.memoizedState=b;else{i=p.next;var T=k=null,I=null,Z=i,oe=!1;do{var he=Z.lane&-536870913;if(he!==Z.lane?(yt&he)===he:(gi&he)===he){var J=Z.revertLane;if(J===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),he===ms&&(oe=!0);else if((gi&J)===J){Z=Z.next,J===ms&&(oe=!0);continue}else he={lane:0,revertLane:Z.revertLane,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},I===null?(T=I=he,k=b):I=I.next=he,it.lanes|=J,Zi|=J;he=Z.action,Ia&&s(b,he),b=Z.hasEagerState?Z.eagerState:s(b,he)}else J={lane:he,revertLane:Z.revertLane,gesture:Z.gesture,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},I===null?(T=I=J,k=b):I=I.next=J,it.lanes|=he,Zi|=he;Z=Z.next}while(Z!==null&&Z!==i);if(I===null?k=b:I.next=T,!lr(b,n.memoizedState)&&(xn=!0,oe&&(s=ps,s!==null)))throw s;n.memoizedState=b,n.baseState=k,n.baseQueue=I,u.lastRenderedState=b}return p===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function Vd(n){var i=hn(),s=i.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=n;var u=s.dispatch,p=s.pending,b=i.memoizedState;if(p!==null){s.pending=null;var k=p=p.next;do b=n(b,k.action),k=k.next;while(k!==p);lr(b,i.memoizedState)||(xn=!0),i.memoizedState=b,i.baseQueue===null&&(i.baseState=b),s.lastRenderedState=b}return[b,u]}function g0(n,i,s){var u=it,p=hn(),b=kt;if(b){if(s===void 0)throw Error(a(407));s=s()}else s=i();var k=!lr((qt||p).memoizedState,s);if(k&&(p.memoizedState=s,xn=!0),p=p.queue,Xd(y0.bind(null,u,p,n),[n]),p.getSnapshot!==i||k||bn!==null&&bn.memoizedState.tag&1){if(u.flags|=2048,ks(9,{destroy:void 0},x0.bind(null,u,p,s,i),null),Vt===null)throw Error(a(349));b||(gi&127)!==0||b0(u,i,s)}return s}function b0(n,i,s){n.flags|=16384,n={getSnapshot:i,value:s},i=it.updateQueue,i===null?(i=dc(),it.updateQueue=i,i.stores=[n]):(s=i.stores,s===null?i.stores=[n]:s.push(n))}function x0(n,i,s,u){i.value=s,i.getSnapshot=u,v0(i)&&k0(n)}function y0(n,i,s){return s(function(){v0(i)&&k0(n)})}function v0(n){var i=n.getSnapshot;n=n.value;try{var s=i();return!lr(n,s)}catch{return!0}}function k0(n){var i=Ca(n,2);i!==null&&nr(i,n,2)}function Yd(n){var i=$n();if(typeof n=="function"){var s=n;if(n=s(),Ia){Qt(!0);try{s()}finally{Qt(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bi,lastRenderedState:n},i}function w0(n,i,s,u){return n.baseState=s,Kd(n,qt,typeof u=="function"?u:bi)}function VE(n,i,s,u,p){if(gc(n))throw Error(a(485));if(n=i.action,n!==null){var b={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){b.listeners.push(k)}};M.T!==null?s(!0):b.isTransition=!1,u(b),s=i.pending,s===null?(b.next=i.pending=b,E0(i,b)):(b.next=s.next,i.pending=s.next=b)}}function E0(n,i){var s=i.action,u=i.payload,p=n.state;if(i.isTransition){var b=M.T,k={};M.T=k;try{var T=s(p,u),I=M.S;I!==null&&I(k,T),_0(n,i,T)}catch(Z){Qd(n,i,Z)}finally{b!==null&&k.types!==null&&(b.types=k.types),M.T=b}}else try{b=s(p,u),_0(n,i,b)}catch(Z){Qd(n,i,Z)}}function _0(n,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(u){N0(n,i,u)},function(u){return Qd(n,i,u)}):N0(n,i,s)}function N0(n,i,s){i.status="fulfilled",i.value=s,S0(i),n.state=s,i=n.pending,i!==null&&(s=i.next,s===i?n.pending=null:(s=s.next,i.next=s,E0(n,s)))}function Qd(n,i,s){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do i.status="rejected",i.reason=s,S0(i),i=i.next;while(i!==u)}n.action=null}function S0(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}function z0(n,i){return i}function C0(n,i){if(kt){var s=Vt.formState;if(s!==null){e:{var u=it;if(kt){if(en){t:{for(var p=en,b=Nr;p.nodeType!==8;){if(!b){p=null;break t}if(p=zr(p.nextSibling),p===null){p=null;break t}}b=p.data,p=b==="F!"||b==="F"?p:null}if(p){en=zr(p.nextSibling),u=p.data==="F!";break e}}Hi(u)}u=!1}u&&(i=s[0])}}return s=$n(),s.memoizedState=s.baseState=i,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:z0,lastRenderedState:i},s.queue=u,s=V0.bind(null,it,u),u.dispatch=s,u=Yd(!1),b=tf.bind(null,it,!1,u.queue),u=$n(),p={state:i,dispatch:null,action:n,pending:null},u.queue=p,s=VE.bind(null,it,p,b,s),p.dispatch=s,u.memoizedState=n,[i,s,!1]}function T0(n){var i=hn();return A0(i,qt,n)}function A0(n,i,s){if(i=Kd(n,i,z0)[0],n=hc(bi)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var u=El(i)}catch(k){throw k===gs?rc:k}else u=i;i=hn();var p=i.queue,b=p.dispatch;return s!==i.memoizedState&&(it.flags|=2048,ks(9,{destroy:void 0},YE.bind(null,p,s),null)),[u,b,n]}function YE(n,i){n.action=i}function R0(n){var i=hn(),s=qt;if(s!==null)return A0(i,s,n);hn(),i=i.memoizedState,s=hn();var u=s.queue.dispatch;return s.memoizedState=n,[i,u,!1]}function ks(n,i,s,u){return n={tag:n,create:s,deps:u,inst:i,next:null},i=it.updateQueue,i===null&&(i=dc(),it.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=n.next=n:(u=s.next,s.next=n,n.next=u,i.lastEffect=n),n}function O0(){return hn().memoizedState}function mc(n,i,s,u){var p=$n();it.flags|=n,p.memoizedState=ks(1|i,{destroy:void 0},s,u===void 0?null:u)}function pc(n,i,s,u){var p=hn();u=u===void 0?null:u;var b=p.memoizedState.inst;qt!==null&&u!==null&&Pd(u,qt.memoizedState.deps)?p.memoizedState=ks(i,b,s,u):(it.flags|=n,p.memoizedState=ks(1|i,b,s,u))}function M0(n,i){mc(8390656,8,n,i)}function Xd(n,i){pc(2048,8,n,i)}function QE(n){it.flags|=4;var i=it.updateQueue;if(i===null)i=dc(),it.updateQueue=i,i.events=[n];else{var s=i.events;s===null?i.events=[n]:s.push(n)}}function j0(n){var i=hn().memoizedState;return QE({ref:i,nextImpl:n}),function(){if((jt&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function D0(n,i){return pc(4,2,n,i)}function L0(n,i){return pc(4,4,n,i)}function I0(n,i){if(typeof i=="function"){n=n();var s=i(n);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return n=n(),i.current=n,function(){i.current=null}}function B0(n,i,s){s=s!=null?s.concat([n]):null,pc(4,4,I0.bind(null,i,n),s)}function Zd(){}function U0(n,i){var s=hn();i=i===void 0?null:i;var u=s.memoizedState;return i!==null&&Pd(i,u[1])?u[0]:(s.memoizedState=[n,i],n)}function P0(n,i){var s=hn();i=i===void 0?null:i;var u=s.memoizedState;if(i!==null&&Pd(i,u[1]))return u[0];if(u=n(),Ia){Qt(!0);try{n()}finally{Qt(!1)}}return s.memoizedState=[u,i],u}function Wd(n,i,s){return s===void 0||(gi&1073741824)!==0&&(yt&261930)===0?n.memoizedState=i:(n.memoizedState=s,n=Fg(),it.lanes|=n,Zi|=n,s)}function F0(n,i,s,u){return lr(s,i)?s:xs.current!==null?(n=Wd(n,s,u),lr(n,i)||(xn=!0),n):(gi&42)===0||(gi&1073741824)!==0&&(yt&261930)===0?(xn=!0,n.memoizedState=s):(n=Fg(),it.lanes|=n,Zi|=n,i)}function H0(n,i,s,u,p){var b=Y.p;Y.p=b!==0&&8>b?b:8;var k=M.T,T={};M.T=T,tf(n,!1,i,s);try{var I=p(),Z=M.S;if(Z!==null&&Z(T,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var oe=$E(I,u);_l(n,i,oe,hr(n))}else _l(n,i,u,hr(n))}catch(he){_l(n,i,{then:function(){},status:"rejected",reason:he},hr())}finally{Y.p=b,k!==null&&T.types!==null&&(k.types=T.types),M.T=k}}function XE(){}function Jd(n,i,s,u){if(n.tag!==5)throw Error(a(476));var p=q0(n).queue;H0(n,p,i,V,s===null?XE:function(){return $0(n),s(u)})}function q0(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bi,lastRenderedState:V},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bi,lastRenderedState:s},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function $0(n){var i=q0(n);i.next===null&&(i=n.alternate.memoizedState),_l(n,i.next.queue,{},hr())}function ef(){return jn(Fl)}function G0(){return hn().memoizedState}function K0(){return hn().memoizedState}function ZE(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var s=hr();n=Gi(s);var u=Ki(i,n,s);u!==null&&(nr(u,i,s),yl(u,i,s)),i={cache:Td()},n.payload=i;return}i=i.return}}function WE(n,i,s){var u=hr();s={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},gc(n)?Y0(i,s):(s=xd(n,i,s,u),s!==null&&(nr(s,n,u),Q0(s,i,u)))}function V0(n,i,s){var u=hr();_l(n,i,s,u)}function _l(n,i,s,u){var p={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(gc(n))Y0(i,p);else{var b=n.alternate;if(n.lanes===0&&(b===null||b.lanes===0)&&(b=i.lastRenderedReducer,b!==null))try{var k=i.lastRenderedState,T=b(k,s);if(p.hasEagerState=!0,p.eagerState=T,lr(T,k))return Xo(n,i,p,0),Vt===null&&Qo(),!1}catch{}finally{}if(s=xd(n,i,p,u),s!==null)return nr(s,n,u),Q0(s,i,u),!0}return!1}function tf(n,i,s,u){if(u={lane:2,revertLane:jf(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},gc(n)){if(i)throw Error(a(479))}else i=xd(n,s,u,2),i!==null&&nr(i,n,2)}function gc(n){var i=n.alternate;return n===it||i!==null&&i===it}function Y0(n,i){ys=cc=!0;var s=n.pending;s===null?i.next=i:(i.next=s.next,s.next=i),n.pending=i}function Q0(n,i,s){if((s&4194048)!==0){var u=i.lanes;u&=n.pendingLanes,s|=u,i.lanes=s,Ve(n,s)}}var Nl={readContext:jn,use:fc,useCallback:ln,useContext:ln,useEffect:ln,useImperativeHandle:ln,useLayoutEffect:ln,useInsertionEffect:ln,useMemo:ln,useReducer:ln,useRef:ln,useState:ln,useDebugValue:ln,useDeferredValue:ln,useTransition:ln,useSyncExternalStore:ln,useId:ln,useHostTransitionStatus:ln,useFormState:ln,useActionState:ln,useOptimistic:ln,useMemoCache:ln,useCacheRefresh:ln};Nl.useEffectEvent=ln;var X0={readContext:jn,use:fc,useCallback:function(n,i){return $n().memoizedState=[n,i===void 0?null:i],n},useContext:jn,useEffect:M0,useImperativeHandle:function(n,i,s){s=s!=null?s.concat([n]):null,mc(4194308,4,I0.bind(null,i,n),s)},useLayoutEffect:function(n,i){return mc(4194308,4,n,i)},useInsertionEffect:function(n,i){mc(4,2,n,i)},useMemo:function(n,i){var s=$n();i=i===void 0?null:i;var u=n();if(Ia){Qt(!0);try{n()}finally{Qt(!1)}}return s.memoizedState=[u,i],u},useReducer:function(n,i,s){var u=$n();if(s!==void 0){var p=s(i);if(Ia){Qt(!0);try{s(i)}finally{Qt(!1)}}}else p=i;return u.memoizedState=u.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},u.queue=n,n=n.dispatch=WE.bind(null,it,n),[u.memoizedState,n]},useRef:function(n){var i=$n();return n={current:n},i.memoizedState=n},useState:function(n){n=Yd(n);var i=n.queue,s=V0.bind(null,it,i);return i.dispatch=s,[n.memoizedState,s]},useDebugValue:Zd,useDeferredValue:function(n,i){var s=$n();return Wd(s,n,i)},useTransition:function(){var n=Yd(!1);return n=H0.bind(null,it,n.queue,!0,!1),$n().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,s){var u=it,p=$n();if(kt){if(s===void 0)throw Error(a(407));s=s()}else{if(s=i(),Vt===null)throw Error(a(349));(yt&127)!==0||b0(u,i,s)}p.memoizedState=s;var b={value:s,getSnapshot:i};return p.queue=b,M0(y0.bind(null,u,b,n),[n]),u.flags|=2048,ks(9,{destroy:void 0},x0.bind(null,u,b,s,i),null),s},useId:function(){var n=$n(),i=Vt.identifierPrefix;if(kt){var s=Xr,u=Qr;s=(u&~(1<<32-At(u)-1)).toString(32)+s,i="_"+i+"R_"+s,s=uc++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=GE++,i="_"+i+"r_"+s.toString(32)+"_";return n.memoizedState=i},useHostTransitionStatus:ef,useFormState:C0,useActionState:C0,useOptimistic:function(n){var i=$n();i.memoizedState=i.baseState=n;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=tf.bind(null,it,!0,s),s.dispatch=i,[n,i]},useMemoCache:Gd,useCacheRefresh:function(){return $n().memoizedState=ZE.bind(null,it)},useEffectEvent:function(n){var i=$n(),s={impl:n};return i.memoizedState=s,function(){if((jt&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},nf={readContext:jn,use:fc,useCallback:U0,useContext:jn,useEffect:Xd,useImperativeHandle:B0,useInsertionEffect:D0,useLayoutEffect:L0,useMemo:P0,useReducer:hc,useRef:O0,useState:function(){return hc(bi)},useDebugValue:Zd,useDeferredValue:function(n,i){var s=hn();return F0(s,qt.memoizedState,n,i)},useTransition:function(){var n=hc(bi)[0],i=hn().memoizedState;return[typeof n=="boolean"?n:El(n),i]},useSyncExternalStore:g0,useId:G0,useHostTransitionStatus:ef,useFormState:T0,useActionState:T0,useOptimistic:function(n,i){var s=hn();return w0(s,qt,n,i)},useMemoCache:Gd,useCacheRefresh:K0};nf.useEffectEvent=j0;var Z0={readContext:jn,use:fc,useCallback:U0,useContext:jn,useEffect:Xd,useImperativeHandle:B0,useInsertionEffect:D0,useLayoutEffect:L0,useMemo:P0,useReducer:Vd,useRef:O0,useState:function(){return Vd(bi)},useDebugValue:Zd,useDeferredValue:function(n,i){var s=hn();return qt===null?Wd(s,n,i):F0(s,qt.memoizedState,n,i)},useTransition:function(){var n=Vd(bi)[0],i=hn().memoizedState;return[typeof n=="boolean"?n:El(n),i]},useSyncExternalStore:g0,useId:G0,useHostTransitionStatus:ef,useFormState:R0,useActionState:R0,useOptimistic:function(n,i){var s=hn();return qt!==null?w0(s,qt,n,i):(s.baseState=n,[n,s.queue.dispatch])},useMemoCache:Gd,useCacheRefresh:K0};Z0.useEffectEvent=j0;function rf(n,i,s,u){i=n.memoizedState,s=s(u,i),s=s==null?i:x({},i,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var af={enqueueSetState:function(n,i,s){n=n._reactInternals;var u=hr(),p=Gi(u);p.payload=i,s!=null&&(p.callback=s),i=Ki(n,p,u),i!==null&&(nr(i,n,u),yl(i,n,u))},enqueueReplaceState:function(n,i,s){n=n._reactInternals;var u=hr(),p=Gi(u);p.tag=1,p.payload=i,s!=null&&(p.callback=s),i=Ki(n,p,u),i!==null&&(nr(i,n,u),yl(i,n,u))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var s=hr(),u=Gi(s);u.tag=2,i!=null&&(u.callback=i),i=Ki(n,u,s),i!==null&&(nr(i,n,s),yl(i,n,s))}};function W0(n,i,s,u,p,b,k){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,b,k):i.prototype&&i.prototype.isPureReactComponent?!dl(s,u)||!dl(p,b):!0}function J0(n,i,s,u){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,u),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,u),i.state!==n&&af.enqueueReplaceState(i,i.state,null)}function Ba(n,i){var s=i;if("ref"in i){s={};for(var u in i)u!=="ref"&&(s[u]=i[u])}if(n=n.defaultProps){s===i&&(s=x({},s));for(var p in n)s[p]===void 0&&(s[p]=n[p])}return s}function eg(n){Yo(n)}function tg(n){console.error(n)}function ng(n){Yo(n)}function bc(n,i){try{var s=n.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(u){setTimeout(function(){throw u})}}function rg(n,i,s){try{var u=n.onCaughtError;u(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function sf(n,i,s){return s=Gi(s),s.tag=3,s.payload={element:null},s.callback=function(){bc(n,i)},s}function ig(n){return n=Gi(n),n.tag=3,n}function ag(n,i,s,u){var p=s.type.getDerivedStateFromError;if(typeof p=="function"){var b=u.value;n.payload=function(){return p(b)},n.callback=function(){rg(i,s,u)}}var k=s.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(n.callback=function(){rg(i,s,u),typeof p!="function"&&(Wi===null?Wi=new Set([this]):Wi.add(this));var T=u.stack;this.componentDidCatch(u.value,{componentStack:T!==null?T:""})})}function JE(n,i,s,u,p){if(s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(i=s.alternate,i!==null&&hs(i,s,p,!0),s=cr.current,s!==null){switch(s.tag){case 31:case 13:return Sr===null?Tc():s.alternate===null&&on===0&&(on=3),s.flags&=-257,s.flags|=65536,s.lanes=p,u===ic?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([u]):i.add(u),Rf(n,u,p)),!1;case 22:return s.flags|=65536,u===ic?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([u])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([u]):s.add(u)),Rf(n,u,p)),!1}throw Error(a(435,s.tag))}return Rf(n,u,p),Tc(),!1}if(kt)return i=cr.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=p,u!==_d&&(n=Error(a(422),{cause:u}),ml(wr(n,s)))):(u!==_d&&(i=Error(a(423),{cause:u}),ml(wr(i,s))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,u=wr(u,s),p=sf(n.stateNode,u,p),Dd(n,p),on!==4&&(on=2)),!1;var b=Error(a(520),{cause:u});if(b=wr(b,s),Ml===null?Ml=[b]:Ml.push(b),on!==4&&(on=2),i===null)return!0;u=wr(u,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,n=p&-p,s.lanes|=n,n=sf(s.stateNode,u,n),Dd(s,n),!1;case 1:if(i=s.type,b=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Wi===null||!Wi.has(b))))return s.flags|=65536,p&=-p,s.lanes|=p,p=ig(p),ag(p,n,s,u),Dd(s,p),!1}s=s.return}while(s!==null);return!1}var lf=Error(a(461)),xn=!1;function Dn(n,i,s,u){i.child=n===null?c0(i,null,s,u):La(i,n.child,s,u)}function sg(n,i,s,u,p){s=s.render;var b=i.ref;if("ref"in u){var k={};for(var T in u)T!=="ref"&&(k[T]=u[T])}else k=u;return Oa(i),u=Fd(n,i,s,k,b,p),T=Hd(),n!==null&&!xn?(qd(n,i,p),xi(n,i,p)):(kt&&T&&wd(i),i.flags|=1,Dn(n,i,u,p),i.child)}function lg(n,i,s,u,p){if(n===null){var b=s.type;return typeof b=="function"&&!yd(b)&&b.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=b,og(n,i,b,u,p)):(n=Wo(s.type,null,u,i,i.mode,p),n.ref=i.ref,n.return=i,i.child=n)}if(b=n.child,!pf(n,p)){var k=b.memoizedProps;if(s=s.compare,s=s!==null?s:dl,s(k,u)&&n.ref===i.ref)return xi(n,i,p)}return i.flags|=1,n=fi(b,u),n.ref=i.ref,n.return=i,i.child=n}function og(n,i,s,u,p){if(n!==null){var b=n.memoizedProps;if(dl(b,u)&&n.ref===i.ref)if(xn=!1,i.pendingProps=u=b,pf(n,p))(n.flags&131072)!==0&&(xn=!0);else return i.lanes=n.lanes,xi(n,i,p)}return of(n,i,s,u,p)}function cg(n,i,s,u){var p=u.children,b=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((i.flags&128)!==0){if(b=b!==null?b.baseLanes|s:s,n!==null){for(u=i.child=n.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~b}else u=0,i.child=null;return ug(n,i,b,s,u)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&nc(i,b!==null?b.cachePool:null),b!==null?f0(i,b):Id(),h0(i);else return u=i.lanes=536870912,ug(n,i,b!==null?b.baseLanes|s:s,s,u)}else b!==null?(nc(i,b.cachePool),f0(i,b),Yi(),i.memoizedState=null):(n!==null&&nc(i,null),Id(),Yi());return Dn(n,i,p,s),i.child}function Sl(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function ug(n,i,s,u,p){var b=Rd();return b=b===null?null:{parent:gn._currentValue,pool:b},i.memoizedState={baseLanes:s,cachePool:b},n!==null&&nc(i,null),Id(),h0(i),n!==null&&hs(n,i,u,!0),i.childLanes=p,null}function xc(n,i){return i=vc({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}function dg(n,i,s){return La(i,n.child,null,s),n=xc(i,i.pendingProps),n.flags|=2,ur(i),i.memoizedState=null,n}function e_(n,i,s){var u=i.pendingProps,p=(i.flags&128)!==0;if(i.flags&=-129,n===null){if(kt){if(u.mode==="hidden")return n=xc(i,u),i.lanes=536870912,Sl(null,n);if(Ud(i),(n=en)?(n=Eb(n,Nr),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Pi!==null?{id:Qr,overflow:Xr}:null,retryLane:536870912,hydrationErrors:null},s=Yp(n),s.return=i,i.child=s,Mn=i,en=null)):n=null,n===null)throw Hi(i);return i.lanes=536870912,null}return xc(i,u)}var b=n.memoizedState;if(b!==null){var k=b.dehydrated;if(Ud(i),p)if(i.flags&256)i.flags&=-257,i=dg(n,i,s);else if(i.memoizedState!==null)i.child=n.child,i.flags|=128,i=null;else throw Error(a(558));else if(xn||hs(n,i,s,!1),p=(s&n.childLanes)!==0,xn||p){if(u=Vt,u!==null&&(k=L(u,s),k!==0&&k!==b.retryLane))throw b.retryLane=k,Ca(n,k),nr(u,n,k),lf;Tc(),i=dg(n,i,s)}else n=b.treeContext,en=zr(k.nextSibling),Mn=i,kt=!0,Fi=null,Nr=!1,n!==null&&Zp(i,n),i=xc(i,u),i.flags|=4096;return i}return n=fi(n.child,{mode:u.mode,children:u.children}),n.ref=i.ref,i.child=n,n.return=i,n}function yc(n,i){var s=i.ref;if(s===null)n!==null&&n.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(n===null||n.ref!==s)&&(i.flags|=4194816)}}function of(n,i,s,u,p){return Oa(i),s=Fd(n,i,s,u,void 0,p),u=Hd(),n!==null&&!xn?(qd(n,i,p),xi(n,i,p)):(kt&&u&&wd(i),i.flags|=1,Dn(n,i,s,p),i.child)}function fg(n,i,s,u,p,b){return Oa(i),i.updateQueue=null,s=p0(i,u,s,p),m0(n),u=Hd(),n!==null&&!xn?(qd(n,i,b),xi(n,i,b)):(kt&&u&&wd(i),i.flags|=1,Dn(n,i,s,b),i.child)}function hg(n,i,s,u,p){if(Oa(i),i.stateNode===null){var b=cs,k=s.contextType;typeof k=="object"&&k!==null&&(b=jn(k)),b=new s(u,b),i.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=af,i.stateNode=b,b._reactInternals=i,b=i.stateNode,b.props=u,b.state=i.memoizedState,b.refs={},Md(i),k=s.contextType,b.context=typeof k=="object"&&k!==null?jn(k):cs,b.state=i.memoizedState,k=s.getDerivedStateFromProps,typeof k=="function"&&(rf(i,s,k,u),b.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(k=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),k!==b.state&&af.enqueueReplaceState(b,b.state,null),kl(i,u,b,p),vl(),b.state=i.memoizedState),typeof b.componentDidMount=="function"&&(i.flags|=4194308),u=!0}else if(n===null){b=i.stateNode;var T=i.memoizedProps,I=Ba(s,T);b.props=I;var Z=b.context,oe=s.contextType;k=cs,typeof oe=="object"&&oe!==null&&(k=jn(oe));var he=s.getDerivedStateFromProps;oe=typeof he=="function"||typeof b.getSnapshotBeforeUpdate=="function",T=i.pendingProps!==T,oe||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(T||Z!==k)&&J0(i,b,u,k),$i=!1;var J=i.memoizedState;b.state=J,kl(i,u,b,p),vl(),Z=i.memoizedState,T||J!==Z||$i?(typeof he=="function"&&(rf(i,s,he,u),Z=i.memoizedState),(I=$i||W0(i,s,I,u,J,Z,k))?(oe||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(i.flags|=4194308)):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=u,i.memoizedState=Z),b.props=u,b.state=Z,b.context=k,u=I):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),u=!1)}else{b=i.stateNode,jd(n,i),k=i.memoizedProps,oe=Ba(s,k),b.props=oe,he=i.pendingProps,J=b.context,Z=s.contextType,I=cs,typeof Z=="object"&&Z!==null&&(I=jn(Z)),T=s.getDerivedStateFromProps,(Z=typeof T=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(k!==he||J!==I)&&J0(i,b,u,I),$i=!1,J=i.memoizedState,b.state=J,kl(i,u,b,p),vl();var re=i.memoizedState;k!==he||J!==re||$i||n!==null&&n.dependencies!==null&&ec(n.dependencies)?(typeof T=="function"&&(rf(i,s,T,u),re=i.memoizedState),(oe=$i||W0(i,s,oe,u,J,re,I)||n!==null&&n.dependencies!==null&&ec(n.dependencies))?(Z||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(u,re,I),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(u,re,I)),typeof b.componentDidUpdate=="function"&&(i.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof b.componentDidUpdate!="function"||k===n.memoizedProps&&J===n.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||k===n.memoizedProps&&J===n.memoizedState||(i.flags|=1024),i.memoizedProps=u,i.memoizedState=re),b.props=u,b.state=re,b.context=I,u=oe):(typeof b.componentDidUpdate!="function"||k===n.memoizedProps&&J===n.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||k===n.memoizedProps&&J===n.memoizedState||(i.flags|=1024),u=!1)}return b=u,yc(n,i),u=(i.flags&128)!==0,b||u?(b=i.stateNode,s=u&&typeof s.getDerivedStateFromError!="function"?null:b.render(),i.flags|=1,n!==null&&u?(i.child=La(i,n.child,null,p),i.child=La(i,null,s,p)):Dn(n,i,s,p),i.memoizedState=b.state,n=i.child):n=xi(n,i,p),n}function mg(n,i,s,u){return Aa(),i.flags|=256,Dn(n,i,s,u),i.child}var cf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function uf(n){return{baseLanes:n,cachePool:r0()}}function df(n,i,s){return n=n!==null?n.childLanes&~s:0,i&&(n|=fr),n}function pg(n,i,s){var u=i.pendingProps,p=!1,b=(i.flags&128)!==0,k;if((k=b)||(k=n!==null&&n.memoizedState===null?!1:(fn.current&2)!==0),k&&(p=!0,i.flags&=-129),k=(i.flags&32)!==0,i.flags&=-33,n===null){if(kt){if(p?Vi(i):Yi(),(n=en)?(n=Eb(n,Nr),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Pi!==null?{id:Qr,overflow:Xr}:null,retryLane:536870912,hydrationErrors:null},s=Yp(n),s.return=i,i.child=s,Mn=i,en=null)):n=null,n===null)throw Hi(i);return Vf(n)?i.lanes=32:i.lanes=536870912,null}var T=u.children;return u=u.fallback,p?(Yi(),p=i.mode,T=vc({mode:"hidden",children:T},p),u=Ta(u,p,s,null),T.return=i,u.return=i,T.sibling=u,i.child=T,u=i.child,u.memoizedState=uf(s),u.childLanes=df(n,k,s),i.memoizedState=cf,Sl(null,u)):(Vi(i),ff(i,T))}var I=n.memoizedState;if(I!==null&&(T=I.dehydrated,T!==null)){if(b)i.flags&256?(Vi(i),i.flags&=-257,i=hf(n,i,s)):i.memoizedState!==null?(Yi(),i.child=n.child,i.flags|=128,i=null):(Yi(),T=u.fallback,p=i.mode,u=vc({mode:"visible",children:u.children},p),T=Ta(T,p,s,null),T.flags|=2,u.return=i,T.return=i,u.sibling=T,i.child=u,La(i,n.child,null,s),u=i.child,u.memoizedState=uf(s),u.childLanes=df(n,k,s),i.memoizedState=cf,i=Sl(null,u));else if(Vi(i),Vf(T)){if(k=T.nextSibling&&T.nextSibling.dataset,k)var Z=k.dgst;k=Z,u=Error(a(419)),u.stack="",u.digest=k,ml({value:u,source:null,stack:null}),i=hf(n,i,s)}else if(xn||hs(n,i,s,!1),k=(s&n.childLanes)!==0,xn||k){if(k=Vt,k!==null&&(u=L(k,s),u!==0&&u!==I.retryLane))throw I.retryLane=u,Ca(n,u),nr(k,n,u),lf;Kf(T)||Tc(),i=hf(n,i,s)}else Kf(T)?(i.flags|=192,i.child=n.child,i=null):(n=I.treeContext,en=zr(T.nextSibling),Mn=i,kt=!0,Fi=null,Nr=!1,n!==null&&Zp(i,n),i=ff(i,u.children),i.flags|=4096);return i}return p?(Yi(),T=u.fallback,p=i.mode,I=n.child,Z=I.sibling,u=fi(I,{mode:"hidden",children:u.children}),u.subtreeFlags=I.subtreeFlags&65011712,Z!==null?T=fi(Z,T):(T=Ta(T,p,s,null),T.flags|=2),T.return=i,u.return=i,u.sibling=T,i.child=u,Sl(null,u),u=i.child,T=n.child.memoizedState,T===null?T=uf(s):(p=T.cachePool,p!==null?(I=gn._currentValue,p=p.parent!==I?{parent:I,pool:I}:p):p=r0(),T={baseLanes:T.baseLanes|s,cachePool:p}),u.memoizedState=T,u.childLanes=df(n,k,s),i.memoizedState=cf,Sl(n.child,u)):(Vi(i),s=n.child,n=s.sibling,s=fi(s,{mode:"visible",children:u.children}),s.return=i,s.sibling=null,n!==null&&(k=i.deletions,k===null?(i.deletions=[n],i.flags|=16):k.push(n)),i.child=s,i.memoizedState=null,s)}function ff(n,i){return i=vc({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function vc(n,i){return n=or(22,n,null,i),n.lanes=0,n}function hf(n,i,s){return La(i,n.child,null,s),n=ff(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function gg(n,i,s){n.lanes|=i;var u=n.alternate;u!==null&&(u.lanes|=i),zd(n.return,i,s)}function mf(n,i,s,u,p,b){var k=n.memoizedState;k===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:p,treeForkCount:b}:(k.isBackwards=i,k.rendering=null,k.renderingStartTime=0,k.last=u,k.tail=s,k.tailMode=p,k.treeForkCount=b)}function bg(n,i,s){var u=i.pendingProps,p=u.revealOrder,b=u.tail;u=u.children;var k=fn.current,T=(k&2)!==0;if(T?(k=k&1|2,i.flags|=128):k&=1,C(fn,k),Dn(n,i,u,s),u=kt?hl:0,!T&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&gg(n,s,i);else if(n.tag===19)gg(n,s,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":for(s=i.child,p=null;s!==null;)n=s.alternate,n!==null&&oc(n)===null&&(p=s),s=s.sibling;s=p,s===null?(p=i.child,i.child=null):(p=s.sibling,s.sibling=null),mf(i,!1,p,s,b,u);break;case"backwards":case"unstable_legacy-backwards":for(s=null,p=i.child,i.child=null;p!==null;){if(n=p.alternate,n!==null&&oc(n)===null){i.child=p;break}n=p.sibling,p.sibling=s,s=p,p=n}mf(i,!0,s,null,b,u);break;case"together":mf(i,!1,null,null,void 0,u);break;default:i.memoizedState=null}return i.child}function xi(n,i,s){if(n!==null&&(i.dependencies=n.dependencies),Zi|=i.lanes,(s&i.childLanes)===0)if(n!==null){if(hs(n,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(a(153));if(i.child!==null){for(n=i.child,s=fi(n,n.pendingProps),i.child=s,s.return=i;n.sibling!==null;)n=n.sibling,s=s.sibling=fi(n,n.pendingProps),s.return=i;s.sibling=null}return i.child}function pf(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&ec(n)))}function t_(n,i,s){switch(i.tag){case 3:xe(i,i.stateNode.containerInfo),qi(i,gn,n.memoizedState.cache),Aa();break;case 27:case 5:Ue(i);break;case 4:xe(i,i.stateNode.containerInfo);break;case 10:qi(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Ud(i),null;break;case 13:var u=i.memoizedState;if(u!==null)return u.dehydrated!==null?(Vi(i),i.flags|=128,null):(s&i.child.childLanes)!==0?pg(n,i,s):(Vi(i),n=xi(n,i,s),n!==null?n.sibling:null);Vi(i);break;case 19:var p=(n.flags&128)!==0;if(u=(s&i.childLanes)!==0,u||(hs(n,i,s,!1),u=(s&i.childLanes)!==0),p){if(u)return bg(n,i,s);i.flags|=128}if(p=i.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),C(fn,fn.current),u)break;return null;case 22:return i.lanes=0,cg(n,i,s,i.pendingProps);case 24:qi(i,gn,n.memoizedState.cache)}return xi(n,i,s)}function xg(n,i,s){if(n!==null)if(n.memoizedProps!==i.pendingProps)xn=!0;else{if(!pf(n,s)&&(i.flags&128)===0)return xn=!1,t_(n,i,s);xn=(n.flags&131072)!==0}else xn=!1,kt&&(i.flags&1048576)!==0&&Xp(i,hl,i.index);switch(i.lanes=0,i.tag){case 16:e:{var u=i.pendingProps;if(n=ja(i.elementType),i.type=n,typeof n=="function")yd(n)?(u=Ba(n,u),i.tag=1,i=hg(null,i,n,u,s)):(i.tag=0,i=of(null,i,n,u,s));else{if(n!=null){var p=n.$$typeof;if(p===F){i.tag=11,i=sg(null,i,n,u,s);break e}else if(p===G){i.tag=14,i=lg(null,i,n,u,s);break e}}throw i=se(n)||n,Error(a(306,i,""))}}return i;case 0:return of(n,i,i.type,i.pendingProps,s);case 1:return u=i.type,p=Ba(u,i.pendingProps),hg(n,i,u,p,s);case 3:e:{if(xe(i,i.stateNode.containerInfo),n===null)throw Error(a(387));u=i.pendingProps;var b=i.memoizedState;p=b.element,jd(n,i),kl(i,u,null,s);var k=i.memoizedState;if(u=k.cache,qi(i,gn,u),u!==b.cache&&Cd(i,[gn],s,!0),vl(),u=k.element,b.isDehydrated)if(b={element:u,isDehydrated:!1,cache:k.cache},i.updateQueue.baseState=b,i.memoizedState=b,i.flags&256){i=mg(n,i,u,s);break e}else if(u!==p){p=wr(Error(a(424)),i),ml(p),i=mg(n,i,u,s);break e}else{switch(n=i.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(en=zr(n.firstChild),Mn=i,kt=!0,Fi=null,Nr=!0,s=c0(i,null,u,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(Aa(),u===p){i=xi(n,i,s);break e}Dn(n,i,u,s)}i=i.child}return i;case 26:return yc(n,i),n===null?(s=Tb(i.type,null,i.pendingProps,null))?i.memoizedState=s:kt||(s=i.type,n=i.pendingProps,u=Lc(ye.current).createElement(s),u[_e]=i,u[Ce]=n,Ln(u,s,n),Ht(u),i.stateNode=u):i.memoizedState=Tb(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return Ue(i),n===null&&kt&&(u=i.stateNode=Sb(i.type,i.pendingProps,ye.current),Mn=i,Nr=!0,p=en,na(i.type)?(Yf=p,en=zr(u.firstChild)):en=p),Dn(n,i,i.pendingProps.children,s),yc(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&kt&&((p=u=en)&&(u=R_(u,i.type,i.pendingProps,Nr),u!==null?(i.stateNode=u,Mn=i,en=zr(u.firstChild),Nr=!1,p=!0):p=!1),p||Hi(i)),Ue(i),p=i.type,b=i.pendingProps,k=n!==null?n.memoizedProps:null,u=b.children,qf(p,b)?u=null:k!==null&&qf(p,k)&&(i.flags|=32),i.memoizedState!==null&&(p=Fd(n,i,KE,null,null,s),Fl._currentValue=p),yc(n,i),Dn(n,i,u,s),i.child;case 6:return n===null&&kt&&((n=s=en)&&(s=O_(s,i.pendingProps,Nr),s!==null?(i.stateNode=s,Mn=i,en=null,n=!0):n=!1),n||Hi(i)),null;case 13:return pg(n,i,s);case 4:return xe(i,i.stateNode.containerInfo),u=i.pendingProps,n===null?i.child=La(i,null,u,s):Dn(n,i,u,s),i.child;case 11:return sg(n,i,i.type,i.pendingProps,s);case 7:return Dn(n,i,i.pendingProps,s),i.child;case 8:return Dn(n,i,i.pendingProps.children,s),i.child;case 12:return Dn(n,i,i.pendingProps.children,s),i.child;case 10:return u=i.pendingProps,qi(i,i.type,u.value),Dn(n,i,u.children,s),i.child;case 9:return p=i.type._context,u=i.pendingProps.children,Oa(i),p=jn(p),u=u(p),i.flags|=1,Dn(n,i,u,s),i.child;case 14:return lg(n,i,i.type,i.pendingProps,s);case 15:return og(n,i,i.type,i.pendingProps,s);case 19:return bg(n,i,s);case 31:return e_(n,i,s);case 22:return cg(n,i,s,i.pendingProps);case 24:return Oa(i),u=jn(gn),n===null?(p=Rd(),p===null&&(p=Vt,b=Td(),p.pooledCache=b,b.refCount++,b!==null&&(p.pooledCacheLanes|=s),p=b),i.memoizedState={parent:u,cache:p},Md(i),qi(i,gn,p)):((n.lanes&s)!==0&&(jd(n,i),kl(i,null,null,s),vl()),p=n.memoizedState,b=i.memoizedState,p.parent!==u?(p={parent:u,cache:u},i.memoizedState=p,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=p),qi(i,gn,u)):(u=b.cache,qi(i,gn,u),u!==p.cache&&Cd(i,[gn],s,!0))),Dn(n,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function yi(n){n.flags|=4}function gf(n,i,s,u,p){if((i=(n.mode&32)!==0)&&(i=!1),i){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(Gg())n.flags|=8192;else throw Da=ic,Od}else n.flags&=-16777217}function yg(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!jb(i))if(Gg())n.flags|=8192;else throw Da=ic,Od}function kc(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?Qe():536870912,n.lanes|=i,Ns|=i)}function zl(n,i){if(!kt)switch(n.tailMode){case"hidden":i=n.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function tn(n){var i=n.alternate!==null&&n.alternate.child===n.child,s=0,u=0;if(i)for(var p=n.child;p!==null;)s|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)s|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=u,n.childLanes=s,i}function n_(n,i,s){var u=i.pendingProps;switch(Ed(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tn(i),null;case 1:return tn(i),null;case 3:return s=i.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),i.memoizedState.cache!==u&&(i.flags|=2048),pi(gn),pe(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(n===null||n.child===null)&&(fs(i)?yi(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Nd())),tn(i),null;case 26:var p=i.type,b=i.memoizedState;return n===null?(yi(i),b!==null?(tn(i),yg(i,b)):(tn(i),gf(i,p,null,u,s))):b?b!==n.memoizedState?(yi(i),tn(i),yg(i,b)):(tn(i),i.flags&=-16777217):(n=n.memoizedProps,n!==u&&yi(i),tn(i),gf(i,p,n,u,s)),null;case 27:if(Re(i),s=ye.current,p=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==u&&yi(i);else{if(!u){if(i.stateNode===null)throw Error(a(166));return tn(i),null}n=ue.current,fs(i)?Wp(i):(n=Sb(p,u,s),i.stateNode=n,yi(i))}return tn(i),null;case 5:if(Re(i),p=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==u&&yi(i);else{if(!u){if(i.stateNode===null)throw Error(a(166));return tn(i),null}if(b=ue.current,fs(i))Wp(i);else{var k=Lc(ye.current);switch(b){case 1:b=k.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:b=k.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":b=k.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":b=k.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":b=k.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof u.is=="string"?k.createElement("select",{is:u.is}):k.createElement("select"),u.multiple?b.multiple=!0:u.size&&(b.size=u.size);break;default:b=typeof u.is=="string"?k.createElement(p,{is:u.is}):k.createElement(p)}}b[_e]=i,b[Ce]=u;e:for(k=i.child;k!==null;){if(k.tag===5||k.tag===6)b.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=b;e:switch(Ln(b,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&yi(i)}}return tn(i),gf(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,s),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==u&&yi(i);else{if(typeof u!="string"&&i.stateNode===null)throw Error(a(166));if(n=ye.current,fs(i)){if(n=i.stateNode,s=i.memoizedProps,u=null,p=Mn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}n[_e]=i,n=!!(n.nodeValue===s||u!==null&&u.suppressHydrationWarning===!0||pb(n.nodeValue,s)),n||Hi(i,!0)}else n=Lc(n).createTextNode(u),n[_e]=i,i.stateNode=n}return tn(i),null;case 31:if(s=i.memoizedState,n===null||n.memoizedState!==null){if(u=fs(i),s!==null){if(n===null){if(!u)throw Error(a(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[_e]=i}else Aa(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;tn(i),n=!1}else s=Nd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=s),n=!0;if(!n)return i.flags&256?(ur(i),i):(ur(i),null);if((i.flags&128)!==0)throw Error(a(558))}return tn(i),null;case 13:if(u=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=fs(i),u!==null&&u.dehydrated!==null){if(n===null){if(!p)throw Error(a(318));if(p=i.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[_e]=i}else Aa(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;tn(i),p=!1}else p=Nd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return i.flags&256?(ur(i),i):(ur(i),null)}return ur(i),(i.flags&128)!==0?(i.lanes=s,i):(s=u!==null,n=n!==null&&n.memoizedState!==null,s&&(u=i.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),b=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(b=u.memoizedState.cachePool.pool),b!==p&&(u.flags|=2048)),s!==n&&s&&(i.child.flags|=8192),kc(i,i.updateQueue),tn(i),null);case 4:return pe(),n===null&&Bf(i.stateNode.containerInfo),tn(i),null;case 10:return pi(i.type),tn(i),null;case 19:if(B(fn),u=i.memoizedState,u===null)return tn(i),null;if(p=(i.flags&128)!==0,b=u.rendering,b===null)if(p)zl(u,!1);else{if(on!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(b=oc(n),b!==null){for(i.flags|=128,zl(u,!1),n=b.updateQueue,i.updateQueue=n,kc(i,n),i.subtreeFlags=0,n=s,s=i.child;s!==null;)Vp(s,n),s=s.sibling;return C(fn,fn.current&1|2),kt&&hi(i,u.treeForkCount),i.child}n=n.sibling}u.tail!==null&&Wt()>Sc&&(i.flags|=128,p=!0,zl(u,!1),i.lanes=4194304)}else{if(!p)if(n=oc(b),n!==null){if(i.flags|=128,p=!0,n=n.updateQueue,i.updateQueue=n,kc(i,n),zl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!b.alternate&&!kt)return tn(i),null}else 2*Wt()-u.renderingStartTime>Sc&&s!==536870912&&(i.flags|=128,p=!0,zl(u,!1),i.lanes=4194304);u.isBackwards?(b.sibling=i.child,i.child=b):(n=u.last,n!==null?n.sibling=b:i.child=b,u.last=b)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=Wt(),n.sibling=null,s=fn.current,C(fn,p?s&1|2:s&1),kt&&hi(i,u.treeForkCount),n):(tn(i),null);case 22:case 23:return ur(i),Bd(),u=i.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(i.flags|=8192):u&&(i.flags|=8192),u?(s&536870912)!==0&&(i.flags&128)===0&&(tn(i),i.subtreeFlags&6&&(i.flags|=8192)):tn(i),s=i.updateQueue,s!==null&&kc(i,s.retryQueue),s=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),u=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),u!==s&&(i.flags|=2048),n!==null&&B(Ma),null;case 24:return s=null,n!==null&&(s=n.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),pi(gn),tn(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function r_(n,i){switch(Ed(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return pi(gn),pe(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return Re(i),null;case 31:if(i.memoizedState!==null){if(ur(i),i.alternate===null)throw Error(a(340));Aa()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(ur(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Aa()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return B(fn),null;case 4:return pe(),null;case 10:return pi(i.type),null;case 22:case 23:return ur(i),Bd(),n!==null&&B(Ma),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return pi(gn),null;case 25:return null;default:return null}}function vg(n,i){switch(Ed(i),i.tag){case 3:pi(gn),pe();break;case 26:case 27:case 5:Re(i);break;case 4:pe();break;case 31:i.memoizedState!==null&&ur(i);break;case 13:ur(i);break;case 19:B(fn);break;case 10:pi(i.type);break;case 22:case 23:ur(i),Bd(),n!==null&&B(Ma);break;case 24:pi(gn)}}function Cl(n,i){try{var s=i.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var p=u.next;s=p;do{if((s.tag&n)===n){u=void 0;var b=s.create,k=s.inst;u=b(),k.destroy=u}s=s.next}while(s!==p)}}catch(T){Ft(i,i.return,T)}}function Qi(n,i,s){try{var u=i.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var b=p.next;u=b;do{if((u.tag&n)===n){var k=u.inst,T=k.destroy;if(T!==void 0){k.destroy=void 0,p=i;var I=s,Z=T;try{Z()}catch(oe){Ft(p,I,oe)}}}u=u.next}while(u!==b)}}catch(oe){Ft(i,i.return,oe)}}function kg(n){var i=n.updateQueue;if(i!==null){var s=n.stateNode;try{d0(i,s)}catch(u){Ft(n,n.return,u)}}}function wg(n,i,s){s.props=Ba(n.type,n.memoizedProps),s.state=n.memoizedState;try{s.componentWillUnmount()}catch(u){Ft(n,i,u)}}function Tl(n,i){try{var s=n.ref;if(s!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof s=="function"?n.refCleanup=s(u):s.current=u}}catch(p){Ft(n,i,p)}}function Zr(n,i){var s=n.ref,u=n.refCleanup;if(s!==null)if(typeof u=="function")try{u()}catch(p){Ft(n,i,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(p){Ft(n,i,p)}else s.current=null}function Eg(n){var i=n.type,s=n.memoizedProps,u=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&u.focus();break e;case"img":s.src?u.src=s.src:s.srcSet&&(u.srcset=s.srcSet)}}catch(p){Ft(n,n.return,p)}}function bf(n,i,s){try{var u=n.stateNode;N_(u,n.type,s,i),u[Ce]=i}catch(p){Ft(n,n.return,p)}}function _g(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&na(n.type)||n.tag===4}function xf(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||_g(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&na(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function yf(n,i,s){var u=n.tag;if(u===5||u===6)n=n.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(n,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(n),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=Se));else if(u!==4&&(u===27&&na(n.type)&&(s=n.stateNode,i=null),n=n.child,n!==null))for(yf(n,i,s),n=n.sibling;n!==null;)yf(n,i,s),n=n.sibling}function wc(n,i,s){var u=n.tag;if(u===5||u===6)n=n.stateNode,i?s.insertBefore(n,i):s.appendChild(n);else if(u!==4&&(u===27&&na(n.type)&&(s=n.stateNode),n=n.child,n!==null))for(wc(n,i,s),n=n.sibling;n!==null;)wc(n,i,s),n=n.sibling}function Ng(n){var i=n.stateNode,s=n.memoizedProps;try{for(var u=n.type,p=i.attributes;p.length;)i.removeAttributeNode(p[0]);Ln(i,u,s),i[_e]=n,i[Ce]=s}catch(b){Ft(n,n.return,b)}}var vi=!1,yn=!1,vf=!1,Sg=typeof WeakSet=="function"?WeakSet:Set,An=null;function i_(n,i){if(n=n.containerInfo,Ff=qc,n=Bp(n),fd(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var u=s.getSelection&&s.getSelection();if(u&&u.rangeCount!==0){s=u.anchorNode;var p=u.anchorOffset,b=u.focusNode;u=u.focusOffset;try{s.nodeType,b.nodeType}catch{s=null;break e}var k=0,T=-1,I=-1,Z=0,oe=0,he=n,J=null;t:for(;;){for(var re;he!==s||p!==0&&he.nodeType!==3||(T=k+p),he!==b||u!==0&&he.nodeType!==3||(I=k+u),he.nodeType===3&&(k+=he.nodeValue.length),(re=he.firstChild)!==null;)J=he,he=re;for(;;){if(he===n)break t;if(J===s&&++Z===p&&(T=k),J===b&&++oe===u&&(I=k),(re=he.nextSibling)!==null)break;he=J,J=he.parentNode}he=re}s=T===-1||I===-1?null:{start:T,end:I}}else s=null}s=s||{start:0,end:0}}else s=null;for(Hf={focusedElem:n,selectionRange:s},qc=!1,An=i;An!==null;)if(i=An,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,An=n;else for(;An!==null;){switch(i=An,b=i.alternate,n=i.flags,i.tag){case 0:if((n&4)!==0&&(n=i.updateQueue,n=n!==null?n.events:null,n!==null))for(s=0;s<n.length;s++)p=n[s],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&b!==null){n=void 0,s=i,p=b.memoizedProps,b=b.memoizedState,u=s.stateNode;try{var je=Ba(s.type,p);n=u.getSnapshotBeforeUpdate(je,b),u.__reactInternalSnapshotBeforeUpdate=n}catch(Ye){Ft(s,s.return,Ye)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,s=n.nodeType,s===9)Gf(n);else if(s===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Gf(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=i.sibling,n!==null){n.return=i.return,An=n;break}An=i.return}}function zg(n,i,s){var u=s.flags;switch(s.tag){case 0:case 11:case 15:wi(n,s),u&4&&Cl(5,s);break;case 1:if(wi(n,s),u&4)if(n=s.stateNode,i===null)try{n.componentDidMount()}catch(k){Ft(s,s.return,k)}else{var p=Ba(s.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(p,i,n.__reactInternalSnapshotBeforeUpdate)}catch(k){Ft(s,s.return,k)}}u&64&&kg(s),u&512&&Tl(s,s.return);break;case 3:if(wi(n,s),u&64&&(n=s.updateQueue,n!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{d0(n,i)}catch(k){Ft(s,s.return,k)}}break;case 27:i===null&&u&4&&Ng(s);case 26:case 5:wi(n,s),i===null&&u&4&&Eg(s),u&512&&Tl(s,s.return);break;case 12:wi(n,s);break;case 31:wi(n,s),u&4&&Ag(n,s);break;case 13:wi(n,s),u&4&&Rg(n,s),u&64&&(n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(s=h_.bind(null,s),M_(n,s))));break;case 22:if(u=s.memoizedState!==null||vi,!u){i=i!==null&&i.memoizedState!==null||yn,p=vi;var b=yn;vi=u,(yn=i)&&!b?Ei(n,s,(s.subtreeFlags&8772)!==0):wi(n,s),vi=p,yn=b}break;case 30:break;default:wi(n,s)}}function Cg(n){var i=n.alternate;i!==null&&(n.alternate=null,Cg(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&Bt(i)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var an=null,Wn=!1;function ki(n,i,s){for(s=s.child;s!==null;)Tg(n,i,s),s=s.sibling}function Tg(n,i,s){if(rn&&typeof rn.onCommitFiberUnmount=="function")try{rn.onCommitFiberUnmount(cn,s)}catch{}switch(s.tag){case 26:yn||Zr(s,i),ki(n,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:yn||Zr(s,i);var u=an,p=Wn;na(s.type)&&(an=s.stateNode,Wn=!1),ki(n,i,s),Bl(s.stateNode),an=u,Wn=p;break;case 5:yn||Zr(s,i);case 6:if(u=an,p=Wn,an=null,ki(n,i,s),an=u,Wn=p,an!==null)if(Wn)try{(an.nodeType===9?an.body:an.nodeName==="HTML"?an.ownerDocument.body:an).removeChild(s.stateNode)}catch(b){Ft(s,i,b)}else try{an.removeChild(s.stateNode)}catch(b){Ft(s,i,b)}break;case 18:an!==null&&(Wn?(n=an,kb(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,s.stateNode),Ms(n)):kb(an,s.stateNode));break;case 4:u=an,p=Wn,an=s.stateNode.containerInfo,Wn=!0,ki(n,i,s),an=u,Wn=p;break;case 0:case 11:case 14:case 15:Qi(2,s,i),yn||Qi(4,s,i),ki(n,i,s);break;case 1:yn||(Zr(s,i),u=s.stateNode,typeof u.componentWillUnmount=="function"&&wg(s,i,u)),ki(n,i,s);break;case 21:ki(n,i,s);break;case 22:yn=(u=yn)||s.memoizedState!==null,ki(n,i,s),yn=u;break;default:ki(n,i,s)}}function Ag(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Ms(n)}catch(s){Ft(i,i.return,s)}}}function Rg(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Ms(n)}catch(s){Ft(i,i.return,s)}}function a_(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new Sg),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new Sg),i;default:throw Error(a(435,n.tag))}}function Ec(n,i){var s=a_(n);i.forEach(function(u){if(!s.has(u)){s.add(u);var p=m_.bind(null,n,u);u.then(p,p)}})}function Jn(n,i){var s=i.deletions;if(s!==null)for(var u=0;u<s.length;u++){var p=s[u],b=n,k=i,T=k;e:for(;T!==null;){switch(T.tag){case 27:if(na(T.type)){an=T.stateNode,Wn=!1;break e}break;case 5:an=T.stateNode,Wn=!1;break e;case 3:case 4:an=T.stateNode.containerInfo,Wn=!0;break e}T=T.return}if(an===null)throw Error(a(160));Tg(b,k,p),an=null,Wn=!1,b=p.alternate,b!==null&&(b.return=null),p.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Og(i,n),i=i.sibling}var Br=null;function Og(n,i){var s=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Jn(i,n),er(n),u&4&&(Qi(3,n,n.return),Cl(3,n),Qi(5,n,n.return));break;case 1:Jn(i,n),er(n),u&512&&(yn||s===null||Zr(s,s.return)),u&64&&vi&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(s=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=s===null?u:s.concat(u))));break;case 26:var p=Br;if(Jn(i,n),er(n),u&512&&(yn||s===null||Zr(s,s.return)),u&4){var b=s!==null?s.memoizedState:null;if(u=n.memoizedState,s===null)if(u===null)if(n.stateNode===null){e:{u=n.type,s=n.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":b=p.getElementsByTagName("title")[0],(!b||b[lt]||b[_e]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=p.createElement(u),p.head.insertBefore(b,p.querySelector("head > title"))),Ln(b,u,s),b[_e]=n,Ht(b),u=b;break e;case"link":var k=Ob("link","href",p).get(u+(s.href||""));if(k){for(var T=0;T<k.length;T++)if(b=k[T],b.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&b.getAttribute("rel")===(s.rel==null?null:s.rel)&&b.getAttribute("title")===(s.title==null?null:s.title)&&b.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){k.splice(T,1);break t}}b=p.createElement(u),Ln(b,u,s),p.head.appendChild(b);break;case"meta":if(k=Ob("meta","content",p).get(u+(s.content||""))){for(T=0;T<k.length;T++)if(b=k[T],b.getAttribute("content")===(s.content==null?null:""+s.content)&&b.getAttribute("name")===(s.name==null?null:s.name)&&b.getAttribute("property")===(s.property==null?null:s.property)&&b.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&b.getAttribute("charset")===(s.charSet==null?null:s.charSet)){k.splice(T,1);break t}}b=p.createElement(u),Ln(b,u,s),p.head.appendChild(b);break;default:throw Error(a(468,u))}b[_e]=n,Ht(b),u=b}n.stateNode=u}else Mb(p,n.type,n.stateNode);else n.stateNode=Rb(p,u,n.memoizedProps);else b!==u?(b===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):b.count--,u===null?Mb(p,n.type,n.stateNode):Rb(p,u,n.memoizedProps)):u===null&&n.stateNode!==null&&bf(n,n.memoizedProps,s.memoizedProps)}break;case 27:Jn(i,n),er(n),u&512&&(yn||s===null||Zr(s,s.return)),s!==null&&u&4&&bf(n,n.memoizedProps,s.memoizedProps);break;case 5:if(Jn(i,n),er(n),u&512&&(yn||s===null||Zr(s,s.return)),n.flags&32){p=n.stateNode;try{Ze(p,"")}catch(je){Ft(n,n.return,je)}}u&4&&n.stateNode!=null&&(p=n.memoizedProps,bf(n,p,s!==null?s.memoizedProps:p)),u&1024&&(vf=!0);break;case 6:if(Jn(i,n),er(n),u&4){if(n.stateNode===null)throw Error(a(162));u=n.memoizedProps,s=n.stateNode;try{s.nodeValue=u}catch(je){Ft(n,n.return,je)}}break;case 3:if(Uc=null,p=Br,Br=Ic(i.containerInfo),Jn(i,n),Br=p,er(n),u&4&&s!==null&&s.memoizedState.isDehydrated)try{Ms(i.containerInfo)}catch(je){Ft(n,n.return,je)}vf&&(vf=!1,Mg(n));break;case 4:u=Br,Br=Ic(n.stateNode.containerInfo),Jn(i,n),er(n),Br=u;break;case 12:Jn(i,n),er(n);break;case 31:Jn(i,n),er(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Ec(n,u)));break;case 13:Jn(i,n),er(n),n.child.flags&8192&&n.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Nc=Wt()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Ec(n,u)));break;case 22:p=n.memoizedState!==null;var I=s!==null&&s.memoizedState!==null,Z=vi,oe=yn;if(vi=Z||p,yn=oe||I,Jn(i,n),yn=oe,vi=Z,er(n),u&8192)e:for(i=n.stateNode,i._visibility=p?i._visibility&-2:i._visibility|1,p&&(s===null||I||vi||yn||Ua(n)),s=null,i=n;;){if(i.tag===5||i.tag===26){if(s===null){I=s=i;try{if(b=I.stateNode,p)k=b.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{T=I.stateNode;var he=I.memoizedProps.style,J=he!=null&&he.hasOwnProperty("display")?he.display:null;T.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(je){Ft(I,I.return,je)}}}else if(i.tag===6){if(s===null){I=i;try{I.stateNode.nodeValue=p?"":I.memoizedProps}catch(je){Ft(I,I.return,je)}}}else if(i.tag===18){if(s===null){I=i;try{var re=I.stateNode;p?wb(re,!0):wb(I.stateNode,!1)}catch(je){Ft(I,I.return,je)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===n)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break e;for(;i.sibling===null;){if(i.return===null||i.return===n)break e;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}u&4&&(u=n.updateQueue,u!==null&&(s=u.retryQueue,s!==null&&(u.retryQueue=null,Ec(n,s))));break;case 19:Jn(i,n),er(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Ec(n,u)));break;case 30:break;case 21:break;default:Jn(i,n),er(n)}}function er(n){var i=n.flags;if(i&2){try{for(var s,u=n.return;u!==null;){if(_g(u)){s=u;break}u=u.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var p=s.stateNode,b=xf(n);wc(n,b,p);break;case 5:var k=s.stateNode;s.flags&32&&(Ze(k,""),s.flags&=-33);var T=xf(n);wc(n,T,k);break;case 3:case 4:var I=s.stateNode.containerInfo,Z=xf(n);yf(n,Z,I);break;default:throw Error(a(161))}}catch(oe){Ft(n,n.return,oe)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function Mg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;Mg(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}function wi(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)zg(n,i.alternate,i),i=i.sibling}function Ua(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:Qi(4,i,i.return),Ua(i);break;case 1:Zr(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&wg(i,i.return,s),Ua(i);break;case 27:Bl(i.stateNode);case 26:case 5:Zr(i,i.return),Ua(i);break;case 22:i.memoizedState===null&&Ua(i);break;case 30:Ua(i);break;default:Ua(i)}n=n.sibling}}function Ei(n,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var u=i.alternate,p=n,b=i,k=b.flags;switch(b.tag){case 0:case 11:case 15:Ei(p,b,s),Cl(4,b);break;case 1:if(Ei(p,b,s),u=b,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(Z){Ft(u,u.return,Z)}if(u=b,p=u.updateQueue,p!==null){var T=u.stateNode;try{var I=p.shared.hiddenCallbacks;if(I!==null)for(p.shared.hiddenCallbacks=null,p=0;p<I.length;p++)u0(I[p],T)}catch(Z){Ft(u,u.return,Z)}}s&&k&64&&kg(b),Tl(b,b.return);break;case 27:Ng(b);case 26:case 5:Ei(p,b,s),s&&u===null&&k&4&&Eg(b),Tl(b,b.return);break;case 12:Ei(p,b,s);break;case 31:Ei(p,b,s),s&&k&4&&Ag(p,b);break;case 13:Ei(p,b,s),s&&k&4&&Rg(p,b);break;case 22:b.memoizedState===null&&Ei(p,b,s),Tl(b,b.return);break;case 30:break;default:Ei(p,b,s)}i=i.sibling}}function kf(n,i){var s=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),n=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(n=i.memoizedState.cachePool.pool),n!==s&&(n!=null&&n.refCount++,s!=null&&pl(s))}function wf(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&pl(n))}function Ur(n,i,s,u){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)jg(n,i,s,u),i=i.sibling}function jg(n,i,s,u){var p=i.flags;switch(i.tag){case 0:case 11:case 15:Ur(n,i,s,u),p&2048&&Cl(9,i);break;case 1:Ur(n,i,s,u);break;case 3:Ur(n,i,s,u),p&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&pl(n)));break;case 12:if(p&2048){Ur(n,i,s,u),n=i.stateNode;try{var b=i.memoizedProps,k=b.id,T=b.onPostCommit;typeof T=="function"&&T(k,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(I){Ft(i,i.return,I)}}else Ur(n,i,s,u);break;case 31:Ur(n,i,s,u);break;case 13:Ur(n,i,s,u);break;case 23:break;case 22:b=i.stateNode,k=i.alternate,i.memoizedState!==null?b._visibility&2?Ur(n,i,s,u):Al(n,i):b._visibility&2?Ur(n,i,s,u):(b._visibility|=2,ws(n,i,s,u,(i.subtreeFlags&10256)!==0||!1)),p&2048&&kf(k,i);break;case 24:Ur(n,i,s,u),p&2048&&wf(i.alternate,i);break;default:Ur(n,i,s,u)}}function ws(n,i,s,u,p){for(p=p&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var b=n,k=i,T=s,I=u,Z=k.flags;switch(k.tag){case 0:case 11:case 15:ws(b,k,T,I,p),Cl(8,k);break;case 23:break;case 22:var oe=k.stateNode;k.memoizedState!==null?oe._visibility&2?ws(b,k,T,I,p):Al(b,k):(oe._visibility|=2,ws(b,k,T,I,p)),p&&Z&2048&&kf(k.alternate,k);break;case 24:ws(b,k,T,I,p),p&&Z&2048&&wf(k.alternate,k);break;default:ws(b,k,T,I,p)}i=i.sibling}}function Al(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=n,u=i,p=u.flags;switch(u.tag){case 22:Al(s,u),p&2048&&kf(u.alternate,u);break;case 24:Al(s,u),p&2048&&wf(u.alternate,u);break;default:Al(s,u)}i=i.sibling}}var Rl=8192;function Es(n,i,s){if(n.subtreeFlags&Rl)for(n=n.child;n!==null;)Dg(n,i,s),n=n.sibling}function Dg(n,i,s){switch(n.tag){case 26:Es(n,i,s),n.flags&Rl&&n.memoizedState!==null&&G_(s,Br,n.memoizedState,n.memoizedProps);break;case 5:Es(n,i,s);break;case 3:case 4:var u=Br;Br=Ic(n.stateNode.containerInfo),Es(n,i,s),Br=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=Rl,Rl=16777216,Es(n,i,s),Rl=u):Es(n,i,s));break;default:Es(n,i,s)}}function Lg(n){var i=n.alternate;if(i!==null&&(n=i.child,n!==null)){i.child=null;do i=n.sibling,n.sibling=null,n=i;while(n!==null)}}function Ol(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var u=i[s];An=u,Bg(u,n)}Lg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Ig(n),n=n.sibling}function Ig(n){switch(n.tag){case 0:case 11:case 15:Ol(n),n.flags&2048&&Qi(9,n,n.return);break;case 3:Ol(n);break;case 12:Ol(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,_c(n)):Ol(n);break;default:Ol(n)}}function _c(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var u=i[s];An=u,Bg(u,n)}Lg(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:Qi(8,i,i.return),_c(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,_c(i));break;default:_c(i)}n=n.sibling}}function Bg(n,i){for(;An!==null;){var s=An;switch(s.tag){case 0:case 11:case 15:Qi(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var u=s.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:pl(s.memoizedState.cache)}if(u=s.child,u!==null)u.return=s,An=u;else e:for(s=n;An!==null;){u=An;var p=u.sibling,b=u.return;if(Cg(u),u===s){An=null;break e}if(p!==null){p.return=b,An=p;break e}An=b}}}var s_={getCacheForType:function(n){var i=jn(gn),s=i.data.get(n);return s===void 0&&(s=n(),i.data.set(n,s)),s},cacheSignal:function(){return jn(gn).controller.signal}},l_=typeof WeakMap=="function"?WeakMap:Map,jt=0,Vt=null,ht=null,yt=0,Pt=0,dr=null,Xi=!1,_s=!1,Ef=!1,_i=0,on=0,Zi=0,Pa=0,_f=0,fr=0,Ns=0,Ml=null,tr=null,Nf=!1,Nc=0,Ug=0,Sc=1/0,zc=null,Wi=null,_n=0,Ji=null,Ss=null,Ni=0,Sf=0,zf=null,Pg=null,jl=0,Cf=null;function hr(){return(jt&2)!==0&&yt!==0?yt&-yt:M.T!==null?jf():me()}function Fg(){if(fr===0)if((yt&536870912)===0||kt){var n=Lr;Lr<<=1,(Lr&3932160)===0&&(Lr=262144),fr=n}else fr=536870912;return n=cr.current,n!==null&&(n.flags|=32),fr}function nr(n,i,s){(n===Vt&&(Pt===2||Pt===9)||n.cancelPendingCommit!==null)&&(zs(n,0),ea(n,yt,fr,!1)),Rt(n,s),((jt&2)===0||n!==Vt)&&(n===Vt&&((jt&2)===0&&(Pa|=s),on===4&&ea(n,yt,fr,!1)),Wr(n))}function Hg(n,i,s){if((jt&6)!==0)throw Error(a(327));var u=!s&&(i&127)===0&&(i&n.expiredLanes)===0||ce(n,i),p=u?u_(n,i):Af(n,i,!0),b=u;do{if(p===0){_s&&!u&&ea(n,i,0,!1);break}else{if(s=n.current.alternate,b&&!o_(s)){p=Af(n,i,!1),b=!1;continue}if(p===2){if(b=i,n.errorRecoveryDisabledLanes&b)var k=0;else k=n.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){i=k;e:{var T=n;p=Ml;var I=T.current.memoizedState.isDehydrated;if(I&&(zs(T,k).flags|=256),k=Af(T,k,!1),k!==2){if(Ef&&!I){T.errorRecoveryDisabledLanes|=b,Pa|=b,p=4;break e}b=tr,tr=p,b!==null&&(tr===null?tr=b:tr.push.apply(tr,b))}p=k}if(b=!1,p!==2)continue}}if(p===1){zs(n,0),ea(n,i,0,!0);break}e:{switch(u=n,b=p,b){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:ea(u,i,fr,!Xi);break e;case 2:tr=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(p=Nc+300-Wt(),10<p)){if(ea(u,i,fr,!Xi),U(u,0,!0)!==0)break e;Ni=i,u.timeoutHandle=yb(qg.bind(null,u,s,tr,zc,Nf,i,fr,Pa,Ns,Xi,b,"Throttled",-0,0),p);break e}qg(u,s,tr,zc,Nf,i,fr,Pa,Ns,Xi,b,null,-0,0)}}break}while(!0);Wr(n)}function qg(n,i,s,u,p,b,k,T,I,Z,oe,he,J,re){if(n.timeoutHandle=-1,he=i.subtreeFlags,he&8192||(he&16785408)===16785408){he={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Se},Dg(i,b,he);var je=(b&62914560)===b?Nc-Wt():(b&4194048)===b?Ug-Wt():0;if(je=K_(he,je),je!==null){Ni=b,n.cancelPendingCommit=je(Zg.bind(null,n,i,b,s,u,p,k,T,I,oe,he,null,J,re)),ea(n,b,k,!Z);return}}Zg(n,i,b,s,u,p,k,T,I)}function o_(n){for(var i=n;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var u=0;u<s.length;u++){var p=s[u],b=p.getSnapshot;p=p.value;try{if(!lr(b(),p))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function ea(n,i,s,u){i&=~_f,i&=~Pa,n.suspendedLanes|=i,n.pingedLanes&=~i,u&&(n.warmLanes|=i),u=n.expirationTimes;for(var p=i;0<p;){var b=31-At(p),k=1<<b;u[b]=-1,p&=~k}s!==0&&Te(n,s,i)}function Cc(){return(jt&6)===0?(Dl(0),!1):!0}function Tf(){if(ht!==null){if(Pt===0)var n=ht.return;else n=ht,mi=Ra=null,$d(n),bs=null,bl=0,n=ht;for(;n!==null;)vg(n.alternate,n),n=n.return;ht=null}}function zs(n,i){var s=n.timeoutHandle;s!==-1&&(n.timeoutHandle=-1,C_(s)),s=n.cancelPendingCommit,s!==null&&(n.cancelPendingCommit=null,s()),Ni=0,Tf(),Vt=n,ht=s=fi(n.current,null),yt=i,Pt=0,dr=null,Xi=!1,_s=ce(n,i),Ef=!1,Ns=fr=_f=Pa=Zi=on=0,tr=Ml=null,Nf=!1,(i&8)!==0&&(i|=i&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=i;0<u;){var p=31-At(u),b=1<<p;i|=n[p],u&=~b}return _i=i,Qo(),s}function $g(n,i){it=null,M.H=Nl,i===gs||i===rc?(i=s0(),Pt=3):i===Od?(i=s0(),Pt=4):Pt=i===lf?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,dr=i,ht===null&&(on=1,bc(n,wr(i,n.current)))}function Gg(){var n=cr.current;return n===null?!0:(yt&4194048)===yt?Sr===null:(yt&62914560)===yt||(yt&536870912)!==0?n===Sr:!1}function Kg(){var n=M.H;return M.H=Nl,n===null?Nl:n}function Vg(){var n=M.A;return M.A=s_,n}function Tc(){on=4,Xi||(yt&4194048)!==yt&&cr.current!==null||(_s=!0),(Zi&134217727)===0&&(Pa&134217727)===0||Vt===null||ea(Vt,yt,fr,!1)}function Af(n,i,s){var u=jt;jt|=2;var p=Kg(),b=Vg();(Vt!==n||yt!==i)&&(zc=null,zs(n,i)),i=!1;var k=on;e:do try{if(Pt!==0&&ht!==null){var T=ht,I=dr;switch(Pt){case 8:Tf(),k=6;break e;case 3:case 2:case 9:case 6:cr.current===null&&(i=!0);var Z=Pt;if(Pt=0,dr=null,Cs(n,T,I,Z),s&&_s){k=0;break e}break;default:Z=Pt,Pt=0,dr=null,Cs(n,T,I,Z)}}c_(),k=on;break}catch(oe){$g(n,oe)}while(!0);return i&&n.shellSuspendCounter++,mi=Ra=null,jt=u,M.H=p,M.A=b,ht===null&&(Vt=null,yt=0,Qo()),k}function c_(){for(;ht!==null;)Yg(ht)}function u_(n,i){var s=jt;jt|=2;var u=Kg(),p=Vg();Vt!==n||yt!==i?(zc=null,Sc=Wt()+500,zs(n,i)):_s=ce(n,i);e:do try{if(Pt!==0&&ht!==null){i=ht;var b=dr;t:switch(Pt){case 1:Pt=0,dr=null,Cs(n,i,b,1);break;case 2:case 9:if(i0(b)){Pt=0,dr=null,Qg(i);break}i=function(){Pt!==2&&Pt!==9||Vt!==n||(Pt=7),Wr(n)},b.then(i,i);break e;case 3:Pt=7;break e;case 4:Pt=5;break e;case 7:i0(b)?(Pt=0,dr=null,Qg(i)):(Pt=0,dr=null,Cs(n,i,b,7));break;case 5:var k=null;switch(ht.tag){case 26:k=ht.memoizedState;case 5:case 27:var T=ht;if(k?jb(k):T.stateNode.complete){Pt=0,dr=null;var I=T.sibling;if(I!==null)ht=I;else{var Z=T.return;Z!==null?(ht=Z,Ac(Z)):ht=null}break t}}Pt=0,dr=null,Cs(n,i,b,5);break;case 6:Pt=0,dr=null,Cs(n,i,b,6);break;case 8:Tf(),on=6;break e;default:throw Error(a(462))}}d_();break}catch(oe){$g(n,oe)}while(!0);return mi=Ra=null,M.H=u,M.A=p,jt=s,ht!==null?0:(Vt=null,yt=0,Qo(),on)}function d_(){for(;ht!==null&&!wa();)Yg(ht)}function Yg(n){var i=xg(n.alternate,n,_i);n.memoizedProps=n.pendingProps,i===null?Ac(n):ht=i}function Qg(n){var i=n,s=i.alternate;switch(i.tag){case 15:case 0:i=fg(s,i,i.pendingProps,i.type,void 0,yt);break;case 11:i=fg(s,i,i.pendingProps,i.type.render,i.ref,yt);break;case 5:$d(i);default:vg(s,i),i=ht=Vp(i,_i),i=xg(s,i,_i)}n.memoizedProps=n.pendingProps,i===null?Ac(n):ht=i}function Cs(n,i,s,u){mi=Ra=null,$d(i),bs=null,bl=0;var p=i.return;try{if(JE(n,p,i,s,yt)){on=1,bc(n,wr(s,n.current)),ht=null;return}}catch(b){if(p!==null)throw ht=p,b;on=1,bc(n,wr(s,n.current)),ht=null;return}i.flags&32768?(kt||u===1?n=!0:_s||(yt&536870912)!==0?n=!1:(Xi=n=!0,(u===2||u===9||u===3||u===6)&&(u=cr.current,u!==null&&u.tag===13&&(u.flags|=16384))),Xg(i,n)):Ac(i)}function Ac(n){var i=n;do{if((i.flags&32768)!==0){Xg(i,Xi);return}n=i.return;var s=n_(i.alternate,i,_i);if(s!==null){ht=s;return}if(i=i.sibling,i!==null){ht=i;return}ht=i=n}while(i!==null);on===0&&(on=5)}function Xg(n,i){do{var s=r_(n.alternate,n);if(s!==null){s.flags&=32767,ht=s;return}if(s=n.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(n=n.sibling,n!==null)){ht=n;return}ht=n=s}while(n!==null);on=6,ht=null}function Zg(n,i,s,u,p,b,k,T,I){n.cancelPendingCommit=null;do Rc();while(_n!==0);if((jt&6)!==0)throw Error(a(327));if(i!==null){if(i===n.current)throw Error(a(177));if(b=i.lanes|i.childLanes,b|=bd,Me(n,s,b,k,T,I),n===Vt&&(ht=Vt=null,yt=0),Ss=i,Ji=n,Ni=s,Sf=b,zf=p,Pg=u,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,p_($e,function(){return nb(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||u){u=M.T,M.T=null,p=Y.p,Y.p=2,k=jt,jt|=4;try{i_(n,i,s)}finally{jt=k,Y.p=p,M.T=u}}_n=1,Wg(),Jg(),eb()}}function Wg(){if(_n===1){_n=0;var n=Ji,i=Ss,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=M.T,M.T=null;var u=Y.p;Y.p=2;var p=jt;jt|=4;try{Og(i,n);var b=Hf,k=Bp(n.containerInfo),T=b.focusedElem,I=b.selectionRange;if(k!==T&&T&&T.ownerDocument&&Ip(T.ownerDocument.documentElement,T)){if(I!==null&&fd(T)){var Z=I.start,oe=I.end;if(oe===void 0&&(oe=Z),"selectionStart"in T)T.selectionStart=Z,T.selectionEnd=Math.min(oe,T.value.length);else{var he=T.ownerDocument||document,J=he&&he.defaultView||window;if(J.getSelection){var re=J.getSelection(),je=T.textContent.length,Ye=Math.min(I.start,je),Gt=I.end===void 0?Ye:Math.min(I.end,je);!re.extend&&Ye>Gt&&(k=Gt,Gt=Ye,Ye=k);var K=Lp(T,Ye),q=Lp(T,Gt);if(K&&q&&(re.rangeCount!==1||re.anchorNode!==K.node||re.anchorOffset!==K.offset||re.focusNode!==q.node||re.focusOffset!==q.offset)){var X=he.createRange();X.setStart(K.node,K.offset),re.removeAllRanges(),Ye>Gt?(re.addRange(X),re.extend(q.node,q.offset)):(X.setEnd(q.node,q.offset),re.addRange(X))}}}}for(he=[],re=T;re=re.parentNode;)re.nodeType===1&&he.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<he.length;T++){var de=he[T];de.element.scrollLeft=de.left,de.element.scrollTop=de.top}}qc=!!Ff,Hf=Ff=null}finally{jt=p,Y.p=u,M.T=s}}n.current=i,_n=2}}function Jg(){if(_n===2){_n=0;var n=Ji,i=Ss,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=M.T,M.T=null;var u=Y.p;Y.p=2;var p=jt;jt|=4;try{zg(n,i.alternate,i)}finally{jt=p,Y.p=u,M.T=s}}_n=3}}function eb(){if(_n===4||_n===3){_n=0,Li();var n=Ji,i=Ss,s=Ni,u=Pg;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?_n=5:(_n=0,Ss=Ji=null,tb(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(Wi=null),W(s),i=i.stateNode,rn&&typeof rn.onCommitFiberRoot=="function")try{rn.onCommitFiberRoot(cn,i,void 0,(i.current.flags&128)===128)}catch{}if(u!==null){i=M.T,p=Y.p,Y.p=2,M.T=null;try{for(var b=n.onRecoverableError,k=0;k<u.length;k++){var T=u[k];b(T.value,{componentStack:T.stack})}}finally{M.T=i,Y.p=p}}(Ni&3)!==0&&Rc(),Wr(n),p=n.pendingLanes,(s&261930)!==0&&(p&42)!==0?n===Cf?jl++:(jl=0,Cf=n):jl=0,Dl(0)}}function tb(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,pl(i)))}function Rc(){return Wg(),Jg(),eb(),nb()}function nb(){if(_n!==5)return!1;var n=Ji,i=Sf;Sf=0;var s=W(Ni),u=M.T,p=Y.p;try{Y.p=32>s?32:s,M.T=null,s=zf,zf=null;var b=Ji,k=Ni;if(_n=0,Ss=Ji=null,Ni=0,(jt&6)!==0)throw Error(a(331));var T=jt;if(jt|=4,Ig(b.current),jg(b,b.current,k,s),jt=T,Dl(0,!1),rn&&typeof rn.onPostCommitFiberRoot=="function")try{rn.onPostCommitFiberRoot(cn,b)}catch{}return!0}finally{Y.p=p,M.T=u,tb(n,i)}}function rb(n,i,s){i=wr(s,i),i=sf(n.stateNode,i,2),n=Ki(n,i,2),n!==null&&(Rt(n,2),Wr(n))}function Ft(n,i,s){if(n.tag===3)rb(n,n,s);else for(;i!==null;){if(i.tag===3){rb(i,n,s);break}else if(i.tag===1){var u=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Wi===null||!Wi.has(u))){n=wr(s,n),s=ig(2),u=Ki(i,s,2),u!==null&&(ag(s,u,i,n),Rt(u,2),Wr(u));break}}i=i.return}}function Rf(n,i,s){var u=n.pingCache;if(u===null){u=n.pingCache=new l_;var p=new Set;u.set(i,p)}else p=u.get(i),p===void 0&&(p=new Set,u.set(i,p));p.has(s)||(Ef=!0,p.add(s),n=f_.bind(null,n,i,s),i.then(n,n))}function f_(n,i,s){var u=n.pingCache;u!==null&&u.delete(i),n.pingedLanes|=n.suspendedLanes&s,n.warmLanes&=~s,Vt===n&&(yt&s)===s&&(on===4||on===3&&(yt&62914560)===yt&&300>Wt()-Nc?(jt&2)===0&&zs(n,0):_f|=s,Ns===yt&&(Ns=0)),Wr(n)}function ib(n,i){i===0&&(i=Qe()),n=Ca(n,i),n!==null&&(Rt(n,i),Wr(n))}function h_(n){var i=n.memoizedState,s=0;i!==null&&(s=i.retryLane),ib(n,s)}function m_(n,i){var s=0;switch(n.tag){case 31:case 13:var u=n.stateNode,p=n.memoizedState;p!==null&&(s=p.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(i),ib(n,s)}function p_(n,i){return yr(n,i)}var Oc=null,Ts=null,Of=!1,Mc=!1,Mf=!1,ta=0;function Wr(n){n!==Ts&&n.next===null&&(Ts===null?Oc=Ts=n:Ts=Ts.next=n),Mc=!0,Of||(Of=!0,b_())}function Dl(n,i){if(!Mf&&Mc){Mf=!0;do for(var s=!1,u=Oc;u!==null;){if(n!==0){var p=u.pendingLanes;if(p===0)var b=0;else{var k=u.suspendedLanes,T=u.pingedLanes;b=(1<<31-At(42|n)+1)-1,b&=p&~(k&~T),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(s=!0,ob(u,b))}else b=yt,b=U(u,u===Vt?b:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(b&3)===0||ce(u,b)||(s=!0,ob(u,b));u=u.next}while(s);Mf=!1}}function g_(){ab()}function ab(){Mc=Of=!1;var n=0;ta!==0&&z_()&&(n=ta);for(var i=Wt(),s=null,u=Oc;u!==null;){var p=u.next,b=sb(u,i);b===0?(u.next=null,s===null?Oc=p:s.next=p,p===null&&(Ts=s)):(s=u,(n!==0||(b&3)!==0)&&(Mc=!0)),u=p}_n!==0&&_n!==5||Dl(n),ta!==0&&(ta=0)}function sb(n,i){for(var s=n.suspendedLanes,u=n.pingedLanes,p=n.expirationTimes,b=n.pendingLanes&-62914561;0<b;){var k=31-At(b),T=1<<k,I=p[k];I===-1?((T&s)===0||(T&u)!==0)&&(p[k]=ze(T,i)):I<=i&&(n.expiredLanes|=T),b&=~T}if(i=Vt,s=yt,s=U(n,n===i?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,s===0||n===i&&(Pt===2||Pt===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&li(u),n.callbackNode=null,n.callbackPriority=0;if((s&3)===0||ce(n,s)){if(i=s&-s,i===n.callbackPriority)return i;switch(u!==null&&li(u),W(s)){case 2:case 8:s=Ee;break;case 32:s=$e;break;case 268435456:s=rt;break;default:s=$e}return u=lb.bind(null,n),s=yr(s,u),n.callbackPriority=i,n.callbackNode=s,i}return u!==null&&u!==null&&li(u),n.callbackPriority=2,n.callbackNode=null,2}function lb(n,i){if(_n!==0&&_n!==5)return n.callbackNode=null,n.callbackPriority=0,null;var s=n.callbackNode;if(Rc()&&n.callbackNode!==s)return null;var u=yt;return u=U(n,n===Vt?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(Hg(n,u,i),sb(n,Wt()),n.callbackNode!=null&&n.callbackNode===s?lb.bind(null,n):null)}function ob(n,i){if(Rc())return null;Hg(n,i,!0)}function b_(){T_(function(){(jt&6)!==0?yr(ae,g_):ab()})}function jf(){if(ta===0){var n=ms;n===0&&(n=Kr,Kr<<=1,(Kr&261888)===0&&(Kr=256)),ta=n}return ta}function cb(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Bi(""+n)}function ub(n,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,n.id&&s.setAttribute("form",n.id),i.parentNode.insertBefore(s,i),n=new FormData(n),s.parentNode.removeChild(s),n}function x_(n,i,s,u,p){if(i==="submit"&&s&&s.stateNode===p){var b=cb((p[Ce]||null).action),k=u.submitter;k&&(i=(i=k[Ce]||null)?cb(i.formAction):k.getAttribute("formAction"),i!==null&&(b=i,k=null));var T=new Go("action","action",null,u,p);n.push({event:T,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ta!==0){var I=k?ub(p,k):new FormData(p);Jd(s,{pending:!0,data:I,method:p.method,action:b},null,I)}}else typeof b=="function"&&(T.preventDefault(),I=k?ub(p,k):new FormData(p),Jd(s,{pending:!0,data:I,method:p.method,action:b},b,I))},currentTarget:p}]})}}for(var Df=0;Df<gd.length;Df++){var Lf=gd[Df],y_=Lf.toLowerCase(),v_=Lf[0].toUpperCase()+Lf.slice(1);Ir(y_,"on"+v_)}Ir(Fp,"onAnimationEnd"),Ir(Hp,"onAnimationIteration"),Ir(qp,"onAnimationStart"),Ir("dblclick","onDoubleClick"),Ir("focusin","onFocus"),Ir("focusout","onBlur"),Ir(LE,"onTransitionRun"),Ir(IE,"onTransitionStart"),Ir(BE,"onTransitionCancel"),Ir($p,"onTransitionEnd"),ge("onMouseEnter",["mouseout","mouseover"]),ge("onMouseLeave",["mouseout","mouseover"]),ge("onPointerEnter",["pointerout","pointerover"]),ge("onPointerLeave",["pointerout","pointerover"]),mn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),mn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),mn("onBeforeInput",["compositionend","keypress","textInput","paste"]),mn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),mn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),mn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ll="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(" "),k_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ll));function db(n,i){i=(i&4)!==0;for(var s=0;s<n.length;s++){var u=n[s],p=u.event;u=u.listeners;e:{var b=void 0;if(i)for(var k=u.length-1;0<=k;k--){var T=u[k],I=T.instance,Z=T.currentTarget;if(T=T.listener,I!==b&&p.isPropagationStopped())break e;b=T,p.currentTarget=Z;try{b(p)}catch(oe){Yo(oe)}p.currentTarget=null,b=I}else for(k=0;k<u.length;k++){if(T=u[k],I=T.instance,Z=T.currentTarget,T=T.listener,I!==b&&p.isPropagationStopped())break e;b=T,p.currentTarget=Z;try{b(p)}catch(oe){Yo(oe)}p.currentTarget=null,b=I}}}}function mt(n,i){var s=i[He];s===void 0&&(s=i[He]=new Set);var u=n+"__bubble";s.has(u)||(fb(i,n,2,!1),s.add(u))}function If(n,i,s){var u=0;i&&(u|=4),fb(s,n,u,i)}var jc="_reactListening"+Math.random().toString(36).slice(2);function Bf(n){if(!n[jc]){n[jc]=!0,Yr.forEach(function(s){s!=="selectionchange"&&(k_.has(s)||If(s,!1,n),If(s,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[jc]||(i[jc]=!0,If("selectionchange",!1,i))}}function fb(n,i,s,u){switch(Fb(i)){case 2:var p=Q_;break;case 8:p=X_;break;default:p=Jf}s=p.bind(null,i,s,n),p=void 0,!rd||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(p=!0),u?p!==void 0?n.addEventListener(i,s,{capture:!0,passive:p}):n.addEventListener(i,s,!0):p!==void 0?n.addEventListener(i,s,{passive:p}):n.addEventListener(i,s,!1)}function Uf(n,i,s,u,p){var b=u;if((i&1)===0&&(i&2)===0&&u!==null)e:for(;;){if(u===null)return;var k=u.tag;if(k===3||k===4){var T=u.stateNode.containerInfo;if(T===p)break;if(k===4)for(k=u.return;k!==null;){var I=k.tag;if((I===3||I===4)&&k.stateNode.containerInfo===p)return;k=k.return}for(;T!==null;){if(k=Nt(T),k===null)return;if(I=k.tag,I===5||I===6||I===26||I===27){u=b=k;continue e}T=T.parentNode}}u=u.return}Fo(function(){var Z=b,oe=nt(s),he=[];e:{var J=Gp.get(n);if(J!==void 0){var re=Go,je=n;switch(n){case"keypress":if(qo(s)===0)break e;case"keydown":case"keyup":re=mE;break;case"focusin":je="focus",re=ld;break;case"focusout":je="blur",re=ld;break;case"beforeblur":case"afterblur":re=ld;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=vp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=nE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=bE;break;case Fp:case Hp:case qp:re=aE;break;case $p:re=yE;break;case"scroll":case"scrollend":re=eE;break;case"wheel":re=kE;break;case"copy":case"cut":case"paste":re=lE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=wp;break;case"toggle":case"beforetoggle":re=EE}var Ye=(i&4)!==0,Gt=!Ye&&(n==="scroll"||n==="scrollend"),K=Ye?J!==null?J+"Capture":null:J;Ye=[];for(var q=Z,X;q!==null;){var de=q;if(X=de.stateNode,de=de.tag,de!==5&&de!==26&&de!==27||X===null||K===null||(de=il(q,K),de!=null&&Ye.push(Il(q,de,X))),Gt)break;q=q.return}0<Ye.length&&(J=new re(J,je,null,s,oe),he.push({event:J,listeners:Ye}))}}if((i&7)===0){e:{if(J=n==="mouseover"||n==="pointerover",re=n==="mouseout"||n==="pointerout",J&&s!==Pe&&(je=s.relatedTarget||s.fromElement)&&(Nt(je)||je[Ae]))break e;if((re||J)&&(J=oe.window===oe?oe:(J=oe.ownerDocument)?J.defaultView||J.parentWindow:window,re?(je=s.relatedTarget||s.toElement,re=Z,je=je?Nt(je):null,je!==null&&(Gt=o(je),Ye=je.tag,je!==Gt||Ye!==5&&Ye!==27&&Ye!==6)&&(je=null)):(re=null,je=Z),re!==je)){if(Ye=vp,de="onMouseLeave",K="onMouseEnter",q="mouse",(n==="pointerout"||n==="pointerover")&&(Ye=wp,de="onPointerLeave",K="onPointerEnter",q="pointer"),Gt=re==null?J:ft(re),X=je==null?J:ft(je),J=new Ye(de,q+"leave",re,s,oe),J.target=Gt,J.relatedTarget=X,de=null,Nt(oe)===Z&&(Ye=new Ye(K,q+"enter",je,s,oe),Ye.target=X,Ye.relatedTarget=Gt,de=Ye),Gt=de,re&&je)t:{for(Ye=w_,K=re,q=je,X=0,de=K;de;de=Ye(de))X++;de=0;for(var Ge=q;Ge;Ge=Ye(Ge))de++;for(;0<X-de;)K=Ye(K),X--;for(;0<de-X;)q=Ye(q),de--;for(;X--;){if(K===q||q!==null&&K===q.alternate){Ye=K;break t}K=Ye(K),q=Ye(q)}Ye=null}else Ye=null;re!==null&&hb(he,J,re,Ye,!1),je!==null&&Gt!==null&&hb(he,Gt,je,Ye,!0)}}e:{if(J=Z?ft(Z):window,re=J.nodeName&&J.nodeName.toLowerCase(),re==="select"||re==="input"&&J.type==="file")var Ot=Ap;else if(Cp(J))if(Rp)Ot=ME;else{Ot=RE;var Fe=AE}else re=J.nodeName,!re||re.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?Z&&Ii(Z.elementType)&&(Ot=Ap):Ot=OE;if(Ot&&(Ot=Ot(n,Z))){Tp(he,Ot,s,oe);break e}Fe&&Fe(n,J,Z),n==="focusout"&&Z&&J.type==="number"&&Z.memoizedProps.value!=null&&rs(J,"number",J.value)}switch(Fe=Z?ft(Z):window,n){case"focusin":(Cp(Fe)||Fe.contentEditable==="true")&&(ss=Fe,hd=Z,fl=null);break;case"focusout":fl=hd=ss=null;break;case"mousedown":md=!0;break;case"contextmenu":case"mouseup":case"dragend":md=!1,Up(he,s,oe);break;case"selectionchange":if(DE)break;case"keydown":case"keyup":Up(he,s,oe)}var at;if(cd)e:{switch(n){case"compositionstart":var vt="onCompositionStart";break e;case"compositionend":vt="onCompositionEnd";break e;case"compositionupdate":vt="onCompositionUpdate";break e}vt=void 0}else as?Sp(n,s)&&(vt="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(vt="onCompositionStart");vt&&(Ep&&s.locale!=="ko"&&(as||vt!=="onCompositionStart"?vt==="onCompositionEnd"&&as&&(at=xp()):(Ui=oe,id="value"in Ui?Ui.value:Ui.textContent,as=!0)),Fe=Dc(Z,vt),0<Fe.length&&(vt=new kp(vt,n,null,s,oe),he.push({event:vt,listeners:Fe}),at?vt.data=at:(at=zp(s),at!==null&&(vt.data=at)))),(at=NE?SE(n,s):zE(n,s))&&(vt=Dc(Z,"onBeforeInput"),0<vt.length&&(Fe=new kp("onBeforeInput","beforeinput",null,s,oe),he.push({event:Fe,listeners:vt}),Fe.data=at)),x_(he,n,Z,s,oe)}db(he,i)})}function Il(n,i,s){return{instance:n,listener:i,currentTarget:s}}function Dc(n,i){for(var s=i+"Capture",u=[];n!==null;){var p=n,b=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||b===null||(p=il(n,s),p!=null&&u.unshift(Il(n,p,b)),p=il(n,i),p!=null&&u.push(Il(n,p,b))),n.tag===3)return u;n=n.return}return[]}function w_(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function hb(n,i,s,u,p){for(var b=i._reactName,k=[];s!==null&&s!==u;){var T=s,I=T.alternate,Z=T.stateNode;if(T=T.tag,I!==null&&I===u)break;T!==5&&T!==26&&T!==27||Z===null||(I=Z,p?(Z=il(s,b),Z!=null&&k.unshift(Il(s,Z,I))):p||(Z=il(s,b),Z!=null&&k.push(Il(s,Z,I)))),s=s.return}k.length!==0&&n.push({event:i,listeners:k})}var E_=/\r\n?/g,__=/\u0000|\uFFFD/g;function mb(n){return(typeof n=="string"?n:""+n).replace(E_,`
|
|
49
|
-
`).replace(__,"")}function pb(n,i){return i=mb(i),mb(n)===i}function $t(n,i,s,u,p,b){switch(s){case"children":typeof u=="string"?i==="body"||i==="textarea"&&u===""||Ze(n,u):(typeof u=="number"||typeof u=="bigint")&&i!=="body"&&Ze(n,""+u);break;case"className":It(n,"class",u);break;case"tabIndex":It(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":It(n,s,u);break;case"style":Ut(n,u,b);break;case"data":if(i!=="object"){It(n,"data",u);break}case"src":case"href":if(u===""&&(i!=="a"||s!=="href")){n.removeAttribute(s);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(s);break}u=Bi(""+u),n.setAttribute(s,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(s==="formAction"?(i!=="input"&&$t(n,i,"name",p.name,p,null),$t(n,i,"formEncType",p.formEncType,p,null),$t(n,i,"formMethod",p.formMethod,p,null),$t(n,i,"formTarget",p.formTarget,p,null)):($t(n,i,"encType",p.encType,p,null),$t(n,i,"method",p.method,p,null),$t(n,i,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(s);break}u=Bi(""+u),n.setAttribute(s,u);break;case"onClick":u!=null&&(n.onclick=Se);break;case"onScroll":u!=null&&mt("scroll",n);break;case"onScrollEnd":u!=null&&mt("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(s=u.__html,s!=null){if(p.children!=null)throw Error(a(60));n.innerHTML=s}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}s=Bi(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(s,""+u):n.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(s,""):n.removeAttribute(s);break;case"capture":case"download":u===!0?n.setAttribute(s,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(s,u):n.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(s,u):n.removeAttribute(s);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(s):n.setAttribute(s,u);break;case"popover":mt("beforetoggle",n),mt("toggle",n),Xe(n,"popover",u);break;case"xlinkActuate":dn(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":dn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":dn(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":dn(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":dn(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":dn(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":dn(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":dn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":dn(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Xe(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=ui.get(s)||s,Xe(n,s,u))}}function Pf(n,i,s,u,p,b){switch(s){case"style":Ut(n,u,b);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(s=u.__html,s!=null){if(p.children!=null)throw Error(a(60));n.innerHTML=s}}break;case"children":typeof u=="string"?Ze(n,u):(typeof u=="number"||typeof u=="bigint")&&Ze(n,""+u);break;case"onScroll":u!=null&&mt("scroll",n);break;case"onScrollEnd":u!=null&&mt("scrollend",n);break;case"onClick":u!=null&&(n.onclick=Se);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Un.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(p=s.endsWith("Capture"),i=s.slice(2,p?s.length-7:void 0),b=n[Ce]||null,b=b!=null?b[s]:null,typeof b=="function"&&n.removeEventListener(i,b,p),typeof u=="function")){typeof b!="function"&&b!==null&&(s in n?n[s]=null:n.hasAttribute(s)&&n.removeAttribute(s)),n.addEventListener(i,u,p);break e}s in n?n[s]=u:u===!0?n.setAttribute(s,""):Xe(n,s,u)}}}function Ln(n,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":mt("error",n),mt("load",n);var u=!1,p=!1,b;for(b in s)if(s.hasOwnProperty(b)){var k=s[b];if(k!=null)switch(b){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:$t(n,i,b,k,s,null)}}p&&$t(n,i,"srcSet",s.srcSet,s,null),u&&$t(n,i,"src",s.src,s,null);return;case"input":mt("invalid",n);var T=b=k=p=null,I=null,Z=null;for(u in s)if(s.hasOwnProperty(u)){var oe=s[u];if(oe!=null)switch(u){case"name":p=oe;break;case"type":k=oe;break;case"checked":I=oe;break;case"defaultChecked":Z=oe;break;case"value":b=oe;break;case"defaultValue":T=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(a(137,i));break;default:$t(n,i,u,oe,s,null)}}_a(n,b,T,I,Z,k,p,!1);return;case"select":mt("invalid",n),u=k=b=null;for(p in s)if(s.hasOwnProperty(p)&&(T=s[p],T!=null))switch(p){case"value":b=T;break;case"defaultValue":k=T;break;case"multiple":u=T;default:$t(n,i,p,T,s,null)}i=b,s=k,n.multiple=!!u,i!=null?On(n,!!u,i,!1):s!=null&&On(n,!!u,s,!0);return;case"textarea":mt("invalid",n),b=p=u=null;for(k in s)if(s.hasOwnProperty(k)&&(T=s[k],T!=null))switch(k){case"value":u=T;break;case"defaultValue":p=T;break;case"children":b=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(a(91));break;default:$t(n,i,k,T,s,null)}is(n,u,p,b);return;case"option":for(I in s)if(s.hasOwnProperty(I)&&(u=s[I],u!=null))switch(I){case"selected":n.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:$t(n,i,I,u,s,null)}return;case"dialog":mt("beforetoggle",n),mt("toggle",n),mt("cancel",n),mt("close",n);break;case"iframe":case"object":mt("load",n);break;case"video":case"audio":for(u=0;u<Ll.length;u++)mt(Ll[u],n);break;case"image":mt("error",n),mt("load",n);break;case"details":mt("toggle",n);break;case"embed":case"source":case"link":mt("error",n),mt("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Z in s)if(s.hasOwnProperty(Z)&&(u=s[Z],u!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:$t(n,i,Z,u,s,null)}return;default:if(Ii(i)){for(oe in s)s.hasOwnProperty(oe)&&(u=s[oe],u!==void 0&&Pf(n,i,oe,u,s,void 0));return}}for(T in s)s.hasOwnProperty(T)&&(u=s[T],u!=null&&$t(n,i,T,u,s,null))}function N_(n,i,s,u){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,b=null,k=null,T=null,I=null,Z=null,oe=null;for(re in s){var he=s[re];if(s.hasOwnProperty(re)&&he!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":I=he;default:u.hasOwnProperty(re)||$t(n,i,re,null,u,he)}}for(var J in u){var re=u[J];if(he=s[J],u.hasOwnProperty(J)&&(re!=null||he!=null))switch(J){case"type":b=re;break;case"name":p=re;break;case"checked":Z=re;break;case"defaultChecked":oe=re;break;case"value":k=re;break;case"defaultValue":T=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(a(137,i));break;default:re!==he&&$t(n,i,J,re,u,he)}}tl(n,k,T,I,Z,oe,b,p);return;case"select":re=k=T=J=null;for(b in s)if(I=s[b],s.hasOwnProperty(b)&&I!=null)switch(b){case"value":break;case"multiple":re=I;default:u.hasOwnProperty(b)||$t(n,i,b,null,u,I)}for(p in u)if(b=u[p],I=s[p],u.hasOwnProperty(p)&&(b!=null||I!=null))switch(p){case"value":J=b;break;case"defaultValue":T=b;break;case"multiple":k=b;default:b!==I&&$t(n,i,p,b,u,I)}i=T,s=k,u=re,J!=null?On(n,!!s,J,!1):!!u!=!!s&&(i!=null?On(n,!!s,i,!0):On(n,!!s,s?[]:"",!1));return;case"textarea":re=J=null;for(T in s)if(p=s[T],s.hasOwnProperty(T)&&p!=null&&!u.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:$t(n,i,T,null,u,p)}for(k in u)if(p=u[k],b=s[k],u.hasOwnProperty(k)&&(p!=null||b!=null))switch(k){case"value":J=p;break;case"defaultValue":re=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==b&&$t(n,i,k,p,u,b)}Uo(n,J,re);return;case"option":for(var je in s)if(J=s[je],s.hasOwnProperty(je)&&J!=null&&!u.hasOwnProperty(je))switch(je){case"selected":n.selected=!1;break;default:$t(n,i,je,null,u,J)}for(I in u)if(J=u[I],re=s[I],u.hasOwnProperty(I)&&J!==re&&(J!=null||re!=null))switch(I){case"selected":n.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:$t(n,i,I,J,u,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 Ye in s)J=s[Ye],s.hasOwnProperty(Ye)&&J!=null&&!u.hasOwnProperty(Ye)&&$t(n,i,Ye,null,u,J);for(Z in u)if(J=u[Z],re=s[Z],u.hasOwnProperty(Z)&&J!==re&&(J!=null||re!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(a(137,i));break;default:$t(n,i,Z,J,u,re)}return;default:if(Ii(i)){for(var Gt in s)J=s[Gt],s.hasOwnProperty(Gt)&&J!==void 0&&!u.hasOwnProperty(Gt)&&Pf(n,i,Gt,void 0,u,J);for(oe in u)J=u[oe],re=s[oe],!u.hasOwnProperty(oe)||J===re||J===void 0&&re===void 0||Pf(n,i,oe,J,u,re);return}}for(var K in s)J=s[K],s.hasOwnProperty(K)&&J!=null&&!u.hasOwnProperty(K)&&$t(n,i,K,null,u,J);for(he in u)J=u[he],re=s[he],!u.hasOwnProperty(he)||J===re||J==null&&re==null||$t(n,i,he,J,u,re)}function gb(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function S_(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,s=performance.getEntriesByType("resource"),u=0;u<s.length;u++){var p=s[u],b=p.transferSize,k=p.initiatorType,T=p.duration;if(b&&T&&gb(k)){for(k=0,T=p.responseEnd,u+=1;u<s.length;u++){var I=s[u],Z=I.startTime;if(Z>T)break;var oe=I.transferSize,he=I.initiatorType;oe&&gb(he)&&(I=I.responseEnd,k+=oe*(I<T?1:(T-Z)/(I-Z)))}if(--u,i+=8*(b+k)/(p.duration/1e3),n++,10<n)break}}if(0<n)return i/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Ff=null,Hf=null;function Lc(n){return n.nodeType===9?n:n.ownerDocument}function bb(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function xb(n,i){if(n===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&i==="foreignObject"?0:n}function qf(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var $f=null;function z_(){var n=window.event;return n&&n.type==="popstate"?n===$f?!1:($f=n,!0):($f=null,!1)}var yb=typeof setTimeout=="function"?setTimeout:void 0,C_=typeof clearTimeout=="function"?clearTimeout:void 0,vb=typeof Promise=="function"?Promise:void 0,T_=typeof queueMicrotask=="function"?queueMicrotask:typeof vb<"u"?function(n){return vb.resolve(null).then(n).catch(A_)}:yb;function A_(n){setTimeout(function(){throw n})}function na(n){return n==="head"}function kb(n,i){var s=i,u=0;do{var p=s.nextSibling;if(n.removeChild(s),p&&p.nodeType===8)if(s=p.data,s==="/$"||s==="/&"){if(u===0){n.removeChild(p),Ms(i);return}u--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")u++;else if(s==="html")Bl(n.ownerDocument.documentElement);else if(s==="head"){s=n.ownerDocument.head,Bl(s);for(var b=s.firstChild;b;){var k=b.nextSibling,T=b.nodeName;b[lt]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&b.rel.toLowerCase()==="stylesheet"||s.removeChild(b),b=k}}else s==="body"&&Bl(n.ownerDocument.body);s=p}while(s);Ms(i)}function wb(n,i){var s=n;n=0;do{var u=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),u&&u.nodeType===8)if(s=u.data,s==="/$"){if(n===0)break;n--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||n++;s=u}while(s)}function Gf(n){var i=n.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":Gf(s),Bt(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}n.removeChild(s)}}function R_(n,i,s,u){for(;n.nodeType===1;){var p=s;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[lt])switch(i){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(b=n.getAttribute("rel"),b==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(b!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(b=n.getAttribute("src"),(b!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&b&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(i==="input"&&n.type==="hidden"){var b=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===b)return n}else return n;if(n=zr(n.nextSibling),n===null)break}return null}function O_(n,i,s){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=zr(n.nextSibling),n===null))return null;return n}function Eb(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=zr(n.nextSibling),n===null))return null;return n}function Kf(n){return n.data==="$?"||n.data==="$~"}function Vf(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function M_(n,i){var s=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||s.readyState!=="loading")i();else{var u=function(){i(),s.removeEventListener("DOMContentLoaded",u)};s.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function zr(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return n}var Yf=null;function _b(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"||s==="/&"){if(i===0)return zr(n.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}n=n.nextSibling}return null}function Nb(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return n;i--}else s!=="/$"&&s!=="/&"||i++}n=n.previousSibling}return null}function Sb(n,i,s){switch(i=Lc(s),n){case"html":if(n=i.documentElement,!n)throw Error(a(452));return n;case"head":if(n=i.head,!n)throw Error(a(453));return n;case"body":if(n=i.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function Bl(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);Bt(n)}var Cr=new Map,zb=new Set;function Ic(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Si=Y.d;Y.d={f:j_,r:D_,D:L_,C:I_,L:B_,m:U_,X:F_,S:P_,M:H_};function j_(){var n=Si.f(),i=Cc();return n||i}function D_(n){var i=Jt(n);i!==null&&i.tag===5&&i.type==="form"?$0(i):Si.r(n)}var As=typeof document>"u"?null:document;function Cb(n,i,s){var u=As;if(u&&typeof i=="string"&&i){var p=Xn(i);p='link[rel="'+n+'"][href="'+p+'"]',typeof s=="string"&&(p+='[crossorigin="'+s+'"]'),zb.has(p)||(zb.add(p),n={rel:n,crossOrigin:s,href:i},u.querySelector(p)===null&&(i=u.createElement("link"),Ln(i,"link",n),Ht(i),u.head.appendChild(i)))}}function L_(n){Si.D(n),Cb("dns-prefetch",n,null)}function I_(n,i){Si.C(n,i),Cb("preconnect",n,i)}function B_(n,i,s){Si.L(n,i,s);var u=As;if(u&&n&&i){var p='link[rel="preload"][as="'+Xn(i)+'"]';i==="image"&&s&&s.imageSrcSet?(p+='[imagesrcset="'+Xn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(p+='[imagesizes="'+Xn(s.imageSizes)+'"]')):p+='[href="'+Xn(n)+'"]';var b=p;switch(i){case"style":b=Rs(n);break;case"script":b=Os(n)}Cr.has(b)||(n=x({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:n,as:i},s),Cr.set(b,n),u.querySelector(p)!==null||i==="style"&&u.querySelector(Ul(b))||i==="script"&&u.querySelector(Pl(b))||(i=u.createElement("link"),Ln(i,"link",n),Ht(i),u.head.appendChild(i)))}}function U_(n,i){Si.m(n,i);var s=As;if(s&&n){var u=i&&typeof i.as=="string"?i.as:"script",p='link[rel="modulepreload"][as="'+Xn(u)+'"][href="'+Xn(n)+'"]',b=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Os(n)}if(!Cr.has(b)&&(n=x({rel:"modulepreload",href:n},i),Cr.set(b,n),s.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Pl(b)))return}u=s.createElement("link"),Ln(u,"link",n),Ht(u),s.head.appendChild(u)}}}function P_(n,i,s){Si.S(n,i,s);var u=As;if(u&&n){var p=un(u).hoistableStyles,b=Rs(n);i=i||"default";var k=p.get(b);if(!k){var T={loading:0,preload:null};if(k=u.querySelector(Ul(b)))T.loading=5;else{n=x({rel:"stylesheet",href:n,"data-precedence":i},s),(s=Cr.get(b))&&Qf(n,s);var I=k=u.createElement("link");Ht(I),Ln(I,"link",n),I._p=new Promise(function(Z,oe){I.onload=Z,I.onerror=oe}),I.addEventListener("load",function(){T.loading|=1}),I.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Bc(k,i,u)}k={type:"stylesheet",instance:k,count:1,state:T},p.set(b,k)}}}function F_(n,i){Si.X(n,i);var s=As;if(s&&n){var u=un(s).hoistableScripts,p=Os(n),b=u.get(p);b||(b=s.querySelector(Pl(p)),b||(n=x({src:n,async:!0},i),(i=Cr.get(p))&&Xf(n,i),b=s.createElement("script"),Ht(b),Ln(b,"link",n),s.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(p,b))}}function H_(n,i){Si.M(n,i);var s=As;if(s&&n){var u=un(s).hoistableScripts,p=Os(n),b=u.get(p);b||(b=s.querySelector(Pl(p)),b||(n=x({src:n,async:!0,type:"module"},i),(i=Cr.get(p))&&Xf(n,i),b=s.createElement("script"),Ht(b),Ln(b,"link",n),s.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(p,b))}}function Tb(n,i,s,u){var p=(p=ye.current)?Ic(p):null;if(!p)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=Rs(s.href),s=un(p).hoistableStyles,u=s.get(i),u||(u={type:"style",instance:null,count:0,state:null},s.set(i,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){n=Rs(s.href);var b=un(p).hoistableStyles,k=b.get(n);if(k||(p=p.ownerDocument||p,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(n,k),(b=p.querySelector(Ul(n)))&&!b._p&&(k.instance=b,k.state.loading=5),Cr.has(n)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Cr.set(n,s),b||q_(p,n,s,k.state))),i&&u===null)throw Error(a(528,""));return k}if(i&&u!==null)throw Error(a(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Os(s),s=un(p).hoistableScripts,u=s.get(i),u||(u={type:"script",instance:null,count:0,state:null},s.set(i,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Rs(n){return'href="'+Xn(n)+'"'}function Ul(n){return'link[rel="stylesheet"]['+n+"]"}function Ab(n){return x({},n,{"data-precedence":n.precedence,precedence:null})}function q_(n,i,s,u){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?u.loading=1:(i=n.createElement("link"),u.preload=i,i.addEventListener("load",function(){return u.loading|=1}),i.addEventListener("error",function(){return u.loading|=2}),Ln(i,"link",s),Ht(i),n.head.appendChild(i))}function Os(n){return'[src="'+Xn(n)+'"]'}function Pl(n){return"script[async]"+n}function Rb(n,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var u=n.querySelector('style[data-href~="'+Xn(s.href)+'"]');if(u)return i.instance=u,Ht(u),u;var p=x({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),Ht(u),Ln(u,"style",p),Bc(u,s.precedence,n),i.instance=u;case"stylesheet":p=Rs(s.href);var b=n.querySelector(Ul(p));if(b)return i.state.loading|=4,i.instance=b,Ht(b),b;u=Ab(s),(p=Cr.get(p))&&Qf(u,p),b=(n.ownerDocument||n).createElement("link"),Ht(b);var k=b;return k._p=new Promise(function(T,I){k.onload=T,k.onerror=I}),Ln(b,"link",u),i.state.loading|=4,Bc(b,s.precedence,n),i.instance=b;case"script":return b=Os(s.src),(p=n.querySelector(Pl(b)))?(i.instance=p,Ht(p),p):(u=s,(p=Cr.get(b))&&(u=x({},s),Xf(u,p)),n=n.ownerDocument||n,p=n.createElement("script"),Ht(p),Ln(p,"link",u),n.head.appendChild(p),i.instance=p);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(u=i.instance,i.state.loading|=4,Bc(u,s.precedence,n));return i.instance}function Bc(n,i,s){for(var u=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,b=p,k=0;k<u.length;k++){var T=u[k];if(T.dataset.precedence===i)b=T;else if(b!==p)break}b?b.parentNode.insertBefore(n,b.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(n,i.firstChild))}function Qf(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.title==null&&(n.title=i.title)}function Xf(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.integrity==null&&(n.integrity=i.integrity)}var Uc=null;function Ob(n,i,s){if(Uc===null){var u=new Map,p=Uc=new Map;p.set(s,u)}else p=Uc,u=p.get(s),u||(u=new Map,p.set(s,u));if(u.has(n))return u;for(u.set(n,null),s=s.getElementsByTagName(n),p=0;p<s.length;p++){var b=s[p];if(!(b[lt]||b[_e]||n==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var k=b.getAttribute(i)||"";k=n+k;var T=u.get(k);T?T.push(b):u.set(k,[b])}}return u}function Mb(n,i,s){n=n.ownerDocument||n,n.head.insertBefore(s,i==="title"?n.querySelector("head > title"):null)}function $_(n,i,s){if(s===1||i.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return n=i.disabled,typeof i.precedence=="string"&&n==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function jb(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function G_(n,i,s,u){if(s.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var p=Rs(u.href),b=i.querySelector(Ul(p));if(b){i=b._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=Pc.bind(n),i.then(n,n)),s.state.loading|=4,s.instance=b,Ht(b);return}b=i.ownerDocument||i,u=Ab(u),(p=Cr.get(p))&&Qf(u,p),b=b.createElement("link"),Ht(b);var k=b;k._p=new Promise(function(T,I){k.onload=T,k.onerror=I}),Ln(b,"link",u),s.instance=b}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(n.count++,s=Pc.bind(n),i.addEventListener("load",s),i.addEventListener("error",s))}}var Zf=0;function K_(n,i){return n.stylesheets&&n.count===0&&Hc(n,n.stylesheets),0<n.count||0<n.imgCount?function(s){var u=setTimeout(function(){if(n.stylesheets&&Hc(n,n.stylesheets),n.unsuspend){var b=n.unsuspend;n.unsuspend=null,b()}},6e4+i);0<n.imgBytes&&Zf===0&&(Zf=62500*S_());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Hc(n,n.stylesheets),n.unsuspend)){var b=n.unsuspend;n.unsuspend=null,b()}},(n.imgBytes>Zf?50:800)+i);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Pc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Hc(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Fc=null;function Hc(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Fc=new Map,i.forEach(V_,n),Fc=null,Pc.call(n))}function V_(n,i){if(!(i.state.loading&4)){var s=Fc.get(n);if(s)var u=s.get(null);else{s=new Map,Fc.set(n,s);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<p.length;b++){var k=p[b];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(s.set(k.dataset.precedence,k),u=k)}u&&s.set(null,u)}p=i.instance,k=p.getAttribute("data-precedence"),b=s.get(k)||u,b===u&&s.set(null,p),s.set(k,p),this.count++,u=Pc.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),b?b.parentNode.insertBefore(p,b.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),i.state.loading|=4}}var Fl={$$typeof:z,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function Y_(n,i,s,u,p,b,k,T,I){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Lt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lt(0),this.hiddenUpdates=Lt(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=b,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function Db(n,i,s,u,p,b,k,T,I,Z,oe,he){return n=new Y_(n,i,s,k,I,Z,oe,he,T),i=1,b===!0&&(i|=24),b=or(3,null,null,i),n.current=b,b.stateNode=n,i=Td(),i.refCount++,n.pooledCache=i,i.refCount++,b.memoizedState={element:u,isDehydrated:s,cache:i},Md(b),n}function Lb(n){return n?(n=cs,n):cs}function Ib(n,i,s,u,p,b){p=Lb(p),u.context===null?u.context=p:u.pendingContext=p,u=Gi(i),u.payload={element:s},b=b===void 0?null:b,b!==null&&(u.callback=b),s=Ki(n,u,i),s!==null&&(nr(s,n,i),yl(s,n,i))}function Bb(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<i?s:i}}function Wf(n,i){Bb(n,i),(n=n.alternate)&&Bb(n,i)}function Ub(n){if(n.tag===13||n.tag===31){var i=Ca(n,67108864);i!==null&&nr(i,n,67108864),Wf(n,67108864)}}function Pb(n){if(n.tag===13||n.tag===31){var i=hr();i=H(i);var s=Ca(n,i);s!==null&&nr(s,n,i),Wf(n,i)}}var qc=!0;function Q_(n,i,s,u){var p=M.T;M.T=null;var b=Y.p;try{Y.p=2,Jf(n,i,s,u)}finally{Y.p=b,M.T=p}}function X_(n,i,s,u){var p=M.T;M.T=null;var b=Y.p;try{Y.p=8,Jf(n,i,s,u)}finally{Y.p=b,M.T=p}}function Jf(n,i,s,u){if(qc){var p=eh(u);if(p===null)Uf(n,i,u,$c,s),Hb(n,u);else if(W_(p,n,i,s,u))u.stopPropagation();else if(Hb(n,u),i&4&&-1<Z_.indexOf(n)){for(;p!==null;){var b=Jt(p);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var k=Tn(b.pendingLanes);if(k!==0){var T=b;for(T.pendingLanes|=2,T.entangledLanes|=2;k;){var I=1<<31-At(k);T.entanglements[1]|=I,k&=~I}Wr(b),(jt&6)===0&&(Sc=Wt()+500,Dl(0))}}break;case 31:case 13:T=Ca(b,2),T!==null&&nr(T,b,2),Cc(),Wf(b,2)}if(b=eh(u),b===null&&Uf(n,i,u,$c,s),b===p)break;p=b}p!==null&&u.stopPropagation()}else Uf(n,i,u,null,s)}}function eh(n){return n=nt(n),th(n)}var $c=null;function th(n){if($c=null,n=Nt(n),n!==null){var i=o(n);if(i===null)n=null;else{var s=i.tag;if(s===13){if(n=c(i),n!==null)return n;n=null}else if(s===31){if(n=f(i),n!==null)return n;n=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}return $c=n,null}function Fb(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Qn()){case ae:return 2;case Ee:return 8;case $e:case We:return 32;case rt:return 268435456;default:return 32}default:return 32}}var nh=!1,ra=null,ia=null,aa=null,Hl=new Map,ql=new Map,sa=[],Z_="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 Hb(n,i){switch(n){case"focusin":case"focusout":ra=null;break;case"dragenter":case"dragleave":ia=null;break;case"mouseover":case"mouseout":aa=null;break;case"pointerover":case"pointerout":Hl.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":ql.delete(i.pointerId)}}function $l(n,i,s,u,p,b){return n===null||n.nativeEvent!==b?(n={blockedOn:i,domEventName:s,eventSystemFlags:u,nativeEvent:b,targetContainers:[p]},i!==null&&(i=Jt(i),i!==null&&Ub(i)),n):(n.eventSystemFlags|=u,i=n.targetContainers,p!==null&&i.indexOf(p)===-1&&i.push(p),n)}function W_(n,i,s,u,p){switch(i){case"focusin":return ra=$l(ra,n,i,s,u,p),!0;case"dragenter":return ia=$l(ia,n,i,s,u,p),!0;case"mouseover":return aa=$l(aa,n,i,s,u,p),!0;case"pointerover":var b=p.pointerId;return Hl.set(b,$l(Hl.get(b)||null,n,i,s,u,p)),!0;case"gotpointercapture":return b=p.pointerId,ql.set(b,$l(ql.get(b)||null,n,i,s,u,p)),!0}return!1}function qb(n){var i=Nt(n.target);if(i!==null){var s=o(i);if(s!==null){if(i=s.tag,i===13){if(i=c(s),i!==null){n.blockedOn=i,ve(n.priority,function(){Pb(s)});return}}else if(i===31){if(i=f(s),i!==null){n.blockedOn=i,ve(n.priority,function(){Pb(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Gc(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var s=eh(n.nativeEvent);if(s===null){s=n.nativeEvent;var u=new s.constructor(s.type,s);Pe=u,s.target.dispatchEvent(u),Pe=null}else return i=Jt(s),i!==null&&Ub(i),n.blockedOn=s,!1;i.shift()}return!0}function $b(n,i,s){Gc(n)&&s.delete(i)}function J_(){nh=!1,ra!==null&&Gc(ra)&&(ra=null),ia!==null&&Gc(ia)&&(ia=null),aa!==null&&Gc(aa)&&(aa=null),Hl.forEach($b),ql.forEach($b)}function Kc(n,i){n.blockedOn===i&&(n.blockedOn=null,nh||(nh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,J_)))}var Vc=null;function Gb(n){Vc!==n&&(Vc=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Vc===n&&(Vc=null);for(var i=0;i<n.length;i+=3){var s=n[i],u=n[i+1],p=n[i+2];if(typeof u!="function"){if(th(u||s)===null)continue;break}var b=Jt(s);b!==null&&(n.splice(i,3),i-=3,Jd(b,{pending:!0,data:p,method:s.method,action:u},u,p))}}))}function Ms(n){function i(I){return Kc(I,n)}ra!==null&&Kc(ra,n),ia!==null&&Kc(ia,n),aa!==null&&Kc(aa,n),Hl.forEach(i),ql.forEach(i);for(var s=0;s<sa.length;s++){var u=sa[s];u.blockedOn===n&&(u.blockedOn=null)}for(;0<sa.length&&(s=sa[0],s.blockedOn===null);)qb(s),s.blockedOn===null&&sa.shift();if(s=(n.ownerDocument||n).$$reactFormReplay,s!=null)for(u=0;u<s.length;u+=3){var p=s[u],b=s[u+1],k=p[Ce]||null;if(typeof b=="function")k||Gb(s);else if(k){var T=null;if(b&&b.hasAttribute("formAction")){if(p=b,k=b[Ce]||null)T=k.formAction;else if(th(p)!==null)continue}else T=k.action;typeof T=="function"?s[u+1]=T:(s.splice(u,3),u-=3),Gb(s)}}}function Kb(){function n(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(k){return p=k})},focusReset:"manual",scroll:"manual"})}function i(){p!==null&&(p(),p=null),u||setTimeout(s,20)}function s(){if(!u&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),p!==null&&(p(),p=null)}}}function rh(n){this._internalRoot=n}Yc.prototype.render=rh.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,u=hr();Ib(s,u,n,i,null,null)},Yc.prototype.unmount=rh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;Ib(n.current,2,null,n,null,null),Cc(),i[Ae]=null}};function Yc(n){this._internalRoot=n}Yc.prototype.unstable_scheduleHydration=function(n){if(n){var i=me();n={blockedOn:null,target:n,priority:i};for(var s=0;s<sa.length&&i!==0&&i<sa[s].priority;s++);sa.splice(s,0,n),s===0&&qb(n)}};var Vb=t.version;if(Vb!=="19.2.4")throw Error(a(527,Vb,"19.2.4"));Y.findDOMNode=function(n){var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=m(i),n=n!==null?g(n):null,n=n===null?null:n.stateNode,n};var eN={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qc.isDisabled&&Qc.supportsFiber)try{cn=Qc.inject(eN),rn=Qc}catch{}}return Kl.createRoot=function(n,i){if(!l(n))throw Error(a(299));var s=!1,u="",p=eg,b=tg,k=ng;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(p=i.onUncaughtError),i.onCaughtError!==void 0&&(b=i.onCaughtError),i.onRecoverableError!==void 0&&(k=i.onRecoverableError)),i=Db(n,1,!1,null,null,s,u,null,p,b,k,Kb),n[Ae]=i.current,Bf(n),new rh(i)},Kl.hydrateRoot=function(n,i,s){if(!l(n))throw Error(a(299));var u=!1,p="",b=eg,k=tg,T=ng,I=null;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(b=s.onUncaughtError),s.onCaughtError!==void 0&&(k=s.onCaughtError),s.onRecoverableError!==void 0&&(T=s.onRecoverableError),s.formState!==void 0&&(I=s.formState)),i=Db(n,1,!0,i,s??null,u,p,I,b,k,T,Kb),i.context=Lb(null),s=i.current,u=hr(),u=H(u),p=Gi(u),p.callback=null,Ki(s,p,u),s=u,i.current.lanes=s,Rt(i,s),Wr(i),n[Ae]=i.current,Bf(n),new Yc(i)},Kl.version="19.2.4",Kl}var rx;function fN(){if(rx)return sh.exports;rx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),sh.exports=dN(),sh.exports}var hN=fN();/**
|
|
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 zv=e=>{throw TypeError(e)},mN=(e,t,r)=>t.has(e)||zv("Cannot "+r),uh=(e,t,r)=>(mN(e,t,"read from private field"),r?r.call(e):t.get(e)),pN=(e,t,r)=>t.has(e)?zv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ix="popstate";function ax(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function gN(e={}){function t(a,l){let o=l.state?.masked,{pathname:c,search:f,hash:h}=o||a.location;return mo("",{pathname:c,search:f,hash:h},l.state&&l.state.usr||null,l.state&&l.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,l){return typeof l=="string"?l:ti(l)}return xN(t,r,null,e)}function dt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function wn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function bN(){return Math.random().toString(36).substring(2,10)}function sx(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function mo(e,t,r=null,a,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Mi(t):t,state:r,key:t&&t.key||a||bN(),unstable_mask:l}}function ti({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Mi(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function xN(e,t,r,a={}){let{window:l=document.defaultView,v5Compat:o=!1}=a,c=l.history,f="POP",h=null,m=g();m==null&&(m=0,c.replaceState({...c.state,idx:m},""));function g(){return(c.state||{idx:null}).idx}function x(){f="POP";let N=g(),S=N==null?null:N-m;m=N,h&&h({action:f,location:_.location,delta:S})}function y(N,S){f="PUSH";let O=ax(N)?N:mo(_.location,N,S);m=g()+1;let z=sx(O,m),F=_.createHref(O.unstable_mask||O);try{c.pushState(z,"",F)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;l.location.assign(F)}o&&h&&h({action:f,location:_.location,delta:1})}function v(N,S){f="REPLACE";let O=ax(N)?N:mo(_.location,N,S);m=g();let z=sx(O,m),F=_.createHref(O.unstable_mask||O);c.replaceState(z,"",F),o&&h&&h({action:f,location:_.location,delta:0})}function w(N){return Cv(N)}let _={get action(){return f},get location(){return e(l,c)},listen(N){if(h)throw new Error("A history only accepts one active listener");return l.addEventListener(ix,x),h=N,()=>{l.removeEventListener(ix,x),h=null}},createHref(N){return t(l,N)},createURL:w,encodeLocation(N){let S=w(N);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:y,replace:v,go(N){return c.go(N)}};return _}function Cv(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),dt(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:ti(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=r+a),new URL(a,r)}var ro,lx=class{constructor(e){if(pN(this,ro,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(uh(this,ro).has(e))return uh(this,ro).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){uh(this,ro).set(e,t)}};ro=new WeakMap;var yN=new Set(["lazy","caseSensitive","path","id","index","children"]);function vN(e){return yN.has(e)}var kN=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function wN(e){return kN.has(e)}function EN(e){return e.index===!0}function po(e,t,r=[],a={},l=!1){return e.map((o,c)=>{let f=[...r,String(c)],h=typeof o.id=="string"?o.id:f.join("-");if(dt(o.index!==!0||!o.children,"Cannot specify children on an index route"),dt(l||!a[h],`Found a route id collision on id "${h}". Route id's must be globally unique within Data Router usages`),EN(o)){let m={...o,id:h};return a[h]=ox(m,t(m)),m}else{let m={...o,id:h,children:void 0};return a[h]=ox(m,t(m)),o.children&&(m.children=po(o.children,t,f,a,l)),m}})}function ox(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function da(e,t,r="/"){return io(e,t,r,!1)}function io(e,t,r,a){let l=typeof t=="string"?Mi(t):t,o=Mr(l.pathname||"/",r);if(o==null)return null;let c=Tv(e);NN(c);let f=null;for(let h=0;f==null&&h<c.length;++h){let m=LN(o);f=jN(c[h],m,a)}return f}function _N(e,t){let{route:r,pathname:a,params:l}=e;return{id:r.id,pathname:a,params:l,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function Tv(e,t=[],r=[],a="",l=!1){let o=(c,f,h=l,m)=>{let g={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(a)&&h)return;dt(g.relativePath.startsWith(a),`Absolute route path "${g.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(a.length)}let x=Hr([a,g.relativePath]),y=r.concat(g);c.children&&c.children.length>0&&(dt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Tv(c.children,t,y,x,h)),!(c.path==null&&!c.index)&&t.push({path:x,score:ON(x,c.index),routesMeta:y})};return e.forEach((c,f)=>{if(c.path===""||!c.path?.includes("?"))o(c,f);else for(let h of Av(c.path))o(c,f,!0,h)}),t}function Av(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,l=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return l?[o,""]:[o];let c=Av(a.join("/")),f=[];return f.push(...c.map(h=>h===""?o:[o,h].join("/"))),l&&f.push(...c),f.map(h=>e.startsWith("/")&&h===""?"/":h)}function NN(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:MN(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var SN=/^:[\w-]+$/,zN=3,CN=2,TN=1,AN=10,RN=-2,cx=e=>e==="*";function ON(e,t){let r=e.split("/"),a=r.length;return r.some(cx)&&(a+=RN),t&&(a+=CN),r.filter(l=>!cx(l)).reduce((l,o)=>l+(SN.test(o)?zN:o===""?TN:AN),a)}function MN(e,t){return e.length===t.length&&e.slice(0,-1).every((a,l)=>a===t[l])?e[e.length-1]-t[t.length-1]:0}function jN(e,t,r=!1){let{routesMeta:a}=e,l={},o="/",c=[];for(let f=0;f<a.length;++f){let h=a[f],m=f===a.length-1,g=o==="/"?t:t.slice(o.length)||"/",x=zu({path:h.relativePath,caseSensitive:h.caseSensitive,end:m},g),y=h.route;if(!x&&m&&r&&!a[a.length-1].route.index&&(x=zu({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},g)),!x)return null;Object.assign(l,x.params),c.push({params:l,pathname:Hr([o,x.pathname]),pathnameBase:UN(Hr([o,x.pathnameBase])),route:y}),x.pathnameBase!=="/"&&(o=Hr([o,x.pathnameBase]))}return c}function zu(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=DN(e.path,e.caseSensitive,e.end),l=t.match(r);if(!l)return null;let o=l[0],c=o.replace(/(.)\/+$/,"$1"),f=l.slice(1);return{params:a.reduce((m,{paramName:g,isOptional:x},y)=>{if(g==="*"){let w=f[y]||"";c=o.slice(0,o.length-w.length).replace(/(.)\/+$/,"$1")}const v=f[y];return x&&!v?m[g]=void 0:m[g]=(v||"").replace(/%2F/g,"/"),m},{}),pathname:o,pathnameBase:c,pattern:e}}function DN(e,t=!1,r=!0){wn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,h,m,g)=>{if(a.push({paramName:f,isOptional:h!=null}),h){let x=g.charAt(m+c.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),a]}function LN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return wn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Mr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function IN({basename:e,pathname:t}){return t==="/"?e:Hr([e,t])}var Rv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,km=e=>Rv.test(e);function BN(e,t="/"){let{pathname:r,search:a="",hash:l=""}=typeof e=="string"?Mi(e):e,o;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?o=ux(r.substring(1),"/"):o=ux(r,t)):o=t,{pathname:o,search:PN(a),hash:FN(l)}}function ux(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?r.length>1&&r.pop():l!=="."&&r.push(l)}),r.length>1?r.join("/"):"/"}function dh(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ov(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function wm(e){let t=Ov(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function Fu(e,t,r,a=!1){let l;typeof e=="string"?l=Mi(e):(l={...e},dt(!l.pathname||!l.pathname.includes("?"),dh("?","pathname","search",l)),dt(!l.pathname||!l.pathname.includes("#"),dh("#","pathname","hash",l)),dt(!l.search||!l.search.includes("#"),dh("#","search","hash",l)));let o=e===""||l.pathname==="",c=o?"/":l.pathname,f;if(c==null)f=r;else{let x=t.length-1;if(!a&&c.startsWith("..")){let y=c.split("/");for(;y[0]==="..";)y.shift(),x-=1;l.pathname=y.join("/")}f=x>=0?t[x]:"/"}let h=BN(l,f),m=c&&c!=="/"&&c.endsWith("/"),g=(o||c===".")&&r.endsWith("/");return!h.pathname.endsWith("/")&&(m||g)&&(h.pathname+="/"),h}var Hr=e=>e.join("/").replace(/\/\/+/g,"/"),UN=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),PN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,FN=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,No=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function go(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function So(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Mv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function jv(e,t){let r=e;if(typeof r!="string"||!Rv.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,l=!1;if(Mv)try{let o=new URL(window.location.href),c=r.startsWith("//")?new URL(o.protocol+r):new URL(r),f=Mr(c.pathname,t);c.origin===o.origin&&f!=null?r=f+c.search+c.hash:l=!0}catch{wn(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:l,to:r}}var ma=Symbol("Uninstrumented");function HN(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(l=>l({id:t.id,index:t.index,path:t.path,instrument(o){let c=Object.keys(r);for(let f of c)o[f]&&r[f].push(o[f])}}));let a={};if(typeof t.lazy=="function"&&r.lazy.length>0){let l=Fs(r.lazy,t.lazy,()=>{});l&&(a.lazy=l)}if(typeof t.lazy=="object"){let l=t.lazy;["middleware","loader","action"].forEach(o=>{let c=l[o],f=r[`lazy.${o}`];if(typeof c=="function"&&f.length>0){let h=Fs(f,c,()=>{});h&&(a.lazy=Object.assign(a.lazy||{},{[o]:h}))}})}return["loader","action"].forEach(l=>{let o=t[l];if(typeof o=="function"&&r[l].length>0){let c=o[ma]??o,f=Fs(r[l],c,(...h)=>dx(h[0]));f&&(l==="loader"&&c.hydrate===!0&&(f.hydrate=!0),f[ma]=c,a[l]=f)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(a.middleware=t.middleware.map(l=>{let o=l[ma]??l,c=Fs(r.middleware,o,(...f)=>dx(f[0]));return c?(c[ma]=o,c):l})),a}function qN(e,t){let r={navigate:[],fetch:[]};if(t.forEach(a=>a({instrument(l){let o=Object.keys(l);for(let c of o)l[c]&&r[c].push(l[c])}})),r.navigate.length>0){let a=e.navigate[ma]??e.navigate,l=Fs(r.navigate,a,(...o)=>{let[c,f]=o;return{to:typeof c=="number"||typeof c=="string"?c:c?ti(c):".",...fx(e,f??{})}});l&&(l[ma]=a,e.navigate=l)}if(r.fetch.length>0){let a=e.fetch[ma]??e.fetch,l=Fs(r.fetch,a,(...o)=>{let[c,,f,h]=o;return{href:f??".",fetcherKey:c,...fx(e,h??{})}});l&&(l[ma]=a,e.fetch=l)}return e}function Fs(e,t,r){return e.length===0?null:async(...a)=>{let l=await Dv(e,r(...a),()=>t(...a),e.length-1);if(l.type==="error")throw l.value;return l.value}}async function Dv(e,t,r,a){let l=e[a],o;if(l){let c,f=async()=>(c?console.error("You cannot call instrumented handlers more than once"):c=Dv(e,t,r,a-1),o=await c,dt(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await l(f,t)}catch(h){console.error("An instrumentation function threw an error:",h)}c||await f(),await c}else try{o={type:"success",value:await r()}}catch(c){o={type:"error",value:c}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function dx(e){let{request:t,context:r,params:a,unstable_pattern:l}=e;return{request:$N(t),params:{...a},unstable_pattern:l,context:GN(r)}}function fx(e,t){return{currentUrl:ti(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function $N(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function GN(e){if(VN(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var KN=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function VN(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===KN}var Lv=["POST","PUT","PATCH","DELETE"],YN=new Set(Lv),QN=["GET",...Lv],XN=new Set(QN),Iv=new Set([301,302,303,307,308]),ZN=new Set([307,308]),fh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},WN={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Vl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},JN=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Bv="remix-router-transitions",Uv=Symbol("ResetLoaderData");function eS(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";dt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],l=e.mapRouteProperties||JN,o=l;if(e.unstable_instrumentations){let L=e.unstable_instrumentations;o=H=>({...l(H),...HN(L.map(W=>W.route).filter(Boolean),H)})}let c={},f=po(e.routes,o,void 0,c),h,m=e.basename||"/";m.startsWith("/")||(m=`/${m}`);let g=e.dataStrategy||aS,x={...e.future},y=null,v=new Set,w=null,_=null,N=null,S=e.hydrationData!=null,O=da(f,e.history.location,m),z=!1,F=null,$,j;if(O==null&&!e.patchRoutesOnNavigation){let L=Tr(404,{pathname:e.history.location.pathname}),{matches:H,route:W}=Xc(f);$=!0,j=!$,O=H,F={[W.id]:L}}else if(O&&!e.hydrationData&&Lt(O,f,e.history.location.pathname).active&&(O=null),O)if(O.some(L=>L.route.lazy))$=!1,j=!$;else if(!O.some(L=>Em(L.route)))$=!0,j=!$;else{let L=e.hydrationData?e.hydrationData.loaderData:null,H=e.hydrationData?e.hydrationData.errors:null,W=O;if(H){let me=O.findIndex(ve=>H[ve.route.id]!==void 0);W=W.slice(0,me+1)}j=!1,$=W.every(me=>{let ve=Pv(me.route,L,H);return j=j||ve.renderFallback,!ve.shouldLoad})}else{$=!1,j=!$,O=[];let L=Lt(null,f,e.history.location.pathname);L.active&&L.matches&&(z=!0,O=L.matches)}let G,R={historyAction:e.history.action,location:e.history.location,matches:O,initialized:$,renderFallback:j,navigation:fh,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||F,fetchers:new Map,blockers:new Map},ie="POP",P=null,ee=!1,te,we=!1,se=new Map,Q=null,M=!1,Y=!1,V=new Set,fe=new Map,A=0,D=-1,B=new Map,C=new Set,ue=new Map,be=new Map,ye=new Set,le=new Map,xe,pe=null;function Ue(){if(y=e.history.listen(({action:L,location:H,delta:W})=>{if(xe){xe(),xe=void 0;return}wn(le.size===0||W!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let me=Vr({currentLocation:R.location,nextLocation:H,historyAction:L});if(me&&W!=null){let ve=new Promise(Oe=>{xe=Oe});e.history.go(W*-1),Lr(me,{state:"blocked",location:H,proceed(){Lr(me,{state:"proceeding",proceed:void 0,reset:void 0,location:H}),ve.then(()=>e.history.go(W))},reset(){let Oe=new Map(R.blockers);Oe.set(me,Vl),tt({blockers:Oe})}}),P?.resolve(),P=null;return}return En(L,H)}),r){ES(t,se);let L=()=>_S(t,se);t.addEventListener("pagehide",L),Q=()=>t.removeEventListener("pagehide",L)}return R.initialized||En("POP",R.location,{initialHydration:!0}),G}function Re(){y&&y(),Q&&Q(),v.clear(),te&&te.abort(),R.fetchers.forEach((L,H)=>cn(H)),R.blockers.forEach((L,H)=>Kr(H))}function Tt(L){return v.add(L),()=>v.delete(L)}function tt(L,H={}){L.matches&&(L.matches=L.matches.map(ve=>{let Oe=c[ve.route.id],_e=ve.route;return _e.element!==Oe.element||_e.errorElement!==Oe.errorElement||_e.hydrateFallbackElement!==Oe.hydrateFallbackElement?{...ve,route:Oe}:ve})),R={...R,...L};let W=[],me=[];R.fetchers.forEach((ve,Oe)=>{ve.state==="idle"&&(ye.has(Oe)?W.push(Oe):me.push(Oe))}),ye.forEach(ve=>{!R.fetchers.has(ve)&&!fe.has(ve)&&W.push(ve)}),[...v].forEach(ve=>ve(R,{deletedFetchers:W,newErrors:L.errors??null,viewTransitionOpts:H.viewTransitionOpts,flushSync:H.flushSync===!0})),W.forEach(ve=>cn(ve)),me.forEach(ve=>R.fetchers.delete(ve))}function gt(L,H,{flushSync:W}={}){let me=R.actionData!=null&&R.navigation.formMethod!=null&&Fn(R.navigation.formMethod)&&R.navigation.state==="loading"&&L.state?._isRedirect!==!0,ve;H.actionData?Object.keys(H.actionData).length>0?ve=H.actionData:ve=null:me?ve=R.actionData:ve=null;let Oe=H.loaderData?wx(R.loaderData,H.loaderData,H.matches||[],H.errors):R.loaderData,_e=R.blockers;_e.size>0&&(_e=new Map(_e),_e.forEach((qe,Ie)=>_e.set(Ie,Vl)));let Ce=M?!1:Qe(L,H.matches||R.matches),Ae=ee===!0||R.navigation.formMethod!=null&&Fn(R.navigation.formMethod)&&L.state?._isRedirect!==!0;h&&(f=h,h=void 0),M||ie==="POP"||(ie==="PUSH"?e.history.push(L,L.state):ie==="REPLACE"&&e.history.replace(L,L.state));let He;if(ie==="POP"){let qe=se.get(R.location.pathname);qe&&qe.has(L.pathname)?He={currentLocation:R.location,nextLocation:L}:se.has(L.pathname)&&(He={currentLocation:L,nextLocation:R.location})}else if(we){let qe=se.get(R.location.pathname);qe?qe.add(L.pathname):(qe=new Set([L.pathname]),se.set(R.location.pathname,qe)),He={currentLocation:R.location,nextLocation:L}}tt({...H,actionData:ve,loaderData:Oe,historyAction:ie,location:L,initialized:!0,renderFallback:!1,navigation:fh,revalidation:"idle",restoreScrollPosition:Ce,preventScrollReset:Ae,blockers:_e},{viewTransitionOpts:He,flushSync:W===!0}),ie="POP",ee=!1,we=!1,M=!1,Y=!1,P?.resolve(),P=null,pe?.resolve(),pe=null}async function Et(L,H){if(P?.resolve(),P=null,typeof L=="number"){P||(P=Sx());let Bt=P.promise;return e.history.go(L),Bt}let W=Kh(R.location,R.matches,m,L,H?.fromRouteId,H?.relative),{path:me,submission:ve,error:Oe}=hx(!1,W,H),_e;H?.unstable_mask&&(_e={pathname:"",search:"",hash:"",...typeof H.unstable_mask=="string"?Mi(H.unstable_mask):{...R.location.unstable_mask,...H.unstable_mask}});let Ce=R.location,Ae=mo(Ce,me,H&&H.state,void 0,_e);Ae={...Ae,...e.history.encodeLocation(Ae)};let He=H&&H.replace!=null?H.replace:void 0,qe="PUSH";He===!0?qe="REPLACE":He===!1||ve!=null&&Fn(ve.formMethod)&&ve.formAction===R.location.pathname+R.location.search&&(qe="REPLACE");let Ie=H&&"preventScrollReset"in H?H.preventScrollReset===!0:void 0,_t=(H&&H.flushSync)===!0,lt=Vr({currentLocation:Ce,nextLocation:Ae,historyAction:qe});if(lt){Lr(lt,{state:"blocked",location:Ae,proceed(){Lr(lt,{state:"proceeding",proceed:void 0,reset:void 0,location:Ae}),Et(L,H)},reset(){let Bt=new Map(R.blockers);Bt.set(lt,Vl),tt({blockers:Bt})}});return}await En(qe,Ae,{submission:ve,pendingError:Oe,preventScrollReset:Ie,replace:H&&H.replace,enableViewTransition:H&&H.viewTransition,flushSync:_t,callSiteDefaultShouldRevalidate:H&&H.unstable_defaultShouldRevalidate})}function ot(){pe||(pe=Sx()),$e(),tt({revalidation:"loading"});let L=pe.promise;return R.navigation.state==="submitting"?L:R.navigation.state==="idle"?(En(R.historyAction,R.location,{startUninterruptedRevalidation:!0}),L):(En(ie||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:we===!0}),L)}async function En(L,H,W){te&&te.abort(),te=null,ie=L,M=(W&&W.startUninterruptedRevalidation)===!0,ze(R.location,R.matches),ee=(W&&W.preventScrollReset)===!0,we=(W&&W.enableViewTransition)===!0;let me=h||f,ve=W&&W.overrideNavigation,Oe=W?.initialHydration&&R.matches&&R.matches.length>0&&!z?R.matches:da(me,H,m),_e=(W&&W.flushSync)===!0;if(Oe&&R.initialized&&!Y&&hS(R.location,H)&&!(W&&W.submission&&Fn(W.submission.formMethod))){gt(H,{matches:Oe},{flushSync:_e});return}let Ce=Lt(Oe,me,H.pathname);if(Ce.active&&Ce.matches&&(Oe=Ce.matches),!Oe){let{error:Nt,notFoundMatches:Jt,route:ft}=Tn(H.pathname);gt(H,{matches:Jt,loaderData:{},errors:{[ft.id]:Nt}},{flushSync:_e});return}te=new AbortController;let Ae=Is(e.history,H,te.signal,W&&W.submission),He=e.getContext?await e.getContext():new lx,qe;if(W&&W.pendingError)qe=[fa(Oe).route.id,{type:"error",error:W.pendingError}];else if(W&&W.submission&&Fn(W.submission.formMethod)){let Nt=await Yn(Ae,H,W.submission,Oe,He,Ce.active,W&&W.initialHydration===!0,{replace:W.replace,flushSync:_e});if(Nt.shortCircuited)return;if(Nt.pendingActionResult){let[Jt,ft]=Nt.pendingActionResult;if(pr(ft)&&go(ft.error)&&ft.error.status===404){te=null,gt(H,{matches:Nt.matches,loaderData:{},errors:{[Jt]:ft.error}});return}}Oe=Nt.matches||Oe,qe=Nt.pendingActionResult,ve=hh(H,W.submission),_e=!1,Ce.active=!1,Ae=Is(e.history,Ae.url,Ae.signal)}let{shortCircuited:Ie,matches:_t,loaderData:lt,errors:Bt}=await xr(Ae,H,Oe,He,Ce.active,ve,W&&W.submission,W&&W.fetcherSubmission,W&&W.replace,W&&W.initialHydration===!0,_e,qe,W&&W.callSiteDefaultShouldRevalidate);Ie||(te=null,gt(H,{matches:_t||Oe,...Ex(qe),loaderData:lt,errors:Bt}))}async function Yn(L,H,W,me,ve,Oe,_e,Ce={}){$e();let Ae=kS(H,W);if(tt({navigation:Ae},{flushSync:Ce.flushSync===!0}),Oe){let Ie=await Rt(me,H.pathname,L.signal);if(Ie.type==="aborted")return{shortCircuited:!0};if(Ie.type==="error"){if(Ie.partialMatches.length===0){let{matches:lt,route:Bt}=Xc(f);return{matches:lt,pendingActionResult:[Bt.id,{type:"error",error:Ie.error}]}}let _t=fa(Ie.partialMatches).route.id;return{matches:Ie.partialMatches,pendingActionResult:[_t,{type:"error",error:Ie.error}]}}else if(Ie.matches)me=Ie.matches;else{let{notFoundMatches:_t,error:lt,route:Bt}=Tn(H.pathname);return{matches:_t,pendingActionResult:[Bt.id,{type:"error",error:lt}]}}}let He,qe=pu(me,H);if(!qe.route.action&&!qe.route.lazy)He={type:"error",error:Tr(405,{method:L.method,pathname:H.pathname,routeId:qe.route.id})};else{let Ie=Hs(o,c,L,me,qe,_e?[]:a,ve),_t=await ae(L,Ie,ve,null);if(He=_t[qe.route.id],!He){for(let lt of me)if(_t[lt.route.id]){He=_t[lt.route.id];break}}if(L.signal.aborted)return{shortCircuited:!0}}if(qa(He)){let Ie;return Ce&&Ce.replace!=null?Ie=Ce.replace:Ie=yx(He.response.headers.get("Location"),new URL(L.url),m,e.history)===R.location.pathname+R.location.search,await Qn(L,He,!0,{submission:W,replace:Ie}),{shortCircuited:!0}}if(pr(He)){let Ie=fa(me,qe.route.id);return(Ce&&Ce.replace)!==!0&&(ie="PUSH"),{matches:me,pendingActionResult:[Ie.route.id,He,qe.route.id]}}return{matches:me,pendingActionResult:[qe.route.id,He]}}async function xr(L,H,W,me,ve,Oe,_e,Ce,Ae,He,qe,Ie,_t){let lt=Oe||hh(H,_e),Bt=_e||Ce||Nx(lt),Nt=!M&&!He;if(ve){if(Nt){let It=yr(Ie);tt({navigation:lt,...It!==void 0?{actionData:It}:{}},{flushSync:qe})}let Xe=await Rt(W,H.pathname,L.signal);if(Xe.type==="aborted")return{shortCircuited:!0};if(Xe.type==="error"){if(Xe.partialMatches.length===0){let{matches:dn,route:zt}=Xc(f);return{matches:dn,loaderData:{},errors:{[zt.id]:Xe.error}}}let It=fa(Xe.partialMatches).route.id;return{matches:Xe.partialMatches,loaderData:{},errors:{[It]:Xe.error}}}else if(Xe.matches)W=Xe.matches;else{let{error:It,notFoundMatches:dn,route:zt}=Tn(H.pathname);return{matches:dn,loaderData:{},errors:{[zt.id]:It}}}}let Jt=h||f,{dsMatches:ft,revalidatingFetchers:un}=mx(L,me,o,c,e.history,R,W,Bt,H,He?[]:a,He===!0,Y,V,ye,ue,C,Jt,m,e.patchRoutesOnNavigation!=null,Ie,_t);if(D=++A,!e.dataStrategy&&!ft.some(Xe=>Xe.shouldLoad)&&!ft.some(Xe=>Xe.route.middleware&&Xe.route.middleware.length>0)&&un.length===0){let Xe=sr();return gt(H,{matches:W,loaderData:{},errors:Ie&&pr(Ie[1])?{[Ie[0]]:Ie[1].error}:null,...Ex(Ie),...Xe?{fetchers:new Map(R.fetchers)}:{}},{flushSync:qe}),{shortCircuited:!0}}if(Nt){let Xe={};if(!ve){Xe.navigation=lt;let It=yr(Ie);It!==void 0&&(Xe.actionData=It)}un.length>0&&(Xe.fetchers=li(un)),tt(Xe,{flushSync:qe})}un.forEach(Xe=>{Qt(Xe.key),Xe.controller&&fe.set(Xe.key,Xe.controller)});let Ht=()=>un.forEach(Xe=>Qt(Xe.key));te&&te.signal.addEventListener("abort",Ht);let{loaderResults:Yr,fetcherResults:Un}=await Ee(ft,un,L,me);if(L.signal.aborted)return{shortCircuited:!0};te&&te.signal.removeEventListener("abort",Ht),un.forEach(Xe=>fe.delete(Xe.key));let mn=Zc(Yr);if(mn)return await Qn(L,mn.result,!0,{replace:Ae}),{shortCircuited:!0};if(mn=Zc(Un),mn)return C.add(mn.key),await Qn(L,mn.result,!0,{replace:Ae}),{shortCircuited:!0};let{loaderData:ge,errors:Be}=kx(R,W,Yr,Ie,un,Un);He&&R.errors&&(Be={...R.errors,...Be});let Je=sr(),St=Cn(D),Xt=Je||St||un.length>0;return{matches:W,loaderData:ge,errors:Be,...Xt?{fetchers:new Map(R.fetchers)}:{}}}function yr(L){if(L&&!pr(L[1]))return{[L[0]]:L[1].data};if(R.actionData)return Object.keys(R.actionData).length===0?null:R.actionData}function li(L){return L.forEach(H=>{let W=R.fetchers.get(H.key),me=Yl(void 0,W?W.data:void 0);R.fetchers.set(H.key,me)}),new Map(R.fetchers)}async function wa(L,H,W,me){Qt(L);let ve=(me&&me.flushSync)===!0,Oe=h||f,_e=Kh(R.location,R.matches,m,W,H,me?.relative),Ce=da(Oe,_e,m),Ae=Lt(Ce,Oe,_e);if(Ae.active&&Ae.matches&&(Ce=Ae.matches),!Ce){rt(L,H,Tr(404,{pathname:_e}),{flushSync:ve});return}let{path:He,submission:qe,error:Ie}=hx(!0,_e,me);if(Ie){rt(L,H,Ie,{flushSync:ve});return}let _t=e.getContext?await e.getContext():new lx,lt=(me&&me.preventScrollReset)===!0;if(qe&&Fn(qe.formMethod)){await Li(L,H,He,Ce,_t,Ae.active,ve,lt,qe,me&&me.unstable_defaultShouldRevalidate);return}ue.set(L,{routeId:H,path:He}),await Wt(L,H,He,Ce,_t,Ae.active,ve,lt,qe)}async function Li(L,H,W,me,ve,Oe,_e,Ce,Ae,He){$e(),ue.delete(L);let qe=R.fetchers.get(L);We(L,wS(Ae,qe),{flushSync:_e});let Ie=new AbortController,_t=Is(e.history,W,Ie.signal,Ae);if(Oe){let bt=await Rt(me,new URL(_t.url).pathname,_t.signal,L);if(bt.type==="aborted")return;if(bt.type==="error"){rt(L,H,bt.error,{flushSync:_e});return}else if(bt.matches)me=bt.matches;else{rt(L,H,Tr(404,{pathname:W}),{flushSync:_e});return}}let lt=pu(me,W);if(!lt.route.action&&!lt.route.lazy){let bt=Tr(405,{method:Ae.formMethod,pathname:W,routeId:H});rt(L,H,bt,{flushSync:_e});return}fe.set(L,Ie);let Bt=A,Nt=Hs(o,c,_t,me,lt,a,ve),Jt=await ae(_t,Nt,ve,L),ft=Jt[lt.route.id];if(!ft){for(let bt of Nt)if(Jt[bt.route.id]){ft=Jt[bt.route.id];break}}if(_t.signal.aborted){fe.get(L)===Ie&&fe.delete(L);return}if(ye.has(L)){if(qa(ft)||pr(ft)){We(L,Ai(void 0));return}}else{if(qa(ft))if(fe.delete(L),D>Bt){We(L,Ai(void 0));return}else return C.add(L),We(L,Yl(Ae)),Qn(_t,ft,!1,{fetcherSubmission:Ae,preventScrollReset:Ce});if(pr(ft)){rt(L,H,ft.error);return}}let un=R.navigation.location||R.location,Ht=Is(e.history,un,Ie.signal),Yr=h||f,Un=R.navigation.state!=="idle"?da(Yr,R.navigation.location,m):R.matches;dt(Un,"Didn't find any matches after fetcher action");let mn=++A;B.set(L,mn);let ge=Yl(Ae,ft.data);R.fetchers.set(L,ge);let{dsMatches:Be,revalidatingFetchers:Je}=mx(Ht,ve,o,c,e.history,R,Un,Ae,un,a,!1,Y,V,ye,ue,C,Yr,m,e.patchRoutesOnNavigation!=null,[lt.route.id,ft],He);Je.filter(bt=>bt.key!==L).forEach(bt=>{let oi=bt.key,ci=R.fetchers.get(oi),Ea=Yl(void 0,ci?ci.data:void 0);R.fetchers.set(oi,Ea),Qt(oi),bt.controller&&fe.set(oi,bt.controller)}),tt({fetchers:new Map(R.fetchers)});let St=()=>Je.forEach(bt=>Qt(bt.key));Ie.signal.addEventListener("abort",St);let{loaderResults:Xt,fetcherResults:Xe}=await Ee(Be,Je,Ht,ve);if(Ie.signal.aborted)return;if(Ie.signal.removeEventListener("abort",St),B.delete(L),fe.delete(L),Je.forEach(bt=>fe.delete(bt.key)),R.fetchers.has(L)){let bt=Ai(ft.data);R.fetchers.set(L,bt)}let It=Zc(Xt);if(It)return Qn(Ht,It.result,!1,{preventScrollReset:Ce});if(It=Zc(Xe),It)return C.add(It.key),Qn(Ht,It.result,!1,{preventScrollReset:Ce});let{loaderData:dn,errors:zt}=kx(R,Un,Xt,void 0,Je,Xe);Cn(mn),R.navigation.state==="loading"&&mn>D?(dt(ie,"Expected pending action"),te&&te.abort(),gt(R.navigation.location,{matches:Un,loaderData:dn,errors:zt,fetchers:new Map(R.fetchers)})):(tt({errors:zt,loaderData:wx(R.loaderData,dn,Un,zt),fetchers:new Map(R.fetchers)}),Y=!1)}async function Wt(L,H,W,me,ve,Oe,_e,Ce,Ae){let He=R.fetchers.get(L);We(L,Yl(Ae,He?He.data:void 0),{flushSync:_e});let qe=new AbortController,Ie=Is(e.history,W,qe.signal);if(Oe){let ft=await Rt(me,new URL(Ie.url).pathname,Ie.signal,L);if(ft.type==="aborted")return;if(ft.type==="error"){rt(L,H,ft.error,{flushSync:_e});return}else if(ft.matches)me=ft.matches;else{rt(L,H,Tr(404,{pathname:W}),{flushSync:_e});return}}let _t=pu(me,W);fe.set(L,qe);let lt=A,Bt=Hs(o,c,Ie,me,_t,a,ve),Jt=(await ae(Ie,Bt,ve,L))[_t.route.id];if(fe.get(L)===qe&&fe.delete(L),!Ie.signal.aborted){if(ye.has(L)){We(L,Ai(void 0));return}if(qa(Jt))if(D>lt){We(L,Ai(void 0));return}else{C.add(L),await Qn(Ie,Jt,!1,{preventScrollReset:Ce});return}if(pr(Jt)){rt(L,H,Jt.error);return}We(L,Ai(Jt.data))}}async function Qn(L,H,W,{submission:me,fetcherSubmission:ve,preventScrollReset:Oe,replace:_e}={}){W||(P?.resolve(),P=null),H.response.headers.has("X-Remix-Revalidate")&&(Y=!0);let Ce=H.response.headers.get("Location");dt(Ce,"Expected a Location header on the redirect Response"),Ce=yx(Ce,new URL(L.url),m,e.history);let Ae=mo(R.location,Ce,{_isRedirect:!0});if(r){let Bt=!1;if(H.response.headers.has("X-Remix-Reload-Document"))Bt=!0;else if(km(Ce)){const Nt=Cv(Ce,!0);Bt=Nt.origin!==t.location.origin||Mr(Nt.pathname,m)==null}if(Bt){_e?t.location.replace(Ce):t.location.assign(Ce);return}}te=null;let He=_e===!0||H.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:qe,formAction:Ie,formEncType:_t}=R.navigation;!me&&!ve&&qe&&Ie&&_t&&(me=Nx(R.navigation));let lt=me||ve;if(ZN.has(H.response.status)&<&&Fn(lt.formMethod))await En(He,Ae,{submission:{...lt,formAction:Ce},preventScrollReset:Oe||ee,enableViewTransition:W?we:void 0});else{let Bt=hh(Ae,me);await En(He,Ae,{overrideNavigation:Bt,fetcherSubmission:ve,preventScrollReset:Oe||ee,enableViewTransition:W?we:void 0})}}async function ae(L,H,W,me){let ve,Oe={};try{ve=await lS(g,L,H,me,W,!1)}catch(_e){return H.filter(Ce=>Ce.shouldLoad).forEach(Ce=>{Oe[Ce.route.id]={type:"error",error:_e}}),Oe}if(L.signal.aborted)return Oe;if(!Fn(L.method))for(let _e of H){if(ve[_e.route.id]?.type==="error")break;!ve.hasOwnProperty(_e.route.id)&&!R.loaderData.hasOwnProperty(_e.route.id)&&(!R.errors||!R.errors.hasOwnProperty(_e.route.id))&&_e.shouldCallHandler()&&(ve[_e.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${_e.route.id}`)})}for(let[_e,Ce]of Object.entries(ve))if(bS(Ce)){let Ae=Ce.result;Oe[_e]={type:"redirect",response:dS(Ae,L,_e,H,m)}}else Oe[_e]=await uS(Ce);return Oe}async function Ee(L,H,W,me){let ve=ae(W,L,me,null),Oe=Promise.all(H.map(async Ae=>{if(Ae.matches&&Ae.match&&Ae.request&&Ae.controller){let qe=(await ae(Ae.request,Ae.matches,me,Ae.key))[Ae.match.route.id];return{[Ae.key]:qe}}else return Promise.resolve({[Ae.key]:{type:"error",error:Tr(404,{pathname:Ae.path})}})})),_e=await ve,Ce=(await Oe).reduce((Ae,He)=>Object.assign(Ae,He),{});return{loaderResults:_e,fetcherResults:Ce}}function $e(){Y=!0,ue.forEach((L,H)=>{fe.has(H)&&V.add(H),Qt(H)})}function We(L,H,W={}){R.fetchers.set(L,H),tt({fetchers:new Map(R.fetchers)},{flushSync:(W&&W.flushSync)===!0})}function rt(L,H,W,me={}){let ve=fa(R.matches,H);cn(L),tt({errors:{[ve.route.id]:W},fetchers:new Map(R.fetchers)},{flushSync:(me&&me.flushSync)===!0})}function zn(L){return be.set(L,(be.get(L)||0)+1),ye.has(L)&&ye.delete(L),R.fetchers.get(L)||WN}function ar(L,H){Qt(L,H?.reason),We(L,Ai(null))}function cn(L){let H=R.fetchers.get(L);fe.has(L)&&!(H&&H.state==="loading"&&B.has(L))&&Qt(L),ue.delete(L),B.delete(L),C.delete(L),ye.delete(L),V.delete(L),R.fetchers.delete(L)}function rn(L){let H=(be.get(L)||0)-1;H<=0?(be.delete(L),ye.add(L)):be.set(L,H),tt({fetchers:new Map(R.fetchers)})}function Qt(L,H){let W=fe.get(L);W&&(W.abort(H),fe.delete(L))}function At(L){for(let H of L){let W=zn(H),me=Ai(W.data);R.fetchers.set(H,me)}}function sr(){let L=[],H=!1;for(let W of C){let me=R.fetchers.get(W);dt(me,`Expected fetcher: ${W}`),me.state==="loading"&&(C.delete(W),L.push(W),H=!0)}return At(L),H}function Cn(L){let H=[];for(let[W,me]of B)if(me<L){let ve=R.fetchers.get(W);dt(ve,`Expected fetcher: ${W}`),ve.state==="loading"&&(Qt(W),B.delete(W),H.push(W))}return At(H),H.length>0}function ts(L,H){let W=R.blockers.get(L)||Vl;return le.get(L)!==H&&le.set(L,H),W}function Kr(L){R.blockers.delete(L),le.delete(L)}function Lr(L,H){let W=R.blockers.get(L)||Vl;dt(W.state==="unblocked"&&H.state==="blocked"||W.state==="blocked"&&H.state==="blocked"||W.state==="blocked"&&H.state==="proceeding"||W.state==="blocked"&&H.state==="unblocked"||W.state==="proceeding"&&H.state==="unblocked",`Invalid blocker state transition: ${W.state} -> ${H.state}`);let me=new Map(R.blockers);me.set(L,H),tt({blockers:me})}function Vr({currentLocation:L,nextLocation:H,historyAction:W}){if(le.size===0)return;le.size>1&&wn(!1,"A router only supports one blocker at a time");let me=Array.from(le.entries()),[ve,Oe]=me[me.length-1],_e=R.blockers.get(ve);if(!(_e&&_e.state==="proceeding")&&Oe({currentLocation:L,nextLocation:H,historyAction:W}))return ve}function Tn(L){let H=Tr(404,{pathname:L}),W=h||f,{matches:me,route:ve}=Xc(W);return{notFoundMatches:me,route:ve,error:H}}function U(L,H,W){if(w=L,N=H,_=W||null,!S&&R.navigation===fh){S=!0;let me=Qe(R.location,R.matches);me!=null&&tt({restoreScrollPosition:me})}return()=>{w=null,N=null,_=null}}function ce(L,H){return _&&_(L,H.map(me=>_N(me,R.loaderData)))||L.key}function ze(L,H){if(w&&N){let W=ce(L,H);w[W]=N()}}function Qe(L,H){if(w){let W=ce(L,H),me=w[W];if(typeof me=="number")return me}return null}function Lt(L,H,W){if(e.patchRoutesOnNavigation)if(L){if(Object.keys(L[0].params).length>0)return{active:!0,matches:io(H,W,m,!0)}}else return{active:!0,matches:io(H,W,m,!0)||[]};return{active:!1,matches:null}}async function Rt(L,H,W,me){if(!e.patchRoutesOnNavigation)return{type:"success",matches:L};let ve=L;for(;;){let Oe=h==null,_e=h||f,Ce=c;try{await e.patchRoutesOnNavigation({signal:W,path:H,matches:ve,fetcherKey:me,patch:(qe,Ie)=>{W.aborted||px(qe,Ie,_e,Ce,o,!1)}})}catch(qe){return{type:"error",error:qe,partialMatches:ve}}finally{Oe&&!W.aborted&&(f=[...f])}if(W.aborted)return{type:"aborted"};let Ae=da(_e,H,m),He=null;if(Ae){if(Object.keys(Ae[0].params).length===0)return{type:"success",matches:Ae};if(He=io(_e,H,m,!0),!(He&&ve.length<He.length&&Me(ve,He.slice(0,ve.length))))return{type:"success",matches:Ae}}if(He||(He=io(_e,H,m,!0)),!He||Me(ve,He))return{type:"success",matches:null};ve=He}}function Me(L,H){return L.length===H.length&&L.every((W,me)=>W.route.id===H[me].route.id)}function Te(L){c={},h=po(L,o,void 0,c)}function Ve(L,H,W=!1){let me=h==null;px(L,H,h||f,c,o,W),me&&(f=[...f],tt({}))}return G={get basename(){return m},get future(){return x},get state(){return R},get routes(){return f},get window(){return t},initialize:Ue,subscribe:Tt,enableScrollRestoration:U,navigate:Et,fetch:wa,revalidate:ot,createHref:L=>e.history.createHref(L),encodeLocation:L=>e.history.encodeLocation(L),getFetcher:zn,resetFetcher:ar,deleteFetcher:rn,dispose:Re,getBlocker:ts,deleteBlocker:Kr,patchRoutes:Ve,_internalFetchControllers:fe,_internalSetRoutes:Te,_internalSetStateDoNotUseOrYouWillBreakYourApp(L){tt(L)}},e.unstable_instrumentations&&(G=qN(G,e.unstable_instrumentations.map(L=>L.router).filter(Boolean))),G}function tS(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Kh(e,t,r,a,l,o){let c,f;if(l){c=[];for(let m of t)if(c.push(m),m.route.id===l){f=m;break}}else c=t,f=t[t.length-1];let h=Fu(a||".",wm(c),Mr(e.pathname,r)||e.pathname,o==="path");if(a==null&&(h.search=e.search,h.hash=e.hash),(a==null||a===""||a===".")&&f){let m=Nm(h.search);if(f.route.index&&!m)h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index";else if(!f.route.index&&m){let g=new URLSearchParams(h.search),x=g.getAll("index");g.delete("index"),x.filter(v=>v).forEach(v=>g.append("index",v));let y=g.toString();h.search=y?`?${y}`:""}}return r!=="/"&&(h.pathname=IN({basename:r,pathname:h.pathname})),ti(h)}function hx(e,t,r){if(!r||!tS(r))return{path:t};if(r.formMethod&&!vS(r.formMethod))return{path:t,error:Tr(405,{method:r.formMethod})};let a=()=>({path:t,error:Tr(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),c=Kv(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Fn(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,w])=>`${y}${v}=${w}
|
|
59
|
-
`,""):String(r.body);return{path:t,submission:{formMethod:o,formAction:c,formEncType:r.formEncType,formData:void 0,json:void 0,text:x}}}else if(r.formEncType==="application/json"){if(!Fn(o))return a();try{let x=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:c,formEncType:r.formEncType,formData:void 0,json:x,text:void 0}}}catch{return a()}}}dt(typeof FormData=="function","FormData is not available in this environment");let f,h;if(r.formData)f=Yh(r.formData),h=r.formData;else if(r.body instanceof FormData)f=Yh(r.body),h=r.body;else if(r.body instanceof URLSearchParams)f=r.body,h=vx(f);else if(r.body==null)f=new URLSearchParams,h=new FormData;else try{f=new URLSearchParams(r.body),h=vx(f)}catch{return a()}let m={formMethod:o,formAction:c,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(Fn(m.formMethod))return{path:t,submission:m};let g=Mi(t);return e&&g.search&&Nm(g.search)&&f.append("index",""),g.search=`?${f}`,{path:ti(g),submission:m}}function mx(e,t,r,a,l,o,c,f,h,m,g,x,y,v,w,_,N,S,O,z,F){let $=z?pr(z[1])?z[1].error:z[1].data:void 0,j=l.createURL(o.location),G=l.createURL(h),R;if(g&&o.errors){let Q=Object.keys(o.errors)[0];R=c.findIndex(M=>M.route.id===Q)}else if(z&&pr(z[1])){let Q=z[0];R=c.findIndex(M=>M.route.id===Q)-1}let ie=z?z[1].statusCode:void 0,P=ie&&ie>=400,ee={currentUrl:j,currentParams:o.matches[0]?.params||{},nextUrl:G,nextParams:c[0].params,...f,actionResult:$,actionStatus:ie},te=So(c),we=c.map((Q,M)=>{let{route:Y}=Q,V=null;if(R!=null&&M>R)V=!1;else if(Y.lazy)V=!0;else if(!Em(Y))V=!1;else if(g){let{shouldLoad:B}=Pv(Y,o.loaderData,o.errors);V=B}else nS(o.loaderData,o.matches[M],Q)&&(V=!0);if(V!==null)return Vh(r,a,e,te,Q,m,t,V);let fe=!1;typeof F=="boolean"?fe=F:P?fe=!1:(x||j.pathname+j.search===G.pathname+G.search||j.search!==G.search||rS(o.matches[M],Q))&&(fe=!0);let A={...ee,defaultShouldRevalidate:fe},D=co(Q,A);return Vh(r,a,e,te,Q,m,t,D,A,F)}),se=[];return w.forEach((Q,M)=>{if(g||!c.some(ue=>ue.route.id===Q.routeId)||v.has(M))return;let Y=o.fetchers.get(M),V=Y&&Y.state!=="idle"&&Y.data===void 0,fe=da(N,Q.path,S);if(!fe){if(O&&V)return;se.push({key:M,routeId:Q.routeId,path:Q.path,matches:null,match:null,request:null,controller:null});return}if(_.has(M))return;let A=pu(fe,Q.path),D=new AbortController,B=Is(l,Q.path,D.signal),C=null;if(y.has(M))y.delete(M),C=Hs(r,a,B,fe,A,m,t);else if(V)x&&(C=Hs(r,a,B,fe,A,m,t));else{let ue;typeof F=="boolean"?ue=F:P?ue=!1:ue=x;let be={...ee,defaultShouldRevalidate:ue};co(A,be)&&(C=Hs(r,a,B,fe,A,m,t,be))}C&&se.push({key:M,routeId:Q.routeId,path:Q.path,matches:C,match:A,request:B,controller:D})}),{dsMatches:we,revalidatingFetchers:se}}function Em(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Pv(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Em(e))return{shouldLoad:!1,renderFallback:!1};let a=t!=null&&e.id in t,l=r!=null&&r[e.id]!==void 0;if(!a&&l)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!a};let o=!a&&!l;return{shouldLoad:o,renderFallback:o}}function nS(e,t,r){let a=!t||r.route.id!==t.route.id,l=!e.hasOwnProperty(r.route.id);return a||l}function rS(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function co(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function px(e,t,r,a,l,o){let c;if(e){let m=a[e];dt(m,`No route found to patch children into: routeId = ${e}`),m.children||(m.children=[]),c=m.children}else c=r;let f=[],h=[];if(t.forEach(m=>{let g=c.find(x=>Fv(m,x));g?h.push({existingRoute:g,newRoute:m}):f.push(m)}),f.length>0){let m=po(f,l,[e||"_","patch",String(c?.length||"0")],a);c.push(...m)}if(o&&h.length>0)for(let m=0;m<h.length;m++){let{existingRoute:g,newRoute:x}=h[m],y=g,[v]=po([x],l,[],{},!0);Object.assign(y,{element:v.element?v.element:y.element,errorElement:v.errorElement?v.errorElement:y.errorElement,hydrateFallbackElement:v.hydrateFallbackElement?v.hydrateFallbackElement:y.hydrateFallbackElement})}}function Fv(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((r,a)=>t.children?.some(l=>Fv(r,l)))??!1:!1}var gx=new WeakMap,Hv=({key:e,route:t,manifest:r,mapRouteProperties:a})=>{let l=r[t.id];if(dt(l,"No route found in manifest"),!l.lazy||typeof l.lazy!="object")return;let o=l.lazy[e];if(!o)return;let c=gx.get(l);c||(c={},gx.set(l,c));let f=c[e];if(f)return f;let h=(async()=>{let m=vN(e),x=l[e]!==void 0&&e!=="hasErrorBoundary";if(m)wn(!m,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),c[e]=Promise.resolve();else if(x)wn(!1,`Route "${l.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let y=await o();y!=null&&(Object.assign(l,{[e]:y}),Object.assign(l,a(l)))}typeof l.lazy=="object"&&(l.lazy[e]=void 0,Object.values(l.lazy).every(y=>y===void 0)&&(l.lazy=void 0))})();return c[e]=h,h},bx=new WeakMap;function iS(e,t,r,a,l){let o=r[e.id];if(dt(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let g=bx.get(o);if(g)return{lazyRoutePromise:g,lazyHandlerPromise:g};let x=(async()=>{dt(typeof e.lazy=="function","No lazy route function found");let y=await e.lazy(),v={};for(let w in y){let _=y[w];if(_===void 0)continue;let N=wN(w),O=o[w]!==void 0&&w!=="hasErrorBoundary";N?wn(!N,"Route property "+w+" is not a supported property to be returned from a lazy route function. This property will be ignored."):O?wn(!O,`Route "${o.id}" has a static property "${w}" defined but its lazy function is also returning a value for this property. The lazy route property "${w}" will be ignored.`):v[w]=_}Object.assign(o,v),Object.assign(o,{...a(o),lazy:void 0})})();return bx.set(o,x),x.catch(()=>{}),{lazyRoutePromise:x,lazyHandlerPromise:x}}let c=Object.keys(e.lazy),f=[],h;for(let g of c){if(l&&l.includes(g))continue;let x=Hv({key:g,route:e,manifest:r,mapRouteProperties:a});x&&(f.push(x),g===t&&(h=x))}let m=f.length>0?Promise.all(f).then(()=>{}):void 0;return m?.catch(()=>{}),h?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:h}}async function xx(e){let t=e.matches.filter(l=>l.shouldLoad),r={};return(await Promise.all(t.map(l=>l.resolve()))).forEach((l,o)=>{r[t[o].route.id]=l}),r}async function aS(e){return e.matches.some(t=>t.route.middleware)?qv(e,()=>xx(e)):xx(e)}function qv(e,t){return sS(e,t,a=>{if(yS(a))throw a;return a},pS,r);function r(a,l,o){if(o)return Promise.resolve(Object.assign(o.value,{[l]:{type:"error",result:a}}));{let{matches:c}=e,f=Math.min(Math.max(c.findIndex(m=>m.route.id===l),0),Math.max(c.findIndex(m=>m.shouldCallHandler()),0)),h=fa(c,c[f].route.id).route.id;return Promise.resolve({[h]:{type:"error",result:a}})}}}async function sS(e,t,r,a,l){let{matches:o,request:c,params:f,context:h,unstable_pattern:m}=e,g=o.flatMap(y=>y.route.middleware?y.route.middleware.map(v=>[y.route.id,v]):[]);return await $v({request:c,params:f,context:h,unstable_pattern:m},g,t,r,a,l)}async function $v(e,t,r,a,l,o,c=0){let{request:f}=e;if(f.signal.aborted)throw f.signal.reason??new Error(`Request aborted: ${f.method} ${f.url}`);let h=t[c];if(!h)return await r();let[m,g]=h,x,y=async()=>{if(x)throw new Error("You may only call `next()` once per middleware");try{return x={value:await $v(e,t,r,a,l,o,c+1)},x.value}catch(v){return x={value:await o(v,m,x)},x.value}};try{let v=await g(e,y),w=v!=null?a(v):void 0;return l(w)?w:x?w??x.value:(x={value:await y()},x.value)}catch(v){return await o(v,m,x)}}function Gv(e,t,r,a,l){let o=Hv({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),c=iS(a.route,Fn(r.method)?"action":"loader",t,e,l);return{middleware:o,route:c.lazyRoutePromise,handler:c.lazyHandlerPromise}}function Vh(e,t,r,a,l,o,c,f,h=null,m){let g=!1,x=Gv(e,t,r,l,o);return{...l,_lazyPromises:x,shouldLoad:f,shouldRevalidateArgs:h,shouldCallHandler(y){return g=!0,h?typeof m=="boolean"?co(l,{...h,defaultShouldRevalidate:m}):typeof y=="boolean"?co(l,{...h,defaultShouldRevalidate:y}):co(l,h):f},resolve(y){let{lazy:v,loader:w,middleware:_}=l.route,N=g||f||y&&!Fn(r.method)&&(v||w),S=_&&_.length>0&&!w&&!v;return N&&(Fn(r.method)||!S)?oS({request:r,unstable_pattern:a,match:l,lazyHandlerPromise:x?.handler,lazyRoutePromise:x?.route,handlerOverride:y,scopedContext:c}):Promise.resolve({type:"data",result:void 0})}}}function Hs(e,t,r,a,l,o,c,f=null){return a.map(h=>h.route.id!==l.route.id?{...h,shouldLoad:!1,shouldRevalidateArgs:f,shouldCallHandler:()=>!1,_lazyPromises:Gv(e,t,r,h,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Vh(e,t,r,So(a),h,o,c,!0,f))}async function lS(e,t,r,a,l,o){r.some(m=>m._lazyPromises?.middleware)&&await Promise.all(r.map(m=>m._lazyPromises?.middleware));let c={request:t,unstable_pattern:So(r),params:r[0].params,context:l,matches:r},h=await e({...c,fetcherKey:a,runClientMiddleware:m=>{let g=c;return qv(g,()=>m({...g,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return h}async function oS({request:e,unstable_pattern:t,match:r,lazyHandlerPromise:a,lazyRoutePromise:l,handlerOverride:o,scopedContext:c}){let f,h,m=Fn(e.method),g=m?"action":"loader",x=y=>{let v,w=new Promise((S,O)=>v=O);h=()=>v(),e.signal.addEventListener("abort",h);let _=S=>typeof y!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${g}" [routeId: ${r.route.id}]`)):y({request:e,unstable_pattern:t,params:r.params,context:c},...S!==void 0?[S]:[]),N=(async()=>{try{return{type:"data",result:await(o?o(O=>_(O)):_())}}catch(S){return{type:"error",result:S}}})();return Promise.race([N,w])};try{let y=m?r.route.action:r.route.loader;if(a||l)if(y){let v,[w]=await Promise.all([x(y).catch(_=>{v=_}),a,l]);if(v!==void 0)throw v;f=w}else{await a;let v=m?r.route.action:r.route.loader;if(v)[f]=await Promise.all([x(v),l]);else if(g==="action"){let w=new URL(e.url),_=w.pathname+w.search;throw Tr(405,{method:e.method,pathname:_,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(y)f=await x(y);else{let v=new URL(e.url),w=v.pathname+v.search;throw Tr(404,{pathname:w})}}catch(y){return{type:"error",result:y}}finally{h&&e.signal.removeEventListener("abort",h)}return f}async function cS(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function uS(e){let{result:t,type:r}=e;if(_m(t)){let a;try{a=await cS(t)}catch(l){return{type:"error",error:l}}return r==="error"?{type:"error",error:new No(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:"data",data:a,statusCode:t.status,headers:t.headers}}return r==="error"?_x(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:mS(t),statusCode:go(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:go(t)?t.status:void 0}:_x(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function dS(e,t,r,a,l){let o=e.headers.get("Location");if(dt(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!km(o)){let c=a.slice(0,a.findIndex(f=>f.route.id===r)+1);o=Kh(new URL(t.url),c,l,o),e.headers.set("Location",o)}return e}function yx(e,t,r,a){let l=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(km(e)){let o=e,c=o.startsWith("//")?new URL(t.protocol+o):new URL(o);if(l.includes(c.protocol))throw new Error("Invalid redirect location");let f=Mr(c.pathname,r)!=null;if(c.origin===t.origin&&f)return c.pathname+c.search+c.hash}try{let o=a.createURL(e);if(l.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Is(e,t,r,a){let l=e.createURL(Kv(t)).toString(),o={signal:r};if(a&&Fn(a.formMethod)){let{formMethod:c,formEncType:f}=a;o.method=c.toUpperCase(),f==="application/json"?(o.headers=new Headers({"Content-Type":f}),o.body=JSON.stringify(a.json)):f==="text/plain"?o.body=a.text:f==="application/x-www-form-urlencoded"&&a.formData?o.body=Yh(a.formData):o.body=a.formData}return new Request(l,o)}function Yh(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,typeof a=="string"?a:a.name);return t}function vx(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function fS(e,t,r,a=!1,l=!1){let o={},c=null,f,h=!1,m={},g=r&&pr(r[1])?r[1].error:void 0;return e.forEach(x=>{if(!(x.route.id in t))return;let y=x.route.id,v=t[y];if(dt(!qa(v),"Cannot handle redirect results in processLoaderData"),pr(v)){let w=v.error;if(g!==void 0&&(w=g,g=void 0),c=c||{},l)c[y]=w;else{let _=fa(e,y);c[_.route.id]==null&&(c[_.route.id]=w)}a||(o[y]=Uv),h||(h=!0,f=go(v.error)?v.error.status:500),v.headers&&(m[y]=v.headers)}else o[y]=v.data,v.statusCode&&v.statusCode!==200&&!h&&(f=v.statusCode),v.headers&&(m[y]=v.headers)}),g!==void 0&&r&&(c={[r[0]]:g},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:c,statusCode:f||200,loaderHeaders:m}}function kx(e,t,r,a,l,o){let{loaderData:c,errors:f}=fS(t,r,a);return l.filter(h=>!h.matches||h.matches.some(m=>m.shouldLoad)).forEach(h=>{let{key:m,match:g,controller:x}=h;if(x&&x.signal.aborted)return;let y=o[m];if(dt(y,"Did not find corresponding fetcher result"),pr(y)){let v=fa(e.matches,g?.route.id);f&&f[v.route.id]||(f={...f,[v.route.id]:y.error}),e.fetchers.delete(m)}else if(qa(y))dt(!1,"Unhandled fetcher revalidation redirect");else{let v=Ai(y.data);e.fetchers.set(m,v)}}),{loaderData:c,errors:f}}function wx(e,t,r,a){let l=Object.entries(t).filter(([,o])=>o!==Uv).reduce((o,[c,f])=>(o[c]=f,o),{});for(let o of r){let c=o.route.id;if(!t.hasOwnProperty(c)&&e.hasOwnProperty(c)&&o.route.loader&&(l[c]=e[c]),a&&a.hasOwnProperty(c))break}return l}function Ex(e){return e?pr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function fa(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function Xc(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Tr(e,{pathname:t,routeId:r,method:a,type:l,message:o}={}){let c="Unknown Server Error",f="Unknown @remix-run/router error";return e===400?(c="Bad Request",a&&t&&r?f=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:l==="invalid-body"&&(f="Unable to encode submission body")):e===403?(c="Forbidden",f=`Route "${r}" does not match URL "${t}"`):e===404?(c="Not Found",f=`No route matches URL "${t}"`):e===405&&(c="Method Not Allowed",a&&t&&r?f=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:a&&(f=`Invalid request method "${a.toUpperCase()}"`)),new No(e||500,c,new Error(f),!0)}function Zc(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[a,l]=t[r];if(qa(l))return{key:a,result:l}}}function Kv(e){let t=typeof e=="string"?Mi(e):e;return ti({...t,hash:""})}function hS(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function mS(e){return new No(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function pS(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&gS(r))}function gS(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function bS(e){return _m(e.result)&&Iv.has(e.result.status)}function pr(e){return e.type==="error"}function qa(e){return(e&&e.type)==="redirect"}function _x(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function _m(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function xS(e){return Iv.has(e)}function yS(e){return _m(e)&&xS(e.status)&&e.headers.has("Location")}function vS(e){return XN.has(e.toUpperCase())}function Fn(e){return YN.has(e.toUpperCase())}function Nm(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function pu(e,t){let r=typeof t=="string"?Mi(t).search:t.search;if(e[e.length-1].route.index&&Nm(r||""))return e[e.length-1];let a=Ov(e);return a[a.length-1]}function Nx(e){let{formMethod:t,formAction:r,formEncType:a,text:l,formData:o,json:c}=e;if(!(!t||!r||!a)){if(l!=null)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:void 0,text:l};if(o!=null)return{formMethod:t,formAction:r,formEncType:a,formData:o,json:void 0,text:void 0};if(c!==void 0)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:c,text:void 0}}}function hh(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function kS(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Yl(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function wS(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ai(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function ES(e,t){try{let r=e.sessionStorage.getItem(Bv);if(r){let a=JSON.parse(r);for(let[l,o]of Object.entries(a||{}))o&&Array.isArray(o)&&t.set(l,new Set(o||[]))}}catch{}}function _S(e,t){if(t.size>0){let r={};for(let[a,l]of t)r[a]=[...l];try{e.sessionStorage.setItem(Bv,JSON.stringify(r))}catch(a){wn(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function Sx(){let e,t,r=new Promise((a,l)=>{e=async o=>{a(o);try{await r}catch{}},t=async o=>{l(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var Qa=E.createContext(null);Qa.displayName="DataRouter";var zo=E.createContext(null);zo.displayName="DataRouterState";var Vv=E.createContext(!1);function NS(){return E.useContext(Vv)}var Sm=E.createContext({isTransitioning:!1});Sm.displayName="ViewTransition";var Yv=E.createContext(new Map);Yv.displayName="Fetchers";var SS=E.createContext(null);SS.displayName="Await";var Dr=E.createContext(null);Dr.displayName="Navigation";var Hu=E.createContext(null);Hu.displayName="Location";var Gr=E.createContext({outlet:null,matches:[],isDataRoute:!1});Gr.displayName="Route";var zm=E.createContext(null);zm.displayName="RouteError";var Qv="REACT_ROUTER_ERROR",zS="REDIRECT",CS="ROUTE_ERROR_RESPONSE";function TS(e){if(e.startsWith(`${Qv}:${zS}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function AS(e){if(e.startsWith(`${Qv}:${CS}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new No(t.status,t.statusText,t.data)}catch{}}function RS(e,{relative:t}={}){dt(Co(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=E.useContext(Dr),{hash:l,pathname:o,search:c}=To(e,{relative:t}),f=o;return r!=="/"&&(f=o==="/"?r:Hr([r,o])),a.createHref({pathname:f,search:c,hash:l})}function Co(){return E.useContext(Hu)!=null}function ii(){return dt(Co(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(Hu).location}var Xv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Zv(e){E.useContext(Dr).static||E.useLayoutEffect(e)}function qu(){let{isDataRoute:e}=E.useContext(Gr);return e?KS():OS()}function OS(){dt(Co(),"useNavigate() may be used only in the context of a <Router> component.");let e=E.useContext(Qa),{basename:t,navigator:r}=E.useContext(Dr),{matches:a}=E.useContext(Gr),{pathname:l}=ii(),o=JSON.stringify(wm(a)),c=E.useRef(!1);return Zv(()=>{c.current=!0}),E.useCallback((h,m={})=>{if(wn(c.current,Xv),!c.current)return;if(typeof h=="number"){r.go(h);return}let g=Fu(h,JSON.parse(o),l,m.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Hr([t,g.pathname])),(m.replace?r.replace:r.push)(g,m.state,m)},[t,r,o,l,e])}var MS=E.createContext(null);function jS(e){let t=E.useContext(Gr).outlet;return E.useMemo(()=>t&&E.createElement(MS.Provider,{value:e},t),[t,e])}function $u(){let{matches:e}=E.useContext(Gr),t=e[e.length-1];return t?t.params:{}}function To(e,{relative:t}={}){let{matches:r}=E.useContext(Gr),{pathname:a}=ii(),l=JSON.stringify(wm(r));return E.useMemo(()=>Fu(e,JSON.parse(l),a,t==="path"),[e,l,a,t])}function DS(e,t,r){dt(Co(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=E.useContext(Dr),{matches:l}=E.useContext(Gr),o=l[l.length-1],c=o?o.params:{},f=o?o.pathname:"/",h=o?o.pathnameBase:"/",m=o&&o.route;{let N=m&&m.path||"";Jv(f,!m||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${N}">) 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="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let g=ii(),x;x=g;let y=x.pathname||"/",v=y;if(h!=="/"){let N=h.replace(/^\//,"").split("/");v="/"+y.replace(/^\//,"").split("/").slice(N.length).join("/")}let w=da(e,{pathname:v});return wn(m||w!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),wn(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.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.`),PS(w&&w.map(N=>Object.assign({},N,{params:Object.assign({},c,N.params),pathname:Hr([h,a.encodeLocation?a.encodeLocation(N.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?h:Hr([h,a.encodeLocation?a.encodeLocation(N.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),l,r)}function LS(){let e=GS(),t=go(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:o},"ErrorBoundary")," or"," ",E.createElement("code",{style:o},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),r?E.createElement("pre",{style:l},r):null,c)}var IS=E.createElement(LS,null),Wv=class extends E.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=AS(e.digest);r&&(e=r)}let t=e!==void 0?E.createElement(Gr.Provider,{value:this.props.routeContext},E.createElement(zm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?E.createElement(BS,{error:e},t):t}};Wv.contextType=Vv;var mh=new WeakMap;function BS({children:e,error:t}){let{basename:r}=E.useContext(Dr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=TS(t.digest);if(a){let l=mh.get(t);if(l)throw l;let o=jv(a.location,r);if(Mv&&!mh.get(t))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw mh.set(t,c),c}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function US({routeContext:e,match:t,children:r}){let a=E.useContext(Qa);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),E.createElement(Gr.Provider,{value:e},r)}function PS(e,t=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let l=e,o=a?.errors;if(o!=null){let g=l.findIndex(x=>x.route.id&&o?.[x.route.id]!==void 0);dt(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),l=l.slice(0,Math.min(l.length,g+1))}let c=!1,f=-1;if(r&&a){c=a.renderFallback;for(let g=0;g<l.length;g++){let x=l[g];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(f=g),x.route.id){let{loaderData:y,errors:v}=a,w=x.route.loader&&!y.hasOwnProperty(x.route.id)&&(!v||v[x.route.id]===void 0);if(x.route.lazy||w){r.isStatic&&(c=!0),f>=0?l=l.slice(0,f+1):l=[l[0]];break}}}}let h=r?.onError,m=a&&h?(g,x)=>{h(g,{location:a.location,params:a.matches?.[0]?.params??{},unstable_pattern:So(a.matches),errorInfo:x})}:void 0;return l.reduceRight((g,x,y)=>{let v,w=!1,_=null,N=null;a&&(v=o&&x.route.id?o[x.route.id]:void 0,_=x.route.errorElement||IS,c&&(f<0&&y===0?(Jv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,N=null):f===y&&(w=!0,N=x.route.hydrateFallbackElement||null)));let S=t.concat(l.slice(0,y+1)),O=()=>{let z;return v?z=_:w?z=N:x.route.Component?z=E.createElement(x.route.Component,null):x.route.element?z=x.route.element:z=g,E.createElement(US,{match:x,routeContext:{outlet:g,matches:S,isDataRoute:a!=null},children:z})};return a&&(x.route.ErrorBoundary||x.route.errorElement||y===0)?E.createElement(Wv,{location:a.location,revalidation:a.revalidation,component:_,error:v,children:O(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:m}):O()},null)}function Cm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function FS(e){let t=E.useContext(Qa);return dt(t,Cm(e)),t}function HS(e){let t=E.useContext(zo);return dt(t,Cm(e)),t}function qS(e){let t=E.useContext(Gr);return dt(t,Cm(e)),t}function Tm(e){let t=qS(e),r=t.matches[t.matches.length-1];return dt(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function $S(){return Tm("useRouteId")}function GS(){let e=E.useContext(zm),t=HS("useRouteError"),r=Tm("useRouteError");return e!==void 0?e:t.errors?.[r]}function KS(){let{router:e}=FS("useNavigate"),t=Tm("useNavigate"),r=E.useRef(!1);return Zv(()=>{r.current=!0}),E.useCallback(async(l,o={})=>{wn(r.current,Xv),r.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:t,...o}))},[e,t])}var zx={};function Jv(e,t,r){!t&&!zx[e]&&(zx[e]=!0,wn(!1,r))}var Cx={};function Tx(e,t){!e&&!Cx[t]&&(Cx[t]=!0,console.warn(t))}var VS="useOptimistic",Ax=lN[VS],YS=()=>{};function QS(e){return Ax?Ax(e):[e,YS]}function XS(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&wn(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:E.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&wn(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:E.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&wn(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:E.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var ZS=["HydrateFallback","hydrateFallbackElement"],WS=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function JS({router:e,flushSync:t,onError:r,unstable_useTransitions:a}){a=NS()||a;let[o,c]=E.useState(e.state),[f,h]=QS(o),[m,g]=E.useState(),[x,y]=E.useState({isTransitioning:!1}),[v,w]=E.useState(),[_,N]=E.useState(),[S,O]=E.useState(),z=E.useRef(new Map),F=E.useCallback((R,{deletedFetchers:ie,newErrors:P,flushSync:ee,viewTransitionOpts:te})=>{P&&r&&Object.values(P).forEach(se=>r(se,{location:R.location,params:R.matches[0]?.params??{},unstable_pattern:So(R.matches)})),R.fetchers.forEach((se,Q)=>{se.data!==void 0&&z.current.set(Q,se.data)}),ie.forEach(se=>z.current.delete(se)),Tx(ee===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let we=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Tx(te==null||we,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!te||!we){t&&ee?t(()=>c(R)):a===!1?c(R):E.startTransition(()=>{a===!0&&h(se=>Rx(se,R)),c(R)});return}if(t&&ee){t(()=>{_&&(v?.resolve(),_.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:te.currentLocation,nextLocation:te.nextLocation})});let se=e.window.document.startViewTransition(()=>{t(()=>c(R))});se.finished.finally(()=>{t(()=>{w(void 0),N(void 0),g(void 0),y({isTransitioning:!1})})}),t(()=>N(se));return}_?(v?.resolve(),_.skipTransition(),O({state:R,currentLocation:te.currentLocation,nextLocation:te.nextLocation})):(g(R),y({isTransitioning:!0,flushSync:!1,currentLocation:te.currentLocation,nextLocation:te.nextLocation}))},[e.window,t,_,v,a,h,r]);E.useLayoutEffect(()=>e.subscribe(F),[e,F]),E.useEffect(()=>{x.isTransitioning&&!x.flushSync&&w(new WS)},[x]),E.useEffect(()=>{if(v&&m&&e.window){let R=m,ie=v.promise,P=e.window.document.startViewTransition(async()=>{a===!1?c(R):E.startTransition(()=>{a===!0&&h(ee=>Rx(ee,R)),c(R)}),await ie});P.finished.finally(()=>{w(void 0),N(void 0),g(void 0),y({isTransitioning:!1})}),N(P)}},[m,v,e.window,a,h]),E.useEffect(()=>{v&&m&&f.location.key===m.location.key&&v.resolve()},[v,_,f.location,m]),E.useEffect(()=>{!x.isTransitioning&&S&&(g(S.state),y({isTransitioning:!0,flushSync:!1,currentLocation:S.currentLocation,nextLocation:S.nextLocation}),O(void 0))},[x.isTransitioning,S]);let $=E.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:R=>e.navigate(R),push:(R,ie,P)=>e.navigate(R,{state:ie,preventScrollReset:P?.preventScrollReset}),replace:(R,ie,P)=>e.navigate(R,{replace:!0,state:ie,preventScrollReset:P?.preventScrollReset})}),[e]),j=e.basename||"/",G=E.useMemo(()=>({router:e,navigator:$,static:!1,basename:j,onError:r}),[e,$,j,r]);return E.createElement(E.Fragment,null,E.createElement(Qa.Provider,{value:G},E.createElement(zo.Provider,{value:f},E.createElement(Yv.Provider,{value:z.current},E.createElement(Sm.Provider,{value:x},E.createElement(rz,{basename:j,location:f.location,navigationType:f.historyAction,navigator:$,unstable_useTransitions:a},E.createElement(ez,{routes:e.routes,future:e.future,state:f,isStatic:!1,onError:r})))))),null)}function Rx(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var ez=E.memo(tz);function tz({routes:e,future:t,state:r,isStatic:a,onError:l}){return DS(e,void 0,{state:r,isStatic:a,onError:l})}function nz(e){return jS(e.context)}function rz({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:l,static:o=!1,unstable_useTransitions:c}){dt(!Co(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),h=E.useMemo(()=>({basename:f,navigator:l,static:o,unstable_useTransitions:c,future:{}}),[f,l,o,c]);typeof r=="string"&&(r=Mi(r));let{pathname:m="/",search:g="",hash:x="",state:y=null,key:v="default",unstable_mask:w}=r,_=E.useMemo(()=>{let N=Mr(m,f);return N==null?null:{location:{pathname:N,search:g,hash:x,state:y,key:v,unstable_mask:w},navigationType:a}},[f,m,g,x,y,v,a,w]);return wn(_!=null,`<Router basename="${f}"> is not able to match the URL "${m}${g}${x}" because it does not start with the basename, so the <Router> won't render anything.`),_==null?null:E.createElement(Dr.Provider,{value:h},E.createElement(Hu.Provider,{children:t,value:_}))}var gu="get",bu="application/x-www-form-urlencoded";function Gu(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function iz(e){return Gu(e)&&e.tagName.toLowerCase()==="button"}function az(e){return Gu(e)&&e.tagName.toLowerCase()==="form"}function sz(e){return Gu(e)&&e.tagName.toLowerCase()==="input"}function lz(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function oz(e,t){return e.button===0&&(!t||t==="_self")&&!lz(e)}var Wc=null;function cz(){if(Wc===null)try{new FormData(document.createElement("form"),0),Wc=!1}catch{Wc=!0}return Wc}var uz=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ph(e){return e!=null&&!uz.has(e)?(wn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${bu}"`),null):e}function dz(e,t){let r,a,l,o,c;if(az(e)){let f=e.getAttribute("action");a=f?Mr(f,t):null,r=e.getAttribute("method")||gu,l=ph(e.getAttribute("enctype"))||bu,o=new FormData(e)}else if(iz(e)||sz(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||f.getAttribute("action");if(a=h?Mr(h,t):null,r=e.getAttribute("formmethod")||f.getAttribute("method")||gu,l=ph(e.getAttribute("formenctype"))||ph(f.getAttribute("enctype"))||bu,o=new FormData(f,e),!cz()){let{name:m,type:g,value:x}=e;if(g==="image"){let y=m?`${m}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else m&&o.append(m,x)}}else{if(Gu(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=gu,a=null,l=bu,c=e}return o&&l==="text/plain"&&(c=o,o=void 0),{action:a,method:r.toLowerCase(),encType:l,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Am(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function fz(e,t,r,a){let l=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${a}`:l.pathname=`${l.pathname}.${a}`:l.pathname==="/"?l.pathname=`_root.${a}`:t&&Mr(l.pathname,t)==="/"?l.pathname=`${t.replace(/\/$/,"")}/_root.${a}`:l.pathname=`${l.pathname.replace(/\/$/,"")}.${a}`,l}async function hz(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function mz(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 pz(e,t,r){let a=await Promise.all(e.map(async l=>{let o=t.routes[l.route.id];if(o){let c=await hz(o,r);return c.links?c.links():[]}return[]}));return yz(a.flat(1).filter(mz).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function Ox(e,t,r,a,l,o){let c=(h,m)=>r[m]?h.route.id!==r[m].route.id:!0,f=(h,m)=>r[m].pathname!==h.pathname||r[m].route.path?.endsWith("*")&&r[m].params["*"]!==h.params["*"];return o==="assets"?t.filter((h,m)=>c(h,m)||f(h,m)):o==="data"?t.filter((h,m)=>{let g=a.routes[h.route.id];if(!g||!g.hasLoader)return!1;if(c(h,m)||f(h,m))return!0;if(h.route.shouldRevalidate){let x=h.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function gz(e,t,{includeHydrateFallback:r}={}){return bz(e.map(a=>{let l=t.routes[a.route.id];if(!l)return[];let o=[l.module];return l.clientActionModule&&(o=o.concat(l.clientActionModule)),l.clientLoaderModule&&(o=o.concat(l.clientLoaderModule)),r&&l.hydrateFallbackModule&&(o=o.concat(l.hydrateFallbackModule)),l.imports&&(o=o.concat(l.imports)),o}).flat(1))}function bz(e){return[...new Set(e)]}function xz(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function yz(e,t){let r=new Set;return new Set(t),e.reduce((a,l)=>{let o=JSON.stringify(xz(l));return r.has(o)||(r.add(o),a.push({key:o,link:l})),a},[])}function e1(){let e=E.useContext(Qa);return Am(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function vz(){let e=E.useContext(zo);return Am(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Rm=E.createContext(void 0);Rm.displayName="FrameworkContext";function t1(){let e=E.useContext(Rm);return Am(e,"You must render this element inside a <HydratedRouter> element"),e}function kz(e,t){let r=E.useContext(Rm),[a,l]=E.useState(!1),[o,c]=E.useState(!1),{onFocus:f,onBlur:h,onMouseEnter:m,onMouseLeave:g,onTouchStart:x}=t,y=E.useRef(null);E.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let _=S=>{S.forEach(O=>{c(O.isIntersecting)})},N=new IntersectionObserver(_,{threshold:.5});return y.current&&N.observe(y.current),()=>{N.disconnect()}}},[e]),E.useEffect(()=>{if(a){let _=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(_)}}},[a]);let v=()=>{l(!0)},w=()=>{l(!1),c(!1)};return r?e!=="intent"?[o,y,{}]:[o,y,{onFocus:Ql(f,v),onBlur:Ql(h,w),onMouseEnter:Ql(m,v),onMouseLeave:Ql(g,w),onTouchStart:Ql(x,v)}]:[!1,y,{}]}function Ql(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function wz({page:e,...t}){let{router:r}=e1(),a=E.useMemo(()=>da(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?E.createElement(_z,{page:e,matches:a,...t}):null}function Ez(e){let{manifest:t,routeModules:r}=t1(),[a,l]=E.useState([]);return E.useEffect(()=>{let o=!1;return pz(e,t,r).then(c=>{o||l(c)}),()=>{o=!0}},[e,t,r]),a}function _z({page:e,matches:t,...r}){let a=ii(),{future:l,manifest:o,routeModules:c}=t1(),{basename:f}=e1(),{loaderData:h,matches:m}=vz(),g=E.useMemo(()=>Ox(e,t,m,o,a,"data"),[e,t,m,o,a]),x=E.useMemo(()=>Ox(e,t,m,o,a,"assets"),[e,t,m,o,a]),y=E.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let _=new Set,N=!1;if(t.forEach(O=>{let z=o.routes[O.route.id];!z||!z.hasLoader||(!g.some(F=>F.route.id===O.route.id)&&O.route.id in h&&c[O.route.id]?.shouldRevalidate||z.hasClientLoader?N=!0:_.add(O.route.id))}),_.size===0)return[];let S=fz(e,f,l.unstable_trailingSlashAwareDataRequests,"data");return N&&_.size>0&&S.searchParams.set("_routes",t.filter(O=>_.has(O.route.id)).map(O=>O.route.id).join(",")),[S.pathname+S.search]},[f,l.unstable_trailingSlashAwareDataRequests,h,a,o,g,t,e,c]),v=E.useMemo(()=>gz(x,o),[x,o]),w=Ez(x);return E.createElement(E.Fragment,null,y.map(_=>E.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...r})),v.map(_=>E.createElement("link",{key:_,rel:"modulepreload",href:_,...r})),w.map(({key:_,link:N})=>E.createElement("link",{key:_,nonce:r.nonce,...N,crossOrigin:N.crossOrigin??r.crossOrigin})))}function Nz(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Sz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Sz&&(window.__reactRouterVersion="7.13.1")}catch{}function zz(e,t){return eS({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:gN({window:t?.window}),hydrationData:Cz(),routes:e,mapRouteProperties:XS,hydrationRouteProperties:ZS,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function Cz(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Tz(e.errors)}),e}function Tz(e){if(!e)return null;let t=Object.entries(e),r={};for(let[a,l]of t)if(l&&l.__type==="RouteErrorResponse")r[a]=new No(l.status,l.statusText,l.data,l.internal===!0);else if(l&&l.__type==="Error"){if(l.__subType){let o=window[l.__subType];if(typeof o=="function")try{let c=new o(l.message);c.stack="",r[a]=c}catch{}}if(r[a]==null){let o=new Error(l.message);o.stack="",r[a]=o}}else r[a]=l;return r}var n1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,In=E.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:l,reloadDocument:o,replace:c,unstable_mask:f,state:h,target:m,to:g,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:v,...w},_){let{basename:N,navigator:S,unstable_useTransitions:O}=E.useContext(Dr),z=typeof g=="string"&&n1.test(g),F=jv(g,N);g=F.to;let $=RS(g,{relative:l}),j=ii(),G=null;if(f){let Q=Fu(f,[],j.unstable_mask?j.unstable_mask.pathname:"/",!0);N!=="/"&&(Q.pathname=Q.pathname==="/"?N:Hr([N,Q.pathname])),G=S.createHref(Q)}let[R,ie,P]=kz(a,w),ee=Mz(g,{replace:c,unstable_mask:f,state:h,target:m,preventScrollReset:x,relative:l,viewTransition:y,unstable_defaultShouldRevalidate:v,unstable_useTransitions:O});function te(Q){t&&t(Q),Q.defaultPrevented||ee(Q)}let we=!(F.isExternal||o),se=E.createElement("a",{...w,...P,href:(we?G:void 0)||F.absoluteURL||$,onClick:we?te:t,ref:Nz(_,ie),target:m,"data-discover":!z&&r==="render"?"true":void 0});return R&&!z?E.createElement(E.Fragment,null,se,E.createElement(wz,{page:$})):se});In.displayName="Link";var Az=E.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:l=!1,style:o,to:c,viewTransition:f,children:h,...m},g){let x=To(c,{relative:m.relative}),y=ii(),v=E.useContext(zo),{navigator:w,basename:_}=E.useContext(Dr),N=v!=null&&Bz(x)&&f===!0,S=w.encodeLocation?w.encodeLocation(x).pathname:x.pathname,O=y.pathname,z=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(O=O.toLowerCase(),z=z?z.toLowerCase():null,S=S.toLowerCase()),z&&_&&(z=Mr(z,_)||z);const F=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let $=O===S||!l&&O.startsWith(S)&&O.charAt(F)==="/",j=z!=null&&(z===S||!l&&z.startsWith(S)&&z.charAt(S.length)==="/"),G={isActive:$,isPending:j,isTransitioning:N},R=$?t:void 0,ie;typeof a=="function"?ie=a(G):ie=[a,$?"active":null,j?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let P=typeof o=="function"?o(G):o;return E.createElement(In,{...m,"aria-current":R,className:ie,ref:g,style:P,to:c,viewTransition:f},typeof h=="function"?h(G):h)});Az.displayName="NavLink";var Rz=E.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:l,state:o,method:c=gu,action:f,onSubmit:h,relative:m,preventScrollReset:g,viewTransition:x,unstable_defaultShouldRevalidate:y,...v},w)=>{let{unstable_useTransitions:_}=E.useContext(Dr),N=Lz(),S=Iz(f,{relative:m}),O=c.toLowerCase()==="get"?"get":"post",z=typeof f=="string"&&n1.test(f),F=$=>{if(h&&h($),$.defaultPrevented)return;$.preventDefault();let j=$.nativeEvent.submitter,G=j?.getAttribute("formmethod")||c,R=()=>N(j||$.currentTarget,{fetcherKey:t,method:G,navigate:r,replace:l,state:o,relative:m,preventScrollReset:g,viewTransition:x,unstable_defaultShouldRevalidate:y});_&&r!==!1?E.startTransition(()=>R()):R()};return E.createElement("form",{ref:w,method:O,action:S,onSubmit:a?h:F,...v,"data-discover":!z&&e==="render"?"true":void 0})});Rz.displayName="Form";function Oz(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function r1(e){let t=E.useContext(Qa);return dt(t,Oz(e)),t}function Mz(e,{target:t,replace:r,unstable_mask:a,state:l,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:h,unstable_useTransitions:m}={}){let g=qu(),x=ii(),y=To(e,{relative:c});return E.useCallback(v=>{if(oz(v,t)){v.preventDefault();let w=r!==void 0?r:ti(x)===ti(y),_=()=>g(e,{replace:w,unstable_mask:a,state:l,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:h});m?E.startTransition(()=>_()):_()}},[x,g,y,r,a,l,t,e,o,c,f,h,m])}var jz=0,Dz=()=>`__${String(++jz)}__`;function Lz(){let{router:e}=r1("useSubmit"),{basename:t}=E.useContext(Dr),r=$S(),a=e.fetch,l=e.navigate;return E.useCallback(async(o,c={})=>{let{action:f,method:h,encType:m,formData:g,body:x}=dz(o,t);if(c.navigate===!1){let y=c.fetcherKey||Dz();await a(y,r,c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:x,formMethod:c.method||h,formEncType:c.encType||m,flushSync:c.flushSync})}else await l(c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:x,formMethod:c.method||h,formEncType:c.encType||m,replace:c.replace,state:c.state,fromRouteId:r,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,l,t,r])}function Iz(e,{relative:t}={}){let{basename:r}=E.useContext(Dr),a=E.useContext(Gr);dt(a,"useFormAction must be used inside a RouteContext");let[l]=a.matches.slice(-1),o={...To(e||".",{relative:t})},c=ii();if(e==null){o.search=c.search;let f=new URLSearchParams(o.search),h=f.getAll("index");if(h.some(g=>g==="")){f.delete("index"),h.filter(x=>x).forEach(x=>f.append("index",x));let g=f.toString();o.search=g?`?${g}`:""}}return(!e||e===".")&&l.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:Hr([r,o.pathname])),ti(o)}function Bz(e,{relative:t}={}){let r=E.useContext(Sm);dt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=r1("useViewTransitionState"),l=To(e,{relative:t});if(!r.isTransitioning)return!1;let o=Mr(r.currentLocation.pathname,a)||r.currentLocation.pathname,c=Mr(r.nextLocation.pathname,a)||r.nextLocation.pathname;return zu(l.pathname,c)!=null||zu(l.pathname,o)!=null}var i1=Sv();function Uz(e){return E.createElement(JS,{flushSync:i1.flushSync,...e})}const a1=E.createContext(null),s1="ocr-dashboard-theme",gh=["system","light","dark"];function Pz(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Fz(){try{const e=localStorage.getItem(s1);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}function Hz({children:e}){const[t,r]=E.useState(Fz),[a,l]=E.useState(Pz);E.useEffect(()=>{const h=window.matchMedia("(prefers-color-scheme: dark)"),m=g=>{l(g.matches?"dark":"light")};return h.addEventListener("change",m),()=>h.removeEventListener("change",m)},[]);const o=t==="system"?a:t;E.useEffect(()=>{const h=document.documentElement;h.classList.remove("light","dark"),h.classList.add(o);const m=o==="dark"?"/favicon-light.ico":"/favicon-dark.ico",g=document.querySelector("link#favicon");g&&(g.href=m)},[o]),E.useEffect(()=>{try{localStorage.setItem(s1,t)}catch{}},[t]);const c=E.useCallback(()=>{r(h=>{const m=gh.indexOf(h);return gh[(m+1)%gh.length]})},[]),f=E.useMemo(()=>({mode:t,resolved:o,cycle:c,theme:t,toggleTheme:c}),[t,o,c]);return d.jsx(a1,{value:f,children:e})}function l1(){const e=E.useContext(a1);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const ni=Object.create(null);ni.open="0";ni.close="1";ni.ping="2";ni.pong="3";ni.message="4";ni.upgrade="5";ni.noop="6";const xu=Object.create(null);Object.keys(ni).forEach(e=>{xu[ni[e]]=e});const Qh={type:"error",data:"parser error"},o1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",c1=typeof ArrayBuffer=="function",u1=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Om=({type:e,data:t},r,a)=>o1&&t instanceof Blob?r?a(t):Mx(t,a):c1&&(t instanceof ArrayBuffer||u1(t))?r?a(t):Mx(new Blob([t]),a):a(ni[e]+(t||"")),Mx=(e,t)=>{const r=new FileReader;return r.onload=function(){const a=r.result.split(",")[1];t("b"+(a||""))},r.readAsDataURL(e)};function jx(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let bh;function qz(e,t){if(o1&&e.data instanceof Blob)return e.data.arrayBuffer().then(jx).then(t);if(c1&&(e.data instanceof ArrayBuffer||u1(e.data)))return t(jx(e.data));Om(e,!1,r=>{bh||(bh=new TextEncoder),t(bh.encode(r))})}const Dx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ao=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Dx.length;e++)ao[Dx.charCodeAt(e)]=e;const $z=e=>{let t=e.length*.75,r=e.length,a,l=0,o,c,f,h;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const m=new ArrayBuffer(t),g=new Uint8Array(m);for(a=0;a<r;a+=4)o=ao[e.charCodeAt(a)],c=ao[e.charCodeAt(a+1)],f=ao[e.charCodeAt(a+2)],h=ao[e.charCodeAt(a+3)],g[l++]=o<<2|c>>4,g[l++]=(c&15)<<4|f>>2,g[l++]=(f&3)<<6|h&63;return m},Gz=typeof ArrayBuffer=="function",Mm=(e,t)=>{if(typeof e!="string")return{type:"message",data:d1(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:Kz(e.substring(1),t)}:xu[r]?e.length>1?{type:xu[r],data:e.substring(1)}:{type:xu[r]}:Qh},Kz=(e,t)=>{if(Gz){const r=$z(e);return d1(r,t)}else return{base64:!0,data:e}},d1=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},f1="",Vz=(e,t)=>{const r=e.length,a=new Array(r);let l=0;e.forEach((o,c)=>{Om(o,!1,f=>{a[c]=f,++l===r&&t(a.join(f1))})})},Yz=(e,t)=>{const r=e.split(f1),a=[];for(let l=0;l<r.length;l++){const o=Mm(r[l],t);if(a.push(o),o.type==="error")break}return a};function Qz(){return new TransformStream({transform(e,t){qz(e,r=>{const a=r.length;let l;if(a<126)l=new Uint8Array(1),new DataView(l.buffer).setUint8(0,a);else if(a<65536){l=new Uint8Array(3);const o=new DataView(l.buffer);o.setUint8(0,126),o.setUint16(1,a)}else{l=new Uint8Array(9);const o=new DataView(l.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(a))}e.data&&typeof e.data!="string"&&(l[0]|=128),t.enqueue(l),t.enqueue(r)})}})}let xh;function Jc(e){return e.reduce((t,r)=>t+r.length,0)}function eu(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let a=0;for(let l=0;l<t;l++)r[l]=e[0][a++],a===e[0].length&&(e.shift(),a=0);return e.length&&a<e[0].length&&(e[0]=e[0].slice(a)),r}function Xz(e,t){xh||(xh=new TextDecoder);const r=[];let a=0,l=-1,o=!1;return new TransformStream({transform(c,f){for(r.push(c);;){if(a===0){if(Jc(r)<1)break;const h=eu(r,1);o=(h[0]&128)===128,l=h[0]&127,l<126?a=3:l===126?a=1:a=2}else if(a===1){if(Jc(r)<2)break;const h=eu(r,2);l=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),a=3}else if(a===2){if(Jc(r)<8)break;const h=eu(r,8),m=new DataView(h.buffer,h.byteOffset,h.length),g=m.getUint32(0);if(g>Math.pow(2,21)-1){f.enqueue(Qh);break}l=g*Math.pow(2,32)+m.getUint32(4),a=3}else{if(Jc(r)<l)break;const h=eu(r,l);f.enqueue(Mm(o?h:xh.decode(h),t)),a=0}if(l===0||l>e){f.enqueue(Qh);break}}}})}const h1=4;function kn(e){if(e)return Zz(e)}function Zz(e){for(var t in kn.prototype)e[t]=kn.prototype[t];return e}kn.prototype.on=kn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};kn.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};kn.prototype.off=kn.prototype.removeListener=kn.prototype.removeAllListeners=kn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var a,l=0;l<r.length;l++)if(a=r[l],a===t||a.fn===t){r.splice(l,1);break}return r.length===0&&delete this._callbacks["$"+e],this};kn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],a=1;a<arguments.length;a++)t[a-1]=arguments[a];if(r){r=r.slice(0);for(var a=0,l=r.length;a<l;++a)r[a].apply(this,t)}return this};kn.prototype.emitReserved=kn.prototype.emit;kn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};kn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Ku=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0),Rr=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Wz="arraybuffer";function m1(e,...t){return t.reduce((r,a)=>(e.hasOwnProperty(a)&&(r[a]=e[a]),r),{})}const Jz=Rr.setTimeout,e2=Rr.clearTimeout;function Vu(e,t){t.useNativeTimers?(e.setTimeoutFn=Jz.bind(Rr),e.clearTimeoutFn=e2.bind(Rr)):(e.setTimeoutFn=Rr.setTimeout.bind(Rr),e.clearTimeoutFn=Rr.clearTimeout.bind(Rr))}const t2=1.33;function n2(e){return typeof e=="string"?r2(e):Math.ceil((e.byteLength||e.size)*t2)}function r2(e){let t=0,r=0;for(let a=0,l=e.length;a<l;a++)t=e.charCodeAt(a),t<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(a++,r+=4);return r}function p1(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function i2(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function a2(e){let t={},r=e.split("&");for(let a=0,l=r.length;a<l;a++){let o=r[a].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}class s2 extends Error{constructor(t,r,a){super(t),this.description=r,this.context=a,this.type="TransportError"}}class jm extends kn{constructor(t){super(),this.writable=!1,Vu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,r,a){return super.emitReserved("error",new s2(t,r,a)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const r=Mm(t,this.socket.binaryType);this.onPacket(r)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,r={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const r=i2(t);return r.length?"?"+r:""}}class l2 extends jm{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const r=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let a=0;this._polling&&(a++,this.once("pollComplete",function(){--a||r()})),this.writable||(a++,this.once("drain",function(){--a||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const r=a=>{if(this.readyState==="opening"&&a.type==="open"&&this.onOpen(),a.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(a)};Yz(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Vz(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=p1()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}}let g1=!1;try{g1=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const o2=g1;function c2(){}class u2 extends l2{constructor(t){if(super(t),typeof location<"u"){const r=location.protocol==="https:";let a=location.port;a||(a=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||a!==t.port}}doWrite(t,r){const a=this.request({method:"POST",data:t});a.on("success",r),a.on("error",(l,o)=>{this.onError("xhr post error",l,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,a)=>{this.onError("xhr poll error",r,a)}),this.pollXhr=t}}let qs=class yu extends kn{constructor(t,r,a){super(),this.createRequest=t,Vu(this,a),this._opts=a,this._method=a.method||"GET",this._uri=r,this._data=a.data!==void 0?a.data:null,this._create()}_create(){var t;const r=m1(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const a=this._xhr=this.createRequest(r);try{a.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){a.setDisableHeaderCheck&&a.setDisableHeaderCheck(!0);for(let l in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(l)&&a.setRequestHeader(l,this._opts.extraHeaders[l])}}catch{}if(this._method==="POST")try{a.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{a.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(a),"withCredentials"in a&&(a.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(a.timeout=this._opts.requestTimeout),a.onreadystatechange=()=>{var l;a.readyState===3&&((l=this._opts.cookieJar)===null||l===void 0||l.parseCookies(a.getResponseHeader("set-cookie"))),a.readyState===4&&(a.status===200||a.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof a.status=="number"?a.status:0)},0))},a.send(this._data)}catch(l){this.setTimeoutFn(()=>{this._onError(l)},0);return}typeof document<"u"&&(this._index=yu.requestsCount++,yu.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=c2,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete yu.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};qs.requestsCount=0;qs.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Lx);else if(typeof addEventListener=="function"){const e="onpagehide"in Rr?"pagehide":"unload";addEventListener(e,Lx,!1)}}function Lx(){for(let e in qs.requests)qs.requests.hasOwnProperty(e)&&qs.requests[e].abort()}const d2=(function(){const e=b1({xdomain:!1});return e&&e.responseType!==null})();class f2 extends u2{constructor(t){super(t);const r=t&&t.forceBase64;this.supportsBinary=d2&&!r}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new qs(b1,this.uri(),t)}}function b1(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||o2))return new XMLHttpRequest}catch{}if(!t)try{return new Rr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const x1=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class h2 extends jm{get name(){return"websocket"}doOpen(){const t=this.uri(),r=this.opts.protocols,a=x1?{}:m1(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(a.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,r,a)}catch(l){return this.emitReserved("error",l)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let r=0;r<t.length;r++){const a=t[r],l=r===t.length-1;Om(a,this.supportsBinary,o=>{try{this.doWrite(a,o)}catch{}l&&Ku(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=p1()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}}const yh=Rr.WebSocket||Rr.MozWebSocket;class m2 extends h2{createSocket(t,r,a){return x1?new yh(t,r,a):r?new yh(t,r):new yh(t)}doWrite(t,r){this.ws.send(r)}}class p2 extends jm{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const r=Xz(Number.MAX_SAFE_INTEGER,this.socket.binaryType),a=t.readable.pipeThrough(r).getReader(),l=Qz();l.readable.pipeTo(t.writable),this._writer=l.writable.getWriter();const o=()=>{a.read().then(({done:f,value:h})=>{f||(this.onPacket(h),o())}).catch(f=>{})};o();const c={type:"open"};this.query.sid&&(c.data=`{"sid":"${this.query.sid}"}`),this._writer.write(c).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let r=0;r<t.length;r++){const a=t[r],l=r===t.length-1;this._writer.write(a).then(()=>{l&&Ku(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const g2={websocket:m2,webtransport:p2,polling:f2},b2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,x2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Xh(e){if(e.length>8e3)throw"URI too long";const t=e,r=e.indexOf("["),a=e.indexOf("]");r!=-1&&a!=-1&&(e=e.substring(0,r)+e.substring(r,a).replace(/:/g,";")+e.substring(a,e.length));let l=b2.exec(e||""),o={},c=14;for(;c--;)o[x2[c]]=l[c]||"";return r!=-1&&a!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=y2(o,o.path),o.queryKey=v2(o,o.query),o}function y2(e,t){const r=/\/{2,9}/g,a=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&a.splice(0,1),t.slice(-1)=="/"&&a.splice(a.length-1,1),a}function v2(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,l,o){l&&(r[l]=o)}),r}const Zh=typeof addEventListener=="function"&&typeof removeEventListener=="function",vu=[];Zh&&addEventListener("offline",()=>{vu.forEach(e=>e())},!1);class ga extends kn{constructor(t,r){if(super(),this.binaryType=Wz,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(r=t,t=null),t){const a=Xh(t);r.hostname=a.host,r.secure=a.protocol==="https"||a.protocol==="wss",r.port=a.port,a.query&&(r.query=a.query)}else r.host&&(r.hostname=Xh(r.host).host);Vu(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=a2(this.opts.query)),Zh&&(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"})},vu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const r=Object.assign({},this.opts.query);r.EIO=h1,r.transport=t,this.id&&(r.sid=this.id);const a=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](a)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&ga.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(t);r.open(),this.setTransport(r)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",ga.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=t.data,this._onError(r);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let a=0;a<this.writeBuffer.length;a++){const l=this.writeBuffer[a].data;if(l&&(r+=n2(l)),a>0&&r>this._maxPayload)return this.writeBuffer.slice(0,a);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Ku(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,r,a){return this._sendPacket("message",t,r,a),this}send(t,r,a){return this._sendPacket("message",t,r,a),this}_sendPacket(t,r,a,l){if(typeof r=="function"&&(l=r,r=void 0),typeof a=="function"&&(l=a,a=null),this.readyState==="closing"||this.readyState==="closed")return;a=a||{},a.compress=a.compress!==!1;const o={type:t,data:r,options:a};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),l&&this.once("flush",l),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},a=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?a():t()}):this.upgrading?a():t()),this}_onError(t){if(ga.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Zh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const a=vu.indexOf(this._offlineEventListener);a!==-1&&vu.splice(a,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this._prevBufferLen=0}}}ga.protocol=h1;class k2 extends ga{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let r=this.createTransport(t),a=!1;ga.priorWebsocketSuccess=!1;const l=()=>{a||(r.send([{type:"ping",data:"probe"}]),r.once("packet",x=>{if(!a)if(x.type==="pong"&&x.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;ga.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{a||this.readyState!=="closed"&&(g(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const y=new Error("probe error");y.transport=r.name,this.emitReserved("upgradeError",y)}}))};function o(){a||(a=!0,g(),r.close(),r=null)}const c=x=>{const y=new Error("probe error: "+x);y.transport=r.name,o(),this.emitReserved("upgradeError",y)};function f(){c("transport closed")}function h(){c("socket closed")}function m(x){r&&x.name!==r.name&&o()}const g=()=>{r.removeListener("open",l),r.removeListener("error",c),r.removeListener("close",f),this.off("close",h),this.off("upgrading",m)};r.once("open",l),r.once("error",c),r.once("close",f),this.once("close",h),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{a||r.open()},200):r.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const r=[];for(let a=0;a<t.length;a++)~this.transports.indexOf(t[a])&&r.push(t[a]);return r}}let w2=class extends k2{constructor(t,r={}){const a=typeof t=="object"?t:r;(!a.transports||a.transports&&typeof a.transports[0]=="string")&&(a.transports=(a.transports||["polling","websocket","webtransport"]).map(l=>g2[l]).filter(l=>!!l)),super(t,a)}};function E2(e,t="",r){let a=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),a=Xh(e)),a.port||(/^(http|ws)$/.test(a.protocol)?a.port="80":/^(http|ws)s$/.test(a.protocol)&&(a.port="443")),a.path=a.path||"/";const o=a.host.indexOf(":")!==-1?"["+a.host+"]":a.host;return a.id=a.protocol+"://"+o+":"+a.port+t,a.href=a.protocol+"://"+o+(r&&r.port===a.port?"":":"+a.port),a}const _2=typeof ArrayBuffer=="function",N2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,y1=Object.prototype.toString,S2=typeof Blob=="function"||typeof Blob<"u"&&y1.call(Blob)==="[object BlobConstructor]",z2=typeof File=="function"||typeof File<"u"&&y1.call(File)==="[object FileConstructor]";function Dm(e){return _2&&(e instanceof ArrayBuffer||N2(e))||S2&&e instanceof Blob||z2&&e instanceof File}function ku(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,a=e.length;r<a;r++)if(ku(e[r]))return!0;return!1}if(Dm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return ku(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&ku(e[r]))return!0;return!1}function C2(e){const t=[],r=e.data,a=e;return a.data=Wh(r,t),a.attachments=t.length,{packet:a,buffers:t}}function Wh(e,t){if(!e)return e;if(Dm(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let a=0;a<e.length;a++)r[a]=Wh(e[a],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){const r={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=Wh(e[a],t));return r}return e}function T2(e,t){return e.data=Jh(e.data,t),delete e.attachments,e}function Jh(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=Jh(e[r],t);else if(typeof e=="object")for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=Jh(e[r],t));return e}const A2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var wt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(wt||(wt={}));class R2{constructor(t){this.replacer=t}encode(t){return(t.type===wt.EVENT||t.type===wt.ACK)&&ku(t)?this.encodeAsBinary({type:t.type===wt.EVENT?wt.BINARY_EVENT:wt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let r=""+t.type;return(t.type===wt.BINARY_EVENT||t.type===wt.BINARY_ACK)&&(r+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(r+=t.nsp+","),t.id!=null&&(r+=t.id),t.data!=null&&(r+=JSON.stringify(t.data,this.replacer)),r}encodeAsBinary(t){const r=C2(t),a=this.encodeAsString(r.packet),l=r.buffers;return l.unshift(a),l}}class Lm extends kn{constructor(t){super(),this.reviver=t}add(t){let r;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(t);const a=r.type===wt.BINARY_EVENT;a||r.type===wt.BINARY_ACK?(r.type=a?wt.EVENT:wt.ACK,this.reconstructor=new O2(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Dm(t)||t.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(t),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let r=0;const a={type:Number(t.charAt(0))};if(wt[a.type]===void 0)throw new Error("unknown packet type "+a.type);if(a.type===wt.BINARY_EVENT||a.type===wt.BINARY_ACK){const o=r+1;for(;t.charAt(++r)!=="-"&&r!=t.length;);const c=t.substring(o,r);if(c!=Number(c)||t.charAt(r)!=="-")throw new Error("Illegal attachments");a.attachments=Number(c)}if(t.charAt(r+1)==="/"){const o=r+1;for(;++r&&!(t.charAt(r)===","||r===t.length););a.nsp=t.substring(o,r)}else a.nsp="/";const l=t.charAt(r+1);if(l!==""&&Number(l)==l){const o=r+1;for(;++r;){const c=t.charAt(r);if(c==null||Number(c)!=c){--r;break}if(r===t.length)break}a.id=Number(t.substring(o,r+1))}if(t.charAt(++r)){const o=this.tryParse(t.substr(r));if(Lm.isPayloadValid(a.type,o))a.data=o;else throw new Error("invalid payload")}return a}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,r){switch(t){case wt.CONNECT:return Ix(r);case wt.DISCONNECT:return r===void 0;case wt.CONNECT_ERROR:return typeof r=="string"||Ix(r);case wt.EVENT:case wt.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&A2.indexOf(r[0])===-1);case wt.ACK:case wt.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class O2{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const r=T2(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Ix(e){return Object.prototype.toString.call(e)==="[object Object]"}const M2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Lm,Encoder:R2,get PacketType(){return wt}},Symbol.toStringTag,{value:"Module"}));function Fr(e,t,r){return e.on(t,r),function(){e.off(t,r)}}const j2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class v1 extends kn{constructor(t,r,a){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=r,a&&a.auth&&(this.auth=a.auth),this._opts=Object.assign({},a),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Fr(t,"open",this.onopen.bind(this)),Fr(t,"packet",this.onpacket.bind(this)),Fr(t,"error",this.onerror.bind(this)),Fr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...r){var a,l,o;if(j2.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(r.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const c={type:wt.EVENT,data:r};if(c.options={},c.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const g=this.ids++,x=r.pop();this._registerAckCallback(g,x),c.id=g}const f=(l=(a=this.io.engine)===null||a===void 0?void 0:a.transport)===null||l===void 0?void 0:l.writable,h=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!f||(h?(this.notifyOutgoingListeners(c),this.packet(c)):this.sendBuffer.push(c)),this.flags={},this}_registerAckCallback(t,r){var a;const l=(a=this.flags.timeout)!==null&&a!==void 0?a:this._opts.ackTimeout;if(l===void 0){this.acks[t]=r;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let f=0;f<this.sendBuffer.length;f++)this.sendBuffer[f].id===t&&this.sendBuffer.splice(f,1);r.call(this,new Error("operation has timed out"))},l),c=(...f)=>{this.io.clearTimeoutFn(o),r.apply(this,f)};c.withError=!0,this.acks[t]=c}emitWithAck(t,...r){return new Promise((a,l)=>{const o=(c,f)=>c?l(c):a(f);o.withError=!0,r.push(o),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());const a={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((l,...o)=>(this._queue[0],l!==null?a.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(l)):(this._queue.shift(),r&&r(null,...o)),a.pending=!1,this._drainQueue())),this._queue.push(a),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!t||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:wt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(a=>String(a.id)===t)){const a=this.acks[t];delete this.acks[t],a.withError&&a.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case wt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case wt.EVENT:case wt.BINARY_EVENT:this.onevent(t);break;case wt.ACK:case wt.BINARY_ACK:this.onack(t);break;case wt.DISCONNECT:this.ondisconnect();break;case wt.CONNECT_ERROR:this.destroy();const a=new Error(t.data.message);a.data=t.data.data,this.emitReserved("connect_error",a);break}}onevent(t){const r=t.data||[];t.id!=null&&r.push(this.ack(t.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const a of r)a.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const r=this;let a=!1;return function(...l){a||(a=!0,r.packet({type:wt.ACK,id:t,data:l}))}}onack(t){const r=this.acks[t.id];typeof r=="function"&&(delete this.acks[t.id],r.withError&&t.data.unshift(null),r.apply(this,t.data))}onconnect(t,r){this.id=t,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:wt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const r=this._anyListeners;for(let a=0;a<r.length;a++)if(t===r[a])return r.splice(a,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const r=this._anyOutgoingListeners;for(let a=0;a<r.length;a++)if(t===r[a])return r.splice(a,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const a of r)a.apply(this,t.data)}}}function Vs(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}Vs.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-r:e+r}return Math.min(e,this.max)|0};Vs.prototype.reset=function(){this.attempts=0};Vs.prototype.setMin=function(e){this.ms=e};Vs.prototype.setMax=function(e){this.max=e};Vs.prototype.setJitter=function(e){this.jitter=e};class em extends kn{constructor(t,r){var a;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Vu(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 Vs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=t;const l=r.parser||M2;this.encoder=new l.Encoder,this.decoder=new l.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new w2(this.uri,this.opts);const r=this.engine,a=this;this._readyState="opening",this.skipReconnect=!1;const l=Fr(r,"open",function(){a.onopen(),t&&t()}),o=f=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",f),t?t(f):this.maybeReconnectOnOpen()},c=Fr(r,"error",o);if(this._timeout!==!1){const f=this._timeout,h=this.setTimeoutFn(()=>{l(),o(new Error("timeout")),r.close()},f);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(l),this.subs.push(c),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Fr(t,"ping",this.onping.bind(this)),Fr(t,"data",this.ondata.bind(this)),Fr(t,"error",this.onerror.bind(this)),Fr(t,"close",this.onclose.bind(this)),Fr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){Ku(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,r){let a=this.nsps[t];return a?this._autoConnect&&!a.active&&a.connect():(a=new v1(this,t,r),this.nsps[t]=a),a}_destroy(t){const r=Object.keys(this.nsps);for(const a of r)if(this.nsps[a].active)return;this._close()}_packet(t){const r=this.encoder.encode(t);for(let a=0;a<r.length;a++)this.engine.write(r[a],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,r){var a;this.cleanup(),(a=this.engine)===null||a===void 0||a.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const a=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(l=>{l?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",l)):t.onreconnect()}))},r);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Xl={};function wu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=E2(e,t.path||"/socket.io"),a=r.source,l=r.id,o=r.path,c=Xl[l]&&o in Xl[l].nsps,f=t.forceNew||t["force new connection"]||t.multiplex===!1||c;let h;return f?h=new em(a,t):(Xl[l]||(Xl[l]=new em(a,t)),h=Xl[l]),r.query&&!t.query&&(t.query=r.queryKey),h.socket(r.path,t)}Object.assign(wu,{Manager:em,Socket:v1,io:wu,connect:wu});let so=null,vh=null;function k1(){return so||(window.__OCR_TOKEN__?(so=window.__OCR_TOKEN__,so):null)}async function w1(){const e=k1();return e||(vh||(vh=fetch("/auth/token").then(t=>{if(!t.ok)throw new Error(`Failed to fetch auth token: ${t.status}`);return t.json()}).then(t=>(so=t.token,window.__OCR_TOKEN__=t.token,t.token))),vh)}function E1(){const e=k1();return e?{Authorization:`Bearer ${e}`}:{}}const _1=E.createContext(null);function D2({children:e}){const[t,r]=E.useState("connecting"),a=E.useRef(null),l=E.useRef(new Set);E.useEffect(()=>{let h=!1;return w1().then(m=>{if(h)return;const g=wu({autoConnect:!0,reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,reconnectionDelayMax:5e3,auth:{token:m}});a.current=g,g.on("connect",()=>{r("connected");for(const x of l.current)g.emit("join:session",x)}),g.on("disconnect",()=>{r("disconnected")}),g.io.on("reconnect_attempt",()=>{r("reconnecting")})}),()=>{h=!0,a.current?.disconnect(),a.current=null}},[]);const o=E.useCallback(h=>{l.current.add(h),a.current?.emit("join:session",h)},[]),c=E.useCallback(h=>{l.current.delete(h),a.current?.emit("leave:session",h)},[]),f=E.useMemo(()=>({socket:a.current,status:t,isConnected:t==="connected",joinRoom:o,leaveRoom:c}),[t,o,c]);return d.jsx(_1,{value:f,children:e})}function ai(){const e=E.useContext(_1);if(!e)throw new Error("useSocket must be used within SocketProvider");return e}function ut(e,t){const{socket:r}=ai(),a=E.useRef(t);a.current=t,E.useEffect(()=>{if(!r)return;const l=o=>a.current(o);return r.on(e,l),()=>{r.off(e,l)}},[r,e])}var Ys=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(){}},L2={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},I2=class{#e=L2;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},$a=new I2;function B2(e){setTimeout(e,0)}var Ga=typeof window>"u"||"Deno"in globalThis;function Kn(){}function U2(e,t){return typeof e=="function"?e(t):e}function tm(e){return typeof e=="number"&&e>=0&&e!==1/0}function N1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ba(e,t){return typeof e=="function"?e(t):e}function Ar(e,t){return typeof e=="function"?e(t):e}function Bx(e,t){const{type:r="all",exact:a,fetchStatus:l,predicate:o,queryKey:c,stale:f}=e;if(c){if(a){if(t.queryHash!==Im(c,t.options))return!1}else if(!bo(t.queryKey,c))return!1}if(r!=="all"){const h=t.isActive();if(r==="active"&&!h||r==="inactive"&&h)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||l&&l!==t.state.fetchStatus||o&&!o(t))}function Ux(e,t){const{exact:r,status:a,predicate:l,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Ka(t.options.mutationKey)!==Ka(o))return!1}else if(!bo(t.options.mutationKey,o))return!1}return!(a&&t.state.status!==a||l&&!l(t))}function Im(e,t){return(t?.queryKeyHashFn||Ka)(e)}function Ka(e){return JSON.stringify(e,(t,r)=>nm(r)?Object.keys(r).sort().reduce((a,l)=>(a[l]=r[l],a),{}):r)}function bo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>bo(e[r],t[r])):!1}var P2=Object.prototype.hasOwnProperty;function S1(e,t,r=0){if(e===t)return e;if(r>500)return t;const a=Px(e)&&Px(t);if(!a&&!(nm(e)&&nm(t)))return t;const o=(a?e:Object.keys(e)).length,c=a?t:Object.keys(t),f=c.length,h=a?new Array(f):{};let m=0;for(let g=0;g<f;g++){const x=a?g:c[g],y=e[x],v=t[x];if(y===v){h[x]=y,(a?g<o:P2.call(e,x))&&m++;continue}if(y===null||v===null||typeof y!="object"||typeof v!="object"){h[x]=v;continue}const w=S1(y,v,r+1);h[x]=w,w===y&&m++}return o===f&&m===o?e:h}function Cu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Px(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function nm(e){if(!Fx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Fx(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Fx(e){return Object.prototype.toString.call(e)==="[object Object]"}function F2(e){return new Promise(t=>{$a.setTimeout(t,e)})}function rm(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?S1(e,t):t}function H2(e,t,r=0){const a=[...e,t];return r&&a.length>r?a.slice(1):a}function q2(e,t,r=0){const a=[t,...e];return r&&a.length>r?a.slice(0,-1):a}var Bm=Symbol();function z1(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Bm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Um(e,t){return typeof e=="function"?e(...t):!!e}function $2(e,t,r){let a=!1,l;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(l??=t(),a||(a=!0,l.aborted?r():l.addEventListener("abort",r,{once:!0})),l)}),e}var G2=class extends Ys{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Ga&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Pm=new G2;function im(){let e,t;const r=new Promise((l,o)=>{e=l,t=o});r.status="pending",r.catch(()=>{});function a(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{a({status:"fulfilled",value:l}),e(l)},r.reject=l=>{a({status:"rejected",reason:l}),t(l)},r}var K2=B2;function V2(){let e=[],t=0,r=f=>{f()},a=f=>{f()},l=K2;const o=f=>{t?e.push(f):l(()=>{r(f)})},c=()=>{const f=e;e=[],f.length&&l(()=>{a(()=>{f.forEach(h=>{r(h)})})})};return{batch:f=>{let h;t++;try{h=f()}finally{t--,t||c()}return h},batchCalls:f=>(...h)=>{o(()=>{f(...h)})},schedule:o,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{a=f},setScheduler:f=>{l=f}}}var Sn=V2(),Y2=class extends Ys{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Ga&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},Tu=new Y2;function Q2(e){return Math.min(1e3*2**e,3e4)}function C1(e){return(e??"online")==="online"?Tu.isOnline():!0}var am=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function T1(e){let t=!1,r=0,a;const l=im(),o=()=>l.status!=="pending",c=_=>{if(!o()){const N=new am(_);y(N),e.onCancel?.(N)}},f=()=>{t=!0},h=()=>{t=!1},m=()=>Pm.isFocused()&&(e.networkMode==="always"||Tu.isOnline())&&e.canRun(),g=()=>C1(e.networkMode)&&e.canRun(),x=_=>{o()||(a?.(),l.resolve(_))},y=_=>{o()||(a?.(),l.reject(_))},v=()=>new Promise(_=>{a=N=>{(o()||m())&&_(N)},e.onPause?.()}).then(()=>{a=void 0,o()||e.onContinue?.()}),w=()=>{if(o())return;let _;const N=r===0?e.initialPromise:void 0;try{_=N??e.fn()}catch(S){_=Promise.reject(S)}Promise.resolve(_).then(x).catch(S=>{if(o())return;const O=e.retry??(Ga?0:3),z=e.retryDelay??Q2,F=typeof z=="function"?z(r,S):z,$=O===!0||typeof O=="number"&&r<O||typeof O=="function"&&O(r,S);if(t||!$){y(S);return}r++,e.onFail?.(r,S),F2(F).then(()=>m()?void 0:v()).then(()=>{t?y(S):w()})})};return{promise:l,status:()=>l.status,cancel:c,continue:()=>(a?.(),l),cancelRetry:f,continueRetry:h,canStart:g,start:()=>(g()?w():v().then(w),l)}}var A1=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),tm(this.gcTime)&&(this.#e=$a.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ga?1/0:300*1e3))}clearGcTimeout(){this.#e&&($a.clearTimeout(this.#e),this.#e=void 0)}},X2=class extends A1{#e;#t;#n;#i;#r;#s;#l;constructor(e){super(),this.#l=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=qx(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=qx(this.options);t.data!==void 0&&(this.setState(Hx(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const r=rm(this.state.data,e,this.options);return this.#a({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Kn).catch(Kn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Ar(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Bm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ba(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!N1(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#l?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,a=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#l=!0,r.signal)})},l=()=>{const f=z1(this.options,t),m=(()=>{const g={client:this.#i,queryKey:this.queryKey,meta:this.meta};return a(g),g})();return this.#l=!1,this.options.persister?this.options.persister(f,m,this):f(m)},c=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:l};return a(f),f})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#a({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=T1({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:f=>{f instanceof am&&f.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(f,h)=>{this.#a({type:"failed",failureCount:f,error:h})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const f=await this.#r.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#n.config.onSuccess?.(f,this),this.#n.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof am){if(f.silent)return this.#r.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#a({type:"error",error:f}),this.#n.config.onError?.(f,this),this.#n.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#a(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...R1(r.data,this.options),fetchMeta:e.meta??null};case"success":const a={...r,...Hx(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const l=e.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),Sn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function R1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:C1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Hx(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function qx(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,a=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Z2=class extends Ys{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#l=im(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#s;#l;#a;#p;#f;#h;#c;#u;#o;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),$x(this.#t,this.options)?this.#d():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return sm(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return sm(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#k(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ar(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),t._defaulted&&!Cu(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&Gx(this.#t,r,this.options,t)&&this.#d(),this.updateResult(),a&&(this.#t!==r||Ar(this.options.enabled,this.#t)!==Ar(t.enabled,this.#t)||ba(this.options.staleTime,this.#t)!==ba(t.staleTime,this.#t))&&this.#g();const l=this.#b();a&&(this.#t!==r||Ar(this.options.enabled,this.#t)!==Ar(t.enabled,this.#t)||l!==this.#o)&&this.#x(l)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(t,e);return J2(this,r)&&(this.#i=r,this.#s=this.options,this.#r=this.#t.state),r}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(r,a)=>(this.trackProp(a),t?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#l.status==="pending"&&this.#l.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#d(e){this.#w();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Kn)),t}#g(){this.#v();const e=ba(this.options.staleTime,this.#t);if(Ga||this.#i.isStale||!tm(e))return;const r=N1(this.#i.dataUpdatedAt,e)+1;this.#c=$a.setTimeout(()=>{this.#i.isStale||this.updateResult()},r)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#x(e){this.#k(),this.#o=e,!(Ga||Ar(this.options.enabled,this.#t)===!1||!tm(this.#o)||this.#o===0)&&(this.#u=$a.setInterval(()=>{(this.options.refetchIntervalInBackground||Pm.isFocused())&&this.#d()},this.#o))}#y(){this.#g(),this.#x(this.#b())}#v(){this.#c&&($a.clearTimeout(this.#c),this.#c=void 0)}#k(){this.#u&&($a.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const r=this.#t,a=this.options,l=this.#i,o=this.#r,c=this.#s,h=e!==r?e.state:this.#n,{state:m}=e;let g={...m},x=!1,y;if(t._optimisticResults){const R=this.hasListeners(),ie=!R&&$x(e,t),P=R&&Gx(e,r,t,a);(ie||P)&&(g={...g,...R1(m.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:v,errorUpdatedAt:w,status:_}=g;y=g.data;let N=!1;if(t.placeholderData!==void 0&&y===void 0&&_==="pending"){let R;l?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(R=l.data,N=!0):R=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,R!==void 0&&(_="success",y=rm(l?.data,R,t),x=!0)}if(t.select&&y!==void 0&&!N)if(l&&y===o?.data&&t.select===this.#p)y=this.#f;else try{this.#p=t.select,y=t.select(y),y=rm(l?.data,y,t),this.#f=y,this.#a=null}catch(R){this.#a=R}this.#a&&(v=this.#a,y=this.#f,w=Date.now(),_="error");const S=g.fetchStatus==="fetching",O=_==="pending",z=_==="error",F=O&&S,$=y!==void 0,G={status:_,fetchStatus:g.fetchStatus,isPending:O,isSuccess:_==="success",isError:z,isInitialLoading:F,isLoading:F,data:y,dataUpdatedAt:g.dataUpdatedAt,error:v,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:S,isRefetching:S&&!O,isLoadingError:z&&!$,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:z&&$,isStale:Fm(e,t),refetch:this.refetch,promise:this.#l,isEnabled:Ar(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const R=G.data!==void 0,ie=G.status==="error"&&!R,P=we=>{ie?we.reject(G.error):R&&we.resolve(G.data)},ee=()=>{const we=this.#l=G.promise=im();P(we)},te=this.#l;switch(te.status){case"pending":e.queryHash===r.queryHash&&P(te);break;case"fulfilled":(ie||G.data!==te.value)&&ee();break;case"rejected":(!ie||G.error!==te.reason)&&ee();break}}return G}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#h=this.#t),Cu(t,e))return;this.#i=t;const r=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,l=typeof a=="function"?a():a;if(l==="all"||!l&&!this.#m.size)return!0;const o=new Set(l??this.#m);return this.options.throwOnError&&o.add("error"),Object.keys(this.#i).some(c=>{const f=c;return this.#i[f]!==e[f]&&o.has(f)})};this.#E({listeners:r()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#E(e){Sn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function W2(e,t){return Ar(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function $x(e,t){return W2(e,t)||e.state.data!==void 0&&sm(e,t,t.refetchOnMount)}function sm(e,t,r){if(Ar(t.enabled,e)!==!1&&ba(t.staleTime,e)!=="static"){const a=typeof r=="function"?r(e):r;return a==="always"||a!==!1&&Fm(e,t)}return!1}function Gx(e,t,r,a){return(e!==t||Ar(a.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Fm(e,r)}function Fm(e,t){return Ar(t.enabled,e)!==!1&&e.isStaleByTime(ba(t.staleTime,e))}function J2(e,t){return!Cu(e.getCurrentResult(),t)}function Kx(e){return{onFetch:(t,r)=>{const a=t.options,l=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},h=0;const m=async()=>{let g=!1;const x=w=>{$2(w,()=>t.signal,()=>g=!0)},y=z1(t.options,t.fetchOptions),v=async(w,_,N)=>{if(g)return Promise.reject();if(_==null&&w.pages.length)return Promise.resolve(w);const O=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:_,direction:N?"backward":"forward",meta:t.options.meta};return x(j),j})(),z=await y(O),{maxPages:F}=t.options,$=N?q2:H2;return{pages:$(w.pages,z,F),pageParams:$(w.pageParams,_,F)}};if(l&&o.length){const w=l==="backward",_=w?eC:Vx,N={pages:o,pageParams:c},S=_(a,N);f=await v(N,S,w)}else{const w=e??o.length;do{const _=h===0?c[0]??a.initialPageParam:Vx(a,f);if(h>0&&_==null)break;f=await v(f,_),h++}while(h<w)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=m}}}function Vx(e,{pages:t,pageParams:r}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,r[a],r):void 0}function eC(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var tC=class extends A1{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||O1(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=T1({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(o,c)=>{this.#r({type:"failed",failureCount:o,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",l=!this.#i.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:l}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,r);const c=await this.options.onMutate?.(e,r);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:l})}const o=await this.#i.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,r),await this.options.onSuccess?.(o,e,this.state.context,r),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(o,null,e,this.state.context,r),this.#r({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,e,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onError?.(o,e,this.state.context,r)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,r)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#r(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Sn.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function O1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var nC=class extends Ys{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,r){const a=new tC({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:r});return this.add(a),a}add(e){this.#e.add(e);const t=tu(e);if(typeof t=="string"){const r=this.#t.get(t);r?r.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=tu(e);if(typeof t=="string"){const r=this.#t.get(t);if(r)if(r.length>1){const a=r.indexOf(e);a!==-1&&r.splice(a,1)}else r[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=tu(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(l=>l.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=tu(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Sn.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(r=>Ux(t,r))}findAll(e={}){return this.getAll().filter(t=>Ux(e,t))}notify(e){Sn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Sn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Kn))))}};function tu(e){return e.options.scope?.id}var rC=class extends Ys{#e;#t=void 0;#n;#i;constructor(t,r){super(),this.#e=t,this.setOptions(r),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const r=this.options;this.options=this.#e.defaultMutationOptions(t),Cu(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&Ka(r.mutationKey)!==Ka(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#s(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#s()}mutate(t,r){return this.#i=r,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??O1();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){Sn.batch(()=>{if(this.#i&&this.hasListeners()){const r=this.#t.variables,a=this.#t.context,l={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#i.onSuccess?.(t.data,r,a,l)}catch(o){Promise.reject(o)}try{this.#i.onSettled?.(t.data,null,r,a,l)}catch(o){Promise.reject(o)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,r,a,l)}catch(o){Promise.reject(o)}try{this.#i.onSettled?.(void 0,t.error,r,a,l)}catch(o){Promise.reject(o)}}}this.listeners.forEach(r=>{r(this.#t)})})}},iC=class extends Ys{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){const a=t.queryKey,l=t.queryHash??Im(a,t);let o=this.get(l);return o||(o=new X2({client:e,queryKey:a,queryHash:l,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(a)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Sn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>Bx(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>Bx(e,r)):t}notify(e){Sn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Sn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Sn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},aC=class{#e;#t;#n;#i;#r;#s;#l;#a;constructor(e={}){this.#e=e.queryCache||new iC,this.#t=e.mutationCache||new nC,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#l=Pm.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Tu.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#l?.(),this.#l=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#e.build(this,t),a=r.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ba(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:r})=>{const a=r.data;return[t,a]})}setQueryData(e,t,r){const a=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(a.queryHash)?.state.data,c=U2(t,o);if(c!==void 0)return this.#e.build(this,a).setData(c,{...r,manual:!0})}setQueriesData(e,t,r){return Sn.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Sn.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#e;return Sn.batch(()=>(r.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},a=Sn.batch(()=>this.#e.findAll(e).map(l=>l.cancel(r)));return Promise.all(a).then(Kn).catch(Kn)}invalidateQueries(e,t={}){return Sn.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},a=Sn.batch(()=>this.#e.findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let o=l.fetch(void 0,r);return r.throwOnError||(o=o.catch(Kn)),l.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then(Kn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#e.build(this,t);return r.isStaleByTime(ba(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Kn).catch(Kn)}fetchInfiniteQuery(e){return e.behavior=Kx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Kn).catch(Kn)}ensureInfiniteQueryData(e){return e.behavior=Kx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Tu.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(Ka(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],r={};return t.forEach(a=>{bo(e,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(e,t){this.#r.set(Ka(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],r={};return t.forEach(a=>{bo(e,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Im(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Bm&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},M1=E.createContext(void 0),Rn=e=>{const t=E.useContext(M1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},sC=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(M1.Provider,{value:e,children:t})),j1=E.createContext(!1),lC=()=>E.useContext(j1);j1.Provider;function oC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var cC=E.createContext(oC()),uC=()=>E.useContext(cC),dC=(e,t,r)=>{const a=r?.state.error&&typeof e.throwOnError=="function"?Um(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},fC=e=>{E.useEffect(()=>{e.clearReset()},[e])},hC=({result:e,errorResetBoundary:t,throwOnError:r,query:a,suspense:l})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(l&&e.data===void 0||Um(r,[e.error,a])),mC=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))}},pC=(e,t)=>e.isLoading&&e.isFetching&&!t,gC=(e,t)=>e?.suspense&&t.isPending,Yx=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function bC(e,t,r){const a=lC(),l=uC(),o=Rn(),c=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const f=o.getQueryCache().get(c.queryHash);c._optimisticResults=a?"isRestoring":"optimistic",mC(c),dC(c,l,f),fC(l);const h=!o.getQueryCache().get(c.queryHash),[m]=E.useState(()=>new t(o,c)),g=m.getOptimisticResult(c),x=!a&&e.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(y=>{const v=x?m.subscribe(Sn.batchCalls(y)):Kn;return m.updateResult(),v},[m,x]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),E.useEffect(()=>{m.setOptions(c)},[c,m]),gC(c,g))throw Yx(c,m,l);if(hC({result:g,errorResetBoundary:l,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw g.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(c,g),c.experimental_prefetchInRender&&!Ga&&pC(g,a)&&(h?Yx(c,m,l):f?.promise)?.catch(Kn).finally(()=>{m.updateResult()}),c.notifyOnChangeProps?g:m.trackResult(g)}function nn(e,t){return bC(e,Z2)}function Ao(e,t){const r=Rn(),[a]=E.useState(()=>new rC(r,e));E.useEffect(()=>{a.setOptions(e)},[a,e]);const l=E.useSyncExternalStore(E.useCallback(c=>a.subscribe(Sn.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=E.useCallback((c,f)=>{a.mutate(c,f).catch(Kn)},[a]);if(l.error&&Um(a.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:o,mutateAsync:l.mutate}}function xC({children:e}){const[t]=E.useState(()=>new aC({defaultOptions:{queries:{staleTime:3e4,retry:1,refetchOnWindowFocus:!1}}}));return d.jsx(sC,{client:t,children:e})}function D1(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(r=D1(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function yC(){for(var e,t,r=0,a="",l=arguments.length;r<l;r++)(e=arguments[r])&&(t=D1(e))&&(a&&(a+=" "),a+=t);return a}const vC=(e,t)=>{const r=new Array(e.length+t.length);for(let a=0;a<e.length;a++)r[a]=e[a];for(let a=0;a<t.length;a++)r[e.length+a]=t[a];return r},kC=(e,t)=>({classGroupId:e,validator:t}),L1=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Au="-",Qx=[],wC="arbitrary..",EC=e=>{const t=NC(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return _C(c);const f=c.split(Au),h=f[0]===""&&f.length>1?1:0;return I1(f,h,t)},getConflictingClassGroupIds:(c,f)=>{if(f){const h=a[c],m=r[c];return h?m?vC(m,h):h:m||Qx}return r[c]||Qx}}},I1=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const l=e[t],o=r.nextPart.get(l);if(o){const m=I1(e,t+1,o);if(m)return m}const c=r.validators;if(c===null)return;const f=t===0?e.join(Au):e.slice(t).join(Au),h=c.length;for(let m=0;m<h;m++){const g=c[m];if(g.validator(f))return g.classGroupId}},_C=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),a=t.slice(0,r);return a?wC+a:void 0})(),NC=e=>{const{theme:t,classGroups:r}=e;return SC(r,t)},SC=(e,t)=>{const r=L1();for(const a in e){const l=e[a];Hm(l,r,a,t)}return r},Hm=(e,t,r,a)=>{const l=e.length;for(let o=0;o<l;o++){const c=e[o];zC(c,t,r,a)}},zC=(e,t,r,a)=>{if(typeof e=="string"){CC(e,t,r);return}if(typeof e=="function"){TC(e,t,r,a);return}AC(e,t,r,a)},CC=(e,t,r)=>{const a=e===""?t:B1(t,e);a.classGroupId=r},TC=(e,t,r,a)=>{if(RC(e)){Hm(e(a),t,r,a);return}t.validators===null&&(t.validators=[]),t.validators.push(kC(r,e))},AC=(e,t,r,a)=>{const l=Object.entries(e),o=l.length;for(let c=0;c<o;c++){const[f,h]=l[c];Hm(h,B1(t,f),r,a)}},B1=(e,t)=>{let r=e;const a=t.split(Au),l=a.length;for(let o=0;o<l;o++){const c=a[o];let f=r.nextPart.get(c);f||(f=L1(),r.nextPart.set(c,f)),r=f}return r},RC=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,OC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),a=Object.create(null);const l=(o,c)=>{r[o]=c,t++,t>e&&(t=0,a=r,r=Object.create(null))};return{get(o){let c=r[o];if(c!==void 0)return c;if((c=a[o])!==void 0)return l(o,c),c},set(o,c){o in r?r[o]=c:l(o,c)}}},lm="!",Xx=":",MC=[],Zx=(e,t,r,a,l)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:a,isExternal:l}),jC=e=>{const{prefix:t,experimentalParseClassName:r}=e;let a=l=>{const o=[];let c=0,f=0,h=0,m;const g=l.length;for(let _=0;_<g;_++){const N=l[_];if(c===0&&f===0){if(N===Xx){o.push(l.slice(h,_)),h=_+1;continue}if(N==="/"){m=_;continue}}N==="["?c++:N==="]"?c--:N==="("?f++:N===")"&&f--}const x=o.length===0?l:l.slice(h);let y=x,v=!1;x.endsWith(lm)?(y=x.slice(0,-1),v=!0):x.startsWith(lm)&&(y=x.slice(1),v=!0);const w=m&&m>h?m-h:void 0;return Zx(o,v,y,w)};if(t){const l=t+Xx,o=a;a=c=>c.startsWith(l)?o(c.slice(l.length)):Zx(MC,!1,c,void 0,!0)}if(r){const l=a;a=o=>r({className:o,parseClassName:l})}return a},DC=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,a)=>{t.set(r,1e6+a)}),r=>{const a=[];let l=[];for(let o=0;o<r.length;o++){const c=r[o],f=c[0]==="[",h=t.has(c);f||h?(l.length>0&&(l.sort(),a.push(...l),l=[]),a.push(c)):l.push(c)}return l.length>0&&(l.sort(),a.push(...l)),a}},LC=e=>({cache:OC(e.cacheSize),parseClassName:jC(e),sortModifiers:DC(e),...EC(e)}),IC=/\s+/,BC=(e,t)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:l,sortModifiers:o}=t,c=[],f=e.trim().split(IC);let h="";for(let m=f.length-1;m>=0;m-=1){const g=f[m],{isExternal:x,modifiers:y,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:_}=r(g);if(x){h=g+(h.length>0?" "+h:h);continue}let N=!!_,S=a(N?w.substring(0,_):w);if(!S){if(!N){h=g+(h.length>0?" "+h:h);continue}if(S=a(w),!S){h=g+(h.length>0?" "+h:h);continue}N=!1}const O=y.length===0?"":y.length===1?y[0]:o(y).join(":"),z=v?O+lm:O,F=z+S;if(c.indexOf(F)>-1)continue;c.push(F);const $=l(S,N);for(let j=0;j<$.length;++j){const G=$[j];c.push(z+G)}h=g+(h.length>0?" "+h:h)}return h},UC=(...e)=>{let t=0,r,a,l="";for(;t<e.length;)(r=e[t++])&&(a=U1(r))&&(l&&(l+=" "),l+=a);return l},U1=e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=U1(e[a]))&&(r&&(r+=" "),r+=t);return r},PC=(e,...t)=>{let r,a,l,o;const c=h=>{const m=t.reduce((g,x)=>x(g),e());return r=LC(m),a=r.cache.get,l=r.cache.set,o=f,f(h)},f=h=>{const m=a(h);if(m)return m;const g=BC(h,r);return l(h,g),g};return o=c,(...h)=>o(UC(...h))},FC=[],Nn=e=>{const t=r=>r[e]||FC;return t.isThemeGetter=!0,t},P1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,F1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,HC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,qC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$C=/\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$/,GC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,KC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,VC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oa=e=>HC.test(e),ct=e=>!!e&&!Number.isNaN(Number(e)),ca=e=>!!e&&Number.isInteger(Number(e)),kh=e=>e.endsWith("%")&&ct(e.slice(0,-1)),zi=e=>qC.test(e),H1=()=>!0,YC=e=>$C.test(e)&&!GC.test(e),qm=()=>!1,QC=e=>KC.test(e),XC=e=>VC.test(e),ZC=e=>!De(e)&&!Le(e),WC=e=>va(e,G1,qm),De=e=>P1.test(e),Fa=e=>va(e,K1,YC),Wx=e=>va(e,sT,ct),JC=e=>va(e,Y1,H1),eT=e=>va(e,V1,qm),Jx=e=>va(e,q1,qm),tT=e=>va(e,$1,XC),nu=e=>va(e,Q1,QC),Le=e=>F1.test(e),Zl=e=>Xa(e,K1),nT=e=>Xa(e,V1),ey=e=>Xa(e,q1),rT=e=>Xa(e,G1),iT=e=>Xa(e,$1),ru=e=>Xa(e,Q1,!0),aT=e=>Xa(e,Y1,!0),va=(e,t,r)=>{const a=P1.exec(e);return a?a[1]?t(a[1]):r(a[2]):!1},Xa=(e,t,r=!1)=>{const a=F1.exec(e);return a?a[1]?t(a[1]):r:!1},q1=e=>e==="position"||e==="percentage",$1=e=>e==="image"||e==="url",G1=e=>e==="length"||e==="size"||e==="bg-size",K1=e=>e==="length",sT=e=>e==="number",V1=e=>e==="family-name",Y1=e=>e==="number"||e==="weight",Q1=e=>e==="shadow",lT=()=>{const e=Nn("color"),t=Nn("font"),r=Nn("text"),a=Nn("font-weight"),l=Nn("tracking"),o=Nn("leading"),c=Nn("breakpoint"),f=Nn("container"),h=Nn("spacing"),m=Nn("radius"),g=Nn("shadow"),x=Nn("inset-shadow"),y=Nn("text-shadow"),v=Nn("drop-shadow"),w=Nn("blur"),_=Nn("perspective"),N=Nn("aspect"),S=Nn("ease"),O=Nn("animate"),z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],$=()=>[...F(),Le,De],j=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],R=()=>[Le,De,h],ie=()=>[oa,"full","auto",...R()],P=()=>[ca,"none","subgrid",Le,De],ee=()=>["auto",{span:["full",ca,Le,De]},ca,Le,De],te=()=>[ca,"auto",Le,De],we=()=>["auto","min","max","fr",Le,De],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...R()],Y=()=>[oa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],V=()=>[oa,"screen","full","dvw","lvw","svw","min","max","fit",...R()],fe=()=>[oa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],A=()=>[e,Le,De],D=()=>[...F(),ey,Jx,{position:[Le,De]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],C=()=>["auto","cover","contain",rT,WC,{size:[Le,De]}],ue=()=>[kh,Zl,Fa],be=()=>["","none","full",m,Le,De],ye=()=>["",ct,Zl,Fa],le=()=>["solid","dashed","dotted","double"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>[ct,kh,ey,Jx],Ue=()=>["","none",w,Le,De],Re=()=>["none",ct,Le,De],Tt=()=>["none",ct,Le,De],tt=()=>[ct,Le,De],gt=()=>[oa,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[zi],breakpoint:[zi],color:[H1],container:[zi],"drop-shadow":[zi],ease:["in","out","in-out"],font:[ZC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[zi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[zi],shadow:[zi],spacing:["px",ct],text:[zi],"text-shadow":[zi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",oa,De,Le,N]}],container:["container"],columns:[{columns:[ct,De,Le,f]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:$()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{"inset-s":ie(),start:ie()}],end:[{"inset-e":ie(),end:ie()}],"inset-bs":[{"inset-bs":ie()}],"inset-be":[{"inset-be":ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[ca,"auto",Le,De]}],basis:[{basis:[oa,"full","auto",f,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ct,oa,"auto","initial","none",De]}],grow:[{grow:["",ct,Le,De]}],shrink:[{shrink:["",ct,Le,De]}],order:[{order:[ca,"first","last","none",Le,De]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":we()}],"auto-rows":[{"auto-rows":we()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...V()]}],"min-inline-size":[{"min-inline":["auto",...V()]}],"max-inline-size":[{"max-inline":["none",...V()]}],"block-size":[{block:["auto",...fe()]}],"min-block-size":[{"min-block":["auto",...fe()]}],"max-block-size":[{"max-block":["none",...fe()]}],w:[{w:[f,"screen",...Y()]}],"min-w":[{"min-w":[f,"screen","none",...Y()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",r,Zl,Fa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,aT,JC]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",kh,De]}],"font-family":[{font:[nT,eT,t]}],"font-features":[{"font-features":[De]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,Le,De]}],"line-clamp":[{"line-clamp":[ct,"none",Le,Wx]}],leading:[{leading:[o,...R()]}],"list-image":[{"list-image":["none",Le,De]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Le,De]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:[ct,"from-font","auto",Le,Fa]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[ct,"auto",Le,De]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Le,De]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Le,De]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ca,Le,De],radial:["",Le,De],conic:[ca,Le,De]},iT,tT]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:be()}],"rounded-s":[{"rounded-s":be()}],"rounded-e":[{"rounded-e":be()}],"rounded-t":[{"rounded-t":be()}],"rounded-r":[{"rounded-r":be()}],"rounded-b":[{"rounded-b":be()}],"rounded-l":[{"rounded-l":be()}],"rounded-ss":[{"rounded-ss":be()}],"rounded-se":[{"rounded-se":be()}],"rounded-ee":[{"rounded-ee":be()}],"rounded-es":[{"rounded-es":be()}],"rounded-tl":[{"rounded-tl":be()}],"rounded-tr":[{"rounded-tr":be()}],"rounded-br":[{"rounded-br":be()}],"rounded-bl":[{"rounded-bl":be()}],"border-w":[{border:ye()}],"border-w-x":[{"border-x":ye()}],"border-w-y":[{"border-y":ye()}],"border-w-s":[{"border-s":ye()}],"border-w-e":[{"border-e":ye()}],"border-w-bs":[{"border-bs":ye()}],"border-w-be":[{"border-be":ye()}],"border-w-t":[{"border-t":ye()}],"border-w-r":[{"border-r":ye()}],"border-w-b":[{"border-b":ye()}],"border-w-l":[{"border-l":ye()}],"divide-x":[{"divide-x":ye()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ye()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...le(),"hidden","none"]}],"divide-style":[{divide:[...le(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...le(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ct,Le,De]}],"outline-w":[{outline:["",ct,Zl,Fa]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",g,ru,nu]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",x,ru,nu]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:ye()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[ct,Fa]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":ye()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",y,ru,nu]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[ct,Le,De]}],"mix-blend":[{"mix-blend":[...xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":xe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ct]}],"mask-image-linear-from-pos":[{"mask-linear-from":pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":pe()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":pe()}],"mask-image-t-to-pos":[{"mask-t-to":pe()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":pe()}],"mask-image-r-to-pos":[{"mask-r-to":pe()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":pe()}],"mask-image-b-to-pos":[{"mask-b-to":pe()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":pe()}],"mask-image-l-to-pos":[{"mask-l-to":pe()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":pe()}],"mask-image-x-to-pos":[{"mask-x-to":pe()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":pe()}],"mask-image-y-to-pos":[{"mask-y-to":pe()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[Le,De]}],"mask-image-radial-from-pos":[{"mask-radial-from":pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":pe()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"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":F()}],"mask-image-conic-pos":[{"mask-conic":[ct]}],"mask-image-conic-from-pos":[{"mask-conic-from":pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":pe()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Le,De]}],filter:[{filter:["","none",Le,De]}],blur:[{blur:Ue()}],brightness:[{brightness:[ct,Le,De]}],contrast:[{contrast:[ct,Le,De]}],"drop-shadow":[{"drop-shadow":["","none",v,ru,nu]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",ct,Le,De]}],"hue-rotate":[{"hue-rotate":[ct,Le,De]}],invert:[{invert:["",ct,Le,De]}],saturate:[{saturate:[ct,Le,De]}],sepia:[{sepia:["",ct,Le,De]}],"backdrop-filter":[{"backdrop-filter":["","none",Le,De]}],"backdrop-blur":[{"backdrop-blur":Ue()}],"backdrop-brightness":[{"backdrop-brightness":[ct,Le,De]}],"backdrop-contrast":[{"backdrop-contrast":[ct,Le,De]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ct,Le,De]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ct,Le,De]}],"backdrop-invert":[{"backdrop-invert":["",ct,Le,De]}],"backdrop-opacity":[{"backdrop-opacity":[ct,Le,De]}],"backdrop-saturate":[{"backdrop-saturate":[ct,Le,De]}],"backdrop-sepia":[{"backdrop-sepia":["",ct,Le,De]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Le,De]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ct,"initial",Le,De]}],ease:[{ease:["linear","initial",S,Le,De]}],delay:[{delay:[ct,Le,De]}],animate:[{animate:["none",O,Le,De]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,Le,De]}],"perspective-origin":[{"perspective-origin":$()}],rotate:[{rotate:Re()}],"rotate-x":[{"rotate-x":Re()}],"rotate-y":[{"rotate-y":Re()}],"rotate-z":[{"rotate-z":Re()}],scale:[{scale:Tt()}],"scale-x":[{"scale-x":Tt()}],"scale-y":[{"scale-y":Tt()}],"scale-z":[{"scale-z":Tt()}],"scale-3d":["scale-3d"],skew:[{skew:tt()}],"skew-x":[{"skew-x":tt()}],"skew-y":[{"skew-y":tt()}],transform:[{transform:[Le,De,"","none","gpu","cpu"]}],"transform-origin":[{origin:$()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:gt()}],"translate-x":[{"translate-x":gt()}],"translate-y":[{"translate-y":gt()}],"translate-z":[{"translate-z":gt()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Le,De]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Le,De]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[ct,Zl,Fa,Wx]}],stroke:[{stroke:["none",...A()]}],"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"]}},oT=PC(lT);function ne(...e){return oT(yC(e))}async function Dt(e,t){const r=await fetch(e,{...t,headers:{...E1(),...t?.headers}});if(!r.ok){const a=await r.text().catch(()=>"");throw new Error(`${r.status}: ${a||r.statusText}`)}return r.json()}function ri(e){return/[Zz]$/.test(e)||/[+-]\d{2}:\d{2}$/.test(e)?new Date(e):new Date(e.replace(" ","T")+"Z")}function Ru(e,t,r,a,l){const o=r.startsWith("/")?r:`${t}/${r}`,c=o.replace(/^\//,""),f=a??1,h=1;switch(e){case"vscode":return`vscode://file/${c}:${f}:${h}`;case"cursor":return`cursor://file/${c}:${f}:${h}`;case"windsurf":return`windsurf://file/${c}:${f}:${h}`;case"jetbrains":return`jetbrains://open?file=${encodeURIComponent(o)}&line=${f}`;case"sublime":return`subl://open?url=file://${encodeURIComponent(o)}&line=${f}`}}function cT(e){return e==="success"?"complete":e==="incomplete"?"incomplete":e==="failed"?"failed":e==="cancelled"?"cancelled":"running"}const X1=E.createContext(null);function uT({children:e}){const[t,r]=E.useState(new Map),[a,l]=E.useState(null),o=E.useRef(!1),{socket:c}=ai(),f=E.useMemo(()=>Array.from(t.values()),[t]),h=E.useMemo(()=>f.filter(v=>v.status==="running").length,[f]),m=E.useMemo(()=>h>0,[h]);E.useEffect(()=>{o.current||(o.current=!0,Dt("/api/commands/active").then(v=>{if(v.commands.length>0){const w=new Map;let _=null;for(const N of v.commands)w.set(N.execution_id,{executionId:N.execution_id,command:N.command,output:N.output??"",events:[],status:"running",exitCode:null,startedAt:N.started_at}),_=N.execution_id;r(w),l(_);for(const N of v.commands)Dt(`/api/commands/${N.execution_id}/events`).then(S=>{!S.events||S.events.length===0||r(O=>{const z=O.get(N.execution_id);if(!z)return O;const F=new Set(z.events.map(G=>G.seq)),$=[...z.events];for(const G of S.events)F.has(G.seq)||$.push(G);$.sort((G,R)=>G.seq-R.seq);const j=new Map(O);return j.set(N.execution_id,{...z,events:$}),j})}).catch(()=>{})}}).catch(()=>{}))},[]),ut("command:started",v=>{const w={executionId:v.execution_id,command:v.command,output:"",events:[],status:"running",exitCode:null,startedAt:v.started_at};r(_=>{const N=new Map(_);return N.set(v.execution_id,w),N}),l(v.execution_id)}),ut("command:output",v=>{r(w=>{const _=w.get(v.execution_id);if(!_)return w;const N=new Map(w);return N.set(v.execution_id,{..._,output:_.output+v.content}),N})}),ut("command:event",v=>{r(w=>{const _=w.get(v.executionId);if(!_||_.events.some(S=>S.seq===v.seq))return w;const N=new Map(w);return N.set(v.executionId,{..._,events:[..._.events,v]}),N})}),ut("command:finished",v=>{r(w=>{const _=w.get(v.execution_id);if(!_)return w;const N=new Map(w),S=v.outcome?cT(v.outcome):v.exitCode===-2?"cancelled":v.exitCode===0?"complete":"failed";return N.set(v.execution_id,{..._,status:S,exitCode:v.exitCode}),N})});const g=E.useCallback(v=>{r(w=>{const _=new Map(w);return _.delete(v),l(N=>{if(N!==v)return N;const S=Array.from(_.keys());return S.length>0?S[S.length-1]:null}),_})},[]),x=E.useCallback(v=>{c?.emit("command:cancel",{execution_id:v})},[c]),y=E.useMemo(()=>({tabs:f,activeTabId:a,runningCount:h,isRunning:m,setActiveTabId:l,dismissTab:g,cancelCommand:x}),[f,a,h,m,g,x]);return d.jsx(X1,{value:y,children:e})}function $m(){const e=E.useContext(X1);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 Z1=(...e)=>e.filter((t,r,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===r).join(" ").trim();/**
|
|
67
|
-
* @license lucide-react v0.577.0 - ISC
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the ISC license.
|
|
70
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const dT=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 fT=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,a)=>a?a.toUpperCase():r.toLowerCase());/**
|
|
77
|
-
* @license lucide-react v0.577.0 - ISC
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the ISC license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const ty=e=>{const t=fT(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
82
|
-
* @license lucide-react v0.577.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/var hT={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 mT=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
|
92
|
-
* @license lucide-react v0.577.0 - ISC
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the ISC license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const pT=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:l="",children:o,iconNode:c,...f},h)=>E.createElement("svg",{ref:h,...hT,width:t,height:t,stroke:e,strokeWidth:a?Number(r)*24/Number(t):r,className:Z1("lucide",l),...!o&&!mT(f)&&{"aria-hidden":"true"},...f},[...c.map(([m,g])=>E.createElement(m,g)),...Array.isArray(o)?o:[o]]));/**
|
|
97
|
-
* @license lucide-react v0.577.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const Ne=(e,t)=>{const r=E.forwardRef(({className:a,...l},o)=>E.createElement(pT,{ref:o,iconNode:t,className:Z1(`lucide-${dT(ty(e))}`,`lucide-${e}`,a),...l}));return r.displayName=ty(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 gT=[["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"}]],bT=Ne("accessibility",gT);/**
|
|
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 xT=[["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"}]],Gm=Ne("activity",xT);/**
|
|
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 yT=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],W1=Ne("arrow-down",yT);/**
|
|
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 vT=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],xa=Ne("arrow-left",vT);/**
|
|
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 kT=[["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"}]],J1=Ne("arrow-up-down",kT);/**
|
|
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 wT=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],ET=Ne("arrow-up",wT);/**
|
|
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 _T=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],NT=Ne("ban",_T);/**
|
|
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 ST=[["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"}]],zT=Ne("blocks",ST);/**
|
|
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 CT=[["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"}]],TT=Ne("book-open",CT);/**
|
|
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 AT=[["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"}]],RT=Ne("bot",AT);/**
|
|
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 OT=[["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"}]],ek=Ne("brain",OT);/**
|
|
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 MT=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],jr=Ne("check",MT);/**
|
|
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 jT=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Za=Ne("chevron-down",jT);/**
|
|
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 DT=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ji=Ne("chevron-right",DT);/**
|
|
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 LT=[["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"}]],Yu=Ne("circle-alert",LT);/**
|
|
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 IT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ro=Ne("circle-check",IT);/**
|
|
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 BT=[["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"}]],tk=Ne("circle-question-mark",BT);/**
|
|
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 UT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],PT=Ne("circle-slash",UT);/**
|
|
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 FT=[["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"}]],Km=Ne("circle-x",FT);/**
|
|
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 HT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],qT=Ne("circle",HT);/**
|
|
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 $T=[["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"}]],nk=Ne("clipboard-copy",$T);/**
|
|
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 GT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],rk=Ne("clock",GT);/**
|
|
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 KT=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],VT=Ne("cloud",KT);/**
|
|
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 YT=[["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"}]],QT=Ne("compass",YT);/**
|
|
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 XT=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Qu=Ne("copy",XT);/**
|
|
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 ZT=[["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"}]],WT=Ne("crown",ZT);/**
|
|
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 JT=[["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"}]],eA=Ne("database",JT);/**
|
|
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 tA=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],nA=Ne("ellipsis",tA);/**
|
|
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 rA=[["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"}]],Vm=Ne("external-link",rA);/**
|
|
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 iA=[["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"}]],aA=Ne("eye",iA);/**
|
|
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 sA=[["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"}]],lA=Ne("file-code",sA);/**
|
|
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 oA=[["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"}]],Ri=Ne("file-search",oA);/**
|
|
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 cA=[["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"}]],Oo=Ne("file-text",cA);/**
|
|
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 uA=[["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"}]],dA=Ne("file",uA);/**
|
|
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 fA=[["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"}]],hA=Ne("folder-open-dot",fA);/**
|
|
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 mA=[["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"}]],pA=Ne("folder-open",mA);/**
|
|
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 gA=[["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"}]],ik=Ne("funnel",gA);/**
|
|
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 bA=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],xA=Ne("gauge",bA);/**
|
|
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 yA=[["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"}]],Qs=Ne("git-branch",yA);/**
|
|
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 vA=[["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"}]],ak=Ne("github",vA);/**
|
|
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 kA=[["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"}]],wA=Ne("handshake",kA);/**
|
|
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 EA=[["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"}]],ny=Ne("history",EA);/**
|
|
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 _A=[["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"}]],NA=Ne("house",_A);/**
|
|
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 SA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],sk=Ne("info",SA);/**
|
|
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 zA=[["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"}]],CA=Ne("layers",zA);/**
|
|
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 TA=[["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"}]],AA=Ne("lightbulb",TA);/**
|
|
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 RA=[["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"}]],OA=Ne("link-2",RA);/**
|
|
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 MA=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],jA=Ne("list",MA);/**
|
|
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 DA=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],qr=Ne("loader-circle",DA);/**
|
|
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 LA=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],ya=Ne("map",LA);/**
|
|
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 IA=[["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"}]],lk=Ne("message-circle",IA);/**
|
|
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 BA=[["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"}]],Ou=Ne("message-square",BA);/**
|
|
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 UA=[["path",{d:"M5 12h14",key:"1ays0h"}]],xo=Ne("minus",UA);/**
|
|
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 PA=[["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"}]],FA=Ne("monitor",PA);/**
|
|
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 HA=[["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"}]],qA=Ne("moon",HA);/**
|
|
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 $A=[["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"}]],GA=Ne("panels-top-left",$A);/**
|
|
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 KA=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],yo=Ne("pen-line",KA);/**
|
|
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 VA=[["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"}]],Gs=Ne("play",VA);/**
|
|
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 YA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],pa=Ne("plus",YA);/**
|
|
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 QA=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],vo=Ne("refresh-cw",QA);/**
|
|
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 XA=[["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"}]],ZA=Ne("rocket",XA);/**
|
|
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 WA=[["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"}]],Ym=Ne("rotate-ccw",WA);/**
|
|
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 JA=[["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"}]],ry=Ne("save",JA);/**
|
|
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 eR=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Xu=Ne("search",eR);/**
|
|
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 tR=[["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"}]],nR=Ne("send-horizontal",tR);/**
|
|
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 rR=[["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"}]],iy=Ne("send",rR);/**
|
|
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 iR=[["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"}]],aR=Ne("server",iR);/**
|
|
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 sR=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],ok=Ne("settings-2",sR);/**
|
|
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 lR=[["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"}]],Qm=Ne("shield-alert",lR);/**
|
|
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=[["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"}]],cR=Ne("shield",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 uR=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],dR=Ne("smartphone",uR);/**
|
|
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 fR=[["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"}]],Mo=Ne("sparkles",fR);/**
|
|
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 hR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],mR=Ne("square",hR);/**
|
|
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 pR=[["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"}]],gR=Ne("sun",pR);/**
|
|
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 bR=[["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"}]],xR=Ne("swords",bR);/**
|
|
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 yR=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Oi=Ne("terminal",yR);/**
|
|
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 vR=[["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"}]],kR=Ne("test-tube",vR);/**
|
|
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 wR=[["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"}]],ER=Ne("test-tubes",wR);/**
|
|
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 _R=[["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"}]],NR=Ne("trash-2",_R);/**
|
|
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 SR=[["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"}]],Wa=Ne("triangle-alert",SR);/**
|
|
502
|
-
* @license lucide-react v0.577.0 - ISC
|
|
503
|
-
*
|
|
504
|
-
* This source code is licensed under the ISC license.
|
|
505
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
506
|
-
*/const zR=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],CR=Ne("user-plus",zR);/**
|
|
507
|
-
* @license lucide-react v0.577.0 - ISC
|
|
508
|
-
*
|
|
509
|
-
* This source code is licensed under the ISC license.
|
|
510
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
511
|
-
*/const TR=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Va=Ne("user",TR);/**
|
|
512
|
-
* @license lucide-react v0.577.0 - ISC
|
|
513
|
-
*
|
|
514
|
-
* This source code is licensed under the ISC license.
|
|
515
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
516
|
-
*/const AR=[["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"}]],Xm=Ne("users",AR);/**
|
|
517
|
-
* @license lucide-react v0.577.0 - ISC
|
|
518
|
-
*
|
|
519
|
-
* This source code is licensed under the ISC license.
|
|
520
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
521
|
-
*/const RR=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],ck=Ne("wrench",RR);/**
|
|
522
|
-
* @license lucide-react v0.577.0 - ISC
|
|
523
|
-
*
|
|
524
|
-
* This source code is licensed under the ISC license.
|
|
525
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
526
|
-
*/const OR=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Bn=Ne("x",OR);function MR(e){return d.jsxs("svg",{viewBox:"0 0 224 372",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...e,children:[d.jsx("path",{d:"M89.8869 121.506C90.7975 127.755 88.7034 134.067 84.2381 138.532L39.604 183.166C31.7936 190.977 31.7936 203.64 39.604 211.451L139.425 311.271C142.772 314.619 144.824 319.045 145.214 323.763L148.305 361.09C148.612 364.803 144.124 366.883 141.49 364.249L5.85787 228.617C2.10714 224.866 0 219.779 0 214.475V180.143C0 174.838 2.10714 169.751 5.85786 166.001L79.2214 92.637C81.5484 90.3099 85.5334 91.632 86.008 94.8886L89.8869 121.506Z"}),d.jsx("path",{d:"M133.868 250.458C132.957 244.209 135.051 237.897 139.517 233.431L184.151 188.797C191.961 180.987 191.961 168.324 184.151 160.513L84.3302 60.6925C80.9827 57.345 78.9311 52.9185 78.5405 48.2006L75.4501 10.8735C75.1427 7.16103 79.6307 5.08094 82.2649 7.71505L217.897 143.347C221.648 147.098 223.755 152.185 223.755 157.489V191.821C223.755 197.126 221.648 202.213 217.897 205.963L144.534 279.327C142.206 281.654 138.221 280.332 137.747 277.075L133.868 250.458Z"}),d.jsx("path",{d:"M68.5498 211.08L127.488 152.142C135.298 144.332 147.961 144.332 155.772 152.142L159.337 155.707L100.399 214.645C92.5886 222.455 79.9253 222.455 72.1148 214.645L68.5498 211.08Z"})]})}function Xs(){return nn({queryKey:["config"],queryFn:()=>Dt("/api/config"),staleTime:1/0})}const jR=[{to:"/",label:"Home",icon:NA},{to:"/commands",label:"Commands",icon:Oi},{to:"/reviewers",label:"Team",icon:Xm},{to:"/sessions",label:"Sessions",icon:Qs},{to:"/reviews",label:"Reviews",icon:Ri}],DR={connected:"bg-emerald-500",connecting:"bg-amber-500 animate-pulse",reconnecting:"bg-amber-500 animate-pulse",disconnected:"bg-red-500"};function LR(){const e=ii(),{status:t}=ai(),{runningCount:r}=$m(),{data:a}=Xs();return E.useEffect(()=>{if(a?.workspaceName){const l=a.gitBranch?` (${a.gitBranch})`:"";document.title=`${a.workspaceName}${l} — OCR Dashboard`}else document.title="OCR Dashboard"},[a?.workspaceName,a?.gitBranch]),d.jsxs("aside",{className:"flex h-full w-56 flex-col border-r border-zinc-200 bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-950",children:[d.jsxs("div",{className:"group/brand relative flex h-14 items-center gap-2.5 border-b border-zinc-200 px-4 dark:border-zinc-800",children:[d.jsx(MR,{className:"h-6 w-auto shrink-0 text-zinc-900 dark:text-zinc-100"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"OCR Dashboard"}),a?.workspaceName&&d.jsxs("span",{className:"block truncate text-[11px] text-zinc-500 dark:text-zinc-400",children:[a.workspaceName,a.gitBranch&&d.jsxs("span",{className:"ml-1 text-zinc-400 dark:text-zinc-500",children:["(",a.gitBranch,")"]})]})]}),a?.workspaceName&&d.jsxs("div",{className:"pointer-events-none absolute left-full top-2 z-50 ml-2 min-w-[280px] max-w-sm opacity-0 transition-opacity delay-300 group-hover/brand:opacity-100",children:[d.jsx("div",{className:"absolute -left-1 top-3 h-2 w-2 rotate-45 bg-zinc-900 dark:bg-zinc-700"}),d.jsxs("div",{className:"relative rounded-lg bg-zinc-900 px-3 py-2 text-xs shadow-lg dark:bg-zinc-700",children:[d.jsx("div",{className:"font-medium text-white",children:a.workspaceName}),a.gitBranch&&d.jsx("div",{className:"mt-0.5 font-mono text-emerald-400",children:a.gitBranch}),d.jsx("div",{className:"mt-1.5 break-words border-t border-zinc-700 pt-1.5 font-mono text-[10px] text-zinc-400 dark:border-zinc-600",children:a.projectRoot})]})]})]}),d.jsx("nav",{className:"flex-1 space-y-1 p-2",children:jR.map(({to:l,label:o,icon:c})=>{const f=l==="/"?e.pathname==="/":e.pathname.startsWith(l);return d.jsxs(In,{to:l,className:ne("flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors",f?"bg-zinc-200 font-medium text-zinc-900 dark:bg-zinc-800 dark:text-zinc-100":"text-zinc-600 hover:bg-zinc-100 hover:text-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-900 dark:hover:text-zinc-100"),children:[d.jsx(c,{className:"h-4 w-4"}),o,l==="/commands"&&r>0&&d.jsx("span",{className:"ml-auto inline-flex h-5 min-w-[20px] items-center justify-center rounded-full bg-indigo-500 px-1.5 text-[10px] font-semibold text-white",children:r})]},l)})}),d.jsx("div",{className:"border-t border-zinc-200 p-3 dark:border-zinc-800",children:d.jsxs("div",{role:"status","aria-label":`Connection status: ${t}`,className:"flex items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[d.jsx("div",{className:ne("h-2 w-2 rounded-full",DR[t]),"aria-hidden":"true"}),d.jsx("span",{className:"capitalize",children:t})]})})]})}const IR={system:FA,light:gR,dark:qA};function BR(e){if(e==="/")return[{label:"Home",path:"/"}];const t=e.split("/").filter(Boolean),r=[{label:"Home",path:"/"}];let a="";for(const l of t){a+=`/${l}`;const o=l.charAt(0).toUpperCase()+l.slice(1).replace(/-/g," ");r.push({label:o,path:a})}return r}function UR(){const{mode:e,cycle:t}=l1(),r=ii(),a=BR(r.pathname),l=IR[e];return d.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-zinc-200 px-6 dark:border-zinc-800",children:[d.jsx("nav",{className:"flex items-center gap-1 text-sm","aria-label":"Breadcrumb",children:a.map((o,c)=>d.jsxs("span",{className:"flex items-center gap-1",children:[c>0&&d.jsx("span",{className:"text-zinc-400 dark:text-zinc-600",children:"/"}),c<a.length-1?d.jsx(In,{to:o.path,className:ne("text-zinc-500 dark:text-zinc-400","hover:text-zinc-700 dark:hover:text-zinc-200"),children:o.label}):d.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:o.label})]},o.path))}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("a",{href:"https://github.com/spencermarx/open-code-review",target:"_blank",rel:"noopener noreferrer",className:"flex h-8 w-8 items-center justify-center rounded-md text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100","aria-label":"Documentation on GitHub",title:"Docs",children:d.jsx(ak,{className:"h-4 w-4"})}),d.jsx("button",{onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-md text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100","aria-label":`Theme: ${e}. Click to cycle.`,title:`Theme: ${e}`,children:d.jsx(l,{className:"h-4 w-4"})})]})]})}function PR(){return d.jsxs("div",{className:"flex h-screen bg-white text-zinc-900 dark:bg-zinc-950 dark:text-zinc-100",children:[d.jsx(LR,{}),d.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[d.jsx(UR,{}),d.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:d.jsx(nz,{})})]})]})}class FR extends E.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("ErrorBoundary caught a render error:",t,r.componentStack)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:d.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:d.jsxs("div",{className:"max-w-md rounded-lg border border-red-200 bg-red-50 p-6 text-center dark:border-red-900/50 dark:bg-red-950/30",children:[d.jsx(Wa,{className:"mx-auto h-8 w-8 text-red-500"}),d.jsx("h2",{className:"mt-3 text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Something went wrong"}),d.jsx("p",{className:"mt-1 text-sm text-zinc-600 dark:text-zinc-400",children:this.state.error?.message??"An unexpected error occurred."}),d.jsxs("button",{onClick:()=>this.setState({hasError:!1,error:null}),className:"mt-4 inline-flex items-center gap-2 rounded-md bg-zinc-900 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200",children:[d.jsx(vo,{className:"h-4 w-4"}),"Try again"]})]})}):this.props.children}}function Ci(){return d.jsx("div",{className:"flex min-h-[400px] items-center justify-center",children:d.jsxs("div",{className:"max-w-md rounded-lg border border-red-200 bg-red-50 p-8 text-center dark:border-red-900/50 dark:bg-red-950/30",children:[d.jsx(Wa,{className:"mx-auto h-10 w-10 text-red-500"}),d.jsx("h1",{className:"mt-4 text-xl font-semibold text-zinc-900 dark:text-zinc-100",children:"Page Error"}),d.jsx("p",{className:"mt-2 text-sm text-zinc-600 dark:text-zinc-400",children:"This page encountered an error. Try navigating back or refreshing."}),d.jsxs("div",{className:"mt-6 flex justify-center gap-3",children:[d.jsx("button",{onClick:()=>window.history.back(),className:"rounded-md border border-zinc-300 bg-white px-4 py-2 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Go back"}),d.jsxs("button",{onClick:()=>window.location.reload(),className:"inline-flex items-center gap-2 rounded-md bg-zinc-900 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200",children:[d.jsx(vo,{className:"h-4 w-4"}),"Reload"]})]})]})})}function js({title:e,value:t,icon:r,trend:a}){return d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:e}),d.jsx(r,{className:"h-4 w-4 text-zinc-400 dark:text-zinc-500"})]}),d.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[d.jsx("span",{className:"text-2xl font-semibold text-zinc-900 dark:text-zinc-100",children:t}),a&&d.jsx("span",{className:ne("text-xs font-medium",a==="up"?"text-emerald-600 dark:text-emerald-400":"text-red-600 dark:text-red-400"),children:a==="up"?"↑":"↓"})]})]})}const ay={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"},HR={wont_fix:"Won't Fix",needs_review:"Needs Review",in_progress:"In Progress",changes_made:"Changes Made"};function Zs({variant:e,label:t,className:r}){const a=t??HR[e]??e.charAt(0).toUpperCase()+e.slice(1);return d.jsx("span",{className:ne("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium",ay[e]??ay.default,r),children:a})}function qR(e){return ri(e).toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function $R(e){return ri(e).toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function GR(e){return ri(e).toLocaleString()}function KR(e){const t=Math.floor((Date.now()-ri(e).getTime())/1e3);if(t<60)return"just now";const r=Math.floor(t/60);if(r<60)return`${r}m ago`;const a=Math.floor(r/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function Eu(e){const t=Date.now()-ri(e).getTime(),r=Math.floor(t/1e3);if(r<60)return`${r}s`;const a=Math.floor(r/60);if(a<60)return`${a}m`;const l=Math.floor(a/60);return l<24?`${l}h`:`${Math.floor(l/24)}d`}function VR(e){return e==null||Number.isNaN(e)?"-":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function YR({sessions:e}){return e.length===0?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No sessions yet. Run a code review or map to get started."}):d.jsx("div",{className:"space-y-1",children:e.map(t=>{const r=t.workflow_type==="map"?ya:Ri;return d.jsxs(In,{to:`/sessions/${t.id}`,className:"flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors hover:bg-zinc-100 dark:hover:bg-zinc-800/50",children:[d.jsx(Qs,{className:"h-4 w-4 shrink-0 text-zinc-400"}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-zinc-900 dark:text-zinc-100",children:t.branch}),d.jsx(r,{className:"h-3.5 w-3.5 shrink-0 text-zinc-400"}),d.jsx(Zs,{variant:t.status}),d.jsx("span",{className:"shrink-0 text-xs text-zinc-400 dark:text-zinc-500",children:KR(t.updated_at)})]},t.id)})})}function QR(){const e=nn({queryKey:["stats"],queryFn:()=>Dt("/api/stats")}),t=nn({queryKey:["sessions","recent"],queryFn:()=>Dt("/api/sessions?limit=10")}),r=e.data;return d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold",children:"Dashboard"}),d.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:"Overview of your code review activity."})]}),(e.isError||t.isError)&&d.jsx("div",{className:"rounded-lg border border-red-500/25 bg-red-500/5 p-4 text-sm text-red-600 dark:text-red-400",children:"Failed to load dashboard data. Check that the server is running."}),d.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[d.jsx(js,{title:"Total Sessions",value:r?.totalSessions??0,icon:Qs}),d.jsx(js,{title:"Active Sessions",value:r?.activeSessions??0,icon:Gm}),d.jsx(js,{title:"Completed Reviews",value:r?.completedReviews??0,icon:Ri}),d.jsx(js,{title:"Completed Maps",value:r?.completedMaps??0,icon:ya}),d.jsx(js,{title:"Files Tracked",value:r?.filesTracked??0,icon:dA}),d.jsx(js,{title:"Unresolved Blockers",value:r?.unresolvedBlockers??0,icon:Wa})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"mb-4 text-lg font-medium text-zinc-900 dark:text-zinc-100",children:"Recent Sessions"}),d.jsx("div",{className:"rounded-lg border border-zinc-200 bg-white p-4 dark:border-zinc-800 dark:bg-zinc-900",children:t.isLoading?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading..."}):d.jsx(YR,{sessions:t.data??[]})})]})]})}function XR(){const e=Rn(),t=nn({queryKey:["sessions"],queryFn:()=>Dt("/api/sessions")});return ut("session:created",()=>{e.invalidateQueries({queryKey:["sessions"]})}),ut("session:updated",()=>{e.invalidateQueries({queryKey:["sessions"]})}),t}function ZR(e){const t=Rn(),r=nn({queryKey:["sessions",e],queryFn:()=>Dt(`/api/sessions/${e}`),enabled:!!e});return ut("session:updated",()=>{t.invalidateQueries({queryKey:["sessions",e]})}),r}const WR=[{value:"all",label:"All"},{value:"active",label:"Active"},{value:"closed",label:"Closed"}],JR=[{value:"all",label:"All"},{value:"review",label:"Review"},{value:"map",label:"Map"}];function sy({options:e,value:t,onChange:r,label:a}){return d.jsx("div",{role:"group","aria-label":a,className:"inline-flex rounded-md border border-zinc-200 dark:border-zinc-700",children:e.map((l,o)=>d.jsx("button",{onClick:()=>r(l.value),"aria-pressed":t===l.value,className:ne("px-3 py-1.5 text-xs font-medium transition-colors",o>0&&"border-l border-zinc-200 dark:border-zinc-700",o===0&&"rounded-l-md",o===e.length-1&&"rounded-r-md",t===l.value?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"bg-white text-zinc-600 hover:bg-zinc-50 dark:bg-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-800"),children:l.label},l.value))})}function e5({statusFilter:e,workflowFilter:t,onStatusChange:r,onWorkflowChange:a}){return d.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Status:"}),d.jsx(sy,{label:"Filter by status",options:WR,value:e,onChange:r}),d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Workflow:"}),d.jsx(sy,{label:"Filter by workflow",options:JR,value:t,onChange:a})]})}const _u={APPROVED:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400",APPROVE:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400",LGTM:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400","REQUEST CHANGES":"bg-red-500/15 text-red-700 dark:text-red-400","CHANGES REQUESTED":"bg-red-500/15 text-red-700 dark:text-red-400","NEEDS DISCUSSION":"bg-amber-500/15 text-amber-700 dark:text-amber-400","NEEDS WORK":"bg-amber-500/15 text-amber-700 dark:text-amber-400"};function t5(e){const t=e.trim().toUpperCase(),r=Object.keys(_u).sort((a,l)=>l.length-a.length);for(const a of r)if(t.startsWith(a))return a;return t.length>30?`${t.slice(0,30).trim()}…`:t}function n5(e){const t=e.trim().toUpperCase();if(_u[t])return _u[t];for(const[r,a]of Object.entries(_u))if(t.startsWith(r))return a;return"bg-amber-500/15 text-amber-700 dark:text-amber-400"}const r5=new Set(["changes_made","acknowledged","dismissed"]),i5={changes_made:"Changes Made",acknowledged:"Acknowledged",dismissed:"Dismissed"};function a5({session:e}){const r=e.has_review&&e.has_map?"Review + Map":e.has_map?"Map":"Review",l=(e.has_review?e.review_phase:e.map_phase).split("-").map(f=>f.charAt(0).toUpperCase()+f.slice(1)).join(" "),o=e.latest_round_status,c=o!=null&&r5.has(o);return d.jsxs(In,{to:`/sessions/${e.id}`,className:"group block rounded-lg border border-zinc-200 bg-white p-4 transition-colors hover:border-zinc-300 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700 dark:hover:bg-zinc-800/50",children:[d.jsxs("div",{className:"flex items-start justify-between gap-2",children:[d.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d.jsx(Qs,{className:"h-4 w-4 shrink-0 text-zinc-400"}),d.jsx("span",{className:"truncate text-sm font-medium text-zinc-900 dark:text-zinc-100",children:e.branch})]}),d.jsx(Zs,{variant:e.status})]}),d.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[d.jsxs("span",{className:"flex items-center gap-1",children:[e.has_review&&d.jsx(Ri,{className:"h-3.5 w-3.5"}),e.has_map&&d.jsx(ya,{className:"h-3.5 w-3.5"}),d.jsx("span",{children:r})]}),d.jsx("span",{className:"text-zinc-300 dark:text-zinc-700",children:"|"}),e.latest_verdict?d.jsx("span",{className:"flex items-center gap-1.5",children:c?d.jsx("span",{className:"inline-flex items-center rounded bg-zinc-500/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase text-zinc-500 dark:text-zinc-400",children:i5[o]??o}):d.jsxs(d.Fragment,{children:[d.jsx("span",{className:ne("inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-semibold uppercase",n5(e.latest_verdict)),children:t5(e.latest_verdict)}),e.latest_blocker_count>0&&d.jsxs("span",{className:"inline-flex items-center rounded bg-red-500/15 px-1.5 py-0.5 text-[10px] font-semibold text-red-700 dark:text-red-400",children:[e.latest_blocker_count," blocker",e.latest_blocker_count!==1?"s":""]})]})}):d.jsxs("span",{children:["Phase: ",l]})]}),d.jsxs("div",{className:"mt-2 flex items-center gap-3 text-xs text-zinc-400 dark:text-zinc-500",children:[d.jsx("span",{children:$R(e.started_at)}),d.jsxs("span",{className:"flex items-center gap-1",children:[d.jsx(rk,{className:"h-3 w-3"}),Eu(e.updated_at)]})]})]})}function s5({sessions:e}){return e.length===0?d.jsx("p",{className:"py-8 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No sessions match your filters."}):d.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(t=>d.jsx(a5,{session:t},t.id))})}function l5(){const{data:e,isLoading:t}=XR(),[r,a]=E.useState("all"),[l,o]=E.useState("all"),c=E.useMemo(()=>e?e.filter(f=>!(r!=="all"&&f.status!==r||l!=="all"&&f.workflow_type!==l)):[],[e,r,l]);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold",children:"Sessions"}),d.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:"All code review and map sessions."})]}),d.jsx(e5,{statusFilter:r,workflowFilter:l,onStatusChange:a,onWorkflowChange:o}),t?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading sessions..."}):d.jsx(s5,{sessions:c})]})}function uk(e){const t=Rn(),r=nn({queryKey:["agent-sessions",e],queryFn:()=>Dt(`/api/agent-sessions?workflow=${encodeURIComponent(e??"")}`),enabled:!!e,refetchInterval:15e3});return ut("agent_session:updated",a=>{e&&(!a?.workflow_ids||a.workflow_ids.includes(e))&&t.invalidateQueries({queryKey:["agent-sessions",e]})}),r}function dk(e){return nn({queryKey:["handoff",e],queryFn:()=>Dt(`/api/sessions/${encodeURIComponent(e??"")}/handoff`),enabled:!!e,staleTime:5e3})}const o5=15*6e4;function fk(e){if(e.length===0)return{status:"idle",newestHeartbeat:null,liveRow:null,orphanedRow:null};const t=Date.now();let r=null,a=-1/0,l=null,o=-1/0,c=null,f=-1/0;for(const h of e){const m=c5(h.last_heartbeat_at);m>f&&(f=m,c=h.last_heartbeat_at),h.status==="running"&&m>a&&(a=m,r=h),h.status==="orphaned"&&m>o&&(o=m,l=h)}return r?{status:t-a<=o5?"running":"stalled",newestHeartbeat:c,liveRow:r,orphanedRow:null}:l?{status:"orphaned",newestHeartbeat:c,liveRow:null,orphanedRow:l}:{status:"idle",newestHeartbeat:c,liveRow:null,orphanedRow:null}}function c5(e){return/[Zz]$/.test(e)||/[+-]\d{2}:\d{2}$/.test(e)?new Date(e).getTime():new Date(e.replace(" ","T")+"Z").getTime()}function wh({phases:e,className:t}){return d.jsx("div",{role:"list","aria-label":"Phase timeline",className:ne("flex items-center gap-1",t),children:e.map((r,a)=>d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx(u5,{phase:r}),a<e.length-1&&d.jsx("div",{className:ne("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 u5({phase:e}){return d.jsxs("div",{className:"group relative flex flex-col items-center",children:[d.jsxs("div",{tabIndex:0,role:"listitem","aria-label":`${e.name}: ${e.status}${e.timestamp?`, ${e.timestamp}`:""}`,className:ne("flex h-6 w-6 items-center justify-center rounded-full border",e.status==="complete"&&"border-emerald-500 bg-emerald-500 text-white",e.status==="active"&&"border-blue-500 bg-blue-500/10 text-blue-600 dark:text-blue-400",e.status==="pending"&&"border-zinc-300 bg-zinc-100 text-zinc-400 dark:border-zinc-600 dark:bg-zinc-800 dark:text-zinc-500",e.status==="skipped"&&"border-zinc-200 bg-zinc-50 text-zinc-300 dark:border-zinc-700 dark:bg-zinc-800/50 dark:text-zinc-600"),children:[e.status==="complete"&&d.jsx(jr,{className:"h-3.5 w-3.5"}),e.status==="active"&&d.jsx(qr,{className:"h-3.5 w-3.5 animate-spin"}),e.status==="pending"&&d.jsx(qT,{className:"h-2.5 w-2.5"}),e.status==="skipped"&&d.jsx(xo,{className:"h-3 w-3"})]}),d.jsxs("div",{className:"pointer-events-none absolute top-8 hidden whitespace-nowrap rounded bg-zinc-900 px-2 py-1 text-xs text-white shadow-lg group-hover:block group-focus-within:block dark:bg-zinc-100 dark:text-zinc-900",children:[d.jsx("span",{className:"font-medium",children:e.name}),e.timestamp&&d.jsx("span",{className:"ml-1 text-zinc-400 dark:text-zinc-500",children:e.timestamp})]})]})}function d5({session:e}){const t=e.has_review,r=e.has_map,a=t?"review":"map",[l,o]=E.useState(a),f=[{id:"review",label:"Review",icon:Ri,visible:t},{id:"map",label:"Map",icon:ya,visible:r}].filter(h=>h.visible);return f.length===0?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No review or map data yet."}):d.jsxs("div",{children:[d.jsx("div",{className:"flex border-b border-zinc-200 dark:border-zinc-800",children:f.map(h=>d.jsxs("button",{onClick:()=>o(h.id),className:ne("flex items-center gap-1.5 border-b-2 px-4 py-2 text-sm font-medium transition-colors",l===h.id?"border-zinc-900 text-zinc-900 dark:border-zinc-100 dark:text-zinc-100":"border-transparent text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300"),children:[d.jsx(h.icon,{className:"h-4 w-4"}),h.label]},h.id))}),d.jsxs("div",{className:"mt-4",children:[l==="review"&&d.jsx(f5,{sessionId:e.id,status:e.status}),l==="map"&&d.jsx(h5,{sessionId:e.id,status:e.status})]})]})}function f5({sessionId:e,status:t}){const r=Rn();ut("artifact:created",()=>{r.invalidateQueries({queryKey:["sessions",e,"rounds"]})}),ut("artifact:updated",()=>{r.invalidateQueries({queryKey:["sessions",e,"rounds"]})});const{data:a,isLoading:l}=nn({queryKey:["sessions",e,"rounds"],queryFn:()=>Dt(`/api/sessions/${e}/rounds`),enabled:!!e});return l?d.jsxs("p",{className:"flex items-center gap-2 text-sm text-zinc-500 dark:text-zinc-400",children:[d.jsx(qr,{className:"h-4 w-4 animate-spin"}),"Loading rounds..."]}):!a||a.length===0?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:t==="closed"?"This session was closed without completing any review rounds.":"Review in progress — no completed rounds yet."}):d.jsx("div",{className:"space-y-2",children:a.map(o=>d.jsxs(In,{to:`/sessions/${e}/reviews/${o.round_number}`,className:"flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors hover:bg-zinc-100 dark:hover:bg-zinc-800/50",children:[d.jsx(Ri,{className:"h-4 w-4 text-zinc-400"}),d.jsxs("span",{className:"text-zinc-900 dark:text-zinc-100",children:["Round ",o.round_number]}),d.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[o.progress&&d.jsx(Zs,{variant:o.progress.status}),o.verdict&&d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:o.verdict})]})]},o.round_number))})}function h5({sessionId:e,status:t}){const r=Rn();ut("artifact:created",()=>{r.invalidateQueries({queryKey:["sessions",e,"runs"]})}),ut("artifact:updated",()=>{r.invalidateQueries({queryKey:["sessions",e,"runs"]})});const{data:a,isLoading:l}=nn({queryKey:["sessions",e,"runs"],queryFn:()=>Dt(`/api/sessions/${e}/runs`),enabled:!!e});return l?d.jsxs("p",{className:"flex items-center gap-2 text-sm text-zinc-500 dark:text-zinc-400",children:[d.jsx(qr,{className:"h-4 w-4 animate-spin"}),"Loading runs..."]}):!a||a.length===0?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:t==="closed"?"This session was closed without completing any map runs.":"Map in progress — no completed runs yet."}):d.jsx("div",{className:"space-y-2",children:a.map(o=>d.jsxs(In,{to:`/sessions/${e}/maps/${o.run_number}`,className:"flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors hover:bg-zinc-100 dark:hover:bg-zinc-800/50",children:[d.jsx(ya,{className:"h-4 w-4 text-zinc-400"}),d.jsxs("span",{className:"text-zinc-900 dark:text-zinc-100",children:["Run ",o.run_number]})]},o.run_number))})}const m5={running:{label:"Running",icon:Gm,iconClass:"text-emerald-600 dark:text-emerald-400",border:"border-emerald-500/30",bg:"bg-emerald-500/5 dark:bg-emerald-500/10",descriptor:e=>e?`Last activity ${Eu(e)} ago`:"Active agent session"},stalled:{label:"Stalled",icon:Wa,iconClass:"text-amber-600 dark:text-amber-400",border:"border-amber-500/30",bg:"bg-amber-500/5 dark:bg-amber-500/10",descriptor:e=>e?`Last activity ${Eu(e)} ago — your AI may have crashed`:"No recent heartbeat"},orphaned:{label:"Orphaned",icon:PT,iconClass:"text-zinc-500 dark:text-zinc-400",border:"border-zinc-300 dark:border-zinc-700",bg:"bg-zinc-100/50 dark:bg-zinc-800/30",descriptor:e=>e?`Auto-marked after ${Eu(e)} of inactivity`:"Reclassified by sweep"},idle:{label:"Idle",icon:Ro,iconClass:"text-zinc-400 dark:text-zinc-500",border:"border-zinc-200 dark:border-zinc-800",bg:"bg-white dark:bg-zinc-900",descriptor:()=>"No active agent sessions"}};function p5({workflowId:e}){const{data:t,isLoading:r}=uk(e);if(r||!t)return null;const a=t.agent_sessions;if(a.length===0)return null;const{status:l,newestHeartbeat:o}=fk(a);if(l==="idle")return null;const c=m5[l];if(!c)return null;const f=c.icon;return d.jsxs("div",{role:"status","aria-live":"polite",className:ne("flex items-start gap-3 rounded-lg border px-4 py-3",c.border,c.bg),children:[d.jsx(f,{className:ne("mt-0.5 h-5 w-5 shrink-0",c.iconClass),"aria-hidden":!0}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:c.label}),o&&d.jsx("span",{className:"text-xs tabular-nums text-zinc-500 dark:text-zinc-400",title:ri(o).toLocaleString(),children:ri(o).toLocaleTimeString()})]}),d.jsx("p",{className:"text-xs text-zinc-600 dark:text-zinc-400",children:c.descriptor(o)}),d.jsx(g5,{rows:a})]})]})}function g5({rows:e}){if(e.length===0)return null;const t={};for(const l of e)t[l.status]=(t[l.status]??0)+1;const a=["running","done","orphaned","crashed","cancelled","spawning"].filter(l=>t[l]).map(l=>`${t[l]} ${l}`).join(" · ");return a?d.jsx("p",{className:"mt-1 text-[11px] uppercase tracking-wide text-zinc-500 dark:text-zinc-500",children:a}):null}const b5={claude:"Claude Code",opencode:"OpenCode",gemini:"Gemini CLI"};function hk(e){return e?b5[e]??e:"—"}function Zm({workflowId:e,onClose:t}){const{data:r,isLoading:a,error:l}=dk(e??void 0),o=E.useRef(null);if(E.useEffect(()=>{if(!e)return;const m=g=>{g.key==="Escape"&&t()};return window.addEventListener("keydown",m),o.current?.focus(),()=>window.removeEventListener("keydown",m)},[e,t]),!e)return null;const c=r?.outcome,f=c?.kind==="resumable"?c.vendor:c?.kind==="unresumable"?c.diagnostics.vendor:null,h=r?.projectDir??null;return i1.createPortal(d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-6 backdrop-blur-sm",onClick:t,children:d.jsxs("div",{ref:o,role:"dialog","aria-modal":"true","aria-labelledby":"handoff-title",tabIndex:-1,onClick:m=>m.stopPropagation(),className:"flex max-h-[90vh] w-full max-w-xl flex-col overflow-hidden rounded-xl border border-zinc-200 bg-white shadow-2xl outline-none dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex items-center gap-3 border-b border-zinc-200 px-5 py-3.5 dark:border-zinc-800",children:[d.jsx(Oi,{className:"h-5 w-5 shrink-0 text-zinc-500 dark:text-zinc-400"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("h2",{id:"handoff-title",className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Pick up this review in your terminal"}),d.jsx("p",{className:"truncate text-xs text-zinc-500 dark:text-zinc-400",children:c?d.jsxs(d.Fragment,{children:["AI CLI: ",d.jsx("span",{className:"font-medium",children:hk(f)}),h&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"mx-1",children:"·"}),"Project: ",d.jsx("span",{className:"font-mono",children:h})]})]}):"Loading…"})]}),d.jsx("button",{type:"button",onClick:t,"aria-label":"Close",className:"rounded-md p-1 text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600 dark:text-zinc-500 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-4 w-4"})})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:[a&&d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading handoff details…"}),l&&d.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:border-red-900/50 dark:bg-red-950/40 dark:text-red-300",children:[d.jsx(Yu,{className:"mt-0.5 h-4 w-4 shrink-0"}),d.jsxs("span",{children:["Couldn't load handoff details. ",l.message]})]}),c?.kind==="resumable"&&d.jsx(x5,{outcome:c,projectDir:r?.projectDir??""}),c?.kind==="unresumable"&&d.jsx(y5,{outcome:c})]})]})}),document.body)}function x5({outcome:e,projectDir:t}){const r=hk(e.vendor),a=`cd ${t}`,l=e.vendorCommand,o=`Resume directly in ${r}`;return d.jsxs("div",{className:"space-y-4",children:[d.jsx(ly,{index:1,label:"Open the project directory",command:a,copyAriaLabel:"Copy cd command"}),d.jsx(ly,{index:2,label:o,command:l,copyAriaLabel:"Copy resume command"}),d.jsx("div",{className:"border-t border-zinc-200 pt-3 text-xs text-zinc-500 dark:border-zinc-800 dark:text-zinc-400",children:d.jsxs("p",{children:["Requires ",d.jsx("span",{className:"font-medium",children:r})," on your"," ",d.jsx("span",{className:"font-mono",children:"$PATH"}),!e.hostBinaryAvailable&&d.jsxs(d.Fragment,{children:[" ","— we couldn't see it from the dashboard. Install it to resume in your terminal."]}),"."]})}),d.jsx("div",{className:"flex justify-end",children:d.jsx(w5,{commands:[a,l]})})]})}function y5({outcome:e}){const{microcopy:t}=e.diagnostics;return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"rounded-md border border-amber-300/40 bg-amber-50 px-4 py-3 text-sm text-amber-900 dark:border-amber-700/40 dark:bg-amber-950/30 dark:text-amber-200",children:d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx(Wa,{"aria-hidden":!0,className:"mt-0.5 h-4 w-4 shrink-0"}),d.jsxs("div",{className:"space-y-1",children:[d.jsx("p",{className:"font-medium",children:t.headline}),d.jsxs("p",{className:"text-xs opacity-90",children:[d.jsx("span",{className:"font-medium",children:"Why: "}),t.cause]}),d.jsxs("p",{className:"text-xs opacity-90",children:[d.jsx("span",{className:"font-medium",children:"Try: "}),t.remediation]})]})]})}),d.jsx(v5,{diagnostics:e.diagnostics,reason:e.reason})]})}function v5({diagnostics:e,reason:t}){const[r,a]=E.useState(!1),l=[`reason: ${t}`,`vendor: ${e.vendor??"unknown"}`,`vendorBinaryAvailable: ${e.vendorBinaryAvailable}`,`invocationsForWorkflow: ${e.invocationsForWorkflow}`,`sessionIdEventsObserved: ${e.sessionIdEventsObserved}`].join(`
|
|
527
|
-
`),o=()=>{navigator.clipboard.writeText(l).then(()=>{a(!0),setTimeout(()=>a(!1),1500)}).catch(()=>{})};return d.jsxs("div",{className:"rounded-md border border-zinc-200 bg-zinc-50 px-4 py-3 dark:border-zinc-800 dark:bg-zinc-900/50",children:[d.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[d.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wider text-zinc-500 dark:text-zinc-500",children:"Diagnostic data"}),d.jsx("button",{type:"button",onClick:o,className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[11px] text-zinc-600 transition-colors hover:bg-zinc-100 dark:text-zinc-400 dark:hover:bg-zinc-800",children:r?d.jsxs(d.Fragment,{children:[d.jsx(jr,{className:"h-3 w-3"}),"Copied"]}):d.jsxs(d.Fragment,{children:[d.jsx(Qu,{className:"h-3 w-3"}),"Copy for issue report"]})})]}),d.jsx("pre",{className:"whitespace-pre-wrap font-mono text-[11px] leading-relaxed text-zinc-700 dark:text-zinc-300",children:l})]})}function ly({index:e,label:t,command:r,copyAriaLabel:a}){return d.jsxs("div",{children:[d.jsxs("div",{className:"mb-1 flex items-center gap-2 text-xs uppercase tracking-wide text-zinc-500 dark:text-zinc-500",children:[d.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center rounded-full bg-zinc-200 text-[10px] font-semibold text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",children:e}),d.jsx("span",{children:t})]}),d.jsxs("div",{className:"flex items-stretch gap-2",children:[d.jsx("pre",{className:"min-w-0 flex-1 overflow-x-auto rounded-md border border-zinc-200 bg-zinc-50 px-3 py-2 font-mono text-xs text-zinc-800 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-200",children:r}),d.jsx(k5,{text:r,ariaLabel:a})]})]})}function k5({text:e,ariaLabel:t}){const[r,a]=E.useState(!1);return d.jsx("button",{type:"button","aria-label":t,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{a(!0),setTimeout(()=>a(!1),1500)}).catch(()=>{a(!1)})},className:ne("inline-flex shrink-0 items-center gap-1 rounded-md border px-2.5 py-2 text-xs font-medium transition",r?"border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-400":"border-zinc-200 bg-white text-zinc-600 hover:border-zinc-300 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-400 dark:hover:border-zinc-700"),children:r?d.jsxs(d.Fragment,{children:[d.jsx(jr,{className:"h-3.5 w-3.5"}),d.jsx("span",{"aria-live":"polite",children:"Copied"})]}):d.jsxs(d.Fragment,{children:[d.jsx(Qu,{className:"h-3.5 w-3.5"}),d.jsx("span",{children:"Copy"})]})})}function w5({commands:e}){const[t,r]=E.useState(!1);return d.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(e.join(`
|
|
528
|
-
`)).then(()=>{r(!0),setTimeout(()=>r(!1),1500)}).catch(()=>r(!1))},className:ne("inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-xs font-medium transition",t?"border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-400":"border-zinc-200 bg-white text-zinc-700 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800/50"),children:t?d.jsxs(d.Fragment,{children:[d.jsx(jr,{className:"h-3.5 w-3.5"}),d.jsx("span",{"aria-live":"polite",children:"Copied both"})]}):d.jsxs(d.Fragment,{children:[d.jsx(Qu,{className:"h-3.5 w-3.5"}),d.jsx("span",{children:"Copy both"})]})})}function E5({workflowId:e,variant:t="paused"}){const{socket:r}=ai(),a=qu(),[l,o]=E.useState(!1),c=dk(l?e:void 0),f=!r,h=E.useCallback(()=>{r&&(r.emit("command:run",{command:`review --resume ${e}`}),a("/"))},[r,e,a]),m=E.useCallback(()=>{a("/")},[a]),g=E.useCallback(()=>{r&&r.emit("command:run",{command:`state finish --abort --session-id ${e}`})},[r,e]),x=t==="paused",y=t==="exhausted",v=y?"Automatic recovery is exhausted.":x?"This review is paused.":"Continue this review in your terminal.",w=y?"Forward-resume attempts ran out. Start a fresh review (artifacts are preserved) or mark this one abandoned.":x?"Bring the AI back where it left off, or hand off the resume command to your terminal.":"Copy the resume command and pick up the AI conversation in your own terminal.";return y?d.jsxs("div",{className:ne("flex flex-col gap-3 rounded-lg border px-4 py-3 sm:flex-row sm:items-center sm:justify-between","border-amber-300 bg-amber-50/50 dark:border-amber-900/50 dark:bg-amber-950/20"),children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:v}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:w})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[d.jsxs("button",{type:"button",onClick:m,className:ne("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition","bg-zinc-900 text-white hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200"),children:[d.jsx(Ym,{className:"h-3.5 w-3.5","aria-hidden":!0}),d.jsx("span",{children:"Start fresh"})]}),d.jsxs("button",{type:"button",onClick:g,disabled:!r,className:ne("inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm font-medium transition","border-zinc-200 bg-white text-zinc-700 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800/50",!r&&"cursor-not-allowed opacity-50"),children:[d.jsx(Km,{className:"h-3.5 w-3.5","aria-hidden":!0}),d.jsx("span",{children:"Mark abandoned"})]})]})]}):d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:ne("flex flex-col gap-3 rounded-lg border px-4 py-3 sm:flex-row sm:items-center sm:justify-between","border-zinc-200 bg-white dark:border-zinc-800 dark:bg-zinc-900"),children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:v}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:w})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[x&&d.jsxs("button",{type:"button",onClick:h,disabled:f,className:ne("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition","bg-zinc-900 text-white hover:bg-zinc-800","dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200",f&&"cursor-not-allowed opacity-50"),children:[d.jsx(Gs,{className:"h-3.5 w-3.5","aria-hidden":!0}),d.jsx("span",{children:"Continue from where you left off"})]}),d.jsxs("button",{type:"button",onClick:()=>o(!0),className:ne("inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm font-medium transition",x?"border-zinc-200 bg-white text-zinc-700 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800/50":"border-zinc-900 bg-zinc-900 text-white hover:bg-zinc-800 dark:border-zinc-100 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200"),children:[d.jsx(Oi,{className:"h-3.5 w-3.5","aria-hidden":!0}),d.jsx("span",{children:"Resume in terminal"})]})]})]}),l&&d.jsx(Zm,{workflowId:e,onClose:()=>o(!1)}),d.jsx("span",{className:"sr-only",children:c.data?"handoff ready":""})]})}const _5=["context","change-context","analysis","reviews","aggregation","validation","synthesis","complete"],N5=["map-context","topology","flow-analysis","requirements-mapping","synthesis","complete"];function Eh(e){return e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function _h(e,t,r,a){const l=e==="map"?N5:_5,o=l.length;return r>=o?l.map(c=>({name:Eh(c),status:"complete"})):a==="closed"?l.map((c,f)=>({name:Eh(c),status:f+1<=r?"complete":"skipped"})):l.map((c,f)=>({name:Eh(c),status:f+1<r?"complete":f+1===r?"active":"pending"}))}function S5(){const{id:e}=$u(),t=Rn(),{data:r,isLoading:a}=ZR(e??""),l=nn({queryKey:["sessions",e,"events"],queryFn:()=>Dt(`/api/sessions/${e}/events`),enabled:!!e}),o=uk(e??void 0),c=o.data?fk(o.data.agent_sessions):null,f=o.data?.agent_sessions.some(y=>y.vendor_session_id!=null)??!1,h=c?.status==="stalled"||c?.status==="orphaned",m=h||f;if(ut("session:events",()=>{t.invalidateQueries({queryKey:["sessions",e,"events"]})}),a)return d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading session..."});if(!r)return d.jsxs("div",{children:[d.jsxs(In,{to:"/sessions",className:"mb-4 inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to sessions"]}),d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Session not found."})]});const g=r.has_review&&r.has_map,x=g?"Review + Map":r.has_map?"Map":"Review";return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(In,{to:"/sessions",className:"inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to sessions"]}),e&&d.jsx(p5,{workflowId:e}),e&&m&&d.jsx(E5,{workflowId:e,variant:h?"paused":"completed"}),d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Qs,{className:"h-5 w-5 text-zinc-400"}),d.jsx("h1",{className:"text-xl font-semibold text-zinc-900 dark:text-zinc-100",children:r.branch})]}),d.jsxs("div",{className:"flex items-center gap-3 text-sm text-zinc-500 dark:text-zinc-400",children:[d.jsxs("span",{className:"flex items-center gap-1",children:[r.has_review&&d.jsx(Ri,{className:"h-4 w-4"}),r.has_map&&d.jsx(ya,{className:"h-4 w-4"}),d.jsx("span",{children:x})]}),d.jsxs("span",{className:"flex items-center gap-1",children:[d.jsx(rk,{className:"h-4 w-4"}),qR(r.started_at)]})]})]}),d.jsx(Zs,{variant:r.status})]}),d.jsxs("div",{className:"mt-6",children:[d.jsx("h3",{className:"mb-2 text-xs font-medium uppercase tracking-wide text-zinc-500 dark:text-zinc-400",children:"Progress"}),g?d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"mb-1 flex items-center gap-1.5 text-xs text-zinc-500 dark:text-zinc-400",children:[d.jsx(Ri,{className:"h-3.5 w-3.5"}),d.jsx("span",{children:"Review"})]}),d.jsx(wh,{phases:_h("review",r.review_phase,r.review_phase_number,r.status)})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"mb-1 flex items-center gap-1.5 text-xs text-zinc-500 dark:text-zinc-400",children:[d.jsx(ya,{className:"h-3.5 w-3.5"}),d.jsx("span",{children:"Map"})]}),d.jsx(wh,{phases:_h("map",r.map_phase,r.map_phase_number,r.status)})]})]}):d.jsx(wh,{phases:_h(r.has_map?"map":"review",r.has_map?r.map_phase:r.review_phase,r.has_map?r.map_phase_number:r.review_phase_number,r.status)})]})]}),d.jsx("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:d.jsx(d5,{session:r})}),d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Event Log"}),l.isLoading?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading events..."}):(l.data??[]).length===0?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No events recorded."}):d.jsx("div",{className:"space-y-2",children:(l.data??[]).map(y=>d.jsxs("div",{className:"flex items-start gap-3 rounded-md px-3 py-2 text-sm hover:bg-zinc-50 dark:hover:bg-zinc-800/50",children:[d.jsx("span",{className:"shrink-0 text-xs tabular-nums text-zinc-400 dark:text-zinc-500",children:ri(y.created_at).toLocaleTimeString()}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:y.event_type}),y.phase&&d.jsxs("span",{className:"ml-2 text-zinc-500 dark:text-zinc-400",children:["Phase: ",y.phase]}),y.round!=null&&d.jsxs("span",{className:"ml-2 text-zinc-500 dark:text-zinc-400",children:["Round: ",y.round]})]})]},y.id))})]})]})}function jo(){const{data:e}=Xs(),t=e?.aiCli?.active??null,r=e?.aiCli?.available??[],a=e?.aiCli?.preferred??"auto";return{isAvailable:t!=null,activeCli:t,availableClis:r,isDisabledByConfig:a==="off"&&r.length>0}}function Wm(){const e=Rn(),{data:t,isLoading:r}=nn({queryKey:["reviewers"],queryFn:()=>Dt("/api/reviewers")});return ut("reviewers:updated",a=>{e.setQueryData(["reviewers"],a)}),{reviewers:t?.reviewers??[],defaults:t?.defaults??[],isLoaded:!r}}const z5={activity:Gm,blocks:zT,bot:RT,layers:CA,compass:QT,layout:GA,server:aR,cloud:VT,gauge:xA,accessibility:bT,database:eA,rocket:ZA,terminal:Oi,smartphone:dR,crown:WT,sparkles:Mo,"shield-alert":Qm,"test-tubes":ER,"file-text":Oo,brain:ek,user:Va};function Ws({icon:e,className:t="h-4 w-4"}){const r=z5[e]??Va;return d.jsx(r,{className:t})}function C5({reviewers:e,selection:t,isLoaded:r,disabled:a,onRemove:l,onCustomize:o}){if(!r)return d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("label",{className:"w-28 shrink-0 text-right text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Reviewers"}),d.jsx("div",{className:"flex h-8 items-center text-xs text-zinc-400 dark:text-zinc-500",children:"Loading..."})]});if(e.length===0)return d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("label",{className:"w-28 shrink-0 text-right text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Reviewers"}),d.jsxs("p",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:["Run ",d.jsx("code",{className:"rounded bg-zinc-100 px-1 py-0.5 dark:bg-zinc-800",children:"/ocr:sync-reviewers"})," to customize your review team"]})]});const c=t.filter(m=>!m.description),f=t.filter(m=>m.description),h=c.map(m=>{const g=e.find(x=>x.id===m.id);return g?{...g,count:m.count}:null}).filter(Boolean);return d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("label",{className:"w-28 shrink-0 pt-1.5 text-right text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Reviewers"}),d.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-1.5",children:[h.map(m=>d.jsxs("span",{className:ne("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs","border-zinc-200 bg-zinc-50 text-zinc-700","dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300"),children:[d.jsx(Ws,{icon:m.icon,className:"h-3 w-3 text-zinc-400 dark:text-zinc-500"}),d.jsx("span",{className:"max-w-[120px] truncate",children:m.name}),m.count>1&&d.jsxs("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:["x",m.count]}),!a&&d.jsx("button",{type:"button",onClick:()=>l(m.id),className:"ml-0.5 rounded-full p-0.5 text-zinc-400 hover:bg-zinc-200 hover:text-zinc-600 dark:text-zinc-500 dark:hover:bg-zinc-700 dark:hover:text-zinc-300","aria-label":`Remove ${m.name}`,children:d.jsx(Bn,{className:"h-2.5 w-2.5"})})]},m.id)),f.map(m=>d.jsxs("span",{title:m.description,className:ne("inline-flex items-center gap-1 rounded-full border border-dashed px-2 py-0.5 text-xs italic","border-amber-300 bg-amber-50 text-amber-700","dark:border-amber-700 dark:bg-amber-950/30 dark:text-amber-300"),children:[d.jsx(yo,{className:"h-3 w-3 shrink-0"}),d.jsx("span",{className:"max-w-[160px] truncate",children:m.description}),m.count>1&&d.jsxs("span",{className:"text-[10px] text-amber-400 dark:text-amber-500",children:["x",m.count]}),!a&&d.jsx("button",{type:"button",onClick:()=>l(m.id),className:"ml-0.5 rounded-full p-0.5 text-amber-400 hover:bg-amber-200 hover:text-amber-600 dark:text-amber-500 dark:hover:bg-amber-800 dark:hover:text-amber-300","aria-label":"Remove ephemeral reviewer",children:d.jsx(Bn,{className:"h-2.5 w-2.5"})})]},m.id)),d.jsxs("button",{type:"button",disabled:a,onClick:o,className:ne("inline-flex items-center gap-1 rounded-full border border-dashed px-2.5 py-0.5 text-xs transition-colors","border-zinc-300 text-zinc-500 hover:border-indigo-400 hover:text-indigo-600","dark:border-zinc-600 dark:text-zinc-400 dark:hover:border-indigo-400 dark:hover:text-indigo-400","disabled:cursor-not-allowed disabled:opacity-50"),children:[d.jsx(ok,{className:"h-3 w-3"}),"Customize..."]})]})]})}const Mu={holistic:{label:"Generalists",order:0},specialist:{label:"Specialists",order:1},persona:{label:"Famous Engineers",order:2},custom:{label:"Custom",order:3}};function mk(e,t){if(!t.trim())return e;const r=t.toLowerCase();return e.filter(a=>a.name.toLowerCase().includes(r)||a.description.toLowerCase().includes(r)||a.focus_areas.some(l=>l.toLowerCase().includes(r))||a.known_for?.toLowerCase().includes(r))}function pk(e){const t=new Map;for(const r of e){const a=t.get(r.tier)??[];a.push(r),t.set(r.tier,a)}return[...t.entries()].sort((r,a)=>Mu[r[0]].order-Mu[a[0]].order)}function T5(e){return e.toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function gk(e){return nn({queryKey:["team","resolved","disk"],queryFn:()=>Dt("/api/team/resolved"),staleTime:5e3})}function bk(e){return nn({queryKey:["models",e??"auto"],queryFn:()=>Dt(e?`/api/team/models?vendor=${encodeURIComponent(e)}`:"/api/team/models"),staleTime:6e4})}function A5(){const e=Rn();return Ao({mutationFn:async t=>{const r=await fetch("/api/team/default",{method:"POST",headers:{"Content-Type":"application/json",...E1()},body:JSON.stringify({team:t})});if(!r.ok){const a=await r.text().catch(()=>"");throw new Error(`${r.status}: ${a||r.statusText}`)}return r.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["team"]}),e.invalidateQueries({queryKey:["reviewers"]})}})}const oy="\0custom";function ko({value:e,options:t,onChange:r,freeText:a=!1,freeTextPlaceholder:l="Type model id…",disabled:o=!1,className:c,allowCustom:f=!1,ariaLabel:h,defaultOpen:m=!1,onOpenChange:g}){const[x,y]=E.useState(m),[v,w]=E.useState(!1),[_,N]=E.useState(-1),S=E.useRef(null),O=E.useRef(null),z=E.useRef(null),F=E.useId(),$=M=>{y(Y=>{const V=typeof M=="function"?M(Y):M;return V!==Y&&g?.(V),V})},j=t.some(M=>M.id===e),G=[...e&&!j?[{id:e,label:e,detail:"(custom)"}]:[],...t,...f&&!a?[{id:oy,label:"Custom…",detail:"type any model id"}]:[]],R=a||v;E.useEffect(()=>{if(!x)return;const M=Y=>{S.current&&(S.current.contains(Y.target)||$(!1))};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[x]),E.useEffect(()=>{if(!x)return;const M=Y=>{Y.key==="Escape"&&(Y.preventDefault(),$(!1),O.current?.focus())};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[x]);const ie=G.find(M=>M.id===e)??G[0]??null,P=ie?G.findIndex(M=>M.id===ie.id):-1;E.useEffect(()=>{x&&N(P>=0?P:0)},[x,P]),E.useEffect(()=>{v&&z.current?.focus()},[v]);function ee(M){if(M.id===oy){$(!1),w(!0);return}r(M.id),$(!1),O.current?.focus()}function te(M){(M.key==="ArrowDown"||M.key==="ArrowUp"||M.key==="Enter"||M.key===" ")&&(M.preventDefault(),$(!0))}function we(M){if(M.key==="ArrowDown")M.preventDefault(),N(Y=>Math.min(G.length-1,(Y<0?-1:Y)+1));else if(M.key==="ArrowUp")M.preventDefault(),N(Y=>Math.max(0,(Y<0?G.length:Y)-1));else if(M.key==="Home")M.preventDefault(),N(0);else if(M.key==="End")M.preventDefault(),N(G.length-1);else if(M.key==="Enter"||M.key===" "){if(M.preventDefault(),_>=0&&_<G.length){const Y=G[_];Y&&ee(Y)}}else M.key==="Tab"&&$(!1)}if(R)return d.jsxs("div",{className:ne("flex items-center gap-1",c),children:[d.jsx("input",{ref:z,type:"text",value:e,placeholder:l,disabled:o,onChange:M=>r(M.target.value),onKeyDown:M=>{M.key==="Escape"&&v&&(M.preventDefault(),w(!1))},"aria-label":h,className:ne("w-full min-w-0 flex-1 rounded-md border bg-white px-2.5 py-1.5 font-mono text-xs","border-zinc-200 text-zinc-700 placeholder:text-zinc-400","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-300 dark:placeholder:text-zinc-500","disabled:cursor-not-allowed disabled:opacity-50")}),v&&d.jsx("button",{type:"button",onClick:()=>w(!1),"aria-label":"Back to model list",title:"Back to model list",className:ne("shrink-0 rounded-md border p-1.5 text-zinc-500 transition","border-zinc-200 hover:bg-zinc-50 hover:text-zinc-700","dark:border-zinc-700 dark:hover:bg-zinc-800 dark:hover:text-zinc-300"),children:d.jsx(jA,{className:"h-3.5 w-3.5","aria-hidden":!0})})]});const se=ie?.label??l,Q=ie?.detail;return d.jsxs("div",{ref:S,className:ne("relative",c),children:[d.jsxs("button",{ref:O,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":x,"aria-controls":x?F:void 0,"aria-label":h,disabled:o,onClick:()=>$(M=>!M),onKeyDown:te,className:ne("flex w-full items-center gap-2 rounded-md border bg-white px-2.5 py-1.5 text-left","border-zinc-200 hover:border-zinc-300","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","dark:border-zinc-700 dark:bg-zinc-900 dark:hover:border-zinc-600","disabled:cursor-not-allowed disabled:opacity-50"),children:[d.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-zinc-700 dark:text-zinc-300",children:se}),Q&&d.jsx("span",{className:"hidden shrink-0 truncate font-mono text-[10px] text-zinc-400 dark:text-zinc-500 sm:block",children:Q}),d.jsx(Za,{className:ne("h-3.5 w-3.5 shrink-0 text-zinc-400 transition-transform dark:text-zinc-500",x&&"rotate-180"),"aria-hidden":!0})]}),x&&d.jsx("div",{id:F,role:"listbox",tabIndex:-1,onKeyDown:we,"aria-activedescendant":_>=0?`${F}-opt-${_}`:void 0,ref:M=>{M?.focus()},className:ne("absolute left-0 right-0 z-30 mt-1 max-h-64 overflow-auto rounded-md border bg-white py-1 shadow-lg outline-none","border-zinc-200 dark:border-zinc-700 dark:bg-zinc-900 dark:shadow-black/30"),children:G.length===0?d.jsx("div",{className:"px-3 py-2 text-xs text-zinc-500 dark:text-zinc-400",children:"No models available."}):G.map((M,Y)=>{const V=M.id===e,fe=Y===_;return d.jsxs("button",{id:`${F}-opt-${Y}`,type:"button",role:"option","aria-selected":V,onClick:()=>ee(M),onMouseEnter:()=>N(Y),className:ne("flex w-full items-start gap-2 px-3 py-1.5 text-left transition-colors",fe?"bg-zinc-100 dark:bg-zinc-800":"bg-transparent",V&&"bg-indigo-50/60 dark:bg-indigo-950/40"),children:[d.jsx(jr,{className:ne("mt-0.5 h-3.5 w-3.5 shrink-0",V?"text-indigo-600 dark:text-indigo-400":"text-transparent"),"aria-hidden":!0}),d.jsxs("span",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"block truncate text-xs font-medium text-zinc-900 dark:text-zinc-100",children:M.label}),M.detail&&d.jsx("span",{className:"block truncate font-mono text-[10px] text-zinc-500 dark:text-zinc-500",children:M.detail})]})]},M.id||`__default-${Y}`)})})]})}function xk({modelList:e,className:t}){if(!e||e.source!=="bundled")return null;const r=e.nativeUnavailableReason;return d.jsxs("p",{className:ne("flex items-start gap-1.5 text-[11px] text-zinc-500 dark:text-zinc-400",t),children:[d.jsx(sk,{className:"mt-0.5 h-3 w-3 shrink-0","aria-hidden":!0}),d.jsxs("span",{children:["Model list is a bundled fallback",r?d.jsxs(d.Fragment,{children:[" — ",r]}):null,". Use “Custom…” to enter any model id your CLI accepts."]})]})}const R5="(default model)",O5="Use the host CLI's default";function M5({open:e,reviewers:t,initialSelection:r,onApply:a,onClose:l}){const[o,c]=E.useState(""),[f,h]=E.useState(new Map),[m,g]=E.useState(new Set),[x,y]=E.useState(null),v=E.useRef(null),[w,_]=E.useState([]),[N,S]=E.useState(!1),[O,z]=E.useState(""),F=E.useRef(null),[$,j]=E.useState(new Map),[G,R]=E.useState(new Set),{activeCli:ie}=jo(),{data:P,isLoading:ee}=bk(ie??void 0),te=E.useMemo(()=>{const le=[{id:"",label:R5,detail:O5}];if(P?.models)for(const xe of P.models)le.push({id:xe.id,label:xe.displayName??xe.id,detail:xe.displayName?xe.id:void 0});return le},[P]),we=!ee&&(P?.models?.length??0)===0;E.useEffect(()=>{if(e){const le=new Map,xe=new Map,pe=[];for(const Ue of r)Ue.description?pe.push({description:Ue.description,count:Ue.count}):(le.set(Ue.id,Ue.count),Ue.models&&Ue.models.length===Ue.count&&xe.set(Ue.id,Ue.models));h(le),j(xe),R(new Set),_(pe),c(""),y(null),S(!1),z(""),setTimeout(()=>v.current?.focus(),50)}},[e,r]),E.useEffect(()=>{if(!e)return;const le=xe=>{xe.key==="Escape"&&l()};return window.addEventListener("keydown",le),()=>window.removeEventListener("keydown",le)},[e,l]);const se=E.useMemo(()=>mk(t,o),[t,o]),Q=E.useMemo(()=>pk(se),[se]);function M(le){h(xe=>{const pe=new Map(xe);return pe.has(le)?pe.delete(le):pe.set(le,1),pe}),j(xe=>{if(!xe.has(le))return xe;const pe=new Map(xe);return pe.delete(le),pe}),R(xe=>{if(!xe.has(le))return xe;const pe=new Set(xe);return pe.delete(le),pe})}function Y(le,xe){const pe=Math.max(1,Math.min(3,xe));h(Ue=>{const Re=new Map(Ue);return Re.set(le,pe),Re}),j(Ue=>{const Re=Ue.get(le);if(!Re)return Ue;const Tt=new Map(Ue),tt=[];for(let gt=0;gt<pe;gt++)tt.push(Re[gt]??null);return Tt.set(le,tt),Tt})}function V(le){R(xe=>{const pe=new Set(xe);return pe.has(le)?pe.delete(le):pe.add(le),pe}),j(xe=>{if(xe.has(le))return xe;const pe=f.get(le)??1,Ue=new Map(xe);return Ue.set(le,Array(pe).fill(null)),Ue})}function fe(le,xe){j(pe=>{const Ue=new Map(pe),Re=f.get(le)??1;return Ue.set(le,Array(Re).fill(xe)),Ue})}function A(le,xe,pe){j(Ue=>{const Re=Ue.get(le),Tt=f.get(le)??1,tt=Re?[...Re]:Array(Tt).fill(null);tt[xe]=pe;const gt=new Map(Ue);return gt.set(le,tt),gt})}function D(le){g(xe=>{const pe=new Set(xe);return pe.has(le)?pe.delete(le):pe.add(le),pe})}function B(){const le=O.trim();le&&(_(xe=>[...xe,{description:le,count:1}]),z(""),S(!1))}function C(le){_(xe=>xe.filter((pe,Ue)=>Ue!==le))}function ue(le,xe){const pe=Math.max(1,Math.min(3,xe));_(Ue=>Ue.map((Re,Tt)=>Tt===le?{...Re,count:pe}:Re))}function be(){const le=[];for(const[xe,pe]of f){const Ue=$.get(xe),Re=Ue&&Ue.length===pe&&Ue.some(Tt=>Tt!==null);le.push(Re?{id:xe,count:pe,models:Ue}:{id:xe,count:pe})}w.forEach((xe,pe)=>{le.push({id:`ephemeral-${pe+1}`,count:xe.count,description:xe.description})}),a(le)}if(!e)return null;const ye=f.size+w.length;return d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center px-4 bg-black/50 backdrop-blur-sm",children:d.jsxs("div",{role:"dialog","aria-modal":"true",className:"flex max-h-[80vh] w-full max-w-2xl flex-col overflow-hidden rounded-xl border border-zinc-200 bg-white shadow-2xl dark:border-zinc-700 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-5 py-3.5 dark:border-zinc-700",children:[d.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Select Reviewers"}),d.jsx("button",{type:"button",onClick:l,className:"rounded-md p-1 text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600 dark:text-zinc-500 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-4 w-4"})})]}),d.jsx("div",{className:"border-b border-zinc-200 px-5 py-2.5 dark:border-zinc-700",children:d.jsxs("div",{className:"relative",children:[d.jsx(Xu,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-zinc-400"}),d.jsx("input",{ref:v,type:"text",value:o,onChange:le=>c(le.target.value),placeholder:"Search reviewers...",className:ne("w-full rounded-md border py-1.5 pl-8 pr-3 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50")})]})}),d.jsxs("div",{className:"min-w-0 flex-1 overflow-y-auto overflow-x-hidden px-5 py-3",children:[Q.length===0&&w.length===0&&d.jsx("p",{className:"py-8 text-center text-sm text-zinc-400 dark:text-zinc-500",children:"No reviewers match your search."}),Q.map(([le,xe])=>{const pe=m.has(le),Ue=Mu[le];return d.jsxs("div",{className:"mb-4 last:mb-0",children:[d.jsxs("button",{type:"button",onClick:()=>D(le),className:"mb-2 flex w-full items-center gap-1.5 text-left text-xs font-semibold uppercase tracking-wider text-zinc-400 hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-300",children:[pe?d.jsx(ji,{className:"h-3 w-3"}):d.jsx(Za,{className:"h-3 w-3"}),Ue.label,d.jsxs("span",{className:"font-normal text-zinc-300 dark:text-zinc-600",children:["(",xe.length,")"]})]}),!pe&&d.jsx("div",{className:"flex flex-col gap-1.5",children:xe.map(Re=>{const Tt=f.has(Re.id),tt=f.get(Re.id)??1,gt=x===Re.id;return d.jsxs("div",{children:[d.jsxs("div",{role:"button",tabIndex:0,onClick:()=>M(Re.id),onKeyDown:Et=>{(Et.key==="Enter"||Et.key===" ")&&(Et.preventDefault(),M(Re.id))},className:ne("flex min-w-0 items-center gap-3 rounded-lg border px-3 py-2 transition-colors cursor-pointer",Tt?"border-indigo-200 bg-indigo-50/50 dark:border-indigo-800 dark:bg-indigo-950/30":"border-zinc-100 bg-white hover:border-zinc-200 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700"),children:[d.jsx("input",{type:"checkbox",checked:Tt,onChange:()=>M(Re.id),onClick:Et=>Et.stopPropagation(),className:"h-3.5 w-3.5 shrink-0 rounded border-zinc-300 text-indigo-500 focus:ring-indigo-400 dark:border-zinc-600"}),d.jsx(Ws,{icon:Re.icon,className:ne("h-4 w-4 shrink-0",Tt?"text-indigo-500 dark:text-indigo-400":"text-zinc-400 dark:text-zinc-500")}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:Re.name}),Re.tier==="persona"&&d.jsx("span",{className:"rounded-full bg-violet-100 px-1.5 py-0.5 text-[10px] font-medium text-violet-700 dark:bg-violet-900/50 dark:text-violet-300",children:"Persona"})]}),d.jsx("p",{className:"truncate text-xs text-zinc-500 dark:text-zinc-400",children:Re.description})]}),Tt&&d.jsxs("div",{className:"flex shrink-0 items-center gap-1",onClick:Et=>Et.stopPropagation(),children:[d.jsx("button",{type:"button",onClick:()=>Y(Re.id,tt-1),disabled:tt<=1,className:"rounded p-0.5 text-zinc-400 hover:bg-zinc-100 disabled:opacity-30 dark:hover:bg-zinc-800",children:d.jsx(xo,{className:"h-3 w-3"})}),d.jsx("span",{className:"w-4 text-center text-xs font-medium text-zinc-600 dark:text-zinc-300",children:tt}),d.jsx("button",{type:"button",onClick:()=>Y(Re.id,tt+1),disabled:tt>=3,className:"rounded p-0.5 text-zinc-400 hover:bg-zinc-100 disabled:opacity-30 dark:hover:bg-zinc-800",children:d.jsx(pa,{className:"h-3 w-3"})})]}),Tt&&d.jsx("button",{type:"button",onClick:Et=>{Et.stopPropagation(),V(Re.id)},"aria-expanded":G.has(Re.id),"aria-label":"Advanced model overrides",title:"Advanced — model overrides for this run",className:ne("shrink-0 rounded p-1 transition-colors",G.has(Re.id)?"bg-indigo-100 text-indigo-600 dark:bg-indigo-900/50 dark:text-indigo-400":$.get(Re.id)?.some(Et=>Et!==null)?"text-indigo-500 dark:text-indigo-400":"text-zinc-300 hover:text-zinc-500 dark:text-zinc-600 dark:hover:text-zinc-400"),children:d.jsx(ok,{className:"h-3.5 w-3.5"})}),d.jsx("button",{type:"button",onClick:Et=>{Et.stopPropagation(),y(gt?null:Re.id)},className:ne("shrink-0 rounded p-1 transition-colors",gt?"bg-indigo-100 text-indigo-600 dark:bg-indigo-900/50 dark:text-indigo-400":"text-zinc-300 hover:text-zinc-500 dark:text-zinc-600 dark:hover:text-zinc-400"),children:d.jsx(tk,{className:"h-3.5 w-3.5"})})]}),Tt&&G.has(Re.id)&&d.jsx(j5,{count:tt,models:$.get(Re.id)??Array(tt).fill(null),modelOptions:te,freeText:we,personaName:Re.id,onUniformChange:Et=>fe(Re.id,Et),onInstanceChange:(Et,ot)=>A(Re.id,Et,ot)}),gt&&d.jsxs("div",{className:"ml-10 mt-1 rounded-lg border border-zinc-100 bg-zinc-50 p-3 text-xs dark:border-zinc-800 dark:bg-zinc-800/50",children:[Re.description&&d.jsx("p",{className:"mb-2 text-zinc-600 dark:text-zinc-300",children:Re.description}),Re.known_for&&d.jsxs("p",{className:"mb-1.5",children:[d.jsxs("span",{className:"font-semibold text-zinc-600 dark:text-zinc-300",children:["Known for:"," "]}),d.jsx("span",{className:"text-zinc-500 dark:text-zinc-400",children:Re.known_for})]}),Re.philosophy&&d.jsxs("p",{className:"mb-2 italic text-zinc-500 dark:text-zinc-400",children:["“",Re.philosophy,"”"]}),Re.focus_areas.length>0&&d.jsx("div",{className:"flex flex-wrap gap-1",children:Re.focus_areas.map(Et=>d.jsx("span",{className:"rounded-full bg-zinc-200 px-2 py-0.5 text-[10px] text-zinc-600 dark:bg-zinc-700 dark:text-zinc-300",children:Et},Et))})]})]},Re.id)})})]},le)}),d.jsxs("div",{className:"mb-2 mt-2",children:[w.length>0&&d.jsxs("div",{className:"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-amber-500 dark:text-amber-400",children:[d.jsx(yo,{className:"h-3 w-3"}),"One-off Reviewers",d.jsxs("span",{className:"font-normal text-amber-400 dark:text-amber-600",children:["(",w.length,")"]})]}),d.jsx("div",{className:"flex flex-col gap-1.5",children:w.map((le,xe)=>d.jsxs("div",{className:ne("flex min-w-0 items-center gap-3 rounded-lg border border-dashed px-3 py-2","border-amber-300 bg-amber-50/50","dark:border-amber-700 dark:bg-amber-950/20"),children:[d.jsx(yo,{className:"h-4 w-4 shrink-0 text-amber-500 dark:text-amber-400"}),d.jsx("p",{className:"min-w-0 flex-1 text-xs text-amber-700 dark:text-amber-300",children:le.description}),d.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[d.jsx("button",{type:"button",onClick:()=>ue(xe,le.count-1),disabled:le.count<=1,className:"rounded p-0.5 text-amber-400 hover:bg-amber-100 disabled:opacity-30 dark:text-amber-500 dark:hover:bg-amber-900",children:d.jsx(xo,{className:"h-3 w-3"})}),d.jsx("span",{className:"w-4 text-center text-xs font-medium text-amber-600 dark:text-amber-300",children:le.count}),d.jsx("button",{type:"button",onClick:()=>ue(xe,le.count+1),disabled:le.count>=3,className:"rounded p-0.5 text-amber-400 hover:bg-amber-100 disabled:opacity-30 dark:text-amber-500 dark:hover:bg-amber-900",children:d.jsx(pa,{className:"h-3 w-3"})})]}),d.jsx("button",{type:"button",onClick:()=>C(xe),className:"shrink-0 rounded p-1 text-amber-400 hover:bg-amber-100 hover:text-amber-600 dark:text-amber-500 dark:hover:bg-amber-900 dark:hover:text-amber-300",children:d.jsx(Bn,{className:"h-3.5 w-3.5"})})]},xe))}),N?d.jsxs("div",{className:ne("mt-1.5 rounded-lg border border-dashed p-3","border-amber-400 bg-amber-50/30","dark:border-amber-600 dark:bg-amber-950/20"),children:[d.jsx("label",{className:"mb-1.5 block text-xs font-medium text-zinc-700 dark:text-zinc-300",children:"What should this reviewer focus on?"}),d.jsx("textarea",{ref:F,value:O,onChange:le=>z(le.target.value),onKeyDown:le=>{le.key==="Enter"&&!le.shiftKey&&(le.preventDefault(),B()),le.key==="Escape"&&(le.stopPropagation(),S(!1),z(""))},placeholder:"e.g. Error handling in the auth flow, accessibility compliance, review as a junior developer",rows:2,className:ne("w-full resize-none rounded-md border px-3 py-2 text-sm","border-zinc-200 bg-white placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-amber-400 focus:outline-none focus:ring-1 focus:ring-amber-400/50")}),d.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[d.jsx("p",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:"For this review only — won't be saved to your library."}),d.jsxs("div",{className:"flex gap-1.5",children:[d.jsx("button",{type:"button",onClick:()=>{S(!1),z("")},className:"rounded-md px-3 py-1 text-xs text-zinc-500 hover:bg-zinc-100 dark:hover:bg-zinc-800",children:"Cancel"}),d.jsxs("button",{type:"button",onClick:B,disabled:!O.trim(),className:"flex items-center gap-1 rounded-md bg-amber-500 px-3 py-1 text-xs font-medium text-white hover:bg-amber-600 disabled:opacity-50",children:[d.jsx(pa,{className:"h-3 w-3"}),"Add to Team"]})]})]})]}):d.jsxs("button",{type:"button",onClick:()=>{S(!0),setTimeout(()=>F.current?.focus(),50)},className:ne("mt-1.5 flex w-full items-center gap-3 rounded-lg border border-dashed px-3 py-2.5 text-left transition-colors","border-zinc-300 text-zinc-400 hover:border-amber-400 hover:bg-amber-50/50 hover:text-amber-600","dark:border-zinc-700 dark:text-zinc-500 dark:hover:border-amber-600 dark:hover:bg-amber-950/20 dark:hover:text-amber-400"),children:[d.jsx(pa,{className:"h-4 w-4 shrink-0"}),d.jsx("span",{className:"text-sm",children:"Describe a one-off reviewer for this review..."})]})]})]}),d.jsxs("div",{className:"flex items-center justify-between gap-3 border-t border-zinc-200 px-5 py-3 dark:border-zinc-700",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:[ye," reviewer",ye!==1?"s":""," selected"]}),d.jsx(xk,{modelList:P})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{type:"button",onClick:l,className:"rounded-md border border-zinc-300 px-4 py-1.5 text-xs font-medium transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:hover:bg-zinc-800",children:"Cancel"}),d.jsx("button",{type:"button",onClick:be,className:"rounded-md bg-indigo-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-indigo-700",children:"Apply"})]})]})]})})}function j5({count:e,models:t,modelOptions:r,freeText:a,personaName:l,onUniformChange:o,onInstanceChange:c}){const h=new Set(t).size<=1,[m,g]=E.useState(h?"uniform":"per-instance");E.useEffect(()=>{!h&&m==="uniform"&&g("per-instance")},[h,m]);const x=t[0]??null;return d.jsxs("div",{onClick:y=>y.stopPropagation(),className:"ml-10 mt-1 space-y-2 rounded-lg border border-zinc-100 bg-zinc-50/50 p-3 dark:border-zinc-800 dark:bg-zinc-800/30",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider text-zinc-500 dark:text-zinc-400",children:"Model override (this run)"}),e>1&&d.jsxs("div",{className:"inline-flex items-center gap-0.5 rounded-md border border-zinc-200 p-0.5 dark:border-zinc-700",children:[d.jsx("button",{type:"button",onClick:()=>{g("uniform"),h||o(x)},"aria-pressed":m==="uniform"&&h,className:ne("rounded px-2 py-0.5 text-[10px] font-medium transition",m==="uniform"&&h?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-200"),children:"Same model"}),d.jsx("button",{type:"button",onClick:()=>g("per-instance"),"aria-pressed":m==="per-instance"||!h,className:ne("rounded px-2 py-0.5 text-[10px] font-medium transition",m==="per-instance"||!h?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-200"),children:"Per reviewer"})]})]}),m==="uniform"&&h||e===1?d.jsx(ko,{value:x??"",options:r,freeText:a,allowCustom:!0,ariaLabel:`Model for ${l}`,onChange:y=>o(y||null)}):d.jsx("div",{className:"space-y-1",children:Array.from({length:e},(y,v)=>d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("span",{className:"w-28 shrink-0 truncate text-[11px] text-zinc-500",children:[l,"-",v+1]}),d.jsx(ko,{value:t[v]??"",options:r,freeText:a,allowCustom:!0,ariaLabel:`Model for ${l}-${v+1}`,onChange:w=>c(v,w||null)})]},v))}),a&&d.jsx("p",{className:"text-[10px] text-zinc-500 dark:text-zinc-500",children:"Your AI CLI didn't return a model list. Type any model id it accepts."})]})}const lo=[{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 D5(e){const t=[];return{cleaned:e.replace(/--reviewer\s+(?:(\d+):)?(?:"([^"]*?)"|'([^']*?)')/g,(a,l,o,c)=>(t.push({description:o??c??"",count:parseInt(l??"1",10)||1}),"")).replace(/\s{2,}/g," ").trim(),entries:t}}function L5(e){const{cleaned:t,entries:r}=D5(e),l=t.replace(/^ocr\s+/,"").split(/\s+/),o=l[0]??"";if(!lo.find(m=>m.id===o))return null;const c={};let f,h=1;for(;h<l.length;){const m=l[h]??"";if(m==="--fresh")c.fresh=!0,h++;else if(m==="--team"&&h+1<l.length){const g=l[h+1]??"";f=cy(g),h+=2}else if(m==="--requirements"&&h+1<l.length){const g=l.slice(h+1),x=g.indexOf("--team");if(x>=0){c.requirements=g.slice(0,x).join(" ");const y=g[x+1]??"";f=cy(y)}else c.requirements=g.join(" ");break}else m.startsWith("--")||(c.target=m),h++}return r.length>0&&(f||(f=[]),r.forEach((m,g)=>{f.push({id:`ephemeral-${g+1}`,count:m.count,description:m.description})})),{commandId:o,params:c,team:f}}function cy(e){const t=e.trim();if(t.startsWith("["))try{const r=JSON.parse(t),a=new Map;for(const l of r){if(typeof l.persona!="string")continue;const o=typeof l.instance_index=="number"?l.instance_index:1,c=typeof l.model=="string"?l.model:null,f=a.get(l.persona)??{count:0,models:[]};f.count=Math.max(f.count,o),f.models[o-1]=c,a.set(l.persona,f)}return Array.from(a,([l,{count:o,models:c}])=>{const f=[];for(let h=0;h<o;h++)f.push(c[h]??null);return f.some(h=>h!==null)?{id:l,count:o,models:f}:{id:l,count:o}})}catch{}return t.split(",").map(r=>{const[a="",l]=r.split(":");return{id:a,count:parseInt(l??"1",10)||1}}).filter(r=>r.id.length>0)}function I5(e){const t=e.filter(l=>!l.description);if(!t.some(l=>l.models&&l.models.length===l.count&&l.models.some(o=>o!==null)))return t.map(l=>`${l.id}:${l.count}`).join(",");const a=[];for(const l of t)for(let o=0;o<l.count;o++)a.push({persona:l.id,instance_index:o+1,name:`${l.id}-${o+1}`,model:l.models?.[o]??null});return JSON.stringify(a)}function B5(e,t){if(e.some(a=>a.description)||t.some(a=>a.description)||e.some(a=>a.models?.some(l=>l!==null))||t.some(a=>a.models?.some(l=>l!==null))||e.length!==t.length)return!1;const r=new Map(e.map(a=>[a.id,a.count]));for(const a of t)if(r.get(a.id)!==a.count)return!1;return!0}function U5({isRunning:e,runningCount:t,onRunCommand:r,prefill:a,onPrefillConsumed:l}){const[o,c]=E.useState(lo[0]?.id??""),[f,h]=E.useState({}),[m,g]=E.useState(!1),[x,y]=E.useState(!1),v=E.useRef(void 0),{reviewers:w,defaults:_,isLoaded:N}=Wm(),[S,O]=E.useState(null),[z,F]=E.useState(!1),$=lo.find(V=>V.id===o)??lo[0],j=$.id==="review",G=N?_.map(V=>({id:V,count:1})).reduce((V,fe)=>{const A=V.find(D=>D.id===fe.id);return A?A.count+=fe.count:V.push({...fe}),V},[]):[],R=S??G,[ie,P]=E.useState(null);a!==ie&&(P(a),a&&(c(a.commandId),h(a.params),O(a.team??null),g(!1),y(!0),l())),E.useEffect(()=>{if(x)return v.current=setTimeout(()=>y(!1),1200),()=>clearTimeout(v.current)},[x]);function ee(V){V!==o&&(c(V),h({}),O(null),g(!1))}function te(V,fe){h(A=>({...A,[V]:fe}))}function we(V){const A=(S??G).filter(D=>D.id!==V);O(A)}const se=E.useCallback(V=>{B5(V,G)?O(null):O(V),F(!1)},[G]);function Q(){const V=[$.command],fe=f.target;if(typeof fe=="string"&&fe.trim()&&V.push(fe.trim()),f.fresh===!0&&V.push("--fresh"),j&&S!==null){const D=I5(S);D&&V.push("--team",D);for(const B of S)if(B.description){const C=B.description.replace(/"/g,'\\"');B.count>1?V.push("--reviewer",`${B.count}:"${C}"`):V.push("--reviewer",`"${C}"`)}}const A=f.requirements;return typeof A=="string"&&A.trim()&&V.push("--requirements",A.trim()),V.join(" ")}function M(){e||g(!0)}function Y(){const V=Q();g(!1),h({}),O(null),r(V)}return d.jsxs("div",{className:ne("relative overflow-hidden rounded-lg border border-zinc-200 border-l-[3px] border-l-indigo-500 transition-shadow duration-500 dark:border-zinc-800 dark:border-l-indigo-400",x&&"ring-2 ring-indigo-400/60 shadow-md shadow-indigo-500/10"),children:[d.jsxs("div",{className:"flex items-center gap-1 border-b border-zinc-200 bg-zinc-50 px-4 py-2.5 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx(Mo,{className:"mr-1.5 h-4 w-4 text-indigo-500 dark:text-indigo-400"}),lo.map(V=>d.jsx("button",{type:"button",onClick:()=>ee(V.id),className:ne("rounded-full px-3.5 py-1 text-xs font-medium transition-colors",V.id===o?"bg-indigo-600 text-white shadow-sm":"text-zinc-600 hover:bg-zinc-200 dark:text-zinc-400 dark:hover:bg-zinc-800"),children:V.label},V.id))]}),d.jsxs("div",{className:"flex items-start gap-2 border-b border-amber-200 bg-amber-50 px-4 py-2.5 text-xs text-amber-800 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-300",children:[d.jsx(Qm,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),d.jsx("span",{children:"Commands run an AI agent with full read/write and shell access to your project. Only run in trusted environments."})]}),d.jsxs("div",{className:"space-y-4 bg-white px-5 py-4 dark:bg-zinc-900/50",children:[d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:$.description}),d.jsxs("div",{className:"space-y-3",children:[$.params.map(V=>V.type==="text"?d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("label",{className:"w-28 shrink-0 text-right text-xs font-medium text-zinc-500 dark:text-zinc-400",children:V.label}),d.jsx("input",{type:"text",placeholder:V.placeholder,disabled:e,value:f[V.name]??"",onChange:fe=>te(V.name,fe.target.value),className:ne("w-full rounded-md border px-3 py-1.5 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","disabled:cursor-not-allowed disabled:opacity-50")})]},V.name):d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"w-28 shrink-0"}),d.jsxs("label",{className:"flex items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[d.jsx("input",{type:"checkbox",disabled:e,checked:f[V.name]===!0,onChange:fe=>te(V.name,fe.target.checked),className:"h-3.5 w-3.5 rounded border-zinc-300 text-indigo-500 focus:ring-indigo-400 dark:border-zinc-600"}),V.label]})]},V.name)),j&&d.jsx(C5,{reviewers:w,selection:R,isLoaded:N,disabled:e,onRemove:we,onCustomize:()=>F(!0)})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"w-28 shrink-0"}),d.jsxs("button",{type:"button",disabled:e,onClick:M,className:ne("flex w-full items-center justify-center gap-1.5 rounded-md px-4 py-2 text-sm font-medium transition-colors","bg-indigo-600 text-white hover:bg-indigo-700","disabled:cursor-not-allowed disabled:opacity-50"),children:[d.jsx(Gs,{className:"h-3.5 w-3.5"}),"Run ",$.label,t!=null&&t>0&&d.jsxs("span",{className:"ml-1.5 rounded-full bg-indigo-500/20 px-1.5 text-[10px] font-normal text-indigo-300",children:[t," running"]})]})]})]}),m&&d.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-white/95 backdrop-blur-sm dark:bg-zinc-900/95",children:d.jsxs("div",{className:"flex flex-col items-center gap-3 px-4",children:[d.jsxs("p",{className:"text-sm font-medium",children:["Run ",$.label,"?"]}),d.jsx("p",{className:"max-w-[260px] text-center text-xs text-zinc-500 dark:text-zinc-400",children:"This will spawn a Claude Code session that may take several minutes."}),d.jsx("code",{className:"max-w-[320px] truncate rounded bg-zinc-100 px-2 py-1 text-xs text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",children:Q()}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{type:"button",onClick:()=>g(!1),className:"rounded-md border border-zinc-300 px-4 py-1.5 text-xs font-medium transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:hover:bg-zinc-800",children:"Cancel"}),d.jsxs("button",{type:"button",onClick:Y,className:"flex items-center gap-1 rounded-md bg-indigo-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-indigo-700",children:[d.jsx(Gs,{className:"h-3 w-3"}),"Start"]})]})]})}),j&&d.jsx(M5,{open:z,reviewers:w,initialSelection:R,onApply:se,onClose:()=>F(!1)})]})}const uy=[{border:"border-l-indigo-400 dark:border-l-indigo-500",bg:"bg-indigo-50/30 dark:bg-indigo-950/15",text:"text-indigo-700 dark:text-indigo-300",dot:"bg-indigo-500"},{border:"border-l-emerald-400 dark:border-l-emerald-500",bg:"bg-emerald-50/30 dark:bg-emerald-950/15",text:"text-emerald-700 dark:text-emerald-300",dot:"bg-emerald-500"},{border:"border-l-amber-400 dark:border-l-amber-500",bg:"bg-amber-50/30 dark:bg-amber-950/15",text:"text-amber-700 dark:text-amber-300",dot:"bg-amber-500"},{border:"border-l-sky-400 dark:border-l-sky-500",bg:"bg-sky-50/30 dark:bg-sky-950/15",text:"text-sky-700 dark:text-sky-300",dot:"bg-sky-500"},{border:"border-l-rose-400 dark:border-l-rose-500",bg:"bg-rose-50/30 dark:bg-rose-950/15",text:"text-rose-700 dark:text-rose-300",dot:"bg-rose-500"},{border:"border-l-violet-400 dark:border-l-violet-500",bg:"bg-violet-50/30 dark:bg-violet-950/15",text:"text-violet-700 dark:text-violet-300",dot:"bg-violet-500"}],P5={border:"border-l-zinc-300 dark:border-l-zinc-700",bg:"bg-transparent",text:"text-zinc-600 dark:text-zinc-400",dot:"bg-zinc-400 dark:bg-zinc-500"};function F5(e){let t=0;for(let r=0;r<e.length;r++)t=t*31+e.charCodeAt(r)|0;return Math.abs(t)}function H5(e){return e==="orchestrator"?P5:uy[F5(e)%uy.length]}function q5(e){return e==="orchestrator"?"Orchestrator":e}function $5({agentId:e,showName:t,displayName:r,children:a}){const l=H5(e),o=r??q5(e);return d.jsxs("div",{className:ne("relative pl-4",l.bg),children:[d.jsx("span",{"aria-hidden":!0,className:ne("pointer-events-none absolute inset-y-0 left-0 w-[2px]",l.border.replace("border-l-","bg-"))}),t&&d.jsxs("div",{className:ne("mb-1 flex items-center gap-1.5 text-[11px] font-medium",l.text),children:[d.jsx("span",{"aria-hidden":!0,className:ne("inline-block h-1.5 w-1.5 rounded-full",l.dot)}),o]}),d.jsx("div",{children:a})]})}function G5(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const K5=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,V5=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Y5={};function dy(e,t){return(Y5.jsx?V5:K5).test(e)}const Q5=/[ \t\n\f\r]/g;function X5(e){return typeof e=="object"?e.type==="text"?fy(e.value):!1:fy(e)}function fy(e){return e.replace(Q5,"")===""}class Do{constructor(t,r,a){this.normal=r,this.property=t,a&&(this.space=a)}}Do.prototype.normal={};Do.prototype.property={};Do.prototype.space=void 0;function yk(e,t){const r={},a={};for(const l of e)Object.assign(r,l.property),Object.assign(a,l.normal);return new Do(r,a,t)}function om(e){return e.toLowerCase()}class ir{constructor(t,r){this.attribute=r,this.property=t}}ir.prototype.attribute="";ir.prototype.booleanish=!1;ir.prototype.boolean=!1;ir.prototype.commaOrSpaceSeparated=!1;ir.prototype.commaSeparated=!1;ir.prototype.defined=!1;ir.prototype.mustUseProperty=!1;ir.prototype.number=!1;ir.prototype.overloadedBoolean=!1;ir.prototype.property="";ir.prototype.spaceSeparated=!1;ir.prototype.space=void 0;let Z5=0;const st=Ja(),vn=Ja(),cm=Ja(),ke=Ja(),Zt=Ja(),$s=Ja(),mr=Ja();function Ja(){return 2**++Z5}const um=Object.freeze(Object.defineProperty({__proto__:null,boolean:st,booleanish:vn,commaOrSpaceSeparated:mr,commaSeparated:$s,number:ke,overloadedBoolean:cm,spaceSeparated:Zt},Symbol.toStringTag,{value:"Module"})),Nh=Object.keys(um);class Jm extends ir{constructor(t,r,a,l){let o=-1;if(super(t,r),hy(this,"space",l),typeof a=="number")for(;++o<Nh.length;){const c=Nh[o];hy(this,Nh[o],(a&um[c])===um[c])}}}Jm.prototype.defined=!0;function hy(e,t,r){r&&(e[t]=r)}function Js(e){const t={},r={};for(const[a,l]of Object.entries(e.properties)){const o=new Jm(a,e.transform(e.attributes||{},a),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),t[a]=o,r[om(a)]=a,r[om(o.attribute)]=a}return new Do(t,r,e.space)}const vk=Js({properties:{ariaActiveDescendant:null,ariaAtomic:vn,ariaAutoComplete:null,ariaBusy:vn,ariaChecked:vn,ariaColCount:ke,ariaColIndex:ke,ariaColSpan:ke,ariaControls:Zt,ariaCurrent:null,ariaDescribedBy:Zt,ariaDetails:null,ariaDisabled:vn,ariaDropEffect:Zt,ariaErrorMessage:null,ariaExpanded:vn,ariaFlowTo:Zt,ariaGrabbed:vn,ariaHasPopup:null,ariaHidden:vn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Zt,ariaLevel:ke,ariaLive:null,ariaModal:vn,ariaMultiLine:vn,ariaMultiSelectable:vn,ariaOrientation:null,ariaOwns:Zt,ariaPlaceholder:null,ariaPosInSet:ke,ariaPressed:vn,ariaReadOnly:vn,ariaRelevant:null,ariaRequired:vn,ariaRoleDescription:Zt,ariaRowCount:ke,ariaRowIndex:ke,ariaRowSpan:ke,ariaSelected:vn,ariaSetSize:ke,ariaSort:null,ariaValueMax:ke,ariaValueMin:ke,ariaValueNow:ke,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function kk(e,t){return t in e?e[t]:t}function wk(e,t){return kk(e,t.toLowerCase())}const W5=Js({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$s,acceptCharset:Zt,accessKey:Zt,action:null,allow:null,allowFullScreen:st,allowPaymentRequest:st,allowUserMedia:st,alt:null,as:null,async:st,autoCapitalize:null,autoComplete:Zt,autoFocus:st,autoPlay:st,blocking:Zt,capture:null,charSet:null,checked:st,cite:null,className:Zt,cols:ke,colSpan:null,content:null,contentEditable:vn,controls:st,controlsList:Zt,coords:ke|$s,crossOrigin:null,data:null,dateTime:null,decoding:null,default:st,defer:st,dir:null,dirName:null,disabled:st,download:cm,draggable:vn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:st,formTarget:null,headers:Zt,height:ke,hidden:cm,high:ke,href:null,hrefLang:null,htmlFor:Zt,httpEquiv:Zt,id:null,imageSizes:null,imageSrcSet:null,inert:st,inputMode:null,integrity:null,is:null,isMap:st,itemId:null,itemProp:Zt,itemRef:Zt,itemScope:st,itemType:Zt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:st,low:ke,manifest:null,max:null,maxLength:ke,media:null,method:null,min:null,minLength:ke,multiple:st,muted:st,name:null,nonce:null,noModule:st,noValidate:st,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:st,optimum:ke,pattern:null,ping:Zt,placeholder:null,playsInline:st,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:st,referrerPolicy:null,rel:Zt,required:st,reversed:st,rows:ke,rowSpan:ke,sandbox:Zt,scope:null,scoped:st,seamless:st,selected:st,shadowRootClonable:st,shadowRootDelegatesFocus:st,shadowRootMode:null,shape:null,size:ke,sizes:null,slot:null,span:ke,spellCheck:vn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ke,step:null,style:null,tabIndex:ke,target:null,title:null,translate:null,type:null,typeMustMatch:st,useMap:null,value:vn,width:ke,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Zt,axis:null,background:null,bgColor:null,border:ke,borderColor:null,bottomMargin:ke,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:st,declare:st,event:null,face:null,frame:null,frameBorder:null,hSpace:ke,leftMargin:ke,link:null,longDesc:null,lowSrc:null,marginHeight:ke,marginWidth:ke,noResize:st,noHref:st,noShade:st,noWrap:st,object:null,profile:null,prompt:null,rev:null,rightMargin:ke,rules:null,scheme:null,scrolling:vn,standby:null,summary:null,text:null,topMargin:ke,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ke,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:st,disableRemotePlayback:st,prefix:null,property:null,results:ke,security:null,unselectable:null},space:"html",transform:wk}),J5=Js({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:mr,accentHeight:ke,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ke,amplitude:ke,arabicForm:null,ascent:ke,attributeName:null,attributeType:null,azimuth:ke,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ke,by:null,calcMode:null,capHeight:ke,className:Zt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ke,diffuseConstant:ke,direction:null,display:null,dur:null,divisor:ke,dominantBaseline:null,download:st,dx:null,dy:null,edgeMode:null,editable:null,elevation:ke,enableBackground:null,end:null,event:null,exponent:ke,externalResourcesRequired:null,fill:null,fillOpacity:ke,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:$s,g2:$s,glyphName:$s,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ke,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ke,horizOriginX:ke,horizOriginY:ke,id:null,ideographic:ke,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ke,k:ke,k1:ke,k2:ke,k3:ke,k4:ke,kernelMatrix:mr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ke,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ke,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ke,overlineThickness:ke,paintOrder:null,panose1:null,path:null,pathLength:ke,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Zt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ke,pointsAtY:ke,pointsAtZ:ke,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:mr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:mr,rev:mr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:mr,requiredFeatures:mr,requiredFonts:mr,requiredFormats:mr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ke,specularExponent:ke,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ke,strikethroughThickness:ke,string:null,stroke:null,strokeDashArray:mr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ke,strokeOpacity:ke,strokeWidth:null,style:null,surfaceScale:ke,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:mr,tabIndex:ke,tableValues:null,target:null,targetX:ke,targetY:ke,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:mr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ke,underlineThickness:ke,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ke,values:null,vAlphabetic:ke,vMathematical:ke,vectorEffect:null,vHanging:ke,vIdeographic:ke,version:null,vertAdvY:ke,vertOriginX:ke,vertOriginY:ke,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ke,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:kk}),Ek=Js({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),_k=Js({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:wk}),Nk=Js({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),eO={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"},tO=/[A-Z]/g,my=/-[a-z]/g,nO=/^data[-\w.:]+$/i;function rO(e,t){const r=om(t);let a=t,l=ir;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&nO.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(my,aO);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!my.test(o)){let c=o.replace(tO,iO);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}l=Jm}return new l(a,t)}function iO(e){return"-"+e.toLowerCase()}function aO(e){return e.charAt(1).toUpperCase()}const sO=yk([vk,W5,Ek,_k,Nk],"html"),ep=yk([vk,J5,Ek,_k,Nk],"svg");function lO(e){return e.join(" ").trim()}var Ds={},Sh,py;function oO(){if(py)return Sh;py=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
|
|
529
|
-
`,m="/",g="*",x="",y="comment",v="declaration";function w(N,S){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];S=S||{};var O=1,z=1;function F(se){var Q=se.match(t);Q&&(O+=Q.length);var M=se.lastIndexOf(h);z=~M?se.length-M:z+se.length}function $(){var se={line:O,column:z};return function(Q){return Q.position=new j(se),ie(),Q}}function j(se){this.start=se,this.end={line:O,column:z},this.source=S.source}j.prototype.content=N;function G(se){var Q=new Error(S.source+":"+O+":"+z+": "+se);if(Q.reason=se,Q.filename=S.source,Q.line=O,Q.column=z,Q.source=N,!S.silent)throw Q}function R(se){var Q=se.exec(N);if(Q){var M=Q[0];return F(M),N=N.slice(M.length),Q}}function ie(){R(r)}function P(se){var Q;for(se=se||[];Q=ee();)Q!==!1&&se.push(Q);return se}function ee(){var se=$();if(!(m!=N.charAt(0)||g!=N.charAt(1))){for(var Q=2;x!=N.charAt(Q)&&(g!=N.charAt(Q)||m!=N.charAt(Q+1));)++Q;if(Q+=2,x===N.charAt(Q-1))return G("End of comment missing");var M=N.slice(2,Q-2);return z+=2,F(M),N=N.slice(Q),z+=2,se({type:y,comment:M})}}function te(){var se=$(),Q=R(a);if(Q){if(ee(),!R(l))return G("property missing ':'");var M=R(o),Y=se({type:v,property:_(Q[0].replace(e,x)),value:M?_(M[0].replace(e,x)):x});return R(c),Y}}function we(){var se=[];P(se);for(var Q;Q=te();)Q!==!1&&(se.push(Q),P(se));return se}return ie(),we()}function _(N){return N?N.replace(f,x):x}return Sh=w,Sh}var gy;function cO(){if(gy)return Ds;gy=1;var e=Ds&&Ds.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.default=r;const t=e(oO());function r(a,l){let o=null;if(!a||typeof a!="string")return o;const c=(0,t.default)(a),f=typeof l=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:m,value:g}=h;f?l(m,g,h):g&&(o=o||{},o[m]=g)}),o}return Ds}var Wl={},by;function uO(){if(by)return Wl;by=1,Object.defineProperty(Wl,"__esModule",{value:!0}),Wl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,o=function(m){return!m||r.test(m)||e.test(m)},c=function(m,g){return g.toUpperCase()},f=function(m,g){return"".concat(g,"-")},h=function(m,g){return g===void 0&&(g={}),o(m)?m:(m=m.toLowerCase(),g.reactCompat?m=m.replace(l,f):m=m.replace(a,f),m.replace(t,c))};return Wl.camelCase=h,Wl}var Jl,xy;function dO(){if(xy)return Jl;xy=1;var e=Jl&&Jl.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(cO()),r=uO();function a(l,o){var c={};return!l||typeof l!="string"||(0,t.default)(l,function(f,h){f&&h&&(c[(0,r.camelCase)(f,o)]=h)}),c}return a.default=a,Jl=a,Jl}var fO=dO();const hO=Pu(fO),Sk=zk("end"),tp=zk("start");function zk(e){return t;function t(r){const a=r&&r.position&&r.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function mO(e){const t=tp(e),r=Sk(e);if(t&&r)return{start:t,end:r}}function uo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?yy(e.position):"start"in e||"end"in e?yy(e):"line"in e||"column"in e?dm(e):""}function dm(e){return vy(e&&e.line)+":"+vy(e&&e.column)}function yy(e){return dm(e&&e.start)+"-"+dm(e&&e.end)}function vy(e){return e&&typeof e=="number"?e:1}class qn extends Error{constructor(t,r,a){super(),typeof r=="string"&&(a=r,r=void 0);let l="",o={},c=!1;if(r&&("line"in r&&"column"in r?o={place:r}:"start"in r&&"end"in r?o={place:r}:"type"in r?o={ancestors:[r],place:r.position}:o={...r}),typeof t=="string"?l=t:!o.cause&&t&&(c=!0,l=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof a=="string"){const h=a.indexOf(":");h===-1?o.ruleId=a:(o.source=a.slice(0,h),o.ruleId=a.slice(h+1))}if(!o.place&&o.ancestors&&o.ancestors){const h=o.ancestors[o.ancestors.length-1];h&&(o.place=h.position)}const f=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=f?f.line:void 0,this.name=uo(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}qn.prototype.file="";qn.prototype.name="";qn.prototype.reason="";qn.prototype.message="";qn.prototype.stack="";qn.prototype.column=void 0;qn.prototype.line=void 0;qn.prototype.ancestors=void 0;qn.prototype.cause=void 0;qn.prototype.fatal=void 0;qn.prototype.place=void 0;qn.prototype.ruleId=void 0;qn.prototype.source=void 0;const np={}.hasOwnProperty,pO=new Map,gO=/[A-Z]/g,bO=new Set(["table","tbody","thead","tfoot","tr"]),xO=new Set(["td","th"]),Ck="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function yO(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=zO(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=SO(r,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ep:sO,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Tk(l,e,void 0);return o&&typeof o!="string"?o:l.create(e,l.Fragment,{children:o||void 0},void 0)}function Tk(e,t,r){if(t.type==="element")return vO(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return kO(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return EO(e,t,r);if(t.type==="mdxjsEsm")return wO(e,t);if(t.type==="root")return _O(e,t,r);if(t.type==="text")return NO(e,t)}function vO(e,t,r){const a=e.schema;let l=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(l=ep,e.schema=l),e.ancestors.push(t);const o=Rk(e,t.tagName,!1),c=CO(e,t);let f=ip(e,t);return bO.has(t.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!X5(h):!0})),Ak(e,c,o,t),rp(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,r)}function kO(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}wo(e,t.position)}function wO(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wo(e,t.position)}function EO(e,t,r){const a=e.schema;let l=a;t.name==="svg"&&a.space==="html"&&(l=ep,e.schema=l),e.ancestors.push(t);const o=t.name===null?e.Fragment:Rk(e,t.name,!0),c=TO(e,t),f=ip(e,t);return Ak(e,c,o,t),rp(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,r)}function _O(e,t,r){const a={};return rp(a,ip(e,t)),e.create(t,e.Fragment,a,r)}function NO(e,t){return t.value}function Ak(e,t,r,a){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=a)}function rp(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function SO(e,t,r){return a;function a(l,o,c,f){const m=Array.isArray(c.children)?r:t;return f?m(o,c,f):m(o,c)}}function zO(e,t){return r;function r(a,l,o,c){const f=Array.isArray(o.children),h=tp(a);return t(l,o,c,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function CO(e,t){const r={};let a,l;for(l in t.properties)if(l!=="children"&&np.call(t.properties,l)){const o=AO(e,l,t.properties[l]);if(o){const[c,f]=o;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&xO.has(t.tagName)?a=f:r[c]=f}}if(a){const o=r.style||(r.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return r}function TO(e,t){const r={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.data.estree.body[0];o.type;const c=o.expression;c.type;const f=c.properties[0];f.type,Object.assign(r,e.evaluater.evaluateExpression(f.argument))}else wo(e,t.position);else{const l=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,o=e.evaluater.evaluateExpression(f.expression)}else wo(e,t.position);else o=a.value===null?!0:a.value;r[l]=o}return r}function ip(e,t){const r=[];let a=-1;const l=e.passKeys?new Map:pO;for(;++a<t.children.length;){const o=t.children[a];let c;if(e.passKeys){const h=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(h){const m=l.get(h)||0;c=h+"-"+m,l.set(h,m+1)}}const f=Tk(e,o,c);f!==void 0&&r.push(f)}return r}function AO(e,t,r){const a=rO(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=a.commaSeparated?G5(r):lO(r)),a.property==="style"){let l=typeof r=="object"?r:RO(e,String(r));return e.stylePropertyNameCase==="css"&&(l=OO(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&a.space?eO[a.property]||a.property:a.attribute,r]}}function RO(e,t){try{return hO(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const a=r,l=new qn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=Ck+"#cannot-parse-style-attribute",l}}function Rk(e,t,r){let a;if(!r)a={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let o=-1,c;for(;++o<l.length;){const f=dy(l[o])?{type:"Identifier",name:l[o]}:{type:"Literal",value:l[o]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(o&&f.type==="Literal"),optional:!1}:f}a=c}else a=dy(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const l=a.value;return np.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(a);wo(e)}function wo(e,t){const r=new qn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Ck+"#cannot-handle-mdx-estrees-without-createevaluater",r}function OO(e){const t={};let r;for(r in e)np.call(e,r)&&(t[MO(r)]=e[r]);return t}function MO(e){let t=e.replace(gO,jO);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function jO(e){return"-"+e.toLowerCase()}const zh={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"]},DO={};function ap(e,t){const r=DO,a=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,l=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Ok(e,a,l)}function Ok(e,t,r){if(LO(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ky(e.children,t,r)}return Array.isArray(e)?ky(e,t,r):""}function ky(e,t,r){const a=[];let l=-1;for(;++l<e.length;)a[l]=Ok(e[l],t,r);return a.join("")}function LO(e){return!!(e&&typeof e=="object")}const wy=document.createElement("i");function sp(e){const t="&"+e+";";wy.innerHTML=t;const r=wy.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function gr(e,t,r,a){const l=e.length;let o=0,c;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,r=r>0?r:0,a.length<1e4)c=Array.from(a),c.unshift(t,r),e.splice(...c);else for(r&&e.splice(t,r);o<a.length;)c=a.slice(o,o+1e4),c.unshift(t,0),e.splice(...c),o+=1e4,t+=1e4}function Or(e,t){return e.length>0?(gr(e,e.length,0,t),e):t}const Ey={}.hasOwnProperty;function Mk(e){const t={};let r=-1;for(;++r<e.length;)IO(t,e[r]);return t}function IO(e,t){let r;for(r in t){const l=(Ey.call(e,r)?e[r]:void 0)||(e[r]={}),o=t[r];let c;if(o)for(c in o){Ey.call(l,c)||(l[c]=[]);const f=o[c];BO(l[c],Array.isArray(f)?f:f?[f]:[])}}}function BO(e,t){let r=-1;const a=[];for(;++r<t.length;)(t[r].add==="after"?e:a).push(t[r]);gr(e,0,0,a)}function jk(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function $r(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Vn=ka(/[A-Za-z]/),Hn=ka(/[\dA-Za-z]/),UO=ka(/[#-'*+\--9=?A-Z^-~]/);function ju(e){return e!==null&&(e<32||e===127)}const fm=ka(/\d/),PO=ka(/[\dA-Fa-f]/),FO=ka(/[!-/:-@[-`{-~]/);function Ke(e){return e!==null&&e<-2}function Yt(e){return e!==null&&(e<0||e===32)}function pt(e){return e===-2||e===-1||e===32}const Zu=ka(/\p{P}|\p{S}/u),Ya=ka(/\s/);function ka(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function el(e){const t=[];let r=-1,a=0,l=0;for(;++r<e.length;){const o=e.charCodeAt(r);let c="";if(o===37&&Hn(e.charCodeAt(r+1))&&Hn(e.charCodeAt(r+2)))l=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const f=e.charCodeAt(r+1);o<56320&&f>56319&&f<57344?(c=String.fromCharCode(o,f),l=1):c="�"}else c=String.fromCharCode(o);c&&(t.push(e.slice(a,r),encodeURIComponent(c)),a=r+l+1,c=""),l&&(r+=l,l=0)}return t.join("")+e.slice(a)}function Ct(e,t,r,a){const l=a?a-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(h){return pt(h)?(e.enter(r),f(h)):t(h)}function f(h){return pt(h)&&o++<l?(e.consume(h),f):(e.exit(r),t(h))}}const HO={tokenize:qO};function qO(e){const t=e.attempt(this.parser.constructs.contentInitial,a,l);let r;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ct(e,t,"linePrefix")}function l(f){return e.enter("paragraph"),o(f)}function o(f){const h=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=h),r=h,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Ke(f)?(e.consume(f),e.exit("chunkText"),o):(e.consume(f),c)}}const $O={tokenize:GO},_y={tokenize:KO};function GO(e){const t=this,r=[];let a=0,l,o,c;return f;function f(z){if(a<r.length){const F=r[a];return t.containerState=F[1],e.attempt(F[0].continuation,h,m)(z)}return m(z)}function h(z){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&O();const F=t.events.length;let $=F,j;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){j=t.events[$][1].end;break}S(a);let G=F;for(;G<t.events.length;)t.events[G][1].end={...j},G++;return gr(t.events,$+1,0,t.events.slice(F)),t.events.length=G,m(z)}return f(z)}function m(z){if(a===r.length){if(!l)return y(z);if(l.currentConstruct&&l.currentConstruct.concrete)return w(z);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(_y,g,x)(z)}function g(z){return l&&O(),S(a),y(z)}function x(z){return t.parser.lazy[t.now().line]=a!==r.length,c=t.now().offset,w(z)}function y(z){return t.containerState={},e.attempt(_y,v,w)(z)}function v(z){return a++,r.push([t.currentConstruct,t.containerState]),y(z)}function w(z){if(z===null){l&&O(),S(0),e.consume(z);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:o}),_(z)}function _(z){if(z===null){N(e.exit("chunkFlow"),!0),S(0),e.consume(z);return}return Ke(z)?(e.consume(z),N(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(z),_)}function N(z,F){const $=t.sliceStream(z);if(F&&$.push(null),z.previous=o,o&&(o.next=z),o=z,l.defineSkip(z.start),l.write($),t.parser.lazy[z.start.line]){let j=l.events.length;for(;j--;)if(l.events[j][1].start.offset<c&&(!l.events[j][1].end||l.events[j][1].end.offset>c))return;const G=t.events.length;let R=G,ie,P;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(ie){P=t.events[R][1].end;break}ie=!0}for(S(a),j=G;j<t.events.length;)t.events[j][1].end={...P},j++;gr(t.events,R+1,0,t.events.slice(G)),t.events.length=j}}function S(z){let F=r.length;for(;F-- >z;){const $=r[F];t.containerState=$[1],$[0].exit.call(t,e)}r.length=z}function O(){l.write([null]),o=void 0,l=void 0,t.containerState._closeFlow=void 0}}function KO(e,t,r){return Ct(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ks(e){if(e===null||Yt(e)||Ya(e))return 1;if(Zu(e))return 2}function Wu(e,t,r){const a=[];let l=-1;for(;++l<e.length;){const o=e[l].resolveAll;o&&!a.includes(o)&&(t=o(t,r),a.push(o))}return t}const hm={name:"attention",resolveAll:VO,tokenize:YO};function VO(e,t){let r=-1,a,l,o,c,f,h,m,g;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(a=r;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[a][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;h=e[a][1].end.offset-e[a][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const x={...e[a][1].end},y={...e[r][1].start};Ny(x,-h),Ny(y,h),c={type:h>1?"strongSequence":"emphasisSequence",start:x,end:{...e[a][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:y},o={type:h>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[r][1].start}},l={type:h>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[a][1].end={...c.start},e[r][1].start={...f.end},m=[],e[a][1].end.offset-e[a][1].start.offset&&(m=Or(m,[["enter",e[a][1],t],["exit",e[a][1],t]])),m=Or(m,[["enter",l,t],["enter",c,t],["exit",c,t],["enter",o,t]]),m=Or(m,Wu(t.parser.constructs.insideSpan.null,e.slice(a+1,r),t)),m=Or(m,[["exit",o,t],["enter",f,t],["exit",f,t],["exit",l,t]]),e[r][1].end.offset-e[r][1].start.offset?(g=2,m=Or(m,[["enter",e[r][1],t],["exit",e[r][1],t]])):g=0,gr(e,a-1,r-a+3,m),r=a+m.length-g-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function YO(e,t){const r=this.parser.constructs.attentionMarkers.null,a=this.previous,l=Ks(a);let o;return c;function c(h){return o=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===o)return e.consume(h),f;const m=e.exit("attentionSequence"),g=Ks(h),x=!g||g===2&&l||r.includes(h),y=!l||l===2&&g||r.includes(a);return m._open=!!(o===42?x:x&&(l||!y)),m._close=!!(o===42?y:y&&(g||!x)),t(h)}}function Ny(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const QO={name:"autolink",tokenize:XO};function XO(e,t,r){let a=0;return l;function l(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(v){return Vn(v)?(e.consume(v),c):v===64?r(v):m(v)}function c(v){return v===43||v===45||v===46||Hn(v)?(a=1,f(v)):m(v)}function f(v){return v===58?(e.consume(v),a=0,h):(v===43||v===45||v===46||Hn(v))&&a++<32?(e.consume(v),f):(a=0,m(v))}function h(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||ju(v)?r(v):(e.consume(v),h)}function m(v){return v===64?(e.consume(v),g):UO(v)?(e.consume(v),m):r(v)}function g(v){return Hn(v)?x(v):r(v)}function x(v){return v===46?(e.consume(v),a=0,g):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):y(v)}function y(v){if((v===45||Hn(v))&&a++<63){const w=v===45?y:x;return e.consume(v),w}return r(v)}}const Lo={partial:!0,tokenize:ZO};function ZO(e,t,r){return a;function a(o){return pt(o)?Ct(e,l,"linePrefix")(o):l(o)}function l(o){return o===null||Ke(o)?t(o):r(o)}}const Dk={continuation:{tokenize:JO},exit:eM,name:"blockQuote",tokenize:WO};function WO(e,t,r){const a=this;return l;function l(c){if(c===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),o}return r(c)}function o(c){return pt(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function JO(e,t,r){const a=this;return l;function l(c){return pt(c)?Ct(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(Dk,t,r)(c)}}function eM(e){e.exit("blockQuote")}const Lk={name:"characterEscape",tokenize:tM};function tM(e,t,r){return a;function a(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),l}function l(o){return FO(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}const Ik={name:"characterReference",tokenize:nM};function nM(e,t,r){const a=this;let l=0,o,c;return f;function f(x){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),h}function h(x){return x===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(x),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),o=31,c=Hn,g(x))}function m(x){return x===88||x===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(x),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,c=PO,g):(e.enter("characterReferenceValue"),o=7,c=fm,g(x))}function g(x){if(x===59&&l){const y=e.exit("characterReferenceValue");return c===Hn&&!sp(a.sliceSerialize(y))?r(x):(e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(x)&&l++<o?(e.consume(x),g):r(x)}}const Sy={partial:!0,tokenize:iM},zy={concrete:!0,name:"codeFenced",tokenize:rM};function rM(e,t,r){const a=this,l={partial:!0,tokenize:$};let o=0,c=0,f;return h;function h(j){return m(j)}function m(j){const G=a.events[a.events.length-1];return o=G&&G[1].type==="linePrefix"?G[2].sliceSerialize(G[1],!0).length:0,f=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(j)}function g(j){return j===f?(c++,e.consume(j),g):c<3?r(j):(e.exit("codeFencedFenceSequence"),pt(j)?Ct(e,x,"whitespace")(j):x(j))}function x(j){return j===null||Ke(j)?(e.exit("codeFencedFence"),a.interrupt?t(j):e.check(Sy,_,F)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(j))}function y(j){return j===null||Ke(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x(j)):pt(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ct(e,v,"whitespace")(j)):j===96&&j===f?r(j):(e.consume(j),y)}function v(j){return j===null||Ke(j)?x(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(j))}function w(j){return j===null||Ke(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),x(j)):j===96&&j===f?r(j):(e.consume(j),w)}function _(j){return e.attempt(l,F,N)(j)}function N(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),S}function S(j){return o>0&&pt(j)?Ct(e,O,"linePrefix",o+1)(j):O(j)}function O(j){return j===null||Ke(j)?e.check(Sy,_,F)(j):(e.enter("codeFlowValue"),z(j))}function z(j){return j===null||Ke(j)?(e.exit("codeFlowValue"),O(j)):(e.consume(j),z)}function F(j){return e.exit("codeFenced"),t(j)}function $(j,G,R){let ie=0;return P;function P(Q){return j.enter("lineEnding"),j.consume(Q),j.exit("lineEnding"),ee}function ee(Q){return j.enter("codeFencedFence"),pt(Q)?Ct(j,te,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):te(Q)}function te(Q){return Q===f?(j.enter("codeFencedFenceSequence"),we(Q)):R(Q)}function we(Q){return Q===f?(ie++,j.consume(Q),we):ie>=c?(j.exit("codeFencedFenceSequence"),pt(Q)?Ct(j,se,"whitespace")(Q):se(Q)):R(Q)}function se(Q){return Q===null||Ke(Q)?(j.exit("codeFencedFence"),G(Q)):R(Q)}}}function iM(e,t,r){const a=this;return l;function l(c){return c===null?r(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return a.parser.lazy[a.now().line]?r(c):t(c)}}const Ch={name:"codeIndented",tokenize:sM},aM={partial:!0,tokenize:lM};function sM(e,t,r){const a=this;return l;function l(m){return e.enter("codeIndented"),Ct(e,o,"linePrefix",5)(m)}function o(m){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(m):r(m)}function c(m){return m===null?h(m):Ke(m)?e.attempt(aM,c,h)(m):(e.enter("codeFlowValue"),f(m))}function f(m){return m===null||Ke(m)?(e.exit("codeFlowValue"),c(m)):(e.consume(m),f)}function h(m){return e.exit("codeIndented"),t(m)}}function lM(e,t,r){const a=this;return l;function l(c){return a.parser.lazy[a.now().line]?r(c):Ke(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):Ct(e,o,"linePrefix",5)(c)}function o(c){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):Ke(c)?l(c):r(c)}}const oM={name:"codeText",previous:uM,resolve:cM,tokenize:dM};function cM(e){let t=e.length-4,r=3,a,l;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=r;++a<t;)if(e[a][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(a=r-1,t++;++a<=t;)l===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(l=a):(a===t||e[a][1].type==="lineEnding")&&(e[l][1].type="codeTextData",a!==l+2&&(e[l][1].end=e[a-1][1].end,e.splice(l+2,a-l-2),t-=a-l-2,a=l+2),l=void 0);return e}function uM(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function dM(e,t,r){let a=0,l,o;return c;function c(x){return e.enter("codeText"),e.enter("codeTextSequence"),f(x)}function f(x){return x===96?(e.consume(x),a++,f):(e.exit("codeTextSequence"),h(x))}function h(x){return x===null?r(x):x===32?(e.enter("space"),e.consume(x),e.exit("space"),h):x===96?(o=e.enter("codeTextSequence"),l=0,g(x)):Ke(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),h):(e.enter("codeTextData"),m(x))}function m(x){return x===null||x===32||x===96||Ke(x)?(e.exit("codeTextData"),h(x)):(e.consume(x),m)}function g(x){return x===96?(e.consume(x),l++,g):l===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(x)):(o.type="codeTextData",m(x))}}class fM{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const a=r??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,r,a){const l=r||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return a&&eo(this.left,a),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),eo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),eo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);eo(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);eo(this.left,r.reverse())}}}function eo(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function Bk(e){const t={};let r=-1,a,l,o,c,f,h,m;const g=new fM(e);for(;++r<g.length;){for(;r in t;)r=t[r];if(a=g.get(r),r&&a[1].type==="chunkFlow"&&g.get(r-1)[1].type==="listItemPrefix"&&(h=a[1]._tokenizer.events,o=0,o<h.length&&h[o][1].type==="lineEndingBlank"&&(o+=2),o<h.length&&h[o][1].type==="content"))for(;++o<h.length&&h[o][1].type!=="content";)h[o][1].type==="chunkText"&&(h[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,hM(g,r)),r=t[r],m=!0);else if(a[1]._container){for(o=r,l=void 0;o--;)if(c=g.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(l&&(g.get(l)[1].type="lineEndingBlank"),c[1].type="lineEnding",l=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;l&&(a[1].end={...g.get(l)[1].start},f=g.slice(l,r),f.unshift(a),g.splice(l,r-l+1,f))}}return gr(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!m}function hM(e,t){const r=e.get(t)[1],a=e.get(t)[2];let l=t-1;const o=[];let c=r._tokenizer;c||(c=a.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,h=[],m={};let g,x,y=-1,v=r,w=0,_=0;const N=[_];for(;v;){for(;e.get(++l)[1]!==v;);o.push(l),v._tokenizer||(g=a.sliceStream(v),v.next||g.push(null),x&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),x=v,v=v.next}for(v=r;++y<f.length;)f[y][0]==="exit"&&f[y-1][0]==="enter"&&f[y][1].type===f[y-1][1].type&&f[y][1].start.line!==f[y][1].end.line&&(_=y+1,N.push(_),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):N.pop(),y=N.length;y--;){const S=f.slice(N[y],N[y+1]),O=o.pop();h.push([O,O+S.length-1]),e.splice(O,2,S)}for(h.reverse(),y=-1;++y<h.length;)m[w+h[y][0]]=w+h[y][1],w+=h[y][1]-h[y][0]-1;return m}const mM={resolve:gM,tokenize:bM},pM={partial:!0,tokenize:xM};function gM(e){return Bk(e),e}function bM(e,t){let r;return a;function a(f){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),l(f)}function l(f){return f===null?o(f):Ke(f)?e.check(pM,c,o)(f):(e.consume(f),l)}function o(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,l}}function xM(e,t,r){const a=this;return l;function l(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ct(e,o,"linePrefix")}function o(c){if(c===null||Ke(c))return r(c);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,r,t)(c)}}function Uk(e,t,r,a,l,o,c,f,h){const m=h||Number.POSITIVE_INFINITY;let g=0;return x;function x(S){return S===60?(e.enter(a),e.enter(l),e.enter(o),e.consume(S),e.exit(o),y):S===null||S===32||S===41||ju(S)?r(S):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),_(S))}function y(S){return S===62?(e.enter(o),e.consume(S),e.exit(o),e.exit(l),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(S))}function v(S){return S===62?(e.exit("chunkString"),e.exit(f),y(S)):S===null||S===60||Ke(S)?r(S):(e.consume(S),S===92?w:v)}function w(S){return S===60||S===62||S===92?(e.consume(S),v):v(S)}function _(S){return!g&&(S===null||S===41||Yt(S))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(S)):g<m&&S===40?(e.consume(S),g++,_):S===41?(e.consume(S),g--,_):S===null||S===32||S===40||ju(S)?r(S):(e.consume(S),S===92?N:_)}function N(S){return S===40||S===41||S===92?(e.consume(S),_):_(S)}}function Pk(e,t,r,a,l,o){const c=this;let f=0,h;return m;function m(v){return e.enter(a),e.enter(l),e.consume(v),e.exit(l),e.enter(o),g}function g(v){return f>999||v===null||v===91||v===93&&!h||v===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?r(v):v===93?(e.exit(o),e.enter(l),e.consume(v),e.exit(l),e.exit(a),t):Ke(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),x(v))}function x(v){return v===null||v===91||v===93||Ke(v)||f++>999?(e.exit("chunkString"),g(v)):(e.consume(v),h||(h=!pt(v)),v===92?y:x)}function y(v){return v===91||v===92||v===93?(e.consume(v),f++,x):x(v)}}function Fk(e,t,r,a,l,o){let c;return f;function f(y){return y===34||y===39||y===40?(e.enter(a),e.enter(l),e.consume(y),e.exit(l),c=y===40?41:y,h):r(y)}function h(y){return y===c?(e.enter(l),e.consume(y),e.exit(l),e.exit(a),t):(e.enter(o),m(y))}function m(y){return y===c?(e.exit(o),h(c)):y===null?r(y):Ke(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),Ct(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===c||y===null||Ke(y)?(e.exit("chunkString"),m(y)):(e.consume(y),y===92?x:g)}function x(y){return y===c||y===92?(e.consume(y),g):g(y)}}function fo(e,t){let r;return a;function a(l){return Ke(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r=!0,a):pt(l)?Ct(e,a,r?"linePrefix":"lineSuffix")(l):t(l)}}const yM={name:"definition",tokenize:kM},vM={partial:!0,tokenize:wM};function kM(e,t,r){const a=this;let l;return o;function o(v){return e.enter("definition"),c(v)}function c(v){return Pk.call(a,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return l=$r(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),h):r(v)}function h(v){return Yt(v)?fo(e,m)(v):m(v)}function m(v){return Uk(e,g,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function g(v){return e.attempt(vM,x,x)(v)}function x(v){return pt(v)?Ct(e,y,"whitespace")(v):y(v)}function y(v){return v===null||Ke(v)?(e.exit("definition"),a.parser.defined.push(l),t(v)):r(v)}}function wM(e,t,r){return a;function a(f){return Yt(f)?fo(e,l)(f):r(f)}function l(f){return Fk(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function o(f){return pt(f)?Ct(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Ke(f)?t(f):r(f)}}const EM={name:"hardBreakEscape",tokenize:_M};function _M(e,t,r){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),l}function l(o){return Ke(o)?(e.exit("hardBreakEscape"),t(o)):r(o)}}const NM={name:"headingAtx",resolve:SM,tokenize:zM};function SM(e,t){let r=e.length-2,a=3,l,o;return e[a][1].type==="whitespace"&&(a+=2),r-2>a&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(a===r-1||r-4>a&&e[r-2][1].type==="whitespace")&&(r-=a+1===r?2:4),r>a&&(l={type:"atxHeadingText",start:e[a][1].start,end:e[r][1].end},o={type:"chunkText",start:e[a][1].start,end:e[r][1].end,contentType:"text"},gr(e,a,r-a+1,[["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t]])),e}function zM(e,t,r){let a=0;return l;function l(g){return e.enter("atxHeading"),o(g)}function o(g){return e.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&a++<6?(e.consume(g),c):g===null||Yt(g)?(e.exit("atxHeadingSequence"),f(g)):r(g)}function f(g){return g===35?(e.enter("atxHeadingSequence"),h(g)):g===null||Ke(g)?(e.exit("atxHeading"),t(g)):pt(g)?Ct(e,f,"whitespace")(g):(e.enter("atxHeadingText"),m(g))}function h(g){return g===35?(e.consume(g),h):(e.exit("atxHeadingSequence"),f(g))}function m(g){return g===null||g===35||Yt(g)?(e.exit("atxHeadingText"),f(g)):(e.consume(g),m)}}const CM=["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"],Cy=["pre","script","style","textarea"],TM={concrete:!0,name:"htmlFlow",resolveTo:OM,tokenize:MM},AM={partial:!0,tokenize:DM},RM={partial:!0,tokenize:jM};function OM(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function MM(e,t,r){const a=this;let l,o,c,f,h;return m;function m(C){return g(C)}function g(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),x}function x(C){return C===33?(e.consume(C),y):C===47?(e.consume(C),o=!0,_):C===63?(e.consume(C),l=3,a.interrupt?t:A):Vn(C)?(e.consume(C),c=String.fromCharCode(C),N):r(C)}function y(C){return C===45?(e.consume(C),l=2,v):C===91?(e.consume(C),l=5,f=0,w):Vn(C)?(e.consume(C),l=4,a.interrupt?t:A):r(C)}function v(C){return C===45?(e.consume(C),a.interrupt?t:A):r(C)}function w(C){const ue="CDATA[";return C===ue.charCodeAt(f++)?(e.consume(C),f===ue.length?a.interrupt?t:te:w):r(C)}function _(C){return Vn(C)?(e.consume(C),c=String.fromCharCode(C),N):r(C)}function N(C){if(C===null||C===47||C===62||Yt(C)){const ue=C===47,be=c.toLowerCase();return!ue&&!o&&Cy.includes(be)?(l=1,a.interrupt?t(C):te(C)):CM.includes(c.toLowerCase())?(l=6,ue?(e.consume(C),S):a.interrupt?t(C):te(C)):(l=7,a.interrupt&&!a.parser.lazy[a.now().line]?r(C):o?O(C):z(C))}return C===45||Hn(C)?(e.consume(C),c+=String.fromCharCode(C),N):r(C)}function S(C){return C===62?(e.consume(C),a.interrupt?t:te):r(C)}function O(C){return pt(C)?(e.consume(C),O):P(C)}function z(C){return C===47?(e.consume(C),P):C===58||C===95||Vn(C)?(e.consume(C),F):pt(C)?(e.consume(C),z):P(C)}function F(C){return C===45||C===46||C===58||C===95||Hn(C)?(e.consume(C),F):$(C)}function $(C){return C===61?(e.consume(C),j):pt(C)?(e.consume(C),$):z(C)}function j(C){return C===null||C===60||C===61||C===62||C===96?r(C):C===34||C===39?(e.consume(C),h=C,G):pt(C)?(e.consume(C),j):R(C)}function G(C){return C===h?(e.consume(C),h=null,ie):C===null||Ke(C)?r(C):(e.consume(C),G)}function R(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||Yt(C)?$(C):(e.consume(C),R)}function ie(C){return C===47||C===62||pt(C)?z(C):r(C)}function P(C){return C===62?(e.consume(C),ee):r(C)}function ee(C){return C===null||Ke(C)?te(C):pt(C)?(e.consume(C),ee):r(C)}function te(C){return C===45&&l===2?(e.consume(C),M):C===60&&l===1?(e.consume(C),Y):C===62&&l===4?(e.consume(C),D):C===63&&l===3?(e.consume(C),A):C===93&&l===5?(e.consume(C),fe):Ke(C)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(AM,B,we)(C)):C===null||Ke(C)?(e.exit("htmlFlowData"),we(C)):(e.consume(C),te)}function we(C){return e.check(RM,se,B)(C)}function se(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),Q}function Q(C){return C===null||Ke(C)?we(C):(e.enter("htmlFlowData"),te(C))}function M(C){return C===45?(e.consume(C),A):te(C)}function Y(C){return C===47?(e.consume(C),c="",V):te(C)}function V(C){if(C===62){const ue=c.toLowerCase();return Cy.includes(ue)?(e.consume(C),D):te(C)}return Vn(C)&&c.length<8?(e.consume(C),c+=String.fromCharCode(C),V):te(C)}function fe(C){return C===93?(e.consume(C),A):te(C)}function A(C){return C===62?(e.consume(C),D):C===45&&l===2?(e.consume(C),A):te(C)}function D(C){return C===null||Ke(C)?(e.exit("htmlFlowData"),B(C)):(e.consume(C),D)}function B(C){return e.exit("htmlFlow"),t(C)}}function jM(e,t,r){const a=this;return l;function l(c){return Ke(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):r(c)}function o(c){return a.parser.lazy[a.now().line]?r(c):t(c)}}function DM(e,t,r){return a;function a(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(Lo,t,r)}}const LM={name:"htmlText",tokenize:IM};function IM(e,t,r){const a=this;let l,o,c;return f;function f(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),h}function h(A){return A===33?(e.consume(A),m):A===47?(e.consume(A),$):A===63?(e.consume(A),z):Vn(A)?(e.consume(A),R):r(A)}function m(A){return A===45?(e.consume(A),g):A===91?(e.consume(A),o=0,w):Vn(A)?(e.consume(A),O):r(A)}function g(A){return A===45?(e.consume(A),v):r(A)}function x(A){return A===null?r(A):A===45?(e.consume(A),y):Ke(A)?(c=x,Y(A)):(e.consume(A),x)}function y(A){return A===45?(e.consume(A),v):x(A)}function v(A){return A===62?M(A):A===45?y(A):x(A)}function w(A){const D="CDATA[";return A===D.charCodeAt(o++)?(e.consume(A),o===D.length?_:w):r(A)}function _(A){return A===null?r(A):A===93?(e.consume(A),N):Ke(A)?(c=_,Y(A)):(e.consume(A),_)}function N(A){return A===93?(e.consume(A),S):_(A)}function S(A){return A===62?M(A):A===93?(e.consume(A),S):_(A)}function O(A){return A===null||A===62?M(A):Ke(A)?(c=O,Y(A)):(e.consume(A),O)}function z(A){return A===null?r(A):A===63?(e.consume(A),F):Ke(A)?(c=z,Y(A)):(e.consume(A),z)}function F(A){return A===62?M(A):z(A)}function $(A){return Vn(A)?(e.consume(A),j):r(A)}function j(A){return A===45||Hn(A)?(e.consume(A),j):G(A)}function G(A){return Ke(A)?(c=G,Y(A)):pt(A)?(e.consume(A),G):M(A)}function R(A){return A===45||Hn(A)?(e.consume(A),R):A===47||A===62||Yt(A)?ie(A):r(A)}function ie(A){return A===47?(e.consume(A),M):A===58||A===95||Vn(A)?(e.consume(A),P):Ke(A)?(c=ie,Y(A)):pt(A)?(e.consume(A),ie):M(A)}function P(A){return A===45||A===46||A===58||A===95||Hn(A)?(e.consume(A),P):ee(A)}function ee(A){return A===61?(e.consume(A),te):Ke(A)?(c=ee,Y(A)):pt(A)?(e.consume(A),ee):ie(A)}function te(A){return A===null||A===60||A===61||A===62||A===96?r(A):A===34||A===39?(e.consume(A),l=A,we):Ke(A)?(c=te,Y(A)):pt(A)?(e.consume(A),te):(e.consume(A),se)}function we(A){return A===l?(e.consume(A),l=void 0,Q):A===null?r(A):Ke(A)?(c=we,Y(A)):(e.consume(A),we)}function se(A){return A===null||A===34||A===39||A===60||A===61||A===96?r(A):A===47||A===62||Yt(A)?ie(A):(e.consume(A),se)}function Q(A){return A===47||A===62||Yt(A)?ie(A):r(A)}function M(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):r(A)}function Y(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),V}function V(A){return pt(A)?Ct(e,fe,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):fe(A)}function fe(A){return e.enter("htmlTextData"),c(A)}}const lp={name:"labelEnd",resolveAll:FM,resolveTo:HM,tokenize:qM},BM={tokenize:$M},UM={tokenize:GM},PM={tokenize:KM};function FM(e){let t=-1;const r=[];for(;++t<e.length;){const a=e[t][1];if(r.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const l=a.type==="labelImage"?4:2;a.type="data",t+=l}}return e.length!==r.length&&gr(e,0,e.length,r),e}function HM(e,t){let r=e.length,a=0,l,o,c,f;for(;r--;)if(l=e[r][1],o){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[r][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(c){if(e[r][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(o=r,l.type!=="labelLink")){a=2;break}}else l.type==="labelEnd"&&(c=r);const h={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[o][1].start},end:{...e[c][1].end}},g={type:"labelText",start:{...e[o+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",h,t],["enter",m,t]],f=Or(f,e.slice(o+1,o+a+3)),f=Or(f,[["enter",g,t]]),f=Or(f,Wu(t.parser.constructs.insideSpan.null,e.slice(o+a+4,c-3),t)),f=Or(f,[["exit",g,t],e[c-2],e[c-1],["exit",m,t]]),f=Or(f,e.slice(c+1)),f=Or(f,[["exit",h,t]]),gr(e,o,e.length,f),e}function qM(e,t,r){const a=this;let l=a.events.length,o,c;for(;l--;)if((a.events[l][1].type==="labelImage"||a.events[l][1].type==="labelLink")&&!a.events[l][1]._balanced){o=a.events[l][1];break}return f;function f(y){return o?o._inactive?x(y):(c=a.parser.defined.includes($r(a.sliceSerialize({start:o.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),h):r(y)}function h(y){return y===40?e.attempt(BM,g,c?g:x)(y):y===91?e.attempt(UM,g,c?m:x)(y):c?g(y):x(y)}function m(y){return e.attempt(PM,g,x)(y)}function g(y){return t(y)}function x(y){return o._balanced=!0,r(y)}}function $M(e,t,r){return a;function a(x){return e.enter("resource"),e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),l}function l(x){return Yt(x)?fo(e,o)(x):o(x)}function o(x){return x===41?g(x):Uk(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function c(x){return Yt(x)?fo(e,h)(x):g(x)}function f(x){return r(x)}function h(x){return x===34||x===39||x===40?Fk(e,m,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):g(x)}function m(x){return Yt(x)?fo(e,g)(x):g(x)}function g(x){return x===41?(e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),e.exit("resource"),t):r(x)}}function GM(e,t,r){const a=this;return l;function l(f){return Pk.call(a,e,o,c,"reference","referenceMarker","referenceString")(f)}function o(f){return a.parser.defined.includes($r(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):r(f)}function c(f){return r(f)}}function KM(e,t,r){return a;function a(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),l}function l(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):r(o)}}const VM={name:"labelStartImage",resolveAll:lp.resolveAll,tokenize:YM};function YM(e,t,r){const a=this;return l;function l(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),o}function o(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):r(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(f):t(f)}}const QM={name:"labelStartLink",resolveAll:lp.resolveAll,tokenize:XM};function XM(e,t,r){const a=this;return l;function l(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(c):t(c)}}const Th={name:"lineEnding",tokenize:ZM};function ZM(e,t){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ct(e,t,"linePrefix")}}const Nu={name:"thematicBreak",tokenize:WM};function WM(e,t,r){let a=0,l;return o;function o(m){return e.enter("thematicBreak"),c(m)}function c(m){return l=m,f(m)}function f(m){return m===l?(e.enter("thematicBreakSequence"),h(m)):a>=3&&(m===null||Ke(m))?(e.exit("thematicBreak"),t(m)):r(m)}function h(m){return m===l?(e.consume(m),a++,h):(e.exit("thematicBreakSequence"),pt(m)?Ct(e,f,"whitespace")(m):f(m))}}const rr={continuation:{tokenize:n4},exit:i4,name:"list",tokenize:t4},JM={partial:!0,tokenize:a4},e4={partial:!0,tokenize:r4};function t4(e,t,r){const a=this,l=a.events[a.events.length-1];let o=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,c=0;return f;function f(v){const w=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:fm(v)){if(a.containerState.type||(a.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Nu,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 fm(v)&&++c<10?(e.consume(v),h):(!a.interrupt||c<2)&&(a.containerState.marker?v===a.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),m(v)):r(v)}function m(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,e.check(Lo,a.interrupt?r:g,e.attempt(JM,y,x))}function g(v){return a.containerState.initialBlankLine=!0,o++,y(v)}function x(v){return pt(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),y):r(v)}function y(v){return a.containerState.size=o+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function n4(e,t,r){const a=this;return a.containerState._closeFlow=void 0,e.check(Lo,l,o);function l(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Ct(e,t,"listItemIndent",a.containerState.size+1)(f)}function o(f){return a.containerState.furtherBlankLines||!pt(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(e4,t,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,Ct(e,e.attempt(rr,t,r),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function r4(e,t,r){const a=this;return Ct(e,l,"listItemIndent",a.containerState.size+1);function l(o){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(o):r(o)}}function i4(e){e.exit(this.containerState.type)}function a4(e,t,r){const a=this;return Ct(e,l,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(o){const c=a.events[a.events.length-1];return!pt(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):r(o)}}const Ty={name:"setextUnderline",resolveTo:s4,tokenize:l4};function s4(e,t){let r=e.length,a,l,o;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){a=r;break}e[r][1].type==="paragraph"&&(l=r)}else e[r][1].type==="content"&&e.splice(r,1),!o&&e[r][1].type==="definition"&&(o=r);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",o?(e.splice(l,0,["enter",c,t]),e.splice(o+1,0,["exit",e[a][1],t]),e[a][1].end={...e[o][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function l4(e,t,r){const a=this;let l;return o;function o(m){let g=a.events.length,x;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){x=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||x)?(e.enter("setextHeadingLine"),l=m,c(m)):r(m)}function c(m){return e.enter("setextHeadingLineSequence"),f(m)}function f(m){return m===l?(e.consume(m),f):(e.exit("setextHeadingLineSequence"),pt(m)?Ct(e,h,"lineSuffix")(m):h(m))}function h(m){return m===null||Ke(m)?(e.exit("setextHeadingLine"),t(m)):r(m)}}const o4={tokenize:c4};function c4(e){const t=this,r=e.attempt(Lo,a,e.attempt(this.parser.constructs.flowInitial,l,Ct(e,e.attempt(this.parser.constructs.flow,l,e.attempt(mM,l)),"linePrefix")));return r;function a(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function l(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const u4={resolveAll:qk()},d4=Hk("string"),f4=Hk("text");function Hk(e){return{resolveAll:qk(e==="text"?h4:void 0),tokenize:t};function t(r){const a=this,l=this.parser.constructs[e],o=r.attempt(l,c,f);return c;function c(g){return m(g)?o(g):f(g)}function f(g){if(g===null){r.consume(g);return}return r.enter("data"),r.consume(g),h}function h(g){return m(g)?(r.exit("data"),o(g)):(r.consume(g),h)}function m(g){if(g===null)return!0;const x=l[g];let y=-1;if(x)for(;++y<x.length;){const v=x[y];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function qk(e){return t;function t(r,a){let l=-1,o;for(;++l<=r.length;)o===void 0?r[l]&&r[l][1].type==="data"&&(o=l,l++):(!r[l]||r[l][1].type!=="data")&&(l!==o+2&&(r[o][1].end=r[l-1][1].end,r.splice(o+2,l-o-2),l=o+2),o=void 0);return e?e(r,a):r}}function h4(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const a=e[r-1][1],l=t.sliceStream(a);let o=l.length,c=-1,f=0,h;for(;o--;){const m=l[o];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(m===-2)h=!0,f++;else if(m!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(f=0),f){const m={type:r===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:a.start._bufferIndex+c,_index:a.start._index+o,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...m.start},a.start.offset===a.end.offset?Object.assign(a,m):(e.splice(r,0,["enter",m,t],["exit",m,t]),r+=2)}r++}return e}const m4={42:rr,43:rr,45:rr,48:rr,49:rr,50:rr,51:rr,52:rr,53:rr,54:rr,55:rr,56:rr,57:rr,62:Dk},p4={91:yM},g4={[-2]:Ch,[-1]:Ch,32:Ch},b4={35:NM,42:Nu,45:[Ty,Nu],60:TM,61:Ty,95:Nu,96:zy,126:zy},x4={38:Ik,92:Lk},y4={[-5]:Th,[-4]:Th,[-3]:Th,33:VM,38:Ik,42:hm,60:[QO,LM],91:QM,92:[EM,Lk],93:lp,95:hm,96:oM},v4={null:[hm,u4]},k4={null:[42,95]},w4={null:[]},E4=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:k4,contentInitial:p4,disable:w4,document:m4,flow:b4,flowInitial:g4,insideSpan:v4,string:x4,text:y4},Symbol.toStringTag,{value:"Module"}));function _4(e,t,r){let a={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const l={},o=[];let c=[],f=[];const h={attempt:G($),check:G(j),consume:O,enter:z,exit:F,interrupt:G(j,{interrupt:!0})},m={code:null,containerState:{},defineSkip:_,events:[],now:w,parser:e,previous:null,sliceSerialize:y,sliceStream:v,write:x};let g=t.tokenize.call(m,h);return t.resolveAll&&o.push(t),m;function x(ee){return c=Or(c,ee),N(),c[c.length-1]!==null?[]:(R(t,0),m.events=Wu(o,m.events,m),m.events)}function y(ee,te){return S4(v(ee),te)}function v(ee){return N4(c,ee)}function w(){const{_bufferIndex:ee,_index:te,line:we,column:se,offset:Q}=a;return{_bufferIndex:ee,_index:te,line:we,column:se,offset:Q}}function _(ee){l[ee.line]=ee.column,P()}function N(){let ee;for(;a._index<c.length;){const te=c[a._index];if(typeof te=="string")for(ee=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===ee&&a._bufferIndex<te.length;)S(te.charCodeAt(a._bufferIndex));else S(te)}}function S(ee){g=g(ee)}function O(ee){Ke(ee)?(a.line++,a.column=1,a.offset+=ee===-3?2:1,P()):ee!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),m.previous=ee}function z(ee,te){const we=te||{};return we.type=ee,we.start=w(),m.events.push(["enter",we,m]),f.push(we),we}function F(ee){const te=f.pop();return te.end=w(),m.events.push(["exit",te,m]),te}function $(ee,te){R(ee,te.from)}function j(ee,te){te.restore()}function G(ee,te){return we;function we(se,Q,M){let Y,V,fe,A;return Array.isArray(se)?B(se):"tokenize"in se?B([se]):D(se);function D(ye){return le;function le(xe){const pe=xe!==null&&ye[xe],Ue=xe!==null&&ye.null,Re=[...Array.isArray(pe)?pe:pe?[pe]:[],...Array.isArray(Ue)?Ue:Ue?[Ue]:[]];return B(Re)(xe)}}function B(ye){return Y=ye,V=0,ye.length===0?M:C(ye[V])}function C(ye){return le;function le(xe){return A=ie(),fe=ye,ye.partial||(m.currentConstruct=ye),ye.name&&m.parser.constructs.disable.null.includes(ye.name)?be():ye.tokenize.call(te?Object.assign(Object.create(m),te):m,h,ue,be)(xe)}}function ue(ye){return ee(fe,A),Q}function be(ye){return A.restore(),++V<Y.length?C(Y[V]):M}}}function R(ee,te){ee.resolveAll&&!o.includes(ee)&&o.push(ee),ee.resolve&&gr(m.events,te,m.events.length-te,ee.resolve(m.events.slice(te),m)),ee.resolveTo&&(m.events=ee.resolveTo(m.events,m))}function ie(){const ee=w(),te=m.previous,we=m.currentConstruct,se=m.events.length,Q=Array.from(f);return{from:se,restore:M};function M(){a=ee,m.previous=te,m.currentConstruct=we,m.events.length=se,f=Q,P()}}function P(){a.line in l&&a.column<2&&(a.column=l[a.line],a.offset+=l[a.line]-1)}}function N4(e,t){const r=t.start._index,a=t.start._bufferIndex,l=t.end._index,o=t.end._bufferIndex;let c;if(r===l)c=[e[r].slice(a,o)];else{if(c=e.slice(r,l),a>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}o>0&&c.push(e[l].slice(0,o))}return c}function S4(e,t){let r=-1;const a=[];let l;for(;++r<e.length;){const o=e[r];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
|
|
530
|
-
`;break}case-3:{c=`\r
|
|
531
|
-
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&l)continue;c=" ";break}default:c=String.fromCharCode(o)}l=o===-2,a.push(c)}return a.join("")}function z4(e){const a={constructs:Mk([E4,...(e||{}).extensions||[]]),content:l(HO),defined:[],document:l($O),flow:l(o4),lazy:{},string:l(d4),text:l(f4)};return a;function l(o){return c;function c(f){return _4(a,o,f)}}}function C4(e){for(;!Bk(e););return e}const Ay=/[\0\t\n\r]/g;function T4(){let e=1,t="",r=!0,a;return l;function l(o,c,f){const h=[];let m,g,x,y,v;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),x=0,t="",r&&(o.charCodeAt(0)===65279&&x++,r=void 0);x<o.length;){if(Ay.lastIndex=x,m=Ay.exec(o),y=m&&m.index!==void 0?m.index:o.length,v=o.charCodeAt(y),!m){t=o.slice(x);break}if(v===10&&x===y&&a)h.push(-3),a=void 0;else switch(a&&(h.push(-5),a=void 0),x<y&&(h.push(o.slice(x,y)),e+=y-x),v){case 0:{h.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,h.push(-2);e++<g;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:a=!0,e=1}x=y+1}return f&&(a&&h.push(-5),t&&h.push(t),h.push(null)),h}}const A4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function R4(e){return e.replace(A4,O4)}function O4(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const l=r.charCodeAt(1),o=l===120||l===88;return jk(r.slice(o?2:1),o?16:10)}return sp(r)||e}const $k={}.hasOwnProperty;function M4(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),j4(r)(C4(z4(r).document().write(T4()(e,t,!0))))}function j4(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(xr),autolinkProtocol:ie,autolinkEmail:ie,atxHeading:o(Et),blockQuote:o(Ue),characterEscape:ie,characterReference:ie,codeFenced:o(Re),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(Re,c),codeText:o(Tt,c),codeTextData:ie,data:ie,codeFlowValue:ie,definition:o(tt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(gt),hardBreakEscape:o(ot),hardBreakTrailing:o(ot),htmlFlow:o(En,c),htmlFlowData:ie,htmlText:o(En,c),htmlTextData:ie,image:o(Yn),label:c,link:o(xr),listItem:o(li),listItemValue:y,listOrdered:o(yr,x),listUnordered:o(yr),paragraph:o(wa),reference:C,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(Et),strong:o(Li),thematicBreak:o(Qn)},exit:{atxHeading:h(),atxHeadingSequence:$,autolink:h(),autolinkEmail:pe,autolinkProtocol:xe,blockQuote:h(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:ye,characterReference:le,codeFenced:h(N),codeFencedFence:_,codeFencedFenceInfo:v,codeFencedFenceMeta:w,codeFlowValue:P,codeIndented:h(S),codeText:h(Q),codeTextData:P,data:P,definition:h(),definitionDestinationString:F,definitionLabelString:O,definitionTitleString:z,emphasis:h(),hardBreakEscape:h(te),hardBreakTrailing:h(te),htmlFlow:h(we),htmlFlowData:P,htmlText:h(se),htmlTextData:P,image:h(Y),label:fe,labelText:V,lineEnding:ee,link:h(M),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:ue,resourceDestinationString:A,resourceTitleString:D,resource:B,setextHeading:h(R),setextHeadingLineSequence:G,setextHeadingText:j,strong:h(),thematicBreak:h()}};Gk(t,(e||{}).mdastExtensions||[]);const r={};return a;function a(ae){let Ee={type:"root",children:[]};const $e={stack:[Ee],tokenStack:[],config:t,enter:f,exit:m,buffer:c,resume:g,data:r},We=[];let rt=-1;for(;++rt<ae.length;)if(ae[rt][1].type==="listOrdered"||ae[rt][1].type==="listUnordered")if(ae[rt][0]==="enter")We.push(rt);else{const zn=We.pop();rt=l(ae,zn,rt)}for(rt=-1;++rt<ae.length;){const zn=t[ae[rt][0]];$k.call(zn,ae[rt][1].type)&&zn[ae[rt][1].type].call(Object.assign({sliceSerialize:ae[rt][2].sliceSerialize},$e),ae[rt][1])}if($e.tokenStack.length>0){const zn=$e.tokenStack[$e.tokenStack.length-1];(zn[1]||Ry).call($e,void 0,zn[0])}for(Ee.position={start:ua(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:ua(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},rt=-1;++rt<t.transforms.length;)Ee=t.transforms[rt](Ee)||Ee;return Ee}function l(ae,Ee,$e){let We=Ee-1,rt=-1,zn=!1,ar,cn,rn,Qt;for(;++We<=$e;){const At=ae[We];switch(At[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{At[0]==="enter"?rt++:rt--,Qt=void 0;break}case"lineEndingBlank":{At[0]==="enter"&&(ar&&!Qt&&!rt&&!rn&&(rn=We),Qt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qt=void 0}if(!rt&&At[0]==="enter"&&At[1].type==="listItemPrefix"||rt===-1&&At[0]==="exit"&&(At[1].type==="listUnordered"||At[1].type==="listOrdered")){if(ar){let sr=We;for(cn=void 0;sr--;){const Cn=ae[sr];if(Cn[1].type==="lineEnding"||Cn[1].type==="lineEndingBlank"){if(Cn[0]==="exit")continue;cn&&(ae[cn][1].type="lineEndingBlank",zn=!0),Cn[1].type="lineEnding",cn=sr}else if(!(Cn[1].type==="linePrefix"||Cn[1].type==="blockQuotePrefix"||Cn[1].type==="blockQuotePrefixWhitespace"||Cn[1].type==="blockQuoteMarker"||Cn[1].type==="listItemIndent"))break}rn&&(!cn||rn<cn)&&(ar._spread=!0),ar.end=Object.assign({},cn?ae[cn][1].start:At[1].end),ae.splice(cn||We,0,["exit",ar,At[2]]),We++,$e++}if(At[1].type==="listItemPrefix"){const sr={type:"listItem",_spread:!1,start:Object.assign({},At[1].start),end:void 0};ar=sr,ae.splice(We,0,["enter",sr,At[2]]),We++,$e++,rn=void 0,Qt=!0}}}return ae[Ee][1]._spread=zn,$e}function o(ae,Ee){return $e;function $e(We){f.call(this,ae(We),We),Ee&&Ee.call(this,We)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ae,Ee,$e){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([Ee,$e||void 0]),ae.position={start:ua(Ee.start),end:void 0}}function h(ae){return Ee;function Ee($e){ae&&ae.call(this,$e),m.call(this,$e)}}function m(ae,Ee){const $e=this.stack.pop(),We=this.tokenStack.pop();if(We)We[0].type!==ae.type&&(Ee?Ee.call(this,ae,We[0]):(We[1]||Ry).call(this,ae,We[0]));else throw new Error("Cannot close `"+ae.type+"` ("+uo({start:ae.start,end:ae.end})+"): it’s not open");$e.position.end=ua(ae.end)}function g(){return ap(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function y(ae){if(this.data.expectingFirstListItemValue){const Ee=this.stack[this.stack.length-2];Ee.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function v(){const ae=this.resume(),Ee=this.stack[this.stack.length-1];Ee.lang=ae}function w(){const ae=this.resume(),Ee=this.stack[this.stack.length-1];Ee.meta=ae}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const ae=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const ae=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=ae.replace(/(\r?\n|\r)$/g,"")}function O(ae){const Ee=this.resume(),$e=this.stack[this.stack.length-1];$e.label=Ee,$e.identifier=$r(this.sliceSerialize(ae)).toLowerCase()}function z(){const ae=this.resume(),Ee=this.stack[this.stack.length-1];Ee.title=ae}function F(){const ae=this.resume(),Ee=this.stack[this.stack.length-1];Ee.url=ae}function $(ae){const Ee=this.stack[this.stack.length-1];if(!Ee.depth){const $e=this.sliceSerialize(ae).length;Ee.depth=$e}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function G(ae){const Ee=this.stack[this.stack.length-1];Ee.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function ie(ae){const $e=this.stack[this.stack.length-1].children;let We=$e[$e.length-1];(!We||We.type!=="text")&&(We=Wt(),We.position={start:ua(ae.start),end:void 0},$e.push(We)),this.stack.push(We)}function P(ae){const Ee=this.stack.pop();Ee.value+=this.sliceSerialize(ae),Ee.position.end=ua(ae.end)}function ee(ae){const Ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const $e=Ee.children[Ee.children.length-1];$e.position.end=ua(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ee.type)&&(ie.call(this,ae),P.call(this,ae))}function te(){this.data.atHardBreak=!0}function we(){const ae=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=ae}function se(){const ae=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=ae}function Q(){const ae=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=ae}function M(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const Ee=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=Ee,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function Y(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const Ee=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=Ee,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function V(ae){const Ee=this.sliceSerialize(ae),$e=this.stack[this.stack.length-2];$e.label=R4(Ee),$e.identifier=$r(Ee).toLowerCase()}function fe(){const ae=this.stack[this.stack.length-1],Ee=this.resume(),$e=this.stack[this.stack.length-1];if(this.data.inReference=!0,$e.type==="link"){const We=ae.children;$e.children=We}else $e.alt=Ee}function A(){const ae=this.resume(),Ee=this.stack[this.stack.length-1];Ee.url=ae}function D(){const ae=this.resume(),Ee=this.stack[this.stack.length-1];Ee.title=ae}function B(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function ue(ae){const Ee=this.resume(),$e=this.stack[this.stack.length-1];$e.label=Ee,$e.identifier=$r(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function be(ae){this.data.characterReferenceType=ae.type}function ye(ae){const Ee=this.sliceSerialize(ae),$e=this.data.characterReferenceType;let We;$e?(We=jk(Ee,$e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):We=sp(Ee);const rt=this.stack[this.stack.length-1];rt.value+=We}function le(ae){const Ee=this.stack.pop();Ee.position.end=ua(ae.end)}function xe(ae){P.call(this,ae);const Ee=this.stack[this.stack.length-1];Ee.url=this.sliceSerialize(ae)}function pe(ae){P.call(this,ae);const Ee=this.stack[this.stack.length-1];Ee.url="mailto:"+this.sliceSerialize(ae)}function Ue(){return{type:"blockquote",children:[]}}function Re(){return{type:"code",lang:null,meta:null,value:""}}function Tt(){return{type:"inlineCode",value:""}}function tt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function gt(){return{type:"emphasis",children:[]}}function Et(){return{type:"heading",depth:0,children:[]}}function ot(){return{type:"break"}}function En(){return{type:"html",value:""}}function Yn(){return{type:"image",title:null,url:"",alt:null}}function xr(){return{type:"link",title:null,url:"",children:[]}}function yr(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function li(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function wa(){return{type:"paragraph",children:[]}}function Li(){return{type:"strong",children:[]}}function Wt(){return{type:"text",value:""}}function Qn(){return{type:"thematicBreak"}}}function ua(e){return{line:e.line,column:e.column,offset:e.offset}}function Gk(e,t){let r=-1;for(;++r<t.length;){const a=t[r];Array.isArray(a)?Gk(e,a):D4(e,a)}}function D4(e,t){let r;for(r in t)if($k.call(t,r))switch(r){case"canContainEols":{const a=t[r];a&&e[r].push(...a);break}case"transforms":{const a=t[r];a&&e[r].push(...a);break}case"enter":case"exit":{const a=t[r];a&&Object.assign(e[r],a);break}}}function Ry(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+uo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+uo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+uo({start:t.start,end:t.end})+") is still open")}function L4(e){const t=this;t.parser=r;function r(a){return M4(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function I4(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function B4(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
532
|
-
`}]}function U4(e,t){const r=t.value?t.value+`
|
|
533
|
-
`:"",a={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(a.className=["language-"+l[0]]);let o={type:"element",tagName:"code",properties:a,children:[{type:"text",value:r}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function P4(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function F4(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function H4(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),l=el(a.toLowerCase()),o=e.footnoteOrder.indexOf(a);let c,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=o+1,f+=1,e.footnoteCounts.set(a,f);const h={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+l,id:r+"fnref-"+l+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,h);const m={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,m),e.applyData(t,m)}function q4(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function $4(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function Kk(e,t){const r=t.referenceType;let a="]";if(r==="collapsed"?a+="[]":r==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const l=e.all(t),o=l[0];o&&o.type==="text"?o.value="["+o.value:l.unshift({type:"text",value:"["});const c=l[l.length-1];return c&&c.type==="text"?c.value+=a:l.push({type:"text",value:a}),l}function G4(e,t){const r=String(t.identifier).toUpperCase(),a=e.definitionById.get(r);if(!a)return Kk(e,t);const l={src:el(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(l.title=a.title);const o={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,o),e.applyData(t,o)}function K4(e,t){const r={src:el(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const a={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,a),e.applyData(t,a)}function V4(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const a={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,a),e.applyData(t,a)}function Y4(e,t){const r=String(t.identifier).toUpperCase(),a=e.definitionById.get(r);if(!a)return Kk(e,t);const l={href:el(a.url||"")};a.title!==null&&a.title!==void 0&&(l.title=a.title);const o={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Q4(e,t){const r={href:el(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const a={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function X4(e,t,r){const a=e.all(t),l=r?Z4(r):Vk(t),o={},c=[];if(typeof t.checked=="boolean"){const g=a[0];let x;g&&g.type==="element"&&g.tagName==="p"?x=g:(x={type:"element",tagName:"p",properties:{},children:[]},a.unshift(x)),x.children.length>0&&x.children.unshift({type:"text",value:" "}),x.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const g=a[f];(l||f!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
|
|
534
|
-
`}),g.type==="element"&&g.tagName==="p"&&!l?c.push(...g.children):c.push(g)}const h=a[a.length-1];h&&(l||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
|
|
535
|
-
`});const m={type:"element",tagName:"li",properties:o,children:c};return e.patch(t,m),e.applyData(t,m)}function Z4(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let a=-1;for(;!t&&++a<r.length;)t=Vk(r[a])}return t}function Vk(e){const t=e.spread;return t??e.children.length>1}function W4(e,t){const r={},a=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++l<a.length;){const c=a[l];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function J4(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ej(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function tj(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function nj(e,t){const r=e.all(t),a=r.shift(),l=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),l.push(c)}if(r.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},f=tp(t.children[1]),h=Sk(t.children[t.children.length-1]);f&&h&&(c.position={start:f,end:h}),l.push(c)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,o),e.applyData(t,o)}function rj(e,t,r){const a=r?r.children:void 0,o=(a?a.indexOf(t):1)===0?"th":"td",c=r&&r.type==="table"?r.align:void 0,f=c?c.length:t.children.length;let h=-1;const m=[];for(;++h<f;){const x=t.children[h],y={},v=c?c[h]:void 0;v&&(y.align=v);let w={type:"element",tagName:o,properties:y,children:[]};x&&(w.children=e.all(x),e.patch(x,w),w=e.applyData(x,w)),m.push(w)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,g),e.applyData(t,g)}function ij(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const Oy=9,My=32;function aj(e){const t=String(e),r=/\r?\n|\r/g;let a=r.exec(t),l=0;const o=[];for(;a;)o.push(jy(t.slice(l,a.index),l>0,!0),a[0]),l=a.index+a[0].length,a=r.exec(t);return o.push(jy(t.slice(l),l>0,!1)),o.join("")}function jy(e,t,r){let a=0,l=e.length;if(t){let o=e.codePointAt(a);for(;o===Oy||o===My;)a++,o=e.codePointAt(a)}if(r){let o=e.codePointAt(l-1);for(;o===Oy||o===My;)l--,o=e.codePointAt(l-1)}return l>a?e.slice(a,l):""}function sj(e,t){const r={type:"text",value:aj(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function lj(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const oj={blockquote:I4,break:B4,code:U4,delete:P4,emphasis:F4,footnoteReference:H4,heading:q4,html:$4,imageReference:G4,image:K4,inlineCode:V4,linkReference:Y4,link:Q4,listItem:X4,list:W4,paragraph:J4,root:ej,strong:tj,table:nj,tableCell:ij,tableRow:rj,text:sj,thematicBreak:lj,toml:iu,yaml:iu,definition:iu,footnoteDefinition:iu};function iu(){}const Yk=-1,Ju=0,ho=1,Du=2,op=3,cp=4,up=5,dp=6,Qk=7,Xk=8,Dy=typeof self=="object"?self:globalThis,cj=(e,t)=>{const r=(l,o)=>(e.set(o,l),l),a=l=>{if(e.has(l))return e.get(l);const[o,c]=t[l];switch(o){case Ju:case Yk:return r(c,l);case ho:{const f=r([],l);for(const h of c)f.push(a(h));return f}case Du:{const f=r({},l);for(const[h,m]of c)f[a(h)]=a(m);return f}case op:return r(new Date(c),l);case cp:{const{source:f,flags:h}=c;return r(new RegExp(f,h),l)}case up:{const f=r(new Map,l);for(const[h,m]of c)f.set(a(h),a(m));return f}case dp:{const f=r(new Set,l);for(const h of c)f.add(a(h));return f}case Qk:{const{name:f,message:h}=c;return r(new Dy[f](h),l)}case Xk:return r(BigInt(c),l);case"BigInt":return r(Object(BigInt(c)),l);case"ArrayBuffer":return r(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return r(new DataView(f),c)}}return r(new Dy[o](c),l)};return a},Ly=e=>cj(new Map,e)(0),Ls="",{toString:uj}={},{keys:dj}=Object,to=e=>{const t=typeof e;if(t!=="object"||!e)return[Ju,t];const r=uj.call(e).slice(8,-1);switch(r){case"Array":return[ho,Ls];case"Object":return[Du,Ls];case"Date":return[op,Ls];case"RegExp":return[cp,Ls];case"Map":return[up,Ls];case"Set":return[dp,Ls];case"DataView":return[ho,r]}return r.includes("Array")?[ho,r]:r.includes("Error")?[Qk,r]:[Du,r]},au=([e,t])=>e===Ju&&(t==="function"||t==="symbol"),fj=(e,t,r,a)=>{const l=(c,f)=>{const h=a.push(c)-1;return r.set(f,h),h},o=c=>{if(r.has(c))return r.get(c);let[f,h]=to(c);switch(f){case Ju:{let g=c;switch(h){case"bigint":f=Xk,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);g=null;break;case"undefined":return l([Yk],c)}return l([f,g],c)}case ho:{if(h){let y=c;return h==="DataView"?y=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(y=new Uint8Array(c)),l([h,[...y]],c)}const g=[],x=l([f,g],c);for(const y of c)g.push(o(y));return x}case Du:{if(h)switch(h){case"BigInt":return l([h,c.toString()],c);case"Boolean":case"Number":case"String":return l([h,c.valueOf()],c)}if(t&&"toJSON"in c)return o(c.toJSON());const g=[],x=l([f,g],c);for(const y of dj(c))(e||!au(to(c[y])))&&g.push([o(y),o(c[y])]);return x}case op:return l([f,c.toISOString()],c);case cp:{const{source:g,flags:x}=c;return l([f,{source:g,flags:x}],c)}case up:{const g=[],x=l([f,g],c);for(const[y,v]of c)(e||!(au(to(y))||au(to(v))))&&g.push([o(y),o(v)]);return x}case dp:{const g=[],x=l([f,g],c);for(const y of c)(e||!au(to(y)))&&g.push(o(y));return x}}const{message:m}=c;return l([f,{name:h,message:m}],c)};return o},Iy=(e,{json:t,lossy:r}={})=>{const a=[];return fj(!(t||r),!!t,new Map,a)(e),a},Lu=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ly(Iy(e,t)):structuredClone(e):(e,t)=>Ly(Iy(e,t));function hj(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function mj(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function pj(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||hj,a=e.options.footnoteBackLabel||mj,l=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[h]);if(!m)continue;const g=e.all(m),x=String(m.identifier).toUpperCase(),y=el(x.toLowerCase());let v=0;const w=[],_=e.footnoteCounts.get(x);for(;_!==void 0&&++v<=_;){w.length>0&&w.push({type:"text",value:" "});let O=typeof r=="string"?r:r(h,v);typeof O=="string"&&(O={type:"text",value:O}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(h,v),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const N=g[g.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const O=N.children[N.children.length-1];O&&O.type==="text"?O.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...w)}else g.push(...w);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(g,!0)};e.patch(m,S),f.push(S)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Lu(c),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
|
|
536
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
537
|
-
`}]}}const Io=(function(e){if(e==null)return yj;if(typeof e=="function")return ed(e);if(typeof e=="object")return Array.isArray(e)?gj(e):bj(e);if(typeof e=="string")return xj(e);throw new Error("Expected function, string, or object as test")});function gj(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Io(e[r]);return ed(a);function a(...l){let o=-1;for(;++o<t.length;)if(t[o].apply(this,l))return!0;return!1}}function bj(e){const t=e;return ed(r);function r(a){const l=a;let o;for(o in e)if(l[o]!==t[o])return!1;return!0}}function xj(e){return ed(t);function t(r){return r&&r.type===e}}function ed(e){return t;function t(r,a,l){return!!(vj(r)&&e.call(this,r,typeof a=="number"?a:void 0,l||void 0))}}function yj(){return!0}function vj(e){return e!==null&&typeof e=="object"&&"type"in e}const Zk=[],kj=!0,mm=!1,wj="skip";function Wk(e,t,r,a){let l;typeof t=="function"&&typeof r!="function"?(a=r,r=t):l=t;const o=Io(l),c=a?-1:1;f(e,void 0,[])();function f(h,m,g){const x=h&&typeof h=="object"?h:{};if(typeof x.type=="string"){const v=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(h.type+(v?"<"+v+">":""))+")"})}return y;function y(){let v=Zk,w,_,N;if((!t||o(h,m,g[g.length-1]||void 0))&&(v=Ej(r(h,g)),v[0]===mm))return v;if("children"in h&&h.children){const S=h;if(S.children&&v[0]!==wj)for(_=(a?S.children.length:-1)+c,N=g.concat(S);_>-1&&_<S.children.length;){const O=S.children[_];if(w=f(O,_,N)(),w[0]===mm)return w;_=typeof w[1]=="number"?w[1]:_+c}}return v}}}function Ej(e){return Array.isArray(e)?e:typeof e=="number"?[kj,e]:e==null?Zk:[e]}function td(e,t,r,a){let l,o,c;typeof t=="function"&&typeof r!="function"?(o=void 0,c=t,l=r):(o=t,c=r,l=a),Wk(e,o,f,l);function f(h,m){const g=m[m.length-1],x=g?g.children.indexOf(h):void 0;return c(h,x,g)}}const pm={}.hasOwnProperty,_j={};function Nj(e,t){const r=t||_j,a=new Map,l=new Map,o=new Map,c={...oj,...r.handlers},f={all:m,applyData:zj,definitionById:a,footnoteById:l,footnoteCounts:o,footnoteOrder:[],handlers:c,one:h,options:r,patch:Sj,wrap:Tj};return td(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const x=g.type==="definition"?a:l,y=String(g.identifier).toUpperCase();x.has(y)||x.set(y,g)}}),f;function h(g,x){const y=g.type,v=f.handlers[y];if(pm.call(f.handlers,y)&&v)return v(f,g,x);if(f.options.passThrough&&f.options.passThrough.includes(y)){if("children"in g){const{children:_,...N}=g,S=Lu(N);return S.children=f.all(g),S}return Lu(g)}return(f.options.unknownHandler||Cj)(f,g,x)}function m(g){const x=[];if("children"in g){const y=g.children;let v=-1;for(;++v<y.length;){const w=f.one(y[v],g);if(w){if(v&&y[v-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=By(w.value)),!Array.isArray(w)&&w.type==="element")){const _=w.children[0];_&&_.type==="text"&&(_.value=By(_.value))}Array.isArray(w)?x.push(...w):x.push(w)}}}return x}}function Sj(e,t){e.position&&(t.position=mO(e))}function zj(e,t){let r=t;if(e&&e.data){const a=e.data.hName,l=e.data.hChildren,o=e.data.hProperties;if(typeof a=="string")if(r.type==="element")r.tagName=a;else{const c="children"in r?r.children:[r];r={type:"element",tagName:a,properties:{},children:c}}r.type==="element"&&o&&Object.assign(r.properties,Lu(o)),"children"in r&&r.children&&l!==null&&l!==void 0&&(r.children=l)}return r}function Cj(e,t){const r=t.data||{},a="value"in t&&!(pm.call(r,"hProperties")||pm.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Tj(e,t){const r=[];let a=-1;for(t&&r.push({type:"text",value:`
|
|
538
|
-
`});++a<e.length;)a&&r.push({type:"text",value:`
|
|
539
|
-
`}),r.push(e[a]);return t&&e.length>0&&r.push({type:"text",value:`
|
|
540
|
-
`}),r}function By(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function Uy(e,t){const r=Nj(e,t),a=r.one(e,void 0),l=pj(r),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return l&&o.children.push({type:"text",value:`
|
|
541
|
-
`},l),o}function Aj(e,t){return e&&"run"in e?async function(r,a){const l=Uy(r,{file:a,...t});await e.run(l,a)}:function(r,a){return Uy(r,{file:a,...e||t})}}function Py(e){if(e)throw e}var Ah,Fy;function Rj(){if(Fy)return Ah;Fy=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},o=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var g=e.call(m,"constructor"),x=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!g&&!x)return!1;var y;for(y in m);return typeof y>"u"||e.call(m,y)},c=function(m,g){r&&g.name==="__proto__"?r(m,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):m[g.name]=g.newValue},f=function(m,g){if(g==="__proto__")if(e.call(m,g)){if(a)return a(m,g).value}else return;return m[g]};return Ah=function h(){var m,g,x,y,v,w,_=arguments[0],N=1,S=arguments.length,O=!1;for(typeof _=="boolean"&&(O=_,_=arguments[1]||{},N=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});N<S;++N)if(m=arguments[N],m!=null)for(g in m)x=f(_,g),y=f(m,g),_!==y&&(O&&y&&(o(y)||(v=l(y)))?(v?(v=!1,w=x&&l(x)?x:[]):w=x&&o(x)?x:{},c(_,{name:g,newValue:h(O,w,y)})):typeof y<"u"&&c(_,{name:g,newValue:y}));return _},Ah}var Oj=Rj();const Rh=Pu(Oj);function gm(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Mj(){const e=[],t={run:r,use:a};return t;function r(...l){let o=-1;const c=l.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...l);function f(h,...m){const g=e[++o];let x=-1;if(h){c(h);return}for(;++x<l.length;)(m[x]===null||m[x]===void 0)&&(m[x]=l[x]);l=m,g?jj(g,f)(...m):c(null,...m)}}function a(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function jj(e,t){let r;return a;function a(...c){const f=e.length>c.length;let h;f&&c.push(l);try{h=e.apply(this,c)}catch(m){const g=m;if(f&&r)throw g;return l(g)}f||(h&&h.then&&typeof h.then=="function"?h.then(o,l):h instanceof Error?l(h):o(h))}function l(c,...f){r||(r=!0,t(c,...f))}function o(c){l(null,c)}}const ei={basename:Dj,dirname:Lj,extname:Ij,join:Bj,sep:"/"};function Dj(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Bo(e);let r=0,a=-1,l=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(o){r=l+1;break}}else a<0&&(o=!0,a=l+1);return a<0?"":e.slice(r,a)}if(t===e)return"";let c=-1,f=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(o){r=l+1;break}}else c<0&&(o=!0,c=l+1),f>-1&&(e.codePointAt(l)===t.codePointAt(f--)?f<0&&(a=l):(f=-1,a=c));return r===a?a=c:a<0&&(a=e.length),e.slice(r,a)}function Lj(e){if(Bo(e),e.length===0)return".";let t=-1,r=e.length,a;for(;--r;)if(e.codePointAt(r)===47){if(a){t=r;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Ij(e){Bo(e);let t=e.length,r=-1,a=0,l=-1,o=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){a=t+1;break}continue}r<0&&(c=!0,r=t+1),f===46?l<0?l=t:o!==1&&(o=1):l>-1&&(o=-1)}return l<0||r<0||o===0||o===1&&l===r-1&&l===a+1?"":e.slice(l,r)}function Bj(...e){let t=-1,r;for(;++t<e.length;)Bo(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":Uj(r)}function Uj(e){Bo(e);const t=e.codePointAt(0)===47;let r=Pj(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function Pj(e,t){let r="",a=0,l=-1,o=0,c=-1,f,h;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(l===c-1||o===1))if(l!==c-1&&o===2){if(r.length<2||a!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(h=r.lastIndexOf("/"),h!==r.length-1){h<0?(r="",a=0):(r=r.slice(0,h),a=r.length-1-r.lastIndexOf("/")),l=c,o=0;continue}}else if(r.length>0){r="",a=0,l=c,o=0;continue}}t&&(r=r.length>0?r+"/..":"..",a=2)}else r.length>0?r+="/"+e.slice(l+1,c):r=e.slice(l+1,c),a=c-l-1;l=c,o=0}else f===46&&o>-1?o++:o=-1}return r}function Bo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Fj={cwd:Hj};function Hj(){return"/"}function bm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function qj(e){if(typeof e=="string")e=new URL(e);else if(!bm(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return $j(e)}function $j(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const a=t.codePointAt(r+2);if(a===70||a===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const Oh=["history","path","basename","stem","extname","dirname"];class Jk{constructor(t){let r;t?bm(t)?r={path:t}:typeof t=="string"||Gj(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":Fj.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Oh.length;){const o=Oh[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)Oh.includes(l)||(this[l]=r[l])}get basename(){return typeof this.path=="string"?ei.basename(this.path):void 0}set basename(t){jh(t,"basename"),Mh(t,"basename"),this.path=ei.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ei.dirname(this.path):void 0}set dirname(t){Hy(this.basename,"dirname"),this.path=ei.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ei.extname(this.path):void 0}set extname(t){if(Mh(t,"extname"),Hy(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ei.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){bm(t)&&(t=qj(t)),jh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ei.basename(this.path,this.extname):void 0}set stem(t){jh(t,"stem"),Mh(t,"stem"),this.path=ei.join(this.dirname||"",t+(this.extname||""))}fail(t,r,a){const l=this.message(t,r,a);throw l.fatal=!0,l}info(t,r,a){const l=this.message(t,r,a);return l.fatal=void 0,l}message(t,r,a){const l=new qn(t,r,a);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Mh(e,t){if(e&&e.includes(ei.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ei.sep+"`")}function jh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Hy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Gj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Kj=(function(e){const a=this.constructor.prototype,l=a[e],o=function(){return l.apply(o,arguments)};return Object.setPrototypeOf(o,a),o}),Vj={}.hasOwnProperty;class fp extends Kj{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=Mj()}copy(){const t=new fp;let r=-1;for(;++r<this.attachers.length;){const a=this.attachers[r];t.use(...a)}return t.data(Rh(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Ih("data",this.frozen),this.namespace[t]=r,this):Vj.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ih("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const l=r.call(t,...a);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=su(t),a=this.parser||this.Parser;return Dh("parse",a),a(String(r),r)}process(t,r){const a=this;return this.freeze(),Dh("process",this.parser||this.Parser),Lh("process",this.compiler||this.Compiler),r?l(void 0,r):new Promise(l);function l(o,c){const f=su(t),h=a.parse(f);a.run(h,f,function(g,x,y){if(g||!x||!y)return m(g);const v=x,w=a.stringify(v,y);Xj(w)?y.value=w:y.result=w,m(g,y)});function m(g,x){g||!x?c(g):o?o(x):r(void 0,x)}}}processSync(t){let r=!1,a;return this.freeze(),Dh("processSync",this.parser||this.Parser),Lh("processSync",this.compiler||this.Compiler),this.process(t,l),$y("processSync","process",r),a;function l(o,c){r=!0,Py(o),a=c}}run(t,r,a){qy(t),this.freeze();const l=this.transformers;return!a&&typeof r=="function"&&(a=r,r=void 0),a?o(void 0,a):new Promise(o);function o(c,f){const h=su(r);l.run(t,h,m);function m(g,x,y){const v=x||t;g?f(g):c?c(v):a(void 0,v,y)}}}runSync(t,r){let a=!1,l;return this.run(t,r,o),$y("runSync","run",a),l;function o(c,f){Py(c),l=f,a=!0}}stringify(t,r){this.freeze();const a=su(r),l=this.compiler||this.Compiler;return Lh("stringify",l),qy(t),l(t,a)}use(t,...r){const a=this.attachers,l=this.namespace;if(Ih("use",this.frozen),t!=null)if(typeof t=="function")h(t,r);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(m){if(typeof m=="function")h(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[g,...x]=m;h(g,x)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(m.plugins),m.settings&&(l.settings=Rh(!0,l.settings,m.settings))}function f(m){let g=-1;if(m!=null)if(Array.isArray(m))for(;++g<m.length;){const x=m[g];o(x)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function h(m,g){let x=-1,y=-1;for(;++x<a.length;)if(a[x][0]===m){y=x;break}if(y===-1)a.push([m,...g]);else if(g.length>0){let[v,...w]=g;const _=a[y][1];gm(_)&&gm(v)&&(v=Rh(!0,_,v)),a[y]=[m,v,...w]}}}}const Yj=new fp().freeze();function Dh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Lh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ih(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function qy(e){if(!gm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function $y(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function su(e){return Qj(e)?e:new Jk(e)}function Qj(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Xj(e){return typeof e=="string"||Zj(e)}function Zj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Wj="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Gy=[],Ky={allowDangerousHtml:!0},Jj=/^(https?|ircs?|mailto|xmpp)$/i,e3=[{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 t3(e){const t=n3(e),r=r3(e);return i3(t.runSync(t.parse(r),r),e)}function n3(e){const t=e.rehypePlugins||Gy,r=e.remarkPlugins||Gy,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ky}:Ky;return Yj().use(L4).use(r).use(Aj,a).use(t)}function r3(e){const t=e.children||"",r=new Jk;return typeof t=="string"&&(r.value=t),r}function i3(e,t){const r=t.allowedElements,a=t.allowElement,l=t.components,o=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,h=t.urlTransform||a3;for(const g of e3)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+Wj+g.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),td(e,m),yO(e,{Fragment:d.Fragment,components:l,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function m(g,x,y){if(g.type==="raw"&&y&&typeof x=="number")return c?y.children.splice(x,1):y.children[x]={type:"text",value:g.value},x;if(g.type==="element"){let v;for(v in zh)if(Object.hasOwn(zh,v)&&Object.hasOwn(g.properties,v)){const w=g.properties[v],_=zh[v];(_===null||_.includes(g.tagName))&&(g.properties[v]=h(String(w||""),v,g))}}if(g.type==="element"){let v=r?!r.includes(g.tagName):o?o.includes(g.tagName):!1;if(!v&&a&&typeof x=="number"&&(v=!a(g,x,y)),v&&y&&typeof x=="number")return f&&g.children?y.children.splice(x,1,...g.children):y.children.splice(x,1),x}}}function a3(e){const t=e.indexOf(":"),r=e.indexOf("?"),a=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||r!==-1&&t>r||a!==-1&&t>a||Jj.test(e.slice(0,t))?e:""}function Vy(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,l=r.indexOf(t);for(;l!==-1;)a++,l=r.indexOf(t,l+t.length);return a}function s3(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function l3(e,t,r){const l=Io((r||{}).ignore||[]),o=o3(t);let c=-1;for(;++c<o.length;)Wk(e,"text",f);function f(m,g){let x=-1,y;for(;++x<g.length;){const v=g[x],w=y?y.children:void 0;if(l(v,w?w.indexOf(v):void 0,y))return;y=v}if(y)return h(m,g)}function h(m,g){const x=g[g.length-1],y=o[c][0],v=o[c][1];let w=0;const N=x.children.indexOf(m);let S=!1,O=[];y.lastIndex=0;let z=y.exec(m.value);for(;z;){const F=z.index,$={index:z.index,input:z.input,stack:[...g,m]};let j=v(...z,$);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?y.lastIndex=F+1:(w!==F&&O.push({type:"text",value:m.value.slice(w,F)}),Array.isArray(j)?O.push(...j):j&&O.push(j),w=F+z[0].length,S=!0),!y.global)break;z=y.exec(m.value)}return S?(w<m.value.length&&O.push({type:"text",value:m.value.slice(w)}),x.children.splice(N,1,...O)):O=[m],N+O.length}}function o3(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let a=-1;for(;++a<r.length;){const l=r[a];t.push([c3(l[0]),u3(l[1])])}return t}function c3(e){return typeof e=="string"?new RegExp(s3(e),"g"):e}function u3(e){return typeof e=="function"?e:function(){return e}}const Bh="phrasing",Uh=["autolink","link","image","label"];function d3(){return{transforms:[x3],enter:{literalAutolink:h3,literalAutolinkEmail:Ph,literalAutolinkHttp:Ph,literalAutolinkWww:Ph},exit:{literalAutolink:b3,literalAutolinkEmail:g3,literalAutolinkHttp:m3,literalAutolinkWww:p3}}}function f3(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Bh,notInConstruct:Uh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Bh,notInConstruct:Uh},{character:":",before:"[ps]",after:"\\/",inConstruct:Bh,notInConstruct:Uh}]}}function h3(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ph(e){this.config.enter.autolinkProtocol.call(this,e)}function m3(e){this.config.exit.autolinkProtocol.call(this,e)}function p3(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function g3(e){this.config.exit.autolinkEmail.call(this,e)}function b3(e){this.exit(e)}function x3(e){l3(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,y3],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,v3]],{ignore:["link","linkReference"]})}function y3(e,t,r,a,l){let o="";if(!ew(l)||(/^w/i.test(t)&&(r=t+r,t="",o="http://"),!k3(r)))return!1;const c=w3(r+a);if(!c[0])return!1;const f={type:"link",title:null,url:o+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function v3(e,t,r,a){return!ew(a,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function k3(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function w3(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],a=r.indexOf(")");const l=Vy(e,"(");let o=Vy(e,")");for(;a!==-1&&l>o;)e+=r.slice(0,a+1),r=r.slice(a+1),a=r.indexOf(")"),o++;return[e,r]}function ew(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Ya(r)||Zu(r))&&(!t||r!==47)}tw.peek=R3;function E3(){this.buffer()}function _3(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function N3(){this.buffer()}function S3(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function z3(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=$r(this.sliceSerialize(e)).toLowerCase(),r.label=t}function C3(e){this.exit(e)}function T3(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=$r(this.sliceSerialize(e)).toLowerCase(),r.label=t}function A3(e){this.exit(e)}function R3(){return"["}function tw(e,t,r,a){const l=r.createTracker(a);let o=l.move("[^");const c=r.enter("footnoteReference"),f=r.enter("reference");return o+=l.move(r.safe(r.associationId(e),{after:"]",before:o})),f(),c(),o+=l.move("]"),o}function O3(){return{enter:{gfmFootnoteCallString:E3,gfmFootnoteCall:_3,gfmFootnoteDefinitionLabelString:N3,gfmFootnoteDefinition:S3},exit:{gfmFootnoteCallString:z3,gfmFootnoteCall:C3,gfmFootnoteDefinitionLabelString:T3,gfmFootnoteDefinition:A3}}}function M3(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:tw},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(a,l,o,c){const f=o.createTracker(c);let h=f.move("[^");const m=o.enter("footnoteDefinition"),g=o.enter("label");return h+=f.move(o.safe(o.associationId(a),{before:h,after:"]"})),g(),h+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),h+=f.move((t?`
|
|
542
|
-
`:" ")+o.indentLines(o.containerFlow(a,f.current()),t?nw:j3))),m(),h}}function j3(e,t,r){return t===0?e:nw(e,t,r)}function nw(e,t,r){return(r?"":" ")+e}const D3=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];rw.peek=P3;function L3(){return{canContainEols:["delete"],enter:{strikethrough:B3},exit:{strikethrough:U3}}}function I3(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:D3}],handlers:{delete:rw}}}function B3(e){this.enter({type:"delete",children:[]},e)}function U3(e){this.exit(e)}function rw(e,t,r,a){const l=r.createTracker(a),o=r.enter("strikethrough");let c=l.move("~~");return c+=r.containerPhrasing(e,{...l.current(),before:c,after:"~"}),c+=l.move("~~"),o(),c}function P3(){return"~"}function F3(e){return e.length}function H3(e,t){const r=t||{},a=(r.align||[]).concat(),l=r.stringLength||F3,o=[],c=[],f=[],h=[];let m=0,g=-1;for(;++g<e.length;){const _=[],N=[];let S=-1;for(e[g].length>m&&(m=e[g].length);++S<e[g].length;){const O=q3(e[g][S]);if(r.alignDelimiters!==!1){const z=l(O);N[S]=z,(h[S]===void 0||z>h[S])&&(h[S]=z)}_.push(O)}c[g]=_,f[g]=N}let x=-1;if(typeof a=="object"&&"length"in a)for(;++x<m;)o[x]=Yy(a[x]);else{const _=Yy(a);for(;++x<m;)o[x]=_}x=-1;const y=[],v=[];for(;++x<m;){const _=o[x];let N="",S="";_===99?(N=":",S=":"):_===108?N=":":_===114&&(S=":");let O=r.alignDelimiters===!1?1:Math.max(1,h[x]-N.length-S.length);const z=N+"-".repeat(O)+S;r.alignDelimiters!==!1&&(O=N.length+O+S.length,O>h[x]&&(h[x]=O),v[x]=O),y[x]=z}c.splice(1,0,y),f.splice(1,0,v),g=-1;const w=[];for(;++g<c.length;){const _=c[g],N=f[g];x=-1;const S=[];for(;++x<m;){const O=_[x]||"";let z="",F="";if(r.alignDelimiters!==!1){const $=h[x]-(N[x]||0),j=o[x];j===114?z=" ".repeat($):j===99?$%2?(z=" ".repeat($/2+.5),F=" ".repeat($/2-.5)):(z=" ".repeat($/2),F=z):F=" ".repeat($)}r.delimiterStart!==!1&&!x&&S.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&O==="")&&(r.delimiterStart!==!1||x)&&S.push(" "),r.alignDelimiters!==!1&&S.push(z),S.push(O),r.alignDelimiters!==!1&&S.push(F),r.padding!==!1&&S.push(" "),(r.delimiterEnd!==!1||x!==m-1)&&S.push("|")}w.push(r.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return w.join(`
|
|
543
|
-
`)}function q3(e){return e==null?"":String(e)}function Yy(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function $3(e,t,r,a){const l=r.enter("blockquote"),o=r.createTracker(a);o.move("> "),o.shift(2);const c=r.indentLines(r.containerFlow(e,o.current()),G3);return l(),c}function G3(e,t,r){return">"+(r?"":" ")+e}function K3(e,t){return Qy(e,t.inConstruct,!0)&&!Qy(e,t.notInConstruct,!1)}function Qy(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let a=-1;for(;++a<t.length;)if(e.includes(t[a]))return!0;return!1}function Xy(e,t,r,a){let l=-1;for(;++l<r.unsafe.length;)if(r.unsafe[l].character===`
|
|
544
|
-
`&&K3(r.stack,r.unsafe[l]))return/[ \t]/.test(a.before)?"":" ";return`\\
|
|
545
|
-
`}function V3(e,t){const r=String(e);let a=r.indexOf(t),l=a,o=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===l?++o>c&&(c=o):o=1,l=a+t.length,a=r.indexOf(t,l);return c}function Y3(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Q3(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function X3(e,t,r,a){const l=Q3(r),o=e.value||"",c=l==="`"?"GraveAccent":"Tilde";if(Y3(e,r)){const x=r.enter("codeIndented"),y=r.indentLines(o,Z3);return x(),y}const f=r.createTracker(a),h=l.repeat(Math.max(V3(o,l)+1,3)),m=r.enter("codeFenced");let g=f.move(h);if(e.lang){const x=r.enter(`codeFencedLang${c}`);g+=f.move(r.safe(e.lang,{before:g,after:" ",encode:["`"],...f.current()})),x()}if(e.lang&&e.meta){const x=r.enter(`codeFencedMeta${c}`);g+=f.move(" "),g+=f.move(r.safe(e.meta,{before:g,after:`
|
|
546
|
-
`,encode:["`"],...f.current()})),x()}return g+=f.move(`
|
|
547
|
-
`),o&&(g+=f.move(o+`
|
|
548
|
-
`)),g+=f.move(h),m(),g}function Z3(e,t,r){return(r?"":" ")+e}function hp(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function W3(e,t,r,a){const l=hp(r),o=l==='"'?"Quote":"Apostrophe",c=r.enter("definition");let f=r.enter("label");const h=r.createTracker(a);let m=h.move("[");return m+=h.move(r.safe(r.associationId(e),{before:m,after:"]",...h.current()})),m+=h.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(r.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=r.enter("destinationRaw"),m+=h.move(r.safe(e.url,{before:m,after:e.title?" ":`
|
|
549
|
-
`,...h.current()}))),f(),e.title&&(f=r.enter(`title${o}`),m+=h.move(" "+l),m+=h.move(r.safe(e.title,{before:m,after:l,...h.current()})),m+=h.move(l),f()),c(),m}function J3(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Eo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Iu(e,t,r){const a=Ks(e),l=Ks(t);return a===void 0?l===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}iw.peek=eD;function iw(e,t,r,a){const l=J3(r),o=r.enter("emphasis"),c=r.createTracker(a),f=c.move(l);let h=c.move(r.containerPhrasing(e,{after:l,before:f,...c.current()}));const m=h.charCodeAt(0),g=Iu(a.before.charCodeAt(a.before.length-1),m,l);g.inside&&(h=Eo(m)+h.slice(1));const x=h.charCodeAt(h.length-1),y=Iu(a.after.charCodeAt(0),x,l);y.inside&&(h=h.slice(0,-1)+Eo(x));const v=c.move(l);return o(),r.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},f+h+v}function eD(e,t,r){return r.options.emphasis||"*"}function tD(e,t){let r=!1;return td(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return r=!0,mm}),!!((!e.depth||e.depth<3)&&ap(e)&&(t.options.setext||r))}function nD(e,t,r,a){const l=Math.max(Math.min(6,e.depth||1),1),o=r.createTracker(a);if(tD(e,r)){const g=r.enter("headingSetext"),x=r.enter("phrasing"),y=r.containerPhrasing(e,{...o.current(),before:`
|
|
550
|
-
`,after:`
|
|
551
|
-
`});return x(),g(),y+`
|
|
552
|
-
`+(l===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
553
|
-
`))+1))}const c="#".repeat(l),f=r.enter("headingAtx"),h=r.enter("phrasing");o.move(c+" ");let m=r.containerPhrasing(e,{before:"# ",after:`
|
|
554
|
-
`,...o.current()});return/^[\t ]/.test(m)&&(m=Eo(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,r.options.closeAtx&&(m+=" "+c),h(),f(),m}aw.peek=rD;function aw(e){return e.value||""}function rD(){return"<"}sw.peek=iD;function sw(e,t,r,a){const l=hp(r),o=l==='"'?"Quote":"Apostrophe",c=r.enter("image");let f=r.enter("label");const h=r.createTracker(a);let m=h.move("![");return m+=h.move(r.safe(e.alt,{before:m,after:"]",...h.current()})),m+=h.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(r.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=r.enter("destinationRaw"),m+=h.move(r.safe(e.url,{before:m,after:e.title?" ":")",...h.current()}))),f(),e.title&&(f=r.enter(`title${o}`),m+=h.move(" "+l),m+=h.move(r.safe(e.title,{before:m,after:l,...h.current()})),m+=h.move(l),f()),m+=h.move(")"),c(),m}function iD(){return"!"}lw.peek=aD;function lw(e,t,r,a){const l=e.referenceType,o=r.enter("imageReference");let c=r.enter("label");const f=r.createTracker(a);let h=f.move("![");const m=r.safe(e.alt,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),c();const g=r.stack;r.stack=[],c=r.enter("reference");const x=r.safe(r.associationId(e),{before:h,after:"]",...f.current()});return c(),r.stack=g,o(),l==="full"||!m||m!==x?h+=f.move(x+"]"):l==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function aD(){return"!"}ow.peek=sD;function ow(e,t,r){let a=e.value||"",l="`",o=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(a);)l+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++o<r.unsafe.length;){const c=r.unsafe[o],f=r.compilePattern(c);let h;if(c.atBreak)for(;h=f.exec(a);){let m=h.index;a.charCodeAt(m)===10&&a.charCodeAt(m-1)===13&&m--,a=a.slice(0,m)+" "+a.slice(h.index+1)}}return l+a+l}function sD(){return"`"}function cw(e,t){const r=ap(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}uw.peek=lD;function uw(e,t,r,a){const l=hp(r),o=l==='"'?"Quote":"Apostrophe",c=r.createTracker(a);let f,h;if(cw(e,r)){const g=r.stack;r.stack=[],f=r.enter("autolink");let x=c.move("<");return x+=c.move(r.containerPhrasing(e,{before:x,after:">",...c.current()})),x+=c.move(">"),f(),r.stack=g,x}f=r.enter("link"),h=r.enter("label");let m=c.move("[");return m+=c.move(r.containerPhrasing(e,{before:m,after:"](",...c.current()})),m+=c.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=r.enter("destinationLiteral"),m+=c.move("<"),m+=c.move(r.safe(e.url,{before:m,after:">",...c.current()})),m+=c.move(">")):(h=r.enter("destinationRaw"),m+=c.move(r.safe(e.url,{before:m,after:e.title?" ":")",...c.current()}))),h(),e.title&&(h=r.enter(`title${o}`),m+=c.move(" "+l),m+=c.move(r.safe(e.title,{before:m,after:l,...c.current()})),m+=c.move(l),h()),m+=c.move(")"),f(),m}function lD(e,t,r){return cw(e,r)?"<":"["}dw.peek=oD;function dw(e,t,r,a){const l=e.referenceType,o=r.enter("linkReference");let c=r.enter("label");const f=r.createTracker(a);let h=f.move("[");const m=r.containerPhrasing(e,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),c();const g=r.stack;r.stack=[],c=r.enter("reference");const x=r.safe(r.associationId(e),{before:h,after:"]",...f.current()});return c(),r.stack=g,o(),l==="full"||!m||m!==x?h+=f.move(x+"]"):l==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function oD(){return"["}function mp(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function cD(e){const t=mp(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function uD(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function fw(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function dD(e,t,r,a){const l=r.enter("list"),o=r.bulletCurrent;let c=e.ordered?uD(r):mp(r);const f=e.ordered?c==="."?")":".":cD(r);let h=t&&r.bulletLastUsed?c===r.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&g&&(!g.children||!g.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(h=!0),fw(r)===c&&g){let x=-1;for(;++x<e.children.length;){const y=e.children[x];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(c=f),r.bulletCurrent=c;const m=r.containerFlow(e,a);return r.bulletLastUsed=c,r.bulletCurrent=o,l(),m}function fD(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function hD(e,t,r,a){const l=fD(r);let o=r.bulletCurrent||mp(r);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let c=o.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=r.createTracker(a);f.move(o+" ".repeat(c-o.length)),f.shift(c);const h=r.enter("listItem"),m=r.indentLines(r.containerFlow(e,f.current()),g);return h(),m;function g(x,y,v){return y?(v?"":" ".repeat(c))+x:(v?o:o+" ".repeat(c-o.length))+x}}function mD(e,t,r,a){const l=r.enter("paragraph"),o=r.enter("phrasing"),c=r.containerPhrasing(e,a);return o(),l(),c}const pD=Io(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function gD(e,t,r,a){return(e.children.some(function(c){return pD(c)})?r.containerPhrasing:r.containerFlow).call(r,e,a)}function bD(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}hw.peek=xD;function hw(e,t,r,a){const l=bD(r),o=r.enter("strong"),c=r.createTracker(a),f=c.move(l+l);let h=c.move(r.containerPhrasing(e,{after:l,before:f,...c.current()}));const m=h.charCodeAt(0),g=Iu(a.before.charCodeAt(a.before.length-1),m,l);g.inside&&(h=Eo(m)+h.slice(1));const x=h.charCodeAt(h.length-1),y=Iu(a.after.charCodeAt(0),x,l);y.inside&&(h=h.slice(0,-1)+Eo(x));const v=c.move(l+l);return o(),r.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},f+h+v}function xD(e,t,r){return r.options.strong||"*"}function yD(e,t,r,a){return r.safe(e.value,a)}function vD(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function kD(e,t,r){const a=(fw(r)+(r.options.ruleSpaces?" ":"")).repeat(vD(r));return r.options.ruleSpaces?a.slice(0,-1):a}const mw={blockquote:$3,break:Xy,code:X3,definition:W3,emphasis:iw,hardBreak:Xy,heading:nD,html:aw,image:sw,imageReference:lw,inlineCode:ow,link:uw,linkReference:dw,list:dD,listItem:hD,paragraph:mD,root:gD,strong:hw,text:yD,thematicBreak:kD};function wD(){return{enter:{table:ED,tableData:Zy,tableHeader:Zy,tableRow:ND},exit:{codeText:SD,table:_D,tableData:Fh,tableHeader:Fh,tableRow:Fh}}}function ED(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function _D(e){this.exit(e),this.data.inTable=void 0}function ND(e){this.enter({type:"tableRow",children:[]},e)}function Fh(e){this.exit(e)}function Zy(e){this.enter({type:"tableCell",children:[]},e)}function SD(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,zD));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function zD(e,t){return t==="|"?t:e}function CD(e){const t=e||{},r=t.tableCellPadding,a=t.tablePipeAlign,l=t.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
555
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:c,tableCell:h,tableRow:f}};function c(v,w,_,N){return m(g(v,_,N),v.align)}function f(v,w,_,N){const S=x(v,_,N),O=m([S]);return O.slice(0,O.indexOf(`
|
|
556
|
-
`))}function h(v,w,_,N){const S=_.enter("tableCell"),O=_.enter("phrasing"),z=_.containerPhrasing(v,{...N,before:o,after:o});return O(),S(),z}function m(v,w){return H3(v,{align:w,alignDelimiters:a,padding:r,stringLength:l})}function g(v,w,_){const N=v.children;let S=-1;const O=[],z=w.enter("table");for(;++S<N.length;)O[S]=x(N[S],w,_);return z(),O}function x(v,w,_){const N=v.children;let S=-1;const O=[],z=w.enter("tableRow");for(;++S<N.length;)O[S]=h(N[S],v,w,_);return z(),O}function y(v,w,_){let N=mw.inlineCode(v,w,_);return _.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function TD(){return{exit:{taskListCheckValueChecked:Wy,taskListCheckValueUnchecked:Wy,paragraph:RD}}}function AD(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:OD}}}function Wy(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function RD(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const a=r.children[0];if(a&&a.type==="text"){const l=t.children;let o=-1,c;for(;++o<l.length;){const f=l[o];if(f.type==="paragraph"){c=f;break}}c===r&&(a.value=a.value.slice(1),a.value.length===0?r.children.shift():r.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,r.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function OD(e,t,r,a){const l=e.children[0],o=typeof e.checked=="boolean"&&l&&l.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=r.createTracker(a);o&&f.move(c);let h=mw.listItem(e,t,r,{...a,...f.current()});return o&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),h;function m(g){return g+c}}function MD(){return[d3(),O3(),L3(),wD(),TD()]}function jD(e){return{extensions:[f3(),M3(e),I3(),CD(e),AD()]}}const DD={tokenize:FD,partial:!0},pw={tokenize:HD,partial:!0},gw={tokenize:qD,partial:!0},bw={tokenize:$D,partial:!0},LD={tokenize:GD,partial:!0},xw={name:"wwwAutolink",tokenize:UD,previous:vw},yw={name:"protocolAutolink",tokenize:PD,previous:kw},Di={name:"emailAutolink",tokenize:BD,previous:ww},si={};function ID(){return{text:si}}let Ha=48;for(;Ha<123;)si[Ha]=Di,Ha++,Ha===58?Ha=65:Ha===91&&(Ha=97);si[43]=Di;si[45]=Di;si[46]=Di;si[95]=Di;si[72]=[Di,yw];si[104]=[Di,yw];si[87]=[Di,xw];si[119]=[Di,xw];function BD(e,t,r){const a=this;let l,o;return c;function c(x){return!xm(x)||!ww.call(a,a.previous)||pp(a.events)?r(x):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(x))}function f(x){return xm(x)?(e.consume(x),f):x===64?(e.consume(x),h):r(x)}function h(x){return x===46?e.check(LD,g,m)(x):x===45||x===95||Hn(x)?(o=!0,e.consume(x),h):g(x)}function m(x){return e.consume(x),l=!0,h}function g(x){return o&&l&&Vn(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(x)):r(x)}}function UD(e,t,r){const a=this;return l;function l(c){return c!==87&&c!==119||!vw.call(a,a.previous)||pp(a.events)?r(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(DD,e.attempt(pw,e.attempt(gw,o),r),r)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function PD(e,t,r){const a=this;let l="",o=!1;return c;function c(x){return(x===72||x===104)&&kw.call(a,a.previous)&&!pp(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(x),e.consume(x),f):r(x)}function f(x){if(Vn(x)&&l.length<5)return l+=String.fromCodePoint(x),e.consume(x),f;if(x===58){const y=l.toLowerCase();if(y==="http"||y==="https")return e.consume(x),h}return r(x)}function h(x){return x===47?(e.consume(x),o?m:(o=!0,h)):r(x)}function m(x){return x===null||ju(x)||Yt(x)||Ya(x)||Zu(x)?r(x):e.attempt(pw,e.attempt(gw,g),r)(x)}function g(x){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(x)}}function FD(e,t,r){let a=0;return l;function l(c){return(c===87||c===119)&&a<3?(a++,e.consume(c),l):c===46&&a===3?(e.consume(c),o):r(c)}function o(c){return c===null?r(c):t(c)}}function HD(e,t,r){let a,l,o;return c;function c(m){return m===46||m===95?e.check(bw,h,f)(m):m===null||Yt(m)||Ya(m)||m!==45&&Zu(m)?h(m):(o=!0,e.consume(m),c)}function f(m){return m===95?a=!0:(l=a,a=void 0),e.consume(m),c}function h(m){return l||a||!o?r(m):t(m)}}function qD(e,t){let r=0,a=0;return l;function l(c){return c===40?(r++,e.consume(c),l):c===41&&a<r?o(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(bw,t,o)(c):c===null||Yt(c)||Ya(c)?t(c):(e.consume(c),l)}function o(c){return c===41&&a++,e.consume(c),l}}function $D(e,t,r){return a;function a(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),a):f===38?(e.consume(f),o):f===93?(e.consume(f),l):f===60||f===null||Yt(f)||Ya(f)?t(f):r(f)}function l(f){return f===null||f===40||f===91||Yt(f)||Ya(f)?t(f):a(f)}function o(f){return Vn(f)?c(f):r(f)}function c(f){return f===59?(e.consume(f),a):Vn(f)?(e.consume(f),c):r(f)}}function GD(e,t,r){return a;function a(o){return e.consume(o),l}function l(o){return Hn(o)?r(o):t(o)}}function vw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Yt(e)}function kw(e){return!Vn(e)}function ww(e){return!(e===47||xm(e))}function xm(e){return e===43||e===45||e===46||e===95||Hn(e)}function pp(e){let t=e.length,r=!1;for(;t--;){const a=e[t][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){r=!0;break}if(a._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const KD={tokenize:eL,partial:!0};function VD(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:ZD,continuation:{tokenize:WD},exit:JD}},text:{91:{name:"gfmFootnoteCall",tokenize:XD},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:YD,resolveTo:QD}}}}function YD(e,t,r){const a=this;let l=a.events.length;const o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;l--;){const h=a.events[l][1];if(h.type==="labelImage"){c=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!c||!c._balanced)return r(h);const m=$r(a.sliceSerialize({start:c.end,end:a.now()}));return m.codePointAt(0)!==94||!o.includes(m.slice(1))?r(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function QD(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},f=[e[r+1],e[r+2],["enter",a,t],e[r+3],e[r+4],["enter",l,t],["exit",l,t],["enter",o,t],["enter",c,t],["exit",c,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(r,e.length-r+1,...f),e}function XD(e,t,r){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o=0,c;return f;function f(x){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(x),e.exit("gfmFootnoteCallLabelMarker"),h}function h(x){return x!==94?r(x):(e.enter("gfmFootnoteCallMarker"),e.consume(x),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",m)}function m(x){if(o>999||x===93&&!c||x===null||x===91||Yt(x))return r(x);if(x===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return l.includes($r(a.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(x),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(x)}return Yt(x)||(c=!0),o++,e.consume(x),x===92?g:m}function g(x){return x===91||x===92||x===93?(e.consume(x),o++,m):m(x)}}function ZD(e,t,r){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,c=0,f;return h;function h(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):r(w)}function g(w){if(c>999||w===93&&!f||w===null||w===91||Yt(w))return r(w);if(w===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return o=$r(a.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Yt(w)||(f=!0),c++,e.consume(w),w===92?x:g}function x(w){return w===91||w===92||w===93?(e.consume(w),c++,g):g(w)}function y(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),l.includes(o)||l.push(o),Ct(e,v,"gfmFootnoteDefinitionWhitespace")):r(w)}function v(w){return t(w)}}function WD(e,t,r){return e.check(Lo,t,e.attempt(KD,t,r))}function JD(e){e.exit("gfmFootnoteDefinition")}function eL(e,t,r){const a=this;return Ct(e,l,"gfmFootnoteDefinitionIndent",5);function l(o){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(o):r(o)}}function tL(e){let r=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:o,resolveAll:l};return r==null&&(r=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function l(c,f){let h=-1;for(;++h<c.length;)if(c[h][0]==="enter"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._close){let m=h;for(;m--;)if(c[m][0]==="exit"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._open&&c[h][1].end.offset-c[h][1].start.offset===c[m][1].end.offset-c[m][1].start.offset){c[h][1].type="strikethroughSequence",c[m][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[h][1].end)},x={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[h][1].start)},y=[["enter",g,f],["enter",c[m][1],f],["exit",c[m][1],f],["enter",x,f]],v=f.parser.constructs.insideSpan.null;v&&gr(y,y.length,0,Wu(v,c.slice(m+1,h),f)),gr(y,y.length,0,[["exit",x,f],["enter",c[h][1],f],["exit",c[h][1],f],["exit",g,f]]),gr(c,m-1,h-m+3,y),h=m+y.length-2;break}}for(h=-1;++h<c.length;)c[h][1].type==="strikethroughSequenceTemporary"&&(c[h][1].type="data");return c}function o(c,f,h){const m=this.previous,g=this.events;let x=0;return y;function y(w){return m===126&&g[g.length-1][1].type!=="characterEscape"?h(w):(c.enter("strikethroughSequenceTemporary"),v(w))}function v(w){const _=Ks(m);if(w===126)return x>1?h(w):(c.consume(w),x++,v);if(x<2&&!r)return h(w);const N=c.exit("strikethroughSequenceTemporary"),S=Ks(w);return N._open=!S||S===2&&!!_,N._close=!_||_===2&&!!S,f(w)}}}class nL{constructor(){this.map=[]}add(t,r,a){rL(this,t,r,a)}consume(t){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let r=this.map.length;const a=[];for(;r>0;)r-=1,a.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];a.push(t.slice()),t.length=0;let l=a.pop();for(;l;){for(const o of l)t.push(o);l=a.pop()}this.map.length=0}}function rL(e,t,r,a){let l=0;if(!(r===0&&a.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=r,e.map[l][2].push(...a);return}l+=1}e.map.push([t,r,a])}}function iL(e,t){let r=!1;const a=[];for(;t<e.length;){const l=e[t];if(r){if(l[0]==="enter")l[1].type==="tableContent"&&a.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=a.length-1;a[o]=a[o]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return a}function aL(){return{flow:{null:{name:"table",tokenize:sL,resolveAll:lL}}}}function sL(e,t,r){const a=this;let l=0,o=0,c;return f;function f(P){let ee=a.events.length-1;for(;ee>-1;){const se=a.events[ee][1].type;if(se==="lineEnding"||se==="linePrefix")ee--;else break}const te=ee>-1?a.events[ee][1].type:null,we=te==="tableHead"||te==="tableRow"?j:h;return we===j&&a.parser.lazy[a.now().line]?r(P):we(P)}function h(P){return e.enter("tableHead"),e.enter("tableRow"),m(P)}function m(P){return P===124||(c=!0,o+=1),g(P)}function g(P){return P===null?r(P):Ke(P)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),v):r(P):pt(P)?Ct(e,g,"whitespace")(P):(o+=1,c&&(c=!1,l+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),c=!0,g):(e.enter("data"),x(P)))}function x(P){return P===null||P===124||Yt(P)?(e.exit("data"),g(P)):(e.consume(P),P===92?y:x)}function y(P){return P===92||P===124?(e.consume(P),x):x(P)}function v(P){return a.interrupt=!1,a.parser.lazy[a.now().line]?r(P):(e.enter("tableDelimiterRow"),c=!1,pt(P)?Ct(e,w,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):w(P))}function w(P){return P===45||P===58?N(P):P===124?(c=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),_):$(P)}function _(P){return pt(P)?Ct(e,N,"whitespace")(P):N(P)}function N(P){return P===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),S):P===45?(o+=1,S(P)):P===null||Ke(P)?F(P):$(P)}function S(P){return P===45?(e.enter("tableDelimiterFiller"),O(P)):$(P)}function O(P){return P===45?(e.consume(P),O):P===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),z):(e.exit("tableDelimiterFiller"),z(P))}function z(P){return pt(P)?Ct(e,F,"whitespace")(P):F(P)}function F(P){return P===124?w(P):P===null||Ke(P)?!c||l!==o?$(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):$(P)}function $(P){return r(P)}function j(P){return e.enter("tableRow"),G(P)}function G(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),G):P===null||Ke(P)?(e.exit("tableRow"),t(P)):pt(P)?Ct(e,G,"whitespace")(P):(e.enter("data"),R(P))}function R(P){return P===null||P===124||Yt(P)?(e.exit("data"),G(P)):(e.consume(P),P===92?ie:R)}function ie(P){return P===92||P===124?(e.consume(P),R):R(P)}}function lL(e,t){let r=-1,a=!0,l=0,o=[0,0,0,0],c=[0,0,0,0],f=!1,h=0,m,g,x;const y=new nL;for(;++r<e.length;){const v=e[r],w=v[1];v[0]==="enter"?w.type==="tableHead"?(f=!1,h!==0&&(Jy(y,t,h,m,g),g=void 0,h=0),m={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},y.add(r,0,[["enter",m,t]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(a=!0,x=void 0,o=[0,0,0,0],c=[0,r+1,0,0],f&&(f=!1,g={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},y.add(r,0,[["enter",g,t]])),l=w.type==="tableDelimiterRow"?2:g?3:1):l&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],x=lu(y,t,o,l,void 0,x),o=[0,0,0,0]),c[2]=r)):w.type==="tableCellDivider"&&(a?a=!1:(o[1]!==0&&(c[0]=c[1],x=lu(y,t,o,l,void 0,x)),o=c,c=[o[1],r,0,0])):w.type==="tableHead"?(f=!0,h=r):w.type==="tableRow"||w.type==="tableDelimiterRow"?(h=r,o[1]!==0?(c[0]=c[1],x=lu(y,t,o,l,r,x)):c[1]!==0&&(x=lu(y,t,c,l,r,x)),l=0):l&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(c[3]=r)}for(h!==0&&Jy(y,t,h,m,g),y.consume(t.events),r=-1;++r<t.events.length;){const v=t.events[r];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=iL(t.events,r))}return e}function lu(e,t,r,a,l,o){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";r[0]!==0&&(o.end=Object.assign({},Bs(t.events,r[0])),e.add(r[0],0,[["exit",o,t]]));const h=Bs(t.events,r[1]);if(o={type:c,start:Object.assign({},h),end:Object.assign({},h)},e.add(r[1],0,[["enter",o,t]]),r[2]!==0){const m=Bs(t.events,r[2]),g=Bs(t.events,r[3]),x={type:f,start:Object.assign({},m),end:Object.assign({},g)};if(e.add(r[2],0,[["enter",x,t]]),a!==2){const y=t.events[r[2]],v=t.events[r[3]];if(y[1].end=Object.assign({},v[1].end),y[1].type="chunkText",y[1].contentType="text",r[3]>r[2]+1){const w=r[2]+1,_=r[3]-r[2]-1;e.add(w,_,[])}}e.add(r[3]+1,0,[["exit",x,t]])}return l!==void 0&&(o.end=Object.assign({},Bs(t.events,l)),e.add(l,0,[["exit",o,t]]),o=void 0),o}function Jy(e,t,r,a,l){const o=[],c=Bs(t.events,r);l&&(l.end=Object.assign({},c),o.push(["exit",l,t])),a.end=Object.assign({},c),o.push(["exit",a,t]),e.add(r+1,0,o)}function Bs(e,t){const r=e[t],a=r[0]==="enter"?"start":"end";return r[1][a]}const oL={name:"tasklistCheck",tokenize:uL};function cL(){return{text:{91:oL}}}function uL(e,t,r){const a=this;return l;function l(h){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?r(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),o)}function o(h){return Yt(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),c):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),c):r(h)}function c(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):r(h)}function f(h){return Ke(h)?t(h):pt(h)?e.check({tokenize:dL},t,r)(h):r(h)}}function dL(e,t,r){return Ct(e,a,"whitespace");function a(l){return l===null?r(l):t(l)}}function fL(e){return Mk([ID(),VD(),tL(e),aL(),cL()])}const hL={};function mL(e){const t=this,r=e||hL,a=t.data(),l=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);l.push(fL(r)),o.push(MD()),c.push(jD(r))}const ev=(function(e,t,r){const a=Io(r);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(a(e.children[t],t,e))return e.children[t]}),es=(function(e){if(e==null)return bL;if(typeof e=="string")return gL(e);if(typeof e=="object")return pL(e);if(typeof e=="function")return gp(e);throw new Error("Expected function, string, or array as `test`")});function pL(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=es(e[r]);return gp(a);function a(...l){let o=-1;for(;++o<t.length;)if(t[o].apply(this,l))return!0;return!1}}function gL(e){return gp(t);function t(r){return r.tagName===e}}function gp(e){return t;function t(r,a,l){return!!(xL(r)&&e.call(this,r,typeof a=="number"?a:void 0,l||void 0))}}function bL(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function xL(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const tv=/\n/g,nv=/[\t ]+/g,ym=es("br"),rv=es(SL),yL=es("p"),iv=es("tr"),vL=es(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",NL,zL]),Ew=es(["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 kL(e,t){const r=t||{},a="children"in e?e.children:[],l=Ew(e),o=Sw(e,{whitespace:r.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...Nw(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<a.length;)c.push(..._w(a[f],e,{whitespace:o,breakBefore:f?void 0:l,breakAfter:f<a.length-1?ym(a[f+1]):l}));const h=[];let m;for(f=-1;++f<c.length;){const g=c[f];typeof g=="number"?m!==void 0&&g>m&&(m=g):g&&(m!==void 0&&m>-1&&h.push(`
|
|
557
|
-
`.repeat(m)||" "),m=-1,h.push(g))}return h.join("")}function _w(e,t,r){return e.type==="element"?wL(e,t,r):e.type==="text"?r.whitespace==="normal"?Nw(e,r):EL(e):[]}function wL(e,t,r){const a=Sw(e,r),l=e.children||[];let o=-1,c=[];if(vL(e))return c;let f,h;for(ym(e)||iv(e)&&ev(t,e,iv)?h=`
|
|
558
|
-
`:yL(e)?(f=2,h=2):Ew(e)&&(f=1,h=1);++o<l.length;)c=c.concat(_w(l[o],e,{whitespace:a,breakBefore:o?void 0:f,breakAfter:o<l.length-1?ym(l[o+1]):h}));return rv(e)&&ev(t,e,rv)&&c.push(" "),f&&c.unshift(f),h&&c.push(h),c}function Nw(e,t){const r=String(e.value),a=[],l=[];let o=0;for(;o<=r.length;){tv.lastIndex=o;const h=tv.exec(r),m=h&&"index"in h?h.index:r.length;a.push(_L(r.slice(o,m).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,m===r.length?t.breakAfter:!0)),o=m+1}let c=-1,f;for(;++c<a.length;)a[c].charCodeAt(a[c].length-1)===8203||c<a.length-1&&a[c+1].charCodeAt(0)===8203?(l.push(a[c]),f=void 0):a[c]?(typeof f=="number"&&l.push(f),l.push(a[c]),f=0):(c===0||c===a.length-1)&&l.push(0);return l}function EL(e){return[String(e.value)]}function _L(e,t,r){const a=[];let l=0,o;for(;l<e.length;){nv.lastIndex=l;const c=nv.exec(e);o=c?c.index:e.length,!l&&!o&&c&&!t&&a.push(""),l!==o&&a.push(e.slice(l,o)),l=c?o+c[0].length:o}return l!==o&&!r&&a.push(""),a.join(" ")}function Sw(e,t){if(e.type==="element"){const r=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function NL(e){return!!(e.properties||{}).hidden}function SL(e){return e.tagName==="td"||e.tagName==="th"}function zL(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function CL(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(l)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},x={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(l)+e.IDENT_RE,relevance:0},v=t.optional(l)+e.IDENT_RE+"\\s*\\(",w=["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"],_=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],N=["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"],S=["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"],F={type:_,keyword:w,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:N},$={className:"function.dispatch",relevance:0,keywords:{_hint:S},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},j=[$,x,f,r,e.C_BLOCK_COMMENT_MODE,g,m],G={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:F,contains:j.concat([{begin:/\(/,end:/\)/,keywords:F,contains:j.concat(["self"]),relevance:0}]),relevance:0},R={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:F,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:F,relevance:0},{begin:v,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:F,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,m,g,f,{begin:/\(/,end:/\)/,keywords:F,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,m,g,f]}]},f,r,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:F,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(G,R,$,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:F,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:F},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function TL(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},r=CL(e),a=r.keywords;return a.type=[...a.type,...t.type],a.literal=[...a.literal,...t.literal],a.built_in=[...a.built_in,...t.built_in],a._hints=t._hints,r.name="Arduino",r.aliases=["ino"],r.supersetOf="cpp",r}function AL(e){const t=e.regex,r={},a={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const l={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),c={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},f={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r,l]};l.contains.push(f);const h={match:/\\"/},m={className:"string",begin:/'/,end:/'/},g={match:/\\'/},x={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,r]},y=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],v=e.SHEBANG({binary:`(${y.join("|")})`,relevance:10}),w={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},_=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],N=["true","false"],S={match:/(\/[a-z._-]+)+/},O=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],z=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],F=["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:_,literal:N,built_in:[...O,...z,"set","shopt",...F,...$]},contains:[v,e.SHEBANG(),w,x,o,c,S,f,h,m,g,r]}}function RL(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",c="("+a+"|"+t.optional(l)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},x={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(l)+e.IDENT_RE,relevance:0},v=t.optional(l)+e.IDENT_RE+"\\s*\\(",N={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"},S=[x,f,r,e.C_BLOCK_COMMENT_MODE,g,m],O={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:N,contains:S.concat([{begin:/\(/,end:/\)/,keywords:N,contains:S.concat(["self"]),relevance:0}]),relevance:0},z={begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:N,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:N,relevance:0},{begin:v,returnBegin:!0,contains:[e.inherit(y,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:N,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,m,g,f,{begin:/\(/,end:/\)/,keywords:N,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,m,g,f]}]},f,r,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C",aliases:["h"],keywords:N,disableAutodetect:!0,illegal:"</",contains:[].concat(O,z,S,[x,{begin:e.IDENT_RE+"::",keywords:N},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:x,strings:m,keywords:N}}}function OL(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(l)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},x={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(l)+e.IDENT_RE,relevance:0},v=t.optional(l)+e.IDENT_RE+"\\s*\\(",w=["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"],_=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],N=["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"],S=["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"],F={type:_,keyword:w,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:N},$={className:"function.dispatch",relevance:0,keywords:{_hint:S},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},j=[$,x,f,r,e.C_BLOCK_COMMENT_MODE,g,m],G={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:F,contains:j.concat([{begin:/\(/,end:/\)/,keywords:F,contains:j.concat(["self"]),relevance:0}]),relevance:0},R={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:F,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:F,relevance:0},{begin:v,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:F,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,m,g,f,{begin:/\(/,end:/\)/,keywords:F,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,m,g,f]}]},f,r,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:F,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(G,R,$,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:F,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:F},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function ML(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],r=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],a=["default","false","null","true"],l=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],o=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],c={keyword:l.concat(o),built_in:t,literal:a},f=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),h={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},m={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},g={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},x=e.inherit(g,{illegal:/\n/}),y={className:"subst",begin:/\{/,end:/\}/,keywords:c},v=e.inherit(y,{illegal:/\n/}),w={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,v]},_={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]},N=e.inherit(_,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});y.contains=[_,w,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,e.C_BLOCK_COMMENT_MODE],v.contains=[N,w,x,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const S={variants:[m,_,w,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},O={begin:"<",end:">",contains:[{beginKeywords:"in out"},f]},z=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",F={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:c,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},S,h,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},f,O,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,O,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+z+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:c,contains:[{beginKeywords:r.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,O],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[S,h,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},F]}}const jL=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"],LL=["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"],IL=[...DL,...LL],BL=["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(),UL=["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(),PL=["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 HL(e){const t=e.regex,r=jL(e),a={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},l="and or not only",o=/@-?\w[\w]*(-\w+)*/,c="[a-zA-Z-][a-zA-Z0-9_-]*",f=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[r.BLOCK_COMMENT,a,r.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+c,relevance:0},r.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+UL.join("|")+")"},{begin:":(:)?("+PL.join("|")+")"}]},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+FL.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[r.BLOCK_COMMENT,r.HEXCOLOR,r.IMPORTANT,r.CSS_NUMBER_MODE,...f,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...f,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},r.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:l,attribute:BL.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...f,r.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+IL.join("|")+")\\b"}]}}function qL(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function $L(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 GL(e){const t=e.regex,r=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(r,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function KL(e){const t=e.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},a=e.COMMENT();a.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const l={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},c={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},f={begin:/\[/,end:/\]/,contains:[a,o,l,c,r,"self"],relevance:0},h=/[A-Za-z0-9_-]+/,m=/"(\\"|[^"])*"/,g=/'[^']*'/,x=t.either(h,m,g),y=t.concat(x,"(\\s*\\.\\s*",x,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[a,{className:"section",begin:/\[+/,end:/\]+/},{begin:y,className:"attr",starts:{end:/$/,contains:[a,f,o,l,c,r]}}]}}var Us="[0-9](_*[0-9])*",ou=`\\.(${Us})`,cu="[0-9a-fA-F](_*[0-9a-fA-F])*",av={className:"number",variants:[{begin:`(\\b(${Us})((${ou})|\\.)?|(${ou}))[eE][+-]?(${Us})[fFdD]?\\b`},{begin:`\\b(${Us})((${ou})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ou})[fFdD]?\\b`},{begin:`\\b(${Us})[fFdD]\\b`},{begin:`\\b0[xX]((${cu})\\.?|(${cu})?\\.(${cu}))[pP][+-]?(${Us})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${cu})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function zw(e,t,r){return r===-1?"":e.replace(t,a=>zw(e,t,r-1))}function VL(e){const t=e.regex,r="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",a=r+zw("(?:<"+r+"~~~(?:\\s*,\\s*"+r+"~~~)*>)?",/~~~/g,2),h={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},m={className:"meta",begin:"@"+r,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},g={className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:h,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,r),/\s+/,r,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,r],className:{1:"keyword",3:"title.class"},contains:[g,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+a+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:h,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,av,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},av,m]}}const sv="[A-Za-z$_][0-9A-Za-z$_]*",YL=["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"],QL=["true","false","null","undefined","NaN","Infinity"],Cw=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Tw=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Aw=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],XL=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],ZL=[].concat(Aw,Cw,Tw);function WL(e){const t=e.regex,r=(V,{after:fe})=>{const A="</"+V[0].slice(1);return V.input.indexOf(A,fe)!==-1},a=sv,l={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(V,fe)=>{const A=V[0].length+V.index,D=V.input[A];if(D==="<"||D===","){fe.ignoreMatch();return}D===">"&&(r(V,{after:A})||fe.ignoreMatch());let B;const C=V.input.substring(A);if(B=C.match(/^\s*=/)){fe.ignoreMatch();return}if((B=C.match(/^\s+extends\s+/))&&B.index===0){fe.ignoreMatch();return}}},f={$pattern:sv,keyword:YL,literal:QL,built_in:ZL,"variable.language":XL},h="[0-9](_?[0-9])*",m=`\\.(${h})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",x={className:"number",variants:[{begin:`(\\b(${g})((${m})|\\.)?|(${m}))[eE][+-]?(${h})\\b`},{begin:`\\b(${g})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},y={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},w={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"css"}},_={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"graphql"}},N={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},O={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},z=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,w,_,N,{match:/\$\d+/},x];y.contains=z.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(z)});const F=[].concat(O,y.contains),$=F.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(F)}]),j={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$},G={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},R={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Cw,...Tw]}},ie={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[j],illegal:/%/},ee={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function te(V){return t.concat("(?!",V.join("|"),")")}const we={match:t.concat(/\b/,te([...Aw,"super","import"].map(V=>`${V}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},se={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Q={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},j]},M="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Y={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(M)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[j]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:$,CLASS_REFERENCE:R},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ie,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,w,_,N,O,{match:/\$\d+/},x,R,{scope:"attr",match:a+t.lookahead(":"),relevance:0},Y,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[O,e.REGEXP_MODE,{className:"function",begin:M,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[j,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},se,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[j]},we,ee,G,Q,{match:/\$[(.]/}]}}function JL(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},a=["true","false","null"],l={scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:a},contains:[t,r,e.QUOTE_STRING_MODE,l,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Ps="[0-9](_*[0-9])*",uu=`\\.(${Ps})`,du="[0-9a-fA-F](_*[0-9a-fA-F])*",eI={className:"number",variants:[{begin:`(\\b(${Ps})((${uu})|\\.)?|(${uu}))[eE][+-]?(${Ps})[fFdD]?\\b`},{begin:`\\b(${Ps})((${uu})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${uu})[fFdD]?\\b`},{begin:`\\b(${Ps})[fFdD]\\b`},{begin:`\\b0[xX]((${du})\\.?|(${du})?\\.(${du}))[pP][+-]?(${Ps})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${du})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function tI(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},r={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},a={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},l={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},c={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,l]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,l]}]};l.contains.push(c);const f={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},h={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(c,{className:"string"}),"self"]}]},m=eI,g=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),x={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},y=x;return y.variants[1].contains=[x],x.variants[1].contains=[y],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,g,r,a,f,h,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[x,e.C_LINE_COMMENT_MODE,g],relevance:0},e.C_LINE_COMMENT_MODE,g,f,h,c,e.C_NUMBER_MODE]},g]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},f,h]},c,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
559
|
-
`},m]}}const nI=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_-]*/}}),rI=["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"],iI=["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"],aI=[...rI,...iI],sI=["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(),Rw=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Ow=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),lI=["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(),oI=Rw.concat(Ow).sort().reverse();function cI(e){const t=nI(e),r=oI,a="and or not only",l="[\\w-]+",o="("+l+"|@\\{"+l+"\\})",c=[],f=[],h=function(z){return{className:"string",begin:"~?"+z+".*?"+z}},m=function(z,F,$){return{className:z,begin:F,relevance:$}},g={$pattern:/[a-z-]+/,keyword:a,attribute:sI.join(" ")},x={begin:"\\(",end:"\\)",contains:f,keywords:g,relevance:0};f.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,h("'"),h('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,x,m("variable","@@?"+l,10),m("variable","@\\{"+l+"\\}"),m("built_in","~?`[^`]*?`"),{className:"attribute",begin:l+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const y=f.concat({begin:/\{/,end:/\}/,contains:c}),v={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(f)},w={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+lI.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:f}}]},_={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:g,returnEnd:!0,contains:f,relevance:0}},N={className:"variable",variants:[{begin:"@"+l+"\\s*:",relevance:15},{begin:"@"+l}],starts:{end:"[;}]",returnEnd:!0,contains:y}},S={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("+aI.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,m("selector-tag",o,0),m("selector-id","#"+o),m("selector-class","\\."+o,0),m("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Rw.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Ow.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:y},{begin:"!important"},t.FUNCTION_DISPATCH]},O={begin:l+`:(:)?(${r.join("|")})`,returnBegin:!0,contains:[S]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,_,N,O,w,S,v,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:c}}function uI(e){const t="\\[=*\\[",r="\\]=*\\]",a={begin:t,end:r,contains:["self"]},l=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,r,{contains:[a],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:l.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:l}].concat(l)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:r,contains:[a],relevance:5}])}}function dI(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},r={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},a={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,r]},l={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},c={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,r,a,l,o,c]}}function fI(e){const t=e.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},a={begin:"^[-\\*]{3,}",end:"$"},l={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},c={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},f=/[A-Za-z][A-Za-z0-9+.-]*/,h={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,f,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},m={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},g={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},x=e.inherit(m,{contains:[]}),y=e.inherit(g,{contains:[]});m.contains.push(y),g.contains.push(x);let v=[r,h];return[m,g,x,y].forEach(S=>{S.contains=S.contains.concat(v)}),v=v.concat(m,g),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:v},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:v}]}]},r,o,m,g,{className:"quote",begin:"^>\\s+",contains:v,end:"$"},l,a,h,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function hI(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},r=/[a-zA-Z@][a-zA-Z0-9_]*/,f={"variable.language":["this","super"],$pattern:r,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},h={$pattern:r,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:f,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+h.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:h,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function mI(e){const t=e.regex,r=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],a=/[dualxmsipngr]{0,12}/,l={$pattern:/[\w.]+/,keyword:r.join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:l},c={begin:/->\{/,end:/\}/},f={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},h={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[f]},m={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},g=[e.BACKSLASH_ESCAPE,o,h],x=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],y=(_,N,S="\\1")=>{const O=S==="\\1"?S:t.concat(S,N);return t.concat(t.concat("(?:",_,")"),N,/(?:\\.|[^\\\/])*?/,O,/(?:\\.|[^\\\/])*?/,S,a)},v=(_,N,S)=>t.concat(t.concat("(?:",_,")"),N,/(?:\\.|[^\\\/])*?/,S,a),w=[h,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),c,{className:"string",contains:g,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},m,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:y("s|tr|y",t.either(...x,{capture:!0}))},{begin:y("s|tr|y","\\(","\\)")},{begin:y("s|tr|y","\\[","\\]")},{begin:y("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:v("(?:m|qr)?",/\//,/\//)},{begin:v("m|qr",t.either(...x,{capture:!0}),/\1/)},{begin:v("m|qr",/\(/,/\)/)},{begin:v("m|qr",/\[/,/\]/)},{begin:v("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f,m]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=w,c.contains=w,{name:"Perl",aliases:["pl","pm"],keywords:l,contains:w}}function pI(e){const t=e.regex,r=/(?![A-Za-z0-9])(?![$])/,a=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),l=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),o=t.concat(/[A-Z]+/,r),c={scope:"variable",match:"\\$+"+a},f={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},h={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},m=e.inherit(e.APOS_STRING_MODE,{illegal:null}),g=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(h)}),x={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(h),"on:begin":(se,Q)=>{Q.data._beginMatch=se[1]||se[2]},"on:end":(se,Q)=>{Q.data._beginMatch!==se[1]&&Q.ignoreMatch()}},y=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
|
|
560
|
-
]`,w={scope:"string",variants:[g,m,x,y]},_={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},N=["false","null","true"],S=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],O=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],F={keyword:S,literal:(se=>{const Q=[];return se.forEach(M=>{Q.push(M),M.toLowerCase()===M?Q.push(M.toUpperCase()):Q.push(M.toLowerCase())}),Q})(N),built_in:O},$=se=>se.map(Q=>Q.replace(/\|\d+$/,"")),j={variants:[{match:[/new/,t.concat(v,"+"),t.concat("(?!",$(O).join("\\b|"),"\\b)"),l],scope:{1:"keyword",4:"title.class"}}]},G=t.concat(a,"\\b(?!\\()"),R={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),G],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[l,t.concat(/::/,t.lookahead(/(?!class\b)/)),G],scope:{1:"title.class",3:"variable.constant"}},{match:[l,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[l,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},ie={scope:"attr",match:t.concat(a,t.lookahead(":"),t.lookahead(/(?!::)/))},P={relevance:0,begin:/\(/,end:/\)/,keywords:F,contains:[ie,c,R,e.C_BLOCK_COMMENT_MODE,w,_,j]},ee={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",$(S).join("\\b|"),"|",$(O).join("\\b|"),"\\b)"),a,t.concat(v,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[P]};P.contains.push(ee);const te=[ie,R,e.C_BLOCK_COMMENT_MODE,w,_,j],we={begin:t.concat(/#\[\s*\\?/,t.either(l,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:N,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:N,keyword:["new","array"]},contains:["self",...te]},...te,{scope:"meta",variants:[{match:l},{match:o}]}]};return{case_insensitive:!1,keywords:F,contains:[we,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},f,{scope:"variable.language",match:/\$this\b/},c,ee,R,{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:F,contains:["self",we,c,R,e.C_BLOCK_COMMENT_MODE,w,_]}]},{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]},w,_]}}function gI(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 bI(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function xI(e){const t=e.regex,r=/[\p{XID_Start}_]\p{XID_Continue}*/u,a=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],f={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:a,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},h={className:"meta",begin:/^(>>>|\.\.\.) /},m={className:"subst",begin:/\{/,end:/\}/,keywords:f,illegal:/#/},g={begin:/\{\{/,relevance:0},x={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,h,g,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h,g,m]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,g,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,g,m]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y="[0-9](_?[0-9])*",v=`(\\b(${y}))?\\.(${y})|\\b(${y})\\.`,w=`\\b|${a.join("|")}`,_={className:"number",relevance:0,variants:[{begin:`(\\b(${y})|(${v}))[eE][+-]?(${y})[jJ]?(?=${w})`},{begin:`(${v})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${w})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${w})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${w})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${w})`},{begin:`\\b(${y})[jJ](?=${w})`}]},N={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:f,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},S={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",h,_,x,e.HASH_COMMENT_MODE]}]};return m.contains=[x,_,h],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:f,illegal:/(<\/|\?)|=>/,contains:[h,_,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},x,N,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[S]},{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:[_,S,x]}]}}function yI(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function vI(e){const t=e.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,a=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),l=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:r,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:r},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[l,a]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,a]},{scope:{1:"punctuation",2:"number"},match:[o,a]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,a]}]},{scope:{3:"operator"},match:[r,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:l},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function kI(e){const t=e.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),l=t.concat(a,/(::\w+)*/),c={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},f={className:"doctag",begin:"@[A-Za-z]+"},h={begin:"#<",end:">"},m=[e.COMMENT("#","$",{contains:[f]}),e.COMMENT("^=begin","^=end",{contains:[f],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],g={className:"subst",begin:/#\{/,end:/\}/,keywords:c},x={className:"string",contains:[e.BACKSLASH_ESCAPE,g],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,g]})]}]},y="[1-9](_?[0-9])*|0",v="[0-9](_?[0-9])*",w={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"}]},_={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:c}]},j=[x,{variants:[{match:[/class\s+/,l,/\s+<\s+/,l]},{match:[/\b(class|module)\s+/,l]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:c},{match:[/(include|extend)\s+/,l],scope:{2:"title.class"},keywords:c},{relevance:0,match:[l,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[_]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[x,{begin:r}],relevance:0},w,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:c},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,g],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(h,m),relevance:0}].concat(h,m);g.contains=j,_.contains=j;const P=[{begin:/^\s*=>/,starts:{end:"$",contains:j}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:j}}];return m.unshift(h),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(P).concat(m).concat(j)}}function wI(e){const t=e.regex,r=/(r#)?/,a=t.concat(r,e.UNDERSCORE_IDENT_RE),l=t.concat(r,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,l,t.lookahead(/\s*\(/))},c="([ui](8|16|32|64|128|size)|f(32|64))?",f=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],h=["true","false","Some","None","Ok","Err"],m=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],g=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:g,keyword:f,literal:h,built_in:m},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+c},{begin:"\\b0o([0-7_]+)"+c},{begin:"\\b0x([A-Fa-f0-9_]+)"+c},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+c}],relevance:0},{begin:[/fn/,/\s+/,a],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,a],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,a,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:m,type:g}},{className:"punctuation",begin:"->"},o]}}const EI=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),_I=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],NI=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],SI=[..._I,...NI],zI=["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(),CI=["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(),TI=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),AI=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function RI(e){const t=EI(e),r=TI,a=CI,l="@[a-z-]+",o="and or not only",f={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+SI.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+a.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+r.join("|")+")"},f,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+AI.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,f,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:l,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:zI.join(" ")},contains:[{begin:l,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},f,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function OI(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function MI(e){const t=e.regex,r=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},l={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],c=["double precision","large object","with timezone","without timezone"],f=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],h=["add","asc","collation","desc","final","first","last","view"],m=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],g=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],x=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],y=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],v=g,w=[...m,...h].filter($=>!g.includes($)),_={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},N={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},S={match:t.concat(/\b/,t.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function O($){return t.concat(/\b/,t.either(...$.map(j=>j.replace(/\s+/,"\\s+"))),/\b/)}const z={scope:"keyword",match:O(y),relevance:0};function F($,{exceptions:j,when:G}={}){const R=G;return j=j||[],$.map(ie=>ie.match(/\|\d+$/)||j.includes(ie)?ie:R(ie)?`${ie}|0`:ie)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:F(w,{when:$=>$.length<3}),literal:o,type:f,built_in:x},contains:[{scope:"type",match:O(c)},z,S,_,a,l,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,r,N]}}function Mw(e){return e?typeof e=="string"?e:e.source:null}function no(e){return Kt("(?=",e,")")}function Kt(...e){return e.map(r=>Mw(r)).join("")}function jI(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Gn(...e){return"("+(jI(e).capture?"":"?:")+e.map(a=>Mw(a)).join("|")+")"}const bp=e=>Kt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),DI=["Protocol","Type"].map(bp),lv=["init","self"].map(bp),LI=["Any","Self"],Hh=["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"],ov=["false","nil","true"],II=["assignment","associativity","higherThan","left","lowerThan","none","right"],BI=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],cv=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],jw=Gn(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Dw=Gn(jw,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),qh=Kt(jw,Dw,"*"),Lw=Gn(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Bu=Gn(Lw,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Jr=Kt(Lw,Bu,"*"),fu=Kt(/[A-Z]/,Bu,"*"),UI=["attached","autoclosure",Kt(/convention\(/,Gn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Kt(/objc\(/,Jr,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],PI=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function FI(e){const t={match:/\s+/,relevance:0},r=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,r],l={match:[/\./,Gn(...DI,...lv)],className:{2:"keyword"}},o={match:Kt(/\./,Gn(...Hh)),relevance:0},c=Hh.filter(ot=>typeof ot=="string").concat(["_|0"]),f=Hh.filter(ot=>typeof ot!="string").concat(LI).map(bp),h={variants:[{className:"keyword",match:Gn(...f,...lv)}]},m={$pattern:Gn(/\b\w+/,/#\w+/),keyword:c.concat(BI),literal:ov},g=[l,o,h],x={match:Kt(/\./,Gn(...cv)),relevance:0},y={className:"built_in",match:Kt(/\b/,Gn(...cv),/(?=\()/)},v=[x,y],w={match:/->/,relevance:0},_={className:"operator",relevance:0,variants:[{match:qh},{match:`\\.(\\.|${Dw})+`}]},N=[w,_],S="([0-9]_*)+",O="([0-9a-fA-F]_*)+",z={className:"number",relevance:0,variants:[{match:`\\b(${S})(\\.(${S}))?([eE][+-]?(${S}))?\\b`},{match:`\\b0x(${O})(\\.(${O}))?([pP][+-]?(${S}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},F=(ot="")=>({className:"subst",variants:[{match:Kt(/\\/,ot,/[0\\tnr"']/)},{match:Kt(/\\/,ot,/u\{[0-9a-fA-F]{1,8}\}/)}]}),$=(ot="")=>({className:"subst",match:Kt(/\\/,ot,/[\t ]*(?:[\r\n]|\r\n)/)}),j=(ot="")=>({className:"subst",label:"interpol",begin:Kt(/\\/,ot,/\(/),end:/\)/}),G=(ot="")=>({begin:Kt(ot,/"""/),end:Kt(/"""/,ot),contains:[F(ot),$(ot),j(ot)]}),R=(ot="")=>({begin:Kt(ot,/"/),end:Kt(/"/,ot),contains:[F(ot),j(ot)]}),ie={className:"string",variants:[G(),G("#"),G("##"),G("###"),R(),R("#"),R("##"),R("###")]},P=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],ee={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:P},te=ot=>{const En=Kt(ot,/\//),Yn=Kt(/\//,ot);return{begin:En,end:Yn,contains:[...P,{scope:"comment",begin:`#(?!.*${Yn})`,end:/$/}]}},we={scope:"regexp",variants:[te("###"),te("##"),te("#"),ee]},se={match:Kt(/`/,Jr,/`/)},Q={className:"variable",match:/\$\d+/},M={className:"variable",match:`\\$${Bu}+`},Y=[se,Q,M],V={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:PI,contains:[...N,z,ie]}]}},fe={scope:"keyword",match:Kt(/@/,Gn(...UI),no(Gn(/\(/,/\s+/)))},A={scope:"meta",match:Kt(/@/,Jr)},D=[V,fe,A],B={match:no(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Kt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Bu,"+")},{className:"type",match:fu,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Kt(/\s+&\s+/,no(fu)),relevance:0}]},C={begin:/</,end:/>/,keywords:m,contains:[...a,...g,...D,w,B]};B.contains.push(C);const ue={match:Kt(Jr,/\s*:/),keywords:"_|0",relevance:0},be={begin:/\(/,end:/\)/,relevance:0,keywords:m,contains:["self",ue,...a,we,...g,...v,...N,z,ie,...Y,...D,B]},ye={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,B]},le={begin:Gn(no(Kt(Jr,/\s*:/)),no(Kt(Jr,/\s+/,Jr,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Jr}]},xe={begin:/\(/,end:/\)/,keywords:m,contains:[le,...a,...g,...N,z,ie,...D,B,be],endsParent:!0,illegal:/["']/},pe={match:[/(func|macro)/,/\s+/,Gn(se.match,Jr,qh)],className:{1:"keyword",3:"title.function"},contains:[ye,xe,t],illegal:[/\[/,/%/]},Ue={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ye,xe,t],illegal:/\[|%/},Re={match:[/operator/,/\s+/,qh],className:{1:"keyword",3:"title"}},Tt={begin:[/precedencegroup/,/\s+/,fu],className:{1:"keyword",3:"title"},contains:[B],keywords:[...II,...ov],end:/}/},tt={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},gt={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Et={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Jr,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:m,contains:[ye,...g,{begin:/:/,end:/\{/,keywords:m,contains:[{scope:"title.class.inherited",match:fu},...g],relevance:0}]};for(const ot of ie.variants){const En=ot.contains.find(xr=>xr.label==="interpol");En.keywords=m;const Yn=[...g,...v,...N,z,ie,...Y];En.contains=[...Yn,{begin:/\(/,end:/\)/,contains:["self",...Yn]}]}return{name:"Swift",keywords:m,contains:[...a,pe,Ue,tt,gt,Et,Re,Tt,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0},we,...g,...v,...N,z,ie,...Y,...D,B,be]}}const Uu="[A-Za-z$_][0-9A-Za-z$_]*",Iw=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Bw=["true","false","null","undefined","NaN","Infinity"],Uw=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Pw=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Fw=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Hw=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],qw=[].concat(Fw,Uw,Pw);function HI(e){const t=e.regex,r=(V,{after:fe})=>{const A="</"+V[0].slice(1);return V.input.indexOf(A,fe)!==-1},a=Uu,l={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(V,fe)=>{const A=V[0].length+V.index,D=V.input[A];if(D==="<"||D===","){fe.ignoreMatch();return}D===">"&&(r(V,{after:A})||fe.ignoreMatch());let B;const C=V.input.substring(A);if(B=C.match(/^\s*=/)){fe.ignoreMatch();return}if((B=C.match(/^\s+extends\s+/))&&B.index===0){fe.ignoreMatch();return}}},f={$pattern:Uu,keyword:Iw,literal:Bw,built_in:qw,"variable.language":Hw},h="[0-9](_?[0-9])*",m=`\\.(${h})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",x={className:"number",variants:[{begin:`(\\b(${g})((${m})|\\.)?|(${m}))[eE][+-]?(${h})\\b`},{begin:`\\b(${g})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},y={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},w={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"css"}},_={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"graphql"}},N={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},O={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},z=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,w,_,N,{match:/\$\d+/},x];y.contains=z.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(z)});const F=[].concat(O,y.contains),$=F.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(F)}]),j={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$},G={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},R={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Uw,...Pw]}},ie={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[j],illegal:/%/},ee={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function te(V){return t.concat("(?!",V.join("|"),")")}const we={match:t.concat(/\b/,te([...Fw,"super","import"].map(V=>`${V}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},se={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Q={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},j]},M="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Y={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(M)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[j]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:$,CLASS_REFERENCE:R},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ie,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,w,_,N,O,{match:/\$\d+/},x,R,{scope:"attr",match:a+t.lookahead(":"),relevance:0},Y,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[O,e.REGEXP_MODE,{className:"function",begin:M,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[j,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},se,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[j]},we,ee,G,Q,{match:/\$[(.]/}]}}function qI(e){const t=e.regex,r=HI(e),a=Uu,l=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},c={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:l},contains:[r.exports.CLASS_REFERENCE]},f={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},h=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],m={$pattern:Uu,keyword:Iw.concat(h),literal:Bw,built_in:qw.concat(l),"variable.language":Hw},g={className:"meta",begin:"@"+a},x=(_,N,S)=>{const O=_.contains.findIndex(z=>z.label===N);if(O===-1)throw new Error("can not find mode to replace");_.contains.splice(O,1,S)};Object.assign(r.keywords,m),r.exports.PARAMS_CONTAINS.push(g);const y=r.contains.find(_=>_.scope==="attr"),v=Object.assign({},y,{match:t.concat(a,t.lookahead(/\s*\?:/))});r.exports.PARAMS_CONTAINS.push([r.exports.CLASS_REFERENCE,y,v]),r.contains=r.contains.concat([g,o,c,v]),x(r,"shebang",e.SHEBANG()),x(r,"use_strict",f);const w=r.contains.find(_=>_.label==="func.def");return w.relevance=0,Object.assign(r,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),r}function $I(e){const t=e.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},a={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},l=/\d{1,2}\/\d{1,2}\/\d{4}/,o=/\d{4}-\d{1,2}-\d{1,2}/,c=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,f=/\d{1,2}(:\d{1,2}){1,2}/,h={className:"literal",variants:[{begin:t.concat(/# */,t.either(o,l),/ *#/)},{begin:t.concat(/# */,f,/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,t.either(o,l),/ +/,t.either(c,f),/ *#/)}]},m={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},g={className:"label",begin:/^\w+:/},x=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),y=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[r,a,h,m,g,x,y,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[y]}]}}function GI(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const r=e.COMMENT(/;;/,/$/),a=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],l={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},o={className:"variable",begin:/\$[\w_]+/},c={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},f={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},h={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},m={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:a},contains:[r,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,c,l,e.QUOTE_STRING_MODE,h,m,f]}}function KI(e){const t=e.regex,r=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),a=/[\p{L}0-9._:-]+/u,l={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(o,{begin:/\(/,end:/\)/}),f=e.inherit(e.APOS_STRING_MODE,{className:"string"}),h=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),m={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:a,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[l]},{begin:/'/,end:/'/,contains:[l]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,h,f,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,c,h,f]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},l,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[h]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[m],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[m],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(r,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:m}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function VI(e){const t="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},l={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},c={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,l]},f=e.inherit(c,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),y={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},v={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},w={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},_={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},N=[a,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},y,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},w,_,o,c],S=[...N];return S.pop(),S.push(f),v.contains=S,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:N}}const YI={arduino:TL,bash:AL,c:RL,cpp:OL,csharp:ML,css:HL,diff:qL,go:$L,graphql:GL,ini:KL,java:VL,javascript:WL,json:JL,kotlin:tI,less:cI,lua:uI,makefile:dI,markdown:fI,objectivec:hI,perl:mI,php:pI,"php-template":gI,plaintext:bI,python:xI,"python-repl":yI,r:vI,ruby:kI,rust:wI,scss:RI,shell:OI,sql:MI,swift:FI,typescript:qI,vbnet:$I,wasm:GI,xml:KI,yaml:VI};var $h,uv;function QI(){if(uv)return $h;uv=1;function e(U){return U instanceof Map?U.clear=U.delete=U.set=function(){throw new Error("map is read-only")}:U instanceof Set&&(U.add=U.clear=U.delete=function(){throw new Error("set is read-only")}),Object.freeze(U),Object.getOwnPropertyNames(U).forEach(ce=>{const ze=U[ce],Qe=typeof ze;(Qe==="object"||Qe==="function")&&!Object.isFrozen(ze)&&e(ze)}),U}class t{constructor(ce){ce.data===void 0&&(ce.data={}),this.data=ce.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(U){return U.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(U,...ce){const ze=Object.create(null);for(const Qe in U)ze[Qe]=U[Qe];return ce.forEach(function(Qe){for(const Lt in Qe)ze[Lt]=Qe[Lt]}),ze}const l="</span>",o=U=>!!U.scope,c=(U,{prefix:ce})=>{if(U.startsWith("language:"))return U.replace("language:","language-");if(U.includes(".")){const ze=U.split(".");return[`${ce}${ze.shift()}`,...ze.map((Qe,Lt)=>`${Qe}${"_".repeat(Lt+1)}`)].join(" ")}return`${ce}${U}`};class f{constructor(ce,ze){this.buffer="",this.classPrefix=ze.classPrefix,ce.walk(this)}addText(ce){this.buffer+=r(ce)}openNode(ce){if(!o(ce))return;const ze=c(ce.scope,{prefix:this.classPrefix});this.span(ze)}closeNode(ce){o(ce)&&(this.buffer+=l)}value(){return this.buffer}span(ce){this.buffer+=`<span class="${ce}">`}}const h=(U={})=>{const ce={children:[]};return Object.assign(ce,U),ce};class m{constructor(){this.rootNode=h(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(ce){this.top.children.push(ce)}openNode(ce){const ze=h({scope:ce});this.add(ze),this.stack.push(ze)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ce){return this.constructor._walk(ce,this.rootNode)}static _walk(ce,ze){return typeof ze=="string"?ce.addText(ze):ze.children&&(ce.openNode(ze),ze.children.forEach(Qe=>this._walk(ce,Qe)),ce.closeNode(ze)),ce}static _collapse(ce){typeof ce!="string"&&ce.children&&(ce.children.every(ze=>typeof ze=="string")?ce.children=[ce.children.join("")]:ce.children.forEach(ze=>{m._collapse(ze)}))}}class g extends m{constructor(ce){super(),this.options=ce}addText(ce){ce!==""&&this.add(ce)}startScope(ce){this.openNode(ce)}endScope(){this.closeNode()}__addSublanguage(ce,ze){const Qe=ce.root;ze&&(Qe.scope=`language:${ze}`),this.add(Qe)}toHTML(){return new f(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function x(U){return U?typeof U=="string"?U:U.source:null}function y(U){return _("(?=",U,")")}function v(U){return _("(?:",U,")*")}function w(U){return _("(?:",U,")?")}function _(...U){return U.map(ze=>x(ze)).join("")}function N(U){const ce=U[U.length-1];return typeof ce=="object"&&ce.constructor===Object?(U.splice(U.length-1,1),ce):{}}function S(...U){return"("+(N(U).capture?"":"?:")+U.map(Qe=>x(Qe)).join("|")+")"}function O(U){return new RegExp(U.toString()+"|").exec("").length-1}function z(U,ce){const ze=U&&U.exec(ce);return ze&&ze.index===0}const F=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function $(U,{joinWith:ce}){let ze=0;return U.map(Qe=>{ze+=1;const Lt=ze;let Rt=x(Qe),Me="";for(;Rt.length>0;){const Te=F.exec(Rt);if(!Te){Me+=Rt;break}Me+=Rt.substring(0,Te.index),Rt=Rt.substring(Te.index+Te[0].length),Te[0][0]==="\\"&&Te[1]?Me+="\\"+String(Number(Te[1])+Lt):(Me+=Te[0],Te[0]==="("&&ze++)}return Me}).map(Qe=>`(${Qe})`).join(ce)}const j=/\b\B/,G="[a-zA-Z]\\w*",R="[a-zA-Z_]\\w*",ie="\\b\\d+(\\.\\d+)?",P="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",ee="\\b(0b[01]+)",te="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",we=(U={})=>{const ce=/^#![ ]*\//;return U.binary&&(U.begin=_(ce,/.*\b/,U.binary,/\b.*/)),a({scope:"meta",begin:ce,end:/$/,relevance:0,"on:begin":(ze,Qe)=>{ze.index!==0&&Qe.ignoreMatch()}},U)},se={begin:"\\\\[\\s\\S]",relevance:0},Q={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[se]},M={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[se]},Y={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},V=function(U,ce,ze={}){const Qe=a({scope:"comment",begin:U,end:ce,contains:[]},ze);Qe.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Lt=S("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Qe.contains.push({begin:_(/[ ]+/,"(",Lt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Qe},fe=V("//","$"),A=V("/\\*","\\*/"),D=V("#","$"),B={scope:"number",begin:ie,relevance:0},C={scope:"number",begin:P,relevance:0},ue={scope:"number",begin:ee,relevance:0},be={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[se,{begin:/\[/,end:/\]/,relevance:0,contains:[se]}]},ye={scope:"title",begin:G,relevance:0},le={scope:"title",begin:R,relevance:0},xe={begin:"\\.\\s*"+R,relevance:0};var Ue=Object.freeze({__proto__:null,APOS_STRING_MODE:Q,BACKSLASH_ESCAPE:se,BINARY_NUMBER_MODE:ue,BINARY_NUMBER_RE:ee,COMMENT:V,C_BLOCK_COMMENT_MODE:A,C_LINE_COMMENT_MODE:fe,C_NUMBER_MODE:C,C_NUMBER_RE:P,END_SAME_AS_BEGIN:function(U){return Object.assign(U,{"on:begin":(ce,ze)=>{ze.data._beginMatch=ce[1]},"on:end":(ce,ze)=>{ze.data._beginMatch!==ce[1]&&ze.ignoreMatch()}})},HASH_COMMENT_MODE:D,IDENT_RE:G,MATCH_NOTHING_RE:j,METHOD_GUARD:xe,NUMBER_MODE:B,NUMBER_RE:ie,PHRASAL_WORDS_MODE:Y,QUOTE_STRING_MODE:M,REGEXP_MODE:be,RE_STARTERS_RE:te,SHEBANG:we,TITLE_MODE:ye,UNDERSCORE_IDENT_RE:R,UNDERSCORE_TITLE_MODE:le});function Re(U,ce){U.input[U.index-1]==="."&&ce.ignoreMatch()}function Tt(U,ce){U.className!==void 0&&(U.scope=U.className,delete U.className)}function tt(U,ce){ce&&U.beginKeywords&&(U.begin="\\b("+U.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",U.__beforeBegin=Re,U.keywords=U.keywords||U.beginKeywords,delete U.beginKeywords,U.relevance===void 0&&(U.relevance=0))}function gt(U,ce){Array.isArray(U.illegal)&&(U.illegal=S(...U.illegal))}function Et(U,ce){if(U.match){if(U.begin||U.end)throw new Error("begin & end are not supported with match");U.begin=U.match,delete U.match}}function ot(U,ce){U.relevance===void 0&&(U.relevance=1)}const En=(U,ce)=>{if(!U.beforeMatch)return;if(U.starts)throw new Error("beforeMatch cannot be used with starts");const ze=Object.assign({},U);Object.keys(U).forEach(Qe=>{delete U[Qe]}),U.keywords=ze.keywords,U.begin=_(ze.beforeMatch,y(ze.begin)),U.starts={relevance:0,contains:[Object.assign(ze,{endsParent:!0})]},U.relevance=0,delete ze.beforeMatch},Yn=["of","and","for","in","not","or","if","then","parent","list","value"],xr="keyword";function yr(U,ce,ze=xr){const Qe=Object.create(null);return typeof U=="string"?Lt(ze,U.split(" ")):Array.isArray(U)?Lt(ze,U):Object.keys(U).forEach(function(Rt){Object.assign(Qe,yr(U[Rt],ce,Rt))}),Qe;function Lt(Rt,Me){ce&&(Me=Me.map(Te=>Te.toLowerCase())),Me.forEach(function(Te){const Ve=Te.split("|");Qe[Ve[0]]=[Rt,li(Ve[0],Ve[1])]})}}function li(U,ce){return ce?Number(ce):wa(U)?0:1}function wa(U){return Yn.includes(U.toLowerCase())}const Li={},Wt=U=>{console.error(U)},Qn=(U,...ce)=>{console.log(`WARN: ${U}`,...ce)},ae=(U,ce)=>{Li[`${U}/${ce}`]||(console.log(`Deprecated as of ${U}. ${ce}`),Li[`${U}/${ce}`]=!0)},Ee=new Error;function $e(U,ce,{key:ze}){let Qe=0;const Lt=U[ze],Rt={},Me={};for(let Te=1;Te<=ce.length;Te++)Me[Te+Qe]=Lt[Te],Rt[Te+Qe]=!0,Qe+=O(ce[Te-1]);U[ze]=Me,U[ze]._emit=Rt,U[ze]._multi=!0}function We(U){if(Array.isArray(U.begin)){if(U.skip||U.excludeBegin||U.returnBegin)throw Wt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ee;if(typeof U.beginScope!="object"||U.beginScope===null)throw Wt("beginScope must be object"),Ee;$e(U,U.begin,{key:"beginScope"}),U.begin=$(U.begin,{joinWith:""})}}function rt(U){if(Array.isArray(U.end)){if(U.skip||U.excludeEnd||U.returnEnd)throw Wt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ee;if(typeof U.endScope!="object"||U.endScope===null)throw Wt("endScope must be object"),Ee;$e(U,U.end,{key:"endScope"}),U.end=$(U.end,{joinWith:""})}}function zn(U){U.scope&&typeof U.scope=="object"&&U.scope!==null&&(U.beginScope=U.scope,delete U.scope)}function ar(U){zn(U),typeof U.beginScope=="string"&&(U.beginScope={_wrap:U.beginScope}),typeof U.endScope=="string"&&(U.endScope={_wrap:U.endScope}),We(U),rt(U)}function cn(U){function ce(Me,Te){return new RegExp(x(Me),"m"+(U.case_insensitive?"i":"")+(U.unicodeRegex?"u":"")+(Te?"g":""))}class ze{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Te,Ve){Ve.position=this.position++,this.matchIndexes[this.matchAt]=Ve,this.regexes.push([Ve,Te]),this.matchAt+=O(Te)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Te=this.regexes.map(Ve=>Ve[1]);this.matcherRe=ce($(Te,{joinWith:"|"}),!0),this.lastIndex=0}exec(Te){this.matcherRe.lastIndex=this.lastIndex;const Ve=this.matcherRe.exec(Te);if(!Ve)return null;const L=Ve.findIndex((W,me)=>me>0&&W!==void 0),H=this.matchIndexes[L];return Ve.splice(0,L),Object.assign(Ve,H)}}class Qe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Te){if(this.multiRegexes[Te])return this.multiRegexes[Te];const Ve=new ze;return this.rules.slice(Te).forEach(([L,H])=>Ve.addRule(L,H)),Ve.compile(),this.multiRegexes[Te]=Ve,Ve}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Te,Ve){this.rules.push([Te,Ve]),Ve.type==="begin"&&this.count++}exec(Te){const Ve=this.getMatcher(this.regexIndex);Ve.lastIndex=this.lastIndex;let L=Ve.exec(Te);if(this.resumingScanAtSamePosition()&&!(L&&L.index===this.lastIndex)){const H=this.getMatcher(0);H.lastIndex=this.lastIndex+1,L=H.exec(Te)}return L&&(this.regexIndex+=L.position+1,this.regexIndex===this.count&&this.considerAll()),L}}function Lt(Me){const Te=new Qe;return Me.contains.forEach(Ve=>Te.addRule(Ve.begin,{rule:Ve,type:"begin"})),Me.terminatorEnd&&Te.addRule(Me.terminatorEnd,{type:"end"}),Me.illegal&&Te.addRule(Me.illegal,{type:"illegal"}),Te}function Rt(Me,Te){const Ve=Me;if(Me.isCompiled)return Ve;[Tt,Et,ar,En].forEach(H=>H(Me,Te)),U.compilerExtensions.forEach(H=>H(Me,Te)),Me.__beforeBegin=null,[tt,gt,ot].forEach(H=>H(Me,Te)),Me.isCompiled=!0;let L=null;return typeof Me.keywords=="object"&&Me.keywords.$pattern&&(Me.keywords=Object.assign({},Me.keywords),L=Me.keywords.$pattern,delete Me.keywords.$pattern),L=L||/\w+/,Me.keywords&&(Me.keywords=yr(Me.keywords,U.case_insensitive)),Ve.keywordPatternRe=ce(L,!0),Te&&(Me.begin||(Me.begin=/\B|\b/),Ve.beginRe=ce(Ve.begin),!Me.end&&!Me.endsWithParent&&(Me.end=/\B|\b/),Me.end&&(Ve.endRe=ce(Ve.end)),Ve.terminatorEnd=x(Ve.end)||"",Me.endsWithParent&&Te.terminatorEnd&&(Ve.terminatorEnd+=(Me.end?"|":"")+Te.terminatorEnd)),Me.illegal&&(Ve.illegalRe=ce(Me.illegal)),Me.contains||(Me.contains=[]),Me.contains=[].concat(...Me.contains.map(function(H){return Qt(H==="self"?Me:H)})),Me.contains.forEach(function(H){Rt(H,Ve)}),Me.starts&&Rt(Me.starts,Te),Ve.matcher=Lt(Ve),Ve}if(U.compilerExtensions||(U.compilerExtensions=[]),U.contains&&U.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return U.classNameAliases=a(U.classNameAliases||{}),Rt(U)}function rn(U){return U?U.endsWithParent||rn(U.starts):!1}function Qt(U){return U.variants&&!U.cachedVariants&&(U.cachedVariants=U.variants.map(function(ce){return a(U,{variants:null},ce)})),U.cachedVariants?U.cachedVariants:rn(U)?a(U,{starts:U.starts?a(U.starts):null}):Object.isFrozen(U)?a(U):U}var At="11.11.1";class sr extends Error{constructor(ce,ze){super(ce),this.name="HTMLInjectionError",this.html=ze}}const Cn=r,ts=a,Kr=Symbol("nomatch"),Lr=7,Vr=function(U){const ce=Object.create(null),ze=Object.create(null),Qe=[];let Lt=!0;const Rt="Could not find the language '{}', did you forget to load/include a language module?",Me={disableAutodetect:!0,name:"Plain text",contains:[]};let Te={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:g};function Ve(ge){return Te.noHighlightRe.test(ge)}function L(ge){let Be=ge.className+" ";Be+=ge.parentNode?ge.parentNode.className:"";const Je=Te.languageDetectRe.exec(Be);if(Je){const St=Nt(Je[1]);return St||(Qn(Rt.replace("{}",Je[1])),Qn("Falling back to no-highlight mode for this block.",ge)),St?Je[1]:"no-highlight"}return Be.split(/\s+/).find(St=>Ve(St)||Nt(St))}function H(ge,Be,Je){let St="",Xt="";typeof Be=="object"?(St=ge,Je=Be.ignoreIllegals,Xt=Be.language):(ae("10.7.0","highlight(lang, code, ...args) has been deprecated."),ae("10.7.0",`Please use highlight(code, options) instead.
|
|
561
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),Xt=ge,St=Be),Je===void 0&&(Je=!0);const Xe={code:St,language:Xt};Un("before:highlight",Xe);const It=Xe.result?Xe.result:W(Xe.language,Xe.code,Je);return It.code=Xe.code,Un("after:highlight",It),It}function W(ge,Be,Je,St){const Xt=Object.create(null);function Xe(Se,Pe){return Se.keywords[Pe]}function It(){if(!Ze.keywords){pn.addText(Ut);return}let Se=0;Ze.keywordPatternRe.lastIndex=0;let Pe=Ze.keywordPatternRe.exec(Ut),nt="";for(;Pe;){nt+=Ut.substring(Se,Pe.index);const xt=On.case_insensitive?Pe[0].toLowerCase():Pe[0],sn=Xe(Ze,xt);if(sn){const[vr,rl]=sn;if(pn.addText(nt),nt="",Xt[xt]=(Xt[xt]||0)+1,Xt[xt]<=Lr&&(Ii+=rl),vr.startsWith("_"))nt+=Pe[0];else{const Fo=On.classNameAliases[vr]||vr;bt(Pe[0],Fo)}}else nt+=Pe[0];Se=Ze.keywordPatternRe.lastIndex,Pe=Ze.keywordPatternRe.exec(Ut)}nt+=Ut.substring(Se),pn.addText(nt)}function dn(){if(Ut==="")return;let Se=null;if(typeof Ze.subLanguage=="string"){if(!ce[Ze.subLanguage]){pn.addText(Ut);return}Se=W(Ze.subLanguage,Ut,!0,Po[Ze.subLanguage]),Po[Ze.subLanguage]=Se._top}else Se=ve(Ut,Ze.subLanguage.length?Ze.subLanguage:null);Ze.relevance>0&&(Ii+=Se.relevance),pn.__addSublanguage(Se._emitter,Se.language)}function zt(){Ze.subLanguage!=null?dn():It(),Ut=""}function bt(Se,Pe){Se!==""&&(pn.startScope(Pe),pn.addText(Se),pn.endScope())}function oi(Se,Pe){let nt=1;const xt=Pe.length-1;for(;nt<=xt;){if(!Se._emit[nt]){nt++;continue}const sn=On.classNameAliases[Se[nt]]||Se[nt],vr=Pe[nt];sn?bt(vr,sn):(Ut=vr,It(),Ut=""),nt++}}function ci(Se,Pe){return Se.scope&&typeof Se.scope=="string"&&pn.openNode(On.classNameAliases[Se.scope]||Se.scope),Se.beginScope&&(Se.beginScope._wrap?(bt(Ut,On.classNameAliases[Se.beginScope._wrap]||Se.beginScope._wrap),Ut=""):Se.beginScope._multi&&(oi(Se.beginScope,Pe),Ut="")),Ze=Object.create(Se,{parent:{value:Ze}}),Ze}function Ea(Se,Pe,nt){let xt=z(Se.endRe,nt);if(xt){if(Se["on:end"]){const sn=new t(Se);Se["on:end"](Pe,sn),sn.isMatchIgnored&&(xt=!1)}if(xt){for(;Se.endsParent&&Se.parent;)Se=Se.parent;return Se}}if(Se.endsWithParent)return Ea(Se.parent,Pe,nt)}function ns(Se){return Ze.matcher.regexIndex===0?(Ut+=Se[0],1):(Bi=!0,0)}function nd(Se){const Pe=Se[0],nt=Se.rule,xt=new t(nt),sn=[nt.__beforeBegin,nt["on:begin"]];for(const vr of sn)if(vr&&(vr(Se,xt),xt.isMatchIgnored))return ns(Pe);return nt.skip?Ut+=Pe:(nt.excludeBegin&&(Ut+=Pe),zt(),!nt.returnBegin&&!nt.excludeBegin&&(Ut=Pe)),ci(nt,Se),nt.returnBegin?0:Pe.length}function Xn(Se){const Pe=Se[0],nt=Be.substring(Se.index),xt=Ea(Ze,Se,nt);if(!xt)return Kr;const sn=Ze;Ze.endScope&&Ze.endScope._wrap?(zt(),bt(Pe,Ze.endScope._wrap)):Ze.endScope&&Ze.endScope._multi?(zt(),oi(Ze.endScope,Se)):sn.skip?Ut+=Pe:(sn.returnEnd||sn.excludeEnd||(Ut+=Pe),zt(),sn.excludeEnd&&(Ut=Pe));do Ze.scope&&pn.closeNode(),!Ze.skip&&!Ze.subLanguage&&(Ii+=Ze.relevance),Ze=Ze.parent;while(Ze!==xt.parent);return xt.starts&&ci(xt.starts,Se),sn.returnEnd?0:Pe.length}function tl(){const Se=[];for(let Pe=Ze;Pe!==On;Pe=Pe.parent)Pe.scope&&Se.unshift(Pe.scope);Se.forEach(Pe=>pn.openNode(Pe))}let _a={};function rs(Se,Pe){const nt=Pe&&Pe[0];if(Ut+=Se,nt==null)return zt(),0;if(_a.type==="begin"&&Pe.type==="end"&&_a.index===Pe.index&&nt===""){if(Ut+=Be.slice(Pe.index,Pe.index+1),!Lt){const xt=new Error(`0 width match regex (${ge})`);throw xt.languageName=ge,xt.badRule=_a.rule,xt}return 1}if(_a=Pe,Pe.type==="begin")return nd(Pe);if(Pe.type==="illegal"&&!Je){const xt=new Error('Illegal lexeme "'+nt+'" for mode "'+(Ze.scope||"<unnamed>")+'"');throw xt.mode=Ze,xt}else if(Pe.type==="end"){const xt=Xn(Pe);if(xt!==Kr)return xt}if(Pe.type==="illegal"&&nt==="")return Ut+=`
|
|
562
|
-
`,1;if(nl>1e5&&nl>Pe.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ut+=nt,nt.length}const On=Nt(ge);if(!On)throw Wt(Rt.replace("{}",ge)),new Error('Unknown language: "'+ge+'"');const Uo=cn(On);let is="",Ze=St||Uo;const Po={},pn=new Te.__emitter(Te);tl();let Ut="",Ii=0,ui=0,nl=0,Bi=!1;try{if(On.__emitTokens)On.__emitTokens(Be,pn);else{for(Ze.matcher.considerAll();;){nl++,Bi?Bi=!1:Ze.matcher.considerAll(),Ze.matcher.lastIndex=ui;const Se=Ze.matcher.exec(Be);if(!Se)break;const Pe=Be.substring(ui,Se.index),nt=rs(Pe,Se);ui=Se.index+nt}rs(Be.substring(ui))}return pn.finalize(),is=pn.toHTML(),{language:ge,value:is,relevance:Ii,illegal:!1,_emitter:pn,_top:Ze}}catch(Se){if(Se.message&&Se.message.includes("Illegal"))return{language:ge,value:Cn(Be),illegal:!0,relevance:0,_illegalBy:{message:Se.message,index:ui,context:Be.slice(ui-100,ui+100),mode:Se.mode,resultSoFar:is},_emitter:pn};if(Lt)return{language:ge,value:Cn(Be),illegal:!1,relevance:0,errorRaised:Se,_emitter:pn,_top:Ze};throw Se}}function me(ge){const Be={value:Cn(ge),illegal:!1,relevance:0,_top:Me,_emitter:new Te.__emitter(Te)};return Be._emitter.addText(ge),Be}function ve(ge,Be){Be=Be||Te.languages||Object.keys(ce);const Je=me(ge),St=Be.filter(Nt).filter(ft).map(zt=>W(zt,ge,!1));St.unshift(Je);const Xt=St.sort((zt,bt)=>{if(zt.relevance!==bt.relevance)return bt.relevance-zt.relevance;if(zt.language&&bt.language){if(Nt(zt.language).supersetOf===bt.language)return 1;if(Nt(bt.language).supersetOf===zt.language)return-1}return 0}),[Xe,It]=Xt,dn=Xe;return dn.secondBest=It,dn}function Oe(ge,Be,Je){const St=Be&&ze[Be]||Je;ge.classList.add("hljs"),ge.classList.add(`language-${St}`)}function _e(ge){let Be=null;const Je=L(ge);if(Ve(Je))return;if(Un("before:highlightElement",{el:ge,language:Je}),ge.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ge);return}if(ge.children.length>0&&(Te.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(ge)),Te.throwUnescapedHTML))throw new sr("One of your code blocks includes unescaped HTML.",ge.innerHTML);Be=ge;const St=Be.textContent,Xt=Je?H(St,{language:Je,ignoreIllegals:!0}):ve(St);ge.innerHTML=Xt.value,ge.dataset.highlighted="yes",Oe(ge,Je,Xt.language),ge.result={language:Xt.language,re:Xt.relevance,relevance:Xt.relevance},Xt.secondBest&&(ge.secondBest={language:Xt.secondBest.language,relevance:Xt.secondBest.relevance}),Un("after:highlightElement",{el:ge,result:Xt,text:St})}function Ce(ge){Te=ts(Te,ge)}const Ae=()=>{Ie(),ae("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function He(){Ie(),ae("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let qe=!1;function Ie(){function ge(){Ie()}if(document.readyState==="loading"){qe||window.addEventListener("DOMContentLoaded",ge,!1),qe=!0;return}document.querySelectorAll(Te.cssSelector).forEach(_e)}function _t(ge,Be){let Je=null;try{Je=Be(U)}catch(St){if(Wt("Language definition for '{}' could not be registered.".replace("{}",ge)),Lt)Wt(St);else throw St;Je=Me}Je.name||(Je.name=ge),ce[ge]=Je,Je.rawDefinition=Be.bind(null,U),Je.aliases&&Jt(Je.aliases,{languageName:ge})}function lt(ge){delete ce[ge];for(const Be of Object.keys(ze))ze[Be]===ge&&delete ze[Be]}function Bt(){return Object.keys(ce)}function Nt(ge){return ge=(ge||"").toLowerCase(),ce[ge]||ce[ze[ge]]}function Jt(ge,{languageName:Be}){typeof ge=="string"&&(ge=[ge]),ge.forEach(Je=>{ze[Je.toLowerCase()]=Be})}function ft(ge){const Be=Nt(ge);return Be&&!Be.disableAutodetect}function un(ge){ge["before:highlightBlock"]&&!ge["before:highlightElement"]&&(ge["before:highlightElement"]=Be=>{ge["before:highlightBlock"](Object.assign({block:Be.el},Be))}),ge["after:highlightBlock"]&&!ge["after:highlightElement"]&&(ge["after:highlightElement"]=Be=>{ge["after:highlightBlock"](Object.assign({block:Be.el},Be))})}function Ht(ge){un(ge),Qe.push(ge)}function Yr(ge){const Be=Qe.indexOf(ge);Be!==-1&&Qe.splice(Be,1)}function Un(ge,Be){const Je=ge;Qe.forEach(function(St){St[Je]&&St[Je](Be)})}function mn(ge){return ae("10.7.0","highlightBlock will be removed entirely in v12.0"),ae("10.7.0","Please use highlightElement now."),_e(ge)}Object.assign(U,{highlight:H,highlightAuto:ve,highlightAll:Ie,highlightElement:_e,highlightBlock:mn,configure:Ce,initHighlighting:Ae,initHighlightingOnLoad:He,registerLanguage:_t,unregisterLanguage:lt,listLanguages:Bt,getLanguage:Nt,registerAliases:Jt,autoDetection:ft,inherit:ts,addPlugin:Ht,removePlugin:Yr}),U.debugMode=function(){Lt=!1},U.safeMode=function(){Lt=!0},U.versionString=At,U.regex={concat:_,lookahead:y,either:S,optional:w,anyNumberOfTimes:v};for(const ge in Ue)typeof Ue[ge]=="object"&&e(Ue[ge]);return Object.assign(U,Ue),U},Tn=Vr({});return Tn.newInstance=()=>Vr({}),$h=Tn,Tn.HighlightJS=Tn,Tn.default=Tn,$h}var XI=QI();const ZI=Pu(XI),dv={},WI="hljs-";function JI(e){const t=ZI.newInstance();return e&&o(e),{highlight:r,highlightAuto:a,listLanguages:l,register:o,registerAlias:c,registered:f};function r(h,m,g){const x=g||dv,y=typeof x.prefix=="string"?x.prefix:WI;if(!t.getLanguage(h))throw new Error("Unknown language: `"+h+"` is not registered");t.configure({__emitter:e9,classPrefix:y});const v=t.highlight(m,{ignoreIllegals:!0,language:h});if(v.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:v.errorRaised});const w=v._emitter.root,_=w.data;return _.language=v.language,_.relevance=v.relevance,w}function a(h,m){const x=(m||dv).subset||l();let y=-1,v=0,w;for(;++y<x.length;){const _=x[y];if(!t.getLanguage(_))continue;const N=r(_,h,m);N.data&&N.data.relevance!==void 0&&N.data.relevance>v&&(v=N.data.relevance,w=N)}return w||{type:"root",children:[],data:{language:void 0,relevance:v}}}function l(){return t.listLanguages()}function o(h,m){if(typeof h=="string")t.registerLanguage(h,m);else{let g;for(g in h)Object.hasOwn(h,g)&&t.registerLanguage(g,h[g])}}function c(h,m){if(typeof h=="string")t.registerAliases(typeof m=="string"?m:[...m],{languageName:h});else{let g;for(g in h)if(Object.hasOwn(h,g)){const x=h[g];t.registerAliases(typeof x=="string"?x:[...x],{languageName:g})}}}function f(h){return!!t.getLanguage(h)}}class e9{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const r=this.stack[this.stack.length-1],a=r.children[r.children.length-1];a&&a.type==="text"?a.value+=t:r.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,r){const a=this.stack[this.stack.length-1],l=t.root.children;r?a.children.push({type:"element",tagName:"span",properties:{className:[r]},children:l}):a.children.push(...l)}openNode(t){const r=this,a=t.split(".").map(function(c,f){return f?c+"_".repeat(f):r.options.classPrefix+c}),l=this.stack[this.stack.length-1],o={type:"element",tagName:"span",properties:{className:a},children:[]};l.children.push(o),this.stack.push(o)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const t9={};function n9(e){const t=e||t9,r=t.aliases,a=t.detect||!1,l=t.languages||YI,o=t.plainText,c=t.prefix,f=t.subset;let h="hljs";const m=JI(l);if(r&&m.registerAlias(r),c){const g=c.indexOf("-");h=g===-1?c:c.slice(0,g)}return function(g,x){td(g,"element",function(y,v,w){if(y.tagName!=="code"||!w||w.type!=="element"||w.tagName!=="pre")return;const _=r9(y);if(_===!1||!_&&!a||_&&o&&o.includes(_))return;Array.isArray(y.properties.className)||(y.properties.className=[]),y.properties.className.includes(h)||y.properties.className.unshift(h);const N=kL(y,{whitespace:"pre"});let S;try{S=_?m.highlight(_,N,{prefix:c}):m.highlightAuto(N,{prefix:c,subset:f})}catch(O){const z=O;if(_&&/Unknown language/.test(z.message)){x.message("Cannot highlight as `"+_+"`, it’s not registered",{ancestors:[w,y],cause:z,place:y.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw z}!_&&S.data&&S.data.language&&y.properties.className.push("language-"+S.data.language),S.children.length>0&&(y.children=S.children)})}}function r9(e){const t=e.properties.className;let r=-1;if(!Array.isArray(t))return;let a;for(;++r<t.length;){const l=String(t[r]);if(l==="no-highlight"||l==="nohighlight")return!1;!a&&l.slice(0,5)==="lang-"&&(a=l.slice(5)),!a&&l.slice(0,9)==="language-"&&(a=l.slice(9))}return a}const i9={h1({node:e,className:t,...r}){return d.jsx("h1",{className:ne("mt-8 mb-4 text-2xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100 first:mt-0",t),...r})},h2({node:e,className:t,...r}){return d.jsx("h2",{className:ne("mt-8 mb-3 text-xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100",t),...r})},h3({node:e,className:t,...r}){return d.jsx("h3",{className:ne("mt-6 mb-2 text-lg font-semibold text-zinc-900 dark:text-zinc-100",t),...r})},h4({node:e,className:t,...r}){return d.jsx("h4",{className:ne("mt-4 mb-2 text-base font-semibold text-zinc-900 dark:text-zinc-100",t),...r})},p({node:e,className:t,...r}){return d.jsx("p",{className:ne("mb-4 leading-7 text-zinc-700 dark:text-zinc-300 last:mb-0",t),...r})},a({node:e,className:t,...r}){return d.jsx("a",{className:ne("font-medium text-blue-600 underline underline-offset-4 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300",t),target:"_blank",rel:"noopener noreferrer",...r})},ul({node:e,className:t,...r}){return d.jsx("ul",{className:ne("mb-4 ml-6 list-disc space-y-1 text-zinc-700 dark:text-zinc-300",t),...r})},ol({node:e,className:t,...r}){return d.jsx("ol",{className:ne("mb-4 ml-6 list-decimal space-y-1 text-zinc-700 dark:text-zinc-300",t),...r})},li({node:e,className:t,...r}){return d.jsx("li",{className:ne("leading-7",t),...r})},blockquote({node:e,className:t,...r}){return d.jsx("blockquote",{className:ne("mb-4 border-l-4 border-zinc-300 pl-4 italic text-zinc-600 dark:border-zinc-700 dark:text-zinc-400",t),...r})},hr({node:e,...t}){return d.jsx("hr",{className:"my-6 border-zinc-200 dark:border-zinc-800",...t})},strong({node:e,className:t,...r}){return d.jsx("strong",{className:ne("font-semibold text-zinc-900 dark:text-zinc-100",t),...r})},code({node:e,className:t,children:r,...a}){return t?.includes("hljs")?d.jsx("code",{className:ne("text-sm",t),...a,children:r}):d.jsx("code",{className:ne("rounded-md bg-zinc-100 px-1.5 py-0.5 text-sm font-mono text-zinc-800 dark:bg-zinc-800 dark:text-zinc-200",t),...a,children:r})},pre({node:e,className:t,...r}){return d.jsx("pre",{className:ne("mb-4 overflow-x-auto rounded-lg border border-zinc-200 bg-zinc-50 p-4 text-sm dark:border-zinc-800 dark:bg-zinc-900",t),...r})},table({node:e,className:t,...r}){return d.jsx("div",{className:"mb-4 overflow-x-auto rounded-lg border border-zinc-200 dark:border-zinc-800",children:d.jsx("table",{className:ne("w-full text-sm",t),...r})})},thead({node:e,className:t,...r}){return d.jsx("thead",{className:ne("bg-zinc-50 dark:bg-zinc-900",t),...r})},th({node:e,className:t,...r}){return d.jsx("th",{className:ne("border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",t),...r})},td({node:e,className:t,...r}){return d.jsx("td",{className:ne("border-b border-zinc-200 px-4 py-2 text-zinc-700 dark:border-zinc-800 dark:text-zinc-300",t),...r})},img({node:e,className:t,...r}){return d.jsx("img",{className:ne("mb-4 max-w-full rounded-lg",t),...r})}};function br({content:e,className:t}){return d.jsx("div",{className:ne("ocr-markdown",t),children:d.jsx(t3,{remarkPlugins:[mL],rehypePlugins:[n9],components:i9,children:e})})}function a9({text:e}){return d.jsx("div",{className:"py-1 text-sm leading-relaxed text-zinc-800 dark:text-zinc-200",children:d.jsx(br,{content:e})})}function s9(e){for(const t of e.split(`
|
|
563
|
-
`)){const r=t.trim();if(r)return r}return e.trim()}function l9({text:e}){const[t,r]=E.useState(!1),a=s9(e);return d.jsx("div",{className:"py-1",children:d.jsxs("button",{type:"button",onClick:()=>r(l=>!l),"aria-expanded":t,className:ne("group flex w-full items-start gap-1.5 text-left text-[13px] italic","text-zinc-500 hover:text-zinc-700 dark:text-zinc-500 dark:hover:text-zinc-300","transition-colors"),children:[d.jsx(ji,{"aria-hidden":!0,className:ne("mt-1 h-3 w-3 shrink-0 transition-transform",t&&"rotate-90")}),d.jsx("span",{className:"min-w-0 flex-1",children:t?d.jsx("span",{className:"block whitespace-pre-wrap leading-relaxed text-zinc-600 dark:text-zinc-400",children:e}):d.jsxs("span",{className:"line-clamp-1 not-italic text-[12px] tracking-wide text-zinc-400 dark:text-zinc-500",children:[d.jsx("span",{className:"italic",children:"Thinking · "}),d.jsx("span",{className:"italic",children:a})]})})]})})}const $w=80,o9=60;function Su(e,t=$w){return e.length<=t?e:e.slice(0,t-1)+"…"}function Pr(e,t){const r=e[t];return typeof r=="string"?r:null}function c9(e,t){switch(e){case"Read":case"Edit":case"Write":case"NotebookEdit":return Pr(t,"file_path")??Pr(t,"path")??null;case"Bash":{const r=Pr(t,"command");if(!r)return null;const a=r.replace(/^cd\s+\S+\s*&&\s*/,"");return Su(a)}case"Grep":{const r=Pr(t,"pattern"),a=Pr(t,"glob");return r?a?`${r} · ${a}`:r:null}case"Glob":return Pr(t,"pattern");case"WebFetch":return Pr(t,"url");case"WebSearch":{const r=Pr(t,"query");return r?Su(r):null}case"Task":{const r=Pr(t,"subagent_type"),a=Pr(t,"prompt")??Pr(t,"description"),l=a?Su(a,o9):null;return r&&l?`${r} · ${l}`:r??l??null}case"TodoWrite":{const r=t.todos;return Array.isArray(r)?`${r.length} todos`:null}default:return null}}function u9(e){try{const t=JSON.stringify(e);return Su(t,$w)}catch{return""}}function d9({name:e,input:t,inputPartial:r,output:a,status:l}){const[o,c]=E.useState(!1),f=c9(e,t)??u9(t);return d.jsxs("div",{className:"py-1",children:[d.jsxs("button",{type:"button",onClick:()=>c(h=>!h),"aria-expanded":o,className:ne("group flex w-full items-center gap-2 rounded-md px-1.5 py-1 text-left","transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50"),children:[d.jsx(ji,{"aria-hidden":!0,className:ne("h-3 w-3 shrink-0 text-zinc-400 transition-transform dark:text-zinc-500",o&&"rotate-90")}),d.jsx(ck,{"aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 text-zinc-500 dark:text-zinc-400"}),d.jsx("span",{className:"text-[13px] font-medium text-zinc-700 dark:text-zinc-200",children:e}),f&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-zinc-400 dark:text-zinc-600",children:"·"}),d.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px] text-zinc-600 dark:text-zinc-400",children:f})]}),!f&&d.jsx("span",{className:"flex-1"}),d.jsx(f9,{status:l})]}),o&&d.jsxs("div",{className:"ml-7 mt-1 space-y-2",children:[d.jsx(fv,{label:"Input",children:d.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-all rounded-md bg-zinc-100 px-3 py-2 font-mono text-[11px] leading-relaxed text-zinc-700 dark:bg-zinc-900 dark:text-zinc-300",children:h9(t,r)})}),a!==void 0&&d.jsx(fv,{label:l==="error"?"Error output":"Output",children:d.jsx("pre",{className:ne("overflow-x-auto whitespace-pre-wrap break-words rounded-md px-3 py-2 font-mono text-[11px] leading-relaxed",l==="error"?"bg-red-50 text-red-800 dark:bg-red-950/40 dark:text-red-200":"bg-zinc-100 text-zinc-700 dark:bg-zinc-900 dark:text-zinc-300"),children:a||"(empty)"})})]})]})}function f9({status:e}){return e==="running"?d.jsx(qr,{"aria-label":"Running",className:"h-3.5 w-3.5 shrink-0 animate-spin text-indigo-500 dark:text-indigo-400"}):e==="done"?d.jsx(jr,{"aria-label":"Done",className:"h-3.5 w-3.5 shrink-0 text-emerald-600 dark:text-emerald-400"}):e==="error"?d.jsx(Bn,{"aria-label":"Error",className:"h-3.5 w-3.5 shrink-0 text-red-500 dark:text-red-400"}):d.jsx(Yu,{"aria-label":"Pending",className:"h-3.5 w-3.5 shrink-0 text-zinc-400 dark:text-zinc-500"})}function fv({label:e,children:t}){return d.jsxs("div",{children:[d.jsx("div",{className:"mb-1 text-[10px] font-medium uppercase tracking-wider text-zinc-500 dark:text-zinc-500",children:e}),t]})}function h9(e,t){let r;try{r=JSON.stringify(e,null,2)}catch{r="{}"}return t?`${r}
|
|
564
|
-
|
|
565
|
-
// streaming…
|
|
566
|
-
${t}`:r}function m9({source:e,message:t,detail:r}){const[a,l]=E.useState(!1),o=r?`${t}
|
|
567
|
-
|
|
568
|
-
${r}`:t,c=()=>{navigator.clipboard.writeText(o).then(()=>{l(!0),setTimeout(()=>l(!1),1500)},()=>{})};return d.jsx("div",{className:ne("my-1 rounded-md border px-3 py-2","border-red-300 bg-red-50 dark:border-red-800/60 dark:bg-red-950/30"),children:d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx(Yu,{"aria-hidden":!0,className:"mt-0.5 h-4 w-4 shrink-0 text-red-600 dark:text-red-400"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-red-700 dark:text-red-400",children:e==="agent"?"Agent error":"Process error"}),d.jsxs("button",{type:"button",onClick:c,className:"ml-auto inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] text-red-700 transition-colors hover:bg-red-100 dark:text-red-400 dark:hover:bg-red-900/30",children:[d.jsx(Qu,{"aria-hidden":!0,className:"h-3 w-3"}),a?"Copied":"Copy"]})]}),d.jsx("p",{className:"mt-1 text-[13px] font-medium text-red-800 dark:text-red-200",children:t}),r&&d.jsx("pre",{className:"mt-2 overflow-x-auto whitespace-pre-wrap break-words font-mono text-[11px] leading-relaxed text-red-700/80 dark:text-red-300/80",children:r})]})]})})}function p9({level:e,message:t}){const r=e==="warning",a=r?Wa:sk;return d.jsx("div",{className:ne("my-1 rounded-md border px-3 py-2",r?"border-amber-300 bg-amber-50 dark:border-amber-800/60 dark:bg-amber-950/30":"border-sky-300 bg-sky-50 dark:border-sky-800/60 dark:bg-sky-950/30"),children:d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx(a,{"aria-hidden":!0,className:ne("mt-0.5 h-4 w-4 shrink-0",r?"text-amber-600 dark:text-amber-400":"text-sky-600 dark:text-sky-400")}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:ne("text-[10px] font-medium uppercase tracking-wider",r?"text-amber-700 dark:text-amber-400":"text-sky-700 dark:text-sky-400"),children:r?"Warning":"Notice"}),d.jsx("p",{className:ne("mt-1 whitespace-pre-wrap break-words text-[13px] font-medium",r?"text-amber-800 dark:text-amber-200":"text-sky-800 dark:text-sky-200"),children:t})]})]})})}const g9=24;function b9(e){const t=E.useRef(null),[r,a]=E.useState(!0),l=E.useRef(!0);l.current=r,E.useEffect(()=>{const c=t.current;if(!c)return;const f=()=>{const m=c.scrollHeight-c.scrollTop-c.clientHeight<=g9;m!==l.current&&a(m)};return c.addEventListener("scroll",f,{passive:!0}),()=>c.removeEventListener("scroll",f)},[]),E.useEffect(()=>{if(!l.current)return;const c=t.current;c&&requestAnimationFrame(()=>{l.current&&(c.scrollTop=c.scrollHeight)})},e);const o=E.useCallback(()=>{const c=t.current;c&&(c.scrollTop=c.scrollHeight,a(!0))},[]);return{scrollRef:t,isAtBottom:r,jumpToBottom:o}}function x9(e){const t=[],r=new Map;let a=null,l=null;for(const o of e)switch(o.type!=="text_delta"&&o.type!=="message"&&o.type!=="session_id"&&(a=null),o.type!=="thinking_delta"&&o.type!=="session_id"&&(l=null),o.type){case"text_delta":{if(a!==null){const c=t[a];c&&c.kind==="message"&&(c.text+=o.text)}else t.push({kind:"message",key:`msg-${o.seq}`,agentId:o.agentId,text:o.text}),a=t.length-1;break}case"message":{if(a!==null){const c=t[a];c&&c.kind==="message"&&(c.text=o.text)}else t.push({kind:"message",key:`msg-${o.seq}`,agentId:o.agentId,text:o.text});break}case"thinking_delta":{if(l!==null){const c=t[l];c&&c.kind==="thinking"&&(c.text+=o.text)}else t.push({kind:"thinking",key:`think-${o.seq}`,agentId:o.agentId,text:o.text}),l=t.length-1;break}case"tool_call":{const c={kind:"tool",key:`tool-${o.toolId}-${o.seq}`,agentId:o.agentId,toolId:o.toolId,name:o.name,input:o.input,inputPartial:"",status:"running"};t.push(c),r.set(o.toolId,t.length-1);break}case"tool_input_delta":{const c=r.get(o.toolId);if(c===void 0)break;const f=t[c];f&&f.kind==="tool"&&(f.inputPartial+=o.deltaJson);break}case"tool_result":{const c=r.get(o.toolId);if(c===void 0)break;const f=t[c];f&&f.kind==="tool"&&(f.status=o.isError?"error":"done",f.output=o.output,f.inputPartial="");break}case"error":{const c={kind:"error",key:`err-${o.seq}`,agentId:o.agentId,source:o.source,message:o.message};o.detail&&(c.detail=o.detail),t.push(c);break}case"notice":{t.push({kind:"notice",key:`notice-${o.seq}`,agentId:o.agentId,level:o.level,message:o.message});break}}return t}function Gw({events:e,isRunning:t,className:r}){const a=E.useMemo(()=>x9(e),[e]),{scrollRef:l,isAtBottom:o,jumpToBottom:c}=b9([a.length,a[a.length-1]?.kind==="message"?a[a.length-1].text.length:0]);return d.jsxs("div",{className:ne("relative flex flex-col overflow-hidden",r),children:[d.jsxs("div",{ref:l,className:ne("min-h-0 flex-1 overflow-y-auto",a.length===0?"flex items-center justify-center px-6 py-10":"px-4 py-3"),role:"log","aria-live":"polite","aria-relevant":"additions",children:[a.length===0?d.jsx(y9,{isRunning:t}):d.jsx(v9,{blocks:a}),t&&a.length>0&&d.jsx("span",{"aria-hidden":!0,className:"ml-1 inline-block h-3 w-[2px] animate-pulse bg-indigo-400 align-middle dark:bg-indigo-500"})]}),!o&&d.jsxs("button",{type:"button",onClick:c,className:ne("absolute bottom-3 left-1/2 -translate-x-1/2","inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[11px] font-medium","bg-zinc-900/90 text-white shadow-lg backdrop-blur transition-colors","hover:bg-zinc-900 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-white"),children:[d.jsx(W1,{"aria-hidden":!0,className:"h-3 w-3"}),"Jump to live"]})]})}function y9({isRunning:e}){return e?d.jsxs("div",{className:"flex max-w-sm flex-col items-center gap-3 text-center",children:[d.jsxs("span",{className:"relative flex h-10 w-10 items-center justify-center",children:[d.jsx("span",{"aria-hidden":!0,className:"absolute inset-0 animate-ping rounded-full bg-indigo-400/30 dark:bg-indigo-500/20"}),d.jsx("span",{className:"relative flex h-10 w-10 items-center justify-center rounded-full bg-indigo-500/10 dark:bg-indigo-500/15",children:d.jsx(Mo,{className:"h-4 w-4 text-indigo-500 dark:text-indigo-400","aria-hidden":!0})})]}),d.jsxs("div",{className:"space-y-1",children:[d.jsx("p",{className:"text-sm font-medium text-zinc-700 dark:text-zinc-200",children:"Spinning up the orchestrator"}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Tool calls and reviewer output will appear here as the workflow progresses. The first response usually arrives within a few seconds."})]})]}):d.jsxs("div",{className:"flex max-w-sm flex-col items-center gap-3 text-center",children:[d.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-zinc-100 dark:bg-zinc-800",children:d.jsx(Ri,{className:"h-4 w-4 text-zinc-400 dark:text-zinc-500","aria-hidden":!0})}),d.jsxs("div",{className:"space-y-1",children:[d.jsx("p",{className:"text-sm font-medium text-zinc-600 dark:text-zinc-300",children:"No structured events captured"}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-500",children:"This run completed without emitting timeline events. The legacy raw output may still contain its result."})]})]})}function v9({blocks:e}){return E.useMemo(()=>{const a=new Set;for(const l of e)a.add(l.agentId);return a},[e]).size>1?d.jsx(d.Fragment,{children:e.map((a,l)=>{const o=l>0?e[l-1]:null,c=!o||o.agentId!==a.agentId;return d.jsx(E.Fragment,{children:d.jsx($5,{agentId:a.agentId,showName:c,children:d.jsx(hv,{block:a})})},a.key)})}):d.jsx(d.Fragment,{children:e.map(a=>d.jsx(E.Fragment,{children:d.jsx(hv,{block:a})},a.key))})}function hv({block:e}){switch(e.kind){case"message":return d.jsx(a9,{text:e.text});case"thinking":return d.jsx(l9,{text:e.text});case"tool":{const t={name:e.name,toolId:e.toolId,input:e.input,status:e.status};return e.inputPartial&&(t.inputPartial=e.inputPartial),e.output!==void 0&&(t.output=e.output),d.jsx(d9,{...t})}case"error":{const t={source:e.source,message:e.message};return e.detail&&(t.detail=e.detail),d.jsx(m9,{...t})}case"notice":return d.jsx(p9,{level:e.level,message:e.message})}}function k9(e,t){return e==="complete"?"Complete":e==="incomplete"?"Incomplete":e==="cancelled"?"Cancelled":e==="failed"?`Exit: ${t}`:t===0?"Complete":t===-2?"Cancelled":`Exit: ${t}`}function w9(e,t){const r=e??(t===0?"complete":t===-2?"cancelled":"failed");return r==="complete"?"border-emerald-500/25 bg-emerald-500/15 text-emerald-700 dark:text-emerald-400":r==="incomplete"||r==="cancelled"?"border-amber-500/25 bg-amber-500/15 text-amber-700 dark:text-amber-400":"border-red-500/25 bg-red-500/15 text-red-700 dark:text-red-400"}function E9(e){if(!e)return{verb:"workflow",reviewerCount:null};const t=e.replace(/^ocr\s+/,""),r=t.split(/\s+/)[0]??"workflow",a=t.match(/--team\s+(\[[\s\S]*?\])(?=\s+--|\s*$)/);let l=null;if(a?.[1])try{const o=JSON.parse(a[1]);Array.isArray(o)&&(l=o.length)}catch{}return{verb:r,reviewerCount:l}}function _9({output:e,events:t,isRunning:r,exitCode:a,status:l,commandName:o,onCancel:c,bare:f}){const h=E.useRef(null),[m,g]=E.useState(!1);E.useEffect(()=>{h.current&&(h.current.scrollTop=h.current.scrollHeight)},[e]);const x=E.useMemo(()=>N9(e),[e]),y=e.length>0||t&&t.length>0||r,v=!!t&&t.length>0,w=E.useMemo(()=>E9(o),[o]);return y?d.jsxs("div",{className:ne(!f&&"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800"),children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 bg-zinc-50 px-4 py-2.5 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[r?d.jsxs(d.Fragment,{children:[d.jsxs("span",{className:"relative flex h-2 w-2 shrink-0",children:[d.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-indigo-400 opacity-75"}),d.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-indigo-500"})]}),d.jsxs("span",{className:"truncate text-xs font-medium text-zinc-600 dark:text-zinc-300",children:["Running ",d.jsx("span",{className:"capitalize",children:w.verb})]})]}):d.jsxs(d.Fragment,{children:[d.jsx(Mo,{className:"h-3.5 w-3.5 shrink-0 text-zinc-400"}),d.jsxs("span",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:[d.jsx("span",{className:"capitalize",children:w.verb})," output"]})]}),w.reviewerCount!=null&&w.reviewerCount>0&&d.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full border border-zinc-200 bg-white px-1.5 py-0.5 text-[10px] font-medium text-zinc-600 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-400",children:[d.jsx(Xm,{className:"h-2.5 w-2.5","aria-hidden":!0}),w.reviewerCount," reviewer",w.reviewerCount===1?"":"s"]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[r&&d.jsxs("button",{type:"button",onClick:c,className:ne("flex items-center gap-1 rounded-md border px-2 py-0.5 text-xs font-medium transition-colors","border-zinc-300 text-zinc-600 hover:bg-zinc-100","dark:border-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800"),children:[d.jsx(mR,{className:"h-2.5 w-2.5"}),"Cancel"]}),a!==null&&d.jsx("span",{className:ne("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium",w9(l,a)),title:l==="incomplete"?"Process exited 0 but the workflow never reached its terminal phase. Likely cause: the parent process was interrupted (e.g. macOS sleep dropped the streaming connection). Use 'Resume in terminal' to pick up where it left off.":void 0,children:k9(l,a)}),v&&d.jsxs("button",{type:"button",onClick:()=>g(_=>!_),className:ne("flex items-center gap-1 rounded-md border px-2 py-0.5 text-[11px] font-medium transition-colors","border-zinc-300 text-zinc-500 hover:bg-zinc-100","dark:border-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800"),title:m?"Show timeline":"Show raw output",children:[d.jsx(nA,{"aria-hidden":!0,className:"h-3 w-3"}),m?"Timeline":"Raw"]})]})]}),v&&!m?d.jsx("div",{className:"flex max-h-[600px] min-h-[120px] flex-col bg-white dark:bg-zinc-950",children:d.jsx(Gw,{events:t,isRunning:r,className:"min-h-0 flex-1"})}):d.jsxs("div",{ref:h,className:"max-h-[600px] min-h-[120px] overflow-y-auto bg-white px-5 py-4 dark:bg-zinc-950",children:[x.length===0&&r?d.jsxs("div",{className:"flex items-center gap-2 text-sm text-zinc-400",children:[d.jsx("span",{className:"h-1 w-1 animate-pulse rounded-full bg-zinc-400"}),"Waiting for output..."]}):x.map((_,N)=>{if(_.type==="tool")return d.jsxs("div",{className:"my-1 flex items-center gap-1.5 border-l-2 border-indigo-400/40 py-0.5 pl-2.5 font-mono text-xs text-zinc-400 dark:text-zinc-500",children:[d.jsx("span",{className:"shrink-0 text-indigo-400/70",children:"▸"}),d.jsx("span",{className:"truncate",children:_.text})]},N);if(_.type==="empty")return d.jsx("div",{className:"h-3"},N);const S=_.text.match(/^(#{1,6})\s+(.+)/);if(S){const O=S[1]?.length??1,z=S[2]??"",F=O<=2?"text-base font-semibold":O<=4?"text-sm font-semibold":"text-sm font-medium";return d.jsx("div",{className:ne(F,"mt-3 mb-1 text-zinc-800 dark:text-zinc-200"),children:z},N)}return/^[-*+]\s/.test(_.text)||/^\d+\.\s/.test(_.text)?d.jsx("div",{className:"ml-4 text-sm leading-relaxed text-zinc-700 dark:text-zinc-300",children:_.text},N):d.jsx("div",{className:"text-sm leading-relaxed text-zinc-700 dark:text-zinc-300",children:_.text},N)}),r&&x.length>0&&d.jsx("span",{className:"inline-block h-4 w-0.5 animate-pulse bg-indigo-500"})]})]}):null}function N9(e){if(!e)return[];const t=e.split(`
|
|
569
|
-
`),r=[];for(const a of t){const l=a.trim();if(l===""){r.length>0&&r[r.length-1]?.type!=="empty"&&r.push({type:"empty",text:""});continue}if(l.startsWith("▸")){r.push({type:"tool",text:l.replace(/^▸\s*/,"")});continue}if(/^(#{1,6}\s|[-*+]\s|\d+\.\s|```|>\s|---|\*\*\*|___)/.test(l))r.push({type:"text",text:l});else{const c=r[r.length-1];c&&c.type==="text"?c.text+=" "+l:r.push({type:"text",text:l})}}return r.length>0&&r[r.length-1]?.type==="empty"&&r.pop(),r}function S9(){return nn({queryKey:["command-history"],queryFn:()=>Dt("/api/commands/history")})}function z9(e,t){return nn({queryKey:["command-events",e],queryFn:async()=>e===null?[]:(await Dt(`/api/commands/${e}/events`)).events??[],enabled:t&&e!==null,staleTime:1/0})}const C9=6e4,T9=-2,A9=-3;function R9(e,t){const r=e.toLowerCase(),a=t.toLowerCase();let l=0;for(let o=0;o<a.length;o++){const c=r.indexOf(a[o],l);if(c<0)return!1;l=c+1}return!0}function _o(e){return e.exit_code===null?e.last_heartbeat_at&&Date.now()-ri(e.last_heartbeat_at).getTime()>C9?"stalled":"running":e.outcome==="success"?"success":e.outcome==="incomplete"?"incomplete":e.outcome==="cancelled"?"cancelled":e.outcome==="failed"?"fail":e.exit_code===0?"success":e.exit_code===T9||e.cancellation_reason==="cascade"?"cancelled":e.exit_code===A9?"orphaned":"fail"}function O9(e){switch(e){case"success":return"Success";case"fail":return"Fail";case"cancelled":return"Cancelled";case"incomplete":return"Incomplete";case"running":return"Running";case"stalled":return"Stalled";case"orphaned":return"Orphaned";default:return"All"}}function M9(e,t){return t==="cancelled"&&e.cancellation_reason==="cascade"?"Superseded":O9(t)}function j9(e,t){if(t==="cancelled"&&e.cancellation_reason==="cascade")return"Stopped because its parent workflow was closed"}function D9(e){switch(e){case"success":return"border-emerald-500/25 bg-emerald-500/15 text-emerald-700 dark:text-emerald-400";case"cancelled":return"border-amber-500/25 bg-amber-500/15 text-amber-700 dark:text-amber-400";case"incomplete":return"border-amber-500/25 bg-amber-500/15 text-amber-700 dark:text-amber-400";case"stalled":return"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-400";case"orphaned":return"border-zinc-300 bg-zinc-100/50 text-zinc-600 dark:border-zinc-700 dark:bg-zinc-800/30 dark:text-zinc-400";case"fail":return"border-red-500/25 bg-red-500/15 text-red-700 dark:text-red-400";case"running":return"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-400";default:return"border-zinc-500/25 bg-zinc-500/15 text-zinc-600 dark:text-zinc-400"}}function L9(e,t,r,a){let l=0;switch(r){case"date":l=new Date(e.started_at).getTime()-new Date(t.started_at).getTime();break;case"command":l=e.command.localeCompare(t.command);break;case"duration":l=(e.duration_ms??-1)-(t.duration_ms??-1);break;case"status":{const o={running:0,stalled:1,incomplete:2,orphaned:3,success:4,cancelled:5,fail:6,all:-1};l=(o[_o(e)]??0)-(o[_o(t)]??0);break}}return a==="asc"?l:-l}const I9=[{value:"all",label:"All"},{value:"running",label:"Running"},{value:"stalled",label:"Stalled"},{value:"orphaned",label:"Orphaned"},{value:"success",label:"Success"},{value:"incomplete",label:"Incomplete"},{value:"fail",label:"Fail"},{value:"cancelled",label:"Cancelled"}];function hu({label:e,field:t,activeField:r,dir:a,onToggle:l}){const o=t===r;return d.jsxs("button",{type:"button",onClick:()=>l(t),className:ne("inline-flex items-center gap-1 text-xs transition-colors",o?"font-medium text-zinc-900 dark:text-zinc-100":"text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300"),children:[e,o?a==="desc"?d.jsx(W1,{className:"h-3 w-3"}):d.jsx(ET,{className:"h-3 w-3"}):d.jsx(J1,{className:"h-3 w-3 opacity-40"})]})}const B9=new Set(["map","review"]);function U9(e){const t=e.replace(/^ocr\s+/,"").split(/\s+/)[0]??"";return B9.has(t)}function P9(e){const t=parseInt(e,10);return Number.isFinite(t)&&t>0?t:null}function mv({active:e,onClick:t,children:r}){return d.jsx("button",{type:"button",onClick:t,"aria-pressed":e,className:ne("rounded px-2 py-0.5 text-[11px] font-medium transition",e?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-200"),children:r})}function F9({entry:e,isRunning:t,onRerun:r,onHandoff:a}){const[l,o]=E.useState(!1),[c,f]=E.useState(!1),h=_o(e),g=e.exit_code!==null&&U9(e.command),x=!!e.workflow_id&&!!e.vendor_session_id,y=P9(e.id),v=!!e.vendor&&l,w=z9(y,v&&c);return d.jsxs("div",{className:"border-b border-zinc-200 last:border-b-0 dark:border-zinc-800",children:[d.jsxs("div",{className:"flex w-full items-center gap-3 px-4 py-3 min-w-0",children:[d.jsxs("button",{type:"button",onClick:()=>o(!l),className:"flex min-w-0 flex-1 items-center gap-3 text-left transition-colors hover:text-zinc-900 dark:hover:text-zinc-100",children:[l?d.jsx(Za,{className:"h-4 w-4 shrink-0 text-zinc-400"}):d.jsx(ji,{className:"h-4 w-4 shrink-0 text-zinc-400"}),d.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-sm",children:e.command})]}),d.jsx("span",{className:"shrink-0 text-xs text-zinc-500 dark:text-zinc-400",children:GR(e.started_at)}),d.jsx("span",{className:"shrink-0 text-xs tabular-nums text-zinc-500 dark:text-zinc-400",children:VR(e.duration_ms)}),d.jsx("span",{title:j9(e,h),className:ne("inline-flex shrink-0 items-center rounded-md border px-2 py-0.5 text-xs font-medium",D9(h)),children:M9(e,h)}),x&&d.jsx("button",{type:"button",onClick:()=>a(e),title:"Pick up in terminal","aria-label":"Pick up in terminal",className:ne("shrink-0 rounded-md p-1.5 text-zinc-400 transition-colors","hover:bg-zinc-100 hover:text-zinc-700","dark:hover:bg-zinc-800 dark:hover:text-zinc-200"),children:d.jsx(Oi,{className:"h-3.5 w-3.5"})}),g&&d.jsx("button",{type:"button",disabled:t,onClick:()=>r(e.command),title:"Re-run this command",className:ne("shrink-0 rounded-md p-1.5 text-zinc-400 transition-colors","hover:bg-indigo-50 hover:text-indigo-600","dark:hover:bg-indigo-500/10 dark:hover:text-indigo-400",t&&"cursor-not-allowed opacity-30"),children:d.jsx(Ym,{className:"h-3.5 w-3.5"})})]}),l&&d.jsxs("div",{children:[(e.vendor||e.resolved_model)&&d.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 border-b border-zinc-100 bg-zinc-50 px-4 py-2 text-[11px] dark:border-zinc-800 dark:bg-zinc-900/50",children:[e.vendor&&d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"text-zinc-500 dark:text-zinc-500",children:"Vendor"}),d.jsx("dd",{className:"font-mono text-zinc-700 dark:text-zinc-300",children:e.vendor})]}),e.resolved_model&&d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"text-zinc-500 dark:text-zinc-500",children:"Model"}),d.jsx("dd",{className:"font-mono text-zinc-700 dark:text-zinc-300",children:e.resolved_model})]}),e.workflow_id&&d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"text-zinc-500 dark:text-zinc-500",children:"Workflow"}),d.jsx("dd",{className:"font-mono text-zinc-700 dark:text-zinc-300",children:e.workflow_id})]})]}),x&&d.jsx("div",{className:"border-b border-zinc-100 bg-zinc-50/50 px-4 py-2 dark:border-zinc-800 dark:bg-zinc-900/30",children:d.jsxs("button",{type:"button",onClick:()=>a(e),title:"Copy a resume command to continue this AI session in your terminal",className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[d.jsx(Oi,{className:"h-3.5 w-3.5"}),"Resume in terminal"]})}),v&&d.jsxs("div",{className:"flex items-center gap-2 border-b border-zinc-100 bg-zinc-50/50 px-4 py-2 dark:border-zinc-800 dark:bg-zinc-900/30",children:[d.jsx("span",{className:"text-[11px] text-zinc-500 dark:text-zinc-500",children:"View:"}),d.jsx(mv,{active:!c,onClick:()=>f(!1),children:"Raw output"}),d.jsx(mv,{active:c,onClick:()=>f(!0),children:"Timeline"}),c&&w.isLoading&&d.jsx("span",{className:"ml-auto text-[11px] text-zinc-500 dark:text-zinc-500",children:"Loading…"}),c&&!w.isLoading&&w.data?.length===0&&d.jsx("span",{className:"ml-auto text-[11px] text-zinc-500 dark:text-zinc-500",children:"No timeline data captured for this run."})]}),v&&c?w.data&&w.data.length>0?d.jsx("div",{className:"flex max-h-[400px] flex-col bg-white dark:bg-zinc-950",children:d.jsx(Gw,{events:w.data,isRunning:!1,className:"min-h-0 flex-1"})}):d.jsx("pre",{className:"max-h-[300px] overflow-y-auto bg-zinc-950 px-4 py-3 font-mono text-sm leading-relaxed text-zinc-300",children:e.output||"No output recorded."}):d.jsx("pre",{className:"max-h-[300px] overflow-y-auto bg-zinc-950 px-4 py-3 font-mono text-sm leading-relaxed text-zinc-300",children:e.output||"No output recorded."})]})]})}function H9({isRunning:e,onRerun:t}){const{data:r,isLoading:a}=S9(),[l,o]=E.useState(""),[c,f]=E.useState("all"),[h,m]=E.useState("date"),[g,x]=E.useState("desc"),[y,v]=E.useState(null),w=O=>{O===h?x(z=>z==="desc"?"asc":"desc"):(m(O),x(O==="date"?"desc":"asc"))},_=E.useMemo(()=>{if(!r)return[];let O=r;if(c!=="all"&&(O=O.filter(z=>_o(z)===c)),l.trim()){const z=l.trim();O=O.filter(F=>{const $=F.command+(F.args?" "+F.args:"");return R9($,z)})}return[...O].sort((z,F)=>L9(z,F,h,g))},[r,c,l,h,g]),N=E.useMemo(()=>{if(!r)return{};const O={all:r.length,success:0,fail:0,cancelled:0,incomplete:0,running:0,stalled:0,orphaned:0};for(const z of r)O[_o(z)]++;return O},[r]);if(a)return d.jsxs("div",{className:"rounded-lg border border-zinc-200 dark:border-zinc-800",children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-zinc-200 px-4 py-3 dark:border-zinc-800",children:[d.jsx(ny,{className:"h-4 w-4 text-zinc-500 dark:text-zinc-400"}),d.jsx("span",{className:"text-sm font-medium",children:"Command History"})]}),d.jsx("div",{className:"p-4 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"Loading..."})]});const S=r&&r.length>0;return d.jsxs("div",{className:"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800",children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-zinc-200 bg-zinc-50 px-4 py-3 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx(ny,{className:"h-4 w-4 text-zinc-500 dark:text-zinc-400"}),d.jsx("span",{className:"text-sm font-medium",children:"Command History"}),S&&d.jsx("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:_.length===r.length?`${r.length}`:`${_.length} / ${r.length}`})]}),S&&d.jsxs("div",{className:"space-y-2 border-b border-zinc-200 bg-zinc-50/50 px-4 py-2.5 dark:border-zinc-800 dark:bg-zinc-900/50",children:[d.jsxs("div",{className:"relative",children:[d.jsx(Xu,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-zinc-400"}),d.jsx("input",{type:"text",value:l,onChange:O=>o(O.target.value),placeholder:"Search commands...",className:"w-full rounded-md border border-zinc-200 bg-white py-1.5 pl-8 pr-8 text-sm text-zinc-900 placeholder:text-zinc-400 focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-400 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-100 dark:placeholder:text-zinc-500"}),l&&d.jsx("button",{type:"button",onClick:()=>o(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-3.5 w-3.5"})})]}),d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[d.jsx("div",{className:"flex flex-wrap items-center gap-1",children:I9.map(O=>{const z=N[O.value]??0;return O.value!=="all"&&z===0?null:d.jsxs("button",{type:"button",onClick:()=>f(O.value),className:ne("inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-xs font-medium transition-colors",c===O.value?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"bg-zinc-100 text-zinc-600 hover:bg-zinc-200 dark:bg-zinc-800 dark:text-zinc-400 dark:hover:bg-zinc-700"),children:[O.label,d.jsx("span",{className:ne("tabular-nums",c===O.value?"text-zinc-300 dark:text-zinc-400":"text-zinc-400 dark:text-zinc-500"),children:z})]},O.value)})}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"text-[10px] uppercase tracking-wider text-zinc-400 dark:text-zinc-500",children:"Sort"}),d.jsx(hu,{label:"Date",field:"date",activeField:h,dir:g,onToggle:w}),d.jsx(hu,{label:"Command",field:"command",activeField:h,dir:g,onToggle:w}),d.jsx(hu,{label:"Duration",field:"duration",activeField:h,dir:g,onToggle:w}),d.jsx(hu,{label:"Status",field:"status",activeField:h,dir:g,onToggle:w})]})]})]}),S?_.length===0?d.jsx("div",{className:"p-6 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No commands match your filters."}):_.map(O=>d.jsx(F9,{entry:O,isRunning:e,onRerun:t,onHandoff:z=>{z.workflow_id&&v(z.workflow_id)}},O.id)):d.jsx("div",{className:"p-6 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No commands have been run yet."}),y&&d.jsx(Zm,{workflowId:y,onClose:()=>v(null)})]})}function q9({tabs:e,activeTabId:t,onSelectTab:r,onDismissTab:a}){return e.length===0?null:d.jsx("div",{className:"flex items-center gap-0.5 overflow-x-auto border-b border-zinc-200 bg-zinc-50 px-2 dark:border-zinc-800 dark:bg-zinc-900",children:e.map(l=>{const o=l.executionId===t,c=l.command.replace(/^ocr\s+/,"").split(/\s+/)[0]??"command";return d.jsxs("button",{type:"button",onClick:()=>r(l.executionId),className:ne("group relative flex items-center gap-1.5 whitespace-nowrap px-3 py-2 text-xs font-medium transition-colors",o?"border-b-2 border-indigo-500 text-zinc-900 dark:text-zinc-100":"text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200"),children:[l.status==="running"?d.jsxs("span",{className:"relative flex h-2 w-2",children:[d.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-indigo-400 opacity-75"}),d.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-indigo-500"})]}):l.status==="complete"?d.jsx(Ro,{className:"h-3 w-3 text-emerald-500"}):l.status==="cancelled"?d.jsx(NT,{className:"h-3 w-3 text-amber-500"}):d.jsx(Km,{className:"h-3 w-3 text-red-500"}),d.jsx("span",{className:"capitalize",children:c}),d.jsxs("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:["#",l.executionId]}),l.status!=="running"&&d.jsx("span",{role:"button",tabIndex:0,onClick:f=>{f.stopPropagation(),a(l.executionId)},onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.stopPropagation(),a(l.executionId))},className:"ml-1 rounded p-0.5 opacity-0 transition-opacity hover:bg-zinc-200 group-hover:opacity-100 dark:hover:bg-zinc-700",children:d.jsx(Bn,{className:"h-3 w-3"})})]},l.executionId)})})}const $9={claude:"Claude Code",opencode:"OpenCode"};function G9(){const{socket:e}=ai(),t=Rn(),{isAvailable:r,activeCli:a,isDisabledByConfig:l}=jo(),{tabs:o,activeTabId:c,runningCount:f,setActiveTabId:h,dismissTab:m,cancelCommand:g}=$m(),x=o.find(z=>z.executionId===c)??null,[y,v]=E.useState(null),w=E.useRef(null);ut("command:finished",()=>{t.invalidateQueries({queryKey:["command-history"]})});const _=E.useCallback(z=>{e&&e.emit("command:run",{command:z})},[e]),N=E.useCallback(()=>{x&&x.status==="running"&&g(x.executionId)},[x,g]),S=E.useCallback(z=>{const F=L5(z);F&&(v(F),w.current?.scrollIntoView({behavior:"smooth",block:"start"}))},[]),O=E.useCallback(()=>{v(null)},[]);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold",children:"Command Center"}),d.jsxs("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:["Launch AI-powered code review workflows.",a&&d.jsxs("span",{className:"ml-2 inline-flex items-center gap-1 rounded-full bg-zinc-100 px-2.5 py-0.5 text-[10px] font-medium text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",children:["Using ",$9[a]??a]})]})]}),r?d.jsx("div",{ref:w,children:d.jsx(U5,{isRunning:!1,runningCount:f,onRunCommand:_,prefill:y,onPrefillConsumed:O})}):d.jsx("div",{className:"rounded-lg border border-zinc-200 bg-zinc-50 p-6 dark:border-zinc-800 dark:bg-zinc-900/50",children:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(Oi,{className:"mt-0.5 h-5 w-5 shrink-0 text-zinc-400"}),d.jsxs("div",{children:[d.jsx("h3",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:l?"AI Commands Disabled":"AI CLI Required"}),d.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:l?d.jsxs(d.Fragment,{children:["AI commands are turned off in your project config. Set ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"ai_cli"})," to"," ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"auto"}),","," ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"claude"}),", or"," ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"opencode"})," ","in ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:".ocr/config.yaml"})," to enable them."]}):d.jsxs(d.Fragment,{children:["Install"," ",d.jsx("a",{href:"https://docs.anthropic.com/en/docs/claude-code/getting-started",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400",children:"Claude Code"})," ","or"," ",d.jsx("a",{href:"https://opencode.ai",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400",children:"OpenCode"})," ","to run AI-powered review commands from the dashboard."]})}),d.jsx("p",{className:"mt-2 text-xs text-zinc-400 dark:text-zinc-500",children:"You can still use OCR slash commands directly from your IDE, and browse existing sessions, reviews, and maps below."})]})]})}),o.length>0&&d.jsxs("div",{className:"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800",children:[d.jsx(q9,{tabs:o,activeTabId:c,onSelectTab:h,onDismissTab:m}),x&&d.jsx(_9,{bare:!0,output:x.output,events:x.events,isRunning:x.status==="running",exitCode:x.exitCode,status:x.status,commandName:x.command,onCancel:N})]}),d.jsx(H9,{isRunning:!1,onRerun:S})]})}const pv={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 K9({reviewer:e,onViewPrompt:t,inDefaultTeamCount:r}){const a=pv[e.tier]??pv.custom,l=r??(e.is_default?1:0);return d.jsxs("div",{className:"group flex flex-col rounded-lg border border-zinc-200 bg-white p-4 transition-colors hover:border-zinc-300 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700",children:[d.jsxs("div",{className:"mb-2 flex items-start gap-3",children:[d.jsx(Ws,{icon:e.icon,className:"mt-0.5 h-5 w-5 shrink-0 text-zinc-500 dark:text-zinc-400"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("h3",{className:"truncate text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:e.name}),l>0&&d.jsx("span",{className:"shrink-0 rounded-full bg-indigo-100 px-1.5 py-0.5 text-[10px] font-medium text-indigo-700 dark:bg-indigo-900/50 dark:text-indigo-300",title:"Reviewer is part of the workspace's default team",children:l>1?`In default team ×${l}`:"In default team"})]}),d.jsx("span",{className:ne("mt-0.5 inline-block rounded-full px-1.5 py-0.5 text-[10px] font-medium",a.className),children:a.label})]})]}),d.jsx("p",{className:"mb-2 line-clamp-2 text-xs leading-relaxed text-zinc-500 dark:text-zinc-400",children:e.description}),e.known_for&&d.jsxs("p",{className:"mb-2 text-[11px] italic text-zinc-400 dark:text-zinc-500",children:["Known for: ",e.known_for]}),e.focus_areas.length>0&&d.jsxs("div",{className:"mb-3 flex flex-wrap gap-1",children:[e.focus_areas.slice(0,4).map(o=>d.jsx("span",{className:"rounded-full bg-zinc-100 px-2 py-0.5 text-[10px] text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",children:o},o)),e.focus_areas.length>4&&d.jsxs("span",{className:"rounded-full bg-zinc-100 px-2 py-0.5 text-[10px] text-zinc-400 dark:bg-zinc-800 dark:text-zinc-500",children:["+",e.focus_areas.length-4]})]}),d.jsx("div",{className:"mt-auto pt-1",children:d.jsxs("button",{type:"button",onClick:()=>t(e.id),className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-zinc-500 transition-colors hover:bg-zinc-100 hover:text-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-200",children:[d.jsx(Oo,{className:"h-3 w-3"}),"View Prompt"]})})]})}const V9="(default model)",Y9="Use the host CLI's default";function Q9({className:e}){const{activeCli:t}=jo(),{data:r,isLoading:a}=gk(),{data:l,isLoading:o}=bk(t??void 0),{reviewers:c,isLoaded:f}=Wm(),h=A5(),[m,g]=E.useState(null),[x,y]=E.useState(new Set),v=m??r?.team??[],[w,_]=E.useState("idle"),N=E.useRef(null),S=E.useMemo(()=>n6(v),[v]),O=new Set(S.map(B=>B.persona)),z=c.filter(B=>!O.has(B.id)),F=E.useMemo(()=>new Set((r?.team??[]).map(B=>B.persona)),[r]),$=E.useMemo(()=>{const B=new Map;for(const C of r?.team??[]){const ue=B.get(C.persona)??[];ue.push(C),B.set(C.persona,ue)}for(const C of B.values())C.sort((ue,be)=>ue.instance_index-be.instance_index);return B},[r]),j=a||!f,G=E.useMemo(()=>r?!!(x.size>0||m&&!bv(m,r.team)):!1,[m,r,x]);E.useEffect(()=>{!m||!r||x.size>0||bv(m,r.team)&&g(null)},[m,r,x]);const R=E.useMemo(()=>{const B=[{id:"",label:V9,detail:Y9}];if(l?.models)for(const C of l.models)B.push({id:C.id,label:C.displayName??C.id,detail:C.displayName?C.id:void 0});return B},[l]),ie=!o&&(l?.models?.length??0)===0,[P,ee]=E.useState(null),[te,we]=E.useState(!1),se=B=>{const C=m??r?.team??[];g(B(C))},Q=B=>{y(C=>{const ue=new Set(C);return ue.add(B),ue})},M=B=>{y(C=>{const ue=new Set(C);return ue.delete(B),ue})},Y=B=>{g(C=>(C??r?.team??[]).filter(be=>be.persona!==B))},V=()=>{const C=(m??r?.team??[]).filter(ue=>!x.has(ue.persona));N.current&&clearTimeout(N.current),_("saving"),h.mutate(C,{onSuccess:()=>{g(C),y(new Set),_("saved"),N.current=setTimeout(()=>_("idle"),2e3)},onError:()=>_("error")})},fe=()=>{g(null),y(new Set),_("idle"),N.current&&clearTimeout(N.current)};E.useEffect(()=>{if(!G)return;const B=C=>{(C.metaKey||C.ctrlKey)&&C.key.toLowerCase()==="s"&&(C.preventDefault(),w!=="saving"&&V())};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[G,w]),E.useEffect(()=>{if(!G)return;const B=C=>{C.preventDefault(),C.returnValue=""};return window.addEventListener("beforeunload",B),()=>window.removeEventListener("beforeunload",B)},[G]);const A=P?S.find(B=>B.persona===P)??null:null,D=P?c.find(B=>B.id===P)??null:null;return d.jsxs("section",{className:ne("space-y-4 rounded-lg border border-zinc-200 bg-white p-5 dark:border-zinc-800 dark:bg-zinc-900",e),children:[d.jsxs("header",{className:"flex items-start justify-between gap-3",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Default team"}),d.jsx("p",{className:"mt-0.5 text-xs text-zinc-500 dark:text-zinc-400",children:"The reviewers and models used for new reviews in this workspace. Click a card to customize."})]}),d.jsx("div",{className:"shrink-0",children:G?d.jsx(W9,{saving:w==="saving",onSave:V,onDiscard:fe}):d.jsx(J9,{state:w})})]}),j?d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Loading team…"}):S.length===0&&z.length===0?d.jsxs("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:["No reviewers available. Run ",d.jsx("code",{className:"rounded bg-zinc-100 px-1.5 py-0.5 dark:bg-zinc-800",children:"/ocr:sync-reviewers"})," from your IDE to populate the library below."]}):d.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:[S.map(B=>{const C=c.find(xe=>xe.id===B.persona)??null,ue=x.has(B.persona),be=!F.has(B.persona),ye=$.get(B.persona),le=!be&&!ue&&ye!=null&&!a6(B.instances,ye);return d.jsx(X9,{group:B,meta:C,markedForRemoval:ue,isNewlyAdded:be,isModified:le,onEdit:()=>{ue||ee(B.persona)},onRemove:()=>{be?Y(B.persona):Q(B.persona)},onUndoRemoval:()=>M(B.persona)},B.persona)}),d.jsx(Z9,{disabled:z.length===0,picking:te,addable:z,onStart:()=>we(!0),onCancel:()=>we(!1),onSelect:B=>{we(!1),se(C=>[...C,{persona:B,instance_index:1,name:`${B}-1`,model:null}]),ee(B)}})]}),d.jsx(xk,{modelList:l,className:"mt-3"}),A&&d.jsx(e6,{group:A,meta:D,modelOptions:R,modelListEmpty:ie,onClose:()=>ee(null),onCountChange:B=>se(C=>r6(C,A.persona,B)),onUniformModelChange:B=>se(C=>i6(C,A.persona,B)),onInstanceModelChange:(B,C)=>se(ue=>ue.map(be=>be.persona===A.persona&&be.instance_index===B?{...be,model:C}:be))})]})}function X9({group:e,meta:t,markedForRemoval:r,isNewlyAdded:a,isModified:l,onEdit:o,onRemove:c,onUndoRemoval:f}){const h=e.instances.length,m=e.instances.map(w=>w.model),g=Array.from(new Set(m)),x=g.length===1&&g[0]===null,y=x?"(default model)":g.length===1?t6(g[0]):`Mixed · ${g.length} models`,v=t?.name??e.persona;return d.jsxs("div",{role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:r?void 0:o,onKeyDown:w=>{r||(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),o())},className:ne("group relative flex flex-col gap-2 rounded-lg border p-3 transition-colors",r?"cursor-default border-dashed border-amber-300 bg-amber-50/40 dark:border-amber-800/60 dark:bg-amber-950/20":a?"cursor-pointer border-dashed border-indigo-300/70 bg-indigo-50/30 hover:border-indigo-400 hover:bg-indigo-50/50 dark:border-indigo-700/70 dark:bg-indigo-950/20 dark:hover:border-indigo-600 dark:hover:bg-indigo-950/30":"cursor-pointer border-zinc-200 bg-white hover:border-zinc-300 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700 dark:hover:bg-zinc-800/50"),children:[d.jsxs("div",{className:"flex items-start gap-2",children:[t?.icon&&d.jsx(Ws,{icon:t.icon,className:ne("mt-0.5 h-4 w-4 shrink-0",r?"text-amber-600/70 dark:text-amber-500/70":"text-zinc-500 dark:text-zinc-400")}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("h3",{className:ne("truncate text-sm font-medium",r?"text-amber-700/80 line-through decoration-amber-500/70 dark:text-amber-300/80":"text-zinc-900 dark:text-zinc-100"),children:v}),l&&d.jsx("span",{className:"inline-block h-1.5 w-1.5 shrink-0 rounded-full bg-amber-500",role:"status","aria-label":"Modified — unsaved",title:"Modified — unsaved"}),h>1&&d.jsxs("span",{className:ne("shrink-0 rounded-full px-1.5 py-0.5 text-[10px] font-medium tabular-nums",r?"bg-amber-100 text-amber-700 dark:bg-amber-950/50 dark:text-amber-300":"bg-zinc-100 text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300"),children:["×",h]}),!r&&a&&d.jsx("span",{className:"shrink-0 rounded-full bg-indigo-100 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-indigo-700 dark:bg-indigo-950/50 dark:text-indigo-300",children:"New"})]}),r?d.jsx("p",{className:"mt-0.5 text-[11px] font-medium text-amber-700/80 dark:text-amber-400/80",children:"Will remove on save"}):t?.description&&d.jsx("p",{className:"mt-0.5 line-clamp-1 text-[11px] text-zinc-500 dark:text-zinc-500",children:t.description})]}),r?d.jsx("button",{type:"button",onClick:w=>{w.stopPropagation(),f()},"aria-label":`Undo removal of ${v}`,className:"shrink-0 rounded p-1 text-amber-700 transition-colors hover:bg-amber-100 dark:text-amber-400 dark:hover:bg-amber-950/40",children:d.jsx(Ym,{className:"h-3.5 w-3.5"})}):d.jsx("button",{type:"button",onClick:w=>{w.stopPropagation(),c()},"aria-label":`Remove ${v} from default team`,className:ne("shrink-0 rounded p-1 opacity-0 transition-opacity","text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600","group-hover:opacity-100 group-focus-within:opacity-100","dark:hover:bg-zinc-800 dark:hover:text-zinc-300"),children:d.jsx(Bn,{className:"h-3.5 w-3.5"})})]}),!r&&d.jsx("div",{className:"flex items-center gap-1.5 text-[11px]",children:d.jsx("span",{className:ne("truncate font-mono",x?"text-zinc-400 dark:text-zinc-600":"text-zinc-700 dark:text-zinc-300"),title:g.length===1&&g[0]?g[0]:g.length>1?g.filter(Boolean).join(" · "):void 0,children:y})})]})}function Z9({disabled:e,picking:t,addable:r,onStart:a,onCancel:l,onSelect:o}){if(t){const c=r.map(f=>({id:f.id,label:f.name,detail:f.tier.charAt(0).toUpperCase()+f.tier.slice(1)}));return d.jsxs("div",{className:"flex flex-col gap-2 rounded-lg border border-dashed border-indigo-300 bg-indigo-50/30 p-3 dark:border-indigo-700 dark:bg-indigo-950/20",children:[d.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wide text-indigo-700 dark:text-indigo-300",children:"Add reviewer"}),d.jsx(ko,{value:"",options:c,defaultOpen:!0,ariaLabel:"Choose a reviewer to add",freeTextPlaceholder:"Choose a reviewer…",onChange:f=>{f&&o(f)},onOpenChange:f=>{f||l()}})]})}return d.jsxs("button",{type:"button",onClick:a,disabled:e,className:ne("flex flex-col items-center justify-center gap-1.5 rounded-lg border border-dashed p-3 transition-colors","min-h-[88px]",e?"cursor-not-allowed border-zinc-200 text-zinc-300 dark:border-zinc-800 dark:text-zinc-700":"border-zinc-300 text-zinc-500 hover:border-zinc-400 hover:bg-zinc-50 hover:text-zinc-700 dark:border-zinc-700 dark:text-zinc-400 dark:hover:border-zinc-600 dark:hover:bg-zinc-800/50 dark:hover:text-zinc-200"),children:[d.jsx(CR,{className:"h-4 w-4"}),d.jsx("span",{className:"text-xs font-medium",children:"Add reviewer"})]})}function W9({saving:e,onSave:t,onDiscard:r}){return d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("span",{className:"hidden items-center gap-1.5 text-[11px] text-amber-700 dark:text-amber-400 sm:inline-flex",children:[d.jsx("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-amber-500","aria-hidden":!0}),"Unsaved changes"]}),d.jsx("button",{type:"button",onClick:r,disabled:e,className:"rounded-md px-2.5 py-1.5 text-xs font-medium text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 disabled:cursor-not-allowed disabled:opacity-50 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100",children:"Discard"}),d.jsx("button",{type:"button",onClick:t,disabled:e,className:"inline-flex items-center gap-1.5 rounded-md bg-indigo-600 px-3 py-1.5 text-xs font-semibold text-white transition-colors hover:bg-indigo-500 disabled:cursor-not-allowed disabled:opacity-60 dark:bg-indigo-500 dark:hover:bg-indigo-400",children:e?d.jsxs(d.Fragment,{children:[d.jsx(qr,{className:"h-3 w-3 animate-spin"}),"Saving…"]}):d.jsx(d.Fragment,{children:"Save changes"})})]})}function J9({state:e}){return e==="idle"?null:e==="saving"?d.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[11px] text-zinc-500 dark:text-zinc-400",children:[d.jsx(qr,{className:"h-3 w-3 animate-spin"}),"Saving…"]}):e==="saved"?d.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[11px] text-emerald-600 dark:text-emerald-400",children:[d.jsx(jr,{className:"h-3 w-3"}),"Saved"]}):d.jsx("span",{className:"text-[11px] text-red-600 dark:text-red-400",children:"Couldn't save"})}function e6({group:e,meta:t,modelOptions:r,modelListEmpty:a,onClose:l,onCountChange:o,onUniformModelChange:c,onInstanceModelChange:f}){const h=e.instances.length,m=e.instances.map(S=>S.model),x=new Set(m).size<=1,[y,v]=E.useState(x?"uniform":"per-instance");E.useEffect(()=>{!x&&y==="uniform"&&v("per-instance")},[x,y]);const w=E.useRef(null);E.useEffect(()=>{const S=O=>{O.key==="Escape"&&l()};return window.addEventListener("keydown",S),w.current?.focus(),()=>window.removeEventListener("keydown",S)},[l]);const _=e.instances[0]?.model??null,N=t?.name??e.persona;return d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4 backdrop-blur-sm",onClick:l,children:d.jsxs("div",{ref:w,role:"dialog","aria-modal":"true","aria-labelledby":"edit-team-reviewer-title",tabIndex:-1,onClick:S=>S.stopPropagation(),className:"flex max-h-[85vh] w-full max-w-md flex-col overflow-hidden rounded-xl border border-zinc-200 bg-white shadow-2xl outline-none dark:border-zinc-700 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex items-start gap-3 border-b border-zinc-200 px-5 py-3.5 dark:border-zinc-700",children:[t?.icon&&d.jsx(Ws,{icon:t.icon,className:"mt-0.5 h-5 w-5 shrink-0 text-zinc-500 dark:text-zinc-400"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("h2",{id:"edit-team-reviewer-title",className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:N}),t?.description&&d.jsx("p",{className:"mt-0.5 line-clamp-2 text-xs text-zinc-500 dark:text-zinc-400",children:t.description})]}),d.jsx("button",{type:"button",onClick:l,"aria-label":"Close",className:"shrink-0 rounded-md p-1 text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600 dark:text-zinc-500 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-4 w-4"})})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-5",children:[d.jsxs("div",{children:[d.jsx("label",{className:"block text-xs font-medium uppercase tracking-wider text-zinc-500 dark:text-zinc-500",children:"Reviewer count"}),d.jsx("p",{className:"mt-0.5 text-[11px] text-zinc-500 dark:text-zinc-500",children:"How many independent reviews this persona produces per round."}),d.jsxs("div",{className:"mt-2 inline-flex items-center gap-0.5 rounded-md border border-zinc-200 dark:border-zinc-700",children:[d.jsx("button",{type:"button",onClick:()=>o(Math.max(1,h-1)),disabled:h<=1,"aria-label":"Decrease count",className:"px-2 py-1 text-zinc-500 hover:bg-zinc-100 hover:text-zinc-700 disabled:opacity-30 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-200",children:d.jsx(xo,{className:"h-3.5 w-3.5"})}),d.jsx("span",{className:"min-w-[2rem] px-2 text-center text-sm font-medium tabular-nums text-zinc-700 dark:text-zinc-300",children:h}),d.jsx("button",{type:"button",onClick:()=>o(h+1),"aria-label":"Increase count",className:"px-2 py-1 text-zinc-500 hover:bg-zinc-100 hover:text-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-200",children:d.jsx(pa,{className:"h-3.5 w-3.5"})})]})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("label",{className:"block text-xs font-medium uppercase tracking-wider text-zinc-500 dark:text-zinc-500",children:"Model"}),h>1&&d.jsxs("div",{className:"inline-flex items-center gap-0.5 rounded-md border border-zinc-200 p-0.5 dark:border-zinc-700",children:[d.jsx(gv,{active:y==="uniform"&&x,onClick:()=>{v("uniform"),x||c(_)},label:"Same model"}),d.jsx(gv,{active:y==="per-instance"||!x,onClick:()=>v("per-instance"),label:"Per reviewer"})]})]}),d.jsx("div",{className:"mt-2 space-y-2",children:y==="uniform"&&x||h===1?d.jsx(ko,{value:_??"",options:r,freeText:a,allowCustom:!0,ariaLabel:"Model",onChange:S=>c(S||null)}):e.instances.map(S=>d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"w-28 shrink-0 truncate font-mono text-[11px] text-zinc-500 dark:text-zinc-500",children:S.name}),d.jsx(ko,{value:S.model??"",options:r,freeText:a,allowCustom:!0,ariaLabel:`Model for ${S.name}`,onChange:O=>f(S.instance_index,O||null)})]},`${S.persona}-${S.instance_index}`))}),a&&d.jsx("p",{className:"mt-2 text-[11px] text-zinc-500 dark:text-zinc-500",children:"Your AI CLI didn't return a model list. Type any model id it accepts."})]}),d.jsxs("p",{className:"rounded-md border border-zinc-200 bg-zinc-50 px-3 py-2 text-[11px] text-zinc-600 dark:border-zinc-800 dark:bg-zinc-900/50 dark:text-zinc-400",children:["Edits stay in draft until you click ",d.jsx("span",{className:"font-medium text-zinc-800 dark:text-zinc-200",children:"Save changes"})," at the top of the section. Close to keep editing."]})]}),d.jsx("div",{className:"flex justify-end gap-2 border-t border-zinc-200 px-5 py-3 dark:border-zinc-700",children:d.jsx("button",{type:"button",onClick:l,className:"rounded-md bg-zinc-900 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200",children:"Done"})})]})})}function gv({active:e,onClick:t,label:r}){return d.jsx("button",{type:"button",onClick:t,"aria-pressed":e,className:ne("rounded px-2 py-0.5 text-[11px] font-medium transition",e?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-200"),children:r})}function t6(e){return(e.includes("/")?e.split("/").slice(-1)[0]:e).replace(/-\d{8,}$/,"")}function n6(e){const t=new Map;for(const r of e){const a=t.get(r.persona)??[];a.push(r),t.set(r.persona,a)}for(const[r,a]of t)a.sort((l,o)=>l.instance_index-o.instance_index),t.set(r,a);return Array.from(t,([r,a])=>({persona:r,instances:a}))}function r6(e,t,r){const a=e.filter(c=>c.persona!==t);if(r<=0)return a;const l=e.filter(c=>c.persona===t),o=[];for(let c=1;c<=r;c++){const f=l[c-1];o.push({persona:t,instance_index:c,name:f?.name??`${t}-${c}`,model:f?.model??l[0]?.model??null})}return[...a,...o].sort((c,f)=>c.persona===f.persona?c.instance_index-f.instance_index:0)}function i6(e,t,r){return e.map(a=>a.persona===t?{...a,model:r}:a)}function a6(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const a=e[r],l=t[r];if(a.persona!==l.persona||a.instance_index!==l.instance_index||a.name!==l.name||a.model!==l.model)return!1}return!0}function bv(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const a=e[r],l=t[r];if(a.persona!==l.persona||a.instance_index!==l.instance_index||a.name!==l.name||a.model!==l.model)return!1}return!0}const s6={AGREE:{icon:wA,borderColor:"border-l-emerald-500",bgColor:"bg-emerald-500/5",label:"Agree"},CHALLENGE:{icon:xR,borderColor:"border-l-red-500",bgColor:"bg-red-500/5",label:"Challenge"},CONNECT:{icon:OA,borderColor:"border-l-blue-500",bgColor:"bg-blue-500/5",label:"Connect"},SURFACE:{icon:AA,borderColor:"border-l-amber-500",bgColor:"bg-amber-500/5",label:"Surface"}},xv={icon:lk,borderColor:"border-l-zinc-400",bgColor:"bg-zinc-500/5",label:"Discourse"};function l6(e){const t=s6[e];if(t)return t;const r=e.trim();return{...xv,label:r||xv.label}}function o6({type:e,content:t,reviewer:r,className:a}){const l=l6(e),o=l.icon;return d.jsxs("div",{className:ne("rounded-r-lg border-l-4 p-4",l.borderColor,l.bgColor,a),children:[d.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[d.jsx(o,{className:"h-4 w-4 text-zinc-600 dark:text-zinc-400"}),d.jsx("span",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:l.label}),r&&d.jsxs("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:["— ",r]})]}),d.jsx(br,{content:t})]})}function c6(e){const t=[],r=/^###?\s+(AGREE|CHALLENGE|CONNECT|SURFACE)(?:\s*[-—]\s*(.+))?$/gm;let a,l=0,o=null;for(;(a=r.exec(e))!==null;)o&&(o.content=e.slice(l,a.index).trim(),t.push(o)),o={type:a[1],reviewer:a[2]?.trim(),content:""},l=a.index+a[0].length;return o&&(o.content=e.slice(l).trim(),t.push(o)),t}function u6({content:e}){return d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"mb-4 flex items-center gap-2 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:[d.jsx(Ro,{className:"h-4 w-4 text-emerald-600 dark:text-emerald-400"}),"Validation"]}),d.jsx(br,{content:e})]})}const d6=["APPROVE","REQUEST CHANGES","NEEDS DISCUSSION"],f6=new Set(d6);function h6(e){return f6.has(e)}const m6={APPROVED:"APPROVE",LGTM:"APPROVE","APPROVE WITH SUGGESTIONS":"APPROVE",APPROVE_WITH_SUGGESTIONS:"APPROVE","ACCEPT WITH FOLLOW-UPS":"APPROVE","ACCEPT WITH FOLLOWUPS":"APPROVE",ACCEPT_WITH_FOLLOWUPS:"APPROVE",ACCEPT_WITH_FOLLOW_UPS:"APPROVE","CHANGES REQUESTED":"REQUEST CHANGES",REQUEST_CHANGES:"REQUEST CHANGES",BLOCK:"REQUEST CHANGES",REJECT:"REQUEST CHANGES","NEEDS WORK":"NEEDS DISCUSSION",NEEDS_DISCUSSION:"NEEDS DISCUSSION"};function Kw(e){const t=e.trim().toUpperCase();return h6(t)?t:m6[t]??null}const p6={APPROVE:{icon:Ro,bg:"bg-emerald-500/10",border:"border-emerald-500/30",text:"text-emerald-700 dark:text-emerald-400",label:"Approve"},"REQUEST CHANGES":{icon:Km,bg:"bg-red-500/10",border:"border-red-500/30",text:"text-red-700 dark:text-red-400",label:"Request Changes"},"NEEDS DISCUSSION":{icon:lk,bg:"bg-amber-500/10",border:"border-amber-500/30",text:"text-amber-700 dark:text-amber-400",label:"Needs Discussion"}},g6={icon:tk,bg:"bg-zinc-500/10",border:"border-zinc-500/30",text:"text-zinc-700 dark:text-zinc-300",label:"Verdict"};function b6(e){const t=Kw(e);if(t)return p6[t];const r=e.trim(),a=r.length>60?`${r.slice(0,60).trim()}…`:r;return{...g6,label:a||"Verdict"}}function x6(e,t){if(t==null)return!1;const r=Kw(e);return r==="APPROVE"?t>0:r==="REQUEST CHANGES"?t===0:!1}function y6({verdict:e,blockerCount:t,suggestionCount:r,shouldFixCount:a,className:l}){const o=b6(e),c=o.icon,f=x6(e,t);return d.jsxs("div",{className:ne("flex items-center justify-between gap-4 rounded-lg border p-4",o.bg,o.border,l),children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(c,{className:ne("h-6 w-6 shrink-0",o.text)}),d.jsx("span",{className:ne("text-lg font-semibold",o.text),children:o.label}),f&&d.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-amber-600 dark:text-amber-400",title:"This verdict disagrees with the blocker count. It predates the directional verdict gate; the stored value is shown as-is.",children:[d.jsx(Wa,{className:"h-3.5 w-3.5"}),"verdict/finding mismatch"]})]}),d.jsx(v6,{blockerCount:t,shouldFixCount:a,suggestionCount:r})]})}function v6({blockerCount:e,shouldFixCount:t,suggestionCount:r}){const a=e??0,l=t??0,o=r??0;return e!=null&&t!=null&&r!=null&&a===0&&l===0&&o===0?d.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-emerald-600 dark:text-emerald-400",children:[d.jsx(Ro,{className:"h-4 w-4"}),d.jsx("span",{className:"font-medium",children:"Clean"})]}):d.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[e!=null&&a>0&&d.jsx(Gh,{label:"Blockers",value:a,className:"text-red-600 dark:text-red-400"}),t!=null&&d.jsx(Gh,{label:"Follow-ups",value:l,className:l>0?"text-amber-600 dark:text-amber-400":void 0}),r!=null&&d.jsx(Gh,{label:"Suggestions",value:o})]})}function Gh({label:e,value:t,className:r}){return d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:ne("font-semibold tabular-nums",r??"text-zinc-700 dark:text-zinc-300"),children:t}),d.jsx("span",{className:"text-zinc-500 dark:text-zinc-400",children:e})]})}function k6({reviewer:e,onClose:t}){const{data:r,isLoading:a,error:l}=nn({queryKey:["reviewer-prompt",e?.id],queryFn:()=>Dt(`/api/reviewers/${e.id}/prompt`),enabled:e!=null});return E.useEffect(()=>{if(!e)return;const o=c=>{c.key==="Escape"&&t()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,t]),e?d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:t,children:d.jsxs("div",{role:"dialog","aria-modal":"true",className:"flex max-h-[85vh] w-full max-w-2xl flex-col overflow-hidden rounded-xl border border-zinc-200 bg-white shadow-2xl dark:border-zinc-700 dark:bg-zinc-900",onClick:o=>o.stopPropagation(),children:[d.jsxs("div",{className:"flex items-center gap-3 border-b border-zinc-200 px-5 py-3.5 dark:border-zinc-700",children:[d.jsx(Ws,{icon:e.icon,className:"h-5 w-5 shrink-0 text-zinc-500 dark:text-zinc-400"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:e.name}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:e.description})]}),d.jsx("button",{type:"button",onClick:t,className:"rounded-md p-1 text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600 dark:text-zinc-500 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-4 w-4"})})]}),(e.known_for||e.philosophy||e.focus_areas.length>0)&&d.jsxs("div",{className:"border-b border-zinc-200 px-5 py-3 dark:border-zinc-700",children:[e.known_for&&d.jsxs("p",{className:"mb-1.5 text-xs",children:[d.jsx("span",{className:"font-semibold text-zinc-600 dark:text-zinc-300",children:"Known for: "}),d.jsx("span",{className:"text-zinc-500 dark:text-zinc-400",children:e.known_for})]}),e.philosophy&&d.jsxs("p",{className:"mb-2 text-xs italic text-zinc-500 dark:text-zinc-400",children:["“",e.philosophy,"”"]}),e.focus_areas.length>0&&d.jsx("div",{className:"flex flex-wrap gap-1",children:e.focus_areas.map(o=>d.jsx("span",{className:"rounded-full bg-zinc-100 px-2 py-0.5 text-[10px] text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",children:o},o))})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-5",children:[a&&d.jsx("p",{className:"text-sm text-zinc-400 dark:text-zinc-500",children:"Loading prompt..."}),l&&d.jsx("div",{className:"rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-600 dark:border-red-800 dark:bg-red-950/30 dark:text-red-400",children:"Prompt file not found. The reviewer may have been removed from disk."}),r?.content&&d.jsx(br,{content:r.content})]})]})}):null}function w6({open:e,onClose:t}){const{socket:r}=ai(),[a,l]=E.useState(""),[o,c]=E.useState(""),[f,h]=E.useState(""),[m,g]=E.useState(null),[x,y]=E.useState(!1),v=E.useRef(null),w=E.useRef(null),_=T5(a),N=_.length>0&&o.trim().length>0&&m===null;E.useEffect(()=>{e&&(l(""),c(""),h(""),g(null),y(!1),setTimeout(()=>v.current?.focus(),50))},[e]),E.useEffect(()=>{if(!e)return;const O=z=>{z.key==="Escape"&&m===null&&t()};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[e,t,m]),ut("command:started",O=>{O.command.startsWith("create-reviewer")&&g(O.execution_id)}),ut("command:output",O=>{O.execution_id===m&&(h(z=>z+O.content),setTimeout(()=>{w.current&&(w.current.scrollTop=w.current.scrollHeight)},0))}),ut("command:finished",O=>{O.execution_id===m&&(g(null),y(!0))});const S=E.useCallback(()=>{if(!N||!r)return;h(""),y(!1);const O=`create-reviewer ${_} --focus "${o.replace(/"/g,'\\"')}"`;r.emit("command:run",{command:O})},[N,r,_,o]);return e?d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:d.jsxs("div",{role:"dialog","aria-modal":"true",className:"flex w-full max-w-lg flex-col overflow-hidden rounded-xl border border-zinc-200 bg-white shadow-2xl dark:border-zinc-700 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-5 py-3.5 dark:border-zinc-700",children:[d.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Create Reviewer"}),d.jsx("button",{type:"button",onClick:t,disabled:m!==null,className:"rounded-md p-1 text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600 disabled:opacity-30 dark:text-zinc-500 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-4 w-4"})})]}),d.jsxs("div",{className:"space-y-4 px-5 py-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-xs font-medium text-zinc-700 dark:text-zinc-300",children:"Reviewer Name"}),d.jsx("input",{ref:v,type:"text",value:a,onChange:O=>l(O.target.value),placeholder:"e.g. API Design, Rust Safety, GraphQL",disabled:m!==null,className:ne("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")}),_&&d.jsxs("p",{className:"mt-1 text-[11px] text-zinc-400 dark:text-zinc-500",children:["Slug: ",d.jsx("code",{className:"rounded bg-zinc-100 px-1 py-0.5 dark:bg-zinc-800",children:_})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-xs font-medium text-zinc-700 dark:text-zinc-300",children:"What should this reviewer focus on?"}),d.jsx("textarea",{value:o,onChange:O=>c(O.target.value),placeholder:"e.g. REST API design, backwards compatibility, versioning, error response consistency, pagination patterns",rows:3,disabled:m!==null,className:ne("w-full resize-none rounded-md border py-2 px-3 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","disabled:opacity-50")})]})]}),f&&d.jsx("div",{ref:w,className:"mx-5 mb-4 max-h-48 overflow-y-auto rounded-lg border border-zinc-200 bg-zinc-50 p-3 font-mono text-[11px] leading-relaxed text-zinc-600 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-400",children:d.jsx("pre",{className:"whitespace-pre-wrap",children:f})}),d.jsx("div",{className:"flex items-center justify-end gap-2 border-t border-zinc-200 px-5 py-3 dark:border-zinc-700",children:x?d.jsx("button",{type:"button",onClick:t,className:"rounded-md bg-indigo-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-indigo-700",children:"Done"}):d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:t,disabled:m!==null,className:"rounded-md border border-zinc-300 px-4 py-1.5 text-xs font-medium transition-colors hover:bg-zinc-100 disabled:opacity-30 dark:border-zinc-700 dark:hover:bg-zinc-800",children:"Cancel"}),d.jsx("button",{type:"button",onClick:S,disabled:!N,className:"flex items-center gap-1.5 rounded-md bg-indigo-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-indigo-700 disabled:opacity-50",children:m!==null?d.jsxs(d.Fragment,{children:[d.jsx(qr,{className:"h-3 w-3 animate-spin"}),"Creating..."]}):d.jsxs(d.Fragment,{children:[d.jsx(pa,{className:"h-3 w-3"}),"Create"]})})]})})]})}):null}function E6(){const{reviewers:e,isLoaded:t}=Wm(),{isAvailable:r}=jo(),{socket:a}=ai(),{data:l}=gk(),o=E.useMemo(()=>{const j={};for(const G of l?.team??[])j[G.persona]=(j[G.persona]??0)+1;return j},[l]),[c,f]=E.useState(""),[h,m]=E.useState(new Set),[g,x]=E.useState(null),[y,v]=E.useState(!1),[w,_]=E.useState(null),N=E.useMemo(()=>mk(e,c),[e,c]),S=E.useMemo(()=>pk(N),[N]),O=g?e.find(j=>j.id===g)??null:null;function z(j){m(G=>{const R=new Set(G);return R.has(j)?R.delete(j):R.add(j),R})}const F=w!==null;ut("command:started",j=>{j.command.startsWith("sync-reviewers")&&_(j.execution_id)}),ut("command:finished",j=>{j.execution_id===w&&_(null)});const $=E.useCallback(()=>{!a||F||a.emit("command:run",{command:"sync-reviewers"})},[a,F]);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h1",{className:"text-2xl font-semibold",children:"Review Team"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("button",{type:"button",onClick:$,disabled:!r||F,title:r?"Sync reviewer metadata":"AI CLI required",className:ne("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:[F?d.jsx(qr,{className:"h-3.5 w-3.5 animate-spin"}):d.jsx(vo,{className:"h-3.5 w-3.5"}),"Sync"]}),d.jsxs("button",{type:"button",onClick:()=>v(!0),disabled:!r,title:r?"Create a new reviewer":"AI CLI required to create reviewers",className:ne("flex items-center gap-1.5 rounded-md bg-indigo-600 px-3 py-1.5 text-xs font-medium text-white transition-colors","hover:bg-indigo-700","disabled:opacity-40 disabled:cursor-not-allowed"),children:[d.jsx(pa,{className:"h-3.5 w-3.5"}),"Create Reviewer"]})]})]}),d.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:"Manage your AI reviewer personas."})]}),d.jsx(Q9,{}),d.jsxs("div",{className:"relative",children:[d.jsx(Xu,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-zinc-400"}),d.jsx("input",{type:"text",value:c,onChange:j=>f(j.target.value),placeholder:"Search reviewers...",className:ne("w-full rounded-lg border py-2.5 pl-9 pr-4 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-800 dark:bg-zinc-900 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50")})]}),t?e.length===0?d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-zinc-50 p-8 text-center dark:border-zinc-800 dark:bg-zinc-900/50",children:[d.jsx(Xm,{className:"mx-auto mb-3 h-8 w-8 text-zinc-300 dark:text-zinc-600"}),d.jsx("h3",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"No reviewers found"}),d.jsxs("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:["Click ",d.jsx("strong",{children:"Sync"})," above or run"," ",d.jsx("code",{className:"rounded bg-zinc-200 px-1.5 py-0.5 text-xs dark:bg-zinc-800",children:"/ocr:sync-reviewers"})," ","from your IDE to populate your reviewer team."]})]}):S.length===0?d.jsx("p",{className:"py-8 text-center text-sm text-zinc-400 dark:text-zinc-500",children:"No reviewers match your search."}):d.jsx("div",{className:"space-y-6",children:S.map(([j,G])=>{const R=h.has(j),ie=Mu[j];return d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>z(j),className:"mb-3 flex w-full items-center gap-2 text-left text-xs font-semibold uppercase tracking-wider text-zinc-400 hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-300",children:[R?d.jsx(ji,{className:"h-3.5 w-3.5"}):d.jsx(Za,{className:"h-3.5 w-3.5"}),ie.label,d.jsxs("span",{className:"font-normal text-zinc-300 dark:text-zinc-600",children:["(",G.length,")"]})]}),!R&&d.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:G.map(P=>d.jsx(K9,{reviewer:P,onViewPrompt:x,inDefaultTeamCount:o[P.id]??0},P.id))})]},j)})}):d.jsx("p",{className:"text-sm text-zinc-400 dark:text-zinc-500",children:"Loading reviewers..."}),d.jsx(k6,{reviewer:O,onClose:()=>x(null)}),d.jsx(w6,{open:y,onClose:()=>v(!1)})]})}function Vw({value:e,max:t,className:r,showLabel:a=!1,size:l="md"}){const o=t>0?Math.round(e/t*100):0,c=Math.min(100,Math.max(0,o));return d.jsxs("div",{className:ne("flex items-center gap-2",r),children:[d.jsx("div",{className:ne("flex-1 overflow-hidden rounded-full bg-zinc-200 dark:bg-zinc-800",l==="sm"?"h-1.5":"h-2.5"),role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":t,"aria-label":`${e} of ${t} (${c}%)`,children:d.jsx("div",{className:ne("h-full rounded-full transition-all duration-300",c===100?"bg-emerald-500":c>50?"bg-blue-500":"bg-amber-500"),style:{width:`${c}%`}})}),a&&d.jsxs("span",{className:"text-xs tabular-nums text-zinc-500 dark:text-zinc-400",children:[e,"/",t]})]})}function _6({file:e,onToggle:t,highlighted:r}){const{data:a}=Xs();return d.jsxs("label",{"data-file-id":e.id,className:ne("group flex cursor-pointer items-center gap-3 px-4 py-2.5 pl-11 transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",r&&"bg-indigo-50 ring-1 ring-inset ring-indigo-200 dark:bg-indigo-950/30 dark:ring-indigo-800"),children:[d.jsx("input",{type:"checkbox",checked:e.is_reviewed,onChange:l=>t(l.target.checked),className:"h-4 w-4 rounded border-zinc-300 text-emerald-600 focus:ring-emerald-500 dark:border-zinc-600 dark:bg-zinc-800"}),d.jsx(Oo,{className:"h-4 w-4 shrink-0 text-zinc-400"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("span",{className:"flex items-center gap-1.5",children:[a?d.jsx("a",{href:Ru(a.ide,a.projectRoot,e.file_path),onClick:l=>l.stopPropagation(),className:ne("truncate text-sm font-mono hover:underline",e.is_reviewed?"text-zinc-400 line-through dark:text-zinc-500":"text-zinc-900 dark:text-zinc-100"),title:`Open in ${a.ide}`,children:e.file_path}):d.jsx("span",{className:ne("truncate text-sm font-mono",e.is_reviewed?"text-zinc-400 line-through dark:text-zinc-500":"text-zinc-900 dark:text-zinc-100"),children:e.file_path}),a&&d.jsx(Vm,{className:"h-3 w-3 shrink-0 text-zinc-400 opacity-0 transition-opacity group-hover:opacity-100"})]}),e.role&&d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:e.role})]}),d.jsxs("div",{className:"flex items-center gap-2 text-xs tabular-nums",children:[e.lines_added>0&&d.jsxs("span",{className:"flex items-center gap-0.5 text-emerald-600 dark:text-emerald-400",children:[d.jsx(pa,{className:"h-3 w-3"}),e.lines_added]}),e.lines_deleted>0&&d.jsxs("span",{className:"flex items-center gap-0.5 text-red-600 dark:text-red-400",children:[d.jsx(xo,{className:"h-3 w-3"}),e.lines_deleted]})]})]})}function N6({section:e,onToggleFile:t}){const[r,a]=E.useState(!1),[l,o]=E.useState(null),c=E.useRef(null),{data:f}=Xs();E.useEffect(()=>{!r||l==null||!c.current||requestAnimationFrame(()=>{c.current?.querySelector(`[data-file-id="${l}"]`)?.scrollIntoView({behavior:"smooth",block:"nearest"})})},[r,l]);const h=E.useCallback(m=>{if(m.stopPropagation(),!f||e.files.length===0)return;a(!0);const g=e.files.find(_=>!_.is_reviewed);o(g?.id??e.files[0]?.id??null);const x=e.files.filter(_=>!_.is_reviewed),v=(x.length>0?x:e.files).map(_=>Ru(f.ide,f.projectRoot,_.file_path));function w(_){if(_>=v.length)return;const N=document.createElement("iframe");N.style.display="none",N.src=v[_],document.body.appendChild(N),setTimeout(()=>{N.remove(),w(_+1)},500)}w(0)},[f,e.files]);return d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("button",{onClick:()=>a(!r),"aria-expanded":r,className:"flex w-full items-start gap-3 p-4 text-left transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",children:[d.jsx("div",{className:"mt-0.5 text-zinc-400",children:r?d.jsx(Za,{className:"h-4 w-4"}):d.jsx(ji,{className:"h-4 w-4"})}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(pA,{className:"h-4 w-4 text-zinc-400"}),d.jsxs("span",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:[e.section_number,". ",e.title]}),d.jsxs("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:[e.file_count," ",e.file_count===1?"file":"files"]}),f&&e.files.length>0&&d.jsxs("button",{onClick:h,title:`Open all ${e.file_count} files in ${f.ide}`,className:"inline-flex items-center gap-1 rounded-md border border-zinc-200 bg-white px-2 py-0.5 text-xs text-zinc-600 transition-colors hover:border-zinc-300 hover:bg-zinc-50 hover:text-zinc-900 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-400 dark:hover:border-zinc-600 dark:hover:bg-zinc-700 dark:hover:text-zinc-200",children:[d.jsx(hA,{className:"h-3 w-3"}),"Open all"]})]}),e.description&&d.jsx("p",{className:"mt-1 text-xs text-zinc-500 dark:text-zinc-400",children:e.description}),d.jsx("div",{className:"mt-2",children:d.jsx(Vw,{value:e.reviewed_count,max:e.file_count,showLabel:!0,size:"sm"})})]})]}),r&&d.jsx("div",{ref:c,className:ne("border-t border-zinc-200 dark:border-zinc-800",e.files.length>0&&"divide-y divide-zinc-100 dark:divide-zinc-800"),children:e.files.length===0?d.jsx("p",{className:"px-4 py-3 text-sm text-zinc-500 dark:text-zinc-400",children:"No files in this section."}):e.files.map(m=>d.jsx(_6,{file:m,highlighted:m.id===l,onToggle:g=>{if(t(m.id,g),g&&m.id===l){const x=e.files.find(y=>y.id!==m.id&&!y.is_reviewed);o(x?.id??null)}}},m.id))})]})}function S6({onConfirm:e,isPending:t}){const[r,a]=E.useState(!1),l=E.useRef(null),o=E.useCallback(()=>a(!1),[]);return E.useEffect(()=>{if(!r)return;const c=f=>{f.key==="Escape"&&o()};return document.addEventListener("keydown",c),l.current?.focus(),()=>document.removeEventListener("keydown",c)},[r,o]),d.jsxs(d.Fragment,{children:[d.jsxs("button",{onClick:()=>a(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 px-3 py-1.5 text-xs font-medium text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 dark:border-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100",children:[d.jsx(NR,{className:"h-3.5 w-3.5"}),"Clear Progress"]}),r&&d.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[d.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:o}),d.jsxs("div",{ref:l,role:"dialog","aria-modal":"true","aria-labelledby":"clear-progress-title",tabIndex:-1,className:"relative z-10 w-full max-w-sm rounded-lg border border-zinc-200 bg-white p-6 shadow-lg dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx("button",{onClick:o,className:"absolute right-4 top-4 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close dialog",children:d.jsx(Bn,{className:"h-4 w-4"})}),d.jsx("h3",{id:"clear-progress-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Clear all progress?"}),d.jsx("p",{className:"mt-2 text-sm text-zinc-600 dark:text-zinc-400",children:"This will uncheck all reviewed files for this map run. This action cannot be undone."}),d.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[d.jsx("button",{onClick:()=>a(!1),className:"rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Cancel"}),d.jsx("button",{onClick:()=>{e(),a(!1)},disabled:t,className:ne("rounded-md bg-red-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-red-700",t&&"cursor-not-allowed opacity-50"),children:t?"Clearing...":"Clear Progress"})]})]})]})]})}function z6(e,t){const r=Rn(),a=["sessions",e,"runs",t],l=nn({queryKey:a,queryFn:()=>Dt(`/api/sessions/${e}/runs/${t}`),enabled:!!e&&t>0});return ut("artifact:updated",()=>{r.invalidateQueries({queryKey:a})}),l}function C6(e){return nn({queryKey:["sessions",e,"artifacts","map"],queryFn:()=>Dt(`/api/sessions/${e}/artifacts/map`),enabled:!!e})}function T6(e,t){const r=Rn(),a=["sessions",e,"runs",t];return Ao({mutationFn:async({fileId:l,isReviewed:o})=>Dt(`/api/map-files/${l}/progress`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({is_reviewed:o})}),onMutate:async({fileId:l,isReviewed:o})=>{await r.cancelQueries({queryKey:a});const c=r.getQueryData(a);return c&&r.setQueryData(a,{...c,sections:c.sections.map(f=>({...f,reviewed_count:f.files.some(h=>h.id===l)?f.reviewed_count+(o?1:-1):f.reviewed_count,files:f.files.map(h=>h.id===l?{...h,is_reviewed:o,reviewed_at:o?new Date().toISOString():null}:h)}))}),{previous:c}},onError:(l,o,c)=>{c?.previous&&r.setQueryData(a,c.previous)},onSettled:()=>{r.invalidateQueries({queryKey:a})}})}function A6(e,t){const r=Rn();return Ao({mutationFn:async a=>Dt(`/api/map-runs/${a}/progress`,{method:"DELETE"}),onSuccess:()=>{r.invalidateQueries({queryKey:["sessions",e,"runs",t]})}})}function R6({sessionId:e}){const[t,r]=E.useState(!1),{data:a,isLoading:l}=C6(e),o=E.useRef(null),c=E.useCallback(()=>r(!1),[]);return E.useEffect(()=>{if(!t)return;const f=h=>{h.key==="Escape"&&c()};return document.addEventListener("keydown",f),o.current?.focus(),()=>document.removeEventListener("keydown",f)},[t,c]),d.jsxs(d.Fragment,{children:[d.jsxs("button",{onClick:()=>r(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 px-3 py-1.5 text-xs font-medium text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 dark:border-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100",children:[d.jsx(lA,{className:"h-3.5 w-3.5"}),"View Raw Map"]}),t&&d.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[d.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:c}),d.jsxs("div",{ref:o,role:"dialog","aria-modal":"true","aria-labelledby":"raw-map-title",tabIndex:-1,className:"relative z-10 flex max-h-[85vh] w-full max-w-4xl flex-col rounded-lg border border-zinc-200 bg-white shadow-lg dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-6 py-4 dark:border-zinc-800",children:[d.jsx("h3",{id:"raw-map-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Raw Map Output"}),d.jsx("button",{onClick:c,className:"text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close",children:d.jsx(Bn,{className:"h-5 w-5"})})]}),d.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:l?d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading map content..."}):a?.content?d.jsx(br,{content:a.content}):d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No map content available."})})]})]})]})}const O6="modulepreload",M6=function(e){return"/"+e},yv={},j6=function(t,r,a){let l=Promise.resolve();if(r&&r.length>0){let c=function(m){return Promise.all(m.map(g=>Promise.resolve(g).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),h=f?.nonce||f?.getAttribute("nonce");l=c(r.map(m=>{if(m=M6(m),m in yv)return;yv[m]=!0;const g=m.endsWith(".css"),x=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${x}`))return;const y=document.createElement("link");if(y.rel=g?"stylesheet":O6,g||(y.as="script"),y.crossOrigin="",y.href=m,h&&y.setAttribute("nonce",h),document.head.appendChild(y),g)return new Promise((v,w)=>{y.addEventListener("load",v),y.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${m}`)))})}))}function o(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return l.then(c=>{for(const f of c||[])f.status==="rejected"&&o(f.reason);return t().catch(o)})},D6=E.lazy(()=>j6(()=>import("./mermaid-renderer-YLFCVv-z.js").then(e=>e.bC),[]));function L6({sessionId:e,runNumber:t,sections:r,onSectionClick:a}){const{resolved:l}=l1(),{data:o,isLoading:c}=nn({queryKey:["sessions",e,"runs",t,"graph"],queryFn:async()=>{try{return await Dt(`/api/sessions/${e}/runs/${t}/graph`)}catch(m){if(m instanceof Error&&m.message.startsWith("404:"))return null;throw m}},enabled:!!e&&t>0,retry:!1}),f=E.useMemo(()=>o?.dependencies?I6(o.dependencies,r,l):null,[o?.dependencies,r,l]),h=E.useCallback(m=>{const g=r.find(x=>oo(x.title)===m);g&&a&&a(g.id)},[r,a]);return c||!f?null:d.jsxs("div",{className:"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800",children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-zinc-200 bg-zinc-50 px-4 py-3 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx(Qs,{className:"h-4 w-4 text-zinc-500 dark:text-zinc-400"}),d.jsx("span",{className:"text-sm font-medium",children:"Section Dependencies"})]}),d.jsx("div",{className:"p-4",children:d.jsx(E.Suspense,{fallback:d.jsx("div",{className:"h-64 animate-pulse rounded-lg bg-zinc-100 dark:bg-zinc-800"}),children:d.jsx(D6,{definition:f,onNodeClick:h})})})]})}function I6(e,t,r){if(t.length===0)return null;const a=r==="dark",l=["graph TD"];for(const o of t){const c=oo(o.title),f=o.reviewed_count,h=o.file_count,m=`${o.title}<br/>${f}/${h} files`;l.push(` ${c}["${m}"]`)}for(const o of e){const c=oo(o.fromTitle),f=oo(o.toTitle),h=o.relationship.replace(/"/g,"'");l.push(` ${c} -->|"${h}"| ${f}`)}a?(l.push(""),l.push(" classDef notStarted fill:#27272a,stroke:#71717a,color:#d4d4d8"),l.push(" classDef inProgress fill:#422006,stroke:#f59e0b,color:#fef3c7"),l.push(" classDef complete fill:#052e16,stroke:#22c55e,color:#dcfce7")):(l.push(""),l.push(" classDef notStarted fill:#f4f4f5,stroke:#a1a1aa,color:#3f3f46"),l.push(" classDef inProgress fill:#fef9c3,stroke:#f59e0b,color:#78350f"),l.push(" classDef complete fill:#dcfce7,stroke:#22c55e,color:#166534"));for(const o of t){const c=oo(o.title),f=o.file_count>0?o.reviewed_count/o.file_count:0;f>=1?l.push(` class ${c} complete`):f>0?l.push(` class ${c} inProgress`):l.push(` class ${c} notStarted`)}return l.join(`
|
|
570
|
-
`)}function oo(e){return e.replace(/[^a-zA-Z0-9]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,"")}function B6(e,t,r){const{socket:a}=ai(),l=`chat-${e}-${t}-${r}`,[o,c]=E.useState([]),[f,h]=E.useState(!1),[m,g]=E.useState(""),[x,y]=E.useState(null),[v,w]=E.useState([]),[_,N]=E.useState(null),S=E.useRef("");E.useEffect(()=>{a&&a.emit("chat:history",{conversationId:l})},[a,l]),ut("chat:history:result",E.useCallback(z=>{z.conversationId===l&&c(z.messages)},[l])),ut("chat:token",E.useCallback(z=>{z.conversationId===l&&(S.current+=z.token,g(S.current))},[l])),ut("chat:status",E.useCallback(z=>{if(z.conversationId!==l)return;const F={tool:z.tool,detail:z.detail,timestamp:Date.now()};y(F),w($=>[...$,F])},[l])),ut("chat:done",E.useCallback(z=>{if(z.conversationId!==l)return;const F={id:Date.now(),conversation_id:l,role:"assistant",content:S.current,created_at:new Date().toISOString()};c($=>[...$,F]),h(!1),g(""),y(null),w([]),S.current=""},[l])),ut("chat:error",E.useCallback(z=>{z.conversationId===l&&(N(z.error),h(!1),g(""),y(null),w([]),S.current="")},[l]));const O=E.useCallback(z=>{if(!a||!z.trim()||f)return;const F={id:Date.now(),conversation_id:l,role:"user",content:z.trim(),created_at:new Date().toISOString()};c($=>[...$,F]),h(!0),N(null),y(null),w([]),S.current="",a.emit("chat:send",{conversationId:l,sessionId:e,targetType:t,targetId:r,message:z.trim()})},[a,l,e,t,r,f]);return{messages:o,sendMessage:O,isStreaming:f,streamingContent:m,toolStatus:x,toolHistory:v,error:_}}const vv=3;function kv({currentStatus:e,history:t}){const[r,a]=E.useState(!1),l=e?t.filter(h=>h.timestamp!==e.timestamp):t,o=l.length>vv,c=r?l:l.slice(-vv),f=l.length-c.length;return!e&&l.length===0?null:d.jsxs("div",{className:"space-y-1",children:[l.length>0&&d.jsxs("div",{className:"space-y-0.5",children:[o&&f>0&&d.jsxs("button",{type:"button",onClick:()=>a(h=>!h),className:"flex items-center gap-1 text-[11px] text-zinc-400 transition-colors hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-400",children:[r?d.jsx(Za,{className:"h-3 w-3"}):d.jsx(ji,{className:"h-3 w-3"}),r?"Collapse":`${f} more step${f!==1?"s":""}`]}),c.map((h,m)=>d.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] text-zinc-400 dark:text-zinc-500",children:[d.jsx(jr,{className:"h-3 w-3 flex-shrink-0 text-emerald-500"}),d.jsx("span",{className:"truncate",children:h.detail})]},h.timestamp+m))]}),e&&d.jsxs("div",{className:ne("flex items-center gap-1.5 text-[11px] font-medium","text-indigo-600 dark:text-indigo-400"),children:[d.jsxs("span",{className:"relative flex h-2 w-2 flex-shrink-0",children:[d.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-indigo-400 opacity-75"}),d.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-indigo-500"})]}),d.jsx("span",{className:"truncate",children:e.detail})]})]})}function U6({message:e}){const t=e.role==="user",r=ri(e.created_at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return d.jsxs("div",{className:ne("flex flex-col",t?"items-end":"items-start"),children:[d.jsx("div",{className:ne("max-w-[85%] rounded-lg px-3 py-2 text-sm",t?"bg-indigo-600 text-white":"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-zinc-100"),children:t?d.jsx("p",{className:"whitespace-pre-wrap",children:e.content}):d.jsx(br,{content:e.content})}),d.jsx("span",{className:"mt-1 text-[10px] text-zinc-400 dark:text-zinc-500",children:r})]})}const wv=["Reading the code review artifacts...","Analyzing the changeset structure...","Examining file relationships...","Reviewing the findings...","Connecting the patterns...","Preparing a thoughtful response..."];function P6({content:e,toolStatus:t,toolHistory:r}){const[a,l]=E.useState(0),o=t!==null||r.length>0;return E.useEffect(()=>{if(e||o)return;const c=setInterval(()=>{l(f=>(f+1)%wv.length)},2500);return()=>clearInterval(c)},[e,o]),d.jsx("div",{className:"flex flex-col items-start",children:d.jsxs("div",{className:"max-w-[85%] rounded-lg bg-zinc-100 px-3 py-2 text-sm text-zinc-900 dark:bg-zinc-800 dark:text-zinc-100",children:[e?d.jsxs(d.Fragment,{children:[d.jsx(br,{content:e}),d.jsx("span",{className:"ml-0.5 inline-block h-4 w-0.5 animate-pulse bg-zinc-400 dark:bg-zinc-500"})]}):o?d.jsx(kv,{currentStatus:t,history:r}):d.jsx(F6,{phrase:wv[a]}),e&&o&&d.jsx("div",{className:"mt-2 border-t border-zinc-200 pt-2 dark:border-zinc-700",children:d.jsx(kv,{currentStatus:t,history:r})})]})})}function F6({phrase:e}){return d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("div",{className:"flex gap-1",children:[d.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-indigo-400 [animation-delay:0ms]"}),d.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-indigo-400 [animation-delay:150ms]"}),d.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-indigo-400 [animation-delay:300ms]"})]}),d.jsx("span",{className:"animate-pulse text-xs text-zinc-400 dark:text-zinc-500",children:e})]})}const H6={map_run:"Ask about this map...",review_round:"Ask about this review..."};function q6({onSend:e,isStreaming:t,disabled:r,targetType:a}){const[l,o]=E.useState(""),c=E.useRef(null),f=E.useCallback(()=>{const g=c.current;g&&(g.style.height="auto",g.style.height=`${Math.min(g.scrollHeight,80)}px`)},[]),h=E.useCallback(()=>{!l.trim()||t||r||(e(l),o(""),c.current&&(c.current.style.height="auto"))},[l,t,e]),m=E.useCallback(g=>{g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),h())},[h]);return d.jsxs("div",{className:"flex items-end gap-2 border-t border-zinc-200 bg-white p-3 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx("textarea",{ref:c,value:l,onChange:g=>{o(g.target.value),f()},onKeyDown:m,placeholder:H6[a],rows:1,className:ne("flex-1 resize-none rounded-md border border-zinc-300 bg-white px-3 py-2 text-sm","placeholder:text-zinc-400 focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500")}),d.jsx("button",{type:"button",onClick:h,disabled:t||!l.trim(),className:ne("flex-shrink-0 rounded-md p-2 transition-colors","bg-indigo-600 text-white hover:bg-indigo-700","disabled:cursor-not-allowed disabled:opacity-50"),children:d.jsx(nR,{className:"h-4 w-4"})})]})}function Yw({sessionId:e,targetType:t,targetId:r,onClose:a}){const{isAvailable:l,isDisabledByConfig:o}=jo(),{messages:c,sendMessage:f,isStreaming:h,streamingContent:m,toolStatus:g,toolHistory:x,error:y}=B6(e,t,r),v=E.useRef(null);return E.useEffect(()=>{function w(_){_.key==="Escape"&&a()}return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[a]),E.useEffect(()=>{const w=v.current;w&&(w.scrollTop=w.scrollHeight)},[c,m,g]),d.jsxs("div",{className:ne("fixed right-0 top-0 z-50 flex h-full w-[400px] flex-col","border-l border-zinc-200 bg-white shadow-xl","dark:border-zinc-800 dark:bg-zinc-950"),children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-4 py-3 dark:border-zinc-800",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Ou,{className:"h-4 w-4 text-indigo-500"}),d.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Ask the Team"})]}),d.jsx("button",{type:"button",onClick:a,className:"rounded-md p-1 text-zinc-400 transition-colors hover:bg-zinc-100 hover:text-zinc-600 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:d.jsx(Bn,{className:"h-4 w-4"})})]}),d.jsxs("div",{ref:v,className:"flex-1 space-y-4 overflow-y-auto p-4",children:[!l&&c.length===0&&d.jsxs("div",{className:"flex items-start gap-2.5 rounded-md border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-800 dark:bg-zinc-900/50",children:[d.jsx(Oi,{className:"mt-0.5 h-4 w-4 shrink-0 text-zinc-400"}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:o?d.jsxs(d.Fragment,{children:["AI commands are turned off in your project config. Set ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"ai_cli"})," to ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"auto"}),", ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"claude"}),", or ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"opencode"})," in ",d.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:".ocr/config.yaml"})," to enable Ask the Team."]}):"Install Claude Code or OpenCode to use Ask the Team."})]}),l&&c.length===0&&!h&&d.jsxs("p",{className:"text-center text-sm text-zinc-400 dark:text-zinc-500",children:["Ask a question about this ",t==="map_run"?"map":"review"," to get started."]}),c.map(w=>d.jsx(U6,{message:w},w.id)),h&&d.jsx(P6,{content:m,toolStatus:g,toolHistory:x}),y&&d.jsx("div",{className:"rounded-md bg-red-50 px-3 py-2 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400",children:y})]}),d.jsx(q6,{onSend:f,isStreaming:h,disabled:!l,targetType:t})]})}function $6(){const{id:e,run:t}=$u(),r=parseInt(t??"0",10),{data:a,isLoading:l}=z6(e??"",r),o=T6(e??"",r),c=A6(e??"",r),[f,h]=E.useState(!1),m=E.useCallback(y=>{document.getElementById(`section-${y}`)?.scrollIntoView({behavior:"smooth",block:"start"})},[]);if(l)return d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading map run..."});if(!a)return d.jsxs("div",{children:[d.jsxs(In,{to:`/sessions/${e}`,className:"mb-4 inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to session"]}),d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Map run not found."})]});const g=a.sections.reduce((y,v)=>y+v.file_count,0),x=a.sections.reduce((y,v)=>y+v.reviewed_count,0);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(In,{to:`/sessions/${e}`,className:"inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to session"]}),d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(ya,{className:"h-5 w-5 text-zinc-400"}),d.jsxs("h1",{className:"text-xl font-semibold text-zinc-900 dark:text-zinc-100",children:["Map Run ",a.run_number]})]}),d.jsxs("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:[x," / ",g," files reviewed"]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("button",{type:"button",onClick:()=>h(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[d.jsx(Ou,{className:"h-3.5 w-3.5"}),"Ask the Team"]}),d.jsx(R6,{sessionId:e??""}),d.jsx(S6,{onConfirm:()=>c.mutate(a.id),isPending:c.isPending})]})]}),d.jsx("div",{className:"mt-4",children:d.jsx(Vw,{value:x,max:g,showLabel:!0})})]}),d.jsx(L6,{sessionId:e??"",runNumber:r,sections:a.sections,onSectionClick:m}),a.sections.length===0?d.jsx("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No sections found in this map run."})}):d.jsx("div",{className:"space-y-3",children:a.sections.map(y=>d.jsx("div",{id:`section-${y.id}`,children:d.jsx(N6,{section:y,onToggleFile:(v,w)=>o.mutate({fileId:v,isReviewed:w})})},y.id))}),f&&d.jsx(Yw,{sessionId:e??"",targetType:"map_run",targetId:a.run_number,onClose:()=>h(!1)})]})}function G6(){const e=Rn();return ut("artifact:created",()=>{e.invalidateQueries({queryKey:["reviews"]})}),ut("artifact:updated",()=>{e.invalidateQueries({queryKey:["reviews"]})}),nn({queryKey:["reviews"],queryFn:()=>Dt("/api/reviews")})}function K6(e,t){const r=Rn(),a=["sessions",e,"rounds",t],l=nn({queryKey:a,queryFn:()=>Dt(`/api/sessions/${e}/rounds/${t}`),enabled:!!e&&t>0});return ut("artifact:created",()=>{r.invalidateQueries({queryKey:a})}),ut("artifact:updated",()=>{r.invalidateQueries({queryKey:a})}),l}function V6(e,t){return nn({queryKey:["sessions",e,"rounds",t,"findings"],queryFn:()=>Dt(`/api/sessions/${e}/rounds/${t}/findings`),enabled:!!e&&t>0})}function Y6(e,t,r){return nn({queryKey:["sessions",e,"rounds",t,"reviewers",r],queryFn:()=>Dt(`/api/sessions/${e}/rounds/${t}/reviewers/${r}`),enabled:!!e&&t>0&&r>0})}function mu(e,t){return nn({queryKey:["sessions",e,"artifacts",t],queryFn:()=>Dt(`/api/sessions/${e}/artifacts/${t}`),enabled:!!e&&!!t,retry:!1})}function Q6(){const e=Rn();return Ao({mutationFn:({findingId:t,status:r})=>Dt(`/api/findings/${t}/progress`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:r})}),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]})}})}function Qw(){const e=Rn();return Ao({mutationFn:({roundId:t,status:r})=>Dt(`/api/rounds/${t}/progress`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:r})}),onSuccess:()=>{e.invalidateQueries({queryKey:["reviews"]}),e.invalidateQueries({queryKey:["sessions"]})}})}const Xw={principal:Mo,quality:Va,security:cR,testing:kR},X6={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 Z6({sessionId:e,roundNumber:t,reviewer:r}){const a=Xw[r.reviewer_type]??Va,l=X6[r.reviewer_type]??"text-zinc-600 dark:text-zinc-400 bg-zinc-500/10 border-zinc-500/25";return d.jsx(In,{to:`/sessions/${e}/reviews/${t}/reviewers/${r.id}`,className:"group block rounded-lg border border-zinc-200 bg-white p-4 transition-colors hover:border-zinc-300 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700 dark:hover:bg-zinc-800/50",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:`flex h-10 w-10 items-center justify-center rounded-lg border ${l}`,children:d.jsx(a,{className:"h-5 w-5"})}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"text-sm font-medium capitalize text-zinc-900 dark:text-zinc-100",children:[r.reviewer_type,r.instance_number>1&&d.jsxs("span",{className:"ml-1 text-zinc-500 dark:text-zinc-400",children:["#",r.instance_number]})]}),d.jsxs("div",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:[r.finding_count," finding",r.finding_count!==1?"s":""]})]})]})})}const W6=[{value:"unread",label:"Unread"},{value:"read",label:"Read"},{value:"acknowledged",label:"Acknowledged"},{value:"fixed",label:"Fixed"},{value:"wont_fix",label:"Won't Fix"}];function J6({finding:e,onTriageChange:t}){const[r,a]=E.useState(!1),{data:l}=Xs(),o=E.useCallback(()=>a(h=>!h),[]),c=E.useCallback(h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),o())},[o]),f=e.line_start!=null?e.line_end!=null&&e.line_end!==e.line_start?`${e.line_start}-${e.line_end}`:String(e.line_start):"-";return d.jsxs(d.Fragment,{children:[d.jsxs("tr",{tabIndex:0,role:"row","aria-expanded":r,className:"cursor-pointer transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",onClick:o,onKeyDown:c,children:[d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx(ji,{className:ne("h-3.5 w-3.5 shrink-0 text-zinc-400 transition-transform",r&&"rotate-90")}),d.jsx(Zs,{variant:e.severity})]})}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:e.title}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 font-mono text-xs text-zinc-600 dark:border-zinc-800 dark:text-zinc-400",children:e.file_path&&l?d.jsxs("a",{href:Ru(l.ide,l.projectRoot,e.file_path,e.line_start),onClick:h=>h.stopPropagation(),className:"hover:text-zinc-900 hover:underline dark:hover:text-zinc-200",title:`Open in ${l.ide}`,children:[e.file_path,d.jsx(Vm,{className:"ml-1 inline h-3 w-3"})]}):e.file_path??"-"}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 tabular-nums text-zinc-600 dark:border-zinc-800 dark:text-zinc-400",children:e.file_path&&l&&e.line_start!=null?d.jsx("a",{href:Ru(l.ide,l.projectRoot,e.file_path,e.line_start),onClick:h=>h.stopPropagation(),className:"hover:text-zinc-900 hover:underline dark:hover:text-zinc-200",children:f}):f}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:e.is_blocker?d.jsx("span",{className:"text-xs font-medium text-red-600 dark:text-red-400",children:"Yes"}):d.jsx("span",{className:"text-xs text-zinc-400",children:"No"})}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",onClick:h=>h.stopPropagation(),children:d.jsx("select",{value:e.progress?.status??"unread",onChange:h=>t(e.id,h.target.value),"aria-label":`Triage status for ${e.title}`,className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:W6.map(h=>d.jsx("option",{value:h.value,children:h.label},h.value))})})]}),r&&e.summary&&d.jsx("tr",{children:d.jsx("td",{colSpan:6,className:"border-b border-zinc-200 bg-zinc-50 px-4 py-3 dark:border-zinc-800 dark:bg-zinc-900/50",children:d.jsx(br,{content:e.summary,className:"text-sm"})})})]})}function ha({label:e,field:t,activeField:r,direction:a,onSort:l}){return d.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left dark:border-zinc-800",children:d.jsxs("button",{onClick:()=>l(t),className:ne("flex items-center gap-1 text-sm font-medium transition-colors",r===t?"text-zinc-900 dark:text-zinc-100":"text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100"),children:[e,d.jsx(J1,{className:ne("h-3 w-3",r===t?"opacity-100":"opacity-40",r===t&&a==="desc"&&"rotate-180")})]})})}const Zw={critical:0,high:1,medium:2,low:3,info:4},e8=Number.MAX_SAFE_INTEGER;function Ev(e){return Zw[e]??e8}const t8=[{value:"all",label:"All"},{value:"critical",label:"Critical"},{value:"high",label:"High"},{value:"medium",label:"Medium"},{value:"low",label:"Low"},{value:"info",label:"Info"}],n8=[{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 Ww({findings:e,isLoading:t=!1}){const[r,a]=E.useState("severity"),[l,o]=E.useState("asc"),[c,f]=E.useState("all"),[h,m]=E.useState("all"),g=Q6();function x(N){r===N?o(S=>S==="asc"?"desc":"asc"):(a(N),o("asc"))}const y=E.useMemo(()=>{let N=e;return c!=="all"&&(N=N.filter(S=>S.severity===c)),h!=="all"&&(N=N.filter(S=>(S.progress?.status??"unread")===h)),N},[e,c,h]),v=E.useMemo(()=>{const N=l==="asc"?1:-1;return[...y].sort((S,O)=>r==="severity"?(Ev(S.severity)-Ev(O.severity))*N:r==="title"?S.title.localeCompare(O.title)*N:r==="file_path"?(S.file_path??"").localeCompare(O.file_path??"")*N:0)},[y,r,l]),w=E.useMemo(()=>e.filter(N=>!(N.severity in Zw)).length,[e]);function _(N,S){g.mutate({findingId:N,status:S})}return t?d.jsx("p",{className:"py-8 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"Loading findings…"}):e.length===0?d.jsx("p",{className:"py-8 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No findings were recorded for this round."}):d.jsxs("div",{children:[d.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-3",children:[d.jsx(ik,{className:"h-4 w-4 text-zinc-400"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Severity:"}),d.jsx("select",{value:c,onChange:N=>f(N.target.value),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:t8.map(N=>d.jsx("option",{value:N.value,children:N.label},N.value))})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Status:"}),d.jsx("select",{value:h,onChange:N=>m(N.target.value),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:n8.map(N=>d.jsx("option",{value:N.value,children:N.label},N.value))})]}),d.jsxs("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:[v.length," of ",e.length," findings"]})]}),w>0&&d.jsxs("p",{className:"mb-3 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-400",children:[w," finding",w===1?"":"s"," have an unrecognized severity and are sorted last."]}),v.length===0?d.jsx("p",{className:"py-8 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No findings match your filters."}):d.jsx("div",{className:"overflow-x-auto rounded-lg border border-zinc-200 dark:border-zinc-800",children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{className:"bg-zinc-50 dark:bg-zinc-900",children:d.jsxs("tr",{children:[d.jsx(ha,{label:"Severity",field:"severity",activeField:r,direction:l,onSort:x}),d.jsx(ha,{label:"Title",field:"title",activeField:r,direction:l,onSort:x}),d.jsx(ha,{label:"File",field:"file_path",activeField:r,direction:l,onSort:x}),d.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:"Lines"}),d.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:"Blocker"}),d.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:"Status"})]})}),d.jsx("tbody",{children:v.map(N=>d.jsx(J6,{finding:N,onTriageChange:_},N.id))})]})})]})}function r8(){const{socket:e}=ai(),[t,r]=E.useState("idle"),[a,l]=E.useState(null),[o,c]=E.useState(""),[f,h]=E.useState(""),[m,g]=E.useState(null),[x,y]=E.useState([]),[v,w]=E.useState(null),[_,N]=E.useState(null),S=E.useRef(""),[O,z]=E.useState(0),F=E.useRef(null);E.useEffect(()=>(t==="generating"?(z(0),F.current=setInterval(()=>z(ee=>ee+1),1e3)):F.current&&(clearInterval(F.current),F.current=null),()=>{F.current&&clearInterval(F.current)}),[t]),ut("post:gh-result",E.useCallback(ee=>{l(ee),ee.authenticated&&ee.prNumber?r("ready"):(N(ee.error??"GitHub check failed"),r("error"))},[])),ut("post:token",E.useCallback(ee=>{S.current+=ee.token,c(S.current)},[])),ut("post:clear-stream",E.useCallback(()=>{S.current="",c("")},[])),ut("post:status",E.useCallback(ee=>{const te={tool:ee.tool,detail:ee.detail,timestamp:Date.now()};g(te),y(we=>[...we,te])},[])),ut("post:done",E.useCallback(ee=>{h(ee.content),c(""),g(null),S.current="",r("preview")},[])),ut("post:cancelled",E.useCallback(()=>{c(""),g(null),S.current="",r("ready")},[])),ut("post:error",E.useCallback(ee=>{N(ee.error),c(""),g(null),S.current="",r("error")},[])),ut("post:save-result",E.useCallback(ee=>{ee.success||N(ee.error??"Failed to save draft")},[])),ut("post:submit-result",E.useCallback(ee=>{w(ee),ee.success?r("posted"):(N(ee.error??"Failed to post to GitHub"),r("error"))},[]));const $=E.useCallback(ee=>{e&&(r("checking"),N(null),l(null),e.emit("post:check-gh",{sessionId:ee}))},[e]),j=E.useCallback((ee,te)=>{e&&(r("generating"),N(null),c(""),h(""),g(null),y([]),S.current="",e.emit("post:generate",{sessionId:ee,roundNumber:te}))},[e]),G=E.useCallback((ee,te)=>{e&&e.emit("post:cancel",{sessionId:ee,roundNumber:te})},[e]),R=E.useCallback((ee,te,we)=>{e&&e.emit("post:save",{sessionId:ee,roundNumber:te,content:we})},[e]),ie=E.useCallback((ee,te)=>{e&&(r("posting"),N(null),e.emit("post:submit",{prNumber:ee,content:te}))},[e]),P=E.useCallback(()=>{r("idle"),l(null),c(""),h(""),g(null),y([]),w(null),N(null),S.current=""},[]);return{step:t,checkResult:a,streamingContent:o,generatedContent:f,toolStatus:m,activityLog:x,elapsedSeconds:O,postResult:v,error:_,checkGitHub:$,generate:j,cancelGeneration:G,saveDraft:R,submitToGitHub:ie,reset:P,setStep:r}}function i8(e){const t=Math.floor(e/60),r=e%60;return`${t}:${String(r).padStart(2,"0")}`}function a8(e,t,r){return r==="Write"?"Rewriting as your voice":t?"Writing review":e?"Analyzing source material":"Starting up"}function s8({tool:e}){switch(e){case"Read":return d.jsx(TT,{className:"h-3 w-3 shrink-0"});case"Glob":case"Grep":return d.jsx(Xu,{className:"h-3 w-3 shrink-0"});case"thinking":return d.jsx(ek,{className:"h-3 w-3 shrink-0"});default:return d.jsx(ck,{className:"h-3 w-3 shrink-0"})}}function l8({sessionId:e,roundNumber:t,finalContent:r,savedHumanReview:a}){const[l,o]=E.useState(!1),[c,f]=E.useState(!1),[h,m]=E.useState(""),g=E.useRef(null),x=E.useRef(null),{step:y,checkResult:v,streamingContent:w,generatedContent:_,toolStatus:N,activityLog:S,elapsedSeconds:O,postResult:z,error:F,checkGitHub:$,generate:j,cancelGeneration:G,saveDraft:R,submitToGitHub:ie,reset:P,setStep:ee}=r8(),[te,we]=E.useState(!0),se=E.useRef(!1),[Q,M]=E.useState(!1),Y=E.useCallback(()=>{o(!1),f(!1),m(""),P()},[P]),V=E.useCallback(()=>{o(!0),$(e)},[e,$]);E.useEffect(()=>{if(!l)return;const D=B=>{B.key==="Escape"&&y!=="generating"&&Y()};return document.addEventListener("keydown",D),g.current?.focus(),()=>document.removeEventListener("keydown",D)},[l,Y,y]),E.useEffect(()=>{y==="generating"&&w&&!se.current&&(se.current=!0,we(!1))},[y,w]),E.useEffect(()=>{y==="generating"&&(se.current=!1,we(!0))},[y]),E.useEffect(()=>{y==="generating"&&x.current?.scrollIntoView({behavior:"smooth"})},[w,y]);const fe=()=>c&&h?h:_||a||r,A=v?.prNumber??0;return d.jsxs(d.Fragment,{children:[d.jsxs("button",{type:"button",onClick:V,className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[d.jsx(iy,{className:"h-3.5 w-3.5"}),"Post to GitHub"]}),l&&d.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[d.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:y!=="generating"?Y:void 0}),d.jsxs("div",{ref:g,role:"dialog","aria-modal":"true","aria-labelledby":"post-review-title",tabIndex:-1,className:"relative z-10 flex w-full max-w-4xl flex-col rounded-lg border border-zinc-200 bg-white shadow-xl dark:border-zinc-800 dark:bg-zinc-900",style:{maxHeight:"85vh"},children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-6 py-4 dark:border-zinc-800",children:[d.jsx("h3",{id:"post-review-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:y==="posted"?"Review Posted":"Post Review to GitHub"}),d.jsx("button",{onClick:Y,className:"text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close dialog",children:d.jsx(Bn,{className:"h-5 w-5"})})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:[y==="checking"&&d.jsxs("div",{className:"flex items-center justify-center gap-3 py-12",children:[d.jsx(qr,{className:"h-5 w-5 animate-spin text-zinc-500"}),d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Checking GitHub CLI..."})]}),y==="ready"&&v&&d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"rounded-md border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-700 dark:bg-zinc-800",children:d.jsxs("p",{className:"text-sm text-zinc-700 dark:text-zinc-300",children:[d.jsx(ak,{className:"mr-1.5 inline h-4 w-4"}),"PR #",v.prNumber," on branch"," ",d.jsx("code",{className:"rounded bg-zinc-200 px-1.5 py-0.5 text-xs dark:bg-zinc-700",children:v.branch})]})}),d.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[d.jsxs("button",{onClick:()=>ie(A,r),className:"group rounded-lg border border-zinc-200 p-4 text-left transition-colors hover:border-blue-300 hover:bg-blue-50/50 dark:border-zinc-700 dark:hover:border-blue-700 dark:hover:bg-blue-950/20",children:[d.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[d.jsx(Oo,{className:"h-5 w-5 text-zinc-500 group-hover:text-blue-600 dark:group-hover:text-blue-400"}),d.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:"Post Team Review"})]}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Post the original multi-reviewer synthesis as-is."})]}),d.jsxs("button",{onClick:()=>j(e,t),className:"group rounded-lg border border-zinc-200 p-4 text-left transition-colors hover:border-emerald-300 hover:bg-emerald-50/50 dark:border-zinc-700 dark:hover:border-emerald-700 dark:hover:bg-emerald-950/20",children:[d.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[d.jsx(Va,{className:"h-5 w-5 text-zinc-500 group-hover:text-emerald-600 dark:group-hover:text-emerald-400"}),d.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:"Generate Human Review"})]}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Rewrite as a single human voice — sounds like you wrote it."})]})]}),a&&d.jsxs("button",{onClick:()=>{m(a),ee("preview")},className:"w-full rounded-lg border border-dashed border-zinc-300 p-3 text-left text-sm text-zinc-600 transition-colors hover:border-zinc-400 hover:text-zinc-800 dark:border-zinc-600 dark:text-zinc-400 dark:hover:border-zinc-500 dark:hover:text-zinc-300",children:[d.jsx(ry,{className:"mr-1.5 inline h-3.5 w-3.5"}),"Use previously saved human review"]})]}),y==="generating"&&d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsxs("div",{className:"relative flex h-8 w-8 items-center justify-center",children:[d.jsx("div",{className:"absolute inset-0 animate-ping rounded-full bg-emerald-400/20"}),d.jsx(Va,{className:"h-4 w-4 text-emerald-500 dark:text-emerald-400"})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-zinc-800 dark:text-zinc-200",children:a8(S.length>0,!!w,N?.tool)}),d.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"All findings preserved — just the tone changes"})]})]}),d.jsx("span",{className:"tabular-nums text-xs font-medium text-zinc-400 dark:text-zinc-500",children:i8(O)})]}),d.jsxs("div",{className:"rounded-md border border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800",children:[d.jsxs("button",{type:"button",onClick:()=>we(D=>!D),className:"flex w-full items-center gap-2 px-3 py-2 text-xs text-zinc-600 dark:text-zinc-400",children:[d.jsx(qr,{className:"h-3 w-3 animate-spin shrink-0 text-emerald-500"}),d.jsx("span",{className:"flex-1 truncate text-left font-medium",children:N?.detail??"Reading review files..."}),S.length>0&&d.jsxs("span",{className:"flex items-center gap-1 text-zinc-400 dark:text-zinc-500",children:[d.jsx("span",{className:"tabular-nums",children:S.length}),te?d.jsx(Za,{className:"h-3 w-3"}):d.jsx(ji,{className:"h-3 w-3"})]})]}),te&&S.length>0&&d.jsx("div",{className:"border-t border-zinc-200 px-3 py-2 dark:border-zinc-700",children:d.jsx("div",{className:"max-h-32 space-y-1 overflow-y-auto",children:S.map((D,B)=>d.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-zinc-500 dark:text-zinc-500",children:[d.jsx(s8,{tool:D.tool}),d.jsx("span",{className:"truncate",children:D.detail})]},B))})})]}),w&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[d.jsx(yo,{className:"h-3 w-3"}),d.jsx("span",{className:"font-medium",children:"Generated Review"})]}),d.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:d.jsx(br,{content:w})})]}),d.jsx("div",{ref:x})]}),y==="preview"&&d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center gap-1 border-b border-zinc-200 dark:border-zinc-700",children:[d.jsxs("button",{onClick:()=>f(!1),className:ne("inline-flex items-center gap-1.5 border-b-2 px-3 py-2 text-xs font-medium transition-colors",c?"border-transparent text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300":"border-blue-500 text-blue-600 dark:text-blue-400"),children:[d.jsx(aA,{className:"h-3.5 w-3.5"}),"Preview"]}),d.jsxs("button",{onClick:()=>{f(!0),h||m(_||a||r)},className:ne("inline-flex items-center gap-1.5 border-b-2 px-3 py-2 text-xs font-medium transition-colors",c?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300"),children:[d.jsx(yo,{className:"h-3.5 w-3.5"}),"Edit"]})]}),c?d.jsx("textarea",{value:h||_||a||r,onChange:D=>m(D.target.value),className:"h-96 w-full rounded-md border border-zinc-200 bg-zinc-50 p-3 font-mono text-sm text-zinc-900 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-100"}):d.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:d.jsx(br,{content:fe()})})]}),y==="posting"&&d.jsxs("div",{className:"flex items-center justify-center gap-3 py-12",children:[d.jsx(qr,{className:"h-5 w-5 animate-spin text-zinc-500"}),d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Posting to GitHub..."})]}),y==="posted"&&d.jsxs("div",{className:"flex flex-col items-center gap-3 py-12",children:[d.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-emerald-100 dark:bg-emerald-900/30",children:d.jsx(jr,{className:"h-6 w-6 text-emerald-600 dark:text-emerald-400"})}),d.jsx("p",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Review posted to GitHub"}),z?.commentUrl&&d.jsxs("a",{href:z.commentUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm text-blue-600 hover:underline dark:text-blue-400",children:["View comment",d.jsx(Vm,{className:"h-3.5 w-3.5"})]})]}),y==="error"&&d.jsx("div",{className:"space-y-4 py-4",children:d.jsxs("div",{className:"flex items-start gap-3 rounded-md border border-red-200 bg-red-50 p-4 dark:border-red-800 dark:bg-red-950/30",children:[d.jsx(Yu,{className:"mt-0.5 h-5 w-5 shrink-0 text-red-600 dark:text-red-400"}),d.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:F})]})})]}),d.jsxs("div",{className:"flex items-center justify-end gap-3 border-t border-zinc-200 px-6 py-4 dark:border-zinc-800",children:[y==="generating"&&d.jsx("button",{onClick:()=>G(e,t),className:"rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Cancel"}),y==="preview"&&d.jsxs(d.Fragment,{children:[d.jsxs("button",{onClick:()=>j(e,t),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:[d.jsx(vo,{className:"h-3.5 w-3.5"}),"Regenerate"]}),d.jsxs("button",{onClick:()=>{R(e,t,fe()),M(!0),setTimeout(()=>M(!1),2e3)},className:ne("inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm font-medium transition-colors",Q?"border-emerald-300 text-emerald-700 dark:border-emerald-700 dark:text-emerald-400":"border-zinc-200 text-zinc-700 hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800"),children:[Q?d.jsx(jr,{className:"h-3.5 w-3.5"}):d.jsx(ry,{className:"h-3.5 w-3.5"}),Q?"Saved!":"Save Draft"]}),d.jsxs("button",{onClick:()=>{const D=fe();R(e,t,D),ie(A,D)},className:"inline-flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-blue-700",children:[d.jsx(iy,{className:"h-3.5 w-3.5"}),"Post to GitHub"]})]}),y==="error"&&d.jsxs(d.Fragment,{children:[d.jsxs("button",{onClick:()=>$(e),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:[d.jsx(vo,{className:"h-3.5 w-3.5"}),"Retry"]}),d.jsx("button",{onClick:Y,className:"rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Close"})]}),y==="posted"&&d.jsx("button",{onClick:Y,className:"rounded-md bg-zinc-900 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200",children:"Done"})]})]})]})]})}function o8(e,t){return`.ocr/sessions/${e}/rounds/round-${t}/final.md`}const _v=e=>`Review the feedback in \`${e}\` and address it following these steps:
|
|
571
|
-
|
|
572
|
-
1. Read the review in its entirety and parse all feedback into discrete items
|
|
573
|
-
2. For each item, read the actual code at the referenced location to corroborate
|
|
574
|
-
3. Classify each as: Valid (will address) | Valid (alternative approach) | Invalid (decline with evidence) | Needs Clarification
|
|
575
|
-
4. Present a numbered summary of all items with classification before implementing
|
|
576
|
-
5. For valid items, implement changes — use sub-agents in parallel where items are independent
|
|
577
|
-
6. Report: total items, items addressed, items declined with reasoning
|
|
578
|
-
|
|
579
|
-
GUARDRAILS: Do NOT blindly accept every piece of feedback. Corroborate against actual code first. If feedback is incorrect, decline with evidence. If the suggested fix is suboptimal, propose a better alternative.`;function c8({sessionId:e,roundNumber:t}){const[r,a]=E.useState(!1),l=E.useRef(null),{data:o}=Xs(),c=!!o?.aiCli?.active,f=E.useCallback(()=>a(!1),[]);E.useEffect(()=>{if(!r)return;const m=g=>{g.key==="Escape"&&f()};return document.addEventListener("keydown",m),l.current?.focus(),()=>document.removeEventListener("keydown",m)},[r,f]);const h=o8(e,t);return d.jsxs(d.Fragment,{children:[d.jsxs("button",{type:"button",onClick:()=>a(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[d.jsx(Gs,{className:"h-3.5 w-3.5"}),"Address Feedback"]}),r&&d.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[d.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:f}),d.jsxs("div",{ref:l,role:"dialog","aria-modal":"true","aria-labelledby":"address-feedback-title",tabIndex:-1,className:"relative z-10 mx-4 w-full max-w-md rounded-lg border border-zinc-200 bg-white shadow-lg sm:max-w-lg dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx("button",{onClick:f,className:"absolute right-4 top-4 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close dialog",children:d.jsx(Bn,{className:"h-4 w-4"})}),c?d.jsx(u8,{finalPath:h,onClose:f}):d.jsx(d8,{finalPath:h,onClose:f})]})]})]})}function u8({finalPath:e,onClose:t}){const[r,a]=E.useState(""),[l,o]=E.useState(!1),[c,f]=E.useState(!1),{socket:h}=ai(),{isRunning:m}=$m(),g=qu();function x(){const _=["ocr address",e];return r.trim()&&_.push("--requirements",r.trim()),_.join(" ")}function y(){const _=["/ocr:address",e];return r.trim()&&_.push(`
|
|
580
|
-
|
|
581
|
-
NOTES:`,r.trim()),_.join(" ")}function v(){const _=x();h?.emit("command:run",{command:_}),t(),g("/commands")}async function w(){await navigator.clipboard.writeText(y()),f(!0),setTimeout(()=>f(!1),2e3)}return d.jsxs("div",{children:[d.jsxs("div",{className:"p-6 pb-0",children:[d.jsx("h3",{id:"address-feedback-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Address Feedback"}),d.jsx("p",{className:"mt-2 text-sm text-zinc-500 dark:text-zinc-400",children:"Run an AI agent to corroborate, validate, and implement changes from this review — in the dashboard or your own terminal."})]}),d.jsxs("div",{className:"mx-6 mt-4 flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 px-3 py-2.5 text-xs text-amber-800 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-300",children:[d.jsx(Qm,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),d.jsx("span",{children:"This runs an AI agent with full read/write and shell access to your project."})]}),d.jsxs("div",{className:"space-y-4 p-6",children:[d.jsxs("div",{children:[d.jsx("label",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Review"}),d.jsx("code",{className:"mt-1 block w-full break-all rounded-md border border-zinc-200 bg-zinc-50 px-3 py-2 text-xs text-zinc-700 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",children:e})]}),d.jsxs("div",{children:[d.jsxs("label",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:["Additional notes ",d.jsx("span",{className:"font-normal text-zinc-400 dark:text-zinc-500",children:"(optional)"})]}),d.jsx("textarea",{value:r,onChange:_=>a(_.target.value),placeholder:"e.g. Focus on the blockers first, skip style nits...",rows:3,className:ne("mt-1 w-full rounded-md border px-3 py-2 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","resize-none")})]}),d.jsx("code",{className:"block w-full whitespace-pre-wrap break-all rounded-md bg-zinc-100 px-2.5 py-1.5 text-xs text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",children:y()}),d.jsxs("div",{className:"space-y-2 pt-2",children:[d.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row-reverse",children:[l?d.jsxs("button",{onClick:v,className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-indigo-600 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-indigo-700",children:[d.jsx(Gs,{className:"h-3.5 w-3.5"}),"Confirm"]}):d.jsxs("button",{onClick:()=>o(!0),disabled:m,className:ne("flex flex-1 items-center justify-center gap-2 rounded-md bg-indigo-600 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-indigo-700",m&&"cursor-not-allowed opacity-50"),children:[d.jsx(Gs,{className:"h-3.5 w-3.5"}),"Run in Dashboard"]}),d.jsx("button",{onClick:w,className:"flex flex-1 items-center justify-center gap-2 rounded-md border border-zinc-200 px-3 py-2 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:c?d.jsxs(d.Fragment,{children:[d.jsx(jr,{className:"h-3.5 w-3.5"}),"Copied!"]}):d.jsxs(d.Fragment,{children:[d.jsx(nk,{className:"h-3.5 w-3.5"}),"Copy to Terminal"]})})]}),d.jsx("button",{onClick:t,className:"w-full py-1 text-sm text-zinc-500 transition-colors hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200",children:"Cancel"})]})]})]})}function d8({finalPath:e,onClose:t}){const[r,a]=E.useState(!0),[l,o]=E.useState(!1);async function c(){const f=r?_v(e):e;await navigator.clipboard.writeText(f),o(!0),setTimeout(()=>o(!1),2e3)}return d.jsxs("div",{className:"p-6",children:[d.jsx("h3",{id:"address-feedback-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Address Feedback"}),d.jsx("p",{className:"mt-2 text-sm text-zinc-500 dark:text-zinc-400",children:"Copy the review path and AI prompt to paste into any AI coding tool (Claude Code, Cursor, Windsurf, Copilot, etc.)."}),d.jsxs("div",{className:"mt-4",children:[d.jsx("label",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Review path"}),d.jsx("code",{className:"mt-1 block w-full break-all rounded-md border border-zinc-200 bg-zinc-50 px-3 py-2 text-xs text-zinc-700 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",children:e})]}),d.jsxs("label",{className:"mt-4 flex items-center gap-2 text-sm text-zinc-600 dark:text-zinc-400",children:[d.jsx("input",{type:"checkbox",checked:r,onChange:f=>a(f.target.checked),className:"h-3.5 w-3.5 rounded border-zinc-300 text-indigo-500 focus:ring-indigo-400 dark:border-zinc-600"}),"Include AI prompt"]}),r&&d.jsx("div",{className:"mt-3 max-h-40 overflow-y-auto rounded-md border border-zinc-200 bg-zinc-50 p-3 text-xs text-zinc-600 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-400",children:d.jsx("pre",{className:"whitespace-pre-wrap font-mono leading-relaxed",children:_v(e)})}),d.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[d.jsx("button",{onClick:t,className:"rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Cancel"}),d.jsx("button",{onClick:c,className:"inline-flex items-center gap-1.5 rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-indigo-700",children:l?d.jsxs(d.Fragment,{children:[d.jsx(jr,{className:"h-3.5 w-3.5"}),"Copied!"]}):d.jsxs(d.Fragment,{children:[d.jsx(nk,{className:"h-3.5 w-3.5"}),"Copy"]})})]})]})}const f8=[{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 h8(){const{id:e,round:t}=$u(),r=parseInt(t??"0",10),{data:a,isLoading:l}=K6(e??"",r),{data:o,isLoading:c}=V6(e??"",r),{data:f}=mu(e??"","final"),{data:h}=mu(e??"","final-human"),{data:m}=mu(e??"","validation"),{data:g}=mu(e??"","discourse"),x=Qw(),[y,v]=E.useState(!1),[w,_]=E.useState(!1),[N,S]=E.useState(!1);if(l)return d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading round..."});if(!a)return d.jsxs("div",{children:[d.jsxs(In,{to:`/sessions/${e}`,className:"mb-4 inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to session"]}),d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Round not found."})]});const O=g?c6(g.content):[];return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(In,{to:`/sessions/${e}`,className:"inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to session"]}),d.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("h1",{className:"text-2xl font-semibold",children:["Round ",a.round_number]}),d.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-zinc-500 dark:text-zinc-400",children:["Your triage",d.jsx("select",{value:a.progress?.status??"needs_review",onChange:z=>x.mutate({roundId:a.id,status:z.target.value}),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs text-zinc-900 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100",children:f8.map(z=>d.jsx("option",{value:z.value,children:z.label},z.value))})]})]}),d.jsxs("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:[(a.reviewer_outputs??[]).length," reviewer",(a.reviewer_outputs??[]).length!==1?"s":""]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[f&&d.jsx(l8,{sessionId:e??"",roundNumber:r,finalContent:f.content,savedHumanReview:h?.content}),f&&d.jsx(c8,{sessionId:e??"",roundNumber:r}),d.jsxs("button",{type:"button",onClick:()=>_(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[d.jsx(Ou,{className:"h-3.5 w-3.5"}),"Ask the Team"]}),d.jsxs("button",{type:"button",onClick:()=>S(!0),title:"Copy a resume command to continue this review's AI conversation in your terminal",className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[d.jsx(Oi,{className:"h-3.5 w-3.5"}),"Resume in terminal"]})]})]}),N&&e&&d.jsx(Zm,{workflowId:e,onClose:()=>S(!1)}),a.verdict&&d.jsx(y6,{verdict:a.verdict,blockerCount:a.blocker_count,suggestionCount:a.suggestion_count,shouldFixCount:a.should_fix_count}),d.jsxs("div",{children:[d.jsx("h2",{className:"mb-3 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Reviewers"}),d.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:(a.reviewer_outputs??[]).map(z=>d.jsx(Z6,{sessionId:e??"",roundNumber:r,reviewer:z},z.id))})]}),d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:["Findings",o?` (${o.length})`:""]}),d.jsx(Ww,{findings:o??[],isLoading:c})]}),m&&d.jsx(u6,{content:m.content}),g&&d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("button",{onClick:()=>v(z=>!z),className:"flex items-center gap-2 text-sm font-medium text-zinc-900 transition-colors hover:text-zinc-700 dark:text-zinc-100 dark:hover:text-zinc-300",children:[d.jsx(Ou,{className:"h-4 w-4"}),y?"Hide Discourse":"View Discourse"]}),y&&d.jsx("div",{className:"mt-4 space-y-4",children:O.length>0?O.map((z,F)=>d.jsx(o6,{type:z.type,content:z.content,reviewer:z.reviewer},F)):d.jsx(br,{content:g.content})})]}),f&&d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Final Review"}),d.jsx(br,{content:f.content})]}),w&&a&&d.jsx(Yw,{sessionId:e??"",targetType:"review_round",targetId:a.round_number,onClose:()=>_(!1)})]})}function m8(){const{id:e,round:t,reviewerId:r}=$u(),a=parseInt(t??"0",10),l=parseInt(r??"0",10),{data:o,isLoading:c}=Y6(e??"",a,l),f=nn({queryKey:["reviewer-content",e,a,l],queryFn:async()=>{if(!o?.file_path)return"";try{return(await Dt(`/api/sessions/${e}/rounds/${a}/reviewers/${l}/content`)).content??""}catch{return""}},enabled:!!o?.file_path});if(c)return d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading reviewer..."});if(!o)return d.jsxs("div",{children:[d.jsxs(In,{to:`/sessions/${e}/reviews/${a}`,className:"mb-4 inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to round"]}),d.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Reviewer not found."})]});const h=Xw[o.reviewer_type]??Va;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(In,{to:`/sessions/${e}/reviews/${a}`,className:"inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[d.jsx(xa,{className:"h-4 w-4"}),"Back to round ",a]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(h,{className:"h-6 w-6 text-zinc-500"}),d.jsxs("div",{children:[d.jsxs("h1",{className:"text-2xl font-semibold capitalize",children:[o.reviewer_type,o.instance_number>1&&d.jsxs("span",{className:"ml-1 text-zinc-500 dark:text-zinc-400",children:["#",o.instance_number]})]}),d.jsxs("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:[o.finding_count," finding",o.finding_count!==1?"s":""]})]})]}),f.data&&d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsx("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Reviewer Output"}),d.jsx(br,{content:f.data})]}),o.findings.length>0&&d.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[d.jsxs("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:["Findings (",o.findings.length,")"]}),d.jsx(Ww,{findings:o.findings})]})]})}const Nv={needs_review:0,in_progress:1,changes_made:2,acknowledged:3,dismissed:4},Jw=[{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"}],p8=[{value:"all",label:"All Statuses"},...Jw];function g8(){const{data:e,isLoading:t}=G6(),r=Qw(),a=qu(),[l,o]=E.useState(!1),[c,f]=E.useState("all"),[h,m]=E.useState("all"),[g,x]=E.useState("status"),[y,v]=E.useState("asc"),w=E.useMemo(()=>{const z=new Set,F=[{value:"all",label:"All Verdicts"}];for(const $ of e??[])$.verdict&&!z.has($.verdict)&&(z.add($.verdict),F.push({value:$.verdict,label:$.verdict}));return F},[e]),_=E.useMemo(()=>{let z=e??[];return l||(z=z.filter(F=>{const $=F.progress?.status??"needs_review";return $==="needs_review"||$==="in_progress"})),c!=="all"&&(z=z.filter(F=>(F.progress?.status??"needs_review")===c)),h!=="all"&&(z=z.filter(F=>F.verdict===h)),z},[e,l,c,h]),N=E.useMemo(()=>{const z=y==="asc"?1:-1;return[..._].sort((F,$)=>{switch(g){case"session_id":return F.session_id.localeCompare($.session_id)*z;case"round_number":return(F.round_number-$.round_number)*z;case"verdict":return(F.verdict??"").localeCompare($.verdict??"")*z;case"blocker_count":return(F.blocker_count-$.blocker_count)*z;case"status":{const j=Nv[F.progress?.status??"needs_review"],G=Nv[$.progress?.status??"needs_review"];return(j-G)*z}default:return 0}})},[_,g,y]);function S(z){g===z?v(F=>F==="asc"?"desc":"asc"):(x(z),v("asc"))}function O(z,F){r.mutate({roundId:z,status:F})}return d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h1",{className:"text-2xl font-semibold",children:"Reviews"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{onClick:()=>o(!1),className:ne("rounded-md px-3 py-1.5 text-xs font-medium transition-colors",l?"text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100":"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900"),children:"Actionable"}),d.jsx("button",{onClick:()=>o(!0),className:ne("rounded-md px-3 py-1.5 text-xs font-medium transition-colors",l?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100"),children:"All"})]})]}),t?d.jsx("p",{className:"mt-6 text-sm text-zinc-500 dark:text-zinc-400",children:"Loading reviews..."}):!e||e.length===0?d.jsxs("p",{className:"mt-6 text-sm text-zinc-500 dark:text-zinc-400",children:["No review rounds found. Run ",d.jsx("code",{className:"rounded bg-zinc-100 px-1.5 py-0.5 text-xs dark:bg-zinc-800",children:"ocr review"})," to create one."]}):d.jsxs("div",{className:"mt-6",children:[d.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-3",children:[d.jsx(ik,{className:"h-4 w-4 text-zinc-400"}),l&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Status:"}),d.jsx("select",{value:c,onChange:z=>f(z.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:p8.map(z=>d.jsx("option",{value:z.value,children:z.label},z.value))})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Verdict:"}),d.jsx("select",{value:h,onChange:z=>m(z.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:w.map(z=>d.jsx("option",{value:z.value,children:z.label},z.value))})]}),d.jsxs("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:[N.length," of ",(e??[]).length," reviews"]})]}),N.length===0?d.jsx("p",{className:"py-8 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No reviews match your filters."}):d.jsx("div",{className:"overflow-x-auto rounded-lg border border-zinc-200 dark:border-zinc-800",children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{className:"bg-zinc-50 dark:bg-zinc-900",children:d.jsxs("tr",{children:[d.jsx(ha,{label:"Branch",field:"session_id",activeField:g,direction:y,onSort:S}),d.jsx(ha,{label:"Round",field:"round_number",activeField:g,direction:y,onSort:S}),d.jsx(ha,{label:"Verdict",field:"verdict",activeField:g,direction:y,onSort:S}),d.jsx(ha,{label:"Blockers",field:"blocker_count",activeField:g,direction:y,onSort:S}),d.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:"Reviewers"}),d.jsx(ha,{label:"Status",field:"status",activeField:g,direction:y,onSort:S})]})}),d.jsx("tbody",{children:N.map(z=>{const F=z.session_id.replace(/^\d{4}-\d{2}-\d{2}-/,""),$=(z.reviewer_outputs??[]).length;return d.jsxs("tr",{className:"cursor-pointer transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",onClick:()=>a(`/sessions/${z.session_id}/reviews/${z.round_number}`),children:[d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Oo,{className:"h-4 w-4 shrink-0 text-zinc-400"}),d.jsx("span",{className:"truncate text-zinc-900 dark:text-zinc-100",title:z.session_id,children:F})]})}),d.jsxs("td",{className:"border-b border-zinc-200 px-4 py-2 text-zinc-600 dark:border-zinc-800 dark:text-zinc-400",children:["Round ",z.round_number]}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:z.verdict?d.jsx(Zs,{variant:z.verdict==="APPROVE"?"info":z.verdict==="REQUEST CHANGES"?"high":"medium",label:z.verdict}):d.jsx("span",{className:"text-xs text-zinc-400",children:"Pending"})}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:z.blocker_count>0?d.jsx("span",{className:"inline-flex items-center rounded-md border border-red-500/25 bg-red-500/15 px-2 py-0.5 text-xs font-medium text-red-700 dark:text-red-400",children:z.blocker_count}):d.jsx("span",{className:"text-xs text-zinc-400",children:"0"})}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 text-zinc-600 dark:border-zinc-800 dark:text-zinc-400",children:$}),d.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",onClick:j=>j.stopPropagation(),children:d.jsx("select",{value:z.progress?.status??"needs_review",onChange:j=>O(z.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:Jw.map(j=>d.jsx("option",{value:j.value,children:j.label},j.value))})})]},`${z.session_id}-${z.round_number}`)})})]})})]})]})}function b8(){return d.jsx("div",{className:"flex min-h-[400px] items-center justify-center",children:d.jsxs("div",{className:"text-center",children:[d.jsx("h1",{className:"text-4xl font-semibold text-zinc-900 dark:text-zinc-100",children:"404"}),d.jsx("p",{className:"mt-2 text-zinc-500 dark:text-zinc-400",children:"Page not found."})]})})}function Ti(e){return d.jsx(FR,{children:e})}const x8=zz([{element:d.jsx(PR,{}),errorElement:d.jsx(Ci,{}),children:[{index:!0,element:Ti(d.jsx(QR,{}))},{path:"sessions",element:Ti(d.jsx(l5,{})),errorElement:d.jsx(Ci,{})},{path:"sessions/:id",element:Ti(d.jsx(S5,{})),errorElement:d.jsx(Ci,{})},{path:"sessions/:id/reviews/:round",element:Ti(d.jsx(h8,{})),errorElement:d.jsx(Ci,{})},{path:"sessions/:id/reviews/:round/reviewers/:reviewerId",element:Ti(d.jsx(m8,{})),errorElement:d.jsx(Ci,{})},{path:"sessions/:id/maps/:run",element:Ti(d.jsx($6,{})),errorElement:d.jsx(Ci,{})},{path:"reviews",element:Ti(d.jsx(g8,{})),errorElement:d.jsx(Ci,{})},{path:"commands",element:Ti(d.jsx(G9,{})),errorElement:d.jsx(Ci,{})},{path:"reviewers",element:Ti(d.jsx(E6,{})),errorElement:d.jsx(Ci,{})},{path:"*",element:d.jsx(b8,{})}]}]);function y8(){return d.jsx(Hz,{children:d.jsx(xC,{children:d.jsx(D2,{children:d.jsx(uT,{children:d.jsx(Uz,{router:x8})})})})})}w1().then(()=>{hN.createRoot(document.getElementById("root")).render(d.jsx(E.StrictMode,{children:d.jsx(y8,{})}))});export{j6 as _,v8 as a,Pu as g,d as j,E as r,l1 as u};
|