diffity 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -6
- package/dist/index.js +495 -102
- package/dist/ui/assets/{index-Dt_01AYh.js → index-BQK01Qmc.js} +38 -37
- package/dist/ui/index.html +1 -1
- package/package.json +2 -1
|
@@ -1,52 +1,53 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DA-rfuFy.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-BrjP3tb8.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-BjGOyj-B.js","assets/html-derivative-DlHx6ybY.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-DNxU26gB.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-BYCe7drp.js","assets/ruby-Wjq7vjNf.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-i7_Ulhet.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/r-Dspwwk_N.js","assets/just-VxiPbLrw.js","assets/perl-NvoQZIq0.js","assets/latex-CWtU0Tv5.js","assets/tex-idrVyKtj.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-DTYItulj.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/php-R6g_5hLQ.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BDqjjVU7.js","assets/csharp-COcwbKMJ.js","assets/rst-CRjBmOyv.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/go-C27-OAKa.js","assets/ts-tags-DQrlYJgV.js","assets/twig-xg9kU7Mw.js","assets/vue-D2xRrEX4.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))l(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&l(u)}).observe(document,{childList:!0,subtree:!0});function r(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function l(a){if(a.ep)return;a.ep=!0;const o=r(a);fetch(a.href,o)}})();function gu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kf={exports:{}},Ma={};var pb;function SE(){if(pb)return Ma;pb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(l,a,o){var u=null;if(o!==void 0&&(u=""+o),a.key!==void 0&&(u=""+a.key),"key"in a){o={};for(var f in a)f!=="key"&&(o[f]=a[f])}else o=a;return a=o.ref,{$$typeof:e,type:l,key:u,ref:a!==void 0?a:null,props:o}}return Ma.Fragment=t,Ma.jsx=r,Ma.jsxs=r,Ma}var gb;function EE(){return gb||(gb=1,Kf.exports=SE()),Kf.exports}var v=EE(),Zf={exports:{}},Ae={};var yb;function CE(){if(yb)return Ae;yb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),b=Symbol.iterator;function x(N){return N===null||typeof N!="object"?null:(N=b&&N[b]||N["@@iterator"],typeof N=="function"?N:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,R={};function C(N,Q,T){this.props=N,this.context=Q,this.refs=R,this.updater=T||w}C.prototype.isReactComponent={},C.prototype.setState=function(N,Q){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,Q,"setState")},C.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function L(){}L.prototype=C.prototype;function O(N,Q,T){this.props=N,this.context=Q,this.refs=R,this.updater=T||w}var B=O.prototype=new L;B.constructor=O,E(B,C.prototype),B.isPureReactComponent=!0;var Y=Array.isArray;function j(){}var q={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function oe(N,Q,T){var ue=T.ref;return{$$typeof:e,type:N,key:Q,ref:ue!==void 0?ue:null,props:T}}function P(N,Q){return oe(N.type,Q,N.props)}function X(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function te(N){var Q={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(T){return Q[T]})}var fe=/\/+/g;function le(N,Q){return typeof N=="object"&&N!==null&&N.key!=null?te(""+N.key):Q.toString(36)}function ne(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(j,j):(N.status="pending",N.then(function(Q){N.status==="pending"&&(N.status="fulfilled",N.value=Q)},function(Q){N.status==="pending"&&(N.status="rejected",N.reason=Q)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function z(N,Q,T,ue,de){var ce=typeof N;(ce==="undefined"||ce==="boolean")&&(N=null);var ke=!1;if(N===null)ke=!0;else switch(ce){case"bigint":case"string":case"number":ke=!0;break;case"object":switch(N.$$typeof){case e:case t:ke=!0;break;case g:return ke=N._init,z(ke(N._payload),Q,T,ue,de)}}if(ke)return de=de(N),ke=ue===""?"."+le(N,0):ue,Y(de)?(T="",ke!=null&&(T=ke.replace(fe,"$&/")+"/"),z(de,Q,T,"",function(gt){return gt})):de!=null&&(X(de)&&(de=P(de,T+(de.key==null||N&&N.key===de.key?"":(""+de.key).replace(fe,"$&/")+"/")+ke)),Q.push(de)),1;ke=0;var Fe=ue===""?".":ue+":";if(Y(N))for(var ve=0;ve<N.length;ve++)ue=N[ve],ce=Fe+le(ue,ve),ke+=z(ue,Q,T,ce,de);else if(ve=x(N),typeof ve=="function")for(N=ve.call(N),ve=0;!(ue=N.next()).done;)ue=ue.value,ce=Fe+le(ue,ve++),ke+=z(ue,Q,T,ce,de);else if(ce==="object"){if(typeof N.then=="function")return z(ne(N),Q,T,ue,de);throw Q=String(N),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return ke}function Z(N,Q,T){if(N==null)return N;var ue=[],de=0;return z(N,ue,"","",function(ce){return Q.call(T,ce,de++)}),ue}function re(N){if(N._status===-1){var Q=N._result;Q=Q(),Q.then(function(T){(N._status===0||N._status===-1)&&(N._status=1,N._result=T)},function(T){(N._status===0||N._status===-1)&&(N._status=2,N._result=T)}),N._status===-1&&(N._status=0,N._result=Q)}if(N._status===1)return N._result.default;throw N._result}var me=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=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(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},k={map:Z,forEach:function(N,Q,T){Z(N,function(){Q.apply(this,arguments)},T)},count:function(N){var Q=0;return Z(N,function(){Q++}),Q},toArray:function(N){return Z(N,function(Q){return Q})||[]},only:function(N){if(!X(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Ae.Activity=p,Ae.Children=k,Ae.Component=C,Ae.Fragment=r,Ae.Profiler=a,Ae.PureComponent=O,Ae.StrictMode=l,Ae.Suspense=d,Ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=q,Ae.__COMPILER_RUNTIME={__proto__:null,c:function(N){return q.H.useMemoCache(N)}},Ae.cache=function(N){return function(){return N.apply(null,arguments)}},Ae.cacheSignal=function(){return null},Ae.cloneElement=function(N,Q,T){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var ue=E({},N.props),de=N.key;if(Q!=null)for(ce in Q.key!==void 0&&(de=""+Q.key),Q)!G.call(Q,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&Q.ref===void 0||(ue[ce]=Q[ce]);var ce=arguments.length-2;if(ce===1)ue.children=T;else if(1<ce){for(var ke=Array(ce),Fe=0;Fe<ce;Fe++)ke[Fe]=arguments[Fe+2];ue.children=ke}return oe(N.type,de,ue)},Ae.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:o,_context:N},N},Ae.createElement=function(N,Q,T){var ue,de={},ce=null;if(Q!=null)for(ue in Q.key!==void 0&&(ce=""+Q.key),Q)G.call(Q,ue)&&ue!=="key"&&ue!=="__self"&&ue!=="__source"&&(de[ue]=Q[ue]);var ke=arguments.length-2;if(ke===1)de.children=T;else if(1<ke){for(var Fe=Array(ke),ve=0;ve<ke;ve++)Fe[ve]=arguments[ve+2];de.children=Fe}if(N&&N.defaultProps)for(ue in ke=N.defaultProps,ke)de[ue]===void 0&&(de[ue]=ke[ue]);return oe(N,ce,de)},Ae.createRef=function(){return{current:null}},Ae.forwardRef=function(N){return{$$typeof:f,render:N}},Ae.isValidElement=X,Ae.lazy=function(N){return{$$typeof:g,_payload:{_status:-1,_result:N},_init:re}},Ae.memo=function(N,Q){return{$$typeof:h,type:N,compare:Q===void 0?null:Q}},Ae.startTransition=function(N){var Q=q.T,T={};q.T=T;try{var ue=N(),de=q.S;de!==null&&de(T,ue),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"&&ue.then(j,me)}catch(ce){me(ce)}finally{Q!==null&&T.types!==null&&(Q.types=T.types),q.T=Q}},Ae.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},Ae.use=function(N){return q.H.use(N)},Ae.useActionState=function(N,Q,T){return q.H.useActionState(N,Q,T)},Ae.useCallback=function(N,Q){return q.H.useCallback(N,Q)},Ae.useContext=function(N){return q.H.useContext(N)},Ae.useDebugValue=function(){},Ae.useDeferredValue=function(N,Q){return q.H.useDeferredValue(N,Q)},Ae.useEffect=function(N,Q){return q.H.useEffect(N,Q)},Ae.useEffectEvent=function(N){return q.H.useEffectEvent(N)},Ae.useId=function(){return q.H.useId()},Ae.useImperativeHandle=function(N,Q,T){return q.H.useImperativeHandle(N,Q,T)},Ae.useInsertionEffect=function(N,Q){return q.H.useInsertionEffect(N,Q)},Ae.useLayoutEffect=function(N,Q){return q.H.useLayoutEffect(N,Q)},Ae.useMemo=function(N,Q){return q.H.useMemo(N,Q)},Ae.useOptimistic=function(N,Q){return q.H.useOptimistic(N,Q)},Ae.useReducer=function(N,Q,T){return q.H.useReducer(N,Q,T)},Ae.useRef=function(N){return q.H.useRef(N)},Ae.useState=function(N){return q.H.useState(N)},Ae.useSyncExternalStore=function(N,Q,T){return q.H.useSyncExternalStore(N,Q,T)},Ae.useTransition=function(){return q.H.useTransition()},Ae.version="19.2.4",Ae}var bb;function kh(){return bb||(bb=1,Zf.exports=CE()),Zf.exports}var F=kh();const kE=gu(F);var Jf={exports:{}},ja={},Wf={exports:{}},ed={};var xb;function AE(){return xb||(xb=1,(function(e){function t(z,Z){var re=z.length;z.push(Z);e:for(;0<re;){var me=re-1>>>1,k=z[me];if(0<a(k,Z))z[me]=Z,z[re]=k,re=me;else break e}}function r(z){return z.length===0?null:z[0]}function l(z){if(z.length===0)return null;var Z=z[0],re=z.pop();if(re!==Z){z[0]=re;e:for(var me=0,k=z.length,N=k>>>1;me<N;){var Q=2*(me+1)-1,T=z[Q],ue=Q+1,de=z[ue];if(0>a(T,re))ue<k&&0>a(de,T)?(z[me]=de,z[ue]=re,me=ue):(z[me]=T,z[Q]=re,me=Q);else if(ue<k&&0>a(de,re))z[me]=de,z[ue]=re,me=ue;else break e}}return Z}function a(z,Z){var re=z.sortIndex-Z.sortIndex;return re!==0?re:z.id-Z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var d=[],h=[],g=1,p=null,b=3,x=!1,w=!1,E=!1,R=!1,C=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function B(z){for(var Z=r(h);Z!==null;){if(Z.callback===null)l(h);else if(Z.startTime<=z)l(h),Z.sortIndex=Z.expirationTime,t(d,Z);else break;Z=r(h)}}function Y(z){if(E=!1,B(z),!w)if(r(d)!==null)w=!0,j||(j=!0,te());else{var Z=r(h);Z!==null&&ne(Y,Z.startTime-z)}}var j=!1,q=-1,G=5,oe=-1;function P(){return R?!0:!(e.unstable_now()-oe<G)}function X(){if(R=!1,j){var z=e.unstable_now();oe=z;var Z=!0;try{e:{w=!1,E&&(E=!1,L(q),q=-1),x=!0;var re=b;try{t:{for(B(z),p=r(d);p!==null&&!(p.expirationTime>z&&P());){var me=p.callback;if(typeof me=="function"){p.callback=null,b=p.priorityLevel;var k=me(p.expirationTime<=z);if(z=e.unstable_now(),typeof k=="function"){p.callback=k,B(z),Z=!0;break t}p===r(d)&&l(d),B(z)}else l(d);p=r(d)}if(p!==null)Z=!0;else{var N=r(h);N!==null&&ne(Y,N.startTime-z),Z=!1}}break e}finally{p=null,b=re,x=!1}Z=void 0}}finally{Z?te():j=!1}}}var te;if(typeof O=="function")te=function(){O(X)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,le=fe.port2;fe.port1.onmessage=X,te=function(){le.postMessage(null)}}else te=function(){C(X,0)};function ne(z,Z){q=C(function(){z(e.unstable_now())},Z)}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(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(z){switch(b){case 1:case 2:case 3:var Z=3;break;default:Z=b}var re=b;b=Z;try{return z()}finally{b=re}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(z,Z){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var re=b;b=z;try{return Z()}finally{b=re}},e.unstable_scheduleCallback=function(z,Z,re){var me=e.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?me+re:me):re=me,z){case 1:var k=-1;break;case 2:k=250;break;case 5:k=1073741823;break;case 4:k=1e4;break;default:k=5e3}return k=re+k,z={id:g++,callback:Z,priorityLevel:z,startTime:re,expirationTime:k,sortIndex:-1},re>me?(z.sortIndex=re,t(h,z),r(d)===null&&z===r(h)&&(E?(L(q),q=-1):E=!0,ne(Y,re-me))):(z.sortIndex=k,t(d,z),w||x||(w=!0,j||(j=!0,te()))),z},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(z){var Z=b;return function(){var re=b;b=Z;try{return z.apply(this,arguments)}finally{b=re}}}})(ed)),ed}var vb;function TE(){return vb||(vb=1,Wf.exports=AE()),Wf.exports}var td={exports:{}},Gt={};var _b;function RE(){if(_b)return Gt;_b=1;var e=kh();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var l={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},a=Symbol.for("react.portal");function o(d,h,g){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:p==null?null:""+p,children:d,containerInfo:h,implementation:g}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Gt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Gt.createPortal=function(d,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(d,h,null,g)},Gt.flushSync=function(d){var h=u.T,g=l.p;try{if(u.T=null,l.p=2,d)return d()}finally{u.T=h,l.p=g,l.d.f()}},Gt.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,l.d.C(d,h))},Gt.prefetchDNS=function(d){typeof d=="string"&&l.d.D(d)},Gt.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var g=h.as,p=f(g,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?l.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:b,fetchPriority:x}):g==="script"&&l.d.X(d,{crossOrigin:p,integrity:b,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Gt.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=f(h.as,h.crossOrigin);l.d.M(d,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&l.d.M(d)},Gt.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,p=f(g,h.crossOrigin);l.d.L(d,g,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Gt.preloadModule=function(d,h){if(typeof d=="string")if(h){var g=f(h.as,h.crossOrigin);l.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else l.d.m(d)},Gt.requestFormReset=function(d){l.d.r(d)},Gt.unstable_batchedUpdates=function(d,h){return d(h)},Gt.useFormState=function(d,h,g){return u.H.useFormState(d,h,g)},Gt.useFormStatus=function(){return u.H.useHostTransitionStatus()},Gt.version="19.2.4",Gt}var wb;function Px(){if(wb)return td.exports;wb=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(),td.exports=RE(),td.exports}var Sb;function LE(){if(Sb)return ja;Sb=1;var e=TE(),t=kh(),r=Px();function l(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 a(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 u(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 d(n){if(o(n)!==n)throw Error(l(188))}function h(n){var i=n.alternate;if(!i){if(i=o(n),i===null)throw Error(l(188));return i!==n?null:n}for(var s=n,c=i;;){var m=s.return;if(m===null)break;var y=m.alternate;if(y===null){if(c=m.return,c!==null){s=c;continue}break}if(m.child===y.child){for(y=m.child;y;){if(y===s)return d(m),n;if(y===c)return d(m),i;y=y.sibling}throw Error(l(188))}if(s.return!==c.return)s=m,c=y;else{for(var _=!1,S=m.child;S;){if(S===s){_=!0,s=m,c=y;break}if(S===c){_=!0,c=m,s=y;break}S=S.sibling}if(!_){for(S=y.child;S;){if(S===s){_=!0,s=y,c=m;break}if(S===c){_=!0,c=y,s=m;break}S=S.sibling}if(!_)throw Error(l(189))}}if(s.alternate!==c)throw Error(l(190))}if(s.tag!==3)throw Error(l(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 p=Object.assign,b=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),O=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function te(n){return n===null||typeof n!="object"?null:(n=X&&n[X]||n["@@iterator"],typeof n=="function"?n:null)}var fe=Symbol.for("react.client.reference");function le(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===fe?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case E:return"Fragment";case C:return"Profiler";case R:return"StrictMode";case Y:return"Suspense";case j:return"SuspenseList";case oe:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case w:return"Portal";case O:return n.displayName||"Context";case L:return(n._context.displayName||"Context")+".Consumer";case B:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case q:return i=n.displayName||null,i!==null?i:le(n.type)||"Memo";case G:i=n._payload,n=n._init;try{return le(n(i))}catch{}}return null}var ne=Array.isArray,z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},me=[],k=-1;function N(n){return{current:n}}function Q(n){0>k||(n.current=me[k],me[k]=null,k--)}function T(n,i){k++,me[k]=n.current,n.current=i}var ue=N(null),de=N(null),ce=N(null),ke=N(null);function Fe(n,i){switch(T(ce,i),T(de,n),T(ue,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?Py(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=Py(i),n=By(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}Q(ue),T(ue,n)}function ve(){Q(ue),Q(de),Q(ce)}function gt(n){n.memoizedState!==null&&T(ke,n);var i=ue.current,s=By(i,n.type);i!==s&&(T(de,n),T(ue,s))}function ut(n){de.current===n&&(Q(ue),Q(de)),ke.current===n&&(Q(ke),La._currentValue=re)}var Lt,bn;function wt(n){if(Lt===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);Lt=i&&i[1]||"",bn=-1<s.stack.indexOf(`
|
|
2
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))l(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&l(u)}).observe(document,{childList:!0,subtree:!0});function r(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function l(a){if(a.ep)return;a.ep=!0;const o=r(a);fetch(a.href,o)}})();function gu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kf={exports:{}},ja={};var pb;function SE(){if(pb)return ja;pb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(l,a,o){var u=null;if(o!==void 0&&(u=""+o),a.key!==void 0&&(u=""+a.key),"key"in a){o={};for(var f in a)f!=="key"&&(o[f]=a[f])}else o=a;return a=o.ref,{$$typeof:e,type:l,key:u,ref:a!==void 0?a:null,props:o}}return ja.Fragment=t,ja.jsx=r,ja.jsxs=r,ja}var gb;function EE(){return gb||(gb=1,Kf.exports=SE()),Kf.exports}var v=EE(),Zf={exports:{}},Ae={};var yb;function CE(){if(yb)return Ae;yb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),b=Symbol.iterator;function x(N){return N===null||typeof N!="object"?null:(N=b&&N[b]||N["@@iterator"],typeof N=="function"?N:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,R={};function C(N,Q,T){this.props=N,this.context=Q,this.refs=R,this.updater=T||w}C.prototype.isReactComponent={},C.prototype.setState=function(N,Q){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,Q,"setState")},C.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function L(){}L.prototype=C.prototype;function O(N,Q,T){this.props=N,this.context=Q,this.refs=R,this.updater=T||w}var B=O.prototype=new L;B.constructor=O,E(B,C.prototype),B.isPureReactComponent=!0;var Y=Array.isArray;function j(){}var q={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function se(N,Q,T){var ue=T.ref;return{$$typeof:e,type:N,key:Q,ref:ue!==void 0?ue:null,props:T}}function P(N,Q){return se(N.type,Q,N.props)}function X(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function te(N){var Q={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(T){return Q[T]})}var de=/\/+/g;function le(N,Q){return typeof N=="object"&&N!==null&&N.key!=null?te(""+N.key):Q.toString(36)}function ne(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(j,j):(N.status="pending",N.then(function(Q){N.status==="pending"&&(N.status="fulfilled",N.value=Q)},function(Q){N.status==="pending"&&(N.status="rejected",N.reason=Q)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function z(N,Q,T,ue,he){var fe=typeof N;(fe==="undefined"||fe==="boolean")&&(N=null);var Ce=!1;if(N===null)Ce=!0;else switch(fe){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(N.$$typeof){case e:case t:Ce=!0;break;case g:return Ce=N._init,z(Ce(N._payload),Q,T,ue,he)}}if(Ce)return he=he(N),Ce=ue===""?"."+le(N,0):ue,Y(he)?(T="",Ce!=null&&(T=Ce.replace(de,"$&/")+"/"),z(he,Q,T,"",function(yt){return yt})):he!=null&&(X(he)&&(he=P(he,T+(he.key==null||N&&N.key===he.key?"":(""+he.key).replace(de,"$&/")+"/")+Ce)),Q.push(he)),1;Ce=0;var je=ue===""?".":ue+":";if(Y(N))for(var xe=0;xe<N.length;xe++)ue=N[xe],fe=je+le(ue,xe),Ce+=z(ue,Q,T,fe,he);else if(xe=x(N),typeof xe=="function")for(N=xe.call(N),xe=0;!(ue=N.next()).done;)ue=ue.value,fe=je+le(ue,xe++),Ce+=z(ue,Q,T,fe,he);else if(fe==="object"){if(typeof N.then=="function")return z(ne(N),Q,T,ue,he);throw Q=String(N),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return Ce}function J(N,Q,T){if(N==null)return N;var ue=[],he=0;return z(N,ue,"","",function(fe){return Q.call(T,fe,he++)}),ue}function re(N){if(N._status===-1){var Q=N._result;Q=Q(),Q.then(function(T){(N._status===0||N._status===-1)&&(N._status=1,N._result=T)},function(T){(N._status===0||N._status===-1)&&(N._status=2,N._result=T)}),N._status===-1&&(N._status=0,N._result=Q)}if(N._status===1)return N._result.default;throw N._result}var me=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=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(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},k={map:J,forEach:function(N,Q,T){J(N,function(){Q.apply(this,arguments)},T)},count:function(N){var Q=0;return J(N,function(){Q++}),Q},toArray:function(N){return J(N,function(Q){return Q})||[]},only:function(N){if(!X(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Ae.Activity=p,Ae.Children=k,Ae.Component=C,Ae.Fragment=r,Ae.Profiler=a,Ae.PureComponent=O,Ae.StrictMode=l,Ae.Suspense=d,Ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=q,Ae.__COMPILER_RUNTIME={__proto__:null,c:function(N){return q.H.useMemoCache(N)}},Ae.cache=function(N){return function(){return N.apply(null,arguments)}},Ae.cacheSignal=function(){return null},Ae.cloneElement=function(N,Q,T){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var ue=E({},N.props),he=N.key;if(Q!=null)for(fe in Q.key!==void 0&&(he=""+Q.key),Q)!G.call(Q,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&Q.ref===void 0||(ue[fe]=Q[fe]);var fe=arguments.length-2;if(fe===1)ue.children=T;else if(1<fe){for(var Ce=Array(fe),je=0;je<fe;je++)Ce[je]=arguments[je+2];ue.children=Ce}return se(N.type,he,ue)},Ae.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:o,_context:N},N},Ae.createElement=function(N,Q,T){var ue,he={},fe=null;if(Q!=null)for(ue in Q.key!==void 0&&(fe=""+Q.key),Q)G.call(Q,ue)&&ue!=="key"&&ue!=="__self"&&ue!=="__source"&&(he[ue]=Q[ue]);var Ce=arguments.length-2;if(Ce===1)he.children=T;else if(1<Ce){for(var je=Array(Ce),xe=0;xe<Ce;xe++)je[xe]=arguments[xe+2];he.children=je}if(N&&N.defaultProps)for(ue in Ce=N.defaultProps,Ce)he[ue]===void 0&&(he[ue]=Ce[ue]);return se(N,fe,he)},Ae.createRef=function(){return{current:null}},Ae.forwardRef=function(N){return{$$typeof:f,render:N}},Ae.isValidElement=X,Ae.lazy=function(N){return{$$typeof:g,_payload:{_status:-1,_result:N},_init:re}},Ae.memo=function(N,Q){return{$$typeof:h,type:N,compare:Q===void 0?null:Q}},Ae.startTransition=function(N){var Q=q.T,T={};q.T=T;try{var ue=N(),he=q.S;he!==null&&he(T,ue),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"&&ue.then(j,me)}catch(fe){me(fe)}finally{Q!==null&&T.types!==null&&(Q.types=T.types),q.T=Q}},Ae.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},Ae.use=function(N){return q.H.use(N)},Ae.useActionState=function(N,Q,T){return q.H.useActionState(N,Q,T)},Ae.useCallback=function(N,Q){return q.H.useCallback(N,Q)},Ae.useContext=function(N){return q.H.useContext(N)},Ae.useDebugValue=function(){},Ae.useDeferredValue=function(N,Q){return q.H.useDeferredValue(N,Q)},Ae.useEffect=function(N,Q){return q.H.useEffect(N,Q)},Ae.useEffectEvent=function(N){return q.H.useEffectEvent(N)},Ae.useId=function(){return q.H.useId()},Ae.useImperativeHandle=function(N,Q,T){return q.H.useImperativeHandle(N,Q,T)},Ae.useInsertionEffect=function(N,Q){return q.H.useInsertionEffect(N,Q)},Ae.useLayoutEffect=function(N,Q){return q.H.useLayoutEffect(N,Q)},Ae.useMemo=function(N,Q){return q.H.useMemo(N,Q)},Ae.useOptimistic=function(N,Q){return q.H.useOptimistic(N,Q)},Ae.useReducer=function(N,Q,T){return q.H.useReducer(N,Q,T)},Ae.useRef=function(N){return q.H.useRef(N)},Ae.useState=function(N){return q.H.useState(N)},Ae.useSyncExternalStore=function(N,Q,T){return q.H.useSyncExternalStore(N,Q,T)},Ae.useTransition=function(){return q.H.useTransition()},Ae.version="19.2.4",Ae}var bb;function kh(){return bb||(bb=1,Zf.exports=CE()),Zf.exports}var F=kh();const kE=gu(F);var Jf={exports:{}},za={},Wf={exports:{}},ed={};var xb;function AE(){return xb||(xb=1,(function(e){function t(z,J){var re=z.length;z.push(J);e:for(;0<re;){var me=re-1>>>1,k=z[me];if(0<a(k,J))z[me]=J,z[re]=k,re=me;else break e}}function r(z){return z.length===0?null:z[0]}function l(z){if(z.length===0)return null;var J=z[0],re=z.pop();if(re!==J){z[0]=re;e:for(var me=0,k=z.length,N=k>>>1;me<N;){var Q=2*(me+1)-1,T=z[Q],ue=Q+1,he=z[ue];if(0>a(T,re))ue<k&&0>a(he,T)?(z[me]=he,z[ue]=re,me=ue):(z[me]=T,z[Q]=re,me=Q);else if(ue<k&&0>a(he,re))z[me]=he,z[ue]=re,me=ue;else break e}}return J}function a(z,J){var re=z.sortIndex-J.sortIndex;return re!==0?re:z.id-J.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var d=[],h=[],g=1,p=null,b=3,x=!1,w=!1,E=!1,R=!1,C=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function B(z){for(var J=r(h);J!==null;){if(J.callback===null)l(h);else if(J.startTime<=z)l(h),J.sortIndex=J.expirationTime,t(d,J);else break;J=r(h)}}function Y(z){if(E=!1,B(z),!w)if(r(d)!==null)w=!0,j||(j=!0,te());else{var J=r(h);J!==null&&ne(Y,J.startTime-z)}}var j=!1,q=-1,G=5,se=-1;function P(){return R?!0:!(e.unstable_now()-se<G)}function X(){if(R=!1,j){var z=e.unstable_now();se=z;var J=!0;try{e:{w=!1,E&&(E=!1,L(q),q=-1),x=!0;var re=b;try{t:{for(B(z),p=r(d);p!==null&&!(p.expirationTime>z&&P());){var me=p.callback;if(typeof me=="function"){p.callback=null,b=p.priorityLevel;var k=me(p.expirationTime<=z);if(z=e.unstable_now(),typeof k=="function"){p.callback=k,B(z),J=!0;break t}p===r(d)&&l(d),B(z)}else l(d);p=r(d)}if(p!==null)J=!0;else{var N=r(h);N!==null&&ne(Y,N.startTime-z),J=!1}}break e}finally{p=null,b=re,x=!1}J=void 0}}finally{J?te():j=!1}}}var te;if(typeof O=="function")te=function(){O(X)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,le=de.port2;de.port1.onmessage=X,te=function(){le.postMessage(null)}}else te=function(){C(X,0)};function ne(z,J){q=C(function(){z(e.unstable_now())},J)}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(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(z){switch(b){case 1:case 2:case 3:var J=3;break;default:J=b}var re=b;b=J;try{return z()}finally{b=re}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(z,J){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var re=b;b=z;try{return J()}finally{b=re}},e.unstable_scheduleCallback=function(z,J,re){var me=e.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?me+re:me):re=me,z){case 1:var k=-1;break;case 2:k=250;break;case 5:k=1073741823;break;case 4:k=1e4;break;default:k=5e3}return k=re+k,z={id:g++,callback:J,priorityLevel:z,startTime:re,expirationTime:k,sortIndex:-1},re>me?(z.sortIndex=re,t(h,z),r(d)===null&&z===r(h)&&(E?(L(q),q=-1):E=!0,ne(Y,re-me))):(z.sortIndex=k,t(d,z),w||x||(w=!0,j||(j=!0,te()))),z},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(z){var J=b;return function(){var re=b;b=J;try{return z.apply(this,arguments)}finally{b=re}}}})(ed)),ed}var vb;function TE(){return vb||(vb=1,Wf.exports=AE()),Wf.exports}var td={exports:{}},qt={};var _b;function RE(){if(_b)return qt;_b=1;var e=kh();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var l={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},a=Symbol.for("react.portal");function o(d,h,g){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:p==null?null:""+p,children:d,containerInfo:h,implementation:g}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,qt.createPortal=function(d,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(d,h,null,g)},qt.flushSync=function(d){var h=u.T,g=l.p;try{if(u.T=null,l.p=2,d)return d()}finally{u.T=h,l.p=g,l.d.f()}},qt.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,l.d.C(d,h))},qt.prefetchDNS=function(d){typeof d=="string"&&l.d.D(d)},qt.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var g=h.as,p=f(g,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?l.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:b,fetchPriority:x}):g==="script"&&l.d.X(d,{crossOrigin:p,integrity:b,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},qt.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=f(h.as,h.crossOrigin);l.d.M(d,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&l.d.M(d)},qt.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,p=f(g,h.crossOrigin);l.d.L(d,g,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},qt.preloadModule=function(d,h){if(typeof d=="string")if(h){var g=f(h.as,h.crossOrigin);l.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else l.d.m(d)},qt.requestFormReset=function(d){l.d.r(d)},qt.unstable_batchedUpdates=function(d,h){return d(h)},qt.useFormState=function(d,h,g){return u.H.useFormState(d,h,g)},qt.useFormStatus=function(){return u.H.useHostTransitionStatus()},qt.version="19.2.4",qt}var wb;function Px(){if(wb)return td.exports;wb=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(),td.exports=RE(),td.exports}var Sb;function LE(){if(Sb)return za;Sb=1;var e=TE(),t=kh(),r=Px();function l(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 a(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 u(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 d(n){if(o(n)!==n)throw Error(l(188))}function h(n){var i=n.alternate;if(!i){if(i=o(n),i===null)throw Error(l(188));return i!==n?null:n}for(var s=n,c=i;;){var m=s.return;if(m===null)break;var y=m.alternate;if(y===null){if(c=m.return,c!==null){s=c;continue}break}if(m.child===y.child){for(y=m.child;y;){if(y===s)return d(m),n;if(y===c)return d(m),i;y=y.sibling}throw Error(l(188))}if(s.return!==c.return)s=m,c=y;else{for(var _=!1,S=m.child;S;){if(S===s){_=!0,s=m,c=y;break}if(S===c){_=!0,c=m,s=y;break}S=S.sibling}if(!_){for(S=y.child;S;){if(S===s){_=!0,s=y,c=m;break}if(S===c){_=!0,c=y,s=m;break}S=S.sibling}if(!_)throw Error(l(189))}}if(s.alternate!==c)throw Error(l(190))}if(s.tag!==3)throw Error(l(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 p=Object.assign,b=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),O=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),se=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function te(n){return n===null||typeof n!="object"?null:(n=X&&n[X]||n["@@iterator"],typeof n=="function"?n:null)}var de=Symbol.for("react.client.reference");function le(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===de?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case E:return"Fragment";case C:return"Profiler";case R:return"StrictMode";case Y:return"Suspense";case j:return"SuspenseList";case se:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case w:return"Portal";case O:return n.displayName||"Context";case L:return(n._context.displayName||"Context")+".Consumer";case B:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case q:return i=n.displayName||null,i!==null?i:le(n.type)||"Memo";case G:i=n._payload,n=n._init;try{return le(n(i))}catch{}}return null}var ne=Array.isArray,z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},me=[],k=-1;function N(n){return{current:n}}function Q(n){0>k||(n.current=me[k],me[k]=null,k--)}function T(n,i){k++,me[k]=n.current,n.current=i}var ue=N(null),he=N(null),fe=N(null),Ce=N(null);function je(n,i){switch(T(fe,i),T(he,n),T(ue,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?Py(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=Py(i),n=By(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}Q(ue),T(ue,n)}function xe(){Q(ue),Q(he),Q(fe)}function yt(n){n.memoizedState!==null&&T(Ce,n);var i=ue.current,s=By(i,n.type);i!==s&&(T(he,n),T(ue,s))}function St(n){he.current===n&&(Q(ue),Q(he)),Ce.current===n&&(Q(Ce),Oa._currentValue=re)}var Et,Gt;function Ot(n){if(Et===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);Et=i&&i[1]||"",Gt=-1<s.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
-
`+
|
|
4
|
+
`+Et+n+Gt}var wn=!1;function _e(n,i){if(!n||wn)return"";wn=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var ee=function(){throw Error()};if(Object.defineProperty(ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ee,[])}catch($){var H=$}Reflect.construct(n,[],ee)}else{try{ee.call()}catch($){H=$}n.call(ee.prototype)}}else{try{throw Error()}catch($){H=$}(ee=n())&&typeof ee.catch=="function"&&ee.catch(function(){})}}catch($){if($&&H&&typeof $.stack=="string")return[$.stack,H.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=c.DetermineComponentFrameRoot(),_=y[0],S=y[1];if(_&&S){var D=_.split(`
|
|
5
5
|
`),V=S.split(`
|
|
6
6
|
`);for(m=c=0;c<D.length&&!D[c].includes("DetermineComponentFrameRoot");)c++;for(;m<V.length&&!V[m].includes("DetermineComponentFrameRoot");)m++;if(c===D.length||m===V.length)for(c=D.length-1,m=V.length-1;1<=c&&0<=m&&D[c]!==V[m];)m--;for(;1<=c&&0<=m;c--,m--)if(D[c]!==V[m]){if(c!==1||m!==1)do if(c--,m--,0>m||D[c]!==V[m]){var K=`
|
|
7
|
-
`+D[c].replace(" at new "," at ");return n.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",n.displayName)),K}while(1<=c&&0<=m);break}}}finally{
|
|
7
|
+
`+D[c].replace(" at new "," at ");return n.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",n.displayName)),K}while(1<=c&&0<=m);break}}}finally{wn=!1,Error.prepareStackTrace=s}return(s=n?n.displayName||n.name:"")?Ot(s):""}function He(n,i){switch(n.tag){case 26:case 27:case 5:return Ot(n.type);case 16:return Ot("Lazy");case 13:return n.child!==i&&i!==null?Ot("Suspense Fallback"):Ot("Suspense");case 19:return Ot("SuspenseList");case 0:case 15:return _e(n.type,!1);case 11:return _e(n.type.render,!1);case 1:return _e(n.type,!0);case 31:return Ot("Activity");default:return""}}function tt(n){try{var i="",s=null;do i+=He(n,s),s=n,n=n.return;while(n);return i}catch(c){return`
|
|
8
8
|
Error generating stack: `+c.message+`
|
|
9
|
-
`+c.stack}}var Xe=Object.prototype.hasOwnProperty,lt=e.unstable_scheduleCallback,Gn=e.unstable_cancelCallback,Ui=e.unstable_shouldYield,er=e.unstable_requestPaint,St=e.unstable_now,ui=e.unstable_getCurrentPriorityLevel,J=e.unstable_ImmediatePriority,ae=e.unstable_UserBlockingPriority,we=e.unstable_NormalPriority,Ne=e.unstable_LowPriority,qe=e.unstable_IdlePriority,Ot=e.log,zn=e.unstable_setDisableYieldValue,Nt=null,se=null;function he(n){if(typeof Ot=="function"&&zn(n),se&&typeof se.setStrictMode=="function")try{se.setStrictMode(Nt,n)}catch{}}var be=Math.clz32?Math.clz32:dt,je=Math.log,Me=Math.LN2;function dt(n){return n>>>=0,n===0?32:31-(je(n)/Me|0)|0}var Fn=256,Zt=262144,Tr=4194304;function In(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 hs(n,i,s){var c=n.pendingLanes;if(c===0)return 0;var m=0,y=n.suspendedLanes,_=n.pingedLanes;n=n.warmLanes;var S=c&134217727;return S!==0?(c=S&~y,c!==0?m=In(c):(_&=S,_!==0?m=In(_):s||(s=S&~n,s!==0&&(m=In(s))))):(S=c&~y,S!==0?m=In(S):_!==0?m=In(_):s||(s=c&~n,s!==0&&(m=In(s)))),m===0?0:i!==0&&i!==m&&(i&y)===0&&(y=m&-m,s=i&-i,y>=s||y===32&&(s&4194048)!==0)?i:m}function Gl(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function cw(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 xm(){var n=Tr;return Tr<<=1,(Tr&62914560)===0&&(Tr=4194304),n}function Iu(n){for(var i=[],s=0;31>s;s++)i.push(n);return i}function Fl(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function fw(n,i,s,c,m,y){var _=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 S=n.entanglements,D=n.expirationTimes,V=n.hiddenUpdates;for(s=_&~s;0<s;){var K=31-be(s),ee=1<<K;S[K]=0,D[K]=-1;var H=V[K];if(H!==null)for(V[K]=null,K=0;K<H.length;K++){var $=H[K];$!==null&&($.lane&=-536870913)}s&=~ee}c!==0&&vm(n,c,0),y!==0&&m===0&&n.tag!==0&&(n.suspendedLanes|=y&~(_&~i))}function vm(n,i,s){n.pendingLanes|=i,n.suspendedLanes&=~i;var c=31-be(i);n.entangledLanes|=i,n.entanglements[c]=n.entanglements[c]|1073741824|s&261930}function _m(n,i){var s=n.entangledLanes|=i;for(n=n.entanglements;s;){var c=31-be(s),m=1<<c;m&i|n[c]&i&&(n[c]|=i),s&=~m}}function wm(n,i){var s=i&-i;return s=(s&42)!==0?1:Pu(s),(s&(n.suspendedLanes|i))!==0?0:s}function Pu(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 Bu(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Sm(){var n=Z.p;return n!==0?n:(n=window.event,n===void 0?32:ob(n.type))}function Em(n,i){var s=Z.p;try{return Z.p=n,i()}finally{Z.p=s}}var Rr=Math.random().toString(36).slice(2),It="__reactFiber$"+Rr,Jt="__reactProps$"+Rr,Vi="__reactContainer$"+Rr,Uu="__reactEvents$"+Rr,dw="__reactListeners$"+Rr,hw="__reactHandles$"+Rr,Cm="__reactResources$"+Rr,ql="__reactMarker$"+Rr;function Vu(n){delete n[It],delete n[Jt],delete n[Uu],delete n[dw],delete n[hw]}function Hi(n){var i=n[It];if(i)return i;for(var s=n.parentNode;s;){if(i=s[Vi]||s[It]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(n=$y(n);n!==null;){if(s=n[It])return s;n=$y(n)}return i}n=s,s=n.parentNode}return null}function Gi(n){if(n=n[It]||n[Vi]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}function $l(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(l(33))}function Fi(n){var i=n[Cm];return i||(i=n[Cm]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Dt(n){n[ql]=!0}var km=new Set,Am={};function ci(n,i){qi(n,i),qi(n+"Capture",i)}function qi(n,i){for(Am[n]=i,n=0;n<i.length;n++)km.add(i[n])}var mw=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]*$"),Tm={},Rm={};function pw(n){return Xe.call(Rm,n)?!0:Xe.call(Tm,n)?!1:mw.test(n)?Rm[n]=!0:(Tm[n]=!0,!1)}function ms(n,i,s){if(pw(i))if(s===null)n.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":n.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+s)}}function ps(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 tr(n,i,s,c){if(c===null)n.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttributeNS(i,s,""+c)}}function vn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Lm(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function gw(n,i,s){var c=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var m=c.get,y=c.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return m.call(this)},set:function(_){s=""+_,y.call(this,_)}}),Object.defineProperty(n,i,{enumerable:c.enumerable}),{getValue:function(){return s},setValue:function(_){s=""+_},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function Hu(n){if(!n._valueTracker){var i=Lm(n)?"checked":"value";n._valueTracker=gw(n,i,""+n[i])}}function Om(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var s=i.getValue(),c="";return n&&(c=Lm(n)?n.checked?"true":"false":n.value),n=c,n!==s?(i.setValue(n),!0):!1}function gs(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 yw=/[\n"\\]/g;function _n(n){return n.replace(yw,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Gu(n,i,s,c,m,y,_,S){n.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?n.type=_:n.removeAttribute("type"),i!=null?_==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+vn(i)):n.value!==""+vn(i)&&(n.value=""+vn(i)):_!=="submit"&&_!=="reset"||n.removeAttribute("value"),i!=null?Fu(n,_,vn(i)):s!=null?Fu(n,_,vn(s)):c!=null&&n.removeAttribute("value"),m==null&&y!=null&&(n.defaultChecked=!!y),m!=null&&(n.checked=m&&typeof m!="function"&&typeof m!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.name=""+vn(S):n.removeAttribute("name")}function Nm(n,i,s,c,m,y,_,S){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(n.type=y),i!=null||s!=null){if(!(y!=="submit"&&y!=="reset"||i!=null)){Hu(n);return}s=s!=null?""+vn(s):"",i=i!=null?""+vn(i):s,S||i===n.value||(n.value=i),n.defaultValue=i}c=c??m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,n.checked=S?n.checked:!!c,n.defaultChecked=!!c,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(n.name=_),Hu(n)}function Fu(n,i,s){i==="number"&&gs(n.ownerDocument)===n||n.defaultValue===""+s||(n.defaultValue=""+s)}function $i(n,i,s,c){if(n=n.options,i){i={};for(var m=0;m<s.length;m++)i["$"+s[m]]=!0;for(s=0;s<n.length;s++)m=i.hasOwnProperty("$"+n[s].value),n[s].selected!==m&&(n[s].selected=m),m&&c&&(n[s].defaultSelected=!0)}else{for(s=""+vn(s),i=null,m=0;m<n.length;m++){if(n[m].value===s){n[m].selected=!0,c&&(n[m].defaultSelected=!0);return}i!==null||n[m].disabled||(i=n[m])}i!==null&&(i.selected=!0)}}function Dm(n,i,s){if(i!=null&&(i=""+vn(i),i!==n.value&&(n.value=i),s==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=s!=null?""+vn(s):""}function Mm(n,i,s,c){if(i==null){if(c!=null){if(s!=null)throw Error(l(92));if(ne(c)){if(1<c.length)throw Error(l(93));c=c[0]}s=c}s==null&&(s=""),i=s}s=vn(i),n.defaultValue=s,c=n.textContent,c===s&&c!==""&&c!==null&&(n.value=c),Hu(n)}function Qi(n,i){if(i){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=i;return}}n.textContent=i}var bw=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 jm(n,i,s){var c=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?c?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":c?n.setProperty(i,s):typeof s!="number"||s===0||bw.has(i)?i==="float"?n.cssFloat=s:n[i]=(""+s).trim():n[i]=s+"px"}function zm(n,i,s){if(i!=null&&typeof i!="object")throw Error(l(62));if(n=n.style,s!=null){for(var c in s)!s.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?n.setProperty(c,""):c==="float"?n.cssFloat="":n[c]="");for(var m in i)c=i[m],i.hasOwnProperty(m)&&s[m]!==c&&jm(n,m,c)}else for(var y in i)i.hasOwnProperty(y)&&jm(n,y,i[y])}function qu(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 xw=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"]]),vw=/^[\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 ys(n){return vw.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function nr(){}var $u=null;function Qu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Yi=null,Xi=null;function Im(n){var i=Gi(n);if(i&&(n=i.stateNode)){var s=n[Jt]||null;e:switch(n=i.stateNode,i.type){case"input":if(Gu(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="'+_n(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var c=s[i];if(c!==n&&c.form===n.form){var m=c[Jt]||null;if(!m)throw Error(l(90));Gu(c,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(i=0;i<s.length;i++)c=s[i],c.form===n.form&&Om(c)}break e;case"textarea":Dm(n,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&$i(n,!!s.multiple,i,!1)}}}var Yu=!1;function Pm(n,i,s){if(Yu)return n(i,s);Yu=!0;try{var c=n(i);return c}finally{if(Yu=!1,(Yi!==null||Xi!==null)&&(io(),Yi&&(i=Yi,n=Xi,Xi=Yi=null,Im(i),n)))for(i=0;i<n.length;i++)Im(n[i])}}function Ql(n,i){var s=n.stateNode;if(s===null)return null;var c=s[Jt]||null;if(c===null)return null;s=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(l(231,i,typeof s));return s}var rr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xu=!1;if(rr)try{var Yl={};Object.defineProperty(Yl,"passive",{get:function(){Xu=!0}}),window.addEventListener("test",Yl,Yl),window.removeEventListener("test",Yl,Yl)}catch{Xu=!1}var Lr=null,Ku=null,bs=null;function Bm(){if(bs)return bs;var n,i=Ku,s=i.length,c,m="value"in Lr?Lr.value:Lr.textContent,y=m.length;for(n=0;n<s&&i[n]===m[n];n++);var _=s-n;for(c=1;c<=_&&i[s-c]===m[y-c];c++);return bs=m.slice(n,1<c?1-c:void 0)}function xs(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 vs(){return!0}function Um(){return!1}function Wt(n){function i(s,c,m,y,_){this._reactName=s,this._targetInst=m,this.type=c,this.nativeEvent=y,this.target=_,this.currentTarget=null;for(var S in n)n.hasOwnProperty(S)&&(s=n[S],this[S]=s?s(y):y[S]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?vs:Um,this.isPropagationStopped=Um,this}return p(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=vs)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=vs)},persist:function(){},isPersistent:vs}),i}var fi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_s=Wt(fi),Xl=p({},fi,{view:0,detail:0}),_w=Wt(Xl),Zu,Ju,Kl,ws=p({},Xl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ec,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!==Kl&&(Kl&&n.type==="mousemove"?(Zu=n.screenX-Kl.screenX,Ju=n.screenY-Kl.screenY):Ju=Zu=0,Kl=n),Zu)},movementY:function(n){return"movementY"in n?n.movementY:Ju}}),Vm=Wt(ws),ww=p({},ws,{dataTransfer:0}),Sw=Wt(ww),Ew=p({},Xl,{relatedTarget:0}),Wu=Wt(Ew),Cw=p({},fi,{animationName:0,elapsedTime:0,pseudoElement:0}),kw=Wt(Cw),Aw=p({},fi,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Tw=Wt(Aw),Rw=p({},fi,{data:0}),Hm=Wt(Rw),Lw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ow={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"},Nw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dw(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=Nw[n])?!!i[n]:!1}function ec(){return Dw}var Mw=p({},Xl,{key:function(n){if(n.key){var i=Lw[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=xs(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?Ow[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ec,charCode:function(n){return n.type==="keypress"?xs(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?xs(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),jw=Wt(Mw),zw=p({},ws,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gm=Wt(zw),Iw=p({},Xl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ec}),Pw=Wt(Iw),Bw=p({},fi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Uw=Wt(Bw),Vw=p({},ws,{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}),Hw=Wt(Vw),Gw=p({},fi,{newState:0,oldState:0}),Fw=Wt(Gw),qw=[9,13,27,32],tc=rr&&"CompositionEvent"in window,Zl=null;rr&&"documentMode"in document&&(Zl=document.documentMode);var $w=rr&&"TextEvent"in window&&!Zl,Fm=rr&&(!tc||Zl&&8<Zl&&11>=Zl),qm=" ",$m=!1;function Qm(n,i){switch(n){case"keyup":return qw.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ym(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Ki=!1;function Qw(n,i){switch(n){case"compositionend":return Ym(i);case"keypress":return i.which!==32?null:($m=!0,qm);case"textInput":return n=i.data,n===qm&&$m?null:n;default:return null}}function Yw(n,i){if(Ki)return n==="compositionend"||!tc&&Qm(n,i)?(n=Bm(),bs=Ku=Lr=null,Ki=!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 Fm&&i.locale!=="ko"?null:i.data;default:return null}}var Xw={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 Xm(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!Xw[n.type]:i==="textarea"}function Km(n,i,s,c){Yi?Xi?Xi.push(c):Xi=[c]:Yi=c,i=fo(i,"onChange"),0<i.length&&(s=new _s("onChange","change",null,s,c),n.push({event:s,listeners:i}))}var Jl=null,Wl=null;function Kw(n){Ny(n,0)}function Ss(n){var i=$l(n);if(Om(i))return n}function Zm(n,i){if(n==="change")return i}var Jm=!1;if(rr){var nc;if(rr){var rc="oninput"in document;if(!rc){var Wm=document.createElement("div");Wm.setAttribute("oninput","return;"),rc=typeof Wm.oninput=="function"}nc=rc}else nc=!1;Jm=nc&&(!document.documentMode||9<document.documentMode)}function ep(){Jl&&(Jl.detachEvent("onpropertychange",tp),Wl=Jl=null)}function tp(n){if(n.propertyName==="value"&&Ss(Wl)){var i=[];Km(i,Wl,n,Qu(n)),Pm(Kw,i)}}function Zw(n,i,s){n==="focusin"?(ep(),Jl=i,Wl=s,Jl.attachEvent("onpropertychange",tp)):n==="focusout"&&ep()}function Jw(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Ss(Wl)}function Ww(n,i){if(n==="click")return Ss(i)}function eS(n,i){if(n==="input"||n==="change")return Ss(i)}function tS(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var un=typeof Object.is=="function"?Object.is:tS;function ea(n,i){if(un(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var s=Object.keys(n),c=Object.keys(i);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var m=s[c];if(!Xe.call(i,m)||!un(n[m],i[m]))return!1}return!0}function np(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function rp(n,i){var s=np(n);n=0;for(var c;s;){if(s.nodeType===3){if(c=n+s.textContent.length,n<=i&&c>=i)return{node:s,offset:i-n};n=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=np(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 lp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=gs(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=gs(n.document)}return i}function ic(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 nS=rr&&"documentMode"in document&&11>=document.documentMode,Zi=null,lc=null,ta=null,ac=!1;function ap(n,i,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;ac||Zi==null||Zi!==gs(c)||(c=Zi,"selectionStart"in c&&ic(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ta&&ea(ta,c)||(ta=c,c=fo(lc,"onSelect"),0<c.length&&(i=new _s("onSelect","select",null,i,s),n.push({event:i,listeners:c}),i.target=Zi)))}function di(n,i){var s={};return s[n.toLowerCase()]=i.toLowerCase(),s["Webkit"+n]="webkit"+i,s["Moz"+n]="moz"+i,s}var Ji={animationend:di("Animation","AnimationEnd"),animationiteration:di("Animation","AnimationIteration"),animationstart:di("Animation","AnimationStart"),transitionrun:di("Transition","TransitionRun"),transitionstart:di("Transition","TransitionStart"),transitioncancel:di("Transition","TransitionCancel"),transitionend:di("Transition","TransitionEnd")},sc={},sp={};rr&&(sp=document.createElement("div").style,"AnimationEvent"in window||(delete Ji.animationend.animation,delete Ji.animationiteration.animation,delete Ji.animationstart.animation),"TransitionEvent"in window||delete Ji.transitionend.transition);function hi(n){if(sc[n])return sc[n];if(!Ji[n])return n;var i=Ji[n],s;for(s in i)if(i.hasOwnProperty(s)&&s in sp)return sc[n]=i[s];return n}var op=hi("animationend"),up=hi("animationiteration"),cp=hi("animationstart"),rS=hi("transitionrun"),iS=hi("transitionstart"),lS=hi("transitioncancel"),fp=hi("transitionend"),dp=new Map,oc="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(" ");oc.push("scrollEnd");function Pn(n,i){dp.set(n,i),ci(i,[n])}var Es=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)},wn=[],Wi=0,uc=0;function Cs(){for(var n=Wi,i=uc=Wi=0;i<n;){var s=wn[i];wn[i++]=null;var c=wn[i];wn[i++]=null;var m=wn[i];wn[i++]=null;var y=wn[i];if(wn[i++]=null,c!==null&&m!==null){var _=c.pending;_===null?m.next=m:(m.next=_.next,_.next=m),c.pending=m}y!==0&&hp(s,m,y)}}function ks(n,i,s,c){wn[Wi++]=n,wn[Wi++]=i,wn[Wi++]=s,wn[Wi++]=c,uc|=c,n.lanes|=c,n=n.alternate,n!==null&&(n.lanes|=c)}function cc(n,i,s,c){return ks(n,i,s,c),As(n)}function mi(n,i){return ks(n,null,null,i),As(n)}function hp(n,i,s){n.lanes|=s;var c=n.alternate;c!==null&&(c.lanes|=s);for(var m=!1,y=n.return;y!==null;)y.childLanes|=s,c=y.alternate,c!==null&&(c.childLanes|=s),y.tag===22&&(n=y.stateNode,n===null||n._visibility&1||(m=!0)),n=y,y=y.return;return n.tag===3?(y=n.stateNode,m&&i!==null&&(m=31-be(s),n=y.hiddenUpdates,c=n[m],c===null?n[m]=[i]:c.push(i),i.lane=s|536870912),y):null}function As(n){if(50<Sa)throw Sa=0,vf=null,Error(l(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}var el={};function aS(n,i,s,c){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=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cn(n,i,s,c){return new aS(n,i,s,c)}function fc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function ir(n,i){var s=n.alternate;return s===null?(s=cn(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 mp(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 Ts(n,i,s,c,m,y){var _=0;if(c=n,typeof n=="function")fc(n)&&(_=1);else if(typeof n=="string")_=fE(n,s,ue.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case oe:return n=cn(31,s,i,m),n.elementType=oe,n.lanes=y,n;case E:return pi(s.children,m,y,i);case R:_=8,m|=24;break;case C:return n=cn(12,s,i,m|2),n.elementType=C,n.lanes=y,n;case Y:return n=cn(13,s,i,m),n.elementType=Y,n.lanes=y,n;case j:return n=cn(19,s,i,m),n.elementType=j,n.lanes=y,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case O:_=10;break e;case L:_=9;break e;case B:_=11;break e;case q:_=14;break e;case G:_=16,c=null;break e}_=29,s=Error(l(130,n===null?"null":typeof n,"")),c=null}return i=cn(_,s,i,m),i.elementType=n,i.type=c,i.lanes=y,i}function pi(n,i,s,c){return n=cn(7,n,c,i),n.lanes=s,n}function dc(n,i,s){return n=cn(6,n,null,i),n.lanes=s,n}function pp(n){var i=cn(18,null,null,0);return i.stateNode=n,i}function hc(n,i,s){return i=cn(4,n.children!==null?n.children:[],n.key,i),i.lanes=s,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}var gp=new WeakMap;function Sn(n,i){if(typeof n=="object"&&n!==null){var s=gp.get(n);return s!==void 0?s:(i={value:n,source:i,stack:He(i)},gp.set(n,i),i)}return{value:n,source:i,stack:He(i)}}var tl=[],nl=0,Rs=null,na=0,En=[],Cn=0,Or=null,qn=1,$n="";function lr(n,i){tl[nl++]=na,tl[nl++]=Rs,Rs=n,na=i}function yp(n,i,s){En[Cn++]=qn,En[Cn++]=$n,En[Cn++]=Or,Or=n;var c=qn;n=$n;var m=32-be(c)-1;c&=~(1<<m),s+=1;var y=32-be(i)+m;if(30<y){var _=m-m%5;y=(c&(1<<_)-1).toString(32),c>>=_,m-=_,qn=1<<32-be(i)+m|s<<m|c,$n=y+n}else qn=1<<y|s<<m|c,$n=n}function mc(n){n.return!==null&&(lr(n,1),yp(n,1,0))}function pc(n){for(;n===Rs;)Rs=tl[--nl],tl[nl]=null,na=tl[--nl],tl[nl]=null;for(;n===Or;)Or=En[--Cn],En[Cn]=null,$n=En[--Cn],En[Cn]=null,qn=En[--Cn],En[Cn]=null}function bp(n,i){En[Cn++]=qn,En[Cn++]=$n,En[Cn++]=Or,qn=i.id,$n=i.overflow,Or=n}var Pt=null,at=null,Ve=!1,Nr=null,kn=!1,gc=Error(l(519));function Dr(n){var i=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ra(Sn(i,n)),gc}function xp(n){var i=n.stateNode,s=n.type,c=n.memoizedProps;switch(i[It]=n,i[Jt]=c,s){case"dialog":Ie("cancel",i),Ie("close",i);break;case"iframe":case"object":case"embed":Ie("load",i);break;case"video":case"audio":for(s=0;s<Ca.length;s++)Ie(Ca[s],i);break;case"source":Ie("error",i);break;case"img":case"image":case"link":Ie("error",i),Ie("load",i);break;case"details":Ie("toggle",i);break;case"input":Ie("invalid",i),Nm(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Ie("invalid",i);break;case"textarea":Ie("invalid",i),Mm(i,c.value,c.defaultValue,c.children)}s=c.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||c.suppressHydrationWarning===!0||zy(i.textContent,s)?(c.popover!=null&&(Ie("beforetoggle",i),Ie("toggle",i)),c.onScroll!=null&&Ie("scroll",i),c.onScrollEnd!=null&&Ie("scrollend",i),c.onClick!=null&&(i.onclick=nr),i=!0):i=!1,i||Dr(n,!0)}function vp(n){for(Pt=n.return;Pt;)switch(Pt.tag){case 5:case 31:case 13:kn=!1;return;case 27:case 3:kn=!0;return;default:Pt=Pt.return}}function rl(n){if(n!==Pt)return!1;if(!Ve)return vp(n),Ve=!0,!1;var i=n.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=n.type,s=!(s!=="form"&&s!=="button")||jf(n.type,n.memoizedProps)),s=!s),s&&at&&Dr(n),vp(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(l(317));at=qy(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(l(317));at=qy(n)}else i===27?(i=at,Qr(n.type)?(n=Uf,Uf=null,at=n):at=i):at=Pt?Tn(n.stateNode.nextSibling):null;return!0}function gi(){at=Pt=null,Ve=!1}function yc(){var n=Nr;return n!==null&&(rn===null?rn=n:rn.push.apply(rn,n),Nr=null),n}function ra(n){Nr===null?Nr=[n]:Nr.push(n)}var bc=N(null),yi=null,ar=null;function Mr(n,i,s){T(bc,i._currentValue),i._currentValue=s}function sr(n){n._currentValue=bc.current,Q(bc)}function xc(n,i,s){for(;n!==null;){var c=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),n===s)break;n=n.return}}function vc(n,i,s,c){var m=n.child;for(m!==null&&(m.return=n);m!==null;){var y=m.dependencies;if(y!==null){var _=m.child;y=y.firstContext;e:for(;y!==null;){var S=y;y=m;for(var D=0;D<i.length;D++)if(S.context===i[D]){y.lanes|=s,S=y.alternate,S!==null&&(S.lanes|=s),xc(y.return,s,n),c||(_=null);break e}y=S.next}}else if(m.tag===18){if(_=m.return,_===null)throw Error(l(341));_.lanes|=s,y=_.alternate,y!==null&&(y.lanes|=s),xc(_,s,n),_=null}else _=m.child;if(_!==null)_.return=m;else for(_=m;_!==null;){if(_===n){_=null;break}if(m=_.sibling,m!==null){m.return=_.return,_=m;break}_=_.return}m=_}}function il(n,i,s,c){n=null;for(var m=i,y=!1;m!==null;){if(!y){if((m.flags&524288)!==0)y=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var _=m.alternate;if(_===null)throw Error(l(387));if(_=_.memoizedProps,_!==null){var S=m.type;un(m.pendingProps.value,_.value)||(n!==null?n.push(S):n=[S])}}else if(m===ke.current){if(_=m.alternate,_===null)throw Error(l(387));_.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(n!==null?n.push(La):n=[La])}m=m.return}n!==null&&vc(i,n,s,c),i.flags|=262144}function Ls(n){for(n=n.firstContext;n!==null;){if(!un(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function bi(n){yi=n,ar=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Bt(n){return _p(yi,n)}function Os(n,i){return yi===null&&bi(n),_p(n,i)}function _p(n,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},ar===null){if(n===null)throw Error(l(308));ar=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else ar=ar.next=i;return s}var sS=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:function(s,c){n.push(c)}};this.abort=function(){i.aborted=!0,n.forEach(function(s){return s()})}},oS=e.unstable_scheduleCallback,uS=e.unstable_NormalPriority,yt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _c(){return{controller:new sS,data:new Map,refCount:0}}function ia(n){n.refCount--,n.refCount===0&&oS(uS,function(){n.controller.abort()})}var la=null,wc=0,ll=0,al=null;function cS(n,i){if(la===null){var s=la=[];wc=0,ll=kf(),al={status:"pending",value:void 0,then:function(c){s.push(c)}}}return wc++,i.then(wp,wp),i}function wp(){if(--wc===0&&la!==null){al!==null&&(al.status="fulfilled");var n=la;la=null,ll=0,al=null;for(var i=0;i<n.length;i++)(0,n[i])()}}function fS(n,i){var s=[],c={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return n.then(function(){c.status="fulfilled",c.value=i;for(var m=0;m<s.length;m++)(0,s[m])(i)},function(m){for(c.status="rejected",c.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),c}var Sp=z.S;z.S=function(n,i){ay=St(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&cS(n,i),Sp!==null&&Sp(n,i)};var xi=N(null);function Sc(){var n=xi.current;return n!==null?n:tt.pooledCache}function Ns(n,i){i===null?T(xi,xi.current):T(xi,i.pool)}function Ep(){var n=Sc();return n===null?null:{parent:yt._currentValue,pool:n}}var sl=Error(l(460)),Ec=Error(l(474)),Ds=Error(l(542)),Ms={then:function(){}};function Cp(n){return n=n.status,n==="fulfilled"||n==="rejected"}function kp(n,i,s){switch(s=n[s],s===void 0?n.push(i):s!==i&&(i.then(nr,nr),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,Tp(n),n;default:if(typeof i.status=="string")i.then(nr,nr);else{if(n=tt,n!==null&&100<n.shellSuspendCounter)throw Error(l(482));n=i,n.status="pending",n.then(function(c){if(i.status==="pending"){var m=i;m.status="fulfilled",m.value=c}},function(c){if(i.status==="pending"){var m=i;m.status="rejected",m.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,Tp(n),n}throw _i=i,sl}}function vi(n){try{var i=n._init;return i(n._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(_i=s,sl):s}}var _i=null;function Ap(){if(_i===null)throw Error(l(459));var n=_i;return _i=null,n}function Tp(n){if(n===sl||n===Ds)throw Error(l(483))}var ol=null,aa=0;function js(n){var i=aa;return aa+=1,ol===null&&(ol=[]),kp(ol,n,i)}function sa(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}function zs(n,i){throw i.$$typeof===b?Error(l(525)):(n=Object.prototype.toString.call(i),Error(l(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}function Rp(n){function i(I,M){if(n){var U=I.deletions;U===null?(I.deletions=[M],I.flags|=16):U.push(M)}}function s(I,M){if(!n)return null;for(;M!==null;)i(I,M),M=M.sibling;return null}function c(I){for(var M=new Map;I!==null;)I.key!==null?M.set(I.key,I):M.set(I.index,I),I=I.sibling;return M}function m(I,M){return I=ir(I,M),I.index=0,I.sibling=null,I}function y(I,M,U){return I.index=U,n?(U=I.alternate,U!==null?(U=U.index,U<M?(I.flags|=67108866,M):U):(I.flags|=67108866,M)):(I.flags|=1048576,M)}function _(I){return n&&I.alternate===null&&(I.flags|=67108866),I}function S(I,M,U,W){return M===null||M.tag!==6?(M=dc(U,I.mode,W),M.return=I,M):(M=m(M,U),M.return=I,M)}function D(I,M,U,W){var _e=U.type;return _e===E?K(I,M,U.props.children,W,U.key):M!==null&&(M.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===G&&vi(_e)===M.type)?(M=m(M,U.props),sa(M,U),M.return=I,M):(M=Ts(U.type,U.key,U.props,null,I.mode,W),sa(M,U),M.return=I,M)}function V(I,M,U,W){return M===null||M.tag!==4||M.stateNode.containerInfo!==U.containerInfo||M.stateNode.implementation!==U.implementation?(M=hc(U,I.mode,W),M.return=I,M):(M=m(M,U.children||[]),M.return=I,M)}function K(I,M,U,W,_e){return M===null||M.tag!==7?(M=pi(U,I.mode,W,_e),M.return=I,M):(M=m(M,U),M.return=I,M)}function ee(I,M,U){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=dc(""+M,I.mode,U),M.return=I,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case x:return U=Ts(M.type,M.key,M.props,null,I.mode,U),sa(U,M),U.return=I,U;case w:return M=hc(M,I.mode,U),M.return=I,M;case G:return M=vi(M),ee(I,M,U)}if(ne(M)||te(M))return M=pi(M,I.mode,U,null),M.return=I,M;if(typeof M.then=="function")return ee(I,js(M),U);if(M.$$typeof===O)return ee(I,Os(I,M),U);zs(I,M)}return null}function H(I,M,U,W){var _e=M!==null?M.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return _e!==null?null:S(I,M,""+U,W);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case x:return U.key===_e?D(I,M,U,W):null;case w:return U.key===_e?V(I,M,U,W):null;case G:return U=vi(U),H(I,M,U,W)}if(ne(U)||te(U))return _e!==null?null:K(I,M,U,W,null);if(typeof U.then=="function")return H(I,M,js(U),W);if(U.$$typeof===O)return H(I,M,Os(I,U),W);zs(I,U)}return null}function $(I,M,U,W,_e){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return I=I.get(U)||null,S(M,I,""+W,_e);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case x:return I=I.get(W.key===null?U:W.key)||null,D(M,I,W,_e);case w:return I=I.get(W.key===null?U:W.key)||null,V(M,I,W,_e);case G:return W=vi(W),$(I,M,U,W,_e)}if(ne(W)||te(W))return I=I.get(U)||null,K(M,I,W,_e,null);if(typeof W.then=="function")return $(I,M,U,js(W),_e);if(W.$$typeof===O)return $(I,M,U,Os(M,W),_e);zs(M,W)}return null}function pe(I,M,U,W){for(var _e=null,$e=null,xe=M,Le=M=0,Ue=null;xe!==null&&Le<U.length;Le++){xe.index>Le?(Ue=xe,xe=null):Ue=xe.sibling;var Qe=H(I,xe,U[Le],W);if(Qe===null){xe===null&&(xe=Ue);break}n&&xe&&Qe.alternate===null&&i(I,xe),M=y(Qe,M,Le),$e===null?_e=Qe:$e.sibling=Qe,$e=Qe,xe=Ue}if(Le===U.length)return s(I,xe),Ve&&lr(I,Le),_e;if(xe===null){for(;Le<U.length;Le++)xe=ee(I,U[Le],W),xe!==null&&(M=y(xe,M,Le),$e===null?_e=xe:$e.sibling=xe,$e=xe);return Ve&&lr(I,Le),_e}for(xe=c(xe);Le<U.length;Le++)Ue=$(xe,I,Le,U[Le],W),Ue!==null&&(n&&Ue.alternate!==null&&xe.delete(Ue.key===null?Le:Ue.key),M=y(Ue,M,Le),$e===null?_e=Ue:$e.sibling=Ue,$e=Ue);return n&&xe.forEach(function(Jr){return i(I,Jr)}),Ve&&lr(I,Le),_e}function Ce(I,M,U,W){if(U==null)throw Error(l(151));for(var _e=null,$e=null,xe=M,Le=M=0,Ue=null,Qe=U.next();xe!==null&&!Qe.done;Le++,Qe=U.next()){xe.index>Le?(Ue=xe,xe=null):Ue=xe.sibling;var Jr=H(I,xe,Qe.value,W);if(Jr===null){xe===null&&(xe=Ue);break}n&&xe&&Jr.alternate===null&&i(I,xe),M=y(Jr,M,Le),$e===null?_e=Jr:$e.sibling=Jr,$e=Jr,xe=Ue}if(Qe.done)return s(I,xe),Ve&&lr(I,Le),_e;if(xe===null){for(;!Qe.done;Le++,Qe=U.next())Qe=ee(I,Qe.value,W),Qe!==null&&(M=y(Qe,M,Le),$e===null?_e=Qe:$e.sibling=Qe,$e=Qe);return Ve&&lr(I,Le),_e}for(xe=c(xe);!Qe.done;Le++,Qe=U.next())Qe=$(xe,I,Le,Qe.value,W),Qe!==null&&(n&&Qe.alternate!==null&&xe.delete(Qe.key===null?Le:Qe.key),M=y(Qe,M,Le),$e===null?_e=Qe:$e.sibling=Qe,$e=Qe);return n&&xe.forEach(function(wE){return i(I,wE)}),Ve&&lr(I,Le),_e}function et(I,M,U,W){if(typeof U=="object"&&U!==null&&U.type===E&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case x:e:{for(var _e=U.key;M!==null;){if(M.key===_e){if(_e=U.type,_e===E){if(M.tag===7){s(I,M.sibling),W=m(M,U.props.children),W.return=I,I=W;break e}}else if(M.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===G&&vi(_e)===M.type){s(I,M.sibling),W=m(M,U.props),sa(W,U),W.return=I,I=W;break e}s(I,M);break}else i(I,M);M=M.sibling}U.type===E?(W=pi(U.props.children,I.mode,W,U.key),W.return=I,I=W):(W=Ts(U.type,U.key,U.props,null,I.mode,W),sa(W,U),W.return=I,I=W)}return _(I);case w:e:{for(_e=U.key;M!==null;){if(M.key===_e)if(M.tag===4&&M.stateNode.containerInfo===U.containerInfo&&M.stateNode.implementation===U.implementation){s(I,M.sibling),W=m(M,U.children||[]),W.return=I,I=W;break e}else{s(I,M);break}else i(I,M);M=M.sibling}W=hc(U,I.mode,W),W.return=I,I=W}return _(I);case G:return U=vi(U),et(I,M,U,W)}if(ne(U))return pe(I,M,U,W);if(te(U)){if(_e=te(U),typeof _e!="function")throw Error(l(150));return U=_e.call(U),Ce(I,M,U,W)}if(typeof U.then=="function")return et(I,M,js(U),W);if(U.$$typeof===O)return et(I,M,Os(I,U),W);zs(I,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,M!==null&&M.tag===6?(s(I,M.sibling),W=m(M,U),W.return=I,I=W):(s(I,M),W=dc(U,I.mode,W),W.return=I,I=W),_(I)):s(I,M)}return function(I,M,U,W){try{aa=0;var _e=et(I,M,U,W);return ol=null,_e}catch(xe){if(xe===sl||xe===Ds)throw xe;var $e=cn(29,xe,null,I.mode);return $e.lanes=W,$e.return=I,$e}}}var wi=Rp(!0),Lp=Rp(!1),jr=!1;function Cc(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function kc(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 zr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ir(n,i,s){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(Ye&2)!==0){var m=c.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),c.pending=i,i=As(n),hp(n,null,s),i}return ks(n,c,i,s),As(n)}function oa(n,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var c=i.lanes;c&=n.pendingLanes,s|=c,i.lanes=s,_m(n,s)}}function Ac(n,i){var s=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var m=null,y=null;if(s=s.firstBaseUpdate,s!==null){do{var _={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};y===null?m=y=_:y=y.next=_,s=s.next}while(s!==null);y===null?m=y=i:y=y.next=i}else m=y=i;s={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:y,shared:c.shared,callbacks:c.callbacks},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=i:n.next=i,s.lastBaseUpdate=i}var Tc=!1;function ua(){if(Tc){var n=al;if(n!==null)throw n}}function ca(n,i,s,c){Tc=!1;var m=n.updateQueue;jr=!1;var y=m.firstBaseUpdate,_=m.lastBaseUpdate,S=m.shared.pending;if(S!==null){m.shared.pending=null;var D=S,V=D.next;D.next=null,_===null?y=V:_.next=V,_=D;var K=n.alternate;K!==null&&(K=K.updateQueue,S=K.lastBaseUpdate,S!==_&&(S===null?K.firstBaseUpdate=V:S.next=V,K.lastBaseUpdate=D))}if(y!==null){var ee=m.baseState;_=0,K=V=D=null,S=y;do{var H=S.lane&-536870913,$=H!==S.lane;if($?(Be&H)===H:(c&H)===H){H!==0&&H===ll&&(Tc=!0),K!==null&&(K=K.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var pe=n,Ce=S;H=i;var et=s;switch(Ce.tag){case 1:if(pe=Ce.payload,typeof pe=="function"){ee=pe.call(et,ee,H);break e}ee=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=Ce.payload,H=typeof pe=="function"?pe.call(et,ee,H):pe,H==null)break e;ee=p({},ee,H);break e;case 2:jr=!0}}H=S.callback,H!==null&&(n.flags|=64,$&&(n.flags|=8192),$=m.callbacks,$===null?m.callbacks=[H]:$.push(H))}else $={lane:H,tag:S.tag,payload:S.payload,callback:S.callback,next:null},K===null?(V=K=$,D=ee):K=K.next=$,_|=H;if(S=S.next,S===null){if(S=m.shared.pending,S===null)break;$=S,S=$.next,$.next=null,m.lastBaseUpdate=$,m.shared.pending=null}}while(!0);K===null&&(D=ee),m.baseState=D,m.firstBaseUpdate=V,m.lastBaseUpdate=K,y===null&&(m.shared.lanes=0),Hr|=_,n.lanes=_,n.memoizedState=ee}}function Op(n,i){if(typeof n!="function")throw Error(l(191,n));n.call(i)}function Np(n,i){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;n<s.length;n++)Op(s[n],i)}var ul=N(null),Is=N(0);function Dp(n,i){n=gr,T(Is,n),T(ul,i),gr=n|i.baseLanes}function Rc(){T(Is,gr),T(ul,ul.current)}function Lc(){gr=Is.current,Q(ul),Q(Is)}var fn=N(null),An=null;function Pr(n){var i=n.alternate;T(ht,ht.current&1),T(fn,n),An===null&&(i===null||ul.current!==null||i.memoizedState!==null)&&(An=n)}function Oc(n){T(ht,ht.current),T(fn,n),An===null&&(An=n)}function Mp(n){n.tag===22?(T(ht,ht.current),T(fn,n),An===null&&(An=n)):Br()}function Br(){T(ht,ht.current),T(fn,fn.current)}function dn(n){Q(fn),An===n&&(An=null),Q(ht)}var ht=N(0);function Ps(n){for(var i=n;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Pf(s)||Bf(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 or=0,Re=null,Je=null,bt=null,Bs=!1,cl=!1,Si=!1,Us=0,fa=0,fl=null,dS=0;function ct(){throw Error(l(321))}function Nc(n,i){if(i===null)return!1;for(var s=0;s<i.length&&s<n.length;s++)if(!un(n[s],i[s]))return!1;return!0}function Dc(n,i,s,c,m,y){return or=y,Re=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,z.H=n===null||n.memoizedState===null?yg:Yc,Si=!1,y=s(c,m),Si=!1,cl&&(y=zp(i,s,c,m)),jp(n),y}function jp(n){z.H=ma;var i=Je!==null&&Je.next!==null;if(or=0,bt=Je=Re=null,Bs=!1,fa=0,fl=null,i)throw Error(l(300));n===null||xt||(n=n.dependencies,n!==null&&Ls(n)&&(xt=!0))}function zp(n,i,s,c){Re=n;var m=0;do{if(cl&&(fl=null),fa=0,cl=!1,25<=m)throw Error(l(301));if(m+=1,bt=Je=null,n.updateQueue!=null){var y=n.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}z.H=bg,y=i(s,c)}while(cl);return y}function hS(){var n=z.H,i=n.useState()[0];return i=typeof i.then=="function"?da(i):i,n=n.useState()[0],(Je!==null?Je.memoizedState:null)!==n&&(Re.flags|=1024),i}function Mc(){var n=Us!==0;return Us=0,n}function jc(n,i,s){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~s}function zc(n){if(Bs){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Bs=!1}or=0,bt=Je=Re=null,cl=!1,fa=Us=0,fl=null}function Yt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bt===null?Re.memoizedState=bt=n:bt=bt.next=n,bt}function mt(){if(Je===null){var n=Re.alternate;n=n!==null?n.memoizedState:null}else n=Je.next;var i=bt===null?Re.memoizedState:bt.next;if(i!==null)bt=i,Je=n;else{if(n===null)throw Re.alternate===null?Error(l(467)):Error(l(310));Je=n,n={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},bt===null?Re.memoizedState=bt=n:bt=bt.next=n}return bt}function Vs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function da(n){var i=fa;return fa+=1,fl===null&&(fl=[]),n=kp(fl,n,i),i=Re,(bt===null?i.memoizedState:bt.next)===null&&(i=i.alternate,z.H=i===null||i.memoizedState===null?yg:Yc),n}function Hs(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return da(n);if(n.$$typeof===O)return Bt(n)}throw Error(l(438,String(n)))}function Ic(n){var i=null,s=Re.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var c=Re.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(m){return m.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=Vs(),Re.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(n),c=0;c<n;c++)s[c]=P;return i.index++,s}function ur(n,i){return typeof i=="function"?i(n):i}function Gs(n){var i=mt();return Pc(i,Je,n)}function Pc(n,i,s){var c=n.queue;if(c===null)throw Error(l(311));c.lastRenderedReducer=s;var m=n.baseQueue,y=c.pending;if(y!==null){if(m!==null){var _=m.next;m.next=y.next,y.next=_}i.baseQueue=m=y,c.pending=null}if(y=n.baseState,m===null)n.memoizedState=y;else{i=m.next;var S=_=null,D=null,V=i,K=!1;do{var ee=V.lane&-536870913;if(ee!==V.lane?(Be&ee)===ee:(or&ee)===ee){var H=V.revertLane;if(H===0)D!==null&&(D=D.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),ee===ll&&(K=!0);else if((or&H)===H){V=V.next,H===ll&&(K=!0);continue}else ee={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},D===null?(S=D=ee,_=y):D=D.next=ee,Re.lanes|=H,Hr|=H;ee=V.action,Si&&s(y,ee),y=V.hasEagerState?V.eagerState:s(y,ee)}else H={lane:ee,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},D===null?(S=D=H,_=y):D=D.next=H,Re.lanes|=ee,Hr|=ee;V=V.next}while(V!==null&&V!==i);if(D===null?_=y:D.next=S,!un(y,n.memoizedState)&&(xt=!0,K&&(s=al,s!==null)))throw s;n.memoizedState=y,n.baseState=_,n.baseQueue=D,c.lastRenderedState=y}return m===null&&(c.lanes=0),[n.memoizedState,c.dispatch]}function Bc(n){var i=mt(),s=i.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=n;var c=s.dispatch,m=s.pending,y=i.memoizedState;if(m!==null){s.pending=null;var _=m=m.next;do y=n(y,_.action),_=_.next;while(_!==m);un(y,i.memoizedState)||(xt=!0),i.memoizedState=y,i.baseQueue===null&&(i.baseState=y),s.lastRenderedState=y}return[y,c]}function Ip(n,i,s){var c=Re,m=mt(),y=Ve;if(y){if(s===void 0)throw Error(l(407));s=s()}else s=i();var _=!un((Je||m).memoizedState,s);if(_&&(m.memoizedState=s,xt=!0),m=m.queue,Hc(Up.bind(null,c,m,n),[n]),m.getSnapshot!==i||_||bt!==null&&bt.memoizedState.tag&1){if(c.flags|=2048,dl(9,{destroy:void 0},Bp.bind(null,c,m,s,i),null),tt===null)throw Error(l(349));y||(or&127)!==0||Pp(c,i,s)}return s}function Pp(n,i,s){n.flags|=16384,n={getSnapshot:i,value:s},i=Re.updateQueue,i===null?(i=Vs(),Re.updateQueue=i,i.stores=[n]):(s=i.stores,s===null?i.stores=[n]:s.push(n))}function Bp(n,i,s,c){i.value=s,i.getSnapshot=c,Vp(i)&&Hp(n)}function Up(n,i,s){return s(function(){Vp(i)&&Hp(n)})}function Vp(n){var i=n.getSnapshot;n=n.value;try{var s=i();return!un(n,s)}catch{return!0}}function Hp(n){var i=mi(n,2);i!==null&&ln(i,n,2)}function Uc(n){var i=Yt();if(typeof n=="function"){var s=n;if(n=s(),Si){he(!0);try{s()}finally{he(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ur,lastRenderedState:n},i}function Gp(n,i,s,c){return n.baseState=s,Pc(n,Je,typeof c=="function"?c:ur)}function mS(n,i,s,c,m){if($s(n))throw Error(l(485));if(n=i.action,n!==null){var y={payload:m,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){y.listeners.push(_)}};z.T!==null?s(!0):y.isTransition=!1,c(y),s=i.pending,s===null?(y.next=i.pending=y,Fp(i,y)):(y.next=s.next,i.pending=s.next=y)}}function Fp(n,i){var s=i.action,c=i.payload,m=n.state;if(i.isTransition){var y=z.T,_={};z.T=_;try{var S=s(m,c),D=z.S;D!==null&&D(_,S),qp(n,i,S)}catch(V){Vc(n,i,V)}finally{y!==null&&_.types!==null&&(y.types=_.types),z.T=y}}else try{y=s(m,c),qp(n,i,y)}catch(V){Vc(n,i,V)}}function qp(n,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){$p(n,i,c)},function(c){return Vc(n,i,c)}):$p(n,i,s)}function $p(n,i,s){i.status="fulfilled",i.value=s,Qp(i),n.state=s,i=n.pending,i!==null&&(s=i.next,s===i?n.pending=null:(s=s.next,i.next=s,Fp(n,s)))}function Vc(n,i,s){var c=n.pending;if(n.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=s,Qp(i),i=i.next;while(i!==c)}n.action=null}function Qp(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}function Yp(n,i){return i}function Xp(n,i){if(Ve){var s=tt.formState;if(s!==null){e:{var c=Re;if(Ve){if(at){t:{for(var m=at,y=kn;m.nodeType!==8;){if(!y){m=null;break t}if(m=Tn(m.nextSibling),m===null){m=null;break t}}y=m.data,m=y==="F!"||y==="F"?m:null}if(m){at=Tn(m.nextSibling),c=m.data==="F!";break e}}Dr(c)}c=!1}c&&(i=s[0])}}return s=Yt(),s.memoizedState=s.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yp,lastRenderedState:i},s.queue=c,s=mg.bind(null,Re,c),c.dispatch=s,c=Uc(!1),y=Qc.bind(null,Re,!1,c.queue),c=Yt(),m={state:i,dispatch:null,action:n,pending:null},c.queue=m,s=mS.bind(null,Re,m,y,s),m.dispatch=s,c.memoizedState=n,[i,s,!1]}function Kp(n){var i=mt();return Zp(i,Je,n)}function Zp(n,i,s){if(i=Pc(n,i,Yp)[0],n=Gs(ur)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=da(i)}catch(_){throw _===sl?Ds:_}else c=i;i=mt();var m=i.queue,y=m.dispatch;return s!==i.memoizedState&&(Re.flags|=2048,dl(9,{destroy:void 0},pS.bind(null,m,s),null)),[c,y,n]}function pS(n,i){n.action=i}function Jp(n){var i=mt(),s=Je;if(s!==null)return Zp(i,s,n);mt(),i=i.memoizedState,s=mt();var c=s.queue.dispatch;return s.memoizedState=n,[i,c,!1]}function dl(n,i,s,c){return n={tag:n,create:s,deps:c,inst:i,next:null},i=Re.updateQueue,i===null&&(i=Vs(),Re.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=n.next=n:(c=s.next,s.next=n,n.next=c,i.lastEffect=n),n}function Wp(){return mt().memoizedState}function Fs(n,i,s,c){var m=Yt();Re.flags|=n,m.memoizedState=dl(1|i,{destroy:void 0},s,c===void 0?null:c)}function qs(n,i,s,c){var m=mt();c=c===void 0?null:c;var y=m.memoizedState.inst;Je!==null&&c!==null&&Nc(c,Je.memoizedState.deps)?m.memoizedState=dl(i,y,s,c):(Re.flags|=n,m.memoizedState=dl(1|i,y,s,c))}function eg(n,i){Fs(8390656,8,n,i)}function Hc(n,i){qs(2048,8,n,i)}function gS(n){Re.flags|=4;var i=Re.updateQueue;if(i===null)i=Vs(),Re.updateQueue=i,i.events=[n];else{var s=i.events;s===null?i.events=[n]:s.push(n)}}function tg(n){var i=mt().memoizedState;return gS({ref:i,nextImpl:n}),function(){if((Ye&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}function ng(n,i){return qs(4,2,n,i)}function rg(n,i){return qs(4,4,n,i)}function ig(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 lg(n,i,s){s=s!=null?s.concat([n]):null,qs(4,4,ig.bind(null,i,n),s)}function Gc(){}function ag(n,i){var s=mt();i=i===void 0?null:i;var c=s.memoizedState;return i!==null&&Nc(i,c[1])?c[0]:(s.memoizedState=[n,i],n)}function sg(n,i){var s=mt();i=i===void 0?null:i;var c=s.memoizedState;if(i!==null&&Nc(i,c[1]))return c[0];if(c=n(),Si){he(!0);try{n()}finally{he(!1)}}return s.memoizedState=[c,i],c}function Fc(n,i,s){return s===void 0||(or&1073741824)!==0&&(Be&261930)===0?n.memoizedState=i:(n.memoizedState=s,n=oy(),Re.lanes|=n,Hr|=n,s)}function og(n,i,s,c){return un(s,i)?s:ul.current!==null?(n=Fc(n,s,c),un(n,i)||(xt=!0),n):(or&42)===0||(or&1073741824)!==0&&(Be&261930)===0?(xt=!0,n.memoizedState=s):(n=oy(),Re.lanes|=n,Hr|=n,i)}function ug(n,i,s,c,m){var y=Z.p;Z.p=y!==0&&8>y?y:8;var _=z.T,S={};z.T=S,Qc(n,!1,i,s);try{var D=m(),V=z.S;if(V!==null&&V(S,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){var K=fS(D,c);ha(n,i,K,pn(n))}else ha(n,i,c,pn(n))}catch(ee){ha(n,i,{then:function(){},status:"rejected",reason:ee},pn())}finally{Z.p=y,_!==null&&S.types!==null&&(_.types=S.types),z.T=_}}function yS(){}function qc(n,i,s,c){if(n.tag!==5)throw Error(l(476));var m=cg(n).queue;ug(n,m,i,re,s===null?yS:function(){return fg(n),s(c)})}function cg(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ur,lastRenderedState:re},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ur,lastRenderedState:s},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function fg(n){var i=cg(n);i.next===null&&(i=n.alternate.memoizedState),ha(n,i.next.queue,{},pn())}function $c(){return Bt(La)}function dg(){return mt().memoizedState}function hg(){return mt().memoizedState}function bS(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var s=pn();n=zr(s);var c=Ir(i,n,s);c!==null&&(ln(c,i,s),oa(c,i,s)),i={cache:_c()},n.payload=i;return}i=i.return}}function xS(n,i,s){var c=pn();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},$s(n)?pg(i,s):(s=cc(n,i,s,c),s!==null&&(ln(s,n,c),gg(s,i,c)))}function mg(n,i,s){var c=pn();ha(n,i,s,c)}function ha(n,i,s,c){var m={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if($s(n))pg(i,m);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=i.lastRenderedReducer,y!==null))try{var _=i.lastRenderedState,S=y(_,s);if(m.hasEagerState=!0,m.eagerState=S,un(S,_))return ks(n,i,m,0),tt===null&&Cs(),!1}catch{}if(s=cc(n,i,m,c),s!==null)return ln(s,n,c),gg(s,i,c),!0}return!1}function Qc(n,i,s,c){if(c={lane:2,revertLane:kf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},$s(n)){if(i)throw Error(l(479))}else i=cc(n,s,c,2),i!==null&&ln(i,n,2)}function $s(n){var i=n.alternate;return n===Re||i!==null&&i===Re}function pg(n,i){cl=Bs=!0;var s=n.pending;s===null?i.next=i:(i.next=s.next,s.next=i),n.pending=i}function gg(n,i,s){if((s&4194048)!==0){var c=i.lanes;c&=n.pendingLanes,s|=c,i.lanes=s,_m(n,s)}}var ma={readContext:Bt,use:Hs,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useLayoutEffect:ct,useInsertionEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useSyncExternalStore:ct,useId:ct,useHostTransitionStatus:ct,useFormState:ct,useActionState:ct,useOptimistic:ct,useMemoCache:ct,useCacheRefresh:ct};ma.useEffectEvent=ct;var yg={readContext:Bt,use:Hs,useCallback:function(n,i){return Yt().memoizedState=[n,i===void 0?null:i],n},useContext:Bt,useEffect:eg,useImperativeHandle:function(n,i,s){s=s!=null?s.concat([n]):null,Fs(4194308,4,ig.bind(null,i,n),s)},useLayoutEffect:function(n,i){return Fs(4194308,4,n,i)},useInsertionEffect:function(n,i){Fs(4,2,n,i)},useMemo:function(n,i){var s=Yt();i=i===void 0?null:i;var c=n();if(Si){he(!0);try{n()}finally{he(!1)}}return s.memoizedState=[c,i],c},useReducer:function(n,i,s){var c=Yt();if(s!==void 0){var m=s(i);if(Si){he(!0);try{s(i)}finally{he(!1)}}}else m=i;return c.memoizedState=c.baseState=m,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:m},c.queue=n,n=n.dispatch=xS.bind(null,Re,n),[c.memoizedState,n]},useRef:function(n){var i=Yt();return n={current:n},i.memoizedState=n},useState:function(n){n=Uc(n);var i=n.queue,s=mg.bind(null,Re,i);return i.dispatch=s,[n.memoizedState,s]},useDebugValue:Gc,useDeferredValue:function(n,i){var s=Yt();return Fc(s,n,i)},useTransition:function(){var n=Uc(!1);return n=ug.bind(null,Re,n.queue,!0,!1),Yt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,s){var c=Re,m=Yt();if(Ve){if(s===void 0)throw Error(l(407));s=s()}else{if(s=i(),tt===null)throw Error(l(349));(Be&127)!==0||Pp(c,i,s)}m.memoizedState=s;var y={value:s,getSnapshot:i};return m.queue=y,eg(Up.bind(null,c,y,n),[n]),c.flags|=2048,dl(9,{destroy:void 0},Bp.bind(null,c,y,s,i),null),s},useId:function(){var n=Yt(),i=tt.identifierPrefix;if(Ve){var s=$n,c=qn;s=(c&~(1<<32-be(c)-1)).toString(32)+s,i="_"+i+"R_"+s,s=Us++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=dS++,i="_"+i+"r_"+s.toString(32)+"_";return n.memoizedState=i},useHostTransitionStatus:$c,useFormState:Xp,useActionState:Xp,useOptimistic:function(n){var i=Yt();i.memoizedState=i.baseState=n;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=Qc.bind(null,Re,!0,s),s.dispatch=i,[n,i]},useMemoCache:Ic,useCacheRefresh:function(){return Yt().memoizedState=bS.bind(null,Re)},useEffectEvent:function(n){var i=Yt(),s={impl:n};return i.memoizedState=s,function(){if((Ye&2)!==0)throw Error(l(440));return s.impl.apply(void 0,arguments)}}},Yc={readContext:Bt,use:Hs,useCallback:ag,useContext:Bt,useEffect:Hc,useImperativeHandle:lg,useInsertionEffect:ng,useLayoutEffect:rg,useMemo:sg,useReducer:Gs,useRef:Wp,useState:function(){return Gs(ur)},useDebugValue:Gc,useDeferredValue:function(n,i){var s=mt();return og(s,Je.memoizedState,n,i)},useTransition:function(){var n=Gs(ur)[0],i=mt().memoizedState;return[typeof n=="boolean"?n:da(n),i]},useSyncExternalStore:Ip,useId:dg,useHostTransitionStatus:$c,useFormState:Kp,useActionState:Kp,useOptimistic:function(n,i){var s=mt();return Gp(s,Je,n,i)},useMemoCache:Ic,useCacheRefresh:hg};Yc.useEffectEvent=tg;var bg={readContext:Bt,use:Hs,useCallback:ag,useContext:Bt,useEffect:Hc,useImperativeHandle:lg,useInsertionEffect:ng,useLayoutEffect:rg,useMemo:sg,useReducer:Bc,useRef:Wp,useState:function(){return Bc(ur)},useDebugValue:Gc,useDeferredValue:function(n,i){var s=mt();return Je===null?Fc(s,n,i):og(s,Je.memoizedState,n,i)},useTransition:function(){var n=Bc(ur)[0],i=mt().memoizedState;return[typeof n=="boolean"?n:da(n),i]},useSyncExternalStore:Ip,useId:dg,useHostTransitionStatus:$c,useFormState:Jp,useActionState:Jp,useOptimistic:function(n,i){var s=mt();return Je!==null?Gp(s,Je,n,i):(s.baseState=n,[n,s.queue.dispatch])},useMemoCache:Ic,useCacheRefresh:hg};bg.useEffectEvent=tg;function Xc(n,i,s,c){i=n.memoizedState,s=s(c,i),s=s==null?i:p({},i,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var Kc={enqueueSetState:function(n,i,s){n=n._reactInternals;var c=pn(),m=zr(c);m.payload=i,s!=null&&(m.callback=s),i=Ir(n,m,c),i!==null&&(ln(i,n,c),oa(i,n,c))},enqueueReplaceState:function(n,i,s){n=n._reactInternals;var c=pn(),m=zr(c);m.tag=1,m.payload=i,s!=null&&(m.callback=s),i=Ir(n,m,c),i!==null&&(ln(i,n,c),oa(i,n,c))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var s=pn(),c=zr(s);c.tag=2,i!=null&&(c.callback=i),i=Ir(n,c,s),i!==null&&(ln(i,n,s),oa(i,n,s))}};function xg(n,i,s,c,m,y,_){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,y,_):i.prototype&&i.prototype.isPureReactComponent?!ea(s,c)||!ea(m,y):!0}function vg(n,i,s,c){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,c),i.state!==n&&Kc.enqueueReplaceState(i,i.state,null)}function Ei(n,i){var s=i;if("ref"in i){s={};for(var c in i)c!=="ref"&&(s[c]=i[c])}if(n=n.defaultProps){s===i&&(s=p({},s));for(var m in n)s[m]===void 0&&(s[m]=n[m])}return s}function _g(n){Es(n)}function wg(n){console.error(n)}function Sg(n){Es(n)}function Qs(n,i){try{var s=n.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function Eg(n,i,s){try{var c=n.onCaughtError;c(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function Zc(n,i,s){return s=zr(s),s.tag=3,s.payload={element:null},s.callback=function(){Qs(n,i)},s}function Cg(n){return n=zr(n),n.tag=3,n}function kg(n,i,s,c){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var y=c.value;n.payload=function(){return m(y)},n.callback=function(){Eg(i,s,c)}}var _=s.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(n.callback=function(){Eg(i,s,c),typeof m!="function"&&(Gr===null?Gr=new Set([this]):Gr.add(this));var S=c.stack;this.componentDidCatch(c.value,{componentStack:S!==null?S:""})})}function vS(n,i,s,c,m){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=s.alternate,i!==null&&il(i,s,m,!0),s=fn.current,s!==null){switch(s.tag){case 31:case 13:return An===null?lo():s.alternate===null&&ft===0&&(ft=3),s.flags&=-257,s.flags|=65536,s.lanes=m,c===Ms?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([c]):i.add(c),Sf(n,c,m)),!1;case 22:return s.flags|=65536,c===Ms?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([c]):s.add(c)),Sf(n,c,m)),!1}throw Error(l(435,s.tag))}return Sf(n,c,m),lo(),!1}if(Ve)return i=fn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=m,c!==gc&&(n=Error(l(422),{cause:c}),ra(Sn(n,s)))):(c!==gc&&(i=Error(l(423),{cause:c}),ra(Sn(i,s))),n=n.current.alternate,n.flags|=65536,m&=-m,n.lanes|=m,c=Sn(c,s),m=Zc(n.stateNode,c,m),Ac(n,m),ft!==4&&(ft=2)),!1;var y=Error(l(520),{cause:c});if(y=Sn(y,s),wa===null?wa=[y]:wa.push(y),ft!==4&&(ft=2),i===null)return!0;c=Sn(c,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,n=m&-m,s.lanes|=n,n=Zc(s.stateNode,c,n),Ac(s,n),!1;case 1:if(i=s.type,y=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Gr===null||!Gr.has(y))))return s.flags|=65536,m&=-m,s.lanes|=m,m=Cg(m),kg(m,n,s,c),Ac(s,m),!1}s=s.return}while(s!==null);return!1}var Jc=Error(l(461)),xt=!1;function Ut(n,i,s,c){i.child=n===null?Lp(i,null,s,c):wi(i,n.child,s,c)}function Ag(n,i,s,c,m){s=s.render;var y=i.ref;if("ref"in c){var _={};for(var S in c)S!=="ref"&&(_[S]=c[S])}else _=c;return bi(i),c=Dc(n,i,s,_,y,m),S=Mc(),n!==null&&!xt?(jc(n,i,m),cr(n,i,m)):(Ve&&S&&mc(i),i.flags|=1,Ut(n,i,c,m),i.child)}function Tg(n,i,s,c,m){if(n===null){var y=s.type;return typeof y=="function"&&!fc(y)&&y.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=y,Rg(n,i,y,c,m)):(n=Ts(s.type,null,c,i,i.mode,m),n.ref=i.ref,n.return=i,i.child=n)}if(y=n.child,!sf(n,m)){var _=y.memoizedProps;if(s=s.compare,s=s!==null?s:ea,s(_,c)&&n.ref===i.ref)return cr(n,i,m)}return i.flags|=1,n=ir(y,c),n.ref=i.ref,n.return=i,i.child=n}function Rg(n,i,s,c,m){if(n!==null){var y=n.memoizedProps;if(ea(y,c)&&n.ref===i.ref)if(xt=!1,i.pendingProps=c=y,sf(n,m))(n.flags&131072)!==0&&(xt=!0);else return i.lanes=n.lanes,cr(n,i,m)}return Wc(n,i,s,c,m)}function Lg(n,i,s,c){var m=c.children,y=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(y=y!==null?y.baseLanes|s:s,n!==null){for(c=i.child=n.child,m=0;c!==null;)m=m|c.lanes|c.childLanes,c=c.sibling;c=m&~y}else c=0,i.child=null;return Og(n,i,y,s,c)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&Ns(i,y!==null?y.cachePool:null),y!==null?Dp(i,y):Rc(),Mp(i);else return c=i.lanes=536870912,Og(n,i,y!==null?y.baseLanes|s:s,s,c)}else y!==null?(Ns(i,y.cachePool),Dp(i,y),Br(),i.memoizedState=null):(n!==null&&Ns(i,null),Rc(),Br());return Ut(n,i,m,s),i.child}function pa(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Og(n,i,s,c,m){var y=Sc();return y=y===null?null:{parent:yt._currentValue,pool:y},i.memoizedState={baseLanes:s,cachePool:y},n!==null&&Ns(i,null),Rc(),Mp(i),n!==null&&il(n,i,c,!0),i.childLanes=m,null}function Ys(n,i){return i=Ks({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}function Ng(n,i,s){return wi(i,n.child,null,s),n=Ys(i,i.pendingProps),n.flags|=2,dn(i),i.memoizedState=null,n}function _S(n,i,s){var c=i.pendingProps,m=(i.flags&128)!==0;if(i.flags&=-129,n===null){if(Ve){if(c.mode==="hidden")return n=Ys(i,c),i.lanes=536870912,pa(null,n);if(Oc(i),(n=at)?(n=Fy(n,kn),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Or!==null?{id:qn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},s=pp(n),s.return=i,i.child=s,Pt=i,at=null)):n=null,n===null)throw Dr(i);return i.lanes=536870912,null}return Ys(i,c)}var y=n.memoizedState;if(y!==null){var _=y.dehydrated;if(Oc(i),m)if(i.flags&256)i.flags&=-257,i=Ng(n,i,s);else if(i.memoizedState!==null)i.child=n.child,i.flags|=128,i=null;else throw Error(l(558));else if(xt||il(n,i,s,!1),m=(s&n.childLanes)!==0,xt||m){if(c=tt,c!==null&&(_=wm(c,s),_!==0&&_!==y.retryLane))throw y.retryLane=_,mi(n,_),ln(c,n,_),Jc;lo(),i=Ng(n,i,s)}else n=y.treeContext,at=Tn(_.nextSibling),Pt=i,Ve=!0,Nr=null,kn=!1,n!==null&&bp(i,n),i=Ys(i,c),i.flags|=4096;return i}return n=ir(n.child,{mode:c.mode,children:c.children}),n.ref=i.ref,i.child=n,n.return=i,n}function Xs(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(l(284));(n===null||n.ref!==s)&&(i.flags|=4194816)}}function Wc(n,i,s,c,m){return bi(i),s=Dc(n,i,s,c,void 0,m),c=Mc(),n!==null&&!xt?(jc(n,i,m),cr(n,i,m)):(Ve&&c&&mc(i),i.flags|=1,Ut(n,i,s,m),i.child)}function Dg(n,i,s,c,m,y){return bi(i),i.updateQueue=null,s=zp(i,c,s,m),jp(n),c=Mc(),n!==null&&!xt?(jc(n,i,y),cr(n,i,y)):(Ve&&c&&mc(i),i.flags|=1,Ut(n,i,s,y),i.child)}function Mg(n,i,s,c,m){if(bi(i),i.stateNode===null){var y=el,_=s.contextType;typeof _=="object"&&_!==null&&(y=Bt(_)),y=new s(c,y),i.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Kc,i.stateNode=y,y._reactInternals=i,y=i.stateNode,y.props=c,y.state=i.memoizedState,y.refs={},Cc(i),_=s.contextType,y.context=typeof _=="object"&&_!==null?Bt(_):el,y.state=i.memoizedState,_=s.getDerivedStateFromProps,typeof _=="function"&&(Xc(i,s,_,c),y.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(_=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),_!==y.state&&Kc.enqueueReplaceState(y,y.state,null),ca(i,c,y,m),ua(),y.state=i.memoizedState),typeof y.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(n===null){y=i.stateNode;var S=i.memoizedProps,D=Ei(s,S);y.props=D;var V=y.context,K=s.contextType;_=el,typeof K=="object"&&K!==null&&(_=Bt(K));var ee=s.getDerivedStateFromProps;K=typeof ee=="function"||typeof y.getSnapshotBeforeUpdate=="function",S=i.pendingProps!==S,K||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(S||V!==_)&&vg(i,y,c,_),jr=!1;var H=i.memoizedState;y.state=H,ca(i,c,y,m),ua(),V=i.memoizedState,S||H!==V||jr?(typeof ee=="function"&&(Xc(i,s,ee,c),V=i.memoizedState),(D=jr||xg(i,s,D,c,H,V,_))?(K||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(i.flags|=4194308)):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=V),y.props=c,y.state=V,y.context=_,c=D):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{y=i.stateNode,kc(n,i),_=i.memoizedProps,K=Ei(s,_),y.props=K,ee=i.pendingProps,H=y.context,V=s.contextType,D=el,typeof V=="object"&&V!==null&&(D=Bt(V)),S=s.getDerivedStateFromProps,(V=typeof S=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(_!==ee||H!==D)&&vg(i,y,c,D),jr=!1,H=i.memoizedState,y.state=H,ca(i,c,y,m),ua();var $=i.memoizedState;_!==ee||H!==$||jr||n!==null&&n.dependencies!==null&&Ls(n.dependencies)?(typeof S=="function"&&(Xc(i,s,S,c),$=i.memoizedState),(K=jr||xg(i,s,K,c,H,$,D)||n!==null&&n.dependencies!==null&&Ls(n.dependencies))?(V||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(c,$,D),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(c,$,D)),typeof y.componentDidUpdate=="function"&&(i.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof y.componentDidUpdate!="function"||_===n.memoizedProps&&H===n.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&H===n.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=$),y.props=c,y.state=$,y.context=D,c=K):(typeof y.componentDidUpdate!="function"||_===n.memoizedProps&&H===n.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&H===n.memoizedState||(i.flags|=1024),c=!1)}return y=c,Xs(n,i),c=(i.flags&128)!==0,y||c?(y=i.stateNode,s=c&&typeof s.getDerivedStateFromError!="function"?null:y.render(),i.flags|=1,n!==null&&c?(i.child=wi(i,n.child,null,m),i.child=wi(i,null,s,m)):Ut(n,i,s,m),i.memoizedState=y.state,n=i.child):n=cr(n,i,m),n}function jg(n,i,s,c){return gi(),i.flags|=256,Ut(n,i,s,c),i.child}var ef={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function tf(n){return{baseLanes:n,cachePool:Ep()}}function nf(n,i,s){return n=n!==null?n.childLanes&~s:0,i&&(n|=mn),n}function zg(n,i,s){var c=i.pendingProps,m=!1,y=(i.flags&128)!==0,_;if((_=y)||(_=n!==null&&n.memoizedState===null?!1:(ht.current&2)!==0),_&&(m=!0,i.flags&=-129),_=(i.flags&32)!==0,i.flags&=-33,n===null){if(Ve){if(m?Pr(i):Br(),(n=at)?(n=Fy(n,kn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Or!==null?{id:qn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},s=pp(n),s.return=i,i.child=s,Pt=i,at=null)):n=null,n===null)throw Dr(i);return Bf(n)?i.lanes=32:i.lanes=536870912,null}var S=c.children;return c=c.fallback,m?(Br(),m=i.mode,S=Ks({mode:"hidden",children:S},m),c=pi(c,m,s,null),S.return=i,c.return=i,S.sibling=c,i.child=S,c=i.child,c.memoizedState=tf(s),c.childLanes=nf(n,_,s),i.memoizedState=ef,pa(null,c)):(Pr(i),rf(i,S))}var D=n.memoizedState;if(D!==null&&(S=D.dehydrated,S!==null)){if(y)i.flags&256?(Pr(i),i.flags&=-257,i=lf(n,i,s)):i.memoizedState!==null?(Br(),i.child=n.child,i.flags|=128,i=null):(Br(),S=c.fallback,m=i.mode,c=Ks({mode:"visible",children:c.children},m),S=pi(S,m,s,null),S.flags|=2,c.return=i,S.return=i,c.sibling=S,i.child=c,wi(i,n.child,null,s),c=i.child,c.memoizedState=tf(s),c.childLanes=nf(n,_,s),i.memoizedState=ef,i=pa(null,c));else if(Pr(i),Bf(S)){if(_=S.nextSibling&&S.nextSibling.dataset,_)var V=_.dgst;_=V,c=Error(l(419)),c.stack="",c.digest=_,ra({value:c,source:null,stack:null}),i=lf(n,i,s)}else if(xt||il(n,i,s,!1),_=(s&n.childLanes)!==0,xt||_){if(_=tt,_!==null&&(c=wm(_,s),c!==0&&c!==D.retryLane))throw D.retryLane=c,mi(n,c),ln(_,n,c),Jc;Pf(S)||lo(),i=lf(n,i,s)}else Pf(S)?(i.flags|=192,i.child=n.child,i=null):(n=D.treeContext,at=Tn(S.nextSibling),Pt=i,Ve=!0,Nr=null,kn=!1,n!==null&&bp(i,n),i=rf(i,c.children),i.flags|=4096);return i}return m?(Br(),S=c.fallback,m=i.mode,D=n.child,V=D.sibling,c=ir(D,{mode:"hidden",children:c.children}),c.subtreeFlags=D.subtreeFlags&65011712,V!==null?S=ir(V,S):(S=pi(S,m,s,null),S.flags|=2),S.return=i,c.return=i,c.sibling=S,i.child=c,pa(null,c),c=i.child,S=n.child.memoizedState,S===null?S=tf(s):(m=S.cachePool,m!==null?(D=yt._currentValue,m=m.parent!==D?{parent:D,pool:D}:m):m=Ep(),S={baseLanes:S.baseLanes|s,cachePool:m}),c.memoizedState=S,c.childLanes=nf(n,_,s),i.memoizedState=ef,pa(n.child,c)):(Pr(i),s=n.child,n=s.sibling,s=ir(s,{mode:"visible",children:c.children}),s.return=i,s.sibling=null,n!==null&&(_=i.deletions,_===null?(i.deletions=[n],i.flags|=16):_.push(n)),i.child=s,i.memoizedState=null,s)}function rf(n,i){return i=Ks({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function Ks(n,i){return n=cn(22,n,null,i),n.lanes=0,n}function lf(n,i,s){return wi(i,n.child,null,s),n=rf(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function Ig(n,i,s){n.lanes|=i;var c=n.alternate;c!==null&&(c.lanes|=i),xc(n.return,i,s)}function af(n,i,s,c,m,y){var _=n.memoizedState;_===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:m,treeForkCount:y}:(_.isBackwards=i,_.rendering=null,_.renderingStartTime=0,_.last=c,_.tail=s,_.tailMode=m,_.treeForkCount=y)}function Pg(n,i,s){var c=i.pendingProps,m=c.revealOrder,y=c.tail;c=c.children;var _=ht.current,S=(_&2)!==0;if(S?(_=_&1|2,i.flags|=128):_&=1,T(ht,_),Ut(n,i,c,s),c=Ve?na:0,!S&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Ig(n,s,i);else if(n.tag===19)Ig(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(m){case"forwards":for(s=i.child,m=null;s!==null;)n=s.alternate,n!==null&&Ps(n)===null&&(m=s),s=s.sibling;s=m,s===null?(m=i.child,i.child=null):(m=s.sibling,s.sibling=null),af(i,!1,m,s,y,c);break;case"backwards":case"unstable_legacy-backwards":for(s=null,m=i.child,i.child=null;m!==null;){if(n=m.alternate,n!==null&&Ps(n)===null){i.child=m;break}n=m.sibling,m.sibling=s,s=m,m=n}af(i,!0,s,null,y,c);break;case"together":af(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function cr(n,i,s){if(n!==null&&(i.dependencies=n.dependencies),Hr|=i.lanes,(s&i.childLanes)===0)if(n!==null){if(il(n,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(l(153));if(i.child!==null){for(n=i.child,s=ir(n,n.pendingProps),i.child=s,s.return=i;n.sibling!==null;)n=n.sibling,s=s.sibling=ir(n,n.pendingProps),s.return=i;s.sibling=null}return i.child}function sf(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&Ls(n)))}function wS(n,i,s){switch(i.tag){case 3:Fe(i,i.stateNode.containerInfo),Mr(i,yt,n.memoizedState.cache),gi();break;case 27:case 5:gt(i);break;case 4:Fe(i,i.stateNode.containerInfo);break;case 10:Mr(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Oc(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(Pr(i),i.flags|=128,null):(s&i.child.childLanes)!==0?zg(n,i,s):(Pr(i),n=cr(n,i,s),n!==null?n.sibling:null);Pr(i);break;case 19:var m=(n.flags&128)!==0;if(c=(s&i.childLanes)!==0,c||(il(n,i,s,!1),c=(s&i.childLanes)!==0),m){if(c)return Pg(n,i,s);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),T(ht,ht.current),c)break;return null;case 22:return i.lanes=0,Lg(n,i,s,i.pendingProps);case 24:Mr(i,yt,n.memoizedState.cache)}return cr(n,i,s)}function Bg(n,i,s){if(n!==null)if(n.memoizedProps!==i.pendingProps)xt=!0;else{if(!sf(n,s)&&(i.flags&128)===0)return xt=!1,wS(n,i,s);xt=(n.flags&131072)!==0}else xt=!1,Ve&&(i.flags&1048576)!==0&&yp(i,na,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(n=vi(i.elementType),i.type=n,typeof n=="function")fc(n)?(c=Ei(n,c),i.tag=1,i=Mg(null,i,n,c,s)):(i.tag=0,i=Wc(null,i,n,c,s));else{if(n!=null){var m=n.$$typeof;if(m===B){i.tag=11,i=Ag(null,i,n,c,s);break e}else if(m===q){i.tag=14,i=Tg(null,i,n,c,s);break e}}throw i=le(n)||n,Error(l(306,i,""))}}return i;case 0:return Wc(n,i,i.type,i.pendingProps,s);case 1:return c=i.type,m=Ei(c,i.pendingProps),Mg(n,i,c,m,s);case 3:e:{if(Fe(i,i.stateNode.containerInfo),n===null)throw Error(l(387));c=i.pendingProps;var y=i.memoizedState;m=y.element,kc(n,i),ca(i,c,null,s);var _=i.memoizedState;if(c=_.cache,Mr(i,yt,c),c!==y.cache&&vc(i,[yt],s,!0),ua(),c=_.element,y.isDehydrated)if(y={element:c,isDehydrated:!1,cache:_.cache},i.updateQueue.baseState=y,i.memoizedState=y,i.flags&256){i=jg(n,i,c,s);break e}else if(c!==m){m=Sn(Error(l(424)),i),ra(m),i=jg(n,i,c,s);break e}else for(n=i.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,at=Tn(n.firstChild),Pt=i,Ve=!0,Nr=null,kn=!0,s=Lp(i,null,c,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(gi(),c===m){i=cr(n,i,s);break e}Ut(n,i,c,s)}i=i.child}return i;case 26:return Xs(n,i),n===null?(s=Ky(i.type,null,i.pendingProps,null))?i.memoizedState=s:Ve||(s=i.type,n=i.pendingProps,c=ho(ce.current).createElement(s),c[It]=i,c[Jt]=n,Vt(c,s,n),Dt(c),i.stateNode=c):i.memoizedState=Ky(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return gt(i),n===null&&Ve&&(c=i.stateNode=Qy(i.type,i.pendingProps,ce.current),Pt=i,kn=!0,m=at,Qr(i.type)?(Uf=m,at=Tn(c.firstChild)):at=m),Ut(n,i,i.pendingProps.children,s),Xs(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&Ve&&((m=c=at)&&(c=JS(c,i.type,i.pendingProps,kn),c!==null?(i.stateNode=c,Pt=i,at=Tn(c.firstChild),kn=!1,m=!0):m=!1),m||Dr(i)),gt(i),m=i.type,y=i.pendingProps,_=n!==null?n.memoizedProps:null,c=y.children,jf(m,y)?c=null:_!==null&&jf(m,_)&&(i.flags|=32),i.memoizedState!==null&&(m=Dc(n,i,hS,null,null,s),La._currentValue=m),Xs(n,i),Ut(n,i,c,s),i.child;case 6:return n===null&&Ve&&((n=s=at)&&(s=WS(s,i.pendingProps,kn),s!==null?(i.stateNode=s,Pt=i,at=null,n=!0):n=!1),n||Dr(i)),null;case 13:return zg(n,i,s);case 4:return Fe(i,i.stateNode.containerInfo),c=i.pendingProps,n===null?i.child=wi(i,null,c,s):Ut(n,i,c,s),i.child;case 11:return Ag(n,i,i.type,i.pendingProps,s);case 7:return Ut(n,i,i.pendingProps,s),i.child;case 8:return Ut(n,i,i.pendingProps.children,s),i.child;case 12:return Ut(n,i,i.pendingProps.children,s),i.child;case 10:return c=i.pendingProps,Mr(i,i.type,c.value),Ut(n,i,c.children,s),i.child;case 9:return m=i.type._context,c=i.pendingProps.children,bi(i),m=Bt(m),c=c(m),i.flags|=1,Ut(n,i,c,s),i.child;case 14:return Tg(n,i,i.type,i.pendingProps,s);case 15:return Rg(n,i,i.type,i.pendingProps,s);case 19:return Pg(n,i,s);case 31:return _S(n,i,s);case 22:return Lg(n,i,s,i.pendingProps);case 24:return bi(i),c=Bt(yt),n===null?(m=Sc(),m===null&&(m=tt,y=_c(),m.pooledCache=y,y.refCount++,y!==null&&(m.pooledCacheLanes|=s),m=y),i.memoizedState={parent:c,cache:m},Cc(i),Mr(i,yt,m)):((n.lanes&s)!==0&&(kc(n,i),ca(i,null,null,s),ua()),m=n.memoizedState,y=i.memoizedState,m.parent!==c?(m={parent:c,cache:c},i.memoizedState=m,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=m),Mr(i,yt,c)):(c=y.cache,Mr(i,yt,c),c!==m.cache&&vc(i,[yt],s,!0))),Ut(n,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(l(156,i.tag))}function fr(n){n.flags|=4}function of(n,i,s,c,m){if((i=(n.mode&32)!==0)&&(i=!1),i){if(n.flags|=16777216,(m&335544128)===m)if(n.stateNode.complete)n.flags|=8192;else if(dy())n.flags|=8192;else throw _i=Ms,Ec}else n.flags&=-16777217}function Ug(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!tb(i))if(dy())n.flags|=8192;else throw _i=Ms,Ec}function Zs(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?xm():536870912,n.lanes|=i,gl|=i)}function ga(n,i){if(!Ve)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 c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function st(n){var i=n.alternate!==null&&n.alternate.child===n.child,s=0,c=0;if(i)for(var m=n.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags&65011712,c|=m.flags&65011712,m.return=n,m=m.sibling;else for(m=n.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=n,m=m.sibling;return n.subtreeFlags|=c,n.childLanes=s,i}function SS(n,i,s){var c=i.pendingProps;switch(pc(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(i),null;case 1:return st(i),null;case 3:return s=i.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),sr(yt),ve(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(n===null||n.child===null)&&(rl(i)?fr(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,yc())),st(i),null;case 26:var m=i.type,y=i.memoizedState;return n===null?(fr(i),y!==null?(st(i),Ug(i,y)):(st(i),of(i,m,null,c,s))):y?y!==n.memoizedState?(fr(i),st(i),Ug(i,y)):(st(i),i.flags&=-16777217):(n=n.memoizedProps,n!==c&&fr(i),st(i),of(i,m,n,c,s)),null;case 27:if(ut(i),s=ce.current,m=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==c&&fr(i);else{if(!c){if(i.stateNode===null)throw Error(l(166));return st(i),null}n=ue.current,rl(i)?xp(i):(n=Qy(m,c,s),i.stateNode=n,fr(i))}return st(i),null;case 5:if(ut(i),m=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==c&&fr(i);else{if(!c){if(i.stateNode===null)throw Error(l(166));return st(i),null}if(y=ue.current,rl(i))xp(i);else{var _=ho(ce.current);switch(y){case 1:y=_.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:y=_.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":y=_.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":y=_.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":y=_.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof c.is=="string"?_.createElement("select",{is:c.is}):_.createElement("select"),c.multiple?y.multiple=!0:c.size&&(y.size=c.size);break;default:y=typeof c.is=="string"?_.createElement(m,{is:c.is}):_.createElement(m)}}y[It]=i,y[Jt]=c;e:for(_=i.child;_!==null;){if(_.tag===5||_.tag===6)y.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===i)break e;for(;_.sibling===null;){if(_.return===null||_.return===i)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}i.stateNode=y;e:switch(Vt(y,m,c),m){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&fr(i)}}return st(i),of(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,s),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==c&&fr(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(l(166));if(n=ce.current,rl(i)){if(n=i.stateNode,s=i.memoizedProps,c=null,m=Pt,m!==null)switch(m.tag){case 27:case 5:c=m.memoizedProps}n[It]=i,n=!!(n.nodeValue===s||c!==null&&c.suppressHydrationWarning===!0||zy(n.nodeValue,s)),n||Dr(i,!0)}else n=ho(n).createTextNode(c),n[It]=i,i.stateNode=n}return st(i),null;case 31:if(s=i.memoizedState,n===null||n.memoizedState!==null){if(c=rl(i),s!==null){if(n===null){if(!c)throw Error(l(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(l(557));n[It]=i}else gi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;st(i),n=!1}else s=yc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=s),n=!0;if(!n)return i.flags&256?(dn(i),i):(dn(i),null);if((i.flags&128)!==0)throw Error(l(558))}return st(i),null;case 13:if(c=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(m=rl(i),c!==null&&c.dehydrated!==null){if(n===null){if(!m)throw Error(l(318));if(m=i.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(l(317));m[It]=i}else gi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;st(i),m=!1}else m=yc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=m),m=!0;if(!m)return i.flags&256?(dn(i),i):(dn(i),null)}return dn(i),(i.flags&128)!==0?(i.lanes=s,i):(s=c!==null,n=n!==null&&n.memoizedState!==null,s&&(c=i.child,m=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(m=c.alternate.memoizedState.cachePool.pool),y=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(y=c.memoizedState.cachePool.pool),y!==m&&(c.flags|=2048)),s!==n&&s&&(i.child.flags|=8192),Zs(i,i.updateQueue),st(i),null);case 4:return ve(),n===null&&Lf(i.stateNode.containerInfo),st(i),null;case 10:return sr(i.type),st(i),null;case 19:if(Q(ht),c=i.memoizedState,c===null)return st(i),null;if(m=(i.flags&128)!==0,y=c.rendering,y===null)if(m)ga(c,!1);else{if(ft!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(y=Ps(n),y!==null){for(i.flags|=128,ga(c,!1),n=y.updateQueue,i.updateQueue=n,Zs(i,n),i.subtreeFlags=0,n=s,s=i.child;s!==null;)mp(s,n),s=s.sibling;return T(ht,ht.current&1|2),Ve&&lr(i,c.treeForkCount),i.child}n=n.sibling}c.tail!==null&&St()>no&&(i.flags|=128,m=!0,ga(c,!1),i.lanes=4194304)}else{if(!m)if(n=Ps(y),n!==null){if(i.flags|=128,m=!0,n=n.updateQueue,i.updateQueue=n,Zs(i,n),ga(c,!0),c.tail===null&&c.tailMode==="hidden"&&!y.alternate&&!Ve)return st(i),null}else 2*St()-c.renderingStartTime>no&&s!==536870912&&(i.flags|=128,m=!0,ga(c,!1),i.lanes=4194304);c.isBackwards?(y.sibling=i.child,i.child=y):(n=c.last,n!==null?n.sibling=y:i.child=y,c.last=y)}return c.tail!==null?(n=c.tail,c.rendering=n,c.tail=n.sibling,c.renderingStartTime=St(),n.sibling=null,s=ht.current,T(ht,m?s&1|2:s&1),Ve&&lr(i,c.treeForkCount),n):(st(i),null);case 22:case 23:return dn(i),Lc(),c=i.memoizedState!==null,n!==null?n.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(s&536870912)!==0&&(i.flags&128)===0&&(st(i),i.subtreeFlags&6&&(i.flags|=8192)):st(i),s=i.updateQueue,s!==null&&Zs(i,s.retryQueue),s=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==s&&(i.flags|=2048),n!==null&&Q(xi),null;case 24:return s=null,n!==null&&(s=n.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),sr(yt),st(i),null;case 25:return null;case 30:return null}throw Error(l(156,i.tag))}function ES(n,i){switch(pc(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return sr(yt),ve(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return ut(i),null;case 31:if(i.memoizedState!==null){if(dn(i),i.alternate===null)throw Error(l(340));gi()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(dn(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(l(340));gi()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return Q(ht),null;case 4:return ve(),null;case 10:return sr(i.type),null;case 22:case 23:return dn(i),Lc(),n!==null&&Q(xi),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return sr(yt),null;case 25:return null;default:return null}}function Vg(n,i){switch(pc(i),i.tag){case 3:sr(yt),ve();break;case 26:case 27:case 5:ut(i);break;case 4:ve();break;case 31:i.memoizedState!==null&&dn(i);break;case 13:dn(i);break;case 19:Q(ht);break;case 10:sr(i.type);break;case 22:case 23:dn(i),Lc(),n!==null&&Q(xi);break;case 24:sr(yt)}}function ya(n,i){try{var s=i.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var m=c.next;s=m;do{if((s.tag&n)===n){c=void 0;var y=s.create,_=s.inst;c=y(),_.destroy=c}s=s.next}while(s!==m)}}catch(S){Ze(i,i.return,S)}}function Ur(n,i,s){try{var c=i.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var y=m.next;c=y;do{if((c.tag&n)===n){var _=c.inst,S=_.destroy;if(S!==void 0){_.destroy=void 0,m=i;var D=s,V=S;try{V()}catch(K){Ze(m,D,K)}}}c=c.next}while(c!==y)}}catch(K){Ze(i,i.return,K)}}function Hg(n){var i=n.updateQueue;if(i!==null){var s=n.stateNode;try{Np(i,s)}catch(c){Ze(n,n.return,c)}}}function Gg(n,i,s){s.props=Ei(n.type,n.memoizedProps),s.state=n.memoizedState;try{s.componentWillUnmount()}catch(c){Ze(n,i,c)}}function ba(n,i){try{var s=n.ref;if(s!==null){switch(n.tag){case 26:case 27:case 5:var c=n.stateNode;break;case 30:c=n.stateNode;break;default:c=n.stateNode}typeof s=="function"?n.refCleanup=s(c):s.current=c}}catch(m){Ze(n,i,m)}}function Qn(n,i){var s=n.ref,c=n.refCleanup;if(s!==null)if(typeof c=="function")try{c()}catch(m){Ze(n,i,m)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){Ze(n,i,m)}else s.current=null}function Fg(n){var i=n.type,s=n.memoizedProps,c=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&c.focus();break e;case"img":s.src?c.src=s.src:s.srcSet&&(c.srcset=s.srcSet)}}catch(m){Ze(n,n.return,m)}}function uf(n,i,s){try{var c=n.stateNode;$S(c,n.type,s,i),c[Jt]=i}catch(m){Ze(n,n.return,m)}}function qg(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Qr(n.type)||n.tag===4}function cf(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||qg(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&&Qr(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 ff(n,i,s){var c=n.tag;if(c===5||c===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=nr));else if(c!==4&&(c===27&&Qr(n.type)&&(s=n.stateNode,i=null),n=n.child,n!==null))for(ff(n,i,s),n=n.sibling;n!==null;)ff(n,i,s),n=n.sibling}function Js(n,i,s){var c=n.tag;if(c===5||c===6)n=n.stateNode,i?s.insertBefore(n,i):s.appendChild(n);else if(c!==4&&(c===27&&Qr(n.type)&&(s=n.stateNode),n=n.child,n!==null))for(Js(n,i,s),n=n.sibling;n!==null;)Js(n,i,s),n=n.sibling}function $g(n){var i=n.stateNode,s=n.memoizedProps;try{for(var c=n.type,m=i.attributes;m.length;)i.removeAttributeNode(m[0]);Vt(i,c,s),i[It]=n,i[Jt]=s}catch(y){Ze(n,n.return,y)}}var dr=!1,vt=!1,df=!1,Qg=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function CS(n,i){if(n=n.containerInfo,Df=vo,n=lp(n),ic(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var m=c.anchorOffset,y=c.focusNode;c=c.focusOffset;try{s.nodeType,y.nodeType}catch{s=null;break e}var _=0,S=-1,D=-1,V=0,K=0,ee=n,H=null;t:for(;;){for(var $;ee!==s||m!==0&&ee.nodeType!==3||(S=_+m),ee!==y||c!==0&&ee.nodeType!==3||(D=_+c),ee.nodeType===3&&(_+=ee.nodeValue.length),($=ee.firstChild)!==null;)H=ee,ee=$;for(;;){if(ee===n)break t;if(H===s&&++V===m&&(S=_),H===y&&++K===c&&(D=_),($=ee.nextSibling)!==null)break;ee=H,H=ee.parentNode}ee=$}s=S===-1||D===-1?null:{start:S,end:D}}else s=null}s=s||{start:0,end:0}}else s=null;for(Mf={focusedElem:n,selectionRange:s},vo=!1,Mt=i;Mt!==null;)if(i=Mt,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,Mt=n;else for(;Mt!==null;){switch(i=Mt,y=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++)m=n[s],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&y!==null){n=void 0,s=i,m=y.memoizedProps,y=y.memoizedState,c=s.stateNode;try{var pe=Ei(s.type,m);n=c.getSnapshotBeforeUpdate(pe,y),c.__reactInternalSnapshotBeforeUpdate=n}catch(Ce){Ze(s,s.return,Ce)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,s=n.nodeType,s===9)If(n);else if(s===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":If(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(l(163))}if(n=i.sibling,n!==null){n.return=i.return,Mt=n;break}Mt=i.return}}function Yg(n,i,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:mr(n,s),c&4&&ya(5,s);break;case 1:if(mr(n,s),c&4)if(n=s.stateNode,i===null)try{n.componentDidMount()}catch(_){Ze(s,s.return,_)}else{var m=Ei(s.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(m,i,n.__reactInternalSnapshotBeforeUpdate)}catch(_){Ze(s,s.return,_)}}c&64&&Hg(s),c&512&&ba(s,s.return);break;case 3:if(mr(n,s),c&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{Np(n,i)}catch(_){Ze(s,s.return,_)}}break;case 27:i===null&&c&4&&$g(s);case 26:case 5:mr(n,s),i===null&&c&4&&Fg(s),c&512&&ba(s,s.return);break;case 12:mr(n,s);break;case 31:mr(n,s),c&4&&Zg(n,s);break;case 13:mr(n,s),c&4&&Jg(n,s),c&64&&(n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(s=MS.bind(null,s),eE(n,s))));break;case 22:if(c=s.memoizedState!==null||dr,!c){i=i!==null&&i.memoizedState!==null||vt,m=dr;var y=vt;dr=c,(vt=i)&&!y?pr(n,s,(s.subtreeFlags&8772)!==0):mr(n,s),dr=m,vt=y}break;case 30:break;default:mr(n,s)}}function Xg(n){var i=n.alternate;i!==null&&(n.alternate=null,Xg(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&Vu(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 ot=null,en=!1;function hr(n,i,s){for(s=s.child;s!==null;)Kg(n,i,s),s=s.sibling}function Kg(n,i,s){if(se&&typeof se.onCommitFiberUnmount=="function")try{se.onCommitFiberUnmount(Nt,s)}catch{}switch(s.tag){case 26:vt||Qn(s,i),hr(n,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:vt||Qn(s,i);var c=ot,m=en;Qr(s.type)&&(ot=s.stateNode,en=!1),hr(n,i,s),Aa(s.stateNode),ot=c,en=m;break;case 5:vt||Qn(s,i);case 6:if(c=ot,m=en,ot=null,hr(n,i,s),ot=c,en=m,ot!==null)if(en)try{(ot.nodeType===9?ot.body:ot.nodeName==="HTML"?ot.ownerDocument.body:ot).removeChild(s.stateNode)}catch(y){Ze(s,i,y)}else try{ot.removeChild(s.stateNode)}catch(y){Ze(s,i,y)}break;case 18:ot!==null&&(en?(n=ot,Hy(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,s.stateNode),El(n)):Hy(ot,s.stateNode));break;case 4:c=ot,m=en,ot=s.stateNode.containerInfo,en=!0,hr(n,i,s),ot=c,en=m;break;case 0:case 11:case 14:case 15:Ur(2,s,i),vt||Ur(4,s,i),hr(n,i,s);break;case 1:vt||(Qn(s,i),c=s.stateNode,typeof c.componentWillUnmount=="function"&&Gg(s,i,c)),hr(n,i,s);break;case 21:hr(n,i,s);break;case 22:vt=(c=vt)||s.memoizedState!==null,hr(n,i,s),vt=c;break;default:hr(n,i,s)}}function Zg(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{El(n)}catch(s){Ze(i,i.return,s)}}}function Jg(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{El(n)}catch(s){Ze(i,i.return,s)}}function kS(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new Qg),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new Qg),i;default:throw Error(l(435,n.tag))}}function Ws(n,i){var s=kS(n);i.forEach(function(c){if(!s.has(c)){s.add(c);var m=jS.bind(null,n,c);c.then(m,m)}})}function tn(n,i){var s=i.deletions;if(s!==null)for(var c=0;c<s.length;c++){var m=s[c],y=n,_=i,S=_;e:for(;S!==null;){switch(S.tag){case 27:if(Qr(S.type)){ot=S.stateNode,en=!1;break e}break;case 5:ot=S.stateNode,en=!1;break e;case 3:case 4:ot=S.stateNode.containerInfo,en=!0;break e}S=S.return}if(ot===null)throw Error(l(160));Kg(y,_,m),ot=null,en=!1,y=m.alternate,y!==null&&(y.return=null),m.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Wg(i,n),i=i.sibling}var Bn=null;function Wg(n,i){var s=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:tn(i,n),nn(n),c&4&&(Ur(3,n,n.return),ya(3,n),Ur(5,n,n.return));break;case 1:tn(i,n),nn(n),c&512&&(vt||s===null||Qn(s,s.return)),c&64&&dr&&(n=n.updateQueue,n!==null&&(c=n.callbacks,c!==null&&(s=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=s===null?c:s.concat(c))));break;case 26:var m=Bn;if(tn(i,n),nn(n),c&512&&(vt||s===null||Qn(s,s.return)),c&4){var y=s!==null?s.memoizedState:null;if(c=n.memoizedState,s===null)if(c===null)if(n.stateNode===null){e:{c=n.type,s=n.memoizedProps,m=m.ownerDocument||m;t:switch(c){case"title":y=m.getElementsByTagName("title")[0],(!y||y[ql]||y[It]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=m.createElement(c),m.head.insertBefore(y,m.querySelector("head > title"))),Vt(y,c,s),y[It]=n,Dt(y),c=y;break e;case"link":var _=Wy("link","href",m).get(c+(s.href||""));if(_){for(var S=0;S<_.length;S++)if(y=_[S],y.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&y.getAttribute("rel")===(s.rel==null?null:s.rel)&&y.getAttribute("title")===(s.title==null?null:s.title)&&y.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){_.splice(S,1);break t}}y=m.createElement(c),Vt(y,c,s),m.head.appendChild(y);break;case"meta":if(_=Wy("meta","content",m).get(c+(s.content||""))){for(S=0;S<_.length;S++)if(y=_[S],y.getAttribute("content")===(s.content==null?null:""+s.content)&&y.getAttribute("name")===(s.name==null?null:s.name)&&y.getAttribute("property")===(s.property==null?null:s.property)&&y.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&y.getAttribute("charset")===(s.charSet==null?null:s.charSet)){_.splice(S,1);break t}}y=m.createElement(c),Vt(y,c,s),m.head.appendChild(y);break;default:throw Error(l(468,c))}y[It]=n,Dt(y),c=y}n.stateNode=c}else eb(m,n.type,n.stateNode);else n.stateNode=Jy(m,c,n.memoizedProps);else y!==c?(y===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):y.count--,c===null?eb(m,n.type,n.stateNode):Jy(m,c,n.memoizedProps)):c===null&&n.stateNode!==null&&uf(n,n.memoizedProps,s.memoizedProps)}break;case 27:tn(i,n),nn(n),c&512&&(vt||s===null||Qn(s,s.return)),s!==null&&c&4&&uf(n,n.memoizedProps,s.memoizedProps);break;case 5:if(tn(i,n),nn(n),c&512&&(vt||s===null||Qn(s,s.return)),n.flags&32){m=n.stateNode;try{Qi(m,"")}catch(pe){Ze(n,n.return,pe)}}c&4&&n.stateNode!=null&&(m=n.memoizedProps,uf(n,m,s!==null?s.memoizedProps:m)),c&1024&&(df=!0);break;case 6:if(tn(i,n),nn(n),c&4){if(n.stateNode===null)throw Error(l(162));c=n.memoizedProps,s=n.stateNode;try{s.nodeValue=c}catch(pe){Ze(n,n.return,pe)}}break;case 3:if(go=null,m=Bn,Bn=mo(i.containerInfo),tn(i,n),Bn=m,nn(n),c&4&&s!==null&&s.memoizedState.isDehydrated)try{El(i.containerInfo)}catch(pe){Ze(n,n.return,pe)}df&&(df=!1,ey(n));break;case 4:c=Bn,Bn=mo(n.stateNode.containerInfo),tn(i,n),nn(n),Bn=c;break;case 12:tn(i,n),nn(n);break;case 31:tn(i,n),nn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Ws(n,c)));break;case 13:tn(i,n),nn(n),n.child.flags&8192&&n.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(to=St()),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Ws(n,c)));break;case 22:m=n.memoizedState!==null;var D=s!==null&&s.memoizedState!==null,V=dr,K=vt;if(dr=V||m,vt=K||D,tn(i,n),vt=K,dr=V,nn(n),c&8192)e:for(i=n.stateNode,i._visibility=m?i._visibility&-2:i._visibility|1,m&&(s===null||D||dr||vt||Ci(n)),s=null,i=n;;){if(i.tag===5||i.tag===26){if(s===null){D=s=i;try{if(y=D.stateNode,m)_=y.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{S=D.stateNode;var ee=D.memoizedProps.style,H=ee!=null&&ee.hasOwnProperty("display")?ee.display:null;S.style.display=H==null||typeof H=="boolean"?"":(""+H).trim()}}catch(pe){Ze(D,D.return,pe)}}}else if(i.tag===6){if(s===null){D=i;try{D.stateNode.nodeValue=m?"":D.memoizedProps}catch(pe){Ze(D,D.return,pe)}}}else if(i.tag===18){if(s===null){D=i;try{var $=D.stateNode;m?Gy($,!0):Gy(D.stateNode,!1)}catch(pe){Ze(D,D.return,pe)}}}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}c&4&&(c=n.updateQueue,c!==null&&(s=c.retryQueue,s!==null&&(c.retryQueue=null,Ws(n,s))));break;case 19:tn(i,n),nn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Ws(n,c)));break;case 30:break;case 21:break;default:tn(i,n),nn(n)}}function nn(n){var i=n.flags;if(i&2){try{for(var s,c=n.return;c!==null;){if(qg(c)){s=c;break}c=c.return}if(s==null)throw Error(l(160));switch(s.tag){case 27:var m=s.stateNode,y=cf(n);Js(n,y,m);break;case 5:var _=s.stateNode;s.flags&32&&(Qi(_,""),s.flags&=-33);var S=cf(n);Js(n,S,_);break;case 3:case 4:var D=s.stateNode.containerInfo,V=cf(n);ff(n,V,D);break;default:throw Error(l(161))}}catch(K){Ze(n,n.return,K)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function ey(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;ey(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}function mr(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Yg(n,i.alternate,i),i=i.sibling}function Ci(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:Ur(4,i,i.return),Ci(i);break;case 1:Qn(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&Gg(i,i.return,s),Ci(i);break;case 27:Aa(i.stateNode);case 26:case 5:Qn(i,i.return),Ci(i);break;case 22:i.memoizedState===null&&Ci(i);break;case 30:Ci(i);break;default:Ci(i)}n=n.sibling}}function pr(n,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,m=n,y=i,_=y.flags;switch(y.tag){case 0:case 11:case 15:pr(m,y,s),ya(4,y);break;case 1:if(pr(m,y,s),c=y,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(V){Ze(c,c.return,V)}if(c=y,m=c.updateQueue,m!==null){var S=c.stateNode;try{var D=m.shared.hiddenCallbacks;if(D!==null)for(m.shared.hiddenCallbacks=null,m=0;m<D.length;m++)Op(D[m],S)}catch(V){Ze(c,c.return,V)}}s&&_&64&&Hg(y),ba(y,y.return);break;case 27:$g(y);case 26:case 5:pr(m,y,s),s&&c===null&&_&4&&Fg(y),ba(y,y.return);break;case 12:pr(m,y,s);break;case 31:pr(m,y,s),s&&_&4&&Zg(m,y);break;case 13:pr(m,y,s),s&&_&4&&Jg(m,y);break;case 22:y.memoizedState===null&&pr(m,y,s),ba(y,y.return);break;case 30:break;default:pr(m,y,s)}i=i.sibling}}function hf(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&&ia(s))}function mf(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&ia(n))}function Un(n,i,s,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)ty(n,i,s,c),i=i.sibling}function ty(n,i,s,c){var m=i.flags;switch(i.tag){case 0:case 11:case 15:Un(n,i,s,c),m&2048&&ya(9,i);break;case 1:Un(n,i,s,c);break;case 3:Un(n,i,s,c),m&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&ia(n)));break;case 12:if(m&2048){Un(n,i,s,c),n=i.stateNode;try{var y=i.memoizedProps,_=y.id,S=y.onPostCommit;typeof S=="function"&&S(_,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(D){Ze(i,i.return,D)}}else Un(n,i,s,c);break;case 31:Un(n,i,s,c);break;case 13:Un(n,i,s,c);break;case 23:break;case 22:y=i.stateNode,_=i.alternate,i.memoizedState!==null?y._visibility&2?Un(n,i,s,c):xa(n,i):y._visibility&2?Un(n,i,s,c):(y._visibility|=2,hl(n,i,s,c,(i.subtreeFlags&10256)!==0||!1)),m&2048&&hf(_,i);break;case 24:Un(n,i,s,c),m&2048&&mf(i.alternate,i);break;default:Un(n,i,s,c)}}function hl(n,i,s,c,m){for(m=m&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var y=n,_=i,S=s,D=c,V=_.flags;switch(_.tag){case 0:case 11:case 15:hl(y,_,S,D,m),ya(8,_);break;case 23:break;case 22:var K=_.stateNode;_.memoizedState!==null?K._visibility&2?hl(y,_,S,D,m):xa(y,_):(K._visibility|=2,hl(y,_,S,D,m)),m&&V&2048&&hf(_.alternate,_);break;case 24:hl(y,_,S,D,m),m&&V&2048&&mf(_.alternate,_);break;default:hl(y,_,S,D,m)}i=i.sibling}}function xa(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=n,c=i,m=c.flags;switch(c.tag){case 22:xa(s,c),m&2048&&hf(c.alternate,c);break;case 24:xa(s,c),m&2048&&mf(c.alternate,c);break;default:xa(s,c)}i=i.sibling}}var va=8192;function ml(n,i,s){if(n.subtreeFlags&va)for(n=n.child;n!==null;)ny(n,i,s),n=n.sibling}function ny(n,i,s){switch(n.tag){case 26:ml(n,i,s),n.flags&va&&n.memoizedState!==null&&dE(s,Bn,n.memoizedState,n.memoizedProps);break;case 5:ml(n,i,s);break;case 3:case 4:var c=Bn;Bn=mo(n.stateNode.containerInfo),ml(n,i,s),Bn=c;break;case 22:n.memoizedState===null&&(c=n.alternate,c!==null&&c.memoizedState!==null?(c=va,va=16777216,ml(n,i,s),va=c):ml(n,i,s));break;default:ml(n,i,s)}}function ry(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 _a(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];Mt=c,ly(c,n)}ry(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)iy(n),n=n.sibling}function iy(n){switch(n.tag){case 0:case 11:case 15:_a(n),n.flags&2048&&Ur(9,n,n.return);break;case 3:_a(n);break;case 12:_a(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,eo(n)):_a(n);break;default:_a(n)}}function eo(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];Mt=c,ly(c,n)}ry(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:Ur(8,i,i.return),eo(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,eo(i));break;default:eo(i)}n=n.sibling}}function ly(n,i){for(;Mt!==null;){var s=Mt;switch(s.tag){case 0:case 11:case 15:Ur(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var c=s.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:ia(s.memoizedState.cache)}if(c=s.child,c!==null)c.return=s,Mt=c;else e:for(s=n;Mt!==null;){c=Mt;var m=c.sibling,y=c.return;if(Xg(c),c===s){Mt=null;break e}if(m!==null){m.return=y,Mt=m;break e}Mt=y}}}var AS={getCacheForType:function(n){var i=Bt(yt),s=i.data.get(n);return s===void 0&&(s=n(),i.data.set(n,s)),s},cacheSignal:function(){return Bt(yt).controller.signal}},TS=typeof WeakMap=="function"?WeakMap:Map,Ye=0,tt=null,ze=null,Be=0,Ke=0,hn=null,Vr=!1,pl=!1,pf=!1,gr=0,ft=0,Hr=0,ki=0,gf=0,mn=0,gl=0,wa=null,rn=null,yf=!1,to=0,ay=0,no=1/0,ro=null,Gr=null,Et=0,Fr=null,yl=null,yr=0,bf=0,xf=null,sy=null,Sa=0,vf=null;function pn(){return(Ye&2)!==0&&Be!==0?Be&-Be:z.T!==null?kf():Sm()}function oy(){if(mn===0)if((Be&536870912)===0||Ve){var n=Zt;Zt<<=1,(Zt&3932160)===0&&(Zt=262144),mn=n}else mn=536870912;return n=fn.current,n!==null&&(n.flags|=32),mn}function ln(n,i,s){(n===tt&&(Ke===2||Ke===9)||n.cancelPendingCommit!==null)&&(bl(n,0),qr(n,Be,mn,!1)),Fl(n,s),((Ye&2)===0||n!==tt)&&(n===tt&&((Ye&2)===0&&(ki|=s),ft===4&&qr(n,Be,mn,!1)),Yn(n))}function uy(n,i,s){if((Ye&6)!==0)throw Error(l(327));var c=!s&&(i&127)===0&&(i&n.expiredLanes)===0||Gl(n,i),m=c?OS(n,i):wf(n,i,!0),y=c;do{if(m===0){pl&&!c&&qr(n,i,0,!1);break}else{if(s=n.current.alternate,y&&!RS(s)){m=wf(n,i,!1),y=!1;continue}if(m===2){if(y=i,n.errorRecoveryDisabledLanes&y)var _=0;else _=n.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){i=_;e:{var S=n;m=wa;var D=S.current.memoizedState.isDehydrated;if(D&&(bl(S,_).flags|=256),_=wf(S,_,!1),_!==2){if(pf&&!D){S.errorRecoveryDisabledLanes|=y,ki|=y,m=4;break e}y=rn,rn=m,y!==null&&(rn===null?rn=y:rn.push.apply(rn,y))}m=_}if(y=!1,m!==2)continue}}if(m===1){bl(n,0),qr(n,i,0,!0);break}e:{switch(c=n,y=m,y){case 0:case 1:throw Error(l(345));case 4:if((i&4194048)!==i)break;case 6:qr(c,i,mn,!Vr);break e;case 2:rn=null;break;case 3:case 5:break;default:throw Error(l(329))}if((i&62914560)===i&&(m=to+300-St(),10<m)){if(qr(c,i,mn,!Vr),hs(c,0,!0)!==0)break e;yr=i,c.timeoutHandle=Uy(cy.bind(null,c,s,rn,ro,yf,i,mn,ki,gl,Vr,y,"Throttled",-0,0),m);break e}cy(c,s,rn,ro,yf,i,mn,ki,gl,Vr,y,null,-0,0)}}break}while(!0);Yn(n)}function cy(n,i,s,c,m,y,_,S,D,V,K,ee,H,$){if(n.timeoutHandle=-1,ee=i.subtreeFlags,ee&8192||(ee&16785408)===16785408){ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:nr},ny(i,y,ee);var pe=(y&62914560)===y?to-St():(y&4194048)===y?ay-St():0;if(pe=hE(ee,pe),pe!==null){yr=y,n.cancelPendingCommit=pe(by.bind(null,n,i,y,s,c,m,_,S,D,K,ee,null,H,$)),qr(n,y,_,!V);return}}by(n,i,y,s,c,m,_,S,D)}function RS(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 c=0;c<s.length;c++){var m=s[c],y=m.getSnapshot;m=m.value;try{if(!un(y(),m))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 qr(n,i,s,c){i&=~gf,i&=~ki,n.suspendedLanes|=i,n.pingedLanes&=~i,c&&(n.warmLanes|=i),c=n.expirationTimes;for(var m=i;0<m;){var y=31-be(m),_=1<<y;c[y]=-1,m&=~_}s!==0&&vm(n,s,i)}function io(){return(Ye&6)===0?(Ea(0),!1):!0}function _f(){if(ze!==null){if(Ke===0)var n=ze.return;else n=ze,ar=yi=null,zc(n),ol=null,aa=0,n=ze;for(;n!==null;)Vg(n.alternate,n),n=n.return;ze=null}}function bl(n,i){var s=n.timeoutHandle;s!==-1&&(n.timeoutHandle=-1,XS(s)),s=n.cancelPendingCommit,s!==null&&(n.cancelPendingCommit=null,s()),yr=0,_f(),tt=n,ze=s=ir(n.current,null),Be=i,Ke=0,hn=null,Vr=!1,pl=Gl(n,i),pf=!1,gl=mn=gf=ki=Hr=ft=0,rn=wa=null,yf=!1,(i&8)!==0&&(i|=i&32);var c=n.entangledLanes;if(c!==0)for(n=n.entanglements,c&=i;0<c;){var m=31-be(c),y=1<<m;i|=n[m],c&=~y}return gr=i,Cs(),s}function fy(n,i){Re=null,z.H=ma,i===sl||i===Ds?(i=Ap(),Ke=3):i===Ec?(i=Ap(),Ke=4):Ke=i===Jc?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,hn=i,ze===null&&(ft=1,Qs(n,Sn(i,n.current)))}function dy(){var n=fn.current;return n===null?!0:(Be&4194048)===Be?An===null:(Be&62914560)===Be||(Be&536870912)!==0?n===An:!1}function hy(){var n=z.H;return z.H=ma,n===null?ma:n}function my(){var n=z.A;return z.A=AS,n}function lo(){ft=4,Vr||(Be&4194048)!==Be&&fn.current!==null||(pl=!0),(Hr&134217727)===0&&(ki&134217727)===0||tt===null||qr(tt,Be,mn,!1)}function wf(n,i,s){var c=Ye;Ye|=2;var m=hy(),y=my();(tt!==n||Be!==i)&&(ro=null,bl(n,i)),i=!1;var _=ft;e:do try{if(Ke!==0&&ze!==null){var S=ze,D=hn;switch(Ke){case 8:_f(),_=6;break e;case 3:case 2:case 9:case 6:fn.current===null&&(i=!0);var V=Ke;if(Ke=0,hn=null,xl(n,S,D,V),s&&pl){_=0;break e}break;default:V=Ke,Ke=0,hn=null,xl(n,S,D,V)}}LS(),_=ft;break}catch(K){fy(n,K)}while(!0);return i&&n.shellSuspendCounter++,ar=yi=null,Ye=c,z.H=m,z.A=y,ze===null&&(tt=null,Be=0,Cs()),_}function LS(){for(;ze!==null;)py(ze)}function OS(n,i){var s=Ye;Ye|=2;var c=hy(),m=my();tt!==n||Be!==i?(ro=null,no=St()+500,bl(n,i)):pl=Gl(n,i);e:do try{if(Ke!==0&&ze!==null){i=ze;var y=hn;t:switch(Ke){case 1:Ke=0,hn=null,xl(n,i,y,1);break;case 2:case 9:if(Cp(y)){Ke=0,hn=null,gy(i);break}i=function(){Ke!==2&&Ke!==9||tt!==n||(Ke=7),Yn(n)},y.then(i,i);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:Cp(y)?(Ke=0,hn=null,gy(i)):(Ke=0,hn=null,xl(n,i,y,7));break;case 5:var _=null;switch(ze.tag){case 26:_=ze.memoizedState;case 5:case 27:var S=ze;if(_?tb(_):S.stateNode.complete){Ke=0,hn=null;var D=S.sibling;if(D!==null)ze=D;else{var V=S.return;V!==null?(ze=V,ao(V)):ze=null}break t}}Ke=0,hn=null,xl(n,i,y,5);break;case 6:Ke=0,hn=null,xl(n,i,y,6);break;case 8:_f(),ft=6;break e;default:throw Error(l(462))}}NS();break}catch(K){fy(n,K)}while(!0);return ar=yi=null,z.H=c,z.A=m,Ye=s,ze!==null?0:(tt=null,Be=0,Cs(),ft)}function NS(){for(;ze!==null&&!Ui();)py(ze)}function py(n){var i=Bg(n.alternate,n,gr);n.memoizedProps=n.pendingProps,i===null?ao(n):ze=i}function gy(n){var i=n,s=i.alternate;switch(i.tag){case 15:case 0:i=Dg(s,i,i.pendingProps,i.type,void 0,Be);break;case 11:i=Dg(s,i,i.pendingProps,i.type.render,i.ref,Be);break;case 5:zc(i);default:Vg(s,i),i=ze=mp(i,gr),i=Bg(s,i,gr)}n.memoizedProps=n.pendingProps,i===null?ao(n):ze=i}function xl(n,i,s,c){ar=yi=null,zc(i),ol=null,aa=0;var m=i.return;try{if(vS(n,m,i,s,Be)){ft=1,Qs(n,Sn(s,n.current)),ze=null;return}}catch(y){if(m!==null)throw ze=m,y;ft=1,Qs(n,Sn(s,n.current)),ze=null;return}i.flags&32768?(Ve||c===1?n=!0:pl||(Be&536870912)!==0?n=!1:(Vr=n=!0,(c===2||c===9||c===3||c===6)&&(c=fn.current,c!==null&&c.tag===13&&(c.flags|=16384))),yy(i,n)):ao(i)}function ao(n){var i=n;do{if((i.flags&32768)!==0){yy(i,Vr);return}n=i.return;var s=SS(i.alternate,i,gr);if(s!==null){ze=s;return}if(i=i.sibling,i!==null){ze=i;return}ze=i=n}while(i!==null);ft===0&&(ft=5)}function yy(n,i){do{var s=ES(n.alternate,n);if(s!==null){s.flags&=32767,ze=s;return}if(s=n.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(n=n.sibling,n!==null)){ze=n;return}ze=n=s}while(n!==null);ft=6,ze=null}function by(n,i,s,c,m,y,_,S,D){n.cancelPendingCommit=null;do so();while(Et!==0);if((Ye&6)!==0)throw Error(l(327));if(i!==null){if(i===n.current)throw Error(l(177));if(y=i.lanes|i.childLanes,y|=uc,fw(n,s,y,_,S,D),n===tt&&(ze=tt=null,Be=0),yl=i,Fr=n,yr=s,bf=y,xf=m,sy=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,zS(we,function(){return Sy(),null})):(n.callbackNode=null,n.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=z.T,z.T=null,m=Z.p,Z.p=2,_=Ye,Ye|=4;try{CS(n,i,s)}finally{Ye=_,Z.p=m,z.T=c}}Et=1,xy(),vy(),_y()}}function xy(){if(Et===1){Et=0;var n=Fr,i=yl,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=z.T,z.T=null;var c=Z.p;Z.p=2;var m=Ye;Ye|=4;try{Wg(i,n);var y=Mf,_=lp(n.containerInfo),S=y.focusedElem,D=y.selectionRange;if(_!==S&&S&&S.ownerDocument&&ip(S.ownerDocument.documentElement,S)){if(D!==null&&ic(S)){var V=D.start,K=D.end;if(K===void 0&&(K=V),"selectionStart"in S)S.selectionStart=V,S.selectionEnd=Math.min(K,S.value.length);else{var ee=S.ownerDocument||document,H=ee&&ee.defaultView||window;if(H.getSelection){var $=H.getSelection(),pe=S.textContent.length,Ce=Math.min(D.start,pe),et=D.end===void 0?Ce:Math.min(D.end,pe);!$.extend&&Ce>et&&(_=et,et=Ce,Ce=_);var I=rp(S,Ce),M=rp(S,et);if(I&&M&&($.rangeCount!==1||$.anchorNode!==I.node||$.anchorOffset!==I.offset||$.focusNode!==M.node||$.focusOffset!==M.offset)){var U=ee.createRange();U.setStart(I.node,I.offset),$.removeAllRanges(),Ce>et?($.addRange(U),$.extend(M.node,M.offset)):(U.setEnd(M.node,M.offset),$.addRange(U))}}}}for(ee=[],$=S;$=$.parentNode;)$.nodeType===1&&ee.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<ee.length;S++){var W=ee[S];W.element.scrollLeft=W.left,W.element.scrollTop=W.top}}vo=!!Df,Mf=Df=null}finally{Ye=m,Z.p=c,z.T=s}}n.current=i,Et=2}}function vy(){if(Et===2){Et=0;var n=Fr,i=yl,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=z.T,z.T=null;var c=Z.p;Z.p=2;var m=Ye;Ye|=4;try{Yg(n,i.alternate,i)}finally{Ye=m,Z.p=c,z.T=s}}Et=3}}function _y(){if(Et===4||Et===3){Et=0,er();var n=Fr,i=yl,s=yr,c=sy;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Et=5:(Et=0,yl=Fr=null,wy(n,n.pendingLanes));var m=n.pendingLanes;if(m===0&&(Gr=null),Bu(s),i=i.stateNode,se&&typeof se.onCommitFiberRoot=="function")try{se.onCommitFiberRoot(Nt,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=z.T,m=Z.p,Z.p=2,z.T=null;try{for(var y=n.onRecoverableError,_=0;_<c.length;_++){var S=c[_];y(S.value,{componentStack:S.stack})}}finally{z.T=i,Z.p=m}}(yr&3)!==0&&so(),Yn(n),m=n.pendingLanes,(s&261930)!==0&&(m&42)!==0?n===vf?Sa++:(Sa=0,vf=n):Sa=0,Ea(0)}}function wy(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,ia(i)))}function so(){return xy(),vy(),_y(),Sy()}function Sy(){if(Et!==5)return!1;var n=Fr,i=bf;bf=0;var s=Bu(yr),c=z.T,m=Z.p;try{Z.p=32>s?32:s,z.T=null,s=xf,xf=null;var y=Fr,_=yr;if(Et=0,yl=Fr=null,yr=0,(Ye&6)!==0)throw Error(l(331));var S=Ye;if(Ye|=4,iy(y.current),ty(y,y.current,_,s),Ye=S,Ea(0,!1),se&&typeof se.onPostCommitFiberRoot=="function")try{se.onPostCommitFiberRoot(Nt,y)}catch{}return!0}finally{Z.p=m,z.T=c,wy(n,i)}}function Ey(n,i,s){i=Sn(s,i),i=Zc(n.stateNode,i,2),n=Ir(n,i,2),n!==null&&(Fl(n,2),Yn(n))}function Ze(n,i,s){if(n.tag===3)Ey(n,n,s);else for(;i!==null;){if(i.tag===3){Ey(i,n,s);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Gr===null||!Gr.has(c))){n=Sn(s,n),s=Cg(2),c=Ir(i,s,2),c!==null&&(kg(s,c,i,n),Fl(c,2),Yn(c));break}}i=i.return}}function Sf(n,i,s){var c=n.pingCache;if(c===null){c=n.pingCache=new TS;var m=new Set;c.set(i,m)}else m=c.get(i),m===void 0&&(m=new Set,c.set(i,m));m.has(s)||(pf=!0,m.add(s),n=DS.bind(null,n,i,s),i.then(n,n))}function DS(n,i,s){var c=n.pingCache;c!==null&&c.delete(i),n.pingedLanes|=n.suspendedLanes&s,n.warmLanes&=~s,tt===n&&(Be&s)===s&&(ft===4||ft===3&&(Be&62914560)===Be&&300>St()-to?(Ye&2)===0&&bl(n,0):gf|=s,gl===Be&&(gl=0)),Yn(n)}function Cy(n,i){i===0&&(i=xm()),n=mi(n,i),n!==null&&(Fl(n,i),Yn(n))}function MS(n){var i=n.memoizedState,s=0;i!==null&&(s=i.retryLane),Cy(n,s)}function jS(n,i){var s=0;switch(n.tag){case 31:case 13:var c=n.stateNode,m=n.memoizedState;m!==null&&(s=m.retryLane);break;case 19:c=n.stateNode;break;case 22:c=n.stateNode._retryCache;break;default:throw Error(l(314))}c!==null&&c.delete(i),Cy(n,s)}function zS(n,i){return lt(n,i)}var oo=null,vl=null,Ef=!1,uo=!1,Cf=!1,$r=0;function Yn(n){n!==vl&&n.next===null&&(vl===null?oo=vl=n:vl=vl.next=n),uo=!0,Ef||(Ef=!0,PS())}function Ea(n,i){if(!Cf&&uo){Cf=!0;do for(var s=!1,c=oo;c!==null;){if(n!==0){var m=c.pendingLanes;if(m===0)var y=0;else{var _=c.suspendedLanes,S=c.pingedLanes;y=(1<<31-be(42|n)+1)-1,y&=m&~(_&~S),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(s=!0,Ry(c,y))}else y=Be,y=hs(c,c===tt?y:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(y&3)===0||Gl(c,y)||(s=!0,Ry(c,y));c=c.next}while(s);Cf=!1}}function IS(){ky()}function ky(){uo=Ef=!1;var n=0;$r!==0&&YS()&&(n=$r);for(var i=St(),s=null,c=oo;c!==null;){var m=c.next,y=Ay(c,i);y===0?(c.next=null,s===null?oo=m:s.next=m,m===null&&(vl=s)):(s=c,(n!==0||(y&3)!==0)&&(uo=!0)),c=m}Et!==0&&Et!==5||Ea(n),$r!==0&&($r=0)}function Ay(n,i){for(var s=n.suspendedLanes,c=n.pingedLanes,m=n.expirationTimes,y=n.pendingLanes&-62914561;0<y;){var _=31-be(y),S=1<<_,D=m[_];D===-1?((S&s)===0||(S&c)!==0)&&(m[_]=cw(S,i)):D<=i&&(n.expiredLanes|=S),y&=~S}if(i=tt,s=Be,s=hs(n,n===i?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c=n.callbackNode,s===0||n===i&&(Ke===2||Ke===9)||n.cancelPendingCommit!==null)return c!==null&&c!==null&&Gn(c),n.callbackNode=null,n.callbackPriority=0;if((s&3)===0||Gl(n,s)){if(i=s&-s,i===n.callbackPriority)return i;switch(c!==null&&Gn(c),Bu(s)){case 2:case 8:s=ae;break;case 32:s=we;break;case 268435456:s=qe;break;default:s=we}return c=Ty.bind(null,n),s=lt(s,c),n.callbackPriority=i,n.callbackNode=s,i}return c!==null&&c!==null&&Gn(c),n.callbackPriority=2,n.callbackNode=null,2}function Ty(n,i){if(Et!==0&&Et!==5)return n.callbackNode=null,n.callbackPriority=0,null;var s=n.callbackNode;if(so()&&n.callbackNode!==s)return null;var c=Be;return c=hs(n,n===tt?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c===0?null:(uy(n,c,i),Ay(n,St()),n.callbackNode!=null&&n.callbackNode===s?Ty.bind(null,n):null)}function Ry(n,i){if(so())return null;uy(n,i,!0)}function PS(){KS(function(){(Ye&6)!==0?lt(J,IS):ky()})}function kf(){if($r===0){var n=ll;n===0&&(n=Fn,Fn<<=1,(Fn&261888)===0&&(Fn=256)),$r=n}return $r}function Ly(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:ys(""+n)}function Oy(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 BS(n,i,s,c,m){if(i==="submit"&&s&&s.stateNode===m){var y=Ly((m[Jt]||null).action),_=c.submitter;_&&(i=(i=_[Jt]||null)?Ly(i.formAction):_.getAttribute("formAction"),i!==null&&(y=i,_=null));var S=new _s("action","action",null,c,m);n.push({event:S,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if($r!==0){var D=_?Oy(m,_):new FormData(m);qc(s,{pending:!0,data:D,method:m.method,action:y},null,D)}}else typeof y=="function"&&(S.preventDefault(),D=_?Oy(m,_):new FormData(m),qc(s,{pending:!0,data:D,method:m.method,action:y},y,D))},currentTarget:m}]})}}for(var Af=0;Af<oc.length;Af++){var Tf=oc[Af],US=Tf.toLowerCase(),VS=Tf[0].toUpperCase()+Tf.slice(1);Pn(US,"on"+VS)}Pn(op,"onAnimationEnd"),Pn(up,"onAnimationIteration"),Pn(cp,"onAnimationStart"),Pn("dblclick","onDoubleClick"),Pn("focusin","onFocus"),Pn("focusout","onBlur"),Pn(rS,"onTransitionRun"),Pn(iS,"onTransitionStart"),Pn(lS,"onTransitionCancel"),Pn(fp,"onTransitionEnd"),qi("onMouseEnter",["mouseout","mouseover"]),qi("onMouseLeave",["mouseout","mouseover"]),qi("onPointerEnter",["pointerout","pointerover"]),qi("onPointerLeave",["pointerout","pointerover"]),ci("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ci("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ci("onBeforeInput",["compositionend","keypress","textInput","paste"]),ci("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ci("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ci("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ca="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(" "),HS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ca));function Ny(n,i){i=(i&4)!==0;for(var s=0;s<n.length;s++){var c=n[s],m=c.event;c=c.listeners;e:{var y=void 0;if(i)for(var _=c.length-1;0<=_;_--){var S=c[_],D=S.instance,V=S.currentTarget;if(S=S.listener,D!==y&&m.isPropagationStopped())break e;y=S,m.currentTarget=V;try{y(m)}catch(K){Es(K)}m.currentTarget=null,y=D}else for(_=0;_<c.length;_++){if(S=c[_],D=S.instance,V=S.currentTarget,S=S.listener,D!==y&&m.isPropagationStopped())break e;y=S,m.currentTarget=V;try{y(m)}catch(K){Es(K)}m.currentTarget=null,y=D}}}}function Ie(n,i){var s=i[Uu];s===void 0&&(s=i[Uu]=new Set);var c=n+"__bubble";s.has(c)||(Dy(i,n,2,!1),s.add(c))}function Rf(n,i,s){var c=0;i&&(c|=4),Dy(s,n,c,i)}var co="_reactListening"+Math.random().toString(36).slice(2);function Lf(n){if(!n[co]){n[co]=!0,km.forEach(function(s){s!=="selectionchange"&&(HS.has(s)||Rf(s,!1,n),Rf(s,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[co]||(i[co]=!0,Rf("selectionchange",!1,i))}}function Dy(n,i,s,c){switch(ob(i)){case 2:var m=gE;break;case 8:m=yE;break;default:m=qf}s=m.bind(null,i,s,n),m=void 0,!Xu||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),c?m!==void 0?n.addEventListener(i,s,{capture:!0,passive:m}):n.addEventListener(i,s,!0):m!==void 0?n.addEventListener(i,s,{passive:m}):n.addEventListener(i,s,!1)}function Of(n,i,s,c,m){var y=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var _=c.tag;if(_===3||_===4){var S=c.stateNode.containerInfo;if(S===m)break;if(_===4)for(_=c.return;_!==null;){var D=_.tag;if((D===3||D===4)&&_.stateNode.containerInfo===m)return;_=_.return}for(;S!==null;){if(_=Hi(S),_===null)return;if(D=_.tag,D===5||D===6||D===26||D===27){c=y=_;continue e}S=S.parentNode}}c=c.return}Pm(function(){var V=y,K=Qu(s),ee=[];e:{var H=dp.get(n);if(H!==void 0){var $=_s,pe=n;switch(n){case"keypress":if(xs(s)===0)break e;case"keydown":case"keyup":$=jw;break;case"focusin":pe="focus",$=Wu;break;case"focusout":pe="blur",$=Wu;break;case"beforeblur":case"afterblur":$=Wu;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":$=Vm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=Sw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=Pw;break;case op:case up:case cp:$=kw;break;case fp:$=Uw;break;case"scroll":case"scrollend":$=_w;break;case"wheel":$=Hw;break;case"copy":case"cut":case"paste":$=Tw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=Gm;break;case"toggle":case"beforetoggle":$=Fw}var Ce=(i&4)!==0,et=!Ce&&(n==="scroll"||n==="scrollend"),I=Ce?H!==null?H+"Capture":null:H;Ce=[];for(var M=V,U;M!==null;){var W=M;if(U=W.stateNode,W=W.tag,W!==5&&W!==26&&W!==27||U===null||I===null||(W=Ql(M,I),W!=null&&Ce.push(ka(M,W,U))),et)break;M=M.return}0<Ce.length&&(H=new $(H,pe,null,s,K),ee.push({event:H,listeners:Ce}))}}if((i&7)===0){e:{if(H=n==="mouseover"||n==="pointerover",$=n==="mouseout"||n==="pointerout",H&&s!==$u&&(pe=s.relatedTarget||s.fromElement)&&(Hi(pe)||pe[Vi]))break e;if(($||H)&&(H=K.window===K?K:(H=K.ownerDocument)?H.defaultView||H.parentWindow:window,$?(pe=s.relatedTarget||s.toElement,$=V,pe=pe?Hi(pe):null,pe!==null&&(et=o(pe),Ce=pe.tag,pe!==et||Ce!==5&&Ce!==27&&Ce!==6)&&(pe=null)):($=null,pe=V),$!==pe)){if(Ce=Vm,W="onMouseLeave",I="onMouseEnter",M="mouse",(n==="pointerout"||n==="pointerover")&&(Ce=Gm,W="onPointerLeave",I="onPointerEnter",M="pointer"),et=$==null?H:$l($),U=pe==null?H:$l(pe),H=new Ce(W,M+"leave",$,s,K),H.target=et,H.relatedTarget=U,W=null,Hi(K)===V&&(Ce=new Ce(I,M+"enter",pe,s,K),Ce.target=U,Ce.relatedTarget=et,W=Ce),et=W,$&&pe)t:{for(Ce=GS,I=$,M=pe,U=0,W=I;W;W=Ce(W))U++;W=0;for(var _e=M;_e;_e=Ce(_e))W++;for(;0<U-W;)I=Ce(I),U--;for(;0<W-U;)M=Ce(M),W--;for(;U--;){if(I===M||M!==null&&I===M.alternate){Ce=I;break t}I=Ce(I),M=Ce(M)}Ce=null}else Ce=null;$!==null&&My(ee,H,$,Ce,!1),pe!==null&&et!==null&&My(ee,et,pe,Ce,!0)}}e:{if(H=V?$l(V):window,$=H.nodeName&&H.nodeName.toLowerCase(),$==="select"||$==="input"&&H.type==="file")var $e=Zm;else if(Xm(H))if(Jm)$e=eS;else{$e=Jw;var xe=Zw}else $=H.nodeName,!$||$.toLowerCase()!=="input"||H.type!=="checkbox"&&H.type!=="radio"?V&&qu(V.elementType)&&($e=Zm):$e=Ww;if($e&&($e=$e(n,V))){Km(ee,$e,s,K);break e}xe&&xe(n,H,V),n==="focusout"&&V&&H.type==="number"&&V.memoizedProps.value!=null&&Fu(H,"number",H.value)}switch(xe=V?$l(V):window,n){case"focusin":(Xm(xe)||xe.contentEditable==="true")&&(Zi=xe,lc=V,ta=null);break;case"focusout":ta=lc=Zi=null;break;case"mousedown":ac=!0;break;case"contextmenu":case"mouseup":case"dragend":ac=!1,ap(ee,s,K);break;case"selectionchange":if(nS)break;case"keydown":case"keyup":ap(ee,s,K)}var Le;if(tc)e:{switch(n){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Ki?Qm(n,s)&&(Ue="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(Ue="onCompositionStart");Ue&&(Fm&&s.locale!=="ko"&&(Ki||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Ki&&(Le=Bm()):(Lr=K,Ku="value"in Lr?Lr.value:Lr.textContent,Ki=!0)),xe=fo(V,Ue),0<xe.length&&(Ue=new Hm(Ue,n,null,s,K),ee.push({event:Ue,listeners:xe}),Le?Ue.data=Le:(Le=Ym(s),Le!==null&&(Ue.data=Le)))),(Le=$w?Qw(n,s):Yw(n,s))&&(Ue=fo(V,"onBeforeInput"),0<Ue.length&&(xe=new Hm("onBeforeInput","beforeinput",null,s,K),ee.push({event:xe,listeners:Ue}),xe.data=Le)),BS(ee,n,V,s,K)}Ny(ee,i)})}function ka(n,i,s){return{instance:n,listener:i,currentTarget:s}}function fo(n,i){for(var s=i+"Capture",c=[];n!==null;){var m=n,y=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||y===null||(m=Ql(n,s),m!=null&&c.unshift(ka(n,m,y)),m=Ql(n,i),m!=null&&c.push(ka(n,m,y))),n.tag===3)return c;n=n.return}return[]}function GS(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function My(n,i,s,c,m){for(var y=i._reactName,_=[];s!==null&&s!==c;){var S=s,D=S.alternate,V=S.stateNode;if(S=S.tag,D!==null&&D===c)break;S!==5&&S!==26&&S!==27||V===null||(D=V,m?(V=Ql(s,y),V!=null&&_.unshift(ka(s,V,D))):m||(V=Ql(s,y),V!=null&&_.push(ka(s,V,D)))),s=s.return}_.length!==0&&n.push({event:i,listeners:_})}var FS=/\r\n?/g,qS=/\u0000|\uFFFD/g;function jy(n){return(typeof n=="string"?n:""+n).replace(FS,`
|
|
10
|
-
`).replace(qS,"")}function zy(n,i){return i=jy(i),jy(n)===i}function We(n,i,s,c,m,y){switch(s){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||Qi(n,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&Qi(n,""+c);break;case"className":ps(n,"class",c);break;case"tabIndex":ps(n,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":ps(n,s,c);break;case"style":zm(n,c,y);break;case"data":if(i!=="object"){ps(n,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||s!=="href")){n.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(s);break}c=ys(""+c),n.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="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 y=="function"&&(s==="formAction"?(i!=="input"&&We(n,i,"name",m.name,m,null),We(n,i,"formEncType",m.formEncType,m,null),We(n,i,"formMethod",m.formMethod,m,null),We(n,i,"formTarget",m.formTarget,m,null)):(We(n,i,"encType",m.encType,m,null),We(n,i,"method",m.method,m,null),We(n,i,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(s);break}c=ys(""+c),n.setAttribute(s,c);break;case"onClick":c!=null&&(n.onclick=nr);break;case"onScroll":c!=null&&Ie("scroll",n);break;case"onScrollEnd":c!=null&&Ie("scrollend",n);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(l(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(l(60));n.innerHTML=s}}break;case"multiple":n.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":n.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){n.removeAttribute("xlink:href");break}s=ys(""+c),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":c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(s,""+c):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":c&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(s,""):n.removeAttribute(s);break;case"capture":case"download":c===!0?n.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(s,c):n.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?n.setAttribute(s,c):n.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?n.removeAttribute(s):n.setAttribute(s,c);break;case"popover":Ie("beforetoggle",n),Ie("toggle",n),ms(n,"popover",c);break;case"xlinkActuate":tr(n,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":tr(n,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":tr(n,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":tr(n,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":tr(n,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":tr(n,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":tr(n,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":tr(n,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":tr(n,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":ms(n,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=xw.get(s)||s,ms(n,s,c))}}function Nf(n,i,s,c,m,y){switch(s){case"style":zm(n,c,y);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(l(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(l(60));n.innerHTML=s}}break;case"children":typeof c=="string"?Qi(n,c):(typeof c=="number"||typeof c=="bigint")&&Qi(n,""+c);break;case"onScroll":c!=null&&Ie("scroll",n);break;case"onScrollEnd":c!=null&&Ie("scrollend",n);break;case"onClick":c!=null&&(n.onclick=nr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Am.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),i=s.slice(2,m?s.length-7:void 0),y=n[Jt]||null,y=y!=null?y[s]:null,typeof y=="function"&&n.removeEventListener(i,y,m),typeof c=="function")){typeof y!="function"&&y!==null&&(s in n?n[s]=null:n.hasAttribute(s)&&n.removeAttribute(s)),n.addEventListener(i,c,m);break e}s in n?n[s]=c:c===!0?n.setAttribute(s,""):ms(n,s,c)}}}function Vt(n,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",n),Ie("load",n);var c=!1,m=!1,y;for(y in s)if(s.hasOwnProperty(y)){var _=s[y];if(_!=null)switch(y){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:We(n,i,y,_,s,null)}}m&&We(n,i,"srcSet",s.srcSet,s,null),c&&We(n,i,"src",s.src,s,null);return;case"input":Ie("invalid",n);var S=y=_=m=null,D=null,V=null;for(c in s)if(s.hasOwnProperty(c)){var K=s[c];if(K!=null)switch(c){case"name":m=K;break;case"type":_=K;break;case"checked":D=K;break;case"defaultChecked":V=K;break;case"value":y=K;break;case"defaultValue":S=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(l(137,i));break;default:We(n,i,c,K,s,null)}}Nm(n,y,S,D,V,_,m,!1);return;case"select":Ie("invalid",n),c=_=y=null;for(m in s)if(s.hasOwnProperty(m)&&(S=s[m],S!=null))switch(m){case"value":y=S;break;case"defaultValue":_=S;break;case"multiple":c=S;default:We(n,i,m,S,s,null)}i=y,s=_,n.multiple=!!c,i!=null?$i(n,!!c,i,!1):s!=null&&$i(n,!!c,s,!0);return;case"textarea":Ie("invalid",n),y=m=c=null;for(_ in s)if(s.hasOwnProperty(_)&&(S=s[_],S!=null))switch(_){case"value":c=S;break;case"defaultValue":m=S;break;case"children":y=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(l(91));break;default:We(n,i,_,S,s,null)}Mm(n,c,m,y);return;case"option":for(D in s)s.hasOwnProperty(D)&&(c=s[D],c!=null)&&(D==="selected"?n.selected=c&&typeof c!="function"&&typeof c!="symbol":We(n,i,D,c,s,null));return;case"dialog":Ie("beforetoggle",n),Ie("toggle",n),Ie("cancel",n),Ie("close",n);break;case"iframe":case"object":Ie("load",n);break;case"video":case"audio":for(c=0;c<Ca.length;c++)Ie(Ca[c],n);break;case"image":Ie("error",n),Ie("load",n);break;case"details":Ie("toggle",n);break;case"embed":case"source":case"link":Ie("error",n),Ie("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(V in s)if(s.hasOwnProperty(V)&&(c=s[V],c!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:We(n,i,V,c,s,null)}return;default:if(qu(i)){for(K in s)s.hasOwnProperty(K)&&(c=s[K],c!==void 0&&Nf(n,i,K,c,s,void 0));return}}for(S in s)s.hasOwnProperty(S)&&(c=s[S],c!=null&&We(n,i,S,c,s,null))}function $S(n,i,s,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,y=null,_=null,S=null,D=null,V=null,K=null;for($ in s){var ee=s[$];if(s.hasOwnProperty($)&&ee!=null)switch($){case"checked":break;case"value":break;case"defaultValue":D=ee;default:c.hasOwnProperty($)||We(n,i,$,null,c,ee)}}for(var H in c){var $=c[H];if(ee=s[H],c.hasOwnProperty(H)&&($!=null||ee!=null))switch(H){case"type":y=$;break;case"name":m=$;break;case"checked":V=$;break;case"defaultChecked":K=$;break;case"value":_=$;break;case"defaultValue":S=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(l(137,i));break;default:$!==ee&&We(n,i,H,$,c,ee)}}Gu(n,_,S,D,V,K,y,m);return;case"select":$=_=S=H=null;for(y in s)if(D=s[y],s.hasOwnProperty(y)&&D!=null)switch(y){case"value":break;case"multiple":$=D;default:c.hasOwnProperty(y)||We(n,i,y,null,c,D)}for(m in c)if(y=c[m],D=s[m],c.hasOwnProperty(m)&&(y!=null||D!=null))switch(m){case"value":H=y;break;case"defaultValue":S=y;break;case"multiple":_=y;default:y!==D&&We(n,i,m,y,c,D)}i=S,s=_,c=$,H!=null?$i(n,!!s,H,!1):!!c!=!!s&&(i!=null?$i(n,!!s,i,!0):$i(n,!!s,s?[]:"",!1));return;case"textarea":$=H=null;for(S in s)if(m=s[S],s.hasOwnProperty(S)&&m!=null&&!c.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:We(n,i,S,null,c,m)}for(_ in c)if(m=c[_],y=s[_],c.hasOwnProperty(_)&&(m!=null||y!=null))switch(_){case"value":H=m;break;case"defaultValue":$=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(l(91));break;default:m!==y&&We(n,i,_,m,c,y)}Dm(n,H,$);return;case"option":for(var pe in s)H=s[pe],s.hasOwnProperty(pe)&&H!=null&&!c.hasOwnProperty(pe)&&(pe==="selected"?n.selected=!1:We(n,i,pe,null,c,H));for(D in c)H=c[D],$=s[D],c.hasOwnProperty(D)&&H!==$&&(H!=null||$!=null)&&(D==="selected"?n.selected=H&&typeof H!="function"&&typeof H!="symbol":We(n,i,D,H,c,$));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 Ce in s)H=s[Ce],s.hasOwnProperty(Ce)&&H!=null&&!c.hasOwnProperty(Ce)&&We(n,i,Ce,null,c,H);for(V in c)if(H=c[V],$=s[V],c.hasOwnProperty(V)&&H!==$&&(H!=null||$!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(l(137,i));break;default:We(n,i,V,H,c,$)}return;default:if(qu(i)){for(var et in s)H=s[et],s.hasOwnProperty(et)&&H!==void 0&&!c.hasOwnProperty(et)&&Nf(n,i,et,void 0,c,H);for(K in c)H=c[K],$=s[K],!c.hasOwnProperty(K)||H===$||H===void 0&&$===void 0||Nf(n,i,K,H,c,$);return}}for(var I in s)H=s[I],s.hasOwnProperty(I)&&H!=null&&!c.hasOwnProperty(I)&&We(n,i,I,null,c,H);for(ee in c)H=c[ee],$=s[ee],!c.hasOwnProperty(ee)||H===$||H==null&&$==null||We(n,i,ee,H,c,$)}function Iy(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function QS(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,s=performance.getEntriesByType("resource"),c=0;c<s.length;c++){var m=s[c],y=m.transferSize,_=m.initiatorType,S=m.duration;if(y&&S&&Iy(_)){for(_=0,S=m.responseEnd,c+=1;c<s.length;c++){var D=s[c],V=D.startTime;if(V>S)break;var K=D.transferSize,ee=D.initiatorType;K&&Iy(ee)&&(D=D.responseEnd,_+=K*(D<S?1:(S-V)/(D-V)))}if(--c,i+=8*(y+_)/(m.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 Df=null,Mf=null;function ho(n){return n.nodeType===9?n:n.ownerDocument}function Py(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 By(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 jf(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 zf=null;function YS(){var n=window.event;return n&&n.type==="popstate"?n===zf?!1:(zf=n,!0):(zf=null,!1)}var Uy=typeof setTimeout=="function"?setTimeout:void 0,XS=typeof clearTimeout=="function"?clearTimeout:void 0,Vy=typeof Promise=="function"?Promise:void 0,KS=typeof queueMicrotask=="function"?queueMicrotask:typeof Vy<"u"?function(n){return Vy.resolve(null).then(n).catch(ZS)}:Uy;function ZS(n){setTimeout(function(){throw n})}function Qr(n){return n==="head"}function Hy(n,i){var s=i,c=0;do{var m=s.nextSibling;if(n.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(c===0){n.removeChild(m),El(i);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")Aa(n.ownerDocument.documentElement);else if(s==="head"){s=n.ownerDocument.head,Aa(s);for(var y=s.firstChild;y;){var _=y.nextSibling,S=y.nodeName;y[ql]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&y.rel.toLowerCase()==="stylesheet"||s.removeChild(y),y=_}}else s==="body"&&Aa(n.ownerDocument.body);s=m}while(s);El(i)}function Gy(n,i){var s=n;n=0;do{var c=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(n===0)break;n--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||n++;s=c}while(s)}function If(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":If(s),Vu(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}n.removeChild(s)}}function JS(n,i,s,c){for(;n.nodeType===1;){var m=s;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(c){if(!n[ql])switch(i){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(y=n.getAttribute("rel"),y==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(y!==m.rel||n.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||n.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||n.getAttribute("title")!==(m.title==null?null:m.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(y=n.getAttribute("src"),(y!==(m.src==null?null:m.src)||n.getAttribute("type")!==(m.type==null?null:m.type)||n.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&y&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(i==="input"&&n.type==="hidden"){var y=m.name==null?null:""+m.name;if(m.type==="hidden"&&n.getAttribute("name")===y)return n}else return n;if(n=Tn(n.nextSibling),n===null)break}return null}function WS(n,i,s){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=Tn(n.nextSibling),n===null))return null;return n}function Fy(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Tn(n.nextSibling),n===null))return null;return n}function Pf(n){return n.data==="$?"||n.data==="$~"}function Bf(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function eE(n,i){var s=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||s.readyState!=="loading")i();else{var c=function(){i(),s.removeEventListener("DOMContentLoaded",c)};s.addEventListener("DOMContentLoaded",c),n._reactRetry=c}}function Tn(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 Uf=null;function qy(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"||s==="/&"){if(i===0)return Tn(n.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}n=n.nextSibling}return null}function $y(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 Qy(n,i,s){switch(i=ho(s),n){case"html":if(n=i.documentElement,!n)throw Error(l(452));return n;case"head":if(n=i.head,!n)throw Error(l(453));return n;case"body":if(n=i.body,!n)throw Error(l(454));return n;default:throw Error(l(451))}}function Aa(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);Vu(n)}var Rn=new Map,Yy=new Set;function mo(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var br=Z.d;Z.d={f:tE,r:nE,D:rE,C:iE,L:lE,m:aE,X:oE,S:sE,M:uE};function tE(){var n=br.f(),i=io();return n||i}function nE(n){var i=Gi(n);i!==null&&i.tag===5&&i.type==="form"?fg(i):br.r(n)}var _l=typeof document>"u"?null:document;function Xy(n,i,s){var c=_l;if(c&&typeof i=="string"&&i){var m=_n(i);m='link[rel="'+n+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),Yy.has(m)||(Yy.add(m),n={rel:n,crossOrigin:s,href:i},c.querySelector(m)===null&&(i=c.createElement("link"),Vt(i,"link",n),Dt(i),c.head.appendChild(i)))}}function rE(n){br.D(n),Xy("dns-prefetch",n,null)}function iE(n,i){br.C(n,i),Xy("preconnect",n,i)}function lE(n,i,s){br.L(n,i,s);var c=_l;if(c&&n&&i){var m='link[rel="preload"][as="'+_n(i)+'"]';i==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+_n(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+_n(s.imageSizes)+'"]')):m+='[href="'+_n(n)+'"]';var y=m;switch(i){case"style":y=wl(n);break;case"script":y=Sl(n)}Rn.has(y)||(n=p({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:n,as:i},s),Rn.set(y,n),c.querySelector(m)!==null||i==="style"&&c.querySelector(Ta(y))||i==="script"&&c.querySelector(Ra(y))||(i=c.createElement("link"),Vt(i,"link",n),Dt(i),c.head.appendChild(i)))}}function aE(n,i){br.m(n,i);var s=_l;if(s&&n){var c=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+_n(c)+'"][href="'+_n(n)+'"]',y=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Sl(n)}if(!Rn.has(y)&&(n=p({rel:"modulepreload",href:n},i),Rn.set(y,n),s.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Ra(y)))return}c=s.createElement("link"),Vt(c,"link",n),Dt(c),s.head.appendChild(c)}}}function sE(n,i,s){br.S(n,i,s);var c=_l;if(c&&n){var m=Fi(c).hoistableStyles,y=wl(n);i=i||"default";var _=m.get(y);if(!_){var S={loading:0,preload:null};if(_=c.querySelector(Ta(y)))S.loading=5;else{n=p({rel:"stylesheet",href:n,"data-precedence":i},s),(s=Rn.get(y))&&Vf(n,s);var D=_=c.createElement("link");Dt(D),Vt(D,"link",n),D._p=new Promise(function(V,K){D.onload=V,D.onerror=K}),D.addEventListener("load",function(){S.loading|=1}),D.addEventListener("error",function(){S.loading|=2}),S.loading|=4,po(_,i,c)}_={type:"stylesheet",instance:_,count:1,state:S},m.set(y,_)}}}function oE(n,i){br.X(n,i);var s=_l;if(s&&n){var c=Fi(s).hoistableScripts,m=Sl(n),y=c.get(m);y||(y=s.querySelector(Ra(m)),y||(n=p({src:n,async:!0},i),(i=Rn.get(m))&&Hf(n,i),y=s.createElement("script"),Dt(y),Vt(y,"link",n),s.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(m,y))}}function uE(n,i){br.M(n,i);var s=_l;if(s&&n){var c=Fi(s).hoistableScripts,m=Sl(n),y=c.get(m);y||(y=s.querySelector(Ra(m)),y||(n=p({src:n,async:!0,type:"module"},i),(i=Rn.get(m))&&Hf(n,i),y=s.createElement("script"),Dt(y),Vt(y,"link",n),s.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(m,y))}}function Ky(n,i,s,c){var m=(m=ce.current)?mo(m):null;if(!m)throw Error(l(446));switch(n){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=wl(s.href),s=Fi(m).hoistableStyles,c=s.get(i),c||(c={type:"style",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){n=wl(s.href);var y=Fi(m).hoistableStyles,_=y.get(n);if(_||(m=m.ownerDocument||m,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(n,_),(y=m.querySelector(Ta(n)))&&!y._p&&(_.instance=y,_.state.loading=5),Rn.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},Rn.set(n,s),y||cE(m,n,s,_.state))),i&&c===null)throw Error(l(528,""));return _}if(i&&c!==null)throw Error(l(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Sl(s),s=Fi(m).hoistableScripts,c=s.get(i),c||(c={type:"script",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,n))}}function wl(n){return'href="'+_n(n)+'"'}function Ta(n){return'link[rel="stylesheet"]['+n+"]"}function Zy(n){return p({},n,{"data-precedence":n.precedence,precedence:null})}function cE(n,i,s,c){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=n.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),Vt(i,"link",s),Dt(i),n.head.appendChild(i))}function Sl(n){return'[src="'+_n(n)+'"]'}function Ra(n){return"script[async]"+n}function Jy(n,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var c=n.querySelector('style[data-href~="'+_n(s.href)+'"]');if(c)return i.instance=c,Dt(c),c;var m=p({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return c=(n.ownerDocument||n).createElement("style"),Dt(c),Vt(c,"style",m),po(c,s.precedence,n),i.instance=c;case"stylesheet":m=wl(s.href);var y=n.querySelector(Ta(m));if(y)return i.state.loading|=4,i.instance=y,Dt(y),y;c=Zy(s),(m=Rn.get(m))&&Vf(c,m),y=(n.ownerDocument||n).createElement("link"),Dt(y);var _=y;return _._p=new Promise(function(S,D){_.onload=S,_.onerror=D}),Vt(y,"link",c),i.state.loading|=4,po(y,s.precedence,n),i.instance=y;case"script":return y=Sl(s.src),(m=n.querySelector(Ra(y)))?(i.instance=m,Dt(m),m):(c=s,(m=Rn.get(y))&&(c=p({},s),Hf(c,m)),n=n.ownerDocument||n,m=n.createElement("script"),Dt(m),Vt(m,"link",c),n.head.appendChild(m),i.instance=m);case"void":return null;default:throw Error(l(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,po(c,s.precedence,n));return i.instance}function po(n,i,s){for(var c=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,y=m,_=0;_<c.length;_++){var S=c[_];if(S.dataset.precedence===i)y=S;else if(y!==m)break}y?y.parentNode.insertBefore(n,y.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(n,i.firstChild))}function Vf(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.title==null&&(n.title=i.title)}function Hf(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.integrity==null&&(n.integrity=i.integrity)}var go=null;function Wy(n,i,s){if(go===null){var c=new Map,m=go=new Map;m.set(s,c)}else m=go,c=m.get(s),c||(c=new Map,m.set(s,c));if(c.has(n))return c;for(c.set(n,null),s=s.getElementsByTagName(n),m=0;m<s.length;m++){var y=s[m];if(!(y[ql]||y[It]||n==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var _=y.getAttribute(i)||"";_=n+_;var S=c.get(_);S?S.push(y):c.set(_,[y])}}return c}function eb(n,i,s){n=n.ownerDocument||n,n.head.insertBefore(s,i==="title"?n.querySelector("head > title"):null)}function fE(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;return i.rel==="stylesheet"?(n=i.disabled,typeof i.precedence=="string"&&n==null):!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 tb(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function dE(n,i,s,c){if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=wl(c.href),y=i.querySelector(Ta(m));if(y){i=y._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=yo.bind(n),i.then(n,n)),s.state.loading|=4,s.instance=y,Dt(y);return}y=i.ownerDocument||i,c=Zy(c),(m=Rn.get(m))&&Vf(c,m),y=y.createElement("link"),Dt(y);var _=y;_._p=new Promise(function(S,D){_.onload=S,_.onerror=D}),Vt(y,"link",c),s.instance=y}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(n.count++,s=yo.bind(n),i.addEventListener("load",s),i.addEventListener("error",s))}}var Gf=0;function hE(n,i){return n.stylesheets&&n.count===0&&xo(n,n.stylesheets),0<n.count||0<n.imgCount?function(s){var c=setTimeout(function(){if(n.stylesheets&&xo(n,n.stylesheets),n.unsuspend){var y=n.unsuspend;n.unsuspend=null,y()}},6e4+i);0<n.imgBytes&&Gf===0&&(Gf=62500*QS());var m=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&xo(n,n.stylesheets),n.unsuspend)){var y=n.unsuspend;n.unsuspend=null,y()}},(n.imgBytes>Gf?50:800)+i);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function yo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xo(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var bo=null;function xo(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,bo=new Map,i.forEach(mE,n),bo=null,yo.call(n))}function mE(n,i){if(!(i.state.loading&4)){var s=bo.get(n);if(s)var c=s.get(null);else{s=new Map,bo.set(n,s);for(var m=n.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<m.length;y++){var _=m[y];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(s.set(_.dataset.precedence,_),c=_)}c&&s.set(null,c)}m=i.instance,_=m.getAttribute("data-precedence"),y=s.get(_)||c,y===c&&s.set(null,m),s.set(_,m),this.count++,c=yo.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),y?y.parentNode.insertBefore(m,y.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(m,n.firstChild)),i.state.loading|=4}}var La={$$typeof:O,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function pE(n,i,s,c,m,y,_,S,D){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=Iu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Iu(0),this.hiddenUpdates=Iu(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=y,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=D,this.incompleteTransitions=new Map}function nb(n,i,s,c,m,y,_,S,D,V,K,ee){return n=new pE(n,i,s,_,D,V,K,ee,S),i=1,y===!0&&(i|=24),y=cn(3,null,null,i),n.current=y,y.stateNode=n,i=_c(),i.refCount++,n.pooledCache=i,i.refCount++,y.memoizedState={element:c,isDehydrated:s,cache:i},Cc(y),n}function rb(n){return n?(n=el,n):el}function ib(n,i,s,c,m,y){m=rb(m),c.context===null?c.context=m:c.pendingContext=m,c=zr(i),c.payload={element:s},y=y===void 0?null:y,y!==null&&(c.callback=y),s=Ir(n,c,i),s!==null&&(ln(s,n,i),oa(s,n,i))}function lb(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<i?s:i}}function Ff(n,i){lb(n,i),(n=n.alternate)&&lb(n,i)}function ab(n){if(n.tag===13||n.tag===31){var i=mi(n,67108864);i!==null&&ln(i,n,67108864),Ff(n,67108864)}}function sb(n){if(n.tag===13||n.tag===31){var i=pn();i=Pu(i);var s=mi(n,i);s!==null&&ln(s,n,i),Ff(n,i)}}var vo=!0;function gE(n,i,s,c){var m=z.T;z.T=null;var y=Z.p;try{Z.p=2,qf(n,i,s,c)}finally{Z.p=y,z.T=m}}function yE(n,i,s,c){var m=z.T;z.T=null;var y=Z.p;try{Z.p=8,qf(n,i,s,c)}finally{Z.p=y,z.T=m}}function qf(n,i,s,c){if(vo){var m=$f(c);if(m===null)Of(n,i,c,_o,s),ub(n,c);else if(xE(m,n,i,s,c))c.stopPropagation();else if(ub(n,c),i&4&&-1<bE.indexOf(n)){for(;m!==null;){var y=Gi(m);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var _=In(y.pendingLanes);if(_!==0){var S=y;for(S.pendingLanes|=2,S.entangledLanes|=2;_;){var D=1<<31-be(_);S.entanglements[1]|=D,_&=~D}Yn(y),(Ye&6)===0&&(no=St()+500,Ea(0))}}break;case 31:case 13:S=mi(y,2),S!==null&&ln(S,y,2),io(),Ff(y,2)}if(y=$f(c),y===null&&Of(n,i,c,_o,s),y===m)break;m=y}m!==null&&c.stopPropagation()}else Of(n,i,c,null,s)}}function $f(n){return n=Qu(n),Qf(n)}var _o=null;function Qf(n){if(_o=null,n=Hi(n),n!==null){var i=o(n);if(i===null)n=null;else{var s=i.tag;if(s===13){if(n=u(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 _o=n,null}function ob(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(ui()){case J:return 2;case ae:return 8;case we:case Ne:return 32;case qe:return 268435456;default:return 32}default:return 32}}var Yf=!1,Yr=null,Xr=null,Kr=null,Oa=new Map,Na=new Map,Zr=[],bE="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 ub(n,i){switch(n){case"focusin":case"focusout":Yr=null;break;case"dragenter":case"dragleave":Xr=null;break;case"mouseover":case"mouseout":Kr=null;break;case"pointerover":case"pointerout":Oa.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Na.delete(i.pointerId)}}function Da(n,i,s,c,m,y){return n===null||n.nativeEvent!==y?(n={blockedOn:i,domEventName:s,eventSystemFlags:c,nativeEvent:y,targetContainers:[m]},i!==null&&(i=Gi(i),i!==null&&ab(i)),n):(n.eventSystemFlags|=c,i=n.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),n)}function xE(n,i,s,c,m){switch(i){case"focusin":return Yr=Da(Yr,n,i,s,c,m),!0;case"dragenter":return Xr=Da(Xr,n,i,s,c,m),!0;case"mouseover":return Kr=Da(Kr,n,i,s,c,m),!0;case"pointerover":var y=m.pointerId;return Oa.set(y,Da(Oa.get(y)||null,n,i,s,c,m)),!0;case"gotpointercapture":return y=m.pointerId,Na.set(y,Da(Na.get(y)||null,n,i,s,c,m)),!0}return!1}function cb(n){var i=Hi(n.target);if(i!==null){var s=o(i);if(s!==null){if(i=s.tag,i===13){if(i=u(s),i!==null){n.blockedOn=i,Em(n.priority,function(){sb(s)});return}}else if(i===31){if(i=f(s),i!==null){n.blockedOn=i,Em(n.priority,function(){sb(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 wo(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var s=$f(n.nativeEvent);if(s===null){s=n.nativeEvent;var c=new s.constructor(s.type,s);$u=c,s.target.dispatchEvent(c),$u=null}else return i=Gi(s),i!==null&&ab(i),n.blockedOn=s,!1;i.shift()}return!0}function fb(n,i,s){wo(n)&&s.delete(i)}function vE(){Yf=!1,Yr!==null&&wo(Yr)&&(Yr=null),Xr!==null&&wo(Xr)&&(Xr=null),Kr!==null&&wo(Kr)&&(Kr=null),Oa.forEach(fb),Na.forEach(fb)}function So(n,i){n.blockedOn===i&&(n.blockedOn=null,Yf||(Yf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,vE)))}var Eo=null;function db(n){Eo!==n&&(Eo=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Eo===n&&(Eo=null);for(var i=0;i<n.length;i+=3){var s=n[i],c=n[i+1],m=n[i+2];if(typeof c!="function"){if(Qf(c||s)===null)continue;break}var y=Gi(s);y!==null&&(n.splice(i,3),i-=3,qc(y,{pending:!0,data:m,method:s.method,action:c},c,m))}}))}function El(n){function i(D){return So(D,n)}Yr!==null&&So(Yr,n),Xr!==null&&So(Xr,n),Kr!==null&&So(Kr,n),Oa.forEach(i),Na.forEach(i);for(var s=0;s<Zr.length;s++){var c=Zr[s];c.blockedOn===n&&(c.blockedOn=null)}for(;0<Zr.length&&(s=Zr[0],s.blockedOn===null);)cb(s),s.blockedOn===null&&Zr.shift();if(s=(n.ownerDocument||n).$$reactFormReplay,s!=null)for(c=0;c<s.length;c+=3){var m=s[c],y=s[c+1],_=m[Jt]||null;if(typeof y=="function")_||db(s);else if(_){var S=null;if(y&&y.hasAttribute("formAction")){if(m=y,_=y[Jt]||null)S=_.formAction;else if(Qf(m)!==null)continue}else S=_.action;typeof S=="function"?s[c+1]=S:(s.splice(c,3),c-=3),db(s)}}}function hb(){function n(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(_){return m=_})},focusReset:"manual",scroll:"manual"})}function i(){m!==null&&(m(),m=null),c||setTimeout(s,20)}function s(){if(!c&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,m=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){c=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),m!==null&&(m(),m=null)}}}function Xf(n){this._internalRoot=n}Co.prototype.render=Xf.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(l(409));var s=i.current,c=pn();ib(s,c,n,i,null,null)},Co.prototype.unmount=Xf.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),io(),i[Vi]=null}};function Co(n){this._internalRoot=n}Co.prototype.unstable_scheduleHydration=function(n){if(n){var i=Sm();n={blockedOn:null,target:n,priority:i};for(var s=0;s<Zr.length&&i!==0&&i<Zr[s].priority;s++);Zr.splice(s,0,n),s===0&&cb(n)}};var mb=t.version;if(mb!=="19.2.4")throw Error(l(527,mb,"19.2.4"));Z.findDOMNode=function(n){var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(l(188)):(n=Object.keys(n).join(","),Error(l(268,n)));return n=h(i),n=n!==null?g(n):null,n=n===null?null:n.stateNode,n};var _E={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ko=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ko.isDisabled&&ko.supportsFiber)try{Nt=ko.inject(_E),se=ko}catch{}}return ja.createRoot=function(n,i){if(!a(n))throw Error(l(299));var s=!1,c="",m=_g,y=wg,_=Sg;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(y=i.onCaughtError),i.onRecoverableError!==void 0&&(_=i.onRecoverableError)),i=nb(n,1,!1,null,null,s,c,null,m,y,_,hb),n[Vi]=i.current,Lf(n),new Xf(i)},ja.hydrateRoot=function(n,i,s){if(!a(n))throw Error(l(299));var c=!1,m="",y=_g,_=wg,S=Sg,D=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(y=s.onUncaughtError),s.onCaughtError!==void 0&&(_=s.onCaughtError),s.onRecoverableError!==void 0&&(S=s.onRecoverableError),s.formState!==void 0&&(D=s.formState)),i=nb(n,1,!0,i,s??null,c,m,D,y,_,S,hb),i.context=rb(null),s=i.current,c=pn(),c=Pu(c),m=zr(c),m.callback=null,Ir(s,m,c),s=c,i.current.lanes=s,Fl(i,s),Yn(i),n[Vi]=i.current,Lf(n),new Co(i)},ja.version="19.2.4",ja}var Eb;function OE(){if(Eb)return Jf.exports;Eb=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(),Jf.exports=LE(),Jf.exports}var NE=OE();const DE=gu(NE);var is=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(){}},ME={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},jE=class{#e=ME;#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)}},Ni=new jE;function zE(e){setTimeout(e,0)}var ji=typeof window>"u"||"Deno"in globalThis;function sn(){}function IE(e,t){return typeof e=="function"?e(t):e}function Ud(e){return typeof e=="number"&&e>=0&&e!==1/0}function Bx(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ii(e,t){return typeof e=="function"?e(t):e}function On(e,t){return typeof e=="function"?e(t):e}function Cb(e,t){const{type:r="all",exact:l,fetchStatus:a,predicate:o,queryKey:u,stale:f}=e;if(u){if(l){if(t.queryHash!==Ah(u,t.options))return!1}else if(!Ka(t.queryKey,u))return!1}if(r!=="all"){const d=t.isActive();if(r==="active"&&!d||r==="inactive"&&d)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||a&&a!==t.state.fetchStatus||o&&!o(t))}function kb(e,t){const{exact:r,status:l,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Xa(t.options.mutationKey)!==Xa(o))return!1}else if(!Ka(t.options.mutationKey,o))return!1}return!(l&&t.state.status!==l||a&&!a(t))}function Ah(e,t){return(t?.queryKeyHashFn||Xa)(e)}function Xa(e){return JSON.stringify(e,(t,r)=>Hd(r)?Object.keys(r).sort().reduce((l,a)=>(l[a]=r[a],l),{}):r)}function Ka(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Ka(e[r],t[r])):!1}var PE=Object.prototype.hasOwnProperty;function Ux(e,t,r=0){if(e===t)return e;if(r>500)return t;const l=Ab(e)&&Ab(t);if(!l&&!(Hd(e)&&Hd(t)))return t;const o=(l?e:Object.keys(e)).length,u=l?t:Object.keys(t),f=u.length,d=l?new Array(f):{};let h=0;for(let g=0;g<f;g++){const p=l?g:u[g],b=e[p],x=t[p];if(b===x){d[p]=b,(l?g<o:PE.call(e,p))&&h++;continue}if(b===null||x===null||typeof b!="object"||typeof x!="object"){d[p]=x;continue}const w=Ux(b,x,r+1);d[p]=w,w===b&&h++}return o===f&&h===o?e:d}function Vd(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 Ab(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Hd(e){if(!Tb(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Tb(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Tb(e){return Object.prototype.toString.call(e)==="[object Object]"}function BE(e){return new Promise(t=>{Ni.setTimeout(t,e)})}function Gd(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Ux(e,t):t}function UE(e,t,r=0){const l=[...e,t];return r&&l.length>r?l.slice(1):l}function VE(e,t,r=0){const l=[t,...e];return r&&l.length>r?l.slice(0,-1):l}var Th=Symbol();function Vx(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Th?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Hx(e,t){return typeof e=="function"?e(...t):!!e}function HE(e,t,r){let l=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??=t(),l||(l=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),e}var GE=class extends is{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!ji&&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"}},Rh=new GE;function Fd(){let e,t;const r=new Promise((a,o)=>{e=a,t=o});r.status="pending",r.catch(()=>{});function l(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{l({status:"fulfilled",value:a}),e(a)},r.reject=a=>{l({status:"rejected",reason:a}),t(a)},r}var FE=zE;function qE(){let e=[],t=0,r=f=>{f()},l=f=>{f()},a=FE;const o=f=>{t?e.push(f):a(()=>{r(f)})},u=()=>{const f=e;e=[],f.length&&a(()=>{l(()=>{f.forEach(d=>{r(d)})})})};return{batch:f=>{let d;t++;try{d=f()}finally{t--,t||u()}return d},batchCalls:f=>(...d)=>{o(()=>{f(...d)})},schedule:o,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{l=f},setScheduler:f=>{a=f}}}var Ht=qE(),$E=class extends is{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!ji&&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}},Ko=new $E;function QE(e){return Math.min(1e3*2**e,3e4)}function Gx(e){return(e??"online")==="online"?Ko.isOnline():!0}var qd=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Fx(e){let t=!1,r=0,l;const a=Fd(),o=()=>a.status!=="pending",u=E=>{if(!o()){const R=new qd(E);b(R),e.onCancel?.(R)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>Rh.isFocused()&&(e.networkMode==="always"||Ko.isOnline())&&e.canRun(),g=()=>Gx(e.networkMode)&&e.canRun(),p=E=>{o()||(l?.(),a.resolve(E))},b=E=>{o()||(l?.(),a.reject(E))},x=()=>new Promise(E=>{l=R=>{(o()||h())&&E(R)},e.onPause?.()}).then(()=>{l=void 0,o()||e.onContinue?.()}),w=()=>{if(o())return;let E;const R=r===0?e.initialPromise:void 0;try{E=R??e.fn()}catch(C){E=Promise.reject(C)}Promise.resolve(E).then(p).catch(C=>{if(o())return;const L=e.retry??(ji?0:3),O=e.retryDelay??QE,B=typeof O=="function"?O(r,C):O,Y=L===!0||typeof L=="number"&&r<L||typeof L=="function"&&L(r,C);if(t||!Y){b(C);return}r++,e.onFail?.(r,C),BE(B).then(()=>h()?void 0:x()).then(()=>{t?b(C):w()})})};return{promise:a,status:()=>a.status,cancel:u,continue:()=>(l?.(),a),cancelRetry:f,continueRetry:d,canStart:g,start:()=>(g()?w():x().then(w),a)}}var qx=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ud(this.gcTime)&&(this.#e=Ni.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ji?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ni.clearTimeout(this.#e),this.#e=void 0)}},YE=class extends qx{#e;#t;#n;#i;#r;#a;#s;constructor(e){super(),this.#s=!1,this.#a=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=Lb(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.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Lb(this.options);t.data!==void 0&&(this.setState(Rb(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const r=Gd(this.state.data,e,this.options);return this.#l({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#l({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(sn).catch(sn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>On(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Th||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ii(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:!Bx(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.#s?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.#l({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(d=>d.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,l=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#s=!0,r.signal)})},a=()=>{const f=Vx(this.options,t),h=(()=>{const g={client:this.#i,queryKey:this.queryKey,meta:this.meta};return l(g),g})();return this.#s=!1,this.options.persister?this.options.persister(f,h,this):f(h)},u=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:a};return l(f),f})();this.options.behavior?.onFetch(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#l({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=Fx({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:f=>{f instanceof qd&&f.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(f,d)=>{this.#l({type:"failed",failureCount:f,error:d})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.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 qd){if(f.silent)return this.#r.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#l({type:"error",error:f}),this.#n.config.onError?.(f,this),this.#n.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#l(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,...$x(r.data,this.options),fetchMeta:e.meta??null};case"success":const l={...r,...Rb(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?l:void 0,l;case"error":const a=e.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),Ht.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function $x(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Gx(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Rb(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Lb(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,l=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?l??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var XE=class extends is{constructor(e,t){super(),this.options=t,this.#e=e,this.#l=null,this.#s=Fd(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#a;#s;#l;#p;#d;#h;#u;#c;#o;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ob(this.#t,this.options)?this.#f():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return $d(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return $d(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#_(),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 On(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&&!Vd(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const l=this.hasListeners();l&&Nb(this.#t,r,this.options,t)&&this.#f(),this.updateResult(),l&&(this.#t!==r||On(this.options.enabled,this.#t)!==On(t.enabled,this.#t)||ii(this.options.staleTime,this.#t)!==ii(t.staleTime,this.#t))&&this.#g();const a=this.#y();l&&(this.#t!==r||On(this.options.enabled,this.#t)!==On(t.enabled,this.#t)||a!==this.#o)&&this.#b(a)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(t,e);return ZE(this,r)&&(this.#i=r,this.#a=this.options,this.#r=this.#t.state),r}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(r,l)=>(this.trackProp(l),t?.(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,l))})}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.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#f(e){this.#w();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(sn)),t}#g(){this.#v();const e=ii(this.options.staleTime,this.#t);if(ji||this.#i.isStale||!Ud(e))return;const r=Bx(this.#i.dataUpdatedAt,e)+1;this.#u=Ni.setTimeout(()=>{this.#i.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#b(e){this.#_(),this.#o=e,!(ji||On(this.options.enabled,this.#t)===!1||!Ud(this.#o)||this.#o===0)&&(this.#c=Ni.setInterval(()=>{(this.options.refetchIntervalInBackground||Rh.isFocused())&&this.#f()},this.#o))}#x(){this.#g(),this.#b(this.#y())}#v(){this.#u&&(Ni.clearTimeout(this.#u),this.#u=void 0)}#_(){this.#c&&(Ni.clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const r=this.#t,l=this.options,a=this.#i,o=this.#r,u=this.#a,d=e!==r?e.state:this.#n,{state:h}=e;let g={...h},p=!1,b;if(t._optimisticResults){const G=this.hasListeners(),oe=!G&&Ob(e,t),P=G&&Nb(e,r,t,l);(oe||P)&&(g={...g,...$x(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:x,errorUpdatedAt:w,status:E}=g;b=g.data;let R=!1;if(t.placeholderData!==void 0&&b===void 0&&E==="pending"){let G;a?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(G=a.data,R=!0):G=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,G!==void 0&&(E="success",b=Gd(a?.data,G,t),p=!0)}if(t.select&&b!==void 0&&!R)if(a&&b===o?.data&&t.select===this.#p)b=this.#d;else try{this.#p=t.select,b=t.select(b),b=Gd(a?.data,b,t),this.#d=b,this.#l=null}catch(G){this.#l=G}this.#l&&(x=this.#l,b=this.#d,w=Date.now(),E="error");const C=g.fetchStatus==="fetching",L=E==="pending",O=E==="error",B=L&&C,Y=b!==void 0,q={status:E,fetchStatus:g.fetchStatus,isPending:L,isSuccess:E==="success",isError:O,isInitialLoading:B,isLoading:B,data:b,dataUpdatedAt:g.dataUpdatedAt,error:x,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:C,isRefetching:C&&!L,isLoadingError:O&&!Y,isPaused:g.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:O&&Y,isStale:Lh(e,t),refetch:this.refetch,promise:this.#s,isEnabled:On(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const G=q.data!==void 0,oe=q.status==="error"&&!G,P=fe=>{oe?fe.reject(q.error):G&&fe.resolve(q.data)},X=()=>{const fe=this.#s=q.promise=Fd();P(fe)},te=this.#s;switch(te.status){case"pending":e.queryHash===r.queryHash&&P(te);break;case"fulfilled":(oe||q.data!==te.value)&&X();break;case"rejected":(!oe||q.error!==te.reason)&&X();break}}return q}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#h=this.#t),Vd(t,e))return;this.#i=t;const r=()=>{if(!e)return!0;const{notifyOnChangeProps:l}=this.options,a=typeof l=="function"?l():l;if(a==="all"||!a&&!this.#m.size)return!0;const o=new Set(a??this.#m);return this.options.throwOnError&&o.add("error"),Object.keys(this.#i).some(u=>{const f=u;return this.#i[f]!==e[f]&&o.has(f)})};this.#S({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.#x()}#S(e){Ht.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function KE(e,t){return On(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ob(e,t){return KE(e,t)||e.state.data!==void 0&&$d(e,t,t.refetchOnMount)}function $d(e,t,r){if(On(t.enabled,e)!==!1&&ii(t.staleTime,e)!=="static"){const l=typeof r=="function"?r(e):r;return l==="always"||l!==!1&&Lh(e,t)}return!1}function Nb(e,t,r,l){return(e!==t||On(l.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Lh(e,r)}function Lh(e,t){return On(t.enabled,e)!==!1&&e.isStaleByTime(ii(t.staleTime,e))}function ZE(e,t){return!Vd(e.getCurrentResult(),t)}function Db(e){return{onFetch:(t,r)=>{const l=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},d=0;const h=async()=>{let g=!1;const p=w=>{HE(w,()=>t.signal,()=>g=!0)},b=Vx(t.options,t.fetchOptions),x=async(w,E,R)=>{if(g)return Promise.reject();if(E==null&&w.pages.length)return Promise.resolve(w);const L=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:E,direction:R?"backward":"forward",meta:t.options.meta};return p(j),j})(),O=await b(L),{maxPages:B}=t.options,Y=R?VE:UE;return{pages:Y(w.pages,O,B),pageParams:Y(w.pageParams,E,B)}};if(a&&o.length){const w=a==="backward",E=w?JE:Mb,R={pages:o,pageParams:u},C=E(l,R);f=await x(R,C,w)}else{const w=e??o.length;do{const E=d===0?u[0]??l.initialPageParam:Mb(l,f);if(d>0&&E==null)break;f=await x(f,E),d++}while(d<w)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=h}}}function Mb(e,{pages:t,pageParams:r}){const l=t.length-1;return t.length>0?e.getNextPageParam(t[l],t,r[l],r):void 0}function JE(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var WE=class extends qx{#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||eC(),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=Fx({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(o,u)=>{this.#r({type:"failed",failureCount:o,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const l=this.state.status==="pending",a=!this.#i.canStart();try{if(l)t();else{this.#r({type:"pending",variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,r);const u=await this.options.onMutate?.(e,r);u!==this.state.context&&this.#r({type:"pending",context:u,variables:e,isPaused:a})}const o=await this.#i.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,r),await this.options.onSuccess?.(o,e,this.state.context,r),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(o,null,e,this.state.context,r),this.#r({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,e,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onError?.(o,e,this.state.context,r)}catch(u){Promise.reject(u)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,r)}catch(u){Promise.reject(u)}throw this.#r({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#r(e){const 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),Ht.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function eC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var tC=class extends is{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 l=new WE({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:r});return this.add(l),l}add(e){this.#e.add(e);const t=Ao(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=Ao(e);if(typeof t=="string"){const r=this.#t.get(t);if(r)if(r.length>1){const l=r.indexOf(e);l!==-1&&r.splice(l,1)}else r[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Ao(e);if(typeof t=="string"){const l=this.#t.get(t)?.find(a=>a.state.status==="pending");return!l||l===e}else return!0}runNext(e){const t=Ao(e);return typeof t=="string"?this.#t.get(t)?.find(l=>l!==e&&l.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ht.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=>kb(t,r))}findAll(e={}){return this.getAll().filter(t=>kb(e,t))}notify(e){Ht.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ht.batch(()=>Promise.all(e.map(t=>t.continue().catch(sn))))}};function Ao(e){return e.options.scope?.id}var nC=class extends is{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){const l=t.queryKey,a=t.queryHash??Ah(l,t);let o=this.get(a);return o||(o=new YE({client:e,queryKey:l,queryHash:a,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(l)}),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(){Ht.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=>Cb(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>Cb(e,r)):t}notify(e){Ht.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ht.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ht.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},rC=class{#e;#t;#n;#i;#r;#a;#s;#l;constructor(e={}){this.#e=e.queryCache||new nC,this.#t=e.mutationCache||new tC,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#s=Rh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Ko.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#s?.(),this.#s=void 0,this.#l?.(),this.#l=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),l=r.state.data;return l===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ii(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(l))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:r})=>{const l=r.data;return[t,l]})}setQueryData(e,t,r){const l=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(l.queryHash)?.state.data,u=IE(t,o);if(u!==void 0)return this.#e.build(this,l).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Ht.batch(()=>this.#e.findAll(e).map(({queryKey:l})=>[l,this.setQueryData(l,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Ht.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#e;return Ht.batch(()=>(r.findAll(e).forEach(l=>{l.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},l=Ht.batch(()=>this.#e.findAll(e).map(a=>a.cancel(r)));return Promise.all(l).then(sn).catch(sn)}invalidateQueries(e,t={}){return Ht.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},l=Ht.batch(()=>this.#e.findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,r);return r.throwOnError||(o=o.catch(sn)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(l).then(sn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#e.build(this,t);return r.isStaleByTime(ii(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(sn).catch(sn)}fetchInfiniteQuery(e){return e.behavior=Db(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(sn).catch(sn)}ensureInfiniteQueryData(e){return e.behavior=Db(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ko.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(Xa(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],r={};return t.forEach(l=>{Ka(e,l.queryKey)&&Object.assign(r,l.defaultOptions)}),r}setMutationDefaults(e,t){this.#r.set(Xa(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],r={};return t.forEach(l=>{Ka(e,l.mutationKey)&&Object.assign(r,l.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=Ah(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===Th&&(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()}},Qx=F.createContext(void 0),yu=e=>{const t=F.useContext(Qx);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},iC=({client:e,children:t})=>(F.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),v.jsx(Qx.Provider,{value:e,children:t})),Yx=F.createContext(!1),lC=()=>F.useContext(Yx);Yx.Provider;function aC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var sC=F.createContext(aC()),oC=()=>F.useContext(sC),uC=(e,t,r)=>{const l=r?.state.error&&typeof e.throwOnError=="function"?Hx(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||l)&&(t.isReset()||(e.retryOnMount=!1))},cC=e=>{F.useEffect(()=>{e.clearReset()},[e])},fC=({result:e,errorResetBoundary:t,throwOnError:r,query:l,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&l&&(a&&e.data===void 0||Hx(r,[e.error,l])),dC=e=>{if(e.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),l=e.staleTime;e.staleTime=typeof l=="function"?(...a)=>r(l(...a)):r(l),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},hC=(e,t)=>e.isLoading&&e.isFetching&&!t,mC=(e,t)=>e?.suspense&&t.isPending,jb=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function pC(e,t,r){const l=lC(),a=oC(),o=yu(),u=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(u);const f=o.getQueryCache().get(u.queryHash);u._optimisticResults=l?"isRestoring":"optimistic",dC(u),uC(u,a,f),cC(a);const d=!o.getQueryCache().get(u.queryHash),[h]=F.useState(()=>new t(o,u)),g=h.getOptimisticResult(u),p=!l&&e.subscribed!==!1;if(F.useSyncExternalStore(F.useCallback(b=>{const x=p?h.subscribe(Ht.batchCalls(b)):sn;return h.updateResult(),x},[h,p]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),F.useEffect(()=>{h.setOptions(u)},[u,h]),mC(u,g))throw jb(u,h,a);if(fC({result:g,errorResetBoundary:a,throwOnError:u.throwOnError,query:f,suspense:u.suspense}))throw g.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(u,g),u.experimental_prefetchInRender&&!ji&&hC(g,l)&&(d?jb(u,h,a):f?.promise)?.catch(sn).finally(()=>{h.updateResult()}),u.notifyOnChangeProps?g:h.trackResult(g)}function Oh(e,t){return pC(e,XE)}const gC=new rC({defaultOptions:{queries:{retry:!1,refetchOnWindowFocus:!1}}});function zb(){const e=new URLSearchParams(window.location.search);return{ref:e.get("ref"),theme:e.get("theme"),view:e.get("view")}}function yC(){const[e,t]=F.useState(zb);return F.useEffect(()=>{const r=()=>{t(zb())};return window.addEventListener("popstate",r),()=>{window.removeEventListener("popstate",r)}},[]),e}async function bC(e,t){const r=new URLSearchParams;e&&r.set("whitespace","hide"),t&&r.set("ref",t);const l=r.toString(),a=l?`/api/diff?${l}`:"/api/diff",o=await fetch(a);if(!o.ok)throw new Error(`HTTP ${o.status}`);return o.json()}async function xC(e){const t=new URLSearchParams;e&&t.set("ref",e);const r=t.toString(),l=r?`/api/diff-fingerprint?${r}`:"/api/diff-fingerprint",a=await fetch(l);if(!a.ok)throw new Error(`HTTP ${a.status}`);return(await a.json()).fingerprint}async function vC(e){const t=new URLSearchParams;e&&t.set("ref",e);const r=t.toString(),l=r?`/api/info?${r}`:"/api/info",a=await fetch(l);if(!a.ok)throw new Error(`HTTP ${a.status}`);return a.json()}async function _C(e,t){const r=new URLSearchParams({session:e}),l=await fetch(`/api/threads?${r}`);return l.ok?l.json():[]}async function wC(e){const t=await fetch("/api/threads",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.json()}async function SC(e,t,r){const l=await fetch(`/api/threads/${e}/reply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:t,author:r})});if(!l.ok)throw new Error(`HTTP ${l.status}`);return l.json()}async function nd(e,t,r){const l=await fetch(`/api/threads/${e}/status`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:t,summary:r})});if(!l.ok)throw new Error(`HTTP ${l.status}`)}async function EC(e){const t=await fetch("/api/threads",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e})});if(!t.ok)throw new Error(`HTTP ${t.status}`)}async function CC(e){const t=await fetch(`/api/threads/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`HTTP ${t.status}`)}async function kC(e){const t=await fetch(`/api/comments/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`HTTP ${t.status}`)}async function AC(e){const t=await fetch("/api/revert-hunk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({patch:e})});if(!t.ok){const r=await t.json().catch(()=>({error:`HTTP ${t.status}`}));throw new Error(r.error||`HTTP ${t.status}`)}}async function TC(e,t){const r=new URLSearchParams;t&&r.set("ref",t);const l=r.toString(),a=l?`/api/file/${encodeURIComponent(e)}?${l}`:`/api/file/${encodeURIComponent(e)}`,o=await fetch(a);if(!o.ok)throw new Error(`HTTP ${o.status}`);return(await o.json()).content}function RC(e,t){return{queryKey:["diff",e,t??null],queryFn:()=>bC(e,t)}}function LC(e=!1,t){const{data:r,isLoading:l,error:a}=Oh(RC(e,t));return{data:r??null,loading:l,error:a?.message??null}}function OC(e){return{queryKey:["repo-info",e],queryFn:()=>vC(e)}}function NC(e){const{data:t,isLoading:r,error:l}=Oh(OC(e));return{data:t??null,loading:r,error:l?.message??null}}function DC(){return typeof window>"u"?null:localStorage.getItem("diffity-theme")}function MC(){return document.documentElement.getAttribute("data-theme")==="dark"?"dark":"light"}function jC(e){const[t,r]=F.useState(()=>DC()||e||"light");F.useLayoutEffect(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const l=F.useCallback(()=>{r(a=>{const o=a==="light"?"dark":"light";return localStorage.setItem("diffity-theme",o),o})},[]);return{theme:t,toggleTheme:l}}const Xx=["shift","alt","meta","mod","ctrl","control"],zC={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function li(e){return(zC[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function Kx(e){return Xx.includes(e)}function rd(e,t=","){return e.toLowerCase().split(t)}function id(e,t="+",r=">",l=!1,a,o){let u=[],f=!1;e=e.trim(),e.includes(r)?(f=!0,u=e.toLocaleLowerCase().split(r).map(g=>li(g))):u=e.toLocaleLowerCase().split(t).map(g=>li(g));const d={alt:u.includes("alt"),ctrl:u.includes("ctrl")||u.includes("control"),shift:u.includes("shift"),meta:u.includes("meta"),mod:u.includes("mod"),useKey:l},h=u.filter(g=>!Xx.includes(g));return{...d,keys:h,description:a,isSequence:f,hotkey:e,metadata:o}}typeof document<"u"&&(document.addEventListener("keydown",e=>{e.code!==void 0&&Zx([li(e.code)])}),document.addEventListener("keyup",e=>{e.code!==void 0&&Jx([li(e.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{Sr.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{Sr.clear()},0)}));const Sr=new Set;function Nh(e){return Array.isArray(e)}function IC(e,t=","){return(Nh(e)?e:e.split(t)).every(r=>Sr.has(r.trim().toLowerCase()))}function Zx(e){const t=Array.isArray(e)?e:[e];Sr.has("meta")&&Sr.forEach(r=>{Kx(r)||Sr.delete(r.toLowerCase())}),t.forEach(r=>{Sr.add(r.toLowerCase())})}function Jx(e){const t=Array.isArray(e)?e:[e];e==="meta"?Sr.clear():t.forEach(r=>{Sr.delete(r.toLowerCase())})}function PC(e,t,r){(typeof r=="function"&&r(e,t)||r===!0)&&e.preventDefault()}function BC(e,t,r){return typeof r=="function"?r(e,t):r===!0||r===void 0}const UC=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function VC(e){return Wx(e,UC)}function Wx(e,t=!1){const{target:r,composed:l}=e;let a,o;return HC(r)&&l?(a=e.composedPath()[0]&&e.composedPath()[0].tagName,o=e.composedPath()[0]&&e.composedPath()[0].role):(a=r&&r.tagName,o=r&&r.role),Nh(t)?!!(a&&t&&t.some(u=>u.toLowerCase()===a.toLowerCase()||u===o)):!!(a&&t&&t)}function HC(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function GC(e,t){return e.length===0&&t?!1:t?e.some(r=>t.includes(r))||e.includes("*"):!0}const FC=(e,t,r=!1)=>{const{alt:l,meta:a,mod:o,shift:u,ctrl:f,keys:d,useKey:h}=t,{code:g,key:p,ctrlKey:b,metaKey:x,shiftKey:w,altKey:E}=e,R=li(g);if(h&&d?.length===1&&d.includes(p.toLowerCase()))return!0;if(!d?.includes(R)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(R))return!1;if(!r){if(l!==E&&R!=="alt"||u!==w&&R!=="shift")return!1;if(o){if(!x&&!b)return!1}else if(a!==x&&R!=="meta"&&R!=="os"||f!==b&&R!=="ctrl"&&R!=="control")return!1}return d&&d.length===1&&d.includes(R)?!0:d&&d.length>0?d.includes(R)?IC(d):!1:!d||d.length===0},qC=F.createContext(void 0),$C=()=>F.useContext(qC);function ev(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce((r,l)=>r&&ev(e[l],t[l]),!0):e===t}const QC=F.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),YC=()=>F.useContext(QC);function XC(e){const t=F.useRef(void 0);return ev(t.current,e)||(t.current=e),t.current}const Ib=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},KC=typeof window<"u"?F.useLayoutEffect:F.useEffect;function Xn(e,t,r,l){const a=F.useRef(null),o=F.useRef(!1),u=Array.isArray(r)?Array.isArray(l)?void 0:l:r,f=Nh(e)?e.join(u?.delimiter):e,d=Array.isArray(r)?r:Array.isArray(l)?l:void 0,h=F.useCallback(t,d??[]),g=F.useRef(h);d?g.current=h:g.current=t;const p=XC(u),{activeScopes:b}=YC(),x=$C();return KC(()=>{if(p?.enabled===!1||!GC(b,p?.scopes))return;let w=[],E;const R=(B,Y=!1)=>{if(!(VC(B)&&!Wx(B,p?.enableOnFormTags))){if(a.current!==null){const j=a.current.getRootNode();if((j instanceof Document||j instanceof ShadowRoot)&&j.activeElement!==a.current&&!a.current.contains(j.activeElement)){Ib(B);return}}B.target?.isContentEditable&&!p?.enableOnContentEditable||rd(f,p?.delimiter).forEach(j=>{if(j.includes(p?.splitKey??"+")&&j.includes(p?.sequenceSplitKey??">")){console.warn(`Hotkey ${j} contains both ${p?.splitKey??"+"} and ${p?.sequenceSplitKey??">"} which is not supported.`);return}const q=id(j,p?.splitKey,p?.sequenceSplitKey,p?.useKey,p?.description,p?.metadata);if(q.isSequence){E=setTimeout(()=>{w=[]},p?.sequenceTimeoutMs??1e3);const G=q.useKey?B.key:li(B.code);if(Kx(G.toLowerCase()))return;w.push(G);const oe=q.keys?.[w.length-1];if(G!==oe){w=[],E&&clearTimeout(E);return}w.length===q.keys?.length&&(g.current(B,q),E&&clearTimeout(E),w=[])}else if(FC(B,q,p?.ignoreModifiers)||q.keys?.includes("*")){if(p?.ignoreEventWhen?.(B)||Y&&o.current)return;if(PC(B,q,p?.preventDefault),!BC(B,q,p?.enabled)){Ib(B);return}g.current(B,q),Y||(o.current=!0)}})}},C=B=>{B.code!==void 0&&(Zx(li(B.code)),(p?.keydown===void 0&&p?.keyup!==!0||p?.keydown)&&R(B))},L=B=>{B.code!==void 0&&(Jx(li(B.code)),o.current=!1,p?.keyup&&R(B,!0))},O=a.current||u?.document||document;return O.addEventListener("keyup",L,u?.eventListenerOptions),O.addEventListener("keydown",C,u?.eventListenerOptions),x&&rd(f,p?.delimiter).forEach(B=>{x.addHotkey(id(B,p?.splitKey,p?.sequenceSplitKey,p?.useKey,p?.description,p?.metadata))}),()=>{O.removeEventListener("keyup",L,u?.eventListenerOptions),O.removeEventListener("keydown",C,u?.eventListenerOptions),x&&rd(f,p?.delimiter).forEach(B=>{x.removeHotkey(id(B,p?.splitKey,p?.sequenceSplitKey,p?.useKey,p?.description,p?.metadata))}),w=[],E&&clearTimeout(E)}},[f,p,b]),a}const xr={preventDefault:!0};function Pb(){const e=document.activeElement?.tagName;return e==="INPUT"||e==="TEXTAREA"}function ZC(e){const t=F.useRef(e);t.current=e,Xn("j",e.onNextFile,xr),Xn("k",e.onPrevFile,xr),Xn("n",e.onNextHunk,xr),Xn("p",e.onPrevHunk,xr),Xn("x",e.onToggleCollapse,xr),Xn("shift+x",e.onCollapseAll,xr),Xn("r",e.onToggleReviewed,xr),Xn("u",e.onUnifiedView,xr),Xn("s",e.onSplitView,xr),Xn("escape",e.onEscape,{enableOnFormTags:["INPUT","TEXTAREA"]}),F.useEffect(()=>{const r=l=>{l.key==="/"&&!Pb()&&(l.preventDefault(),t.current.onFocusSearch()),l.key==="?"&&!Pb()&&(l.preventDefault(),t.current.onShowHelp())};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[])}function JC(e){return Oh({queryKey:["threads",e],queryFn:()=>_C(e),enabled:!!e,refetchInterval:2e3})}function WC(e,t){const r=yu(),l=F.useCallback(()=>{r.invalidateQueries({queryKey:["threads",e]})},[r,e]),a=F.useCallback((b,x,w,E,R,C,L)=>{!t||!e||wC({sessionId:e,filePath:b,side:x,startLine:w,endLine:E,body:R,author:C,anchorContent:L}).then(()=>{l()})},[t,e,l]),o=F.useCallback((b,x,w)=>{t&&SC(b,x,w).then(()=>{l()})},[t,l]),u=F.useCallback(b=>{t&&nd(b,"resolved").then(()=>{l()})},[t,l]),f=F.useCallback(b=>{t&&nd(b,"open").then(()=>{l()})},[t,l]),d=F.useCallback(b=>{t&&nd(b,"dismissed").then(()=>{l()})},[t,l]),h=F.useCallback((b,x)=>{t&&kC(x).then(()=>{l()})},[t,l]),g=F.useCallback(b=>{t&&CC(b).then(()=>{l()})},[t,l]),p=F.useCallback(()=>{!t||!e||EC(e).then(()=>{l()})},[t,e,l]);return{addThread:a,addReply:o,resolveThread:u,unresolveThread:f,dismissThread:d,deleteComment:h,deleteThread:g,deleteAllThreads:p}}function Dh(e){const{additions:t,deletions:r,className:l=""}=e;return v.jsxs("span",{className:`flex gap-1 shrink-0 font-mono text-xs ${l}`,children:[t>0&&v.jsxs("span",{className:"text-added font-semibold",children:["+",t]}),r>0&&v.jsxs("span",{className:"text-deleted font-semibold",children:["-",r]})]})}function ek(e){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[v.jsx("line",{x1:"5",y1:"3.5",x2:"5",y2:"12.5"}),v.jsx("circle",{cx:"5",cy:"3.5",r:"1.5"}),v.jsx("circle",{cx:"5",cy:"12.5",r:"1.5"}),v.jsx("circle",{cx:"11",cy:"5.5",r:"1.5"}),v.jsx("path",{d:"M11 7c0 2-2 3.5-6 4"})]})}function tk(e){const{diff:t,repoName:r,branch:l,description:a}=e;return v.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 bg-bg-secondary border-b border-border font-sans text-sm",children:[v.jsxs("div",{className:"flex items-center gap-2.5",children:[r&&v.jsx("span",{className:"font-semibold text-text",children:r}),l&&v.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-diff-hunk-bg text-diff-hunk-text rounded-md font-mono text-xs",children:[v.jsx(ek,{className:"w-3 h-3"}),l]}),a&&v.jsx("span",{className:"text-text-secondary",children:a})]}),t?v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsxs("span",{className:"text-text-muted text-xs",children:[t.stats.filesChanged," file",t.stats.filesChanged!==1?"s":""]}),v.jsx(Dh,{additions:t.stats.totalAdditions,deletions:t.stats.totalDeletions})]}):v.jsx("div",{className:"w-48 h-4 bg-bg-tertiary rounded animate-pulse"})]})}function tv(e){var t,r,l="";if(typeof e=="string"||typeof e=="number")l+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=tv(e[t]))&&(l&&(l+=" "),l+=r)}else for(r in e)e[r]&&(l&&(l+=" "),l+=r);return l}function nk(){for(var e,t,r=0,l="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=tv(e))&&(l&&(l+=" "),l+=t);return l}const rk=(e,t)=>{const r=new Array(e.length+t.length);for(let l=0;l<e.length;l++)r[l]=e[l];for(let l=0;l<t.length;l++)r[e.length+l]=t[l];return r},ik=(e,t)=>({classGroupId:e,validator:t}),nv=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Zo="-",Bb=[],lk="arbitrary..",ak=e=>{const t=ok(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:l}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return sk(u);const f=u.split(Zo),d=f[0]===""&&f.length>1?1:0;return rv(f,d,t)},getConflictingClassGroupIds:(u,f)=>{if(f){const d=l[u],h=r[u];return d?h?rk(h,d):d:h||Bb}return r[u]||Bb}}},rv=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const a=e[t],o=r.nextPart.get(a);if(o){const h=rv(e,t+1,o);if(h)return h}const u=r.validators;if(u===null)return;const f=t===0?e.join(Zo):e.slice(t).join(Zo),d=u.length;for(let h=0;h<d;h++){const g=u[h];if(g.validator(f))return g.classGroupId}},sk=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),l=t.slice(0,r);return l?lk+l:void 0})(),ok=e=>{const{theme:t,classGroups:r}=e;return uk(r,t)},uk=(e,t)=>{const r=nv();for(const l in e){const a=e[l];Mh(a,r,l,t)}return r},Mh=(e,t,r,l)=>{const a=e.length;for(let o=0;o<a;o++){const u=e[o];ck(u,t,r,l)}},ck=(e,t,r,l)=>{if(typeof e=="string"){fk(e,t,r);return}if(typeof e=="function"){dk(e,t,r,l);return}hk(e,t,r,l)},fk=(e,t,r)=>{const l=e===""?t:iv(t,e);l.classGroupId=r},dk=(e,t,r,l)=>{if(mk(e)){Mh(e(l),t,r,l);return}t.validators===null&&(t.validators=[]),t.validators.push(ik(r,e))},hk=(e,t,r,l)=>{const a=Object.entries(e),o=a.length;for(let u=0;u<o;u++){const[f,d]=a[u];Mh(d,iv(t,f),r,l)}},iv=(e,t)=>{let r=e;const l=t.split(Zo),a=l.length;for(let o=0;o<a;o++){const u=l[o];let f=r.nextPart.get(u);f||(f=nv(),r.nextPart.set(u,f)),r=f}return r},mk=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,pk=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),l=Object.create(null);const a=(o,u)=>{r[o]=u,t++,t>e&&(t=0,l=r,r=Object.create(null))};return{get(o){let u=r[o];if(u!==void 0)return u;if((u=l[o])!==void 0)return a(o,u),u},set(o,u){o in r?r[o]=u:a(o,u)}}},Qd="!",Ub=":",gk=[],Vb=(e,t,r,l,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:l,isExternal:a}),yk=e=>{const{prefix:t,experimentalParseClassName:r}=e;let l=a=>{const o=[];let u=0,f=0,d=0,h;const g=a.length;for(let E=0;E<g;E++){const R=a[E];if(u===0&&f===0){if(R===Ub){o.push(a.slice(d,E)),d=E+1;continue}if(R==="/"){h=E;continue}}R==="["?u++:R==="]"?u--:R==="("?f++:R===")"&&f--}const p=o.length===0?a:a.slice(d);let b=p,x=!1;p.endsWith(Qd)?(b=p.slice(0,-1),x=!0):p.startsWith(Qd)&&(b=p.slice(1),x=!0);const w=h&&h>d?h-d:void 0;return Vb(o,x,b,w)};if(t){const a=t+Ub,o=l;l=u=>u.startsWith(a)?o(u.slice(a.length)):Vb(gk,!1,u,void 0,!0)}if(r){const a=l;l=o=>r({className:o,parseClassName:a})}return l},bk=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,l)=>{t.set(r,1e6+l)}),r=>{const l=[];let a=[];for(let o=0;o<r.length;o++){const u=r[o],f=u[0]==="[",d=t.has(u);f||d?(a.length>0&&(a.sort(),l.push(...a),a=[]),l.push(u)):a.push(u)}return a.length>0&&(a.sort(),l.push(...a)),l}},xk=e=>({cache:pk(e.cacheSize),parseClassName:yk(e),sortModifiers:bk(e),...ak(e)}),vk=/\s+/,_k=(e,t)=>{const{parseClassName:r,getClassGroupId:l,getConflictingClassGroupIds:a,sortModifiers:o}=t,u=[],f=e.trim().split(vk);let d="";for(let h=f.length-1;h>=0;h-=1){const g=f[h],{isExternal:p,modifiers:b,hasImportantModifier:x,baseClassName:w,maybePostfixModifierPosition:E}=r(g);if(p){d=g+(d.length>0?" "+d:d);continue}let R=!!E,C=l(R?w.substring(0,E):w);if(!C){if(!R){d=g+(d.length>0?" "+d:d);continue}if(C=l(w),!C){d=g+(d.length>0?" "+d:d);continue}R=!1}const L=b.length===0?"":b.length===1?b[0]:o(b).join(":"),O=x?L+Qd:L,B=O+C;if(u.indexOf(B)>-1)continue;u.push(B);const Y=a(C,R);for(let j=0;j<Y.length;++j){const q=Y[j];u.push(O+q)}d=g+(d.length>0?" "+d:d)}return d},wk=(...e)=>{let t=0,r,l,a="";for(;t<e.length;)(r=e[t++])&&(l=lv(r))&&(a&&(a+=" "),a+=l);return a},lv=e=>{if(typeof e=="string")return e;let t,r="";for(let l=0;l<e.length;l++)e[l]&&(t=lv(e[l]))&&(r&&(r+=" "),r+=t);return r},Sk=(e,...t)=>{let r,l,a,o;const u=d=>{const h=t.reduce((g,p)=>p(g),e());return r=xk(h),l=r.cache.get,a=r.cache.set,o=f,f(d)},f=d=>{const h=l(d);if(h)return h;const g=_k(d,r);return a(d,g),g};return o=u,(...d)=>o(wk(...d))},Ek=[],Ct=e=>{const t=r=>r[e]||Ek;return t.isThemeGetter=!0,t},av=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ck=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,kk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ak=/\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$/,Tk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Rk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Lk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wr=e=>Ck.test(e),De=e=>!!e&&!Number.isNaN(Number(e)),ei=e=>!!e&&Number.isInteger(Number(e)),ld=e=>e.endsWith("%")&&De(e.slice(0,-1)),vr=e=>kk.test(e),ov=()=>!0,Ok=e=>Ak.test(e)&&!Tk.test(e),jh=()=>!1,Nk=e=>Rk.test(e),Dk=e=>Lk.test(e),Mk=e=>!ge(e)&&!ye(e),jk=e=>si(e,fv,jh),ge=e=>av.test(e),Ai=e=>si(e,dv,Ok),Hb=e=>si(e,Gk,De),zk=e=>si(e,mv,ov),Ik=e=>si(e,hv,jh),Gb=e=>si(e,uv,jh),Pk=e=>si(e,cv,Dk),To=e=>si(e,pv,Nk),ye=e=>sv.test(e),za=e=>Pi(e,dv),Bk=e=>Pi(e,hv),Fb=e=>Pi(e,uv),Uk=e=>Pi(e,fv),Vk=e=>Pi(e,cv),Ro=e=>Pi(e,pv,!0),Hk=e=>Pi(e,mv,!0),si=(e,t,r)=>{const l=av.exec(e);return l?l[1]?t(l[1]):r(l[2]):!1},Pi=(e,t,r=!1)=>{const l=sv.exec(e);return l?l[1]?t(l[1]):r:!1},uv=e=>e==="position"||e==="percentage",cv=e=>e==="image"||e==="url",fv=e=>e==="length"||e==="size"||e==="bg-size",dv=e=>e==="length",Gk=e=>e==="number",hv=e=>e==="family-name",mv=e=>e==="number"||e==="weight",pv=e=>e==="shadow",Fk=()=>{const e=Ct("color"),t=Ct("font"),r=Ct("text"),l=Ct("font-weight"),a=Ct("tracking"),o=Ct("leading"),u=Ct("breakpoint"),f=Ct("container"),d=Ct("spacing"),h=Ct("radius"),g=Ct("shadow"),p=Ct("inset-shadow"),b=Ct("text-shadow"),x=Ct("drop-shadow"),w=Ct("blur"),E=Ct("perspective"),R=Ct("aspect"),C=Ct("ease"),L=Ct("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Y=()=>[...B(),ye,ge],j=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],G=()=>[ye,ge,d],oe=()=>[Wr,"full","auto",...G()],P=()=>[ei,"none","subgrid",ye,ge],X=()=>["auto",{span:["full",ei,ye,ge]},ei,ye,ge],te=()=>[ei,"auto",ye,ge],fe=()=>["auto","min","max","fr",ye,ge],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ne=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...G()],Z=()=>[Wr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...G()],re=()=>[Wr,"screen","full","dvw","lvw","svw","min","max","fit",...G()],me=()=>[Wr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...G()],k=()=>[e,ye,ge],N=()=>[...B(),Fb,Gb,{position:[ye,ge]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],T=()=>["auto","cover","contain",Uk,jk,{size:[ye,ge]}],ue=()=>[ld,za,Ai],de=()=>["","none","full",h,ye,ge],ce=()=>["",De,za,Ai],ke=()=>["solid","dashed","dotted","double"],Fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ve=()=>[De,ld,Fb,Gb],gt=()=>["","none",w,ye,ge],ut=()=>["none",De,ye,ge],Lt=()=>["none",De,ye,ge],bn=()=>[De,ye,ge],wt=()=>[Wr,"full",...G()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[vr],breakpoint:[vr],color:[ov],container:[vr],"drop-shadow":[vr],ease:["in","out","in-out"],font:[Mk],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[vr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[vr],shadow:[vr],spacing:["px",De],text:[vr],"text-shadow":[vr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Wr,ge,ye,R]}],container:["container"],columns:[{columns:[De,ge,ye,f]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"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:Y()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:oe()}],"inset-x":[{"inset-x":oe()}],"inset-y":[{"inset-y":oe()}],start:[{"inset-s":oe(),start:oe()}],end:[{"inset-e":oe(),end:oe()}],"inset-bs":[{"inset-bs":oe()}],"inset-be":[{"inset-be":oe()}],top:[{top:oe()}],right:[{right:oe()}],bottom:[{bottom:oe()}],left:[{left:oe()}],visibility:["visible","invisible","collapse"],z:[{z:[ei,"auto",ye,ge]}],basis:[{basis:[Wr,"full","auto",f,...G()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,Wr,"auto","initial","none",ge]}],grow:[{grow:["",De,ye,ge]}],shrink:[{shrink:["",De,ye,ge]}],order:[{order:[ei,"first","last","none",ye,ge]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:X()}],"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":fe()}],"auto-rows":[{"auto-rows":fe()}],gap:[{gap:G()}],"gap-x":[{"gap-x":G()}],"gap-y":[{"gap-y":G()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...ne(),"normal"]}],"justify-self":[{"justify-self":["auto",...ne()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...ne(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ne(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...ne(),"baseline"]}],"place-self":[{"place-self":["auto",...ne()]}],p:[{p:G()}],px:[{px:G()}],py:[{py:G()}],ps:[{ps:G()}],pe:[{pe:G()}],pbs:[{pbs:G()}],pbe:[{pbe:G()}],pt:[{pt:G()}],pr:[{pr:G()}],pb:[{pb:G()}],pl:[{pl:G()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mbs:[{mbs:z()}],mbe:[{mbe:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":G()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":G()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...re()]}],"min-inline-size":[{"min-inline":["auto",...re()]}],"max-inline-size":[{"max-inline":["none",...re()]}],"block-size":[{block:["auto",...me()]}],"min-block-size":[{"min-block":["auto",...me()]}],"max-block-size":[{"max-block":["none",...me()]}],w:[{w:[f,"screen",...Z()]}],"min-w":[{"min-w":[f,"screen","none",...Z()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",r,za,Ai]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,Hk,zk]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ld,ge]}],"font-family":[{font:[Bk,Ik,t]}],"font-features":[{"font-features":[ge]}],"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:[a,ye,ge]}],"line-clamp":[{"line-clamp":[De,"none",ye,Hb]}],leading:[{leading:[o,...G()]}],"list-image":[{"list-image":["none",ye,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ke(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",ye,Ai]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[De,"auto",ye,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:G()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,ge]}],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",ye,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:Q()}],"bg-size":[{bg:T()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ei,ye,ge],radial:["",ye,ge],conic:[ei,ye,ge]},Vk,Pk]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:de()}],"rounded-s":[{"rounded-s":de()}],"rounded-e":[{"rounded-e":de()}],"rounded-t":[{"rounded-t":de()}],"rounded-r":[{"rounded-r":de()}],"rounded-b":[{"rounded-b":de()}],"rounded-l":[{"rounded-l":de()}],"rounded-ss":[{"rounded-ss":de()}],"rounded-se":[{"rounded-se":de()}],"rounded-ee":[{"rounded-ee":de()}],"rounded-es":[{"rounded-es":de()}],"rounded-tl":[{"rounded-tl":de()}],"rounded-tr":[{"rounded-tr":de()}],"rounded-br":[{"rounded-br":de()}],"rounded-bl":[{"rounded-bl":de()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ke(),"hidden","none"]}],"divide-style":[{divide:[...ke(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-bs":[{"border-bs":k()}],"border-color-be":[{"border-be":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...ke(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,ye,ge]}],"outline-w":[{outline:["",De,za,Ai]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",g,Ro,To]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",p,Ro,To]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[De,Ai]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",b,Ro,To]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[De,ye,ge]}],"mix-blend":[{"mix-blend":[...Fe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Fe()}],"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":[De]}],"mask-image-linear-from-pos":[{"mask-linear-from":ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":ve()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":ve()}],"mask-image-t-to-pos":[{"mask-t-to":ve()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":ve()}],"mask-image-r-to-pos":[{"mask-r-to":ve()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":ve()}],"mask-image-b-to-pos":[{"mask-b-to":ve()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":ve()}],"mask-image-l-to-pos":[{"mask-l-to":ve()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":ve()}],"mask-image-x-to-pos":[{"mask-x-to":ve()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":ve()}],"mask-image-y-to-pos":[{"mask-y-to":ve()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[ye,ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":ve()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"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":B()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:T()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,ge]}],filter:[{filter:["","none",ye,ge]}],blur:[{blur:gt()}],brightness:[{brightness:[De,ye,ge]}],contrast:[{contrast:[De,ye,ge]}],"drop-shadow":[{"drop-shadow":["","none",x,Ro,To]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",De,ye,ge]}],"hue-rotate":[{"hue-rotate":[De,ye,ge]}],invert:[{invert:["",De,ye,ge]}],saturate:[{saturate:[De,ye,ge]}],sepia:[{sepia:["",De,ye,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,ge]}],"backdrop-blur":[{"backdrop-blur":gt()}],"backdrop-brightness":[{"backdrop-brightness":[De,ye,ge]}],"backdrop-contrast":[{"backdrop-contrast":[De,ye,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,ye,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,ye,ge]}],"backdrop-invert":[{"backdrop-invert":["",De,ye,ge]}],"backdrop-opacity":[{"backdrop-opacity":[De,ye,ge]}],"backdrop-saturate":[{"backdrop-saturate":[De,ye,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",De,ye,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":G()}],"border-spacing-x":[{"border-spacing-x":G()}],"border-spacing-y":[{"border-spacing-y":G()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",ye,ge]}],ease:[{ease:["linear","initial",C,ye,ge]}],delay:[{delay:[De,ye,ge]}],animate:[{animate:["none",L,ye,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,ye,ge]}],"perspective-origin":[{"perspective-origin":Y()}],rotate:[{rotate:ut()}],"rotate-x":[{"rotate-x":ut()}],"rotate-y":[{"rotate-y":ut()}],"rotate-z":[{"rotate-z":ut()}],scale:[{scale:Lt()}],"scale-x":[{"scale-x":Lt()}],"scale-y":[{"scale-y":Lt()}],"scale-z":[{"scale-z":Lt()}],"scale-3d":["scale-3d"],skew:[{skew:bn()}],"skew-x":[{"skew-x":bn()}],"skew-y":[{"skew-y":bn()}],transform:[{transform:[ye,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:Y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:wt()}],"translate-x":[{"translate-x":wt()}],"translate-y":[{"translate-y":wt()}],"translate-z":[{"translate-z":wt()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"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",ye,ge]}],"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":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mbs":[{"scroll-mbs":G()}],"scroll-mbe":[{"scroll-mbe":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pbs":[{"scroll-pbs":G()}],"scroll-pbe":[{"scroll-pbe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"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",ye,ge]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[De,za,Ai,Hb]}],stroke:[{stroke:["none",...k()]}],"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"]}},qk=Sk(Fk);function Tt(...e){return qk(nk(e))}function gv(e=2e3){const[t,r]=F.useState(!1),l=F.useRef(void 0),a=F.useCallback(o=>{navigator.clipboard.writeText(o).then(()=>{r(!0),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>r(!1),e)})},[e]);return{copied:t,copy:a}}const Jo="__general__";function zl(e){return e.status==="resolved"||e.status==="dismissed"}function $k(e,t){const[r,l]=F.useState(-1),a=F.useMemo(()=>e.filter(h=>!zl(h)),[e]),o=a.length,u=F.useCallback(h=>{const g=a[h];g&&t(g.id,g.filePath)},[a,t]),f=F.useCallback(()=>{if(o===0)return;const h=r<=0?o-1:r-1;l(h),u(h)},[r,o,u]),d=F.useCallback(()=>{if(o===0)return;const h=r>=o-1?0:r+1;l(h),u(h)},[r,o,u]);return{currentIndex:r,count:o,goToPrevious:f,goToNext:d}}const Qk=new Set(["work","staged","unstaged","working","untracked"]);function qb(e){return!!e&&Qk.has(e)}function Xt(e){return e.status==="deleted"?e.oldPath:e.newPath}function yv(e){switch(e){case"add":return"bg-diff-add-bg";case"delete":return"bg-diff-del-bg";default:return"bg-bg"}}const Yk=new Set(["package-lock.json","pnpm-lock.yaml","pnpm-lock.yml","bun.lock","bun.lockb","yarn.lock","Cargo.lock","Gemfile.lock","composer.lock","poetry.lock","Pipfile.lock","go.sum","flake.lock","pubspec.lock","Podfile.lock","packages.lock.json","project.assets.json","paket.lock","pnpm-workspace.yaml","shrinkwrap.yaml"]),Xk=[".min.js",".min.css",".min.mjs",".bundle.js",".bundle.css",".chunk.js",".chunk.css",".generated.ts",".generated.js",".g.dart",".freezed.dart",".pb.go",".pb.ts",".pb.js"],Kk=[/\.d\.ts$/,/\.map$/,/\.snap$/,/dist\//,/build\//,/generated\//,/__generated__\//,/\.lock$/];function Zk(e){if(e.status==="deleted"||e.status==="renamed")return!0;const t=Xt(e),r=t.split("/").pop()||"";if(Yk.has(r))return!0;const l=t.toLowerCase();for(const a of Xk)if(l.endsWith(a))return!0;for(const a of Kk)if(a.test(t))return!0;return!1}function Jk(e){const t=new Set;for(const r of e)Zk(r)&&t.add(Xt(r));return t}function bv(e){const t=[];let r=0;for(;r<e.length;)if(e[r].type!=="context"){const l=r;for(;r<e.length&&e[r].type!=="context";)r++;t.push({startIndex:l,endIndex:r-1})}else r++;return t}function Wk(e,t,r,l){const o=t.lines,u=[];for(let L=r-1;L>=Math.max(0,r-3)&&o[L].type==="context";L--)u.unshift(o[L]);const f=o.slice(r,l+1),d=[];for(let L=l+1;L<Math.min(o.length,l+1+3)&&o[L].type==="context";L++)d.push(o[L]);const h=[...u,...f,...d];let g=0,p=0,b=0,x=0;for(const L of h)L.oldLineNumber!==null&&g===0&&(g=L.oldLineNumber),L.newLineNumber!==null&&b===0&&(b=L.newLineNumber),(L.type==="context"||L.type==="delete")&&p++,(L.type==="context"||L.type==="add")&&x++;g===0&&(g=t.oldStart),b===0&&(b=t.newStart);const w=e.status==="added"?"/dev/null":`a/${e.oldPath}`,E=e.status==="deleted"?"/dev/null":`b/${e.newPath}`,R=`@@ -${g},${p} +${b},${x} @@`,C=[`--- ${w}`,`+++ ${E}`,R];for(const L of h){const O=L.type==="add"?"+":L.type==="delete"?"-":" ";C.push(`${O}${L.content}`),L.noNewline&&C.push("\")}return C.join(`
|
|
9
|
+
`+c.stack}}var at=Object.prototype.hasOwnProperty,Sn=e.unstable_scheduleCallback,Ar=e.unstable_cancelCallback,Gl=e.unstable_shouldYield,Ui=e.unstable_requestPaint,ht=e.unstable_now,ui=e.unstable_getCurrentPriorityLevel,Z=e.unstable_ImmediatePriority,ce=e.unstable_UserBlockingPriority,we=e.unstable_NormalPriority,Le=e.unstable_LowPriority,Fe=e.unstable_IdlePriority,Kt=e.log,en=e.unstable_setDisableYieldValue,zt=null,ct=null;function oe(n){if(typeof Kt=="function"&&en(n),ct&&typeof ct.setStrictMode=="function")try{ct.setStrictMode(zt,n)}catch{}}var ae=Math.clz32?Math.clz32:Ye,ke=Math.log,De=Math.LN2;function Ye(n){return n>>>=0,n===0?32:31-(ke(n)/De|0)|0}var Ze=256,Ft=262144,tn=4194304;function Bn(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 Tr(n,i,s){var c=n.pendingLanes;if(c===0)return 0;var m=0,y=n.suspendedLanes,_=n.pingedLanes;n=n.warmLanes;var S=c&134217727;return S!==0?(c=S&~y,c!==0?m=Bn(c):(_&=S,_!==0?m=Bn(_):s||(s=S&~n,s!==0&&(m=Bn(s))))):(S=c&~y,S!==0?m=Bn(S):_!==0?m=Bn(_):s||(s=c&~n,s!==0&&(m=Bn(s)))),m===0?0:i!==0&&i!==m&&(i&y)===0&&(y=m&-m,s=i&-i,y>=s||y===32&&(s&4194048)!==0)?i:m}function Fl(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function cw(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 xm(){var n=tn;return tn<<=1,(tn&62914560)===0&&(tn=4194304),n}function Iu(n){for(var i=[],s=0;31>s;s++)i.push(n);return i}function ql(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function fw(n,i,s,c,m,y){var _=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 S=n.entanglements,D=n.expirationTimes,V=n.hiddenUpdates;for(s=_&~s;0<s;){var K=31-ae(s),ee=1<<K;S[K]=0,D[K]=-1;var H=V[K];if(H!==null)for(V[K]=null,K=0;K<H.length;K++){var $=H[K];$!==null&&($.lane&=-536870913)}s&=~ee}c!==0&&vm(n,c,0),y!==0&&m===0&&n.tag!==0&&(n.suspendedLanes|=y&~(_&~i))}function vm(n,i,s){n.pendingLanes|=i,n.suspendedLanes&=~i;var c=31-ae(i);n.entangledLanes|=i,n.entanglements[c]=n.entanglements[c]|1073741824|s&261930}function _m(n,i){var s=n.entangledLanes|=i;for(n=n.entanglements;s;){var c=31-ae(s),m=1<<c;m&i|n[c]&i&&(n[c]|=i),s&=~m}}function wm(n,i){var s=i&-i;return s=(s&42)!==0?1:Pu(s),(s&(n.suspendedLanes|i))!==0?0:s}function Pu(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 Bu(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Sm(){var n=J.p;return n!==0?n:(n=window.event,n===void 0?32:ob(n.type))}function Em(n,i){var s=J.p;try{return J.p=n,i()}finally{J.p=s}}var Rr=Math.random().toString(36).slice(2),It="__reactFiber$"+Rr,nn="__reactProps$"+Rr,Vi="__reactContainer$"+Rr,Uu="__reactEvents$"+Rr,dw="__reactListeners$"+Rr,hw="__reactHandles$"+Rr,Cm="__reactResources$"+Rr,$l="__reactMarker$"+Rr;function Vu(n){delete n[It],delete n[nn],delete n[Uu],delete n[dw],delete n[hw]}function Hi(n){var i=n[It];if(i)return i;for(var s=n.parentNode;s;){if(i=s[Vi]||s[It]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(n=$y(n);n!==null;){if(s=n[It])return s;n=$y(n)}return i}n=s,s=n.parentNode}return null}function Gi(n){if(n=n[It]||n[Vi]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}function Ql(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(l(33))}function Fi(n){var i=n[Cm];return i||(i=n[Cm]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Nt(n){n[$l]=!0}var km=new Set,Am={};function ci(n,i){qi(n,i),qi(n+"Capture",i)}function qi(n,i){for(Am[n]=i,n=0;n<i.length;n++)km.add(i[n])}var mw=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]*$"),Tm={},Rm={};function pw(n){return at.call(Rm,n)?!0:at.call(Tm,n)?!1:mw.test(n)?Rm[n]=!0:(Tm[n]=!0,!1)}function ms(n,i,s){if(pw(i))if(s===null)n.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":n.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+s)}}function ps(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 er(n,i,s,c){if(c===null)n.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttributeNS(i,s,""+c)}}function En(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Lm(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function gw(n,i,s){var c=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var m=c.get,y=c.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return m.call(this)},set:function(_){s=""+_,y.call(this,_)}}),Object.defineProperty(n,i,{enumerable:c.enumerable}),{getValue:function(){return s},setValue:function(_){s=""+_},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function Hu(n){if(!n._valueTracker){var i=Lm(n)?"checked":"value";n._valueTracker=gw(n,i,""+n[i])}}function Om(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var s=i.getValue(),c="";return n&&(c=Lm(n)?n.checked?"true":"false":n.value),n=c,n!==s?(i.setValue(n),!0):!1}function gs(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 yw=/[\n"\\]/g;function Cn(n){return n.replace(yw,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Gu(n,i,s,c,m,y,_,S){n.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?n.type=_:n.removeAttribute("type"),i!=null?_==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+En(i)):n.value!==""+En(i)&&(n.value=""+En(i)):_!=="submit"&&_!=="reset"||n.removeAttribute("value"),i!=null?Fu(n,_,En(i)):s!=null?Fu(n,_,En(s)):c!=null&&n.removeAttribute("value"),m==null&&y!=null&&(n.defaultChecked=!!y),m!=null&&(n.checked=m&&typeof m!="function"&&typeof m!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.name=""+En(S):n.removeAttribute("name")}function Nm(n,i,s,c,m,y,_,S){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(n.type=y),i!=null||s!=null){if(!(y!=="submit"&&y!=="reset"||i!=null)){Hu(n);return}s=s!=null?""+En(s):"",i=i!=null?""+En(i):s,S||i===n.value||(n.value=i),n.defaultValue=i}c=c??m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,n.checked=S?n.checked:!!c,n.defaultChecked=!!c,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(n.name=_),Hu(n)}function Fu(n,i,s){i==="number"&&gs(n.ownerDocument)===n||n.defaultValue===""+s||(n.defaultValue=""+s)}function $i(n,i,s,c){if(n=n.options,i){i={};for(var m=0;m<s.length;m++)i["$"+s[m]]=!0;for(s=0;s<n.length;s++)m=i.hasOwnProperty("$"+n[s].value),n[s].selected!==m&&(n[s].selected=m),m&&c&&(n[s].defaultSelected=!0)}else{for(s=""+En(s),i=null,m=0;m<n.length;m++){if(n[m].value===s){n[m].selected=!0,c&&(n[m].defaultSelected=!0);return}i!==null||n[m].disabled||(i=n[m])}i!==null&&(i.selected=!0)}}function Dm(n,i,s){if(i!=null&&(i=""+En(i),i!==n.value&&(n.value=i),s==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=s!=null?""+En(s):""}function Mm(n,i,s,c){if(i==null){if(c!=null){if(s!=null)throw Error(l(92));if(ne(c)){if(1<c.length)throw Error(l(93));c=c[0]}s=c}s==null&&(s=""),i=s}s=En(i),n.defaultValue=s,c=n.textContent,c===s&&c!==""&&c!==null&&(n.value=c),Hu(n)}function Qi(n,i){if(i){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=i;return}}n.textContent=i}var bw=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 jm(n,i,s){var c=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?c?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":c?n.setProperty(i,s):typeof s!="number"||s===0||bw.has(i)?i==="float"?n.cssFloat=s:n[i]=(""+s).trim():n[i]=s+"px"}function zm(n,i,s){if(i!=null&&typeof i!="object")throw Error(l(62));if(n=n.style,s!=null){for(var c in s)!s.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?n.setProperty(c,""):c==="float"?n.cssFloat="":n[c]="");for(var m in i)c=i[m],i.hasOwnProperty(m)&&s[m]!==c&&jm(n,m,c)}else for(var y in i)i.hasOwnProperty(y)&&jm(n,y,i[y])}function qu(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 xw=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"]]),vw=/^[\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 ys(n){return vw.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function tr(){}var $u=null;function Qu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Yi=null,Xi=null;function Im(n){var i=Gi(n);if(i&&(n=i.stateNode)){var s=n[nn]||null;e:switch(n=i.stateNode,i.type){case"input":if(Gu(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="'+Cn(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var c=s[i];if(c!==n&&c.form===n.form){var m=c[nn]||null;if(!m)throw Error(l(90));Gu(c,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(i=0;i<s.length;i++)c=s[i],c.form===n.form&&Om(c)}break e;case"textarea":Dm(n,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&$i(n,!!s.multiple,i,!1)}}}var Yu=!1;function Pm(n,i,s){if(Yu)return n(i,s);Yu=!0;try{var c=n(i);return c}finally{if(Yu=!1,(Yi!==null||Xi!==null)&&(io(),Yi&&(i=Yi,n=Xi,Xi=Yi=null,Im(i),n)))for(i=0;i<n.length;i++)Im(n[i])}}function Yl(n,i){var s=n.stateNode;if(s===null)return null;var c=s[nn]||null;if(c===null)return null;s=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(l(231,i,typeof s));return s}var nr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xu=!1;if(nr)try{var Xl={};Object.defineProperty(Xl,"passive",{get:function(){Xu=!0}}),window.addEventListener("test",Xl,Xl),window.removeEventListener("test",Xl,Xl)}catch{Xu=!1}var Lr=null,Ku=null,bs=null;function Bm(){if(bs)return bs;var n,i=Ku,s=i.length,c,m="value"in Lr?Lr.value:Lr.textContent,y=m.length;for(n=0;n<s&&i[n]===m[n];n++);var _=s-n;for(c=1;c<=_&&i[s-c]===m[y-c];c++);return bs=m.slice(n,1<c?1-c:void 0)}function xs(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 vs(){return!0}function Um(){return!1}function rn(n){function i(s,c,m,y,_){this._reactName=s,this._targetInst=m,this.type=c,this.nativeEvent=y,this.target=_,this.currentTarget=null;for(var S in n)n.hasOwnProperty(S)&&(s=n[S],this[S]=s?s(y):y[S]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?vs:Um,this.isPropagationStopped=Um,this}return p(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=vs)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=vs)},persist:function(){},isPersistent:vs}),i}var fi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_s=rn(fi),Kl=p({},fi,{view:0,detail:0}),_w=rn(Kl),Zu,Ju,Zl,ws=p({},Kl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ec,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!==Zl&&(Zl&&n.type==="mousemove"?(Zu=n.screenX-Zl.screenX,Ju=n.screenY-Zl.screenY):Ju=Zu=0,Zl=n),Zu)},movementY:function(n){return"movementY"in n?n.movementY:Ju}}),Vm=rn(ws),ww=p({},ws,{dataTransfer:0}),Sw=rn(ww),Ew=p({},Kl,{relatedTarget:0}),Wu=rn(Ew),Cw=p({},fi,{animationName:0,elapsedTime:0,pseudoElement:0}),kw=rn(Cw),Aw=p({},fi,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Tw=rn(Aw),Rw=p({},fi,{data:0}),Hm=rn(Rw),Lw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ow={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"},Nw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dw(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=Nw[n])?!!i[n]:!1}function ec(){return Dw}var Mw=p({},Kl,{key:function(n){if(n.key){var i=Lw[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=xs(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?Ow[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ec,charCode:function(n){return n.type==="keypress"?xs(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?xs(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),jw=rn(Mw),zw=p({},ws,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gm=rn(zw),Iw=p({},Kl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ec}),Pw=rn(Iw),Bw=p({},fi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Uw=rn(Bw),Vw=p({},ws,{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}),Hw=rn(Vw),Gw=p({},fi,{newState:0,oldState:0}),Fw=rn(Gw),qw=[9,13,27,32],tc=nr&&"CompositionEvent"in window,Jl=null;nr&&"documentMode"in document&&(Jl=document.documentMode);var $w=nr&&"TextEvent"in window&&!Jl,Fm=nr&&(!tc||Jl&&8<Jl&&11>=Jl),qm=" ",$m=!1;function Qm(n,i){switch(n){case"keyup":return qw.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ym(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Ki=!1;function Qw(n,i){switch(n){case"compositionend":return Ym(i);case"keypress":return i.which!==32?null:($m=!0,qm);case"textInput":return n=i.data,n===qm&&$m?null:n;default:return null}}function Yw(n,i){if(Ki)return n==="compositionend"||!tc&&Qm(n,i)?(n=Bm(),bs=Ku=Lr=null,Ki=!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 Fm&&i.locale!=="ko"?null:i.data;default:return null}}var Xw={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 Xm(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!Xw[n.type]:i==="textarea"}function Km(n,i,s,c){Yi?Xi?Xi.push(c):Xi=[c]:Yi=c,i=fo(i,"onChange"),0<i.length&&(s=new _s("onChange","change",null,s,c),n.push({event:s,listeners:i}))}var Wl=null,ea=null;function Kw(n){Ny(n,0)}function Ss(n){var i=Ql(n);if(Om(i))return n}function Zm(n,i){if(n==="change")return i}var Jm=!1;if(nr){var nc;if(nr){var rc="oninput"in document;if(!rc){var Wm=document.createElement("div");Wm.setAttribute("oninput","return;"),rc=typeof Wm.oninput=="function"}nc=rc}else nc=!1;Jm=nc&&(!document.documentMode||9<document.documentMode)}function ep(){Wl&&(Wl.detachEvent("onpropertychange",tp),ea=Wl=null)}function tp(n){if(n.propertyName==="value"&&Ss(ea)){var i=[];Km(i,ea,n,Qu(n)),Pm(Kw,i)}}function Zw(n,i,s){n==="focusin"?(ep(),Wl=i,ea=s,Wl.attachEvent("onpropertychange",tp)):n==="focusout"&&ep()}function Jw(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Ss(ea)}function Ww(n,i){if(n==="click")return Ss(i)}function eS(n,i){if(n==="input"||n==="change")return Ss(i)}function tS(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var hn=typeof Object.is=="function"?Object.is:tS;function ta(n,i){if(hn(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var s=Object.keys(n),c=Object.keys(i);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var m=s[c];if(!at.call(i,m)||!hn(n[m],i[m]))return!1}return!0}function np(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function rp(n,i){var s=np(n);n=0;for(var c;s;){if(s.nodeType===3){if(c=n+s.textContent.length,n<=i&&c>=i)return{node:s,offset:i-n};n=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=np(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 lp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=gs(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=gs(n.document)}return i}function ic(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 nS=nr&&"documentMode"in document&&11>=document.documentMode,Zi=null,lc=null,na=null,ac=!1;function ap(n,i,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;ac||Zi==null||Zi!==gs(c)||(c=Zi,"selectionStart"in c&&ic(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),na&&ta(na,c)||(na=c,c=fo(lc,"onSelect"),0<c.length&&(i=new _s("onSelect","select",null,i,s),n.push({event:i,listeners:c}),i.target=Zi)))}function di(n,i){var s={};return s[n.toLowerCase()]=i.toLowerCase(),s["Webkit"+n]="webkit"+i,s["Moz"+n]="moz"+i,s}var Ji={animationend:di("Animation","AnimationEnd"),animationiteration:di("Animation","AnimationIteration"),animationstart:di("Animation","AnimationStart"),transitionrun:di("Transition","TransitionRun"),transitionstart:di("Transition","TransitionStart"),transitioncancel:di("Transition","TransitionCancel"),transitionend:di("Transition","TransitionEnd")},sc={},sp={};nr&&(sp=document.createElement("div").style,"AnimationEvent"in window||(delete Ji.animationend.animation,delete Ji.animationiteration.animation,delete Ji.animationstart.animation),"TransitionEvent"in window||delete Ji.transitionend.transition);function hi(n){if(sc[n])return sc[n];if(!Ji[n])return n;var i=Ji[n],s;for(s in i)if(i.hasOwnProperty(s)&&s in sp)return sc[n]=i[s];return n}var op=hi("animationend"),up=hi("animationiteration"),cp=hi("animationstart"),rS=hi("transitionrun"),iS=hi("transitionstart"),lS=hi("transitioncancel"),fp=hi("transitionend"),dp=new Map,oc="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(" ");oc.push("scrollEnd");function Un(n,i){dp.set(n,i),ci(i,[n])}var Es=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)},kn=[],Wi=0,uc=0;function Cs(){for(var n=Wi,i=uc=Wi=0;i<n;){var s=kn[i];kn[i++]=null;var c=kn[i];kn[i++]=null;var m=kn[i];kn[i++]=null;var y=kn[i];if(kn[i++]=null,c!==null&&m!==null){var _=c.pending;_===null?m.next=m:(m.next=_.next,_.next=m),c.pending=m}y!==0&&hp(s,m,y)}}function ks(n,i,s,c){kn[Wi++]=n,kn[Wi++]=i,kn[Wi++]=s,kn[Wi++]=c,uc|=c,n.lanes|=c,n=n.alternate,n!==null&&(n.lanes|=c)}function cc(n,i,s,c){return ks(n,i,s,c),As(n)}function mi(n,i){return ks(n,null,null,i),As(n)}function hp(n,i,s){n.lanes|=s;var c=n.alternate;c!==null&&(c.lanes|=s);for(var m=!1,y=n.return;y!==null;)y.childLanes|=s,c=y.alternate,c!==null&&(c.childLanes|=s),y.tag===22&&(n=y.stateNode,n===null||n._visibility&1||(m=!0)),n=y,y=y.return;return n.tag===3?(y=n.stateNode,m&&i!==null&&(m=31-ae(s),n=y.hiddenUpdates,c=n[m],c===null?n[m]=[i]:c.push(i),i.lane=s|536870912),y):null}function As(n){if(50<Ea)throw Ea=0,vf=null,Error(l(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}var el={};function aS(n,i,s,c){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=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mn(n,i,s,c){return new aS(n,i,s,c)}function fc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function rr(n,i){var s=n.alternate;return s===null?(s=mn(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 mp(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 Ts(n,i,s,c,m,y){var _=0;if(c=n,typeof n=="function")fc(n)&&(_=1);else if(typeof n=="string")_=fE(n,s,ue.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case se:return n=mn(31,s,i,m),n.elementType=se,n.lanes=y,n;case E:return pi(s.children,m,y,i);case R:_=8,m|=24;break;case C:return n=mn(12,s,i,m|2),n.elementType=C,n.lanes=y,n;case Y:return n=mn(13,s,i,m),n.elementType=Y,n.lanes=y,n;case j:return n=mn(19,s,i,m),n.elementType=j,n.lanes=y,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case O:_=10;break e;case L:_=9;break e;case B:_=11;break e;case q:_=14;break e;case G:_=16,c=null;break e}_=29,s=Error(l(130,n===null?"null":typeof n,"")),c=null}return i=mn(_,s,i,m),i.elementType=n,i.type=c,i.lanes=y,i}function pi(n,i,s,c){return n=mn(7,n,c,i),n.lanes=s,n}function dc(n,i,s){return n=mn(6,n,null,i),n.lanes=s,n}function pp(n){var i=mn(18,null,null,0);return i.stateNode=n,i}function hc(n,i,s){return i=mn(4,n.children!==null?n.children:[],n.key,i),i.lanes=s,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}var gp=new WeakMap;function An(n,i){if(typeof n=="object"&&n!==null){var s=gp.get(n);return s!==void 0?s:(i={value:n,source:i,stack:tt(i)},gp.set(n,i),i)}return{value:n,source:i,stack:tt(i)}}var tl=[],nl=0,Rs=null,ra=0,Tn=[],Rn=0,Or=null,qn=1,$n="";function ir(n,i){tl[nl++]=ra,tl[nl++]=Rs,Rs=n,ra=i}function yp(n,i,s){Tn[Rn++]=qn,Tn[Rn++]=$n,Tn[Rn++]=Or,Or=n;var c=qn;n=$n;var m=32-ae(c)-1;c&=~(1<<m),s+=1;var y=32-ae(i)+m;if(30<y){var _=m-m%5;y=(c&(1<<_)-1).toString(32),c>>=_,m-=_,qn=1<<32-ae(i)+m|s<<m|c,$n=y+n}else qn=1<<y|s<<m|c,$n=n}function mc(n){n.return!==null&&(ir(n,1),yp(n,1,0))}function pc(n){for(;n===Rs;)Rs=tl[--nl],tl[nl]=null,ra=tl[--nl],tl[nl]=null;for(;n===Or;)Or=Tn[--Rn],Tn[Rn]=null,$n=Tn[--Rn],Tn[Rn]=null,qn=Tn[--Rn],Tn[Rn]=null}function bp(n,i){Tn[Rn++]=qn,Tn[Rn++]=$n,Tn[Rn++]=Or,qn=i.id,$n=i.overflow,Or=n}var Pt=null,st=null,Ve=!1,Nr=null,Ln=!1,gc=Error(l(519));function Dr(n){var i=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ia(An(i,n)),gc}function xp(n){var i=n.stateNode,s=n.type,c=n.memoizedProps;switch(i[It]=n,i[nn]=c,s){case"dialog":Ie("cancel",i),Ie("close",i);break;case"iframe":case"object":case"embed":Ie("load",i);break;case"video":case"audio":for(s=0;s<ka.length;s++)Ie(ka[s],i);break;case"source":Ie("error",i);break;case"img":case"image":case"link":Ie("error",i),Ie("load",i);break;case"details":Ie("toggle",i);break;case"input":Ie("invalid",i),Nm(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Ie("invalid",i);break;case"textarea":Ie("invalid",i),Mm(i,c.value,c.defaultValue,c.children)}s=c.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||c.suppressHydrationWarning===!0||zy(i.textContent,s)?(c.popover!=null&&(Ie("beforetoggle",i),Ie("toggle",i)),c.onScroll!=null&&Ie("scroll",i),c.onScrollEnd!=null&&Ie("scrollend",i),c.onClick!=null&&(i.onclick=tr),i=!0):i=!1,i||Dr(n,!0)}function vp(n){for(Pt=n.return;Pt;)switch(Pt.tag){case 5:case 31:case 13:Ln=!1;return;case 27:case 3:Ln=!0;return;default:Pt=Pt.return}}function rl(n){if(n!==Pt)return!1;if(!Ve)return vp(n),Ve=!0,!1;var i=n.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=n.type,s=!(s!=="form"&&s!=="button")||jf(n.type,n.memoizedProps)),s=!s),s&&st&&Dr(n),vp(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(l(317));st=qy(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(l(317));st=qy(n)}else i===27?(i=st,Qr(n.type)?(n=Uf,Uf=null,st=n):st=i):st=Pt?Nn(n.stateNode.nextSibling):null;return!0}function gi(){st=Pt=null,Ve=!1}function yc(){var n=Nr;return n!==null&&(on===null?on=n:on.push.apply(on,n),Nr=null),n}function ia(n){Nr===null?Nr=[n]:Nr.push(n)}var bc=N(null),yi=null,lr=null;function Mr(n,i,s){T(bc,i._currentValue),i._currentValue=s}function ar(n){n._currentValue=bc.current,Q(bc)}function xc(n,i,s){for(;n!==null;){var c=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),n===s)break;n=n.return}}function vc(n,i,s,c){var m=n.child;for(m!==null&&(m.return=n);m!==null;){var y=m.dependencies;if(y!==null){var _=m.child;y=y.firstContext;e:for(;y!==null;){var S=y;y=m;for(var D=0;D<i.length;D++)if(S.context===i[D]){y.lanes|=s,S=y.alternate,S!==null&&(S.lanes|=s),xc(y.return,s,n),c||(_=null);break e}y=S.next}}else if(m.tag===18){if(_=m.return,_===null)throw Error(l(341));_.lanes|=s,y=_.alternate,y!==null&&(y.lanes|=s),xc(_,s,n),_=null}else _=m.child;if(_!==null)_.return=m;else for(_=m;_!==null;){if(_===n){_=null;break}if(m=_.sibling,m!==null){m.return=_.return,_=m;break}_=_.return}m=_}}function il(n,i,s,c){n=null;for(var m=i,y=!1;m!==null;){if(!y){if((m.flags&524288)!==0)y=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var _=m.alternate;if(_===null)throw Error(l(387));if(_=_.memoizedProps,_!==null){var S=m.type;hn(m.pendingProps.value,_.value)||(n!==null?n.push(S):n=[S])}}else if(m===Ce.current){if(_=m.alternate,_===null)throw Error(l(387));_.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(n!==null?n.push(Oa):n=[Oa])}m=m.return}n!==null&&vc(i,n,s,c),i.flags|=262144}function Ls(n){for(n=n.firstContext;n!==null;){if(!hn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function bi(n){yi=n,lr=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Bt(n){return _p(yi,n)}function Os(n,i){return yi===null&&bi(n),_p(n,i)}function _p(n,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},lr===null){if(n===null)throw Error(l(308));lr=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else lr=lr.next=i;return s}var sS=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:function(s,c){n.push(c)}};this.abort=function(){i.aborted=!0,n.forEach(function(s){return s()})}},oS=e.unstable_scheduleCallback,uS=e.unstable_NormalPriority,bt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _c(){return{controller:new sS,data:new Map,refCount:0}}function la(n){n.refCount--,n.refCount===0&&oS(uS,function(){n.controller.abort()})}var aa=null,wc=0,ll=0,al=null;function cS(n,i){if(aa===null){var s=aa=[];wc=0,ll=kf(),al={status:"pending",value:void 0,then:function(c){s.push(c)}}}return wc++,i.then(wp,wp),i}function wp(){if(--wc===0&&aa!==null){al!==null&&(al.status="fulfilled");var n=aa;aa=null,ll=0,al=null;for(var i=0;i<n.length;i++)(0,n[i])()}}function fS(n,i){var s=[],c={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return n.then(function(){c.status="fulfilled",c.value=i;for(var m=0;m<s.length;m++)(0,s[m])(i)},function(m){for(c.status="rejected",c.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),c}var Sp=z.S;z.S=function(n,i){ay=ht(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&cS(n,i),Sp!==null&&Sp(n,i)};var xi=N(null);function Sc(){var n=xi.current;return n!==null?n:nt.pooledCache}function Ns(n,i){i===null?T(xi,xi.current):T(xi,i.pool)}function Ep(){var n=Sc();return n===null?null:{parent:bt._currentValue,pool:n}}var sl=Error(l(460)),Ec=Error(l(474)),Ds=Error(l(542)),Ms={then:function(){}};function Cp(n){return n=n.status,n==="fulfilled"||n==="rejected"}function kp(n,i,s){switch(s=n[s],s===void 0?n.push(i):s!==i&&(i.then(tr,tr),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,Tp(n),n;default:if(typeof i.status=="string")i.then(tr,tr);else{if(n=nt,n!==null&&100<n.shellSuspendCounter)throw Error(l(482));n=i,n.status="pending",n.then(function(c){if(i.status==="pending"){var m=i;m.status="fulfilled",m.value=c}},function(c){if(i.status==="pending"){var m=i;m.status="rejected",m.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,Tp(n),n}throw _i=i,sl}}function vi(n){try{var i=n._init;return i(n._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(_i=s,sl):s}}var _i=null;function Ap(){if(_i===null)throw Error(l(459));var n=_i;return _i=null,n}function Tp(n){if(n===sl||n===Ds)throw Error(l(483))}var ol=null,sa=0;function js(n){var i=sa;return sa+=1,ol===null&&(ol=[]),kp(ol,n,i)}function oa(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}function zs(n,i){throw i.$$typeof===b?Error(l(525)):(n=Object.prototype.toString.call(i),Error(l(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}function Rp(n){function i(I,M){if(n){var U=I.deletions;U===null?(I.deletions=[M],I.flags|=16):U.push(M)}}function s(I,M){if(!n)return null;for(;M!==null;)i(I,M),M=M.sibling;return null}function c(I){for(var M=new Map;I!==null;)I.key!==null?M.set(I.key,I):M.set(I.index,I),I=I.sibling;return M}function m(I,M){return I=rr(I,M),I.index=0,I.sibling=null,I}function y(I,M,U){return I.index=U,n?(U=I.alternate,U!==null?(U=U.index,U<M?(I.flags|=67108866,M):U):(I.flags|=67108866,M)):(I.flags|=1048576,M)}function _(I){return n&&I.alternate===null&&(I.flags|=67108866),I}function S(I,M,U,W){return M===null||M.tag!==6?(M=dc(U,I.mode,W),M.return=I,M):(M=m(M,U),M.return=I,M)}function D(I,M,U,W){var ve=U.type;return ve===E?K(I,M,U.props.children,W,U.key):M!==null&&(M.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===G&&vi(ve)===M.type)?(M=m(M,U.props),oa(M,U),M.return=I,M):(M=Ts(U.type,U.key,U.props,null,I.mode,W),oa(M,U),M.return=I,M)}function V(I,M,U,W){return M===null||M.tag!==4||M.stateNode.containerInfo!==U.containerInfo||M.stateNode.implementation!==U.implementation?(M=hc(U,I.mode,W),M.return=I,M):(M=m(M,U.children||[]),M.return=I,M)}function K(I,M,U,W,ve){return M===null||M.tag!==7?(M=pi(U,I.mode,W,ve),M.return=I,M):(M=m(M,U),M.return=I,M)}function ee(I,M,U){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=dc(""+M,I.mode,U),M.return=I,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case x:return U=Ts(M.type,M.key,M.props,null,I.mode,U),oa(U,M),U.return=I,U;case w:return M=hc(M,I.mode,U),M.return=I,M;case G:return M=vi(M),ee(I,M,U)}if(ne(M)||te(M))return M=pi(M,I.mode,U,null),M.return=I,M;if(typeof M.then=="function")return ee(I,js(M),U);if(M.$$typeof===O)return ee(I,Os(I,M),U);zs(I,M)}return null}function H(I,M,U,W){var ve=M!==null?M.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return ve!==null?null:S(I,M,""+U,W);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case x:return U.key===ve?D(I,M,U,W):null;case w:return U.key===ve?V(I,M,U,W):null;case G:return U=vi(U),H(I,M,U,W)}if(ne(U)||te(U))return ve!==null?null:K(I,M,U,W,null);if(typeof U.then=="function")return H(I,M,js(U),W);if(U.$$typeof===O)return H(I,M,Os(I,U),W);zs(I,U)}return null}function $(I,M,U,W,ve){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return I=I.get(U)||null,S(M,I,""+W,ve);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case x:return I=I.get(W.key===null?U:W.key)||null,D(M,I,W,ve);case w:return I=I.get(W.key===null?U:W.key)||null,V(M,I,W,ve);case G:return W=vi(W),$(I,M,U,W,ve)}if(ne(W)||te(W))return I=I.get(U)||null,K(M,I,W,ve,null);if(typeof W.then=="function")return $(I,M,U,js(W),ve);if(W.$$typeof===O)return $(I,M,U,Os(M,W),ve);zs(M,W)}return null}function pe(I,M,U,W){for(var ve=null,qe=null,be=M,Oe=M=0,Ue=null;be!==null&&Oe<U.length;Oe++){be.index>Oe?(Ue=be,be=null):Ue=be.sibling;var $e=H(I,be,U[Oe],W);if($e===null){be===null&&(be=Ue);break}n&&be&&$e.alternate===null&&i(I,be),M=y($e,M,Oe),qe===null?ve=$e:qe.sibling=$e,qe=$e,be=Ue}if(Oe===U.length)return s(I,be),Ve&&ir(I,Oe),ve;if(be===null){for(;Oe<U.length;Oe++)be=ee(I,U[Oe],W),be!==null&&(M=y(be,M,Oe),qe===null?ve=be:qe.sibling=be,qe=be);return Ve&&ir(I,Oe),ve}for(be=c(be);Oe<U.length;Oe++)Ue=$(be,I,Oe,U[Oe],W),Ue!==null&&(n&&Ue.alternate!==null&&be.delete(Ue.key===null?Oe:Ue.key),M=y(Ue,M,Oe),qe===null?ve=Ue:qe.sibling=Ue,qe=Ue);return n&&be.forEach(function(Jr){return i(I,Jr)}),Ve&&ir(I,Oe),ve}function Ee(I,M,U,W){if(U==null)throw Error(l(151));for(var ve=null,qe=null,be=M,Oe=M=0,Ue=null,$e=U.next();be!==null&&!$e.done;Oe++,$e=U.next()){be.index>Oe?(Ue=be,be=null):Ue=be.sibling;var Jr=H(I,be,$e.value,W);if(Jr===null){be===null&&(be=Ue);break}n&&be&&Jr.alternate===null&&i(I,be),M=y(Jr,M,Oe),qe===null?ve=Jr:qe.sibling=Jr,qe=Jr,be=Ue}if($e.done)return s(I,be),Ve&&ir(I,Oe),ve;if(be===null){for(;!$e.done;Oe++,$e=U.next())$e=ee(I,$e.value,W),$e!==null&&(M=y($e,M,Oe),qe===null?ve=$e:qe.sibling=$e,qe=$e);return Ve&&ir(I,Oe),ve}for(be=c(be);!$e.done;Oe++,$e=U.next())$e=$(be,I,Oe,$e.value,W),$e!==null&&(n&&$e.alternate!==null&&be.delete($e.key===null?Oe:$e.key),M=y($e,M,Oe),qe===null?ve=$e:qe.sibling=$e,qe=$e);return n&&be.forEach(function(wE){return i(I,wE)}),Ve&&ir(I,Oe),ve}function et(I,M,U,W){if(typeof U=="object"&&U!==null&&U.type===E&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case x:e:{for(var ve=U.key;M!==null;){if(M.key===ve){if(ve=U.type,ve===E){if(M.tag===7){s(I,M.sibling),W=m(M,U.props.children),W.return=I,I=W;break e}}else if(M.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===G&&vi(ve)===M.type){s(I,M.sibling),W=m(M,U.props),oa(W,U),W.return=I,I=W;break e}s(I,M);break}else i(I,M);M=M.sibling}U.type===E?(W=pi(U.props.children,I.mode,W,U.key),W.return=I,I=W):(W=Ts(U.type,U.key,U.props,null,I.mode,W),oa(W,U),W.return=I,I=W)}return _(I);case w:e:{for(ve=U.key;M!==null;){if(M.key===ve)if(M.tag===4&&M.stateNode.containerInfo===U.containerInfo&&M.stateNode.implementation===U.implementation){s(I,M.sibling),W=m(M,U.children||[]),W.return=I,I=W;break e}else{s(I,M);break}else i(I,M);M=M.sibling}W=hc(U,I.mode,W),W.return=I,I=W}return _(I);case G:return U=vi(U),et(I,M,U,W)}if(ne(U))return pe(I,M,U,W);if(te(U)){if(ve=te(U),typeof ve!="function")throw Error(l(150));return U=ve.call(U),Ee(I,M,U,W)}if(typeof U.then=="function")return et(I,M,js(U),W);if(U.$$typeof===O)return et(I,M,Os(I,U),W);zs(I,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,M!==null&&M.tag===6?(s(I,M.sibling),W=m(M,U),W.return=I,I=W):(s(I,M),W=dc(U,I.mode,W),W.return=I,I=W),_(I)):s(I,M)}return function(I,M,U,W){try{sa=0;var ve=et(I,M,U,W);return ol=null,ve}catch(be){if(be===sl||be===Ds)throw be;var qe=mn(29,be,null,I.mode);return qe.lanes=W,qe.return=I,qe}}}var wi=Rp(!0),Lp=Rp(!1),jr=!1;function Cc(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function kc(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 zr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ir(n,i,s){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(Qe&2)!==0){var m=c.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),c.pending=i,i=As(n),hp(n,null,s),i}return ks(n,c,i,s),As(n)}function ua(n,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var c=i.lanes;c&=n.pendingLanes,s|=c,i.lanes=s,_m(n,s)}}function Ac(n,i){var s=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var m=null,y=null;if(s=s.firstBaseUpdate,s!==null){do{var _={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};y===null?m=y=_:y=y.next=_,s=s.next}while(s!==null);y===null?m=y=i:y=y.next=i}else m=y=i;s={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:y,shared:c.shared,callbacks:c.callbacks},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=i:n.next=i,s.lastBaseUpdate=i}var Tc=!1;function ca(){if(Tc){var n=al;if(n!==null)throw n}}function fa(n,i,s,c){Tc=!1;var m=n.updateQueue;jr=!1;var y=m.firstBaseUpdate,_=m.lastBaseUpdate,S=m.shared.pending;if(S!==null){m.shared.pending=null;var D=S,V=D.next;D.next=null,_===null?y=V:_.next=V,_=D;var K=n.alternate;K!==null&&(K=K.updateQueue,S=K.lastBaseUpdate,S!==_&&(S===null?K.firstBaseUpdate=V:S.next=V,K.lastBaseUpdate=D))}if(y!==null){var ee=m.baseState;_=0,K=V=D=null,S=y;do{var H=S.lane&-536870913,$=H!==S.lane;if($?(Be&H)===H:(c&H)===H){H!==0&&H===ll&&(Tc=!0),K!==null&&(K=K.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var pe=n,Ee=S;H=i;var et=s;switch(Ee.tag){case 1:if(pe=Ee.payload,typeof pe=="function"){ee=pe.call(et,ee,H);break e}ee=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=Ee.payload,H=typeof pe=="function"?pe.call(et,ee,H):pe,H==null)break e;ee=p({},ee,H);break e;case 2:jr=!0}}H=S.callback,H!==null&&(n.flags|=64,$&&(n.flags|=8192),$=m.callbacks,$===null?m.callbacks=[H]:$.push(H))}else $={lane:H,tag:S.tag,payload:S.payload,callback:S.callback,next:null},K===null?(V=K=$,D=ee):K=K.next=$,_|=H;if(S=S.next,S===null){if(S=m.shared.pending,S===null)break;$=S,S=$.next,$.next=null,m.lastBaseUpdate=$,m.shared.pending=null}}while(!0);K===null&&(D=ee),m.baseState=D,m.firstBaseUpdate=V,m.lastBaseUpdate=K,y===null&&(m.shared.lanes=0),Hr|=_,n.lanes=_,n.memoizedState=ee}}function Op(n,i){if(typeof n!="function")throw Error(l(191,n));n.call(i)}function Np(n,i){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;n<s.length;n++)Op(s[n],i)}var ul=N(null),Is=N(0);function Dp(n,i){n=pr,T(Is,n),T(ul,i),pr=n|i.baseLanes}function Rc(){T(Is,pr),T(ul,ul.current)}function Lc(){pr=Is.current,Q(ul),Q(Is)}var pn=N(null),On=null;function Pr(n){var i=n.alternate;T(mt,mt.current&1),T(pn,n),On===null&&(i===null||ul.current!==null||i.memoizedState!==null)&&(On=n)}function Oc(n){T(mt,mt.current),T(pn,n),On===null&&(On=n)}function Mp(n){n.tag===22?(T(mt,mt.current),T(pn,n),On===null&&(On=n)):Br()}function Br(){T(mt,mt.current),T(pn,pn.current)}function gn(n){Q(pn),On===n&&(On=null),Q(mt)}var mt=N(0);function Ps(n){for(var i=n;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Pf(s)||Bf(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 sr=0,Re=null,Je=null,xt=null,Bs=!1,cl=!1,Si=!1,Us=0,da=0,fl=null,dS=0;function ft(){throw Error(l(321))}function Nc(n,i){if(i===null)return!1;for(var s=0;s<i.length&&s<n.length;s++)if(!hn(n[s],i[s]))return!1;return!0}function Dc(n,i,s,c,m,y){return sr=y,Re=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,z.H=n===null||n.memoizedState===null?yg:Yc,Si=!1,y=s(c,m),Si=!1,cl&&(y=zp(i,s,c,m)),jp(n),y}function jp(n){z.H=pa;var i=Je!==null&&Je.next!==null;if(sr=0,xt=Je=Re=null,Bs=!1,da=0,fl=null,i)throw Error(l(300));n===null||vt||(n=n.dependencies,n!==null&&Ls(n)&&(vt=!0))}function zp(n,i,s,c){Re=n;var m=0;do{if(cl&&(fl=null),da=0,cl=!1,25<=m)throw Error(l(301));if(m+=1,xt=Je=null,n.updateQueue!=null){var y=n.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}z.H=bg,y=i(s,c)}while(cl);return y}function hS(){var n=z.H,i=n.useState()[0];return i=typeof i.then=="function"?ha(i):i,n=n.useState()[0],(Je!==null?Je.memoizedState:null)!==n&&(Re.flags|=1024),i}function Mc(){var n=Us!==0;return Us=0,n}function jc(n,i,s){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~s}function zc(n){if(Bs){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Bs=!1}sr=0,xt=Je=Re=null,cl=!1,da=Us=0,fl=null}function Zt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?Re.memoizedState=xt=n:xt=xt.next=n,xt}function pt(){if(Je===null){var n=Re.alternate;n=n!==null?n.memoizedState:null}else n=Je.next;var i=xt===null?Re.memoizedState:xt.next;if(i!==null)xt=i,Je=n;else{if(n===null)throw Re.alternate===null?Error(l(467)):Error(l(310));Je=n,n={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},xt===null?Re.memoizedState=xt=n:xt=xt.next=n}return xt}function Vs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ha(n){var i=da;return da+=1,fl===null&&(fl=[]),n=kp(fl,n,i),i=Re,(xt===null?i.memoizedState:xt.next)===null&&(i=i.alternate,z.H=i===null||i.memoizedState===null?yg:Yc),n}function Hs(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return ha(n);if(n.$$typeof===O)return Bt(n)}throw Error(l(438,String(n)))}function Ic(n){var i=null,s=Re.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var c=Re.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(m){return m.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=Vs(),Re.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(n),c=0;c<n;c++)s[c]=P;return i.index++,s}function or(n,i){return typeof i=="function"?i(n):i}function Gs(n){var i=pt();return Pc(i,Je,n)}function Pc(n,i,s){var c=n.queue;if(c===null)throw Error(l(311));c.lastRenderedReducer=s;var m=n.baseQueue,y=c.pending;if(y!==null){if(m!==null){var _=m.next;m.next=y.next,y.next=_}i.baseQueue=m=y,c.pending=null}if(y=n.baseState,m===null)n.memoizedState=y;else{i=m.next;var S=_=null,D=null,V=i,K=!1;do{var ee=V.lane&-536870913;if(ee!==V.lane?(Be&ee)===ee:(sr&ee)===ee){var H=V.revertLane;if(H===0)D!==null&&(D=D.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),ee===ll&&(K=!0);else if((sr&H)===H){V=V.next,H===ll&&(K=!0);continue}else ee={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},D===null?(S=D=ee,_=y):D=D.next=ee,Re.lanes|=H,Hr|=H;ee=V.action,Si&&s(y,ee),y=V.hasEagerState?V.eagerState:s(y,ee)}else H={lane:ee,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},D===null?(S=D=H,_=y):D=D.next=H,Re.lanes|=ee,Hr|=ee;V=V.next}while(V!==null&&V!==i);if(D===null?_=y:D.next=S,!hn(y,n.memoizedState)&&(vt=!0,K&&(s=al,s!==null)))throw s;n.memoizedState=y,n.baseState=_,n.baseQueue=D,c.lastRenderedState=y}return m===null&&(c.lanes=0),[n.memoizedState,c.dispatch]}function Bc(n){var i=pt(),s=i.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=n;var c=s.dispatch,m=s.pending,y=i.memoizedState;if(m!==null){s.pending=null;var _=m=m.next;do y=n(y,_.action),_=_.next;while(_!==m);hn(y,i.memoizedState)||(vt=!0),i.memoizedState=y,i.baseQueue===null&&(i.baseState=y),s.lastRenderedState=y}return[y,c]}function Ip(n,i,s){var c=Re,m=pt(),y=Ve;if(y){if(s===void 0)throw Error(l(407));s=s()}else s=i();var _=!hn((Je||m).memoizedState,s);if(_&&(m.memoizedState=s,vt=!0),m=m.queue,Hc(Up.bind(null,c,m,n),[n]),m.getSnapshot!==i||_||xt!==null&&xt.memoizedState.tag&1){if(c.flags|=2048,dl(9,{destroy:void 0},Bp.bind(null,c,m,s,i),null),nt===null)throw Error(l(349));y||(sr&127)!==0||Pp(c,i,s)}return s}function Pp(n,i,s){n.flags|=16384,n={getSnapshot:i,value:s},i=Re.updateQueue,i===null?(i=Vs(),Re.updateQueue=i,i.stores=[n]):(s=i.stores,s===null?i.stores=[n]:s.push(n))}function Bp(n,i,s,c){i.value=s,i.getSnapshot=c,Vp(i)&&Hp(n)}function Up(n,i,s){return s(function(){Vp(i)&&Hp(n)})}function Vp(n){var i=n.getSnapshot;n=n.value;try{var s=i();return!hn(n,s)}catch{return!0}}function Hp(n){var i=mi(n,2);i!==null&&un(i,n,2)}function Uc(n){var i=Zt();if(typeof n=="function"){var s=n;if(n=s(),Si){oe(!0);try{s()}finally{oe(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:or,lastRenderedState:n},i}function Gp(n,i,s,c){return n.baseState=s,Pc(n,Je,typeof c=="function"?c:or)}function mS(n,i,s,c,m){if($s(n))throw Error(l(485));if(n=i.action,n!==null){var y={payload:m,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){y.listeners.push(_)}};z.T!==null?s(!0):y.isTransition=!1,c(y),s=i.pending,s===null?(y.next=i.pending=y,Fp(i,y)):(y.next=s.next,i.pending=s.next=y)}}function Fp(n,i){var s=i.action,c=i.payload,m=n.state;if(i.isTransition){var y=z.T,_={};z.T=_;try{var S=s(m,c),D=z.S;D!==null&&D(_,S),qp(n,i,S)}catch(V){Vc(n,i,V)}finally{y!==null&&_.types!==null&&(y.types=_.types),z.T=y}}else try{y=s(m,c),qp(n,i,y)}catch(V){Vc(n,i,V)}}function qp(n,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){$p(n,i,c)},function(c){return Vc(n,i,c)}):$p(n,i,s)}function $p(n,i,s){i.status="fulfilled",i.value=s,Qp(i),n.state=s,i=n.pending,i!==null&&(s=i.next,s===i?n.pending=null:(s=s.next,i.next=s,Fp(n,s)))}function Vc(n,i,s){var c=n.pending;if(n.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=s,Qp(i),i=i.next;while(i!==c)}n.action=null}function Qp(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}function Yp(n,i){return i}function Xp(n,i){if(Ve){var s=nt.formState;if(s!==null){e:{var c=Re;if(Ve){if(st){t:{for(var m=st,y=Ln;m.nodeType!==8;){if(!y){m=null;break t}if(m=Nn(m.nextSibling),m===null){m=null;break t}}y=m.data,m=y==="F!"||y==="F"?m:null}if(m){st=Nn(m.nextSibling),c=m.data==="F!";break e}}Dr(c)}c=!1}c&&(i=s[0])}}return s=Zt(),s.memoizedState=s.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yp,lastRenderedState:i},s.queue=c,s=mg.bind(null,Re,c),c.dispatch=s,c=Uc(!1),y=Qc.bind(null,Re,!1,c.queue),c=Zt(),m={state:i,dispatch:null,action:n,pending:null},c.queue=m,s=mS.bind(null,Re,m,y,s),m.dispatch=s,c.memoizedState=n,[i,s,!1]}function Kp(n){var i=pt();return Zp(i,Je,n)}function Zp(n,i,s){if(i=Pc(n,i,Yp)[0],n=Gs(or)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=ha(i)}catch(_){throw _===sl?Ds:_}else c=i;i=pt();var m=i.queue,y=m.dispatch;return s!==i.memoizedState&&(Re.flags|=2048,dl(9,{destroy:void 0},pS.bind(null,m,s),null)),[c,y,n]}function pS(n,i){n.action=i}function Jp(n){var i=pt(),s=Je;if(s!==null)return Zp(i,s,n);pt(),i=i.memoizedState,s=pt();var c=s.queue.dispatch;return s.memoizedState=n,[i,c,!1]}function dl(n,i,s,c){return n={tag:n,create:s,deps:c,inst:i,next:null},i=Re.updateQueue,i===null&&(i=Vs(),Re.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=n.next=n:(c=s.next,s.next=n,n.next=c,i.lastEffect=n),n}function Wp(){return pt().memoizedState}function Fs(n,i,s,c){var m=Zt();Re.flags|=n,m.memoizedState=dl(1|i,{destroy:void 0},s,c===void 0?null:c)}function qs(n,i,s,c){var m=pt();c=c===void 0?null:c;var y=m.memoizedState.inst;Je!==null&&c!==null&&Nc(c,Je.memoizedState.deps)?m.memoizedState=dl(i,y,s,c):(Re.flags|=n,m.memoizedState=dl(1|i,y,s,c))}function eg(n,i){Fs(8390656,8,n,i)}function Hc(n,i){qs(2048,8,n,i)}function gS(n){Re.flags|=4;var i=Re.updateQueue;if(i===null)i=Vs(),Re.updateQueue=i,i.events=[n];else{var s=i.events;s===null?i.events=[n]:s.push(n)}}function tg(n){var i=pt().memoizedState;return gS({ref:i,nextImpl:n}),function(){if((Qe&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}function ng(n,i){return qs(4,2,n,i)}function rg(n,i){return qs(4,4,n,i)}function ig(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 lg(n,i,s){s=s!=null?s.concat([n]):null,qs(4,4,ig.bind(null,i,n),s)}function Gc(){}function ag(n,i){var s=pt();i=i===void 0?null:i;var c=s.memoizedState;return i!==null&&Nc(i,c[1])?c[0]:(s.memoizedState=[n,i],n)}function sg(n,i){var s=pt();i=i===void 0?null:i;var c=s.memoizedState;if(i!==null&&Nc(i,c[1]))return c[0];if(c=n(),Si){oe(!0);try{n()}finally{oe(!1)}}return s.memoizedState=[c,i],c}function Fc(n,i,s){return s===void 0||(sr&1073741824)!==0&&(Be&261930)===0?n.memoizedState=i:(n.memoizedState=s,n=oy(),Re.lanes|=n,Hr|=n,s)}function og(n,i,s,c){return hn(s,i)?s:ul.current!==null?(n=Fc(n,s,c),hn(n,i)||(vt=!0),n):(sr&42)===0||(sr&1073741824)!==0&&(Be&261930)===0?(vt=!0,n.memoizedState=s):(n=oy(),Re.lanes|=n,Hr|=n,i)}function ug(n,i,s,c,m){var y=J.p;J.p=y!==0&&8>y?y:8;var _=z.T,S={};z.T=S,Qc(n,!1,i,s);try{var D=m(),V=z.S;if(V!==null&&V(S,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){var K=fS(D,c);ma(n,i,K,xn(n))}else ma(n,i,c,xn(n))}catch(ee){ma(n,i,{then:function(){},status:"rejected",reason:ee},xn())}finally{J.p=y,_!==null&&S.types!==null&&(_.types=S.types),z.T=_}}function yS(){}function qc(n,i,s,c){if(n.tag!==5)throw Error(l(476));var m=cg(n).queue;ug(n,m,i,re,s===null?yS:function(){return fg(n),s(c)})}function cg(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:or,lastRenderedState:re},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:or,lastRenderedState:s},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function fg(n){var i=cg(n);i.next===null&&(i=n.alternate.memoizedState),ma(n,i.next.queue,{},xn())}function $c(){return Bt(Oa)}function dg(){return pt().memoizedState}function hg(){return pt().memoizedState}function bS(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var s=xn();n=zr(s);var c=Ir(i,n,s);c!==null&&(un(c,i,s),ua(c,i,s)),i={cache:_c()},n.payload=i;return}i=i.return}}function xS(n,i,s){var c=xn();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},$s(n)?pg(i,s):(s=cc(n,i,s,c),s!==null&&(un(s,n,c),gg(s,i,c)))}function mg(n,i,s){var c=xn();ma(n,i,s,c)}function ma(n,i,s,c){var m={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if($s(n))pg(i,m);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=i.lastRenderedReducer,y!==null))try{var _=i.lastRenderedState,S=y(_,s);if(m.hasEagerState=!0,m.eagerState=S,hn(S,_))return ks(n,i,m,0),nt===null&&Cs(),!1}catch{}if(s=cc(n,i,m,c),s!==null)return un(s,n,c),gg(s,i,c),!0}return!1}function Qc(n,i,s,c){if(c={lane:2,revertLane:kf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},$s(n)){if(i)throw Error(l(479))}else i=cc(n,s,c,2),i!==null&&un(i,n,2)}function $s(n){var i=n.alternate;return n===Re||i!==null&&i===Re}function pg(n,i){cl=Bs=!0;var s=n.pending;s===null?i.next=i:(i.next=s.next,s.next=i),n.pending=i}function gg(n,i,s){if((s&4194048)!==0){var c=i.lanes;c&=n.pendingLanes,s|=c,i.lanes=s,_m(n,s)}}var pa={readContext:Bt,use:Hs,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};pa.useEffectEvent=ft;var yg={readContext:Bt,use:Hs,useCallback:function(n,i){return Zt().memoizedState=[n,i===void 0?null:i],n},useContext:Bt,useEffect:eg,useImperativeHandle:function(n,i,s){s=s!=null?s.concat([n]):null,Fs(4194308,4,ig.bind(null,i,n),s)},useLayoutEffect:function(n,i){return Fs(4194308,4,n,i)},useInsertionEffect:function(n,i){Fs(4,2,n,i)},useMemo:function(n,i){var s=Zt();i=i===void 0?null:i;var c=n();if(Si){oe(!0);try{n()}finally{oe(!1)}}return s.memoizedState=[c,i],c},useReducer:function(n,i,s){var c=Zt();if(s!==void 0){var m=s(i);if(Si){oe(!0);try{s(i)}finally{oe(!1)}}}else m=i;return c.memoizedState=c.baseState=m,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:m},c.queue=n,n=n.dispatch=xS.bind(null,Re,n),[c.memoizedState,n]},useRef:function(n){var i=Zt();return n={current:n},i.memoizedState=n},useState:function(n){n=Uc(n);var i=n.queue,s=mg.bind(null,Re,i);return i.dispatch=s,[n.memoizedState,s]},useDebugValue:Gc,useDeferredValue:function(n,i){var s=Zt();return Fc(s,n,i)},useTransition:function(){var n=Uc(!1);return n=ug.bind(null,Re,n.queue,!0,!1),Zt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,s){var c=Re,m=Zt();if(Ve){if(s===void 0)throw Error(l(407));s=s()}else{if(s=i(),nt===null)throw Error(l(349));(Be&127)!==0||Pp(c,i,s)}m.memoizedState=s;var y={value:s,getSnapshot:i};return m.queue=y,eg(Up.bind(null,c,y,n),[n]),c.flags|=2048,dl(9,{destroy:void 0},Bp.bind(null,c,y,s,i),null),s},useId:function(){var n=Zt(),i=nt.identifierPrefix;if(Ve){var s=$n,c=qn;s=(c&~(1<<32-ae(c)-1)).toString(32)+s,i="_"+i+"R_"+s,s=Us++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=dS++,i="_"+i+"r_"+s.toString(32)+"_";return n.memoizedState=i},useHostTransitionStatus:$c,useFormState:Xp,useActionState:Xp,useOptimistic:function(n){var i=Zt();i.memoizedState=i.baseState=n;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=Qc.bind(null,Re,!0,s),s.dispatch=i,[n,i]},useMemoCache:Ic,useCacheRefresh:function(){return Zt().memoizedState=bS.bind(null,Re)},useEffectEvent:function(n){var i=Zt(),s={impl:n};return i.memoizedState=s,function(){if((Qe&2)!==0)throw Error(l(440));return s.impl.apply(void 0,arguments)}}},Yc={readContext:Bt,use:Hs,useCallback:ag,useContext:Bt,useEffect:Hc,useImperativeHandle:lg,useInsertionEffect:ng,useLayoutEffect:rg,useMemo:sg,useReducer:Gs,useRef:Wp,useState:function(){return Gs(or)},useDebugValue:Gc,useDeferredValue:function(n,i){var s=pt();return og(s,Je.memoizedState,n,i)},useTransition:function(){var n=Gs(or)[0],i=pt().memoizedState;return[typeof n=="boolean"?n:ha(n),i]},useSyncExternalStore:Ip,useId:dg,useHostTransitionStatus:$c,useFormState:Kp,useActionState:Kp,useOptimistic:function(n,i){var s=pt();return Gp(s,Je,n,i)},useMemoCache:Ic,useCacheRefresh:hg};Yc.useEffectEvent=tg;var bg={readContext:Bt,use:Hs,useCallback:ag,useContext:Bt,useEffect:Hc,useImperativeHandle:lg,useInsertionEffect:ng,useLayoutEffect:rg,useMemo:sg,useReducer:Bc,useRef:Wp,useState:function(){return Bc(or)},useDebugValue:Gc,useDeferredValue:function(n,i){var s=pt();return Je===null?Fc(s,n,i):og(s,Je.memoizedState,n,i)},useTransition:function(){var n=Bc(or)[0],i=pt().memoizedState;return[typeof n=="boolean"?n:ha(n),i]},useSyncExternalStore:Ip,useId:dg,useHostTransitionStatus:$c,useFormState:Jp,useActionState:Jp,useOptimistic:function(n,i){var s=pt();return Je!==null?Gp(s,Je,n,i):(s.baseState=n,[n,s.queue.dispatch])},useMemoCache:Ic,useCacheRefresh:hg};bg.useEffectEvent=tg;function Xc(n,i,s,c){i=n.memoizedState,s=s(c,i),s=s==null?i:p({},i,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var Kc={enqueueSetState:function(n,i,s){n=n._reactInternals;var c=xn(),m=zr(c);m.payload=i,s!=null&&(m.callback=s),i=Ir(n,m,c),i!==null&&(un(i,n,c),ua(i,n,c))},enqueueReplaceState:function(n,i,s){n=n._reactInternals;var c=xn(),m=zr(c);m.tag=1,m.payload=i,s!=null&&(m.callback=s),i=Ir(n,m,c),i!==null&&(un(i,n,c),ua(i,n,c))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var s=xn(),c=zr(s);c.tag=2,i!=null&&(c.callback=i),i=Ir(n,c,s),i!==null&&(un(i,n,s),ua(i,n,s))}};function xg(n,i,s,c,m,y,_){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,y,_):i.prototype&&i.prototype.isPureReactComponent?!ta(s,c)||!ta(m,y):!0}function vg(n,i,s,c){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,c),i.state!==n&&Kc.enqueueReplaceState(i,i.state,null)}function Ei(n,i){var s=i;if("ref"in i){s={};for(var c in i)c!=="ref"&&(s[c]=i[c])}if(n=n.defaultProps){s===i&&(s=p({},s));for(var m in n)s[m]===void 0&&(s[m]=n[m])}return s}function _g(n){Es(n)}function wg(n){console.error(n)}function Sg(n){Es(n)}function Qs(n,i){try{var s=n.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function Eg(n,i,s){try{var c=n.onCaughtError;c(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function Zc(n,i,s){return s=zr(s),s.tag=3,s.payload={element:null},s.callback=function(){Qs(n,i)},s}function Cg(n){return n=zr(n),n.tag=3,n}function kg(n,i,s,c){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var y=c.value;n.payload=function(){return m(y)},n.callback=function(){Eg(i,s,c)}}var _=s.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(n.callback=function(){Eg(i,s,c),typeof m!="function"&&(Gr===null?Gr=new Set([this]):Gr.add(this));var S=c.stack;this.componentDidCatch(c.value,{componentStack:S!==null?S:""})})}function vS(n,i,s,c,m){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=s.alternate,i!==null&&il(i,s,m,!0),s=pn.current,s!==null){switch(s.tag){case 31:case 13:return On===null?lo():s.alternate===null&&dt===0&&(dt=3),s.flags&=-257,s.flags|=65536,s.lanes=m,c===Ms?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([c]):i.add(c),Sf(n,c,m)),!1;case 22:return s.flags|=65536,c===Ms?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([c]):s.add(c)),Sf(n,c,m)),!1}throw Error(l(435,s.tag))}return Sf(n,c,m),lo(),!1}if(Ve)return i=pn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=m,c!==gc&&(n=Error(l(422),{cause:c}),ia(An(n,s)))):(c!==gc&&(i=Error(l(423),{cause:c}),ia(An(i,s))),n=n.current.alternate,n.flags|=65536,m&=-m,n.lanes|=m,c=An(c,s),m=Zc(n.stateNode,c,m),Ac(n,m),dt!==4&&(dt=2)),!1;var y=Error(l(520),{cause:c});if(y=An(y,s),Sa===null?Sa=[y]:Sa.push(y),dt!==4&&(dt=2),i===null)return!0;c=An(c,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,n=m&-m,s.lanes|=n,n=Zc(s.stateNode,c,n),Ac(s,n),!1;case 1:if(i=s.type,y=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Gr===null||!Gr.has(y))))return s.flags|=65536,m&=-m,s.lanes|=m,m=Cg(m),kg(m,n,s,c),Ac(s,m),!1}s=s.return}while(s!==null);return!1}var Jc=Error(l(461)),vt=!1;function Ut(n,i,s,c){i.child=n===null?Lp(i,null,s,c):wi(i,n.child,s,c)}function Ag(n,i,s,c,m){s=s.render;var y=i.ref;if("ref"in c){var _={};for(var S in c)S!=="ref"&&(_[S]=c[S])}else _=c;return bi(i),c=Dc(n,i,s,_,y,m),S=Mc(),n!==null&&!vt?(jc(n,i,m),ur(n,i,m)):(Ve&&S&&mc(i),i.flags|=1,Ut(n,i,c,m),i.child)}function Tg(n,i,s,c,m){if(n===null){var y=s.type;return typeof y=="function"&&!fc(y)&&y.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=y,Rg(n,i,y,c,m)):(n=Ts(s.type,null,c,i,i.mode,m),n.ref=i.ref,n.return=i,i.child=n)}if(y=n.child,!sf(n,m)){var _=y.memoizedProps;if(s=s.compare,s=s!==null?s:ta,s(_,c)&&n.ref===i.ref)return ur(n,i,m)}return i.flags|=1,n=rr(y,c),n.ref=i.ref,n.return=i,i.child=n}function Rg(n,i,s,c,m){if(n!==null){var y=n.memoizedProps;if(ta(y,c)&&n.ref===i.ref)if(vt=!1,i.pendingProps=c=y,sf(n,m))(n.flags&131072)!==0&&(vt=!0);else return i.lanes=n.lanes,ur(n,i,m)}return Wc(n,i,s,c,m)}function Lg(n,i,s,c){var m=c.children,y=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(y=y!==null?y.baseLanes|s:s,n!==null){for(c=i.child=n.child,m=0;c!==null;)m=m|c.lanes|c.childLanes,c=c.sibling;c=m&~y}else c=0,i.child=null;return Og(n,i,y,s,c)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&Ns(i,y!==null?y.cachePool:null),y!==null?Dp(i,y):Rc(),Mp(i);else return c=i.lanes=536870912,Og(n,i,y!==null?y.baseLanes|s:s,s,c)}else y!==null?(Ns(i,y.cachePool),Dp(i,y),Br(),i.memoizedState=null):(n!==null&&Ns(i,null),Rc(),Br());return Ut(n,i,m,s),i.child}function ga(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Og(n,i,s,c,m){var y=Sc();return y=y===null?null:{parent:bt._currentValue,pool:y},i.memoizedState={baseLanes:s,cachePool:y},n!==null&&Ns(i,null),Rc(),Mp(i),n!==null&&il(n,i,c,!0),i.childLanes=m,null}function Ys(n,i){return i=Ks({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}function Ng(n,i,s){return wi(i,n.child,null,s),n=Ys(i,i.pendingProps),n.flags|=2,gn(i),i.memoizedState=null,n}function _S(n,i,s){var c=i.pendingProps,m=(i.flags&128)!==0;if(i.flags&=-129,n===null){if(Ve){if(c.mode==="hidden")return n=Ys(i,c),i.lanes=536870912,ga(null,n);if(Oc(i),(n=st)?(n=Fy(n,Ln),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Or!==null?{id:qn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},s=pp(n),s.return=i,i.child=s,Pt=i,st=null)):n=null,n===null)throw Dr(i);return i.lanes=536870912,null}return Ys(i,c)}var y=n.memoizedState;if(y!==null){var _=y.dehydrated;if(Oc(i),m)if(i.flags&256)i.flags&=-257,i=Ng(n,i,s);else if(i.memoizedState!==null)i.child=n.child,i.flags|=128,i=null;else throw Error(l(558));else if(vt||il(n,i,s,!1),m=(s&n.childLanes)!==0,vt||m){if(c=nt,c!==null&&(_=wm(c,s),_!==0&&_!==y.retryLane))throw y.retryLane=_,mi(n,_),un(c,n,_),Jc;lo(),i=Ng(n,i,s)}else n=y.treeContext,st=Nn(_.nextSibling),Pt=i,Ve=!0,Nr=null,Ln=!1,n!==null&&bp(i,n),i=Ys(i,c),i.flags|=4096;return i}return n=rr(n.child,{mode:c.mode,children:c.children}),n.ref=i.ref,i.child=n,n.return=i,n}function Xs(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(l(284));(n===null||n.ref!==s)&&(i.flags|=4194816)}}function Wc(n,i,s,c,m){return bi(i),s=Dc(n,i,s,c,void 0,m),c=Mc(),n!==null&&!vt?(jc(n,i,m),ur(n,i,m)):(Ve&&c&&mc(i),i.flags|=1,Ut(n,i,s,m),i.child)}function Dg(n,i,s,c,m,y){return bi(i),i.updateQueue=null,s=zp(i,c,s,m),jp(n),c=Mc(),n!==null&&!vt?(jc(n,i,y),ur(n,i,y)):(Ve&&c&&mc(i),i.flags|=1,Ut(n,i,s,y),i.child)}function Mg(n,i,s,c,m){if(bi(i),i.stateNode===null){var y=el,_=s.contextType;typeof _=="object"&&_!==null&&(y=Bt(_)),y=new s(c,y),i.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Kc,i.stateNode=y,y._reactInternals=i,y=i.stateNode,y.props=c,y.state=i.memoizedState,y.refs={},Cc(i),_=s.contextType,y.context=typeof _=="object"&&_!==null?Bt(_):el,y.state=i.memoizedState,_=s.getDerivedStateFromProps,typeof _=="function"&&(Xc(i,s,_,c),y.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(_=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),_!==y.state&&Kc.enqueueReplaceState(y,y.state,null),fa(i,c,y,m),ca(),y.state=i.memoizedState),typeof y.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(n===null){y=i.stateNode;var S=i.memoizedProps,D=Ei(s,S);y.props=D;var V=y.context,K=s.contextType;_=el,typeof K=="object"&&K!==null&&(_=Bt(K));var ee=s.getDerivedStateFromProps;K=typeof ee=="function"||typeof y.getSnapshotBeforeUpdate=="function",S=i.pendingProps!==S,K||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(S||V!==_)&&vg(i,y,c,_),jr=!1;var H=i.memoizedState;y.state=H,fa(i,c,y,m),ca(),V=i.memoizedState,S||H!==V||jr?(typeof ee=="function"&&(Xc(i,s,ee,c),V=i.memoizedState),(D=jr||xg(i,s,D,c,H,V,_))?(K||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(i.flags|=4194308)):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=V),y.props=c,y.state=V,y.context=_,c=D):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{y=i.stateNode,kc(n,i),_=i.memoizedProps,K=Ei(s,_),y.props=K,ee=i.pendingProps,H=y.context,V=s.contextType,D=el,typeof V=="object"&&V!==null&&(D=Bt(V)),S=s.getDerivedStateFromProps,(V=typeof S=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(_!==ee||H!==D)&&vg(i,y,c,D),jr=!1,H=i.memoizedState,y.state=H,fa(i,c,y,m),ca();var $=i.memoizedState;_!==ee||H!==$||jr||n!==null&&n.dependencies!==null&&Ls(n.dependencies)?(typeof S=="function"&&(Xc(i,s,S,c),$=i.memoizedState),(K=jr||xg(i,s,K,c,H,$,D)||n!==null&&n.dependencies!==null&&Ls(n.dependencies))?(V||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(c,$,D),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(c,$,D)),typeof y.componentDidUpdate=="function"&&(i.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof y.componentDidUpdate!="function"||_===n.memoizedProps&&H===n.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&H===n.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=$),y.props=c,y.state=$,y.context=D,c=K):(typeof y.componentDidUpdate!="function"||_===n.memoizedProps&&H===n.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&H===n.memoizedState||(i.flags|=1024),c=!1)}return y=c,Xs(n,i),c=(i.flags&128)!==0,y||c?(y=i.stateNode,s=c&&typeof s.getDerivedStateFromError!="function"?null:y.render(),i.flags|=1,n!==null&&c?(i.child=wi(i,n.child,null,m),i.child=wi(i,null,s,m)):Ut(n,i,s,m),i.memoizedState=y.state,n=i.child):n=ur(n,i,m),n}function jg(n,i,s,c){return gi(),i.flags|=256,Ut(n,i,s,c),i.child}var ef={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function tf(n){return{baseLanes:n,cachePool:Ep()}}function nf(n,i,s){return n=n!==null?n.childLanes&~s:0,i&&(n|=bn),n}function zg(n,i,s){var c=i.pendingProps,m=!1,y=(i.flags&128)!==0,_;if((_=y)||(_=n!==null&&n.memoizedState===null?!1:(mt.current&2)!==0),_&&(m=!0,i.flags&=-129),_=(i.flags&32)!==0,i.flags&=-33,n===null){if(Ve){if(m?Pr(i):Br(),(n=st)?(n=Fy(n,Ln),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Or!==null?{id:qn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},s=pp(n),s.return=i,i.child=s,Pt=i,st=null)):n=null,n===null)throw Dr(i);return Bf(n)?i.lanes=32:i.lanes=536870912,null}var S=c.children;return c=c.fallback,m?(Br(),m=i.mode,S=Ks({mode:"hidden",children:S},m),c=pi(c,m,s,null),S.return=i,c.return=i,S.sibling=c,i.child=S,c=i.child,c.memoizedState=tf(s),c.childLanes=nf(n,_,s),i.memoizedState=ef,ga(null,c)):(Pr(i),rf(i,S))}var D=n.memoizedState;if(D!==null&&(S=D.dehydrated,S!==null)){if(y)i.flags&256?(Pr(i),i.flags&=-257,i=lf(n,i,s)):i.memoizedState!==null?(Br(),i.child=n.child,i.flags|=128,i=null):(Br(),S=c.fallback,m=i.mode,c=Ks({mode:"visible",children:c.children},m),S=pi(S,m,s,null),S.flags|=2,c.return=i,S.return=i,c.sibling=S,i.child=c,wi(i,n.child,null,s),c=i.child,c.memoizedState=tf(s),c.childLanes=nf(n,_,s),i.memoizedState=ef,i=ga(null,c));else if(Pr(i),Bf(S)){if(_=S.nextSibling&&S.nextSibling.dataset,_)var V=_.dgst;_=V,c=Error(l(419)),c.stack="",c.digest=_,ia({value:c,source:null,stack:null}),i=lf(n,i,s)}else if(vt||il(n,i,s,!1),_=(s&n.childLanes)!==0,vt||_){if(_=nt,_!==null&&(c=wm(_,s),c!==0&&c!==D.retryLane))throw D.retryLane=c,mi(n,c),un(_,n,c),Jc;Pf(S)||lo(),i=lf(n,i,s)}else Pf(S)?(i.flags|=192,i.child=n.child,i=null):(n=D.treeContext,st=Nn(S.nextSibling),Pt=i,Ve=!0,Nr=null,Ln=!1,n!==null&&bp(i,n),i=rf(i,c.children),i.flags|=4096);return i}return m?(Br(),S=c.fallback,m=i.mode,D=n.child,V=D.sibling,c=rr(D,{mode:"hidden",children:c.children}),c.subtreeFlags=D.subtreeFlags&65011712,V!==null?S=rr(V,S):(S=pi(S,m,s,null),S.flags|=2),S.return=i,c.return=i,c.sibling=S,i.child=c,ga(null,c),c=i.child,S=n.child.memoizedState,S===null?S=tf(s):(m=S.cachePool,m!==null?(D=bt._currentValue,m=m.parent!==D?{parent:D,pool:D}:m):m=Ep(),S={baseLanes:S.baseLanes|s,cachePool:m}),c.memoizedState=S,c.childLanes=nf(n,_,s),i.memoizedState=ef,ga(n.child,c)):(Pr(i),s=n.child,n=s.sibling,s=rr(s,{mode:"visible",children:c.children}),s.return=i,s.sibling=null,n!==null&&(_=i.deletions,_===null?(i.deletions=[n],i.flags|=16):_.push(n)),i.child=s,i.memoizedState=null,s)}function rf(n,i){return i=Ks({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function Ks(n,i){return n=mn(22,n,null,i),n.lanes=0,n}function lf(n,i,s){return wi(i,n.child,null,s),n=rf(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function Ig(n,i,s){n.lanes|=i;var c=n.alternate;c!==null&&(c.lanes|=i),xc(n.return,i,s)}function af(n,i,s,c,m,y){var _=n.memoizedState;_===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:m,treeForkCount:y}:(_.isBackwards=i,_.rendering=null,_.renderingStartTime=0,_.last=c,_.tail=s,_.tailMode=m,_.treeForkCount=y)}function Pg(n,i,s){var c=i.pendingProps,m=c.revealOrder,y=c.tail;c=c.children;var _=mt.current,S=(_&2)!==0;if(S?(_=_&1|2,i.flags|=128):_&=1,T(mt,_),Ut(n,i,c,s),c=Ve?ra:0,!S&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Ig(n,s,i);else if(n.tag===19)Ig(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(m){case"forwards":for(s=i.child,m=null;s!==null;)n=s.alternate,n!==null&&Ps(n)===null&&(m=s),s=s.sibling;s=m,s===null?(m=i.child,i.child=null):(m=s.sibling,s.sibling=null),af(i,!1,m,s,y,c);break;case"backwards":case"unstable_legacy-backwards":for(s=null,m=i.child,i.child=null;m!==null;){if(n=m.alternate,n!==null&&Ps(n)===null){i.child=m;break}n=m.sibling,m.sibling=s,s=m,m=n}af(i,!0,s,null,y,c);break;case"together":af(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function ur(n,i,s){if(n!==null&&(i.dependencies=n.dependencies),Hr|=i.lanes,(s&i.childLanes)===0)if(n!==null){if(il(n,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(l(153));if(i.child!==null){for(n=i.child,s=rr(n,n.pendingProps),i.child=s,s.return=i;n.sibling!==null;)n=n.sibling,s=s.sibling=rr(n,n.pendingProps),s.return=i;s.sibling=null}return i.child}function sf(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&Ls(n)))}function wS(n,i,s){switch(i.tag){case 3:je(i,i.stateNode.containerInfo),Mr(i,bt,n.memoizedState.cache),gi();break;case 27:case 5:yt(i);break;case 4:je(i,i.stateNode.containerInfo);break;case 10:Mr(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Oc(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(Pr(i),i.flags|=128,null):(s&i.child.childLanes)!==0?zg(n,i,s):(Pr(i),n=ur(n,i,s),n!==null?n.sibling:null);Pr(i);break;case 19:var m=(n.flags&128)!==0;if(c=(s&i.childLanes)!==0,c||(il(n,i,s,!1),c=(s&i.childLanes)!==0),m){if(c)return Pg(n,i,s);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),T(mt,mt.current),c)break;return null;case 22:return i.lanes=0,Lg(n,i,s,i.pendingProps);case 24:Mr(i,bt,n.memoizedState.cache)}return ur(n,i,s)}function Bg(n,i,s){if(n!==null)if(n.memoizedProps!==i.pendingProps)vt=!0;else{if(!sf(n,s)&&(i.flags&128)===0)return vt=!1,wS(n,i,s);vt=(n.flags&131072)!==0}else vt=!1,Ve&&(i.flags&1048576)!==0&&yp(i,ra,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(n=vi(i.elementType),i.type=n,typeof n=="function")fc(n)?(c=Ei(n,c),i.tag=1,i=Mg(null,i,n,c,s)):(i.tag=0,i=Wc(null,i,n,c,s));else{if(n!=null){var m=n.$$typeof;if(m===B){i.tag=11,i=Ag(null,i,n,c,s);break e}else if(m===q){i.tag=14,i=Tg(null,i,n,c,s);break e}}throw i=le(n)||n,Error(l(306,i,""))}}return i;case 0:return Wc(n,i,i.type,i.pendingProps,s);case 1:return c=i.type,m=Ei(c,i.pendingProps),Mg(n,i,c,m,s);case 3:e:{if(je(i,i.stateNode.containerInfo),n===null)throw Error(l(387));c=i.pendingProps;var y=i.memoizedState;m=y.element,kc(n,i),fa(i,c,null,s);var _=i.memoizedState;if(c=_.cache,Mr(i,bt,c),c!==y.cache&&vc(i,[bt],s,!0),ca(),c=_.element,y.isDehydrated)if(y={element:c,isDehydrated:!1,cache:_.cache},i.updateQueue.baseState=y,i.memoizedState=y,i.flags&256){i=jg(n,i,c,s);break e}else if(c!==m){m=An(Error(l(424)),i),ia(m),i=jg(n,i,c,s);break e}else for(n=i.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,st=Nn(n.firstChild),Pt=i,Ve=!0,Nr=null,Ln=!0,s=Lp(i,null,c,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(gi(),c===m){i=ur(n,i,s);break e}Ut(n,i,c,s)}i=i.child}return i;case 26:return Xs(n,i),n===null?(s=Ky(i.type,null,i.pendingProps,null))?i.memoizedState=s:Ve||(s=i.type,n=i.pendingProps,c=ho(fe.current).createElement(s),c[It]=i,c[nn]=n,Vt(c,s,n),Nt(c),i.stateNode=c):i.memoizedState=Ky(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return yt(i),n===null&&Ve&&(c=i.stateNode=Qy(i.type,i.pendingProps,fe.current),Pt=i,Ln=!0,m=st,Qr(i.type)?(Uf=m,st=Nn(c.firstChild)):st=m),Ut(n,i,i.pendingProps.children,s),Xs(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&Ve&&((m=c=st)&&(c=JS(c,i.type,i.pendingProps,Ln),c!==null?(i.stateNode=c,Pt=i,st=Nn(c.firstChild),Ln=!1,m=!0):m=!1),m||Dr(i)),yt(i),m=i.type,y=i.pendingProps,_=n!==null?n.memoizedProps:null,c=y.children,jf(m,y)?c=null:_!==null&&jf(m,_)&&(i.flags|=32),i.memoizedState!==null&&(m=Dc(n,i,hS,null,null,s),Oa._currentValue=m),Xs(n,i),Ut(n,i,c,s),i.child;case 6:return n===null&&Ve&&((n=s=st)&&(s=WS(s,i.pendingProps,Ln),s!==null?(i.stateNode=s,Pt=i,st=null,n=!0):n=!1),n||Dr(i)),null;case 13:return zg(n,i,s);case 4:return je(i,i.stateNode.containerInfo),c=i.pendingProps,n===null?i.child=wi(i,null,c,s):Ut(n,i,c,s),i.child;case 11:return Ag(n,i,i.type,i.pendingProps,s);case 7:return Ut(n,i,i.pendingProps,s),i.child;case 8:return Ut(n,i,i.pendingProps.children,s),i.child;case 12:return Ut(n,i,i.pendingProps.children,s),i.child;case 10:return c=i.pendingProps,Mr(i,i.type,c.value),Ut(n,i,c.children,s),i.child;case 9:return m=i.type._context,c=i.pendingProps.children,bi(i),m=Bt(m),c=c(m),i.flags|=1,Ut(n,i,c,s),i.child;case 14:return Tg(n,i,i.type,i.pendingProps,s);case 15:return Rg(n,i,i.type,i.pendingProps,s);case 19:return Pg(n,i,s);case 31:return _S(n,i,s);case 22:return Lg(n,i,s,i.pendingProps);case 24:return bi(i),c=Bt(bt),n===null?(m=Sc(),m===null&&(m=nt,y=_c(),m.pooledCache=y,y.refCount++,y!==null&&(m.pooledCacheLanes|=s),m=y),i.memoizedState={parent:c,cache:m},Cc(i),Mr(i,bt,m)):((n.lanes&s)!==0&&(kc(n,i),fa(i,null,null,s),ca()),m=n.memoizedState,y=i.memoizedState,m.parent!==c?(m={parent:c,cache:c},i.memoizedState=m,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=m),Mr(i,bt,c)):(c=y.cache,Mr(i,bt,c),c!==m.cache&&vc(i,[bt],s,!0))),Ut(n,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(l(156,i.tag))}function cr(n){n.flags|=4}function of(n,i,s,c,m){if((i=(n.mode&32)!==0)&&(i=!1),i){if(n.flags|=16777216,(m&335544128)===m)if(n.stateNode.complete)n.flags|=8192;else if(dy())n.flags|=8192;else throw _i=Ms,Ec}else n.flags&=-16777217}function Ug(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!tb(i))if(dy())n.flags|=8192;else throw _i=Ms,Ec}function Zs(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?xm():536870912,n.lanes|=i,gl|=i)}function ya(n,i){if(!Ve)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 c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function ot(n){var i=n.alternate!==null&&n.alternate.child===n.child,s=0,c=0;if(i)for(var m=n.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags&65011712,c|=m.flags&65011712,m.return=n,m=m.sibling;else for(m=n.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=n,m=m.sibling;return n.subtreeFlags|=c,n.childLanes=s,i}function SS(n,i,s){var c=i.pendingProps;switch(pc(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(i),null;case 1:return ot(i),null;case 3:return s=i.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),ar(bt),xe(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(n===null||n.child===null)&&(rl(i)?cr(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,yc())),ot(i),null;case 26:var m=i.type,y=i.memoizedState;return n===null?(cr(i),y!==null?(ot(i),Ug(i,y)):(ot(i),of(i,m,null,c,s))):y?y!==n.memoizedState?(cr(i),ot(i),Ug(i,y)):(ot(i),i.flags&=-16777217):(n=n.memoizedProps,n!==c&&cr(i),ot(i),of(i,m,n,c,s)),null;case 27:if(St(i),s=fe.current,m=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==c&&cr(i);else{if(!c){if(i.stateNode===null)throw Error(l(166));return ot(i),null}n=ue.current,rl(i)?xp(i):(n=Qy(m,c,s),i.stateNode=n,cr(i))}return ot(i),null;case 5:if(St(i),m=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==c&&cr(i);else{if(!c){if(i.stateNode===null)throw Error(l(166));return ot(i),null}if(y=ue.current,rl(i))xp(i);else{var _=ho(fe.current);switch(y){case 1:y=_.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:y=_.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":y=_.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":y=_.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":y=_.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof c.is=="string"?_.createElement("select",{is:c.is}):_.createElement("select"),c.multiple?y.multiple=!0:c.size&&(y.size=c.size);break;default:y=typeof c.is=="string"?_.createElement(m,{is:c.is}):_.createElement(m)}}y[It]=i,y[nn]=c;e:for(_=i.child;_!==null;){if(_.tag===5||_.tag===6)y.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===i)break e;for(;_.sibling===null;){if(_.return===null||_.return===i)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}i.stateNode=y;e:switch(Vt(y,m,c),m){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&cr(i)}}return ot(i),of(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,s),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==c&&cr(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(l(166));if(n=fe.current,rl(i)){if(n=i.stateNode,s=i.memoizedProps,c=null,m=Pt,m!==null)switch(m.tag){case 27:case 5:c=m.memoizedProps}n[It]=i,n=!!(n.nodeValue===s||c!==null&&c.suppressHydrationWarning===!0||zy(n.nodeValue,s)),n||Dr(i,!0)}else n=ho(n).createTextNode(c),n[It]=i,i.stateNode=n}return ot(i),null;case 31:if(s=i.memoizedState,n===null||n.memoizedState!==null){if(c=rl(i),s!==null){if(n===null){if(!c)throw Error(l(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(l(557));n[It]=i}else gi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;ot(i),n=!1}else s=yc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=s),n=!0;if(!n)return i.flags&256?(gn(i),i):(gn(i),null);if((i.flags&128)!==0)throw Error(l(558))}return ot(i),null;case 13:if(c=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(m=rl(i),c!==null&&c.dehydrated!==null){if(n===null){if(!m)throw Error(l(318));if(m=i.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(l(317));m[It]=i}else gi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;ot(i),m=!1}else m=yc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=m),m=!0;if(!m)return i.flags&256?(gn(i),i):(gn(i),null)}return gn(i),(i.flags&128)!==0?(i.lanes=s,i):(s=c!==null,n=n!==null&&n.memoizedState!==null,s&&(c=i.child,m=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(m=c.alternate.memoizedState.cachePool.pool),y=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(y=c.memoizedState.cachePool.pool),y!==m&&(c.flags|=2048)),s!==n&&s&&(i.child.flags|=8192),Zs(i,i.updateQueue),ot(i),null);case 4:return xe(),n===null&&Lf(i.stateNode.containerInfo),ot(i),null;case 10:return ar(i.type),ot(i),null;case 19:if(Q(mt),c=i.memoizedState,c===null)return ot(i),null;if(m=(i.flags&128)!==0,y=c.rendering,y===null)if(m)ya(c,!1);else{if(dt!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(y=Ps(n),y!==null){for(i.flags|=128,ya(c,!1),n=y.updateQueue,i.updateQueue=n,Zs(i,n),i.subtreeFlags=0,n=s,s=i.child;s!==null;)mp(s,n),s=s.sibling;return T(mt,mt.current&1|2),Ve&&ir(i,c.treeForkCount),i.child}n=n.sibling}c.tail!==null&&ht()>no&&(i.flags|=128,m=!0,ya(c,!1),i.lanes=4194304)}else{if(!m)if(n=Ps(y),n!==null){if(i.flags|=128,m=!0,n=n.updateQueue,i.updateQueue=n,Zs(i,n),ya(c,!0),c.tail===null&&c.tailMode==="hidden"&&!y.alternate&&!Ve)return ot(i),null}else 2*ht()-c.renderingStartTime>no&&s!==536870912&&(i.flags|=128,m=!0,ya(c,!1),i.lanes=4194304);c.isBackwards?(y.sibling=i.child,i.child=y):(n=c.last,n!==null?n.sibling=y:i.child=y,c.last=y)}return c.tail!==null?(n=c.tail,c.rendering=n,c.tail=n.sibling,c.renderingStartTime=ht(),n.sibling=null,s=mt.current,T(mt,m?s&1|2:s&1),Ve&&ir(i,c.treeForkCount),n):(ot(i),null);case 22:case 23:return gn(i),Lc(),c=i.memoizedState!==null,n!==null?n.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(s&536870912)!==0&&(i.flags&128)===0&&(ot(i),i.subtreeFlags&6&&(i.flags|=8192)):ot(i),s=i.updateQueue,s!==null&&Zs(i,s.retryQueue),s=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==s&&(i.flags|=2048),n!==null&&Q(xi),null;case 24:return s=null,n!==null&&(s=n.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),ar(bt),ot(i),null;case 25:return null;case 30:return null}throw Error(l(156,i.tag))}function ES(n,i){switch(pc(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return ar(bt),xe(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return St(i),null;case 31:if(i.memoizedState!==null){if(gn(i),i.alternate===null)throw Error(l(340));gi()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(gn(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(l(340));gi()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return Q(mt),null;case 4:return xe(),null;case 10:return ar(i.type),null;case 22:case 23:return gn(i),Lc(),n!==null&&Q(xi),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return ar(bt),null;case 25:return null;default:return null}}function Vg(n,i){switch(pc(i),i.tag){case 3:ar(bt),xe();break;case 26:case 27:case 5:St(i);break;case 4:xe();break;case 31:i.memoizedState!==null&&gn(i);break;case 13:gn(i);break;case 19:Q(mt);break;case 10:ar(i.type);break;case 22:case 23:gn(i),Lc(),n!==null&&Q(xi);break;case 24:ar(bt)}}function ba(n,i){try{var s=i.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var m=c.next;s=m;do{if((s.tag&n)===n){c=void 0;var y=s.create,_=s.inst;c=y(),_.destroy=c}s=s.next}while(s!==m)}}catch(S){Ke(i,i.return,S)}}function Ur(n,i,s){try{var c=i.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var y=m.next;c=y;do{if((c.tag&n)===n){var _=c.inst,S=_.destroy;if(S!==void 0){_.destroy=void 0,m=i;var D=s,V=S;try{V()}catch(K){Ke(m,D,K)}}}c=c.next}while(c!==y)}}catch(K){Ke(i,i.return,K)}}function Hg(n){var i=n.updateQueue;if(i!==null){var s=n.stateNode;try{Np(i,s)}catch(c){Ke(n,n.return,c)}}}function Gg(n,i,s){s.props=Ei(n.type,n.memoizedProps),s.state=n.memoizedState;try{s.componentWillUnmount()}catch(c){Ke(n,i,c)}}function xa(n,i){try{var s=n.ref;if(s!==null){switch(n.tag){case 26:case 27:case 5:var c=n.stateNode;break;case 30:c=n.stateNode;break;default:c=n.stateNode}typeof s=="function"?n.refCleanup=s(c):s.current=c}}catch(m){Ke(n,i,m)}}function Qn(n,i){var s=n.ref,c=n.refCleanup;if(s!==null)if(typeof c=="function")try{c()}catch(m){Ke(n,i,m)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){Ke(n,i,m)}else s.current=null}function Fg(n){var i=n.type,s=n.memoizedProps,c=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&c.focus();break e;case"img":s.src?c.src=s.src:s.srcSet&&(c.srcset=s.srcSet)}}catch(m){Ke(n,n.return,m)}}function uf(n,i,s){try{var c=n.stateNode;$S(c,n.type,s,i),c[nn]=i}catch(m){Ke(n,n.return,m)}}function qg(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Qr(n.type)||n.tag===4}function cf(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||qg(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&&Qr(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 ff(n,i,s){var c=n.tag;if(c===5||c===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=tr));else if(c!==4&&(c===27&&Qr(n.type)&&(s=n.stateNode,i=null),n=n.child,n!==null))for(ff(n,i,s),n=n.sibling;n!==null;)ff(n,i,s),n=n.sibling}function Js(n,i,s){var c=n.tag;if(c===5||c===6)n=n.stateNode,i?s.insertBefore(n,i):s.appendChild(n);else if(c!==4&&(c===27&&Qr(n.type)&&(s=n.stateNode),n=n.child,n!==null))for(Js(n,i,s),n=n.sibling;n!==null;)Js(n,i,s),n=n.sibling}function $g(n){var i=n.stateNode,s=n.memoizedProps;try{for(var c=n.type,m=i.attributes;m.length;)i.removeAttributeNode(m[0]);Vt(i,c,s),i[It]=n,i[nn]=s}catch(y){Ke(n,n.return,y)}}var fr=!1,_t=!1,df=!1,Qg=typeof WeakSet=="function"?WeakSet:Set,Dt=null;function CS(n,i){if(n=n.containerInfo,Df=vo,n=lp(n),ic(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var m=c.anchorOffset,y=c.focusNode;c=c.focusOffset;try{s.nodeType,y.nodeType}catch{s=null;break e}var _=0,S=-1,D=-1,V=0,K=0,ee=n,H=null;t:for(;;){for(var $;ee!==s||m!==0&&ee.nodeType!==3||(S=_+m),ee!==y||c!==0&&ee.nodeType!==3||(D=_+c),ee.nodeType===3&&(_+=ee.nodeValue.length),($=ee.firstChild)!==null;)H=ee,ee=$;for(;;){if(ee===n)break t;if(H===s&&++V===m&&(S=_),H===y&&++K===c&&(D=_),($=ee.nextSibling)!==null)break;ee=H,H=ee.parentNode}ee=$}s=S===-1||D===-1?null:{start:S,end:D}}else s=null}s=s||{start:0,end:0}}else s=null;for(Mf={focusedElem:n,selectionRange:s},vo=!1,Dt=i;Dt!==null;)if(i=Dt,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,Dt=n;else for(;Dt!==null;){switch(i=Dt,y=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++)m=n[s],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&y!==null){n=void 0,s=i,m=y.memoizedProps,y=y.memoizedState,c=s.stateNode;try{var pe=Ei(s.type,m);n=c.getSnapshotBeforeUpdate(pe,y),c.__reactInternalSnapshotBeforeUpdate=n}catch(Ee){Ke(s,s.return,Ee)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,s=n.nodeType,s===9)If(n);else if(s===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":If(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(l(163))}if(n=i.sibling,n!==null){n.return=i.return,Dt=n;break}Dt=i.return}}function Yg(n,i,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:hr(n,s),c&4&&ba(5,s);break;case 1:if(hr(n,s),c&4)if(n=s.stateNode,i===null)try{n.componentDidMount()}catch(_){Ke(s,s.return,_)}else{var m=Ei(s.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(m,i,n.__reactInternalSnapshotBeforeUpdate)}catch(_){Ke(s,s.return,_)}}c&64&&Hg(s),c&512&&xa(s,s.return);break;case 3:if(hr(n,s),c&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{Np(n,i)}catch(_){Ke(s,s.return,_)}}break;case 27:i===null&&c&4&&$g(s);case 26:case 5:hr(n,s),i===null&&c&4&&Fg(s),c&512&&xa(s,s.return);break;case 12:hr(n,s);break;case 31:hr(n,s),c&4&&Zg(n,s);break;case 13:hr(n,s),c&4&&Jg(n,s),c&64&&(n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(s=MS.bind(null,s),eE(n,s))));break;case 22:if(c=s.memoizedState!==null||fr,!c){i=i!==null&&i.memoizedState!==null||_t,m=fr;var y=_t;fr=c,(_t=i)&&!y?mr(n,s,(s.subtreeFlags&8772)!==0):hr(n,s),fr=m,_t=y}break;case 30:break;default:hr(n,s)}}function Xg(n){var i=n.alternate;i!==null&&(n.alternate=null,Xg(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&Vu(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 ut=null,ln=!1;function dr(n,i,s){for(s=s.child;s!==null;)Kg(n,i,s),s=s.sibling}function Kg(n,i,s){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount(zt,s)}catch{}switch(s.tag){case 26:_t||Qn(s,i),dr(n,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:_t||Qn(s,i);var c=ut,m=ln;Qr(s.type)&&(ut=s.stateNode,ln=!1),dr(n,i,s),Ta(s.stateNode),ut=c,ln=m;break;case 5:_t||Qn(s,i);case 6:if(c=ut,m=ln,ut=null,dr(n,i,s),ut=c,ln=m,ut!==null)if(ln)try{(ut.nodeType===9?ut.body:ut.nodeName==="HTML"?ut.ownerDocument.body:ut).removeChild(s.stateNode)}catch(y){Ke(s,i,y)}else try{ut.removeChild(s.stateNode)}catch(y){Ke(s,i,y)}break;case 18:ut!==null&&(ln?(n=ut,Hy(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,s.stateNode),El(n)):Hy(ut,s.stateNode));break;case 4:c=ut,m=ln,ut=s.stateNode.containerInfo,ln=!0,dr(n,i,s),ut=c,ln=m;break;case 0:case 11:case 14:case 15:Ur(2,s,i),_t||Ur(4,s,i),dr(n,i,s);break;case 1:_t||(Qn(s,i),c=s.stateNode,typeof c.componentWillUnmount=="function"&&Gg(s,i,c)),dr(n,i,s);break;case 21:dr(n,i,s);break;case 22:_t=(c=_t)||s.memoizedState!==null,dr(n,i,s),_t=c;break;default:dr(n,i,s)}}function Zg(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{El(n)}catch(s){Ke(i,i.return,s)}}}function Jg(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{El(n)}catch(s){Ke(i,i.return,s)}}function kS(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new Qg),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new Qg),i;default:throw Error(l(435,n.tag))}}function Ws(n,i){var s=kS(n);i.forEach(function(c){if(!s.has(c)){s.add(c);var m=jS.bind(null,n,c);c.then(m,m)}})}function an(n,i){var s=i.deletions;if(s!==null)for(var c=0;c<s.length;c++){var m=s[c],y=n,_=i,S=_;e:for(;S!==null;){switch(S.tag){case 27:if(Qr(S.type)){ut=S.stateNode,ln=!1;break e}break;case 5:ut=S.stateNode,ln=!1;break e;case 3:case 4:ut=S.stateNode.containerInfo,ln=!0;break e}S=S.return}if(ut===null)throw Error(l(160));Kg(y,_,m),ut=null,ln=!1,y=m.alternate,y!==null&&(y.return=null),m.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Wg(i,n),i=i.sibling}var Vn=null;function Wg(n,i){var s=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:an(i,n),sn(n),c&4&&(Ur(3,n,n.return),ba(3,n),Ur(5,n,n.return));break;case 1:an(i,n),sn(n),c&512&&(_t||s===null||Qn(s,s.return)),c&64&&fr&&(n=n.updateQueue,n!==null&&(c=n.callbacks,c!==null&&(s=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=s===null?c:s.concat(c))));break;case 26:var m=Vn;if(an(i,n),sn(n),c&512&&(_t||s===null||Qn(s,s.return)),c&4){var y=s!==null?s.memoizedState:null;if(c=n.memoizedState,s===null)if(c===null)if(n.stateNode===null){e:{c=n.type,s=n.memoizedProps,m=m.ownerDocument||m;t:switch(c){case"title":y=m.getElementsByTagName("title")[0],(!y||y[$l]||y[It]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=m.createElement(c),m.head.insertBefore(y,m.querySelector("head > title"))),Vt(y,c,s),y[It]=n,Nt(y),c=y;break e;case"link":var _=Wy("link","href",m).get(c+(s.href||""));if(_){for(var S=0;S<_.length;S++)if(y=_[S],y.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&y.getAttribute("rel")===(s.rel==null?null:s.rel)&&y.getAttribute("title")===(s.title==null?null:s.title)&&y.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){_.splice(S,1);break t}}y=m.createElement(c),Vt(y,c,s),m.head.appendChild(y);break;case"meta":if(_=Wy("meta","content",m).get(c+(s.content||""))){for(S=0;S<_.length;S++)if(y=_[S],y.getAttribute("content")===(s.content==null?null:""+s.content)&&y.getAttribute("name")===(s.name==null?null:s.name)&&y.getAttribute("property")===(s.property==null?null:s.property)&&y.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&y.getAttribute("charset")===(s.charSet==null?null:s.charSet)){_.splice(S,1);break t}}y=m.createElement(c),Vt(y,c,s),m.head.appendChild(y);break;default:throw Error(l(468,c))}y[It]=n,Nt(y),c=y}n.stateNode=c}else eb(m,n.type,n.stateNode);else n.stateNode=Jy(m,c,n.memoizedProps);else y!==c?(y===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):y.count--,c===null?eb(m,n.type,n.stateNode):Jy(m,c,n.memoizedProps)):c===null&&n.stateNode!==null&&uf(n,n.memoizedProps,s.memoizedProps)}break;case 27:an(i,n),sn(n),c&512&&(_t||s===null||Qn(s,s.return)),s!==null&&c&4&&uf(n,n.memoizedProps,s.memoizedProps);break;case 5:if(an(i,n),sn(n),c&512&&(_t||s===null||Qn(s,s.return)),n.flags&32){m=n.stateNode;try{Qi(m,"")}catch(pe){Ke(n,n.return,pe)}}c&4&&n.stateNode!=null&&(m=n.memoizedProps,uf(n,m,s!==null?s.memoizedProps:m)),c&1024&&(df=!0);break;case 6:if(an(i,n),sn(n),c&4){if(n.stateNode===null)throw Error(l(162));c=n.memoizedProps,s=n.stateNode;try{s.nodeValue=c}catch(pe){Ke(n,n.return,pe)}}break;case 3:if(go=null,m=Vn,Vn=mo(i.containerInfo),an(i,n),Vn=m,sn(n),c&4&&s!==null&&s.memoizedState.isDehydrated)try{El(i.containerInfo)}catch(pe){Ke(n,n.return,pe)}df&&(df=!1,ey(n));break;case 4:c=Vn,Vn=mo(n.stateNode.containerInfo),an(i,n),sn(n),Vn=c;break;case 12:an(i,n),sn(n);break;case 31:an(i,n),sn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Ws(n,c)));break;case 13:an(i,n),sn(n),n.child.flags&8192&&n.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(to=ht()),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Ws(n,c)));break;case 22:m=n.memoizedState!==null;var D=s!==null&&s.memoizedState!==null,V=fr,K=_t;if(fr=V||m,_t=K||D,an(i,n),_t=K,fr=V,sn(n),c&8192)e:for(i=n.stateNode,i._visibility=m?i._visibility&-2:i._visibility|1,m&&(s===null||D||fr||_t||Ci(n)),s=null,i=n;;){if(i.tag===5||i.tag===26){if(s===null){D=s=i;try{if(y=D.stateNode,m)_=y.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{S=D.stateNode;var ee=D.memoizedProps.style,H=ee!=null&&ee.hasOwnProperty("display")?ee.display:null;S.style.display=H==null||typeof H=="boolean"?"":(""+H).trim()}}catch(pe){Ke(D,D.return,pe)}}}else if(i.tag===6){if(s===null){D=i;try{D.stateNode.nodeValue=m?"":D.memoizedProps}catch(pe){Ke(D,D.return,pe)}}}else if(i.tag===18){if(s===null){D=i;try{var $=D.stateNode;m?Gy($,!0):Gy(D.stateNode,!1)}catch(pe){Ke(D,D.return,pe)}}}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}c&4&&(c=n.updateQueue,c!==null&&(s=c.retryQueue,s!==null&&(c.retryQueue=null,Ws(n,s))));break;case 19:an(i,n),sn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Ws(n,c)));break;case 30:break;case 21:break;default:an(i,n),sn(n)}}function sn(n){var i=n.flags;if(i&2){try{for(var s,c=n.return;c!==null;){if(qg(c)){s=c;break}c=c.return}if(s==null)throw Error(l(160));switch(s.tag){case 27:var m=s.stateNode,y=cf(n);Js(n,y,m);break;case 5:var _=s.stateNode;s.flags&32&&(Qi(_,""),s.flags&=-33);var S=cf(n);Js(n,S,_);break;case 3:case 4:var D=s.stateNode.containerInfo,V=cf(n);ff(n,V,D);break;default:throw Error(l(161))}}catch(K){Ke(n,n.return,K)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function ey(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;ey(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}function hr(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Yg(n,i.alternate,i),i=i.sibling}function Ci(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:Ur(4,i,i.return),Ci(i);break;case 1:Qn(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&Gg(i,i.return,s),Ci(i);break;case 27:Ta(i.stateNode);case 26:case 5:Qn(i,i.return),Ci(i);break;case 22:i.memoizedState===null&&Ci(i);break;case 30:Ci(i);break;default:Ci(i)}n=n.sibling}}function mr(n,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,m=n,y=i,_=y.flags;switch(y.tag){case 0:case 11:case 15:mr(m,y,s),ba(4,y);break;case 1:if(mr(m,y,s),c=y,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(V){Ke(c,c.return,V)}if(c=y,m=c.updateQueue,m!==null){var S=c.stateNode;try{var D=m.shared.hiddenCallbacks;if(D!==null)for(m.shared.hiddenCallbacks=null,m=0;m<D.length;m++)Op(D[m],S)}catch(V){Ke(c,c.return,V)}}s&&_&64&&Hg(y),xa(y,y.return);break;case 27:$g(y);case 26:case 5:mr(m,y,s),s&&c===null&&_&4&&Fg(y),xa(y,y.return);break;case 12:mr(m,y,s);break;case 31:mr(m,y,s),s&&_&4&&Zg(m,y);break;case 13:mr(m,y,s),s&&_&4&&Jg(m,y);break;case 22:y.memoizedState===null&&mr(m,y,s),xa(y,y.return);break;case 30:break;default:mr(m,y,s)}i=i.sibling}}function hf(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&&la(s))}function mf(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&la(n))}function Hn(n,i,s,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)ty(n,i,s,c),i=i.sibling}function ty(n,i,s,c){var m=i.flags;switch(i.tag){case 0:case 11:case 15:Hn(n,i,s,c),m&2048&&ba(9,i);break;case 1:Hn(n,i,s,c);break;case 3:Hn(n,i,s,c),m&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&la(n)));break;case 12:if(m&2048){Hn(n,i,s,c),n=i.stateNode;try{var y=i.memoizedProps,_=y.id,S=y.onPostCommit;typeof S=="function"&&S(_,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(D){Ke(i,i.return,D)}}else Hn(n,i,s,c);break;case 31:Hn(n,i,s,c);break;case 13:Hn(n,i,s,c);break;case 23:break;case 22:y=i.stateNode,_=i.alternate,i.memoizedState!==null?y._visibility&2?Hn(n,i,s,c):va(n,i):y._visibility&2?Hn(n,i,s,c):(y._visibility|=2,hl(n,i,s,c,(i.subtreeFlags&10256)!==0||!1)),m&2048&&hf(_,i);break;case 24:Hn(n,i,s,c),m&2048&&mf(i.alternate,i);break;default:Hn(n,i,s,c)}}function hl(n,i,s,c,m){for(m=m&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var y=n,_=i,S=s,D=c,V=_.flags;switch(_.tag){case 0:case 11:case 15:hl(y,_,S,D,m),ba(8,_);break;case 23:break;case 22:var K=_.stateNode;_.memoizedState!==null?K._visibility&2?hl(y,_,S,D,m):va(y,_):(K._visibility|=2,hl(y,_,S,D,m)),m&&V&2048&&hf(_.alternate,_);break;case 24:hl(y,_,S,D,m),m&&V&2048&&mf(_.alternate,_);break;default:hl(y,_,S,D,m)}i=i.sibling}}function va(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=n,c=i,m=c.flags;switch(c.tag){case 22:va(s,c),m&2048&&hf(c.alternate,c);break;case 24:va(s,c),m&2048&&mf(c.alternate,c);break;default:va(s,c)}i=i.sibling}}var _a=8192;function ml(n,i,s){if(n.subtreeFlags&_a)for(n=n.child;n!==null;)ny(n,i,s),n=n.sibling}function ny(n,i,s){switch(n.tag){case 26:ml(n,i,s),n.flags&_a&&n.memoizedState!==null&&dE(s,Vn,n.memoizedState,n.memoizedProps);break;case 5:ml(n,i,s);break;case 3:case 4:var c=Vn;Vn=mo(n.stateNode.containerInfo),ml(n,i,s),Vn=c;break;case 22:n.memoizedState===null&&(c=n.alternate,c!==null&&c.memoizedState!==null?(c=_a,_a=16777216,ml(n,i,s),_a=c):ml(n,i,s));break;default:ml(n,i,s)}}function ry(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 wa(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];Dt=c,ly(c,n)}ry(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)iy(n),n=n.sibling}function iy(n){switch(n.tag){case 0:case 11:case 15:wa(n),n.flags&2048&&Ur(9,n,n.return);break;case 3:wa(n);break;case 12:wa(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,eo(n)):wa(n);break;default:wa(n)}}function eo(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];Dt=c,ly(c,n)}ry(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:Ur(8,i,i.return),eo(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,eo(i));break;default:eo(i)}n=n.sibling}}function ly(n,i){for(;Dt!==null;){var s=Dt;switch(s.tag){case 0:case 11:case 15:Ur(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var c=s.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:la(s.memoizedState.cache)}if(c=s.child,c!==null)c.return=s,Dt=c;else e:for(s=n;Dt!==null;){c=Dt;var m=c.sibling,y=c.return;if(Xg(c),c===s){Dt=null;break e}if(m!==null){m.return=y,Dt=m;break e}Dt=y}}}var AS={getCacheForType:function(n){var i=Bt(bt),s=i.data.get(n);return s===void 0&&(s=n(),i.data.set(n,s)),s},cacheSignal:function(){return Bt(bt).controller.signal}},TS=typeof WeakMap=="function"?WeakMap:Map,Qe=0,nt=null,ze=null,Be=0,Xe=0,yn=null,Vr=!1,pl=!1,pf=!1,pr=0,dt=0,Hr=0,ki=0,gf=0,bn=0,gl=0,Sa=null,on=null,yf=!1,to=0,ay=0,no=1/0,ro=null,Gr=null,Ct=0,Fr=null,yl=null,gr=0,bf=0,xf=null,sy=null,Ea=0,vf=null;function xn(){return(Qe&2)!==0&&Be!==0?Be&-Be:z.T!==null?kf():Sm()}function oy(){if(bn===0)if((Be&536870912)===0||Ve){var n=Ft;Ft<<=1,(Ft&3932160)===0&&(Ft=262144),bn=n}else bn=536870912;return n=pn.current,n!==null&&(n.flags|=32),bn}function un(n,i,s){(n===nt&&(Xe===2||Xe===9)||n.cancelPendingCommit!==null)&&(bl(n,0),qr(n,Be,bn,!1)),ql(n,s),((Qe&2)===0||n!==nt)&&(n===nt&&((Qe&2)===0&&(ki|=s),dt===4&&qr(n,Be,bn,!1)),Yn(n))}function uy(n,i,s){if((Qe&6)!==0)throw Error(l(327));var c=!s&&(i&127)===0&&(i&n.expiredLanes)===0||Fl(n,i),m=c?OS(n,i):wf(n,i,!0),y=c;do{if(m===0){pl&&!c&&qr(n,i,0,!1);break}else{if(s=n.current.alternate,y&&!RS(s)){m=wf(n,i,!1),y=!1;continue}if(m===2){if(y=i,n.errorRecoveryDisabledLanes&y)var _=0;else _=n.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){i=_;e:{var S=n;m=Sa;var D=S.current.memoizedState.isDehydrated;if(D&&(bl(S,_).flags|=256),_=wf(S,_,!1),_!==2){if(pf&&!D){S.errorRecoveryDisabledLanes|=y,ki|=y,m=4;break e}y=on,on=m,y!==null&&(on===null?on=y:on.push.apply(on,y))}m=_}if(y=!1,m!==2)continue}}if(m===1){bl(n,0),qr(n,i,0,!0);break}e:{switch(c=n,y=m,y){case 0:case 1:throw Error(l(345));case 4:if((i&4194048)!==i)break;case 6:qr(c,i,bn,!Vr);break e;case 2:on=null;break;case 3:case 5:break;default:throw Error(l(329))}if((i&62914560)===i&&(m=to+300-ht(),10<m)){if(qr(c,i,bn,!Vr),Tr(c,0,!0)!==0)break e;gr=i,c.timeoutHandle=Uy(cy.bind(null,c,s,on,ro,yf,i,bn,ki,gl,Vr,y,"Throttled",-0,0),m);break e}cy(c,s,on,ro,yf,i,bn,ki,gl,Vr,y,null,-0,0)}}break}while(!0);Yn(n)}function cy(n,i,s,c,m,y,_,S,D,V,K,ee,H,$){if(n.timeoutHandle=-1,ee=i.subtreeFlags,ee&8192||(ee&16785408)===16785408){ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:tr},ny(i,y,ee);var pe=(y&62914560)===y?to-ht():(y&4194048)===y?ay-ht():0;if(pe=hE(ee,pe),pe!==null){gr=y,n.cancelPendingCommit=pe(by.bind(null,n,i,y,s,c,m,_,S,D,K,ee,null,H,$)),qr(n,y,_,!V);return}}by(n,i,y,s,c,m,_,S,D)}function RS(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 c=0;c<s.length;c++){var m=s[c],y=m.getSnapshot;m=m.value;try{if(!hn(y(),m))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 qr(n,i,s,c){i&=~gf,i&=~ki,n.suspendedLanes|=i,n.pingedLanes&=~i,c&&(n.warmLanes|=i),c=n.expirationTimes;for(var m=i;0<m;){var y=31-ae(m),_=1<<y;c[y]=-1,m&=~_}s!==0&&vm(n,s,i)}function io(){return(Qe&6)===0?(Ca(0),!1):!0}function _f(){if(ze!==null){if(Xe===0)var n=ze.return;else n=ze,lr=yi=null,zc(n),ol=null,sa=0,n=ze;for(;n!==null;)Vg(n.alternate,n),n=n.return;ze=null}}function bl(n,i){var s=n.timeoutHandle;s!==-1&&(n.timeoutHandle=-1,XS(s)),s=n.cancelPendingCommit,s!==null&&(n.cancelPendingCommit=null,s()),gr=0,_f(),nt=n,ze=s=rr(n.current,null),Be=i,Xe=0,yn=null,Vr=!1,pl=Fl(n,i),pf=!1,gl=bn=gf=ki=Hr=dt=0,on=Sa=null,yf=!1,(i&8)!==0&&(i|=i&32);var c=n.entangledLanes;if(c!==0)for(n=n.entanglements,c&=i;0<c;){var m=31-ae(c),y=1<<m;i|=n[m],c&=~y}return pr=i,Cs(),s}function fy(n,i){Re=null,z.H=pa,i===sl||i===Ds?(i=Ap(),Xe=3):i===Ec?(i=Ap(),Xe=4):Xe=i===Jc?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,yn=i,ze===null&&(dt=1,Qs(n,An(i,n.current)))}function dy(){var n=pn.current;return n===null?!0:(Be&4194048)===Be?On===null:(Be&62914560)===Be||(Be&536870912)!==0?n===On:!1}function hy(){var n=z.H;return z.H=pa,n===null?pa:n}function my(){var n=z.A;return z.A=AS,n}function lo(){dt=4,Vr||(Be&4194048)!==Be&&pn.current!==null||(pl=!0),(Hr&134217727)===0&&(ki&134217727)===0||nt===null||qr(nt,Be,bn,!1)}function wf(n,i,s){var c=Qe;Qe|=2;var m=hy(),y=my();(nt!==n||Be!==i)&&(ro=null,bl(n,i)),i=!1;var _=dt;e:do try{if(Xe!==0&&ze!==null){var S=ze,D=yn;switch(Xe){case 8:_f(),_=6;break e;case 3:case 2:case 9:case 6:pn.current===null&&(i=!0);var V=Xe;if(Xe=0,yn=null,xl(n,S,D,V),s&&pl){_=0;break e}break;default:V=Xe,Xe=0,yn=null,xl(n,S,D,V)}}LS(),_=dt;break}catch(K){fy(n,K)}while(!0);return i&&n.shellSuspendCounter++,lr=yi=null,Qe=c,z.H=m,z.A=y,ze===null&&(nt=null,Be=0,Cs()),_}function LS(){for(;ze!==null;)py(ze)}function OS(n,i){var s=Qe;Qe|=2;var c=hy(),m=my();nt!==n||Be!==i?(ro=null,no=ht()+500,bl(n,i)):pl=Fl(n,i);e:do try{if(Xe!==0&&ze!==null){i=ze;var y=yn;t:switch(Xe){case 1:Xe=0,yn=null,xl(n,i,y,1);break;case 2:case 9:if(Cp(y)){Xe=0,yn=null,gy(i);break}i=function(){Xe!==2&&Xe!==9||nt!==n||(Xe=7),Yn(n)},y.then(i,i);break e;case 3:Xe=7;break e;case 4:Xe=5;break e;case 7:Cp(y)?(Xe=0,yn=null,gy(i)):(Xe=0,yn=null,xl(n,i,y,7));break;case 5:var _=null;switch(ze.tag){case 26:_=ze.memoizedState;case 5:case 27:var S=ze;if(_?tb(_):S.stateNode.complete){Xe=0,yn=null;var D=S.sibling;if(D!==null)ze=D;else{var V=S.return;V!==null?(ze=V,ao(V)):ze=null}break t}}Xe=0,yn=null,xl(n,i,y,5);break;case 6:Xe=0,yn=null,xl(n,i,y,6);break;case 8:_f(),dt=6;break e;default:throw Error(l(462))}}NS();break}catch(K){fy(n,K)}while(!0);return lr=yi=null,z.H=c,z.A=m,Qe=s,ze!==null?0:(nt=null,Be=0,Cs(),dt)}function NS(){for(;ze!==null&&!Gl();)py(ze)}function py(n){var i=Bg(n.alternate,n,pr);n.memoizedProps=n.pendingProps,i===null?ao(n):ze=i}function gy(n){var i=n,s=i.alternate;switch(i.tag){case 15:case 0:i=Dg(s,i,i.pendingProps,i.type,void 0,Be);break;case 11:i=Dg(s,i,i.pendingProps,i.type.render,i.ref,Be);break;case 5:zc(i);default:Vg(s,i),i=ze=mp(i,pr),i=Bg(s,i,pr)}n.memoizedProps=n.pendingProps,i===null?ao(n):ze=i}function xl(n,i,s,c){lr=yi=null,zc(i),ol=null,sa=0;var m=i.return;try{if(vS(n,m,i,s,Be)){dt=1,Qs(n,An(s,n.current)),ze=null;return}}catch(y){if(m!==null)throw ze=m,y;dt=1,Qs(n,An(s,n.current)),ze=null;return}i.flags&32768?(Ve||c===1?n=!0:pl||(Be&536870912)!==0?n=!1:(Vr=n=!0,(c===2||c===9||c===3||c===6)&&(c=pn.current,c!==null&&c.tag===13&&(c.flags|=16384))),yy(i,n)):ao(i)}function ao(n){var i=n;do{if((i.flags&32768)!==0){yy(i,Vr);return}n=i.return;var s=SS(i.alternate,i,pr);if(s!==null){ze=s;return}if(i=i.sibling,i!==null){ze=i;return}ze=i=n}while(i!==null);dt===0&&(dt=5)}function yy(n,i){do{var s=ES(n.alternate,n);if(s!==null){s.flags&=32767,ze=s;return}if(s=n.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(n=n.sibling,n!==null)){ze=n;return}ze=n=s}while(n!==null);dt=6,ze=null}function by(n,i,s,c,m,y,_,S,D){n.cancelPendingCommit=null;do so();while(Ct!==0);if((Qe&6)!==0)throw Error(l(327));if(i!==null){if(i===n.current)throw Error(l(177));if(y=i.lanes|i.childLanes,y|=uc,fw(n,s,y,_,S,D),n===nt&&(ze=nt=null,Be=0),yl=i,Fr=n,gr=s,bf=y,xf=m,sy=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,zS(we,function(){return Sy(),null})):(n.callbackNode=null,n.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=z.T,z.T=null,m=J.p,J.p=2,_=Qe,Qe|=4;try{CS(n,i,s)}finally{Qe=_,J.p=m,z.T=c}}Ct=1,xy(),vy(),_y()}}function xy(){if(Ct===1){Ct=0;var n=Fr,i=yl,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=z.T,z.T=null;var c=J.p;J.p=2;var m=Qe;Qe|=4;try{Wg(i,n);var y=Mf,_=lp(n.containerInfo),S=y.focusedElem,D=y.selectionRange;if(_!==S&&S&&S.ownerDocument&&ip(S.ownerDocument.documentElement,S)){if(D!==null&&ic(S)){var V=D.start,K=D.end;if(K===void 0&&(K=V),"selectionStart"in S)S.selectionStart=V,S.selectionEnd=Math.min(K,S.value.length);else{var ee=S.ownerDocument||document,H=ee&&ee.defaultView||window;if(H.getSelection){var $=H.getSelection(),pe=S.textContent.length,Ee=Math.min(D.start,pe),et=D.end===void 0?Ee:Math.min(D.end,pe);!$.extend&&Ee>et&&(_=et,et=Ee,Ee=_);var I=rp(S,Ee),M=rp(S,et);if(I&&M&&($.rangeCount!==1||$.anchorNode!==I.node||$.anchorOffset!==I.offset||$.focusNode!==M.node||$.focusOffset!==M.offset)){var U=ee.createRange();U.setStart(I.node,I.offset),$.removeAllRanges(),Ee>et?($.addRange(U),$.extend(M.node,M.offset)):(U.setEnd(M.node,M.offset),$.addRange(U))}}}}for(ee=[],$=S;$=$.parentNode;)$.nodeType===1&&ee.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<ee.length;S++){var W=ee[S];W.element.scrollLeft=W.left,W.element.scrollTop=W.top}}vo=!!Df,Mf=Df=null}finally{Qe=m,J.p=c,z.T=s}}n.current=i,Ct=2}}function vy(){if(Ct===2){Ct=0;var n=Fr,i=yl,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=z.T,z.T=null;var c=J.p;J.p=2;var m=Qe;Qe|=4;try{Yg(n,i.alternate,i)}finally{Qe=m,J.p=c,z.T=s}}Ct=3}}function _y(){if(Ct===4||Ct===3){Ct=0,Ui();var n=Fr,i=yl,s=gr,c=sy;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Ct=5:(Ct=0,yl=Fr=null,wy(n,n.pendingLanes));var m=n.pendingLanes;if(m===0&&(Gr=null),Bu(s),i=i.stateNode,ct&&typeof ct.onCommitFiberRoot=="function")try{ct.onCommitFiberRoot(zt,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=z.T,m=J.p,J.p=2,z.T=null;try{for(var y=n.onRecoverableError,_=0;_<c.length;_++){var S=c[_];y(S.value,{componentStack:S.stack})}}finally{z.T=i,J.p=m}}(gr&3)!==0&&so(),Yn(n),m=n.pendingLanes,(s&261930)!==0&&(m&42)!==0?n===vf?Ea++:(Ea=0,vf=n):Ea=0,Ca(0)}}function wy(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,la(i)))}function so(){return xy(),vy(),_y(),Sy()}function Sy(){if(Ct!==5)return!1;var n=Fr,i=bf;bf=0;var s=Bu(gr),c=z.T,m=J.p;try{J.p=32>s?32:s,z.T=null,s=xf,xf=null;var y=Fr,_=gr;if(Ct=0,yl=Fr=null,gr=0,(Qe&6)!==0)throw Error(l(331));var S=Qe;if(Qe|=4,iy(y.current),ty(y,y.current,_,s),Qe=S,Ca(0,!1),ct&&typeof ct.onPostCommitFiberRoot=="function")try{ct.onPostCommitFiberRoot(zt,y)}catch{}return!0}finally{J.p=m,z.T=c,wy(n,i)}}function Ey(n,i,s){i=An(s,i),i=Zc(n.stateNode,i,2),n=Ir(n,i,2),n!==null&&(ql(n,2),Yn(n))}function Ke(n,i,s){if(n.tag===3)Ey(n,n,s);else for(;i!==null;){if(i.tag===3){Ey(i,n,s);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Gr===null||!Gr.has(c))){n=An(s,n),s=Cg(2),c=Ir(i,s,2),c!==null&&(kg(s,c,i,n),ql(c,2),Yn(c));break}}i=i.return}}function Sf(n,i,s){var c=n.pingCache;if(c===null){c=n.pingCache=new TS;var m=new Set;c.set(i,m)}else m=c.get(i),m===void 0&&(m=new Set,c.set(i,m));m.has(s)||(pf=!0,m.add(s),n=DS.bind(null,n,i,s),i.then(n,n))}function DS(n,i,s){var c=n.pingCache;c!==null&&c.delete(i),n.pingedLanes|=n.suspendedLanes&s,n.warmLanes&=~s,nt===n&&(Be&s)===s&&(dt===4||dt===3&&(Be&62914560)===Be&&300>ht()-to?(Qe&2)===0&&bl(n,0):gf|=s,gl===Be&&(gl=0)),Yn(n)}function Cy(n,i){i===0&&(i=xm()),n=mi(n,i),n!==null&&(ql(n,i),Yn(n))}function MS(n){var i=n.memoizedState,s=0;i!==null&&(s=i.retryLane),Cy(n,s)}function jS(n,i){var s=0;switch(n.tag){case 31:case 13:var c=n.stateNode,m=n.memoizedState;m!==null&&(s=m.retryLane);break;case 19:c=n.stateNode;break;case 22:c=n.stateNode._retryCache;break;default:throw Error(l(314))}c!==null&&c.delete(i),Cy(n,s)}function zS(n,i){return Sn(n,i)}var oo=null,vl=null,Ef=!1,uo=!1,Cf=!1,$r=0;function Yn(n){n!==vl&&n.next===null&&(vl===null?oo=vl=n:vl=vl.next=n),uo=!0,Ef||(Ef=!0,PS())}function Ca(n,i){if(!Cf&&uo){Cf=!0;do for(var s=!1,c=oo;c!==null;){if(n!==0){var m=c.pendingLanes;if(m===0)var y=0;else{var _=c.suspendedLanes,S=c.pingedLanes;y=(1<<31-ae(42|n)+1)-1,y&=m&~(_&~S),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(s=!0,Ry(c,y))}else y=Be,y=Tr(c,c===nt?y:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(y&3)===0||Fl(c,y)||(s=!0,Ry(c,y));c=c.next}while(s);Cf=!1}}function IS(){ky()}function ky(){uo=Ef=!1;var n=0;$r!==0&&YS()&&(n=$r);for(var i=ht(),s=null,c=oo;c!==null;){var m=c.next,y=Ay(c,i);y===0?(c.next=null,s===null?oo=m:s.next=m,m===null&&(vl=s)):(s=c,(n!==0||(y&3)!==0)&&(uo=!0)),c=m}Ct!==0&&Ct!==5||Ca(n),$r!==0&&($r=0)}function Ay(n,i){for(var s=n.suspendedLanes,c=n.pingedLanes,m=n.expirationTimes,y=n.pendingLanes&-62914561;0<y;){var _=31-ae(y),S=1<<_,D=m[_];D===-1?((S&s)===0||(S&c)!==0)&&(m[_]=cw(S,i)):D<=i&&(n.expiredLanes|=S),y&=~S}if(i=nt,s=Be,s=Tr(n,n===i?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c=n.callbackNode,s===0||n===i&&(Xe===2||Xe===9)||n.cancelPendingCommit!==null)return c!==null&&c!==null&&Ar(c),n.callbackNode=null,n.callbackPriority=0;if((s&3)===0||Fl(n,s)){if(i=s&-s,i===n.callbackPriority)return i;switch(c!==null&&Ar(c),Bu(s)){case 2:case 8:s=ce;break;case 32:s=we;break;case 268435456:s=Fe;break;default:s=we}return c=Ty.bind(null,n),s=Sn(s,c),n.callbackPriority=i,n.callbackNode=s,i}return c!==null&&c!==null&&Ar(c),n.callbackPriority=2,n.callbackNode=null,2}function Ty(n,i){if(Ct!==0&&Ct!==5)return n.callbackNode=null,n.callbackPriority=0,null;var s=n.callbackNode;if(so()&&n.callbackNode!==s)return null;var c=Be;return c=Tr(n,n===nt?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c===0?null:(uy(n,c,i),Ay(n,ht()),n.callbackNode!=null&&n.callbackNode===s?Ty.bind(null,n):null)}function Ry(n,i){if(so())return null;uy(n,i,!0)}function PS(){KS(function(){(Qe&6)!==0?Sn(Z,IS):ky()})}function kf(){if($r===0){var n=ll;n===0&&(n=Ze,Ze<<=1,(Ze&261888)===0&&(Ze=256)),$r=n}return $r}function Ly(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:ys(""+n)}function Oy(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 BS(n,i,s,c,m){if(i==="submit"&&s&&s.stateNode===m){var y=Ly((m[nn]||null).action),_=c.submitter;_&&(i=(i=_[nn]||null)?Ly(i.formAction):_.getAttribute("formAction"),i!==null&&(y=i,_=null));var S=new _s("action","action",null,c,m);n.push({event:S,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if($r!==0){var D=_?Oy(m,_):new FormData(m);qc(s,{pending:!0,data:D,method:m.method,action:y},null,D)}}else typeof y=="function"&&(S.preventDefault(),D=_?Oy(m,_):new FormData(m),qc(s,{pending:!0,data:D,method:m.method,action:y},y,D))},currentTarget:m}]})}}for(var Af=0;Af<oc.length;Af++){var Tf=oc[Af],US=Tf.toLowerCase(),VS=Tf[0].toUpperCase()+Tf.slice(1);Un(US,"on"+VS)}Un(op,"onAnimationEnd"),Un(up,"onAnimationIteration"),Un(cp,"onAnimationStart"),Un("dblclick","onDoubleClick"),Un("focusin","onFocus"),Un("focusout","onBlur"),Un(rS,"onTransitionRun"),Un(iS,"onTransitionStart"),Un(lS,"onTransitionCancel"),Un(fp,"onTransitionEnd"),qi("onMouseEnter",["mouseout","mouseover"]),qi("onMouseLeave",["mouseout","mouseover"]),qi("onPointerEnter",["pointerout","pointerover"]),qi("onPointerLeave",["pointerout","pointerover"]),ci("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ci("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ci("onBeforeInput",["compositionend","keypress","textInput","paste"]),ci("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ci("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ci("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ka="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(" "),HS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ka));function Ny(n,i){i=(i&4)!==0;for(var s=0;s<n.length;s++){var c=n[s],m=c.event;c=c.listeners;e:{var y=void 0;if(i)for(var _=c.length-1;0<=_;_--){var S=c[_],D=S.instance,V=S.currentTarget;if(S=S.listener,D!==y&&m.isPropagationStopped())break e;y=S,m.currentTarget=V;try{y(m)}catch(K){Es(K)}m.currentTarget=null,y=D}else for(_=0;_<c.length;_++){if(S=c[_],D=S.instance,V=S.currentTarget,S=S.listener,D!==y&&m.isPropagationStopped())break e;y=S,m.currentTarget=V;try{y(m)}catch(K){Es(K)}m.currentTarget=null,y=D}}}}function Ie(n,i){var s=i[Uu];s===void 0&&(s=i[Uu]=new Set);var c=n+"__bubble";s.has(c)||(Dy(i,n,2,!1),s.add(c))}function Rf(n,i,s){var c=0;i&&(c|=4),Dy(s,n,c,i)}var co="_reactListening"+Math.random().toString(36).slice(2);function Lf(n){if(!n[co]){n[co]=!0,km.forEach(function(s){s!=="selectionchange"&&(HS.has(s)||Rf(s,!1,n),Rf(s,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[co]||(i[co]=!0,Rf("selectionchange",!1,i))}}function Dy(n,i,s,c){switch(ob(i)){case 2:var m=gE;break;case 8:m=yE;break;default:m=qf}s=m.bind(null,i,s,n),m=void 0,!Xu||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),c?m!==void 0?n.addEventListener(i,s,{capture:!0,passive:m}):n.addEventListener(i,s,!0):m!==void 0?n.addEventListener(i,s,{passive:m}):n.addEventListener(i,s,!1)}function Of(n,i,s,c,m){var y=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var _=c.tag;if(_===3||_===4){var S=c.stateNode.containerInfo;if(S===m)break;if(_===4)for(_=c.return;_!==null;){var D=_.tag;if((D===3||D===4)&&_.stateNode.containerInfo===m)return;_=_.return}for(;S!==null;){if(_=Hi(S),_===null)return;if(D=_.tag,D===5||D===6||D===26||D===27){c=y=_;continue e}S=S.parentNode}}c=c.return}Pm(function(){var V=y,K=Qu(s),ee=[];e:{var H=dp.get(n);if(H!==void 0){var $=_s,pe=n;switch(n){case"keypress":if(xs(s)===0)break e;case"keydown":case"keyup":$=jw;break;case"focusin":pe="focus",$=Wu;break;case"focusout":pe="blur",$=Wu;break;case"beforeblur":case"afterblur":$=Wu;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":$=Vm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=Sw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=Pw;break;case op:case up:case cp:$=kw;break;case fp:$=Uw;break;case"scroll":case"scrollend":$=_w;break;case"wheel":$=Hw;break;case"copy":case"cut":case"paste":$=Tw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=Gm;break;case"toggle":case"beforetoggle":$=Fw}var Ee=(i&4)!==0,et=!Ee&&(n==="scroll"||n==="scrollend"),I=Ee?H!==null?H+"Capture":null:H;Ee=[];for(var M=V,U;M!==null;){var W=M;if(U=W.stateNode,W=W.tag,W!==5&&W!==26&&W!==27||U===null||I===null||(W=Yl(M,I),W!=null&&Ee.push(Aa(M,W,U))),et)break;M=M.return}0<Ee.length&&(H=new $(H,pe,null,s,K),ee.push({event:H,listeners:Ee}))}}if((i&7)===0){e:{if(H=n==="mouseover"||n==="pointerover",$=n==="mouseout"||n==="pointerout",H&&s!==$u&&(pe=s.relatedTarget||s.fromElement)&&(Hi(pe)||pe[Vi]))break e;if(($||H)&&(H=K.window===K?K:(H=K.ownerDocument)?H.defaultView||H.parentWindow:window,$?(pe=s.relatedTarget||s.toElement,$=V,pe=pe?Hi(pe):null,pe!==null&&(et=o(pe),Ee=pe.tag,pe!==et||Ee!==5&&Ee!==27&&Ee!==6)&&(pe=null)):($=null,pe=V),$!==pe)){if(Ee=Vm,W="onMouseLeave",I="onMouseEnter",M="mouse",(n==="pointerout"||n==="pointerover")&&(Ee=Gm,W="onPointerLeave",I="onPointerEnter",M="pointer"),et=$==null?H:Ql($),U=pe==null?H:Ql(pe),H=new Ee(W,M+"leave",$,s,K),H.target=et,H.relatedTarget=U,W=null,Hi(K)===V&&(Ee=new Ee(I,M+"enter",pe,s,K),Ee.target=U,Ee.relatedTarget=et,W=Ee),et=W,$&&pe)t:{for(Ee=GS,I=$,M=pe,U=0,W=I;W;W=Ee(W))U++;W=0;for(var ve=M;ve;ve=Ee(ve))W++;for(;0<U-W;)I=Ee(I),U--;for(;0<W-U;)M=Ee(M),W--;for(;U--;){if(I===M||M!==null&&I===M.alternate){Ee=I;break t}I=Ee(I),M=Ee(M)}Ee=null}else Ee=null;$!==null&&My(ee,H,$,Ee,!1),pe!==null&&et!==null&&My(ee,et,pe,Ee,!0)}}e:{if(H=V?Ql(V):window,$=H.nodeName&&H.nodeName.toLowerCase(),$==="select"||$==="input"&&H.type==="file")var qe=Zm;else if(Xm(H))if(Jm)qe=eS;else{qe=Jw;var be=Zw}else $=H.nodeName,!$||$.toLowerCase()!=="input"||H.type!=="checkbox"&&H.type!=="radio"?V&&qu(V.elementType)&&(qe=Zm):qe=Ww;if(qe&&(qe=qe(n,V))){Km(ee,qe,s,K);break e}be&&be(n,H,V),n==="focusout"&&V&&H.type==="number"&&V.memoizedProps.value!=null&&Fu(H,"number",H.value)}switch(be=V?Ql(V):window,n){case"focusin":(Xm(be)||be.contentEditable==="true")&&(Zi=be,lc=V,na=null);break;case"focusout":na=lc=Zi=null;break;case"mousedown":ac=!0;break;case"contextmenu":case"mouseup":case"dragend":ac=!1,ap(ee,s,K);break;case"selectionchange":if(nS)break;case"keydown":case"keyup":ap(ee,s,K)}var Oe;if(tc)e:{switch(n){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Ki?Qm(n,s)&&(Ue="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(Ue="onCompositionStart");Ue&&(Fm&&s.locale!=="ko"&&(Ki||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Ki&&(Oe=Bm()):(Lr=K,Ku="value"in Lr?Lr.value:Lr.textContent,Ki=!0)),be=fo(V,Ue),0<be.length&&(Ue=new Hm(Ue,n,null,s,K),ee.push({event:Ue,listeners:be}),Oe?Ue.data=Oe:(Oe=Ym(s),Oe!==null&&(Ue.data=Oe)))),(Oe=$w?Qw(n,s):Yw(n,s))&&(Ue=fo(V,"onBeforeInput"),0<Ue.length&&(be=new Hm("onBeforeInput","beforeinput",null,s,K),ee.push({event:be,listeners:Ue}),be.data=Oe)),BS(ee,n,V,s,K)}Ny(ee,i)})}function Aa(n,i,s){return{instance:n,listener:i,currentTarget:s}}function fo(n,i){for(var s=i+"Capture",c=[];n!==null;){var m=n,y=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||y===null||(m=Yl(n,s),m!=null&&c.unshift(Aa(n,m,y)),m=Yl(n,i),m!=null&&c.push(Aa(n,m,y))),n.tag===3)return c;n=n.return}return[]}function GS(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function My(n,i,s,c,m){for(var y=i._reactName,_=[];s!==null&&s!==c;){var S=s,D=S.alternate,V=S.stateNode;if(S=S.tag,D!==null&&D===c)break;S!==5&&S!==26&&S!==27||V===null||(D=V,m?(V=Yl(s,y),V!=null&&_.unshift(Aa(s,V,D))):m||(V=Yl(s,y),V!=null&&_.push(Aa(s,V,D)))),s=s.return}_.length!==0&&n.push({event:i,listeners:_})}var FS=/\r\n?/g,qS=/\u0000|\uFFFD/g;function jy(n){return(typeof n=="string"?n:""+n).replace(FS,`
|
|
10
|
+
`).replace(qS,"")}function zy(n,i){return i=jy(i),jy(n)===i}function We(n,i,s,c,m,y){switch(s){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||Qi(n,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&Qi(n,""+c);break;case"className":ps(n,"class",c);break;case"tabIndex":ps(n,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":ps(n,s,c);break;case"style":zm(n,c,y);break;case"data":if(i!=="object"){ps(n,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||s!=="href")){n.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(s);break}c=ys(""+c),n.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="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 y=="function"&&(s==="formAction"?(i!=="input"&&We(n,i,"name",m.name,m,null),We(n,i,"formEncType",m.formEncType,m,null),We(n,i,"formMethod",m.formMethod,m,null),We(n,i,"formTarget",m.formTarget,m,null)):(We(n,i,"encType",m.encType,m,null),We(n,i,"method",m.method,m,null),We(n,i,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(s);break}c=ys(""+c),n.setAttribute(s,c);break;case"onClick":c!=null&&(n.onclick=tr);break;case"onScroll":c!=null&&Ie("scroll",n);break;case"onScrollEnd":c!=null&&Ie("scrollend",n);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(l(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(l(60));n.innerHTML=s}}break;case"multiple":n.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":n.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){n.removeAttribute("xlink:href");break}s=ys(""+c),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":c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(s,""+c):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":c&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(s,""):n.removeAttribute(s);break;case"capture":case"download":c===!0?n.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(s,c):n.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?n.setAttribute(s,c):n.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?n.removeAttribute(s):n.setAttribute(s,c);break;case"popover":Ie("beforetoggle",n),Ie("toggle",n),ms(n,"popover",c);break;case"xlinkActuate":er(n,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":er(n,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":er(n,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":er(n,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":er(n,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":er(n,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":er(n,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":er(n,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":er(n,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":ms(n,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=xw.get(s)||s,ms(n,s,c))}}function Nf(n,i,s,c,m,y){switch(s){case"style":zm(n,c,y);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(l(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(l(60));n.innerHTML=s}}break;case"children":typeof c=="string"?Qi(n,c):(typeof c=="number"||typeof c=="bigint")&&Qi(n,""+c);break;case"onScroll":c!=null&&Ie("scroll",n);break;case"onScrollEnd":c!=null&&Ie("scrollend",n);break;case"onClick":c!=null&&(n.onclick=tr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Am.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),i=s.slice(2,m?s.length-7:void 0),y=n[nn]||null,y=y!=null?y[s]:null,typeof y=="function"&&n.removeEventListener(i,y,m),typeof c=="function")){typeof y!="function"&&y!==null&&(s in n?n[s]=null:n.hasAttribute(s)&&n.removeAttribute(s)),n.addEventListener(i,c,m);break e}s in n?n[s]=c:c===!0?n.setAttribute(s,""):ms(n,s,c)}}}function Vt(n,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",n),Ie("load",n);var c=!1,m=!1,y;for(y in s)if(s.hasOwnProperty(y)){var _=s[y];if(_!=null)switch(y){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:We(n,i,y,_,s,null)}}m&&We(n,i,"srcSet",s.srcSet,s,null),c&&We(n,i,"src",s.src,s,null);return;case"input":Ie("invalid",n);var S=y=_=m=null,D=null,V=null;for(c in s)if(s.hasOwnProperty(c)){var K=s[c];if(K!=null)switch(c){case"name":m=K;break;case"type":_=K;break;case"checked":D=K;break;case"defaultChecked":V=K;break;case"value":y=K;break;case"defaultValue":S=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(l(137,i));break;default:We(n,i,c,K,s,null)}}Nm(n,y,S,D,V,_,m,!1);return;case"select":Ie("invalid",n),c=_=y=null;for(m in s)if(s.hasOwnProperty(m)&&(S=s[m],S!=null))switch(m){case"value":y=S;break;case"defaultValue":_=S;break;case"multiple":c=S;default:We(n,i,m,S,s,null)}i=y,s=_,n.multiple=!!c,i!=null?$i(n,!!c,i,!1):s!=null&&$i(n,!!c,s,!0);return;case"textarea":Ie("invalid",n),y=m=c=null;for(_ in s)if(s.hasOwnProperty(_)&&(S=s[_],S!=null))switch(_){case"value":c=S;break;case"defaultValue":m=S;break;case"children":y=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(l(91));break;default:We(n,i,_,S,s,null)}Mm(n,c,m,y);return;case"option":for(D in s)s.hasOwnProperty(D)&&(c=s[D],c!=null)&&(D==="selected"?n.selected=c&&typeof c!="function"&&typeof c!="symbol":We(n,i,D,c,s,null));return;case"dialog":Ie("beforetoggle",n),Ie("toggle",n),Ie("cancel",n),Ie("close",n);break;case"iframe":case"object":Ie("load",n);break;case"video":case"audio":for(c=0;c<ka.length;c++)Ie(ka[c],n);break;case"image":Ie("error",n),Ie("load",n);break;case"details":Ie("toggle",n);break;case"embed":case"source":case"link":Ie("error",n),Ie("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(V in s)if(s.hasOwnProperty(V)&&(c=s[V],c!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:We(n,i,V,c,s,null)}return;default:if(qu(i)){for(K in s)s.hasOwnProperty(K)&&(c=s[K],c!==void 0&&Nf(n,i,K,c,s,void 0));return}}for(S in s)s.hasOwnProperty(S)&&(c=s[S],c!=null&&We(n,i,S,c,s,null))}function $S(n,i,s,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,y=null,_=null,S=null,D=null,V=null,K=null;for($ in s){var ee=s[$];if(s.hasOwnProperty($)&&ee!=null)switch($){case"checked":break;case"value":break;case"defaultValue":D=ee;default:c.hasOwnProperty($)||We(n,i,$,null,c,ee)}}for(var H in c){var $=c[H];if(ee=s[H],c.hasOwnProperty(H)&&($!=null||ee!=null))switch(H){case"type":y=$;break;case"name":m=$;break;case"checked":V=$;break;case"defaultChecked":K=$;break;case"value":_=$;break;case"defaultValue":S=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(l(137,i));break;default:$!==ee&&We(n,i,H,$,c,ee)}}Gu(n,_,S,D,V,K,y,m);return;case"select":$=_=S=H=null;for(y in s)if(D=s[y],s.hasOwnProperty(y)&&D!=null)switch(y){case"value":break;case"multiple":$=D;default:c.hasOwnProperty(y)||We(n,i,y,null,c,D)}for(m in c)if(y=c[m],D=s[m],c.hasOwnProperty(m)&&(y!=null||D!=null))switch(m){case"value":H=y;break;case"defaultValue":S=y;break;case"multiple":_=y;default:y!==D&&We(n,i,m,y,c,D)}i=S,s=_,c=$,H!=null?$i(n,!!s,H,!1):!!c!=!!s&&(i!=null?$i(n,!!s,i,!0):$i(n,!!s,s?[]:"",!1));return;case"textarea":$=H=null;for(S in s)if(m=s[S],s.hasOwnProperty(S)&&m!=null&&!c.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:We(n,i,S,null,c,m)}for(_ in c)if(m=c[_],y=s[_],c.hasOwnProperty(_)&&(m!=null||y!=null))switch(_){case"value":H=m;break;case"defaultValue":$=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(l(91));break;default:m!==y&&We(n,i,_,m,c,y)}Dm(n,H,$);return;case"option":for(var pe in s)H=s[pe],s.hasOwnProperty(pe)&&H!=null&&!c.hasOwnProperty(pe)&&(pe==="selected"?n.selected=!1:We(n,i,pe,null,c,H));for(D in c)H=c[D],$=s[D],c.hasOwnProperty(D)&&H!==$&&(H!=null||$!=null)&&(D==="selected"?n.selected=H&&typeof H!="function"&&typeof H!="symbol":We(n,i,D,H,c,$));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 Ee in s)H=s[Ee],s.hasOwnProperty(Ee)&&H!=null&&!c.hasOwnProperty(Ee)&&We(n,i,Ee,null,c,H);for(V in c)if(H=c[V],$=s[V],c.hasOwnProperty(V)&&H!==$&&(H!=null||$!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(l(137,i));break;default:We(n,i,V,H,c,$)}return;default:if(qu(i)){for(var et in s)H=s[et],s.hasOwnProperty(et)&&H!==void 0&&!c.hasOwnProperty(et)&&Nf(n,i,et,void 0,c,H);for(K in c)H=c[K],$=s[K],!c.hasOwnProperty(K)||H===$||H===void 0&&$===void 0||Nf(n,i,K,H,c,$);return}}for(var I in s)H=s[I],s.hasOwnProperty(I)&&H!=null&&!c.hasOwnProperty(I)&&We(n,i,I,null,c,H);for(ee in c)H=c[ee],$=s[ee],!c.hasOwnProperty(ee)||H===$||H==null&&$==null||We(n,i,ee,H,c,$)}function Iy(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function QS(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,s=performance.getEntriesByType("resource"),c=0;c<s.length;c++){var m=s[c],y=m.transferSize,_=m.initiatorType,S=m.duration;if(y&&S&&Iy(_)){for(_=0,S=m.responseEnd,c+=1;c<s.length;c++){var D=s[c],V=D.startTime;if(V>S)break;var K=D.transferSize,ee=D.initiatorType;K&&Iy(ee)&&(D=D.responseEnd,_+=K*(D<S?1:(S-V)/(D-V)))}if(--c,i+=8*(y+_)/(m.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 Df=null,Mf=null;function ho(n){return n.nodeType===9?n:n.ownerDocument}function Py(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 By(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 jf(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 zf=null;function YS(){var n=window.event;return n&&n.type==="popstate"?n===zf?!1:(zf=n,!0):(zf=null,!1)}var Uy=typeof setTimeout=="function"?setTimeout:void 0,XS=typeof clearTimeout=="function"?clearTimeout:void 0,Vy=typeof Promise=="function"?Promise:void 0,KS=typeof queueMicrotask=="function"?queueMicrotask:typeof Vy<"u"?function(n){return Vy.resolve(null).then(n).catch(ZS)}:Uy;function ZS(n){setTimeout(function(){throw n})}function Qr(n){return n==="head"}function Hy(n,i){var s=i,c=0;do{var m=s.nextSibling;if(n.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(c===0){n.removeChild(m),El(i);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")Ta(n.ownerDocument.documentElement);else if(s==="head"){s=n.ownerDocument.head,Ta(s);for(var y=s.firstChild;y;){var _=y.nextSibling,S=y.nodeName;y[$l]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&y.rel.toLowerCase()==="stylesheet"||s.removeChild(y),y=_}}else s==="body"&&Ta(n.ownerDocument.body);s=m}while(s);El(i)}function Gy(n,i){var s=n;n=0;do{var c=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(n===0)break;n--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||n++;s=c}while(s)}function If(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":If(s),Vu(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}n.removeChild(s)}}function JS(n,i,s,c){for(;n.nodeType===1;){var m=s;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(c){if(!n[$l])switch(i){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(y=n.getAttribute("rel"),y==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(y!==m.rel||n.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||n.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||n.getAttribute("title")!==(m.title==null?null:m.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(y=n.getAttribute("src"),(y!==(m.src==null?null:m.src)||n.getAttribute("type")!==(m.type==null?null:m.type)||n.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&y&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(i==="input"&&n.type==="hidden"){var y=m.name==null?null:""+m.name;if(m.type==="hidden"&&n.getAttribute("name")===y)return n}else return n;if(n=Nn(n.nextSibling),n===null)break}return null}function WS(n,i,s){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=Nn(n.nextSibling),n===null))return null;return n}function Fy(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Nn(n.nextSibling),n===null))return null;return n}function Pf(n){return n.data==="$?"||n.data==="$~"}function Bf(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function eE(n,i){var s=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||s.readyState!=="loading")i();else{var c=function(){i(),s.removeEventListener("DOMContentLoaded",c)};s.addEventListener("DOMContentLoaded",c),n._reactRetry=c}}function Nn(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 Uf=null;function qy(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"||s==="/&"){if(i===0)return Nn(n.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}n=n.nextSibling}return null}function $y(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 Qy(n,i,s){switch(i=ho(s),n){case"html":if(n=i.documentElement,!n)throw Error(l(452));return n;case"head":if(n=i.head,!n)throw Error(l(453));return n;case"body":if(n=i.body,!n)throw Error(l(454));return n;default:throw Error(l(451))}}function Ta(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);Vu(n)}var Dn=new Map,Yy=new Set;function mo(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var yr=J.d;J.d={f:tE,r:nE,D:rE,C:iE,L:lE,m:aE,X:oE,S:sE,M:uE};function tE(){var n=yr.f(),i=io();return n||i}function nE(n){var i=Gi(n);i!==null&&i.tag===5&&i.type==="form"?fg(i):yr.r(n)}var _l=typeof document>"u"?null:document;function Xy(n,i,s){var c=_l;if(c&&typeof i=="string"&&i){var m=Cn(i);m='link[rel="'+n+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),Yy.has(m)||(Yy.add(m),n={rel:n,crossOrigin:s,href:i},c.querySelector(m)===null&&(i=c.createElement("link"),Vt(i,"link",n),Nt(i),c.head.appendChild(i)))}}function rE(n){yr.D(n),Xy("dns-prefetch",n,null)}function iE(n,i){yr.C(n,i),Xy("preconnect",n,i)}function lE(n,i,s){yr.L(n,i,s);var c=_l;if(c&&n&&i){var m='link[rel="preload"][as="'+Cn(i)+'"]';i==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Cn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Cn(s.imageSizes)+'"]')):m+='[href="'+Cn(n)+'"]';var y=m;switch(i){case"style":y=wl(n);break;case"script":y=Sl(n)}Dn.has(y)||(n=p({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:n,as:i},s),Dn.set(y,n),c.querySelector(m)!==null||i==="style"&&c.querySelector(Ra(y))||i==="script"&&c.querySelector(La(y))||(i=c.createElement("link"),Vt(i,"link",n),Nt(i),c.head.appendChild(i)))}}function aE(n,i){yr.m(n,i);var s=_l;if(s&&n){var c=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+Cn(c)+'"][href="'+Cn(n)+'"]',y=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Sl(n)}if(!Dn.has(y)&&(n=p({rel:"modulepreload",href:n},i),Dn.set(y,n),s.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(La(y)))return}c=s.createElement("link"),Vt(c,"link",n),Nt(c),s.head.appendChild(c)}}}function sE(n,i,s){yr.S(n,i,s);var c=_l;if(c&&n){var m=Fi(c).hoistableStyles,y=wl(n);i=i||"default";var _=m.get(y);if(!_){var S={loading:0,preload:null};if(_=c.querySelector(Ra(y)))S.loading=5;else{n=p({rel:"stylesheet",href:n,"data-precedence":i},s),(s=Dn.get(y))&&Vf(n,s);var D=_=c.createElement("link");Nt(D),Vt(D,"link",n),D._p=new Promise(function(V,K){D.onload=V,D.onerror=K}),D.addEventListener("load",function(){S.loading|=1}),D.addEventListener("error",function(){S.loading|=2}),S.loading|=4,po(_,i,c)}_={type:"stylesheet",instance:_,count:1,state:S},m.set(y,_)}}}function oE(n,i){yr.X(n,i);var s=_l;if(s&&n){var c=Fi(s).hoistableScripts,m=Sl(n),y=c.get(m);y||(y=s.querySelector(La(m)),y||(n=p({src:n,async:!0},i),(i=Dn.get(m))&&Hf(n,i),y=s.createElement("script"),Nt(y),Vt(y,"link",n),s.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(m,y))}}function uE(n,i){yr.M(n,i);var s=_l;if(s&&n){var c=Fi(s).hoistableScripts,m=Sl(n),y=c.get(m);y||(y=s.querySelector(La(m)),y||(n=p({src:n,async:!0,type:"module"},i),(i=Dn.get(m))&&Hf(n,i),y=s.createElement("script"),Nt(y),Vt(y,"link",n),s.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(m,y))}}function Ky(n,i,s,c){var m=(m=fe.current)?mo(m):null;if(!m)throw Error(l(446));switch(n){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=wl(s.href),s=Fi(m).hoistableStyles,c=s.get(i),c||(c={type:"style",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){n=wl(s.href);var y=Fi(m).hoistableStyles,_=y.get(n);if(_||(m=m.ownerDocument||m,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(n,_),(y=m.querySelector(Ra(n)))&&!y._p&&(_.instance=y,_.state.loading=5),Dn.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},Dn.set(n,s),y||cE(m,n,s,_.state))),i&&c===null)throw Error(l(528,""));return _}if(i&&c!==null)throw Error(l(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Sl(s),s=Fi(m).hoistableScripts,c=s.get(i),c||(c={type:"script",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,n))}}function wl(n){return'href="'+Cn(n)+'"'}function Ra(n){return'link[rel="stylesheet"]['+n+"]"}function Zy(n){return p({},n,{"data-precedence":n.precedence,precedence:null})}function cE(n,i,s,c){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=n.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),Vt(i,"link",s),Nt(i),n.head.appendChild(i))}function Sl(n){return'[src="'+Cn(n)+'"]'}function La(n){return"script[async]"+n}function Jy(n,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var c=n.querySelector('style[data-href~="'+Cn(s.href)+'"]');if(c)return i.instance=c,Nt(c),c;var m=p({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return c=(n.ownerDocument||n).createElement("style"),Nt(c),Vt(c,"style",m),po(c,s.precedence,n),i.instance=c;case"stylesheet":m=wl(s.href);var y=n.querySelector(Ra(m));if(y)return i.state.loading|=4,i.instance=y,Nt(y),y;c=Zy(s),(m=Dn.get(m))&&Vf(c,m),y=(n.ownerDocument||n).createElement("link"),Nt(y);var _=y;return _._p=new Promise(function(S,D){_.onload=S,_.onerror=D}),Vt(y,"link",c),i.state.loading|=4,po(y,s.precedence,n),i.instance=y;case"script":return y=Sl(s.src),(m=n.querySelector(La(y)))?(i.instance=m,Nt(m),m):(c=s,(m=Dn.get(y))&&(c=p({},s),Hf(c,m)),n=n.ownerDocument||n,m=n.createElement("script"),Nt(m),Vt(m,"link",c),n.head.appendChild(m),i.instance=m);case"void":return null;default:throw Error(l(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,po(c,s.precedence,n));return i.instance}function po(n,i,s){for(var c=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,y=m,_=0;_<c.length;_++){var S=c[_];if(S.dataset.precedence===i)y=S;else if(y!==m)break}y?y.parentNode.insertBefore(n,y.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(n,i.firstChild))}function Vf(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.title==null&&(n.title=i.title)}function Hf(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.integrity==null&&(n.integrity=i.integrity)}var go=null;function Wy(n,i,s){if(go===null){var c=new Map,m=go=new Map;m.set(s,c)}else m=go,c=m.get(s),c||(c=new Map,m.set(s,c));if(c.has(n))return c;for(c.set(n,null),s=s.getElementsByTagName(n),m=0;m<s.length;m++){var y=s[m];if(!(y[$l]||y[It]||n==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var _=y.getAttribute(i)||"";_=n+_;var S=c.get(_);S?S.push(y):c.set(_,[y])}}return c}function eb(n,i,s){n=n.ownerDocument||n,n.head.insertBefore(s,i==="title"?n.querySelector("head > title"):null)}function fE(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;return i.rel==="stylesheet"?(n=i.disabled,typeof i.precedence=="string"&&n==null):!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 tb(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function dE(n,i,s,c){if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=wl(c.href),y=i.querySelector(Ra(m));if(y){i=y._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=yo.bind(n),i.then(n,n)),s.state.loading|=4,s.instance=y,Nt(y);return}y=i.ownerDocument||i,c=Zy(c),(m=Dn.get(m))&&Vf(c,m),y=y.createElement("link"),Nt(y);var _=y;_._p=new Promise(function(S,D){_.onload=S,_.onerror=D}),Vt(y,"link",c),s.instance=y}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(n.count++,s=yo.bind(n),i.addEventListener("load",s),i.addEventListener("error",s))}}var Gf=0;function hE(n,i){return n.stylesheets&&n.count===0&&xo(n,n.stylesheets),0<n.count||0<n.imgCount?function(s){var c=setTimeout(function(){if(n.stylesheets&&xo(n,n.stylesheets),n.unsuspend){var y=n.unsuspend;n.unsuspend=null,y()}},6e4+i);0<n.imgBytes&&Gf===0&&(Gf=62500*QS());var m=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&xo(n,n.stylesheets),n.unsuspend)){var y=n.unsuspend;n.unsuspend=null,y()}},(n.imgBytes>Gf?50:800)+i);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function yo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xo(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var bo=null;function xo(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,bo=new Map,i.forEach(mE,n),bo=null,yo.call(n))}function mE(n,i){if(!(i.state.loading&4)){var s=bo.get(n);if(s)var c=s.get(null);else{s=new Map,bo.set(n,s);for(var m=n.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<m.length;y++){var _=m[y];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(s.set(_.dataset.precedence,_),c=_)}c&&s.set(null,c)}m=i.instance,_=m.getAttribute("data-precedence"),y=s.get(_)||c,y===c&&s.set(null,m),s.set(_,m),this.count++,c=yo.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),y?y.parentNode.insertBefore(m,y.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(m,n.firstChild)),i.state.loading|=4}}var Oa={$$typeof:O,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function pE(n,i,s,c,m,y,_,S,D){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=Iu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Iu(0),this.hiddenUpdates=Iu(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=y,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=D,this.incompleteTransitions=new Map}function nb(n,i,s,c,m,y,_,S,D,V,K,ee){return n=new pE(n,i,s,_,D,V,K,ee,S),i=1,y===!0&&(i|=24),y=mn(3,null,null,i),n.current=y,y.stateNode=n,i=_c(),i.refCount++,n.pooledCache=i,i.refCount++,y.memoizedState={element:c,isDehydrated:s,cache:i},Cc(y),n}function rb(n){return n?(n=el,n):el}function ib(n,i,s,c,m,y){m=rb(m),c.context===null?c.context=m:c.pendingContext=m,c=zr(i),c.payload={element:s},y=y===void 0?null:y,y!==null&&(c.callback=y),s=Ir(n,c,i),s!==null&&(un(s,n,i),ua(s,n,i))}function lb(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<i?s:i}}function Ff(n,i){lb(n,i),(n=n.alternate)&&lb(n,i)}function ab(n){if(n.tag===13||n.tag===31){var i=mi(n,67108864);i!==null&&un(i,n,67108864),Ff(n,67108864)}}function sb(n){if(n.tag===13||n.tag===31){var i=xn();i=Pu(i);var s=mi(n,i);s!==null&&un(s,n,i),Ff(n,i)}}var vo=!0;function gE(n,i,s,c){var m=z.T;z.T=null;var y=J.p;try{J.p=2,qf(n,i,s,c)}finally{J.p=y,z.T=m}}function yE(n,i,s,c){var m=z.T;z.T=null;var y=J.p;try{J.p=8,qf(n,i,s,c)}finally{J.p=y,z.T=m}}function qf(n,i,s,c){if(vo){var m=$f(c);if(m===null)Of(n,i,c,_o,s),ub(n,c);else if(xE(m,n,i,s,c))c.stopPropagation();else if(ub(n,c),i&4&&-1<bE.indexOf(n)){for(;m!==null;){var y=Gi(m);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var _=Bn(y.pendingLanes);if(_!==0){var S=y;for(S.pendingLanes|=2,S.entangledLanes|=2;_;){var D=1<<31-ae(_);S.entanglements[1]|=D,_&=~D}Yn(y),(Qe&6)===0&&(no=ht()+500,Ca(0))}}break;case 31:case 13:S=mi(y,2),S!==null&&un(S,y,2),io(),Ff(y,2)}if(y=$f(c),y===null&&Of(n,i,c,_o,s),y===m)break;m=y}m!==null&&c.stopPropagation()}else Of(n,i,c,null,s)}}function $f(n){return n=Qu(n),Qf(n)}var _o=null;function Qf(n){if(_o=null,n=Hi(n),n!==null){var i=o(n);if(i===null)n=null;else{var s=i.tag;if(s===13){if(n=u(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 _o=n,null}function ob(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(ui()){case Z:return 2;case ce:return 8;case we:case Le:return 32;case Fe:return 268435456;default:return 32}default:return 32}}var Yf=!1,Yr=null,Xr=null,Kr=null,Na=new Map,Da=new Map,Zr=[],bE="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 ub(n,i){switch(n){case"focusin":case"focusout":Yr=null;break;case"dragenter":case"dragleave":Xr=null;break;case"mouseover":case"mouseout":Kr=null;break;case"pointerover":case"pointerout":Na.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Da.delete(i.pointerId)}}function Ma(n,i,s,c,m,y){return n===null||n.nativeEvent!==y?(n={blockedOn:i,domEventName:s,eventSystemFlags:c,nativeEvent:y,targetContainers:[m]},i!==null&&(i=Gi(i),i!==null&&ab(i)),n):(n.eventSystemFlags|=c,i=n.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),n)}function xE(n,i,s,c,m){switch(i){case"focusin":return Yr=Ma(Yr,n,i,s,c,m),!0;case"dragenter":return Xr=Ma(Xr,n,i,s,c,m),!0;case"mouseover":return Kr=Ma(Kr,n,i,s,c,m),!0;case"pointerover":var y=m.pointerId;return Na.set(y,Ma(Na.get(y)||null,n,i,s,c,m)),!0;case"gotpointercapture":return y=m.pointerId,Da.set(y,Ma(Da.get(y)||null,n,i,s,c,m)),!0}return!1}function cb(n){var i=Hi(n.target);if(i!==null){var s=o(i);if(s!==null){if(i=s.tag,i===13){if(i=u(s),i!==null){n.blockedOn=i,Em(n.priority,function(){sb(s)});return}}else if(i===31){if(i=f(s),i!==null){n.blockedOn=i,Em(n.priority,function(){sb(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 wo(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var s=$f(n.nativeEvent);if(s===null){s=n.nativeEvent;var c=new s.constructor(s.type,s);$u=c,s.target.dispatchEvent(c),$u=null}else return i=Gi(s),i!==null&&ab(i),n.blockedOn=s,!1;i.shift()}return!0}function fb(n,i,s){wo(n)&&s.delete(i)}function vE(){Yf=!1,Yr!==null&&wo(Yr)&&(Yr=null),Xr!==null&&wo(Xr)&&(Xr=null),Kr!==null&&wo(Kr)&&(Kr=null),Na.forEach(fb),Da.forEach(fb)}function So(n,i){n.blockedOn===i&&(n.blockedOn=null,Yf||(Yf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,vE)))}var Eo=null;function db(n){Eo!==n&&(Eo=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Eo===n&&(Eo=null);for(var i=0;i<n.length;i+=3){var s=n[i],c=n[i+1],m=n[i+2];if(typeof c!="function"){if(Qf(c||s)===null)continue;break}var y=Gi(s);y!==null&&(n.splice(i,3),i-=3,qc(y,{pending:!0,data:m,method:s.method,action:c},c,m))}}))}function El(n){function i(D){return So(D,n)}Yr!==null&&So(Yr,n),Xr!==null&&So(Xr,n),Kr!==null&&So(Kr,n),Na.forEach(i),Da.forEach(i);for(var s=0;s<Zr.length;s++){var c=Zr[s];c.blockedOn===n&&(c.blockedOn=null)}for(;0<Zr.length&&(s=Zr[0],s.blockedOn===null);)cb(s),s.blockedOn===null&&Zr.shift();if(s=(n.ownerDocument||n).$$reactFormReplay,s!=null)for(c=0;c<s.length;c+=3){var m=s[c],y=s[c+1],_=m[nn]||null;if(typeof y=="function")_||db(s);else if(_){var S=null;if(y&&y.hasAttribute("formAction")){if(m=y,_=y[nn]||null)S=_.formAction;else if(Qf(m)!==null)continue}else S=_.action;typeof S=="function"?s[c+1]=S:(s.splice(c,3),c-=3),db(s)}}}function hb(){function n(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(_){return m=_})},focusReset:"manual",scroll:"manual"})}function i(){m!==null&&(m(),m=null),c||setTimeout(s,20)}function s(){if(!c&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,m=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){c=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),m!==null&&(m(),m=null)}}}function Xf(n){this._internalRoot=n}Co.prototype.render=Xf.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(l(409));var s=i.current,c=xn();ib(s,c,n,i,null,null)},Co.prototype.unmount=Xf.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),io(),i[Vi]=null}};function Co(n){this._internalRoot=n}Co.prototype.unstable_scheduleHydration=function(n){if(n){var i=Sm();n={blockedOn:null,target:n,priority:i};for(var s=0;s<Zr.length&&i!==0&&i<Zr[s].priority;s++);Zr.splice(s,0,n),s===0&&cb(n)}};var mb=t.version;if(mb!=="19.2.4")throw Error(l(527,mb,"19.2.4"));J.findDOMNode=function(n){var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(l(188)):(n=Object.keys(n).join(","),Error(l(268,n)));return n=h(i),n=n!==null?g(n):null,n=n===null?null:n.stateNode,n};var _E={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ko=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ko.isDisabled&&ko.supportsFiber)try{zt=ko.inject(_E),ct=ko}catch{}}return za.createRoot=function(n,i){if(!a(n))throw Error(l(299));var s=!1,c="",m=_g,y=wg,_=Sg;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(y=i.onCaughtError),i.onRecoverableError!==void 0&&(_=i.onRecoverableError)),i=nb(n,1,!1,null,null,s,c,null,m,y,_,hb),n[Vi]=i.current,Lf(n),new Xf(i)},za.hydrateRoot=function(n,i,s){if(!a(n))throw Error(l(299));var c=!1,m="",y=_g,_=wg,S=Sg,D=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(y=s.onUncaughtError),s.onCaughtError!==void 0&&(_=s.onCaughtError),s.onRecoverableError!==void 0&&(S=s.onRecoverableError),s.formState!==void 0&&(D=s.formState)),i=nb(n,1,!0,i,s??null,c,m,D,y,_,S,hb),i.context=rb(null),s=i.current,c=xn(),c=Pu(c),m=zr(c),m.callback=null,Ir(s,m,c),s=c,i.current.lanes=s,ql(i,s),Yn(i),n[Vi]=i.current,Lf(n),new Co(i)},za.version="19.2.4",za}var Eb;function OE(){if(Eb)return Jf.exports;Eb=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(),Jf.exports=LE(),Jf.exports}var NE=OE();const DE=gu(NE);var ls=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(){}},ME={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},jE=class{#e=ME;#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)}},Ni=new jE;function zE(e){setTimeout(e,0)}var ji=typeof window>"u"||"Deno"in globalThis;function fn(){}function IE(e,t){return typeof e=="function"?e(t):e}function Ud(e){return typeof e=="number"&&e>=0&&e!==1/0}function Bx(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ii(e,t){return typeof e=="function"?e(t):e}function jn(e,t){return typeof e=="function"?e(t):e}function Cb(e,t){const{type:r="all",exact:l,fetchStatus:a,predicate:o,queryKey:u,stale:f}=e;if(u){if(l){if(t.queryHash!==Ah(u,t.options))return!1}else if(!Za(t.queryKey,u))return!1}if(r!=="all"){const d=t.isActive();if(r==="active"&&!d||r==="inactive"&&d)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||a&&a!==t.state.fetchStatus||o&&!o(t))}function kb(e,t){const{exact:r,status:l,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Ka(t.options.mutationKey)!==Ka(o))return!1}else if(!Za(t.options.mutationKey,o))return!1}return!(l&&t.state.status!==l||a&&!a(t))}function Ah(e,t){return(t?.queryKeyHashFn||Ka)(e)}function Ka(e){return JSON.stringify(e,(t,r)=>Hd(r)?Object.keys(r).sort().reduce((l,a)=>(l[a]=r[a],l),{}):r)}function Za(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Za(e[r],t[r])):!1}var PE=Object.prototype.hasOwnProperty;function Ux(e,t,r=0){if(e===t)return e;if(r>500)return t;const l=Ab(e)&&Ab(t);if(!l&&!(Hd(e)&&Hd(t)))return t;const o=(l?e:Object.keys(e)).length,u=l?t:Object.keys(t),f=u.length,d=l?new Array(f):{};let h=0;for(let g=0;g<f;g++){const p=l?g:u[g],b=e[p],x=t[p];if(b===x){d[p]=b,(l?g<o:PE.call(e,p))&&h++;continue}if(b===null||x===null||typeof b!="object"||typeof x!="object"){d[p]=x;continue}const w=Ux(b,x,r+1);d[p]=w,w===b&&h++}return o===f&&h===o?e:d}function Vd(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 Ab(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Hd(e){if(!Tb(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Tb(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Tb(e){return Object.prototype.toString.call(e)==="[object Object]"}function BE(e){return new Promise(t=>{Ni.setTimeout(t,e)})}function Gd(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Ux(e,t):t}function UE(e,t,r=0){const l=[...e,t];return r&&l.length>r?l.slice(1):l}function VE(e,t,r=0){const l=[t,...e];return r&&l.length>r?l.slice(0,-1):l}var Th=Symbol();function Vx(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Th?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Hx(e,t){return typeof e=="function"?e(...t):!!e}function HE(e,t,r){let l=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??=t(),l||(l=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),e}var GE=class extends ls{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!ji&&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"}},Rh=new GE;function Fd(){let e,t;const r=new Promise((a,o)=>{e=a,t=o});r.status="pending",r.catch(()=>{});function l(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{l({status:"fulfilled",value:a}),e(a)},r.reject=a=>{l({status:"rejected",reason:a}),t(a)},r}var FE=zE;function qE(){let e=[],t=0,r=f=>{f()},l=f=>{f()},a=FE;const o=f=>{t?e.push(f):a(()=>{r(f)})},u=()=>{const f=e;e=[],f.length&&a(()=>{l(()=>{f.forEach(d=>{r(d)})})})};return{batch:f=>{let d;t++;try{d=f()}finally{t--,t||u()}return d},batchCalls:f=>(...d)=>{o(()=>{f(...d)})},schedule:o,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{l=f},setScheduler:f=>{a=f}}}var Ht=qE(),$E=class extends ls{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!ji&&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}},Ko=new $E;function QE(e){return Math.min(1e3*2**e,3e4)}function Gx(e){return(e??"online")==="online"?Ko.isOnline():!0}var qd=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Fx(e){let t=!1,r=0,l;const a=Fd(),o=()=>a.status!=="pending",u=E=>{if(!o()){const R=new qd(E);b(R),e.onCancel?.(R)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>Rh.isFocused()&&(e.networkMode==="always"||Ko.isOnline())&&e.canRun(),g=()=>Gx(e.networkMode)&&e.canRun(),p=E=>{o()||(l?.(),a.resolve(E))},b=E=>{o()||(l?.(),a.reject(E))},x=()=>new Promise(E=>{l=R=>{(o()||h())&&E(R)},e.onPause?.()}).then(()=>{l=void 0,o()||e.onContinue?.()}),w=()=>{if(o())return;let E;const R=r===0?e.initialPromise:void 0;try{E=R??e.fn()}catch(C){E=Promise.reject(C)}Promise.resolve(E).then(p).catch(C=>{if(o())return;const L=e.retry??(ji?0:3),O=e.retryDelay??QE,B=typeof O=="function"?O(r,C):O,Y=L===!0||typeof L=="number"&&r<L||typeof L=="function"&&L(r,C);if(t||!Y){b(C);return}r++,e.onFail?.(r,C),BE(B).then(()=>h()?void 0:x()).then(()=>{t?b(C):w()})})};return{promise:a,status:()=>a.status,cancel:u,continue:()=>(l?.(),a),cancelRetry:f,continueRetry:d,canStart:g,start:()=>(g()?w():x().then(w),a)}}var qx=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ud(this.gcTime)&&(this.#e=Ni.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ji?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ni.clearTimeout(this.#e),this.#e=void 0)}},YE=class extends qx{#e;#t;#n;#i;#r;#a;#s;constructor(e){super(),this.#s=!1,this.#a=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=Lb(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.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Lb(this.options);t.data!==void 0&&(this.setState(Rb(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const r=Gd(this.state.data,e,this.options);return this.#l({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#l({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(fn).catch(fn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>jn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Th||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ii(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:!Bx(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.#s?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.#l({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(d=>d.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,l=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#s=!0,r.signal)})},a=()=>{const f=Vx(this.options,t),h=(()=>{const g={client:this.#i,queryKey:this.queryKey,meta:this.meta};return l(g),g})();return this.#s=!1,this.options.persister?this.options.persister(f,h,this):f(h)},u=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:a};return l(f),f})();this.options.behavior?.onFetch(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#l({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=Fx({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:f=>{f instanceof qd&&f.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(f,d)=>{this.#l({type:"failed",failureCount:f,error:d})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.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 qd){if(f.silent)return this.#r.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#l({type:"error",error:f}),this.#n.config.onError?.(f,this),this.#n.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#l(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,...$x(r.data,this.options),fetchMeta:e.meta??null};case"success":const l={...r,...Rb(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?l:void 0,l;case"error":const a=e.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),Ht.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function $x(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Gx(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Rb(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Lb(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,l=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?l??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var XE=class extends ls{constructor(e,t){super(),this.options=t,this.#e=e,this.#l=null,this.#s=Fd(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#a;#s;#l;#p;#d;#h;#u;#c;#o;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ob(this.#t,this.options)?this.#f():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return $d(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return $d(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#_(),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 jn(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&&!Vd(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const l=this.hasListeners();l&&Nb(this.#t,r,this.options,t)&&this.#f(),this.updateResult(),l&&(this.#t!==r||jn(this.options.enabled,this.#t)!==jn(t.enabled,this.#t)||ii(this.options.staleTime,this.#t)!==ii(t.staleTime,this.#t))&&this.#g();const a=this.#y();l&&(this.#t!==r||jn(this.options.enabled,this.#t)!==jn(t.enabled,this.#t)||a!==this.#o)&&this.#b(a)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(t,e);return ZE(this,r)&&(this.#i=r,this.#a=this.options,this.#r=this.#t.state),r}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(r,l)=>(this.trackProp(l),t?.(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,l))})}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.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#f(e){this.#w();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(fn)),t}#g(){this.#v();const e=ii(this.options.staleTime,this.#t);if(ji||this.#i.isStale||!Ud(e))return;const r=Bx(this.#i.dataUpdatedAt,e)+1;this.#u=Ni.setTimeout(()=>{this.#i.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#b(e){this.#_(),this.#o=e,!(ji||jn(this.options.enabled,this.#t)===!1||!Ud(this.#o)||this.#o===0)&&(this.#c=Ni.setInterval(()=>{(this.options.refetchIntervalInBackground||Rh.isFocused())&&this.#f()},this.#o))}#x(){this.#g(),this.#b(this.#y())}#v(){this.#u&&(Ni.clearTimeout(this.#u),this.#u=void 0)}#_(){this.#c&&(Ni.clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const r=this.#t,l=this.options,a=this.#i,o=this.#r,u=this.#a,d=e!==r?e.state:this.#n,{state:h}=e;let g={...h},p=!1,b;if(t._optimisticResults){const G=this.hasListeners(),se=!G&&Ob(e,t),P=G&&Nb(e,r,t,l);(se||P)&&(g={...g,...$x(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:x,errorUpdatedAt:w,status:E}=g;b=g.data;let R=!1;if(t.placeholderData!==void 0&&b===void 0&&E==="pending"){let G;a?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(G=a.data,R=!0):G=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,G!==void 0&&(E="success",b=Gd(a?.data,G,t),p=!0)}if(t.select&&b!==void 0&&!R)if(a&&b===o?.data&&t.select===this.#p)b=this.#d;else try{this.#p=t.select,b=t.select(b),b=Gd(a?.data,b,t),this.#d=b,this.#l=null}catch(G){this.#l=G}this.#l&&(x=this.#l,b=this.#d,w=Date.now(),E="error");const C=g.fetchStatus==="fetching",L=E==="pending",O=E==="error",B=L&&C,Y=b!==void 0,q={status:E,fetchStatus:g.fetchStatus,isPending:L,isSuccess:E==="success",isError:O,isInitialLoading:B,isLoading:B,data:b,dataUpdatedAt:g.dataUpdatedAt,error:x,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:C,isRefetching:C&&!L,isLoadingError:O&&!Y,isPaused:g.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:O&&Y,isStale:Lh(e,t),refetch:this.refetch,promise:this.#s,isEnabled:jn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const G=q.data!==void 0,se=q.status==="error"&&!G,P=de=>{se?de.reject(q.error):G&&de.resolve(q.data)},X=()=>{const de=this.#s=q.promise=Fd();P(de)},te=this.#s;switch(te.status){case"pending":e.queryHash===r.queryHash&&P(te);break;case"fulfilled":(se||q.data!==te.value)&&X();break;case"rejected":(!se||q.error!==te.reason)&&X();break}}return q}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#h=this.#t),Vd(t,e))return;this.#i=t;const r=()=>{if(!e)return!0;const{notifyOnChangeProps:l}=this.options,a=typeof l=="function"?l():l;if(a==="all"||!a&&!this.#m.size)return!0;const o=new Set(a??this.#m);return this.options.throwOnError&&o.add("error"),Object.keys(this.#i).some(u=>{const f=u;return this.#i[f]!==e[f]&&o.has(f)})};this.#S({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.#x()}#S(e){Ht.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function KE(e,t){return jn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ob(e,t){return KE(e,t)||e.state.data!==void 0&&$d(e,t,t.refetchOnMount)}function $d(e,t,r){if(jn(t.enabled,e)!==!1&&ii(t.staleTime,e)!=="static"){const l=typeof r=="function"?r(e):r;return l==="always"||l!==!1&&Lh(e,t)}return!1}function Nb(e,t,r,l){return(e!==t||jn(l.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Lh(e,r)}function Lh(e,t){return jn(t.enabled,e)!==!1&&e.isStaleByTime(ii(t.staleTime,e))}function ZE(e,t){return!Vd(e.getCurrentResult(),t)}function Db(e){return{onFetch:(t,r)=>{const l=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},d=0;const h=async()=>{let g=!1;const p=w=>{HE(w,()=>t.signal,()=>g=!0)},b=Vx(t.options,t.fetchOptions),x=async(w,E,R)=>{if(g)return Promise.reject();if(E==null&&w.pages.length)return Promise.resolve(w);const L=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:E,direction:R?"backward":"forward",meta:t.options.meta};return p(j),j})(),O=await b(L),{maxPages:B}=t.options,Y=R?VE:UE;return{pages:Y(w.pages,O,B),pageParams:Y(w.pageParams,E,B)}};if(a&&o.length){const w=a==="backward",E=w?JE:Mb,R={pages:o,pageParams:u},C=E(l,R);f=await x(R,C,w)}else{const w=e??o.length;do{const E=d===0?u[0]??l.initialPageParam:Mb(l,f);if(d>0&&E==null)break;f=await x(f,E),d++}while(d<w)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=h}}}function Mb(e,{pages:t,pageParams:r}){const l=t.length-1;return t.length>0?e.getNextPageParam(t[l],t,r[l],r):void 0}function JE(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var WE=class extends qx{#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||eC(),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=Fx({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(o,u)=>{this.#r({type:"failed",failureCount:o,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const l=this.state.status==="pending",a=!this.#i.canStart();try{if(l)t();else{this.#r({type:"pending",variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,r);const u=await this.options.onMutate?.(e,r);u!==this.state.context&&this.#r({type:"pending",context:u,variables:e,isPaused:a})}const o=await this.#i.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,r),await this.options.onSuccess?.(o,e,this.state.context,r),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(o,null,e,this.state.context,r),this.#r({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,e,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onError?.(o,e,this.state.context,r)}catch(u){Promise.reject(u)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,r)}catch(u){Promise.reject(u)}throw this.#r({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#r(e){const 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),Ht.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function eC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var tC=class extends ls{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 l=new WE({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:r});return this.add(l),l}add(e){this.#e.add(e);const t=Ao(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=Ao(e);if(typeof t=="string"){const r=this.#t.get(t);if(r)if(r.length>1){const l=r.indexOf(e);l!==-1&&r.splice(l,1)}else r[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Ao(e);if(typeof t=="string"){const l=this.#t.get(t)?.find(a=>a.state.status==="pending");return!l||l===e}else return!0}runNext(e){const t=Ao(e);return typeof t=="string"?this.#t.get(t)?.find(l=>l!==e&&l.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ht.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=>kb(t,r))}findAll(e={}){return this.getAll().filter(t=>kb(e,t))}notify(e){Ht.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ht.batch(()=>Promise.all(e.map(t=>t.continue().catch(fn))))}};function Ao(e){return e.options.scope?.id}var nC=class extends ls{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){const l=t.queryKey,a=t.queryHash??Ah(l,t);let o=this.get(a);return o||(o=new YE({client:e,queryKey:l,queryHash:a,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(l)}),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(){Ht.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=>Cb(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>Cb(e,r)):t}notify(e){Ht.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ht.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ht.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},rC=class{#e;#t;#n;#i;#r;#a;#s;#l;constructor(e={}){this.#e=e.queryCache||new nC,this.#t=e.mutationCache||new tC,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#s=Rh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Ko.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#s?.(),this.#s=void 0,this.#l?.(),this.#l=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),l=r.state.data;return l===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ii(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(l))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:r})=>{const l=r.data;return[t,l]})}setQueryData(e,t,r){const l=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(l.queryHash)?.state.data,u=IE(t,o);if(u!==void 0)return this.#e.build(this,l).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Ht.batch(()=>this.#e.findAll(e).map(({queryKey:l})=>[l,this.setQueryData(l,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Ht.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#e;return Ht.batch(()=>(r.findAll(e).forEach(l=>{l.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},l=Ht.batch(()=>this.#e.findAll(e).map(a=>a.cancel(r)));return Promise.all(l).then(fn).catch(fn)}invalidateQueries(e,t={}){return Ht.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},l=Ht.batch(()=>this.#e.findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,r);return r.throwOnError||(o=o.catch(fn)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(l).then(fn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#e.build(this,t);return r.isStaleByTime(ii(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(fn).catch(fn)}fetchInfiniteQuery(e){return e.behavior=Db(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(fn).catch(fn)}ensureInfiniteQueryData(e){return e.behavior=Db(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ko.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(l=>{Za(e,l.queryKey)&&Object.assign(r,l.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(l=>{Za(e,l.mutationKey)&&Object.assign(r,l.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=Ah(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===Th&&(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()}},Qx=F.createContext(void 0),yu=e=>{const t=F.useContext(Qx);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},iC=({client:e,children:t})=>(F.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),v.jsx(Qx.Provider,{value:e,children:t})),Yx=F.createContext(!1),lC=()=>F.useContext(Yx);Yx.Provider;function aC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var sC=F.createContext(aC()),oC=()=>F.useContext(sC),uC=(e,t,r)=>{const l=r?.state.error&&typeof e.throwOnError=="function"?Hx(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||l)&&(t.isReset()||(e.retryOnMount=!1))},cC=e=>{F.useEffect(()=>{e.clearReset()},[e])},fC=({result:e,errorResetBoundary:t,throwOnError:r,query:l,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&l&&(a&&e.data===void 0||Hx(r,[e.error,l])),dC=e=>{if(e.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),l=e.staleTime;e.staleTime=typeof l=="function"?(...a)=>r(l(...a)):r(l),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},hC=(e,t)=>e.isLoading&&e.isFetching&&!t,mC=(e,t)=>e?.suspense&&t.isPending,jb=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function pC(e,t,r){const l=lC(),a=oC(),o=yu(),u=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(u);const f=o.getQueryCache().get(u.queryHash);u._optimisticResults=l?"isRestoring":"optimistic",dC(u),uC(u,a,f),cC(a);const d=!o.getQueryCache().get(u.queryHash),[h]=F.useState(()=>new t(o,u)),g=h.getOptimisticResult(u),p=!l&&e.subscribed!==!1;if(F.useSyncExternalStore(F.useCallback(b=>{const x=p?h.subscribe(Ht.batchCalls(b)):fn;return h.updateResult(),x},[h,p]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),F.useEffect(()=>{h.setOptions(u)},[u,h]),mC(u,g))throw jb(u,h,a);if(fC({result:g,errorResetBoundary:a,throwOnError:u.throwOnError,query:f,suspense:u.suspense}))throw g.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(u,g),u.experimental_prefetchInRender&&!ji&&hC(g,l)&&(d?jb(u,h,a):f?.promise)?.catch(fn).finally(()=>{h.updateResult()}),u.notifyOnChangeProps?g:h.trackResult(g)}function Oh(e,t){return pC(e,XE)}const gC=new rC({defaultOptions:{queries:{retry:!1,refetchOnWindowFocus:!1}}});function zb(){const e=new URLSearchParams(window.location.search);return{ref:e.get("ref"),theme:e.get("theme"),view:e.get("view")}}function yC(){const[e,t]=F.useState(zb);return F.useEffect(()=>{const r=()=>{t(zb())};return window.addEventListener("popstate",r),()=>{window.removeEventListener("popstate",r)}},[]),e}async function bC(e,t){const r=new URLSearchParams;e&&r.set("whitespace","hide"),t&&r.set("ref",t);const l=r.toString(),a=l?`/api/diff?${l}`:"/api/diff",o=await fetch(a);if(!o.ok)throw new Error(`HTTP ${o.status}`);return o.json()}async function xC(e){const t=new URLSearchParams;e&&t.set("ref",e);const r=t.toString(),l=r?`/api/diff-fingerprint?${r}`:"/api/diff-fingerprint",a=await fetch(l);if(!a.ok)throw new Error(`HTTP ${a.status}`);return(await a.json()).fingerprint}async function vC(e){const t=new URLSearchParams;e&&t.set("ref",e);const r=t.toString(),l=r?`/api/info?${r}`:"/api/info",a=await fetch(l);if(!a.ok)throw new Error(`HTTP ${a.status}`);return a.json()}async function _C(e,t){const r=new URLSearchParams({session:e}),l=await fetch(`/api/threads?${r}`);return l.ok?l.json():[]}async function wC(e){const t=await fetch("/api/threads",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.json()}async function SC(e,t,r){const l=await fetch(`/api/threads/${e}/reply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:t,author:r})});if(!l.ok)throw new Error(`HTTP ${l.status}`);return l.json()}async function nd(e,t,r){const l=await fetch(`/api/threads/${e}/status`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:t,summary:r})});if(!l.ok)throw new Error(`HTTP ${l.status}`)}async function EC(e){const t=await fetch("/api/threads",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e})});if(!t.ok)throw new Error(`HTTP ${t.status}`)}async function CC(e){const t=await fetch(`/api/threads/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`HTTP ${t.status}`)}async function kC(e){const t=await fetch(`/api/comments/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`HTTP ${t.status}`)}async function AC(e){const t=await fetch("/api/revert-hunk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({patch:e})});if(!t.ok){const r=await t.json().catch(()=>({error:`HTTP ${t.status}`}));throw new Error(r.error||`HTTP ${t.status}`)}}async function TC(e,t){const r=new URLSearchParams;t&&r.set("ref",t);const l=r.toString(),a=l?`/api/file/${encodeURIComponent(e)}?${l}`:`/api/file/${encodeURIComponent(e)}`,o=await fetch(a);if(!o.ok)throw new Error(`HTTP ${o.status}`);return(await o.json()).content}function RC(e,t){return{queryKey:["diff",e,t??null],queryFn:()=>bC(e,t)}}function LC(e=!1,t){const{data:r,isLoading:l,error:a}=Oh(RC(e,t));return{data:r??null,loading:l,error:a?.message??null}}function OC(e){return{queryKey:["repo-info",e],queryFn:()=>vC(e)}}function NC(e){const{data:t,isLoading:r,error:l}=Oh(OC(e));return{data:t??null,loading:r,error:l?.message??null}}function DC(){return typeof window>"u"?null:localStorage.getItem("diffity-theme")}function MC(){return document.documentElement.getAttribute("data-theme")==="dark"?"dark":"light"}function jC(e){const[t,r]=F.useState(()=>DC()||e||"light");F.useLayoutEffect(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const l=F.useCallback(()=>{r(a=>{const o=a==="light"?"dark":"light";return localStorage.setItem("diffity-theme",o),o})},[]);return{theme:t,toggleTheme:l}}const Xx=["shift","alt","meta","mod","ctrl","control"],zC={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function li(e){return(zC[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function Kx(e){return Xx.includes(e)}function rd(e,t=","){return e.toLowerCase().split(t)}function id(e,t="+",r=">",l=!1,a,o){let u=[],f=!1;e=e.trim(),e.includes(r)?(f=!0,u=e.toLocaleLowerCase().split(r).map(g=>li(g))):u=e.toLocaleLowerCase().split(t).map(g=>li(g));const d={alt:u.includes("alt"),ctrl:u.includes("ctrl")||u.includes("control"),shift:u.includes("shift"),meta:u.includes("meta"),mod:u.includes("mod"),useKey:l},h=u.filter(g=>!Xx.includes(g));return{...d,keys:h,description:a,isSequence:f,hotkey:e,metadata:o}}typeof document<"u"&&(document.addEventListener("keydown",e=>{e.code!==void 0&&Zx([li(e.code)])}),document.addEventListener("keyup",e=>{e.code!==void 0&&Jx([li(e.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{wr.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{wr.clear()},0)}));const wr=new Set;function Nh(e){return Array.isArray(e)}function IC(e,t=","){return(Nh(e)?e:e.split(t)).every(r=>wr.has(r.trim().toLowerCase()))}function Zx(e){const t=Array.isArray(e)?e:[e];wr.has("meta")&&wr.forEach(r=>{Kx(r)||wr.delete(r.toLowerCase())}),t.forEach(r=>{wr.add(r.toLowerCase())})}function Jx(e){const t=Array.isArray(e)?e:[e];e==="meta"?wr.clear():t.forEach(r=>{wr.delete(r.toLowerCase())})}function PC(e,t,r){(typeof r=="function"&&r(e,t)||r===!0)&&e.preventDefault()}function BC(e,t,r){return typeof r=="function"?r(e,t):r===!0||r===void 0}const UC=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function VC(e){return Wx(e,UC)}function Wx(e,t=!1){const{target:r,composed:l}=e;let a,o;return HC(r)&&l?(a=e.composedPath()[0]&&e.composedPath()[0].tagName,o=e.composedPath()[0]&&e.composedPath()[0].role):(a=r&&r.tagName,o=r&&r.role),Nh(t)?!!(a&&t&&t.some(u=>u.toLowerCase()===a.toLowerCase()||u===o)):!!(a&&t&&t)}function HC(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function GC(e,t){return e.length===0&&t?!1:t?e.some(r=>t.includes(r))||e.includes("*"):!0}const FC=(e,t,r=!1)=>{const{alt:l,meta:a,mod:o,shift:u,ctrl:f,keys:d,useKey:h}=t,{code:g,key:p,ctrlKey:b,metaKey:x,shiftKey:w,altKey:E}=e,R=li(g);if(h&&d?.length===1&&d.includes(p.toLowerCase()))return!0;if(!d?.includes(R)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(R))return!1;if(!r){if(l!==E&&R!=="alt"||u!==w&&R!=="shift")return!1;if(o){if(!x&&!b)return!1}else if(a!==x&&R!=="meta"&&R!=="os"||f!==b&&R!=="ctrl"&&R!=="control")return!1}return d&&d.length===1&&d.includes(R)?!0:d&&d.length>0?d.includes(R)?IC(d):!1:!d||d.length===0},qC=F.createContext(void 0),$C=()=>F.useContext(qC);function ev(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce((r,l)=>r&&ev(e[l],t[l]),!0):e===t}const QC=F.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),YC=()=>F.useContext(QC);function XC(e){const t=F.useRef(void 0);return ev(t.current,e)||(t.current=e),t.current}const Ib=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},KC=typeof window<"u"?F.useLayoutEffect:F.useEffect;function Xn(e,t,r,l){const a=F.useRef(null),o=F.useRef(!1),u=Array.isArray(r)?Array.isArray(l)?void 0:l:r,f=Nh(e)?e.join(u?.delimiter):e,d=Array.isArray(r)?r:Array.isArray(l)?l:void 0,h=F.useCallback(t,d??[]),g=F.useRef(h);d?g.current=h:g.current=t;const p=XC(u),{activeScopes:b}=YC(),x=$C();return KC(()=>{if(p?.enabled===!1||!GC(b,p?.scopes))return;let w=[],E;const R=(B,Y=!1)=>{if(!(VC(B)&&!Wx(B,p?.enableOnFormTags))){if(a.current!==null){const j=a.current.getRootNode();if((j instanceof Document||j instanceof ShadowRoot)&&j.activeElement!==a.current&&!a.current.contains(j.activeElement)){Ib(B);return}}B.target?.isContentEditable&&!p?.enableOnContentEditable||rd(f,p?.delimiter).forEach(j=>{if(j.includes(p?.splitKey??"+")&&j.includes(p?.sequenceSplitKey??">")){console.warn(`Hotkey ${j} contains both ${p?.splitKey??"+"} and ${p?.sequenceSplitKey??">"} which is not supported.`);return}const q=id(j,p?.splitKey,p?.sequenceSplitKey,p?.useKey,p?.description,p?.metadata);if(q.isSequence){E=setTimeout(()=>{w=[]},p?.sequenceTimeoutMs??1e3);const G=q.useKey?B.key:li(B.code);if(Kx(G.toLowerCase()))return;w.push(G);const se=q.keys?.[w.length-1];if(G!==se){w=[],E&&clearTimeout(E);return}w.length===q.keys?.length&&(g.current(B,q),E&&clearTimeout(E),w=[])}else if(FC(B,q,p?.ignoreModifiers)||q.keys?.includes("*")){if(p?.ignoreEventWhen?.(B)||Y&&o.current)return;if(PC(B,q,p?.preventDefault),!BC(B,q,p?.enabled)){Ib(B);return}g.current(B,q),Y||(o.current=!0)}})}},C=B=>{B.code!==void 0&&(Zx(li(B.code)),(p?.keydown===void 0&&p?.keyup!==!0||p?.keydown)&&R(B))},L=B=>{B.code!==void 0&&(Jx(li(B.code)),o.current=!1,p?.keyup&&R(B,!0))},O=a.current||u?.document||document;return O.addEventListener("keyup",L,u?.eventListenerOptions),O.addEventListener("keydown",C,u?.eventListenerOptions),x&&rd(f,p?.delimiter).forEach(B=>{x.addHotkey(id(B,p?.splitKey,p?.sequenceSplitKey,p?.useKey,p?.description,p?.metadata))}),()=>{O.removeEventListener("keyup",L,u?.eventListenerOptions),O.removeEventListener("keydown",C,u?.eventListenerOptions),x&&rd(f,p?.delimiter).forEach(B=>{x.removeHotkey(id(B,p?.splitKey,p?.sequenceSplitKey,p?.useKey,p?.description,p?.metadata))}),w=[],E&&clearTimeout(E)}},[f,p,b]),a}const br={preventDefault:!0};function Pb(){const e=document.activeElement?.tagName;return e==="INPUT"||e==="TEXTAREA"}function ZC(e){const t=F.useRef(e);t.current=e,Xn("j",e.onNextFile,br),Xn("k",e.onPrevFile,br),Xn("n",e.onNextHunk,br),Xn("p",e.onPrevHunk,br),Xn("x",e.onToggleCollapse,br),Xn("shift+x",e.onCollapseAll,br),Xn("r",e.onToggleReviewed,br),Xn("u",e.onUnifiedView,br),Xn("s",e.onSplitView,br),Xn("escape",e.onEscape,{enableOnFormTags:["INPUT","TEXTAREA"]}),F.useEffect(()=>{const r=l=>{l.key==="/"&&!Pb()&&(l.preventDefault(),t.current.onFocusSearch()),l.key==="?"&&!Pb()&&(l.preventDefault(),t.current.onShowHelp())};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[])}function JC(e){return Oh({queryKey:["threads",e],queryFn:()=>_C(e),enabled:!!e,refetchInterval:2e3})}function WC(e,t){const r=yu(),l=F.useCallback(()=>{r.invalidateQueries({queryKey:["threads",e]})},[r,e]),a=F.useCallback((b,x,w,E,R,C,L)=>{!t||!e||wC({sessionId:e,filePath:b,side:x,startLine:w,endLine:E,body:R,author:C,anchorContent:L}).then(()=>{l()})},[t,e,l]),o=F.useCallback((b,x,w)=>{t&&SC(b,x,w).then(()=>{l()})},[t,l]),u=F.useCallback(b=>{t&&nd(b,"resolved").then(()=>{l()})},[t,l]),f=F.useCallback(b=>{t&&nd(b,"open").then(()=>{l()})},[t,l]),d=F.useCallback(b=>{t&&nd(b,"dismissed").then(()=>{l()})},[t,l]),h=F.useCallback((b,x)=>{t&&kC(x).then(()=>{l()})},[t,l]),g=F.useCallback(b=>{t&&CC(b).then(()=>{l()})},[t,l]),p=F.useCallback(()=>{!t||!e||EC(e).then(()=>{l()})},[t,e,l]);return{addThread:a,addReply:o,resolveThread:u,unresolveThread:f,dismissThread:d,deleteComment:h,deleteThread:g,deleteAllThreads:p}}function Dh(e){const{additions:t,deletions:r,className:l=""}=e;return v.jsxs("span",{className:`flex gap-1 shrink-0 font-mono text-xs ${l}`,children:[t>0&&v.jsxs("span",{className:"text-added font-semibold",children:["+",t]}),r>0&&v.jsxs("span",{className:"text-deleted font-semibold",children:["-",r]})]})}function ek(e){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[v.jsx("line",{x1:"5",y1:"3.5",x2:"5",y2:"12.5"}),v.jsx("circle",{cx:"5",cy:"3.5",r:"1.5"}),v.jsx("circle",{cx:"5",cy:"12.5",r:"1.5"}),v.jsx("circle",{cx:"11",cy:"5.5",r:"1.5"}),v.jsx("path",{d:"M11 7c0 2-2 3.5-6 4"})]})}function tk(e){const{diff:t,repoName:r,branch:l,description:a}=e;return v.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 bg-bg-secondary border-b border-border font-sans text-sm",children:[v.jsxs("div",{className:"flex items-center gap-2.5",children:[r&&v.jsx("span",{className:"font-semibold text-text",children:r}),l&&v.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-diff-hunk-bg text-diff-hunk-text rounded-md font-mono text-xs",children:[v.jsx(ek,{className:"w-3 h-3"}),l]}),a&&v.jsx("span",{className:"text-text-secondary",children:a})]}),t?v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsxs("span",{className:"text-text-muted text-xs",children:[t.stats.filesChanged," file",t.stats.filesChanged!==1?"s":""]}),v.jsx(Dh,{additions:t.stats.totalAdditions,deletions:t.stats.totalDeletions})]}):v.jsx("div",{className:"w-48 h-4 bg-bg-tertiary rounded animate-pulse"})]})}function tv(e){var t,r,l="";if(typeof e=="string"||typeof e=="number")l+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=tv(e[t]))&&(l&&(l+=" "),l+=r)}else for(r in e)e[r]&&(l&&(l+=" "),l+=r);return l}function nk(){for(var e,t,r=0,l="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=tv(e))&&(l&&(l+=" "),l+=t);return l}const rk=(e,t)=>{const r=new Array(e.length+t.length);for(let l=0;l<e.length;l++)r[l]=e[l];for(let l=0;l<t.length;l++)r[e.length+l]=t[l];return r},ik=(e,t)=>({classGroupId:e,validator:t}),nv=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Zo="-",Bb=[],lk="arbitrary..",ak=e=>{const t=ok(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:l}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return sk(u);const f=u.split(Zo),d=f[0]===""&&f.length>1?1:0;return rv(f,d,t)},getConflictingClassGroupIds:(u,f)=>{if(f){const d=l[u],h=r[u];return d?h?rk(h,d):d:h||Bb}return r[u]||Bb}}},rv=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const a=e[t],o=r.nextPart.get(a);if(o){const h=rv(e,t+1,o);if(h)return h}const u=r.validators;if(u===null)return;const f=t===0?e.join(Zo):e.slice(t).join(Zo),d=u.length;for(let h=0;h<d;h++){const g=u[h];if(g.validator(f))return g.classGroupId}},sk=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),l=t.slice(0,r);return l?lk+l:void 0})(),ok=e=>{const{theme:t,classGroups:r}=e;return uk(r,t)},uk=(e,t)=>{const r=nv();for(const l in e){const a=e[l];Mh(a,r,l,t)}return r},Mh=(e,t,r,l)=>{const a=e.length;for(let o=0;o<a;o++){const u=e[o];ck(u,t,r,l)}},ck=(e,t,r,l)=>{if(typeof e=="string"){fk(e,t,r);return}if(typeof e=="function"){dk(e,t,r,l);return}hk(e,t,r,l)},fk=(e,t,r)=>{const l=e===""?t:iv(t,e);l.classGroupId=r},dk=(e,t,r,l)=>{if(mk(e)){Mh(e(l),t,r,l);return}t.validators===null&&(t.validators=[]),t.validators.push(ik(r,e))},hk=(e,t,r,l)=>{const a=Object.entries(e),o=a.length;for(let u=0;u<o;u++){const[f,d]=a[u];Mh(d,iv(t,f),r,l)}},iv=(e,t)=>{let r=e;const l=t.split(Zo),a=l.length;for(let o=0;o<a;o++){const u=l[o];let f=r.nextPart.get(u);f||(f=nv(),r.nextPart.set(u,f)),r=f}return r},mk=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,pk=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),l=Object.create(null);const a=(o,u)=>{r[o]=u,t++,t>e&&(t=0,l=r,r=Object.create(null))};return{get(o){let u=r[o];if(u!==void 0)return u;if((u=l[o])!==void 0)return a(o,u),u},set(o,u){o in r?r[o]=u:a(o,u)}}},Qd="!",Ub=":",gk=[],Vb=(e,t,r,l,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:l,isExternal:a}),yk=e=>{const{prefix:t,experimentalParseClassName:r}=e;let l=a=>{const o=[];let u=0,f=0,d=0,h;const g=a.length;for(let E=0;E<g;E++){const R=a[E];if(u===0&&f===0){if(R===Ub){o.push(a.slice(d,E)),d=E+1;continue}if(R==="/"){h=E;continue}}R==="["?u++:R==="]"?u--:R==="("?f++:R===")"&&f--}const p=o.length===0?a:a.slice(d);let b=p,x=!1;p.endsWith(Qd)?(b=p.slice(0,-1),x=!0):p.startsWith(Qd)&&(b=p.slice(1),x=!0);const w=h&&h>d?h-d:void 0;return Vb(o,x,b,w)};if(t){const a=t+Ub,o=l;l=u=>u.startsWith(a)?o(u.slice(a.length)):Vb(gk,!1,u,void 0,!0)}if(r){const a=l;l=o=>r({className:o,parseClassName:a})}return l},bk=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,l)=>{t.set(r,1e6+l)}),r=>{const l=[];let a=[];for(let o=0;o<r.length;o++){const u=r[o],f=u[0]==="[",d=t.has(u);f||d?(a.length>0&&(a.sort(),l.push(...a),a=[]),l.push(u)):a.push(u)}return a.length>0&&(a.sort(),l.push(...a)),l}},xk=e=>({cache:pk(e.cacheSize),parseClassName:yk(e),sortModifiers:bk(e),...ak(e)}),vk=/\s+/,_k=(e,t)=>{const{parseClassName:r,getClassGroupId:l,getConflictingClassGroupIds:a,sortModifiers:o}=t,u=[],f=e.trim().split(vk);let d="";for(let h=f.length-1;h>=0;h-=1){const g=f[h],{isExternal:p,modifiers:b,hasImportantModifier:x,baseClassName:w,maybePostfixModifierPosition:E}=r(g);if(p){d=g+(d.length>0?" "+d:d);continue}let R=!!E,C=l(R?w.substring(0,E):w);if(!C){if(!R){d=g+(d.length>0?" "+d:d);continue}if(C=l(w),!C){d=g+(d.length>0?" "+d:d);continue}R=!1}const L=b.length===0?"":b.length===1?b[0]:o(b).join(":"),O=x?L+Qd:L,B=O+C;if(u.indexOf(B)>-1)continue;u.push(B);const Y=a(C,R);for(let j=0;j<Y.length;++j){const q=Y[j];u.push(O+q)}d=g+(d.length>0?" "+d:d)}return d},wk=(...e)=>{let t=0,r,l,a="";for(;t<e.length;)(r=e[t++])&&(l=lv(r))&&(a&&(a+=" "),a+=l);return a},lv=e=>{if(typeof e=="string")return e;let t,r="";for(let l=0;l<e.length;l++)e[l]&&(t=lv(e[l]))&&(r&&(r+=" "),r+=t);return r},Sk=(e,...t)=>{let r,l,a,o;const u=d=>{const h=t.reduce((g,p)=>p(g),e());return r=xk(h),l=r.cache.get,a=r.cache.set,o=f,f(d)},f=d=>{const h=l(d);if(h)return h;const g=_k(d,r);return a(d,g),g};return o=u,(...d)=>o(wk(...d))},Ek=[],kt=e=>{const t=r=>r[e]||Ek;return t.isThemeGetter=!0,t},av=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ck=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,kk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ak=/\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$/,Tk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Rk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Lk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wr=e=>Ck.test(e),Me=e=>!!e&&!Number.isNaN(Number(e)),ei=e=>!!e&&Number.isInteger(Number(e)),ld=e=>e.endsWith("%")&&Me(e.slice(0,-1)),xr=e=>kk.test(e),ov=()=>!0,Ok=e=>Ak.test(e)&&!Tk.test(e),jh=()=>!1,Nk=e=>Rk.test(e),Dk=e=>Lk.test(e),Mk=e=>!ge(e)&&!ye(e),jk=e=>si(e,fv,jh),ge=e=>av.test(e),Ai=e=>si(e,dv,Ok),Hb=e=>si(e,Gk,Me),zk=e=>si(e,mv,ov),Ik=e=>si(e,hv,jh),Gb=e=>si(e,uv,jh),Pk=e=>si(e,cv,Dk),To=e=>si(e,pv,Nk),ye=e=>sv.test(e),Ia=e=>Pi(e,dv),Bk=e=>Pi(e,hv),Fb=e=>Pi(e,uv),Uk=e=>Pi(e,fv),Vk=e=>Pi(e,cv),Ro=e=>Pi(e,pv,!0),Hk=e=>Pi(e,mv,!0),si=(e,t,r)=>{const l=av.exec(e);return l?l[1]?t(l[1]):r(l[2]):!1},Pi=(e,t,r=!1)=>{const l=sv.exec(e);return l?l[1]?t(l[1]):r:!1},uv=e=>e==="position"||e==="percentage",cv=e=>e==="image"||e==="url",fv=e=>e==="length"||e==="size"||e==="bg-size",dv=e=>e==="length",Gk=e=>e==="number",hv=e=>e==="family-name",mv=e=>e==="number"||e==="weight",pv=e=>e==="shadow",Fk=()=>{const e=kt("color"),t=kt("font"),r=kt("text"),l=kt("font-weight"),a=kt("tracking"),o=kt("leading"),u=kt("breakpoint"),f=kt("container"),d=kt("spacing"),h=kt("radius"),g=kt("shadow"),p=kt("inset-shadow"),b=kt("text-shadow"),x=kt("drop-shadow"),w=kt("blur"),E=kt("perspective"),R=kt("aspect"),C=kt("ease"),L=kt("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Y=()=>[...B(),ye,ge],j=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],G=()=>[ye,ge,d],se=()=>[Wr,"full","auto",...G()],P=()=>[ei,"none","subgrid",ye,ge],X=()=>["auto",{span:["full",ei,ye,ge]},ei,ye,ge],te=()=>[ei,"auto",ye,ge],de=()=>["auto","min","max","fr",ye,ge],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ne=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...G()],J=()=>[Wr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...G()],re=()=>[Wr,"screen","full","dvw","lvw","svw","min","max","fit",...G()],me=()=>[Wr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...G()],k=()=>[e,ye,ge],N=()=>[...B(),Fb,Gb,{position:[ye,ge]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],T=()=>["auto","cover","contain",Uk,jk,{size:[ye,ge]}],ue=()=>[ld,Ia,Ai],he=()=>["","none","full",h,ye,ge],fe=()=>["",Me,Ia,Ai],Ce=()=>["solid","dashed","dotted","double"],je=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[Me,ld,Fb,Gb],yt=()=>["","none",w,ye,ge],St=()=>["none",Me,ye,ge],Et=()=>["none",Me,ye,ge],Gt=()=>[Me,ye,ge],Ot=()=>[Wr,"full",...G()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[xr],breakpoint:[xr],color:[ov],container:[xr],"drop-shadow":[xr],ease:["in","out","in-out"],font:[Mk],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[xr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[xr],shadow:[xr],spacing:["px",Me],text:[xr],"text-shadow":[xr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Wr,ge,ye,R]}],container:["container"],columns:[{columns:[Me,ge,ye,f]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"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:Y()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:se()}],"inset-x":[{"inset-x":se()}],"inset-y":[{"inset-y":se()}],start:[{"inset-s":se(),start:se()}],end:[{"inset-e":se(),end:se()}],"inset-bs":[{"inset-bs":se()}],"inset-be":[{"inset-be":se()}],top:[{top:se()}],right:[{right:se()}],bottom:[{bottom:se()}],left:[{left:se()}],visibility:["visible","invisible","collapse"],z:[{z:[ei,"auto",ye,ge]}],basis:[{basis:[Wr,"full","auto",f,...G()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Me,Wr,"auto","initial","none",ge]}],grow:[{grow:["",Me,ye,ge]}],shrink:[{shrink:["",Me,ye,ge]}],order:[{order:[ei,"first","last","none",ye,ge]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:X()}],"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":de()}],"auto-rows":[{"auto-rows":de()}],gap:[{gap:G()}],"gap-x":[{"gap-x":G()}],"gap-y":[{"gap-y":G()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...ne(),"normal"]}],"justify-self":[{"justify-self":["auto",...ne()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...ne(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ne(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...ne(),"baseline"]}],"place-self":[{"place-self":["auto",...ne()]}],p:[{p:G()}],px:[{px:G()}],py:[{py:G()}],ps:[{ps:G()}],pe:[{pe:G()}],pbs:[{pbs:G()}],pbe:[{pbe:G()}],pt:[{pt:G()}],pr:[{pr:G()}],pb:[{pb:G()}],pl:[{pl:G()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mbs:[{mbs:z()}],mbe:[{mbe:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":G()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":G()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...re()]}],"min-inline-size":[{"min-inline":["auto",...re()]}],"max-inline-size":[{"max-inline":["none",...re()]}],"block-size":[{block:["auto",...me()]}],"min-block-size":[{"min-block":["auto",...me()]}],"max-block-size":[{"max-block":["none",...me()]}],w:[{w:[f,"screen",...J()]}],"min-w":[{"min-w":[f,"screen","none",...J()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",r,Ia,Ai]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,Hk,zk]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ld,ge]}],"font-family":[{font:[Bk,Ik,t]}],"font-features":[{"font-features":[ge]}],"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:[a,ye,ge]}],"line-clamp":[{"line-clamp":[Me,"none",ye,Hb]}],leading:[{leading:[o,...G()]}],"list-image":[{"list-image":["none",ye,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[Me,"from-font","auto",ye,Ai]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[Me,"auto",ye,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:G()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,ge]}],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",ye,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:Q()}],"bg-size":[{bg:T()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ei,ye,ge],radial:["",ye,ge],conic:[ei,ye,ge]},Vk,Pk]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-bs":[{"border-bs":fe()}],"border-w-be":[{"border-be":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ce(),"hidden","none"]}],"divide-style":[{divide:[...Ce(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-bs":[{"border-bs":k()}],"border-color-be":[{"border-be":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...Ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Me,ye,ge]}],"outline-w":[{outline:["",Me,Ia,Ai]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",g,Ro,To]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",p,Ro,To]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[Me,Ai]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",b,Ro,To]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[Me,ye,ge]}],"mix-blend":[{"mix-blend":[...je(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":je()}],"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":[Me]}],"mask-image-linear-from-pos":[{"mask-linear-from":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[ye,ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"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":B()}],"mask-image-conic-pos":[{"mask-conic":[Me]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:T()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,ge]}],filter:[{filter:["","none",ye,ge]}],blur:[{blur:yt()}],brightness:[{brightness:[Me,ye,ge]}],contrast:[{contrast:[Me,ye,ge]}],"drop-shadow":[{"drop-shadow":["","none",x,Ro,To]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",Me,ye,ge]}],"hue-rotate":[{"hue-rotate":[Me,ye,ge]}],invert:[{invert:["",Me,ye,ge]}],saturate:[{saturate:[Me,ye,ge]}],sepia:[{sepia:["",Me,ye,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,ge]}],"backdrop-blur":[{"backdrop-blur":yt()}],"backdrop-brightness":[{"backdrop-brightness":[Me,ye,ge]}],"backdrop-contrast":[{"backdrop-contrast":[Me,ye,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Me,ye,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Me,ye,ge]}],"backdrop-invert":[{"backdrop-invert":["",Me,ye,ge]}],"backdrop-opacity":[{"backdrop-opacity":[Me,ye,ge]}],"backdrop-saturate":[{"backdrop-saturate":[Me,ye,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",Me,ye,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":G()}],"border-spacing-x":[{"border-spacing-x":G()}],"border-spacing-y":[{"border-spacing-y":G()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Me,"initial",ye,ge]}],ease:[{ease:["linear","initial",C,ye,ge]}],delay:[{delay:[Me,ye,ge]}],animate:[{animate:["none",L,ye,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,ye,ge]}],"perspective-origin":[{"perspective-origin":Y()}],rotate:[{rotate:St()}],"rotate-x":[{"rotate-x":St()}],"rotate-y":[{"rotate-y":St()}],"rotate-z":[{"rotate-z":St()}],scale:[{scale:Et()}],"scale-x":[{"scale-x":Et()}],"scale-y":[{"scale-y":Et()}],"scale-z":[{"scale-z":Et()}],"scale-3d":["scale-3d"],skew:[{skew:Gt()}],"skew-x":[{"skew-x":Gt()}],"skew-y":[{"skew-y":Gt()}],transform:[{transform:[ye,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:Y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ot()}],"translate-x":[{"translate-x":Ot()}],"translate-y":[{"translate-y":Ot()}],"translate-z":[{"translate-z":Ot()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"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",ye,ge]}],"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":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mbs":[{"scroll-mbs":G()}],"scroll-mbe":[{"scroll-mbe":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pbs":[{"scroll-pbs":G()}],"scroll-pbe":[{"scroll-pbe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"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",ye,ge]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[Me,Ia,Ai,Hb]}],stroke:[{stroke:["none",...k()]}],"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"]}},qk=Sk(Fk);function Rt(...e){return qk(nk(e))}function gv(e=2e3){const[t,r]=F.useState(!1),l=F.useRef(void 0),a=F.useCallback(o=>{navigator.clipboard.writeText(o).then(()=>{r(!0),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>r(!1),e)})},[e]);return{copied:t,copy:a}}const Jo="__general__";function zl(e){return e.status==="resolved"||e.status==="dismissed"}function $k(e,t){const[r,l]=F.useState(-1),a=F.useMemo(()=>e.filter(h=>!zl(h)),[e]),o=a.length,u=F.useCallback(h=>{const g=a[h];g&&t(g.id,g.filePath)},[a,t]),f=F.useCallback(()=>{if(o===0)return;const h=r<=0?o-1:r-1;l(h),u(h)},[r,o,u]),d=F.useCallback(()=>{if(o===0)return;const h=r>=o-1?0:r+1;l(h),u(h)},[r,o,u]);return{currentIndex:r,count:o,goToPrevious:f,goToNext:d}}function Jt(e){return e.status==="deleted"?e.oldPath:e.newPath}function yv(e){switch(e){case"add":return"bg-diff-add-bg";case"delete":return"bg-diff-del-bg";default:return"bg-bg"}}const Qk=new Set(["package-lock.json","pnpm-lock.yaml","pnpm-lock.yml","bun.lock","bun.lockb","yarn.lock","Cargo.lock","Gemfile.lock","composer.lock","poetry.lock","Pipfile.lock","go.sum","flake.lock","pubspec.lock","Podfile.lock","packages.lock.json","project.assets.json","paket.lock","pnpm-workspace.yaml","shrinkwrap.yaml"]),Yk=[".min.js",".min.css",".min.mjs",".bundle.js",".bundle.css",".chunk.js",".chunk.css",".generated.ts",".generated.js",".g.dart",".freezed.dart",".pb.go",".pb.ts",".pb.js"],Xk=[/\.d\.ts$/,/\.map$/,/\.snap$/,/dist\//,/build\//,/generated\//,/__generated__\//,/\.lock$/];function Kk(e){if(e.status==="deleted"||e.status==="renamed")return!0;const t=Jt(e),r=t.split("/").pop()||"";if(Qk.has(r))return!0;const l=t.toLowerCase();for(const a of Yk)if(l.endsWith(a))return!0;for(const a of Xk)if(a.test(t))return!0;return!1}function Zk(e){const t=new Set;for(const r of e)Kk(r)&&t.add(Jt(r));return t}function bv(e){const t=[];let r=0;for(;r<e.length;)if(e[r].type!=="context"){const l=r;for(;r<e.length&&e[r].type!=="context";)r++;t.push({startIndex:l,endIndex:r-1})}else r++;return t}function Jk(e,t,r,l){const o=t.lines,u=[];for(let L=r-1;L>=Math.max(0,r-3)&&o[L].type==="context";L--)u.unshift(o[L]);const f=o.slice(r,l+1),d=[];for(let L=l+1;L<Math.min(o.length,l+1+3)&&o[L].type==="context";L++)d.push(o[L]);const h=[...u,...f,...d];let g=0,p=0,b=0,x=0;for(const L of h)L.oldLineNumber!==null&&g===0&&(g=L.oldLineNumber),L.newLineNumber!==null&&b===0&&(b=L.newLineNumber),(L.type==="context"||L.type==="delete")&&p++,(L.type==="context"||L.type==="add")&&x++;g===0&&(g=t.oldStart),b===0&&(b=t.newStart);const w=e.status==="added"?"/dev/null":`a/${e.oldPath}`,E=e.status==="deleted"?"/dev/null":`b/${e.newPath}`,R=`@@ -${g},${p} +${b},${x} @@`,C=[`--- ${w}`,`+++ ${E}`,R];for(const L of h){const O=L.type==="add"?"+":L.type==="delete"?"-":" ";C.push(`${O}${L.content}`),L.noNewline&&C.push("\")}return C.join(`
|
|
11
11
|
`)+`
|
|
12
|
-
`}function
|
|
13
|
-
`)}function
|
|
14
|
-
`)}function
|
|
12
|
+
`}function qb(e,t,r,l){const a=[];for(const o of e)for(const u of o.lines){const f=t==="old"?u.oldLineNumber:u.newLineNumber;f===null||f<r||f>l||(t==="old"&&(u.type==="delete"||u.type==="context")||t==="new"&&(u.type==="add"||u.type==="context"))&&a.push(u.content)}return a.join(`
|
|
13
|
+
`)}function $b(e,t,r,l){const a=[];for(const o of e){const u=t==="old"?o.oldLineNumber:o.newLineNumber;u===null||u<r||u>l||a.push(o.content)}return a.join(`
|
|
14
|
+
`)}function Qb(e){switch(e){case"added":return"bg-added/15 text-added";case"deleted":return"bg-deleted/15 text-deleted";case"renamed":return"bg-renamed/15 text-renamed";default:return"bg-modified/15 text-modified"}}function xv(e){return v.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[v.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),v.jsx("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"})]})}function vv(e){return v.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",...e,children:v.jsx("polyline",{points:"20 6 9 17 4 12"})})}function Wk(e){return v.jsx("svg",{className:e.className??"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:v.jsx("path",{d:"M3.22 10.53a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 0l4.25 4.25a.75.75 0 01-1.06 1.06L8 6.81 4.28 10.53a.75.75 0 01-1.06 0z"})})}function eA(e){return v.jsx("svg",{className:e.className??"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:v.jsx("path",{d:"M12.78 5.47a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06 0L3.22 6.53a.75.75 0 011.06-1.06L8 9.19l3.72-3.72a.75.75 0 011.06 0z"})})}function as(e){return v.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[v.jsx("path",{d:"M14.7223 12.7585C14.7426 12.3448 14.4237 11.9929 14.01 11.9726C13.5963 11.9522 13.2444 12.2711 13.2241 12.6848L12.9999 17.2415C12.9796 17.6552 13.2985 18.0071 13.7122 18.0274C14.1259 18.0478 14.4778 17.7289 14.4981 17.3152L14.7223 12.7585Z",fill:"currentColor"}),v.jsx("path",{d:"M9.98802 11.9726C9.5743 11.9929 9.25542 12.3448 9.27577 12.7585L9.49993 17.3152C9.52028 17.7289 9.87216 18.0478 10.2859 18.0274C10.6996 18.0071 11.0185 17.6552 10.9981 17.2415L10.774 12.6848C10.7536 12.2711 10.4017 11.9522 9.98802 11.9726Z",fill:"currentColor"}),v.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.249 2C9.00638 2 7.99902 3.00736 7.99902 4.25V5H5.5C4.25736 5 3.25 6.00736 3.25 7.25C3.25 8.28958 3.95503 9.16449 4.91303 9.42267L5.54076 19.8848C5.61205 21.0729 6.59642 22 7.78672 22H16.2113C17.4016 22 18.386 21.0729 18.4573 19.8848L19.085 9.42267C20.043 9.16449 20.748 8.28958 20.748 7.25C20.748 6.00736 19.7407 5 18.498 5H15.999V4.25C15.999 3.00736 14.9917 2 13.749 2H10.249ZM14.499 5V4.25C14.499 3.83579 14.1632 3.5 13.749 3.5H10.249C9.83481 3.5 9.49902 3.83579 9.49902 4.25V5H14.499ZM5.5 6.5C5.08579 6.5 4.75 6.83579 4.75 7.25C4.75 7.66421 5.08579 8 5.5 8H18.498C18.9123 8 19.248 7.66421 19.248 7.25C19.248 6.83579 18.9123 6.5 18.498 6.5H5.5ZM6.42037 9.5H17.5777L16.96 19.7949C16.9362 20.191 16.6081 20.5 16.2113 20.5H7.78672C7.38995 20.5 7.06183 20.191 7.03807 19.7949L6.42037 9.5Z",fill:"currentColor"})]})}function tA(e){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[v.jsx("rect",{x:"1.5",y:"1.5",width:"13",height:"13",rx:"2"}),v.jsx("line",{x1:"4.5",y1:"5.5",x2:"11.5",y2:"5.5"}),v.jsx("line",{x1:"4.5",y1:"8",x2:"11.5",y2:"8"}),v.jsx("line",{x1:"4.5",y1:"10.5",x2:"11.5",y2:"10.5"})]})}function nA(e){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[v.jsx("rect",{x:"1.5",y:"1.5",width:"13",height:"13",rx:"2"}),v.jsx("line",{x1:"8",y1:"1.5",x2:"8",y2:"14.5"})]})}function rA(e){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[v.jsx("circle",{cx:"8",cy:"8",r:"3"}),v.jsx("line",{x1:"8",y1:"1",x2:"8",y2:"2.5"}),v.jsx("line",{x1:"8",y1:"13.5",x2:"8",y2:"15"}),v.jsx("line",{x1:"1",y1:"8",x2:"2.5",y2:"8"}),v.jsx("line",{x1:"13.5",y1:"8",x2:"15",y2:"8"}),v.jsx("line",{x1:"3.05",y1:"3.05",x2:"4.1",y2:"4.1"}),v.jsx("line",{x1:"11.9",y1:"11.9",x2:"12.95",y2:"12.95"}),v.jsx("line",{x1:"3.05",y1:"12.95",x2:"4.1",y2:"11.9"}),v.jsx("line",{x1:"11.9",y1:"4.1",x2:"12.95",y2:"3.05"})]})}function iA(e){return v.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",...e,children:v.jsx("path",{d:"M13.5 8.5a5.5 5.5 0 0 1-7-7 5.5 5.5 0 1 0 7 7z"})})}function lA(e){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[v.jsx("path",{d:"M1.5 8s2.5-4.5 6.5-4.5S14.5 8 14.5 8s-2.5 4.5-6.5 4.5S1.5 8 1.5 8z"}),v.jsx("circle",{cx:"8",cy:"8",r:"2"})]})}function aA(e){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[v.jsx("path",{d:"M2 2l12 12"}),v.jsx("path",{d:"M6.5 6.5a2 2 0 0 0 2.83 2.83"}),v.jsx("path",{d:"M4.2 4.2C2.7 5.3 1.5 8 1.5 8s2.5 4.5 6.5 4.5c1.3 0 2.5-.4 3.5-1"}),v.jsx("path",{d:"M12.5 10.5c1-1.1 2-2.5 2-2.5s-2.5-4.5-6.5-4.5c-.5 0-1 .05-1.5.15"})]})}function sA(e){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[v.jsx("rect",{x:"1",y:"3.5",width:"14",height:"9",rx:"2"}),v.jsx("line",{x1:"4",y1:"6.5",x2:"5",y2:"6.5"}),v.jsx("line",{x1:"7.5",y1:"6.5",x2:"8.5",y2:"6.5"}),v.jsx("line",{x1:"11",y1:"6.5",x2:"12",y2:"6.5"}),v.jsx("line",{x1:"5",y1:"9.5",x2:"11",y2:"9.5"})]})}function _v(e){const{title:t,message:r,confirmLabel:l="Undo",onConfirm:a,onCancel:o}=e,u=F.useRef(null);return F.useEffect(()=>{u.current?.focus();const f=d=>{d.key==="Escape"&&o()};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[o]),v.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",onClick:o,children:v.jsxs("div",{className:"bg-bg border border-border rounded-xl shadow-lg p-5 max-w-sm w-full mx-4",onClick:f=>f.stopPropagation(),children:[v.jsx("h3",{className:"text-sm font-semibold text-text mb-1.5",children:t}),v.jsx("p",{className:"text-xs text-text-muted mb-4 leading-relaxed",children:r}),v.jsxs("div",{className:"flex justify-end gap-2",children:[v.jsx("button",{ref:u,onClick:o,className:"px-3 py-1.5 text-xs rounded-md border border-border text-text hover:bg-hover cursor-pointer",children:"Cancel"}),v.jsx("button",{onClick:a,className:"px-3 py-1.5 text-xs rounded-md bg-deleted text-white hover:opacity-90 cursor-pointer",children:l})]})]})})}function oA(e,t,r,l,a){if(!e)return[];const o=e.files.find(f=>Jt(f)===t);if(!o)return[];const u=[];for(const f of o.hunks)for(const d of f.lines){const h=r==="old"?d.oldLineNumber:d.newLineNumber;if(h!==null&&h>=l&&h<=a){const g=d.type==="add"?"+":d.type==="delete"?"-":" ";u.push(`${g} ${d.content}`)}}return u}function uA(e,t,r){const l=e.filter(o=>!zl(o));if(l.length===0)return"";const a=[];r&&(a.push(`Diff ref: ${r}`),a.push(""));for(const o of l){if(o.filePath===Jo)a.push("## General comment");else{const h=o.startLine===o.endLine?`${o.startLine}`:`${o.startLine}-${o.endLine}`,g=o.side==="old"?"before change":"after change";a.push(`## ${o.filePath}:${h} (${g})`)}const u=oA(t,o.filePath,o.side,o.startLine,o.endLine);u.length>0&&(a.push("```diff"),a.push(...u),a.push("```"));const d=new Set(o.comments.map(h=>h.author.name)).size===1;for(const h of o.comments)if(d)a.push(h.body);else{const g=h.author.name==="You"?"User":h.author.name;a.push(`**${g}:** ${h.body}`)}a.push("")}return a.join(`
|
|
15
|
+
`)}function cA(e){const{viewMode:t,onViewModeChange:r,hideWhitespace:l,onHideWhitespaceChange:a,theme:o,onToggleTheme:u,onShowHelp:f,diff:d,diffRef:h,threads:g,onDeleteAllComments:p,onScrollToThread:b}=e,[x,w]=F.useState(!1),{copied:E,copy:R}=gv(),{currentIndex:C,count:L,goToPrevious:O,goToNext:B}=$k(g,b),Y="px-2.5 py-1 text-xs text-text-secondary transition-colors duration-150 cursor-pointer border",j="bg-accent text-white border-accent",q="bg-bg hover:bg-hover hover:text-text border-border",G="p-1.5 rounded-md text-text-muted hover:text-text hover:bg-hover transition-colors cursor-pointer";return v.jsxs("div",{className:"flex items-center gap-3 px-4 py-1.5 bg-bg-secondary border-b border-border font-sans text-xs",children:[v.jsxs("div",{className:"flex items-center",children:[v.jsxs("button",{className:Rt(Y,"flex items-center gap-1.5 rounded-l-md",t==="unified"?`${j} z-10`:q),onClick:()=>r("unified"),title:"Unified view (u)",children:[v.jsx(tA,{className:"w-3.5 h-3.5"}),"Unified"]}),v.jsxs("button",{className:Rt(Y,"flex items-center gap-1.5 rounded-r-md -ml-px",t==="split"?`${j} z-10`:q),onClick:()=>r("split"),title:"Split view (s)",children:[v.jsx(nA,{className:"w-3.5 h-3.5"}),"Split"]})]}),v.jsxs("button",{className:Rt(G,"flex items-center gap-1.5 text-xs",l&&"text-accent"),onClick:()=>a(!l),title:l?"Show whitespace":"Hide whitespace",children:[l?v.jsx(aA,{className:"w-3.5 h-3.5"}):v.jsx(lA,{className:"w-3.5 h-3.5"}),v.jsx("span",{className:"text-text-secondary",children:"Whitespace"})]}),v.jsxs("div",{className:"flex items-center gap-0.5",children:[v.jsx("button",{className:G,onClick:u,title:o==="light"?"Switch to dark mode":"Switch to light mode",children:o==="light"?v.jsx(iA,{className:"w-3.5 h-3.5"}):v.jsx(rA,{className:"w-3.5 h-3.5"})}),v.jsx("button",{className:G,onClick:f,title:"Keyboard shortcuts (?)",children:v.jsx(sA,{className:"w-3.5 h-3.5"})})]}),L>0&&v.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[v.jsxs("div",{className:"flex items-stretch border border-border rounded-md overflow-hidden bg-bg",children:[v.jsx("span",{className:"flex items-center text-xs text-text-muted px-2 py-1",children:C>=0?`${C+1} of ${L} ${L===1?"comment":"comments"}`:`${L} ${L===1?"comment":"comments"}`}),v.jsx("button",{onClick:O,className:"flex items-center px-1.5 border-l border-border text-text-muted hover:bg-hover hover:text-text transition-colors cursor-pointer",title:"Previous comment",children:v.jsx(Wk,{className:"w-3.5 h-3.5"})}),v.jsx("button",{onClick:B,className:"flex items-center px-1.5 border-l border-border text-text-muted hover:bg-hover hover:text-text transition-colors cursor-pointer",title:"Next comment",children:v.jsx(eA,{className:"w-3.5 h-3.5"})})]}),v.jsxs("div",{className:"flex items-stretch border border-border rounded-md overflow-hidden",children:[v.jsx("button",{onClick:()=>R(uA(g,d,h)),className:"flex items-center gap-1.5 px-2.5 py-1 text-xs bg-bg text-text-secondary hover:bg-hover hover:text-text transition-colors cursor-pointer",title:"Copy unresolved comments to clipboard",children:E?v.jsxs(v.Fragment,{children:[v.jsx(vv,{className:"w-3 h-3 text-added"}),"Copied"]}):v.jsxs(v.Fragment,{children:[v.jsx(xv,{className:"w-3 h-3"}),"Copy Comments"]})}),v.jsx("button",{onClick:()=>w(!0),className:"flex items-center px-2 border-l border-border bg-bg text-text-muted hover:bg-hover hover:text-red-500 transition-colors cursor-pointer",title:"Delete all comments",children:v.jsx(as,{className:"w-3.5 h-3.5"})})]})]}),x&&v.jsx(_v,{title:"Delete all comments",message:"Are you sure you want to delete all comments? This action cannot be undone.",confirmLabel:"Delete all",onConfirm:()=>{p(),w(!1)},onCancel:()=>w(!1)})]})}var fA=Px();function Cl(e,t,r){let l=r.initialDeps??[],a,o=!0;function u(){var f,d,h;let g;r.key&&((f=r.debug)!=null&&f.call(r))&&(g=Date.now());const p=e();if(!(p.length!==l.length||p.some((w,E)=>l[E]!==w)))return a;l=p;let x;if(r.key&&((d=r.debug)!=null&&d.call(r))&&(x=Date.now()),a=t(...p),r.key&&((h=r.debug)!=null&&h.call(r))){const w=Math.round((Date.now()-g)*100)/100,E=Math.round((Date.now()-x)*100)/100,R=E/16,C=(L,O)=>{for(L=String(L);L.length<O;)L=" "+L;return L};console.info(`%c⏱ ${C(E,5)} /${C(w,5)} ms`,`
|
|
15
16
|
font-size: .6rem;
|
|
16
17
|
font-weight: bold;
|
|
17
|
-
color: hsl(${Math.max(0,Math.min(120-120*R,120))}deg 100% 31%);`,r?.key)}return r?.onChange&&!(o&&r.skipInitialOnChange)&&r.onChange(a),o=!1,a}return u.updateDeps=f=>{l=f},u}function Yb(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const hA=(e,t)=>Math.abs(e-t)<1.01,mA=(e,t,r)=>{let l;return function(...a){e.clearTimeout(l),l=e.setTimeout(()=>t.apply(this,a),r)}},Xb=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},pA=e=>e,gA=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),l=[];for(let a=t;a<=r;a++)l.push(a);return l},yA=(e,t)=>{const r=e.scrollElement;if(!r)return;const l=e.targetWindow;if(!l)return;const a=u=>{const{width:f,height:d}=u;t({width:Math.round(f),height:Math.round(d)})};if(a(Xb(r)),!l.ResizeObserver)return()=>{};const o=new l.ResizeObserver(u=>{const f=()=>{const d=u[0];if(d?.borderBoxSize){const h=d.borderBoxSize[0];if(h){a({width:h.inlineSize,height:h.blockSize});return}}a(Xb(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(f):f()});return o.observe(r,{box:"border-box"}),()=>{o.unobserve(r)}},Kb={passive:!0},Zb=typeof window>"u"?!0:"onscrollend"in window,bA=(e,t)=>{const r=e.scrollElement;if(!r)return;const l=e.targetWindow;if(!l)return;let a=0;const o=e.options.useScrollendEvent&&Zb?()=>{}:mA(l,()=>{t(a,!1)},e.options.isScrollingResetDelay),u=g=>()=>{const{horizontal:p,isRtl:b}=e.options;a=p?r.scrollLeft*(b&&-1||1):r.scrollTop,o(),t(a,g)},f=u(!0),d=u(!1);r.addEventListener("scroll",f,Kb);const h=e.options.useScrollendEvent&&Zb;return h&&r.addEventListener("scrollend",d,Kb),()=>{r.removeEventListener("scroll",f),h&&r.removeEventListener("scrollend",d)}},xA=(e,t,r)=>{if(t?.borderBoxSize){const l=t.borderBoxSize[0];if(l)return Math.round(l[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]},vA=(e,{adjustments:t=0,behavior:r},l)=>{var a,o;const u=e+t;(o=(a=l.scrollElement)==null?void 0:a.scrollTo)==null||o.call(a,{[l.options.horizontal?"left":"top"]:u,behavior:r})};class _A{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var r,l,a;return((a=(l=(r=this.targetWindow)==null?void 0:r.performance)==null?void 0:l.now)==null?void 0:a.call(l))??Date.now()},this.observer=(()=>{let r=null;const l=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(a=>{a.forEach(o=>{const u=()=>{const f=o.target,d=this.indexFromElement(f);if(!f.isConnected){this.observer.unobserve(f),this.elementsCache.delete(this.options.getItemKey(d));return}this.shouldMeasureDuringScroll(d)&&this.resizeItem(d,this.options.measureElement(f,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(u):u()})}));return{disconnect:()=>{var a;(a=l())==null||a.disconnect(),r=null},observe:a=>{var o;return(o=l())==null?void 0:o.observe(a,{box:"border-box"})},unobserve:a=>{var o;return(o=l())==null?void 0:o.unobserve(a)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([l,a])=>{typeof a>"u"&&delete r[l]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:pA,rangeExtractor:gA,onChange:()=>{},measureElement:xA,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...r}},this.notify=r=>{var l,a;(a=(l=this.options).onChange)==null||a.call(l,this,r)},this.maybeNotify=Cl(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const l=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==l){if(this.cleanup(),!l){this.maybeNotify();return}this.scrollElement=l,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(a=>{this.observer.observe(a)}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(a,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<a?"forward":"backward":null,this.scrollOffset=a,this.isScrolling=o,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,l)=>{const a=new Map,o=new Map;for(let u=l-1;u>=0;u--){const f=r[u];if(a.has(f.lane))continue;const d=o.get(f.lane);if(d==null||f.end>d.end?o.set(f.lane,f):f.end<d.end&&a.set(f.lane,!0),a.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((u,f)=>u.end===f.end?u.index-f.index:u.end-f.end)[0]:void 0},this.getMeasurementOptions=Cl(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(r,l,a,o,u,f)=>(this.prevLanes!==void 0&&this.prevLanes!==f&&(this.lanesChangedFlag=!0),this.prevLanes=f,this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:l,scrollMargin:a,getItemKey:o,enabled:u,lanes:f}),{key:!1}),this.getMeasurements=Cl(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:l,scrollMargin:a,getItemKey:o,enabled:u,lanes:f},d)=>{if(!u)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>r)for(const b of this.laneAssignments.keys())b>=r&&this.laneAssignments.delete(b);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const h=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===r&&(this.lanesSettling=!1);const g=this.measurementsCache.slice(0,h),p=new Array(f).fill(void 0);for(let b=0;b<h;b++){const x=g[b];x&&(p[x.lane]=b)}for(let b=h;b<r;b++){const x=o(b),w=this.laneAssignments.get(b);let E,R;if(w!==void 0&&this.options.lanes>1){E=w;const B=p[E],Y=B!==void 0?g[B]:void 0;R=Y?Y.end+this.options.gap:l+a}else{const B=this.options.lanes===1?g[b-1]:this.getFurthestMeasurement(g,b);R=B?B.end+this.options.gap:l+a,E=B?B.lane:b%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(b,E)}const C=d.get(x),L=typeof C=="number"?C:this.options.estimateSize(b),O=R+L;g[b]={index:b,start:R,size:L,end:O,key:x,lane:E},p[E]=b}return this.measurementsCache=g,g},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Cl(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,l,a,o)=>this.range=r.length>0&&l>0?wA({measurements:r,outerSize:l,scrollOffset:a,lanes:o}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Cl(()=>{let r=null,l=null;const a=this.calculateRange();return a&&(r=a.startIndex,l=a.endIndex),this.maybeNotify.updateDeps([this.isScrolling,r,l]),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,l]},(r,l,a,o,u)=>o===null||u===null?[]:r({startIndex:o,endIndex:u,overscan:l,count:a}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=r=>{const l=this.options.indexAttribute,a=r.getAttribute(l);return a?parseInt(a,10):(console.warn(`Missing attribute name '${l}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=r=>{var l;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const a=this.scrollState.index??((l=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:l.index);if(a!==void 0&&this.range){const o=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),u=Math.max(0,a-o),f=Math.min(this.options.count-1,a+o);return r>=u&&r<=f}return!0},this.measureElement=r=>{if(!r){this.elementsCache.forEach((u,f)=>{u.isConnected||(this.observer.unobserve(u),this.elementsCache.delete(f))});return}const l=this.indexFromElement(r),a=this.options.getItemKey(l),o=this.elementsCache.get(a);o!==r&&(o&&this.observer.unobserve(o),this.observer.observe(r),this.elementsCache.set(a,r)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(l)&&this.resizeItem(l,this.options.measureElement(r,void 0,this))},this.resizeItem=(r,l)=>{var a;const o=this.measurementsCache[r];if(!o)return;const u=this.itemSizeCache.get(o.key)??o.size,f=l-u;f!==0&&(((a=this.scrollState)==null?void 0:a.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,f,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=f,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,l)),this.notify(!1))},this.getVirtualItems=Cl(()=>[this.getVirtualIndexes(),this.getMeasurements()],(r,l)=>{const a=[];for(let o=0,u=r.length;o<u;o++){const f=r[o],d=l[f];a.push(d)}return a},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const l=this.getMeasurements();if(l.length!==0)return Yb(l[wv(0,l.length-1,a=>Yb(l[a]).start,r)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const r=this.scrollElement.document.documentElement;return this.options.horizontal?r.scrollWidth-this.scrollElement.innerWidth:r.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(r,l,a=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),u=this.getScrollOffset();l==="auto"&&(l=r>=u+o?"end":"start"),l==="center"?r+=(a-o)/2:l==="end"&&(r-=o);const f=this.getMaxScrollOffset();return Math.max(Math.min(f,r),0)},this.getOffsetForIndex=(r,l="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const a=this.getSize(),o=this.getScrollOffset(),u=this.measurementsCache[r];if(!u)return;if(l==="auto")if(u.end>=o+a-this.options.scrollPaddingEnd)l="end";else if(u.start<=o+this.options.scrollPaddingStart)l="start";else return[o,l];if(l==="end"&&r===this.options.count-1)return[this.getMaxScrollOffset(),l];const f=l==="end"?u.end+this.options.scrollPaddingEnd:u.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(f,l,u.size),l]},this.scrollToOffset=(r,{align:l="start",behavior:a="auto"}={})=>{const o=this.getOffsetForAlignment(r,l),u=this.now();this.scrollState={index:null,align:l,behavior:a,startedAt:u,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:a}),this.scheduleScrollReconcile()},this.scrollToIndex=(r,{align:l="auto",behavior:a="auto"}={})=>{r=Math.max(0,Math.min(r,this.options.count-1));const o=this.getOffsetForIndex(r,l);if(!o)return;const[u,f]=o,d=this.now();this.scrollState={index:r,align:f,behavior:a,startedAt:d,lastTargetOffset:u,stableFrames:0},this._scrollToOffset(u,{adjustments:void 0,behavior:a}),this.scheduleScrollReconcile()},this.scrollBy=(r,{behavior:l="auto"}={})=>{const a=this.getScrollOffset()+r,o=this.now();this.scrollState={index:null,align:"start",behavior:l,startedAt:o,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:l}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var r;const l=this.getMeasurements();let a;if(l.length===0)a=this.options.paddingStart;else if(this.options.lanes===1)a=((r=l[l.length-1])==null?void 0:r.end)??0;else{const o=Array(this.options.lanes).fill(null);let u=l.length-1;for(;u>=0&&o.some(f=>f===null);){const f=l[u];o[f.lane]===null&&(o[f.lane]=f.end),u--}a=Math.max(...o.filter(f=>f!==null))}return Math.max(a-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:l,behavior:a})=>{this.options.scrollToFn(r,{behavior:a,adjustments:l},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const l=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,a=l?l[0]:this.scrollState.lastTargetOffset,o=1,u=a!==this.scrollState.lastTargetOffset;if(!u&&hA(a,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=o){this.scrollState=null;return}}else this.scrollState.stableFrames=0,u&&(this.scrollState.lastTargetOffset=a,this.scrollState.behavior="auto",this._scrollToOffset(a,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const wv=(e,t,r,l)=>{for(;e<=t;){const a=(e+t)/2|0,o=r(a);if(o<l)e=a+1;else if(o>l)t=a-1;else return a}return e>0?e-1:0};function wA({measurements:e,outerSize:t,scrollOffset:r,lanes:l}){const a=e.length-1,o=d=>e[d].start;if(e.length<=l)return{startIndex:0,endIndex:a};let u=wv(0,a,o,r),f=u;if(l===1)for(;f<a&&e[f].end<r+t;)f++;else if(l>1){const d=Array(l).fill(0);for(;f<a&&d.some(g=>g<r+t);){const g=e[f];d[g.lane]=g.end,f++}const h=Array(l).fill(r+t);for(;u>=0&&h.some(g=>g>=r);){const g=e[u];h[g.lane]=g.start,u--}u=Math.max(0,u-u%l),f=Math.min(a,f+(l-1-f%l))}return{startIndex:u,endIndex:f}}const Jb=typeof document<"u"?F.useLayoutEffect:F.useEffect;function SA({useFlushSync:e=!0,...t}){const r=F.useReducer(()=>({}),{})[1],l={...t,onChange:(o,u)=>{var f;e&&u?dA.flushSync(r):r(),(f=t.onChange)==null||f.call(t,o,u)}},[a]=F.useState(()=>new _A(l));return a.setOptions(l),Jb(()=>a._didMount(),[]),Jb(()=>a._willUpdate()),a}function EA(e){return SA({observeElementRect:yA,observeElementOffset:bA,scrollToFn:vA,...e})}const ad=20;function CA(e,t){if(e.length===0)return[];const r=[],l=e[0];if(l.oldStart>1){const f=l.oldStart-1;r.push({id:"top",position:"top",oldStart:1,oldEnd:l.oldStart-1,newStart:1,newEnd:l.newStart-1,totalLines:f})}for(let f=0;f<e.length-1;f++){const d=e[f],h=e[f+1],g=d.oldStart+d.oldCount,p=h.oldStart,b=p-g;if(b>0){const x=d.newStart+d.newCount;r.push({id:`between-${f}`,position:"between",oldStart:g,oldEnd:p-1,newStart:x,newEnd:h.newStart-1,totalLines:b})}}const a=e[e.length-1],o=a.oldStart+a.oldCount,u=a.newStart+a.newCount;if(t!==null){const f=t-o+1;f>0&&r.push({id:"bottom",position:"bottom",oldStart:o,oldEnd:t,newStart:u,newEnd:u+f-1,totalLines:f})}return r}function kA(e,t,r,l){const a=[];for(let o=t;o<=r;o++){const u=e[o-1]??"";a.push({type:"context",content:u,oldLineNumber:o,newLineNumber:o+l})}return a}function AA(e,t,r){const l=e.oldStart+r.fromTop,a=e.oldEnd-r.fromBottom;if(l>a)return null;const o=a-l+1;return t==="all"||o<=ad?{oldStart:l,oldEnd:a}:t==="down"?{oldStart:l,oldEnd:Math.min(l+ad-1,a)}:{oldStart:Math.max(a-ad+1,l),oldEnd:a}}function TA(e,t,r){return{queryKey:["file-content",e,r],queryFn:()=>TC(e,r),enabled:t}}function RA(e,t){const r=document.elementFromPoint(e,t);if(!r)return null;const l=r.closest("td");if(!l)return null;const a=l.textContent?.trim();if(!a)return null;const o=parseInt(a,10);return isNaN(o)?null:o}function LA(e){const{filePath:t,onSelectionComplete:r}=e,[l,a]=F.useState(null),o=F.useRef(!1),u=F.useRef(0),f=F.useRef(l);f.current=l;const d=F.useCallback((b,x)=>{o.current=!0,u.current=0,a({side:x,anchorLine:b,currentLine:b})},[]),h=F.useCallback((b,x)=>{!o.current||!f.current||x===f.current.side&&a(w=>w&&{...w,currentLine:b})},[]);F.useEffect(()=>{const b=w=>{if(!o.current)return;u.current===0&&(u.current=w.clientX);const E=RA(u.current,w.clientY);E!==null&&a(R=>!R||R.currentLine===E?R:{...R,currentLine:E})},x=()=>{const w=f.current;if(!o.current||!w){o.current=!1;return}o.current=!1;const E=Math.min(w.anchorLine,w.currentLine),R=Math.max(w.anchorLine,w.currentLine);r({filePath:t,side:w.side,startLine:E,endLine:R}),a(null)};return window.addEventListener("mousemove",b),window.addEventListener("mouseup",x),()=>{window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",x)}},[t,r]);const g=F.useCallback((b,x)=>{if(!l||x!==l.side)return!1;const w=Math.min(l.anchorLine,l.currentLine),E=Math.max(l.anchorLine,l.currentLine);return b>=w&&b<=E},[l]),p=F.useCallback(()=>l?{startLine:Math.min(l.anchorLine,l.currentLine),endLine:Math.max(l.anchorLine,l.currentLine),side:l.side}:null,[l]);return{selectionState:l,handleLineMouseDown:d,handleLineMouseEnter:h,isLineInSelection:g,getSelectionRange:p}}function as(e){return v.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:v.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 6C2.5 4.75736 3.50736 3.75 4.75 3.75H19.25C20.4926 3.75 21.5 4.75736 21.5 6V16.5484C21.5 17.791 20.4926 18.7984 19.25 18.7984H7.635L3.75032 22.277C3.52993 22.4743 3.21411 22.5237 2.94401 22.403C2.67391 22.2823 2.5 22.0141 2.5 21.7182V6ZM4.75 5.25C4.33579 5.25 4 5.58579 4 6V20.0399L6.84795 17.4897C6.9855 17.3665 7.16364 17.2984 7.34827 17.2984H19.25C19.6642 17.2984 20 16.9626 20 16.5484V6C20 5.58579 19.6642 5.25 19.25 5.25H4.75Z",fill:"currentColor"})})}function Sv(e){const{children:t,className:r}=e;return v.jsx("span",{className:Tt("text-xs px-1.5 py-px rounded font-semibold shrink-0",r),children:t})}function OA(e){const{children:t,className:r,...l}=e;return v.jsx("button",{className:Tt("flex items-center justify-center rounded text-text-muted hover:bg-hover hover:text-text cursor-pointer",r),...l,children:t})}function NA(e){switch(e){case"added":return"A";case"deleted":return"D";case"renamed":return"R";case"copied":return"C";default:return"M"}}function DA(e){switch(e){case"added":return"Added";case"deleted":return"Deleted";case"renamed":return"Renamed";case"copied":return"Copied";default:return""}}function Ev(e){const{status:t,compact:r}=e;if(r)return v.jsx("span",{className:Tt("shrink-0 w-[18px] h-[18px] inline-flex items-center justify-center rounded text-[11px] font-bold font-mono",Qb(t)),children:NA(t)});const l=DA(t);return l?v.jsx(Sv,{className:Qb(t),children:l}):null}function sd(e,t,r){const l=[];let a=0,o=0,u=0;for(let f=0;f<r.length;f++)if(u+=r[f].text.length,u>t){o=f,u=u-r[f].text.length;break}for(;a<e.length&&o<r.length;){const f=r[o],d=u,h=d+f.text.length,g=Math.max(t+a,d),p=Math.min(t+e.length,h);if(g>=p){o++,u=h;continue}const b=g-t,x=p-t,w=e.slice(b,x);if(b>a&&l.push(v.jsx("span",{children:e.slice(a,b)},`gap-${a}`)),l.push(v.jsx("span",{style:f.color?{color:f.color}:void 0,children:w},`${o}-${b}`)),a=x,p>=h)o++,u=h;else break}return a<e.length&&l.push(v.jsx("span",{children:e.slice(a)},`rest-${a}`)),l}function MA(e){const{line:t,syntaxTokens:r}=e;if(!t.wordDiff||t.wordDiff.length===0)return v.jsx("span",{children:t.content||`
|
|
18
|
-
`});let l=0;return v.jsx(v.Fragment,{children:t.wordDiff.map((a,o)=>{const u=l;return a.type==="equal"?(l+=a.text.length,r&&r.length>0?v.jsx("span",{children:sd(a.text,u,r)},o):v.jsx("span",{children:a.text},o)):a.type==="delete"&&t.type==="delete"?(l+=a.text.length,r&&r.length>0?v.jsx("span",{className:"bg-diff-del-word rounded-sm",children:sd(a.text,u,r)},o):v.jsx("span",{className:"bg-diff-del-word rounded-sm",children:a.text},o)):a.type==="insert"&&t.type==="add"?(l+=a.text.length,r&&r.length>0?v.jsx("span",{className:"bg-diff-add-word rounded-sm",children:sd(a.text,u,r)},o):v.jsx("span",{className:"bg-diff-add-word rounded-sm",children:a.text},o)):null})})}function Cv(e,t){return e.wordDiff&&e.wordDiff.length>0?v.jsx(
|
|
19
|
-
`})}function jA(e){return v.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:v.jsx("path",{d:"M7.75 2a.75.75 0 01.75.75V7h4.25a.75.75 0 110 1.5H8.5v4.25a.75.75 0 11-1.5 0V8.5H2.75a.75.75 0 010-1.5H7V2.75A.75.75 0 017.75 2z"})})}const zA="w-12.5 min-w-12.5 px-2 text-right text-text-muted select-none cursor-pointer align-top text-xs leading-6 relative group/line";function Wo(e){const{lineNumber:t,className:r,isSelected:l,onMouseDown:a,onMouseEnter:o,onCommentClick:u,showCommentButton:f,forceShowButton:d}=e;return v.jsxs("td",{className:Tt(zA,r,l&&"bg-diff-comment-gutter"),onMouseDown:h=>{a&&t!==null&&(h.preventDefault(),a())},onMouseEnter:()=>{o&&t!==null&&o()},children:[f&&t!==null&&v.jsx("button",{className:Tt("absolute right-[-2px] top-0.5 w-5 h-5 flex items-center justify-center rounded bg-accent text-white cursor-pointer z-10 hover:bg-accent-hover",d?"opacity-100":"opacity-0 group-hover/row:opacity-100 group-hover/line:opacity-100"),onClick:h=>{h.stopPropagation(),h.preventDefault(),u&&u()},title:"Add comment",children:v.jsx(jA,{className:"w-2.5 h-2.5"})}),t??""]})}function kv(e){return v.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:v.jsx("path",{fillRule:"evenodd",d:"M2.854 3.146a.5.5 0 0 0-.708 0l-2 2a.5.5 0 0 0 0 .708l2 2a.5.5 0 1 0 .708-.708L1.707 6H7.5A4.5 4.5 0 1 1 3 10.5a.5.5 0 0 0-1 0A5.5 5.5 0 1 0 7.5 5H1.707l1.147-1.146a.5.5 0 0 0 0-.708Z"})})}function IA(e){switch(e){case"add":return"+";case"delete":return"-";default:return" "}}function PA(e){switch(e){case"add":return"text-added";case"delete":return"text-deleted";default:return"text-text-muted"}}function BA(e){const{line:t,syntaxTokens:r,expanded:l,isSelected:a,onLineMouseDown:o,onLineMouseEnter:u,onCommentClick:f,onUndo:d}=e,h=t.type==="delete"?"old":"new";h==="old"?t.oldLineNumber:t.newLineNumber;const g=l?"bg-diff-expanded-gutter":"";return v.jsxs("tr",{className:Tt("group/row font-mono text-sm leading-6 hover:brightness-[0.97]",l?"bg-diff-expanded-bg":yv(t.type)),children:[v.jsx(Wo,{lineNumber:t.oldLineNumber,className:Tt("border-r border-border-muted",g),showCommentButton:!!f&&t.type==="delete"&&t.oldLineNumber!==null,isSelected:a&&h==="old",onMouseDown:t.oldLineNumber!==null?()=>o?.(t.oldLineNumber,t.type==="delete"?"old":"new"):void 0,onMouseEnter:t.oldLineNumber!==null?()=>u?.(t.oldLineNumber,t.type==="delete"?"old":"new"):void 0,onCommentClick:t.oldLineNumber!==null&&t.type==="delete"?()=>f?.(t.oldLineNumber,"old"):void 0}),v.jsx(Wo,{lineNumber:t.newLineNumber,className:Tt("border-r border-border-muted",g),showCommentButton:!!f&&t.type!=="delete"&&t.newLineNumber!==null,isSelected:a&&h==="new",onMouseDown:t.newLineNumber!==null?()=>o?.(t.newLineNumber,t.type==="delete"?"old":"new"):void 0,onMouseEnter:t.newLineNumber!==null?()=>u?.(t.newLineNumber,t.type==="delete"?"old":"new"):void 0,onCommentClick:t.newLineNumber!==null&&t.type!=="delete"?()=>f?.(t.newLineNumber,"new"):void 0}),v.jsx("td",{className:Tt("w-5 min-w-5 px-1 text-center select-none align-top",PA(t.type),a&&"bg-diff-comment-bg"),children:IA(t.type)}),v.jsxs("td",{className:Tt("px-3 whitespace-pre-wrap break-all relative",a&&"bg-diff-comment-bg"),children:[v.jsx("span",{className:"inline",children:Cv(t,r)}),d&&v.jsxs("button",{onClick:d,className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-1 px-2 py-0.5 text-xs rounded bg-deleted/15 text-deleted hover:bg-deleted/25 transition-colors cursor-pointer opacity-0 group-hover/row:opacity-100",title:"Undo this change",children:[v.jsx(kv,{className:"w-3 h-3"}),"Undo"]})]})]})}function Go(){return v.jsx("svg",{className:"w-[14px] h-[14px]",viewBox:"0 0 16 16",fill:"currentColor",children:v.jsx("path",{d:"M2 2.75a.75.75 0 01.75-.75h1a.75.75 0 010 1.5h-1A.75.75 0 012 2.75zm4 0a.75.75 0 01.75-.75h1a.75.75 0 010 1.5h-1A.75.75 0 016 2.75zm4 0a.75.75 0 01.75-.75h1a.75.75 0 010 1.5h-1a.75.75 0 01-.75-.75zM7.47 5.97a.75.75 0 011.06 0l3.25 3.25a.75.75 0 11-1.06 1.06L8.5 8.06V14.25a.75.75 0 01-1.5 0V8.06L4.78 10.28a.75.75 0 01-1.06-1.06l3.25-3.25z"})})}function Yd(){return v.jsx("svg",{className:"w-[14px] h-[14px]",viewBox:"0 0 16 16",fill:"currentColor",children:v.jsx("path",{d:"M2 13.25a.75.75 0 00.75.75h1a.75.75 0 000-1.5h-1a.75.75 0 00-.75.75zm4 0a.75.75 0 00.75.75h1a.75.75 0 000-1.5h-1a.75.75 0 00-.75.75zm4 0a.75.75 0 00.75.75h1a.75.75 0 000-1.5h-1a.75.75 0 00-.75.75zM7.47 10.03a.75.75 0 001.06 0l3.25-3.25a.75.75 0 00-1.06-1.06L8.5 7.94V1.75a.75.75 0 00-1.5 0v6.19L4.78 5.72a.75.75 0 00-1.06 1.06l3.25 3.25z"})})}function UA(){return v.jsx("svg",{className:"w-[14px] h-[14px]",viewBox:"0 0 16 16",fill:"currentColor",children:v.jsx("path",{d:"M8.177 2.073a.25.25 0 00-.354 0L4.427 5.47a.25.25 0 00.177.427h6.792a.25.25 0 00.177-.427L8.177 2.073zM7.823 13.927a.25.25 0 00.354 0l3.396-3.397a.25.25 0 00-.177-.427H4.604a.25.25 0 00-.177.427l3.396 3.397z"})})}function zh(e){const{className:t="w-3 h-3"}=e;return v.jsx("span",{className:`inline-block border-2 border-text-muted/40 border-t-transparent rounded-full animate-spin ${t}`})}function Ia(e){const t=`@@ -${e.oldStart},${e.oldCount} +${e.newStart},${e.newCount} @@`;return e.context?`${t} ${e.context}`:t}const VA=40,Ll="w-[25px] min-w-[25px] bg-diff-hunk-bg border-r border-border-muted p-0",Lo="flex items-center justify-center w-full h-[18px] cursor-pointer text-diff-hunk-text/70 hover:text-diff-hunk-text transition-colors",Wb="bg-diff-hunk-bg";function Oo(){return v.jsx("td",{className:Ll,children:v.jsx("div",{className:"flex items-center justify-center h-[18px]",children:v.jsx(zh,{})})})}function Av(e){const{hunk:t,expandControls:r}=e;if(!r)return v.jsx("tr",{className:"bg-diff-hunk-bg group/hunk",children:v.jsx("td",{colSpan:4,className:"px-3 py-1 font-mono text-xs text-diff-hunk-text select-none",children:Ia(t)})});const{position:l,remainingLines:a,remainingUp:o,remainingDown:u,loadingDirection:f,wasExpanded:d,onExpand:h}=r;if(a<=0)return d?null:v.jsx("tr",{className:"bg-diff-hunk-bg group/hunk",children:v.jsx("td",{colSpan:4,className:"px-3 py-1 font-mono text-xs text-diff-hunk-text select-none",children:Ia(t)})});const g=a<=VA,p=o>0,b=u>0;return l==="top"?v.jsxs("tr",{className:"bg-diff-hunk-bg group/hunk",children:[f?v.jsx(Oo,{}):v.jsx("td",{className:Ll,children:v.jsx("button",{className:Lo,onClick:()=>h("up"),title:`Expand ${Math.min(a,20)} lines`,children:v.jsx(Go,{})})}),v.jsx("td",{colSpan:3,className:"px-3 py-1 font-mono text-xs text-diff-hunk-text select-none",children:Ia(t)})]}):g||!p&&b||p&&!b?v.jsxs("tr",{className:"bg-diff-hunk-bg group/hunk",children:[f?v.jsx(Oo,{}):v.jsx("td",{className:Ll,children:v.jsx("button",{className:Lo,onClick:()=>h(g?"all":p?"up":"down"),title:g?`Expand all ${a} lines`:`Expand ${Math.min(a,20)} lines`,children:g?v.jsx(UA,{}):p?v.jsx(Go,{}):v.jsx(Yd,{})})}),v.jsx("td",{colSpan:3,className:"px-3 py-1 font-mono text-xs text-diff-hunk-text select-none",children:Ia(t)})]}):v.jsxs(v.Fragment,{children:[v.jsxs("tr",{className:Wb,children:[f==="down"?v.jsx(Oo,{}):v.jsx("td",{className:Ll,children:v.jsx("button",{className:Lo,onClick:()=>h("down"),title:"Expand down",children:v.jsx(Yd,{})})}),v.jsx("td",{colSpan:3})]}),v.jsxs("tr",{className:"bg-diff-hunk-bg group/hunk",children:[v.jsx("td",{className:Ll}),v.jsx("td",{colSpan:3,className:"px-3 py-1 font-mono text-xs text-diff-hunk-text select-none",children:Ia(t)})]}),v.jsxs("tr",{className:Wb,children:[f==="up"?v.jsx(Oo,{}):v.jsx("td",{className:Ll,children:v.jsx("button",{className:Lo,onClick:()=>h("up"),title:"Expand up",children:v.jsx(Go,{})})}),v.jsx("td",{colSpan:3})]})]})}function bu(e){const{onSubmit:t,onCancel:r,placeholder:l="Leave a comment",submitLabel:a="Comment",autoFocus:o=!0,lineLabel:u}=e,[f,d]=F.useState(""),h=F.useRef(null);F.useEffect(()=>{o&&h.current&&h.current.focus()},[o]);const g=()=>{const b=f.trim();b&&(t(b),d(""))},p=b=>{if(b.key==="Enter"&&(b.metaKey||b.ctrlKey)){b.preventDefault(),g();return}b.key==="Escape"&&(b.preventDefault(),r())};return v.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-bg",children:[u&&v.jsx("div",{className:"px-3 py-1.5 bg-bg-secondary border-b border-border",children:v.jsx("span",{className:"text-xs text-text-secondary font-medium",children:u})}),v.jsx("textarea",{ref:h,value:f,onChange:b=>d(b.target.value),onKeyDown:p,placeholder:l,rows:3,className:"w-full px-3 py-2 text-sm bg-bg text-text resize-y outline-none placeholder:text-text-muted min-h-[80px] font-mono"}),v.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-bg-secondary border-t border-border",children:[v.jsx("div",{className:"flex-1"}),v.jsx("button",{onClick:r,className:"px-3 py-1.5 text-xs font-medium rounded-md border border-border text-text-secondary hover:bg-hover transition-colors cursor-pointer",children:"Cancel"}),v.jsx("button",{onClick:g,disabled:!f.trim(),className:"px-3 py-1.5 text-xs font-medium rounded-md bg-accent text-white hover:bg-accent-hover transition-colors disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",children:a})]})]})}function Tv(e,t){const r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const HA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,GA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,FA={};function e0(e,t){return(FA.jsx?GA:HA).test(e)}const qA=/[ \t\n\f\r]/g;function xu(e){return typeof e=="object"?e.type==="text"?t0(e.value):!1:t0(e)}function t0(e){return e.replace(qA,"")===""}class ss{constructor(t,r,l){this.normal=r,this.property=t,l&&(this.space=l)}}ss.prototype.normal={};ss.prototype.property={};ss.prototype.space=void 0;function Rv(e,t){const r={},l={};for(const a of e)Object.assign(r,a.property),Object.assign(l,a.normal);return new ss(r,l,t)}function Xd(e){return e.toLowerCase()}class on{constructor(t,r){this.attribute=r,this.property=t}}on.prototype.attribute="";on.prototype.booleanish=!1;on.prototype.boolean=!1;on.prototype.commaOrSpaceSeparated=!1;on.prototype.commaSeparated=!1;on.prototype.defined=!1;on.prototype.mustUseProperty=!1;on.prototype.number=!1;on.prototype.overloadedBoolean=!1;on.prototype.property="";on.prototype.spaceSeparated=!1;on.prototype.space=void 0;let $A=0;const Oe=Bi(),_t=Bi(),Kd=Bi(),ie=Bi(),rt=Bi(),Ml=Bi(),gn=Bi();function Bi(){return 2**++$A}const Zd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Oe,booleanish:_t,commaOrSpaceSeparated:gn,commaSeparated:Ml,number:ie,overloadedBoolean:Kd,spaceSeparated:rt},Symbol.toStringTag,{value:"Module"})),od=Object.keys(Zd);class Ih extends on{constructor(t,r,l,a){let o=-1;if(super(t,r),n0(this,"space",a),typeof l=="number")for(;++o<od.length;){const u=od[o];n0(this,od[o],(l&Zd[u])===Zd[u])}}}Ih.prototype.defined=!0;function n0(e,t,r){r&&(e[t]=r)}function Bl(e){const t={},r={};for(const[l,a]of Object.entries(e.properties)){const o=new Ih(l,e.transform(e.attributes||{},l),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(o.mustUseProperty=!0),t[l]=o,r[Xd(l)]=l,r[Xd(o.attribute)]=l}return new ss(t,r,e.space)}const Lv=Bl({properties:{ariaActiveDescendant:null,ariaAtomic:_t,ariaAutoComplete:null,ariaBusy:_t,ariaChecked:_t,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:rt,ariaCurrent:null,ariaDescribedBy:rt,ariaDetails:null,ariaDisabled:_t,ariaDropEffect:rt,ariaErrorMessage:null,ariaExpanded:_t,ariaFlowTo:rt,ariaGrabbed:_t,ariaHasPopup:null,ariaHidden:_t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:rt,ariaLevel:ie,ariaLive:null,ariaModal:_t,ariaMultiLine:_t,ariaMultiSelectable:_t,ariaOrientation:null,ariaOwns:rt,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:_t,ariaReadOnly:_t,ariaRelevant:null,ariaRequired:_t,ariaRoleDescription:rt,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:_t,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ov(e,t){return t in e?e[t]:t}function Nv(e,t){return Ov(e,t.toLowerCase())}const QA=Bl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ml,acceptCharset:rt,accessKey:rt,action:null,allow:null,allowFullScreen:Oe,allowPaymentRequest:Oe,allowUserMedia:Oe,alt:null,as:null,async:Oe,autoCapitalize:null,autoComplete:rt,autoFocus:Oe,autoPlay:Oe,blocking:rt,capture:null,charSet:null,checked:Oe,cite:null,className:rt,cols:ie,colSpan:null,content:null,contentEditable:_t,controls:Oe,controlsList:rt,coords:ie|Ml,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Oe,defer:Oe,dir:null,dirName:null,disabled:Oe,download:Kd,draggable:_t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Oe,formTarget:null,headers:rt,height:ie,hidden:Kd,high:ie,href:null,hrefLang:null,htmlFor:rt,httpEquiv:rt,id:null,imageSizes:null,imageSrcSet:null,inert:Oe,inputMode:null,integrity:null,is:null,isMap:Oe,itemId:null,itemProp:rt,itemRef:rt,itemScope:Oe,itemType:rt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Oe,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:Oe,muted:Oe,name:null,nonce:null,noModule:Oe,noValidate:Oe,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:Oe,optimum:ie,pattern:null,ping:rt,placeholder:null,playsInline:Oe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Oe,referrerPolicy:null,rel:rt,required:Oe,reversed:Oe,rows:ie,rowSpan:ie,sandbox:rt,scope:null,scoped:Oe,seamless:Oe,selected:Oe,shadowRootClonable:Oe,shadowRootDelegatesFocus:Oe,shadowRootMode:null,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:_t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:Oe,useMap:null,value:_t,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:rt,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Oe,declare:Oe,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:Oe,noHref:Oe,noShade:Oe,noWrap:Oe,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:_t,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Oe,disableRemotePlayback:Oe,prefix:null,property:null,results:ie,security:null,unselectable:null},space:"html",transform:Nv}),YA=Bl({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:gn,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:rt,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:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:Oe,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,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:Ml,g2:Ml,glyphName:Ml,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,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:ie,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:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:rt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gn,rev:gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gn,requiredFeatures:gn,requiredFonts:gn,requiredFormats:gn,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:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:gn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gn,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ov}),Dv=Bl({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()}}),Mv=Bl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Nv}),jv=Bl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),XA={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"},KA=/[A-Z]/g,r0=/-[a-z]/g,ZA=/^data[-\w.:]+$/i;function zv(e,t){const r=Xd(t);let l=t,a=on;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&ZA.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(r0,WA);l="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!r0.test(o)){let u=o.replace(KA,JA);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}a=Ih}return new a(l,t)}function JA(e){return"-"+e.toLowerCase()}function WA(e){return e.charAt(1).toUpperCase()}const Iv=Rv([Lv,QA,Dv,Mv,jv],"html"),os=Rv([Lv,YA,Dv,Mv,jv],"svg");function Pv(e){return e.join(" ").trim()}var kl={},ud,i0;function eT(){if(i0)return ud;i0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
|
|
20
|
-
`,h="/",g="*",p="",b="comment",x="declaration";function w(R,C){if(typeof R!="string")throw new TypeError("First argument must be a string");if(!R)return[];C=C||{};var L=1,O=1;function B(le){var ne=le.match(t);ne&&(L+=ne.length);var z=le.lastIndexOf(d);O=~z?le.length-z:O+le.length}function Y(){var le={line:L,column:O};return function(ne){return ne.position=new j(le),oe(),ne}}function j(le){this.start=le,this.end={line:L,column:O},this.source=C.source}j.prototype.content=R;function q(le){var ne=new Error(C.source+":"+L+":"+O+": "+le);if(ne.reason=le,ne.filename=C.source,ne.line=L,ne.column=O,ne.source=R,!C.silent)throw ne}function G(le){var ne=le.exec(R);if(ne){var z=ne[0];return B(z),R=R.slice(z.length),ne}}function oe(){G(r)}function P(le){var ne;for(le=le||[];ne=X();)ne!==!1&&le.push(ne);return le}function X(){var le=Y();if(!(h!=R.charAt(0)||g!=R.charAt(1))){for(var ne=2;p!=R.charAt(ne)&&(g!=R.charAt(ne)||h!=R.charAt(ne+1));)++ne;if(ne+=2,p===R.charAt(ne-1))return q("End of comment missing");var z=R.slice(2,ne-2);return O+=2,B(z),R=R.slice(ne),O+=2,le({type:b,comment:z})}}function te(){var le=Y(),ne=G(l);if(ne){if(X(),!G(a))return q("property missing ':'");var z=G(o),Z=le({type:x,property:E(ne[0].replace(e,p)),value:z?E(z[0].replace(e,p)):p});return G(u),Z}}function fe(){var le=[];P(le);for(var ne;ne=te();)ne!==!1&&(le.push(ne),P(le));return le}return oe(),fe()}function E(R){return R?R.replace(f,p):p}return ud=w,ud}var l0;function tT(){if(l0)return kl;l0=1;var e=kl&&kl.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(kl,"__esModule",{value:!0}),kl.default=r;const t=e(eT());function r(l,a){let o=null;if(!l||typeof l!="string")return o;const u=(0,t.default)(l),f=typeof a=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:g}=d;f?a(h,g,d):g&&(o=o||{},o[h]=g)}),o}return kl}var Pa={},a0;function nT(){if(a0)return Pa;a0=1,Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(h){return!h||r.test(h)||e.test(h)},u=function(h,g){return g.toUpperCase()},f=function(h,g){return"".concat(g,"-")},d=function(h,g){return g===void 0&&(g={}),o(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(a,f):h=h.replace(l,f),h.replace(t,u))};return Pa.camelCase=d,Pa}var Ba,s0;function rT(){if(s0)return Ba;s0=1;var e=Ba&&Ba.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(tT()),r=nT();function l(a,o){var u={};return!a||typeof a!="string"||(0,t.default)(a,function(f,d){f&&d&&(u[(0,r.camelCase)(f,o)]=d)}),u}return l.default=l,Ba=l,Ba}var iT=rT();const lT=gu(iT),Bv=Uv("end"),Ph=Uv("start");function Uv(e){return t;function t(r){const l=r&&r.position&&r.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function aT(e){const t=Ph(e),r=Bv(e);if(t&&r)return{start:t,end:r}}function Fa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?o0(e.position):"start"in e||"end"in e?o0(e):"line"in e||"column"in e?Jd(e):""}function Jd(e){return u0(e&&e.line)+":"+u0(e&&e.column)}function o0(e){return Jd(e&&e.start)+"-"+Jd(e&&e.end)}function u0(e){return e&&typeof e=="number"?e:1}class Qt extends Error{constructor(t,r,l){super(),typeof r=="string"&&(l=r,r=void 0);let a="",o={},u=!1;if(r&&("line"in r&&"column"in r?o={place:r}:"start"in r&&"end"in r?o={place:r}:"type"in r?o={ancestors:[r],place:r.position}:o={...r}),typeof t=="string"?a=t:!o.cause&&t&&(u=!0,a=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof l=="string"){const d=l.indexOf(":");d===-1?o.ruleId=l:(o.source=l.slice(0,d),o.ruleId=l.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.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=a,this.line=f?f.line:void 0,this.name=Fa(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=u&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Qt.prototype.file="";Qt.prototype.name="";Qt.prototype.reason="";Qt.prototype.message="";Qt.prototype.stack="";Qt.prototype.column=void 0;Qt.prototype.line=void 0;Qt.prototype.ancestors=void 0;Qt.prototype.cause=void 0;Qt.prototype.fatal=void 0;Qt.prototype.place=void 0;Qt.prototype.ruleId=void 0;Qt.prototype.source=void 0;const Bh={}.hasOwnProperty,sT=new Map,oT=/[A-Z]/g,uT=new Set(["table","tbody","thead","tfoot","tr"]),cT=new Set(["td","th"]),Vv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function fT(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let l;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=xT(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");l=bT(r,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:l,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"?os:Iv,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Hv(a,e,void 0);return o&&typeof o!="string"?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function Hv(e,t,r){if(t.type==="element")return dT(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return hT(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return pT(e,t,r);if(t.type==="mdxjsEsm")return mT(e,t);if(t.type==="root")return gT(e,t,r);if(t.type==="text")return yT(e,t)}function dT(e,t,r){const l=e.schema;let a=l;t.tagName.toLowerCase()==="svg"&&l.space==="html"&&(a=os,e.schema=a),e.ancestors.push(t);const o=Fv(e,t.tagName,!1),u=vT(e,t);let f=Vh(e,t);return uT.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!xu(d):!0})),Gv(e,u,o,t),Uh(u,f),e.ancestors.pop(),e.schema=l,e.create(t,o,u,r)}function hT(e,t){if(t.data&&t.data.estree&&e.evaluater){const l=t.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}Za(e,t.position)}function mT(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Za(e,t.position)}function pT(e,t,r){const l=e.schema;let a=l;t.name==="svg"&&l.space==="html"&&(a=os,e.schema=a),e.ancestors.push(t);const o=t.name===null?e.Fragment:Fv(e,t.name,!0),u=_T(e,t),f=Vh(e,t);return Gv(e,u,o,t),Uh(u,f),e.ancestors.pop(),e.schema=l,e.create(t,o,u,r)}function gT(e,t,r){const l={};return Uh(l,Vh(e,t)),e.create(t,e.Fragment,l,r)}function yT(e,t){return t.value}function Gv(e,t,r,l){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=l)}function Uh(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function bT(e,t,r){return l;function l(a,o,u,f){const h=Array.isArray(u.children)?r:t;return f?h(o,u,f):h(o,u)}}function xT(e,t){return r;function r(l,a,o,u){const f=Array.isArray(o.children),d=Ph(l);return t(a,o,u,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function vT(e,t){const r={};let l,a;for(a in t.properties)if(a!=="children"&&Bh.call(t.properties,a)){const o=wT(e,a,t.properties[a]);if(o){const[u,f]=o;e.tableCellAlignToStyle&&u==="align"&&typeof f=="string"&&cT.has(t.tagName)?l=f:r[u]=f}}if(l){const o=r.style||(r.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return r}function _T(e,t){const r={};for(const l of t.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const o=l.data.estree.body[0];o.type;const u=o.expression;u.type;const f=u.properties[0];f.type,Object.assign(r,e.evaluater.evaluateExpression(f.argument))}else Za(e,t.position);else{const a=l.name;let o;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const f=l.value.data.estree.body[0];f.type,o=e.evaluater.evaluateExpression(f.expression)}else Za(e,t.position);else o=l.value===null?!0:l.value;r[a]=o}return r}function Vh(e,t){const r=[];let l=-1;const a=e.passKeys?new Map:sT;for(;++l<t.children.length;){const o=t.children[l];let u;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const h=a.get(d)||0;u=d+"-"+h,a.set(d,h+1)}}const f=Hv(e,o,u);f!==void 0&&r.push(f)}return r}function wT(e,t,r){const l=zv(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=l.commaSeparated?Tv(r):Pv(r)),l.property==="style"){let a=typeof r=="object"?r:ST(e,String(r));return e.stylePropertyNameCase==="css"&&(a=ET(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&l.space?XA[l.property]||l.property:l.attribute,r]}}function ST(e,t){try{return lT(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const l=r,a=new Qt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Vv+"#cannot-parse-style-attribute",a}}function Fv(e,t,r){let l;if(!r)l={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let o=-1,u;for(;++o<a.length;){const f=e0(a[o])?{type:"Identifier",name:a[o]}:{type:"Literal",value:a[o]};u=u?{type:"MemberExpression",object:u,property:f,computed:!!(o&&f.type==="Literal"),optional:!1}:f}l=u}else l=e0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(l.type==="Literal"){const a=l.value;return Bh.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(l);Za(e)}function Za(e,t){const r=new Qt("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=Vv+"#cannot-handle-mdx-estrees-without-createevaluater",r}function ET(e){const t={};let r;for(r in e)Bh.call(e,r)&&(t[CT(r)]=e[r]);return t}function CT(e){let t=e.replace(oT,kT);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function kT(e){return"-"+e.toLowerCase()}const cd={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"]},AT={};function Hh(e,t){const r=AT,l=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,a=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return qv(e,l,a)}function qv(e,t,r){if(TT(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 c0(e.children,t,r)}return Array.isArray(e)?c0(e,t,r):""}function c0(e,t,r){const l=[];let a=-1;for(;++a<e.length;)l[a]=qv(e[a],t,r);return l.join("")}function TT(e){return!!(e&&typeof e=="object")}const f0=document.createElement("i");function Gh(e){const t="&"+e+";";f0.innerHTML=t;const r=f0.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function yn(e,t,r,l){const a=e.length;let o=0,u;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,r=r>0?r:0,l.length<1e4)u=Array.from(l),u.unshift(t,r),e.splice(...u);else for(r&&e.splice(t,r);o<l.length;)u=l.slice(o,o+1e4),u.unshift(t,0),e.splice(...u),o+=1e4,t+=1e4}function Nn(e,t){return e.length>0?(yn(e,e.length,0,t),e):t}const d0={}.hasOwnProperty;function $v(e){const t={};let r=-1;for(;++r<e.length;)RT(t,e[r]);return t}function RT(e,t){let r;for(r in t){const a=(d0.call(e,r)?e[r]:void 0)||(e[r]={}),o=t[r];let u;if(o)for(u in o){d0.call(a,u)||(a[u]=[]);const f=o[u];LT(a[u],Array.isArray(f)?f:f?[f]:[])}}}function LT(e,t){let r=-1;const l=[];for(;++r<t.length;)(t[r].add==="after"?e:l).push(t[r]);yn(e,0,0,l)}function Qv(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 Hn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Kt=oi(/[A-Za-z]/),$t=oi(/[\dA-Za-z]/),OT=oi(/[#-'*+\--9=?A-Z^-~]/);function eu(e){return e!==null&&(e<32||e===127)}const Wd=oi(/\d/),NT=oi(/[\dA-Fa-f]/),DT=oi(/[!-/:-@[-`{-~]/);function Se(e){return e!==null&&e<-2}function nt(e){return e!==null&&(e<0||e===32)}function Pe(e){return e===-2||e===-1||e===32}const vu=oi(new RegExp("\\p{P}|\\p{S}","u")),zi=oi(/\s/);function oi(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Ul(e){const t=[];let r=-1,l=0,a=0;for(;++r<e.length;){const o=e.charCodeAt(r);let u="";if(o===37&&$t(e.charCodeAt(r+1))&&$t(e.charCodeAt(r+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(u=String.fromCharCode(o));else if(o>55295&&o<57344){const f=e.charCodeAt(r+1);o<56320&&f>56319&&f<57344?(u=String.fromCharCode(o,f),a=1):u="�"}else u=String.fromCharCode(o);u&&(t.push(e.slice(l,r),encodeURIComponent(u)),l=r+a+1,u=""),a&&(r+=a,a=0)}return t.join("")+e.slice(l)}function Ge(e,t,r,l){const a=l?l-1:Number.POSITIVE_INFINITY;let o=0;return u;function u(d){return Pe(d)?(e.enter(r),f(d)):t(d)}function f(d){return Pe(d)&&o++<a?(e.consume(d),f):(e.exit(r),t(d))}}const MT={tokenize:jT};function jT(e){const t=e.attempt(this.parser.constructs.contentInitial,l,a);let r;return t;function l(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ge(e,t,"linePrefix")}function a(f){return e.enter("paragraph"),o(f)}function o(f){const d=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=d),r=d,u(f)}function u(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Se(f)?(e.consume(f),e.exit("chunkText"),o):(e.consume(f),u)}}const zT={tokenize:IT},h0={tokenize:PT};function IT(e){const t=this,r=[];let l=0,a,o,u;return f;function f(O){if(l<r.length){const B=r[l];return t.containerState=B[1],e.attempt(B[0].continuation,d,h)(O)}return h(O)}function d(O){if(l++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&L();const B=t.events.length;let Y=B,j;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){j=t.events[Y][1].end;break}C(l);let q=B;for(;q<t.events.length;)t.events[q][1].end={...j},q++;return yn(t.events,Y+1,0,t.events.slice(B)),t.events.length=q,h(O)}return f(O)}function h(O){if(l===r.length){if(!a)return b(O);if(a.currentConstruct&&a.currentConstruct.concrete)return w(O);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(h0,g,p)(O)}function g(O){return a&&L(),C(l),b(O)}function p(O){return t.parser.lazy[t.now().line]=l!==r.length,u=t.now().offset,w(O)}function b(O){return t.containerState={},e.attempt(h0,x,w)(O)}function x(O){return l++,r.push([t.currentConstruct,t.containerState]),b(O)}function w(O){if(O===null){a&&L(),C(0),e.consume(O);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:o}),E(O)}function E(O){if(O===null){R(e.exit("chunkFlow"),!0),C(0),e.consume(O);return}return Se(O)?(e.consume(O),R(e.exit("chunkFlow")),l=0,t.interrupt=void 0,f):(e.consume(O),E)}function R(O,B){const Y=t.sliceStream(O);if(B&&Y.push(null),O.previous=o,o&&(o.next=O),o=O,a.defineSkip(O.start),a.write(Y),t.parser.lazy[O.start.line]){let j=a.events.length;for(;j--;)if(a.events[j][1].start.offset<u&&(!a.events[j][1].end||a.events[j][1].end.offset>u))return;const q=t.events.length;let G=q,oe,P;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){if(oe){P=t.events[G][1].end;break}oe=!0}for(C(l),j=q;j<t.events.length;)t.events[j][1].end={...P},j++;yn(t.events,G+1,0,t.events.slice(q)),t.events.length=j}}function C(O){let B=r.length;for(;B-- >O;){const Y=r[B];t.containerState=Y[1],Y[0].exit.call(t,e)}r.length=O}function L(){a.write([null]),o=void 0,a=void 0,t.containerState._closeFlow=void 0}}function PT(e,t,r){return Ge(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Il(e){if(e===null||nt(e)||zi(e))return 1;if(vu(e))return 2}function _u(e,t,r){const l=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!l.includes(o)&&(t=o(t,r),l.push(o))}return t}const eh={name:"attention",resolveAll:BT,tokenize:UT};function BT(e,t){let r=-1,l,a,o,u,f,d,h,g;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(l=r;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&t.sliceSerialize(e[l][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[l][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;d=e[l][1].end.offset-e[l][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const p={...e[l][1].end},b={...e[r][1].start};m0(p,-d),m0(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:p,end:{...e[l][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:b},o={type:d>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[r][1].start}},a={type:d>1?"strong":"emphasis",start:{...u.start},end:{...f.end}},e[l][1].end={...u.start},e[r][1].start={...f.end},h=[],e[l][1].end.offset-e[l][1].start.offset&&(h=Nn(h,[["enter",e[l][1],t],["exit",e[l][1],t]])),h=Nn(h,[["enter",a,t],["enter",u,t],["exit",u,t],["enter",o,t]]),h=Nn(h,_u(t.parser.constructs.insideSpan.null,e.slice(l+1,r),t)),h=Nn(h,[["exit",o,t],["enter",f,t],["exit",f,t],["exit",a,t]]),e[r][1].end.offset-e[r][1].start.offset?(g=2,h=Nn(h,[["enter",e[r][1],t],["exit",e[r][1],t]])):g=0,yn(e,l-1,r-l+3,h),r=l+h.length-g-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function UT(e,t){const r=this.parser.constructs.attentionMarkers.null,l=this.previous,a=Il(l);let o;return u;function u(d){return o=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===o)return e.consume(d),f;const h=e.exit("attentionSequence"),g=Il(d),p=!g||g===2&&a||r.includes(d),b=!a||a===2&&g||r.includes(l);return h._open=!!(o===42?p:p&&(a||!b)),h._close=!!(o===42?b:b&&(g||!p)),t(d)}}function m0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const VT={name:"autolink",tokenize:HT};function HT(e,t,r){let l=0;return a;function a(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(x){return Kt(x)?(e.consume(x),u):x===64?r(x):h(x)}function u(x){return x===43||x===45||x===46||$t(x)?(l=1,f(x)):h(x)}function f(x){return x===58?(e.consume(x),l=0,d):(x===43||x===45||x===46||$t(x))&&l++<32?(e.consume(x),f):(l=0,h(x))}function d(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||eu(x)?r(x):(e.consume(x),d)}function h(x){return x===64?(e.consume(x),g):OT(x)?(e.consume(x),h):r(x)}function g(x){return $t(x)?p(x):r(x)}function p(x){return x===46?(e.consume(x),l=0,g):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):b(x)}function b(x){if((x===45||$t(x))&&l++<63){const w=x===45?b:p;return e.consume(x),w}return r(x)}}const us={partial:!0,tokenize:GT};function GT(e,t,r){return l;function l(o){return Pe(o)?Ge(e,a,"linePrefix")(o):a(o)}function a(o){return o===null||Se(o)?t(o):r(o)}}const Yv={continuation:{tokenize:qT},exit:$T,name:"blockQuote",tokenize:FT};function FT(e,t,r){const l=this;return a;function a(u){if(u===62){const f=l.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),o}return r(u)}function o(u){return Pe(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function qT(e,t,r){const l=this;return a;function a(u){return Pe(u)?Ge(e,o,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):o(u)}function o(u){return e.attempt(Yv,t,r)(u)}}function $T(e){e.exit("blockQuote")}const Xv={name:"characterEscape",tokenize:QT};function QT(e,t,r){return l;function l(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),a}function a(o){return DT(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}const Kv={name:"characterReference",tokenize:YT};function YT(e,t,r){const l=this;let a=0,o,u;return f;function f(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,u=$t,g(p))}function h(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,u=NT,g):(e.enter("characterReferenceValue"),o=7,u=Wd,g(p))}function g(p){if(p===59&&a){const b=e.exit("characterReferenceValue");return u===$t&&!Gh(l.sliceSerialize(b))?r(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(p)&&a++<o?(e.consume(p),g):r(p)}}const p0={partial:!0,tokenize:KT},g0={concrete:!0,name:"codeFenced",tokenize:XT};function XT(e,t,r){const l=this,a={partial:!0,tokenize:Y};let o=0,u=0,f;return d;function d(j){return h(j)}function h(j){const q=l.events[l.events.length-1];return o=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,f=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(j)}function g(j){return j===f?(u++,e.consume(j),g):u<3?r(j):(e.exit("codeFencedFenceSequence"),Pe(j)?Ge(e,p,"whitespace")(j):p(j))}function p(j){return j===null||Se(j)?(e.exit("codeFencedFence"),l.interrupt?t(j):e.check(p0,E,B)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(j))}function b(j){return j===null||Se(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(j)):Pe(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ge(e,x,"whitespace")(j)):j===96&&j===f?r(j):(e.consume(j),b)}function x(j){return j===null||Se(j)?p(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(j))}function w(j){return j===null||Se(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(j)):j===96&&j===f?r(j):(e.consume(j),w)}function E(j){return e.attempt(a,B,R)(j)}function R(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),C}function C(j){return o>0&&Pe(j)?Ge(e,L,"linePrefix",o+1)(j):L(j)}function L(j){return j===null||Se(j)?e.check(p0,E,B)(j):(e.enter("codeFlowValue"),O(j))}function O(j){return j===null||Se(j)?(e.exit("codeFlowValue"),L(j)):(e.consume(j),O)}function B(j){return e.exit("codeFenced"),t(j)}function Y(j,q,G){let oe=0;return P;function P(ne){return j.enter("lineEnding"),j.consume(ne),j.exit("lineEnding"),X}function X(ne){return j.enter("codeFencedFence"),Pe(ne)?Ge(j,te,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ne):te(ne)}function te(ne){return ne===f?(j.enter("codeFencedFenceSequence"),fe(ne)):G(ne)}function fe(ne){return ne===f?(oe++,j.consume(ne),fe):oe>=u?(j.exit("codeFencedFenceSequence"),Pe(ne)?Ge(j,le,"whitespace")(ne):le(ne)):G(ne)}function le(ne){return ne===null||Se(ne)?(j.exit("codeFencedFence"),q(ne)):G(ne)}}}function KT(e,t,r){const l=this;return a;function a(u){return u===null?r(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o)}function o(u){return l.parser.lazy[l.now().line]?r(u):t(u)}}const fd={name:"codeIndented",tokenize:JT},ZT={partial:!0,tokenize:WT};function JT(e,t,r){const l=this;return a;function a(h){return e.enter("codeIndented"),Ge(e,o,"linePrefix",5)(h)}function o(h){const g=l.events[l.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?u(h):r(h)}function u(h){return h===null?d(h):Se(h)?e.attempt(ZT,u,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Se(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),t(h)}}function WT(e,t,r){const l=this;return a;function a(u){return l.parser.lazy[l.now().line]?r(u):Se(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):Ge(e,o,"linePrefix",5)(u)}function o(u){const f=l.events[l.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):Se(u)?a(u):r(u)}}const e2={name:"codeText",previous:n2,resolve:t2,tokenize:r2};function t2(e){let t=e.length-4,r=3,l,a;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(l=r;++l<t;)if(e[l][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(l=r-1,t++;++l<=t;)a===void 0?l!==t&&e[l][1].type!=="lineEnding"&&(a=l):(l===t||e[l][1].type==="lineEnding")&&(e[a][1].type="codeTextData",l!==a+2&&(e[a][1].end=e[l-1][1].end,e.splice(a+2,l-a-2),t-=l-a-2,l=a+2),a=void 0);return e}function n2(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function r2(e,t,r){let l=0,a,o;return u;function u(p){return e.enter("codeText"),e.enter("codeTextSequence"),f(p)}function f(p){return p===96?(e.consume(p),l++,f):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?r(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(o=e.enter("codeTextSequence"),a=0,g(p)):Se(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||Se(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),h)}function g(p){return p===96?(e.consume(p),a++,g):a===l?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(o.type="codeTextData",h(p))}}class i2{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 l=r??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(t,l):t>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(t,r,l){const a=r||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return l&&Ua(this.left,l),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),Ua(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ua(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);Ua(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ua(this.left,r.reverse())}}}function Ua(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 Zv(e){const t={};let r=-1,l,a,o,u,f,d,h;const g=new i2(e);for(;++r<g.length;){for(;r in t;)r=t[r];if(l=g.get(r),r&&l[1].type==="chunkFlow"&&g.get(r-1)[1].type==="listItemPrefix"&&(d=l[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(l[0]==="enter")l[1].contentType&&(Object.assign(t,l2(g,r)),r=t[r],h=!0);else if(l[1]._container){for(o=r,a=void 0;o--;)if(u=g.get(o),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(a&&(g.get(a)[1].type="lineEndingBlank"),u[1].type="lineEnding",a=o);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;a&&(l[1].end={...g.get(a)[1].start},f=g.slice(a,r),f.unshift(l),g.splice(a,r-a+1,f))}}return yn(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function l2(e,t){const r=e.get(t)[1],l=e.get(t)[2];let a=t-1;const o=[];let u=r._tokenizer;u||(u=l.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const f=u.events,d=[],h={};let g,p,b=-1,x=r,w=0,E=0;const R=[E];for(;x;){for(;e.get(++a)[1]!==x;);o.push(a),x._tokenizer||(g=l.sliceStream(x),x.next||g.push(null),p&&u.defineSkip(x.start),x._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(g),x._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),p=x,x=x.next}for(x=r;++b<f.length;)f[b][0]==="exit"&&f[b-1][0]==="enter"&&f[b][1].type===f[b-1][1].type&&f[b][1].start.line!==f[b][1].end.line&&(E=b+1,R.push(E),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(u.events=[],x?(x._tokenizer=void 0,x.previous=void 0):R.pop(),b=R.length;b--;){const C=f.slice(R[b],R[b+1]),L=o.pop();d.push([L,L+C.length-1]),e.splice(L,2,C)}for(d.reverse(),b=-1;++b<d.length;)h[w+d[b][0]]=w+d[b][1],w+=d[b][1]-d[b][0]-1;return h}const a2={resolve:o2,tokenize:u2},s2={partial:!0,tokenize:c2};function o2(e){return Zv(e),e}function u2(e,t){let r;return l;function l(f){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),a(f)}function a(f){return f===null?o(f):Se(f)?e.check(s2,u,o)(f):(e.consume(f),a)}function o(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function u(f){return e.consume(f),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,a}}function c2(e,t,r){const l=this;return a;function a(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Ge(e,o,"linePrefix")}function o(u){if(u===null||Se(u))return r(u);const f=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):e.interrupt(l.parser.constructs.flow,r,t)(u)}}function Jv(e,t,r,l,a,o,u,f,d){const h=d||Number.POSITIVE_INFINITY;let g=0;return p;function p(C){return C===60?(e.enter(l),e.enter(a),e.enter(o),e.consume(C),e.exit(o),b):C===null||C===32||C===41||eu(C)?r(C):(e.enter(l),e.enter(u),e.enter(f),e.enter("chunkString",{contentType:"string"}),E(C))}function b(C){return C===62?(e.enter(o),e.consume(C),e.exit(o),e.exit(a),e.exit(l),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),x(C))}function x(C){return C===62?(e.exit("chunkString"),e.exit(f),b(C)):C===null||C===60||Se(C)?r(C):(e.consume(C),C===92?w:x)}function w(C){return C===60||C===62||C===92?(e.consume(C),x):x(C)}function E(C){return!g&&(C===null||C===41||nt(C))?(e.exit("chunkString"),e.exit(f),e.exit(u),e.exit(l),t(C)):g<h&&C===40?(e.consume(C),g++,E):C===41?(e.consume(C),g--,E):C===null||C===32||C===40||eu(C)?r(C):(e.consume(C),C===92?R:E)}function R(C){return C===40||C===41||C===92?(e.consume(C),E):E(C)}}function Wv(e,t,r,l,a,o){const u=this;let f=0,d;return h;function h(x){return e.enter(l),e.enter(a),e.consume(x),e.exit(a),e.enter(o),g}function g(x){return f>999||x===null||x===91||x===93&&!d||x===94&&!f&&"_hiddenFootnoteSupport"in u.parser.constructs?r(x):x===93?(e.exit(o),e.enter(a),e.consume(x),e.exit(a),e.exit(l),t):Se(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===null||x===91||x===93||Se(x)||f++>999?(e.exit("chunkString"),g(x)):(e.consume(x),d||(d=!Pe(x)),x===92?b:p)}function b(x){return x===91||x===92||x===93?(e.consume(x),f++,p):p(x)}}function e1(e,t,r,l,a,o){let u;return f;function f(b){return b===34||b===39||b===40?(e.enter(l),e.enter(a),e.consume(b),e.exit(a),u=b===40?41:b,d):r(b)}function d(b){return b===u?(e.enter(a),e.consume(b),e.exit(a),e.exit(l),t):(e.enter(o),h(b))}function h(b){return b===u?(e.exit(o),d(u)):b===null?r(b):Se(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Ge(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===u||b===null||Se(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?p:g)}function p(b){return b===u||b===92?(e.consume(b),g):g(b)}}function qa(e,t){let r;return l;function l(a){return Se(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),r=!0,l):Pe(a)?Ge(e,l,r?"linePrefix":"lineSuffix")(a):t(a)}}const f2={name:"definition",tokenize:h2},d2={partial:!0,tokenize:m2};function h2(e,t,r){const l=this;let a;return o;function o(x){return e.enter("definition"),u(x)}function u(x){return Wv.call(l,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function f(x){return a=Hn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),d):r(x)}function d(x){return nt(x)?qa(e,h)(x):h(x)}function h(x){return Jv(e,g,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function g(x){return e.attempt(d2,p,p)(x)}function p(x){return Pe(x)?Ge(e,b,"whitespace")(x):b(x)}function b(x){return x===null||Se(x)?(e.exit("definition"),l.parser.defined.push(a),t(x)):r(x)}}function m2(e,t,r){return l;function l(f){return nt(f)?qa(e,a)(f):r(f)}function a(f){return e1(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function o(f){return Pe(f)?Ge(e,u,"whitespace")(f):u(f)}function u(f){return f===null||Se(f)?t(f):r(f)}}const p2={name:"hardBreakEscape",tokenize:g2};function g2(e,t,r){return l;function l(o){return e.enter("hardBreakEscape"),e.consume(o),a}function a(o){return Se(o)?(e.exit("hardBreakEscape"),t(o)):r(o)}}const y2={name:"headingAtx",resolve:b2,tokenize:x2};function b2(e,t){let r=e.length-2,l=3,a,o;return e[l][1].type==="whitespace"&&(l+=2),r-2>l&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(l===r-1||r-4>l&&e[r-2][1].type==="whitespace")&&(r-=l+1===r?2:4),r>l&&(a={type:"atxHeadingText",start:e[l][1].start,end:e[r][1].end},o={type:"chunkText",start:e[l][1].start,end:e[r][1].end,contentType:"text"},yn(e,l,r-l+1,[["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t]])),e}function x2(e,t,r){let l=0;return a;function a(g){return e.enter("atxHeading"),o(g)}function o(g){return e.enter("atxHeadingSequence"),u(g)}function u(g){return g===35&&l++<6?(e.consume(g),u):g===null||nt(g)?(e.exit("atxHeadingSequence"),f(g)):r(g)}function f(g){return g===35?(e.enter("atxHeadingSequence"),d(g)):g===null||Se(g)?(e.exit("atxHeading"),t(g)):Pe(g)?Ge(e,f,"whitespace")(g):(e.enter("atxHeadingText"),h(g))}function d(g){return g===35?(e.consume(g),d):(e.exit("atxHeadingSequence"),f(g))}function h(g){return g===null||g===35||nt(g)?(e.exit("atxHeadingText"),f(g)):(e.consume(g),h)}}const v2=["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"],y0=["pre","script","style","textarea"],_2={concrete:!0,name:"htmlFlow",resolveTo:E2,tokenize:C2},w2={partial:!0,tokenize:A2},S2={partial:!0,tokenize:k2};function E2(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 C2(e,t,r){const l=this;let a,o,u,f,d;return h;function h(T){return g(T)}function g(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),p}function p(T){return T===33?(e.consume(T),b):T===47?(e.consume(T),o=!0,E):T===63?(e.consume(T),a=3,l.interrupt?t:k):Kt(T)?(e.consume(T),u=String.fromCharCode(T),R):r(T)}function b(T){return T===45?(e.consume(T),a=2,x):T===91?(e.consume(T),a=5,f=0,w):Kt(T)?(e.consume(T),a=4,l.interrupt?t:k):r(T)}function x(T){return T===45?(e.consume(T),l.interrupt?t:k):r(T)}function w(T){const ue="CDATA[";return T===ue.charCodeAt(f++)?(e.consume(T),f===ue.length?l.interrupt?t:te:w):r(T)}function E(T){return Kt(T)?(e.consume(T),u=String.fromCharCode(T),R):r(T)}function R(T){if(T===null||T===47||T===62||nt(T)){const ue=T===47,de=u.toLowerCase();return!ue&&!o&&y0.includes(de)?(a=1,l.interrupt?t(T):te(T)):v2.includes(u.toLowerCase())?(a=6,ue?(e.consume(T),C):l.interrupt?t(T):te(T)):(a=7,l.interrupt&&!l.parser.lazy[l.now().line]?r(T):o?L(T):O(T))}return T===45||$t(T)?(e.consume(T),u+=String.fromCharCode(T),R):r(T)}function C(T){return T===62?(e.consume(T),l.interrupt?t:te):r(T)}function L(T){return Pe(T)?(e.consume(T),L):P(T)}function O(T){return T===47?(e.consume(T),P):T===58||T===95||Kt(T)?(e.consume(T),B):Pe(T)?(e.consume(T),O):P(T)}function B(T){return T===45||T===46||T===58||T===95||$t(T)?(e.consume(T),B):Y(T)}function Y(T){return T===61?(e.consume(T),j):Pe(T)?(e.consume(T),Y):O(T)}function j(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(e.consume(T),d=T,q):Pe(T)?(e.consume(T),j):G(T)}function q(T){return T===d?(e.consume(T),d=null,oe):T===null||Se(T)?r(T):(e.consume(T),q)}function G(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||nt(T)?Y(T):(e.consume(T),G)}function oe(T){return T===47||T===62||Pe(T)?O(T):r(T)}function P(T){return T===62?(e.consume(T),X):r(T)}function X(T){return T===null||Se(T)?te(T):Pe(T)?(e.consume(T),X):r(T)}function te(T){return T===45&&a===2?(e.consume(T),z):T===60&&a===1?(e.consume(T),Z):T===62&&a===4?(e.consume(T),N):T===63&&a===3?(e.consume(T),k):T===93&&a===5?(e.consume(T),me):Se(T)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(w2,Q,fe)(T)):T===null||Se(T)?(e.exit("htmlFlowData"),fe(T)):(e.consume(T),te)}function fe(T){return e.check(S2,le,Q)(T)}function le(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),ne}function ne(T){return T===null||Se(T)?fe(T):(e.enter("htmlFlowData"),te(T))}function z(T){return T===45?(e.consume(T),k):te(T)}function Z(T){return T===47?(e.consume(T),u="",re):te(T)}function re(T){if(T===62){const ue=u.toLowerCase();return y0.includes(ue)?(e.consume(T),N):te(T)}return Kt(T)&&u.length<8?(e.consume(T),u+=String.fromCharCode(T),re):te(T)}function me(T){return T===93?(e.consume(T),k):te(T)}function k(T){return T===62?(e.consume(T),N):T===45&&a===2?(e.consume(T),k):te(T)}function N(T){return T===null||Se(T)?(e.exit("htmlFlowData"),Q(T)):(e.consume(T),N)}function Q(T){return e.exit("htmlFlow"),t(T)}}function k2(e,t,r){const l=this;return a;function a(u){return Se(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):r(u)}function o(u){return l.parser.lazy[l.now().line]?r(u):t(u)}}function A2(e,t,r){return l;function l(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(us,t,r)}}const T2={name:"htmlText",tokenize:R2};function R2(e,t,r){const l=this;let a,o,u;return f;function f(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),h):k===47?(e.consume(k),Y):k===63?(e.consume(k),O):Kt(k)?(e.consume(k),G):r(k)}function h(k){return k===45?(e.consume(k),g):k===91?(e.consume(k),o=0,w):Kt(k)?(e.consume(k),L):r(k)}function g(k){return k===45?(e.consume(k),x):r(k)}function p(k){return k===null?r(k):k===45?(e.consume(k),b):Se(k)?(u=p,Z(k)):(e.consume(k),p)}function b(k){return k===45?(e.consume(k),x):p(k)}function x(k){return k===62?z(k):k===45?b(k):p(k)}function w(k){const N="CDATA[";return k===N.charCodeAt(o++)?(e.consume(k),o===N.length?E:w):r(k)}function E(k){return k===null?r(k):k===93?(e.consume(k),R):Se(k)?(u=E,Z(k)):(e.consume(k),E)}function R(k){return k===93?(e.consume(k),C):E(k)}function C(k){return k===62?z(k):k===93?(e.consume(k),C):E(k)}function L(k){return k===null||k===62?z(k):Se(k)?(u=L,Z(k)):(e.consume(k),L)}function O(k){return k===null?r(k):k===63?(e.consume(k),B):Se(k)?(u=O,Z(k)):(e.consume(k),O)}function B(k){return k===62?z(k):O(k)}function Y(k){return Kt(k)?(e.consume(k),j):r(k)}function j(k){return k===45||$t(k)?(e.consume(k),j):q(k)}function q(k){return Se(k)?(u=q,Z(k)):Pe(k)?(e.consume(k),q):z(k)}function G(k){return k===45||$t(k)?(e.consume(k),G):k===47||k===62||nt(k)?oe(k):r(k)}function oe(k){return k===47?(e.consume(k),z):k===58||k===95||Kt(k)?(e.consume(k),P):Se(k)?(u=oe,Z(k)):Pe(k)?(e.consume(k),oe):z(k)}function P(k){return k===45||k===46||k===58||k===95||$t(k)?(e.consume(k),P):X(k)}function X(k){return k===61?(e.consume(k),te):Se(k)?(u=X,Z(k)):Pe(k)?(e.consume(k),X):oe(k)}function te(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(e.consume(k),a=k,fe):Se(k)?(u=te,Z(k)):Pe(k)?(e.consume(k),te):(e.consume(k),le)}function fe(k){return k===a?(e.consume(k),a=void 0,ne):k===null?r(k):Se(k)?(u=fe,Z(k)):(e.consume(k),fe)}function le(k){return k===null||k===34||k===39||k===60||k===61||k===96?r(k):k===47||k===62||nt(k)?oe(k):(e.consume(k),le)}function ne(k){return k===47||k===62||nt(k)?oe(k):r(k)}function z(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):r(k)}function Z(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),re}function re(k){return Pe(k)?Ge(e,me,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):me(k)}function me(k){return e.enter("htmlTextData"),u(k)}}const Fh={name:"labelEnd",resolveAll:D2,resolveTo:M2,tokenize:j2},L2={tokenize:z2},O2={tokenize:I2},N2={tokenize:P2};function D2(e){let t=-1;const r=[];for(;++t<e.length;){const l=e[t][1];if(r.push(e[t]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const a=l.type==="labelImage"?4:2;l.type="data",t+=a}}return e.length!==r.length&&yn(e,0,e.length,r),e}function M2(e,t){let r=e.length,l=0,a,o,u,f;for(;r--;)if(a=e[r][1],o){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[r][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(u){if(e[r][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(o=r,a.type!=="labelLink")){l=2;break}}else a.type==="labelEnd"&&(u=r);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[u][1].end}},g={type:"labelText",start:{...e[o+l+2][1].end},end:{...e[u-2][1].start}};return f=[["enter",d,t],["enter",h,t]],f=Nn(f,e.slice(o+1,o+l+3)),f=Nn(f,[["enter",g,t]]),f=Nn(f,_u(t.parser.constructs.insideSpan.null,e.slice(o+l+4,u-3),t)),f=Nn(f,[["exit",g,t],e[u-2],e[u-1],["exit",h,t]]),f=Nn(f,e.slice(u+1)),f=Nn(f,[["exit",d,t]]),yn(e,o,e.length,f),e}function j2(e,t,r){const l=this;let a=l.events.length,o,u;for(;a--;)if((l.events[a][1].type==="labelImage"||l.events[a][1].type==="labelLink")&&!l.events[a][1]._balanced){o=l.events[a][1];break}return f;function f(b){return o?o._inactive?p(b):(u=l.parser.defined.includes(Hn(l.sliceSerialize({start:o.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):r(b)}function d(b){return b===40?e.attempt(L2,g,u?g:p)(b):b===91?e.attempt(O2,g,u?h:p)(b):u?g(b):p(b)}function h(b){return e.attempt(N2,g,p)(b)}function g(b){return t(b)}function p(b){return o._balanced=!0,r(b)}}function z2(e,t,r){return l;function l(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),a}function a(p){return nt(p)?qa(e,o)(p):o(p)}function o(p){return p===41?g(p):Jv(e,u,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function u(p){return nt(p)?qa(e,d)(p):g(p)}function f(p){return r(p)}function d(p){return p===34||p===39||p===40?e1(e,h,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):g(p)}function h(p){return nt(p)?qa(e,g)(p):g(p)}function g(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):r(p)}}function I2(e,t,r){const l=this;return a;function a(f){return Wv.call(l,e,o,u,"reference","referenceMarker","referenceString")(f)}function o(f){return l.parser.defined.includes(Hn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?t(f):r(f)}function u(f){return r(f)}}function P2(e,t,r){return l;function l(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),a}function a(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):r(o)}}const B2={name:"labelStartImage",resolveAll:Fh.resolveAll,tokenize:U2};function U2(e,t,r){const l=this;return a;function a(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"),u):r(f)}function u(f){return f===94&&"_hiddenFootnoteSupport"in l.parser.constructs?r(f):t(f)}}const V2={name:"labelStartLink",resolveAll:Fh.resolveAll,tokenize:H2};function H2(e,t,r){const l=this;return a;function a(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),o}function o(u){return u===94&&"_hiddenFootnoteSupport"in l.parser.constructs?r(u):t(u)}}const dd={name:"lineEnding",tokenize:G2};function G2(e,t){return r;function r(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Ge(e,t,"linePrefix")}}const Fo={name:"thematicBreak",tokenize:F2};function F2(e,t,r){let l=0,a;return o;function o(h){return e.enter("thematicBreak"),u(h)}function u(h){return a=h,f(h)}function f(h){return h===a?(e.enter("thematicBreakSequence"),d(h)):l>=3&&(h===null||Se(h))?(e.exit("thematicBreak"),t(h)):r(h)}function d(h){return h===a?(e.consume(h),l++,d):(e.exit("thematicBreakSequence"),Pe(h)?Ge(e,f,"whitespace")(h):f(h))}}const an={continuation:{tokenize:Y2},exit:K2,name:"list",tokenize:Q2},q2={partial:!0,tokenize:Z2},$2={partial:!0,tokenize:X2};function Q2(e,t,r){const l=this,a=l.events[l.events.length-1];let o=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,u=0;return f;function f(x){const w=l.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!l.containerState.marker||x===l.containerState.marker:Wd(x)){if(l.containerState.type||(l.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(Fo,r,h)(x):h(x);if(!l.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(x)}return r(x)}function d(x){return Wd(x)&&++u<10?(e.consume(x),d):(!l.interrupt||u<2)&&(l.containerState.marker?x===l.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),h(x)):r(x)}function h(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||x,e.check(us,l.interrupt?r:g,e.attempt(q2,b,p))}function g(x){return l.containerState.initialBlankLine=!0,o++,b(x)}function p(x){return Pe(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),b):r(x)}function b(x){return l.containerState.size=o+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function Y2(e,t,r){const l=this;return l.containerState._closeFlow=void 0,e.check(us,a,o);function a(f){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,Ge(e,t,"listItemIndent",l.containerState.size+1)(f)}function o(f){return l.containerState.furtherBlankLines||!Pe(f)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,u(f)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt($2,t,u)(f))}function u(f){return l.containerState._closeFlow=!0,l.interrupt=void 0,Ge(e,e.attempt(an,t,r),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function X2(e,t,r){const l=this;return Ge(e,a,"listItemIndent",l.containerState.size+1);function a(o){const u=l.events[l.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===l.containerState.size?t(o):r(o)}}function K2(e){e.exit(this.containerState.type)}function Z2(e,t,r){const l=this;return Ge(e,a,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(o){const u=l.events[l.events.length-1];return!Pe(o)&&u&&u[1].type==="listItemPrefixWhitespace"?t(o):r(o)}}const b0={name:"setextUnderline",resolveTo:J2,tokenize:W2};function J2(e,t){let r=e.length,l,a,o;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){l=r;break}e[r][1].type==="paragraph"&&(a=r)}else e[r][1].type==="content"&&e.splice(r,1),!o&&e[r][1].type==="definition"&&(o=r);const u={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",o?(e.splice(a,0,["enter",u,t]),e.splice(o+1,0,["exit",e[l][1],t]),e[l][1].end={...e[o][1].end}):e[l][1]=u,e.push(["exit",u,t]),e}function W2(e,t,r){const l=this;let a;return o;function o(h){let g=l.events.length,p;for(;g--;)if(l.events[g][1].type!=="lineEnding"&&l.events[g][1].type!=="linePrefix"&&l.events[g][1].type!=="content"){p=l.events[g][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||p)?(e.enter("setextHeadingLine"),a=h,u(h)):r(h)}function u(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===a?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Pe(h)?Ge(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Se(h)?(e.exit("setextHeadingLine"),t(h)):r(h)}}const eR={tokenize:tR};function tR(e){const t=this,r=e.attempt(us,l,e.attempt(this.parser.constructs.flowInitial,a,Ge(e,e.attempt(this.parser.constructs.flow,a,e.attempt(a2,a)),"linePrefix")));return r;function l(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function a(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const nR={resolveAll:n1()},rR=t1("string"),iR=t1("text");function t1(e){return{resolveAll:n1(e==="text"?lR:void 0),tokenize:t};function t(r){const l=this,a=this.parser.constructs[e],o=r.attempt(a,u,f);return u;function u(g){return h(g)?o(g):f(g)}function f(g){if(g===null){r.consume(g);return}return r.enter("data"),r.consume(g),d}function d(g){return h(g)?(r.exit("data"),o(g)):(r.consume(g),d)}function h(g){if(g===null)return!0;const p=a[g];let b=-1;if(p)for(;++b<p.length;){const x=p[b];if(!x.previous||x.previous.call(l,l.previous))return!0}return!1}}}function n1(e){return t;function t(r,l){let a=-1,o;for(;++a<=r.length;)o===void 0?r[a]&&r[a][1].type==="data"&&(o=a,a++):(!r[a]||r[a][1].type!=="data")&&(a!==o+2&&(r[o][1].end=r[a-1][1].end,r.splice(o+2,a-o-2),a=o+2),o=void 0);return e?e(r,l):r}}function lR(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 l=e[r-1][1],a=t.sliceStream(l);let o=a.length,u=-1,f=0,d;for(;o--;){const h=a[o];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)f++,u--;if(u)break;u=-1}else if(h===-2)d=!0,f++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(f=0),f){const h={type:r===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?u:l.start._bufferIndex+u,_index:l.start._index+o,line:l.end.line,column:l.end.column-f,offset:l.end.offset-f},end:{...l.end}};l.end={...h.start},l.start.offset===l.end.offset?Object.assign(l,h):(e.splice(r,0,["enter",h,t],["exit",h,t]),r+=2)}r++}return e}const aR={42:an,43:an,45:an,48:an,49:an,50:an,51:an,52:an,53:an,54:an,55:an,56:an,57:an,62:Yv},sR={91:f2},oR={[-2]:fd,[-1]:fd,32:fd},uR={35:y2,42:Fo,45:[b0,Fo],60:_2,61:b0,95:Fo,96:g0,126:g0},cR={38:Kv,92:Xv},fR={[-5]:dd,[-4]:dd,[-3]:dd,33:B2,38:Kv,42:eh,60:[VT,T2],91:V2,92:[p2,Xv],93:Fh,95:eh,96:e2},dR={null:[eh,nR]},hR={null:[42,95]},mR={null:[]},pR=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:hR,contentInitial:sR,disable:mR,document:aR,flow:uR,flowInitial:oR,insideSpan:dR,string:cR,text:fR},Symbol.toStringTag,{value:"Module"}));function gR(e,t,r){let l={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const a={},o=[];let u=[],f=[];const d={attempt:q(Y),check:q(j),consume:L,enter:O,exit:B,interrupt:q(j,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:w,parser:e,previous:null,sliceSerialize:b,sliceStream:x,write:p};let g=t.tokenize.call(h,d);return t.resolveAll&&o.push(t),h;function p(X){return u=Nn(u,X),R(),u[u.length-1]!==null?[]:(G(t,0),h.events=_u(o,h.events,h),h.events)}function b(X,te){return bR(x(X),te)}function x(X){return yR(u,X)}function w(){const{_bufferIndex:X,_index:te,line:fe,column:le,offset:ne}=l;return{_bufferIndex:X,_index:te,line:fe,column:le,offset:ne}}function E(X){a[X.line]=X.column,P()}function R(){let X;for(;l._index<u.length;){const te=u[l._index];if(typeof te=="string")for(X=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===X&&l._bufferIndex<te.length;)C(te.charCodeAt(l._bufferIndex));else C(te)}}function C(X){g=g(X)}function L(X){Se(X)?(l.line++,l.column=1,l.offset+=X===-3?2:1,P()):X!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===u[l._index].length&&(l._bufferIndex=-1,l._index++)),h.previous=X}function O(X,te){const fe=te||{};return fe.type=X,fe.start=w(),h.events.push(["enter",fe,h]),f.push(fe),fe}function B(X){const te=f.pop();return te.end=w(),h.events.push(["exit",te,h]),te}function Y(X,te){G(X,te.from)}function j(X,te){te.restore()}function q(X,te){return fe;function fe(le,ne,z){let Z,re,me,k;return Array.isArray(le)?Q(le):"tokenize"in le?Q([le]):N(le);function N(ce){return ke;function ke(Fe){const ve=Fe!==null&&ce[Fe],gt=Fe!==null&&ce.null,ut=[...Array.isArray(ve)?ve:ve?[ve]:[],...Array.isArray(gt)?gt:gt?[gt]:[]];return Q(ut)(Fe)}}function Q(ce){return Z=ce,re=0,ce.length===0?z:T(ce[re])}function T(ce){return ke;function ke(Fe){return k=oe(),me=ce,ce.partial||(h.currentConstruct=ce),ce.name&&h.parser.constructs.disable.null.includes(ce.name)?de():ce.tokenize.call(te?Object.assign(Object.create(h),te):h,d,ue,de)(Fe)}}function ue(ce){return X(me,k),ne}function de(ce){return k.restore(),++re<Z.length?T(Z[re]):z}}}function G(X,te){X.resolveAll&&!o.includes(X)&&o.push(X),X.resolve&&yn(h.events,te,h.events.length-te,X.resolve(h.events.slice(te),h)),X.resolveTo&&(h.events=X.resolveTo(h.events,h))}function oe(){const X=w(),te=h.previous,fe=h.currentConstruct,le=h.events.length,ne=Array.from(f);return{from:le,restore:z};function z(){l=X,h.previous=te,h.currentConstruct=fe,h.events.length=le,f=ne,P()}}function P(){l.line in a&&l.column<2&&(l.column=a[l.line],l.offset+=a[l.line]-1)}}function yR(e,t){const r=t.start._index,l=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let u;if(r===a)u=[e[r].slice(l,o)];else{if(u=e.slice(r,a),l>-1){const f=u[0];typeof f=="string"?u[0]=f.slice(l):u.shift()}o>0&&u.push(e[a].slice(0,o))}return u}function bR(e,t){let r=-1;const l=[];let a;for(;++r<e.length;){const o=e[r];let u;if(typeof o=="string")u=o;else switch(o){case-5:{u="\r";break}case-4:{u=`
|
|
18
|
+
color: hsl(${Math.max(0,Math.min(120-120*R,120))}deg 100% 31%);`,r?.key)}return r?.onChange&&!(o&&r.skipInitialOnChange)&&r.onChange(a),o=!1,a}return u.updateDeps=f=>{l=f},u}function Yb(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const dA=(e,t)=>Math.abs(e-t)<1.01,hA=(e,t,r)=>{let l;return function(...a){e.clearTimeout(l),l=e.setTimeout(()=>t.apply(this,a),r)}},Xb=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},mA=e=>e,pA=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),l=[];for(let a=t;a<=r;a++)l.push(a);return l},gA=(e,t)=>{const r=e.scrollElement;if(!r)return;const l=e.targetWindow;if(!l)return;const a=u=>{const{width:f,height:d}=u;t({width:Math.round(f),height:Math.round(d)})};if(a(Xb(r)),!l.ResizeObserver)return()=>{};const o=new l.ResizeObserver(u=>{const f=()=>{const d=u[0];if(d?.borderBoxSize){const h=d.borderBoxSize[0];if(h){a({width:h.inlineSize,height:h.blockSize});return}}a(Xb(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(f):f()});return o.observe(r,{box:"border-box"}),()=>{o.unobserve(r)}},Kb={passive:!0},Zb=typeof window>"u"?!0:"onscrollend"in window,yA=(e,t)=>{const r=e.scrollElement;if(!r)return;const l=e.targetWindow;if(!l)return;let a=0;const o=e.options.useScrollendEvent&&Zb?()=>{}:hA(l,()=>{t(a,!1)},e.options.isScrollingResetDelay),u=g=>()=>{const{horizontal:p,isRtl:b}=e.options;a=p?r.scrollLeft*(b&&-1||1):r.scrollTop,o(),t(a,g)},f=u(!0),d=u(!1);r.addEventListener("scroll",f,Kb);const h=e.options.useScrollendEvent&&Zb;return h&&r.addEventListener("scrollend",d,Kb),()=>{r.removeEventListener("scroll",f),h&&r.removeEventListener("scrollend",d)}},bA=(e,t,r)=>{if(t?.borderBoxSize){const l=t.borderBoxSize[0];if(l)return Math.round(l[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]},xA=(e,{adjustments:t=0,behavior:r},l)=>{var a,o;const u=e+t;(o=(a=l.scrollElement)==null?void 0:a.scrollTo)==null||o.call(a,{[l.options.horizontal?"left":"top"]:u,behavior:r})};class vA{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var r,l,a;return((a=(l=(r=this.targetWindow)==null?void 0:r.performance)==null?void 0:l.now)==null?void 0:a.call(l))??Date.now()},this.observer=(()=>{let r=null;const l=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(a=>{a.forEach(o=>{const u=()=>{const f=o.target,d=this.indexFromElement(f);if(!f.isConnected){this.observer.unobserve(f),this.elementsCache.delete(this.options.getItemKey(d));return}this.shouldMeasureDuringScroll(d)&&this.resizeItem(d,this.options.measureElement(f,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(u):u()})}));return{disconnect:()=>{var a;(a=l())==null||a.disconnect(),r=null},observe:a=>{var o;return(o=l())==null?void 0:o.observe(a,{box:"border-box"})},unobserve:a=>{var o;return(o=l())==null?void 0:o.unobserve(a)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([l,a])=>{typeof a>"u"&&delete r[l]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:mA,rangeExtractor:pA,onChange:()=>{},measureElement:bA,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...r}},this.notify=r=>{var l,a;(a=(l=this.options).onChange)==null||a.call(l,this,r)},this.maybeNotify=Cl(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const l=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==l){if(this.cleanup(),!l){this.maybeNotify();return}this.scrollElement=l,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(a=>{this.observer.observe(a)}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(a,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<a?"forward":"backward":null,this.scrollOffset=a,this.isScrolling=o,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,l)=>{const a=new Map,o=new Map;for(let u=l-1;u>=0;u--){const f=r[u];if(a.has(f.lane))continue;const d=o.get(f.lane);if(d==null||f.end>d.end?o.set(f.lane,f):f.end<d.end&&a.set(f.lane,!0),a.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((u,f)=>u.end===f.end?u.index-f.index:u.end-f.end)[0]:void 0},this.getMeasurementOptions=Cl(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(r,l,a,o,u,f)=>(this.prevLanes!==void 0&&this.prevLanes!==f&&(this.lanesChangedFlag=!0),this.prevLanes=f,this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:l,scrollMargin:a,getItemKey:o,enabled:u,lanes:f}),{key:!1}),this.getMeasurements=Cl(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:l,scrollMargin:a,getItemKey:o,enabled:u,lanes:f},d)=>{if(!u)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>r)for(const b of this.laneAssignments.keys())b>=r&&this.laneAssignments.delete(b);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const h=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===r&&(this.lanesSettling=!1);const g=this.measurementsCache.slice(0,h),p=new Array(f).fill(void 0);for(let b=0;b<h;b++){const x=g[b];x&&(p[x.lane]=b)}for(let b=h;b<r;b++){const x=o(b),w=this.laneAssignments.get(b);let E,R;if(w!==void 0&&this.options.lanes>1){E=w;const B=p[E],Y=B!==void 0?g[B]:void 0;R=Y?Y.end+this.options.gap:l+a}else{const B=this.options.lanes===1?g[b-1]:this.getFurthestMeasurement(g,b);R=B?B.end+this.options.gap:l+a,E=B?B.lane:b%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(b,E)}const C=d.get(x),L=typeof C=="number"?C:this.options.estimateSize(b),O=R+L;g[b]={index:b,start:R,size:L,end:O,key:x,lane:E},p[E]=b}return this.measurementsCache=g,g},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Cl(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,l,a,o)=>this.range=r.length>0&&l>0?_A({measurements:r,outerSize:l,scrollOffset:a,lanes:o}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Cl(()=>{let r=null,l=null;const a=this.calculateRange();return a&&(r=a.startIndex,l=a.endIndex),this.maybeNotify.updateDeps([this.isScrolling,r,l]),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,l]},(r,l,a,o,u)=>o===null||u===null?[]:r({startIndex:o,endIndex:u,overscan:l,count:a}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=r=>{const l=this.options.indexAttribute,a=r.getAttribute(l);return a?parseInt(a,10):(console.warn(`Missing attribute name '${l}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=r=>{var l;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const a=this.scrollState.index??((l=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:l.index);if(a!==void 0&&this.range){const o=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),u=Math.max(0,a-o),f=Math.min(this.options.count-1,a+o);return r>=u&&r<=f}return!0},this.measureElement=r=>{if(!r){this.elementsCache.forEach((u,f)=>{u.isConnected||(this.observer.unobserve(u),this.elementsCache.delete(f))});return}const l=this.indexFromElement(r),a=this.options.getItemKey(l),o=this.elementsCache.get(a);o!==r&&(o&&this.observer.unobserve(o),this.observer.observe(r),this.elementsCache.set(a,r)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(l)&&this.resizeItem(l,this.options.measureElement(r,void 0,this))},this.resizeItem=(r,l)=>{var a;const o=this.measurementsCache[r];if(!o)return;const u=this.itemSizeCache.get(o.key)??o.size,f=l-u;f!==0&&(((a=this.scrollState)==null?void 0:a.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,f,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=f,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,l)),this.notify(!1))},this.getVirtualItems=Cl(()=>[this.getVirtualIndexes(),this.getMeasurements()],(r,l)=>{const a=[];for(let o=0,u=r.length;o<u;o++){const f=r[o],d=l[f];a.push(d)}return a},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const l=this.getMeasurements();if(l.length!==0)return Yb(l[wv(0,l.length-1,a=>Yb(l[a]).start,r)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const r=this.scrollElement.document.documentElement;return this.options.horizontal?r.scrollWidth-this.scrollElement.innerWidth:r.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(r,l,a=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),u=this.getScrollOffset();l==="auto"&&(l=r>=u+o?"end":"start"),l==="center"?r+=(a-o)/2:l==="end"&&(r-=o);const f=this.getMaxScrollOffset();return Math.max(Math.min(f,r),0)},this.getOffsetForIndex=(r,l="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const a=this.getSize(),o=this.getScrollOffset(),u=this.measurementsCache[r];if(!u)return;if(l==="auto")if(u.end>=o+a-this.options.scrollPaddingEnd)l="end";else if(u.start<=o+this.options.scrollPaddingStart)l="start";else return[o,l];if(l==="end"&&r===this.options.count-1)return[this.getMaxScrollOffset(),l];const f=l==="end"?u.end+this.options.scrollPaddingEnd:u.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(f,l,u.size),l]},this.scrollToOffset=(r,{align:l="start",behavior:a="auto"}={})=>{const o=this.getOffsetForAlignment(r,l),u=this.now();this.scrollState={index:null,align:l,behavior:a,startedAt:u,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:a}),this.scheduleScrollReconcile()},this.scrollToIndex=(r,{align:l="auto",behavior:a="auto"}={})=>{r=Math.max(0,Math.min(r,this.options.count-1));const o=this.getOffsetForIndex(r,l);if(!o)return;const[u,f]=o,d=this.now();this.scrollState={index:r,align:f,behavior:a,startedAt:d,lastTargetOffset:u,stableFrames:0},this._scrollToOffset(u,{adjustments:void 0,behavior:a}),this.scheduleScrollReconcile()},this.scrollBy=(r,{behavior:l="auto"}={})=>{const a=this.getScrollOffset()+r,o=this.now();this.scrollState={index:null,align:"start",behavior:l,startedAt:o,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:l}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var r;const l=this.getMeasurements();let a;if(l.length===0)a=this.options.paddingStart;else if(this.options.lanes===1)a=((r=l[l.length-1])==null?void 0:r.end)??0;else{const o=Array(this.options.lanes).fill(null);let u=l.length-1;for(;u>=0&&o.some(f=>f===null);){const f=l[u];o[f.lane]===null&&(o[f.lane]=f.end),u--}a=Math.max(...o.filter(f=>f!==null))}return Math.max(a-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:l,behavior:a})=>{this.options.scrollToFn(r,{behavior:a,adjustments:l},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const l=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,a=l?l[0]:this.scrollState.lastTargetOffset,o=1,u=a!==this.scrollState.lastTargetOffset;if(!u&&dA(a,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=o){this.scrollState=null;return}}else this.scrollState.stableFrames=0,u&&(this.scrollState.lastTargetOffset=a,this.scrollState.behavior="auto",this._scrollToOffset(a,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const wv=(e,t,r,l)=>{for(;e<=t;){const a=(e+t)/2|0,o=r(a);if(o<l)e=a+1;else if(o>l)t=a-1;else return a}return e>0?e-1:0};function _A({measurements:e,outerSize:t,scrollOffset:r,lanes:l}){const a=e.length-1,o=d=>e[d].start;if(e.length<=l)return{startIndex:0,endIndex:a};let u=wv(0,a,o,r),f=u;if(l===1)for(;f<a&&e[f].end<r+t;)f++;else if(l>1){const d=Array(l).fill(0);for(;f<a&&d.some(g=>g<r+t);){const g=e[f];d[g.lane]=g.end,f++}const h=Array(l).fill(r+t);for(;u>=0&&h.some(g=>g>=r);){const g=e[u];h[g.lane]=g.start,u--}u=Math.max(0,u-u%l),f=Math.min(a,f+(l-1-f%l))}return{startIndex:u,endIndex:f}}const Jb=typeof document<"u"?F.useLayoutEffect:F.useEffect;function wA({useFlushSync:e=!0,...t}){const r=F.useReducer(()=>({}),{})[1],l={...t,onChange:(o,u)=>{var f;e&&u?fA.flushSync(r):r(),(f=t.onChange)==null||f.call(t,o,u)}},[a]=F.useState(()=>new vA(l));return a.setOptions(l),Jb(()=>a._didMount(),[]),Jb(()=>a._willUpdate()),a}function SA(e){return wA({observeElementRect:gA,observeElementOffset:yA,scrollToFn:xA,...e})}const ad=20;function EA(e,t){if(e.length===0)return[];const r=[],l=e[0];if(l.oldStart>1){const f=l.oldStart-1;r.push({id:"top",position:"top",oldStart:1,oldEnd:l.oldStart-1,newStart:1,newEnd:l.newStart-1,totalLines:f})}for(let f=0;f<e.length-1;f++){const d=e[f],h=e[f+1],g=d.oldStart+d.oldCount,p=h.oldStart,b=p-g;if(b>0){const x=d.newStart+d.newCount;r.push({id:`between-${f}`,position:"between",oldStart:g,oldEnd:p-1,newStart:x,newEnd:h.newStart-1,totalLines:b})}}const a=e[e.length-1],o=a.oldStart+a.oldCount,u=a.newStart+a.newCount;if(t!==null){const f=t-o+1;f>0&&r.push({id:"bottom",position:"bottom",oldStart:o,oldEnd:t,newStart:u,newEnd:u+f-1,totalLines:f})}return r}function CA(e,t,r,l){const a=[];for(let o=t;o<=r;o++){const u=e[o-1]??"";a.push({type:"context",content:u,oldLineNumber:o,newLineNumber:o+l})}return a}function kA(e,t,r){const l=e.oldStart+r.fromTop,a=e.oldEnd-r.fromBottom;if(l>a)return null;const o=a-l+1;return t==="all"||o<=ad?{oldStart:l,oldEnd:a}:t==="down"?{oldStart:l,oldEnd:Math.min(l+ad-1,a)}:{oldStart:Math.max(a-ad+1,l),oldEnd:a}}function AA(e,t,r){return{queryKey:["file-content",e,r],queryFn:()=>TC(e,r),enabled:t}}function TA(e,t){const r=document.elementFromPoint(e,t);if(!r)return null;const l=r.closest("td");if(!l)return null;const a=l.textContent?.trim();if(!a)return null;const o=parseInt(a,10);return isNaN(o)?null:o}function RA(e){const{filePath:t,onSelectionComplete:r}=e,[l,a]=F.useState(null),o=F.useRef(!1),u=F.useRef(0),f=F.useRef(l);f.current=l;const d=F.useCallback((b,x)=>{o.current=!0,u.current=0,a({side:x,anchorLine:b,currentLine:b})},[]),h=F.useCallback((b,x)=>{!o.current||!f.current||x===f.current.side&&a(w=>w&&{...w,currentLine:b})},[]);F.useEffect(()=>{const b=w=>{if(!o.current)return;u.current===0&&(u.current=w.clientX);const E=TA(u.current,w.clientY);E!==null&&a(R=>!R||R.currentLine===E?R:{...R,currentLine:E})},x=()=>{const w=f.current;if(!o.current||!w){o.current=!1;return}o.current=!1;const E=Math.min(w.anchorLine,w.currentLine),R=Math.max(w.anchorLine,w.currentLine);r({filePath:t,side:w.side,startLine:E,endLine:R}),a(null)};return window.addEventListener("mousemove",b),window.addEventListener("mouseup",x),()=>{window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",x)}},[t,r]);const g=F.useCallback((b,x)=>{if(!l||x!==l.side)return!1;const w=Math.min(l.anchorLine,l.currentLine),E=Math.max(l.anchorLine,l.currentLine);return b>=w&&b<=E},[l]),p=F.useCallback(()=>l?{startLine:Math.min(l.anchorLine,l.currentLine),endLine:Math.max(l.anchorLine,l.currentLine),side:l.side}:null,[l]);return{selectionState:l,handleLineMouseDown:d,handleLineMouseEnter:h,isLineInSelection:g,getSelectionRange:p}}function ss(e){return v.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:v.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 6C2.5 4.75736 3.50736 3.75 4.75 3.75H19.25C20.4926 3.75 21.5 4.75736 21.5 6V16.5484C21.5 17.791 20.4926 18.7984 19.25 18.7984H7.635L3.75032 22.277C3.52993 22.4743 3.21411 22.5237 2.94401 22.403C2.67391 22.2823 2.5 22.0141 2.5 21.7182V6ZM4.75 5.25C4.33579 5.25 4 5.58579 4 6V20.0399L6.84795 17.4897C6.9855 17.3665 7.16364 17.2984 7.34827 17.2984H19.25C19.6642 17.2984 20 16.9626 20 16.5484V6C20 5.58579 19.6642 5.25 19.25 5.25H4.75Z",fill:"currentColor"})})}function Sv(e){const{children:t,className:r}=e;return v.jsx("span",{className:Rt("text-xs px-1.5 py-px rounded font-semibold shrink-0",r),children:t})}function LA(e){const{children:t,className:r,...l}=e;return v.jsx("button",{className:Rt("flex items-center justify-center rounded text-text-muted hover:bg-hover hover:text-text cursor-pointer",r),...l,children:t})}function OA(e){switch(e){case"added":return"A";case"deleted":return"D";case"renamed":return"R";case"copied":return"C";default:return"M"}}function NA(e){switch(e){case"added":return"Added";case"deleted":return"Deleted";case"renamed":return"Renamed";case"copied":return"Copied";default:return""}}function Ev(e){const{status:t,compact:r}=e;if(r)return v.jsx("span",{className:Rt("shrink-0 w-[18px] h-[18px] inline-flex items-center justify-center rounded text-[11px] font-bold font-mono",Qb(t)),children:OA(t)});const l=NA(t);return l?v.jsx(Sv,{className:Qb(t),children:l}):null}function sd(e,t,r){const l=[];let a=0,o=0,u=0;for(let f=0;f<r.length;f++)if(u+=r[f].text.length,u>t){o=f,u=u-r[f].text.length;break}for(;a<e.length&&o<r.length;){const f=r[o],d=u,h=d+f.text.length,g=Math.max(t+a,d),p=Math.min(t+e.length,h);if(g>=p){o++,u=h;continue}const b=g-t,x=p-t,w=e.slice(b,x);if(b>a&&l.push(v.jsx("span",{children:e.slice(a,b)},`gap-${a}`)),l.push(v.jsx("span",{style:f.color?{color:f.color}:void 0,children:w},`${o}-${b}`)),a=x,p>=h)o++,u=h;else break}return a<e.length&&l.push(v.jsx("span",{children:e.slice(a)},`rest-${a}`)),l}function DA(e){const{line:t,syntaxTokens:r}=e;if(!t.wordDiff||t.wordDiff.length===0)return v.jsx("span",{children:t.content||`
|
|
19
|
+
`});let l=0;return v.jsx(v.Fragment,{children:t.wordDiff.map((a,o)=>{const u=l;return a.type==="equal"?(l+=a.text.length,r&&r.length>0?v.jsx("span",{children:sd(a.text,u,r)},o):v.jsx("span",{children:a.text},o)):a.type==="delete"&&t.type==="delete"?(l+=a.text.length,r&&r.length>0?v.jsx("span",{className:"bg-diff-del-word rounded-sm",children:sd(a.text,u,r)},o):v.jsx("span",{className:"bg-diff-del-word rounded-sm",children:a.text},o)):a.type==="insert"&&t.type==="add"?(l+=a.text.length,r&&r.length>0?v.jsx("span",{className:"bg-diff-add-word rounded-sm",children:sd(a.text,u,r)},o):v.jsx("span",{className:"bg-diff-add-word rounded-sm",children:a.text},o)):null})})}function Cv(e,t){return e.wordDiff&&e.wordDiff.length>0?v.jsx(DA,{line:e,syntaxTokens:t}):t&&t.length>0?v.jsx(v.Fragment,{children:t.map((r,l)=>v.jsx("span",{style:r.color?{color:r.color}:void 0,children:r.text},l))}):v.jsx("span",{children:e.content||`
|
|
20
|
+
`})}function MA(e){return v.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:v.jsx("path",{d:"M7.75 2a.75.75 0 01.75.75V7h4.25a.75.75 0 110 1.5H8.5v4.25a.75.75 0 11-1.5 0V8.5H2.75a.75.75 0 010-1.5H7V2.75A.75.75 0 017.75 2z"})})}const jA="w-12.5 min-w-12.5 px-2 text-right text-text-muted select-none cursor-pointer align-top text-xs leading-6 relative group/line";function Wo(e){const{lineNumber:t,className:r,isSelected:l,onMouseDown:a,onMouseEnter:o,onCommentClick:u,showCommentButton:f,forceShowButton:d}=e;return v.jsxs("td",{className:Rt(jA,r,l&&"bg-diff-comment-gutter"),onMouseDown:h=>{a&&t!==null&&(h.preventDefault(),a())},onMouseEnter:()=>{o&&t!==null&&o()},children:[f&&t!==null&&v.jsx("button",{className:Rt("absolute right-[-2px] top-0.5 w-5 h-5 flex items-center justify-center rounded bg-accent text-white cursor-pointer z-10 hover:bg-accent-hover",d?"opacity-100":"opacity-0 group-hover/row:opacity-100 group-hover/line:opacity-100"),onClick:h=>{h.stopPropagation(),h.preventDefault(),u&&u()},title:"Add comment",children:v.jsx(MA,{className:"w-2.5 h-2.5"})}),t??""]})}function kv(e){return v.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:v.jsx("path",{fillRule:"evenodd",d:"M2.854 3.146a.5.5 0 0 0-.708 0l-2 2a.5.5 0 0 0 0 .708l2 2a.5.5 0 1 0 .708-.708L1.707 6H7.5A4.5 4.5 0 1 1 3 10.5a.5.5 0 0 0-1 0A5.5 5.5 0 1 0 7.5 5H1.707l1.147-1.146a.5.5 0 0 0 0-.708Z"})})}function zA(e){switch(e){case"add":return"+";case"delete":return"-";default:return" "}}function IA(e){switch(e){case"add":return"text-added";case"delete":return"text-deleted";default:return"text-text-muted"}}function PA(e){const{line:t,syntaxTokens:r,expanded:l,isSelected:a,onLineMouseDown:o,onLineMouseEnter:u,onCommentClick:f,onUndo:d}=e,h=t.type==="delete"?"old":"new";h==="old"?t.oldLineNumber:t.newLineNumber;const g=l?"bg-diff-expanded-gutter":"";return v.jsxs("tr",{className:Rt("group/row font-mono text-sm leading-6 hover:brightness-[0.97]",l?"bg-diff-expanded-bg":yv(t.type)),children:[v.jsx(Wo,{lineNumber:t.oldLineNumber,className:Rt("border-r border-border-muted",g),showCommentButton:!!f&&t.type==="delete"&&t.oldLineNumber!==null,isSelected:a&&h==="old",onMouseDown:t.oldLineNumber!==null?()=>o?.(t.oldLineNumber,t.type==="delete"?"old":"new"):void 0,onMouseEnter:t.oldLineNumber!==null?()=>u?.(t.oldLineNumber,t.type==="delete"?"old":"new"):void 0,onCommentClick:t.oldLineNumber!==null&&t.type==="delete"?()=>f?.(t.oldLineNumber,"old"):void 0}),v.jsx(Wo,{lineNumber:t.newLineNumber,className:Rt("border-r border-border-muted",g),showCommentButton:!!f&&t.type!=="delete"&&t.newLineNumber!==null,isSelected:a&&h==="new",onMouseDown:t.newLineNumber!==null?()=>o?.(t.newLineNumber,t.type==="delete"?"old":"new"):void 0,onMouseEnter:t.newLineNumber!==null?()=>u?.(t.newLineNumber,t.type==="delete"?"old":"new"):void 0,onCommentClick:t.newLineNumber!==null&&t.type!=="delete"?()=>f?.(t.newLineNumber,"new"):void 0}),v.jsx("td",{className:Rt("w-5 min-w-5 px-1 text-center select-none align-top",IA(t.type),a&&"bg-diff-comment-bg"),children:zA(t.type)}),v.jsxs("td",{className:Rt("px-3 whitespace-pre-wrap break-all relative",a&&"bg-diff-comment-bg"),children:[v.jsx("span",{className:"inline",children:Cv(t,r)}),d&&v.jsxs("button",{onClick:d,className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-1 px-2 py-0.5 text-xs rounded bg-deleted/15 text-deleted hover:bg-deleted/25 transition-colors cursor-pointer opacity-0 group-hover/row:opacity-100",title:"Undo this change",children:[v.jsx(kv,{className:"w-3 h-3"}),"Undo"]})]})]})}function Go(){return v.jsx("svg",{className:"w-[14px] h-[14px]",viewBox:"0 0 16 16",fill:"currentColor",children:v.jsx("path",{d:"M2 2.75a.75.75 0 01.75-.75h1a.75.75 0 010 1.5h-1A.75.75 0 012 2.75zm4 0a.75.75 0 01.75-.75h1a.75.75 0 010 1.5h-1A.75.75 0 016 2.75zm4 0a.75.75 0 01.75-.75h1a.75.75 0 010 1.5h-1a.75.75 0 01-.75-.75zM7.47 5.97a.75.75 0 011.06 0l3.25 3.25a.75.75 0 11-1.06 1.06L8.5 8.06V14.25a.75.75 0 01-1.5 0V8.06L4.78 10.28a.75.75 0 01-1.06-1.06l3.25-3.25z"})})}function Yd(){return v.jsx("svg",{className:"w-[14px] h-[14px]",viewBox:"0 0 16 16",fill:"currentColor",children:v.jsx("path",{d:"M2 13.25a.75.75 0 00.75.75h1a.75.75 0 000-1.5h-1a.75.75 0 00-.75.75zm4 0a.75.75 0 00.75.75h1a.75.75 0 000-1.5h-1a.75.75 0 00-.75.75zm4 0a.75.75 0 00.75.75h1a.75.75 0 000-1.5h-1a.75.75 0 00-.75.75zM7.47 10.03a.75.75 0 001.06 0l3.25-3.25a.75.75 0 00-1.06-1.06L8.5 7.94V1.75a.75.75 0 00-1.5 0v6.19L4.78 5.72a.75.75 0 00-1.06 1.06l3.25 3.25z"})})}function BA(){return v.jsx("svg",{className:"w-[14px] h-[14px]",viewBox:"0 0 16 16",fill:"currentColor",children:v.jsx("path",{d:"M8.177 2.073a.25.25 0 00-.354 0L4.427 5.47a.25.25 0 00.177.427h6.792a.25.25 0 00.177-.427L8.177 2.073zM7.823 13.927a.25.25 0 00.354 0l3.396-3.397a.25.25 0 00-.177-.427H4.604a.25.25 0 00-.177.427l3.396 3.397z"})})}function zh(e){const{className:t="w-3 h-3"}=e;return v.jsx("span",{className:`inline-block border-2 border-text-muted/40 border-t-transparent rounded-full animate-spin ${t}`})}function Pa(e){const t=`@@ -${e.oldStart},${e.oldCount} +${e.newStart},${e.newCount} @@`;return e.context?`${t} ${e.context}`:t}const UA=40,Ll="w-[25px] min-w-[25px] bg-diff-hunk-bg border-r border-border-muted p-0",Lo="flex items-center justify-center w-full h-[18px] cursor-pointer text-diff-hunk-text/70 hover:text-diff-hunk-text transition-colors",Wb="bg-diff-hunk-bg";function Oo(){return v.jsx("td",{className:Ll,children:v.jsx("div",{className:"flex items-center justify-center h-[18px]",children:v.jsx(zh,{})})})}function Av(e){const{hunk:t,expandControls:r}=e;if(!r)return v.jsx("tr",{className:"bg-diff-hunk-bg group/hunk",children:v.jsx("td",{colSpan:4,className:"px-3 py-1 font-mono text-xs text-diff-hunk-text select-none",children:Pa(t)})});const{position:l,remainingLines:a,remainingUp:o,remainingDown:u,loadingDirection:f,wasExpanded:d,onExpand:h}=r;if(a<=0)return d?null:v.jsx("tr",{className:"bg-diff-hunk-bg group/hunk",children:v.jsx("td",{colSpan:4,className:"px-3 py-1 font-mono text-xs text-diff-hunk-text select-none",children:Pa(t)})});const g=a<=UA,p=o>0,b=u>0;return l==="top"?v.jsxs("tr",{className:"bg-diff-hunk-bg group/hunk",children:[f?v.jsx(Oo,{}):v.jsx("td",{className:Ll,children:v.jsx("button",{className:Lo,onClick:()=>h("up"),title:`Expand ${Math.min(a,20)} lines`,children:v.jsx(Go,{})})}),v.jsx("td",{colSpan:3,className:"px-3 py-1 font-mono text-xs text-diff-hunk-text select-none",children:Pa(t)})]}):g||!p&&b||p&&!b?v.jsxs("tr",{className:"bg-diff-hunk-bg group/hunk",children:[f?v.jsx(Oo,{}):v.jsx("td",{className:Ll,children:v.jsx("button",{className:Lo,onClick:()=>h(g?"all":p?"up":"down"),title:g?`Expand all ${a} lines`:`Expand ${Math.min(a,20)} lines`,children:g?v.jsx(BA,{}):p?v.jsx(Go,{}):v.jsx(Yd,{})})}),v.jsx("td",{colSpan:3,className:"px-3 py-1 font-mono text-xs text-diff-hunk-text select-none",children:Pa(t)})]}):v.jsxs(v.Fragment,{children:[v.jsxs("tr",{className:Wb,children:[f==="down"?v.jsx(Oo,{}):v.jsx("td",{className:Ll,children:v.jsx("button",{className:Lo,onClick:()=>h("down"),title:"Expand down",children:v.jsx(Yd,{})})}),v.jsx("td",{colSpan:3})]}),v.jsxs("tr",{className:"bg-diff-hunk-bg group/hunk",children:[v.jsx("td",{className:Ll}),v.jsx("td",{colSpan:3,className:"px-3 py-1 font-mono text-xs text-diff-hunk-text select-none",children:Pa(t)})]}),v.jsxs("tr",{className:Wb,children:[f==="up"?v.jsx(Oo,{}):v.jsx("td",{className:Ll,children:v.jsx("button",{className:Lo,onClick:()=>h("up"),title:"Expand up",children:v.jsx(Go,{})})}),v.jsx("td",{colSpan:3})]})]})}function bu(e){const{onSubmit:t,onCancel:r,placeholder:l="Leave a comment",submitLabel:a="Comment",autoFocus:o=!0,lineLabel:u}=e,[f,d]=F.useState(""),h=F.useRef(null);F.useEffect(()=>{o&&h.current&&h.current.focus()},[o]);const g=()=>{const b=f.trim();b&&(t(b),d(""))},p=b=>{if(b.key==="Enter"&&(b.metaKey||b.ctrlKey)){b.preventDefault(),g();return}b.key==="Escape"&&(b.preventDefault(),r())};return v.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-bg",children:[u&&v.jsx("div",{className:"px-3 py-1.5 bg-bg-secondary border-b border-border",children:v.jsx("span",{className:"text-xs text-text-secondary font-medium",children:u})}),v.jsx("textarea",{ref:h,value:f,onChange:b=>d(b.target.value),onKeyDown:p,placeholder:l,rows:3,className:"w-full px-3 py-2 text-sm bg-bg text-text resize-y outline-none placeholder:text-text-muted min-h-[80px] font-mono"}),v.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-bg-secondary border-t border-border",children:[v.jsx("div",{className:"flex-1"}),v.jsx("button",{onClick:r,className:"px-3 py-1.5 text-xs font-medium rounded-md border border-border text-text-secondary hover:bg-hover transition-colors cursor-pointer",children:"Cancel"}),v.jsx("button",{onClick:g,disabled:!f.trim(),className:"px-3 py-1.5 text-xs font-medium rounded-md bg-accent text-white hover:bg-accent-hover transition-colors disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",children:a})]})]})}function Tv(e,t){const r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const VA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,HA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,GA={};function e0(e,t){return(GA.jsx?HA:VA).test(e)}const FA=/[ \t\n\f\r]/g;function xu(e){return typeof e=="object"?e.type==="text"?t0(e.value):!1:t0(e)}function t0(e){return e.replace(FA,"")===""}class os{constructor(t,r,l){this.normal=r,this.property=t,l&&(this.space=l)}}os.prototype.normal={};os.prototype.property={};os.prototype.space=void 0;function Rv(e,t){const r={},l={};for(const a of e)Object.assign(r,a.property),Object.assign(l,a.normal);return new os(r,l,t)}function Xd(e){return e.toLowerCase()}class dn{constructor(t,r){this.attribute=r,this.property=t}}dn.prototype.attribute="";dn.prototype.booleanish=!1;dn.prototype.boolean=!1;dn.prototype.commaOrSpaceSeparated=!1;dn.prototype.commaSeparated=!1;dn.prototype.defined=!1;dn.prototype.mustUseProperty=!1;dn.prototype.number=!1;dn.prototype.overloadedBoolean=!1;dn.prototype.property="";dn.prototype.spaceSeparated=!1;dn.prototype.space=void 0;let qA=0;const Ne=Bi(),wt=Bi(),Kd=Bi(),ie=Bi(),it=Bi(),Ml=Bi(),vn=Bi();function Bi(){return 2**++qA}const Zd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ne,booleanish:wt,commaOrSpaceSeparated:vn,commaSeparated:Ml,number:ie,overloadedBoolean:Kd,spaceSeparated:it},Symbol.toStringTag,{value:"Module"})),od=Object.keys(Zd);class Ih extends dn{constructor(t,r,l,a){let o=-1;if(super(t,r),n0(this,"space",a),typeof l=="number")for(;++o<od.length;){const u=od[o];n0(this,od[o],(l&Zd[u])===Zd[u])}}}Ih.prototype.defined=!0;function n0(e,t,r){r&&(e[t]=r)}function Bl(e){const t={},r={};for(const[l,a]of Object.entries(e.properties)){const o=new Ih(l,e.transform(e.attributes||{},l),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(o.mustUseProperty=!0),t[l]=o,r[Xd(l)]=l,r[Xd(o.attribute)]=l}return new os(t,r,e.space)}const Lv=Bl({properties:{ariaActiveDescendant:null,ariaAtomic:wt,ariaAutoComplete:null,ariaBusy:wt,ariaChecked:wt,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:it,ariaCurrent:null,ariaDescribedBy:it,ariaDetails:null,ariaDisabled:wt,ariaDropEffect:it,ariaErrorMessage:null,ariaExpanded:wt,ariaFlowTo:it,ariaGrabbed:wt,ariaHasPopup:null,ariaHidden:wt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:it,ariaLevel:ie,ariaLive:null,ariaModal:wt,ariaMultiLine:wt,ariaMultiSelectable:wt,ariaOrientation:null,ariaOwns:it,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:wt,ariaReadOnly:wt,ariaRelevant:null,ariaRequired:wt,ariaRoleDescription:it,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:wt,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ov(e,t){return t in e?e[t]:t}function Nv(e,t){return Ov(e,t.toLowerCase())}const $A=Bl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ml,acceptCharset:it,accessKey:it,action:null,allow:null,allowFullScreen:Ne,allowPaymentRequest:Ne,allowUserMedia:Ne,alt:null,as:null,async:Ne,autoCapitalize:null,autoComplete:it,autoFocus:Ne,autoPlay:Ne,blocking:it,capture:null,charSet:null,checked:Ne,cite:null,className:it,cols:ie,colSpan:null,content:null,contentEditable:wt,controls:Ne,controlsList:it,coords:ie|Ml,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ne,defer:Ne,dir:null,dirName:null,disabled:Ne,download:Kd,draggable:wt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ne,formTarget:null,headers:it,height:ie,hidden:Kd,high:ie,href:null,hrefLang:null,htmlFor:it,httpEquiv:it,id:null,imageSizes:null,imageSrcSet:null,inert:Ne,inputMode:null,integrity:null,is:null,isMap:Ne,itemId:null,itemProp:it,itemRef:it,itemScope:Ne,itemType:it,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ne,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:Ne,muted:Ne,name:null,nonce:null,noModule:Ne,noValidate:Ne,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:Ne,optimum:ie,pattern:null,ping:it,placeholder:null,playsInline:Ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ne,referrerPolicy:null,rel:it,required:Ne,reversed:Ne,rows:ie,rowSpan:ie,sandbox:it,scope:null,scoped:Ne,seamless:Ne,selected:Ne,shadowRootClonable:Ne,shadowRootDelegatesFocus:Ne,shadowRootMode:null,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:wt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:Ne,useMap:null,value:wt,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:it,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ne,declare:Ne,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:Ne,noHref:Ne,noShade:Ne,noWrap:Ne,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:wt,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ne,disableRemotePlayback:Ne,prefix:null,property:null,results:ie,security:null,unselectable:null},space:"html",transform:Nv}),QA=Bl({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:vn,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:it,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:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:Ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,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:Ml,g2:Ml,glyphName:Ml,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:vn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,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:ie,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:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:it,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vn,rev:vn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vn,requiredFeatures:vn,requiredFonts:vn,requiredFormats:vn,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:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:vn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vn,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ov}),Dv=Bl({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()}}),Mv=Bl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Nv}),jv=Bl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),YA={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"},XA=/[A-Z]/g,r0=/-[a-z]/g,KA=/^data[-\w.:]+$/i;function zv(e,t){const r=Xd(t);let l=t,a=dn;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&KA.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(r0,JA);l="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!r0.test(o)){let u=o.replace(XA,ZA);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}a=Ih}return new a(l,t)}function ZA(e){return"-"+e.toLowerCase()}function JA(e){return e.charAt(1).toUpperCase()}const Iv=Rv([Lv,$A,Dv,Mv,jv],"html"),us=Rv([Lv,QA,Dv,Mv,jv],"svg");function Pv(e){return e.join(" ").trim()}var kl={},ud,i0;function WA(){if(i0)return ud;i0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
|
|
21
|
+
`,h="/",g="*",p="",b="comment",x="declaration";function w(R,C){if(typeof R!="string")throw new TypeError("First argument must be a string");if(!R)return[];C=C||{};var L=1,O=1;function B(le){var ne=le.match(t);ne&&(L+=ne.length);var z=le.lastIndexOf(d);O=~z?le.length-z:O+le.length}function Y(){var le={line:L,column:O};return function(ne){return ne.position=new j(le),se(),ne}}function j(le){this.start=le,this.end={line:L,column:O},this.source=C.source}j.prototype.content=R;function q(le){var ne=new Error(C.source+":"+L+":"+O+": "+le);if(ne.reason=le,ne.filename=C.source,ne.line=L,ne.column=O,ne.source=R,!C.silent)throw ne}function G(le){var ne=le.exec(R);if(ne){var z=ne[0];return B(z),R=R.slice(z.length),ne}}function se(){G(r)}function P(le){var ne;for(le=le||[];ne=X();)ne!==!1&&le.push(ne);return le}function X(){var le=Y();if(!(h!=R.charAt(0)||g!=R.charAt(1))){for(var ne=2;p!=R.charAt(ne)&&(g!=R.charAt(ne)||h!=R.charAt(ne+1));)++ne;if(ne+=2,p===R.charAt(ne-1))return q("End of comment missing");var z=R.slice(2,ne-2);return O+=2,B(z),R=R.slice(ne),O+=2,le({type:b,comment:z})}}function te(){var le=Y(),ne=G(l);if(ne){if(X(),!G(a))return q("property missing ':'");var z=G(o),J=le({type:x,property:E(ne[0].replace(e,p)),value:z?E(z[0].replace(e,p)):p});return G(u),J}}function de(){var le=[];P(le);for(var ne;ne=te();)ne!==!1&&(le.push(ne),P(le));return le}return se(),de()}function E(R){return R?R.replace(f,p):p}return ud=w,ud}var l0;function eT(){if(l0)return kl;l0=1;var e=kl&&kl.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(kl,"__esModule",{value:!0}),kl.default=r;const t=e(WA());function r(l,a){let o=null;if(!l||typeof l!="string")return o;const u=(0,t.default)(l),f=typeof a=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:g}=d;f?a(h,g,d):g&&(o=o||{},o[h]=g)}),o}return kl}var Ba={},a0;function tT(){if(a0)return Ba;a0=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(h){return!h||r.test(h)||e.test(h)},u=function(h,g){return g.toUpperCase()},f=function(h,g){return"".concat(g,"-")},d=function(h,g){return g===void 0&&(g={}),o(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(a,f):h=h.replace(l,f),h.replace(t,u))};return Ba.camelCase=d,Ba}var Ua,s0;function nT(){if(s0)return Ua;s0=1;var e=Ua&&Ua.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(eT()),r=tT();function l(a,o){var u={};return!a||typeof a!="string"||(0,t.default)(a,function(f,d){f&&d&&(u[(0,r.camelCase)(f,o)]=d)}),u}return l.default=l,Ua=l,Ua}var rT=nT();const iT=gu(rT),Bv=Uv("end"),Ph=Uv("start");function Uv(e){return t;function t(r){const l=r&&r.position&&r.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function lT(e){const t=Ph(e),r=Bv(e);if(t&&r)return{start:t,end:r}}function qa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?o0(e.position):"start"in e||"end"in e?o0(e):"line"in e||"column"in e?Jd(e):""}function Jd(e){return u0(e&&e.line)+":"+u0(e&&e.column)}function o0(e){return Jd(e&&e.start)+"-"+Jd(e&&e.end)}function u0(e){return e&&typeof e=="number"?e:1}class Xt extends Error{constructor(t,r,l){super(),typeof r=="string"&&(l=r,r=void 0);let a="",o={},u=!1;if(r&&("line"in r&&"column"in r?o={place:r}:"start"in r&&"end"in r?o={place:r}:"type"in r?o={ancestors:[r],place:r.position}:o={...r}),typeof t=="string"?a=t:!o.cause&&t&&(u=!0,a=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof l=="string"){const d=l.indexOf(":");d===-1?o.ruleId=l:(o.source=l.slice(0,d),o.ruleId=l.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.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=a,this.line=f?f.line:void 0,this.name=qa(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=u&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Xt.prototype.file="";Xt.prototype.name="";Xt.prototype.reason="";Xt.prototype.message="";Xt.prototype.stack="";Xt.prototype.column=void 0;Xt.prototype.line=void 0;Xt.prototype.ancestors=void 0;Xt.prototype.cause=void 0;Xt.prototype.fatal=void 0;Xt.prototype.place=void 0;Xt.prototype.ruleId=void 0;Xt.prototype.source=void 0;const Bh={}.hasOwnProperty,aT=new Map,sT=/[A-Z]/g,oT=new Set(["table","tbody","thead","tfoot","tr"]),uT=new Set(["td","th"]),Vv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function cT(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let l;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=bT(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");l=yT(r,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:l,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"?us:Iv,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Hv(a,e,void 0);return o&&typeof o!="string"?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function Hv(e,t,r){if(t.type==="element")return fT(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return dT(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return mT(e,t,r);if(t.type==="mdxjsEsm")return hT(e,t);if(t.type==="root")return pT(e,t,r);if(t.type==="text")return gT(e,t)}function fT(e,t,r){const l=e.schema;let a=l;t.tagName.toLowerCase()==="svg"&&l.space==="html"&&(a=us,e.schema=a),e.ancestors.push(t);const o=Fv(e,t.tagName,!1),u=xT(e,t);let f=Vh(e,t);return oT.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!xu(d):!0})),Gv(e,u,o,t),Uh(u,f),e.ancestors.pop(),e.schema=l,e.create(t,o,u,r)}function dT(e,t){if(t.data&&t.data.estree&&e.evaluater){const l=t.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}Ja(e,t.position)}function hT(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ja(e,t.position)}function mT(e,t,r){const l=e.schema;let a=l;t.name==="svg"&&l.space==="html"&&(a=us,e.schema=a),e.ancestors.push(t);const o=t.name===null?e.Fragment:Fv(e,t.name,!0),u=vT(e,t),f=Vh(e,t);return Gv(e,u,o,t),Uh(u,f),e.ancestors.pop(),e.schema=l,e.create(t,o,u,r)}function pT(e,t,r){const l={};return Uh(l,Vh(e,t)),e.create(t,e.Fragment,l,r)}function gT(e,t){return t.value}function Gv(e,t,r,l){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=l)}function Uh(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function yT(e,t,r){return l;function l(a,o,u,f){const h=Array.isArray(u.children)?r:t;return f?h(o,u,f):h(o,u)}}function bT(e,t){return r;function r(l,a,o,u){const f=Array.isArray(o.children),d=Ph(l);return t(a,o,u,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function xT(e,t){const r={};let l,a;for(a in t.properties)if(a!=="children"&&Bh.call(t.properties,a)){const o=_T(e,a,t.properties[a]);if(o){const[u,f]=o;e.tableCellAlignToStyle&&u==="align"&&typeof f=="string"&&uT.has(t.tagName)?l=f:r[u]=f}}if(l){const o=r.style||(r.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return r}function vT(e,t){const r={};for(const l of t.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const o=l.data.estree.body[0];o.type;const u=o.expression;u.type;const f=u.properties[0];f.type,Object.assign(r,e.evaluater.evaluateExpression(f.argument))}else Ja(e,t.position);else{const a=l.name;let o;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const f=l.value.data.estree.body[0];f.type,o=e.evaluater.evaluateExpression(f.expression)}else Ja(e,t.position);else o=l.value===null?!0:l.value;r[a]=o}return r}function Vh(e,t){const r=[];let l=-1;const a=e.passKeys?new Map:aT;for(;++l<t.children.length;){const o=t.children[l];let u;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const h=a.get(d)||0;u=d+"-"+h,a.set(d,h+1)}}const f=Hv(e,o,u);f!==void 0&&r.push(f)}return r}function _T(e,t,r){const l=zv(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=l.commaSeparated?Tv(r):Pv(r)),l.property==="style"){let a=typeof r=="object"?r:wT(e,String(r));return e.stylePropertyNameCase==="css"&&(a=ST(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&l.space?YA[l.property]||l.property:l.attribute,r]}}function wT(e,t){try{return iT(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const l=r,a=new Xt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Vv+"#cannot-parse-style-attribute",a}}function Fv(e,t,r){let l;if(!r)l={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let o=-1,u;for(;++o<a.length;){const f=e0(a[o])?{type:"Identifier",name:a[o]}:{type:"Literal",value:a[o]};u=u?{type:"MemberExpression",object:u,property:f,computed:!!(o&&f.type==="Literal"),optional:!1}:f}l=u}else l=e0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(l.type==="Literal"){const a=l.value;return Bh.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(l);Ja(e)}function Ja(e,t){const r=new Xt("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=Vv+"#cannot-handle-mdx-estrees-without-createevaluater",r}function ST(e){const t={};let r;for(r in e)Bh.call(e,r)&&(t[ET(r)]=e[r]);return t}function ET(e){let t=e.replace(sT,CT);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function CT(e){return"-"+e.toLowerCase()}const cd={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"]},kT={};function Hh(e,t){const r=kT,l=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,a=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return qv(e,l,a)}function qv(e,t,r){if(AT(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 c0(e.children,t,r)}return Array.isArray(e)?c0(e,t,r):""}function c0(e,t,r){const l=[];let a=-1;for(;++a<e.length;)l[a]=qv(e[a],t,r);return l.join("")}function AT(e){return!!(e&&typeof e=="object")}const f0=document.createElement("i");function Gh(e){const t="&"+e+";";f0.innerHTML=t;const r=f0.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function _n(e,t,r,l){const a=e.length;let o=0,u;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,r=r>0?r:0,l.length<1e4)u=Array.from(l),u.unshift(t,r),e.splice(...u);else for(r&&e.splice(t,r);o<l.length;)u=l.slice(o,o+1e4),u.unshift(t,0),e.splice(...u),o+=1e4,t+=1e4}function zn(e,t){return e.length>0?(_n(e,e.length,0,t),e):t}const d0={}.hasOwnProperty;function $v(e){const t={};let r=-1;for(;++r<e.length;)TT(t,e[r]);return t}function TT(e,t){let r;for(r in t){const a=(d0.call(e,r)?e[r]:void 0)||(e[r]={}),o=t[r];let u;if(o)for(u in o){d0.call(a,u)||(a[u]=[]);const f=o[u];RT(a[u],Array.isArray(f)?f:f?[f]:[])}}}function RT(e,t){let r=-1;const l=[];for(;++r<t.length;)(t[r].add==="after"?e:l).push(t[r]);_n(e,0,0,l)}function Qv(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 Fn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Wt=oi(/[A-Za-z]/),Yt=oi(/[\dA-Za-z]/),LT=oi(/[#-'*+\--9=?A-Z^-~]/);function eu(e){return e!==null&&(e<32||e===127)}const Wd=oi(/\d/),OT=oi(/[\dA-Fa-f]/),NT=oi(/[!-/:-@[-`{-~]/);function Se(e){return e!==null&&e<-2}function rt(e){return e!==null&&(e<0||e===32)}function Pe(e){return e===-2||e===-1||e===32}const vu=oi(new RegExp("\\p{P}|\\p{S}","u")),zi=oi(/\s/);function oi(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Ul(e){const t=[];let r=-1,l=0,a=0;for(;++r<e.length;){const o=e.charCodeAt(r);let u="";if(o===37&&Yt(e.charCodeAt(r+1))&&Yt(e.charCodeAt(r+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(u=String.fromCharCode(o));else if(o>55295&&o<57344){const f=e.charCodeAt(r+1);o<56320&&f>56319&&f<57344?(u=String.fromCharCode(o,f),a=1):u="�"}else u=String.fromCharCode(o);u&&(t.push(e.slice(l,r),encodeURIComponent(u)),l=r+a+1,u=""),a&&(r+=a,a=0)}return t.join("")+e.slice(l)}function Ge(e,t,r,l){const a=l?l-1:Number.POSITIVE_INFINITY;let o=0;return u;function u(d){return Pe(d)?(e.enter(r),f(d)):t(d)}function f(d){return Pe(d)&&o++<a?(e.consume(d),f):(e.exit(r),t(d))}}const DT={tokenize:MT};function MT(e){const t=e.attempt(this.parser.constructs.contentInitial,l,a);let r;return t;function l(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ge(e,t,"linePrefix")}function a(f){return e.enter("paragraph"),o(f)}function o(f){const d=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=d),r=d,u(f)}function u(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Se(f)?(e.consume(f),e.exit("chunkText"),o):(e.consume(f),u)}}const jT={tokenize:zT},h0={tokenize:IT};function zT(e){const t=this,r=[];let l=0,a,o,u;return f;function f(O){if(l<r.length){const B=r[l];return t.containerState=B[1],e.attempt(B[0].continuation,d,h)(O)}return h(O)}function d(O){if(l++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&L();const B=t.events.length;let Y=B,j;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){j=t.events[Y][1].end;break}C(l);let q=B;for(;q<t.events.length;)t.events[q][1].end={...j},q++;return _n(t.events,Y+1,0,t.events.slice(B)),t.events.length=q,h(O)}return f(O)}function h(O){if(l===r.length){if(!a)return b(O);if(a.currentConstruct&&a.currentConstruct.concrete)return w(O);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(h0,g,p)(O)}function g(O){return a&&L(),C(l),b(O)}function p(O){return t.parser.lazy[t.now().line]=l!==r.length,u=t.now().offset,w(O)}function b(O){return t.containerState={},e.attempt(h0,x,w)(O)}function x(O){return l++,r.push([t.currentConstruct,t.containerState]),b(O)}function w(O){if(O===null){a&&L(),C(0),e.consume(O);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:o}),E(O)}function E(O){if(O===null){R(e.exit("chunkFlow"),!0),C(0),e.consume(O);return}return Se(O)?(e.consume(O),R(e.exit("chunkFlow")),l=0,t.interrupt=void 0,f):(e.consume(O),E)}function R(O,B){const Y=t.sliceStream(O);if(B&&Y.push(null),O.previous=o,o&&(o.next=O),o=O,a.defineSkip(O.start),a.write(Y),t.parser.lazy[O.start.line]){let j=a.events.length;for(;j--;)if(a.events[j][1].start.offset<u&&(!a.events[j][1].end||a.events[j][1].end.offset>u))return;const q=t.events.length;let G=q,se,P;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){if(se){P=t.events[G][1].end;break}se=!0}for(C(l),j=q;j<t.events.length;)t.events[j][1].end={...P},j++;_n(t.events,G+1,0,t.events.slice(q)),t.events.length=j}}function C(O){let B=r.length;for(;B-- >O;){const Y=r[B];t.containerState=Y[1],Y[0].exit.call(t,e)}r.length=O}function L(){a.write([null]),o=void 0,a=void 0,t.containerState._closeFlow=void 0}}function IT(e,t,r){return Ge(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Il(e){if(e===null||rt(e)||zi(e))return 1;if(vu(e))return 2}function _u(e,t,r){const l=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!l.includes(o)&&(t=o(t,r),l.push(o))}return t}const eh={name:"attention",resolveAll:PT,tokenize:BT};function PT(e,t){let r=-1,l,a,o,u,f,d,h,g;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(l=r;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&t.sliceSerialize(e[l][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[l][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;d=e[l][1].end.offset-e[l][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const p={...e[l][1].end},b={...e[r][1].start};m0(p,-d),m0(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:p,end:{...e[l][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:b},o={type:d>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[r][1].start}},a={type:d>1?"strong":"emphasis",start:{...u.start},end:{...f.end}},e[l][1].end={...u.start},e[r][1].start={...f.end},h=[],e[l][1].end.offset-e[l][1].start.offset&&(h=zn(h,[["enter",e[l][1],t],["exit",e[l][1],t]])),h=zn(h,[["enter",a,t],["enter",u,t],["exit",u,t],["enter",o,t]]),h=zn(h,_u(t.parser.constructs.insideSpan.null,e.slice(l+1,r),t)),h=zn(h,[["exit",o,t],["enter",f,t],["exit",f,t],["exit",a,t]]),e[r][1].end.offset-e[r][1].start.offset?(g=2,h=zn(h,[["enter",e[r][1],t],["exit",e[r][1],t]])):g=0,_n(e,l-1,r-l+3,h),r=l+h.length-g-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function BT(e,t){const r=this.parser.constructs.attentionMarkers.null,l=this.previous,a=Il(l);let o;return u;function u(d){return o=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===o)return e.consume(d),f;const h=e.exit("attentionSequence"),g=Il(d),p=!g||g===2&&a||r.includes(d),b=!a||a===2&&g||r.includes(l);return h._open=!!(o===42?p:p&&(a||!b)),h._close=!!(o===42?b:b&&(g||!p)),t(d)}}function m0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const UT={name:"autolink",tokenize:VT};function VT(e,t,r){let l=0;return a;function a(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(x){return Wt(x)?(e.consume(x),u):x===64?r(x):h(x)}function u(x){return x===43||x===45||x===46||Yt(x)?(l=1,f(x)):h(x)}function f(x){return x===58?(e.consume(x),l=0,d):(x===43||x===45||x===46||Yt(x))&&l++<32?(e.consume(x),f):(l=0,h(x))}function d(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||eu(x)?r(x):(e.consume(x),d)}function h(x){return x===64?(e.consume(x),g):LT(x)?(e.consume(x),h):r(x)}function g(x){return Yt(x)?p(x):r(x)}function p(x){return x===46?(e.consume(x),l=0,g):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):b(x)}function b(x){if((x===45||Yt(x))&&l++<63){const w=x===45?b:p;return e.consume(x),w}return r(x)}}const cs={partial:!0,tokenize:HT};function HT(e,t,r){return l;function l(o){return Pe(o)?Ge(e,a,"linePrefix")(o):a(o)}function a(o){return o===null||Se(o)?t(o):r(o)}}const Yv={continuation:{tokenize:FT},exit:qT,name:"blockQuote",tokenize:GT};function GT(e,t,r){const l=this;return a;function a(u){if(u===62){const f=l.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),o}return r(u)}function o(u){return Pe(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function FT(e,t,r){const l=this;return a;function a(u){return Pe(u)?Ge(e,o,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):o(u)}function o(u){return e.attempt(Yv,t,r)(u)}}function qT(e){e.exit("blockQuote")}const Xv={name:"characterEscape",tokenize:$T};function $T(e,t,r){return l;function l(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),a}function a(o){return NT(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}const Kv={name:"characterReference",tokenize:QT};function QT(e,t,r){const l=this;let a=0,o,u;return f;function f(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,u=Yt,g(p))}function h(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,u=OT,g):(e.enter("characterReferenceValue"),o=7,u=Wd,g(p))}function g(p){if(p===59&&a){const b=e.exit("characterReferenceValue");return u===Yt&&!Gh(l.sliceSerialize(b))?r(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(p)&&a++<o?(e.consume(p),g):r(p)}}const p0={partial:!0,tokenize:XT},g0={concrete:!0,name:"codeFenced",tokenize:YT};function YT(e,t,r){const l=this,a={partial:!0,tokenize:Y};let o=0,u=0,f;return d;function d(j){return h(j)}function h(j){const q=l.events[l.events.length-1];return o=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,f=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(j)}function g(j){return j===f?(u++,e.consume(j),g):u<3?r(j):(e.exit("codeFencedFenceSequence"),Pe(j)?Ge(e,p,"whitespace")(j):p(j))}function p(j){return j===null||Se(j)?(e.exit("codeFencedFence"),l.interrupt?t(j):e.check(p0,E,B)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(j))}function b(j){return j===null||Se(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(j)):Pe(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ge(e,x,"whitespace")(j)):j===96&&j===f?r(j):(e.consume(j),b)}function x(j){return j===null||Se(j)?p(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(j))}function w(j){return j===null||Se(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(j)):j===96&&j===f?r(j):(e.consume(j),w)}function E(j){return e.attempt(a,B,R)(j)}function R(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),C}function C(j){return o>0&&Pe(j)?Ge(e,L,"linePrefix",o+1)(j):L(j)}function L(j){return j===null||Se(j)?e.check(p0,E,B)(j):(e.enter("codeFlowValue"),O(j))}function O(j){return j===null||Se(j)?(e.exit("codeFlowValue"),L(j)):(e.consume(j),O)}function B(j){return e.exit("codeFenced"),t(j)}function Y(j,q,G){let se=0;return P;function P(ne){return j.enter("lineEnding"),j.consume(ne),j.exit("lineEnding"),X}function X(ne){return j.enter("codeFencedFence"),Pe(ne)?Ge(j,te,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ne):te(ne)}function te(ne){return ne===f?(j.enter("codeFencedFenceSequence"),de(ne)):G(ne)}function de(ne){return ne===f?(se++,j.consume(ne),de):se>=u?(j.exit("codeFencedFenceSequence"),Pe(ne)?Ge(j,le,"whitespace")(ne):le(ne)):G(ne)}function le(ne){return ne===null||Se(ne)?(j.exit("codeFencedFence"),q(ne)):G(ne)}}}function XT(e,t,r){const l=this;return a;function a(u){return u===null?r(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o)}function o(u){return l.parser.lazy[l.now().line]?r(u):t(u)}}const fd={name:"codeIndented",tokenize:ZT},KT={partial:!0,tokenize:JT};function ZT(e,t,r){const l=this;return a;function a(h){return e.enter("codeIndented"),Ge(e,o,"linePrefix",5)(h)}function o(h){const g=l.events[l.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?u(h):r(h)}function u(h){return h===null?d(h):Se(h)?e.attempt(KT,u,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Se(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),t(h)}}function JT(e,t,r){const l=this;return a;function a(u){return l.parser.lazy[l.now().line]?r(u):Se(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):Ge(e,o,"linePrefix",5)(u)}function o(u){const f=l.events[l.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):Se(u)?a(u):r(u)}}const WT={name:"codeText",previous:t2,resolve:e2,tokenize:n2};function e2(e){let t=e.length-4,r=3,l,a;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(l=r;++l<t;)if(e[l][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(l=r-1,t++;++l<=t;)a===void 0?l!==t&&e[l][1].type!=="lineEnding"&&(a=l):(l===t||e[l][1].type==="lineEnding")&&(e[a][1].type="codeTextData",l!==a+2&&(e[a][1].end=e[l-1][1].end,e.splice(a+2,l-a-2),t-=l-a-2,l=a+2),a=void 0);return e}function t2(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function n2(e,t,r){let l=0,a,o;return u;function u(p){return e.enter("codeText"),e.enter("codeTextSequence"),f(p)}function f(p){return p===96?(e.consume(p),l++,f):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?r(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(o=e.enter("codeTextSequence"),a=0,g(p)):Se(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||Se(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),h)}function g(p){return p===96?(e.consume(p),a++,g):a===l?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(o.type="codeTextData",h(p))}}class r2{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 l=r??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(t,l):t>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(t,r,l){const a=r||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return l&&Va(this.left,l),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),Va(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Va(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);Va(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Va(this.left,r.reverse())}}}function Va(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 Zv(e){const t={};let r=-1,l,a,o,u,f,d,h;const g=new r2(e);for(;++r<g.length;){for(;r in t;)r=t[r];if(l=g.get(r),r&&l[1].type==="chunkFlow"&&g.get(r-1)[1].type==="listItemPrefix"&&(d=l[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(l[0]==="enter")l[1].contentType&&(Object.assign(t,i2(g,r)),r=t[r],h=!0);else if(l[1]._container){for(o=r,a=void 0;o--;)if(u=g.get(o),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(a&&(g.get(a)[1].type="lineEndingBlank"),u[1].type="lineEnding",a=o);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;a&&(l[1].end={...g.get(a)[1].start},f=g.slice(a,r),f.unshift(l),g.splice(a,r-a+1,f))}}return _n(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function i2(e,t){const r=e.get(t)[1],l=e.get(t)[2];let a=t-1;const o=[];let u=r._tokenizer;u||(u=l.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const f=u.events,d=[],h={};let g,p,b=-1,x=r,w=0,E=0;const R=[E];for(;x;){for(;e.get(++a)[1]!==x;);o.push(a),x._tokenizer||(g=l.sliceStream(x),x.next||g.push(null),p&&u.defineSkip(x.start),x._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(g),x._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),p=x,x=x.next}for(x=r;++b<f.length;)f[b][0]==="exit"&&f[b-1][0]==="enter"&&f[b][1].type===f[b-1][1].type&&f[b][1].start.line!==f[b][1].end.line&&(E=b+1,R.push(E),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(u.events=[],x?(x._tokenizer=void 0,x.previous=void 0):R.pop(),b=R.length;b--;){const C=f.slice(R[b],R[b+1]),L=o.pop();d.push([L,L+C.length-1]),e.splice(L,2,C)}for(d.reverse(),b=-1;++b<d.length;)h[w+d[b][0]]=w+d[b][1],w+=d[b][1]-d[b][0]-1;return h}const l2={resolve:s2,tokenize:o2},a2={partial:!0,tokenize:u2};function s2(e){return Zv(e),e}function o2(e,t){let r;return l;function l(f){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),a(f)}function a(f){return f===null?o(f):Se(f)?e.check(a2,u,o)(f):(e.consume(f),a)}function o(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function u(f){return e.consume(f),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,a}}function u2(e,t,r){const l=this;return a;function a(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Ge(e,o,"linePrefix")}function o(u){if(u===null||Se(u))return r(u);const f=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):e.interrupt(l.parser.constructs.flow,r,t)(u)}}function Jv(e,t,r,l,a,o,u,f,d){const h=d||Number.POSITIVE_INFINITY;let g=0;return p;function p(C){return C===60?(e.enter(l),e.enter(a),e.enter(o),e.consume(C),e.exit(o),b):C===null||C===32||C===41||eu(C)?r(C):(e.enter(l),e.enter(u),e.enter(f),e.enter("chunkString",{contentType:"string"}),E(C))}function b(C){return C===62?(e.enter(o),e.consume(C),e.exit(o),e.exit(a),e.exit(l),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),x(C))}function x(C){return C===62?(e.exit("chunkString"),e.exit(f),b(C)):C===null||C===60||Se(C)?r(C):(e.consume(C),C===92?w:x)}function w(C){return C===60||C===62||C===92?(e.consume(C),x):x(C)}function E(C){return!g&&(C===null||C===41||rt(C))?(e.exit("chunkString"),e.exit(f),e.exit(u),e.exit(l),t(C)):g<h&&C===40?(e.consume(C),g++,E):C===41?(e.consume(C),g--,E):C===null||C===32||C===40||eu(C)?r(C):(e.consume(C),C===92?R:E)}function R(C){return C===40||C===41||C===92?(e.consume(C),E):E(C)}}function Wv(e,t,r,l,a,o){const u=this;let f=0,d;return h;function h(x){return e.enter(l),e.enter(a),e.consume(x),e.exit(a),e.enter(o),g}function g(x){return f>999||x===null||x===91||x===93&&!d||x===94&&!f&&"_hiddenFootnoteSupport"in u.parser.constructs?r(x):x===93?(e.exit(o),e.enter(a),e.consume(x),e.exit(a),e.exit(l),t):Se(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===null||x===91||x===93||Se(x)||f++>999?(e.exit("chunkString"),g(x)):(e.consume(x),d||(d=!Pe(x)),x===92?b:p)}function b(x){return x===91||x===92||x===93?(e.consume(x),f++,p):p(x)}}function e1(e,t,r,l,a,o){let u;return f;function f(b){return b===34||b===39||b===40?(e.enter(l),e.enter(a),e.consume(b),e.exit(a),u=b===40?41:b,d):r(b)}function d(b){return b===u?(e.enter(a),e.consume(b),e.exit(a),e.exit(l),t):(e.enter(o),h(b))}function h(b){return b===u?(e.exit(o),d(u)):b===null?r(b):Se(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Ge(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===u||b===null||Se(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?p:g)}function p(b){return b===u||b===92?(e.consume(b),g):g(b)}}function $a(e,t){let r;return l;function l(a){return Se(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),r=!0,l):Pe(a)?Ge(e,l,r?"linePrefix":"lineSuffix")(a):t(a)}}const c2={name:"definition",tokenize:d2},f2={partial:!0,tokenize:h2};function d2(e,t,r){const l=this;let a;return o;function o(x){return e.enter("definition"),u(x)}function u(x){return Wv.call(l,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function f(x){return a=Fn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),d):r(x)}function d(x){return rt(x)?$a(e,h)(x):h(x)}function h(x){return Jv(e,g,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function g(x){return e.attempt(f2,p,p)(x)}function p(x){return Pe(x)?Ge(e,b,"whitespace")(x):b(x)}function b(x){return x===null||Se(x)?(e.exit("definition"),l.parser.defined.push(a),t(x)):r(x)}}function h2(e,t,r){return l;function l(f){return rt(f)?$a(e,a)(f):r(f)}function a(f){return e1(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function o(f){return Pe(f)?Ge(e,u,"whitespace")(f):u(f)}function u(f){return f===null||Se(f)?t(f):r(f)}}const m2={name:"hardBreakEscape",tokenize:p2};function p2(e,t,r){return l;function l(o){return e.enter("hardBreakEscape"),e.consume(o),a}function a(o){return Se(o)?(e.exit("hardBreakEscape"),t(o)):r(o)}}const g2={name:"headingAtx",resolve:y2,tokenize:b2};function y2(e,t){let r=e.length-2,l=3,a,o;return e[l][1].type==="whitespace"&&(l+=2),r-2>l&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(l===r-1||r-4>l&&e[r-2][1].type==="whitespace")&&(r-=l+1===r?2:4),r>l&&(a={type:"atxHeadingText",start:e[l][1].start,end:e[r][1].end},o={type:"chunkText",start:e[l][1].start,end:e[r][1].end,contentType:"text"},_n(e,l,r-l+1,[["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t]])),e}function b2(e,t,r){let l=0;return a;function a(g){return e.enter("atxHeading"),o(g)}function o(g){return e.enter("atxHeadingSequence"),u(g)}function u(g){return g===35&&l++<6?(e.consume(g),u):g===null||rt(g)?(e.exit("atxHeadingSequence"),f(g)):r(g)}function f(g){return g===35?(e.enter("atxHeadingSequence"),d(g)):g===null||Se(g)?(e.exit("atxHeading"),t(g)):Pe(g)?Ge(e,f,"whitespace")(g):(e.enter("atxHeadingText"),h(g))}function d(g){return g===35?(e.consume(g),d):(e.exit("atxHeadingSequence"),f(g))}function h(g){return g===null||g===35||rt(g)?(e.exit("atxHeadingText"),f(g)):(e.consume(g),h)}}const x2=["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"],y0=["pre","script","style","textarea"],v2={concrete:!0,name:"htmlFlow",resolveTo:S2,tokenize:E2},_2={partial:!0,tokenize:k2},w2={partial:!0,tokenize:C2};function S2(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 E2(e,t,r){const l=this;let a,o,u,f,d;return h;function h(T){return g(T)}function g(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),p}function p(T){return T===33?(e.consume(T),b):T===47?(e.consume(T),o=!0,E):T===63?(e.consume(T),a=3,l.interrupt?t:k):Wt(T)?(e.consume(T),u=String.fromCharCode(T),R):r(T)}function b(T){return T===45?(e.consume(T),a=2,x):T===91?(e.consume(T),a=5,f=0,w):Wt(T)?(e.consume(T),a=4,l.interrupt?t:k):r(T)}function x(T){return T===45?(e.consume(T),l.interrupt?t:k):r(T)}function w(T){const ue="CDATA[";return T===ue.charCodeAt(f++)?(e.consume(T),f===ue.length?l.interrupt?t:te:w):r(T)}function E(T){return Wt(T)?(e.consume(T),u=String.fromCharCode(T),R):r(T)}function R(T){if(T===null||T===47||T===62||rt(T)){const ue=T===47,he=u.toLowerCase();return!ue&&!o&&y0.includes(he)?(a=1,l.interrupt?t(T):te(T)):x2.includes(u.toLowerCase())?(a=6,ue?(e.consume(T),C):l.interrupt?t(T):te(T)):(a=7,l.interrupt&&!l.parser.lazy[l.now().line]?r(T):o?L(T):O(T))}return T===45||Yt(T)?(e.consume(T),u+=String.fromCharCode(T),R):r(T)}function C(T){return T===62?(e.consume(T),l.interrupt?t:te):r(T)}function L(T){return Pe(T)?(e.consume(T),L):P(T)}function O(T){return T===47?(e.consume(T),P):T===58||T===95||Wt(T)?(e.consume(T),B):Pe(T)?(e.consume(T),O):P(T)}function B(T){return T===45||T===46||T===58||T===95||Yt(T)?(e.consume(T),B):Y(T)}function Y(T){return T===61?(e.consume(T),j):Pe(T)?(e.consume(T),Y):O(T)}function j(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(e.consume(T),d=T,q):Pe(T)?(e.consume(T),j):G(T)}function q(T){return T===d?(e.consume(T),d=null,se):T===null||Se(T)?r(T):(e.consume(T),q)}function G(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||rt(T)?Y(T):(e.consume(T),G)}function se(T){return T===47||T===62||Pe(T)?O(T):r(T)}function P(T){return T===62?(e.consume(T),X):r(T)}function X(T){return T===null||Se(T)?te(T):Pe(T)?(e.consume(T),X):r(T)}function te(T){return T===45&&a===2?(e.consume(T),z):T===60&&a===1?(e.consume(T),J):T===62&&a===4?(e.consume(T),N):T===63&&a===3?(e.consume(T),k):T===93&&a===5?(e.consume(T),me):Se(T)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(_2,Q,de)(T)):T===null||Se(T)?(e.exit("htmlFlowData"),de(T)):(e.consume(T),te)}function de(T){return e.check(w2,le,Q)(T)}function le(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),ne}function ne(T){return T===null||Se(T)?de(T):(e.enter("htmlFlowData"),te(T))}function z(T){return T===45?(e.consume(T),k):te(T)}function J(T){return T===47?(e.consume(T),u="",re):te(T)}function re(T){if(T===62){const ue=u.toLowerCase();return y0.includes(ue)?(e.consume(T),N):te(T)}return Wt(T)&&u.length<8?(e.consume(T),u+=String.fromCharCode(T),re):te(T)}function me(T){return T===93?(e.consume(T),k):te(T)}function k(T){return T===62?(e.consume(T),N):T===45&&a===2?(e.consume(T),k):te(T)}function N(T){return T===null||Se(T)?(e.exit("htmlFlowData"),Q(T)):(e.consume(T),N)}function Q(T){return e.exit("htmlFlow"),t(T)}}function C2(e,t,r){const l=this;return a;function a(u){return Se(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):r(u)}function o(u){return l.parser.lazy[l.now().line]?r(u):t(u)}}function k2(e,t,r){return l;function l(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(cs,t,r)}}const A2={name:"htmlText",tokenize:T2};function T2(e,t,r){const l=this;let a,o,u;return f;function f(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),h):k===47?(e.consume(k),Y):k===63?(e.consume(k),O):Wt(k)?(e.consume(k),G):r(k)}function h(k){return k===45?(e.consume(k),g):k===91?(e.consume(k),o=0,w):Wt(k)?(e.consume(k),L):r(k)}function g(k){return k===45?(e.consume(k),x):r(k)}function p(k){return k===null?r(k):k===45?(e.consume(k),b):Se(k)?(u=p,J(k)):(e.consume(k),p)}function b(k){return k===45?(e.consume(k),x):p(k)}function x(k){return k===62?z(k):k===45?b(k):p(k)}function w(k){const N="CDATA[";return k===N.charCodeAt(o++)?(e.consume(k),o===N.length?E:w):r(k)}function E(k){return k===null?r(k):k===93?(e.consume(k),R):Se(k)?(u=E,J(k)):(e.consume(k),E)}function R(k){return k===93?(e.consume(k),C):E(k)}function C(k){return k===62?z(k):k===93?(e.consume(k),C):E(k)}function L(k){return k===null||k===62?z(k):Se(k)?(u=L,J(k)):(e.consume(k),L)}function O(k){return k===null?r(k):k===63?(e.consume(k),B):Se(k)?(u=O,J(k)):(e.consume(k),O)}function B(k){return k===62?z(k):O(k)}function Y(k){return Wt(k)?(e.consume(k),j):r(k)}function j(k){return k===45||Yt(k)?(e.consume(k),j):q(k)}function q(k){return Se(k)?(u=q,J(k)):Pe(k)?(e.consume(k),q):z(k)}function G(k){return k===45||Yt(k)?(e.consume(k),G):k===47||k===62||rt(k)?se(k):r(k)}function se(k){return k===47?(e.consume(k),z):k===58||k===95||Wt(k)?(e.consume(k),P):Se(k)?(u=se,J(k)):Pe(k)?(e.consume(k),se):z(k)}function P(k){return k===45||k===46||k===58||k===95||Yt(k)?(e.consume(k),P):X(k)}function X(k){return k===61?(e.consume(k),te):Se(k)?(u=X,J(k)):Pe(k)?(e.consume(k),X):se(k)}function te(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(e.consume(k),a=k,de):Se(k)?(u=te,J(k)):Pe(k)?(e.consume(k),te):(e.consume(k),le)}function de(k){return k===a?(e.consume(k),a=void 0,ne):k===null?r(k):Se(k)?(u=de,J(k)):(e.consume(k),de)}function le(k){return k===null||k===34||k===39||k===60||k===61||k===96?r(k):k===47||k===62||rt(k)?se(k):(e.consume(k),le)}function ne(k){return k===47||k===62||rt(k)?se(k):r(k)}function z(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):r(k)}function J(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),re}function re(k){return Pe(k)?Ge(e,me,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):me(k)}function me(k){return e.enter("htmlTextData"),u(k)}}const Fh={name:"labelEnd",resolveAll:N2,resolveTo:D2,tokenize:M2},R2={tokenize:j2},L2={tokenize:z2},O2={tokenize:I2};function N2(e){let t=-1;const r=[];for(;++t<e.length;){const l=e[t][1];if(r.push(e[t]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const a=l.type==="labelImage"?4:2;l.type="data",t+=a}}return e.length!==r.length&&_n(e,0,e.length,r),e}function D2(e,t){let r=e.length,l=0,a,o,u,f;for(;r--;)if(a=e[r][1],o){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[r][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(u){if(e[r][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(o=r,a.type!=="labelLink")){l=2;break}}else a.type==="labelEnd"&&(u=r);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[u][1].end}},g={type:"labelText",start:{...e[o+l+2][1].end},end:{...e[u-2][1].start}};return f=[["enter",d,t],["enter",h,t]],f=zn(f,e.slice(o+1,o+l+3)),f=zn(f,[["enter",g,t]]),f=zn(f,_u(t.parser.constructs.insideSpan.null,e.slice(o+l+4,u-3),t)),f=zn(f,[["exit",g,t],e[u-2],e[u-1],["exit",h,t]]),f=zn(f,e.slice(u+1)),f=zn(f,[["exit",d,t]]),_n(e,o,e.length,f),e}function M2(e,t,r){const l=this;let a=l.events.length,o,u;for(;a--;)if((l.events[a][1].type==="labelImage"||l.events[a][1].type==="labelLink")&&!l.events[a][1]._balanced){o=l.events[a][1];break}return f;function f(b){return o?o._inactive?p(b):(u=l.parser.defined.includes(Fn(l.sliceSerialize({start:o.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):r(b)}function d(b){return b===40?e.attempt(R2,g,u?g:p)(b):b===91?e.attempt(L2,g,u?h:p)(b):u?g(b):p(b)}function h(b){return e.attempt(O2,g,p)(b)}function g(b){return t(b)}function p(b){return o._balanced=!0,r(b)}}function j2(e,t,r){return l;function l(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),a}function a(p){return rt(p)?$a(e,o)(p):o(p)}function o(p){return p===41?g(p):Jv(e,u,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function u(p){return rt(p)?$a(e,d)(p):g(p)}function f(p){return r(p)}function d(p){return p===34||p===39||p===40?e1(e,h,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):g(p)}function h(p){return rt(p)?$a(e,g)(p):g(p)}function g(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):r(p)}}function z2(e,t,r){const l=this;return a;function a(f){return Wv.call(l,e,o,u,"reference","referenceMarker","referenceString")(f)}function o(f){return l.parser.defined.includes(Fn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?t(f):r(f)}function u(f){return r(f)}}function I2(e,t,r){return l;function l(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),a}function a(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):r(o)}}const P2={name:"labelStartImage",resolveAll:Fh.resolveAll,tokenize:B2};function B2(e,t,r){const l=this;return a;function a(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"),u):r(f)}function u(f){return f===94&&"_hiddenFootnoteSupport"in l.parser.constructs?r(f):t(f)}}const U2={name:"labelStartLink",resolveAll:Fh.resolveAll,tokenize:V2};function V2(e,t,r){const l=this;return a;function a(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),o}function o(u){return u===94&&"_hiddenFootnoteSupport"in l.parser.constructs?r(u):t(u)}}const dd={name:"lineEnding",tokenize:H2};function H2(e,t){return r;function r(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Ge(e,t,"linePrefix")}}const Fo={name:"thematicBreak",tokenize:G2};function G2(e,t,r){let l=0,a;return o;function o(h){return e.enter("thematicBreak"),u(h)}function u(h){return a=h,f(h)}function f(h){return h===a?(e.enter("thematicBreakSequence"),d(h)):l>=3&&(h===null||Se(h))?(e.exit("thematicBreak"),t(h)):r(h)}function d(h){return h===a?(e.consume(h),l++,d):(e.exit("thematicBreakSequence"),Pe(h)?Ge(e,f,"whitespace")(h):f(h))}}const cn={continuation:{tokenize:Q2},exit:X2,name:"list",tokenize:$2},F2={partial:!0,tokenize:K2},q2={partial:!0,tokenize:Y2};function $2(e,t,r){const l=this,a=l.events[l.events.length-1];let o=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,u=0;return f;function f(x){const w=l.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!l.containerState.marker||x===l.containerState.marker:Wd(x)){if(l.containerState.type||(l.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(Fo,r,h)(x):h(x);if(!l.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(x)}return r(x)}function d(x){return Wd(x)&&++u<10?(e.consume(x),d):(!l.interrupt||u<2)&&(l.containerState.marker?x===l.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),h(x)):r(x)}function h(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||x,e.check(cs,l.interrupt?r:g,e.attempt(F2,b,p))}function g(x){return l.containerState.initialBlankLine=!0,o++,b(x)}function p(x){return Pe(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),b):r(x)}function b(x){return l.containerState.size=o+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function Q2(e,t,r){const l=this;return l.containerState._closeFlow=void 0,e.check(cs,a,o);function a(f){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,Ge(e,t,"listItemIndent",l.containerState.size+1)(f)}function o(f){return l.containerState.furtherBlankLines||!Pe(f)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,u(f)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt(q2,t,u)(f))}function u(f){return l.containerState._closeFlow=!0,l.interrupt=void 0,Ge(e,e.attempt(cn,t,r),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function Y2(e,t,r){const l=this;return Ge(e,a,"listItemIndent",l.containerState.size+1);function a(o){const u=l.events[l.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===l.containerState.size?t(o):r(o)}}function X2(e){e.exit(this.containerState.type)}function K2(e,t,r){const l=this;return Ge(e,a,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(o){const u=l.events[l.events.length-1];return!Pe(o)&&u&&u[1].type==="listItemPrefixWhitespace"?t(o):r(o)}}const b0={name:"setextUnderline",resolveTo:Z2,tokenize:J2};function Z2(e,t){let r=e.length,l,a,o;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){l=r;break}e[r][1].type==="paragraph"&&(a=r)}else e[r][1].type==="content"&&e.splice(r,1),!o&&e[r][1].type==="definition"&&(o=r);const u={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",o?(e.splice(a,0,["enter",u,t]),e.splice(o+1,0,["exit",e[l][1],t]),e[l][1].end={...e[o][1].end}):e[l][1]=u,e.push(["exit",u,t]),e}function J2(e,t,r){const l=this;let a;return o;function o(h){let g=l.events.length,p;for(;g--;)if(l.events[g][1].type!=="lineEnding"&&l.events[g][1].type!=="linePrefix"&&l.events[g][1].type!=="content"){p=l.events[g][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||p)?(e.enter("setextHeadingLine"),a=h,u(h)):r(h)}function u(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===a?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Pe(h)?Ge(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Se(h)?(e.exit("setextHeadingLine"),t(h)):r(h)}}const W2={tokenize:eR};function eR(e){const t=this,r=e.attempt(cs,l,e.attempt(this.parser.constructs.flowInitial,a,Ge(e,e.attempt(this.parser.constructs.flow,a,e.attempt(l2,a)),"linePrefix")));return r;function l(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function a(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const tR={resolveAll:n1()},nR=t1("string"),rR=t1("text");function t1(e){return{resolveAll:n1(e==="text"?iR:void 0),tokenize:t};function t(r){const l=this,a=this.parser.constructs[e],o=r.attempt(a,u,f);return u;function u(g){return h(g)?o(g):f(g)}function f(g){if(g===null){r.consume(g);return}return r.enter("data"),r.consume(g),d}function d(g){return h(g)?(r.exit("data"),o(g)):(r.consume(g),d)}function h(g){if(g===null)return!0;const p=a[g];let b=-1;if(p)for(;++b<p.length;){const x=p[b];if(!x.previous||x.previous.call(l,l.previous))return!0}return!1}}}function n1(e){return t;function t(r,l){let a=-1,o;for(;++a<=r.length;)o===void 0?r[a]&&r[a][1].type==="data"&&(o=a,a++):(!r[a]||r[a][1].type!=="data")&&(a!==o+2&&(r[o][1].end=r[a-1][1].end,r.splice(o+2,a-o-2),a=o+2),o=void 0);return e?e(r,l):r}}function iR(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 l=e[r-1][1],a=t.sliceStream(l);let o=a.length,u=-1,f=0,d;for(;o--;){const h=a[o];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)f++,u--;if(u)break;u=-1}else if(h===-2)d=!0,f++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(f=0),f){const h={type:r===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?u:l.start._bufferIndex+u,_index:l.start._index+o,line:l.end.line,column:l.end.column-f,offset:l.end.offset-f},end:{...l.end}};l.end={...h.start},l.start.offset===l.end.offset?Object.assign(l,h):(e.splice(r,0,["enter",h,t],["exit",h,t]),r+=2)}r++}return e}const lR={42:cn,43:cn,45:cn,48:cn,49:cn,50:cn,51:cn,52:cn,53:cn,54:cn,55:cn,56:cn,57:cn,62:Yv},aR={91:c2},sR={[-2]:fd,[-1]:fd,32:fd},oR={35:g2,42:Fo,45:[b0,Fo],60:v2,61:b0,95:Fo,96:g0,126:g0},uR={38:Kv,92:Xv},cR={[-5]:dd,[-4]:dd,[-3]:dd,33:P2,38:Kv,42:eh,60:[UT,A2],91:U2,92:[m2,Xv],93:Fh,95:eh,96:WT},fR={null:[eh,tR]},dR={null:[42,95]},hR={null:[]},mR=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:dR,contentInitial:aR,disable:hR,document:lR,flow:oR,flowInitial:sR,insideSpan:fR,string:uR,text:cR},Symbol.toStringTag,{value:"Module"}));function pR(e,t,r){let l={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const a={},o=[];let u=[],f=[];const d={attempt:q(Y),check:q(j),consume:L,enter:O,exit:B,interrupt:q(j,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:w,parser:e,previous:null,sliceSerialize:b,sliceStream:x,write:p};let g=t.tokenize.call(h,d);return t.resolveAll&&o.push(t),h;function p(X){return u=zn(u,X),R(),u[u.length-1]!==null?[]:(G(t,0),h.events=_u(o,h.events,h),h.events)}function b(X,te){return yR(x(X),te)}function x(X){return gR(u,X)}function w(){const{_bufferIndex:X,_index:te,line:de,column:le,offset:ne}=l;return{_bufferIndex:X,_index:te,line:de,column:le,offset:ne}}function E(X){a[X.line]=X.column,P()}function R(){let X;for(;l._index<u.length;){const te=u[l._index];if(typeof te=="string")for(X=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===X&&l._bufferIndex<te.length;)C(te.charCodeAt(l._bufferIndex));else C(te)}}function C(X){g=g(X)}function L(X){Se(X)?(l.line++,l.column=1,l.offset+=X===-3?2:1,P()):X!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===u[l._index].length&&(l._bufferIndex=-1,l._index++)),h.previous=X}function O(X,te){const de=te||{};return de.type=X,de.start=w(),h.events.push(["enter",de,h]),f.push(de),de}function B(X){const te=f.pop();return te.end=w(),h.events.push(["exit",te,h]),te}function Y(X,te){G(X,te.from)}function j(X,te){te.restore()}function q(X,te){return de;function de(le,ne,z){let J,re,me,k;return Array.isArray(le)?Q(le):"tokenize"in le?Q([le]):N(le);function N(fe){return Ce;function Ce(je){const xe=je!==null&&fe[je],yt=je!==null&&fe.null,St=[...Array.isArray(xe)?xe:xe?[xe]:[],...Array.isArray(yt)?yt:yt?[yt]:[]];return Q(St)(je)}}function Q(fe){return J=fe,re=0,fe.length===0?z:T(fe[re])}function T(fe){return Ce;function Ce(je){return k=se(),me=fe,fe.partial||(h.currentConstruct=fe),fe.name&&h.parser.constructs.disable.null.includes(fe.name)?he():fe.tokenize.call(te?Object.assign(Object.create(h),te):h,d,ue,he)(je)}}function ue(fe){return X(me,k),ne}function he(fe){return k.restore(),++re<J.length?T(J[re]):z}}}function G(X,te){X.resolveAll&&!o.includes(X)&&o.push(X),X.resolve&&_n(h.events,te,h.events.length-te,X.resolve(h.events.slice(te),h)),X.resolveTo&&(h.events=X.resolveTo(h.events,h))}function se(){const X=w(),te=h.previous,de=h.currentConstruct,le=h.events.length,ne=Array.from(f);return{from:le,restore:z};function z(){l=X,h.previous=te,h.currentConstruct=de,h.events.length=le,f=ne,P()}}function P(){l.line in a&&l.column<2&&(l.column=a[l.line],l.offset+=a[l.line]-1)}}function gR(e,t){const r=t.start._index,l=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let u;if(r===a)u=[e[r].slice(l,o)];else{if(u=e.slice(r,a),l>-1){const f=u[0];typeof f=="string"?u[0]=f.slice(l):u.shift()}o>0&&u.push(e[a].slice(0,o))}return u}function yR(e,t){let r=-1;const l=[];let a;for(;++r<e.length;){const o=e[r];let u;if(typeof o=="string")u=o;else switch(o){case-5:{u="\r";break}case-4:{u=`
|
|
21
22
|
`;break}case-3:{u=`\r
|
|
22
|
-
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&a)continue;u=" ";break}default:u=String.fromCharCode(o)}a=o===-2,l.push(u)}return l.join("")}function xR(e){const l={constructs:$v([pR,...(e||{}).extensions||[]]),content:a(MT),defined:[],document:a(zT),flow:a(eR),lazy:{},string:a(rR),text:a(iR)};return l;function a(o){return u;function u(f){return gR(l,o,f)}}}function vR(e){for(;!Zv(e););return e}const x0=/[\0\t\n\r]/g;function _R(){let e=1,t="",r=!0,l;return a;function a(o,u,f){const d=[];let h,g,p,b,x;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(u||void 0).decode(o)),p=0,t="",r&&(o.charCodeAt(0)===65279&&p++,r=void 0);p<o.length;){if(x0.lastIndex=p,h=x0.exec(o),b=h&&h.index!==void 0?h.index:o.length,x=o.charCodeAt(b),!h){t=o.slice(p);break}if(x===10&&p===b&&l)d.push(-3),l=void 0;else switch(l&&(d.push(-5),l=void 0),p<b&&(d.push(o.slice(p,b)),e+=b-p),x){case 0:{d.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,d.push(-2);e++<g;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:l=!0,e=1}p=b+1}return f&&(l&&d.push(-5),t&&d.push(t),d.push(null)),d}}const wR=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function SR(e){return e.replace(wR,ER)}function ER(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const a=r.charCodeAt(1),o=a===120||a===88;return Qv(r.slice(o?2:1),o?16:10)}return Gh(r)||e}const r1={}.hasOwnProperty;function CR(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),kR(r)(vR(xR(r).document().write(_R()(e,t,!0))))}function kR(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Xe),autolinkProtocol:oe,autolinkEmail:oe,atxHeading:o(jn),blockQuote:o(gt),characterEscape:oe,characterReference:oe,codeFenced:o(ut),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:o(ut,u),codeText:o(Lt,u),codeTextData:oe,data:oe,codeFlowValue:oe,definition:o(bn),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:o(wt),hardBreakEscape:o(xn),hardBreakTrailing:o(xn),htmlFlow:o(Ee,u),htmlFlowData:oe,htmlText:o(Ee,u),htmlTextData:oe,image:o(He),label:u,link:o(Xe),listItem:o(Gn),listItemValue:b,listOrdered:o(lt,p),listUnordered:o(lt),paragraph:o(Ui),reference:T,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:o(jn),strong:o(er),thematicBreak:o(ui)},exit:{atxHeading:d(),atxHeadingSequence:Y,autolink:d(),autolinkEmail:ve,autolinkProtocol:Fe,blockQuote:d(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:ce,characterReference:ke,codeFenced:d(R),codeFencedFence:E,codeFencedFenceInfo:x,codeFencedFenceMeta:w,codeFlowValue:P,codeIndented:d(C),codeText:d(ne),codeTextData:P,data:P,definition:d(),definitionDestinationString:B,definitionLabelString:L,definitionTitleString:O,emphasis:d(),hardBreakEscape:d(te),hardBreakTrailing:d(te),htmlFlow:d(fe),htmlFlowData:P,htmlText:d(le),htmlTextData:P,image:d(Z),label:me,labelText:re,lineEnding:X,link:d(z),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ue,resourceDestinationString:k,resourceTitleString:N,resource:Q,setextHeading:d(G),setextHeadingLineSequence:q,setextHeadingText:j,strong:d(),thematicBreak:d()}};i1(t,(e||{}).mdastExtensions||[]);const r={};return l;function l(J){let ae={type:"root",children:[]};const we={stack:[ae],tokenStack:[],config:t,enter:f,exit:h,buffer:u,resume:g,data:r},Ne=[];let qe=-1;for(;++qe<J.length;)if(J[qe][1].type==="listOrdered"||J[qe][1].type==="listUnordered")if(J[qe][0]==="enter")Ne.push(qe);else{const Ot=Ne.pop();qe=a(J,Ot,qe)}for(qe=-1;++qe<J.length;){const Ot=t[J[qe][0]];r1.call(Ot,J[qe][1].type)&&Ot[J[qe][1].type].call(Object.assign({sliceSerialize:J[qe][2].sliceSerialize},we),J[qe][1])}if(we.tokenStack.length>0){const Ot=we.tokenStack[we.tokenStack.length-1];(Ot[1]||v0).call(we,void 0,Ot[0])}for(ae.position={start:ti(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:ti(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},qe=-1;++qe<t.transforms.length;)ae=t.transforms[qe](ae)||ae;return ae}function a(J,ae,we){let Ne=ae-1,qe=-1,Ot=!1,zn,Nt,se,he;for(;++Ne<=we;){const be=J[Ne];switch(be[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{be[0]==="enter"?qe++:qe--,he=void 0;break}case"lineEndingBlank":{be[0]==="enter"&&(zn&&!he&&!qe&&!se&&(se=Ne),he=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:he=void 0}if(!qe&&be[0]==="enter"&&be[1].type==="listItemPrefix"||qe===-1&&be[0]==="exit"&&(be[1].type==="listUnordered"||be[1].type==="listOrdered")){if(zn){let je=Ne;for(Nt=void 0;je--;){const Me=J[je];if(Me[1].type==="lineEnding"||Me[1].type==="lineEndingBlank"){if(Me[0]==="exit")continue;Nt&&(J[Nt][1].type="lineEndingBlank",Ot=!0),Me[1].type="lineEnding",Nt=je}else if(!(Me[1].type==="linePrefix"||Me[1].type==="blockQuotePrefix"||Me[1].type==="blockQuotePrefixWhitespace"||Me[1].type==="blockQuoteMarker"||Me[1].type==="listItemIndent"))break}se&&(!Nt||se<Nt)&&(zn._spread=!0),zn.end=Object.assign({},Nt?J[Nt][1].start:be[1].end),J.splice(Nt||Ne,0,["exit",zn,be[2]]),Ne++,we++}if(be[1].type==="listItemPrefix"){const je={type:"listItem",_spread:!1,start:Object.assign({},be[1].start),end:void 0};zn=je,J.splice(Ne,0,["enter",je,be[2]]),Ne++,we++,se=void 0,he=!0}}}return J[ae][1]._spread=Ot,we}function o(J,ae){return we;function we(Ne){f.call(this,J(Ne),Ne),ae&&ae.call(this,Ne)}}function u(){this.stack.push({type:"fragment",children:[]})}function f(J,ae,we){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ae,we||void 0]),J.position={start:ti(ae.start),end:void 0}}function d(J){return ae;function ae(we){J&&J.call(this,we),h.call(this,we)}}function h(J,ae){const we=this.stack.pop(),Ne=this.tokenStack.pop();if(Ne)Ne[0].type!==J.type&&(ae?ae.call(this,J,Ne[0]):(Ne[1]||v0).call(this,J,Ne[0]));else throw new Error("Cannot close `"+J.type+"` ("+Fa({start:J.start,end:J.end})+"): it’s not open");we.position.end=ti(J.end)}function g(){return Hh(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const ae=this.stack[this.stack.length-2];ae.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function x(){const J=this.resume(),ae=this.stack[this.stack.length-1];ae.lang=J}function w(){const J=this.resume(),ae=this.stack[this.stack.length-1];ae.meta=J}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function R(){const J=this.resume(),ae=this.stack[this.stack.length-1];ae.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const J=this.resume(),ae=this.stack[this.stack.length-1];ae.value=J.replace(/(\r?\n|\r)$/g,"")}function L(J){const ae=this.resume(),we=this.stack[this.stack.length-1];we.label=ae,we.identifier=Hn(this.sliceSerialize(J)).toLowerCase()}function O(){const J=this.resume(),ae=this.stack[this.stack.length-1];ae.title=J}function B(){const J=this.resume(),ae=this.stack[this.stack.length-1];ae.url=J}function Y(J){const ae=this.stack[this.stack.length-1];if(!ae.depth){const we=this.sliceSerialize(J).length;ae.depth=we}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function q(J){const ae=this.stack[this.stack.length-1];ae.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function oe(J){const we=this.stack[this.stack.length-1].children;let Ne=we[we.length-1];(!Ne||Ne.type!=="text")&&(Ne=St(),Ne.position={start:ti(J.start),end:void 0},we.push(Ne)),this.stack.push(Ne)}function P(J){const ae=this.stack.pop();ae.value+=this.sliceSerialize(J),ae.position.end=ti(J.end)}function X(J){const ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=ae.children[ae.children.length-1];we.position.end=ti(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ae.type)&&(oe.call(this,J),P.call(this,J))}function te(){this.data.atHardBreak=!0}function fe(){const J=this.resume(),ae=this.stack[this.stack.length-1];ae.value=J}function le(){const J=this.resume(),ae=this.stack[this.stack.length-1];ae.value=J}function ne(){const J=this.resume(),ae=this.stack[this.stack.length-1];ae.value=J}function z(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ae,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function Z(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ae,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function re(J){const ae=this.sliceSerialize(J),we=this.stack[this.stack.length-2];we.label=SR(ae),we.identifier=Hn(ae).toLowerCase()}function me(){const J=this.stack[this.stack.length-1],ae=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const Ne=J.children;we.children=Ne}else we.alt=ae}function k(){const J=this.resume(),ae=this.stack[this.stack.length-1];ae.url=J}function N(){const J=this.resume(),ae=this.stack[this.stack.length-1];ae.title=J}function Q(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ue(J){const ae=this.resume(),we=this.stack[this.stack.length-1];we.label=ae,we.identifier=Hn(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function de(J){this.data.characterReferenceType=J.type}function ce(J){const ae=this.sliceSerialize(J),we=this.data.characterReferenceType;let Ne;we?(Ne=Qv(ae,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ne=Gh(ae);const qe=this.stack[this.stack.length-1];qe.value+=Ne}function ke(J){const ae=this.stack.pop();ae.position.end=ti(J.end)}function Fe(J){P.call(this,J);const ae=this.stack[this.stack.length-1];ae.url=this.sliceSerialize(J)}function ve(J){P.call(this,J);const ae=this.stack[this.stack.length-1];ae.url="mailto:"+this.sliceSerialize(J)}function gt(){return{type:"blockquote",children:[]}}function ut(){return{type:"code",lang:null,meta:null,value:""}}function Lt(){return{type:"inlineCode",value:""}}function bn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function wt(){return{type:"emphasis",children:[]}}function jn(){return{type:"heading",depth:0,children:[]}}function xn(){return{type:"break"}}function Ee(){return{type:"html",value:""}}function He(){return{type:"image",title:null,url:"",alt:null}}function Xe(){return{type:"link",title:null,url:"",children:[]}}function lt(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function Gn(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Ui(){return{type:"paragraph",children:[]}}function er(){return{type:"strong",children:[]}}function St(){return{type:"text",value:""}}function ui(){return{type:"thematicBreak"}}}function ti(e){return{line:e.line,column:e.column,offset:e.offset}}function i1(e,t){let r=-1;for(;++r<t.length;){const l=t[r];Array.isArray(l)?i1(e,l):AR(e,l)}}function AR(e,t){let r;for(r in t)if(r1.call(t,r))switch(r){case"canContainEols":{const l=t[r];l&&e[r].push(...l);break}case"transforms":{const l=t[r];l&&e[r].push(...l);break}case"enter":case"exit":{const l=t[r];l&&Object.assign(e[r],l);break}}}function v0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Fa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Fa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Fa({start:t.start,end:t.end})+") is still open")}function TR(e){const t=this;t.parser=r;function r(l){return CR(l,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function RR(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 LR(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
23
|
-
`}]}function
|
|
24
|
-
`:"",l={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(l.className=["language-"+a[0]]);let o={type:"element",tagName:"code",properties:l,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
|
|
23
|
+
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&a)continue;u=" ";break}default:u=String.fromCharCode(o)}a=o===-2,l.push(u)}return l.join("")}function bR(e){const l={constructs:$v([mR,...(e||{}).extensions||[]]),content:a(DT),defined:[],document:a(jT),flow:a(W2),lazy:{},string:a(nR),text:a(rR)};return l;function a(o){return u;function u(f){return pR(l,o,f)}}}function xR(e){for(;!Zv(e););return e}const x0=/[\0\t\n\r]/g;function vR(){let e=1,t="",r=!0,l;return a;function a(o,u,f){const d=[];let h,g,p,b,x;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(u||void 0).decode(o)),p=0,t="",r&&(o.charCodeAt(0)===65279&&p++,r=void 0);p<o.length;){if(x0.lastIndex=p,h=x0.exec(o),b=h&&h.index!==void 0?h.index:o.length,x=o.charCodeAt(b),!h){t=o.slice(p);break}if(x===10&&p===b&&l)d.push(-3),l=void 0;else switch(l&&(d.push(-5),l=void 0),p<b&&(d.push(o.slice(p,b)),e+=b-p),x){case 0:{d.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,d.push(-2);e++<g;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:l=!0,e=1}p=b+1}return f&&(l&&d.push(-5),t&&d.push(t),d.push(null)),d}}const _R=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function wR(e){return e.replace(_R,SR)}function SR(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const a=r.charCodeAt(1),o=a===120||a===88;return Qv(r.slice(o?2:1),o?16:10)}return Gh(r)||e}const r1={}.hasOwnProperty;function ER(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),CR(r)(xR(bR(r).document().write(vR()(e,t,!0))))}function CR(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(at),autolinkProtocol:se,autolinkEmail:se,atxHeading:o(wn),blockQuote:o(yt),characterEscape:se,characterReference:se,codeFenced:o(St),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:o(St,u),codeText:o(Et,u),codeTextData:se,data:se,codeFlowValue:se,definition:o(Gt),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:o(Ot),hardBreakEscape:o(_e),hardBreakTrailing:o(_e),htmlFlow:o(He,u),htmlFlowData:se,htmlText:o(He,u),htmlTextData:se,image:o(tt),label:u,link:o(at),listItem:o(Ar),listItemValue:b,listOrdered:o(Sn,p),listUnordered:o(Sn),paragraph:o(Gl),reference:T,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:o(wn),strong:o(Ui),thematicBreak:o(ui)},exit:{atxHeading:d(),atxHeadingSequence:Y,autolink:d(),autolinkEmail:xe,autolinkProtocol:je,blockQuote:d(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:fe,characterReference:Ce,codeFenced:d(R),codeFencedFence:E,codeFencedFenceInfo:x,codeFencedFenceMeta:w,codeFlowValue:P,codeIndented:d(C),codeText:d(ne),codeTextData:P,data:P,definition:d(),definitionDestinationString:B,definitionLabelString:L,definitionTitleString:O,emphasis:d(),hardBreakEscape:d(te),hardBreakTrailing:d(te),htmlFlow:d(de),htmlFlowData:P,htmlText:d(le),htmlTextData:P,image:d(J),label:me,labelText:re,lineEnding:X,link:d(z),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ue,resourceDestinationString:k,resourceTitleString:N,resource:Q,setextHeading:d(G),setextHeadingLineSequence:q,setextHeadingText:j,strong:d(),thematicBreak:d()}};i1(t,(e||{}).mdastExtensions||[]);const r={};return l;function l(Z){let ce={type:"root",children:[]};const we={stack:[ce],tokenStack:[],config:t,enter:f,exit:h,buffer:u,resume:g,data:r},Le=[];let Fe=-1;for(;++Fe<Z.length;)if(Z[Fe][1].type==="listOrdered"||Z[Fe][1].type==="listUnordered")if(Z[Fe][0]==="enter")Le.push(Fe);else{const Kt=Le.pop();Fe=a(Z,Kt,Fe)}for(Fe=-1;++Fe<Z.length;){const Kt=t[Z[Fe][0]];r1.call(Kt,Z[Fe][1].type)&&Kt[Z[Fe][1].type].call(Object.assign({sliceSerialize:Z[Fe][2].sliceSerialize},we),Z[Fe][1])}if(we.tokenStack.length>0){const Kt=we.tokenStack[we.tokenStack.length-1];(Kt[1]||v0).call(we,void 0,Kt[0])}for(ce.position={start:ti(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:ti(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},Fe=-1;++Fe<t.transforms.length;)ce=t.transforms[Fe](ce)||ce;return ce}function a(Z,ce,we){let Le=ce-1,Fe=-1,Kt=!1,en,zt,ct,oe;for(;++Le<=we;){const ae=Z[Le];switch(ae[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ae[0]==="enter"?Fe++:Fe--,oe=void 0;break}case"lineEndingBlank":{ae[0]==="enter"&&(en&&!oe&&!Fe&&!ct&&(ct=Le),oe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:oe=void 0}if(!Fe&&ae[0]==="enter"&&ae[1].type==="listItemPrefix"||Fe===-1&&ae[0]==="exit"&&(ae[1].type==="listUnordered"||ae[1].type==="listOrdered")){if(en){let ke=Le;for(zt=void 0;ke--;){const De=Z[ke];if(De[1].type==="lineEnding"||De[1].type==="lineEndingBlank"){if(De[0]==="exit")continue;zt&&(Z[zt][1].type="lineEndingBlank",Kt=!0),De[1].type="lineEnding",zt=ke}else if(!(De[1].type==="linePrefix"||De[1].type==="blockQuotePrefix"||De[1].type==="blockQuotePrefixWhitespace"||De[1].type==="blockQuoteMarker"||De[1].type==="listItemIndent"))break}ct&&(!zt||ct<zt)&&(en._spread=!0),en.end=Object.assign({},zt?Z[zt][1].start:ae[1].end),Z.splice(zt||Le,0,["exit",en,ae[2]]),Le++,we++}if(ae[1].type==="listItemPrefix"){const ke={type:"listItem",_spread:!1,start:Object.assign({},ae[1].start),end:void 0};en=ke,Z.splice(Le,0,["enter",ke,ae[2]]),Le++,we++,ct=void 0,oe=!0}}}return Z[ce][1]._spread=Kt,we}function o(Z,ce){return we;function we(Le){f.call(this,Z(Le),Le),ce&&ce.call(this,Le)}}function u(){this.stack.push({type:"fragment",children:[]})}function f(Z,ce,we){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([ce,we||void 0]),Z.position={start:ti(ce.start),end:void 0}}function d(Z){return ce;function ce(we){Z&&Z.call(this,we),h.call(this,we)}}function h(Z,ce){const we=this.stack.pop(),Le=this.tokenStack.pop();if(Le)Le[0].type!==Z.type&&(ce?ce.call(this,Z,Le[0]):(Le[1]||v0).call(this,Z,Le[0]));else throw new Error("Cannot close `"+Z.type+"` ("+qa({start:Z.start,end:Z.end})+"): it’s not open");we.position.end=ti(Z.end)}function g(){return Hh(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function b(Z){if(this.data.expectingFirstListItemValue){const ce=this.stack[this.stack.length-2];ce.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function x(){const Z=this.resume(),ce=this.stack[this.stack.length-1];ce.lang=Z}function w(){const Z=this.resume(),ce=this.stack[this.stack.length-1];ce.meta=Z}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function R(){const Z=this.resume(),ce=this.stack[this.stack.length-1];ce.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const Z=this.resume(),ce=this.stack[this.stack.length-1];ce.value=Z.replace(/(\r?\n|\r)$/g,"")}function L(Z){const ce=this.resume(),we=this.stack[this.stack.length-1];we.label=ce,we.identifier=Fn(this.sliceSerialize(Z)).toLowerCase()}function O(){const Z=this.resume(),ce=this.stack[this.stack.length-1];ce.title=Z}function B(){const Z=this.resume(),ce=this.stack[this.stack.length-1];ce.url=Z}function Y(Z){const ce=this.stack[this.stack.length-1];if(!ce.depth){const we=this.sliceSerialize(Z).length;ce.depth=we}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function q(Z){const ce=this.stack[this.stack.length-1];ce.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function se(Z){const we=this.stack[this.stack.length-1].children;let Le=we[we.length-1];(!Le||Le.type!=="text")&&(Le=ht(),Le.position={start:ti(Z.start),end:void 0},we.push(Le)),this.stack.push(Le)}function P(Z){const ce=this.stack.pop();ce.value+=this.sliceSerialize(Z),ce.position.end=ti(Z.end)}function X(Z){const ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=ce.children[ce.children.length-1];we.position.end=ti(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ce.type)&&(se.call(this,Z),P.call(this,Z))}function te(){this.data.atHardBreak=!0}function de(){const Z=this.resume(),ce=this.stack[this.stack.length-1];ce.value=Z}function le(){const Z=this.resume(),ce=this.stack[this.stack.length-1];ce.value=Z}function ne(){const Z=this.resume(),ce=this.stack[this.stack.length-1];ce.value=Z}function z(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ce,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function J(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ce,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function re(Z){const ce=this.sliceSerialize(Z),we=this.stack[this.stack.length-2];we.label=wR(ce),we.identifier=Fn(ce).toLowerCase()}function me(){const Z=this.stack[this.stack.length-1],ce=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const Le=Z.children;we.children=Le}else we.alt=ce}function k(){const Z=this.resume(),ce=this.stack[this.stack.length-1];ce.url=Z}function N(){const Z=this.resume(),ce=this.stack[this.stack.length-1];ce.title=Z}function Q(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ue(Z){const ce=this.resume(),we=this.stack[this.stack.length-1];we.label=ce,we.identifier=Fn(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function he(Z){this.data.characterReferenceType=Z.type}function fe(Z){const ce=this.sliceSerialize(Z),we=this.data.characterReferenceType;let Le;we?(Le=Qv(ce,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Le=Gh(ce);const Fe=this.stack[this.stack.length-1];Fe.value+=Le}function Ce(Z){const ce=this.stack.pop();ce.position.end=ti(Z.end)}function je(Z){P.call(this,Z);const ce=this.stack[this.stack.length-1];ce.url=this.sliceSerialize(Z)}function xe(Z){P.call(this,Z);const ce=this.stack[this.stack.length-1];ce.url="mailto:"+this.sliceSerialize(Z)}function yt(){return{type:"blockquote",children:[]}}function St(){return{type:"code",lang:null,meta:null,value:""}}function Et(){return{type:"inlineCode",value:""}}function Gt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ot(){return{type:"emphasis",children:[]}}function wn(){return{type:"heading",depth:0,children:[]}}function _e(){return{type:"break"}}function He(){return{type:"html",value:""}}function tt(){return{type:"image",title:null,url:"",alt:null}}function at(){return{type:"link",title:null,url:"",children:[]}}function Sn(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function Ar(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function Gl(){return{type:"paragraph",children:[]}}function Ui(){return{type:"strong",children:[]}}function ht(){return{type:"text",value:""}}function ui(){return{type:"thematicBreak"}}}function ti(e){return{line:e.line,column:e.column,offset:e.offset}}function i1(e,t){let r=-1;for(;++r<t.length;){const l=t[r];Array.isArray(l)?i1(e,l):kR(e,l)}}function kR(e,t){let r;for(r in t)if(r1.call(t,r))switch(r){case"canContainEols":{const l=t[r];l&&e[r].push(...l);break}case"transforms":{const l=t[r];l&&e[r].push(...l);break}case"enter":case"exit":{const l=t[r];l&&Object.assign(e[r],l);break}}}function v0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qa({start:t.start,end:t.end})+") is still open")}function AR(e){const t=this;t.parser=r;function r(l){return ER(l,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function TR(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 RR(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
24
|
+
`}]}function LR(e,t){const r=t.value?t.value+`
|
|
25
|
+
`:"",l={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(l.className=["language-"+a[0]]);let o={type:"element",tagName:"code",properties:l,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 OR(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function NR(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function DR(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=String(t.identifier).toUpperCase(),a=Ul(l.toLowerCase()),o=e.footnoteOrder.indexOf(l);let u,f=e.footnoteCounts.get(l);f===void 0?(f=0,e.footnoteOrder.push(l),u=e.footnoteOrder.length):u=o+1,f+=1,e.footnoteCounts.set(l,f);const d={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+a,id:r+"fnref-"+a+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function MR(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 jR(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function l1(e,t){const r=t.referenceType;let l="]";if(r==="collapsed"?l+="[]":r==="full"&&(l+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+l}];const a=e.all(t),o=a[0];o&&o.type==="text"?o.value="["+o.value:a.unshift({type:"text",value:"["});const u=a[a.length-1];return u&&u.type==="text"?u.value+=l:a.push({type:"text",value:l}),a}function zR(e,t){const r=String(t.identifier).toUpperCase(),l=e.definitionById.get(r);if(!l)return l1(e,t);const a={src:Ul(l.url||""),alt:t.alt};l.title!==null&&l.title!==void 0&&(a.title=l.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,o),e.applyData(t,o)}function IR(e,t){const r={src:Ul(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 l={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,l),e.applyData(t,l)}function PR(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const l={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,l),e.applyData(t,l)}function BR(e,t){const r=String(t.identifier).toUpperCase(),l=e.definitionById.get(r);if(!l)return l1(e,t);const a={href:Ul(l.url||"")};l.title!==null&&l.title!==void 0&&(a.title=l.title);const o={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function UR(e,t){const r={href:Ul(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const l={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function VR(e,t,r){const l=e.all(t),a=r?HR(r):a1(t),o={},u=[];if(typeof t.checked=="boolean"){const g=l[0];let p;g&&g.type==="element"&&g.tagName==="p"?p=g:(p={type:"element",tagName:"p",properties:{},children:[]},l.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.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<l.length;){const g=l[f];(a||f!==0||g.type!=="element"||g.tagName!=="p")&&u.push({type:"text",value:`
|
|
25
26
|
`}),g.type==="element"&&g.tagName==="p"&&!a?u.push(...g.children):u.push(g)}const d=l[l.length-1];d&&(a||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
|
|
26
|
-
`});const h={type:"element",tagName:"li",properties:o,children:u};return e.patch(t,h),e.applyData(t,h)}function
|
|
27
|
+
`});const h={type:"element",tagName:"li",properties:o,children:u};return e.patch(t,h),e.applyData(t,h)}function HR(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let l=-1;for(;!t&&++l<r.length;)t=a1(r[l])}return t}function a1(e){const t=e.spread;return t??e.children.length>1}function GR(e,t){const r={},l=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++a<l.length;){const u=l[a];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(l,!0)};return e.patch(t,o),e.applyData(t,o)}function FR(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function qR(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function $R(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function QR(e,t){const r=e.all(t),l=r.shift(),a=[];if(l){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(t.children[0],u),a.push(u)}if(r.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},f=Ph(t.children[1]),d=Bv(t.children[t.children.length-1]);f&&d&&(u.position={start:f,end:d}),a.push(u)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function YR(e,t,r){const l=r?r.children:void 0,o=(l?l.indexOf(t):1)===0?"th":"td",u=r&&r.type==="table"?r.align:void 0,f=u?u.length:t.children.length;let d=-1;const h=[];for(;++d<f;){const p=t.children[d],b={},x=u?u[d]:void 0;x&&(b.align=x);let w={type:"element",tagName:o,properties:b,children:[]};p&&(w.children=e.all(p),e.patch(p,w),w=e.applyData(p,w)),h.push(w)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,g),e.applyData(t,g)}function XR(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const _0=9,w0=32;function KR(e){const t=String(e),r=/\r?\n|\r/g;let l=r.exec(t),a=0;const o=[];for(;l;)o.push(S0(t.slice(a,l.index),a>0,!0),l[0]),a=l.index+l[0].length,l=r.exec(t);return o.push(S0(t.slice(a),a>0,!1)),o.join("")}function S0(e,t,r){let l=0,a=e.length;if(t){let o=e.codePointAt(l);for(;o===_0||o===w0;)l++,o=e.codePointAt(l)}if(r){let o=e.codePointAt(a-1);for(;o===_0||o===w0;)a--,o=e.codePointAt(a-1)}return a>l?e.slice(l,a):""}function ZR(e,t){const r={type:"text",value:KR(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function JR(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const WR={blockquote:TR,break:RR,code:LR,delete:OR,emphasis:NR,footnoteReference:DR,heading:MR,html:jR,imageReference:zR,image:IR,inlineCode:PR,linkReference:BR,link:UR,listItem:VR,list:GR,paragraph:FR,root:qR,strong:$R,table:QR,tableCell:XR,tableRow:YR,text:ZR,thematicBreak:JR,toml:No,yaml:No,definition:No,footnoteDefinition:No};function No(){}const s1=-1,wu=0,Qa=1,tu=2,qh=3,$h=4,Qh=5,Yh=6,o1=7,u1=8,E0=typeof self=="object"?self:globalThis,eL=(e,t)=>{const r=(a,o)=>(e.set(o,a),a),l=a=>{if(e.has(a))return e.get(a);const[o,u]=t[a];switch(o){case wu:case s1:return r(u,a);case Qa:{const f=r([],a);for(const d of u)f.push(l(d));return f}case tu:{const f=r({},a);for(const[d,h]of u)f[l(d)]=l(h);return f}case qh:return r(new Date(u),a);case $h:{const{source:f,flags:d}=u;return r(new RegExp(f,d),a)}case Qh:{const f=r(new Map,a);for(const[d,h]of u)f.set(l(d),l(h));return f}case Yh:{const f=r(new Set,a);for(const d of u)f.add(l(d));return f}case o1:{const{name:f,message:d}=u;return r(new E0[f](d),a)}case u1:return r(BigInt(u),a);case"BigInt":return r(Object(BigInt(u)),a);case"ArrayBuffer":return r(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:f}=new Uint8Array(u);return r(new DataView(f),u)}}return r(new E0[o](u),a)};return l},C0=e=>eL(new Map,e)(0),Al="",{toString:tL}={},{keys:nL}=Object,Ha=e=>{const t=typeof e;if(t!=="object"||!e)return[wu,t];const r=tL.call(e).slice(8,-1);switch(r){case"Array":return[Qa,Al];case"Object":return[tu,Al];case"Date":return[qh,Al];case"RegExp":return[$h,Al];case"Map":return[Qh,Al];case"Set":return[Yh,Al];case"DataView":return[Qa,r]}return r.includes("Array")?[Qa,r]:r.includes("Error")?[o1,r]:[tu,r]},Do=([e,t])=>e===wu&&(t==="function"||t==="symbol"),rL=(e,t,r,l)=>{const a=(u,f)=>{const d=l.push(u)-1;return r.set(f,d),d},o=u=>{if(r.has(u))return r.get(u);let[f,d]=Ha(u);switch(f){case wu:{let g=u;switch(d){case"bigint":f=u1,g=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);g=null;break;case"undefined":return a([s1],u)}return a([f,g],u)}case Qa:{if(d){let b=u;return d==="DataView"?b=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(u)),a([d,[...b]],u)}const g=[],p=a([f,g],u);for(const b of u)g.push(o(b));return p}case tu:{if(d)switch(d){case"BigInt":return a([d,u.toString()],u);case"Boolean":case"Number":case"String":return a([d,u.valueOf()],u)}if(t&&"toJSON"in u)return o(u.toJSON());const g=[],p=a([f,g],u);for(const b of nL(u))(e||!Do(Ha(u[b])))&&g.push([o(b),o(u[b])]);return p}case qh:return a([f,u.toISOString()],u);case $h:{const{source:g,flags:p}=u;return a([f,{source:g,flags:p}],u)}case Qh:{const g=[],p=a([f,g],u);for(const[b,x]of u)(e||!(Do(Ha(b))||Do(Ha(x))))&&g.push([o(b),o(x)]);return p}case Yh:{const g=[],p=a([f,g],u);for(const b of u)(e||!Do(Ha(b)))&&g.push(o(b));return p}}const{message:h}=u;return a([f,{name:d,message:h}],u)};return o},k0=(e,{json:t,lossy:r}={})=>{const l=[];return rL(!(t||r),!!t,new Map,l)(e),l},nu=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?C0(k0(e,t)):structuredClone(e):(e,t)=>C0(k0(e,t));function iL(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 lL(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function aL(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||iL,l=e.options.footnoteBackLabel||lL,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const g=e.all(h),p=String(h.identifier).toUpperCase(),b=Ul(p.toLowerCase());let x=0;const w=[],E=e.footnoteCounts.get(p);for(;E!==void 0&&++x<=E;){w.length>0&&w.push({type:"text",value:" "});let L=typeof r=="string"?r:r(d,x);typeof L=="string"&&(L={type:"text",value:L}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(d,x),className:["data-footnote-backref"]},children:Array.isArray(L)?L:[L]})}const R=g[g.length-1];if(R&&R.type==="element"&&R.tagName==="p"){const L=R.children[R.children.length-1];L&&L.type==="text"?L.value+=" ":R.children.push({type:"text",value:" "}),R.children.push(...w)}else g.push(...w);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(g,!0)};e.patch(h,C),f.push(C)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...nu(u),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
27
28
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
28
|
-
`}]}}const Su=(function(e){if(e==null)return
|
|
29
|
+
`}]}}const Su=(function(e){if(e==null)return cL;if(typeof e=="function")return Eu(e);if(typeof e=="object")return Array.isArray(e)?sL(e):oL(e);if(typeof e=="string")return uL(e);throw new Error("Expected function, string, or object as test")});function sL(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Su(e[r]);return Eu(l);function l(...a){let o=-1;for(;++o<t.length;)if(t[o].apply(this,a))return!0;return!1}}function oL(e){const t=e;return Eu(r);function r(l){const a=l;let o;for(o in e)if(a[o]!==t[o])return!1;return!0}}function uL(e){return Eu(t);function t(r){return r&&r.type===e}}function Eu(e){return t;function t(r,l,a){return!!(fL(r)&&e.call(this,r,typeof l=="number"?l:void 0,a||void 0))}}function cL(){return!0}function fL(e){return e!==null&&typeof e=="object"&&"type"in e}const c1=[],dL=!0,th=!1,hL="skip";function f1(e,t,r,l){let a;typeof t=="function"&&typeof r!="function"?(l=r,r=t):a=t;const o=Su(a),u=l?-1:1;f(e,void 0,[])();function f(d,h,g){const p=d&&typeof d=="object"?d:{};if(typeof p.type=="string"){const x=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(x?"<"+x+">":""))+")"})}return b;function b(){let x=c1,w,E,R;if((!t||o(d,h,g[g.length-1]||void 0))&&(x=mL(r(d,g)),x[0]===th))return x;if("children"in d&&d.children){const C=d;if(C.children&&x[0]!==hL)for(E=(l?C.children.length:-1)+u,R=g.concat(C);E>-1&&E<C.children.length;){const L=C.children[E];if(w=f(L,E,R)(),w[0]===th)return w;E=typeof w[1]=="number"?w[1]:E+u}}return x}}}function mL(e){return Array.isArray(e)?e:typeof e=="number"?[dL,e]:e==null?c1:[e]}function Xh(e,t,r,l){let a,o,u;typeof t=="function"&&typeof r!="function"?(o=void 0,u=t,a=r):(o=t,u=r,a=l),f1(e,o,f,a);function f(d,h){const g=h[h.length-1],p=g?g.children.indexOf(d):void 0;return u(d,p,g)}}const nh={}.hasOwnProperty,pL={};function gL(e,t){const r=t||pL,l=new Map,a=new Map,o=new Map,u={...WR,...r.handlers},f={all:h,applyData:bL,definitionById:l,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:u,one:d,options:r,patch:yL,wrap:vL};return Xh(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const p=g.type==="definition"?l:a,b=String(g.identifier).toUpperCase();p.has(b)||p.set(b,g)}}),f;function d(g,p){const b=g.type,x=f.handlers[b];if(nh.call(f.handlers,b)&&x)return x(f,g,p);if(f.options.passThrough&&f.options.passThrough.includes(b)){if("children"in g){const{children:E,...R}=g,C=nu(R);return C.children=f.all(g),C}return nu(g)}return(f.options.unknownHandler||xL)(f,g,p)}function h(g){const p=[];if("children"in g){const b=g.children;let x=-1;for(;++x<b.length;){const w=f.one(b[x],g);if(w){if(x&&b[x-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=A0(w.value)),!Array.isArray(w)&&w.type==="element")){const E=w.children[0];E&&E.type==="text"&&(E.value=A0(E.value))}Array.isArray(w)?p.push(...w):p.push(w)}}}return p}}function yL(e,t){e.position&&(t.position=lT(e))}function bL(e,t){let r=t;if(e&&e.data){const l=e.data.hName,a=e.data.hChildren,o=e.data.hProperties;if(typeof l=="string")if(r.type==="element")r.tagName=l;else{const u="children"in r?r.children:[r];r={type:"element",tagName:l,properties:{},children:u}}r.type==="element"&&o&&Object.assign(r.properties,nu(o)),"children"in r&&r.children&&a!==null&&a!==void 0&&(r.children=a)}return r}function xL(e,t){const r=t.data||{},l="value"in t&&!(nh.call(r,"hProperties")||nh.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function vL(e,t){const r=[];let l=-1;for(t&&r.push({type:"text",value:`
|
|
29
30
|
`});++l<e.length;)l&&r.push({type:"text",value:`
|
|
30
31
|
`}),r.push(e[l]);return t&&e.length>0&&r.push({type:"text",value:`
|
|
31
|
-
`}),r}function A0(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function T0(e,t){const r=
|
|
32
|
-
`},a),o}function wL(e,t){return e&&"run"in e?async function(r,l){const a=T0(r,{file:l,...t});await e.run(a,l)}:function(r,l){return T0(r,{file:l,...e||t})}}function R0(e){if(e)throw e}var hd,L0;function SL(){if(L0)return hd;L0=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,l=Object.getOwnPropertyDescriptor,a=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},o=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var g=e.call(h,"constructor"),p=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!p)return!1;var b;for(b in h);return typeof b>"u"||e.call(h,b)},u=function(h,g){r&&g.name==="__proto__"?r(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},f=function(h,g){if(g==="__proto__")if(e.call(h,g)){if(l)return l(h,g).value}else return;return h[g]};return hd=function d(){var h,g,p,b,x,w,E=arguments[0],R=1,C=arguments.length,L=!1;for(typeof E=="boolean"&&(L=E,E=arguments[1]||{},R=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});R<C;++R)if(h=arguments[R],h!=null)for(g in h)p=f(E,g),b=f(h,g),E!==b&&(L&&b&&(o(b)||(x=a(b)))?(x?(x=!1,w=p&&a(p)?p:[]):w=p&&o(p)?p:{},u(E,{name:g,newValue:d(L,w,b)})):typeof b<"u"&&u(E,{name:g,newValue:b}));return E},hd}var EL=SL();const md=gu(EL);function rh(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 CL(){const e=[],t={run:r,use:l};return t;function r(...a){let o=-1;const u=a.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);f(null,...a);function f(d,...h){const g=e[++o];let p=-1;if(d){u(d);return}for(;++p<a.length;)(h[p]===null||h[p]===void 0)&&(h[p]=a[p]);a=h,g?kL(g,f)(...h):u(null,...h)}}function l(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function kL(e,t){let r;return l;function l(...u){const f=e.length>u.length;let d;f&&u.push(a);try{d=e.apply(this,u)}catch(h){const g=h;if(f&&r)throw g;return a(g)}f||(d&&d.then&&typeof d.then=="function"?d.then(o,a):d instanceof Error?a(d):o(d))}function a(u,...f){r||(r=!0,t(u,...f))}function o(u){a(null,u)}}const Jn={basename:AL,dirname:TL,extname:RL,join:LL,sep:"/"};function AL(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');cs(e);let r=0,l=-1,a=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(o){r=a+1;break}}else l<0&&(o=!0,l=a+1);return l<0?"":e.slice(r,l)}if(t===e)return"";let u=-1,f=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(o){r=a+1;break}}else u<0&&(o=!0,u=a+1),f>-1&&(e.codePointAt(a)===t.codePointAt(f--)?f<0&&(l=a):(f=-1,l=u));return r===l?l=u:l<0&&(l=e.length),e.slice(r,l)}function TL(e){if(cs(e),e.length===0)return".";let t=-1,r=e.length,l;for(;--r;)if(e.codePointAt(r)===47){if(l){t=r;break}}else l||(l=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function RL(e){cs(e);let t=e.length,r=-1,l=0,a=-1,o=0,u;for(;t--;){const f=e.codePointAt(t);if(f===47){if(u){l=t+1;break}continue}r<0&&(u=!0,r=t+1),f===46?a<0?a=t:o!==1&&(o=1):a>-1&&(o=-1)}return a<0||r<0||o===0||o===1&&a===r-1&&a===l+1?"":e.slice(a,r)}function LL(...e){let t=-1,r;for(;++t<e.length;)cs(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":OL(r)}function OL(e){cs(e);const t=e.codePointAt(0)===47;let r=NL(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function NL(e,t){let r="",l=0,a=-1,o=0,u=-1,f,d;for(;++u<=e.length;){if(u<e.length)f=e.codePointAt(u);else{if(f===47)break;f=47}if(f===47){if(!(a===u-1||o===1))if(a!==u-1&&o===2){if(r.length<2||l!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(d=r.lastIndexOf("/"),d!==r.length-1){d<0?(r="",l=0):(r=r.slice(0,d),l=r.length-1-r.lastIndexOf("/")),a=u,o=0;continue}}else if(r.length>0){r="",l=0,a=u,o=0;continue}}t&&(r=r.length>0?r+"/..":"..",l=2)}else r.length>0?r+="/"+e.slice(a+1,u):r=e.slice(a+1,u),l=u-a-1;a=u,o=0}else f===46&&o>-1?o++:o=-1}return r}function cs(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const DL={cwd:ML};function ML(){return"/"}function ih(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function jL(e){if(typeof e=="string")e=new URL(e);else if(!ih(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 zL(e)}function zL(e){if(e.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const l=t.codePointAt(r+2);if(l===70||l===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const pd=["history","path","basename","stem","extname","dirname"];class d1{constructor(t){let r;t?ih(t)?r={path:t}:typeof t=="string"||IL(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":DL.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<pd.length;){const o=pd[l];o in r&&r[o]!==void 0&&r[o]!==null&&(this[o]=o==="history"?[...r[o]]:r[o])}let a;for(a in r)pd.includes(a)||(this[a]=r[a])}get basename(){return typeof this.path=="string"?Jn.basename(this.path):void 0}set basename(t){yd(t,"basename"),gd(t,"basename"),this.path=Jn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Jn.dirname(this.path):void 0}set dirname(t){O0(this.basename,"dirname"),this.path=Jn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Jn.extname(this.path):void 0}set extname(t){if(gd(t,"extname"),O0(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=Jn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ih(t)&&(t=jL(t)),yd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Jn.basename(this.path,this.extname):void 0}set stem(t){yd(t,"stem"),gd(t,"stem"),this.path=Jn.join(this.dirname||"",t+(this.extname||""))}fail(t,r,l){const a=this.message(t,r,l);throw a.fatal=!0,a}info(t,r,l){const a=this.message(t,r,l);return a.fatal=void 0,a}message(t,r,l){const a=new Qt(t,r,l);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function gd(e,t){if(e&&e.includes(Jn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Jn.sep+"`")}function yd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function O0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function IL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const PL=(function(e){const l=this.constructor.prototype,a=l[e],o=function(){return a.apply(o,arguments)};return Object.setPrototypeOf(o,l),o}),BL={}.hasOwnProperty;class Kh extends PL{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=CL()}copy(){const t=new Kh;let r=-1;for(;++r<this.attachers.length;){const l=this.attachers[r];t.use(...l)}return t.data(md(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(vd("data",this.frozen),this.namespace[t]=r,this):BL.call(this.namespace,t)&&this.namespace[t]||void 0:t?(vd("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,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const a=r.call(t,...l);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Mo(t),l=this.parser||this.Parser;return bd("parse",l),l(String(r),r)}process(t,r){const l=this;return this.freeze(),bd("process",this.parser||this.Parser),xd("process",this.compiler||this.Compiler),r?a(void 0,r):new Promise(a);function a(o,u){const f=Mo(t),d=l.parse(f);l.run(d,f,function(g,p,b){if(g||!p||!b)return h(g);const x=p,w=l.stringify(x,b);HL(w)?b.value=w:b.result=w,h(g,b)});function h(g,p){g||!p?u(g):o?o(p):r(void 0,p)}}}processSync(t){let r=!1,l;return this.freeze(),bd("processSync",this.parser||this.Parser),xd("processSync",this.compiler||this.Compiler),this.process(t,a),D0("processSync","process",r),l;function a(o,u){r=!0,R0(o),l=u}}run(t,r,l){N0(t),this.freeze();const a=this.transformers;return!l&&typeof r=="function"&&(l=r,r=void 0),l?o(void 0,l):new Promise(o);function o(u,f){const d=Mo(r);a.run(t,d,h);function h(g,p,b){const x=p||t;g?f(g):u?u(x):l(void 0,x,b)}}}runSync(t,r){let l=!1,a;return this.run(t,r,o),D0("runSync","run",l),a;function o(u,f){R0(u),a=f,l=!0}}stringify(t,r){this.freeze();const l=Mo(r),a=this.compiler||this.Compiler;return xd("stringify",a),N0(t),a(t,l)}use(t,...r){const l=this.attachers,a=this.namespace;if(vd("use",this.frozen),t!=null)if(typeof t=="function")d(t,r);else if(typeof t=="object")Array.isArray(t)?f(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...p]=h;d(g,p)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(h){if(!("plugins"in h)&&!("settings"in h))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(h.plugins),h.settings&&(a.settings=md(!0,a.settings,h.settings))}function f(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const p=h[g];o(p)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,g){let p=-1,b=-1;for(;++p<l.length;)if(l[p][0]===h){b=p;break}if(b===-1)l.push([h,...g]);else if(g.length>0){let[x,...w]=g;const E=l[b][1];rh(E)&&rh(x)&&(x=md(!0,E,x)),l[b]=[h,x,...w]}}}}const UL=new Kh().freeze();function bd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function xd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function vd(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 N0(e){if(!rh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function D0(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Mo(e){return VL(e)?e:new d1(e)}function VL(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function HL(e){return typeof e=="string"||GL(e)}function GL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const FL="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",M0=[],j0={allowDangerousHtml:!0},qL=/^(https?|ircs?|mailto|xmpp)$/i,$L=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function QL(e){const t=YL(e),r=XL(e);return KL(t.runSync(t.parse(r),r),e)}function YL(e){const t=e.rehypePlugins||M0,r=e.remarkPlugins||M0,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...j0}:j0;return UL().use(TR).use(r).use(wL,l).use(t)}function XL(e){const t=e.children||"",r=new d1;return typeof t=="string"&&(r.value=t),r}function KL(e,t){const r=t.allowedElements,l=t.allowElement,a=t.components,o=t.disallowedElements,u=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||ZL;for(const g of $L)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+FL+g.id,void 0);return Xh(e,h),fT(e,{Fragment:v.Fragment,components:a,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function h(g,p,b){if(g.type==="raw"&&b&&typeof p=="number")return u?b.children.splice(p,1):b.children[p]={type:"text",value:g.value},p;if(g.type==="element"){let x;for(x in cd)if(Object.hasOwn(cd,x)&&Object.hasOwn(g.properties,x)){const w=g.properties[x],E=cd[x];(E===null||E.includes(g.tagName))&&(g.properties[x]=d(String(w||""),x,g))}}if(g.type==="element"){let x=r?!r.includes(g.tagName):o?o.includes(g.tagName):!1;if(!x&&l&&typeof p=="number"&&(x=!l(g,p,b)),x&&b&&typeof p=="number")return f&&g.children?b.children.splice(p,1,...g.children):b.children.splice(p,1),p}}}function ZL(e){const t=e.indexOf(":"),r=e.indexOf("?"),l=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||r!==-1&&t>r||l!==-1&&t>l||qL.test(e.slice(0,t))?e:""}function ru(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let l=0,a=r.indexOf(t);for(;a!==-1;)l++,a=r.indexOf(t,a+t.length);return l}function JL(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function WL(e,t,r){const a=Su((r||{}).ignore||[]),o=eO(t);let u=-1;for(;++u<o.length;)f1(e,"text",f);function f(h,g){let p=-1,b;for(;++p<g.length;){const x=g[p],w=b?b.children:void 0;if(a(x,w?w.indexOf(x):void 0,b))return;b=x}if(b)return d(h,g)}function d(h,g){const p=g[g.length-1],b=o[u][0],x=o[u][1];let w=0;const R=p.children.indexOf(h);let C=!1,L=[];b.lastIndex=0;let O=b.exec(h.value);for(;O;){const B=O.index,Y={index:O.index,input:O.input,stack:[...g,h]};let j=x(...O,Y);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?b.lastIndex=B+1:(w!==B&&L.push({type:"text",value:h.value.slice(w,B)}),Array.isArray(j)?L.push(...j):j&&L.push(j),w=B+O[0].length,C=!0),!b.global)break;O=b.exec(h.value)}return C?(w<h.value.length&&L.push({type:"text",value:h.value.slice(w)}),p.children.splice(R,1,...L)):L=[h],R+L.length}}function eO(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 l=-1;for(;++l<r.length;){const a=r[l];t.push([tO(a[0]),nO(a[1])])}return t}function tO(e){return typeof e=="string"?new RegExp(JL(e),"g"):e}function nO(e){return typeof e=="function"?e:function(){return e}}const _d="phrasing",wd=["autolink","link","image","label"];function rO(){return{transforms:[cO],enter:{literalAutolink:lO,literalAutolinkEmail:Sd,literalAutolinkHttp:Sd,literalAutolinkWww:Sd},exit:{literalAutolink:uO,literalAutolinkEmail:oO,literalAutolinkHttp:aO,literalAutolinkWww:sO}}}function iO(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:_d,notInConstruct:wd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:_d,notInConstruct:wd},{character:":",before:"[ps]",after:"\\/",inConstruct:_d,notInConstruct:wd}]}}function lO(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Sd(e){this.config.enter.autolinkProtocol.call(this,e)}function aO(e){this.config.exit.autolinkProtocol.call(this,e)}function sO(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 oO(e){this.config.exit.autolinkEmail.call(this,e)}function uO(e){this.exit(e)}function cO(e){WL(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,fO],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),dO]],{ignore:["link","linkReference"]})}function fO(e,t,r,l,a){let o="";if(!h1(a)||(/^w/i.test(t)&&(r=t+r,t="",o="http://"),!hO(r)))return!1;const u=mO(r+l);if(!u[0])return!1;const f={type:"link",title:null,url:o+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[f,{type:"text",value:u[1]}]:f}function dO(e,t,r,l){return!h1(l,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function hO(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 mO(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],l=r.indexOf(")");const a=ru(e,"(");let o=ru(e,")");for(;l!==-1&&a>o;)e+=r.slice(0,l+1),r=r.slice(l+1),l=r.indexOf(")"),o++;return[e,r]}function h1(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||zi(r)||vu(r))&&(!t||r!==47)}m1.peek=SO;function pO(){this.buffer()}function gO(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function yO(){this.buffer()}function bO(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function xO(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Hn(this.sliceSerialize(e)).toLowerCase(),r.label=t}function vO(e){this.exit(e)}function _O(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Hn(this.sliceSerialize(e)).toLowerCase(),r.label=t}function wO(e){this.exit(e)}function SO(){return"["}function m1(e,t,r,l){const a=r.createTracker(l);let o=a.move("[^");const u=r.enter("footnoteReference"),f=r.enter("reference");return o+=a.move(r.safe(r.associationId(e),{after:"]",before:o})),f(),u(),o+=a.move("]"),o}function EO(){return{enter:{gfmFootnoteCallString:pO,gfmFootnoteCall:gO,gfmFootnoteDefinitionLabelString:yO,gfmFootnoteDefinition:bO},exit:{gfmFootnoteCallString:xO,gfmFootnoteCall:vO,gfmFootnoteDefinitionLabelString:_O,gfmFootnoteDefinition:wO}}}function CO(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:m1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(l,a,o,u){const f=o.createTracker(u);let d=f.move("[^");const h=o.enter("footnoteDefinition"),g=o.enter("label");return d+=f.move(o.safe(o.associationId(l),{before:d,after:"]"})),g(),d+=f.move("]:"),l.children&&l.children.length>0&&(f.shift(4),d+=f.move((t?`
|
|
33
|
-
`:" ")+o.indentLines(o.containerFlow(l,f.current()),t?p1:
|
|
34
|
-
`)}function
|
|
35
|
-
`&&
|
|
36
|
-
`}function
|
|
32
|
+
`}),r}function A0(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function T0(e,t){const r=gL(e,t),l=r.one(e,void 0),a=aL(r),o=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return a&&o.children.push({type:"text",value:`
|
|
33
|
+
`},a),o}function _L(e,t){return e&&"run"in e?async function(r,l){const a=T0(r,{file:l,...t});await e.run(a,l)}:function(r,l){return T0(r,{file:l,...e||t})}}function R0(e){if(e)throw e}var hd,L0;function wL(){if(L0)return hd;L0=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,l=Object.getOwnPropertyDescriptor,a=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},o=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var g=e.call(h,"constructor"),p=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!p)return!1;var b;for(b in h);return typeof b>"u"||e.call(h,b)},u=function(h,g){r&&g.name==="__proto__"?r(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},f=function(h,g){if(g==="__proto__")if(e.call(h,g)){if(l)return l(h,g).value}else return;return h[g]};return hd=function d(){var h,g,p,b,x,w,E=arguments[0],R=1,C=arguments.length,L=!1;for(typeof E=="boolean"&&(L=E,E=arguments[1]||{},R=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});R<C;++R)if(h=arguments[R],h!=null)for(g in h)p=f(E,g),b=f(h,g),E!==b&&(L&&b&&(o(b)||(x=a(b)))?(x?(x=!1,w=p&&a(p)?p:[]):w=p&&o(p)?p:{},u(E,{name:g,newValue:d(L,w,b)})):typeof b<"u"&&u(E,{name:g,newValue:b}));return E},hd}var SL=wL();const md=gu(SL);function rh(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 EL(){const e=[],t={run:r,use:l};return t;function r(...a){let o=-1;const u=a.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);f(null,...a);function f(d,...h){const g=e[++o];let p=-1;if(d){u(d);return}for(;++p<a.length;)(h[p]===null||h[p]===void 0)&&(h[p]=a[p]);a=h,g?CL(g,f)(...h):u(null,...h)}}function l(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function CL(e,t){let r;return l;function l(...u){const f=e.length>u.length;let d;f&&u.push(a);try{d=e.apply(this,u)}catch(h){const g=h;if(f&&r)throw g;return a(g)}f||(d&&d.then&&typeof d.then=="function"?d.then(o,a):d instanceof Error?a(d):o(d))}function a(u,...f){r||(r=!0,t(u,...f))}function o(u){a(null,u)}}const Jn={basename:kL,dirname:AL,extname:TL,join:RL,sep:"/"};function kL(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');fs(e);let r=0,l=-1,a=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(o){r=a+1;break}}else l<0&&(o=!0,l=a+1);return l<0?"":e.slice(r,l)}if(t===e)return"";let u=-1,f=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(o){r=a+1;break}}else u<0&&(o=!0,u=a+1),f>-1&&(e.codePointAt(a)===t.codePointAt(f--)?f<0&&(l=a):(f=-1,l=u));return r===l?l=u:l<0&&(l=e.length),e.slice(r,l)}function AL(e){if(fs(e),e.length===0)return".";let t=-1,r=e.length,l;for(;--r;)if(e.codePointAt(r)===47){if(l){t=r;break}}else l||(l=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function TL(e){fs(e);let t=e.length,r=-1,l=0,a=-1,o=0,u;for(;t--;){const f=e.codePointAt(t);if(f===47){if(u){l=t+1;break}continue}r<0&&(u=!0,r=t+1),f===46?a<0?a=t:o!==1&&(o=1):a>-1&&(o=-1)}return a<0||r<0||o===0||o===1&&a===r-1&&a===l+1?"":e.slice(a,r)}function RL(...e){let t=-1,r;for(;++t<e.length;)fs(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":LL(r)}function LL(e){fs(e);const t=e.codePointAt(0)===47;let r=OL(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function OL(e,t){let r="",l=0,a=-1,o=0,u=-1,f,d;for(;++u<=e.length;){if(u<e.length)f=e.codePointAt(u);else{if(f===47)break;f=47}if(f===47){if(!(a===u-1||o===1))if(a!==u-1&&o===2){if(r.length<2||l!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(d=r.lastIndexOf("/"),d!==r.length-1){d<0?(r="",l=0):(r=r.slice(0,d),l=r.length-1-r.lastIndexOf("/")),a=u,o=0;continue}}else if(r.length>0){r="",l=0,a=u,o=0;continue}}t&&(r=r.length>0?r+"/..":"..",l=2)}else r.length>0?r+="/"+e.slice(a+1,u):r=e.slice(a+1,u),l=u-a-1;a=u,o=0}else f===46&&o>-1?o++:o=-1}return r}function fs(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const NL={cwd:DL};function DL(){return"/"}function ih(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ML(e){if(typeof e=="string")e=new URL(e);else if(!ih(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 jL(e)}function jL(e){if(e.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const l=t.codePointAt(r+2);if(l===70||l===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const pd=["history","path","basename","stem","extname","dirname"];class d1{constructor(t){let r;t?ih(t)?r={path:t}:typeof t=="string"||zL(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":NL.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<pd.length;){const o=pd[l];o in r&&r[o]!==void 0&&r[o]!==null&&(this[o]=o==="history"?[...r[o]]:r[o])}let a;for(a in r)pd.includes(a)||(this[a]=r[a])}get basename(){return typeof this.path=="string"?Jn.basename(this.path):void 0}set basename(t){yd(t,"basename"),gd(t,"basename"),this.path=Jn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Jn.dirname(this.path):void 0}set dirname(t){O0(this.basename,"dirname"),this.path=Jn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Jn.extname(this.path):void 0}set extname(t){if(gd(t,"extname"),O0(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=Jn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ih(t)&&(t=ML(t)),yd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Jn.basename(this.path,this.extname):void 0}set stem(t){yd(t,"stem"),gd(t,"stem"),this.path=Jn.join(this.dirname||"",t+(this.extname||""))}fail(t,r,l){const a=this.message(t,r,l);throw a.fatal=!0,a}info(t,r,l){const a=this.message(t,r,l);return a.fatal=void 0,a}message(t,r,l){const a=new Xt(t,r,l);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function gd(e,t){if(e&&e.includes(Jn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Jn.sep+"`")}function yd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function O0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function zL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const IL=(function(e){const l=this.constructor.prototype,a=l[e],o=function(){return a.apply(o,arguments)};return Object.setPrototypeOf(o,l),o}),PL={}.hasOwnProperty;class Kh extends IL{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=EL()}copy(){const t=new Kh;let r=-1;for(;++r<this.attachers.length;){const l=this.attachers[r];t.use(...l)}return t.data(md(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(vd("data",this.frozen),this.namespace[t]=r,this):PL.call(this.namespace,t)&&this.namespace[t]||void 0:t?(vd("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,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const a=r.call(t,...l);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Mo(t),l=this.parser||this.Parser;return bd("parse",l),l(String(r),r)}process(t,r){const l=this;return this.freeze(),bd("process",this.parser||this.Parser),xd("process",this.compiler||this.Compiler),r?a(void 0,r):new Promise(a);function a(o,u){const f=Mo(t),d=l.parse(f);l.run(d,f,function(g,p,b){if(g||!p||!b)return h(g);const x=p,w=l.stringify(x,b);VL(w)?b.value=w:b.result=w,h(g,b)});function h(g,p){g||!p?u(g):o?o(p):r(void 0,p)}}}processSync(t){let r=!1,l;return this.freeze(),bd("processSync",this.parser||this.Parser),xd("processSync",this.compiler||this.Compiler),this.process(t,a),D0("processSync","process",r),l;function a(o,u){r=!0,R0(o),l=u}}run(t,r,l){N0(t),this.freeze();const a=this.transformers;return!l&&typeof r=="function"&&(l=r,r=void 0),l?o(void 0,l):new Promise(o);function o(u,f){const d=Mo(r);a.run(t,d,h);function h(g,p,b){const x=p||t;g?f(g):u?u(x):l(void 0,x,b)}}}runSync(t,r){let l=!1,a;return this.run(t,r,o),D0("runSync","run",l),a;function o(u,f){R0(u),a=f,l=!0}}stringify(t,r){this.freeze();const l=Mo(r),a=this.compiler||this.Compiler;return xd("stringify",a),N0(t),a(t,l)}use(t,...r){const l=this.attachers,a=this.namespace;if(vd("use",this.frozen),t!=null)if(typeof t=="function")d(t,r);else if(typeof t=="object")Array.isArray(t)?f(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...p]=h;d(g,p)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(h){if(!("plugins"in h)&&!("settings"in h))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(h.plugins),h.settings&&(a.settings=md(!0,a.settings,h.settings))}function f(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const p=h[g];o(p)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,g){let p=-1,b=-1;for(;++p<l.length;)if(l[p][0]===h){b=p;break}if(b===-1)l.push([h,...g]);else if(g.length>0){let[x,...w]=g;const E=l[b][1];rh(E)&&rh(x)&&(x=md(!0,E,x)),l[b]=[h,x,...w]}}}}const BL=new Kh().freeze();function bd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function xd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function vd(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 N0(e){if(!rh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function D0(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Mo(e){return UL(e)?e:new d1(e)}function UL(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function VL(e){return typeof e=="string"||HL(e)}function HL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const GL="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",M0=[],j0={allowDangerousHtml:!0},FL=/^(https?|ircs?|mailto|xmpp)$/i,qL=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function $L(e){const t=QL(e),r=YL(e);return XL(t.runSync(t.parse(r),r),e)}function QL(e){const t=e.rehypePlugins||M0,r=e.remarkPlugins||M0,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...j0}:j0;return BL().use(AR).use(r).use(_L,l).use(t)}function YL(e){const t=e.children||"",r=new d1;return typeof t=="string"&&(r.value=t),r}function XL(e,t){const r=t.allowedElements,l=t.allowElement,a=t.components,o=t.disallowedElements,u=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||KL;for(const g of qL)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+GL+g.id,void 0);return Xh(e,h),cT(e,{Fragment:v.Fragment,components:a,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function h(g,p,b){if(g.type==="raw"&&b&&typeof p=="number")return u?b.children.splice(p,1):b.children[p]={type:"text",value:g.value},p;if(g.type==="element"){let x;for(x in cd)if(Object.hasOwn(cd,x)&&Object.hasOwn(g.properties,x)){const w=g.properties[x],E=cd[x];(E===null||E.includes(g.tagName))&&(g.properties[x]=d(String(w||""),x,g))}}if(g.type==="element"){let x=r?!r.includes(g.tagName):o?o.includes(g.tagName):!1;if(!x&&l&&typeof p=="number"&&(x=!l(g,p,b)),x&&b&&typeof p=="number")return f&&g.children?b.children.splice(p,1,...g.children):b.children.splice(p,1),p}}}function KL(e){const t=e.indexOf(":"),r=e.indexOf("?"),l=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||r!==-1&&t>r||l!==-1&&t>l||FL.test(e.slice(0,t))?e:""}function ru(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let l=0,a=r.indexOf(t);for(;a!==-1;)l++,a=r.indexOf(t,a+t.length);return l}function ZL(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function JL(e,t,r){const a=Su((r||{}).ignore||[]),o=WL(t);let u=-1;for(;++u<o.length;)f1(e,"text",f);function f(h,g){let p=-1,b;for(;++p<g.length;){const x=g[p],w=b?b.children:void 0;if(a(x,w?w.indexOf(x):void 0,b))return;b=x}if(b)return d(h,g)}function d(h,g){const p=g[g.length-1],b=o[u][0],x=o[u][1];let w=0;const R=p.children.indexOf(h);let C=!1,L=[];b.lastIndex=0;let O=b.exec(h.value);for(;O;){const B=O.index,Y={index:O.index,input:O.input,stack:[...g,h]};let j=x(...O,Y);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?b.lastIndex=B+1:(w!==B&&L.push({type:"text",value:h.value.slice(w,B)}),Array.isArray(j)?L.push(...j):j&&L.push(j),w=B+O[0].length,C=!0),!b.global)break;O=b.exec(h.value)}return C?(w<h.value.length&&L.push({type:"text",value:h.value.slice(w)}),p.children.splice(R,1,...L)):L=[h],R+L.length}}function WL(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 l=-1;for(;++l<r.length;){const a=r[l];t.push([eO(a[0]),tO(a[1])])}return t}function eO(e){return typeof e=="string"?new RegExp(ZL(e),"g"):e}function tO(e){return typeof e=="function"?e:function(){return e}}const _d="phrasing",wd=["autolink","link","image","label"];function nO(){return{transforms:[uO],enter:{literalAutolink:iO,literalAutolinkEmail:Sd,literalAutolinkHttp:Sd,literalAutolinkWww:Sd},exit:{literalAutolink:oO,literalAutolinkEmail:sO,literalAutolinkHttp:lO,literalAutolinkWww:aO}}}function rO(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:_d,notInConstruct:wd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:_d,notInConstruct:wd},{character:":",before:"[ps]",after:"\\/",inConstruct:_d,notInConstruct:wd}]}}function iO(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Sd(e){this.config.enter.autolinkProtocol.call(this,e)}function lO(e){this.config.exit.autolinkProtocol.call(this,e)}function aO(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 sO(e){this.config.exit.autolinkEmail.call(this,e)}function oO(e){this.exit(e)}function uO(e){JL(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,cO],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),fO]],{ignore:["link","linkReference"]})}function cO(e,t,r,l,a){let o="";if(!h1(a)||(/^w/i.test(t)&&(r=t+r,t="",o="http://"),!dO(r)))return!1;const u=hO(r+l);if(!u[0])return!1;const f={type:"link",title:null,url:o+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[f,{type:"text",value:u[1]}]:f}function fO(e,t,r,l){return!h1(l,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function dO(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 hO(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],l=r.indexOf(")");const a=ru(e,"(");let o=ru(e,")");for(;l!==-1&&a>o;)e+=r.slice(0,l+1),r=r.slice(l+1),l=r.indexOf(")"),o++;return[e,r]}function h1(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||zi(r)||vu(r))&&(!t||r!==47)}m1.peek=wO;function mO(){this.buffer()}function pO(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function gO(){this.buffer()}function yO(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function bO(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Fn(this.sliceSerialize(e)).toLowerCase(),r.label=t}function xO(e){this.exit(e)}function vO(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Fn(this.sliceSerialize(e)).toLowerCase(),r.label=t}function _O(e){this.exit(e)}function wO(){return"["}function m1(e,t,r,l){const a=r.createTracker(l);let o=a.move("[^");const u=r.enter("footnoteReference"),f=r.enter("reference");return o+=a.move(r.safe(r.associationId(e),{after:"]",before:o})),f(),u(),o+=a.move("]"),o}function SO(){return{enter:{gfmFootnoteCallString:mO,gfmFootnoteCall:pO,gfmFootnoteDefinitionLabelString:gO,gfmFootnoteDefinition:yO},exit:{gfmFootnoteCallString:bO,gfmFootnoteCall:xO,gfmFootnoteDefinitionLabelString:vO,gfmFootnoteDefinition:_O}}}function EO(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:m1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(l,a,o,u){const f=o.createTracker(u);let d=f.move("[^");const h=o.enter("footnoteDefinition"),g=o.enter("label");return d+=f.move(o.safe(o.associationId(l),{before:d,after:"]"})),g(),d+=f.move("]:"),l.children&&l.children.length>0&&(f.shift(4),d+=f.move((t?`
|
|
34
|
+
`:" ")+o.indentLines(o.containerFlow(l,f.current()),t?p1:CO))),h(),d}}function CO(e,t,r){return t===0?e:p1(e,t,r)}function p1(e,t,r){return(r?"":" ")+e}const kO=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];g1.peek=OO;function AO(){return{canContainEols:["delete"],enter:{strikethrough:RO},exit:{strikethrough:LO}}}function TO(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:kO}],handlers:{delete:g1}}}function RO(e){this.enter({type:"delete",children:[]},e)}function LO(e){this.exit(e)}function g1(e,t,r,l){const a=r.createTracker(l),o=r.enter("strikethrough");let u=a.move("~~");return u+=r.containerPhrasing(e,{...a.current(),before:u,after:"~"}),u+=a.move("~~"),o(),u}function OO(){return"~"}function NO(e){return e.length}function DO(e,t){const r=t||{},l=(r.align||[]).concat(),a=r.stringLength||NO,o=[],u=[],f=[],d=[];let h=0,g=-1;for(;++g<e.length;){const E=[],R=[];let C=-1;for(e[g].length>h&&(h=e[g].length);++C<e[g].length;){const L=MO(e[g][C]);if(r.alignDelimiters!==!1){const O=a(L);R[C]=O,(d[C]===void 0||O>d[C])&&(d[C]=O)}E.push(L)}u[g]=E,f[g]=R}let p=-1;if(typeof l=="object"&&"length"in l)for(;++p<h;)o[p]=z0(l[p]);else{const E=z0(l);for(;++p<h;)o[p]=E}p=-1;const b=[],x=[];for(;++p<h;){const E=o[p];let R="",C="";E===99?(R=":",C=":"):E===108?R=":":E===114&&(C=":");let L=r.alignDelimiters===!1?1:Math.max(1,d[p]-R.length-C.length);const O=R+"-".repeat(L)+C;r.alignDelimiters!==!1&&(L=R.length+L+C.length,L>d[p]&&(d[p]=L),x[p]=L),b[p]=O}u.splice(1,0,b),f.splice(1,0,x),g=-1;const w=[];for(;++g<u.length;){const E=u[g],R=f[g];p=-1;const C=[];for(;++p<h;){const L=E[p]||"";let O="",B="";if(r.alignDelimiters!==!1){const Y=d[p]-(R[p]||0),j=o[p];j===114?O=" ".repeat(Y):j===99?Y%2?(O=" ".repeat(Y/2+.5),B=" ".repeat(Y/2-.5)):(O=" ".repeat(Y/2),B=O):B=" ".repeat(Y)}r.delimiterStart!==!1&&!p&&C.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&L==="")&&(r.delimiterStart!==!1||p)&&C.push(" "),r.alignDelimiters!==!1&&C.push(O),C.push(L),r.alignDelimiters!==!1&&C.push(B),r.padding!==!1&&C.push(" "),(r.delimiterEnd!==!1||p!==h-1)&&C.push("|")}w.push(r.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return w.join(`
|
|
35
|
+
`)}function MO(e){return e==null?"":String(e)}function z0(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}const I0={}.hasOwnProperty;function jO(e,t){const r=t||{};function l(a,...o){let u=l.invalid;const f=l.handlers;if(a&&I0.call(a,e)){const d=String(a[e]);u=I0.call(f,d)?f[d]:l.unknown}if(u)return u.call(this,a,...o)}return l.handlers=r.handlers||{},l.invalid=r.invalid,l.unknown=r.unknown,l}function zO(e,t,r,l){const a=r.enter("blockquote"),o=r.createTracker(l);o.move("> "),o.shift(2);const u=r.indentLines(r.containerFlow(e,o.current()),IO);return a(),u}function IO(e,t,r){return">"+(r?"":" ")+e}function PO(e,t){return P0(e,t.inConstruct,!0)&&!P0(e,t.notInConstruct,!1)}function P0(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let l=-1;for(;++l<t.length;)if(e.includes(t[l]))return!0;return!1}function B0(e,t,r,l){let a=-1;for(;++a<r.unsafe.length;)if(r.unsafe[a].character===`
|
|
36
|
+
`&&PO(r.stack,r.unsafe[a]))return/[ \t]/.test(l.before)?"":" ";return`\\
|
|
37
|
+
`}function BO(e,t){const r=String(e);let l=r.indexOf(t),a=l,o=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;l!==-1;)l===a?++o>u&&(u=o):o=1,a=l+t.length,l=r.indexOf(t,a);return u}function UO(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 VO(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 HO(e,t,r,l){const a=VO(r),o=e.value||"",u=a==="`"?"GraveAccent":"Tilde";if(UO(e,r)){const p=r.enter("codeIndented"),b=r.indentLines(o,GO);return p(),b}const f=r.createTracker(l),d=a.repeat(Math.max(BO(o,a)+1,3)),h=r.enter("codeFenced");let g=f.move(d);if(e.lang){const p=r.enter(`codeFencedLang${u}`);g+=f.move(r.safe(e.lang,{before:g,after:" ",encode:["`"],...f.current()})),p()}if(e.lang&&e.meta){const p=r.enter(`codeFencedMeta${u}`);g+=f.move(" "),g+=f.move(r.safe(e.meta,{before:g,after:`
|
|
37
38
|
`,encode:["`"],...f.current()})),p()}return g+=f.move(`
|
|
38
39
|
`),o&&(g+=f.move(o+`
|
|
39
|
-
`)),g+=f.move(d),h(),g}function
|
|
40
|
-
`,...d.current()}))),f(),e.title&&(f=r.enter(`title${o}`),h+=d.move(" "+a),h+=d.move(r.safe(e.title,{before:h,after:a,...d.current()})),h+=d.move(a),f()),u(),h}function
|
|
40
|
+
`)),g+=f.move(d),h(),g}function GO(e,t,r){return(r?"":" ")+e}function Zh(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 FO(e,t,r,l){const a=Zh(r),o=a==='"'?"Quote":"Apostrophe",u=r.enter("definition");let f=r.enter("label");const d=r.createTracker(l);let h=d.move("[");return h+=d.move(r.safe(r.associationId(e),{before:h,after:"]",...d.current()})),h+=d.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(r.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=r.enter("destinationRaw"),h+=d.move(r.safe(e.url,{before:h,after:e.title?" ":`
|
|
41
|
+
`,...d.current()}))),f(),e.title&&(f=r.enter(`title${o}`),h+=d.move(" "+a),h+=d.move(r.safe(e.title,{before:h,after:a,...d.current()})),h+=d.move(a),f()),u(),h}function qO(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 Wa(e){return"&#x"+e.toString(16).toUpperCase()+";"}function iu(e,t,r){const l=Il(e),a=Il(t);return l===void 0?a===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:l===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}y1.peek=$O;function y1(e,t,r,l){const a=qO(r),o=r.enter("emphasis"),u=r.createTracker(l),f=u.move(a);let d=u.move(r.containerPhrasing(e,{after:a,before:f,...u.current()}));const h=d.charCodeAt(0),g=iu(l.before.charCodeAt(l.before.length-1),h,a);g.inside&&(d=Wa(h)+d.slice(1));const p=d.charCodeAt(d.length-1),b=iu(l.after.charCodeAt(0),p,a);b.inside&&(d=d.slice(0,-1)+Wa(p));const x=u.move(a);return o(),r.attentionEncodeSurroundingInfo={after:b.outside,before:g.outside},f+d+x}function $O(e,t,r){return r.options.emphasis||"*"}function QO(e,t){let r=!1;return Xh(e,function(l){if("value"in l&&/\r?\n|\r/.test(l.value)||l.type==="break")return r=!0,th}),!!((!e.depth||e.depth<3)&&Hh(e)&&(t.options.setext||r))}function YO(e,t,r,l){const a=Math.max(Math.min(6,e.depth||1),1),o=r.createTracker(l);if(QO(e,r)){const g=r.enter("headingSetext"),p=r.enter("phrasing"),b=r.containerPhrasing(e,{...o.current(),before:`
|
|
41
42
|
`,after:`
|
|
42
43
|
`});return p(),g(),b+`
|
|
43
44
|
`+(a===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
44
45
|
`))+1))}const u="#".repeat(a),f=r.enter("headingAtx"),d=r.enter("phrasing");o.move(u+" ");let h=r.containerPhrasing(e,{before:"# ",after:`
|
|
45
|
-
`,...o.current()});return/^[\t ]/.test(h)&&(h=
|
|
46
|
+
`,...o.current()});return/^[\t ]/.test(h)&&(h=Wa(h.charCodeAt(0))+h.slice(1)),h=h?u+" "+h:u,r.options.closeAtx&&(h+=" "+u),d(),f(),h}b1.peek=XO;function b1(e){return e.value||""}function XO(){return"<"}x1.peek=KO;function x1(e,t,r,l){const a=Zh(r),o=a==='"'?"Quote":"Apostrophe",u=r.enter("image");let f=r.enter("label");const d=r.createTracker(l);let h=d.move("![");return h+=d.move(r.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(r.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=r.enter("destinationRaw"),h+=d.move(r.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),f(),e.title&&(f=r.enter(`title${o}`),h+=d.move(" "+a),h+=d.move(r.safe(e.title,{before:h,after:a,...d.current()})),h+=d.move(a),f()),h+=d.move(")"),u(),h}function KO(){return"!"}v1.peek=ZO;function v1(e,t,r,l){const a=e.referenceType,o=r.enter("imageReference");let u=r.enter("label");const f=r.createTracker(l);let d=f.move("![");const h=r.safe(e.alt,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),u();const g=r.stack;r.stack=[],u=r.enter("reference");const p=r.safe(r.associationId(e),{before:d,after:"]",...f.current()});return u(),r.stack=g,o(),a==="full"||!h||h!==p?d+=f.move(p+"]"):a==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function ZO(){return"!"}_1.peek=JO;function _1(e,t,r){let l=e.value||"",a="`",o=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(l);)a+="`";for(/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^`|`$/.test(l))&&(l=" "+l+" ");++o<r.unsafe.length;){const u=r.unsafe[o],f=r.compilePattern(u);let d;if(u.atBreak)for(;d=f.exec(l);){let h=d.index;l.charCodeAt(h)===10&&l.charCodeAt(h-1)===13&&h--,l=l.slice(0,h)+" "+l.slice(d.index+1)}}return a+l+a}function JO(){return"`"}function w1(e,t){const r=Hh(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))}S1.peek=WO;function S1(e,t,r,l){const a=Zh(r),o=a==='"'?"Quote":"Apostrophe",u=r.createTracker(l);let f,d;if(w1(e,r)){const g=r.stack;r.stack=[],f=r.enter("autolink");let p=u.move("<");return p+=u.move(r.containerPhrasing(e,{before:p,after:">",...u.current()})),p+=u.move(">"),f(),r.stack=g,p}f=r.enter("link"),d=r.enter("label");let h=u.move("[");return h+=u.move(r.containerPhrasing(e,{before:h,after:"](",...u.current()})),h+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=r.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(r.safe(e.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(d=r.enter("destinationRaw"),h+=u.move(r.safe(e.url,{before:h,after:e.title?" ":")",...u.current()}))),d(),e.title&&(d=r.enter(`title${o}`),h+=u.move(" "+a),h+=u.move(r.safe(e.title,{before:h,after:a,...u.current()})),h+=u.move(a),d()),h+=u.move(")"),f(),h}function WO(e,t,r){return w1(e,r)?"<":"["}E1.peek=eN;function E1(e,t,r,l){const a=e.referenceType,o=r.enter("linkReference");let u=r.enter("label");const f=r.createTracker(l);let d=f.move("[");const h=r.containerPhrasing(e,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),u();const g=r.stack;r.stack=[],u=r.enter("reference");const p=r.safe(r.associationId(e),{before:d,after:"]",...f.current()});return u(),r.stack=g,o(),a==="full"||!h||h!==p?d+=f.move(p+"]"):a==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function eN(){return"["}function Jh(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 tN(e){const t=Jh(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 nN(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 C1(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 rN(e,t,r,l){const a=r.enter("list"),o=r.bulletCurrent;let u=e.ordered?nN(r):Jh(r);const f=e.ordered?u==="."?")":".":tN(r);let d=t&&r.bulletLastUsed?u===r.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&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&&(d=!0),C1(r)===u&&g){let p=-1;for(;++p<e.children.length;){const b=e.children[p];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=f),r.bulletCurrent=u;const h=r.containerFlow(e,l);return r.bulletLastUsed=u,r.bulletCurrent=o,a(),h}function iN(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 lN(e,t,r,l){const a=iN(r);let o=r.bulletCurrent||Jh(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 u=o.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const f=r.createTracker(l);f.move(o+" ".repeat(u-o.length)),f.shift(u);const d=r.enter("listItem"),h=r.indentLines(r.containerFlow(e,f.current()),g);return d(),h;function g(p,b,x){return b?(x?"":" ".repeat(u))+p:(x?o:o+" ".repeat(u-o.length))+p}}function aN(e,t,r,l){const a=r.enter("paragraph"),o=r.enter("phrasing"),u=r.containerPhrasing(e,l);return o(),a(),u}const sN=Su(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function oN(e,t,r,l){return(e.children.some(function(u){return sN(u)})?r.containerPhrasing:r.containerFlow).call(r,e,l)}function uN(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}k1.peek=cN;function k1(e,t,r,l){const a=uN(r),o=r.enter("strong"),u=r.createTracker(l),f=u.move(a+a);let d=u.move(r.containerPhrasing(e,{after:a,before:f,...u.current()}));const h=d.charCodeAt(0),g=iu(l.before.charCodeAt(l.before.length-1),h,a);g.inside&&(d=Wa(h)+d.slice(1));const p=d.charCodeAt(d.length-1),b=iu(l.after.charCodeAt(0),p,a);b.inside&&(d=d.slice(0,-1)+Wa(p));const x=u.move(a+a);return o(),r.attentionEncodeSurroundingInfo={after:b.outside,before:g.outside},f+d+x}function cN(e,t,r){return r.options.strong||"*"}function fN(e,t,r,l){return r.safe(e.value,l)}function dN(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 hN(e,t,r){const l=(C1(r)+(r.options.ruleSpaces?" ":"")).repeat(dN(r));return r.options.ruleSpaces?l.slice(0,-1):l}const A1={blockquote:zO,break:B0,code:HO,definition:FO,emphasis:y1,hardBreak:B0,heading:YO,html:b1,image:x1,imageReference:v1,inlineCode:_1,link:S1,linkReference:E1,list:rN,listItem:lN,paragraph:aN,root:oN,strong:k1,text:fN,thematicBreak:hN};function mN(){return{enter:{table:pN,tableData:U0,tableHeader:U0,tableRow:yN},exit:{codeText:bN,table:gN,tableData:Ed,tableHeader:Ed,tableRow:Ed}}}function pN(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 gN(e){this.exit(e),this.data.inTable=void 0}function yN(e){this.enter({type:"tableRow",children:[]},e)}function Ed(e){this.exit(e)}function U0(e){this.enter({type:"tableCell",children:[]},e)}function bN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,xN));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function xN(e,t){return t==="|"?t:e}function vN(e){const t=e||{},r=t.tableCellPadding,l=t.tablePipeAlign,a=t.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
46
47
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:u,tableCell:d,tableRow:f}};function u(x,w,E,R){return h(g(x,E,R),x.align)}function f(x,w,E,R){const C=p(x,E,R),L=h([C]);return L.slice(0,L.indexOf(`
|
|
47
|
-
`))}function d(x,w,E,R){const C=E.enter("tableCell"),L=E.enter("phrasing"),O=E.containerPhrasing(x,{...R,before:o,after:o});return L(),C(),O}function h(x,w){return MO(x,{align:w,alignDelimiters:l,padding:r,stringLength:a})}function g(x,w,E){const R=x.children;let C=-1;const L=[],O=w.enter("table");for(;++C<R.length;)L[C]=p(R[C],w,E);return O(),L}function p(x,w,E){const R=x.children;let C=-1;const L=[],O=w.enter("tableRow");for(;++C<R.length;)L[C]=d(R[C],x,w,E);return O(),L}function b(x,w,E){let R=A1.inlineCode(x,w,E);return E.stack.includes("tableCell")&&(R=R.replace(/\|/g,"\\$&")),R}}function wN(){return{exit:{taskListCheckValueChecked:V0,taskListCheckValueUnchecked:V0,paragraph:EN}}}function SN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:CN}}}function V0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function EN(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 l=r.children[0];if(l&&l.type==="text"){const a=t.children;let o=-1,u;for(;++o<a.length;){const f=a[o];if(f.type==="paragraph"){u=f;break}}u===r&&(l.value=l.value.slice(1),l.value.length===0?r.children.shift():r.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,r.position.start=Object.assign({},l.position.start)))}}this.exit(e)}function CN(e,t,r,l){const a=e.children[0],o=typeof e.checked=="boolean"&&a&&a.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",f=r.createTracker(l);o&&f.move(u);let d=A1.listItem(e,t,r,{...l,...f.current()});return o&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(g){return g+u}}function kN(){return[rO(),EO(),TO(),pN(),wN()]}function AN(e){return{extensions:[iO(),CO(e),RO(),_N(e),SN()]}}const TN={tokenize:MN,partial:!0},T1={tokenize:jN,partial:!0},R1={tokenize:zN,partial:!0},L1={tokenize:IN,partial:!0},RN={tokenize:PN,partial:!0},O1={name:"wwwAutolink",tokenize:NN,previous:D1},N1={name:"protocolAutolink",tokenize:DN,previous:M1},Ar={name:"emailAutolink",tokenize:ON,previous:j1},Wn={};function LN(){return{text:Wn}}let Ti=48;for(;Ti<123;)Wn[Ti]=Ar,Ti++,Ti===58?Ti=65:Ti===91&&(Ti=97);Wn[43]=Ar;Wn[45]=Ar;Wn[46]=Ar;Wn[95]=Ar;Wn[72]=[Ar,N1];Wn[104]=[Ar,N1];Wn[87]=[Ar,O1];Wn[119]=[Ar,O1];function ON(e,t,r){const l=this;let a,o;return u;function u(p){return!lh(p)||!j1.call(l,l.previous)||Wh(l.events)?r(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(p))}function f(p){return lh(p)?(e.consume(p),f):p===64?(e.consume(p),d):r(p)}function d(p){return p===46?e.check(RN,g,h)(p):p===45||p===95||$t(p)?(o=!0,e.consume(p),d):g(p)}function h(p){return e.consume(p),a=!0,d}function g(p){return o&&a&&Kt(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):r(p)}}function NN(e,t,r){const l=this;return a;function a(u){return u!==87&&u!==119||!D1.call(l,l.previous)||Wh(l.events)?r(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(TN,e.attempt(T1,e.attempt(R1,o),r),r)(u))}function o(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function DN(e,t,r){const l=this;let a="",o=!1;return u;function u(p){return(p===72||p===104)&&M1.call(l,l.previous)&&!Wh(l.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(p),e.consume(p),f):r(p)}function f(p){if(Kt(p)&&a.length<5)return a+=String.fromCodePoint(p),e.consume(p),f;if(p===58){const b=a.toLowerCase();if(b==="http"||b==="https")return e.consume(p),d}return r(p)}function d(p){return p===47?(e.consume(p),o?h:(o=!0,d)):r(p)}function h(p){return p===null||eu(p)||nt(p)||zi(p)||vu(p)?r(p):e.attempt(T1,e.attempt(R1,g),r)(p)}function g(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function MN(e,t,r){let l=0;return a;function a(u){return(u===87||u===119)&&l<3?(l++,e.consume(u),a):u===46&&l===3?(e.consume(u),o):r(u)}function o(u){return u===null?r(u):t(u)}}function jN(e,t,r){let l,a,o;return u;function u(h){return h===46||h===95?e.check(L1,d,f)(h):h===null||nt(h)||zi(h)||h!==45&&vu(h)?d(h):(o=!0,e.consume(h),u)}function f(h){return h===95?l=!0:(a=l,l=void 0),e.consume(h),u}function d(h){return a||l||!o?r(h):t(h)}}function zN(e,t){let r=0,l=0;return a;function a(u){return u===40?(r++,e.consume(u),a):u===41&&l<r?o(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(L1,t,o)(u):u===null||nt(u)||zi(u)?t(u):(e.consume(u),a)}function o(u){return u===41&&l++,e.consume(u),a}}function IN(e,t,r){return l;function l(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),l):f===38?(e.consume(f),o):f===93?(e.consume(f),a):f===60||f===null||nt(f)||zi(f)?t(f):r(f)}function a(f){return f===null||f===40||f===91||nt(f)||zi(f)?t(f):l(f)}function o(f){return Kt(f)?u(f):r(f)}function u(f){return f===59?(e.consume(f),l):Kt(f)?(e.consume(f),u):r(f)}}function PN(e,t,r){return l;function l(o){return e.consume(o),a}function a(o){return $t(o)?r(o):t(o)}}function D1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||nt(e)}function M1(e){return!Kt(e)}function j1(e){return!(e===47||lh(e))}function lh(e){return e===43||e===45||e===46||e===95||$t(e)}function Wh(e){let t=e.length,r=!1;for(;t--;){const l=e[t][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){r=!0;break}if(l._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const BN={tokenize:QN,partial:!0};function UN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:FN,continuation:{tokenize:qN},exit:$N}},text:{91:{name:"gfmFootnoteCall",tokenize:GN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:VN,resolveTo:HN}}}}function VN(e,t,r){const l=this;let a=l.events.length;const o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u;for(;a--;){const d=l.events[a][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return f;function f(d){if(!u||!u._balanced)return r(d);const h=Hn(l.sliceSerialize({start:u.end,end:l.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?r(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function HN(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 l={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},f=[e[r+1],e[r+2],["enter",l,t],e[r+3],e[r+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",u,t],["exit",u,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",l,t]];return e.splice(r,e.length-r+1,...f),e}function GN(e,t,r){const l=this,a=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let o=0,u;return f;function f(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?r(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(p){if(o>999||p===93&&!u||p===null||p===91||nt(p))return r(p);if(p===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return a.includes(Hn(l.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(p)}return nt(p)||(u=!0),o++,e.consume(p),p===92?g:h}function g(p){return p===91||p===92||p===93?(e.consume(p),o++,h):h(p)}}function FN(e,t,r){const l=this,a=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let o,u=0,f;return d;function d(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(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(u>999||w===93&&!f||w===null||w===91||nt(w))return r(w);if(w===93){e.exit("chunkString");const E=e.exit("gfmFootnoteDefinitionLabelString");return o=Hn(l.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return nt(w)||(f=!0),u++,e.consume(w),w===92?p:g}function p(w){return w===91||w===92||w===93?(e.consume(w),u++,g):g(w)}function b(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),a.includes(o)||a.push(o),Ge(e,x,"gfmFootnoteDefinitionWhitespace")):r(w)}function x(w){return t(w)}}function qN(e,t,r){return e.check(us,t,e.attempt(BN,t,r))}function $N(e){e.exit("gfmFootnoteDefinition")}function QN(e,t,r){const l=this;return Ge(e,a,"gfmFootnoteDefinitionIndent",5);function a(o){const u=l.events[l.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(o):r(o)}}function YN(e){let r=(e||{}).singleTilde;const l={name:"strikethrough",tokenize:o,resolveAll:a};return r==null&&(r=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function a(u,f){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let h=d;for(;h--;)if(u[h][0]==="exit"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[h][1].end.offset-u[h][1].start.offset){u[d][1].type="strikethroughSequence",u[h][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},u[h][1].start),end:Object.assign({},u[d][1].end)},p={type:"strikethroughText",start:Object.assign({},u[h][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",g,f],["enter",u[h][1],f],["exit",u[h][1],f],["enter",p,f]],x=f.parser.constructs.insideSpan.null;x&&yn(b,b.length,0,_u(x,u.slice(h+1,d),f)),yn(b,b.length,0,[["exit",p,f],["enter",u[d][1],f],["exit",u[d][1],f],["exit",g,f]]),yn(u,h-1,d-h+3,b),d=h+b.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function o(u,f,d){const h=this.previous,g=this.events;let p=0;return b;function b(w){return h===126&&g[g.length-1][1].type!=="characterEscape"?d(w):(u.enter("strikethroughSequenceTemporary"),x(w))}function x(w){const E=Il(h);if(w===126)return p>1?d(w):(u.consume(w),p++,x);if(p<2&&!r)return d(w);const R=u.exit("strikethroughSequenceTemporary"),C=Il(w);return R._open=!C||C===2&&!!E,R._close=!E||E===2&&!!C,f(w)}}}class XN{constructor(){this.map=[]}add(t,r,l){KN(this,t,r,l)}consume(t){if(this.map.sort(function(o,u){return o[0]-u[0]}),this.map.length===0)return;let r=this.map.length;const l=[];for(;r>0;)r-=1,l.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];l.push(t.slice()),t.length=0;let a=l.pop();for(;a;){for(const o of a)t.push(o);a=l.pop()}this.map.length=0}}function KN(e,t,r,l){let a=0;if(!(r===0&&l.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=r,e.map[a][2].push(...l);return}a+=1}e.map.push([t,r,l])}}function ZN(e,t){let r=!1;const l=[];for(;t<e.length;){const a=e[t];if(r){if(a[0]==="enter")a[1].type==="tableContent"&&l.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=l.length-1;l[o]=l[o]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return l}function JN(){return{flow:{null:{name:"table",tokenize:WN,resolveAll:eD}}}}function WN(e,t,r){const l=this;let a=0,o=0,u;return f;function f(P){let X=l.events.length-1;for(;X>-1;){const le=l.events[X][1].type;if(le==="lineEnding"||le==="linePrefix")X--;else break}const te=X>-1?l.events[X][1].type:null,fe=te==="tableHead"||te==="tableRow"?j:d;return fe===j&&l.parser.lazy[l.now().line]?r(P):fe(P)}function d(P){return e.enter("tableHead"),e.enter("tableRow"),h(P)}function h(P){return P===124||(u=!0,o+=1),g(P)}function g(P){return P===null?r(P):Se(P)?o>1?(o=0,l.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),x):r(P):Pe(P)?Ge(e,g,"whitespace")(P):(o+=1,u&&(u=!1,a+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),u=!0,g):(e.enter("data"),p(P)))}function p(P){return P===null||P===124||nt(P)?(e.exit("data"),g(P)):(e.consume(P),P===92?b:p)}function b(P){return P===92||P===124?(e.consume(P),p):p(P)}function x(P){return l.interrupt=!1,l.parser.lazy[l.now().line]?r(P):(e.enter("tableDelimiterRow"),u=!1,Pe(P)?Ge(e,w,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):w(P))}function w(P){return P===45||P===58?R(P):P===124?(u=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),E):Y(P)}function E(P){return Pe(P)?Ge(e,R,"whitespace")(P):R(P)}function R(P){return P===58?(o+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),C):P===45?(o+=1,C(P)):P===null||Se(P)?B(P):Y(P)}function C(P){return P===45?(e.enter("tableDelimiterFiller"),L(P)):Y(P)}function L(P){return P===45?(e.consume(P),L):P===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),O):(e.exit("tableDelimiterFiller"),O(P))}function O(P){return Pe(P)?Ge(e,B,"whitespace")(P):B(P)}function B(P){return P===124?w(P):P===null||Se(P)?!u||a!==o?Y(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):Y(P)}function Y(P){return r(P)}function j(P){return e.enter("tableRow"),q(P)}function q(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),q):P===null||Se(P)?(e.exit("tableRow"),t(P)):Pe(P)?Ge(e,q,"whitespace")(P):(e.enter("data"),G(P))}function G(P){return P===null||P===124||nt(P)?(e.exit("data"),q(P)):(e.consume(P),P===92?oe:G)}function oe(P){return P===92||P===124?(e.consume(P),G):G(P)}}function eD(e,t){let r=-1,l=!0,a=0,o=[0,0,0,0],u=[0,0,0,0],f=!1,d=0,h,g,p;const b=new XN;for(;++r<e.length;){const x=e[r],w=x[1];x[0]==="enter"?w.type==="tableHead"?(f=!1,d!==0&&(H0(b,t,d,h,g),g=void 0,d=0),h={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},b.add(r,0,[["enter",h,t]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(l=!0,p=void 0,o=[0,0,0,0],u=[0,r+1,0,0],f&&(f=!1,g={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},b.add(r,0,[["enter",g,t]])),a=w.type==="tableDelimiterRow"?2:g?3:1):a&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(l=!1,u[2]===0&&(o[1]!==0&&(u[0]=u[1],p=jo(b,t,o,a,void 0,p),o=[0,0,0,0]),u[2]=r)):w.type==="tableCellDivider"&&(l?l=!1:(o[1]!==0&&(u[0]=u[1],p=jo(b,t,o,a,void 0,p)),o=u,u=[o[1],r,0,0])):w.type==="tableHead"?(f=!0,d=r):w.type==="tableRow"||w.type==="tableDelimiterRow"?(d=r,o[1]!==0?(u[0]=u[1],p=jo(b,t,o,a,r,p)):u[1]!==0&&(p=jo(b,t,u,a,r,p)),a=0):a&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(u[3]=r)}for(d!==0&&H0(b,t,d,h,g),b.consume(t.events),r=-1;++r<t.events.length;){const x=t.events[r];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=ZN(t.events,r))}return e}function jo(e,t,r,l,a,o){const u=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",f="tableContent";r[0]!==0&&(o.end=Object.assign({},Ol(t.events,r[0])),e.add(r[0],0,[["exit",o,t]]));const d=Ol(t.events,r[1]);if(o={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(r[1],0,[["enter",o,t]]),r[2]!==0){const h=Ol(t.events,r[2]),g=Ol(t.events,r[3]),p={type:f,start:Object.assign({},h),end:Object.assign({},g)};if(e.add(r[2],0,[["enter",p,t]]),l!==2){const b=t.events[r[2]],x=t.events[r[3]];if(b[1].end=Object.assign({},x[1].end),b[1].type="chunkText",b[1].contentType="text",r[3]>r[2]+1){const w=r[2]+1,E=r[3]-r[2]-1;e.add(w,E,[])}}e.add(r[3]+1,0,[["exit",p,t]])}return a!==void 0&&(o.end=Object.assign({},Ol(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function H0(e,t,r,l,a){const o=[],u=Ol(t.events,r);a&&(a.end=Object.assign({},u),o.push(["exit",a,t])),l.end=Object.assign({},u),o.push(["exit",l,t]),e.add(r+1,0,o)}function Ol(e,t){const r=e[t],l=r[0]==="enter"?"start":"end";return r[1][l]}const tD={name:"tasklistCheck",tokenize:rD};function nD(){return{text:{91:tD}}}function rD(e,t,r){const l=this;return a;function a(d){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?r(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),o)}function o(d){return nt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):r(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):r(d)}function f(d){return Se(d)?t(d):Pe(d)?e.check({tokenize:iD},t,r)(d):r(d)}}function iD(e,t,r){return Ge(e,l,"whitespace");function l(a){return a===null?r(a):t(a)}}function lD(e){return $v([LN(),UN(),YN(e),JN(),nD()])}const aD={};function sD(e){const t=this,r=e||aD,l=t.data(),a=l.micromarkExtensions||(l.micromarkExtensions=[]),o=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),u=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);a.push(lD(r)),o.push(kN()),u.push(AN(r))}var ah=Object.defineProperty,oD=Object.getOwnPropertyDescriptor,uD=Object.getOwnPropertyNames,cD=Object.prototype.hasOwnProperty,em=(e,t)=>{let r={};for(var l in e)ah(r,l,{get:e[l],enumerable:!0});return ah(r,Symbol.toStringTag,{value:"Module"}),r},fD=(e,t,r,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=uD(t),o=0,u=a.length,f;o<u;o++)f=a[o],!cD.call(e,f)&&f!==r&&ah(e,f,{get:(d=>t[d]).bind(null,f),enumerable:!(l=oD(t,f))||l.enumerable});return e},z1=(e,t,r)=>(fD(e,t,"default"),r);const dD="modulepreload",hD=function(e){return"/"+e},G0={},A=function(t,r,l){let a=Promise.resolve();if(r&&r.length>0){let h=function(g){return Promise.all(g.map(p=>Promise.resolve(p).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};var u=h;document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),d=f?.nonce||f?.getAttribute("nonce");a=h(r.map(g=>{if(g=hD(g),g in G0)return;G0[g]=!0;const p=g.endsWith(".css"),b=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${b}`))return;const x=document.createElement("link");if(x.rel=p?"stylesheet":dD,p||(x.as="script"),x.crossOrigin="",x.href=g,d&&x.setAttribute("nonce",d),document.head.appendChild(x),p)return new Promise((w,E)=>{x.addEventListener("load",w),x.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${g}`)))})}))}function o(f){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=f,window.dispatchEvent(d),!d.defaultPrevented)throw f}return a.then(f=>{for(const d of f||[])d.status==="rejected"&&o(d.reason);return t().catch(o)})},Cu=[{id:"abap",name:"ABAP",import:(()=>A(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>A(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>A(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>A(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>A(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>A(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>A(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>A(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>A(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>A(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>A(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>A(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>A(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>A(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>A(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>A(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>A(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>A(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>A(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>A(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>A(()=>import("./bird2-BIv1doCn.js"),[]))},{id:"blade",name:"Blade",import:(()=>A(()=>import("./blade-BjGOyj-B.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>A(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>A(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>A(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>A(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>A(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>A(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>A(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>A(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>A(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>A(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>A(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>A(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>A(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>A(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>A(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>A(()=>import("./crystal-DNxU26gB.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>A(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>A(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>A(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>A(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>A(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>A(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>A(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>A(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>A(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>A(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>A(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>A(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>A(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>A(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>A(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>A(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>A(()=>import("./emacs-lisp-CXvaQtF9.js"),[]))},{id:"erb",name:"ERB",import:(()=>A(()=>import("./erb-BYCe7drp.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>A(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>A(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>A(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>A(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>A(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>A(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>A(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>A(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>A(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>A(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>A(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>A(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>A(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>A(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>A(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>A(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>A(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>A(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>A(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>A(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>A(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>A(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>A(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>A(()=>import("./hack-i7_Ulhet.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>A(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>A(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>A(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>A(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>A(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>A(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>A(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>A(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>A(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>A(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>A(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>A(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>A(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>A(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>A(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>A(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>A(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>A(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>A(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>A(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>A(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>A(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>A(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>A(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>A(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>A(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>A(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>A(()=>import("./just-VxiPbLrw.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>A(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>A(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>A(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>A(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>A(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>A(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>A(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>A(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>A(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>A(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>A(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>A(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>A(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>A(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>A(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>A(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>A(()=>import("./mdc-DTYItulj.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>A(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>A(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>A(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>A(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>A(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>A(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>A(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>A(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>A(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>A(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>A(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>A(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>A(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>A(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>A(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>A(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>A(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>A(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>A(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>A(()=>import("./perl-NvoQZIq0.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>A(()=>import("./php-R6g_5hLQ.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>A(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>A(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>A(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>A(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>A(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>A(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>A(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>A(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>A(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>A(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>A(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>A(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>A(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>A(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>A(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>A(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>A(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>A(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>A(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>A(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>A(()=>import("./razor-BDqjjVU7.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>A(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>A(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>A(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>A(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>A(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>A(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>A(()=>import("./rst-CRjBmOyv.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>A(()=>import("./ruby-Wjq7vjNf.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>A(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>A(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>A(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>A(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>A(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>A(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>A(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>A(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>A(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>A(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>A(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>A(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>A(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>A(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>A(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>A(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>A(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>A(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>A(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>A(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>A(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>A(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>A(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>A(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>A(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>A(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>A(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>A(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>A(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>A(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>A(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>A(()=>import("./ts-tags-DQrlYJgV.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>A(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>A(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>A(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>A(()=>import("./twig-xg9kU7Mw.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>A(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>A(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>A(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>A(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>A(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>A(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>A(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>A(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>A(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>A(()=>import("./vue-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>A(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>A(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>A(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>A(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>A(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>A(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>A(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>A(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>A(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>A(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>A(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>A(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>A(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>A(()=>import("./zig-VOosw3JB.js"),[]))}],tm=Object.fromEntries(Cu.map(e=>[e.id,e.import])),nm=Object.fromEntries(Cu.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),rm={...tm,...nm},im=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>A(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>A(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>A(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>A(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>A(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>A(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>A(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>A(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>A(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>A(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>A(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>A(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>A(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>A(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>A(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>A(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>A(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>A(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>A(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>A(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>A(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>A(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>A(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>A(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>A(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>A(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>A(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>A(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>A(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>A(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>A(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>A(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>A(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>A(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>A(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>A(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>A(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>A(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>A(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>A(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>A(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>A(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>A(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>A(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>A(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>A(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>A(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>A(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>A(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>A(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>A(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>A(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>A(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>A(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>A(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>A(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>A(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>A(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>A(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>A(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>A(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>A(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>A(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>A(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>A(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],lm=Object.fromEntries(im.map(e=>[e.id,e.import]));var am=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function mD(){return 2147483648}function pD(){return typeof performance<"u"?performance.now():Date.now()}const gD=(e,t)=>e+(t-e%t)%t;async function yD(e){let t,r;const l={};function a(x){r=x,l.HEAPU8=new Uint8Array(x),l.HEAPU32=new Uint32Array(x)}function o(x,w,E){l.HEAPU8.copyWithin(x,w,w+E)}function u(x){try{return t.grow(x-r.byteLength+65535>>>16),a(t.buffer),1}catch{}}function f(x){const w=l.HEAPU8.length;x=x>>>0;const E=mD();if(x>E)return!1;for(let R=1;R<=4;R*=2){let C=w*(1+.2/R);C=Math.min(C,x+100663296);const L=Math.min(E,gD(Math.max(x,C),65536));if(u(L))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function h(x,w,E=1024){const R=w+E;let C=w;for(;x[C]&&!(C>=R);)++C;if(C-w>16&&x.buffer&&d)return d.decode(x.subarray(w,C));let L="";for(;w<C;){let O=x[w++];if(!(O&128)){L+=String.fromCharCode(O);continue}const B=x[w++]&63;if((O&224)===192){L+=String.fromCharCode((O&31)<<6|B);continue}const Y=x[w++]&63;if((O&240)===224?O=(O&15)<<12|B<<6|Y:O=(O&7)<<18|B<<12|Y<<6|x[w++]&63,O<65536)L+=String.fromCharCode(O);else{const j=O-65536;L+=String.fromCharCode(55296|j>>10,56320|j&1023)}}return L}function g(x,w){return x?h(l.HEAPU8,x,w):""}const p={emscripten_get_now:pD,emscripten_memcpy_big:o,emscripten_resize_heap:f,fd_write:()=>0};async function b(){const w=await e({env:p,wasi_snapshot_preview1:p});t=w.memory,a(t.buffer),Object.assign(l,w),l.UTF8ToString=g}return await b(),l}var bD=Object.defineProperty,xD=(e,t,r)=>t in e?bD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kt=(e,t,r)=>xD(e,typeof t!="symbol"?t+"":t,r);let jt=null;function vD(e){throw new am(e.UTF8ToString(e.getLastOnigError()))}class ku{constructor(t){kt(this,"utf16Length"),kt(this,"utf8Length"),kt(this,"utf16Value"),kt(this,"utf8Value"),kt(this,"utf16OffsetToUtf8"),kt(this,"utf8OffsetToUtf16");const r=t.length,l=ku._utf8ByteLength(t),a=l!==r,o=a?new Uint32Array(r+1):null;a&&(o[r]=l);const u=a?new Uint32Array(l+1):null;a&&(u[l]=r);const f=new Uint8Array(l);let d=0;for(let h=0;h<r;h++){const g=t.charCodeAt(h);let p=g,b=!1;if(g>=55296&&g<=56319&&h+1<r){const x=t.charCodeAt(h+1);x>=56320&&x<=57343&&(p=(g-55296<<10)+65536|x-56320,b=!0)}a&&(o[h]=d,b&&(o[h+1]=d),p<=127?u[d+0]=h:p<=2047?(u[d+0]=h,u[d+1]=h):p<=65535?(u[d+0]=h,u[d+1]=h,u[d+2]=h):(u[d+0]=h,u[d+1]=h,u[d+2]=h,u[d+3]=h)),p<=127?f[d++]=p:p<=2047?(f[d++]=192|(p&1984)>>>6,f[d++]=128|(p&63)>>>0):p<=65535?(f[d++]=224|(p&61440)>>>12,f[d++]=128|(p&4032)>>>6,f[d++]=128|(p&63)>>>0):(f[d++]=240|(p&1835008)>>>18,f[d++]=128|(p&258048)>>>12,f[d++]=128|(p&4032)>>>6,f[d++]=128|(p&63)>>>0),b&&h++}this.utf16Length=r,this.utf8Length=l,this.utf16Value=t,this.utf8Value=f,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=u}static _utf8ByteLength(t){let r=0;for(let l=0,a=t.length;l<a;l++){const o=t.charCodeAt(l);let u=o,f=!1;if(o>=55296&&o<=56319&&l+1<a){const d=t.charCodeAt(l+1);d>=56320&&d<=57343&&(u=(o-55296<<10)+65536|d-56320,f=!0)}u<=127?r+=1:u<=2047?r+=2:u<=65535?r+=3:r+=4,f&&l++}return r}createString(t){const r=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,r),r}}const Au=class Kn{constructor(t){if(kt(this,"id",++Kn.LAST_ID),kt(this,"_onigBinding"),kt(this,"content"),kt(this,"utf16Length"),kt(this,"utf8Length"),kt(this,"utf16OffsetToUtf8"),kt(this,"utf8OffsetToUtf16"),kt(this,"ptr"),!jt)throw new am("Must invoke loadWasm first.");this._onigBinding=jt,this.content=t;const r=new ku(t);this.utf16Length=r.utf16Length,this.utf8Length=r.utf8Length,this.utf16OffsetToUtf8=r.utf16OffsetToUtf8,this.utf8OffsetToUtf16=r.utf8OffsetToUtf16,this.utf8Length<1e4&&!Kn._sharedPtrInUse?(Kn._sharedPtr||(Kn._sharedPtr=jt.omalloc(1e4)),Kn._sharedPtrInUse=!0,jt.HEAPU8.set(r.utf8Value,Kn._sharedPtr),this.ptr=Kn._sharedPtr):this.ptr=r.createString(jt)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Kn._sharedPtr?Kn._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};kt(Au,"LAST_ID",0);kt(Au,"_sharedPtr",0);kt(Au,"_sharedPtrInUse",!1);let I1=Au;class _D{constructor(t){if(kt(this,"_onigBinding"),kt(this,"_ptr"),!jt)throw new am("Must invoke loadWasm first.");const r=[],l=[];for(let f=0,d=t.length;f<d;f++){const h=new ku(t[f]);r[f]=h.createString(jt),l[f]=h.utf8Length}const a=jt.omalloc(4*t.length);jt.HEAPU32.set(r,a/4);const o=jt.omalloc(4*t.length);jt.HEAPU32.set(l,o/4);const u=jt.createOnigScanner(a,o,t.length);for(let f=0,d=t.length;f<d;f++)jt.ofree(r[f]);jt.ofree(o),jt.ofree(a),u===0&&vD(jt),this._onigBinding=jt,this._ptr=u}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,r,l){let a=0;if(typeof l=="number"&&(a=l),typeof t=="string"){t=new I1(t);const o=this._findNextMatchSync(t,r,!1,a);return t.dispose(),o}return this._findNextMatchSync(t,r,!1,a)}_findNextMatchSync(t,r,l,a){const o=this._onigBinding,u=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(r),a);if(u===0)return null;const f=o.HEAPU32;let d=u/4;const h=f[d++],g=f[d++],p=[];for(let b=0;b<g;b++){const x=t.convertUtf8OffsetToUtf16(f[d++]),w=t.convertUtf8OffsetToUtf16(f[d++]);p[b]={start:x,end:w,length:w-x}}return{index:h,captureIndices:p}}}function wD(e){return typeof e.instantiator=="function"}function SD(e){return typeof e.default=="function"}function ED(e){return typeof e.data<"u"}function CD(e){return typeof Response<"u"&&e instanceof Response}function kD(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let zo;function sm(e){if(zo)return zo;async function t(){jt=await yD(async r=>{let l=e;return l=await l,typeof l=="function"&&(l=await l(r)),typeof l=="function"&&(l=await l(r)),wD(l)?l=await l.instantiator(r):SD(l)?l=await l.default(r):(ED(l)&&(l=l.data),CD(l)?typeof WebAssembly.instantiateStreaming=="function"?l=await AD(l)(r):l=await TD(l)(r):kD(l)?l=await Cd(l)(r):l instanceof WebAssembly.Module?l=await Cd(l)(r):"default"in l&&l.default instanceof WebAssembly.Module&&(l=await Cd(l.default)(r))),"instance"in l&&(l=l.instance),"exports"in l&&(l=l.exports),l})}return zo=t(),zo}function Cd(e){return t=>WebAssembly.instantiate(e,t)}function AD(e){return t=>WebAssembly.instantiateStreaming(e,t)}function TD(e){return async t=>{const r=await e.arrayBuffer();return WebAssembly.instantiate(r,t)}}let P1;function RD(e){P1=e}function LD(){return P1}async function B1(e){return e&&await sm(e),{createScanner(t){return new _D(t.map(r=>typeof r=="string"?r:r.source))},createString(t){return new I1(t)}}}const OD=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:B1,getDefaultWasmLoader:LD,loadWasm:sm,setDefaultWasmLoader:RD},Symbol.toStringTag,{value:"Module"}));var U1=em({});z1(U1,OD);var it=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function ND(e){return om(e)}function om(e){return Array.isArray(e)?DD(e):e instanceof RegExp?e:typeof e=="object"?MD(e):e}function DD(e){let t=[];for(let r=0,l=e.length;r<l;r++)t[r]=om(e[r]);return t}function MD(e){let t={};for(let r in e)t[r]=om(e[r]);return t}function V1(e,...t){return t.forEach(r=>{for(let l in r)e[l]=r[l]}),e}function H1(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?H1(e.substring(0,e.length-1)):e.substr(~t+1)}var kd=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Io=class{static hasCaptures(e){return e===null?!1:(kd.lastIndex=0,kd.test(e))}static replaceCaptures(e,t,r){return e.replace(kd,(l,a,o,u)=>{let f=r[parseInt(a||o,10)];if(f){let d=t.substring(f.start,f.end);for(;d[0]===".";)d=d.substring(1);switch(u){case"downcase":return d.toLowerCase();case"upcase":return d.toUpperCase();default:return d}}else return l})}};function G1(e,t){return e<t?-1:e>t?1:0}function F1(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let r=e.length,l=t.length;if(r===l){for(let a=0;a<r;a++){let o=G1(e[a],t[a]);if(o!==0)return o}return 0}return r-l}function F0(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function q1(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var $1=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},lu=class{constructor(e,t,r){this._colorMap=e,this._defaults=t,this._root=r}static createFromRawTheme(e,t){return this.createFromParsedTheme(ID(e),t)}static createFromParsedTheme(e,t){return BD(e,t)}_cachedMatchRoot=new $1(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,l=this._cachedMatchRoot.get(t).find(a=>jD(e.parent,a.parentScopes));return l?new Q1(l.fontStyle,l.foreground,l.background):null}},Ad=class qo{constructor(t,r){this.parent=t,this.scopeName=r}static push(t,r){for(const l of r)t=new qo(t,l);return t}static from(...t){let r=null;for(let l=0;l<t.length;l++)r=new qo(r,t[l]);return r}push(t){return new qo(this,t)}getSegments(){let t=this;const r=[];for(;t;)r.push(t.scopeName),t=t.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const r=[];let l=this;for(;l&&l!==t;)r.push(l.scopeName),l=l.parent;return l===t?r.reverse():void 0}};function jD(e,t){if(t.length===0)return!0;for(let r=0;r<t.length;r++){let l=t[r],a=!1;if(l===">"){if(r===t.length-1)return!1;l=t[++r],a=!0}for(;e&&!zD(e.scopeName,l);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function zD(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Q1=class{constructor(e,t,r){this.fontStyle=e,this.foregroundId=t,this.backgroundId=r}};function ID(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,r=[],l=0;for(let a=0,o=t.length;a<o;a++){let u=t[a];if(!u.settings)continue;let f;if(typeof u.scope=="string"){let p=u.scope;p=p.replace(/^[,]+/,""),p=p.replace(/[,]+$/,""),f=p.split(",")}else Array.isArray(u.scope)?f=u.scope:f=[""];let d=-1;if(typeof u.settings.fontStyle=="string"){d=0;let p=u.settings.fontStyle.split(" ");for(let b=0,x=p.length;b<x;b++)switch(p[b]){case"italic":d=d|1;break;case"bold":d=d|2;break;case"underline":d=d|4;break;case"strikethrough":d=d|8;break}}let h=null;typeof u.settings.foreground=="string"&&F0(u.settings.foreground)&&(h=u.settings.foreground);let g=null;typeof u.settings.background=="string"&&F0(u.settings.background)&&(g=u.settings.background);for(let p=0,b=f.length;p<b;p++){let w=f[p].trim().split(" "),E=w[w.length-1],R=null;w.length>1&&(R=w.slice(0,w.length-1),R.reverse()),r[l++]=new PD(E,R,a,d,h,g)}}return r}var PD=class{constructor(e,t,r,l,a,o){this.scope=e,this.parentScopes=t,this.index=r,this.fontStyle=l,this.foreground=a,this.background=o}},qt=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(qt||{});function BD(e,t){e.sort((d,h)=>{let g=G1(d.scope,h.scope);return g!==0||(g=F1(d.parentScopes,h.parentScopes),g!==0)?g:d.index-h.index});let r=0,l="#000000",a="#ffffff";for(;e.length>=1&&e[0].scope==="";){let d=e.shift();d.fontStyle!==-1&&(r=d.fontStyle),d.foreground!==null&&(l=d.foreground),d.background!==null&&(a=d.background)}let o=new UD(t),u=new Q1(r,o.getId(l),o.getId(a)),f=new HD(new sh(0,null,-1,0,0),[]);for(let d=0,h=e.length;d<h;d++){let g=e[d];f.insert(0,g.scope,g.parentScopes,g.fontStyle,o.getId(g.foreground),o.getId(g.background))}return new lu(o,u,f)}var UD=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,r=e.length;t<r;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},VD=Object.freeze([]),sh=class Y1{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,r,l,a,o){this.scopeDepth=t,this.parentScopes=r||VD,this.fontStyle=l,this.foreground=a,this.background=o}clone(){return new Y1(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let r=[];for(let l=0,a=t.length;l<a;l++)r[l]=t[l].clone();return r}acceptOverwrite(t,r,l,a){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,r!==-1&&(this.fontStyle=r),l!==0&&(this.foreground=l),a!==0&&(this.background=a)}},HD=class oh{constructor(t,r=[],l={}){this._mainRule=t,this._children=l,this._rulesWithParentScopes=r}_rulesWithParentScopes;static _cmpBySpecificity(t,r){if(t.scopeDepth!==r.scopeDepth)return r.scopeDepth-t.scopeDepth;let l=0,a=0;for(;t.parentScopes[l]===">"&&l++,r.parentScopes[a]===">"&&a++,!(l>=t.parentScopes.length||a>=r.parentScopes.length);){const o=r.parentScopes[a].length-t.parentScopes[l].length;if(o!==0)return o;l++,a++}return r.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let l=t.indexOf("."),a,o;if(l===-1?(a=t,o=""):(a=t.substring(0,l),o=t.substring(l+1)),this._children.hasOwnProperty(a))return this._children[a].match(o)}const r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(oh._cmpBySpecificity),r}insert(t,r,l,a,o,u){if(r===""){this._doInsertHere(t,l,a,o,u);return}let f=r.indexOf("."),d,h;f===-1?(d=r,h=""):(d=r.substring(0,f),h=r.substring(f+1));let g;this._children.hasOwnProperty(d)?g=this._children[d]:(g=new oh(this._mainRule.clone(),sh.cloneArr(this._rulesWithParentScopes)),this._children[d]=g),g.insert(t+1,h,l,a,o,u)}_doInsertHere(t,r,l,a,o){if(r===null){this._mainRule.acceptOverwrite(t,l,a,o);return}for(let u=0,f=this._rulesWithParentScopes.length;u<f;u++){let d=this._rulesWithParentScopes[u];if(F1(d.parentScopes,r)===0){d.acceptOverwrite(t,l,a,o);return}}l===-1&&(l=this._mainRule.fontStyle),a===0&&(a=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new sh(t,r,l,a,o))}},Pl=class Ln{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const r=Ln.getLanguageId(t),l=Ln.getTokenType(t),a=Ln.getFontStyle(t),o=Ln.getForeground(t),u=Ln.getBackground(t);console.log({languageId:r,tokenType:l,fontStyle:a,foreground:o,background:u})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,r,l,a,o,u,f){let d=Ln.getLanguageId(t),h=Ln.getTokenType(t),g=Ln.containsBalancedBrackets(t)?1:0,p=Ln.getFontStyle(t),b=Ln.getForeground(t),x=Ln.getBackground(t);return r!==0&&(d=r),l!==8&&(h=l),a!==null&&(g=a?1:0),o!==-1&&(p=o),u!==0&&(b=u),f!==0&&(x=f),(d<<0|h<<8|g<<10|p<<11|b<<15|x<<24)>>>0}};function au(e,t){const r=[],l=GD(e);let a=l.next();for(;a!==null;){let d=0;if(a.length===2&&a.charAt(1)===":"){switch(a.charAt(0)){case"R":d=1;break;case"L":d=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=l.next()}let h=u();if(r.push({matcher:h,priority:d}),a!==",")break;a=l.next()}return r;function o(){if(a==="-"){a=l.next();const d=o();return h=>!!d&&!d(h)}if(a==="("){a=l.next();const d=f();return a===")"&&(a=l.next()),d}if(q0(a)){const d=[];do d.push(a),a=l.next();while(q0(a));return h=>t(d,h)}return null}function u(){const d=[];let h=o();for(;h;)d.push(h),h=o();return g=>d.every(p=>p(g))}function f(){const d=[];let h=u();for(;h&&(d.push(h),a==="|"||a===",");){do a=l.next();while(a==="|"||a===",");h=u()}return g=>d.some(p=>p(g))}}function q0(e){return!!e&&!!e.match(/[\w\.:]+/)}function GD(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=t.exec(e);return{next:()=>{if(!r)return null;const l=r[0];return r=t.exec(e),l}}}function X1(e){typeof e.dispose=="function"&&e.dispose()}var Wa=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},FD=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},qD=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},$D=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Wa(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new qD;for(const r of e)QD(r,this.initialScopeName,this.repo,t);for(const r of t.references)if(r instanceof Wa){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function QD(e,t,r,l){const a=r.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=r.lookup(t);e instanceof Wa?$o({baseGrammar:o,selfGrammar:a},l):uh(e.ruleName,{baseGrammar:o,selfGrammar:a,repository:a.repository},l);const u=r.injections(e.scopeName);if(u)for(const f of u)l.add(new Wa(f))}function uh(e,t,r){if(t.repository&&t.repository[e]){const l=t.repository[e];su([l],t,r)}}function $o(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&su(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&su(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function su(e,t,r){for(const l of e){if(r.visitedRule.has(l))continue;r.visitedRule.add(l);const a=l.repository?V1({},t.repository,l.repository):t.repository;Array.isArray(l.patterns)&&su(l.patterns,{...t,repository:a},r);const o=l.include;if(!o)continue;const u=K1(o);switch(u.kind){case 0:$o({...t,selfGrammar:t.baseGrammar},r);break;case 1:$o(t,r);break;case 2:uh(u.ruleName,{...t,repository:a},r);break;case 3:case 4:const f=u.scopeName===t.selfGrammar.scopeName?t.selfGrammar:u.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(f){const d={baseGrammar:t.baseGrammar,selfGrammar:f,repository:a};u.kind===4?uh(u.ruleName,d,r):$o(d,r)}else u.kind===4?r.add(new FD(u.scopeName,u.ruleName)):r.add(new Wa(u.scopeName));break}}}var YD=class{kind=0},XD=class{kind=1},KD=class{constructor(e){this.ruleName=e}kind=2},ZD=class{constructor(e){this.scopeName=e}kind=3},JD=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function K1(e){if(e==="$base")return new YD;if(e==="$self")return new XD;const t=e.indexOf("#");if(t===-1)return new ZD(e);if(t===0)return new KD(e.substring(1));{const r=e.substring(0,t),l=e.substring(t+1);return new JD(r,l)}}var WD=/\\(\d+)/,$0=/\\(\d+)/g,e5=-1,Z1=-2;var fs=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,r,l){this.$location=e,this.id=t,this._name=r||null,this._nameIsCapturing=Io.hasCaptures(this._name),this._contentName=l||null,this._contentNameIsCapturing=Io.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${H1(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Io.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Io.replaceCaptures(this._contentName,e,t)}},t5=class extends fs{retokenizeCapturedWithRuleId;constructor(e,t,r,l,a){super(e,t,r,l),this.retokenizeCapturedWithRuleId=a}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,r,l){throw new Error("Not supported!")}},n5=class extends fs{_match;captures;_cachedCompiledPatterns;constructor(e,t,r,l,a){super(e,t,r,null),this._match=new es(l,this.id),this.captures=a,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,l){return this._getCachedCompiledPatterns(e).compileAG(e,r,l)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ts,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Q0=class extends fs{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,l,a){super(e,t,r,l),this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const r of this.patterns)e.getRule(r).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,l){return this._getCachedCompiledPatterns(e).compileAG(e,r,l)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ts,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ch=class extends fs{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,l,a,o,u,f,d,h){super(e,t,r,l),this._begin=new es(a,this.id),this.beginCaptures=o,this._end=new es(u||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=f,this.applyEndPatternLast=d||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,r,l){return this._getCachedCompiledPatterns(e,t).compileAG(e,r,l)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ts;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},ou=class extends fs{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,r,l,a,o,u,f,d){super(e,t,r,l),this._begin=new es(a,this.id),this.beginCaptures=o,this.whileCaptures=f,this._while=new es(u,Z1),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=d.patterns,this.hasMissingPatterns=d.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,l){return this._getCachedCompiledPatterns(e).compileAG(e,r,l)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ts;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,r,l){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,r,l)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ts,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},J1=class Ft{static createCaptureRule(t,r,l,a,o){return t.registerRule(u=>new t5(r,u,l,a,o))}static getCompiledRuleId(t,r,l){return t.id||r.registerRule(a=>{if(t.id=a,t.match)return new n5(t.$vscodeTextmateLocation,t.id,t.name,t.match,Ft._compileCaptures(t.captures,r,l));if(typeof t.begin>"u"){t.repository&&(l=V1({},l,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Q0(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Ft._compilePatterns(o,r,l))}return t.while?new ou(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ft._compileCaptures(t.beginCaptures||t.captures,r,l),t.while,Ft._compileCaptures(t.whileCaptures||t.captures,r,l),Ft._compilePatterns(t.patterns,r,l)):new ch(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ft._compileCaptures(t.beginCaptures||t.captures,r,l),t.end,Ft._compileCaptures(t.endCaptures||t.captures,r,l),t.applyEndPatternLast,Ft._compilePatterns(t.patterns,r,l))}),t.id}static _compileCaptures(t,r,l){let a=[];if(t){let o=0;for(const u in t){if(u==="$vscodeTextmateLocation")continue;const f=parseInt(u,10);f>o&&(o=f)}for(let u=0;u<=o;u++)a[u]=null;for(const u in t){if(u==="$vscodeTextmateLocation")continue;const f=parseInt(u,10);let d=0;t[u].patterns&&(d=Ft.getCompiledRuleId(t[u],r,l)),a[f]=Ft.createCaptureRule(r,t[u].$vscodeTextmateLocation,t[u].name,t[u].contentName,d)}}return a}static _compilePatterns(t,r,l){let a=[];if(t)for(let o=0,u=t.length;o<u;o++){const f=t[o];let d=-1;if(f.include){const h=K1(f.include);switch(h.kind){case 0:case 1:d=Ft.getCompiledRuleId(l[f.include],r,l);break;case 2:let g=l[h.ruleName];g&&(d=Ft.getCompiledRuleId(g,r,l));break;case 3:case 4:const p=h.scopeName,b=h.kind===4?h.ruleName:null,x=r.getExternalGrammar(p,l);if(x)if(b){let w=x.repository[b];w&&(d=Ft.getCompiledRuleId(w,r,x.repository))}else d=Ft.getCompiledRuleId(x.repository.$self,r,x.repository);break}}else d=Ft.getCompiledRuleId(f,r,l);if(d!==-1){const h=r.getRule(d);let g=!1;if((h instanceof Q0||h instanceof ch||h instanceof ou)&&h.hasMissingPatterns&&h.patterns.length===0&&(g=!0),g)continue;a.push(d)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},es=class W1{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,r){if(t&&typeof t=="string"){const l=t.length;let a=0,o=[],u=!1;for(let f=0;f<l;f++)if(t.charAt(f)==="\\"&&f+1<l){const h=t.charAt(f+1);h==="z"?(o.push(t.substring(a,f)),o.push("$(?!\\n)(?<!\\n)"),a=f+2):(h==="A"||h==="G")&&(u=!0),f++}this.hasAnchor=u,a===0?this.source=t:(o.push(t.substring(a,l)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=r,typeof this.source=="string"?this.hasBackReferences=WD.test(this.source):this.hasBackReferences=!1}clone(){return new W1(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let l=r.map(a=>t.substring(a.start,a.end));return $0.lastIndex=0,this.source.replace($0,(a,o)=>q1(l[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],r=[],l=[],a=[],o,u,f,d;for(o=0,u=this.source.length;o<u;o++)f=this.source.charAt(o),t[o]=f,r[o]=f,l[o]=f,a[o]=f,f==="\\"&&o+1<u&&(d=this.source.charAt(o+1),d==="A"?(t[o+1]="",r[o+1]="",l[o+1]="A",a[o+1]="A"):d==="G"?(t[o+1]="",r[o+1]="G",l[o+1]="",a[o+1]="G"):(t[o+1]=d,r[o+1]=d,l[o+1]=d,a[o+1]=d),o++);return{A0_G0:t.join(""),A0_G1:r.join(""),A1_G0:l.join(""),A1_G1:a.join("")}}resolveAnchors(t,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ts=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(r=>r.source);this._cached=new Y0(e,t,this._items.map(r=>r.ruleId))}return this._cached}compileAG(e,t,r){return this._hasAnchors?t?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,r){let l=this._items.map(a=>a.resolveAnchors(t,r));return new Y0(e,l,this._items.map(a=>a.ruleId))}},Y0=class{constructor(e,t,r){this.regExps=t,this.rules=r,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,r=this.rules.length;t<r;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
48
|
-
`)}findNextMatchSync(e,t,r){const l=this.scanner.findNextMatchSync(e,t,r);return l?{ruleId:this.rules[l.index],captureIndices:l.captureIndices}:null}},Td=class{constructor(e,t){this.languageId=e,this.tokenType=t}},
|
|
49
|
-
`;const o=this.createOnigString(e),u=o.content.length,f=new p5(r,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=e_(this,o,a,0,t,f,!0,l);return X1(o),{lineLength:u,lineTokens:f,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function Z0(e,t){return e=ND(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Qa=class Zn{constructor(t,r,l){this.parent=t,this.scopePath=r,this.tokenAttributes=l}static fromExtension(t,r){let l=t,a=t?.scopePath??null;for(const o of r)a=Ad.push(a,o.scopeNames),l=new Zn(l,a,o.encodedTokenAttributes);return l}static createRoot(t,r){return new Zn(null,new Ad(null,t),r)}static createRootAndLookUpScopeName(t,r,l){const a=l.getMetadataForScope(t),o=new Ad(null,t),u=l.themeProvider.themeMatch(o),f=Zn.mergeAttributes(r,a,u);return new Zn(null,o,f)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Zn.equals(this,t)}static equals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.scopeName!==r.scopeName||t.tokenAttributes!==r.tokenAttributes)return!1;t=t.parent,r=r.parent}while(!0)}static mergeAttributes(t,r,l){let a=-1,o=0,u=0;return l!==null&&(a=l.fontStyle,o=l.foregroundId,u=l.backgroundId),Pl.set(t,r.languageId,r.tokenType,null,a,o,u)}pushAttributed(t,r){if(t===null)return this;if(t.indexOf(" ")===-1)return Zn._pushAttributed(this,t,r);const l=t.split(/ /g);let a=this;for(const o of l)a=Zn._pushAttributed(a,o,r);return a}static _pushAttributed(t,r,l){const a=l.getMetadataForScope(r),o=t.scopePath.push(r),u=l.themeProvider.themeMatch(o),f=Zn.mergeAttributes(t.tokenAttributes,a,u);return new Zn(t,o,f)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const r=[];let l=this;for(;l&&l!==t;)r.push({encodedTokenAttributes:l.tokenAttributes,scopeNames:l.scopePath.getExtensionIfDefined(l.parent?.scopePath??null)}),l=l.parent;return l===t?r.reverse():void 0}},dh=class Li{constructor(t,r,l,a,o,u,f,d){this.parent=t,this.ruleId=r,this.beginRuleCapturedEOL=o,this.endRule=u,this.nameScopesList=f,this.contentNameScopesList=d,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=l,this._anchorPos=a}_stackElementBrand=void 0;static NULL=new Li(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Li._equals(this,t)}static _equals(t,r){return t===r?!0:this._structuralEquals(t,r)?Qa.equals(t.contentNameScopesList,r.contentNameScopesList):!1}static _structuralEquals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.depth!==r.depth||t.ruleId!==r.ruleId||t.endRule!==r.endRule)return!1;t=t.parent,r=r.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Li._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,r,l,a,o,u,f){return new Li(this,t,r,l,a,o,u,f)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,r){return this.parent&&(r=this.parent._writeString(t,r)),t[r++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,r}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Li(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let r=this;for(;r&&r._enterPos===t._enterPos;){if(r.ruleId===t.ruleId)return!0;r=r.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,r){const l=Qa.fromExtension(t?.nameScopesList??null,r.nameScopesList);return new Li(t,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,l,Qa.fromExtension(l,r.contentNameScopesList))}},m5=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(r=>r==="*"?(this.allowAny=!0,[]):au(r,uu).map(l=>l.matcher)),this.unbalancedBracketScopes=t.flatMap(r=>au(r,uu).map(l=>l.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},p5=class{constructor(e,t,r,l){this.balancedBracketSelectors=l,this._emitBinaryTokens=e,this._tokenTypeOverrides=r,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let l=e?.tokenAttributes??0,a=!1;if(this.balancedBracketSelectors?.matchesAlways&&(a=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=e?.getScopeNames()??[];for(const u of this._tokenTypeOverrides)u.matcher(o)&&(l=Pl.set(l,0,u.type,null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(o))}if(a&&(l=Pl.set(l,0,8,a,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===l){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(l),this._lastTokenEndIndex=t;return}const r=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:r}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const r=new Uint32Array(this._binaryTokens.length);for(let l=0,a=this._binaryTokens.length;l<a;l++)r[l]=this._binaryTokens[l];return r}},g5=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,r,l,a){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,f5(e,o,t,r,l,a,this,this._onigLib))}return this._grammars.get(e)}},y5=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new g5(lu.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,r){this._syncRegistry.setTheme(lu.createFromRawTheme(t,r))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,r,l){return this.loadGrammarWithConfiguration(t,r,{embeddedLanguages:l})}loadGrammarWithConfiguration(t,r,l){return this._loadGrammar(t,r,l.embeddedLanguages,l.tokenTypes,new m5(l.balancedBracketSelectors||[],l.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,r,l,a,o){const u=new $D(this._syncRegistry,t);for(;u.Q.length>0;)u.Q.map(f=>this._loadSingleGrammar(f.scopeName)),u.processQueue();return this._grammarForScopeName(t,r,l,a,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const r=this._options.loadGrammar(t);if(r){const l=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(r,l)}}addGrammar(t,r=[],l=0,a=null){return this._syncRegistry.addGrammar(t,r),this._grammarForScopeName(t.scopeName,l,a)}_grammarForScopeName(t,r=0,l=null,a=null,o=null){return this._syncRegistry.grammarForScopeName(t,r,l,a,o)}},hh=dh.NULL;function cu(e,t){const r=typeof e=="string"?{}:{...e.colorReplacements},l=typeof e=="string"?e:e.name;for(const[a,o]of Object.entries(t?.colorReplacements||{}))typeof o=="string"?r[a]=o:a===l&&Object.assign(r,o);return r}function ai(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function b5(e){return Array.isArray(e)?e:[e]}async function n_(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Tu(e){return!e||["plaintext","txt","text","plain"].includes(e)}function r_(e){return e==="ansi"||Tu(e)}function Ru(e){return e==="none"}function i_(e){return Ru(e)}function Lu(e,t=!1){if(e.length===0)return[["",0]];const r=e.split(/(\r?\n)/g);let l=0;const a=[];for(let o=0;o<r.length;o+=2){const u=t?r[o]+(r[o+1]||""):r[o];a.push([u,l]),l+=r[o].length,l+=r[o+1]?.length||0}return a}const J0={light:"#333333",dark:"#bbbbbb"},W0={light:"#fffffe",dark:"#1e1e1e"},ex="__shiki_resolved";function um(e){if(e?.[ex])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:r,fg:l}=t;if(!r||!l){const f=t.settings?t.settings.find(d=>!d.name&&!d.scope):void 0;f?.settings?.foreground&&(l=f.settings.foreground),f?.settings?.background&&(r=f.settings.background),!l&&t?.colors?.["editor.foreground"]&&(l=t.colors["editor.foreground"]),!r&&t?.colors?.["editor.background"]&&(r=t.colors["editor.background"]),l||(l=t.type==="light"?J0.light:J0.dark),r||(r=t.type==="light"?W0.light:W0.dark),t.fg=l,t.bg=r}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let a=0;const o=new Map;function u(f){if(o.has(f))return o.get(f);a+=1;const d=`#${a.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${d}`]?u(f):(o.set(f,d),d)}t.settings=t.settings.map(f=>{const d=f.settings?.foreground&&!f.settings.foreground.startsWith("#"),h=f.settings?.background&&!f.settings.background.startsWith("#");if(!d&&!h)return f;const g={...f,settings:{...f.settings}};if(d){const p=u(f.settings.foreground);t.colorReplacements[p]=f.settings.foreground,g.settings.foreground=p}if(h){const p=u(f.settings.background);t.colorReplacements[p]=f.settings.background,g.settings.background=p}return g});for(const f of Object.keys(t.colors||{}))if((f==="editor.foreground"||f==="editor.background"||f.startsWith("terminal.ansi"))&&!t.colors[f]?.startsWith("#")){const d=u(t.colors[f]);t.colorReplacements[d]=t.colors[f],t.colors[f]=d}return Object.defineProperty(t,ex,{enumerable:!1,writable:!1,value:!0}),t}async function l_(e){return Array.from(new Set((await Promise.all(e.filter(t=>!r_(t)).map(async t=>await n_(t).then(r=>Array.isArray(r)?r:[r])))).flat()))}async function a_(e){return(await Promise.all(e.map(async t=>i_(t)?null:um(await n_(t))))).filter(t=>!!t)}function s_(e,t){if(!t)return e;if(t[e]){const r=new Set([e]);for(;t[e];){if(e=t[e],r.has(e))throw new it(`Circular alias \`${Array.from(r).join(" -> ")} -> ${e}\``);r.add(e)}}return e}var x5=class extends y5{_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,r,l={}){super(e),this._resolver=e,this._themes=t,this._langs=r,this._alias=l,this._themes.map(a=>this.loadTheme(a)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=um(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=lu.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=s_(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(a=>a.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const r={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const l=this.loadGrammarWithConfiguration(e.scopeName,1,r);if(l.name=e.name,this._resolvedGrammars.set(e.name,l),e.aliases&&e.aliases.forEach(a=>{this._alias[a]=e.name}),this._loadedLanguagesCache=null,t.size)for(const a of t)this._resolvedGrammars.delete(a.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(a.scopeName),this._syncRegistry?._grammars?.delete(a.scopeName),this.loadLanguage(this._langMap.get(a.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const l of e)this.resolveEmbeddedLanguages(l);const t=Array.from(this._langGraph.entries()),r=t.filter(([l,a])=>!a);if(r.length){const l=t.filter(([a,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(u=>r.map(([f])=>f).includes(u)):!1).filter(a=>!r.includes(a));throw new it(`Missing languages ${r.map(([a])=>`\`${a}\``).join(", ")}, required by ${l.map(([a])=>`\`${a}\``).join(", ")}`)}for(const[l,a]of t)this._resolver.addLanguage(a);for(const[l,a]of t)this.loadLanguage(a)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const r of t)this._langGraph.set(r,this._langMap.get(r))}},v5=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:r=>e.createScanner(r),createOnigString:r=>e.createString(r)},t.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let r=[];for(let l=1;l<=t.length;l++){const a=t.slice(0,l).join(".");r=[...r,...this._injections.get(a)||[]]}return r}};let Ha=0;function _5(e){Ha+=1,e.warnings!==!1&&Ha>=10&&Ha%10===0&&console.warn(`[Shiki] ${Ha} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new it("`engine` option is required for synchronous mode");const r=(e.langs||[]).flat(1),l=(e.themes||[]).flat(1).map(um),a=new x5(new v5(e.engine,r),l,r,e.langAlias);let o;function u(L){return s_(L,e.langAlias)}function f(L){R();const O=a.getGrammar(typeof L=="string"?L:L.name);if(!O)throw new it(`Language \`${L}\` not found, you may need to load it first`);return O}function d(L){if(L==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};R();const O=a.getTheme(L);if(!O)throw new it(`Theme \`${L}\` not found, you may need to load it first`);return O}function h(L){R();const O=d(L);return o!==L&&(a.setTheme(O),o=L),{theme:O,colorMap:a.getColorMap()}}function g(){return R(),a.getLoadedThemes()}function p(){return R(),a.getLoadedLanguages()}function b(...L){R(),a.loadLanguages(L.flat(1))}async function x(...L){return b(await l_(L))}function w(...L){R();for(const O of L.flat(1))a.loadTheme(O)}async function E(...L){return R(),w(await a_(L))}function R(){if(t)throw new it("Shiki instance has been disposed")}function C(){t||(t=!0,a.dispose(),Ha-=1)}return{setTheme:h,getTheme:d,getLanguage:f,getLoadedThemes:g,getLoadedLanguages:p,resolveLangAlias:u,loadLanguage:x,loadLanguageSync:b,loadTheme:E,loadThemeSync:w,dispose:C,[Symbol.dispose]:C}}async function w5(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,r,l]=await Promise.all([a_(e.themes||[]),l_(e.langs||[]),e.engine]);return _5({...e,themes:t,langs:r,engine:l})}const o_=new WeakMap;function Ou(e,t){o_.set(e,t)}function ns(e){return o_.get(e)}var Nu=class u_{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,r){return new u_(Object.fromEntries(b5(r).map(l=>[l,hh])),t)}constructor(...t){if(t.length===2){const[r,l]=t;this.lang=l,this._stacks=r}else{const[r,l,a]=t;this.lang=l,this._stacks={[a]:r}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return S5(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function S5(e){const t=[],r=new Set;function l(a){if(r.has(a))return;r.add(a);const o=a?.nameScopesList?.scopeName;o&&t.push(o),a.parent&&l(a.parent)}return l(e),t}function E5(e,t){if(!(e instanceof Nu))throw new it("Invalid grammar state");return e.getInternalStack(t)}function c_(e,t,r={}){const{theme:l=e.getLoadedThemes()[0]}=r;if(Tu(e.resolveLangAlias(r.lang||"text"))||Ru(l))return Lu(t).map(f=>[{content:f[0],offset:f[1]}]);const{theme:a,colorMap:o}=e.setTheme(l),u=e.getLanguage(r.lang||"text");if(r.grammarState){if(r.grammarState.lang!==u.name)throw new it(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${u.name}"`);if(!r.grammarState.themes.includes(a.name))throw new it(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return k5(t,u,a,o,r)}function C5(...e){if(e.length===2)return ns(e[1]);const[t,r,l={}]=e,{lang:a="text",theme:o=t.getLoadedThemes()[0]}=l;if(Tu(a)||Ru(o))throw new it("Plain language does not have grammar state");if(a==="ansi")throw new it("ANSI language does not have grammar state");const{theme:u,colorMap:f}=t.setTheme(o),d=t.getLanguage(a);return new Nu(cm(r,d,u,f,l).stateStack,d.name,u.name)}function k5(e,t,r,l,a){const o=cm(e,t,r,l,a),u=new Nu(o.stateStack,t.name,r.name);return Ou(o.tokens,u),o.tokens}function cm(e,t,r,l,a){const o=cu(r,a),{tokenizeMaxLineLength:u=0,tokenizeTimeLimit:f=500}=a,d=Lu(e);let h=a.grammarState?E5(a.grammarState,r.name)??hh:a.grammarContextCode!=null?cm(a.grammarContextCode,t,r,l,{...a,grammarState:void 0,grammarContextCode:void 0}).stateStack:hh,g=[];const p=[];for(let b=0,x=d.length;b<x;b++){const[w,E]=d[b];if(w===""){g=[],p.push([]);continue}if(u>0&&w.length>=u){g=[],p.push([{content:w,offset:E,color:"",fontStyle:0}]);continue}let R,C,L;a.includeExplanation&&(R=t.tokenizeLine(w,h,f),C=R.tokens,L=0);const O=t.tokenizeLine2(w,h,f),B=O.tokens.length/2;for(let Y=0;Y<B;Y++){const j=O.tokens[2*Y],q=Y+1<B?O.tokens[2*Y+2]:w.length;if(j===q)continue;const G=O.tokens[2*Y+1],oe=ai(l[Pl.getForeground(G)],o),P=Pl.getFontStyle(G),X={content:w.substring(j,q),offset:E+j,color:oe,fontStyle:P};if(a.includeExplanation){const te=[];if(a.includeExplanation!=="scopeName")for(const le of r.settings){let ne;switch(typeof le.scope){case"string":ne=le.scope.split(/,/).map(z=>z.trim());break;case"object":ne=le.scope;break;default:continue}te.push({settings:le,selectors:ne.map(z=>z.split(/ /))})}X.explanation=[];let fe=0;for(;j+fe<q;){const le=C[L],ne=w.substring(le.startIndex,le.endIndex);fe+=ne.length,X.explanation.push({content:ne,scopes:a.includeExplanation==="scopeName"?A5(le.scopes):T5(te,le.scopes)}),L+=1}}g.push(X)}p.push(g),g=[],h=O.ruleStack}return{tokens:p,stateStack:h}}function A5(e){return e.map(t=>({scopeName:t}))}function T5(e,t){const r=[];for(let l=0,a=t.length;l<a;l++){const o=t[l];r[l]={scopeName:o,themeMatches:L5(e,o,t.slice(0,l))}}return r}function tx(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function R5(e,t,r){if(!tx(e[e.length-1],t))return!1;let l=e.length-2,a=r.length-1;for(;l>=0&&a>=0;)tx(e[l],r[a])&&(l-=1),a-=1;return l===-1}function L5(e,t,r){const l=[];for(const{selectors:a,settings:o}of e)for(const u of a)if(R5(u,t,r)){l.push(o);break}return l}function f_(e,t,r,l=c_){const a=Object.entries(r.themes).filter(h=>h[1]).map(h=>({color:h[0],theme:h[1]})),o=a.map(h=>{const g=l(e,t,{...r,theme:h.theme});return{tokens:g,state:ns(g),theme:typeof h.theme=="string"?h.theme:h.theme.name}}),u=O5(...o.map(h=>h.tokens)),f=u[0].map((h,g)=>h.map((p,b)=>{const x={content:p.content,variants:{},offset:p.offset};return"includeExplanation"in r&&r.includeExplanation&&(x.explanation=p.explanation),u.forEach((w,E)=>{const{content:R,explanation:C,offset:L,...O}=w[g][b];x.variants[a[E].color]=O}),x})),d=o[0].state?new Nu(Object.fromEntries(o.map(h=>[h.theme,h.state?.getInternalStack(h.theme)])),o[0].state.lang):void 0;return d&&Ou(f,d),f}function O5(...e){const t=e.map(()=>[]),r=e.length;for(let l=0;l<e[0].length;l++){const a=e.map(d=>d[l]),o=t.map(()=>[]);t.forEach((d,h)=>d.push(o[h]));const u=a.map(()=>0),f=a.map(d=>d[0]);for(;f.every(d=>d);){const d=Math.min(...f.map(h=>h.content.length));for(let h=0;h<r;h++){const g=f[h];g.content.length===d?(o[h].push(g),u[h]+=1,f[h]=a[h][u[h]]):(o[h].push({...g,content:g.content.slice(0,d)}),f[h]={...g,content:g.content.slice(d),offset:g.offset+d})}}}return t}const N5=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],D5=/["&'<>`]/g,M5=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,j5=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,z5=/[|\\{}()[\]^$+*?.]/g,nx=new WeakMap;function I5(e,t){if(e=e.replace(t.subset?P5(t.subset):D5,l),t.subset||t.escapeOnly)return e;return e.replace(M5,r).replace(j5,l);function r(a,o,u){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,u.charCodeAt(o+2),t)}function l(a,o,u){return t.format(a.charCodeAt(0),u.charCodeAt(o+1),t)}}function P5(e){let t=nx.get(e);return t||(t=B5(e),nx.set(e,t)),t}function B5(e){const t=[];let r=-1;for(;++r<e.length;)t.push(e[r].replace(z5,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const U5=/[\dA-Fa-f]/;function V5(e,t,r){const l="&#x"+e.toString(16).toUpperCase();return r&&t&&!U5.test(String.fromCharCode(t))?l:l+";"}const H5=/\d/;function G5(e,t,r){const l="&#"+String(e);return r&&t&&!H5.test(String.fromCharCode(t))?l:l+";"}const F5=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Rd={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},q5=["cent","copy","divide","gt","lt","not","para","times"],d_={}.hasOwnProperty,mh={};let Po;for(Po in Rd)d_.call(Rd,Po)&&(mh[Rd[Po]]=Po);const $5=/[^\dA-Za-z]/;function Q5(e,t,r,l){const a=String.fromCharCode(e);if(d_.call(mh,a)){const o=mh[a],u="&"+o;return r&&F5.includes(o)&&!q5.includes(o)&&(!l||t&&t!==61&&$5.test(String.fromCharCode(t)))?u:u+";"}return""}function Y5(e,t,r){let l=V5(e,t,r.omitOptionalSemicolons),a;if((r.useNamedReferences||r.useShortestReferences)&&(a=Q5(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!a)&&r.useShortestReferences){const o=G5(e,t,r.omitOptionalSemicolons);o.length<l.length&&(l=o)}return a&&(!r.useShortestReferences||a.length<l.length)?a:l}function jl(e,t){return I5(e,Object.assign({format:Y5},t))}const X5=/^>|^->|<!--|-->|--!>|<!-$/g,K5=[">"],Z5=["<",">"];function J5(e,t,r,l){return l.settings.bogusComments?"<?"+jl(e.value,Object.assign({},l.settings.characterReferences,{subset:K5}))+">":"<!--"+e.value.replace(X5,a)+"-->";function a(o){return jl(o,Object.assign({},l.settings.characterReferences,{subset:Z5}))}}function W5(e,t,r,l){return"<!"+(l.settings.upperDoctype?"DOCTYPE":"doctype")+(l.settings.tightDoctype?"":" ")+"html>"}const Rt=m_(1),h_=m_(-1),eM=[];function m_(e){return t;function t(r,l,a){const o=r?r.children:eM;let u=(l||0)+e,f=o[u];if(!a)for(;f&&xu(f);)u+=e,f=o[u];return f}}const tM={}.hasOwnProperty;function p_(e){return t;function t(r,l,a){return tM.call(e,r.tagName)&&e[r.tagName](r,l,a)}}const fm=p_({body:rM,caption:Ld,colgroup:Ld,dd:sM,dt:aM,head:Ld,html:nM,li:lM,optgroup:oM,option:uM,p:iM,rp:rx,rt:rx,tbody:fM,td:ix,tfoot:dM,th:ix,thead:cM,tr:hM});function Ld(e,t,r){const l=Rt(r,t,!0);return!l||l.type!=="comment"&&!(l.type==="text"&&xu(l.value.charAt(0)))}function nM(e,t,r){const l=Rt(r,t);return!l||l.type!=="comment"}function rM(e,t,r){const l=Rt(r,t);return!l||l.type!=="comment"}function iM(e,t,r){const l=Rt(r,t);return l?l.type==="element"&&(l.tagName==="address"||l.tagName==="article"||l.tagName==="aside"||l.tagName==="blockquote"||l.tagName==="details"||l.tagName==="div"||l.tagName==="dl"||l.tagName==="fieldset"||l.tagName==="figcaption"||l.tagName==="figure"||l.tagName==="footer"||l.tagName==="form"||l.tagName==="h1"||l.tagName==="h2"||l.tagName==="h3"||l.tagName==="h4"||l.tagName==="h5"||l.tagName==="h6"||l.tagName==="header"||l.tagName==="hgroup"||l.tagName==="hr"||l.tagName==="main"||l.tagName==="menu"||l.tagName==="nav"||l.tagName==="ol"||l.tagName==="p"||l.tagName==="pre"||l.tagName==="section"||l.tagName==="table"||l.tagName==="ul"):!r||!(r.type==="element"&&(r.tagName==="a"||r.tagName==="audio"||r.tagName==="del"||r.tagName==="ins"||r.tagName==="map"||r.tagName==="noscript"||r.tagName==="video"))}function lM(e,t,r){const l=Rt(r,t);return!l||l.type==="element"&&l.tagName==="li"}function aM(e,t,r){const l=Rt(r,t);return!!(l&&l.type==="element"&&(l.tagName==="dt"||l.tagName==="dd"))}function sM(e,t,r){const l=Rt(r,t);return!l||l.type==="element"&&(l.tagName==="dt"||l.tagName==="dd")}function rx(e,t,r){const l=Rt(r,t);return!l||l.type==="element"&&(l.tagName==="rp"||l.tagName==="rt")}function oM(e,t,r){const l=Rt(r,t);return!l||l.type==="element"&&l.tagName==="optgroup"}function uM(e,t,r){const l=Rt(r,t);return!l||l.type==="element"&&(l.tagName==="option"||l.tagName==="optgroup")}function cM(e,t,r){const l=Rt(r,t);return!!(l&&l.type==="element"&&(l.tagName==="tbody"||l.tagName==="tfoot"))}function fM(e,t,r){const l=Rt(r,t);return!l||l.type==="element"&&(l.tagName==="tbody"||l.tagName==="tfoot")}function dM(e,t,r){return!Rt(r,t)}function hM(e,t,r){const l=Rt(r,t);return!l||l.type==="element"&&l.tagName==="tr"}function ix(e,t,r){const l=Rt(r,t);return!l||l.type==="element"&&(l.tagName==="td"||l.tagName==="th")}const mM=p_({body:yM,colgroup:bM,head:gM,html:pM,tbody:xM});function pM(e){const t=Rt(e,-1);return!t||t.type!=="comment"}function gM(e){const t=new Set;for(const l of e.children)if(l.type==="element"&&(l.tagName==="base"||l.tagName==="title")){if(t.has(l.tagName))return!1;t.add(l.tagName)}const r=e.children[0];return!r||r.type==="element"}function yM(e){const t=Rt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&xu(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function bM(e,t,r){const l=h_(r,t),a=Rt(e,-1,!0);return r&&l&&l.type==="element"&&l.tagName==="colgroup"&&fm(l,r.children.indexOf(l),r)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function xM(e,t,r){const l=h_(r,t),a=Rt(e,-1);return r&&l&&l.type==="element"&&(l.tagName==="thead"||l.tagName==="tbody")&&fm(l,r.children.indexOf(l),r)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}const Bo={name:[[`
|
|
48
|
+
`))}function d(x,w,E,R){const C=E.enter("tableCell"),L=E.enter("phrasing"),O=E.containerPhrasing(x,{...R,before:o,after:o});return L(),C(),O}function h(x,w){return DO(x,{align:w,alignDelimiters:l,padding:r,stringLength:a})}function g(x,w,E){const R=x.children;let C=-1;const L=[],O=w.enter("table");for(;++C<R.length;)L[C]=p(R[C],w,E);return O(),L}function p(x,w,E){const R=x.children;let C=-1;const L=[],O=w.enter("tableRow");for(;++C<R.length;)L[C]=d(R[C],x,w,E);return O(),L}function b(x,w,E){let R=A1.inlineCode(x,w,E);return E.stack.includes("tableCell")&&(R=R.replace(/\|/g,"\\$&")),R}}function _N(){return{exit:{taskListCheckValueChecked:V0,taskListCheckValueUnchecked:V0,paragraph:SN}}}function wN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:EN}}}function V0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function SN(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 l=r.children[0];if(l&&l.type==="text"){const a=t.children;let o=-1,u;for(;++o<a.length;){const f=a[o];if(f.type==="paragraph"){u=f;break}}u===r&&(l.value=l.value.slice(1),l.value.length===0?r.children.shift():r.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,r.position.start=Object.assign({},l.position.start)))}}this.exit(e)}function EN(e,t,r,l){const a=e.children[0],o=typeof e.checked=="boolean"&&a&&a.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",f=r.createTracker(l);o&&f.move(u);let d=A1.listItem(e,t,r,{...l,...f.current()});return o&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(g){return g+u}}function CN(){return[nO(),SO(),AO(),mN(),_N()]}function kN(e){return{extensions:[rO(),EO(e),TO(),vN(e),wN()]}}const AN={tokenize:DN,partial:!0},T1={tokenize:MN,partial:!0},R1={tokenize:jN,partial:!0},L1={tokenize:zN,partial:!0},TN={tokenize:IN,partial:!0},O1={name:"wwwAutolink",tokenize:ON,previous:D1},N1={name:"protocolAutolink",tokenize:NN,previous:M1},kr={name:"emailAutolink",tokenize:LN,previous:j1},Wn={};function RN(){return{text:Wn}}let Ti=48;for(;Ti<123;)Wn[Ti]=kr,Ti++,Ti===58?Ti=65:Ti===91&&(Ti=97);Wn[43]=kr;Wn[45]=kr;Wn[46]=kr;Wn[95]=kr;Wn[72]=[kr,N1];Wn[104]=[kr,N1];Wn[87]=[kr,O1];Wn[119]=[kr,O1];function LN(e,t,r){const l=this;let a,o;return u;function u(p){return!lh(p)||!j1.call(l,l.previous)||Wh(l.events)?r(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(p))}function f(p){return lh(p)?(e.consume(p),f):p===64?(e.consume(p),d):r(p)}function d(p){return p===46?e.check(TN,g,h)(p):p===45||p===95||Yt(p)?(o=!0,e.consume(p),d):g(p)}function h(p){return e.consume(p),a=!0,d}function g(p){return o&&a&&Wt(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):r(p)}}function ON(e,t,r){const l=this;return a;function a(u){return u!==87&&u!==119||!D1.call(l,l.previous)||Wh(l.events)?r(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(AN,e.attempt(T1,e.attempt(R1,o),r),r)(u))}function o(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function NN(e,t,r){const l=this;let a="",o=!1;return u;function u(p){return(p===72||p===104)&&M1.call(l,l.previous)&&!Wh(l.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(p),e.consume(p),f):r(p)}function f(p){if(Wt(p)&&a.length<5)return a+=String.fromCodePoint(p),e.consume(p),f;if(p===58){const b=a.toLowerCase();if(b==="http"||b==="https")return e.consume(p),d}return r(p)}function d(p){return p===47?(e.consume(p),o?h:(o=!0,d)):r(p)}function h(p){return p===null||eu(p)||rt(p)||zi(p)||vu(p)?r(p):e.attempt(T1,e.attempt(R1,g),r)(p)}function g(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function DN(e,t,r){let l=0;return a;function a(u){return(u===87||u===119)&&l<3?(l++,e.consume(u),a):u===46&&l===3?(e.consume(u),o):r(u)}function o(u){return u===null?r(u):t(u)}}function MN(e,t,r){let l,a,o;return u;function u(h){return h===46||h===95?e.check(L1,d,f)(h):h===null||rt(h)||zi(h)||h!==45&&vu(h)?d(h):(o=!0,e.consume(h),u)}function f(h){return h===95?l=!0:(a=l,l=void 0),e.consume(h),u}function d(h){return a||l||!o?r(h):t(h)}}function jN(e,t){let r=0,l=0;return a;function a(u){return u===40?(r++,e.consume(u),a):u===41&&l<r?o(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(L1,t,o)(u):u===null||rt(u)||zi(u)?t(u):(e.consume(u),a)}function o(u){return u===41&&l++,e.consume(u),a}}function zN(e,t,r){return l;function l(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),l):f===38?(e.consume(f),o):f===93?(e.consume(f),a):f===60||f===null||rt(f)||zi(f)?t(f):r(f)}function a(f){return f===null||f===40||f===91||rt(f)||zi(f)?t(f):l(f)}function o(f){return Wt(f)?u(f):r(f)}function u(f){return f===59?(e.consume(f),l):Wt(f)?(e.consume(f),u):r(f)}}function IN(e,t,r){return l;function l(o){return e.consume(o),a}function a(o){return Yt(o)?r(o):t(o)}}function D1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||rt(e)}function M1(e){return!Wt(e)}function j1(e){return!(e===47||lh(e))}function lh(e){return e===43||e===45||e===46||e===95||Yt(e)}function Wh(e){let t=e.length,r=!1;for(;t--;){const l=e[t][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){r=!0;break}if(l._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const PN={tokenize:$N,partial:!0};function BN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:GN,continuation:{tokenize:FN},exit:qN}},text:{91:{name:"gfmFootnoteCall",tokenize:HN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:UN,resolveTo:VN}}}}function UN(e,t,r){const l=this;let a=l.events.length;const o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u;for(;a--;){const d=l.events[a][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return f;function f(d){if(!u||!u._balanced)return r(d);const h=Fn(l.sliceSerialize({start:u.end,end:l.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?r(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function VN(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 l={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},f=[e[r+1],e[r+2],["enter",l,t],e[r+3],e[r+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",u,t],["exit",u,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",l,t]];return e.splice(r,e.length-r+1,...f),e}function HN(e,t,r){const l=this,a=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let o=0,u;return f;function f(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?r(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(p){if(o>999||p===93&&!u||p===null||p===91||rt(p))return r(p);if(p===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return a.includes(Fn(l.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(p)}return rt(p)||(u=!0),o++,e.consume(p),p===92?g:h}function g(p){return p===91||p===92||p===93?(e.consume(p),o++,h):h(p)}}function GN(e,t,r){const l=this,a=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let o,u=0,f;return d;function d(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(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(u>999||w===93&&!f||w===null||w===91||rt(w))return r(w);if(w===93){e.exit("chunkString");const E=e.exit("gfmFootnoteDefinitionLabelString");return o=Fn(l.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return rt(w)||(f=!0),u++,e.consume(w),w===92?p:g}function p(w){return w===91||w===92||w===93?(e.consume(w),u++,g):g(w)}function b(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),a.includes(o)||a.push(o),Ge(e,x,"gfmFootnoteDefinitionWhitespace")):r(w)}function x(w){return t(w)}}function FN(e,t,r){return e.check(cs,t,e.attempt(PN,t,r))}function qN(e){e.exit("gfmFootnoteDefinition")}function $N(e,t,r){const l=this;return Ge(e,a,"gfmFootnoteDefinitionIndent",5);function a(o){const u=l.events[l.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(o):r(o)}}function QN(e){let r=(e||{}).singleTilde;const l={name:"strikethrough",tokenize:o,resolveAll:a};return r==null&&(r=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function a(u,f){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let h=d;for(;h--;)if(u[h][0]==="exit"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[h][1].end.offset-u[h][1].start.offset){u[d][1].type="strikethroughSequence",u[h][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},u[h][1].start),end:Object.assign({},u[d][1].end)},p={type:"strikethroughText",start:Object.assign({},u[h][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",g,f],["enter",u[h][1],f],["exit",u[h][1],f],["enter",p,f]],x=f.parser.constructs.insideSpan.null;x&&_n(b,b.length,0,_u(x,u.slice(h+1,d),f)),_n(b,b.length,0,[["exit",p,f],["enter",u[d][1],f],["exit",u[d][1],f],["exit",g,f]]),_n(u,h-1,d-h+3,b),d=h+b.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function o(u,f,d){const h=this.previous,g=this.events;let p=0;return b;function b(w){return h===126&&g[g.length-1][1].type!=="characterEscape"?d(w):(u.enter("strikethroughSequenceTemporary"),x(w))}function x(w){const E=Il(h);if(w===126)return p>1?d(w):(u.consume(w),p++,x);if(p<2&&!r)return d(w);const R=u.exit("strikethroughSequenceTemporary"),C=Il(w);return R._open=!C||C===2&&!!E,R._close=!E||E===2&&!!C,f(w)}}}class YN{constructor(){this.map=[]}add(t,r,l){XN(this,t,r,l)}consume(t){if(this.map.sort(function(o,u){return o[0]-u[0]}),this.map.length===0)return;let r=this.map.length;const l=[];for(;r>0;)r-=1,l.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];l.push(t.slice()),t.length=0;let a=l.pop();for(;a;){for(const o of a)t.push(o);a=l.pop()}this.map.length=0}}function XN(e,t,r,l){let a=0;if(!(r===0&&l.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=r,e.map[a][2].push(...l);return}a+=1}e.map.push([t,r,l])}}function KN(e,t){let r=!1;const l=[];for(;t<e.length;){const a=e[t];if(r){if(a[0]==="enter")a[1].type==="tableContent"&&l.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=l.length-1;l[o]=l[o]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return l}function ZN(){return{flow:{null:{name:"table",tokenize:JN,resolveAll:WN}}}}function JN(e,t,r){const l=this;let a=0,o=0,u;return f;function f(P){let X=l.events.length-1;for(;X>-1;){const le=l.events[X][1].type;if(le==="lineEnding"||le==="linePrefix")X--;else break}const te=X>-1?l.events[X][1].type:null,de=te==="tableHead"||te==="tableRow"?j:d;return de===j&&l.parser.lazy[l.now().line]?r(P):de(P)}function d(P){return e.enter("tableHead"),e.enter("tableRow"),h(P)}function h(P){return P===124||(u=!0,o+=1),g(P)}function g(P){return P===null?r(P):Se(P)?o>1?(o=0,l.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),x):r(P):Pe(P)?Ge(e,g,"whitespace")(P):(o+=1,u&&(u=!1,a+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),u=!0,g):(e.enter("data"),p(P)))}function p(P){return P===null||P===124||rt(P)?(e.exit("data"),g(P)):(e.consume(P),P===92?b:p)}function b(P){return P===92||P===124?(e.consume(P),p):p(P)}function x(P){return l.interrupt=!1,l.parser.lazy[l.now().line]?r(P):(e.enter("tableDelimiterRow"),u=!1,Pe(P)?Ge(e,w,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):w(P))}function w(P){return P===45||P===58?R(P):P===124?(u=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),E):Y(P)}function E(P){return Pe(P)?Ge(e,R,"whitespace")(P):R(P)}function R(P){return P===58?(o+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),C):P===45?(o+=1,C(P)):P===null||Se(P)?B(P):Y(P)}function C(P){return P===45?(e.enter("tableDelimiterFiller"),L(P)):Y(P)}function L(P){return P===45?(e.consume(P),L):P===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),O):(e.exit("tableDelimiterFiller"),O(P))}function O(P){return Pe(P)?Ge(e,B,"whitespace")(P):B(P)}function B(P){return P===124?w(P):P===null||Se(P)?!u||a!==o?Y(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):Y(P)}function Y(P){return r(P)}function j(P){return e.enter("tableRow"),q(P)}function q(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),q):P===null||Se(P)?(e.exit("tableRow"),t(P)):Pe(P)?Ge(e,q,"whitespace")(P):(e.enter("data"),G(P))}function G(P){return P===null||P===124||rt(P)?(e.exit("data"),q(P)):(e.consume(P),P===92?se:G)}function se(P){return P===92||P===124?(e.consume(P),G):G(P)}}function WN(e,t){let r=-1,l=!0,a=0,o=[0,0,0,0],u=[0,0,0,0],f=!1,d=0,h,g,p;const b=new YN;for(;++r<e.length;){const x=e[r],w=x[1];x[0]==="enter"?w.type==="tableHead"?(f=!1,d!==0&&(H0(b,t,d,h,g),g=void 0,d=0),h={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},b.add(r,0,[["enter",h,t]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(l=!0,p=void 0,o=[0,0,0,0],u=[0,r+1,0,0],f&&(f=!1,g={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},b.add(r,0,[["enter",g,t]])),a=w.type==="tableDelimiterRow"?2:g?3:1):a&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(l=!1,u[2]===0&&(o[1]!==0&&(u[0]=u[1],p=jo(b,t,o,a,void 0,p),o=[0,0,0,0]),u[2]=r)):w.type==="tableCellDivider"&&(l?l=!1:(o[1]!==0&&(u[0]=u[1],p=jo(b,t,o,a,void 0,p)),o=u,u=[o[1],r,0,0])):w.type==="tableHead"?(f=!0,d=r):w.type==="tableRow"||w.type==="tableDelimiterRow"?(d=r,o[1]!==0?(u[0]=u[1],p=jo(b,t,o,a,r,p)):u[1]!==0&&(p=jo(b,t,u,a,r,p)),a=0):a&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(u[3]=r)}for(d!==0&&H0(b,t,d,h,g),b.consume(t.events),r=-1;++r<t.events.length;){const x=t.events[r];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=KN(t.events,r))}return e}function jo(e,t,r,l,a,o){const u=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",f="tableContent";r[0]!==0&&(o.end=Object.assign({},Ol(t.events,r[0])),e.add(r[0],0,[["exit",o,t]]));const d=Ol(t.events,r[1]);if(o={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(r[1],0,[["enter",o,t]]),r[2]!==0){const h=Ol(t.events,r[2]),g=Ol(t.events,r[3]),p={type:f,start:Object.assign({},h),end:Object.assign({},g)};if(e.add(r[2],0,[["enter",p,t]]),l!==2){const b=t.events[r[2]],x=t.events[r[3]];if(b[1].end=Object.assign({},x[1].end),b[1].type="chunkText",b[1].contentType="text",r[3]>r[2]+1){const w=r[2]+1,E=r[3]-r[2]-1;e.add(w,E,[])}}e.add(r[3]+1,0,[["exit",p,t]])}return a!==void 0&&(o.end=Object.assign({},Ol(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function H0(e,t,r,l,a){const o=[],u=Ol(t.events,r);a&&(a.end=Object.assign({},u),o.push(["exit",a,t])),l.end=Object.assign({},u),o.push(["exit",l,t]),e.add(r+1,0,o)}function Ol(e,t){const r=e[t],l=r[0]==="enter"?"start":"end";return r[1][l]}const eD={name:"tasklistCheck",tokenize:nD};function tD(){return{text:{91:eD}}}function nD(e,t,r){const l=this;return a;function a(d){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?r(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),o)}function o(d){return rt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):r(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):r(d)}function f(d){return Se(d)?t(d):Pe(d)?e.check({tokenize:rD},t,r)(d):r(d)}}function rD(e,t,r){return Ge(e,l,"whitespace");function l(a){return a===null?r(a):t(a)}}function iD(e){return $v([RN(),BN(),QN(e),ZN(),tD()])}const lD={};function aD(e){const t=this,r=e||lD,l=t.data(),a=l.micromarkExtensions||(l.micromarkExtensions=[]),o=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),u=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);a.push(iD(r)),o.push(CN()),u.push(kN(r))}var ah=Object.defineProperty,sD=Object.getOwnPropertyDescriptor,oD=Object.getOwnPropertyNames,uD=Object.prototype.hasOwnProperty,em=(e,t)=>{let r={};for(var l in e)ah(r,l,{get:e[l],enumerable:!0});return ah(r,Symbol.toStringTag,{value:"Module"}),r},cD=(e,t,r,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=oD(t),o=0,u=a.length,f;o<u;o++)f=a[o],!uD.call(e,f)&&f!==r&&ah(e,f,{get:(d=>t[d]).bind(null,f),enumerable:!(l=sD(t,f))||l.enumerable});return e},z1=(e,t,r)=>(cD(e,t,"default"),r);const fD="modulepreload",dD=function(e){return"/"+e},G0={},A=function(t,r,l){let a=Promise.resolve();if(r&&r.length>0){let h=function(g){return Promise.all(g.map(p=>Promise.resolve(p).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};var u=h;document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),d=f?.nonce||f?.getAttribute("nonce");a=h(r.map(g=>{if(g=dD(g),g in G0)return;G0[g]=!0;const p=g.endsWith(".css"),b=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${b}`))return;const x=document.createElement("link");if(x.rel=p?"stylesheet":fD,p||(x.as="script"),x.crossOrigin="",x.href=g,d&&x.setAttribute("nonce",d),document.head.appendChild(x),p)return new Promise((w,E)=>{x.addEventListener("load",w),x.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${g}`)))})}))}function o(f){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=f,window.dispatchEvent(d),!d.defaultPrevented)throw f}return a.then(f=>{for(const d of f||[])d.status==="rejected"&&o(d.reason);return t().catch(o)})},Cu=[{id:"abap",name:"ABAP",import:(()=>A(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>A(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>A(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>A(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>A(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>A(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>A(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>A(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>A(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>A(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>A(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>A(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>A(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>A(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>A(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>A(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>A(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>A(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>A(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>A(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>A(()=>import("./bird2-BIv1doCn.js"),[]))},{id:"blade",name:"Blade",import:(()=>A(()=>import("./blade-BjGOyj-B.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>A(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>A(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>A(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>A(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>A(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>A(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>A(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>A(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>A(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>A(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>A(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>A(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>A(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>A(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>A(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>A(()=>import("./crystal-DNxU26gB.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>A(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>A(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>A(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>A(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>A(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>A(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>A(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>A(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>A(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>A(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>A(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>A(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>A(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>A(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>A(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>A(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>A(()=>import("./emacs-lisp-CXvaQtF9.js"),[]))},{id:"erb",name:"ERB",import:(()=>A(()=>import("./erb-BYCe7drp.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>A(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>A(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>A(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>A(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>A(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>A(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>A(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>A(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>A(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>A(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>A(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>A(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>A(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>A(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>A(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>A(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>A(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>A(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>A(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>A(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>A(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>A(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>A(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>A(()=>import("./hack-i7_Ulhet.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>A(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>A(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>A(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>A(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>A(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>A(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>A(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>A(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>A(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>A(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>A(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>A(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>A(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>A(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>A(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>A(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>A(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>A(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>A(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>A(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>A(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>A(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>A(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>A(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>A(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>A(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>A(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>A(()=>import("./just-VxiPbLrw.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>A(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>A(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>A(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>A(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>A(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>A(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>A(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>A(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>A(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>A(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>A(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>A(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>A(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>A(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>A(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>A(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>A(()=>import("./mdc-DTYItulj.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>A(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>A(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>A(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>A(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>A(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>A(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>A(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>A(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>A(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>A(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>A(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>A(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>A(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>A(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>A(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>A(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>A(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>A(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>A(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>A(()=>import("./perl-NvoQZIq0.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>A(()=>import("./php-R6g_5hLQ.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>A(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>A(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>A(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>A(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>A(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>A(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>A(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>A(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>A(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>A(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>A(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>A(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>A(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>A(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>A(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>A(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>A(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>A(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>A(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>A(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>A(()=>import("./razor-BDqjjVU7.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>A(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>A(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>A(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>A(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>A(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>A(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>A(()=>import("./rst-CRjBmOyv.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>A(()=>import("./ruby-Wjq7vjNf.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>A(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>A(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>A(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>A(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>A(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>A(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>A(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>A(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>A(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>A(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>A(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>A(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>A(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>A(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>A(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>A(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>A(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>A(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>A(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>A(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>A(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>A(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>A(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>A(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>A(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>A(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>A(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>A(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>A(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>A(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>A(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>A(()=>import("./ts-tags-DQrlYJgV.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>A(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>A(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>A(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>A(()=>import("./twig-xg9kU7Mw.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>A(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>A(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>A(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>A(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>A(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>A(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>A(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>A(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>A(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>A(()=>import("./vue-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>A(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>A(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>A(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>A(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>A(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>A(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>A(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>A(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>A(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>A(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>A(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>A(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>A(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>A(()=>import("./zig-VOosw3JB.js"),[]))}],tm=Object.fromEntries(Cu.map(e=>[e.id,e.import])),nm=Object.fromEntries(Cu.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),rm={...tm,...nm},im=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>A(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>A(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>A(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>A(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>A(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>A(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>A(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>A(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>A(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>A(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>A(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>A(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>A(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>A(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>A(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>A(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>A(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>A(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>A(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>A(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>A(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>A(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>A(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>A(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>A(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>A(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>A(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>A(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>A(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>A(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>A(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>A(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>A(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>A(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>A(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>A(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>A(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>A(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>A(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>A(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>A(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>A(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>A(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>A(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>A(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>A(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>A(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>A(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>A(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>A(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>A(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>A(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>A(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>A(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>A(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>A(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>A(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>A(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>A(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>A(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>A(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>A(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>A(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>A(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>A(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],lm=Object.fromEntries(im.map(e=>[e.id,e.import]));var am=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function hD(){return 2147483648}function mD(){return typeof performance<"u"?performance.now():Date.now()}const pD=(e,t)=>e+(t-e%t)%t;async function gD(e){let t,r;const l={};function a(x){r=x,l.HEAPU8=new Uint8Array(x),l.HEAPU32=new Uint32Array(x)}function o(x,w,E){l.HEAPU8.copyWithin(x,w,w+E)}function u(x){try{return t.grow(x-r.byteLength+65535>>>16),a(t.buffer),1}catch{}}function f(x){const w=l.HEAPU8.length;x=x>>>0;const E=hD();if(x>E)return!1;for(let R=1;R<=4;R*=2){let C=w*(1+.2/R);C=Math.min(C,x+100663296);const L=Math.min(E,pD(Math.max(x,C),65536));if(u(L))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function h(x,w,E=1024){const R=w+E;let C=w;for(;x[C]&&!(C>=R);)++C;if(C-w>16&&x.buffer&&d)return d.decode(x.subarray(w,C));let L="";for(;w<C;){let O=x[w++];if(!(O&128)){L+=String.fromCharCode(O);continue}const B=x[w++]&63;if((O&224)===192){L+=String.fromCharCode((O&31)<<6|B);continue}const Y=x[w++]&63;if((O&240)===224?O=(O&15)<<12|B<<6|Y:O=(O&7)<<18|B<<12|Y<<6|x[w++]&63,O<65536)L+=String.fromCharCode(O);else{const j=O-65536;L+=String.fromCharCode(55296|j>>10,56320|j&1023)}}return L}function g(x,w){return x?h(l.HEAPU8,x,w):""}const p={emscripten_get_now:mD,emscripten_memcpy_big:o,emscripten_resize_heap:f,fd_write:()=>0};async function b(){const w=await e({env:p,wasi_snapshot_preview1:p});t=w.memory,a(t.buffer),Object.assign(l,w),l.UTF8ToString=g}return await b(),l}var yD=Object.defineProperty,bD=(e,t,r)=>t in e?yD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,At=(e,t,r)=>bD(e,typeof t!="symbol"?t+"":t,r);let Mt=null;function xD(e){throw new am(e.UTF8ToString(e.getLastOnigError()))}class ku{constructor(t){At(this,"utf16Length"),At(this,"utf8Length"),At(this,"utf16Value"),At(this,"utf8Value"),At(this,"utf16OffsetToUtf8"),At(this,"utf8OffsetToUtf16");const r=t.length,l=ku._utf8ByteLength(t),a=l!==r,o=a?new Uint32Array(r+1):null;a&&(o[r]=l);const u=a?new Uint32Array(l+1):null;a&&(u[l]=r);const f=new Uint8Array(l);let d=0;for(let h=0;h<r;h++){const g=t.charCodeAt(h);let p=g,b=!1;if(g>=55296&&g<=56319&&h+1<r){const x=t.charCodeAt(h+1);x>=56320&&x<=57343&&(p=(g-55296<<10)+65536|x-56320,b=!0)}a&&(o[h]=d,b&&(o[h+1]=d),p<=127?u[d+0]=h:p<=2047?(u[d+0]=h,u[d+1]=h):p<=65535?(u[d+0]=h,u[d+1]=h,u[d+2]=h):(u[d+0]=h,u[d+1]=h,u[d+2]=h,u[d+3]=h)),p<=127?f[d++]=p:p<=2047?(f[d++]=192|(p&1984)>>>6,f[d++]=128|(p&63)>>>0):p<=65535?(f[d++]=224|(p&61440)>>>12,f[d++]=128|(p&4032)>>>6,f[d++]=128|(p&63)>>>0):(f[d++]=240|(p&1835008)>>>18,f[d++]=128|(p&258048)>>>12,f[d++]=128|(p&4032)>>>6,f[d++]=128|(p&63)>>>0),b&&h++}this.utf16Length=r,this.utf8Length=l,this.utf16Value=t,this.utf8Value=f,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=u}static _utf8ByteLength(t){let r=0;for(let l=0,a=t.length;l<a;l++){const o=t.charCodeAt(l);let u=o,f=!1;if(o>=55296&&o<=56319&&l+1<a){const d=t.charCodeAt(l+1);d>=56320&&d<=57343&&(u=(o-55296<<10)+65536|d-56320,f=!0)}u<=127?r+=1:u<=2047?r+=2:u<=65535?r+=3:r+=4,f&&l++}return r}createString(t){const r=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,r),r}}const Au=class Kn{constructor(t){if(At(this,"id",++Kn.LAST_ID),At(this,"_onigBinding"),At(this,"content"),At(this,"utf16Length"),At(this,"utf8Length"),At(this,"utf16OffsetToUtf8"),At(this,"utf8OffsetToUtf16"),At(this,"ptr"),!Mt)throw new am("Must invoke loadWasm first.");this._onigBinding=Mt,this.content=t;const r=new ku(t);this.utf16Length=r.utf16Length,this.utf8Length=r.utf8Length,this.utf16OffsetToUtf8=r.utf16OffsetToUtf8,this.utf8OffsetToUtf16=r.utf8OffsetToUtf16,this.utf8Length<1e4&&!Kn._sharedPtrInUse?(Kn._sharedPtr||(Kn._sharedPtr=Mt.omalloc(1e4)),Kn._sharedPtrInUse=!0,Mt.HEAPU8.set(r.utf8Value,Kn._sharedPtr),this.ptr=Kn._sharedPtr):this.ptr=r.createString(Mt)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Kn._sharedPtr?Kn._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};At(Au,"LAST_ID",0);At(Au,"_sharedPtr",0);At(Au,"_sharedPtrInUse",!1);let I1=Au;class vD{constructor(t){if(At(this,"_onigBinding"),At(this,"_ptr"),!Mt)throw new am("Must invoke loadWasm first.");const r=[],l=[];for(let f=0,d=t.length;f<d;f++){const h=new ku(t[f]);r[f]=h.createString(Mt),l[f]=h.utf8Length}const a=Mt.omalloc(4*t.length);Mt.HEAPU32.set(r,a/4);const o=Mt.omalloc(4*t.length);Mt.HEAPU32.set(l,o/4);const u=Mt.createOnigScanner(a,o,t.length);for(let f=0,d=t.length;f<d;f++)Mt.ofree(r[f]);Mt.ofree(o),Mt.ofree(a),u===0&&xD(Mt),this._onigBinding=Mt,this._ptr=u}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,r,l){let a=0;if(typeof l=="number"&&(a=l),typeof t=="string"){t=new I1(t);const o=this._findNextMatchSync(t,r,!1,a);return t.dispose(),o}return this._findNextMatchSync(t,r,!1,a)}_findNextMatchSync(t,r,l,a){const o=this._onigBinding,u=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(r),a);if(u===0)return null;const f=o.HEAPU32;let d=u/4;const h=f[d++],g=f[d++],p=[];for(let b=0;b<g;b++){const x=t.convertUtf8OffsetToUtf16(f[d++]),w=t.convertUtf8OffsetToUtf16(f[d++]);p[b]={start:x,end:w,length:w-x}}return{index:h,captureIndices:p}}}function _D(e){return typeof e.instantiator=="function"}function wD(e){return typeof e.default=="function"}function SD(e){return typeof e.data<"u"}function ED(e){return typeof Response<"u"&&e instanceof Response}function CD(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let zo;function sm(e){if(zo)return zo;async function t(){Mt=await gD(async r=>{let l=e;return l=await l,typeof l=="function"&&(l=await l(r)),typeof l=="function"&&(l=await l(r)),_D(l)?l=await l.instantiator(r):wD(l)?l=await l.default(r):(SD(l)&&(l=l.data),ED(l)?typeof WebAssembly.instantiateStreaming=="function"?l=await kD(l)(r):l=await AD(l)(r):CD(l)?l=await Cd(l)(r):l instanceof WebAssembly.Module?l=await Cd(l)(r):"default"in l&&l.default instanceof WebAssembly.Module&&(l=await Cd(l.default)(r))),"instance"in l&&(l=l.instance),"exports"in l&&(l=l.exports),l})}return zo=t(),zo}function Cd(e){return t=>WebAssembly.instantiate(e,t)}function kD(e){return t=>WebAssembly.instantiateStreaming(e,t)}function AD(e){return async t=>{const r=await e.arrayBuffer();return WebAssembly.instantiate(r,t)}}let P1;function TD(e){P1=e}function RD(){return P1}async function B1(e){return e&&await sm(e),{createScanner(t){return new vD(t.map(r=>typeof r=="string"?r:r.source))},createString(t){return new I1(t)}}}const LD=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:B1,getDefaultWasmLoader:RD,loadWasm:sm,setDefaultWasmLoader:TD},Symbol.toStringTag,{value:"Module"}));var U1=em({});z1(U1,LD);var lt=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function OD(e){return om(e)}function om(e){return Array.isArray(e)?ND(e):e instanceof RegExp?e:typeof e=="object"?DD(e):e}function ND(e){let t=[];for(let r=0,l=e.length;r<l;r++)t[r]=om(e[r]);return t}function DD(e){let t={};for(let r in e)t[r]=om(e[r]);return t}function V1(e,...t){return t.forEach(r=>{for(let l in r)e[l]=r[l]}),e}function H1(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?H1(e.substring(0,e.length-1)):e.substr(~t+1)}var kd=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Io=class{static hasCaptures(e){return e===null?!1:(kd.lastIndex=0,kd.test(e))}static replaceCaptures(e,t,r){return e.replace(kd,(l,a,o,u)=>{let f=r[parseInt(a||o,10)];if(f){let d=t.substring(f.start,f.end);for(;d[0]===".";)d=d.substring(1);switch(u){case"downcase":return d.toLowerCase();case"upcase":return d.toUpperCase();default:return d}}else return l})}};function G1(e,t){return e<t?-1:e>t?1:0}function F1(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let r=e.length,l=t.length;if(r===l){for(let a=0;a<r;a++){let o=G1(e[a],t[a]);if(o!==0)return o}return 0}return r-l}function F0(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function q1(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var $1=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},lu=class{constructor(e,t,r){this._colorMap=e,this._defaults=t,this._root=r}static createFromRawTheme(e,t){return this.createFromParsedTheme(zD(e),t)}static createFromParsedTheme(e,t){return PD(e,t)}_cachedMatchRoot=new $1(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,l=this._cachedMatchRoot.get(t).find(a=>MD(e.parent,a.parentScopes));return l?new Q1(l.fontStyle,l.foreground,l.background):null}},Ad=class qo{constructor(t,r){this.parent=t,this.scopeName=r}static push(t,r){for(const l of r)t=new qo(t,l);return t}static from(...t){let r=null;for(let l=0;l<t.length;l++)r=new qo(r,t[l]);return r}push(t){return new qo(this,t)}getSegments(){let t=this;const r=[];for(;t;)r.push(t.scopeName),t=t.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const r=[];let l=this;for(;l&&l!==t;)r.push(l.scopeName),l=l.parent;return l===t?r.reverse():void 0}};function MD(e,t){if(t.length===0)return!0;for(let r=0;r<t.length;r++){let l=t[r],a=!1;if(l===">"){if(r===t.length-1)return!1;l=t[++r],a=!0}for(;e&&!jD(e.scopeName,l);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function jD(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Q1=class{constructor(e,t,r){this.fontStyle=e,this.foregroundId=t,this.backgroundId=r}};function zD(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,r=[],l=0;for(let a=0,o=t.length;a<o;a++){let u=t[a];if(!u.settings)continue;let f;if(typeof u.scope=="string"){let p=u.scope;p=p.replace(/^[,]+/,""),p=p.replace(/[,]+$/,""),f=p.split(",")}else Array.isArray(u.scope)?f=u.scope:f=[""];let d=-1;if(typeof u.settings.fontStyle=="string"){d=0;let p=u.settings.fontStyle.split(" ");for(let b=0,x=p.length;b<x;b++)switch(p[b]){case"italic":d=d|1;break;case"bold":d=d|2;break;case"underline":d=d|4;break;case"strikethrough":d=d|8;break}}let h=null;typeof u.settings.foreground=="string"&&F0(u.settings.foreground)&&(h=u.settings.foreground);let g=null;typeof u.settings.background=="string"&&F0(u.settings.background)&&(g=u.settings.background);for(let p=0,b=f.length;p<b;p++){let w=f[p].trim().split(" "),E=w[w.length-1],R=null;w.length>1&&(R=w.slice(0,w.length-1),R.reverse()),r[l++]=new ID(E,R,a,d,h,g)}}return r}var ID=class{constructor(e,t,r,l,a,o){this.scope=e,this.parentScopes=t,this.index=r,this.fontStyle=l,this.foreground=a,this.background=o}},Qt=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Qt||{});function PD(e,t){e.sort((d,h)=>{let g=G1(d.scope,h.scope);return g!==0||(g=F1(d.parentScopes,h.parentScopes),g!==0)?g:d.index-h.index});let r=0,l="#000000",a="#ffffff";for(;e.length>=1&&e[0].scope==="";){let d=e.shift();d.fontStyle!==-1&&(r=d.fontStyle),d.foreground!==null&&(l=d.foreground),d.background!==null&&(a=d.background)}let o=new BD(t),u=new Q1(r,o.getId(l),o.getId(a)),f=new VD(new sh(0,null,-1,0,0),[]);for(let d=0,h=e.length;d<h;d++){let g=e[d];f.insert(0,g.scope,g.parentScopes,g.fontStyle,o.getId(g.foreground),o.getId(g.background))}return new lu(o,u,f)}var BD=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,r=e.length;t<r;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},UD=Object.freeze([]),sh=class Y1{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,r,l,a,o){this.scopeDepth=t,this.parentScopes=r||UD,this.fontStyle=l,this.foreground=a,this.background=o}clone(){return new Y1(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let r=[];for(let l=0,a=t.length;l<a;l++)r[l]=t[l].clone();return r}acceptOverwrite(t,r,l,a){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,r!==-1&&(this.fontStyle=r),l!==0&&(this.foreground=l),a!==0&&(this.background=a)}},VD=class oh{constructor(t,r=[],l={}){this._mainRule=t,this._children=l,this._rulesWithParentScopes=r}_rulesWithParentScopes;static _cmpBySpecificity(t,r){if(t.scopeDepth!==r.scopeDepth)return r.scopeDepth-t.scopeDepth;let l=0,a=0;for(;t.parentScopes[l]===">"&&l++,r.parentScopes[a]===">"&&a++,!(l>=t.parentScopes.length||a>=r.parentScopes.length);){const o=r.parentScopes[a].length-t.parentScopes[l].length;if(o!==0)return o;l++,a++}return r.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let l=t.indexOf("."),a,o;if(l===-1?(a=t,o=""):(a=t.substring(0,l),o=t.substring(l+1)),this._children.hasOwnProperty(a))return this._children[a].match(o)}const r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(oh._cmpBySpecificity),r}insert(t,r,l,a,o,u){if(r===""){this._doInsertHere(t,l,a,o,u);return}let f=r.indexOf("."),d,h;f===-1?(d=r,h=""):(d=r.substring(0,f),h=r.substring(f+1));let g;this._children.hasOwnProperty(d)?g=this._children[d]:(g=new oh(this._mainRule.clone(),sh.cloneArr(this._rulesWithParentScopes)),this._children[d]=g),g.insert(t+1,h,l,a,o,u)}_doInsertHere(t,r,l,a,o){if(r===null){this._mainRule.acceptOverwrite(t,l,a,o);return}for(let u=0,f=this._rulesWithParentScopes.length;u<f;u++){let d=this._rulesWithParentScopes[u];if(F1(d.parentScopes,r)===0){d.acceptOverwrite(t,l,a,o);return}}l===-1&&(l=this._mainRule.fontStyle),a===0&&(a=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new sh(t,r,l,a,o))}},Pl=class Mn{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const r=Mn.getLanguageId(t),l=Mn.getTokenType(t),a=Mn.getFontStyle(t),o=Mn.getForeground(t),u=Mn.getBackground(t);console.log({languageId:r,tokenType:l,fontStyle:a,foreground:o,background:u})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,r,l,a,o,u,f){let d=Mn.getLanguageId(t),h=Mn.getTokenType(t),g=Mn.containsBalancedBrackets(t)?1:0,p=Mn.getFontStyle(t),b=Mn.getForeground(t),x=Mn.getBackground(t);return r!==0&&(d=r),l!==8&&(h=l),a!==null&&(g=a?1:0),o!==-1&&(p=o),u!==0&&(b=u),f!==0&&(x=f),(d<<0|h<<8|g<<10|p<<11|b<<15|x<<24)>>>0}};function au(e,t){const r=[],l=HD(e);let a=l.next();for(;a!==null;){let d=0;if(a.length===2&&a.charAt(1)===":"){switch(a.charAt(0)){case"R":d=1;break;case"L":d=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=l.next()}let h=u();if(r.push({matcher:h,priority:d}),a!==",")break;a=l.next()}return r;function o(){if(a==="-"){a=l.next();const d=o();return h=>!!d&&!d(h)}if(a==="("){a=l.next();const d=f();return a===")"&&(a=l.next()),d}if(q0(a)){const d=[];do d.push(a),a=l.next();while(q0(a));return h=>t(d,h)}return null}function u(){const d=[];let h=o();for(;h;)d.push(h),h=o();return g=>d.every(p=>p(g))}function f(){const d=[];let h=u();for(;h&&(d.push(h),a==="|"||a===",");){do a=l.next();while(a==="|"||a===",");h=u()}return g=>d.some(p=>p(g))}}function q0(e){return!!e&&!!e.match(/[\w\.:]+/)}function HD(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=t.exec(e);return{next:()=>{if(!r)return null;const l=r[0];return r=t.exec(e),l}}}function X1(e){typeof e.dispose=="function"&&e.dispose()}var es=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},GD=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},FD=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},qD=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new es(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new FD;for(const r of e)$D(r,this.initialScopeName,this.repo,t);for(const r of t.references)if(r instanceof es){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function $D(e,t,r,l){const a=r.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=r.lookup(t);e instanceof es?$o({baseGrammar:o,selfGrammar:a},l):uh(e.ruleName,{baseGrammar:o,selfGrammar:a,repository:a.repository},l);const u=r.injections(e.scopeName);if(u)for(const f of u)l.add(new es(f))}function uh(e,t,r){if(t.repository&&t.repository[e]){const l=t.repository[e];su([l],t,r)}}function $o(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&su(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&su(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function su(e,t,r){for(const l of e){if(r.visitedRule.has(l))continue;r.visitedRule.add(l);const a=l.repository?V1({},t.repository,l.repository):t.repository;Array.isArray(l.patterns)&&su(l.patterns,{...t,repository:a},r);const o=l.include;if(!o)continue;const u=K1(o);switch(u.kind){case 0:$o({...t,selfGrammar:t.baseGrammar},r);break;case 1:$o(t,r);break;case 2:uh(u.ruleName,{...t,repository:a},r);break;case 3:case 4:const f=u.scopeName===t.selfGrammar.scopeName?t.selfGrammar:u.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(f){const d={baseGrammar:t.baseGrammar,selfGrammar:f,repository:a};u.kind===4?uh(u.ruleName,d,r):$o(d,r)}else u.kind===4?r.add(new GD(u.scopeName,u.ruleName)):r.add(new es(u.scopeName));break}}}var QD=class{kind=0},YD=class{kind=1},XD=class{constructor(e){this.ruleName=e}kind=2},KD=class{constructor(e){this.scopeName=e}kind=3},ZD=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function K1(e){if(e==="$base")return new QD;if(e==="$self")return new YD;const t=e.indexOf("#");if(t===-1)return new KD(e);if(t===0)return new XD(e.substring(1));{const r=e.substring(0,t),l=e.substring(t+1);return new ZD(r,l)}}var JD=/\\(\d+)/,$0=/\\(\d+)/g,WD=-1,Z1=-2;var ds=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,r,l){this.$location=e,this.id=t,this._name=r||null,this._nameIsCapturing=Io.hasCaptures(this._name),this._contentName=l||null,this._contentNameIsCapturing=Io.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${H1(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Io.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Io.replaceCaptures(this._contentName,e,t)}},e5=class extends ds{retokenizeCapturedWithRuleId;constructor(e,t,r,l,a){super(e,t,r,l),this.retokenizeCapturedWithRuleId=a}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,r,l){throw new Error("Not supported!")}},t5=class extends ds{_match;captures;_cachedCompiledPatterns;constructor(e,t,r,l,a){super(e,t,r,null),this._match=new ts(l,this.id),this.captures=a,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,l){return this._getCachedCompiledPatterns(e).compileAG(e,r,l)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ns,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Q0=class extends ds{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,l,a){super(e,t,r,l),this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const r of this.patterns)e.getRule(r).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,l){return this._getCachedCompiledPatterns(e).compileAG(e,r,l)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ns,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ch=class extends ds{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,l,a,o,u,f,d,h){super(e,t,r,l),this._begin=new ts(a,this.id),this.beginCaptures=o,this._end=new ts(u||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=f,this.applyEndPatternLast=d||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,r,l){return this._getCachedCompiledPatterns(e,t).compileAG(e,r,l)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ns;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},ou=class extends ds{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,r,l,a,o,u,f,d){super(e,t,r,l),this._begin=new ts(a,this.id),this.beginCaptures=o,this.whileCaptures=f,this._while=new ts(u,Z1),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=d.patterns,this.hasMissingPatterns=d.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,l){return this._getCachedCompiledPatterns(e).compileAG(e,r,l)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ns;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,r,l){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,r,l)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ns,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},J1=class $t{static createCaptureRule(t,r,l,a,o){return t.registerRule(u=>new e5(r,u,l,a,o))}static getCompiledRuleId(t,r,l){return t.id||r.registerRule(a=>{if(t.id=a,t.match)return new t5(t.$vscodeTextmateLocation,t.id,t.name,t.match,$t._compileCaptures(t.captures,r,l));if(typeof t.begin>"u"){t.repository&&(l=V1({},l,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Q0(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,$t._compilePatterns(o,r,l))}return t.while?new ou(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,$t._compileCaptures(t.beginCaptures||t.captures,r,l),t.while,$t._compileCaptures(t.whileCaptures||t.captures,r,l),$t._compilePatterns(t.patterns,r,l)):new ch(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,$t._compileCaptures(t.beginCaptures||t.captures,r,l),t.end,$t._compileCaptures(t.endCaptures||t.captures,r,l),t.applyEndPatternLast,$t._compilePatterns(t.patterns,r,l))}),t.id}static _compileCaptures(t,r,l){let a=[];if(t){let o=0;for(const u in t){if(u==="$vscodeTextmateLocation")continue;const f=parseInt(u,10);f>o&&(o=f)}for(let u=0;u<=o;u++)a[u]=null;for(const u in t){if(u==="$vscodeTextmateLocation")continue;const f=parseInt(u,10);let d=0;t[u].patterns&&(d=$t.getCompiledRuleId(t[u],r,l)),a[f]=$t.createCaptureRule(r,t[u].$vscodeTextmateLocation,t[u].name,t[u].contentName,d)}}return a}static _compilePatterns(t,r,l){let a=[];if(t)for(let o=0,u=t.length;o<u;o++){const f=t[o];let d=-1;if(f.include){const h=K1(f.include);switch(h.kind){case 0:case 1:d=$t.getCompiledRuleId(l[f.include],r,l);break;case 2:let g=l[h.ruleName];g&&(d=$t.getCompiledRuleId(g,r,l));break;case 3:case 4:const p=h.scopeName,b=h.kind===4?h.ruleName:null,x=r.getExternalGrammar(p,l);if(x)if(b){let w=x.repository[b];w&&(d=$t.getCompiledRuleId(w,r,x.repository))}else d=$t.getCompiledRuleId(x.repository.$self,r,x.repository);break}}else d=$t.getCompiledRuleId(f,r,l);if(d!==-1){const h=r.getRule(d);let g=!1;if((h instanceof Q0||h instanceof ch||h instanceof ou)&&h.hasMissingPatterns&&h.patterns.length===0&&(g=!0),g)continue;a.push(d)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},ts=class W1{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,r){if(t&&typeof t=="string"){const l=t.length;let a=0,o=[],u=!1;for(let f=0;f<l;f++)if(t.charAt(f)==="\\"&&f+1<l){const h=t.charAt(f+1);h==="z"?(o.push(t.substring(a,f)),o.push("$(?!\\n)(?<!\\n)"),a=f+2):(h==="A"||h==="G")&&(u=!0),f++}this.hasAnchor=u,a===0?this.source=t:(o.push(t.substring(a,l)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=r,typeof this.source=="string"?this.hasBackReferences=JD.test(this.source):this.hasBackReferences=!1}clone(){return new W1(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let l=r.map(a=>t.substring(a.start,a.end));return $0.lastIndex=0,this.source.replace($0,(a,o)=>q1(l[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],r=[],l=[],a=[],o,u,f,d;for(o=0,u=this.source.length;o<u;o++)f=this.source.charAt(o),t[o]=f,r[o]=f,l[o]=f,a[o]=f,f==="\\"&&o+1<u&&(d=this.source.charAt(o+1),d==="A"?(t[o+1]="",r[o+1]="",l[o+1]="A",a[o+1]="A"):d==="G"?(t[o+1]="",r[o+1]="G",l[o+1]="",a[o+1]="G"):(t[o+1]=d,r[o+1]=d,l[o+1]=d,a[o+1]=d),o++);return{A0_G0:t.join(""),A0_G1:r.join(""),A1_G0:l.join(""),A1_G1:a.join("")}}resolveAnchors(t,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ns=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(r=>r.source);this._cached=new Y0(e,t,this._items.map(r=>r.ruleId))}return this._cached}compileAG(e,t,r){return this._hasAnchors?t?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,r){let l=this._items.map(a=>a.resolveAnchors(t,r));return new Y0(e,l,this._items.map(a=>a.ruleId))}},Y0=class{constructor(e,t,r){this.regExps=t,this.rules=r,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,r=this.rules.length;t<r;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
49
|
+
`)}findNextMatchSync(e,t,r){const l=this.scanner.findNextMatchSync(e,t,r);return l?{ruleId:this.rules[l.index],captureIndices:l.captureIndices}:null}},Td=class{constructor(e,t){this.languageId=e,this.tokenType=t}},n5=class fh{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,r){this._defaultAttributes=new Td(t,8),this._embeddedLanguagesMatcher=new r5(Object.entries(r||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?fh._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Td(0,0);_getBasicScopeAttributes=new $1(t=>{const r=this._scopeToLanguage(t),l=this._toStandardTokenType(t);return new Td(r,l)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const r=t.match(fh.STANDARD_TOKEN_TYPE_REGEXP);if(!r)return 8;switch(r[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},r5=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([r,l])=>q1(r));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},X0=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function e_(e,t,r,l,a,o,u,f){const d=t.content.length;let h=!1,g=-1;if(u){const x=i5(e,t,r,l,a,o);a=x.stack,l=x.linePos,r=x.isFirstLine,g=x.anchorPosition}const p=Date.now();for(;!h;){if(f!==0&&Date.now()-p>f)return new X0(a,!0);b()}return new X0(a,!1);function b(){const x=l5(e,t,r,l,a,g);if(!x){o.produce(a,d),h=!0;return}const w=x.captureIndices,E=x.matchedRuleId,R=w&&w.length>0?w[0].end>l:!1;if(E===WD){const C=a.getRule(e);o.produce(a,w[0].start),a=a.withContentNameScopesList(a.nameScopesList),Fa(e,t,r,a,o,C.endCaptures,w),o.produce(a,w[0].end);const L=a;if(a=a.parent,g=L.getAnchorPos(),!R&&L.getEnterPos()===l){a=L,o.produce(a,d),h=!0;return}}else{const C=e.getRule(E);o.produce(a,w[0].start);const L=a,O=C.getName(t.content,w),B=a.contentNameScopesList.pushAttributed(O,e);if(a=a.push(E,l,g,w[0].end===d,null,B,B),C instanceof ch){const Y=C;Fa(e,t,r,a,o,Y.beginCaptures,w),o.produce(a,w[0].end),g=w[0].end;const j=Y.getContentName(t.content,w),q=B.pushAttributed(j,e);if(a=a.withContentNameScopesList(q),Y.endHasBackReferences&&(a=a.withEndRule(Y.getEndWithResolvedBackReferences(t.content,w))),!R&&L.hasSameRuleAs(a)){a=a.pop(),o.produce(a,d),h=!0;return}}else if(C instanceof ou){const Y=C;Fa(e,t,r,a,o,Y.beginCaptures,w),o.produce(a,w[0].end),g=w[0].end;const j=Y.getContentName(t.content,w),q=B.pushAttributed(j,e);if(a=a.withContentNameScopesList(q),Y.whileHasBackReferences&&(a=a.withEndRule(Y.getWhileWithResolvedBackReferences(t.content,w))),!R&&L.hasSameRuleAs(a)){a=a.pop(),o.produce(a,d),h=!0;return}}else if(Fa(e,t,r,a,o,C.captures,w),o.produce(a,w[0].end),a=a.pop(),!R){a=a.safePop(),o.produce(a,d),h=!0;return}}w[0].end>l&&(l=w[0].end,r=!1)}}function i5(e,t,r,l,a,o){let u=a.beginRuleCapturedEOL?0:-1;const f=[];for(let d=a;d;d=d.pop()){const h=d.getRule(e);h instanceof ou&&f.push({rule:h,stack:d})}for(let d=f.pop();d;d=f.pop()){const{ruleScanner:h,findOptions:g}=o5(d.rule,e,d.stack.endRule,r,l===u),p=h.findNextMatchSync(t,l,g);if(p){if(p.ruleId!==Z1){a=d.stack.pop();break}p.captureIndices&&p.captureIndices.length&&(o.produce(d.stack,p.captureIndices[0].start),Fa(e,t,r,d.stack,o,d.rule.whileCaptures,p.captureIndices),o.produce(d.stack,p.captureIndices[0].end),u=p.captureIndices[0].end,p.captureIndices[0].end>l&&(l=p.captureIndices[0].end,r=!1))}else{a=d.stack.pop();break}}return{stack:a,linePos:l,anchorPosition:u,isFirstLine:r}}function l5(e,t,r,l,a,o){const u=a5(e,t,r,l,a,o),f=e.getInjections();if(f.length===0)return u;const d=s5(f,e,t,r,l,a,o);if(!d)return u;if(!u)return d;const h=u.captureIndices[0].start,g=d.captureIndices[0].start;return g<h||d.priorityMatch&&g===h?d:u}function a5(e,t,r,l,a,o){const u=a.getRule(e),{ruleScanner:f,findOptions:d}=t_(u,e,a.endRule,r,l===o),h=f.findNextMatchSync(t,l,d);return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}function s5(e,t,r,l,a,o,u){let f=Number.MAX_VALUE,d=null,h,g=0;const p=o.contentNameScopesList.getScopeNames();for(let b=0,x=e.length;b<x;b++){const w=e[b];if(!w.matcher(p))continue;const E=t.getRule(w.ruleId),{ruleScanner:R,findOptions:C}=t_(E,t,null,l,a===u),L=R.findNextMatchSync(r,a,C);if(!L)continue;const O=L.captureIndices[0].start;if(!(O>=f)&&(f=O,d=L.captureIndices,h=L.ruleId,g=w.priority,f===a))break}return d?{priorityMatch:g===-1,captureIndices:d,matchedRuleId:h}:null}function t_(e,t,r,l,a){return{ruleScanner:e.compileAG(t,r,l,a),findOptions:0}}function o5(e,t,r,l,a){return{ruleScanner:e.compileWhileAG(t,r,l,a),findOptions:0}}function Fa(e,t,r,l,a,o,u){if(o.length===0)return;const f=t.content,d=Math.min(o.length,u.length),h=[],g=u[0].end;for(let p=0;p<d;p++){const b=o[p];if(b===null)continue;const x=u[p];if(x.length===0)continue;if(x.start>g)break;for(;h.length>0&&h[h.length-1].endPos<=x.start;)a.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop();if(h.length>0?a.produceFromScopes(h[h.length-1].scopes,x.start):a.produce(l,x.start),b.retokenizeCapturedWithRuleId){const E=b.getName(f,u),R=l.contentNameScopesList.pushAttributed(E,e),C=b.getContentName(f,u),L=R.pushAttributed(C,e),O=l.push(b.retokenizeCapturedWithRuleId,x.start,-1,!1,null,R,L),B=e.createOnigString(f.substring(0,x.end));e_(e,B,r&&x.start===0,x.start,O,a,!1,0),X1(B);continue}const w=b.getName(f,u);if(w!==null){const R=(h.length>0?h[h.length-1].scopes:l.contentNameScopesList).pushAttributed(w,e);h.push(new u5(R,x.end))}}for(;h.length>0;)a.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}var u5=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function c5(e,t,r,l,a,o,u,f){return new d5(e,t,r,l,a,o,u,f)}function K0(e,t,r,l,a){const o=au(t,uu),u=J1.getCompiledRuleId(r,l,a.repository);for(const f of o)e.push({debugSelector:t,matcher:f.matcher,ruleId:u,grammar:a,priority:f.priority})}function uu(e,t){if(t.length<e.length)return!1;let r=0;return e.every(l=>{for(let a=r;a<t.length;a++)if(f5(t[a],l))return r=a+1,!0;return!1})}function f5(e,t){if(!e)return!1;if(e===t)return!0;const r=t.length;return e.length>r&&e.substr(0,r)===t&&e[r]==="."}var d5=class{constructor(e,t,r,l,a,o,u,f){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=f,this._basicScopeAttributesProvider=new n5(r,l),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=u,this._grammar=Z0(t,null),this._injections=null,this._tokenTypeMatchers=[],a)for(const d of Object.keys(a)){const h=au(d,uu);for(const g of h)this._tokenTypeMatchers.push({matcher:g.matcher,type:a[d]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:a=>a===this._rootScopeName?this._grammar:this.getExternalGrammar(a),injections:a=>this._grammarRepository.injections(a)},t=[],r=this._rootScopeName,l=e.lookup(r);if(l){const a=l.injections;if(a)for(let u in a)K0(t,u,a[u],this,l);const o=this._grammarRepository.injections(r);o&&o.forEach(u=>{const f=this.getExternalGrammar(u);if(f){const d=f.injectionSelector;d&&K0(t,d,f,this,f)}})}return t.sort((a,o)=>a.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,r=e(t);return this._ruleId2desc[t]=r,r}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const r=this._grammarRepository.lookup(e);if(r)return this._includedGrammars[e]=Z0(r,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,r=0){const l=this._tokenize(e,t,!1,r);return{tokens:l.lineTokens.getResult(l.ruleStack,l.lineLength),ruleStack:l.ruleStack,stoppedEarly:l.stoppedEarly}}tokenizeLine2(e,t,r=0){const l=this._tokenize(e,t,!0,r);return{tokens:l.lineTokens.getBinaryResult(l.ruleStack,l.lineLength),ruleStack:l.ruleStack,stoppedEarly:l.stoppedEarly}}_tokenize(e,t,r,l){this._rootId===-1&&(this._rootId=J1.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let a;if(!t||t===dh.NULL){a=!0;const h=this._basicScopeAttributesProvider.getDefaultAttributes(),g=this.themeProvider.getDefaults(),p=Pl.set(0,h.languageId,h.tokenType,null,g.fontStyle,g.foregroundId,g.backgroundId),b=this.getRule(this._rootId).getName(null,null);let x;b?x=Ya.createRootAndLookUpScopeName(b,p,this):x=Ya.createRoot("unknown",p),t=new dh(null,this._rootId,-1,-1,!1,null,x,x)}else a=!1,t.reset();e=e+`
|
|
50
|
+
`;const o=this.createOnigString(e),u=o.content.length,f=new m5(r,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=e_(this,o,a,0,t,f,!0,l);return X1(o),{lineLength:u,lineTokens:f,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function Z0(e,t){return e=OD(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Ya=class Zn{constructor(t,r,l){this.parent=t,this.scopePath=r,this.tokenAttributes=l}static fromExtension(t,r){let l=t,a=t?.scopePath??null;for(const o of r)a=Ad.push(a,o.scopeNames),l=new Zn(l,a,o.encodedTokenAttributes);return l}static createRoot(t,r){return new Zn(null,new Ad(null,t),r)}static createRootAndLookUpScopeName(t,r,l){const a=l.getMetadataForScope(t),o=new Ad(null,t),u=l.themeProvider.themeMatch(o),f=Zn.mergeAttributes(r,a,u);return new Zn(null,o,f)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Zn.equals(this,t)}static equals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.scopeName!==r.scopeName||t.tokenAttributes!==r.tokenAttributes)return!1;t=t.parent,r=r.parent}while(!0)}static mergeAttributes(t,r,l){let a=-1,o=0,u=0;return l!==null&&(a=l.fontStyle,o=l.foregroundId,u=l.backgroundId),Pl.set(t,r.languageId,r.tokenType,null,a,o,u)}pushAttributed(t,r){if(t===null)return this;if(t.indexOf(" ")===-1)return Zn._pushAttributed(this,t,r);const l=t.split(/ /g);let a=this;for(const o of l)a=Zn._pushAttributed(a,o,r);return a}static _pushAttributed(t,r,l){const a=l.getMetadataForScope(r),o=t.scopePath.push(r),u=l.themeProvider.themeMatch(o),f=Zn.mergeAttributes(t.tokenAttributes,a,u);return new Zn(t,o,f)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const r=[];let l=this;for(;l&&l!==t;)r.push({encodedTokenAttributes:l.tokenAttributes,scopeNames:l.scopePath.getExtensionIfDefined(l.parent?.scopePath??null)}),l=l.parent;return l===t?r.reverse():void 0}},dh=class Li{constructor(t,r,l,a,o,u,f,d){this.parent=t,this.ruleId=r,this.beginRuleCapturedEOL=o,this.endRule=u,this.nameScopesList=f,this.contentNameScopesList=d,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=l,this._anchorPos=a}_stackElementBrand=void 0;static NULL=new Li(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Li._equals(this,t)}static _equals(t,r){return t===r?!0:this._structuralEquals(t,r)?Ya.equals(t.contentNameScopesList,r.contentNameScopesList):!1}static _structuralEquals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.depth!==r.depth||t.ruleId!==r.ruleId||t.endRule!==r.endRule)return!1;t=t.parent,r=r.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Li._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,r,l,a,o,u,f){return new Li(this,t,r,l,a,o,u,f)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,r){return this.parent&&(r=this.parent._writeString(t,r)),t[r++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,r}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Li(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let r=this;for(;r&&r._enterPos===t._enterPos;){if(r.ruleId===t.ruleId)return!0;r=r.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,r){const l=Ya.fromExtension(t?.nameScopesList??null,r.nameScopesList);return new Li(t,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,l,Ya.fromExtension(l,r.contentNameScopesList))}},h5=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(r=>r==="*"?(this.allowAny=!0,[]):au(r,uu).map(l=>l.matcher)),this.unbalancedBracketScopes=t.flatMap(r=>au(r,uu).map(l=>l.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},m5=class{constructor(e,t,r,l){this.balancedBracketSelectors=l,this._emitBinaryTokens=e,this._tokenTypeOverrides=r,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let l=e?.tokenAttributes??0,a=!1;if(this.balancedBracketSelectors?.matchesAlways&&(a=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=e?.getScopeNames()??[];for(const u of this._tokenTypeOverrides)u.matcher(o)&&(l=Pl.set(l,0,u.type,null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(o))}if(a&&(l=Pl.set(l,0,8,a,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===l){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(l),this._lastTokenEndIndex=t;return}const r=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:r}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const r=new Uint32Array(this._binaryTokens.length);for(let l=0,a=this._binaryTokens.length;l<a;l++)r[l]=this._binaryTokens[l];return r}},p5=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,r,l,a){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,c5(e,o,t,r,l,a,this,this._onigLib))}return this._grammars.get(e)}},g5=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new p5(lu.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,r){this._syncRegistry.setTheme(lu.createFromRawTheme(t,r))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,r,l){return this.loadGrammarWithConfiguration(t,r,{embeddedLanguages:l})}loadGrammarWithConfiguration(t,r,l){return this._loadGrammar(t,r,l.embeddedLanguages,l.tokenTypes,new h5(l.balancedBracketSelectors||[],l.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,r,l,a,o){const u=new qD(this._syncRegistry,t);for(;u.Q.length>0;)u.Q.map(f=>this._loadSingleGrammar(f.scopeName)),u.processQueue();return this._grammarForScopeName(t,r,l,a,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const r=this._options.loadGrammar(t);if(r){const l=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(r,l)}}addGrammar(t,r=[],l=0,a=null){return this._syncRegistry.addGrammar(t,r),this._grammarForScopeName(t.scopeName,l,a)}_grammarForScopeName(t,r=0,l=null,a=null,o=null){return this._syncRegistry.grammarForScopeName(t,r,l,a,o)}},hh=dh.NULL;function cu(e,t){const r=typeof e=="string"?{}:{...e.colorReplacements},l=typeof e=="string"?e:e.name;for(const[a,o]of Object.entries(t?.colorReplacements||{}))typeof o=="string"?r[a]=o:a===l&&Object.assign(r,o);return r}function ai(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function y5(e){return Array.isArray(e)?e:[e]}async function n_(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Tu(e){return!e||["plaintext","txt","text","plain"].includes(e)}function r_(e){return e==="ansi"||Tu(e)}function Ru(e){return e==="none"}function i_(e){return Ru(e)}function Lu(e,t=!1){if(e.length===0)return[["",0]];const r=e.split(/(\r?\n)/g);let l=0;const a=[];for(let o=0;o<r.length;o+=2){const u=t?r[o]+(r[o+1]||""):r[o];a.push([u,l]),l+=r[o].length,l+=r[o+1]?.length||0}return a}const J0={light:"#333333",dark:"#bbbbbb"},W0={light:"#fffffe",dark:"#1e1e1e"},ex="__shiki_resolved";function um(e){if(e?.[ex])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:r,fg:l}=t;if(!r||!l){const f=t.settings?t.settings.find(d=>!d.name&&!d.scope):void 0;f?.settings?.foreground&&(l=f.settings.foreground),f?.settings?.background&&(r=f.settings.background),!l&&t?.colors?.["editor.foreground"]&&(l=t.colors["editor.foreground"]),!r&&t?.colors?.["editor.background"]&&(r=t.colors["editor.background"]),l||(l=t.type==="light"?J0.light:J0.dark),r||(r=t.type==="light"?W0.light:W0.dark),t.fg=l,t.bg=r}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let a=0;const o=new Map;function u(f){if(o.has(f))return o.get(f);a+=1;const d=`#${a.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${d}`]?u(f):(o.set(f,d),d)}t.settings=t.settings.map(f=>{const d=f.settings?.foreground&&!f.settings.foreground.startsWith("#"),h=f.settings?.background&&!f.settings.background.startsWith("#");if(!d&&!h)return f;const g={...f,settings:{...f.settings}};if(d){const p=u(f.settings.foreground);t.colorReplacements[p]=f.settings.foreground,g.settings.foreground=p}if(h){const p=u(f.settings.background);t.colorReplacements[p]=f.settings.background,g.settings.background=p}return g});for(const f of Object.keys(t.colors||{}))if((f==="editor.foreground"||f==="editor.background"||f.startsWith("terminal.ansi"))&&!t.colors[f]?.startsWith("#")){const d=u(t.colors[f]);t.colorReplacements[d]=t.colors[f],t.colors[f]=d}return Object.defineProperty(t,ex,{enumerable:!1,writable:!1,value:!0}),t}async function l_(e){return Array.from(new Set((await Promise.all(e.filter(t=>!r_(t)).map(async t=>await n_(t).then(r=>Array.isArray(r)?r:[r])))).flat()))}async function a_(e){return(await Promise.all(e.map(async t=>i_(t)?null:um(await n_(t))))).filter(t=>!!t)}function s_(e,t){if(!t)return e;if(t[e]){const r=new Set([e]);for(;t[e];){if(e=t[e],r.has(e))throw new lt(`Circular alias \`${Array.from(r).join(" -> ")} -> ${e}\``);r.add(e)}}return e}var b5=class extends g5{_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,r,l={}){super(e),this._resolver=e,this._themes=t,this._langs=r,this._alias=l,this._themes.map(a=>this.loadTheme(a)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=um(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=lu.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=s_(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(a=>a.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const r={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const l=this.loadGrammarWithConfiguration(e.scopeName,1,r);if(l.name=e.name,this._resolvedGrammars.set(e.name,l),e.aliases&&e.aliases.forEach(a=>{this._alias[a]=e.name}),this._loadedLanguagesCache=null,t.size)for(const a of t)this._resolvedGrammars.delete(a.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(a.scopeName),this._syncRegistry?._grammars?.delete(a.scopeName),this.loadLanguage(this._langMap.get(a.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const l of e)this.resolveEmbeddedLanguages(l);const t=Array.from(this._langGraph.entries()),r=t.filter(([l,a])=>!a);if(r.length){const l=t.filter(([a,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(u=>r.map(([f])=>f).includes(u)):!1).filter(a=>!r.includes(a));throw new lt(`Missing languages ${r.map(([a])=>`\`${a}\``).join(", ")}, required by ${l.map(([a])=>`\`${a}\``).join(", ")}`)}for(const[l,a]of t)this._resolver.addLanguage(a);for(const[l,a]of t)this.loadLanguage(a)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const r of t)this._langGraph.set(r,this._langMap.get(r))}},x5=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:r=>e.createScanner(r),createOnigString:r=>e.createString(r)},t.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let r=[];for(let l=1;l<=t.length;l++){const a=t.slice(0,l).join(".");r=[...r,...this._injections.get(a)||[]]}return r}};let Ga=0;function v5(e){Ga+=1,e.warnings!==!1&&Ga>=10&&Ga%10===0&&console.warn(`[Shiki] ${Ga} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new lt("`engine` option is required for synchronous mode");const r=(e.langs||[]).flat(1),l=(e.themes||[]).flat(1).map(um),a=new b5(new x5(e.engine,r),l,r,e.langAlias);let o;function u(L){return s_(L,e.langAlias)}function f(L){R();const O=a.getGrammar(typeof L=="string"?L:L.name);if(!O)throw new lt(`Language \`${L}\` not found, you may need to load it first`);return O}function d(L){if(L==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};R();const O=a.getTheme(L);if(!O)throw new lt(`Theme \`${L}\` not found, you may need to load it first`);return O}function h(L){R();const O=d(L);return o!==L&&(a.setTheme(O),o=L),{theme:O,colorMap:a.getColorMap()}}function g(){return R(),a.getLoadedThemes()}function p(){return R(),a.getLoadedLanguages()}function b(...L){R(),a.loadLanguages(L.flat(1))}async function x(...L){return b(await l_(L))}function w(...L){R();for(const O of L.flat(1))a.loadTheme(O)}async function E(...L){return R(),w(await a_(L))}function R(){if(t)throw new lt("Shiki instance has been disposed")}function C(){t||(t=!0,a.dispose(),Ga-=1)}return{setTheme:h,getTheme:d,getLanguage:f,getLoadedThemes:g,getLoadedLanguages:p,resolveLangAlias:u,loadLanguage:x,loadLanguageSync:b,loadTheme:E,loadThemeSync:w,dispose:C,[Symbol.dispose]:C}}async function _5(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,r,l]=await Promise.all([a_(e.themes||[]),l_(e.langs||[]),e.engine]);return v5({...e,themes:t,langs:r,engine:l})}const o_=new WeakMap;function Ou(e,t){o_.set(e,t)}function rs(e){return o_.get(e)}var Nu=class u_{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,r){return new u_(Object.fromEntries(y5(r).map(l=>[l,hh])),t)}constructor(...t){if(t.length===2){const[r,l]=t;this.lang=l,this._stacks=r}else{const[r,l,a]=t;this.lang=l,this._stacks={[a]:r}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return w5(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function w5(e){const t=[],r=new Set;function l(a){if(r.has(a))return;r.add(a);const o=a?.nameScopesList?.scopeName;o&&t.push(o),a.parent&&l(a.parent)}return l(e),t}function S5(e,t){if(!(e instanceof Nu))throw new lt("Invalid grammar state");return e.getInternalStack(t)}function c_(e,t,r={}){const{theme:l=e.getLoadedThemes()[0]}=r;if(Tu(e.resolveLangAlias(r.lang||"text"))||Ru(l))return Lu(t).map(f=>[{content:f[0],offset:f[1]}]);const{theme:a,colorMap:o}=e.setTheme(l),u=e.getLanguage(r.lang||"text");if(r.grammarState){if(r.grammarState.lang!==u.name)throw new lt(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${u.name}"`);if(!r.grammarState.themes.includes(a.name))throw new lt(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return C5(t,u,a,o,r)}function E5(...e){if(e.length===2)return rs(e[1]);const[t,r,l={}]=e,{lang:a="text",theme:o=t.getLoadedThemes()[0]}=l;if(Tu(a)||Ru(o))throw new lt("Plain language does not have grammar state");if(a==="ansi")throw new lt("ANSI language does not have grammar state");const{theme:u,colorMap:f}=t.setTheme(o),d=t.getLanguage(a);return new Nu(cm(r,d,u,f,l).stateStack,d.name,u.name)}function C5(e,t,r,l,a){const o=cm(e,t,r,l,a),u=new Nu(o.stateStack,t.name,r.name);return Ou(o.tokens,u),o.tokens}function cm(e,t,r,l,a){const o=cu(r,a),{tokenizeMaxLineLength:u=0,tokenizeTimeLimit:f=500}=a,d=Lu(e);let h=a.grammarState?S5(a.grammarState,r.name)??hh:a.grammarContextCode!=null?cm(a.grammarContextCode,t,r,l,{...a,grammarState:void 0,grammarContextCode:void 0}).stateStack:hh,g=[];const p=[];for(let b=0,x=d.length;b<x;b++){const[w,E]=d[b];if(w===""){g=[],p.push([]);continue}if(u>0&&w.length>=u){g=[],p.push([{content:w,offset:E,color:"",fontStyle:0}]);continue}let R,C,L;a.includeExplanation&&(R=t.tokenizeLine(w,h,f),C=R.tokens,L=0);const O=t.tokenizeLine2(w,h,f),B=O.tokens.length/2;for(let Y=0;Y<B;Y++){const j=O.tokens[2*Y],q=Y+1<B?O.tokens[2*Y+2]:w.length;if(j===q)continue;const G=O.tokens[2*Y+1],se=ai(l[Pl.getForeground(G)],o),P=Pl.getFontStyle(G),X={content:w.substring(j,q),offset:E+j,color:se,fontStyle:P};if(a.includeExplanation){const te=[];if(a.includeExplanation!=="scopeName")for(const le of r.settings){let ne;switch(typeof le.scope){case"string":ne=le.scope.split(/,/).map(z=>z.trim());break;case"object":ne=le.scope;break;default:continue}te.push({settings:le,selectors:ne.map(z=>z.split(/ /))})}X.explanation=[];let de=0;for(;j+de<q;){const le=C[L],ne=w.substring(le.startIndex,le.endIndex);de+=ne.length,X.explanation.push({content:ne,scopes:a.includeExplanation==="scopeName"?k5(le.scopes):A5(te,le.scopes)}),L+=1}}g.push(X)}p.push(g),g=[],h=O.ruleStack}return{tokens:p,stateStack:h}}function k5(e){return e.map(t=>({scopeName:t}))}function A5(e,t){const r=[];for(let l=0,a=t.length;l<a;l++){const o=t[l];r[l]={scopeName:o,themeMatches:R5(e,o,t.slice(0,l))}}return r}function tx(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function T5(e,t,r){if(!tx(e[e.length-1],t))return!1;let l=e.length-2,a=r.length-1;for(;l>=0&&a>=0;)tx(e[l],r[a])&&(l-=1),a-=1;return l===-1}function R5(e,t,r){const l=[];for(const{selectors:a,settings:o}of e)for(const u of a)if(T5(u,t,r)){l.push(o);break}return l}function f_(e,t,r,l=c_){const a=Object.entries(r.themes).filter(h=>h[1]).map(h=>({color:h[0],theme:h[1]})),o=a.map(h=>{const g=l(e,t,{...r,theme:h.theme});return{tokens:g,state:rs(g),theme:typeof h.theme=="string"?h.theme:h.theme.name}}),u=L5(...o.map(h=>h.tokens)),f=u[0].map((h,g)=>h.map((p,b)=>{const x={content:p.content,variants:{},offset:p.offset};return"includeExplanation"in r&&r.includeExplanation&&(x.explanation=p.explanation),u.forEach((w,E)=>{const{content:R,explanation:C,offset:L,...O}=w[g][b];x.variants[a[E].color]=O}),x})),d=o[0].state?new Nu(Object.fromEntries(o.map(h=>[h.theme,h.state?.getInternalStack(h.theme)])),o[0].state.lang):void 0;return d&&Ou(f,d),f}function L5(...e){const t=e.map(()=>[]),r=e.length;for(let l=0;l<e[0].length;l++){const a=e.map(d=>d[l]),o=t.map(()=>[]);t.forEach((d,h)=>d.push(o[h]));const u=a.map(()=>0),f=a.map(d=>d[0]);for(;f.every(d=>d);){const d=Math.min(...f.map(h=>h.content.length));for(let h=0;h<r;h++){const g=f[h];g.content.length===d?(o[h].push(g),u[h]+=1,f[h]=a[h][u[h]]):(o[h].push({...g,content:g.content.slice(0,d)}),f[h]={...g,content:g.content.slice(d),offset:g.offset+d})}}}return t}const O5=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],N5=/["&'<>`]/g,D5=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,M5=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,j5=/[|\\{}()[\]^$+*?.]/g,nx=new WeakMap;function z5(e,t){if(e=e.replace(t.subset?I5(t.subset):N5,l),t.subset||t.escapeOnly)return e;return e.replace(D5,r).replace(M5,l);function r(a,o,u){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,u.charCodeAt(o+2),t)}function l(a,o,u){return t.format(a.charCodeAt(0),u.charCodeAt(o+1),t)}}function I5(e){let t=nx.get(e);return t||(t=P5(e),nx.set(e,t)),t}function P5(e){const t=[];let r=-1;for(;++r<e.length;)t.push(e[r].replace(j5,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const B5=/[\dA-Fa-f]/;function U5(e,t,r){const l="&#x"+e.toString(16).toUpperCase();return r&&t&&!B5.test(String.fromCharCode(t))?l:l+";"}const V5=/\d/;function H5(e,t,r){const l="&#"+String(e);return r&&t&&!V5.test(String.fromCharCode(t))?l:l+";"}const G5=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Rd={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},F5=["cent","copy","divide","gt","lt","not","para","times"],d_={}.hasOwnProperty,mh={};let Po;for(Po in Rd)d_.call(Rd,Po)&&(mh[Rd[Po]]=Po);const q5=/[^\dA-Za-z]/;function $5(e,t,r,l){const a=String.fromCharCode(e);if(d_.call(mh,a)){const o=mh[a],u="&"+o;return r&&G5.includes(o)&&!F5.includes(o)&&(!l||t&&t!==61&&q5.test(String.fromCharCode(t)))?u:u+";"}return""}function Q5(e,t,r){let l=U5(e,t,r.omitOptionalSemicolons),a;if((r.useNamedReferences||r.useShortestReferences)&&(a=$5(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!a)&&r.useShortestReferences){const o=H5(e,t,r.omitOptionalSemicolons);o.length<l.length&&(l=o)}return a&&(!r.useShortestReferences||a.length<l.length)?a:l}function jl(e,t){return z5(e,Object.assign({format:Q5},t))}const Y5=/^>|^->|<!--|-->|--!>|<!-$/g,X5=[">"],K5=["<",">"];function Z5(e,t,r,l){return l.settings.bogusComments?"<?"+jl(e.value,Object.assign({},l.settings.characterReferences,{subset:X5}))+">":"<!--"+e.value.replace(Y5,a)+"-->";function a(o){return jl(o,Object.assign({},l.settings.characterReferences,{subset:K5}))}}function J5(e,t,r,l){return"<!"+(l.settings.upperDoctype?"DOCTYPE":"doctype")+(l.settings.tightDoctype?"":" ")+"html>"}const Lt=m_(1),h_=m_(-1),W5=[];function m_(e){return t;function t(r,l,a){const o=r?r.children:W5;let u=(l||0)+e,f=o[u];if(!a)for(;f&&xu(f);)u+=e,f=o[u];return f}}const eM={}.hasOwnProperty;function p_(e){return t;function t(r,l,a){return eM.call(e,r.tagName)&&e[r.tagName](r,l,a)}}const fm=p_({body:nM,caption:Ld,colgroup:Ld,dd:aM,dt:lM,head:Ld,html:tM,li:iM,optgroup:sM,option:oM,p:rM,rp:rx,rt:rx,tbody:cM,td:ix,tfoot:fM,th:ix,thead:uM,tr:dM});function Ld(e,t,r){const l=Lt(r,t,!0);return!l||l.type!=="comment"&&!(l.type==="text"&&xu(l.value.charAt(0)))}function tM(e,t,r){const l=Lt(r,t);return!l||l.type!=="comment"}function nM(e,t,r){const l=Lt(r,t);return!l||l.type!=="comment"}function rM(e,t,r){const l=Lt(r,t);return l?l.type==="element"&&(l.tagName==="address"||l.tagName==="article"||l.tagName==="aside"||l.tagName==="blockquote"||l.tagName==="details"||l.tagName==="div"||l.tagName==="dl"||l.tagName==="fieldset"||l.tagName==="figcaption"||l.tagName==="figure"||l.tagName==="footer"||l.tagName==="form"||l.tagName==="h1"||l.tagName==="h2"||l.tagName==="h3"||l.tagName==="h4"||l.tagName==="h5"||l.tagName==="h6"||l.tagName==="header"||l.tagName==="hgroup"||l.tagName==="hr"||l.tagName==="main"||l.tagName==="menu"||l.tagName==="nav"||l.tagName==="ol"||l.tagName==="p"||l.tagName==="pre"||l.tagName==="section"||l.tagName==="table"||l.tagName==="ul"):!r||!(r.type==="element"&&(r.tagName==="a"||r.tagName==="audio"||r.tagName==="del"||r.tagName==="ins"||r.tagName==="map"||r.tagName==="noscript"||r.tagName==="video"))}function iM(e,t,r){const l=Lt(r,t);return!l||l.type==="element"&&l.tagName==="li"}function lM(e,t,r){const l=Lt(r,t);return!!(l&&l.type==="element"&&(l.tagName==="dt"||l.tagName==="dd"))}function aM(e,t,r){const l=Lt(r,t);return!l||l.type==="element"&&(l.tagName==="dt"||l.tagName==="dd")}function rx(e,t,r){const l=Lt(r,t);return!l||l.type==="element"&&(l.tagName==="rp"||l.tagName==="rt")}function sM(e,t,r){const l=Lt(r,t);return!l||l.type==="element"&&l.tagName==="optgroup"}function oM(e,t,r){const l=Lt(r,t);return!l||l.type==="element"&&(l.tagName==="option"||l.tagName==="optgroup")}function uM(e,t,r){const l=Lt(r,t);return!!(l&&l.type==="element"&&(l.tagName==="tbody"||l.tagName==="tfoot"))}function cM(e,t,r){const l=Lt(r,t);return!l||l.type==="element"&&(l.tagName==="tbody"||l.tagName==="tfoot")}function fM(e,t,r){return!Lt(r,t)}function dM(e,t,r){const l=Lt(r,t);return!l||l.type==="element"&&l.tagName==="tr"}function ix(e,t,r){const l=Lt(r,t);return!l||l.type==="element"&&(l.tagName==="td"||l.tagName==="th")}const hM=p_({body:gM,colgroup:yM,head:pM,html:mM,tbody:bM});function mM(e){const t=Lt(e,-1);return!t||t.type!=="comment"}function pM(e){const t=new Set;for(const l of e.children)if(l.type==="element"&&(l.tagName==="base"||l.tagName==="title")){if(t.has(l.tagName))return!1;t.add(l.tagName)}const r=e.children[0];return!r||r.type==="element"}function gM(e){const t=Lt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&xu(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function yM(e,t,r){const l=h_(r,t),a=Lt(e,-1,!0);return r&&l&&l.type==="element"&&l.tagName==="colgroup"&&fm(l,r.children.indexOf(l),r)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function bM(e,t,r){const l=h_(r,t),a=Lt(e,-1);return r&&l&&l.type==="element"&&(l.tagName==="thead"||l.tagName==="tbody")&&fm(l,r.children.indexOf(l),r)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}const Bo={name:[[`
|
|
50
51
|
\f\r &/=>`.split(""),`
|
|
51
52
|
\f\r "&'/=>\``.split("")],[`\0
|
|
52
53
|
\f\r "&'/<=>`.split(""),`\0
|
|
@@ -54,8 +55,8 @@ Error generating stack: `+c.message+`
|
|
|
54
55
|
\f\r &>`.split(""),`\0
|
|
55
56
|
\f\r "&'<=>\``.split("")],[`\0
|
|
56
57
|
\f\r "&'<=>\``.split(""),`\0
|
|
57
|
-
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function vM(e,t,r,l){const a=l.schema,o=a.space==="svg"?!1:l.settings.omitOptionalTags;let u=a.space==="svg"?l.settings.closeEmptyElements:l.settings.voids.includes(e.tagName.toLowerCase());const f=[];let d;a.space==="html"&&e.tagName==="svg"&&(l.schema=os);const h=_M(l,e.properties),g=l.all(a.space==="html"&&e.tagName==="template"?e.content:e);return l.schema=a,g&&(u=!1),(h||!o||!mM(e,t,r))&&(f.push("<",e.tagName,h?" "+h:""),u&&(a.space==="svg"||l.settings.closeSelfClosing)&&(d=h.charAt(h.length-1),(!l.settings.tightSelfClosing||d==="/"||d&&d!=='"'&&d!=="'")&&f.push(" "),f.push("/")),f.push(">")),f.push(g),!u&&(!o||!fm(e,t,r))&&f.push("</"+e.tagName+">"),f.join("")}function _M(e,t){const r=[];let l=-1,a;if(t){for(a in t)if(t[a]!==null&&t[a]!==void 0){const o=wM(e,a,t[a]);o&&r.push(o)}}for(;++l<r.length;){const o=e.settings.tightAttributes?r[l].charAt(r[l].length-1):void 0;l!==r.length-1&&o!=='"'&&o!=="'"&&(r[l]+=" ")}return r.join("")}function wM(e,t,r){const l=zv(e.schema,t),a=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let u=e.quote,f;if(l.overloadedBoolean&&(r===l.attribute||r==="")?r=!0:(l.boolean||l.overloadedBoolean)&&(typeof r!="string"||r===l.attribute||r==="")&&(r=!!r),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";const d=jl(l.attribute,Object.assign({},e.settings.characterReferences,{subset:Bo.name[a][o]}));return r===!0||(r=Array.isArray(r)?(l.commaSeparated?Tv:Pv)(r,{padLeft:!e.settings.tightCommaSeparatedLists}):String(r),e.settings.collapseEmptyAttributes&&!r)?d:(e.settings.preferUnquoted&&(f=jl(r,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Bo.unquoted[a][o]}))),f!==r&&(e.settings.quoteSmart&&ru(r,u)>ru(r,e.alternative)&&(u=e.alternative),f=u+jl(r,Object.assign({},e.settings.characterReferences,{subset:(u==="'"?Bo.single:Bo.double)[a][o],attribute:!0}))+u),d+(f&&"="+f))}const SM=["<","&"];function g_(e,t,r,l){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?e.value:jl(e.value,Object.assign({},l.settings.characterReferences,{subset:SM}))}function EM(e,t,r,l){return l.settings.allowDangerousHtml?e.value:g_(e,t,r,l)}function CM(e,t,r,l){return l.all(e)}const kM=zO("type",{invalid:AM,unknown:TM,handlers:{comment:J5,doctype:W5,element:vM,raw:EM,root:CM,text:g_}});function AM(e){throw new Error("Expected node, not `"+e+"`")}function TM(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const RM={},LM={},OM=[];function NM(e,t){const r=t||RM,l=r.quote||'"',a=l==='"'?"'":'"';if(l!=='"'&&l!=="'")throw new Error("Invalid quote `"+l+"`, expected `'` or `\"`");return{one:DM,all:MM,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||N5,characterReferences:r.characterReferences||LM,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?os:Iv,quote:l,alternative:a}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function DM(e,t,r){return kM(e,t,r,this)}function MM(e){const t=[],r=e&&e.children||OM;let l=-1;for(;++l<r.length;)t[l]=this.one(r[l],l,e);return t.join("")}function y_(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const r=Array.isArray(t)?t:t.split(/\s+/g);for(const l of r)l&&!e.properties.class.includes(l)&&e.properties.class.push(l);return e}function jM(e){const t=Lu(e,!0).map(([a])=>a);function r(a){if(a===e.length)return{line:t.length-1,character:t[t.length-1].length};let o=a,u=0;for(const f of t){if(o<f.length)break;o-=f.length,u++}return{line:u,character:o}}function l(a,o){let u=0;for(let f=0;f<a;f++)u+=t[f].length;return u+=o,u}return{lines:t,indexToPos:r,posToIndex:l}}function zM(e,t,r){const l=new Set;for(const o of e.matchAll(/:?lang=["']([^"']+)["']/g)){const u=o[1].toLowerCase().trim();u&&l.add(u)}for(const o of e.matchAll(/(?:```|~~~)([\w-]+)/g)){const u=o[1].toLowerCase().trim();u&&l.add(u)}for(const o of e.matchAll(/\\begin\{([\w-]+)\}/g)){const u=o[1].toLowerCase().trim();u&&l.add(u)}for(const o of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const u=o[1].toLowerCase().trim(),f=u.includes("/")?u.split("/").pop():u;f&&l.add(f)}if(!r)return Array.from(l);const a=r.getBundledLanguages();return Array.from(l).filter(o=>o&&a[o])}const dm="light-dark()",IM=["color","background-color"];function PM(e,t){let r=0;const l=[];for(const a of t)a>r&&l.push({...e,content:e.content.slice(r,a),offset:e.offset+r}),r=a;return r<e.content.length&&l.push({...e,content:e.content.slice(r),offset:e.offset+r}),l}function BM(e,t){const r=Array.from(t instanceof Set?t:new Set(t)).sort((l,a)=>l-a);return r.length?e.map(l=>l.flatMap(a=>{const o=r.filter(u=>a.offset<u&&u<a.offset+a.content.length).map(u=>u-a.offset).sort((u,f)=>u-f);return o.length?PM(a,o):a})):e}function UM(e,t,r,l,a="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},u=t.map(g=>fu(e.variants[g])),f=new Set(u.flatMap(g=>Object.keys(g))),d={},h=(g,p)=>{const b=p==="color"?"":p==="background-color"?"-bg":`-${p}`;return r+t[g]+(p==="color"?"":b)};return u.forEach((g,p)=>{for(const b of f){const x=g[b]||"inherit";if(p===0&&l&&IM.includes(b))if(l===dm&&u.length>1){const w=t.findIndex(R=>R==="light"),E=t.findIndex(R=>R==="dark");if(w===-1||E===-1)throw new it('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');d[b]=`light-dark(${u[w][b]||"inherit"}, ${u[E][b]||"inherit"})`,a==="css-vars"&&(d[h(p,b)]=x)}else d[b]=x;else a==="css-vars"&&(d[h(p,b)]=x)}}),o.htmlStyle=d,o}function fu(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&qt.Italic&&(t["font-style"]="italic"),e.fontStyle&qt.Bold&&(t["font-weight"]="bold");const r=[];e.fontStyle&qt.Underline&&r.push("underline"),e.fontStyle&qt.Strikethrough&&r.push("line-through"),r.length&&(t["text-decoration"]=r.join(" "))}return t}function ph(e){return typeof e=="string"?e:Object.entries(e).map(([t,r])=>`${t}:${r}`).join(";")}function VM(){const e=new WeakMap;function t(r){if(!e.has(r.meta)){let o=function(f){if(typeof f=="number"){if(f<0||f>r.source.length)throw new it(`Invalid decoration offset: ${f}. Code length: ${r.source.length}`);return{...a.indexToPos(f),offset:f}}else{const d=a.lines[f.line];if(d===void 0)throw new it(`Invalid decoration position ${JSON.stringify(f)}. Lines length: ${a.lines.length}`);let h=f.character;if(h<0&&(h=d.length+h),h<0||h>d.length)throw new it(`Invalid decoration position ${JSON.stringify(f)}. Line ${f.line} length: ${d.length}`);return{...f,character:h,offset:a.posToIndex(f.line,h)}}};var l=o;const a=jM(r.source),u=(r.options.decorations||[]).map(f=>({...f,start:o(f.start),end:o(f.end)}));HM(u),e.set(r.meta,{decorations:u,converter:a,source:r.source})}return e.get(r.meta)}return{name:"shiki:decorations",tokens(r){if(this.options.decorations?.length)return BM(r,t(this).decorations.flatMap(l=>[l.start.offset,l.end.offset]))},code(r){if(!this.options.decorations?.length)return;const l=t(this),a=Array.from(r.children).filter(g=>g.type==="element"&&g.tagName==="span");if(a.length!==l.converter.lines.length)throw new it(`Number of lines in code element (${a.length}) does not match the number of lines in the source (${l.converter.lines.length}). Failed to apply decorations.`);function o(g,p,b,x){const w=a[g];let E="",R=-1,C=-1;if(p===0&&(R=0),b===0&&(C=0),b===Number.POSITIVE_INFINITY&&(C=w.children.length),R===-1||C===-1)for(let O=0;O<w.children.length;O++)E+=b_(w.children[O]),R===-1&&E.length===p&&(R=O+1),C===-1&&E.length===b&&(C=O+1);if(R===-1)throw new it(`Failed to find start index for decoration ${JSON.stringify(x.start)}`);if(C===-1)throw new it(`Failed to find end index for decoration ${JSON.stringify(x.end)}`);const L=w.children.slice(R,C);if(!x.alwaysWrap&&L.length===w.children.length)f(w,x,"line");else if(!x.alwaysWrap&&L.length===1&&L[0].type==="element")f(L[0],x,"token");else{const O={type:"element",tagName:"span",properties:{},children:L};f(O,x,"wrapper"),w.children.splice(R,L.length,O)}}function u(g,p){a[g]=f(a[g],p,"line")}function f(g,p,b){const x=p.properties||{},w=p.transform||(E=>E);return g.tagName=p.tagName||"span",g.properties={...g.properties,...x,class:g.properties.class},p.properties?.class&&y_(g,p.properties.class),g=w(g,b)||g,g}const d=[],h=l.decorations.sort((g,p)=>p.start.offset-g.start.offset||g.end.offset-p.end.offset);for(const g of h){const{start:p,end:b}=g;if(p.line===b.line)o(p.line,p.character,b.character,g);else if(p.line<b.line){o(p.line,p.character,Number.POSITIVE_INFINITY,g);for(let x=p.line+1;x<b.line;x++)d.unshift(()=>u(x,g));o(b.line,0,b.character,g)}}d.forEach(g=>g())}}}function HM(e){for(let t=0;t<e.length;t++){const r=e[t];if(r.start.offset>r.end.offset)throw new it(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let l=t+1;l<e.length;l++){const a=e[l],o=r.start.offset<=a.start.offset&&a.start.offset<r.end.offset,u=r.start.offset<a.end.offset&&a.end.offset<=r.end.offset,f=a.start.offset<=r.start.offset&&r.start.offset<a.end.offset,d=a.start.offset<r.end.offset&&r.end.offset<=a.end.offset;if(o||u||f||d){if(o&&u||f&&d||f&&r.start.offset===r.end.offset||u&&a.start.offset===a.end.offset)continue;throw new it(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(a.start)} intersect.`)}}}}function b_(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(b_).join(""):""}const GM=[VM()];function du(e){const t=FM(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...GM]}function FM(e){const t=[],r=[],l=[];for(const a of e)switch(a.enforce){case"pre":t.push(a);break;case"post":r.push(a);break;default:l.push(a)}return{pre:t,post:r,normal:l}}var Di=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Od={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function qM(e,t){const r=e.indexOf("\x1B",t);if(r!==-1&&e[r+1]==="["){const l=e.indexOf("m",r);if(l!==-1)return{sequence:e.substring(r+2,l).split(";"),startPosition:r,position:l+1}}return{position:e.length}}function lx(e){const t=e.shift();if(t==="2"){const r=e.splice(0,3).map(l=>Number.parseInt(l));return r.length!==3||r.some(l=>Number.isNaN(l))?void 0:{type:"rgb",rgb:r}}else if(t==="5"){const r=e.shift();if(r)return{type:"table",index:Number(r)}}}function $M(e){const t=[];for(;e.length>0;){const r=e.shift();if(!r)continue;const l=Number.parseInt(r);if(!Number.isNaN(l))if(l===0)t.push({type:"resetAll"});else if(l<=9)Od[l]&&t.push({type:"setDecoration",value:Od[l]});else if(l<=29){const a=Od[l-20];a&&(t.push({type:"resetDecoration",value:a}),a==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(l<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Di[l-30]}});else if(l===38){const a=lx(e);a&&t.push({type:"setForegroundColor",value:a})}else if(l===39)t.push({type:"resetForegroundColor"});else if(l<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Di[l-40]}});else if(l===48){const a=lx(e);a&&t.push({type:"setBackgroundColor",value:a})}else l===49?t.push({type:"resetBackgroundColor"}):l===53?t.push({type:"setDecoration",value:"overline"}):l===55?t.push({type:"resetDecoration",value:"overline"}):l>=90&&l<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Di[l-90+8]}}):l>=100&&l<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Di[l-100+8]}})}return t}function QM(){let e=null,t=null,r=new Set;return{parse(l){const a=[];let o=0;do{const u=qM(l,o),f=u.sequence?l.substring(o,u.startPosition):l.substring(o);if(f.length>0&&a.push({value:f,foreground:e,background:t,decorations:new Set(r)}),u.sequence){const d=$M(u.sequence);for(const h of d)h.type==="resetAll"?(e=null,t=null,r.clear()):h.type==="resetForegroundColor"?e=null:h.type==="resetBackgroundColor"?t=null:h.type==="resetDecoration"&&r.delete(h.value);for(const h of d)h.type==="setForegroundColor"?e=h.value:h.type==="setBackgroundColor"?t=h.value:h.type==="setDecoration"&&r.add(h.value)}o=u.position}while(o<l.length);return a}}}var YM={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function XM(e=YM){function t(f){return e[f]}function r(f){return`#${f.map(d=>Math.max(0,Math.min(d,255)).toString(16).padStart(2,"0")).join("")}`}let l;function a(){if(l)return l;l=[];for(let h=0;h<Di.length;h++)l.push(t(Di[h]));let f=[0,95,135,175,215,255];for(let h=0;h<6;h++)for(let g=0;g<6;g++)for(let p=0;p<6;p++)l.push(r([f[h],f[g],f[p]]));let d=8;for(let h=0;h<24;h++,d+=10)l.push(r([d,d,d]));return l}function o(f){return a()[f]}function u(f){switch(f.type){case"named":return t(f.name);case"rgb":return r(f.rgb);case"table":return o(f.index)}}return{value:u}}const KM={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function ZM(e,t,r){const l=cu(e,r),a=Lu(t),o=XM(Object.fromEntries(Di.map(f=>{const d=`terminal.ansi${f[0].toUpperCase()}${f.substring(1)}`;return[f,e.colors?.[d]||KM[f]]}))),u=QM();return a.map(f=>u.parse(f[0]).map(d=>{let h,g;d.decorations.has("reverse")?(h=d.background?o.value(d.background):e.bg,g=d.foreground?o.value(d.foreground):e.fg):(h=d.foreground?o.value(d.foreground):e.fg,g=d.background?o.value(d.background):void 0),h=ai(h,l),g=ai(g,l),d.decorations.has("dim")&&(h=JM(h));let p=qt.None;return d.decorations.has("bold")&&(p|=qt.Bold),d.decorations.has("italic")&&(p|=qt.Italic),d.decorations.has("underline")&&(p|=qt.Underline),d.decorations.has("strikethrough")&&(p|=qt.Strikethrough),{content:d.value,offset:f[1],color:h,bgColor:g,fontStyle:p}}))}function JM(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const l=t[1];if(l.length===8){const a=Math.round(Number.parseInt(l.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${l.slice(0,6)}${a}`}else{if(l.length===6)return`#${l}80`;if(l.length===4){const a=l[0],o=l[1],u=l[2],f=l[3];return`#${a}${a}${o}${o}${u}${u}${Math.round(Number.parseInt(`${f}${f}`,16)/2).toString(16).padStart(2,"0")}`}else if(l.length===3){const a=l[0],o=l[1],u=l[2];return`#${a}${a}${o}${o}${u}${u}80`}}}const r=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return r?`var(${r[1]}-dim)`:e}function gh(e,t,r={}){const l=e.resolveLangAlias(r.lang||"text"),{theme:a=e.getLoadedThemes()[0]}=r;if(!Tu(l)&&!Ru(a)&&l==="ansi"){const{theme:o}=e.setTheme(a);return ZM(o,t,r)}return c_(e,t,r)}function hu(e,t,r){let l,a,o,u,f,d;if("themes"in r){const{defaultColor:h="light",cssVariablePrefix:g="--shiki-",colorsRendering:p="css-vars"}=r,b=Object.entries(r.themes).filter(C=>C[1]).map(C=>({color:C[0],theme:C[1]})).sort((C,L)=>C.color===h?-1:L.color===h?1:0);if(b.length===0)throw new it("`themes` option must not be empty");const x=f_(e,t,r,gh);if(d=ns(x),h&&dm!==h&&!b.find(C=>C.color===h))throw new it(`\`themes\` option must contain the defaultColor key \`${h}\``);const w=b.map(C=>e.getTheme(C.theme)),E=b.map(C=>C.color);o=x.map(C=>C.map(L=>UM(L,E,g,h,p))),d&&Ou(o,d);const R=b.map(C=>cu(C.theme,r));a=ax(b,w,R,g,h,"fg",p),l=ax(b,w,R,g,h,"bg",p),u=`shiki-themes ${w.map(C=>C.name).join(" ")}`,f=h?void 0:[a,l].join(";")}else if("theme"in r){const h=cu(r.theme,r);o=gh(e,t,r);const g=e.getTheme(r.theme);l=ai(g.bg,h),a=ai(g.fg,h),u=g.name,d=ns(o)}else throw new it("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:a,bg:l,themeName:u,rootStyle:f,grammarState:d}}function ax(e,t,r,l,a,o,u){return e.map((f,d)=>{const h=ai(t[d][o],r[d])||"inherit",g=`${l+f.color}${o==="bg"?"-bg":""}:${h}`;if(d===0&&a){if(a===dm&&e.length>1){const p=e.findIndex(x=>x.color==="light"),b=e.findIndex(x=>x.color==="dark");if(p===-1||b===-1)throw new it('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${ai(t[p][o],r[p])||"inherit"}, ${ai(t[b][o],r[b])||"inherit"});${g}`}return h}return u==="css-vars"?g:null}).filter(f=>!!f).join(";")}function mu(e,t,r,l={meta:{},options:r,codeToHast:(a,o)=>mu(e,a,o),codeToTokens:(a,o)=>hu(e,a,o)}){let a=t;for(const w of du(r))a=w.preprocess?.call(l,a,r)||a;let{tokens:o,fg:u,bg:f,themeName:d,rootStyle:h,grammarState:g}=hu(e,a,r);const{mergeWhitespaces:p=!0,mergeSameStyleTokens:b=!1}=r;p===!0?o=ej(o):p==="never"&&(o=tj(o)),b&&(o=nj(o));const x={...l,get source(){return a}};for(const w of du(r))o=w.tokens?.call(x,o)||o;return WM(o,{...r,fg:u,bg:f,themeName:d,rootStyle:r.rootStyle===!1?!1:r.rootStyle??h},x,g)}function WM(e,t,r,l=ns(e)){const a=du(t),o=[],u={type:"root",children:[]},{structure:f="classic",tabindex:d="0"}=t,h={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?h.style=t.rootStyle:h.style=`background-color:${t.bg};color:${t.fg}`),d!==!1&&d!=null&&(h.tabindex=d.toString());for(const[E,R]of Object.entries(t.meta||{}))E.startsWith("_")||(h[E]=R);let g={type:"element",tagName:"pre",properties:h,children:[],data:t.data},p={type:"element",tagName:"code",properties:{},children:o};const b=[],x={...r,structure:f,addClassToHast:y_,get source(){return r.source},get tokens(){return e},get options(){return t},get root(){return u},get pre(){return g},get code(){return p},get lines(){return b}};if(e.forEach((E,R)=>{R&&(f==="inline"?u.children.push({type:"element",tagName:"br",properties:{},children:[]}):f==="classic"&&o.push({type:"text",value:`
|
|
58
|
-
`}));let C={type:"element",tagName:"span",properties:{class:"line"},children:[]},L=0;for(const O of E){let B={type:"element",tagName:"span",properties:{...O.htmlAttrs},children:[{type:"text",value:O.content}]};const Y=ph(O.htmlStyle||fu(O));Y&&(B.properties.style=Y);for(const j of a)B=j?.span?.call(x,B,R+1,L,C,O)||B;f==="inline"?u.children.push(B):f==="classic"&&C.children.push(B),L+=O.content.length}if(f==="classic"){for(const O of a)C=O?.line?.call(x,C,R+1)||C;b.push(C),o.push(C)}else f==="inline"&&b.push(C)}),f==="classic"){for(const E of a)p=E?.code?.call(x,p)||p;g.children.push(p);for(const E of a)g=E?.pre?.call(x,g)||g;u.children.push(g)}else if(f==="inline"){const E=[];let R={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const L of u.children)L.type==="element"&&L.tagName==="br"?(E.push(R),R={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(L.type==="element"||L.type==="text")&&R.children.push(L);E.push(R);let C={type:"element",tagName:"code",properties:{},children:E};for(const L of a)C=L?.code?.call(x,C)||C;u.children=[];for(let L=0;L<C.children.length;L++){L>0&&u.children.push({type:"element",tagName:"br",properties:{},children:[]});const O=C.children[L];O.type==="element"&&u.children.push(...O.children)}}let w=u;for(const E of a)w=E?.root?.call(x,w)||w;return l&&Ou(w,l),w}function
|
|
58
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function xM(e,t,r,l){const a=l.schema,o=a.space==="svg"?!1:l.settings.omitOptionalTags;let u=a.space==="svg"?l.settings.closeEmptyElements:l.settings.voids.includes(e.tagName.toLowerCase());const f=[];let d;a.space==="html"&&e.tagName==="svg"&&(l.schema=us);const h=vM(l,e.properties),g=l.all(a.space==="html"&&e.tagName==="template"?e.content:e);return l.schema=a,g&&(u=!1),(h||!o||!hM(e,t,r))&&(f.push("<",e.tagName,h?" "+h:""),u&&(a.space==="svg"||l.settings.closeSelfClosing)&&(d=h.charAt(h.length-1),(!l.settings.tightSelfClosing||d==="/"||d&&d!=='"'&&d!=="'")&&f.push(" "),f.push("/")),f.push(">")),f.push(g),!u&&(!o||!fm(e,t,r))&&f.push("</"+e.tagName+">"),f.join("")}function vM(e,t){const r=[];let l=-1,a;if(t){for(a in t)if(t[a]!==null&&t[a]!==void 0){const o=_M(e,a,t[a]);o&&r.push(o)}}for(;++l<r.length;){const o=e.settings.tightAttributes?r[l].charAt(r[l].length-1):void 0;l!==r.length-1&&o!=='"'&&o!=="'"&&(r[l]+=" ")}return r.join("")}function _M(e,t,r){const l=zv(e.schema,t),a=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let u=e.quote,f;if(l.overloadedBoolean&&(r===l.attribute||r==="")?r=!0:(l.boolean||l.overloadedBoolean)&&(typeof r!="string"||r===l.attribute||r==="")&&(r=!!r),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";const d=jl(l.attribute,Object.assign({},e.settings.characterReferences,{subset:Bo.name[a][o]}));return r===!0||(r=Array.isArray(r)?(l.commaSeparated?Tv:Pv)(r,{padLeft:!e.settings.tightCommaSeparatedLists}):String(r),e.settings.collapseEmptyAttributes&&!r)?d:(e.settings.preferUnquoted&&(f=jl(r,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Bo.unquoted[a][o]}))),f!==r&&(e.settings.quoteSmart&&ru(r,u)>ru(r,e.alternative)&&(u=e.alternative),f=u+jl(r,Object.assign({},e.settings.characterReferences,{subset:(u==="'"?Bo.single:Bo.double)[a][o],attribute:!0}))+u),d+(f&&"="+f))}const wM=["<","&"];function g_(e,t,r,l){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?e.value:jl(e.value,Object.assign({},l.settings.characterReferences,{subset:wM}))}function SM(e,t,r,l){return l.settings.allowDangerousHtml?e.value:g_(e,t,r,l)}function EM(e,t,r,l){return l.all(e)}const CM=jO("type",{invalid:kM,unknown:AM,handlers:{comment:Z5,doctype:J5,element:xM,raw:SM,root:EM,text:g_}});function kM(e){throw new Error("Expected node, not `"+e+"`")}function AM(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const TM={},RM={},LM=[];function OM(e,t){const r=t||TM,l=r.quote||'"',a=l==='"'?"'":'"';if(l!=='"'&&l!=="'")throw new Error("Invalid quote `"+l+"`, expected `'` or `\"`");return{one:NM,all:DM,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||O5,characterReferences:r.characterReferences||RM,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?us:Iv,quote:l,alternative:a}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function NM(e,t,r){return CM(e,t,r,this)}function DM(e){const t=[],r=e&&e.children||LM;let l=-1;for(;++l<r.length;)t[l]=this.one(r[l],l,e);return t.join("")}function y_(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const r=Array.isArray(t)?t:t.split(/\s+/g);for(const l of r)l&&!e.properties.class.includes(l)&&e.properties.class.push(l);return e}function MM(e){const t=Lu(e,!0).map(([a])=>a);function r(a){if(a===e.length)return{line:t.length-1,character:t[t.length-1].length};let o=a,u=0;for(const f of t){if(o<f.length)break;o-=f.length,u++}return{line:u,character:o}}function l(a,o){let u=0;for(let f=0;f<a;f++)u+=t[f].length;return u+=o,u}return{lines:t,indexToPos:r,posToIndex:l}}function jM(e,t,r){const l=new Set;for(const o of e.matchAll(/:?lang=["']([^"']+)["']/g)){const u=o[1].toLowerCase().trim();u&&l.add(u)}for(const o of e.matchAll(/(?:```|~~~)([\w-]+)/g)){const u=o[1].toLowerCase().trim();u&&l.add(u)}for(const o of e.matchAll(/\\begin\{([\w-]+)\}/g)){const u=o[1].toLowerCase().trim();u&&l.add(u)}for(const o of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const u=o[1].toLowerCase().trim(),f=u.includes("/")?u.split("/").pop():u;f&&l.add(f)}if(!r)return Array.from(l);const a=r.getBundledLanguages();return Array.from(l).filter(o=>o&&a[o])}const dm="light-dark()",zM=["color","background-color"];function IM(e,t){let r=0;const l=[];for(const a of t)a>r&&l.push({...e,content:e.content.slice(r,a),offset:e.offset+r}),r=a;return r<e.content.length&&l.push({...e,content:e.content.slice(r),offset:e.offset+r}),l}function PM(e,t){const r=Array.from(t instanceof Set?t:new Set(t)).sort((l,a)=>l-a);return r.length?e.map(l=>l.flatMap(a=>{const o=r.filter(u=>a.offset<u&&u<a.offset+a.content.length).map(u=>u-a.offset).sort((u,f)=>u-f);return o.length?IM(a,o):a})):e}function BM(e,t,r,l,a="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},u=t.map(g=>fu(e.variants[g])),f=new Set(u.flatMap(g=>Object.keys(g))),d={},h=(g,p)=>{const b=p==="color"?"":p==="background-color"?"-bg":`-${p}`;return r+t[g]+(p==="color"?"":b)};return u.forEach((g,p)=>{for(const b of f){const x=g[b]||"inherit";if(p===0&&l&&zM.includes(b))if(l===dm&&u.length>1){const w=t.findIndex(R=>R==="light"),E=t.findIndex(R=>R==="dark");if(w===-1||E===-1)throw new lt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');d[b]=`light-dark(${u[w][b]||"inherit"}, ${u[E][b]||"inherit"})`,a==="css-vars"&&(d[h(p,b)]=x)}else d[b]=x;else a==="css-vars"&&(d[h(p,b)]=x)}}),o.htmlStyle=d,o}function fu(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Qt.Italic&&(t["font-style"]="italic"),e.fontStyle&Qt.Bold&&(t["font-weight"]="bold");const r=[];e.fontStyle&Qt.Underline&&r.push("underline"),e.fontStyle&Qt.Strikethrough&&r.push("line-through"),r.length&&(t["text-decoration"]=r.join(" "))}return t}function ph(e){return typeof e=="string"?e:Object.entries(e).map(([t,r])=>`${t}:${r}`).join(";")}function UM(){const e=new WeakMap;function t(r){if(!e.has(r.meta)){let o=function(f){if(typeof f=="number"){if(f<0||f>r.source.length)throw new lt(`Invalid decoration offset: ${f}. Code length: ${r.source.length}`);return{...a.indexToPos(f),offset:f}}else{const d=a.lines[f.line];if(d===void 0)throw new lt(`Invalid decoration position ${JSON.stringify(f)}. Lines length: ${a.lines.length}`);let h=f.character;if(h<0&&(h=d.length+h),h<0||h>d.length)throw new lt(`Invalid decoration position ${JSON.stringify(f)}. Line ${f.line} length: ${d.length}`);return{...f,character:h,offset:a.posToIndex(f.line,h)}}};var l=o;const a=MM(r.source),u=(r.options.decorations||[]).map(f=>({...f,start:o(f.start),end:o(f.end)}));VM(u),e.set(r.meta,{decorations:u,converter:a,source:r.source})}return e.get(r.meta)}return{name:"shiki:decorations",tokens(r){if(this.options.decorations?.length)return PM(r,t(this).decorations.flatMap(l=>[l.start.offset,l.end.offset]))},code(r){if(!this.options.decorations?.length)return;const l=t(this),a=Array.from(r.children).filter(g=>g.type==="element"&&g.tagName==="span");if(a.length!==l.converter.lines.length)throw new lt(`Number of lines in code element (${a.length}) does not match the number of lines in the source (${l.converter.lines.length}). Failed to apply decorations.`);function o(g,p,b,x){const w=a[g];let E="",R=-1,C=-1;if(p===0&&(R=0),b===0&&(C=0),b===Number.POSITIVE_INFINITY&&(C=w.children.length),R===-1||C===-1)for(let O=0;O<w.children.length;O++)E+=b_(w.children[O]),R===-1&&E.length===p&&(R=O+1),C===-1&&E.length===b&&(C=O+1);if(R===-1)throw new lt(`Failed to find start index for decoration ${JSON.stringify(x.start)}`);if(C===-1)throw new lt(`Failed to find end index for decoration ${JSON.stringify(x.end)}`);const L=w.children.slice(R,C);if(!x.alwaysWrap&&L.length===w.children.length)f(w,x,"line");else if(!x.alwaysWrap&&L.length===1&&L[0].type==="element")f(L[0],x,"token");else{const O={type:"element",tagName:"span",properties:{},children:L};f(O,x,"wrapper"),w.children.splice(R,L.length,O)}}function u(g,p){a[g]=f(a[g],p,"line")}function f(g,p,b){const x=p.properties||{},w=p.transform||(E=>E);return g.tagName=p.tagName||"span",g.properties={...g.properties,...x,class:g.properties.class},p.properties?.class&&y_(g,p.properties.class),g=w(g,b)||g,g}const d=[],h=l.decorations.sort((g,p)=>p.start.offset-g.start.offset||g.end.offset-p.end.offset);for(const g of h){const{start:p,end:b}=g;if(p.line===b.line)o(p.line,p.character,b.character,g);else if(p.line<b.line){o(p.line,p.character,Number.POSITIVE_INFINITY,g);for(let x=p.line+1;x<b.line;x++)d.unshift(()=>u(x,g));o(b.line,0,b.character,g)}}d.forEach(g=>g())}}}function VM(e){for(let t=0;t<e.length;t++){const r=e[t];if(r.start.offset>r.end.offset)throw new lt(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let l=t+1;l<e.length;l++){const a=e[l],o=r.start.offset<=a.start.offset&&a.start.offset<r.end.offset,u=r.start.offset<a.end.offset&&a.end.offset<=r.end.offset,f=a.start.offset<=r.start.offset&&r.start.offset<a.end.offset,d=a.start.offset<r.end.offset&&r.end.offset<=a.end.offset;if(o||u||f||d){if(o&&u||f&&d||f&&r.start.offset===r.end.offset||u&&a.start.offset===a.end.offset)continue;throw new lt(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(a.start)} intersect.`)}}}}function b_(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(b_).join(""):""}const HM=[UM()];function du(e){const t=GM(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...HM]}function GM(e){const t=[],r=[],l=[];for(const a of e)switch(a.enforce){case"pre":t.push(a);break;case"post":r.push(a);break;default:l.push(a)}return{pre:t,post:r,normal:l}}var Di=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Od={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function FM(e,t){const r=e.indexOf("\x1B",t);if(r!==-1&&e[r+1]==="["){const l=e.indexOf("m",r);if(l!==-1)return{sequence:e.substring(r+2,l).split(";"),startPosition:r,position:l+1}}return{position:e.length}}function lx(e){const t=e.shift();if(t==="2"){const r=e.splice(0,3).map(l=>Number.parseInt(l));return r.length!==3||r.some(l=>Number.isNaN(l))?void 0:{type:"rgb",rgb:r}}else if(t==="5"){const r=e.shift();if(r)return{type:"table",index:Number(r)}}}function qM(e){const t=[];for(;e.length>0;){const r=e.shift();if(!r)continue;const l=Number.parseInt(r);if(!Number.isNaN(l))if(l===0)t.push({type:"resetAll"});else if(l<=9)Od[l]&&t.push({type:"setDecoration",value:Od[l]});else if(l<=29){const a=Od[l-20];a&&(t.push({type:"resetDecoration",value:a}),a==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(l<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Di[l-30]}});else if(l===38){const a=lx(e);a&&t.push({type:"setForegroundColor",value:a})}else if(l===39)t.push({type:"resetForegroundColor"});else if(l<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Di[l-40]}});else if(l===48){const a=lx(e);a&&t.push({type:"setBackgroundColor",value:a})}else l===49?t.push({type:"resetBackgroundColor"}):l===53?t.push({type:"setDecoration",value:"overline"}):l===55?t.push({type:"resetDecoration",value:"overline"}):l>=90&&l<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Di[l-90+8]}}):l>=100&&l<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Di[l-100+8]}})}return t}function $M(){let e=null,t=null,r=new Set;return{parse(l){const a=[];let o=0;do{const u=FM(l,o),f=u.sequence?l.substring(o,u.startPosition):l.substring(o);if(f.length>0&&a.push({value:f,foreground:e,background:t,decorations:new Set(r)}),u.sequence){const d=qM(u.sequence);for(const h of d)h.type==="resetAll"?(e=null,t=null,r.clear()):h.type==="resetForegroundColor"?e=null:h.type==="resetBackgroundColor"?t=null:h.type==="resetDecoration"&&r.delete(h.value);for(const h of d)h.type==="setForegroundColor"?e=h.value:h.type==="setBackgroundColor"?t=h.value:h.type==="setDecoration"&&r.add(h.value)}o=u.position}while(o<l.length);return a}}}var QM={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function YM(e=QM){function t(f){return e[f]}function r(f){return`#${f.map(d=>Math.max(0,Math.min(d,255)).toString(16).padStart(2,"0")).join("")}`}let l;function a(){if(l)return l;l=[];for(let h=0;h<Di.length;h++)l.push(t(Di[h]));let f=[0,95,135,175,215,255];for(let h=0;h<6;h++)for(let g=0;g<6;g++)for(let p=0;p<6;p++)l.push(r([f[h],f[g],f[p]]));let d=8;for(let h=0;h<24;h++,d+=10)l.push(r([d,d,d]));return l}function o(f){return a()[f]}function u(f){switch(f.type){case"named":return t(f.name);case"rgb":return r(f.rgb);case"table":return o(f.index)}}return{value:u}}const XM={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function KM(e,t,r){const l=cu(e,r),a=Lu(t),o=YM(Object.fromEntries(Di.map(f=>{const d=`terminal.ansi${f[0].toUpperCase()}${f.substring(1)}`;return[f,e.colors?.[d]||XM[f]]}))),u=$M();return a.map(f=>u.parse(f[0]).map(d=>{let h,g;d.decorations.has("reverse")?(h=d.background?o.value(d.background):e.bg,g=d.foreground?o.value(d.foreground):e.fg):(h=d.foreground?o.value(d.foreground):e.fg,g=d.background?o.value(d.background):void 0),h=ai(h,l),g=ai(g,l),d.decorations.has("dim")&&(h=ZM(h));let p=Qt.None;return d.decorations.has("bold")&&(p|=Qt.Bold),d.decorations.has("italic")&&(p|=Qt.Italic),d.decorations.has("underline")&&(p|=Qt.Underline),d.decorations.has("strikethrough")&&(p|=Qt.Strikethrough),{content:d.value,offset:f[1],color:h,bgColor:g,fontStyle:p}}))}function ZM(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const l=t[1];if(l.length===8){const a=Math.round(Number.parseInt(l.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${l.slice(0,6)}${a}`}else{if(l.length===6)return`#${l}80`;if(l.length===4){const a=l[0],o=l[1],u=l[2],f=l[3];return`#${a}${a}${o}${o}${u}${u}${Math.round(Number.parseInt(`${f}${f}`,16)/2).toString(16).padStart(2,"0")}`}else if(l.length===3){const a=l[0],o=l[1],u=l[2];return`#${a}${a}${o}${o}${u}${u}80`}}}const r=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return r?`var(${r[1]}-dim)`:e}function gh(e,t,r={}){const l=e.resolveLangAlias(r.lang||"text"),{theme:a=e.getLoadedThemes()[0]}=r;if(!Tu(l)&&!Ru(a)&&l==="ansi"){const{theme:o}=e.setTheme(a);return KM(o,t,r)}return c_(e,t,r)}function hu(e,t,r){let l,a,o,u,f,d;if("themes"in r){const{defaultColor:h="light",cssVariablePrefix:g="--shiki-",colorsRendering:p="css-vars"}=r,b=Object.entries(r.themes).filter(C=>C[1]).map(C=>({color:C[0],theme:C[1]})).sort((C,L)=>C.color===h?-1:L.color===h?1:0);if(b.length===0)throw new lt("`themes` option must not be empty");const x=f_(e,t,r,gh);if(d=rs(x),h&&dm!==h&&!b.find(C=>C.color===h))throw new lt(`\`themes\` option must contain the defaultColor key \`${h}\``);const w=b.map(C=>e.getTheme(C.theme)),E=b.map(C=>C.color);o=x.map(C=>C.map(L=>BM(L,E,g,h,p))),d&&Ou(o,d);const R=b.map(C=>cu(C.theme,r));a=ax(b,w,R,g,h,"fg",p),l=ax(b,w,R,g,h,"bg",p),u=`shiki-themes ${w.map(C=>C.name).join(" ")}`,f=h?void 0:[a,l].join(";")}else if("theme"in r){const h=cu(r.theme,r);o=gh(e,t,r);const g=e.getTheme(r.theme);l=ai(g.bg,h),a=ai(g.fg,h),u=g.name,d=rs(o)}else throw new lt("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:a,bg:l,themeName:u,rootStyle:f,grammarState:d}}function ax(e,t,r,l,a,o,u){return e.map((f,d)=>{const h=ai(t[d][o],r[d])||"inherit",g=`${l+f.color}${o==="bg"?"-bg":""}:${h}`;if(d===0&&a){if(a===dm&&e.length>1){const p=e.findIndex(x=>x.color==="light"),b=e.findIndex(x=>x.color==="dark");if(p===-1||b===-1)throw new lt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${ai(t[p][o],r[p])||"inherit"}, ${ai(t[b][o],r[b])||"inherit"});${g}`}return h}return u==="css-vars"?g:null}).filter(f=>!!f).join(";")}function mu(e,t,r,l={meta:{},options:r,codeToHast:(a,o)=>mu(e,a,o),codeToTokens:(a,o)=>hu(e,a,o)}){let a=t;for(const w of du(r))a=w.preprocess?.call(l,a,r)||a;let{tokens:o,fg:u,bg:f,themeName:d,rootStyle:h,grammarState:g}=hu(e,a,r);const{mergeWhitespaces:p=!0,mergeSameStyleTokens:b=!1}=r;p===!0?o=WM(o):p==="never"&&(o=ej(o)),b&&(o=tj(o));const x={...l,get source(){return a}};for(const w of du(r))o=w.tokens?.call(x,o)||o;return JM(o,{...r,fg:u,bg:f,themeName:d,rootStyle:r.rootStyle===!1?!1:r.rootStyle??h},x,g)}function JM(e,t,r,l=rs(e)){const a=du(t),o=[],u={type:"root",children:[]},{structure:f="classic",tabindex:d="0"}=t,h={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?h.style=t.rootStyle:h.style=`background-color:${t.bg};color:${t.fg}`),d!==!1&&d!=null&&(h.tabindex=d.toString());for(const[E,R]of Object.entries(t.meta||{}))E.startsWith("_")||(h[E]=R);let g={type:"element",tagName:"pre",properties:h,children:[],data:t.data},p={type:"element",tagName:"code",properties:{},children:o};const b=[],x={...r,structure:f,addClassToHast:y_,get source(){return r.source},get tokens(){return e},get options(){return t},get root(){return u},get pre(){return g},get code(){return p},get lines(){return b}};if(e.forEach((E,R)=>{R&&(f==="inline"?u.children.push({type:"element",tagName:"br",properties:{},children:[]}):f==="classic"&&o.push({type:"text",value:`
|
|
59
|
+
`}));let C={type:"element",tagName:"span",properties:{class:"line"},children:[]},L=0;for(const O of E){let B={type:"element",tagName:"span",properties:{...O.htmlAttrs},children:[{type:"text",value:O.content}]};const Y=ph(O.htmlStyle||fu(O));Y&&(B.properties.style=Y);for(const j of a)B=j?.span?.call(x,B,R+1,L,C,O)||B;f==="inline"?u.children.push(B):f==="classic"&&C.children.push(B),L+=O.content.length}if(f==="classic"){for(const O of a)C=O?.line?.call(x,C,R+1)||C;b.push(C),o.push(C)}else f==="inline"&&b.push(C)}),f==="classic"){for(const E of a)p=E?.code?.call(x,p)||p;g.children.push(p);for(const E of a)g=E?.pre?.call(x,g)||g;u.children.push(g)}else if(f==="inline"){const E=[];let R={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const L of u.children)L.type==="element"&&L.tagName==="br"?(E.push(R),R={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(L.type==="element"||L.type==="text")&&R.children.push(L);E.push(R);let C={type:"element",tagName:"code",properties:{},children:E};for(const L of a)C=L?.code?.call(x,C)||C;u.children=[];for(let L=0;L<C.children.length;L++){L>0&&u.children.push({type:"element",tagName:"br",properties:{},children:[]});const O=C.children[L];O.type==="element"&&u.children.push(...O.children)}}let w=u;for(const E of a)w=E?.root?.call(x,w)||w;return l&&Ou(w,l),w}function WM(e){return e.map(t=>{const r=[];let l="",a;return t.forEach((o,u)=>{const f=!(o.fontStyle&&(o.fontStyle&Qt.Underline||o.fontStyle&Qt.Strikethrough));f&&o.content.match(/^\s+$/)&&t[u+1]?(a===void 0&&(a=o.offset),l+=o.content):l?(f?r.push({...o,offset:a,content:l+o.content}):r.push({content:l,offset:a},o),a=void 0,l=""):r.push(o)}),r})}function ej(e){return e.map(t=>t.flatMap(r=>{if(r.content.match(/^\s+$/))return r;const l=r.content.match(/^(\s*)(.*?)(\s*)$/);if(!l)return r;const[,a,o,u]=l;if(!a&&!u)return r;const f=[{...r,offset:r.offset+a.length,content:o}];return a&&f.unshift({content:a,offset:r.offset}),u&&f.push({content:u,offset:r.offset+a.length+o.length}),f}))}function tj(e){return e.map(t=>{const r=[];for(const l of t){if(r.length===0){r.push({...l});continue}const a=r[r.length-1],o=ph(a.htmlStyle||fu(a)),u=ph(l.htmlStyle||fu(l)),f=a.fontStyle&&(a.fontStyle&Qt.Underline||a.fontStyle&Qt.Strikethrough),d=l.fontStyle&&(l.fontStyle&Qt.Underline||l.fontStyle&Qt.Strikethrough);!f&&!d&&o===u?a.content+=l.content:r.push({...l})}return r})}const nj=OM;function rj(e,t,r){const l={meta:{},options:r,codeToHast:(o,u)=>mu(e,o,u),codeToTokens:(o,u)=>hu(e,o,u)};let a=nj(mu(e,t,r,l));for(const o of du(r))a=o.postprocess?.call(l,a,r)||a;return a}async function ij(e){const t=await _5(e);return{getLastGrammarState:(...r)=>E5(t,...r),codeToTokensBase:(r,l)=>gh(t,r,l),codeToTokensWithThemes:(r,l)=>f_(t,r,l),codeToTokens:(r,l)=>hu(t,r,l),codeToHast:(r,l)=>mu(t,r,l),codeToHtml:(r,l)=>rj(t,r,l),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function lj(e){const t=e.langs,r=e.themes,l=e.engine;async function a(o){function u(p){if(typeof p=="string"){if(p=o.langAlias?.[p]||p,r_(p))return[];const b=t[p];if(!b)throw new lt(`Language \`${p}\` is not included in this bundle. You may want to load it from external source.`);return b}return p}function f(p){if(i_(p))return"none";if(typeof p=="string"){const b=r[p];if(!b)throw new lt(`Theme \`${p}\` is not included in this bundle. You may want to load it from external source.`);return b}return p}const d=(o.themes??[]).map(p=>f(p)),h=(o.langs??[]).map(p=>u(p)),g=await ij({engine:o.engine??l(),...o,themes:d,langs:h});return{...g,loadLanguage(...p){return g.loadLanguage(...p.map(u))},loadTheme(...p){return g.loadTheme(...p.map(f))},getBundledLanguages(){return t},getBundledThemes(){return r}}}return a}function aj(e){let t;async function r(l={}){if(t){const a=await t;return await Promise.all([a.loadTheme(...l.themes||[]),a.loadLanguage(...l.langs||[])]),a}else{t=e({...l,themes:[],langs:[]});const a=await t;return await Promise.all([a.loadTheme(...l.themes||[]),a.loadLanguage(...l.langs||[])]),a}}return r}function sj(e,t){const r=aj(e);async function l(a,o){const u=await r({langs:[o.lang],themes:"theme"in o?[o.theme]:Object.values(o.themes)}),f=await t?.guessEmbeddedLanguages?.(a,o.lang,u);return f&&await u.loadLanguage(...f),u}return{getSingletonHighlighter(a){return r(a)},async codeToHtml(a,o){return(await l(a,o)).codeToHtml(a,o)},async codeToHast(a,o){return(await l(a,o)).codeToHast(a,o)},async codeToTokens(a,o){return(await l(a,o)).codeToTokens(a,o)},async codeToTokensBase(a,o){return(await l(a,o)).codeToTokensBase(a,o)},async codeToTokensWithThemes(a,o){return(await l(a,o)).codeToTokensWithThemes(a,o)},async getLastGrammarState(a,o){return(await r({langs:[o.lang],themes:[o.theme]})).getLastGrammarState(a,o)}}}var oj=em({bundledLanguages:()=>rm,bundledLanguagesAlias:()=>nm,bundledLanguagesBase:()=>tm,bundledLanguagesInfo:()=>Cu,bundledThemes:()=>lm,bundledThemesInfo:()=>im,codeToHast:()=>v_,codeToHtml:()=>x_,codeToTokens:()=>__,codeToTokensBase:()=>w_,codeToTokensWithThemes:()=>S_,createHighlighter:()=>Du,getLastGrammarState:()=>C_,getSingletonHighlighter:()=>E_});const Du=lj({langs:rm,themes:lm,engine:()=>(0,U1.createOnigurumaEngine)(A(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:x_,codeToHast:v_,codeToTokens:__,codeToTokensBase:w_,codeToTokensWithThemes:S_,getSingletonHighlighter:E_,getLastGrammarState:C_}=sj(Du,{guessEmbeddedLanguages:jM}),sx=4294967295;var uj=class{regexps;constructor(e,t={}){this.patterns=e,this.options=t;const{forgiving:r=!1,cache:l,regexConstructor:a}=t;if(!a)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(o=>{if(typeof o!="string")return o;const u=l?.get(o);if(u){if(u instanceof RegExp)return u;if(r)return null;throw u}try{const f=a(o);return l?.set(o,f),f}catch(f){if(l?.set(o,f),r)return null;throw f}})}findNextMatchSync(e,t,r){const l=typeof e=="string"?e:e.content,a=[];function o(u,f,d=0){return{index:u,captureIndices:f.indices.map(h=>h==null?{start:sx,end:sx,length:0}:{start:h[0]+d,end:h[1]+d,length:h[1]-h[0]})}}for(let u=0;u<this.regexps.length;u++){const f=this.regexps[u];if(f)try{f.lastIndex=t;const d=f.exec(l);if(!d)continue;if(d.index===t)return o(u,d,0);a.push([u,d,0])}catch(d){if(this.options.forgiving)continue;throw d}}if(a.length){const u=Math.min(...a.map(f=>f[1].index));for(const[f,d,h]of a)if(d.index===u)return o(f,d,h)}return null}};function Vl(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function cj(e,t,r){return e.has(t)||e.set(t,r),e.get(t)}const hm=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),jt=String.raw;function Hl(e,t){if(e==null)throw new Error(t??"Value expected");return e}const k_=jt`\[\^?`,A_=`c.? | C(?:-.?)?|${jt`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${jt`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${jt`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${jt`o\{[^\}]*\}?`}|${jt`\d{1,3}`}`,mm=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Uo=new RegExp(jt`
|
|
59
60
|
\\ (?:
|
|
60
61
|
${A_}
|
|
61
62
|
| [gk]<[^>]*>?
|
|
@@ -77,7 +78,7 @@ Error generating stack: `+c.message+`
|
|
|
77
78
|
| (?:${mm.source})+
|
|
78
79
|
| ${k_}
|
|
79
80
|
| .
|
|
80
|
-
`.replace(/\s+/g,""),"gsu"),Nd=new RegExp(
|
|
81
|
+
`.replace(/\s+/g,""),"gsu"),Nd=new RegExp(jt`
|
|
81
82
|
\\ (?:
|
|
82
83
|
${A_}
|
|
83
84
|
| .
|
|
@@ -86,8 +87,8 @@ Error generating stack: `+c.message+`
|
|
|
86
87
|
| ${k_}
|
|
87
88
|
| &&
|
|
88
89
|
| .
|
|
89
|
-
`.replace(/\s+/g,""),"gsu");function
|
|
90
|
-
`,l);return{lastIndex:u===-1?t.length:u}}if(/^\s$/.test(r)){const u=/\s+/y;return u.lastIndex=l,{lastIndex:u.exec(t)?u.lastIndex:l}}}if(r===".")return{token:Mi("dot",r)};if(r==="^"||r==="$"){const u=e.singleline?{"^":zt`\A`,$:zt`\Z`}[r]:r;return{token:ox(u,r)}}return r==="|"?{token:gj(r)}:mm.test(r)?{tokens:Mj(r)}:{token:Er(Vl(r),r)}}function mj(e,t,r){const l=[ux(t[1]==="^",t)];let a=1,o;for(Nd.lastIndex=r;o=Nd.exec(e);){const u=o[0];if(u[0]==="["&&u[1]!==":")a++,l.push(ux(u[1]==="^",u));else if(u==="]"){if(l.at(-1).type==="CharacterClassOpen")l.push(Er(93,u));else if(a--,l.push(yj(u)),!a)break}else{const f=pj(u);Array.isArray(f)?l.push(...f):l.push(f)}}return{tokens:l,lastIndex:Nd.lastIndex||e.length}}function pj(e){if(e[0]==="\\")return T_(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!hm.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return Mi("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?bj(e):e==="&&"?xj(e):Er(Vl(e),e)}function T_(e,{inCharClass:t}){const r=e[1];if(r==="c"||r==="C")return kj(e);if("dDhHsSwW".includes(r))return Rj(e);if(e.startsWith(zt`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return Lj(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const l=e.split(/\\x/).slice(1).map(u=>parseInt(u,16)),a=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(l)),o=new TextEncoder;return[...a].map(u=>{const f=[...o.encode(u)].map(d=>`\\x${d.toString(16)}`).join("");return Er(Vl(u),f)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(r==="u"||r==="x")return Er(Nj(e),e);if(cx.has(r))return Er(cx.get(r),e);if(/\d/.test(r))return vj(t,e);if(e==="\\")throw new Error(zt`Incomplete escape "\"`);if(r==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Er(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function gj(e){return{type:"Alternator",raw:e}}function ox(e,t){return{type:"Assertion",kind:e,raw:t}}function R_(e){return{type:"Backreference",raw:e}}function Er(e,t){return{type:"Character",value:e,raw:t}}function yj(e){return{type:"CharacterClassClose",raw:e}}function bj(e){return{type:"CharacterClassHyphen",raw:e}}function xj(e){return{type:"CharacterClassIntersector",raw:e}}function ux(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function Mi(e,t,r={}){return{type:"CharacterSet",kind:e,...r,raw:t}}function L_(e,t,r={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Hl(r.flags),raw:t}}function vj(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function _j(e){return{type:"GroupClose",raw:e}}function Nl(e,t,r={}){return{type:"GroupOpen",kind:e,...r,raw:t}}function wj(e,t,r,l){return{type:"NamedCallout",kind:e,tag:t,arguments:r,raw:l}}function Sj(e,t,r,l){return{type:"Quantifier",kind:e,min:t,max:r,raw:l}}function Ej(e){return{type:"Subroutine",raw:e}}const Cj=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),cx=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function kj(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return Er(Vl(t.toUpperCase())-64,e)}function Aj(e,t){let{on:r,off:l}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;l??="";const a=(t.getCurrentModX()||r.includes("x"))&&!l.includes("x"),o=dx(r),u=dx(l),f={};if(o&&(f.enable=o),u&&(f.disable=u),e.endsWith(")"))return t.replaceCurrentModX(a),L_("flags",e,{flags:f});if(e.endsWith(":"))return t.pushModX(a),t.numOpenGroups++,Nl("group",e,{...(o||u)&&{flags:f}});throw new Error(`Unexpected flag modifier "${e}"`)}function Tj(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:r,tag:l,args:a}=t.groups;if(!r)throw new Error(`Invalid named callout "${e}"`);if(l==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const o=a?a.split(",").filter(g=>g!=="").map(g=>/^[+-]?\d+$/.test(g)?+g:g):[],[u,f,d]=o,h=Cj.has(r)?r.toLowerCase():"custom";switch(h){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof u=="string")throw new Error(`Named callout argument must be a number "${u}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof u=="string"&&!/^[A-Za-z_]\w*$/.test(u))throw new Error(`Named callout argument one must be a tag or number "${u}"`);if(o.length===2&&(typeof f=="number"||!/^[<>X]$/.test(f)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${f}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof u=="number"||!/^[<>X]$/.test(u)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${u}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof u=="string"&&!/^[A-Za-z_]\w*$/.test(u))throw new Error(`Named callout argument one must be a tag or number "${u}"`);if(typeof f=="number"||!/^(?:[<>!=]=|[<>])$/.test(f))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${f}"`);if(typeof d=="string"&&!/^[A-Za-z_]\w*$/.test(d))throw new Error(`Named callout argument three must be a tag or number "${d}"`);break;case"custom":throw new Error(`Undefined callout name "${r}"`);default:throw new Error(`Unexpected named callout kind "${h}"`)}return wj(h,l??null,a?.split(",")??null,e)}function fx(e){let t=null,r,l;if(e[0]==="{"){const{minStr:a,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,u=1e5;if(+a>u||o&&+o>u)throw new Error("Quantifier value unsupported in Oniguruma");if(r=+a,l=o===void 0?+a:o===""?1/0:+o,r>l&&(t="possessive",[r,l]=[l,r]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else r=e[0]==="+"?1:0,l=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return Sj(t,r,l,e)}function Rj(e){const t=e[1].toLowerCase();return Mi({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function Lj(e){const{p:t,neg:r,value:l}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return Mi("property",e,{value:l,negate:t==="P"&&!r||t==="p"&&!!r})}function dx(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function Oj(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let r=0;r<e.length;r++){const l=e[r];if(!"imxDPSWy".includes(l))throw new Error(`Invalid flag "${l}"`);if(l==="y"){if(!/^y{[gw]}/.test(e.slice(r)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[r+2]==="g"?"grapheme":"word",r+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[l]]=!0}return t}function Nj(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function Dj(e,t){const{raw:r,inCharClass:l}=e,a=r.slice(1);if(!l&&(a!=="0"&&a.length===1||a[0]!=="0"&&+a<=t))return[R_(r)];const o=[],u=a.match(/^[0-7]+|\d/g);for(let f=0;f<u.length;f++){const d=u[f];let h;if(f===0&&d!=="8"&&d!=="9"){if(h=parseInt(d,8),h>127)throw new Error(zt`Octal encoded byte above 177 unsupported "${r}"`)}else h=Vl(d);o.push(Er(h,(f===0?"\\":"")+d))}return o}function Mj(e){const t=[],r=new RegExp(mm,"gy");let l;for(;l=r.exec(e);){const a=l[0];if(a[0]==="{"){const o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(a);if(o){const{min:u,max:f}=o.groups;if(+u>+f&&a.endsWith("?")){r.lastIndex--,t.push(fx(a.slice(0,-1)));continue}}}t.push(fx(a))}return t}function O_(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const r=e.body[0];return!t||Object.keys(t).every(l=>t[l]===r[l])}function jj(e){return zj.has(e.type)}const zj=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function N_(e,t={}){const r={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},l=dj(e,{flags:r.flags,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline}}),a=(b,x)=>{const w=l.tokens[o.nextIndex];switch(o.parent=b,o.nextIndex++,w.type){case"Alternator":return Ii();case"Assertion":return Ij(w);case"Backreference":return Pj(w,o);case"Character":return Mu(w.value,{useLastValid:!!x.isCheckingRangeEnd});case"CharacterClassHyphen":return Bj(w,o,x);case"CharacterClassOpen":return Uj(w,o,x);case"CharacterSet":return Vj(w,o);case"Directive":return Qj(w.kind,{flags:w.flags});case"GroupOpen":return Hj(w,o,x);case"NamedCallout":return Xj(w.kind,w.tag,w.arguments);case"Quantifier":return Gj(w,o);case"Subroutine":return Fj(w,o);default:throw new Error(`Unexpected token type "${w.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:r.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:r.skipBackrefValidation,skipLookbehindValidation:r.skipLookbehindValidation,skipPropertyNameValidation:r.skipPropertyNameValidation,subroutines:[],tokens:l.tokens,unicodePropertyMap:r.unicodePropertyMap,walk:a},u=Zj(Yj(l.flags));let f=u.body[0];for(;o.nextIndex<l.tokens.length;){const b=a(f,{});b.type==="Alternative"?(u.body.push(b),f=b):f.body.push(b)}const{capturingGroups:d,hasNumberedRef:h,namedGroupsByName:g,subroutines:p}=o;if(h&&g.size&&!r.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:b}of p)if(typeof b=="number"){if(b>d.length)throw new Error("Subroutine uses a group number that's not defined");b&&(d[b-1].isSubroutined=!0)}else if(g.has(b)){if(g.get(b).length>1)throw new Error(zt`Subroutine uses a duplicate group name "\g<${b}>"`);g.get(b)[0].isSubroutined=!0}else throw new Error(zt`Subroutine uses a group name that's not defined "\g<${b}>"`);return u}function Ij({kind:e}){return yh(Hl({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===zt`\B`||e===zt`\Y`})}function Pj({raw:e},t){const r=/^\\k[<']/.test(e),l=r?e.slice(3,-1):e.slice(1),a=(o,u=!1)=>{const f=t.capturingGroups.length;let d=!1;if(o>f)if(t.skipBackrefValidation)d=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,bh(u?f+1-o:o,{orphan:d})};if(r){const o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(l);if(o)return a(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(l))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(l))throw new Error(`Group name not defined to the left "${e}"`);return bh(l)}return a(+l)}function Bj(e,t,r){const{tokens:l,walk:a}=t,o=t.parent,u=o.body.at(-1),f=l[t.nextIndex];if(!r.isCheckingRangeEnd&&u&&u.type!=="CharacterClass"&&u.type!=="CharacterClassRange"&&f&&f.type!=="CharacterClassOpen"&&f.type!=="CharacterClassClose"&&f.type!=="CharacterClassIntersector"){const d=a(o,{...r,isCheckingRangeEnd:!0});if(u.type==="Character"&&d.type==="Character")return o.body.pop(),$j(u,d);throw new Error("Invalid character class range")}return Mu(Vl("-"))}function Uj({negate:e},t,r){const{tokens:l,walk:a}=t,o=l[t.nextIndex],u=[Qo()];let f=px(o);for(;f.type!=="CharacterClassClose";){if(f.type==="CharacterClassIntersector")u.push(Qo()),t.nextIndex++;else{const h=u.at(-1);h.body.push(a(h,r))}f=px(l[t.nextIndex],o)}const d=Qo({negate:e});return u.length===1?d.body=u[0].body:(d.kind="intersection",d.body=u.map(h=>h.body.length===1?h.body[0]:h)),t.nextIndex++,d}function Vj({kind:e,negate:t,value:r},l){const{normalizeUnknownPropertyNames:a,skipPropertyNameValidation:o,unicodePropertyMap:u}=l;if(e==="property"){const f=ju(r);if(hm.has(f)&&!u?.has(f))e="posix",r=f;else return Dl(r,{negate:t,normalizeUnknownPropertyNames:a,skipPropertyNameValidation:o,unicodePropertyMap:u})}return e==="posix"?Kj(r,{negate:t}):xh(e,{negate:t})}function Hj(e,t,r){const{tokens:l,capturingGroups:a,namedGroupsByName:o,skipLookbehindValidation:u,walk:f}=t,d=Jj(e),h=d.type==="AbsenceFunction",g=mx(d),p=g&&d.negate;if(d.type==="CapturingGroup"&&(a.push(d),d.name&&fj(o,d.name,[]).push(d)),h&&r.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let b=gx(l[t.nextIndex]);for(;b.type!=="GroupClose";){if(b.type==="Alternator")d.body.push(Ii()),t.nextIndex++;else{const x=d.body.at(-1),w=f(x,{...r,isInAbsenceFunction:r.isInAbsenceFunction||h,isInLookbehind:r.isInLookbehind||g,isInNegLookbehind:r.isInNegLookbehind||p});if(x.body.push(w),(g||r.isInLookbehind)&&!u){const E="Lookbehind includes a pattern not allowed by Oniguruma";if(p||r.isInNegLookbehind){if(hx(w)||w.type==="CapturingGroup")throw new Error(E)}else if(hx(w)||mx(w)&&w.negate)throw new Error(E)}}b=gx(l[t.nextIndex])}return t.nextIndex++,d}function Gj({kind:e,min:t,max:r},l){const a=l.parent,o=a.body.at(-1);if(!o||!jj(o))throw new Error("Quantifier requires a repeatable token");const u=M_(e,t,r,o);return a.body.pop(),u}function Fj({raw:e},t){const{capturingGroups:r,subroutines:l}=t;let a=e.slice(3,-1);const o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(a);if(o){const f=+o.groups.num,d=r.length;if(t.hasNumberedRef=!0,a={"":f,"+":d+f,"-":d+1-f}[o.groups.sign],a<1)throw new Error("Invalid subroutine number")}else a==="0"&&(a=0);const u=j_(a);return l.push(u),u}function qj(e,t){return{type:"AbsenceFunction",kind:e,body:ds(t?.body)}}function Ii(e){return{type:"Alternative",body:z_(e?.body)}}function yh(e,t){const r={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(r.negate=!!t?.negate),r}function bh(e,t){const r=!!t?.orphan;return{type:"Backreference",ref:e,...r&&{orphan:r}}}function D_(e,t){const r={name:void 0,isSubroutined:!1,...t};if(r.name!==void 0&&!Wj(r.name))throw new Error(`Group name "${r.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...r.name&&{name:r.name},...r.isSubroutined&&{isSubroutined:r.isSubroutined},body:ds(t?.body)}}function Mu(e,t){const r={useLastValid:!1,...t};if(e>1114111){const l=e.toString(16);if(r.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${l}}"`):new Error(`Invalid code point out of range in JS "\\x{${l}}"`)}return{type:"Character",value:e}}function Qo(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:z_(e?.body)}}function $j(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function xh(e,t){const r=!!t?.negate,l={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(l.negate=r),(e==="text_segment"||e==="newline"&&!r)&&(l.variableLength=!0),l}function Qj(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Hl(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function Yj(e){return{type:"Flags",...e}}function Vn(e){const t=e?.atomic,r=e?.flags;if(t&&r)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...r&&{flags:r},body:ds(e?.body)}}function Oi(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:ds(e?.body)}}function Xj(e,t,r){return{type:"NamedCallout",kind:e,tag:t,arguments:r}}function Kj(e,t){const r=!!t?.negate;if(!hm.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:r}}function M_(e,t,r,l){if(t>r)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:r,body:l}}function Zj(e,t){return{type:"Regex",body:ds(t?.body),flags:e}}function j_(e){return{type:"Subroutine",ref:e}}function Dl(e,t){const r={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let l=r.unicodePropertyMap?.get(ju(e));if(!l){if(r.normalizeUnknownPropertyNames)l=e3(e);else if(r.unicodePropertyMap&&!r.skipPropertyNameValidation)throw new Error(zt`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:l??e,negate:r.negate}}function Jj({flags:e,kind:t,name:r,negate:l,number:a}){switch(t){case"absence_repeater":return qj("repeater");case"atomic":return Vn({atomic:!0});case"capturing":return D_(a,{name:r});case"group":return Vn({flags:e});case"lookahead":case"lookbehind":return Oi({behind:t==="lookbehind",negate:l});default:throw new Error(`Unexpected group kind "${t}"`)}}function ds(e){if(e===void 0)e=[Ii()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function z_(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function hx(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function mx(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function Wj(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function e3(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function ju(e){return e.replace(/[- _]+/g,"").toLowerCase()}function px(e,t){return Hl(e,`${t?.type==="Character"&&t.value===93?"Empty":"Unclosed"} character class`)}function gx(e){return Hl(e,"Unclosed group")}function Ya(e,t,r=null){function l(o,u){for(let f=0;f<o.length;f++){const d=a(o[f],u,f,o);f=Math.max(-1,f+d)}}function a(o,u=null,f=null,d=null){let h=0,g=!1;const p={node:o,parent:u,key:f,container:d,root:e,remove(){Vo(d).splice(Math.max(0,Tl(f)+h),1),h--,g=!0},removeAllNextSiblings(){return Vo(d).splice(Tl(f)+1)},removeAllPrevSiblings(){const C=Tl(f)+h;return h-=C,Vo(d).splice(0,Math.max(0,C))},replaceWith(C,L={}){const O=!!L.traverse;d?d[Math.max(0,Tl(f)+h)]=C:Hl(u,"Can't replace root node")[f]=C,O&&a(C,u,f,d),g=!0},replaceWithMultiple(C,L={}){const O=!!L.traverse;if(Vo(d).splice(Math.max(0,Tl(f)+h),1,...C),h+=C.length-1,O){let B=0;for(let Y=0;Y<C.length;Y++)B+=a(C[Y],u,Tl(f)+Y+B,d)}g=!0},skip(){g=!0}},{type:b}=o,x=t["*"],w=t[b],E=typeof x=="function"?x:x?.enter,R=typeof w=="function"?w:w?.enter;if(E?.(p,r),R?.(p,r),!g)switch(b){case"AbsenceFunction":case"CapturingGroup":case"Group":l(o.body,o);break;case"Alternative":case"CharacterClass":l(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":a(o.min,o,"min"),a(o.max,o,"max");break;case"LookaroundAssertion":l(o.body,o);break;case"Quantifier":a(o.body,o,"body");break;case"Regex":l(o.body,o),a(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${b}"`)}return w?.exit?.(p,r),x?.exit?.(p,r),h}return a(e),e}function Vo(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Tl(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const t3=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function n3(e,t){for(let r=0;r<e.length;r++)e[r]>=t&&e[r]++}function r3(e,t,r,l){return e.slice(0,t)+l+e.slice(t+r.length)}const Mn=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function pm(e,t,r,l){const a=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1];let u=0,f="";for(const d of e.matchAll(a)){const{0:h,groups:{$skip:g}}=d;if(!g&&(!l||l===Mn.DEFAULT==!u)){r instanceof Function?f+=r(d,{context:u?Mn.CHAR_CLASS:Mn.DEFAULT,negated:o[o.length-1]}):f+=r;continue}h[0]==="["?(u++,o.push(h[1]==="^")):h==="]"&&u&&(u--,o.pop()),f+=h}return f}function I_(e,t,r,l){pm(e,t,r,l)}function i3(e,t,r=0,l){if(!new RegExp(t,"su").test(e))return null;const a=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");a.lastIndex=r;let o=0,u;for(;u=a.exec(e);){const{0:f,groups:{$skip:d}}=u;if(!d&&(!l||l===Mn.DEFAULT==!o))return u;f==="["?o++:f==="]"&&o&&o--,a.lastIndex==u.index&&a.lastIndex++}return null}function Ho(e,t,r){return!!i3(e,t,0,r)}function l3(e,t){const r=/\\?./gsu;r.lastIndex=t;let l=e.length,a=0,o=1,u;for(;u=r.exec(e);){const[f]=u;if(f==="[")a++;else if(a)f==="]"&&a--;else if(f==="(")o++;else if(f===")"&&(o--,!o)){l=u.index;break}}return e.slice(t,l)}const yx=new RegExp(String.raw`(?<noncapturingStart>${t3})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function a3(e,t){const r=t?.hiddenCaptures??[];let l=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:l,hiddenCaptures:r};const a="(?>",o="(?:(?=(",u=[0],f=[];let d=0,h=0,g=NaN,p;do{p=!1;let b=0,x=0,w=!1,E;for(yx.lastIndex=Number.isNaN(g)?0:g+o.length;E=yx.exec(e);){const{0:R,index:C,groups:{capturingStart:L,noncapturingStart:O}}=E;if(R==="[")b++;else if(b)R==="]"&&b--;else if(R===a&&!w)g=C,w=!0;else if(w&&O)x++;else if(L)w?x++:(d++,u.push(d+h));else if(R===")"&&w){if(!x){h++;const B=d+h;if(e=`${e.slice(0,g)}${o}${e.slice(g+a.length,C)}))<$$${B}>)${e.slice(C+1)}`,p=!0,f.push(B),n3(r,B),l.size){const Y=new Map;l.forEach((j,q)=>{Y.set(q>=B?q+1:q,j.map(G=>G>=B?G+1:G))}),l=Y}break}x--}}}while(p);return r.push(...f),e=pm(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:b,groups:{backrefNum:x,wrappedBackrefNum:w}})=>{if(x){const E=+x;if(E>u.length-1)throw new Error(`Backref "${b}" greater than number of captures`);return`\\${u[E]}`}return`\\${w}`},Mn.DEFAULT),{pattern:e,captureTransfers:l,hiddenCaptures:r}}const P_=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Dd=new RegExp(String.raw`
|
|
90
|
+
`.replace(/\s+/g,""),"gsu");function fj(e,t={}){const r={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const l=Lj(r.flags),a=[l.extended],o={captureGroup:r.rules.captureGroup,getCurrentModX(){return a.at(-1)},numOpenGroups:0,popModX(){a.pop()},pushModX(p){a.push(p)},replaceCurrentModX(p){a[a.length-1]=p},singleline:r.rules.singleline};let u=[],f;for(Uo.lastIndex=0;f=Uo.exec(e);){const p=dj(o,e,f[0],Uo.lastIndex);p.tokens?u.push(...p.tokens):p.token&&u.push(p.token),p.lastIndex!==void 0&&(Uo.lastIndex=p.lastIndex)}const d=[];let h=0;u.filter(p=>p.type==="GroupOpen").forEach(p=>{p.kind==="capturing"?p.number=++h:p.raw==="("&&d.push(p)}),h||d.forEach((p,b)=>{p.kind="capturing",p.number=b+1});const g=h||d.length;return{tokens:u.map(p=>p.type==="EscapedNumber"?Nj(p,g):p).flat(),flags:l}}function dj(e,t,r,l){const[a,o]=r;if(r==="["||r==="[^"){const u=hj(t,r,l);return{tokens:u.tokens,lastIndex:u.lastIndex}}if(a==="\\"){if("AbBGyYzZ".includes(o))return{token:ox(r,r)};if(/^\\g[<']/.test(r)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:Sj(r)}}if(/^\\k[<']/.test(r)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:R_(r)}}if(o==="K")return{token:L_("keep",r)};if(o==="N"||o==="R")return{token:Mi("newline",r,{negate:o==="N"})};if(o==="O")return{token:Mi("any",r)};if(o==="X")return{token:Mi("text_segment",r)};const u=T_(r,{inCharClass:!1});return Array.isArray(u)?{tokens:u}:{token:u}}if(a==="("){if(o==="*")return{token:Aj(r)};if(r==="(?{")throw new Error(`Unsupported callout "${r}"`);if(r.startsWith("(?#")){if(t[l]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:l+1}}if(/^\(\?[-imx]+[:)]$/.test(r))return{token:kj(r,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,r==="("&&!e.captureGroup||r==="(?:")return{token:Nl("group",r)};if(r==="(?>")return{token:Nl("atomic",r)};if(r==="(?="||r==="(?!"||r==="(?<="||r==="(?<!")return{token:Nl(r[2]==="<"?"lookbehind":"lookahead",r,{negate:r.endsWith("!")})};if(r==="("&&e.captureGroup||r.startsWith("(?<")&&r.endsWith(">")||r.startsWith("(?'")&&r.endsWith("'"))return{token:Nl("capturing",r,{...r!=="("&&{name:r.slice(3,-1)}})};if(r.startsWith("(?~")){if(r==="(?~|")throw new Error(`Unsupported absence function kind "${r}"`);return{token:Nl("absence_repeater",r)}}throw r==="(?("?new Error(`Unsupported conditional "${r}"`):new Error(`Invalid or unsupported group option "${r}"`)}if(r===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:vj(r)}}if(e.getCurrentModX()){if(r==="#"){const u=t.indexOf(`
|
|
91
|
+
`,l);return{lastIndex:u===-1?t.length:u}}if(/^\s$/.test(r)){const u=/\s+/y;return u.lastIndex=l,{lastIndex:u.exec(t)?u.lastIndex:l}}}if(r===".")return{token:Mi("dot",r)};if(r==="^"||r==="$"){const u=e.singleline?{"^":jt`\A`,$:jt`\Z`}[r]:r;return{token:ox(u,r)}}return r==="|"?{token:pj(r)}:mm.test(r)?{tokens:Dj(r)}:{token:Sr(Vl(r),r)}}function hj(e,t,r){const l=[ux(t[1]==="^",t)];let a=1,o;for(Nd.lastIndex=r;o=Nd.exec(e);){const u=o[0];if(u[0]==="["&&u[1]!==":")a++,l.push(ux(u[1]==="^",u));else if(u==="]"){if(l.at(-1).type==="CharacterClassOpen")l.push(Sr(93,u));else if(a--,l.push(gj(u)),!a)break}else{const f=mj(u);Array.isArray(f)?l.push(...f):l.push(f)}}return{tokens:l,lastIndex:Nd.lastIndex||e.length}}function mj(e){if(e[0]==="\\")return T_(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!hm.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return Mi("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?yj(e):e==="&&"?bj(e):Sr(Vl(e),e)}function T_(e,{inCharClass:t}){const r=e[1];if(r==="c"||r==="C")return Cj(e);if("dDhHsSwW".includes(r))return Tj(e);if(e.startsWith(jt`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return Rj(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const l=e.split(/\\x/).slice(1).map(u=>parseInt(u,16)),a=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(l)),o=new TextEncoder;return[...a].map(u=>{const f=[...o.encode(u)].map(d=>`\\x${d.toString(16)}`).join("");return Sr(Vl(u),f)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(r==="u"||r==="x")return Sr(Oj(e),e);if(cx.has(r))return Sr(cx.get(r),e);if(/\d/.test(r))return xj(t,e);if(e==="\\")throw new Error(jt`Incomplete escape "\"`);if(r==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Sr(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function pj(e){return{type:"Alternator",raw:e}}function ox(e,t){return{type:"Assertion",kind:e,raw:t}}function R_(e){return{type:"Backreference",raw:e}}function Sr(e,t){return{type:"Character",value:e,raw:t}}function gj(e){return{type:"CharacterClassClose",raw:e}}function yj(e){return{type:"CharacterClassHyphen",raw:e}}function bj(e){return{type:"CharacterClassIntersector",raw:e}}function ux(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function Mi(e,t,r={}){return{type:"CharacterSet",kind:e,...r,raw:t}}function L_(e,t,r={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Hl(r.flags),raw:t}}function xj(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function vj(e){return{type:"GroupClose",raw:e}}function Nl(e,t,r={}){return{type:"GroupOpen",kind:e,...r,raw:t}}function _j(e,t,r,l){return{type:"NamedCallout",kind:e,tag:t,arguments:r,raw:l}}function wj(e,t,r,l){return{type:"Quantifier",kind:e,min:t,max:r,raw:l}}function Sj(e){return{type:"Subroutine",raw:e}}const Ej=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),cx=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Cj(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return Sr(Vl(t.toUpperCase())-64,e)}function kj(e,t){let{on:r,off:l}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;l??="";const a=(t.getCurrentModX()||r.includes("x"))&&!l.includes("x"),o=dx(r),u=dx(l),f={};if(o&&(f.enable=o),u&&(f.disable=u),e.endsWith(")"))return t.replaceCurrentModX(a),L_("flags",e,{flags:f});if(e.endsWith(":"))return t.pushModX(a),t.numOpenGroups++,Nl("group",e,{...(o||u)&&{flags:f}});throw new Error(`Unexpected flag modifier "${e}"`)}function Aj(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:r,tag:l,args:a}=t.groups;if(!r)throw new Error(`Invalid named callout "${e}"`);if(l==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const o=a?a.split(",").filter(g=>g!=="").map(g=>/^[+-]?\d+$/.test(g)?+g:g):[],[u,f,d]=o,h=Ej.has(r)?r.toLowerCase():"custom";switch(h){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof u=="string")throw new Error(`Named callout argument must be a number "${u}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof u=="string"&&!/^[A-Za-z_]\w*$/.test(u))throw new Error(`Named callout argument one must be a tag or number "${u}"`);if(o.length===2&&(typeof f=="number"||!/^[<>X]$/.test(f)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${f}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof u=="number"||!/^[<>X]$/.test(u)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${u}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof u=="string"&&!/^[A-Za-z_]\w*$/.test(u))throw new Error(`Named callout argument one must be a tag or number "${u}"`);if(typeof f=="number"||!/^(?:[<>!=]=|[<>])$/.test(f))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${f}"`);if(typeof d=="string"&&!/^[A-Za-z_]\w*$/.test(d))throw new Error(`Named callout argument three must be a tag or number "${d}"`);break;case"custom":throw new Error(`Undefined callout name "${r}"`);default:throw new Error(`Unexpected named callout kind "${h}"`)}return _j(h,l??null,a?.split(",")??null,e)}function fx(e){let t=null,r,l;if(e[0]==="{"){const{minStr:a,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,u=1e5;if(+a>u||o&&+o>u)throw new Error("Quantifier value unsupported in Oniguruma");if(r=+a,l=o===void 0?+a:o===""?1/0:+o,r>l&&(t="possessive",[r,l]=[l,r]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else r=e[0]==="+"?1:0,l=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return wj(t,r,l,e)}function Tj(e){const t=e[1].toLowerCase();return Mi({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function Rj(e){const{p:t,neg:r,value:l}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return Mi("property",e,{value:l,negate:t==="P"&&!r||t==="p"&&!!r})}function dx(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function Lj(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let r=0;r<e.length;r++){const l=e[r];if(!"imxDPSWy".includes(l))throw new Error(`Invalid flag "${l}"`);if(l==="y"){if(!/^y{[gw]}/.test(e.slice(r)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[r+2]==="g"?"grapheme":"word",r+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[l]]=!0}return t}function Oj(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function Nj(e,t){const{raw:r,inCharClass:l}=e,a=r.slice(1);if(!l&&(a!=="0"&&a.length===1||a[0]!=="0"&&+a<=t))return[R_(r)];const o=[],u=a.match(/^[0-7]+|\d/g);for(let f=0;f<u.length;f++){const d=u[f];let h;if(f===0&&d!=="8"&&d!=="9"){if(h=parseInt(d,8),h>127)throw new Error(jt`Octal encoded byte above 177 unsupported "${r}"`)}else h=Vl(d);o.push(Sr(h,(f===0?"\\":"")+d))}return o}function Dj(e){const t=[],r=new RegExp(mm,"gy");let l;for(;l=r.exec(e);){const a=l[0];if(a[0]==="{"){const o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(a);if(o){const{min:u,max:f}=o.groups;if(+u>+f&&a.endsWith("?")){r.lastIndex--,t.push(fx(a.slice(0,-1)));continue}}}t.push(fx(a))}return t}function O_(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const r=e.body[0];return!t||Object.keys(t).every(l=>t[l]===r[l])}function Mj(e){return jj.has(e.type)}const jj=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function N_(e,t={}){const r={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},l=fj(e,{flags:r.flags,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline}}),a=(b,x)=>{const w=l.tokens[o.nextIndex];switch(o.parent=b,o.nextIndex++,w.type){case"Alternator":return Ii();case"Assertion":return zj(w);case"Backreference":return Ij(w,o);case"Character":return Mu(w.value,{useLastValid:!!x.isCheckingRangeEnd});case"CharacterClassHyphen":return Pj(w,o,x);case"CharacterClassOpen":return Bj(w,o,x);case"CharacterSet":return Uj(w,o);case"Directive":return $j(w.kind,{flags:w.flags});case"GroupOpen":return Vj(w,o,x);case"NamedCallout":return Yj(w.kind,w.tag,w.arguments);case"Quantifier":return Hj(w,o);case"Subroutine":return Gj(w,o);default:throw new Error(`Unexpected token type "${w.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:r.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:r.skipBackrefValidation,skipLookbehindValidation:r.skipLookbehindValidation,skipPropertyNameValidation:r.skipPropertyNameValidation,subroutines:[],tokens:l.tokens,unicodePropertyMap:r.unicodePropertyMap,walk:a},u=Kj(Qj(l.flags));let f=u.body[0];for(;o.nextIndex<l.tokens.length;){const b=a(f,{});b.type==="Alternative"?(u.body.push(b),f=b):f.body.push(b)}const{capturingGroups:d,hasNumberedRef:h,namedGroupsByName:g,subroutines:p}=o;if(h&&g.size&&!r.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:b}of p)if(typeof b=="number"){if(b>d.length)throw new Error("Subroutine uses a group number that's not defined");b&&(d[b-1].isSubroutined=!0)}else if(g.has(b)){if(g.get(b).length>1)throw new Error(jt`Subroutine uses a duplicate group name "\g<${b}>"`);g.get(b)[0].isSubroutined=!0}else throw new Error(jt`Subroutine uses a group name that's not defined "\g<${b}>"`);return u}function zj({kind:e}){return yh(Hl({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===jt`\B`||e===jt`\Y`})}function Ij({raw:e},t){const r=/^\\k[<']/.test(e),l=r?e.slice(3,-1):e.slice(1),a=(o,u=!1)=>{const f=t.capturingGroups.length;let d=!1;if(o>f)if(t.skipBackrefValidation)d=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,bh(u?f+1-o:o,{orphan:d})};if(r){const o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(l);if(o)return a(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(l))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(l))throw new Error(`Group name not defined to the left "${e}"`);return bh(l)}return a(+l)}function Pj(e,t,r){const{tokens:l,walk:a}=t,o=t.parent,u=o.body.at(-1),f=l[t.nextIndex];if(!r.isCheckingRangeEnd&&u&&u.type!=="CharacterClass"&&u.type!=="CharacterClassRange"&&f&&f.type!=="CharacterClassOpen"&&f.type!=="CharacterClassClose"&&f.type!=="CharacterClassIntersector"){const d=a(o,{...r,isCheckingRangeEnd:!0});if(u.type==="Character"&&d.type==="Character")return o.body.pop(),qj(u,d);throw new Error("Invalid character class range")}return Mu(Vl("-"))}function Bj({negate:e},t,r){const{tokens:l,walk:a}=t,o=l[t.nextIndex],u=[Qo()];let f=px(o);for(;f.type!=="CharacterClassClose";){if(f.type==="CharacterClassIntersector")u.push(Qo()),t.nextIndex++;else{const h=u.at(-1);h.body.push(a(h,r))}f=px(l[t.nextIndex],o)}const d=Qo({negate:e});return u.length===1?d.body=u[0].body:(d.kind="intersection",d.body=u.map(h=>h.body.length===1?h.body[0]:h)),t.nextIndex++,d}function Uj({kind:e,negate:t,value:r},l){const{normalizeUnknownPropertyNames:a,skipPropertyNameValidation:o,unicodePropertyMap:u}=l;if(e==="property"){const f=ju(r);if(hm.has(f)&&!u?.has(f))e="posix",r=f;else return Dl(r,{negate:t,normalizeUnknownPropertyNames:a,skipPropertyNameValidation:o,unicodePropertyMap:u})}return e==="posix"?Xj(r,{negate:t}):xh(e,{negate:t})}function Vj(e,t,r){const{tokens:l,capturingGroups:a,namedGroupsByName:o,skipLookbehindValidation:u,walk:f}=t,d=Zj(e),h=d.type==="AbsenceFunction",g=mx(d),p=g&&d.negate;if(d.type==="CapturingGroup"&&(a.push(d),d.name&&cj(o,d.name,[]).push(d)),h&&r.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let b=gx(l[t.nextIndex]);for(;b.type!=="GroupClose";){if(b.type==="Alternator")d.body.push(Ii()),t.nextIndex++;else{const x=d.body.at(-1),w=f(x,{...r,isInAbsenceFunction:r.isInAbsenceFunction||h,isInLookbehind:r.isInLookbehind||g,isInNegLookbehind:r.isInNegLookbehind||p});if(x.body.push(w),(g||r.isInLookbehind)&&!u){const E="Lookbehind includes a pattern not allowed by Oniguruma";if(p||r.isInNegLookbehind){if(hx(w)||w.type==="CapturingGroup")throw new Error(E)}else if(hx(w)||mx(w)&&w.negate)throw new Error(E)}}b=gx(l[t.nextIndex])}return t.nextIndex++,d}function Hj({kind:e,min:t,max:r},l){const a=l.parent,o=a.body.at(-1);if(!o||!Mj(o))throw new Error("Quantifier requires a repeatable token");const u=M_(e,t,r,o);return a.body.pop(),u}function Gj({raw:e},t){const{capturingGroups:r,subroutines:l}=t;let a=e.slice(3,-1);const o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(a);if(o){const f=+o.groups.num,d=r.length;if(t.hasNumberedRef=!0,a={"":f,"+":d+f,"-":d+1-f}[o.groups.sign],a<1)throw new Error("Invalid subroutine number")}else a==="0"&&(a=0);const u=j_(a);return l.push(u),u}function Fj(e,t){return{type:"AbsenceFunction",kind:e,body:hs(t?.body)}}function Ii(e){return{type:"Alternative",body:z_(e?.body)}}function yh(e,t){const r={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(r.negate=!!t?.negate),r}function bh(e,t){const r=!!t?.orphan;return{type:"Backreference",ref:e,...r&&{orphan:r}}}function D_(e,t){const r={name:void 0,isSubroutined:!1,...t};if(r.name!==void 0&&!Jj(r.name))throw new Error(`Group name "${r.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...r.name&&{name:r.name},...r.isSubroutined&&{isSubroutined:r.isSubroutined},body:hs(t?.body)}}function Mu(e,t){const r={useLastValid:!1,...t};if(e>1114111){const l=e.toString(16);if(r.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${l}}"`):new Error(`Invalid code point out of range in JS "\\x{${l}}"`)}return{type:"Character",value:e}}function Qo(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:z_(e?.body)}}function qj(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function xh(e,t){const r=!!t?.negate,l={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(l.negate=r),(e==="text_segment"||e==="newline"&&!r)&&(l.variableLength=!0),l}function $j(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Hl(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function Qj(e){return{type:"Flags",...e}}function Gn(e){const t=e?.atomic,r=e?.flags;if(t&&r)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...r&&{flags:r},body:hs(e?.body)}}function Oi(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:hs(e?.body)}}function Yj(e,t,r){return{type:"NamedCallout",kind:e,tag:t,arguments:r}}function Xj(e,t){const r=!!t?.negate;if(!hm.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:r}}function M_(e,t,r,l){if(t>r)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:r,body:l}}function Kj(e,t){return{type:"Regex",body:hs(t?.body),flags:e}}function j_(e){return{type:"Subroutine",ref:e}}function Dl(e,t){const r={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let l=r.unicodePropertyMap?.get(ju(e));if(!l){if(r.normalizeUnknownPropertyNames)l=Wj(e);else if(r.unicodePropertyMap&&!r.skipPropertyNameValidation)throw new Error(jt`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:l??e,negate:r.negate}}function Zj({flags:e,kind:t,name:r,negate:l,number:a}){switch(t){case"absence_repeater":return Fj("repeater");case"atomic":return Gn({atomic:!0});case"capturing":return D_(a,{name:r});case"group":return Gn({flags:e});case"lookahead":case"lookbehind":return Oi({behind:t==="lookbehind",negate:l});default:throw new Error(`Unexpected group kind "${t}"`)}}function hs(e){if(e===void 0)e=[Ii()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function z_(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function hx(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function mx(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function Jj(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function Wj(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function ju(e){return e.replace(/[- _]+/g,"").toLowerCase()}function px(e,t){return Hl(e,`${t?.type==="Character"&&t.value===93?"Empty":"Unclosed"} character class`)}function gx(e){return Hl(e,"Unclosed group")}function Xa(e,t,r=null){function l(o,u){for(let f=0;f<o.length;f++){const d=a(o[f],u,f,o);f=Math.max(-1,f+d)}}function a(o,u=null,f=null,d=null){let h=0,g=!1;const p={node:o,parent:u,key:f,container:d,root:e,remove(){Vo(d).splice(Math.max(0,Tl(f)+h),1),h--,g=!0},removeAllNextSiblings(){return Vo(d).splice(Tl(f)+1)},removeAllPrevSiblings(){const C=Tl(f)+h;return h-=C,Vo(d).splice(0,Math.max(0,C))},replaceWith(C,L={}){const O=!!L.traverse;d?d[Math.max(0,Tl(f)+h)]=C:Hl(u,"Can't replace root node")[f]=C,O&&a(C,u,f,d),g=!0},replaceWithMultiple(C,L={}){const O=!!L.traverse;if(Vo(d).splice(Math.max(0,Tl(f)+h),1,...C),h+=C.length-1,O){let B=0;for(let Y=0;Y<C.length;Y++)B+=a(C[Y],u,Tl(f)+Y+B,d)}g=!0},skip(){g=!0}},{type:b}=o,x=t["*"],w=t[b],E=typeof x=="function"?x:x?.enter,R=typeof w=="function"?w:w?.enter;if(E?.(p,r),R?.(p,r),!g)switch(b){case"AbsenceFunction":case"CapturingGroup":case"Group":l(o.body,o);break;case"Alternative":case"CharacterClass":l(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":a(o.min,o,"min"),a(o.max,o,"max");break;case"LookaroundAssertion":l(o.body,o);break;case"Quantifier":a(o.body,o,"body");break;case"Regex":l(o.body,o),a(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${b}"`)}return w?.exit?.(p,r),x?.exit?.(p,r),h}return a(e),e}function Vo(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Tl(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const e3=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function t3(e,t){for(let r=0;r<e.length;r++)e[r]>=t&&e[r]++}function n3(e,t,r,l){return e.slice(0,t)+l+e.slice(t+r.length)}const Pn=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function pm(e,t,r,l){const a=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1];let u=0,f="";for(const d of e.matchAll(a)){const{0:h,groups:{$skip:g}}=d;if(!g&&(!l||l===Pn.DEFAULT==!u)){r instanceof Function?f+=r(d,{context:u?Pn.CHAR_CLASS:Pn.DEFAULT,negated:o[o.length-1]}):f+=r;continue}h[0]==="["?(u++,o.push(h[1]==="^")):h==="]"&&u&&(u--,o.pop()),f+=h}return f}function I_(e,t,r,l){pm(e,t,r,l)}function r3(e,t,r=0,l){if(!new RegExp(t,"su").test(e))return null;const a=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");a.lastIndex=r;let o=0,u;for(;u=a.exec(e);){const{0:f,groups:{$skip:d}}=u;if(!d&&(!l||l===Pn.DEFAULT==!o))return u;f==="["?o++:f==="]"&&o&&o--,a.lastIndex==u.index&&a.lastIndex++}return null}function Ho(e,t,r){return!!r3(e,t,0,r)}function i3(e,t){const r=/\\?./gsu;r.lastIndex=t;let l=e.length,a=0,o=1,u;for(;u=r.exec(e);){const[f]=u;if(f==="[")a++;else if(a)f==="]"&&a--;else if(f==="(")o++;else if(f===")"&&(o--,!o)){l=u.index;break}}return e.slice(t,l)}const yx=new RegExp(String.raw`(?<noncapturingStart>${e3})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function l3(e,t){const r=t?.hiddenCaptures??[];let l=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:l,hiddenCaptures:r};const a="(?>",o="(?:(?=(",u=[0],f=[];let d=0,h=0,g=NaN,p;do{p=!1;let b=0,x=0,w=!1,E;for(yx.lastIndex=Number.isNaN(g)?0:g+o.length;E=yx.exec(e);){const{0:R,index:C,groups:{capturingStart:L,noncapturingStart:O}}=E;if(R==="[")b++;else if(b)R==="]"&&b--;else if(R===a&&!w)g=C,w=!0;else if(w&&O)x++;else if(L)w?x++:(d++,u.push(d+h));else if(R===")"&&w){if(!x){h++;const B=d+h;if(e=`${e.slice(0,g)}${o}${e.slice(g+a.length,C)}))<$$${B}>)${e.slice(C+1)}`,p=!0,f.push(B),t3(r,B),l.size){const Y=new Map;l.forEach((j,q)=>{Y.set(q>=B?q+1:q,j.map(G=>G>=B?G+1:G))}),l=Y}break}x--}}}while(p);return r.push(...f),e=pm(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:b,groups:{backrefNum:x,wrappedBackrefNum:w}})=>{if(x){const E=+x;if(E>u.length-1)throw new Error(`Backref "${b}" greater than number of captures`);return`\\${u[E]}`}return`\\${w}`},Pn.DEFAULT),{pattern:e,captureTransfers:l,hiddenCaptures:r}}const P_=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Dd=new RegExp(String.raw`
|
|
91
92
|
\\(?: \d+
|
|
92
93
|
| c[A-Za-z]
|
|
93
94
|
| [gk]<[^>]+>
|
|
@@ -102,7 +103,7 @@ Error generating stack: `+c.message+`
|
|
|
102
103
|
))?
|
|
103
104
|
| (?<qBase>${P_})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
104
105
|
| \\?.
|
|
105
|
-
`.replace(/\s+/g,""),"gsu");function
|
|
106
|
+
`.replace(/\s+/g,""),"gsu");function a3(e){if(!new RegExp(`${P_}\\+`).test(e))return{pattern:e};const t=[];let r=null,l=null,a="",o=0,u;for(Dd.lastIndex=0;u=Dd.exec(e);){const{0:f,index:d,groups:{qBase:h,qMod:g,invalidQ:p}}=u;if(f==="[")o||(l=d),o++;else if(f==="]")o?o--:l=null;else if(!o)if(g==="+"&&a&&!a.startsWith("(")){if(p)throw new Error(`Invalid quantifier "${f}"`);let b=-1;if(/^\{\d+\}$/.test(h))e=n3(e,d+h.length,g,"");else{if(a===")"||a==="]"){const x=a===")"?r:l;if(x===null)throw new Error(`Invalid unmatched "${a}"`);e=`${e.slice(0,x)}(?>${e.slice(x,d)}${h})${e.slice(d+f.length)}`}else e=`${e.slice(0,d-a.length)}(?>${a}${h})${e.slice(d+f.length)}`;b+=4}Dd.lastIndex+=b}else f[0]==="("?t.push(d):f===")"&&(r=t.length?t.pop():null);a=f}return{pattern:e}}const In=String.raw,s3=In`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,vh=In`\(\?R=(?<rDepth>[^\)]+)\)|${s3}`,zu=In`\(\?<(?![=!])(?<captureName>[^>]+)>`,B_=In`${zu}|(?<unnamed>\()(?!\?)`,Ri=new RegExp(In`${zu}|${vh}|\(\?|\\?.`,"gsu"),Md="Cannot use multiple overlapping recursions";function o3(e,t){const{hiddenCaptures:r,mode:l}={hiddenCaptures:[],mode:"plugin",...t};let a=t?.captureTransfers??new Map;if(!new RegExp(vh,"su").test(e))return{pattern:e,captureTransfers:a,hiddenCaptures:r};if(l==="plugin"&&Ho(e,In`\(\?\(DEFINE\)`,Pn.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],u=Ho(e,In`\\[1-9]`,Pn.DEFAULT),f=new Map,d=[];let h=!1,g=0,p=0,b;for(Ri.lastIndex=0;b=Ri.exec(e);){const{0:x,groups:{captureName:w,rDepth:E,gRNameOrNum:R,gRDepth:C}}=b;if(x==="[")g++;else if(g)x==="]"&&g--;else if(E){if(bx(E),h)throw new Error(Md);if(u)throw new Error(`${l==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const L=e.slice(0,b.index),O=e.slice(Ri.lastIndex);if(Ho(O,vh,Pn.DEFAULT))throw new Error(Md);const B=+E-1;e=xx(L,O,B,!1,r,o,p),a=_x(a,L,B,o.length,0,p);break}else if(R){bx(C);let L=!1;for(const te of d)if(te.name===R||te.num===+R){if(L=!0,te.hasRecursedWithin)throw new Error(Md);break}if(!L)throw new Error(In`Recursive \g cannot be used outside the referenced group "${l==="external"?R:In`\g<${R}&R=${C}>`}"`);const O=f.get(R),B=i3(e,O);if(u&&Ho(B,In`${zu}|\((?!\?)`,Pn.DEFAULT))throw new Error(`${l==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const Y=e.slice(O,b.index),j=B.slice(Y.length+x.length),q=o.length,G=+C-1,se=xx(Y,j,G,!0,r,o,p);a=_x(a,Y,G,o.length-q,q,p);const P=e.slice(0,O),X=e.slice(O+B.length);e=`${P}${se}${X}`,Ri.lastIndex+=se.length-x.length-Y.length-j.length,d.forEach(te=>te.hasRecursedWithin=!0),h=!0}else if(w)p++,f.set(String(p),Ri.lastIndex),f.set(w,Ri.lastIndex),d.push({num:p,name:w});else if(x[0]==="("){const L=x==="(";L&&(p++,f.set(String(p),Ri.lastIndex)),d.push(L?{num:p}:{})}else x===")"&&d.pop()}return r.push(...o),{pattern:e,captureTransfers:a,hiddenCaptures:r}}function bx(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function xx(e,t,r,l,a,o,u){const f=new Set;l&&I_(e+t,zu,({groups:{captureName:h}})=>{f.add(h)},Pn.DEFAULT);const d=[r,l?f:null,a,o,u];return`${e}${vx(`(?:${e}`,"forward",...d)}(?:)${vx(`${t})`,"backward",...d)}${t}`}function vx(e,t,r,l,a,o,u){const d=g=>t==="forward"?g+2:r-g+2-1;let h="";for(let g=0;g<r;g++){const p=d(g);h+=pm(e,In`${B_}|\\k<(?<backref>[^>]+)>`,({0:b,groups:{captureName:x,unnamed:w,backref:E}})=>{if(E&&l&&!l.has(E))return b;const R=`_$${p}`;if(w||x){const C=u+o.length+1;return o.push(C),u3(a,C),w?b:`(?<${x}${R}>`}return In`\k<${E}${R}>`},Pn.DEFAULT)}return h}function u3(e,t){for(let r=0;r<e.length;r++)e[r]>=t&&e[r]++}function _x(e,t,r,l,a,o){if(e.size&&l){let u=0;I_(t,B_,()=>u++,Pn.DEFAULT);const f=o-u+a,d=new Map;return e.forEach((h,g)=>{const p=(l-u*r)/r,b=u*r,x=g>f+u?g+l:g,w=[];for(const E of h)if(E<=f)w.push(E);else if(E>f+u+p)w.push(E+l);else if(E<=f+u)for(let R=0;R<=r;R++)w.push(E+u*R);else for(let R=0;R<=r;R++)w.push(E+b+p*R);d.set(x,w)}),d}return e}var Tt=String.fromCodePoint,Te=String.raw,Er={flagGroups:(()=>{try{new RegExp("(?i:)")}catch{return!1}return!0})(),unicodeSets:(()=>{try{new RegExp("[[]]","v")}catch{return!1}return!0})()};Er.bugFlagVLiteralHyphenIsRange=Er.unicodeSets?(()=>{try{new RegExp(Te`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Er.bugNestedClassIgnoresNegation=Er.unicodeSets&&new RegExp("[[^a]]","v").test("a");function pu(e,{enable:t,disable:r}){return{dotAll:!r?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!r?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function is(e,t,r){return e.has(t)||e.set(t,r),e.get(t)}function _h(e,t){return wx[e]>=wx[t]}function c3(e,t){if(e==null)throw new Error(t??"Value expected");return e}var wx={ES2025:2025,ES2024:2024,ES2018:2018},f3={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function U_(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!f3[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=Er.flagGroups?"ES2025":Er.unicodeSets?"ES2024":"ES2018"),t}var d3="[ -\r ]",h3=new Set([Tt(304),Tt(305)]),vr=Te`[\p{L}\p{M}\p{N}\p{Pc}]`;function V_(e){if(h3.has(e))return[e];const t=new Set,r=e.toLowerCase(),l=r.toUpperCase(),a=g3.get(r),o=m3.get(r),u=p3.get(r);return[...l].length===1&&t.add(l),u&&t.add(u),a&&t.add(a),t.add(r),o&&t.add(o),[...t]}var gm=new Map(`C Other
|
|
106
107
|
Cc Control cntrl
|
|
107
108
|
Cf Format
|
|
108
109
|
Cn Unassigned
|
|
@@ -192,7 +193,7 @@ Uppercase Upper
|
|
|
192
193
|
Variation_Selector VS
|
|
193
194
|
White_Space space
|
|
194
195
|
XID_Continue XIDC
|
|
195
|
-
XID_Start XIDS`.split(/\s/).map(e=>[ju(e),e])),
|
|
196
|
+
XID_Start XIDS`.split(/\s/).map(e=>[ju(e),e])),m3=new Map([["s",Tt(383)],[Tt(383),"s"]]),p3=new Map([[Tt(223),Tt(7838)],[Tt(107),Tt(8490)],[Tt(229),Tt(8491)],[Tt(969),Tt(8486)]]),g3=new Map([ni(453),ni(456),ni(459),ni(498),...jd(8072,8079),...jd(8088,8095),...jd(8104,8111),ni(8124),ni(8140),ni(8188)]),y3=new Map([["alnum",Te`[\p{Alpha}\p{Nd}]`],["alpha",Te`\p{Alpha}`],["ascii",Te`\p{ASCII}`],["blank",Te`[\p{Zs}\t]`],["cntrl",Te`\p{Cc}`],["digit",Te`\p{Nd}`],["graph",Te`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Te`\p{Lower}`],["print",Te`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Te`[\p{P}\p{S}]`],["space",Te`\p{space}`],["upper",Te`\p{Upper}`],["word",Te`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Te`\p{AHex}`]]);function b3(e,t){const r=[];for(let l=e;l<=t;l++)r.push(l);return r}function ni(e){const t=Tt(e);return[t.toLowerCase(),t]}function jd(e,t){return b3(e,t).map(r=>ni(r))}var H_=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function x3(e,t){const r={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};G_(e);const l={accuracy:r.accuracy,asciiWordBoundaries:r.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:_h(r.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Xa(e,v3,l);const a={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},o={currentFlags:a,prevFlags:null,globalFlags:a,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:l.subroutineRefMap};Xa(e,_3,o);const u={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return Xa(e,w3,u),e._originMap=o.groupOriginByCopy,e._strategy=l.strategy,e}var v3={AbsenceFunction({node:e,parent:t,replaceWith:r}){const{body:l,kind:a}=e;if(a==="repeater"){const o=Gn();o.body[0].body.push(Oi({negate:!0,body:l}),Dl("Any"));const u=Gn();u.body[0].body.push(M_("greedy",0,1/0,o)),r(gt(u,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:r},{flagDirectivesByAlt:l}){const a=e.body.filter(o=>o.kind==="flags");for(let o=r+1;o<t.body.length;o++){const u=t.body[o];is(l,u,[]).push(...a)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const r=q_(t.get(e));if(r){const l=Gn({flags:r});l.body[0].body=e.body,e.body=[gt(l,e)]}}}},Assertion({node:e,parent:t,key:r,container:l,root:a,remove:o,replaceWith:u},f){const{kind:d,negate:h}=e,{asciiWordBoundaries:g,avoidSubclass:p,supportedGNodes:b,wordIsAscii:x}=f;if(d==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${h?"Y":"y"}"`);if(d==="line_end")u(gt(Oi({body:[Ii({body:[yh("string_end")]}),Ii({body:[Mu(10)]})]}),t));else if(d==="line_start")u(gt(_r(Te`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(d==="search_start")if(b.has(e))a.flags.sticky=!0,o();else{const w=l[r-1];if(w&&T3(w))u(gt(Oi({negate:!0}),t));else{if(p)throw new Error(Te`Uses "\G" in a way that requires a subclass`);u(ri(yh("string_start"),t)),f.strategy="clip_search"}}else if(!(d==="string_end"||d==="string_start"))if(d==="string_end_newline")u(gt(_r(Te`(?=\n?\z)`),t));else if(d==="word_boundary"){if(!x&&!g){const w=`(?:(?<=${vr})(?!${vr})|(?<!${vr})(?=${vr}))`,E=`(?:(?<=${vr})(?=${vr})|(?<!${vr})(?!${vr}))`;u(gt(_r(h?E:w),t))}}else throw new Error(`Unexpected assertion kind "${d}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:r}=e;typeof r=="string"&&!Id(r)&&(r=zd(r,t),e.ref=r)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:r}){let{name:l}=e;l&&!Id(l)&&(l=zd(l,t),e.name=l),r.set(e.number,e),l&&r.set(l,e)},CharacterClassRange({node:e,parent:t,replaceWith:r}){if(t.kind==="intersection"){const l=Qo({body:[e]});r(gt(l,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:r},{accuracy:l,minTargetEs2024:a,digitIsAscii:o,spaceIsAscii:u,wordIsAscii:f}){const{kind:d,negate:h,value:g}=e;if(o&&(d==="digit"||g==="digit")){r(ri(xh("digit",{negate:h}),t));return}if(u&&(d==="space"||g==="space")){r(gt(Pd(_r(d3),h),t));return}if(f&&(d==="word"||g==="word")){r(ri(xh("word",{negate:h}),t));return}if(d==="any")r(ri(Dl("Any"),t));else if(d==="digit")r(ri(Dl("Nd",{negate:h}),t));else if(d!=="dot")if(d==="text_segment"){if(l==="strict")throw new Error(Te`Use of "\X" requires non-strict accuracy`);const p="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",b=Te`\p{RI}{2}|${p}(?:\u200D${p})*`;r(gt(_r(Te`(?>\r\n|${a?Te`\p{RGI_Emoji}`:b}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(d==="hex")r(ri(Dl("AHex",{negate:h}),t));else if(d==="newline")r(gt(_r(h?`[^
|
|
196
197
|
]`:`(?>\r
|
|
197
198
|
?|[
|
|
198
|
-
\v\f
\u2028\u2029])`),t));else if(d==="posix")if(!a&&(g==="graph"||g==="print")){if(l==="strict")throw new Error(`POSIX class "${g}" requires min target ES2024 or non-strict accuracy`);let p={graph:"!-~",print:" -~"}[g];h&&(p=`\0-${At(p.codePointAt(0)-1)}${At(p.codePointAt(2)+1)}-`),r(pt(wr(`[${p}]`),t))}else r(pt(Pd(wr(b3.get(g)),h),t));else if(d==="property")gm.has(ju(g))||(e.key="sc");else if(d==="space")r(ri(Dl("space",{negate:h}),t));else if(d==="word")r(pt(Pd(wr(_r),h),t));else throw new Error(`Unexpected character set kind "${d}"`)},Directive({node:e,parent:t,root:r,remove:l,replaceWith:a,removeAllPrevSiblings:o,removeAllNextSiblings:u}){const{kind:f,flags:d}=e;if(f==="flags")if(!d.enable&&!d.disable)l();else{const h=Vn({flags:d});h.body[0].body=u(),a(pt(h,t),{traverse:!0})}else if(f==="keep"){const h=r.body[0],p=r.body.length===1&&O_(h,{type:"Group"})&&h.body[0].body.length===1?h.body[0]:r;if(t.parent!==p||p.body.length>1)throw new Error(Te`Uses "\K" in a way that's unsupported`);const b=Oi({behind:!0});b.body[0].body=o(),a(pt(b,t))}else throw new Error(`Unexpected directive kind "${f}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(r=>delete e[r]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:r}=e.flags;t?.extended&&delete t.extended,r?.extended&&delete r.extended,t?.dotAll&&r?.dotAll&&delete t.dotAll,t?.ignoreCase&&r?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,r&&!Object.keys(r).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:r}=e;r==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:r}){const{kind:l}=e;if(l==="fail")r(pt(Oi({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${l.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=Vn();t.body[0].body.push(e.body),e.body=pt(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const r=[];let l=!1,a=!1;for(const o of e.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{const u=Q_(o.body);u?(l=!0,Array.isArray(u)?r.push(...u):r.push(u)):a=!0}l&&!a&&r.forEach(o=>t.add(o))},exit(e,{accuracy:t,passedLookbehind:r,strategy:l}){if(t==="strict"&&r&&l)throw new Error(Te`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:r}=e;typeof r=="string"&&!Id(r)&&(r=zd(r,t),e.ref=r)}},w3={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:r}){const{orphan:l,ref:a}=e;l||r.set(e,[...t.get(a).map(({node:o})=>o)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:r,skip:l},{groupOriginByCopy:a,groupsByName:o,multiplexCapturesToLeftByRef:u,openRefs:f,reffedNodesByReferencer:d}){const h=a.get(e);if(h&&f.has(e.number)){const p=ri(Sx(e.number),t);d.set(p,f.get(e.number)),r(p);return}f.set(e.number,e),u.set(e.number,[]),e.name&&rs(u,e.name,[]);const g=u.get(e.name??e.number);for(let p=0;p<g.length;p++){const b=g[p];if(h===b.node||h&&h===b.origin||e===b.origin){g.splice(p,1);break}}if(u.get(e.number).push({node:e,origin:h}),e.name&&u.get(e.name).push({node:e,origin:h}),e.name){const p=rs(o,e.name,new Map);let b=!1;if(h)b=!0;else for(const x of p.values())if(!x.hasDuplicateNameToRemove){b=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:b})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=pu(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:r},l){const{isRecursive:a,ref:o}=e;if(a){let g=t;for(;(g=g.parent)&&!(g.type==="CapturingGroup"&&(g.name===o||g.number===o)););l.reffedNodesByReferencer.set(e,g);return}const u=l.subroutineRefMap.get(o),f=o===0,d=f?Sx(0):F_(u,l.groupOriginByCopy,null);let h=d;if(!f){const g=q_(k3(u,b=>b.type==="Group"&&!!b.flags)),p=g?pu(l.globalFlags,g):l.globalFlags;E3(p,l.currentFlags)||(h=Vn({flags:A3(p)}),h.body[0].body.push(d))}r(pt(h,t),{traverse:!f})}},S3={Backreference({node:e,parent:t,replaceWith:r},l){if(e.orphan){l.highestOrphanBackref=Math.max(l.highestOrphanBackref,e.ref);return}const o=l.reffedNodesByReferencer.get(e).filter(u=>C3(u,e));if(!o.length)r(pt(Oi({negate:!0}),t));else if(o.length>1){const u=Vn({atomic:!0,body:o.reverse().map(f=>Ii({body:[bh(f.number)]}))});r(pt(u,t))}else e.ref=o[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const r=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let l=0;l<r;l++){const a=D_();e.body.at(-1).body.push(a)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function G_(e){Ya(e,{"*"({node:t,parent:r}){t.parent=r}})}function E3(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function C3(e,t){let r=t;do{if(r.type==="Regex")return!1;if(r.type==="Alternative")continue;if(r===e)return!1;const l=$_(r.parent);for(const a of l){if(a===r)break;if(a===e||Y_(a,e))return!0}}while(r=r.parent);throw new Error("Unexpected path")}function F_(e,t,r,l){const a=Array.isArray(e)?[]:{};for(const[o,u]of Object.entries(e))o==="parent"?a.parent=Array.isArray(r)?l:r:u&&typeof u=="object"?a[o]=F_(u,t,a,r):(o==="type"&&u==="CapturingGroup"&&t.set(a,t.get(e)??e),a[o]=u);return a}function Sx(e){const t=j_(e);return t.isRecursive=!0,t}function k3(e,t){const r=[];for(;e=e.parent;)(!t||t(e))&&r.push(e);return r}function zd(e,t){if(t.has(e))return t.get(e);const r=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,r),r}function q_(e){const t=["dotAll","ignoreCase"],r={enable:{},disable:{}};return e.forEach(({flags:l})=>{t.forEach(a=>{l.enable?.[a]&&(delete r.disable[a],r.enable[a]=!0),l.disable?.[a]&&(r.disable[a]=!0)})}),Object.keys(r.enable).length||delete r.enable,Object.keys(r.disable).length||delete r.disable,r.enable||r.disable?r:null}function A3({dotAll:e,ignoreCase:t}){const r={};return(e||t)&&(r.enable={},e&&(r.enable.dotAll=!0),t&&(r.enable.ignoreCase=!0)),(!e||!t)&&(r.disable={},!e&&(r.disable.dotAll=!0),!t&&(r.disable.ignoreCase=!0)),r}function $_(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function Q_(e){const t=e.find(r=>r.kind==="search_start"||L3(r,{negate:!1})||!T3(r));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const r=[];for(const l of t.body){const a=Q_(l.body);if(!a)return null;Array.isArray(a)?r.push(...a):r.push(a)}return r}return null}function Y_(e,t){const r=$_(e)??[];for(const l of r)if(l===t||Y_(l,t))return!0;return!1}function T3({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function R3(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function L3(e,t){const r={negate:null,...t};return e.type==="LookaroundAssertion"&&(r.negate===null||e.negate===r.negate)&&e.body.length===1&&O_(e.body[0],{type:"Assertion",kind:"search_start"})}function Id(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function wr(e,t){const l=N_(e,{...t,unicodePropertyMap:gm}).body;return l.length>1||l[0].body.length>1?Vn({body:l}):l[0].body[0]}function Pd(e,t){return e.negate=t,e}function ri(e,t){return e.parent=t,e}function pt(e,t){return G_(e),e.parent=t,e}function O3(e,t){const r=U_(t),l=_h(r.target,"ES2024"),a=_h(r.target,"ES2025"),o=r.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let u=null,f=null;if(!a){const x=[e.flags.ignoreCase];Ya(e,N3,{getCurrentModI:()=>x.at(-1),popModI(){x.pop()},pushModI(w){x.push(w)},setHasCasedChar(){x.at(-1)?u=!0:f=!0}})}const d={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||u)&&!f)};let h=e;const g={accuracy:r.accuracy,appliedGlobalFlags:d,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:h,originMap:e._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!a&&u&&f),useFlagMods:a,useFlagV:l,verbose:r.verbose};function p(x){return g.lastNode=h,h=x,f3(D3[x.type],`Unexpected node type "${x.type}"`)(x,g,p)}const b={pattern:e.body.map(p).join("|"),flags:p(e.flags),options:{...e.options}};return l||(delete b.options.force.v,b.options.disable.v=!0,b.options.unicodeSetsPlugin=null),b._captureTransfers=new Map,b._hiddenCaptures=[],g.captureMap.forEach((x,w)=>{x.hidden&&b._hiddenCaptures.push(w),x.transferTo&&rs(b._captureTransfers,x.transferTo,[]).push(w)}),b}var N3={"*":{enter({node:e},t){if(Cx(e)){const r=t.getCurrentModI();t.pushModI(e.flags?pu({ignoreCase:r},e.flags).ignoreCase:r)}},exit({node:e},t){Cx(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){ym(At(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},r){t(),X_(e,{firstOnly:!0}).length&&r.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&H_.has(e.value)&&t.setHasCasedChar()}},D3={Alternative({body:e},t,r){return e.map(r).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?Te`\B`:Te`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,r){const{body:l,name:a,number:o}=e,u={ignoreCase:t.currentFlags.ignoreCase},f=t.originMap.get(e);return f&&(u.hidden=!0,o>f.number&&(u.transferTo=f.number)),t.captureMap.set(o,u),`(${a?`?<${a}>`:""}${l.map(r).join("|")})`},Character({value:e},t){const r=At(e),l=Rl(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(l!==r)return l;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&ym(r)){const a=V_(r);return t.inCharClass?a.join(""):a.length>1?`[${a.join("")}]`:a[0]}return r},CharacterClass(e,t,r){const{kind:l,negate:a,parent:o}=e;let{body:u}=e;if(l==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Cr.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&u.some(kx)&&(u=[Mu(45),...u.filter(h=>!kx(h))]);const f=()=>`[${a?"^":""}${u.map(r).join(l==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Cr.bugNestedClassIgnoresNegation)&&!a){const g=u.filter(p=>p.type==="CharacterClass"&&p.kind==="union"&&p.negate);if(g.length){const p=Vn(),b=p.body[0];return p.parent=o,b.parent=p,u=u.filter(x=>!g.includes(x)),e.body=u,u.length?(e.parent=b,b.body.push(e)):p.body.pop(),g.forEach(x=>{const w=Ii({body:[x]});x.parent=w,w.parent=p,p.body.push(w)}),r(p)}}t.inCharClass=!0;const h=f();return t.inCharClass=!1,h}const d=u[0];if(l==="union"&&!a&&d&&((!t.useFlagV||!t.verbose)&&o.kind==="union"&&!(Cr.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&o.kind==="intersection"&&u.length===1&&d.type!=="CharacterClassRange"))return u.map(r).join("");if(!t.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return f()},CharacterClassRange(e,t){const r=e.min.value,l=e.max.value,a={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},o=Rl(r,a),u=Rl(l,a),f=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const d=X_(e);P3(d).forEach(g=>{f.add(Array.isArray(g)?`${Rl(g[0],a)}-${Rl(g[1],a)}`:Rl(g,a))})}return`${o}-${u}${[...f].join("")}`},CharacterSet({kind:e,negate:t,value:r,key:l},a){if(e==="dot")return a.currentFlags.dotAll?a.appliedGlobalFlags.dotAll||a.useFlagMods?".":"[^]":Te`[^\n]`;if(e==="digit")return t?Te`\D`:Te`\d`;if(e==="property"){if(a.useAppliedIgnoreCase&&a.currentFlags.ignoreCase&&H_.has(r))throw new Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${t?Te`\P`:Te`\p`}{${l?`${l}=`:""}${r}}`}if(e==="word")return t?Te`\W`:Te`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:r,parent:l},a,o){const u=a.currentFlags;r&&(a.currentFlags=pu(u,r));const f=t.map(o).join("|"),d=!a.verbose&&t.length===1&&l.type!=="Quantifier"&&!e&&(!a.useFlagMods||!r)?f:`(?${B3(e,r,a.useFlagMods)}${f})`;return a.currentFlags=u,d},LookaroundAssertion({body:e,kind:t,negate:r},l,a){return`(?${`${t==="lookahead"?"":"<"}${r?"!":"="}`}${e.map(a).join("|")})`},Quantifier(e,t,r){return r(e.body)+U3(e)},Subroutine({isRecursive:e,ref:t},r){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const l=r.recursionLimit;return t===0?`(?R=${l})`:Te`\g<${t}&R=${l}>`}},M3=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),j3=new Set(["-","\\","]","^","["]),z3=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),Ex=new Map([[9,Te`\t`],[10,Te`\n`],[11,Te`\v`],[12,Te`\f`],[13,Te`\r`],[8232,Te`\u2028`],[8233,Te`\u2029`],[65279,Te`\uFEFF`]]),I3=new RegExp("^\\p{Cased}$","u");function ym(e){return I3.test(e)}function X_(e,t){const r=!!t?.firstOnly,l=e.min.value,a=e.max.value,o=[];if(l<65&&(a===65535||a>=131071)||l===65536&&a>=131071)return o;for(let u=l;u<=a;u++){const f=At(u);if(!ym(f))continue;const d=V_(f).filter(h=>{const g=h.codePointAt(0);return g<l||g>a});if(d.length&&(o.push(...d),r))break}return o}function Rl(e,{escDigit:t,inCharClass:r,useFlagV:l}){if(Ex.has(e))return Ex.get(e);if(e<32||e>126&&e<160||e>262143||t&&V3(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const a=r?l?z3:j3:M3,o=At(e);return(a.has(o)?"\\":"")+o}function P3(e){const t=e.map(a=>a.codePointAt(0)).sort((a,o)=>a-o),r=[];let l=null;for(let a=0;a<t.length;a++)t[a+1]===t[a]+1?l??=t[a]:l===null?r.push(t[a]):(r.push([l,t[a]]),l=null);return r}function B3(e,t,r){if(e)return">";let l="";if(t&&r){const{enable:a,disable:o}=t;l=(a?.ignoreCase?"i":"")+(a?.dotAll?"s":"")+(o?"-":"")+(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")}return`${l}:`}function U3({kind:e,max:t,min:r}){let l;return!r&&t===1?l="?":!r&&t===1/0?l="*":r===1&&t===1/0?l="+":r===t?l=`{${r}}`:l=`{${r},${t===1/0?"":t}}`,l+{greedy:"",lazy:"?",possessive:"+"}[e]}function Cx({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function V3(e){return e>47&&e<58}function kx({type:e,value:t}){return e==="Character"&&t===45}var H3=class wh extends RegExp{#e=new Map;#t=null;#n;#i=null;#r=null;rawOptions={};get source(){return this.#n||"(?:)"}constructor(t,r,l){const a=!!l?.lazyCompile;if(t instanceof RegExp){if(l)throw new Error("Cannot provide options when copying a regexp");const o=t;super(o,r),this.#n=o.source,o instanceof wh&&(this.#e=o.#e,this.#i=o.#i,this.#r=o.#r,this.rawOptions=o.rawOptions)}else{const o={hiddenCaptures:[],strategy:null,transfers:[],...l};super(a?"":t,r),this.#n=t,this.#e=F3(o.hiddenCaptures,o.transfers),this.#r=o.strategy,this.rawOptions=l??{}}a||(this.#t=this)}exec(t){if(!this.#t){const{lazyCompile:a,...o}=this.rawOptions;this.#t=new wh(this.#n,this.flags,o)}const r=this.global||this.sticky,l=this.lastIndex;if(this.#r==="clip_search"&&r&&l){this.lastIndex=0;const a=this.#a(t.slice(l));return a&&(G3(a,l,t,this.hasIndices),this.lastIndex+=l),a}return this.#a(t)}#a(t){this.#t.lastIndex=this.lastIndex;const r=super.exec.call(this.#t,t);if(this.lastIndex=this.#t.lastIndex,!r||!this.#e.size)return r;const l=[...r];r.length=1;let a;this.hasIndices&&(a=[...r.indices],r.indices.length=1);const o=[0];for(let u=1;u<l.length;u++){const{hidden:f,transferTo:d}=this.#e.get(u)??{};if(f?o.push(null):(o.push(r.length),r.push(l[u]),this.hasIndices&&r.indices.push(a[u])),d&&l[u]!==void 0){const h=o[d];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(r[h]=l[u],this.hasIndices&&(r.indices[h]=a[u]),r.groups){this.#i||(this.#i=q3(this.source));const g=this.#i.get(d);g&&(r.groups[g]=l[u],this.hasIndices&&(r.indices.groups[g]=a[u]))}}}return r}};function G3(e,t,r,l){if(e.index+=t,e.input=r,l){const a=e.indices;for(let u=0;u<a.length;u++){const f=a[u];f&&(a[u]=[f[0]+t,f[1]+t])}const o=a.groups;o&&Object.keys(o).forEach(u=>{const f=o[u];f&&(o[u]=[f[0]+t,f[1]+t])})}}function F3(e,t){const r=new Map;for(const l of e)r.set(l,{hidden:!0});for(const[l,a]of t)for(const o of a)rs(r,o,{}).transferTo=l;return r}function q3(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map;let l=0,a=0,o;for(;o=t.exec(e);){const{0:u,groups:{capture:f,name:d}}=o;u==="["?l++:l?u==="]"&&l--:f&&(a++,d&&r.set(a,d))}return r}function $3(e,t){const r=Q3(e,t);return r.options?new H3(r.pattern,r.flags,r.options):new RegExp(r.pattern,r.flags)}function Q3(e,t){const r=U_(t),l=N_(e,{flags:r.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline},skipBackrefValidation:r.rules.allowOrphanBackrefs,unicodePropertyMap:gm}),a=v3(l,{accuracy:r.accuracy,asciiWordBoundaries:r.rules.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,bestEffortTarget:r.target}),o=O3(a,r),u=u3(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),f=s3(u.pattern),d=a3(f.pattern,{captureTransfers:u.captureTransfers,hiddenCaptures:u.hiddenCaptures}),h={pattern:d.pattern,flags:`${r.hasIndices?"d":""}${r.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(r.avoidSubclass){if(r.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const g=d.hiddenCaptures.sort((w,E)=>w-E),p=Array.from(d.captureTransfers),b=a._strategy,x=h.pattern.length>=r.lazyCompileLength;(g.length||p.length||b||x)&&(h.options={...g.length&&{hiddenCaptures:g},...p.length&&{transfers:p},...b&&{strategy:b},...x&&{lazyCompile:x}})}return h}function K_(e,t){return $3(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function Y3(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=r=>K_(r,{target:t.target}),{createScanner(r){return new cj(r,t)},createString(r){return{content:r}}}}var X3=em({bundledLanguages:()=>rm,bundledLanguagesAlias:()=>nm,bundledLanguagesBase:()=>tm,bundledLanguagesInfo:()=>Cu,bundledThemes:()=>lm,bundledThemesInfo:()=>im,codeToHast:()=>v_,codeToHtml:()=>x_,codeToTokens:()=>__,codeToTokensBase:()=>w_,codeToTokensWithThemes:()=>S_,createHighlighter:()=>Du,createJavaScriptRegexEngine:()=>Y3,createOnigurumaEngine:()=>B1,defaultJavaScriptRegexConstructor:()=>K_,getLastGrammarState:()=>C_,getSingletonHighlighter:()=>E_,loadWasm:()=>sm});z1(X3,uj);const Z_={ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",json:"json",css:"css",html:"html",md:"markdown",mdx:"mdx",py:"python",rb:"ruby",rs:"rust",go:"go",java:"java",sh:"bash",bash:"bash",zsh:"bash",fish:"fish",ps1:"powershell",yml:"yaml",yaml:"yaml",xml:"xml",svg:"xml",sql:"sql",graphql:"graphql",gql:"graphql",dockerfile:"dockerfile",toml:"toml",ini:"ini",lua:"lua",c:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",h:"c",hpp:"cpp",cs:"csharp",swift:"swift",kt:"kotlin",kts:"kotlin",scala:"scala",vue:"vue",svelte:"svelte",php:"php",r:"r",scss:"scss",less:"less",sass:"sass",styl:"stylus",dart:"dart",ex:"elixir",exs:"elixir",erl:"erlang",hs:"haskell",clj:"clojure",cljs:"clojure",pl:"perl",pm:"perl",zig:"zig",nim:"nim",ml:"ocaml",mli:"ocaml",fs:"fsharp",fsx:"fsharp",groovy:"groovy",gradle:"groovy",tf:"hcl",hcl:"hcl",proto:"protobuf",prisma:"prisma",astro:"astro",m:"objective-c",mm:"objective-cpp",tex:"latex",latex:"latex",diff:"diff",patch:"diff",nginx:"nginx",conf:"ini",cfg:"ini",env:"dotenv",bat:"bat",cmd:"bat",asm:"asm",s:"asm",jsonc:"jsonc",json5:"json5",csv:"csv",tsv:"csv",wasm:"wasm",ejs:"html",hbs:"handlebars",pug:"pug",jade:"pug",rst:"rst",jl:"julia",v:"v",sol:"solidity",glsl:"glsl",hlsl:"hlsl",wgsl:"wgsl"},J_={dockerfile:"dockerfile",makefile:"makefile",cmakelists:"cmake",gemfile:"ruby",rakefile:"ruby",justfile:"just",vagrantfile:"ruby"};function K3(e){const t=e.split(".").pop()?.toLowerCase()||"",r=e.split("/").pop()?.toLowerCase()||"",l=J_[r];return l||Z_[t]||null}const Z3=[...new Set([...Object.values(Z_),...Object.values(J_)])];let Bd=null;function J3(){return Bd||(Bd=Du({themes:["github-light","github-dark"],langs:Z3})),Bd}function W_(){const[e,t]=F.useState(null);return F.useEffect(()=>{J3().then(t)},[]),{highlight:F.useCallback((l,a,o)=>{if(!e)return null;const u=K3(a);if(!u)return null;const f=o==="dark"?"github-dark":"github-light";try{return e.codeToTokens(l,{lang:u,theme:f}).tokens.map(h=>({tokens:h.map(g=>({text:g.content,color:g.color}))}))}catch{return null}},[e]),ready:e!==null}}function W3(e){const{content:t}=e,{highlight:r,ready:l}=W_(),a=F.useMemo(()=>({p({children:o}){return v.jsx("p",{className:"mb-1.5 last:mb-0",children:o})},strong({children:o}){return v.jsx("strong",{className:"font-semibold text-text",children:o})},em({children:o}){return v.jsx("em",{children:o})},a({href:o,children:u}){return v.jsx("a",{href:o,className:"text-accent hover:underline",target:"_blank",rel:"noopener noreferrer",children:u})},ul({children:o}){return v.jsx("ul",{className:"list-disc pl-4 mb-1.5 last:mb-0",children:o})},ol({children:o}){return v.jsx("ol",{className:"list-decimal pl-4 mb-1.5 last:mb-0",children:o})},li({children:o}){return v.jsx("li",{className:"mb-0.5",children:o})},blockquote({children:o}){return v.jsx("blockquote",{className:"border-l-2 border-border pl-3 text-text-muted mb-1.5 last:mb-0",children:o})},pre({children:o}){return v.jsx("div",{className:"mb-1.5 last:mb-0",children:o})},code({className:o,children:u}){const f=/language-(\w+)/.exec(o||""),d=f?f[1]:null,h=String(u).replace(/\n$/,"");if(!d)return v.jsx("code",{className:"px-1 py-0.5 rounded bg-bg-tertiary text-[0.9em] font-mono",children:u});let g=null;if(l&&d){const p=r(h,`file.${d}`,MC());p&&(g=p.map(b=>b.tokens))}return v.jsxs("div",{className:"rounded-md border border-border overflow-hidden",children:[v.jsx("div",{className:"bg-bg-secondary px-3 py-1 border-b border-border",children:v.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:d})}),v.jsx("pre",{className:"px-3 py-2 overflow-x-auto bg-bg text-xs leading-5 font-mono",children:g?g.map((p,b)=>v.jsx("div",{children:p.map((x,w)=>v.jsx("span",{style:x.color?{color:x.color}:void 0,children:x.text},w))},b)):v.jsx("code",{children:h})})]})},hr(){return v.jsx("hr",{className:"border-border my-2"})},h1({children:o}){return v.jsx("p",{className:"font-semibold text-text mb-1",children:o})},h2({children:o}){return v.jsx("p",{className:"font-semibold text-text mb-1",children:o})},h3({children:o}){return v.jsx("p",{className:"font-semibold text-text mb-1",children:o})},del({children:o}){return v.jsx("del",{className:"text-text-muted",children:o})},table({children:o}){return v.jsx("table",{className:"border-collapse border border-border text-xs my-1.5",children:o})},th({children:o}){return v.jsx("th",{className:"border border-border px-2 py-1 bg-bg-secondary text-left font-medium",children:o})},td({children:o}){return v.jsx("td",{className:"border border-border px-2 py-1",children:o})}}),[r,l]);return v.jsx("div",{className:"markdown-body",children:v.jsx(QL,{remarkPlugins:[sD],components:a,children:t})})}function e4(e){const t=new Date(e),l=new Date().getTime()-t.getTime(),a=Math.floor(l/1e3),o=Math.floor(a/60),u=Math.floor(o/60),f=Math.floor(u/24);return a<60?"just now":o<60?`${o}m ago`:u<24?`${u}h ago`:f<30?`${f}d ago`:t.toLocaleDateString()}function t4(e){const{name:t,avatarUrl:r,type:l}=e;if(r)return v.jsx("img",{src:r,alt:t,className:"w-5 h-5 rounded-full"});const a=l==="agent"?"bg-accent":"bg-text-muted",o=t.charAt(0).toUpperCase();return v.jsx("div",{className:`w-5 h-5 rounded-full ${a} flex items-center justify-center text-white text-[10px] font-medium`,children:o})}function bm(e){const{comment:t,onDelete:r}=e;return v.jsxs("div",{className:"px-3 py-2 border-b border-border last:border-b-0 group",children:[v.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[v.jsx(t4,{name:t.author.name,avatarUrl:t.author.avatarUrl,type:t.author.type}),v.jsx("span",{className:"text-xs font-semibold text-text",children:t.author.name}),t.author.type==="agent"&&v.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-accent/15 text-accent font-medium",children:"bot"}),v.jsx("span",{className:"text-[11px] text-text-muted",children:e4(t.createdAt)}),v.jsx("button",{onClick:r,className:"ml-auto text-text-muted hover:text-deleted opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer",title:"Delete comment",children:v.jsx(ls,{className:"w-3.5 h-3.5"})})]}),v.jsx("div",{className:"text-sm text-text pl-7",children:v.jsx(W3,{content:t.body})})]})}const n4={resolved:"bg-added/20 text-added",dismissed:"bg-text-muted/20 text-text-muted line-through",outdated:"bg-orange-100 text-orange-800 dark:bg-orange-900/50 dark:text-orange-200"},r4={resolved:"Resolved",dismissed:"Dismissed",outdated:"Outdated"};function kr(e){const{variant:t,children:r,size:l="default"}=e;return v.jsx("span",{className:Tt("rounded-full font-medium",l==="sm"?"px-1 py-0.5 text-[9px]":"px-1.5 py-0.5 text-[10px]",n4[t]),children:r??r4[t]})}function Ax(e){const{status:t}=e;switch(t){case"resolved":return v.jsx(kr,{variant:"resolved"});case"dismissed":return v.jsx(kr,{variant:"dismissed"});default:return null}}function Sh(e){const{thread:t,onReply:r,onResolve:l,onUnresolve:a,onDeleteComment:o,onDeleteThread:u,currentAuthor:f,colSpan:d,viewMode:h,side:g,currentCode:p}=e,[b,x]=F.useState(!1),[w,E]=F.useState(zl(t)),R=t.anchorContent&&p&&t.anchorContent!==p;if(w){const B=v.jsx("td",{colSpan:d,className:"px-4 py-2 border-l border-border",children:v.jsxs("button",{onClick:()=>E(!1),className:"thread-card flex items-center gap-2 text-xs text-text-muted hover:text-text-secondary transition-colors cursor-pointer rounded",children:[v.jsx(as,{className:"w-4 h-4"}),v.jsxs("span",{children:[t.comments.length," comment",t.comments.length!==1?"s":""]}),v.jsx(Ax,{status:t.status}),R&&v.jsx(kr,{variant:"outdated"})]})});return h==="split"?v.jsx("tr",{"data-thread-id":t.id,children:g==="old"?v.jsxs(v.Fragment,{children:[B,v.jsx("td",{colSpan:d})]}):v.jsxs(v.Fragment,{children:[v.jsx("td",{colSpan:d}),B]})}):v.jsx("tr",{"data-thread-id":t.id,children:B})}const C=t.startLine===t.endLine?`Line ${t.startLine}`:`Lines ${t.startLine}–${t.endLine}`,L=zl(t),O=v.jsx("td",{colSpan:d,className:Tt("px-4 py-3",{"border-l border-border":g==="new"&&h==="split"}),children:v.jsxs("div",{className:"thread-card border border-border rounded-lg overflow-hidden max-w-[700px]",children:[v.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 bg-bg-secondary border-b border-border",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"text-[11px] text-text-muted font-mono",children:C}),v.jsx(Ax,{status:t.status}),R&&v.jsx(kr,{variant:"outdated"})]}),v.jsxs("div",{className:"flex items-center gap-1",children:[L?v.jsx("button",{onClick:()=>a(t.id),className:"text-[11px] text-text-muted hover:text-text-secondary transition-colors cursor-pointer",children:"Reopen"}):v.jsx("button",{onClick:()=>{l(t.id),E(!0)},className:"text-[11px] text-text-muted hover:text-text-secondary transition-colors cursor-pointer",children:"Resolve"}),v.jsx("button",{onClick:()=>E(!0),className:"text-[11px] text-text-muted hover:text-text-secondary transition-colors cursor-pointer ml-2",children:"Collapse"}),v.jsx("button",{onClick:()=>u(t.id),className:"text-text-muted hover:text-deleted transition-colors cursor-pointer ml-1",title:"Delete thread",children:v.jsx(ls,{className:"w-3.5 h-3.5"})})]})]}),v.jsx("div",{children:t.comments.map(B=>v.jsx(bm,{comment:B,onDelete:()=>o(t.id,B.id)},B.id))}),b?v.jsx("div",{className:"px-3 py-2 border-t border-border",children:v.jsx(bu,{onSubmit:B=>{r(t.id,B,f),x(!1)},onCancel:()=>x(!1),placeholder:"Reply...",submitLabel:"Reply"})}):v.jsx("div",{className:"px-3 py-2 border-t border-border",children:v.jsx("button",{onClick:()=>x(!0),className:"text-xs text-accent hover:text-accent-hover transition-colors cursor-pointer",children:"Reply"})})]})});return h==="split"?v.jsx("tr",{"data-thread-id":t.id,children:g==="old"?v.jsxs(v.Fragment,{children:[O,v.jsx("td",{colSpan:d})]}):v.jsxs(v.Fragment,{children:[v.jsx("td",{colSpan:d}),O]})}):v.jsx("tr",{"data-thread-id":t.id,children:O})}function ew(e){const{colSpan:t,filePath:r,side:l,startLine:a,endLine:o,currentAuthor:u,onSubmit:f,onCancel:d,viewMode:h}=e,g=a===o?`${a}`:`${a} to ${o}`,p=v.jsx("div",{className:"max-w-[700px]",children:v.jsx(bu,{onSubmit:b=>f(r,l,a,o,b,u),onCancel:d,lineLabel:`Add a comment on line${a!==o?"s":""} ${g}`})});return h==="split"?v.jsx("tr",{children:l==="old"?v.jsxs(v.Fragment,{children:[v.jsx("td",{colSpan:t,className:"px-4 py-3 bg-bg-secondary",children:p}),v.jsx("td",{colSpan:t,className:"bg-bg-secondary"})]}):v.jsxs(v.Fragment,{children:[v.jsx("td",{colSpan:t,className:"bg-bg-secondary"}),v.jsx("td",{colSpan:t,className:"px-4 py-3 bg-bg-secondary border-l border-border",children:p})]})}):v.jsx("tr",{children:v.jsx("td",{colSpan:t,className:"px-4 py-3 bg-bg-secondary",children:p})})}function Yo(e,t,r,l,a,o){const u=e.type==="delete"?"old":"new",f=u==="old"?e.oldLineNumber:e.newLineNumber,d=f,h=d!==null?`${r?"exp-":""}${e.type}-${d}`:`line-${t}`,g=d!==null?`${e.type}-${d}`:"",p=l?.get(g),b=[];if(b.push(v.jsx(BA,{line:e,syntaxTokens:p,expanded:r,isSelected:f!==null?a.isLineSelected?.(f,u):!1,onLineMouseDown:a.onLineMouseDown,onLineMouseEnter:a.onLineMouseEnter,onCommentClick:a.onCommentClick,onUndo:o},h)),f!==null&&a.threads){const x=a.threads.filter(w=>w.endLine===f&&w.side===u);for(const w of x)b.push(v.jsx(Sh,{thread:w,onReply:a.onReply,onResolve:a.onResolve,onUnresolve:a.onUnresolve,onDeleteComment:a.onDeleteComment,onDeleteThread:a.onDeleteThread,currentAuthor:a.currentAuthor,colSpan:4,currentCode:a.getOriginalCode?.(w.side,w.startLine,w.endLine)},`thread-${w.id}`))}return f!==null&&a.pendingSelection&&a.pendingSelection.endLine===f&&a.pendingSelection.side===u&&a.filePath&&a.currentAuthor&&a.onAddThread&&a.onCancelPending&&b.push(v.jsx(ew,{colSpan:4,filePath:a.filePath,side:a.pendingSelection.side,startLine:a.pendingSelection.startLine,endLine:a.pendingSelection.endLine,currentAuthor:a.currentAuthor,onSubmit:a.onAddThread,onCancel:a.onCancelPending},"pending-comment")),b}function i4(e){const{hunk:t,syntaxMap:r,expandControls:l,topExpansionLines:a,bottomExpansionLines:o,expansionSyntaxMap:u,threads:f,pendingSelection:d,currentAuthor:h,isLineSelected:g,onLineMouseDown:p,onLineMouseEnter:b,onCommentClick:x,onAddThread:w,onReply:E,onResolve:R,onUnresolve:C,onDeleteComment:L,onDeleteThread:O,onCancelPending:B,filePath:Y,onRevertChange:j,getOriginalCode:q}=e,G={isLineSelected:g,onLineMouseDown:p,onLineMouseEnter:b,onCommentClick:x,threads:f,pendingSelection:d,currentAuthor:h,onAddThread:w,onReply:E,onResolve:R,onUnresolve:C,onDeleteComment:L,onDeleteThread:O,onCancelPending:B,filePath:Y,getOriginalCode:q},oe=F.useMemo(()=>{if(!j)return new Map;const X=bv(t.lines),te=new Map;for(const fe of X)te.set(fe.endIndex,fe);return te},[t.lines,j]),P=[];if(a)for(let X=0;X<a.length;X++)P.push(...Yo(a[X],X,!0,u,G));if(o)for(let X=0;X<o.length;X++)P.push(...Yo(o[X],X,!0,u,G));for(let X=0;X<t.lines.length;X++){const te=oe.get(X),fe=te?()=>j(t,te.startIndex,te.endIndex):void 0;P.push(...Yo(t.lines[X],X,!1,r,G,fe))}return v.jsxs("tbody",{className:l?.wasExpanded&&l.remainingLines<=0?"":"border-t border-border-muted",children:[v.jsx(Av,{hunk:t,expandControls:l}),P]})}function tw(e){const t=[];let r=0;for(;r<e.length;){const l=e[r];if(l.type==="context"){t.push({left:l,right:l}),r++;continue}if(l.type==="delete"){const a=[];for(;r<e.length&&e[r].type==="delete";)a.push(e[r]),r++;const o=[];for(;r<e.length&&e[r].type==="add";)o.push(e[r]),r++;const u=Math.max(a.length,o.length);for(let f=0;f<u;f++)t.push({left:f<a.length?a[f]:null,right:f<o.length?o[f]:null});continue}if(l.type==="add"){t.push({left:null,right:l}),r++;continue}r++}return t}function Tx(e){return e?yv(e.type):"bg-bg-secondary"}function l4(e){const t=e.type==="delete"?e.oldLineNumber:e.newLineNumber;return`${e.type}-${t}`}function Rx(e){const{line:t,side:r,syntaxMap:l,expanded:a,isSelected:o,onMouseDown:u,onMouseEnter:f,onCommentClick:d,onUndo:h}=e,[g,p]=F.useState(!1);if(!t)return v.jsxs(v.Fragment,{children:[v.jsx(Wo,{lineNumber:null,className:"diff-empty-cell"}),v.jsx("td",{className:"px-3 whitespace-pre border-r border-border-muted align-top diff-empty-cell"})]});const b=a?"bg-diff-expanded-gutter":Tx(t),x=a?"bg-diff-expanded-bg":Tx(t),w=r==="left"?t.oldLineNumber:t.newLineNumber,E=l4(t),R=l?.get(E);return v.jsxs(v.Fragment,{children:[v.jsx(Wo,{lineNumber:w,className:b,isSelected:o,showCommentButton:!!d&&w!==null,forceShowButton:g,onMouseDown:u,onMouseEnter:f,onCommentClick:d}),v.jsxs("td",{className:Tt("px-3 whitespace-pre-wrap break-all border-r border-border-muted align-top relative",o?"bg-diff-comment-bg":x),onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[v.jsx("span",{className:"inline",children:Cv(t,R)}),h&&v.jsxs("button",{onClick:h,className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-1 px-2 py-0.5 text-xs rounded bg-deleted/15 text-deleted hover:bg-deleted/25 transition-colors cursor-pointer opacity-0 group-hover/split-row:opacity-100",title:"Undo this change",children:[v.jsx(kv,{className:"w-3 h-3"}),"Undo"]})]})]})}function Xo(e,t,r,l,a,o){const u=tw(e),f=[];for(let d=0;d<u.length;d++){const h=u[d],g=h.left,p=h.right,b=g?.oldLineNumber??null,x=p?.newLineNumber??null,w=o?.get(d);f.push(v.jsxs("tr",{className:"group/split-row font-mono text-sm leading-6",children:[v.jsx(Rx,{line:g,side:"left",syntaxMap:r,expanded:t,isSelected:b!==null?a.isLineSelected?.(b,"old"):!1,onMouseDown:b!==null?()=>a.onLineMouseDown?.(b,"old"):void 0,onMouseEnter:b!==null?()=>a.onLineMouseEnter?.(b,"old"):void 0,onCommentClick:b!==null&&a.onCommentClick?()=>a.onCommentClick(b,"old"):void 0,onUndo:w&&!p?w:void 0}),v.jsx(Rx,{line:p,side:"right",syntaxMap:r,expanded:t,isSelected:x!==null?a.isLineSelected?.(x,"new"):!1,onMouseDown:x!==null?()=>a.onLineMouseDown?.(x,"new"):void 0,onMouseEnter:x!==null?()=>a.onLineMouseEnter?.(x,"new"):void 0,onCommentClick:x!==null&&a.onCommentClick?()=>a.onCommentClick(x,"new"):void 0,onUndo:w&&p?w:void 0})]},`${l}-${d}`));const E=[];if(b!==null&&a.threads){const R=a.threads.filter(C=>C.endLine===b&&C.side==="old");for(const C of R)E.push(v.jsx(Sh,{thread:C,onReply:a.onReply,onResolve:a.onResolve,onUnresolve:a.onUnresolve,onDeleteComment:a.onDeleteComment,onDeleteThread:a.onDeleteThread,currentAuthor:a.currentAuthor,colSpan:2,viewMode:"split",side:"old",currentCode:a.getOriginalCode?.(C.side,C.startLine,C.endLine)},`thread-${C.id}`))}if(x!==null&&a.threads){const R=a.threads.filter(C=>C.endLine===x&&C.side==="new");for(const C of R)E.push(v.jsx(Sh,{thread:C,onReply:a.onReply,onResolve:a.onResolve,onUnresolve:a.onUnresolve,onDeleteComment:a.onDeleteComment,onDeleteThread:a.onDeleteThread,currentAuthor:a.currentAuthor,colSpan:2,viewMode:"split",side:"new",currentCode:a.getOriginalCode?.(C.side,C.startLine,C.endLine)},`thread-${C.id}`))}if(a.pendingSelection&&a.filePath&&a.currentAuthor&&a.onAddThread&&a.onCancelPending){const R=b!==null&&a.pendingSelection.endLine===b&&a.pendingSelection.side==="old",C=x!==null&&a.pendingSelection.endLine===x&&a.pendingSelection.side==="new";(R||C)&&E.push(v.jsx(ew,{colSpan:2,filePath:a.filePath,side:a.pendingSelection.side,startLine:a.pendingSelection.startLine,endLine:a.pendingSelection.endLine,currentAuthor:a.currentAuthor,onSubmit:a.onAddThread,onCancel:a.onCancelPending,viewMode:"split"},"pending-comment"))}E.length>0&&f.push(...E)}return f}function a4(e){const{hunk:t,syntaxMap:r,expandControls:l,topExpansionLines:a,bottomExpansionLines:o,expansionSyntaxMap:u,threads:f,pendingSelection:d,currentAuthor:h,isLineSelected:g,onLineMouseDown:p,onLineMouseEnter:b,onCommentClick:x,onAddThread:w,onReply:E,onResolve:R,onUnresolve:C,onDeleteComment:L,onDeleteThread:O,onCancelPending:B,filePath:Y,onRevertChange:j,getOriginalCode:q}=e,G={isLineSelected:g,onLineMouseDown:p,onLineMouseEnter:b,onCommentClick:x,threads:f,pendingSelection:d,currentAuthor:h,onAddThread:w,onReply:E,onResolve:R,onUnresolve:C,onDeleteComment:L,onDeleteThread:O,onCancelPending:B,filePath:Y,getOriginalCode:q},oe=F.useMemo(()=>{if(!j)return;const X=bv(t.lines),te=tw(t.lines),fe=new Map;for(const le of X){let ne=-1;for(let z=0;z<te.length;z++){const Z=te[z],re=Z.left&&Z.left.type!=="context",me=Z.right&&Z.right.type!=="context";if(re||me){const k=te[z+1];if(!k||(!k.left||k.left.type==="context")&&(!k.right||k.right.type==="context")){const Q=Z.left&&Z.left.type!=="context"&&t.lines.indexOf(Z.left)>=le.startIndex&&t.lines.indexOf(Z.left)<=le.endIndex,T=Z.right&&Z.right.type!=="context"&&t.lines.indexOf(Z.right)>=le.startIndex&&t.lines.indexOf(Z.right)<=le.endIndex;(Q||T)&&(ne=z)}}}if(ne>=0){const z=le;fe.set(ne,()=>j(t,z.startIndex,z.endIndex))}}return fe},[t,j]),P=[];return a&&a.length>0&&P.push(...Xo(a,!0,u,"top-exp",G)),o&&o.length>0&&P.push(...Xo(o,!0,u,"bot-exp",G)),P.push(...Xo(t.lines,!1,r,"hunk",G,oe)),v.jsxs("tbody",{className:l?.wasExpanded&&l.remainingLines<=0?"":"border-t border-border-muted",children:[v.jsx(Av,{hunk:t,expandControls:l}),P]})}function nw(e,t){const r=new Map;if(!t)return r;for(const l of e){if(!l.content)continue;const a=t(l.content);if(!a||a.length===0)continue;const o=`${l.type}-${l.type==="delete"?l.oldLineNumber:l.newLineNumber}`;r.set(o,a[0].tokens)}return r}function Eh(e,t,r,l,a){if(t==="split")return Xo(e,!0,l,r,a);const o=[];for(let u=0;u<e.length;u++)o.push(...Yo(e[u],u,!0,l,a));return o}function s4(e){const{hunk:t,viewMode:r,syntaxMap:l,expandControls:a,topExpansionLines:o,gapExpansion:u,gapId:f,highlightLine:d,threads:h,pendingSelection:g,currentAuthor:p,isLineSelected:b,onLineMouseDown:x,onLineMouseEnter:w,onCommentClick:E,onAddThread:R,onReply:C,onResolve:L,onUnresolve:O,onDeleteComment:B,onDeleteThread:Y,onCancelPending:j,filePath:q,onRevertChange:G,getOriginalCode:oe}=e,P=r==="split"?a4:i4,X=[...o||[],...u?.linesFromTop||[],...u?.linesFromBottom||[]],te=X.length>0?nw(X,d):void 0,fe={isLineSelected:b,onLineMouseDown:x,onLineMouseEnter:w,onCommentClick:E,threads:h,pendingSelection:g,currentAuthor:p,onAddThread:R,onReply:C,onResolve:L,onUnresolve:O,onDeleteComment:B,onDeleteThread:Y,onCancelPending:j,filePath:q};return v.jsxs(v.Fragment,{children:[u&&u.linesFromTop.length>0&&v.jsx("tbody",{children:Eh(u.linesFromTop,r,`${f}-top`,te,fe)}),v.jsx(P,{hunk:t,syntaxMap:l,expandControls:a,topExpansionLines:o&&o.length>0?o:void 0,bottomExpansionLines:u&&u.linesFromBottom.length>0?u.linesFromBottom:void 0,expansionSyntaxMap:te,threads:h,pendingSelection:g,currentAuthor:p,isLineSelected:b,onLineMouseDown:x,onLineMouseEnter:w,onCommentClick:E,onAddThread:R,onReply:C,onResolve:L,onUnresolve:O,onDeleteComment:B,onDeleteThread:Y,onCancelPending:j,filePath:q,onRevertChange:G,getOriginalCode:oe})]})}function rw(e){return v.jsx("svg",{className:Tt("w-3 h-3 shrink-0 text-text-muted transition-transform duration-150",e.expanded&&"rotate-90"),viewBox:"0 0 16 16",fill:"currentColor",children:v.jsx("path",{d:"M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z"})})}function o4(e){const{threads:t,onDeleteComment:r,onDeleteThread:l}=e,[a,o]=F.useState(!1);return t.length===0?null:v.jsxs("div",{className:"border-b border-border bg-bg-secondary/50",children:[v.jsxs("button",{onClick:()=>o(!a),className:"flex items-center gap-2 w-full px-4 py-2 text-xs text-text-muted hover:text-text-secondary transition-colors cursor-pointer",children:[v.jsx(rw,{expanded:a}),v.jsx(as,{className:"w-3.5 h-3.5"}),v.jsxs("span",{children:[t.length," outdated comment",t.length!==1?"s":""]}),v.jsx(kr,{variant:"outdated"})]}),a&&v.jsx("div",{className:"px-4 pb-3 space-y-2",children:t.map(u=>{const f=u.startLine===u.endLine?`Line ${u.startLine}`:`Lines ${u.startLine}–${u.endLine}`;return v.jsxs("div",{className:"border border-border rounded-lg overflow-hidden max-w-[700px]",children:[v.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 bg-bg-secondary border-b border-border",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"text-[11px] text-text-muted font-mono",children:f}),v.jsx(kr,{variant:"outdated"}),(u.status==="resolved"||u.status==="dismissed")&&v.jsx(kr,{variant:u.status})]}),v.jsx("button",{onClick:()=>l(u.id),className:"text-text-muted hover:text-deleted transition-colors cursor-pointer",title:"Delete thread",children:v.jsx(ls,{className:"w-3.5 h-3.5"})})]}),u.anchorContent&&v.jsx("pre",{className:"px-3 py-2 text-xs font-mono text-text-muted bg-bg-tertiary/50 border-b border-border overflow-x-auto whitespace-pre max-h-24 overflow-y-auto",children:u.anchorContent}),v.jsx("div",{children:u.comments.map(d=>v.jsx(bm,{comment:d,onDelete:()=>r(u.id,d.id)},d.id))})]},u.id)})})]})}const Lx="w-[25px] min-w-[25px] bg-diff-hunk-bg border-r border-border-muted p-0",u4="flex items-center justify-center w-full h-[18px] cursor-pointer text-diff-hunk-text/70 hover:text-diff-hunk-text transition-colors",c4="bg-diff-hunk-bg";function f4(e){const{position:t,remainingLines:r,loading:l,onExpand:a}=e;return r<=0?null:v.jsxs("tr",{className:c4,children:[l?v.jsx("td",{className:Lx,children:v.jsx("div",{className:"flex items-center justify-center h-[18px]",children:v.jsx(zh,{})})}):v.jsx("td",{className:Lx,children:v.jsx("button",{className:u4,onClick:()=>a("down"),title:`Expand ${Math.min(r,20)} lines`,children:t==="bottom"?v.jsx(Yd,{}):v.jsx(Go,{})})}),v.jsx("td",{colSpan:3})]})}const iw=200,Ox={name:"You",type:"user"};function d4(e){let t=0;for(const r of e.hunks)t+=r.lines.length;return t}function h4(e){const{file:t,viewMode:r,collapsed:l,onToggleCollapse:a,reviewed:o,onReviewedChange:u,highlightLine:f,baseRef:d,canRevert:h,onRevert:g,threads:p,commentsEnabled:b,commentActions:x,onAddThread:w,pendingSelection:E,onPendingSelectionChange:R,highlighted:C,onHighlightEnd:L}=e,O=d4(t),B=O>=iw,[Y,j]=F.useState(!1),[q,G]=F.useState(new Map),[oe,P]=F.useState(null),X=Xt(t),te=t.status==="renamed"&&t.oldPath!==t.newPath,fe=t.status==="added",le=yu(),ne=t.oldPath||X,z=t.oldFileLineCount??null,{copied:Z,copy:re}=gv(),[me,k]=F.useState(null),N=F.useCallback(async se=>{k(null);const he=Wk(t,se.hunk,se.startIndex,se.endIndex);await AC(he),g?.()},[t,g]),{addReply:Q,resolveThread:T,unresolveThread:ue,dismissThread:de,deleteComment:ce,deleteThread:ke}=x,Fe=F.useCallback((se,he,be)=>$b(t.hunks,se,he,be),[t.hunks]),ve=F.useCallback((se,he,be,je,Me,dt)=>{const Fn=$b(t.hunks,he,be,je);w(se,he,be,je,Me,dt,Fn||void 0)},[w,t.hunks]),gt=F.useMemo(()=>p.filter(se=>se.filePath===X&&se.filePath!==Jo),[p,X]),{anchoredThreads:ut,orphanedThreads:Lt}=F.useMemo(()=>{const se=new Set;for(const je of t.hunks)for(const Me of je.lines)Me.oldLineNumber!==null&&se.add(`old:${Me.oldLineNumber}`),Me.newLineNumber!==null&&se.add(`new:${Me.newLineNumber}`);const he=[],be=[];for(const je of gt){let Me=!1;for(let dt=je.startLine;dt<=je.endLine;dt++)if(se.has(`${je.side}:${dt}`)){Me=!0;break}Me?he.push(je):be.push(je)}return{anchoredThreads:he,orphanedThreads:be}},[gt,t.hunks]),bn=F.useCallback(se=>{b&&R(se)},[R,b]),{isLineInSelection:wt,handleLineMouseDown:jn,handleLineMouseEnter:xn}=LA({filePath:X,onSelectionComplete:bn}),Ee=F.useCallback((se,he)=>{R({filePath:X,side:he,startLine:se,endLine:se})},[X,R]),He=b?Ee:void 0,Xe=F.useCallback(()=>{R(null)},[R]),lt=F.useCallback((se,he)=>{if(wt(se,he))return!0;if(E&&E.filePath===X&&E.side===he)return se>=E.startLine&&se<=E.endLine;for(const be of ut)if(be.side===he&&se>=be.startLine&&se<=be.endLine&&be.status==="open")return!0;return!1},[wt,E,X,ut]),Gn=F.useMemo(()=>{if(!f)return;const se=new Map;for(const he of t.hunks)for(const be of he.lines){const je=f(be.content);if(je&&je.length>0){const Me=be.type==="delete"?be.oldLineNumber:be.newLineNumber,dt=`${be.type}-${Me}`;se.set(dt,je[0].tokens)}}return se},[t,f]),Ui=F.useMemo(()=>fe?[]:CA(t.hunks,z),[t.hunks,z,fe]),er=F.useMemo(()=>{const se=new Map;for(const he of Ui)se.set(he.id,he);return se},[Ui]),St=F.useCallback(async(se,he)=>{P({id:se.id,direction:he});const be=await le.ensureQueryData(TA(ne,!0,d));G(je=>{const Me=new Map(je),dt=Me.get(se.id)||{fromTop:0,fromBottom:0,linesFromTop:[],linesFromBottom:[]},Fn=se.newStart-se.oldStart,Zt=AA(se,he,dt);if(!Zt)return je;const Tr=kA(be,Zt.oldStart,Zt.oldEnd,Fn);if(he==="all")Me.set(se.id,{fromTop:se.oldEnd-se.oldStart+1,fromBottom:0,linesFromTop:Tr,linesFromBottom:[]});else if(he==="down"){const In={...dt,fromTop:dt.fromTop+(Zt.oldEnd-Zt.oldStart+1),linesFromTop:[...dt.linesFromTop,...Tr]};Me.set(se.id,In)}else{const In={...dt,fromBottom:dt.fromBottom+(Zt.oldEnd-Zt.oldStart+1),linesFromBottom:[...Tr,...dt.linesFromBottom]};Me.set(se.id,In)}return Me}),P(null)},[ne,le,d]),ui=F.useCallback(se=>{const he=q.get(se.id);if(!he)return{total:se.totalLines,up:se.totalLines,down:se.totalLines};const be=Math.max(0,se.totalLines-he.fromTop-he.fromBottom),je=Math.max(0,se.totalLines-he.fromTop),Me=Math.max(0,se.totalLines-he.fromBottom);return{total:be,up:je,down:Me}},[q]),J=F.useCallback(se=>{let he,be="between";if(se===0?(he=er.get("top"),be="top"):(he=er.get(`between-${se-1}`),be="between"),!he)return;const je=ui(he),Me=q.has(he.id);return{position:be,remainingLines:je.total,remainingUp:je.up,remainingDown:je.down,loadingDirection:oe?.id===he.id?oe.direction:null,wasExpanded:Me,onExpand:dt=>St(he,dt)}},[er,ui,oe,St,q]),ae=t.additions+t.deletions,we=ae>0?Math.round(t.additions/ae*Math.min(5,ae)):0,Ne=ae>0?Math.min(5,ae)-we:0,qe=5-we-Ne,Ot=er.get("bottom"),zn=Ot?ui(Ot).total:0,Nt=E&&E.filePath===X?E:null;return v.jsxs("div",{className:`border rounded-lg mx-4 my-3 overflow-hidden ${C?"animate-flash-highlight-border":"border-border"}`,id:`file-${encodeURIComponent(X)}`,onAnimationEnd:L,children:[v.jsxs("div",{className:`group flex items-center gap-2 px-3 py-1.5 border-border text-xs sticky top-0 z-10 shadow-sticky ${C?"animate-flash-highlight":"bg-bg-secondary"}`,children:[v.jsx(OA,{className:"text-[10px] w-4 h-4 shrink-0",onClick:()=>a(X),title:l?"Expand":"Collapse",children:l?"▶":"▼"}),v.jsx("button",{className:"font-mono text-xs truncate text-left cursor-pointer hover:text-accent transition-colors",onClick:()=>a(X),children:te?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"line-through text-text-muted",children:t.oldPath}),v.jsx("span",{className:"text-text-muted",children:" → "}),v.jsx("span",{children:t.newPath})]}):X}),v.jsx("button",{onClick:()=>re(X),className:"shrink-0 text-text-muted hover:text-text transition-colors cursor-pointer",title:"Copy file path",children:Z?v.jsx(vv,{className:"w-3 h-3 text-added"}):v.jsx(xv,{className:"w-3 h-3"})}),t.status!=="modified"&&v.jsx(Ev,{status:t.status}),t.isBinary&&v.jsx(Sv,{className:"bg-bg-tertiary text-text-muted",children:"Binary"}),v.jsxs("div",{className:"ml-auto flex items-center gap-2.5 shrink-0",children:[ut.length+Lt.length>0&&v.jsxs("span",{className:"text-[11px] text-text-muted flex items-center gap-1",children:[v.jsx(as,{className:"w-3 h-3"}),ut.length+Lt.length,Lt.length>0&&v.jsxs(kr,{variant:"outdated",size:"sm",children:[Lt.length," outdated"]})]}),v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx(Dh,{additions:t.additions,deletions:t.deletions}),v.jsxs("div",{className:"flex gap-px",children:[Array.from({length:we}).map((se,he)=>v.jsx("span",{className:"w-1.5 h-1.5 rounded-sm bg-added"},`a${he}`)),Array.from({length:Ne}).map((se,he)=>v.jsx("span",{className:"w-1.5 h-1.5 rounded-sm bg-deleted"},`d${he}`)),Array.from({length:qe}).map((se,he)=>v.jsx("span",{className:"w-1.5 h-1.5 rounded-sm bg-border"},`n${he}`))]})]}),v.jsxs("label",{className:"flex items-center gap-1.5 text-[11px] text-text-muted cursor-pointer select-none hover:text-text transition-colors",children:[v.jsx("input",{type:"checkbox",checked:o,onChange:()=>u(X,!o),className:"accent-added cursor-pointer w-3 h-3"}),"Viewed"]})]})]}),!l&&v.jsx("div",{children:t.isBinary?v.jsx("div",{className:"p-4 text-center text-text-muted italic",children:"Binary file not shown"}):t.hunks.length===0?v.jsx("div",{className:"p-4 text-center text-text-muted italic",children:t.oldMode&&t.newMode?`File mode changed from ${t.oldMode} to ${t.newMode}`:"No content changes"}):B&&!Y?v.jsxs("div",{className:"flex items-center justify-center gap-3 py-6 px-4 text-sm text-text-muted",children:[v.jsxs("span",{children:["Large diff not rendered — ",O," lines"]}),v.jsx("button",{className:"text-accent hover:underline cursor-pointer font-medium",onClick:()=>j(!0),children:"Load diff"})]}):v.jsxs(v.Fragment,{children:[v.jsx(o4,{threads:Lt,onDeleteComment:ce,onDeleteThread:ke}),v.jsxs("table",{className:"w-full border-collapse table-fixed",children:[r==="split"?v.jsxs("colgroup",{children:[v.jsx("col",{className:"w-12.5"}),v.jsx("col",{className:"w-[calc(50%-50px)]"}),v.jsx("col",{className:"w-12.5"}),v.jsx("col",{})]}):v.jsxs("colgroup",{children:[v.jsx("col",{className:"w-12.5"}),v.jsx("col",{className:"w-12.5"}),v.jsx("col",{className:"w-5"}),v.jsx("col",{})]}),t.hunks.map((se,he)=>{const be=he>0?er.get(`between-${he-1}`):void 0,je=be?q.get(be.id):void 0,Me=he===0?q.get("top"):void 0;return v.jsx(s4,{hunk:se,viewMode:r,syntaxMap:Gn,expandControls:J(he),topExpansionLines:he===0?[...Me?.linesFromTop??[],...Me?.linesFromBottom??[]]:void 0,gapExpansion:je,gapId:be?.id,highlightLine:f,threads:ut,pendingSelection:Nt,currentAuthor:Ox,isLineSelected:lt,onLineMouseDown:jn,onLineMouseEnter:xn,onCommentClick:He,onAddThread:ve,onReply:Q,onResolve:T,onUnresolve:ue,onDeleteComment:ce,onDeleteThread:ke,onCancelPending:Xe,filePath:X,onRevertChange:h?(dt,Fn,Zt)=>k({hunk:dt,startIndex:Fn,endIndex:Zt}):void 0,getOriginalCode:Fe},he)}),Ot&&(()=>{const se=q.get("bottom"),he=[...se?.linesFromTop??[],...se?.linesFromBottom??[]],be=nw(he,f),je={isLineSelected:lt,onLineMouseDown:jn,onLineMouseEnter:xn,onCommentClick:He,threads:ut,pendingSelection:Nt,currentAuthor:Ox,onAddThread:ve,onReply:Q,onResolve:T,onUnresolve:ue,onDeleteComment:ce,onDeleteThread:ke,onCancelPending:Xe,filePath:X,getOriginalCode:Fe};return v.jsxs("tbody",{children:[se?.linesFromTop&&se.linesFromTop.length>0&&Eh(se.linesFromTop,r,"bottom-top",be,je),v.jsx(f4,{position:"bottom",remainingLines:zn,loading:oe?.id==="bottom",onExpand:Me=>St(Ot,Me)}),se?.linesFromBottom&&se.linesFromBottom.length>0&&Eh(se.linesFromBottom,r,"bottom-bot",be,je)]})})()]})]})}),me&&v.jsx(_v,{title:"Undo change",message:"This will undo the selected change. This cannot be undone.",onConfirm:()=>N(me),onCancel:()=>k(null)})]})}const Nx={name:"You",type:"user"};function m4(e){const{threads:t,commentActions:r}=e,l=t.filter(d=>d.filePath===Jo),[a,o]=F.useState(l.length>0),[u,f]=F.useState(!1);return v.jsxs("div",{className:`border rounded-lg mx-4 mt-4 overflow-hidden ${l.length>0?"border-accent/40":"border-border"}`,children:[v.jsxs("div",{className:`flex items-center gap-2 px-3 py-2 text-sm select-none ${l.length>0?"bg-accent/5":"bg-bg-secondary"}`,children:[v.jsx("button",{onClick:()=>o(!a),className:"text-[10px] w-5 h-5 shrink-0 flex items-center justify-center text-text-muted cursor-pointer",children:a?"▼":"▶"}),v.jsxs("button",{onClick:()=>o(!a),className:"flex items-center gap-2 cursor-pointer",children:[v.jsx(as,{className:"w-3.5 h-3.5 text-text-muted"}),v.jsx("span",{className:"text-text-secondary",children:"General comments"}),l.length>0&&v.jsx("span",{className:"text-xs font-medium bg-accent/15 text-accent px-1.5 py-0.5 rounded-full",children:l.length})]}),v.jsx("div",{className:"flex-1"}),v.jsx("button",{onClick:d=>{d.stopPropagation(),o(!0),f(!0)},className:"text-xs text-accent hover:text-accent-hover transition-colors cursor-pointer",children:"Add comment"})]}),a&&v.jsxs("div",{className:"border-t border-border bg-bg",children:[u&&v.jsx("div",{className:"p-3",children:v.jsx(bu,{onSubmit:d=>{r.addThread(Jo,"new",0,0,d,Nx),f(!1)},onCancel:()=>f(!1),placeholder:"Leave a general comment...",submitLabel:"Comment"})}),l.length>0?v.jsx("div",{className:"p-3 space-y-3",children:l.map(d=>v.jsx(p4,{thread:d,onReply:h=>r.addReply(d.id,h,Nx),onResolve:()=>r.resolveThread(d.id),onUnresolve:()=>r.unresolveThread(d.id),onDeleteComment:h=>r.deleteComment(d.id,h),onDeleteThread:()=>r.deleteThread(d.id)},d.id))}):!u&&v.jsx("div",{className:"px-3 py-4 text-center text-xs text-text-muted",children:"No general comments yet"})]})]})}function p4(e){const{thread:t,onReply:r,onResolve:l,onUnresolve:a,onDeleteComment:o,onDeleteThread:u}=e,[f,d]=F.useState(!1),h=zl(t);return v.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[v.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 bg-bg-secondary border-b border-border",children:[v.jsx("div",{className:"flex items-center gap-2",children:h&&v.jsx(kr,{variant:"resolved"})}),v.jsxs("div",{className:"flex items-center gap-1",children:[h?v.jsx("button",{onClick:a,className:"text-[11px] text-text-muted hover:text-text-secondary transition-colors cursor-pointer",children:"Reopen"}):v.jsx("button",{onClick:l,className:"text-[11px] text-text-muted hover:text-text-secondary transition-colors cursor-pointer",children:"Resolve"}),v.jsx("button",{onClick:u,className:"text-text-muted hover:text-deleted transition-colors cursor-pointer ml-1",title:"Delete thread",children:v.jsx(ls,{className:"w-3.5 h-3.5"})})]})]}),v.jsx("div",{children:t.comments.map(g=>v.jsx(bm,{comment:g,onDelete:()=>o(g.id)},g.id))}),f?v.jsx("div",{className:"px-3 py-2 border-t border-border",children:v.jsx(bu,{onSubmit:g=>{r(g),d(!1)},onCancel:()=>d(!1),placeholder:"Reply...",submitLabel:"Reply"})}):v.jsx("div",{className:"px-3 py-2 border-t border-border",children:v.jsx("button",{onClick:()=>d(!0),className:"text-xs text-accent hover:text-accent-hover transition-colors cursor-pointer",children:"Reply"})})]})}function Dx(e){e.classList.remove("flash-thread"),e.offsetWidth,e.classList.add("flash-thread")}const g4=3,Mx=56,jx=100,y4=24,b4=32,x4=16;function v4(e,t){if(t)return Mx;if(e.isBinary||e.hunks.length===0)return jx;let r=0;for(const l of e.hunks)r+=l.lines.length;return r>=iw?jx:Mx+r*y4+e.hunks.length*b4+x4}function _4(e){const{diff:t,viewMode:r,theme:l,collapsedFiles:a,onToggleCollapse:o,reviewedFiles:u,onReviewedChange:f,onActiveFileChange:d,scrollRef:h,handle:g,baseRef:p,canRevert:b,onRevert:x,threads:w,commentsEnabled:E,commentActions:R,onAddThread:C,pendingSelection:L,onPendingSelectionChange:O}=e,{highlight:B}=W_(),Y=F.useRef(null),j=F.useMemo(()=>{const re=new Map;for(const me of t.files){const k=Xt(me);re.set(k,N=>B(N,k,l))}return re},[t,B,l]),q=EA({count:t.files.length,getScrollElement:()=>Y.current,estimateSize:re=>v4(t.files[re],a.has(Xt(t.files[re]))),overscan:g4}),G=F.useRef(null),[oe,P]=F.useState(null),[X,te]=F.useState(null);F.useImperativeHandle(g,()=>({scrollToFile:re=>{const me=t.files.findIndex(k=>Xt(k)===re);me>=0&&(G.current=re,P(re),q.scrollToIndex(me,{align:"start"}))},scrollToThread:(re,me)=>{const k=document.querySelector(`[data-thread-id="${re}"]`);if(k){k.scrollIntoView({behavior:"instant",block:"center"}),Dx(k);return}const N=t.files.findIndex(Q=>Xt(Q)===me);N>=0&&(G.current=me,q.scrollToIndex(N,{align:"start"}),te(re))}}),[t.files,q]),F.useEffect(()=>{if(!X)return;const re=Y.current;if(!re)return;const me=X,k=()=>{const T=document.querySelector(`[data-thread-id="${me}"]`);return T?(te(null),T.scrollIntoView({behavior:"instant",block:"center"}),Dx(T),!0):!1};if(k())return;const N=new MutationObserver(()=>{k()&&N.disconnect()});N.observe(re,{childList:!0,subtree:!0});const Q=setTimeout(()=>{te(null),N.disconnect()},2e3);return()=>{N.disconnect(),clearTimeout(Q)}},[X]);const fe=F.useCallback(()=>{const re=q.getVirtualItems();if(re.length===0)return null;const me=Y.current;if(!me)return null;const k=me.scrollTop;for(const N of re)if(N.end>k)return Xt(t.files[N.index]);return Xt(t.files[re[0].index])},[q,t.files]),le=F.useCallback(()=>{if(!d)return;const re=fe();if(re){if(G.current){re===G.current&&(G.current=null);return}d(re)}},[fe,d]),ne=q.getVirtualItems(),[z,Z]=ne.length>0?[ne[0].start,q.getTotalSize()-ne[ne.length-1].end]:[0,0];return v.jsxs("main",{ref:re=>{Y.current=re,h&&h(re)},onScroll:le,className:"flex-1 overflow-y-auto pb-12",children:[E&&v.jsx(m4,{threads:w,commentActions:R}),v.jsx("div",{className:"py-2",style:{paddingTop:z,paddingBottom:Z},children:ne.map(re=>{const me=t.files[re.index],k=Xt(me);return v.jsx("div",{"data-index":re.index,ref:q.measureElement,children:v.jsx(h4,{highlighted:oe===k,onHighlightEnd:()=>{oe===k&&P(null)},file:me,viewMode:r,collapsed:a.has(k),onToggleCollapse:o,reviewed:u.has(k),onReviewedChange:f,highlightLine:j.get(k),baseRef:p,canRevert:b,onRevert:x,threads:w,commentsEnabled:E,commentActions:R,onAddThread:C,pendingSelection:L,onPendingSelectionChange:O})},k+"-"+re.index)})})]})}function w4(e,t,r){let l=e.find(a=>a.type==="dir"&&a.name===t);return l||(l={type:"dir",name:t,path:r,children:[]},e.push(l)),l}function S4(e){const t=[];for(const r of e){const l=Xt(r),a=l.split("/");let o=t;for(let u=0;u<a.length-1;u++){const f=a.slice(0,u+1).join("/");o=w4(o,a[u],f).children}o.push({type:"file",name:a[a.length-1],path:l,file:r})}return t}function lw(e){return e.map(t=>{if(t.type!=="dir")return t;let r=t,l=r.name;for(;r.children.length===1&&r.children[0].type==="dir";)r=r.children[0],l+="/"+r.name;return{type:"dir",name:l,path:r.path,children:lw(r.children)}})}function aw(e){return[...e].sort((r,l)=>r.type!==l.type?r.type==="dir"?-1:1:r.name.localeCompare(l.name)).map(r=>r.type==="dir"?{...r,children:aw(r.children)}:r)}function sw(e,t){const r=t.toLowerCase(),l=[];for(const a of e)if(a.type==="file")a.path.toLowerCase().includes(r)&&l.push(a);else{const o=sw(a.children,t);o.length>0&&l.push({...a,children:o})}return l}function Ch(e){const t=[];for(const r of e)r.type==="dir"&&(t.push(r.path),t.push(...Ch(r.children)));return t}function E4(e){return e.open?v.jsx("svg",{className:"w-4 h-4 shrink-0 text-accent opacity-80",viewBox:"0 0 16 16",fill:"currentColor",children:v.jsx("path",{d:"M.513 1.513A1.75 1.75 0 011.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 00.2.1h6.5A1.75 1.75 0 0116 4.75v8.5A1.75 1.75 0 0114.25 15H1.75A1.75 1.75 0 010 13.25V2.75c0-.464.184-.91.513-1.237zM1.75 2.5a.25.25 0 00-.25.25v10.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25v-8.5a.25.25 0 00-.25-.25H7.5c-.55 0-1.07-.26-1.4-.7l-.9-1.2a.25.25 0 00-.2-.1h-3.5a.25.25 0 00-.25.25z"})}):v.jsx("svg",{className:"w-4 h-4 shrink-0 text-accent opacity-80",viewBox:"0 0 16 16",fill:"currentColor",children:v.jsx("path",{d:"M1.75 1A1.75 1.75 0 000 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3H7.5a.25.25 0 01-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75z"})})}function ow(e){const{node:t,depth:r,activeFile:l,reviewedFiles:a,filesWithComments:o,expandedDirs:u,onToggleDir:f,onFileClick:d}=e,h=r*12+8;if(t.type==="dir"){const x=u.has(t.path);return v.jsxs(v.Fragment,{children:[v.jsxs("button",{className:"flex items-center gap-1.5 w-full py-1 pr-2 text-left text-[13px] hover:bg-hover cursor-pointer",style:{paddingLeft:`${h}px`},onClick:()=>f(t.path),children:[v.jsx(rw,{expanded:x}),v.jsx(E4,{open:x}),v.jsx("span",{className:"truncate font-medium text-text-secondary",children:t.name})]}),x&&t.children.map(w=>v.jsx(ow,{node:w,depth:r+1,activeFile:l,reviewedFiles:a,filesWithComments:o,expandedDirs:u,onToggleDir:f,onFileClick:d},w.path))]})}const g=l===t.path,p=a.has(t.path),b=o.has(t.path);return v.jsxs("button",{className:Tt("flex items-center gap-1.5 w-full py-1 pr-2 text-left text-[13px] cursor-pointer border-l-2",g?"bg-active border-l-accent":"border-l-transparent hover:bg-hover",p&&"opacity-50"),style:{paddingLeft:`${h+15}px`},onClick:()=>d(t.path),children:[v.jsx(Ev,{status:t.file.status,compact:!0}),v.jsx("span",{className:Tt("flex-1 min-w-0 truncate",p&&"line-through"),children:t.name}),b&&v.jsx(as,{className:"w-3 h-3 text-accent shrink-0"}),p?v.jsx("span",{className:"text-added text-[10px] shrink-0",title:"Viewed",children:"✓"}):v.jsx(Dh,{additions:t.file.additions,deletions:t.file.deletions})]})}function C4(e){const{files:t,search:r,activeFile:l,reviewedFiles:a,filesWithComments:o,onFileClick:u}=e,f=F.useMemo(()=>aw(lw(S4(t))),[t]),d=F.useRef(f),[h,g]=F.useState(()=>new Set(Ch(f)));d.current!==f&&(d.current=f,g(new Set(Ch(f))));const p=F.useMemo(()=>r?sw(f,r):f,[f,r]),b=F.useCallback(x=>{g(w=>{const E=new Set(w);return E.has(x)?E.delete(x):E.add(x),E})},[]);return v.jsx("div",{className:"flex-1 overflow-y-auto py-1",children:p.map(x=>v.jsx(ow,{node:x,depth:0,activeFile:l,reviewedFiles:a,filesWithComments:o,expandedDirs:h,onToggleDir:b,onFileClick:u},x.path))})}function zx(e){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[v.jsx("rect",{x:"1.5",y:"2.5",width:"13",height:"11",rx:"2"}),v.jsx("line",{x1:"5.5",y1:"2.5",x2:"5.5",y2:"13.5"})]})}function k4(e){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[v.jsx("circle",{cx:"7",cy:"7",r:"4.5"}),v.jsx("line",{x1:"10.2",y1:"10.2",x2:"14",y2:"14"})]})}function uw(e){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[v.jsx("line",{x1:"4",y1:"4",x2:"12",y2:"12"}),v.jsx("line",{x1:"12",y1:"4",x2:"4",y2:"12"})]})}function A4(e){const{files:t,activeFile:r,reviewedFiles:l,filesWithComments:a,onFileClick:o}=e,[u,f]=F.useState(""),[d,h]=F.useState(!1);return d?v.jsx("div",{className:"w-10 min-w-10 border-r border-border bg-bg-secondary flex items-start justify-center pt-3",children:v.jsx("button",{className:"p-1.5 rounded-md text-text-muted hover:text-text hover:bg-hover cursor-pointer",onClick:()=>h(!1),title:"Show sidebar",children:v.jsx(zx,{className:"w-4 h-4"})})}):v.jsxs("aside",{className:"w-72 min-w-72 border-r border-border bg-bg-secondary flex flex-col overflow-hidden",children:[v.jsxs("div",{className:"flex items-center justify-between px-3 py-2.5 border-b border-border",children:[v.jsxs("span",{className:"text-xs font-medium text-text-secondary flex items-center gap-2 uppercase tracking-wider",children:["Files",v.jsx("span",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1.5 bg-bg-tertiary rounded-full text-[10px] font-semibold text-text-muted",children:l.size>0?`${l.size}/${t.length}`:t.length})]}),v.jsx("button",{className:"p-1 rounded-md text-text-muted hover:text-text hover:bg-hover cursor-pointer",onClick:()=>h(!0),title:"Hide sidebar",children:v.jsx(zx,{className:"w-3.5 h-3.5"})})]}),v.jsxs("div",{className:"relative px-3 py-2",children:[v.jsx(k4,{className:"absolute left-5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-text-muted pointer-events-none"}),v.jsx("input",{className:"w-full pl-7 pr-7 py-1.5 border border-border rounded-md bg-bg text-xs outline-none focus:border-accent focus:ring-1 focus:ring-accent/20 placeholder:text-text-muted",type:"text",placeholder:"Filter files...",value:u,onChange:g=>f(g.target.value)}),u&&v.jsx("button",{className:"absolute right-5 top-1/2 -translate-y-1/2 text-text-muted hover:text-text cursor-pointer",onClick:()=>f(""),children:v.jsx(uw,{className:"w-3 h-3"})})]}),v.jsx(C4,{files:t,search:u,activeFile:r,reviewedFiles:l,filesWithComments:a,onFileClick:o})]})}const T4=[{category:"Navigation",items:[{key:"j",description:"Next file"},{key:"k",description:"Previous file"},{key:"n",description:"Next changed hunk"},{key:"p",description:"Previous changed hunk"}]},{category:"View",items:[{key:"u",description:"Unified view"},{key:"s",description:"Split view"},{key:"x",description:"Collapse/expand file"},{key:"Shift+x",description:"Collapse/expand all files"},{key:"r",description:"Toggle file as viewed"}]},{category:"Other",items:[{key:"/",description:"Focus search"},{key:"?",description:"Show shortcuts"},{key:"Esc",description:"Close modal / clear"}]}];function R4(e){const{onClose:t}=e,r=F.useRef(null);return F.useEffect(()=>{const l=r.current;if(l)return l.showModal(),()=>l.close()},[]),v.jsxs("dialog",{ref:r,className:"bg-bg text-text border border-border rounded-xl shadow-md w-[420px] max-w-[90vw] max-h-[80vh] overflow-y-auto backdrop:bg-black/60 backdrop:backdrop-blur-sm p-0 m-auto fixed inset-0 h-fit",onClose:t,onClick:l=>{l.target===r.current&&t()},children:[v.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-border",children:[v.jsx("h2",{className:"text-sm font-semibold",children:"Keyboard shortcuts"}),v.jsx("button",{className:"p-1 rounded-md text-text-muted hover:text-text hover:bg-hover cursor-pointer",onClick:t,children:v.jsx(uw,{className:"w-4 h-4"})})]}),v.jsx("div",{className:"px-5 py-4",children:T4.map(l=>v.jsxs("div",{className:"mb-5 last:mb-0",children:[v.jsx("h3",{className:"text-[10px] font-semibold text-text-muted mb-2.5 uppercase tracking-widest",children:l.category}),v.jsx("div",{className:"flex flex-col gap-1.5",children:l.items.map(a=>v.jsxs("div",{className:"flex items-center justify-between py-0.5",children:[v.jsx("span",{className:"text-xs text-text-secondary",children:a.description}),v.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-5 px-1.5 bg-bg-secondary border border-border rounded font-mono text-[11px] text-text-muted shadow-[inset_0_-1px_0_var(--color-border)]",children:a.key})]},a.key))})]},l.category))})]})}function L4(e){const{onRefresh:t}=e;return v.jsxs("div",{className:"sticky top-0 z-30 flex items-center justify-center gap-3 px-4 py-1.5 bg-accent/10 border-b border-accent/20 text-xs animate-slide-down",children:[v.jsx("span",{className:"text-accent font-medium",children:"Files have changed since this diff was loaded"}),v.jsx("button",{onClick:t,className:"px-2.5 py-0.5 bg-accent text-white rounded-md text-[11px] font-medium hover:bg-accent-hover transition-colors cursor-pointer",children:"Refresh"})]})}function O4(){return v.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("path",{d:"M9 12l2 2 4-4"}),v.jsx("circle",{cx:"12",cy:"12",r:"10"})]})}function Ix(){return v.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-bg/60 backdrop-blur-sm",children:v.jsx(zh,{className:"w-8 h-8"})})}const N4=3e3;function D4(e,t=!0){const[r,l]=F.useState(!1),a=F.useRef(null);function o(){a.current=null,l(!1)}return F.useEffect(()=>{if(!t)return;let u,f=!1;async function d(){if(!f){try{const h=await xC(e);if(f)return;a.current===null?a.current=h:h!==a.current&&l(!0)}catch{}f||(u=setTimeout(d,N4))}}return d(),()=>{f=!0,clearTimeout(u)}},[e,t]),{isStale:r,resetStaleness:o}}function M4(){return Array.from(document.querySelectorAll("tbody > tr:first-child"))}function j4(e){e.scrollIntoView({behavior:"instant",block:"start"})}function z4(e){const{refParam:t,initialTheme:r,initialViewMode:l}=e,[a,o]=F.useState(l||"split"),[u,f]=F.useState(!1),[d,h]=F.useState(!1),{theme:g,toggleTheme:p}=jC(r),{data:b,loading:x,error:w}=LC(u,t),{data:E,loading:R}=NC(t),[C,L]=F.useState(null),[O,B]=F.useState(new Set),[Y,j]=F.useState(new Set),[q,G]=F.useState(null),oe=F.useRef(null),P=F.useRef(null),X=F.useRef(0),te=F.useRef(null),fe=!!E?.capabilities?.reviews,le=E?.sessionId??null,ne=qb(t),{isStale:z,resetStaleness:Z}=D4(t,ne),{data:re,isFetched:me}=JC(fe?le:null),k=fe&&re?re:[],N=WC(le,fe),Q=F.useMemo(()=>{const Ee=new Set;for(const He of k)zl(He)||Ee.add(He.filePath);return Ee},[k]),T=F.useCallback((...Ee)=>{N.addThread(...Ee),G(null)},[N]);F.useEffect(()=>{if(!b||b===te.current)return;te.current=b;const Ee=Jk(b.files);Ee.size>0&&j(Ee)},[b]);const ue=F.useCallback(Ee=>{j(He=>{const Xe=new Set(He);return Xe.has(Ee)?Xe.delete(Ee):Xe.add(Ee),Xe})},[]),de=F.useCallback((Ee,He)=>{B(Xe=>{const lt=new Set(Xe);return He?lt.add(Ee):lt.delete(Ee),lt}),j(He?Xe=>{const lt=new Set(Xe);return lt.add(Ee),lt}:Xe=>{const lt=new Set(Xe);return lt.delete(Ee),lt})},[]),ce=F.useCallback(()=>b?Xt(b.files[X.current]):null,[b]),ke=F.useCallback(Ee=>{if(!b)return;const He=Math.max(0,Math.min(b.files.length-1,X.current+Ee));X.current=He;const Xe=Xt(b.files[He]);P.current?.scrollToFile(Xe)},[b]),Fe=F.useCallback(Ee=>{const He=M4();if(He.length===0)return;let Xe=Ee>0?He[0]:He[He.length-1];for(let lt=0;lt<He.length;lt++){const Gn=He[lt].getBoundingClientRect();if(Ee>0&&Gn.top>100){Xe=He[lt];break}Ee<0&&Gn.top<-10&&(Xe=He[lt])}j4(Xe)},[]);ZC({onNextFile:()=>ke(1),onPrevFile:()=>ke(-1),onNextHunk:()=>Fe(1),onPrevHunk:()=>Fe(-1),onToggleCollapse:()=>{const Ee=ce();Ee&&ue(Ee)},onCollapseAll:()=>{if(!b)return;const Ee=b.files.map(Xe=>Xt(Xe)),He=Ee.some(Xe=>!Y.has(Xe));j(He?new Set(Ee):new Set)},onToggleReviewed:()=>{const Ee=ce();if(!Ee)return;const He=O.has(Ee);de(Ee,!He),He||ke(1)},onUnifiedView:()=>o("unified"),onSplitView:()=>o("split"),onShowHelp:()=>h(!0),onFocusSearch:()=>{const Ee=document.querySelector('input[placeholder="Filter files..."]');Ee&&Ee.focus()},onEscape:()=>h(!1)});const ve=yu(),gt=F.useMemo(()=>qb(t),[t]),ut=F.useCallback(()=>{ve.invalidateQueries({queryKey:["diff"]})},[ve]),Lt=F.useCallback(()=>{ve.invalidateQueries({queryKey:["diff"]}),Z()},[ve,Z]),bn=F.useCallback(Ee=>{L(Ee),P.current?.scrollToFile(Ee)},[]),wt=F.useCallback((Ee,He)=>{P.current?.scrollToThread(Ee,He)},[]),jn=F.useCallback(Ee=>{L(Ee)},[]);if(w)return v.jsx("div",{className:"flex flex-col min-h-screen bg-bg text-text font-sans",children:v.jsxs("div",{className:"flex flex-col items-center justify-center p-12 text-deleted text-center",children:[v.jsx("h2",{className:"text-xl mb-2",children:"Failed to load diff"}),v.jsx("p",{className:"text-text-secondary",children:w})]})});const xn=fe&&!me;return(x||R||xn)&&!b?v.jsx(Ix,{}):!E||xn?v.jsx(Ix,{}):b&&b.files.length===0&&!x?v.jsxs("div",{className:"flex flex-col items-center justify-center min-h-screen bg-bg text-text font-sans gap-2",children:[v.jsx("div",{className:"text-added opacity-40 mb-1",children:v.jsx(O4,{})}),v.jsx("h2",{className:"text-base font-medium text-text-secondary",children:"No changes found"}),v.jsx("p",{className:"text-xs text-text-muted",children:"There are no differences to display."}),v.jsxs("div",{className:"mt-4 flex flex-col gap-1.5 items-center",children:[v.jsx("p",{className:"text-xs text-text-muted mb-1",children:"Try one of these"}),v.jsx("code",{className:"inline-block px-3 py-1 bg-bg-secondary border border-border rounded-md font-mono text-xs text-text",children:"diffity HEAD~1"}),v.jsx("code",{className:"inline-block px-3 py-1 bg-bg-secondary border border-border rounded-md font-mono text-xs text-text",children:"diffity main..feature"})]})]}):v.jsxs("div",{className:"flex flex-col h-screen bg-bg text-text font-sans",children:[v.jsx(tk,{diff:b,repoName:E?.name||null,branch:E?.branch||null,description:E?.description||null}),v.jsx(fA,{viewMode:a,onViewModeChange:o,hideWhitespace:u,onHideWhitespaceChange:f,theme:g,onToggleTheme:p,onShowHelp:()=>h(!0),diff:b||void 0,diffRef:t,threads:k,onDeleteAllComments:N.deleteAllThreads,onScrollToThread:wt}),z&&v.jsx(L4,{onRefresh:Lt}),v.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[v.jsx(A4,{files:b?.files||[],activeFile:C,reviewedFiles:O,filesWithComments:Q,onFileClick:bn}),b?v.jsx(_4,{diff:b,viewMode:a,theme:g,collapsedFiles:Y,onToggleCollapse:ue,reviewedFiles:O,onReviewedChange:de,onActiveFileChange:jn,handle:P,baseRef:t,canRevert:gt,onRevert:ut,scrollRef:Ee=>{oe.current=Ee},threads:k,commentsEnabled:fe,commentActions:N,onAddThread:T,pendingSelection:q,onPendingSelectionChange:G}):null]}),d&&v.jsx(R4,{onClose:()=>h(!1)})]})}function I4(){const{ref:e,theme:t,view:r}=yC();return v.jsx(z4,{refParam:e??"work",initialTheme:t,initialViewMode:r})}DE.createRoot(document.getElementById("root")).render(v.jsx(kE.StrictMode,{children:v.jsx(iC,{client:gC,children:v.jsx(I4,{})})}));
|
|
199
|
+
\v\f
\u2028\u2029])`),t));else if(d==="posix")if(!a&&(g==="graph"||g==="print")){if(l==="strict")throw new Error(`POSIX class "${g}" requires min target ES2024 or non-strict accuracy`);let p={graph:"!-~",print:" -~"}[g];h&&(p=`\0-${Tt(p.codePointAt(0)-1)}${Tt(p.codePointAt(2)+1)}-`),r(gt(_r(`[${p}]`),t))}else r(gt(Pd(_r(y3.get(g)),h),t));else if(d==="property")gm.has(ju(g))||(e.key="sc");else if(d==="space")r(ri(Dl("space",{negate:h}),t));else if(d==="word")r(gt(Pd(_r(vr),h),t));else throw new Error(`Unexpected character set kind "${d}"`)},Directive({node:e,parent:t,root:r,remove:l,replaceWith:a,removeAllPrevSiblings:o,removeAllNextSiblings:u}){const{kind:f,flags:d}=e;if(f==="flags")if(!d.enable&&!d.disable)l();else{const h=Gn({flags:d});h.body[0].body=u(),a(gt(h,t),{traverse:!0})}else if(f==="keep"){const h=r.body[0],p=r.body.length===1&&O_(h,{type:"Group"})&&h.body[0].body.length===1?h.body[0]:r;if(t.parent!==p||p.body.length>1)throw new Error(Te`Uses "\K" in a way that's unsupported`);const b=Oi({behind:!0});b.body[0].body=o(),a(gt(b,t))}else throw new Error(`Unexpected directive kind "${f}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(r=>delete e[r]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:r}=e.flags;t?.extended&&delete t.extended,r?.extended&&delete r.extended,t?.dotAll&&r?.dotAll&&delete t.dotAll,t?.ignoreCase&&r?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,r&&!Object.keys(r).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:r}=e;r==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:r}){const{kind:l}=e;if(l==="fail")r(gt(Oi({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${l.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=Gn();t.body[0].body.push(e.body),e.body=gt(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const r=[];let l=!1,a=!1;for(const o of e.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{const u=Q_(o.body);u?(l=!0,Array.isArray(u)?r.push(...u):r.push(u)):a=!0}l&&!a&&r.forEach(o=>t.add(o))},exit(e,{accuracy:t,passedLookbehind:r,strategy:l}){if(t==="strict"&&r&&l)throw new Error(Te`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:r}=e;typeof r=="string"&&!Id(r)&&(r=zd(r,t),e.ref=r)}},_3={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:r}){const{orphan:l,ref:a}=e;l||r.set(e,[...t.get(a).map(({node:o})=>o)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:r,skip:l},{groupOriginByCopy:a,groupsByName:o,multiplexCapturesToLeftByRef:u,openRefs:f,reffedNodesByReferencer:d}){const h=a.get(e);if(h&&f.has(e.number)){const p=ri(Sx(e.number),t);d.set(p,f.get(e.number)),r(p);return}f.set(e.number,e),u.set(e.number,[]),e.name&&is(u,e.name,[]);const g=u.get(e.name??e.number);for(let p=0;p<g.length;p++){const b=g[p];if(h===b.node||h&&h===b.origin||e===b.origin){g.splice(p,1);break}}if(u.get(e.number).push({node:e,origin:h}),e.name&&u.get(e.name).push({node:e,origin:h}),e.name){const p=is(o,e.name,new Map);let b=!1;if(h)b=!0;else for(const x of p.values())if(!x.hasDuplicateNameToRemove){b=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:b})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=pu(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:r},l){const{isRecursive:a,ref:o}=e;if(a){let g=t;for(;(g=g.parent)&&!(g.type==="CapturingGroup"&&(g.name===o||g.number===o)););l.reffedNodesByReferencer.set(e,g);return}const u=l.subroutineRefMap.get(o),f=o===0,d=f?Sx(0):F_(u,l.groupOriginByCopy,null);let h=d;if(!f){const g=q_(C3(u,b=>b.type==="Group"&&!!b.flags)),p=g?pu(l.globalFlags,g):l.globalFlags;S3(p,l.currentFlags)||(h=Gn({flags:k3(p)}),h.body[0].body.push(d))}r(gt(h,t),{traverse:!f})}},w3={Backreference({node:e,parent:t,replaceWith:r},l){if(e.orphan){l.highestOrphanBackref=Math.max(l.highestOrphanBackref,e.ref);return}const o=l.reffedNodesByReferencer.get(e).filter(u=>E3(u,e));if(!o.length)r(gt(Oi({negate:!0}),t));else if(o.length>1){const u=Gn({atomic:!0,body:o.reverse().map(f=>Ii({body:[bh(f.number)]}))});r(gt(u,t))}else e.ref=o[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const r=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let l=0;l<r;l++){const a=D_();e.body.at(-1).body.push(a)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function G_(e){Xa(e,{"*"({node:t,parent:r}){t.parent=r}})}function S3(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function E3(e,t){let r=t;do{if(r.type==="Regex")return!1;if(r.type==="Alternative")continue;if(r===e)return!1;const l=$_(r.parent);for(const a of l){if(a===r)break;if(a===e||Y_(a,e))return!0}}while(r=r.parent);throw new Error("Unexpected path")}function F_(e,t,r,l){const a=Array.isArray(e)?[]:{};for(const[o,u]of Object.entries(e))o==="parent"?a.parent=Array.isArray(r)?l:r:u&&typeof u=="object"?a[o]=F_(u,t,a,r):(o==="type"&&u==="CapturingGroup"&&t.set(a,t.get(e)??e),a[o]=u);return a}function Sx(e){const t=j_(e);return t.isRecursive=!0,t}function C3(e,t){const r=[];for(;e=e.parent;)(!t||t(e))&&r.push(e);return r}function zd(e,t){if(t.has(e))return t.get(e);const r=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,r),r}function q_(e){const t=["dotAll","ignoreCase"],r={enable:{},disable:{}};return e.forEach(({flags:l})=>{t.forEach(a=>{l.enable?.[a]&&(delete r.disable[a],r.enable[a]=!0),l.disable?.[a]&&(r.disable[a]=!0)})}),Object.keys(r.enable).length||delete r.enable,Object.keys(r.disable).length||delete r.disable,r.enable||r.disable?r:null}function k3({dotAll:e,ignoreCase:t}){const r={};return(e||t)&&(r.enable={},e&&(r.enable.dotAll=!0),t&&(r.enable.ignoreCase=!0)),(!e||!t)&&(r.disable={},!e&&(r.disable.dotAll=!0),!t&&(r.disable.ignoreCase=!0)),r}function $_(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function Q_(e){const t=e.find(r=>r.kind==="search_start"||R3(r,{negate:!1})||!A3(r));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const r=[];for(const l of t.body){const a=Q_(l.body);if(!a)return null;Array.isArray(a)?r.push(...a):r.push(a)}return r}return null}function Y_(e,t){const r=$_(e)??[];for(const l of r)if(l===t||Y_(l,t))return!0;return!1}function A3({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function T3(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function R3(e,t){const r={negate:null,...t};return e.type==="LookaroundAssertion"&&(r.negate===null||e.negate===r.negate)&&e.body.length===1&&O_(e.body[0],{type:"Assertion",kind:"search_start"})}function Id(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function _r(e,t){const l=N_(e,{...t,unicodePropertyMap:gm}).body;return l.length>1||l[0].body.length>1?Gn({body:l}):l[0].body[0]}function Pd(e,t){return e.negate=t,e}function ri(e,t){return e.parent=t,e}function gt(e,t){return G_(e),e.parent=t,e}function L3(e,t){const r=U_(t),l=_h(r.target,"ES2024"),a=_h(r.target,"ES2025"),o=r.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let u=null,f=null;if(!a){const x=[e.flags.ignoreCase];Xa(e,O3,{getCurrentModI:()=>x.at(-1),popModI(){x.pop()},pushModI(w){x.push(w)},setHasCasedChar(){x.at(-1)?u=!0:f=!0}})}const d={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||u)&&!f)};let h=e;const g={accuracy:r.accuracy,appliedGlobalFlags:d,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:h,originMap:e._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!a&&u&&f),useFlagMods:a,useFlagV:l,verbose:r.verbose};function p(x){return g.lastNode=h,h=x,c3(N3[x.type],`Unexpected node type "${x.type}"`)(x,g,p)}const b={pattern:e.body.map(p).join("|"),flags:p(e.flags),options:{...e.options}};return l||(delete b.options.force.v,b.options.disable.v=!0,b.options.unicodeSetsPlugin=null),b._captureTransfers=new Map,b._hiddenCaptures=[],g.captureMap.forEach((x,w)=>{x.hidden&&b._hiddenCaptures.push(w),x.transferTo&&is(b._captureTransfers,x.transferTo,[]).push(w)}),b}var O3={"*":{enter({node:e},t){if(Cx(e)){const r=t.getCurrentModI();t.pushModI(e.flags?pu({ignoreCase:r},e.flags).ignoreCase:r)}},exit({node:e},t){Cx(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){ym(Tt(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},r){t(),X_(e,{firstOnly:!0}).length&&r.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&H_.has(e.value)&&t.setHasCasedChar()}},N3={Alternative({body:e},t,r){return e.map(r).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?Te`\B`:Te`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,r){const{body:l,name:a,number:o}=e,u={ignoreCase:t.currentFlags.ignoreCase},f=t.originMap.get(e);return f&&(u.hidden=!0,o>f.number&&(u.transferTo=f.number)),t.captureMap.set(o,u),`(${a?`?<${a}>`:""}${l.map(r).join("|")})`},Character({value:e},t){const r=Tt(e),l=Rl(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(l!==r)return l;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&ym(r)){const a=V_(r);return t.inCharClass?a.join(""):a.length>1?`[${a.join("")}]`:a[0]}return r},CharacterClass(e,t,r){const{kind:l,negate:a,parent:o}=e;let{body:u}=e;if(l==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Er.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&u.some(kx)&&(u=[Mu(45),...u.filter(h=>!kx(h))]);const f=()=>`[${a?"^":""}${u.map(r).join(l==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Er.bugNestedClassIgnoresNegation)&&!a){const g=u.filter(p=>p.type==="CharacterClass"&&p.kind==="union"&&p.negate);if(g.length){const p=Gn(),b=p.body[0];return p.parent=o,b.parent=p,u=u.filter(x=>!g.includes(x)),e.body=u,u.length?(e.parent=b,b.body.push(e)):p.body.pop(),g.forEach(x=>{const w=Ii({body:[x]});x.parent=w,w.parent=p,p.body.push(w)}),r(p)}}t.inCharClass=!0;const h=f();return t.inCharClass=!1,h}const d=u[0];if(l==="union"&&!a&&d&&((!t.useFlagV||!t.verbose)&&o.kind==="union"&&!(Er.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&o.kind==="intersection"&&u.length===1&&d.type!=="CharacterClassRange"))return u.map(r).join("");if(!t.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return f()},CharacterClassRange(e,t){const r=e.min.value,l=e.max.value,a={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},o=Rl(r,a),u=Rl(l,a),f=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const d=X_(e);I3(d).forEach(g=>{f.add(Array.isArray(g)?`${Rl(g[0],a)}-${Rl(g[1],a)}`:Rl(g,a))})}return`${o}-${u}${[...f].join("")}`},CharacterSet({kind:e,negate:t,value:r,key:l},a){if(e==="dot")return a.currentFlags.dotAll?a.appliedGlobalFlags.dotAll||a.useFlagMods?".":"[^]":Te`[^\n]`;if(e==="digit")return t?Te`\D`:Te`\d`;if(e==="property"){if(a.useAppliedIgnoreCase&&a.currentFlags.ignoreCase&&H_.has(r))throw new Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${t?Te`\P`:Te`\p`}{${l?`${l}=`:""}${r}}`}if(e==="word")return t?Te`\W`:Te`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:r,parent:l},a,o){const u=a.currentFlags;r&&(a.currentFlags=pu(u,r));const f=t.map(o).join("|"),d=!a.verbose&&t.length===1&&l.type!=="Quantifier"&&!e&&(!a.useFlagMods||!r)?f:`(?${P3(e,r,a.useFlagMods)}${f})`;return a.currentFlags=u,d},LookaroundAssertion({body:e,kind:t,negate:r},l,a){return`(?${`${t==="lookahead"?"":"<"}${r?"!":"="}`}${e.map(a).join("|")})`},Quantifier(e,t,r){return r(e.body)+B3(e)},Subroutine({isRecursive:e,ref:t},r){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const l=r.recursionLimit;return t===0?`(?R=${l})`:Te`\g<${t}&R=${l}>`}},D3=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),M3=new Set(["-","\\","]","^","["]),j3=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),Ex=new Map([[9,Te`\t`],[10,Te`\n`],[11,Te`\v`],[12,Te`\f`],[13,Te`\r`],[8232,Te`\u2028`],[8233,Te`\u2029`],[65279,Te`\uFEFF`]]),z3=new RegExp("^\\p{Cased}$","u");function ym(e){return z3.test(e)}function X_(e,t){const r=!!t?.firstOnly,l=e.min.value,a=e.max.value,o=[];if(l<65&&(a===65535||a>=131071)||l===65536&&a>=131071)return o;for(let u=l;u<=a;u++){const f=Tt(u);if(!ym(f))continue;const d=V_(f).filter(h=>{const g=h.codePointAt(0);return g<l||g>a});if(d.length&&(o.push(...d),r))break}return o}function Rl(e,{escDigit:t,inCharClass:r,useFlagV:l}){if(Ex.has(e))return Ex.get(e);if(e<32||e>126&&e<160||e>262143||t&&U3(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const a=r?l?j3:M3:D3,o=Tt(e);return(a.has(o)?"\\":"")+o}function I3(e){const t=e.map(a=>a.codePointAt(0)).sort((a,o)=>a-o),r=[];let l=null;for(let a=0;a<t.length;a++)t[a+1]===t[a]+1?l??=t[a]:l===null?r.push(t[a]):(r.push([l,t[a]]),l=null);return r}function P3(e,t,r){if(e)return">";let l="";if(t&&r){const{enable:a,disable:o}=t;l=(a?.ignoreCase?"i":"")+(a?.dotAll?"s":"")+(o?"-":"")+(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")}return`${l}:`}function B3({kind:e,max:t,min:r}){let l;return!r&&t===1?l="?":!r&&t===1/0?l="*":r===1&&t===1/0?l="+":r===t?l=`{${r}}`:l=`{${r},${t===1/0?"":t}}`,l+{greedy:"",lazy:"?",possessive:"+"}[e]}function Cx({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function U3(e){return e>47&&e<58}function kx({type:e,value:t}){return e==="Character"&&t===45}var V3=class wh extends RegExp{#e=new Map;#t=null;#n;#i=null;#r=null;rawOptions={};get source(){return this.#n||"(?:)"}constructor(t,r,l){const a=!!l?.lazyCompile;if(t instanceof RegExp){if(l)throw new Error("Cannot provide options when copying a regexp");const o=t;super(o,r),this.#n=o.source,o instanceof wh&&(this.#e=o.#e,this.#i=o.#i,this.#r=o.#r,this.rawOptions=o.rawOptions)}else{const o={hiddenCaptures:[],strategy:null,transfers:[],...l};super(a?"":t,r),this.#n=t,this.#e=G3(o.hiddenCaptures,o.transfers),this.#r=o.strategy,this.rawOptions=l??{}}a||(this.#t=this)}exec(t){if(!this.#t){const{lazyCompile:a,...o}=this.rawOptions;this.#t=new wh(this.#n,this.flags,o)}const r=this.global||this.sticky,l=this.lastIndex;if(this.#r==="clip_search"&&r&&l){this.lastIndex=0;const a=this.#a(t.slice(l));return a&&(H3(a,l,t,this.hasIndices),this.lastIndex+=l),a}return this.#a(t)}#a(t){this.#t.lastIndex=this.lastIndex;const r=super.exec.call(this.#t,t);if(this.lastIndex=this.#t.lastIndex,!r||!this.#e.size)return r;const l=[...r];r.length=1;let a;this.hasIndices&&(a=[...r.indices],r.indices.length=1);const o=[0];for(let u=1;u<l.length;u++){const{hidden:f,transferTo:d}=this.#e.get(u)??{};if(f?o.push(null):(o.push(r.length),r.push(l[u]),this.hasIndices&&r.indices.push(a[u])),d&&l[u]!==void 0){const h=o[d];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(r[h]=l[u],this.hasIndices&&(r.indices[h]=a[u]),r.groups){this.#i||(this.#i=F3(this.source));const g=this.#i.get(d);g&&(r.groups[g]=l[u],this.hasIndices&&(r.indices.groups[g]=a[u]))}}}return r}};function H3(e,t,r,l){if(e.index+=t,e.input=r,l){const a=e.indices;for(let u=0;u<a.length;u++){const f=a[u];f&&(a[u]=[f[0]+t,f[1]+t])}const o=a.groups;o&&Object.keys(o).forEach(u=>{const f=o[u];f&&(o[u]=[f[0]+t,f[1]+t])})}}function G3(e,t){const r=new Map;for(const l of e)r.set(l,{hidden:!0});for(const[l,a]of t)for(const o of a)is(r,o,{}).transferTo=l;return r}function F3(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map;let l=0,a=0,o;for(;o=t.exec(e);){const{0:u,groups:{capture:f,name:d}}=o;u==="["?l++:l?u==="]"&&l--:f&&(a++,d&&r.set(a,d))}return r}function q3(e,t){const r=$3(e,t);return r.options?new V3(r.pattern,r.flags,r.options):new RegExp(r.pattern,r.flags)}function $3(e,t){const r=U_(t),l=N_(e,{flags:r.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline},skipBackrefValidation:r.rules.allowOrphanBackrefs,unicodePropertyMap:gm}),a=x3(l,{accuracy:r.accuracy,asciiWordBoundaries:r.rules.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,bestEffortTarget:r.target}),o=L3(a,r),u=o3(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),f=a3(u.pattern),d=l3(f.pattern,{captureTransfers:u.captureTransfers,hiddenCaptures:u.hiddenCaptures}),h={pattern:d.pattern,flags:`${r.hasIndices?"d":""}${r.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(r.avoidSubclass){if(r.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const g=d.hiddenCaptures.sort((w,E)=>w-E),p=Array.from(d.captureTransfers),b=a._strategy,x=h.pattern.length>=r.lazyCompileLength;(g.length||p.length||b||x)&&(h.options={...g.length&&{hiddenCaptures:g},...p.length&&{transfers:p},...b&&{strategy:b},...x&&{lazyCompile:x}})}return h}function K_(e,t){return q3(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function Q3(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=r=>K_(r,{target:t.target}),{createScanner(r){return new uj(r,t)},createString(r){return{content:r}}}}var Y3=em({bundledLanguages:()=>rm,bundledLanguagesAlias:()=>nm,bundledLanguagesBase:()=>tm,bundledLanguagesInfo:()=>Cu,bundledThemes:()=>lm,bundledThemesInfo:()=>im,codeToHast:()=>v_,codeToHtml:()=>x_,codeToTokens:()=>__,codeToTokensBase:()=>w_,codeToTokensWithThemes:()=>S_,createHighlighter:()=>Du,createJavaScriptRegexEngine:()=>Q3,createOnigurumaEngine:()=>B1,defaultJavaScriptRegexConstructor:()=>K_,getLastGrammarState:()=>C_,getSingletonHighlighter:()=>E_,loadWasm:()=>sm});z1(Y3,oj);const Z_={ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",json:"json",css:"css",html:"html",md:"markdown",mdx:"mdx",py:"python",rb:"ruby",rs:"rust",go:"go",java:"java",sh:"bash",bash:"bash",zsh:"bash",fish:"fish",ps1:"powershell",yml:"yaml",yaml:"yaml",xml:"xml",svg:"xml",sql:"sql",graphql:"graphql",gql:"graphql",dockerfile:"dockerfile",toml:"toml",ini:"ini",lua:"lua",c:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",h:"c",hpp:"cpp",cs:"csharp",swift:"swift",kt:"kotlin",kts:"kotlin",scala:"scala",vue:"vue",svelte:"svelte",php:"php",r:"r",scss:"scss",less:"less",sass:"sass",styl:"stylus",dart:"dart",ex:"elixir",exs:"elixir",erl:"erlang",hs:"haskell",clj:"clojure",cljs:"clojure",pl:"perl",pm:"perl",zig:"zig",nim:"nim",ml:"ocaml",mli:"ocaml",fs:"fsharp",fsx:"fsharp",groovy:"groovy",gradle:"groovy",tf:"hcl",hcl:"hcl",proto:"protobuf",prisma:"prisma",astro:"astro",m:"objective-c",mm:"objective-cpp",tex:"latex",latex:"latex",diff:"diff",patch:"diff",nginx:"nginx",conf:"ini",cfg:"ini",env:"dotenv",bat:"bat",cmd:"bat",asm:"asm",s:"asm",jsonc:"jsonc",json5:"json5",csv:"csv",tsv:"csv",wasm:"wasm",ejs:"html",hbs:"handlebars",pug:"pug",jade:"pug",rst:"rst",jl:"julia",v:"v",sol:"solidity",glsl:"glsl",hlsl:"hlsl",wgsl:"wgsl"},J_={dockerfile:"dockerfile",makefile:"makefile",cmakelists:"cmake",gemfile:"ruby",rakefile:"ruby",justfile:"just",vagrantfile:"ruby"};function X3(e){const t=e.split(".").pop()?.toLowerCase()||"",r=e.split("/").pop()?.toLowerCase()||"",l=J_[r];return l||Z_[t]||null}const K3=[...new Set([...Object.values(Z_),...Object.values(J_)])];let Bd=null;function Z3(){return Bd||(Bd=Du({themes:["github-light","github-dark"],langs:K3})),Bd}function W_(){const[e,t]=F.useState(null);return F.useEffect(()=>{Z3().then(t)},[]),{highlight:F.useCallback((l,a,o)=>{if(!e)return null;const u=X3(a);if(!u)return null;const f=o==="dark"?"github-dark":"github-light";try{return e.codeToTokens(l,{lang:u,theme:f}).tokens.map(h=>({tokens:h.map(g=>({text:g.content,color:g.color}))}))}catch{return null}},[e]),ready:e!==null}}function J3(e){const{content:t}=e,{highlight:r,ready:l}=W_(),a=F.useMemo(()=>({p({children:o}){return v.jsx("p",{className:"mb-1.5 last:mb-0",children:o})},strong({children:o}){return v.jsx("strong",{className:"font-semibold text-text",children:o})},em({children:o}){return v.jsx("em",{children:o})},a({href:o,children:u}){return v.jsx("a",{href:o,className:"text-accent hover:underline",target:"_blank",rel:"noopener noreferrer",children:u})},ul({children:o}){return v.jsx("ul",{className:"list-disc pl-4 mb-1.5 last:mb-0",children:o})},ol({children:o}){return v.jsx("ol",{className:"list-decimal pl-4 mb-1.5 last:mb-0",children:o})},li({children:o}){return v.jsx("li",{className:"mb-0.5",children:o})},blockquote({children:o}){return v.jsx("blockquote",{className:"border-l-2 border-border pl-3 text-text-muted mb-1.5 last:mb-0",children:o})},pre({children:o}){return v.jsx("div",{className:"mb-1.5 last:mb-0",children:o})},code({className:o,children:u}){const f=/language-(\w+)/.exec(o||""),d=f?f[1]:null,h=String(u).replace(/\n$/,"");if(!d)return v.jsx("code",{className:"px-1 py-0.5 rounded bg-bg-tertiary text-[0.9em] font-mono",children:u});let g=null;if(l&&d){const p=r(h,`file.${d}`,MC());p&&(g=p.map(b=>b.tokens))}return v.jsxs("div",{className:"rounded-md border border-border overflow-hidden",children:[v.jsx("div",{className:"bg-bg-secondary px-3 py-1 border-b border-border",children:v.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:d})}),v.jsx("pre",{className:"px-3 py-2 overflow-x-auto bg-bg text-xs leading-5 font-mono",children:g?g.map((p,b)=>v.jsx("div",{children:p.map((x,w)=>v.jsx("span",{style:x.color?{color:x.color}:void 0,children:x.text},w))},b)):v.jsx("code",{children:h})})]})},hr(){return v.jsx("hr",{className:"border-border my-2"})},h1({children:o}){return v.jsx("p",{className:"font-semibold text-text mb-1",children:o})},h2({children:o}){return v.jsx("p",{className:"font-semibold text-text mb-1",children:o})},h3({children:o}){return v.jsx("p",{className:"font-semibold text-text mb-1",children:o})},del({children:o}){return v.jsx("del",{className:"text-text-muted",children:o})},table({children:o}){return v.jsx("table",{className:"border-collapse border border-border text-xs my-1.5",children:o})},th({children:o}){return v.jsx("th",{className:"border border-border px-2 py-1 bg-bg-secondary text-left font-medium",children:o})},td({children:o}){return v.jsx("td",{className:"border border-border px-2 py-1",children:o})}}),[r,l]);return v.jsx("div",{className:"markdown-body",children:v.jsx($L,{remarkPlugins:[aD],components:a,children:t})})}function W3(e){const t=new Date(e),l=new Date().getTime()-t.getTime(),a=Math.floor(l/1e3),o=Math.floor(a/60),u=Math.floor(o/60),f=Math.floor(u/24);return a<60?"just now":o<60?`${o}m ago`:u<24?`${u}h ago`:f<30?`${f}d ago`:t.toLocaleDateString()}function e4(e){const{name:t,avatarUrl:r,type:l}=e;if(r)return v.jsx("img",{src:r,alt:t,className:"w-5 h-5 rounded-full"});const a=l==="agent"?"bg-accent":"bg-text-muted",o=t.charAt(0).toUpperCase();return v.jsx("div",{className:`w-5 h-5 rounded-full ${a} flex items-center justify-center text-white text-[10px] font-medium`,children:o})}function bm(e){const{comment:t,onDelete:r}=e;return v.jsxs("div",{className:"px-3 py-2 border-b border-border last:border-b-0 group",children:[v.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[v.jsx(e4,{name:t.author.name,avatarUrl:t.author.avatarUrl,type:t.author.type}),v.jsx("span",{className:"text-xs font-semibold text-text",children:t.author.name}),t.author.type==="agent"&&v.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-accent/15 text-accent font-medium",children:"bot"}),v.jsx("span",{className:"text-[11px] text-text-muted",children:W3(t.createdAt)}),v.jsx("button",{onClick:r,className:"ml-auto text-text-muted hover:text-deleted opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer",title:"Delete comment",children:v.jsx(as,{className:"w-3.5 h-3.5"})})]}),v.jsx("div",{className:"text-sm text-text pl-7",children:v.jsx(J3,{content:t.body})})]})}const t4={resolved:"bg-added/20 text-added",dismissed:"bg-text-muted/20 text-text-muted line-through",outdated:"bg-orange-100 text-orange-800 dark:bg-orange-900/50 dark:text-orange-200"},n4={resolved:"Resolved",dismissed:"Dismissed",outdated:"Outdated"};function Cr(e){const{variant:t,children:r,size:l="default"}=e;return v.jsx("span",{className:Rt("rounded-full font-medium",l==="sm"?"px-1 py-0.5 text-[9px]":"px-1.5 py-0.5 text-[10px]",t4[t]),children:r??n4[t]})}function Ax(e){const{status:t}=e;switch(t){case"resolved":return v.jsx(Cr,{variant:"resolved"});case"dismissed":return v.jsx(Cr,{variant:"dismissed"});default:return null}}function Sh(e){const{thread:t,onReply:r,onResolve:l,onUnresolve:a,onDeleteComment:o,onDeleteThread:u,currentAuthor:f,colSpan:d,viewMode:h,side:g,currentCode:p}=e,[b,x]=F.useState(!1),[w,E]=F.useState(zl(t)),R=t.anchorContent&&p&&t.anchorContent!==p;if(w){const B=v.jsx("td",{colSpan:d,className:"px-4 py-2 border-l border-border",children:v.jsxs("button",{onClick:()=>E(!1),className:"thread-card flex items-center gap-2 text-xs text-text-muted hover:text-text-secondary transition-colors cursor-pointer rounded",children:[v.jsx(ss,{className:"w-4 h-4"}),v.jsxs("span",{children:[t.comments.length," comment",t.comments.length!==1?"s":""]}),v.jsx(Ax,{status:t.status}),R&&v.jsx(Cr,{variant:"outdated"})]})});return h==="split"?v.jsx("tr",{"data-thread-id":t.id,children:g==="old"?v.jsxs(v.Fragment,{children:[B,v.jsx("td",{colSpan:d})]}):v.jsxs(v.Fragment,{children:[v.jsx("td",{colSpan:d}),B]})}):v.jsx("tr",{"data-thread-id":t.id,children:B})}const C=t.startLine===t.endLine?`Line ${t.startLine}`:`Lines ${t.startLine}–${t.endLine}`,L=zl(t),O=v.jsx("td",{colSpan:d,className:Rt("px-4 py-3",{"border-l border-border":g==="new"&&h==="split"}),children:v.jsxs("div",{className:"thread-card border border-border rounded-lg overflow-hidden max-w-[700px]",children:[v.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 bg-bg-secondary border-b border-border",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"text-[11px] text-text-muted font-mono",children:C}),v.jsx(Ax,{status:t.status}),R&&v.jsx(Cr,{variant:"outdated"})]}),v.jsxs("div",{className:"flex items-center gap-1",children:[L?v.jsx("button",{onClick:()=>a(t.id),className:"text-[11px] text-text-muted hover:text-text-secondary transition-colors cursor-pointer",children:"Reopen"}):v.jsx("button",{onClick:()=>{l(t.id),E(!0)},className:"text-[11px] text-text-muted hover:text-text-secondary transition-colors cursor-pointer",children:"Resolve"}),v.jsx("button",{onClick:()=>E(!0),className:"text-[11px] text-text-muted hover:text-text-secondary transition-colors cursor-pointer ml-2",children:"Collapse"}),v.jsx("button",{onClick:()=>u(t.id),className:"text-text-muted hover:text-deleted transition-colors cursor-pointer ml-1",title:"Delete thread",children:v.jsx(as,{className:"w-3.5 h-3.5"})})]})]}),v.jsx("div",{children:t.comments.map(B=>v.jsx(bm,{comment:B,onDelete:()=>o(t.id,B.id)},B.id))}),b?v.jsx("div",{className:"px-3 py-2 border-t border-border",children:v.jsx(bu,{onSubmit:B=>{r(t.id,B,f),x(!1)},onCancel:()=>x(!1),placeholder:"Reply...",submitLabel:"Reply"})}):v.jsx("div",{className:"px-3 py-2 border-t border-border",children:v.jsx("button",{onClick:()=>x(!0),className:"text-xs text-accent hover:text-accent-hover transition-colors cursor-pointer",children:"Reply"})})]})});return h==="split"?v.jsx("tr",{"data-thread-id":t.id,children:g==="old"?v.jsxs(v.Fragment,{children:[O,v.jsx("td",{colSpan:d})]}):v.jsxs(v.Fragment,{children:[v.jsx("td",{colSpan:d}),O]})}):v.jsx("tr",{"data-thread-id":t.id,children:O})}function ew(e){const{colSpan:t,filePath:r,side:l,startLine:a,endLine:o,currentAuthor:u,onSubmit:f,onCancel:d,viewMode:h}=e,g=a===o?`${a}`:`${a} to ${o}`,p=v.jsx("div",{className:"max-w-[700px]",children:v.jsx(bu,{onSubmit:b=>f(r,l,a,o,b,u),onCancel:d,lineLabel:`Add a comment on line${a!==o?"s":""} ${g}`})});return h==="split"?v.jsx("tr",{children:l==="old"?v.jsxs(v.Fragment,{children:[v.jsx("td",{colSpan:t,className:"px-4 py-3 bg-bg-secondary",children:p}),v.jsx("td",{colSpan:t,className:"bg-bg-secondary"})]}):v.jsxs(v.Fragment,{children:[v.jsx("td",{colSpan:t,className:"bg-bg-secondary"}),v.jsx("td",{colSpan:t,className:"px-4 py-3 bg-bg-secondary border-l border-border",children:p})]})}):v.jsx("tr",{children:v.jsx("td",{colSpan:t,className:"px-4 py-3 bg-bg-secondary",children:p})})}function Yo(e,t,r,l,a,o){const u=e.type==="delete"?"old":"new",f=u==="old"?e.oldLineNumber:e.newLineNumber,d=f,h=d!==null?`${r?"exp-":""}${e.type}-${d}`:`line-${t}`,g=d!==null?`${e.type}-${d}`:"",p=l?.get(g),b=[];if(b.push(v.jsx(PA,{line:e,syntaxTokens:p,expanded:r,isSelected:f!==null?a.isLineSelected?.(f,u):!1,onLineMouseDown:a.onLineMouseDown,onLineMouseEnter:a.onLineMouseEnter,onCommentClick:a.onCommentClick,onUndo:o},h)),f!==null&&a.threads){const x=a.threads.filter(w=>w.endLine===f&&w.side===u);for(const w of x)b.push(v.jsx(Sh,{thread:w,onReply:a.onReply,onResolve:a.onResolve,onUnresolve:a.onUnresolve,onDeleteComment:a.onDeleteComment,onDeleteThread:a.onDeleteThread,currentAuthor:a.currentAuthor,colSpan:4,currentCode:a.getOriginalCode?.(w.side,w.startLine,w.endLine)},`thread-${w.id}`))}return f!==null&&a.pendingSelection&&a.pendingSelection.endLine===f&&a.pendingSelection.side===u&&a.filePath&&a.currentAuthor&&a.onAddThread&&a.onCancelPending&&b.push(v.jsx(ew,{colSpan:4,filePath:a.filePath,side:a.pendingSelection.side,startLine:a.pendingSelection.startLine,endLine:a.pendingSelection.endLine,currentAuthor:a.currentAuthor,onSubmit:a.onAddThread,onCancel:a.onCancelPending},"pending-comment")),b}function r4(e){const{hunk:t,syntaxMap:r,expandControls:l,topExpansionLines:a,bottomExpansionLines:o,expansionSyntaxMap:u,threads:f,pendingSelection:d,currentAuthor:h,isLineSelected:g,onLineMouseDown:p,onLineMouseEnter:b,onCommentClick:x,onAddThread:w,onReply:E,onResolve:R,onUnresolve:C,onDeleteComment:L,onDeleteThread:O,onCancelPending:B,filePath:Y,onRevertChange:j,getOriginalCode:q}=e,G={isLineSelected:g,onLineMouseDown:p,onLineMouseEnter:b,onCommentClick:x,threads:f,pendingSelection:d,currentAuthor:h,onAddThread:w,onReply:E,onResolve:R,onUnresolve:C,onDeleteComment:L,onDeleteThread:O,onCancelPending:B,filePath:Y,getOriginalCode:q},se=F.useMemo(()=>{if(!j)return new Map;const X=bv(t.lines),te=new Map;for(const de of X)te.set(de.endIndex,de);return te},[t.lines,j]),P=[];if(a)for(let X=0;X<a.length;X++)P.push(...Yo(a[X],X,!0,u,G));if(o)for(let X=0;X<o.length;X++)P.push(...Yo(o[X],X,!0,u,G));for(let X=0;X<t.lines.length;X++){const te=se.get(X),de=te?()=>j(t,te.startIndex,te.endIndex):void 0;P.push(...Yo(t.lines[X],X,!1,r,G,de))}return v.jsxs("tbody",{className:l?.wasExpanded&&l.remainingLines<=0?"":"border-t border-border-muted",children:[v.jsx(Av,{hunk:t,expandControls:l}),P]})}function tw(e){const t=[];let r=0;for(;r<e.length;){const l=e[r];if(l.type==="context"){t.push({left:l,right:l}),r++;continue}if(l.type==="delete"){const a=[];for(;r<e.length&&e[r].type==="delete";)a.push(e[r]),r++;const o=[];for(;r<e.length&&e[r].type==="add";)o.push(e[r]),r++;const u=Math.max(a.length,o.length);for(let f=0;f<u;f++)t.push({left:f<a.length?a[f]:null,right:f<o.length?o[f]:null});continue}if(l.type==="add"){t.push({left:null,right:l}),r++;continue}r++}return t}function Tx(e){return e?yv(e.type):"bg-bg-secondary"}function i4(e){const t=e.type==="delete"?e.oldLineNumber:e.newLineNumber;return`${e.type}-${t}`}function Rx(e){const{line:t,side:r,syntaxMap:l,expanded:a,isSelected:o,onMouseDown:u,onMouseEnter:f,onCommentClick:d,onUndo:h}=e,[g,p]=F.useState(!1);if(!t)return v.jsxs(v.Fragment,{children:[v.jsx(Wo,{lineNumber:null,className:"diff-empty-cell"}),v.jsx("td",{className:"px-3 whitespace-pre border-r border-border-muted align-top diff-empty-cell"})]});const b=a?"bg-diff-expanded-gutter":Tx(t),x=a?"bg-diff-expanded-bg":Tx(t),w=r==="left"?t.oldLineNumber:t.newLineNumber,E=i4(t),R=l?.get(E);return v.jsxs(v.Fragment,{children:[v.jsx(Wo,{lineNumber:w,className:b,isSelected:o,showCommentButton:!!d&&w!==null,forceShowButton:g,onMouseDown:u,onMouseEnter:f,onCommentClick:d}),v.jsxs("td",{className:Rt("px-3 whitespace-pre-wrap break-all border-r border-border-muted align-top relative",o?"bg-diff-comment-bg":x),onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[v.jsx("span",{className:"inline",children:Cv(t,R)}),h&&v.jsxs("button",{onClick:h,className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-1 px-2 py-0.5 text-xs rounded bg-deleted/15 text-deleted hover:bg-deleted/25 transition-colors cursor-pointer opacity-0 group-hover/split-row:opacity-100",title:"Undo this change",children:[v.jsx(kv,{className:"w-3 h-3"}),"Undo"]})]})]})}function Xo(e,t,r,l,a,o){const u=tw(e),f=[];for(let d=0;d<u.length;d++){const h=u[d],g=h.left,p=h.right,b=g?.oldLineNumber??null,x=p?.newLineNumber??null,w=o?.get(d);f.push(v.jsxs("tr",{className:"group/split-row font-mono text-sm leading-6",children:[v.jsx(Rx,{line:g,side:"left",syntaxMap:r,expanded:t,isSelected:b!==null?a.isLineSelected?.(b,"old"):!1,onMouseDown:b!==null?()=>a.onLineMouseDown?.(b,"old"):void 0,onMouseEnter:b!==null?()=>a.onLineMouseEnter?.(b,"old"):void 0,onCommentClick:b!==null&&a.onCommentClick?()=>a.onCommentClick(b,"old"):void 0,onUndo:w&&!p?w:void 0}),v.jsx(Rx,{line:p,side:"right",syntaxMap:r,expanded:t,isSelected:x!==null?a.isLineSelected?.(x,"new"):!1,onMouseDown:x!==null?()=>a.onLineMouseDown?.(x,"new"):void 0,onMouseEnter:x!==null?()=>a.onLineMouseEnter?.(x,"new"):void 0,onCommentClick:x!==null&&a.onCommentClick?()=>a.onCommentClick(x,"new"):void 0,onUndo:w&&p?w:void 0})]},`${l}-${d}`));const E=[];if(b!==null&&a.threads){const R=a.threads.filter(C=>C.endLine===b&&C.side==="old");for(const C of R)E.push(v.jsx(Sh,{thread:C,onReply:a.onReply,onResolve:a.onResolve,onUnresolve:a.onUnresolve,onDeleteComment:a.onDeleteComment,onDeleteThread:a.onDeleteThread,currentAuthor:a.currentAuthor,colSpan:2,viewMode:"split",side:"old",currentCode:a.getOriginalCode?.(C.side,C.startLine,C.endLine)},`thread-${C.id}`))}if(x!==null&&a.threads){const R=a.threads.filter(C=>C.endLine===x&&C.side==="new");for(const C of R)E.push(v.jsx(Sh,{thread:C,onReply:a.onReply,onResolve:a.onResolve,onUnresolve:a.onUnresolve,onDeleteComment:a.onDeleteComment,onDeleteThread:a.onDeleteThread,currentAuthor:a.currentAuthor,colSpan:2,viewMode:"split",side:"new",currentCode:a.getOriginalCode?.(C.side,C.startLine,C.endLine)},`thread-${C.id}`))}if(a.pendingSelection&&a.filePath&&a.currentAuthor&&a.onAddThread&&a.onCancelPending){const R=b!==null&&a.pendingSelection.endLine===b&&a.pendingSelection.side==="old",C=x!==null&&a.pendingSelection.endLine===x&&a.pendingSelection.side==="new";(R||C)&&E.push(v.jsx(ew,{colSpan:2,filePath:a.filePath,side:a.pendingSelection.side,startLine:a.pendingSelection.startLine,endLine:a.pendingSelection.endLine,currentAuthor:a.currentAuthor,onSubmit:a.onAddThread,onCancel:a.onCancelPending,viewMode:"split"},"pending-comment"))}E.length>0&&f.push(...E)}return f}function l4(e){const{hunk:t,syntaxMap:r,expandControls:l,topExpansionLines:a,bottomExpansionLines:o,expansionSyntaxMap:u,threads:f,pendingSelection:d,currentAuthor:h,isLineSelected:g,onLineMouseDown:p,onLineMouseEnter:b,onCommentClick:x,onAddThread:w,onReply:E,onResolve:R,onUnresolve:C,onDeleteComment:L,onDeleteThread:O,onCancelPending:B,filePath:Y,onRevertChange:j,getOriginalCode:q}=e,G={isLineSelected:g,onLineMouseDown:p,onLineMouseEnter:b,onCommentClick:x,threads:f,pendingSelection:d,currentAuthor:h,onAddThread:w,onReply:E,onResolve:R,onUnresolve:C,onDeleteComment:L,onDeleteThread:O,onCancelPending:B,filePath:Y,getOriginalCode:q},se=F.useMemo(()=>{if(!j)return;const X=bv(t.lines),te=tw(t.lines),de=new Map;for(const le of X){let ne=-1;for(let z=0;z<te.length;z++){const J=te[z],re=J.left&&J.left.type!=="context",me=J.right&&J.right.type!=="context";if(re||me){const k=te[z+1];if(!k||(!k.left||k.left.type==="context")&&(!k.right||k.right.type==="context")){const Q=J.left&&J.left.type!=="context"&&t.lines.indexOf(J.left)>=le.startIndex&&t.lines.indexOf(J.left)<=le.endIndex,T=J.right&&J.right.type!=="context"&&t.lines.indexOf(J.right)>=le.startIndex&&t.lines.indexOf(J.right)<=le.endIndex;(Q||T)&&(ne=z)}}}if(ne>=0){const z=le;de.set(ne,()=>j(t,z.startIndex,z.endIndex))}}return de},[t,j]),P=[];return a&&a.length>0&&P.push(...Xo(a,!0,u,"top-exp",G)),o&&o.length>0&&P.push(...Xo(o,!0,u,"bot-exp",G)),P.push(...Xo(t.lines,!1,r,"hunk",G,se)),v.jsxs("tbody",{className:l?.wasExpanded&&l.remainingLines<=0?"":"border-t border-border-muted",children:[v.jsx(Av,{hunk:t,expandControls:l}),P]})}function nw(e,t){const r=new Map;if(!t)return r;for(const l of e){if(!l.content)continue;const a=t(l.content);if(!a||a.length===0)continue;const o=`${l.type}-${l.type==="delete"?l.oldLineNumber:l.newLineNumber}`;r.set(o,a[0].tokens)}return r}function Eh(e,t,r,l,a){if(t==="split")return Xo(e,!0,l,r,a);const o=[];for(let u=0;u<e.length;u++)o.push(...Yo(e[u],u,!0,l,a));return o}function a4(e){const{hunk:t,viewMode:r,syntaxMap:l,expandControls:a,topExpansionLines:o,gapExpansion:u,gapId:f,highlightLine:d,threads:h,pendingSelection:g,currentAuthor:p,isLineSelected:b,onLineMouseDown:x,onLineMouseEnter:w,onCommentClick:E,onAddThread:R,onReply:C,onResolve:L,onUnresolve:O,onDeleteComment:B,onDeleteThread:Y,onCancelPending:j,filePath:q,onRevertChange:G,getOriginalCode:se}=e,P=r==="split"?l4:r4,X=[...o||[],...u?.linesFromTop||[],...u?.linesFromBottom||[]],te=X.length>0?nw(X,d):void 0,de={isLineSelected:b,onLineMouseDown:x,onLineMouseEnter:w,onCommentClick:E,threads:h,pendingSelection:g,currentAuthor:p,onAddThread:R,onReply:C,onResolve:L,onUnresolve:O,onDeleteComment:B,onDeleteThread:Y,onCancelPending:j,filePath:q};return v.jsxs(v.Fragment,{children:[u&&u.linesFromTop.length>0&&v.jsx("tbody",{children:Eh(u.linesFromTop,r,`${f}-top`,te,de)}),v.jsx(P,{hunk:t,syntaxMap:l,expandControls:a,topExpansionLines:o&&o.length>0?o:void 0,bottomExpansionLines:u&&u.linesFromBottom.length>0?u.linesFromBottom:void 0,expansionSyntaxMap:te,threads:h,pendingSelection:g,currentAuthor:p,isLineSelected:b,onLineMouseDown:x,onLineMouseEnter:w,onCommentClick:E,onAddThread:R,onReply:C,onResolve:L,onUnresolve:O,onDeleteComment:B,onDeleteThread:Y,onCancelPending:j,filePath:q,onRevertChange:G,getOriginalCode:se})]})}function rw(e){return v.jsx("svg",{className:Rt("w-3 h-3 shrink-0 text-text-muted transition-transform duration-150",e.expanded&&"rotate-90"),viewBox:"0 0 16 16",fill:"currentColor",children:v.jsx("path",{d:"M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z"})})}function s4(e){const{threads:t,onDeleteComment:r,onDeleteThread:l}=e,[a,o]=F.useState(!1);return t.length===0?null:v.jsxs("div",{className:"border-b border-border bg-bg-secondary/50",children:[v.jsxs("button",{onClick:()=>o(!a),className:"flex items-center gap-2 w-full px-4 py-2 text-xs text-text-muted hover:text-text-secondary transition-colors cursor-pointer",children:[v.jsx(rw,{expanded:a}),v.jsx(ss,{className:"w-3.5 h-3.5"}),v.jsxs("span",{children:[t.length," outdated comment",t.length!==1?"s":""]}),v.jsx(Cr,{variant:"outdated"})]}),a&&v.jsx("div",{className:"px-4 pb-3 space-y-2",children:t.map(u=>{const f=u.startLine===u.endLine?`Line ${u.startLine}`:`Lines ${u.startLine}–${u.endLine}`;return v.jsxs("div",{className:"border border-border rounded-lg overflow-hidden max-w-[700px]",children:[v.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 bg-bg-secondary border-b border-border",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"text-[11px] text-text-muted font-mono",children:f}),v.jsx(Cr,{variant:"outdated"}),(u.status==="resolved"||u.status==="dismissed")&&v.jsx(Cr,{variant:u.status})]}),v.jsx("button",{onClick:()=>l(u.id),className:"text-text-muted hover:text-deleted transition-colors cursor-pointer",title:"Delete thread",children:v.jsx(as,{className:"w-3.5 h-3.5"})})]}),u.anchorContent&&v.jsx("pre",{className:"px-3 py-2 text-xs font-mono text-text-muted bg-bg-tertiary/50 border-b border-border overflow-x-auto whitespace-pre max-h-24 overflow-y-auto",children:u.anchorContent}),v.jsx("div",{children:u.comments.map(d=>v.jsx(bm,{comment:d,onDelete:()=>r(u.id,d.id)},d.id))})]},u.id)})})]})}const Lx="w-[25px] min-w-[25px] bg-diff-hunk-bg border-r border-border-muted p-0",o4="flex items-center justify-center w-full h-[18px] cursor-pointer text-diff-hunk-text/70 hover:text-diff-hunk-text transition-colors",u4="bg-diff-hunk-bg";function c4(e){const{position:t,remainingLines:r,loading:l,onExpand:a}=e;return r<=0?null:v.jsxs("tr",{className:u4,children:[l?v.jsx("td",{className:Lx,children:v.jsx("div",{className:"flex items-center justify-center h-[18px]",children:v.jsx(zh,{})})}):v.jsx("td",{className:Lx,children:v.jsx("button",{className:o4,onClick:()=>a("down"),title:`Expand ${Math.min(r,20)} lines`,children:t==="bottom"?v.jsx(Yd,{}):v.jsx(Go,{})})}),v.jsx("td",{colSpan:3})]})}const iw=200,Ox={name:"You",type:"user"};function f4(e){let t=0;for(const r of e.hunks)t+=r.lines.length;return t}function d4(e){const{file:t,viewMode:r,collapsed:l,onToggleCollapse:a,reviewed:o,onReviewedChange:u,highlightLine:f,baseRef:d,canRevert:h,onRevert:g,threads:p,commentsEnabled:b,commentActions:x,onAddThread:w,pendingSelection:E,onPendingSelectionChange:R,highlighted:C,onHighlightEnd:L}=e,O=f4(t),B=O>=iw,[Y,j]=F.useState(!1),[q,G]=F.useState(new Map),[se,P]=F.useState(null),X=Jt(t),te=t.status==="renamed"&&t.oldPath!==t.newPath,de=t.status==="added",le=yu(),ne=t.oldPath||X,z=t.oldFileLineCount??null,{copied:J,copy:re}=gv(),[me,k]=F.useState(null),N=F.useCallback(async oe=>{k(null);const ae=Jk(t,oe.hunk,oe.startIndex,oe.endIndex);await AC(ae),g?.()},[t,g]),{addReply:Q,resolveThread:T,unresolveThread:ue,dismissThread:he,deleteComment:fe,deleteThread:Ce}=x,je=F.useMemo(()=>{const oe=[];for(const[,ae]of q)oe.push(...ae.linesFromTop,...ae.linesFromBottom);return oe},[q]),xe=F.useCallback((oe,ae,ke)=>{const De=qb(t.hunks,oe,ae,ke);return De||$b(je,oe,ae,ke)},[t.hunks,je]),yt=F.useCallback((oe,ae,ke,De,Ye,Ze)=>{let Ft=qb(t.hunks,ae,ke,De);Ft||(Ft=$b(je,ae,ke,De)),w(oe,ae,ke,De,Ye,Ze,Ft||void 0)},[w,t.hunks,je]),St=F.useMemo(()=>p.filter(oe=>oe.filePath===X&&oe.filePath!==Jo),[p,X]),{anchoredThreads:Et,orphanedThreads:Gt}=F.useMemo(()=>{const oe=new Set,ae=Ye=>{for(const Ze of Ye)Ze.oldLineNumber!==null&&oe.add(`old:${Ze.oldLineNumber}`),Ze.newLineNumber!==null&&oe.add(`new:${Ze.newLineNumber}`)};for(const Ye of t.hunks)ae(Ye.lines);ae(je);const ke=[],De=[];for(const Ye of St){let Ze=!1;for(let Ft=Ye.startLine;Ft<=Ye.endLine;Ft++)if(oe.has(`${Ye.side}:${Ft}`)){Ze=!0;break}Ze?ke.push(Ye):De.push(Ye)}return{anchoredThreads:ke,orphanedThreads:De}},[St,t.hunks,je]),Ot=F.useCallback(oe=>{b&&R(oe)},[R,b]),{isLineInSelection:wn,handleLineMouseDown:_e,handleLineMouseEnter:He}=RA({filePath:X,onSelectionComplete:Ot}),tt=F.useCallback((oe,ae)=>{R({filePath:X,side:ae,startLine:oe,endLine:oe})},[X,R]),at=b?tt:void 0,Sn=F.useCallback(()=>{R(null)},[R]),Ar=F.useCallback((oe,ae)=>{if(wn(oe,ae))return!0;if(E&&E.filePath===X&&E.side===ae)return oe>=E.startLine&&oe<=E.endLine;for(const ke of Et)if(ke.side===ae&&oe>=ke.startLine&&oe<=ke.endLine&&ke.status==="open")return!0;return!1},[wn,E,X,Et]),Gl=F.useMemo(()=>{if(!f)return;const oe=new Map;for(const ae of t.hunks)for(const ke of ae.lines){const De=f(ke.content);if(De&&De.length>0){const Ye=ke.type==="delete"?ke.oldLineNumber:ke.newLineNumber,Ze=`${ke.type}-${Ye}`;oe.set(Ze,De[0].tokens)}}return oe},[t,f]),Ui=F.useMemo(()=>de?[]:EA(t.hunks,z),[t.hunks,z,de]),ht=F.useMemo(()=>{const oe=new Map;for(const ae of Ui)oe.set(ae.id,ae);return oe},[Ui]),ui=F.useCallback(async(oe,ae)=>{P({id:oe.id,direction:ae});const ke=await le.ensureQueryData(AA(ne,!0,d));G(De=>{const Ye=new Map(De),Ze=Ye.get(oe.id)||{fromTop:0,fromBottom:0,linesFromTop:[],linesFromBottom:[]},Ft=oe.newStart-oe.oldStart,tn=kA(oe,ae,Ze);if(!tn)return De;const Bn=CA(ke,tn.oldStart,tn.oldEnd,Ft);if(ae==="all")Ye.set(oe.id,{fromTop:oe.oldEnd-oe.oldStart+1,fromBottom:0,linesFromTop:Bn,linesFromBottom:[]});else if(ae==="down"){const Tr={...Ze,fromTop:Ze.fromTop+(tn.oldEnd-tn.oldStart+1),linesFromTop:[...Ze.linesFromTop,...Bn]};Ye.set(oe.id,Tr)}else{const Tr={...Ze,fromBottom:Ze.fromBottom+(tn.oldEnd-tn.oldStart+1),linesFromBottom:[...Bn,...Ze.linesFromBottom]};Ye.set(oe.id,Tr)}return Ye}),P(null)},[ne,le,d]),Z=F.useCallback(oe=>{const ae=q.get(oe.id);if(!ae)return{total:oe.totalLines,up:oe.totalLines,down:oe.totalLines};const ke=Math.max(0,oe.totalLines-ae.fromTop-ae.fromBottom),De=Math.max(0,oe.totalLines-ae.fromTop),Ye=Math.max(0,oe.totalLines-ae.fromBottom);return{total:ke,up:De,down:Ye}},[q]),ce=F.useCallback(oe=>{let ae,ke="between";if(oe===0?(ae=ht.get("top"),ke="top"):(ae=ht.get(`between-${oe-1}`),ke="between"),!ae)return;const De=Z(ae),Ye=q.has(ae.id);return{position:ke,remainingLines:De.total,remainingUp:De.up,remainingDown:De.down,loadingDirection:se?.id===ae.id?se.direction:null,wasExpanded:Ye,onExpand:Ze=>ui(ae,Ze)}},[ht,Z,se,ui,q]),we=t.additions+t.deletions,Le=we>0?Math.round(t.additions/we*Math.min(5,we)):0,Fe=we>0?Math.min(5,we)-Le:0,Kt=5-Le-Fe,en=ht.get("bottom"),zt=en?Z(en).total:0,ct=E&&E.filePath===X?E:null;return v.jsxs("div",{className:`border rounded-lg mx-4 my-3 overflow-hidden ${C?"animate-flash-highlight-border":"border-border"}`,id:`file-${encodeURIComponent(X)}`,onAnimationEnd:L,children:[v.jsxs("div",{className:`group flex items-center gap-2 px-3 py-1.5 border-border text-xs sticky top-0 z-10 shadow-sticky ${C?"animate-flash-highlight":"bg-bg-secondary"}`,children:[v.jsx(LA,{className:"text-[10px] w-4 h-4 shrink-0",onClick:()=>a(X),title:l?"Expand":"Collapse",children:l?"▶":"▼"}),v.jsx("button",{className:"font-mono text-xs truncate text-left cursor-pointer hover:text-accent transition-colors",onClick:()=>a(X),children:te?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"line-through text-text-muted",children:t.oldPath}),v.jsx("span",{className:"text-text-muted",children:" → "}),v.jsx("span",{children:t.newPath})]}):X}),v.jsx("button",{onClick:()=>re(X),className:"shrink-0 text-text-muted hover:text-text transition-colors cursor-pointer",title:"Copy file path",children:J?v.jsx(vv,{className:"w-3 h-3 text-added"}):v.jsx(xv,{className:"w-3 h-3"})}),t.status!=="modified"&&v.jsx(Ev,{status:t.status}),t.isBinary&&v.jsx(Sv,{className:"bg-bg-tertiary text-text-muted",children:"Binary"}),v.jsxs("div",{className:"ml-auto flex items-center gap-2.5 shrink-0",children:[Et.length+Gt.length>0&&v.jsxs("span",{className:"text-[11px] text-text-muted flex items-center gap-1",children:[v.jsx(ss,{className:"w-3 h-3"}),Et.length+Gt.length,Gt.length>0&&v.jsxs(Cr,{variant:"outdated",size:"sm",children:[Gt.length," outdated"]})]}),v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx(Dh,{additions:t.additions,deletions:t.deletions}),v.jsxs("div",{className:"flex gap-px",children:[Array.from({length:Le}).map((oe,ae)=>v.jsx("span",{className:"w-1.5 h-1.5 rounded-sm bg-added"},`a${ae}`)),Array.from({length:Fe}).map((oe,ae)=>v.jsx("span",{className:"w-1.5 h-1.5 rounded-sm bg-deleted"},`d${ae}`)),Array.from({length:Kt}).map((oe,ae)=>v.jsx("span",{className:"w-1.5 h-1.5 rounded-sm bg-border"},`n${ae}`))]})]}),v.jsxs("label",{className:"flex items-center gap-1.5 text-[11px] text-text-muted cursor-pointer select-none hover:text-text transition-colors",children:[v.jsx("input",{type:"checkbox",checked:o,onChange:()=>u(X,!o),className:"accent-added cursor-pointer w-3 h-3"}),"Viewed"]})]})]}),!l&&v.jsx("div",{children:t.isBinary?v.jsx("div",{className:"p-4 text-center text-text-muted italic",children:"Binary file not shown"}):t.hunks.length===0?v.jsx("div",{className:"p-4 text-center text-text-muted italic",children:t.oldMode&&t.newMode?`File mode changed from ${t.oldMode} to ${t.newMode}`:"No content changes"}):B&&!Y?v.jsxs("div",{className:"flex items-center justify-center gap-3 py-6 px-4 text-sm text-text-muted",children:[v.jsxs("span",{children:["Large diff not rendered — ",O," lines"]}),v.jsx("button",{className:"text-accent hover:underline cursor-pointer font-medium",onClick:()=>j(!0),children:"Load diff"})]}):v.jsxs(v.Fragment,{children:[v.jsx(s4,{threads:Gt,onDeleteComment:fe,onDeleteThread:Ce}),v.jsxs("table",{className:"w-full border-collapse table-fixed",children:[r==="split"?v.jsxs("colgroup",{children:[v.jsx("col",{className:"w-12.5"}),v.jsx("col",{className:"w-[calc(50%-50px)]"}),v.jsx("col",{className:"w-12.5"}),v.jsx("col",{})]}):v.jsxs("colgroup",{children:[v.jsx("col",{className:"w-12.5"}),v.jsx("col",{className:"w-12.5"}),v.jsx("col",{className:"w-5"}),v.jsx("col",{})]}),t.hunks.map((oe,ae)=>{const ke=ae>0?ht.get(`between-${ae-1}`):void 0,De=ke?q.get(ke.id):void 0,Ye=ae===0?q.get("top"):void 0;return v.jsx(a4,{hunk:oe,viewMode:r,syntaxMap:Gl,expandControls:ce(ae),topExpansionLines:ae===0?[...Ye?.linesFromTop??[],...Ye?.linesFromBottom??[]]:void 0,gapExpansion:De,gapId:ke?.id,highlightLine:f,threads:Et,pendingSelection:ct,currentAuthor:Ox,isLineSelected:Ar,onLineMouseDown:_e,onLineMouseEnter:He,onCommentClick:at,onAddThread:yt,onReply:Q,onResolve:T,onUnresolve:ue,onDeleteComment:fe,onDeleteThread:Ce,onCancelPending:Sn,filePath:X,onRevertChange:h?(Ze,Ft,tn)=>k({hunk:Ze,startIndex:Ft,endIndex:tn}):void 0,getOriginalCode:xe},ae)}),en&&(()=>{const oe=q.get("bottom"),ae=[...oe?.linesFromTop??[],...oe?.linesFromBottom??[]],ke=nw(ae,f),De={isLineSelected:Ar,onLineMouseDown:_e,onLineMouseEnter:He,onCommentClick:at,threads:Et,pendingSelection:ct,currentAuthor:Ox,onAddThread:yt,onReply:Q,onResolve:T,onUnresolve:ue,onDeleteComment:fe,onDeleteThread:Ce,onCancelPending:Sn,filePath:X,getOriginalCode:xe};return v.jsxs("tbody",{children:[oe?.linesFromTop&&oe.linesFromTop.length>0&&Eh(oe.linesFromTop,r,"bottom-top",ke,De),v.jsx(c4,{position:"bottom",remainingLines:zt,loading:se?.id==="bottom",onExpand:Ye=>ui(en,Ye)}),oe?.linesFromBottom&&oe.linesFromBottom.length>0&&Eh(oe.linesFromBottom,r,"bottom-bot",ke,De)]})})()]})]})}),me&&v.jsx(_v,{title:"Undo change",message:"This will undo the selected change. This cannot be undone.",onConfirm:()=>N(me),onCancel:()=>k(null)})]})}const Nx={name:"You",type:"user"};function h4(e){const{threads:t,commentActions:r}=e,l=t.filter(d=>d.filePath===Jo),[a,o]=F.useState(l.length>0),[u,f]=F.useState(!1);return v.jsxs("div",{className:`border rounded-lg mx-4 mt-4 overflow-hidden ${l.length>0?"border-accent/40":"border-border"}`,children:[v.jsxs("div",{className:`flex items-center gap-2 px-3 py-2 text-sm select-none ${l.length>0?"bg-accent/5":"bg-bg-secondary"}`,children:[v.jsx("button",{onClick:()=>o(!a),className:"text-[10px] w-5 h-5 shrink-0 flex items-center justify-center text-text-muted cursor-pointer",children:a?"▼":"▶"}),v.jsxs("button",{onClick:()=>o(!a),className:"flex items-center gap-2 cursor-pointer",children:[v.jsx(ss,{className:"w-3.5 h-3.5 text-text-muted"}),v.jsx("span",{className:"text-text-secondary",children:"General comments"}),l.length>0&&v.jsx("span",{className:"text-xs font-medium bg-accent/15 text-accent px-1.5 py-0.5 rounded-full",children:l.length})]}),v.jsx("div",{className:"flex-1"}),v.jsx("button",{onClick:d=>{d.stopPropagation(),o(!0),f(!0)},className:"text-xs text-accent hover:text-accent-hover transition-colors cursor-pointer",children:"Add comment"})]}),a&&v.jsxs("div",{className:"border-t border-border bg-bg",children:[u&&v.jsx("div",{className:"p-3",children:v.jsx(bu,{onSubmit:d=>{r.addThread(Jo,"new",0,0,d,Nx),f(!1)},onCancel:()=>f(!1),placeholder:"Leave a general comment...",submitLabel:"Comment"})}),l.length>0?v.jsx("div",{className:"p-3 space-y-3",children:l.map(d=>v.jsx(m4,{thread:d,onReply:h=>r.addReply(d.id,h,Nx),onResolve:()=>r.resolveThread(d.id),onUnresolve:()=>r.unresolveThread(d.id),onDeleteComment:h=>r.deleteComment(d.id,h),onDeleteThread:()=>r.deleteThread(d.id)},d.id))}):!u&&v.jsx("div",{className:"px-3 py-4 text-center text-xs text-text-muted",children:"No general comments yet"})]})]})}function m4(e){const{thread:t,onReply:r,onResolve:l,onUnresolve:a,onDeleteComment:o,onDeleteThread:u}=e,[f,d]=F.useState(!1),h=zl(t);return v.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[v.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 bg-bg-secondary border-b border-border",children:[v.jsx("div",{className:"flex items-center gap-2",children:h&&v.jsx(Cr,{variant:"resolved"})}),v.jsxs("div",{className:"flex items-center gap-1",children:[h?v.jsx("button",{onClick:a,className:"text-[11px] text-text-muted hover:text-text-secondary transition-colors cursor-pointer",children:"Reopen"}):v.jsx("button",{onClick:l,className:"text-[11px] text-text-muted hover:text-text-secondary transition-colors cursor-pointer",children:"Resolve"}),v.jsx("button",{onClick:u,className:"text-text-muted hover:text-deleted transition-colors cursor-pointer ml-1",title:"Delete thread",children:v.jsx(as,{className:"w-3.5 h-3.5"})})]})]}),v.jsx("div",{children:t.comments.map(g=>v.jsx(bm,{comment:g,onDelete:()=>o(g.id)},g.id))}),f?v.jsx("div",{className:"px-3 py-2 border-t border-border",children:v.jsx(bu,{onSubmit:g=>{r(g),d(!1)},onCancel:()=>d(!1),placeholder:"Reply...",submitLabel:"Reply"})}):v.jsx("div",{className:"px-3 py-2 border-t border-border",children:v.jsx("button",{onClick:()=>d(!0),className:"text-xs text-accent hover:text-accent-hover transition-colors cursor-pointer",children:"Reply"})})]})}function Dx(e){e.classList.remove("flash-thread"),e.offsetWidth,e.classList.add("flash-thread")}const p4=3,Mx=56,jx=100,g4=24,y4=32,b4=16;function x4(e,t){if(t)return Mx;if(e.isBinary||e.hunks.length===0)return jx;let r=0;for(const l of e.hunks)r+=l.lines.length;return r>=iw?jx:Mx+r*g4+e.hunks.length*y4+b4}function v4(e){const{diff:t,viewMode:r,theme:l,collapsedFiles:a,onToggleCollapse:o,reviewedFiles:u,onReviewedChange:f,onActiveFileChange:d,scrollRef:h,handle:g,baseRef:p,canRevert:b,onRevert:x,threads:w,commentsEnabled:E,commentActions:R,onAddThread:C,pendingSelection:L,onPendingSelectionChange:O}=e,{highlight:B}=W_(),Y=F.useRef(null),j=F.useMemo(()=>{const re=new Map;for(const me of t.files){const k=Jt(me);re.set(k,N=>B(N,k,l))}return re},[t,B,l]),q=SA({count:t.files.length,getScrollElement:()=>Y.current,estimateSize:re=>x4(t.files[re],a.has(Jt(t.files[re]))),overscan:p4}),G=F.useRef(null),[se,P]=F.useState(null),[X,te]=F.useState(null);F.useImperativeHandle(g,()=>({scrollToFile:re=>{const me=t.files.findIndex(k=>Jt(k)===re);me>=0&&(G.current=re,P(re),q.scrollToIndex(me,{align:"start"}))},scrollToThread:(re,me)=>{const k=document.querySelector(`[data-thread-id="${re}"]`);if(k){k.scrollIntoView({behavior:"instant",block:"center"}),Dx(k);return}const N=t.files.findIndex(Q=>Jt(Q)===me);N>=0&&(G.current=me,q.scrollToIndex(N,{align:"start"}),te(re))}}),[t.files,q]),F.useEffect(()=>{if(!X)return;const re=Y.current;if(!re)return;const me=X,k=()=>{const T=document.querySelector(`[data-thread-id="${me}"]`);return T?(te(null),T.scrollIntoView({behavior:"instant",block:"center"}),Dx(T),!0):!1};if(k())return;const N=new MutationObserver(()=>{k()&&N.disconnect()});N.observe(re,{childList:!0,subtree:!0});const Q=setTimeout(()=>{te(null),N.disconnect()},2e3);return()=>{N.disconnect(),clearTimeout(Q)}},[X]);const de=F.useCallback(()=>{const re=q.getVirtualItems();if(re.length===0)return null;const me=Y.current;if(!me)return null;const k=me.scrollTop;for(const N of re)if(N.end>k)return Jt(t.files[N.index]);return Jt(t.files[re[0].index])},[q,t.files]),le=F.useCallback(()=>{if(!d)return;const re=de();if(re){if(G.current){re===G.current&&(G.current=null);return}d(re)}},[de,d]),ne=q.getVirtualItems(),[z,J]=ne.length>0?[ne[0].start,q.getTotalSize()-ne[ne.length-1].end]:[0,0];return v.jsxs("main",{ref:re=>{Y.current=re,h&&h(re)},onScroll:le,className:"flex-1 overflow-y-auto pb-12",children:[E&&v.jsx(h4,{threads:w,commentActions:R}),v.jsx("div",{className:"py-2",style:{paddingTop:z,paddingBottom:J},children:ne.map(re=>{const me=t.files[re.index],k=Jt(me);return v.jsx("div",{"data-index":re.index,ref:q.measureElement,children:v.jsx(d4,{highlighted:se===k,onHighlightEnd:()=>{se===k&&P(null)},file:me,viewMode:r,collapsed:a.has(k),onToggleCollapse:o,reviewed:u.has(k),onReviewedChange:f,highlightLine:j.get(k),baseRef:p,canRevert:b,onRevert:x,threads:w,commentsEnabled:E,commentActions:R,onAddThread:C,pendingSelection:L,onPendingSelectionChange:O})},k+"-"+re.index)})})]})}function _4(e,t,r){let l=e.find(a=>a.type==="dir"&&a.name===t);return l||(l={type:"dir",name:t,path:r,children:[]},e.push(l)),l}function w4(e){const t=[];for(const r of e){const l=Jt(r),a=l.split("/");let o=t;for(let u=0;u<a.length-1;u++){const f=a.slice(0,u+1).join("/");o=_4(o,a[u],f).children}o.push({type:"file",name:a[a.length-1],path:l,file:r})}return t}function lw(e){return e.map(t=>{if(t.type!=="dir")return t;let r=t,l=r.name;for(;r.children.length===1&&r.children[0].type==="dir";)r=r.children[0],l+="/"+r.name;return{type:"dir",name:l,path:r.path,children:lw(r.children)}})}function aw(e){return[...e].sort((r,l)=>r.type!==l.type?r.type==="dir"?-1:1:r.name.localeCompare(l.name)).map(r=>r.type==="dir"?{...r,children:aw(r.children)}:r)}function sw(e,t){const r=t.toLowerCase(),l=[];for(const a of e)if(a.type==="file")a.path.toLowerCase().includes(r)&&l.push(a);else{const o=sw(a.children,t);o.length>0&&l.push({...a,children:o})}return l}function Ch(e){const t=[];for(const r of e)r.type==="dir"&&(t.push(r.path),t.push(...Ch(r.children)));return t}function S4(e){return e.open?v.jsx("svg",{className:"w-4 h-4 shrink-0 text-accent opacity-80",viewBox:"0 0 16 16",fill:"currentColor",children:v.jsx("path",{d:"M.513 1.513A1.75 1.75 0 011.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 00.2.1h6.5A1.75 1.75 0 0116 4.75v8.5A1.75 1.75 0 0114.25 15H1.75A1.75 1.75 0 010 13.25V2.75c0-.464.184-.91.513-1.237zM1.75 2.5a.25.25 0 00-.25.25v10.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25v-8.5a.25.25 0 00-.25-.25H7.5c-.55 0-1.07-.26-1.4-.7l-.9-1.2a.25.25 0 00-.2-.1h-3.5a.25.25 0 00-.25.25z"})}):v.jsx("svg",{className:"w-4 h-4 shrink-0 text-accent opacity-80",viewBox:"0 0 16 16",fill:"currentColor",children:v.jsx("path",{d:"M1.75 1A1.75 1.75 0 000 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3H7.5a.25.25 0 01-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75z"})})}function ow(e){const{node:t,depth:r,activeFile:l,reviewedFiles:a,filesWithComments:o,expandedDirs:u,onToggleDir:f,onFileClick:d}=e,h=r*12+8;if(t.type==="dir"){const x=u.has(t.path);return v.jsxs(v.Fragment,{children:[v.jsxs("button",{className:"flex items-center gap-1.5 w-full py-1 pr-2 text-left text-[13px] hover:bg-hover cursor-pointer",style:{paddingLeft:`${h}px`},onClick:()=>f(t.path),children:[v.jsx(rw,{expanded:x}),v.jsx(S4,{open:x}),v.jsx("span",{className:"truncate font-medium text-text-secondary",children:t.name})]}),x&&t.children.map(w=>v.jsx(ow,{node:w,depth:r+1,activeFile:l,reviewedFiles:a,filesWithComments:o,expandedDirs:u,onToggleDir:f,onFileClick:d},w.path))]})}const g=l===t.path,p=a.has(t.path),b=o.has(t.path);return v.jsxs("button",{className:Rt("flex items-center gap-1.5 w-full py-1 pr-2 text-left text-[13px] cursor-pointer border-l-2",g?"bg-active border-l-accent":"border-l-transparent hover:bg-hover",p&&"opacity-50"),style:{paddingLeft:`${h+15}px`},onClick:()=>d(t.path),children:[v.jsx(Ev,{status:t.file.status,compact:!0}),v.jsx("span",{className:Rt("flex-1 min-w-0 truncate",p&&"line-through"),children:t.name}),b&&v.jsx(ss,{className:"w-3 h-3 text-accent shrink-0"}),p?v.jsx("span",{className:"text-added text-[10px] shrink-0",title:"Viewed",children:"✓"}):v.jsx(Dh,{additions:t.file.additions,deletions:t.file.deletions})]})}function E4(e){const{files:t,search:r,activeFile:l,reviewedFiles:a,filesWithComments:o,onFileClick:u}=e,f=F.useMemo(()=>aw(lw(w4(t))),[t]),d=F.useRef(f),[h,g]=F.useState(()=>new Set(Ch(f)));d.current!==f&&(d.current=f,g(new Set(Ch(f))));const p=F.useMemo(()=>r?sw(f,r):f,[f,r]),b=F.useCallback(x=>{g(w=>{const E=new Set(w);return E.has(x)?E.delete(x):E.add(x),E})},[]);return v.jsx("div",{className:"flex-1 overflow-y-auto py-1",children:p.map(x=>v.jsx(ow,{node:x,depth:0,activeFile:l,reviewedFiles:a,filesWithComments:o,expandedDirs:h,onToggleDir:b,onFileClick:u},x.path))})}function zx(e){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[v.jsx("rect",{x:"1.5",y:"2.5",width:"13",height:"11",rx:"2"}),v.jsx("line",{x1:"5.5",y1:"2.5",x2:"5.5",y2:"13.5"})]})}function C4(e){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[v.jsx("circle",{cx:"7",cy:"7",r:"4.5"}),v.jsx("line",{x1:"10.2",y1:"10.2",x2:"14",y2:"14"})]})}function uw(e){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[v.jsx("line",{x1:"4",y1:"4",x2:"12",y2:"12"}),v.jsx("line",{x1:"12",y1:"4",x2:"4",y2:"12"})]})}function k4(e){const{files:t,activeFile:r,reviewedFiles:l,filesWithComments:a,onFileClick:o}=e,[u,f]=F.useState(""),[d,h]=F.useState(!1);return d?v.jsx("div",{className:"w-10 min-w-10 border-r border-border bg-bg-secondary flex items-start justify-center pt-3",children:v.jsx("button",{className:"p-1.5 rounded-md text-text-muted hover:text-text hover:bg-hover cursor-pointer",onClick:()=>h(!1),title:"Show sidebar",children:v.jsx(zx,{className:"w-4 h-4"})})}):v.jsxs("aside",{className:"w-72 min-w-72 border-r border-border bg-bg-secondary flex flex-col overflow-hidden",children:[v.jsxs("div",{className:"flex items-center justify-between px-3 py-2.5 border-b border-border",children:[v.jsxs("span",{className:"text-xs font-medium text-text-secondary flex items-center gap-2 uppercase tracking-wider",children:["Files",v.jsx("span",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1.5 bg-bg-tertiary rounded-full text-[10px] font-semibold text-text-muted",children:l.size>0?`${l.size}/${t.length}`:t.length})]}),v.jsx("button",{className:"p-1 rounded-md text-text-muted hover:text-text hover:bg-hover cursor-pointer",onClick:()=>h(!0),title:"Hide sidebar",children:v.jsx(zx,{className:"w-3.5 h-3.5"})})]}),v.jsxs("div",{className:"relative px-3 py-2",children:[v.jsx(C4,{className:"absolute left-5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-text-muted pointer-events-none"}),v.jsx("input",{className:"w-full pl-7 pr-7 py-1.5 border border-border rounded-md bg-bg text-xs outline-none focus:border-accent focus:ring-1 focus:ring-accent/20 placeholder:text-text-muted",type:"text",placeholder:"Filter files...",value:u,onChange:g=>f(g.target.value)}),u&&v.jsx("button",{className:"absolute right-5 top-1/2 -translate-y-1/2 text-text-muted hover:text-text cursor-pointer",onClick:()=>f(""),children:v.jsx(uw,{className:"w-3 h-3"})})]}),v.jsx(E4,{files:t,search:u,activeFile:r,reviewedFiles:l,filesWithComments:a,onFileClick:o})]})}const A4=[{category:"Navigation",items:[{key:"j",description:"Next file"},{key:"k",description:"Previous file"},{key:"n",description:"Next changed hunk"},{key:"p",description:"Previous changed hunk"}]},{category:"View",items:[{key:"u",description:"Unified view"},{key:"s",description:"Split view"},{key:"x",description:"Collapse/expand file"},{key:"Shift+x",description:"Collapse/expand all files"},{key:"r",description:"Toggle file as viewed"}]},{category:"Other",items:[{key:"/",description:"Focus search"},{key:"?",description:"Show shortcuts"},{key:"Esc",description:"Close modal / clear"}]}];function T4(e){const{onClose:t}=e,r=F.useRef(null);return F.useEffect(()=>{const l=r.current;if(l)return l.showModal(),()=>l.close()},[]),v.jsxs("dialog",{ref:r,className:"bg-bg text-text border border-border rounded-xl shadow-md w-[420px] max-w-[90vw] max-h-[80vh] overflow-y-auto backdrop:bg-black/60 backdrop:backdrop-blur-sm p-0 m-auto fixed inset-0 h-fit",onClose:t,onClick:l=>{l.target===r.current&&t()},children:[v.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-border",children:[v.jsx("h2",{className:"text-sm font-semibold",children:"Keyboard shortcuts"}),v.jsx("button",{className:"p-1 rounded-md text-text-muted hover:text-text hover:bg-hover cursor-pointer",onClick:t,children:v.jsx(uw,{className:"w-4 h-4"})})]}),v.jsx("div",{className:"px-5 py-4",children:A4.map(l=>v.jsxs("div",{className:"mb-5 last:mb-0",children:[v.jsx("h3",{className:"text-[10px] font-semibold text-text-muted mb-2.5 uppercase tracking-widest",children:l.category}),v.jsx("div",{className:"flex flex-col gap-1.5",children:l.items.map(a=>v.jsxs("div",{className:"flex items-center justify-between py-0.5",children:[v.jsx("span",{className:"text-xs text-text-secondary",children:a.description}),v.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-5 px-1.5 bg-bg-secondary border border-border rounded font-mono text-[11px] text-text-muted shadow-[inset_0_-1px_0_var(--color-border)]",children:a.key})]},a.key))})]},l.category))})]})}function R4(e){const{onRefresh:t}=e;return v.jsxs("div",{className:"sticky top-0 z-30 flex items-center justify-center gap-3 px-4 py-1.5 bg-accent/10 border-b border-accent/20 text-xs animate-slide-down",children:[v.jsx("span",{className:"text-accent font-medium",children:"Files have changed since this diff was loaded"}),v.jsx("button",{onClick:t,className:"px-2.5 py-0.5 bg-accent text-white rounded-md text-[11px] font-medium hover:bg-accent-hover transition-colors cursor-pointer",children:"Refresh"})]})}function L4(){return v.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("path",{d:"M9 12l2 2 4-4"}),v.jsx("circle",{cx:"12",cy:"12",r:"10"})]})}function Ix(){return v.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-bg/60 backdrop-blur-sm",children:v.jsx(zh,{className:"w-8 h-8"})})}const O4=3e3;function N4(e,t=!0){const[r,l]=F.useState(!1),a=F.useRef(null);function o(){a.current=null,l(!1)}return F.useEffect(()=>{if(!t)return;let u,f=!1;async function d(){if(!f){try{const h=await xC(e);if(f)return;a.current===null?a.current=h:h!==a.current&&l(!0)}catch{}f||(u=setTimeout(d,O4))}}return d(),()=>{f=!0,clearTimeout(u)}},[e,t]),{isStale:r,resetStaleness:o}}function D4(){return Array.from(document.querySelectorAll("tbody > tr:first-child"))}function M4(e){e.scrollIntoView({behavior:"instant",block:"start"})}function j4(e){const{refParam:t,initialTheme:r,initialViewMode:l}=e,[a,o]=F.useState(l||"split"),[u,f]=F.useState(!1),[d,h]=F.useState(!1),{theme:g,toggleTheme:p}=jC(r),{data:b,loading:x,error:w}=LC(u,t),{data:E,loading:R}=NC(t),[C,L]=F.useState(null),[O,B]=F.useState(new Set),[Y,j]=F.useState(new Set),[q,G]=F.useState(null),se=F.useRef(null),P=F.useRef(null),X=F.useRef(0),te=F.useRef(null),de=!!E?.capabilities?.reviews,le=E?.sessionId??null,ne=!!E?.capabilities?.revert,{isStale:z,resetStaleness:J}=N4(t,!!E?.capabilities?.staleness),{data:re,isFetched:me}=JC(de?le:null),k=de&&re?re:[],N=WC(le,de),Q=F.useMemo(()=>{const _e=new Set;for(const He of k)zl(He)||_e.add(He.filePath);return _e},[k]),T=F.useCallback((..._e)=>{N.addThread(..._e),G(null)},[N]);F.useEffect(()=>{if(!b||b===te.current)return;te.current=b;const _e=Zk(b.files);_e.size>0&&j(_e)},[b]);const ue=F.useCallback(_e=>{j(He=>{const tt=new Set(He);return tt.has(_e)?tt.delete(_e):tt.add(_e),tt})},[]),he=F.useCallback((_e,He)=>{B(tt=>{const at=new Set(tt);return He?at.add(_e):at.delete(_e),at}),j(He?tt=>{const at=new Set(tt);return at.add(_e),at}:tt=>{const at=new Set(tt);return at.delete(_e),at})},[]),fe=F.useCallback(()=>b?Jt(b.files[X.current]):null,[b]),Ce=F.useCallback(_e=>{if(!b)return;const He=Math.max(0,Math.min(b.files.length-1,X.current+_e));X.current=He;const tt=Jt(b.files[He]);P.current?.scrollToFile(tt)},[b]),je=F.useCallback(_e=>{const He=D4();if(He.length===0)return;let tt=_e>0?He[0]:He[He.length-1];for(let at=0;at<He.length;at++){const Sn=He[at].getBoundingClientRect();if(_e>0&&Sn.top>100){tt=He[at];break}_e<0&&Sn.top<-10&&(tt=He[at])}M4(tt)},[]);ZC({onNextFile:()=>Ce(1),onPrevFile:()=>Ce(-1),onNextHunk:()=>je(1),onPrevHunk:()=>je(-1),onToggleCollapse:()=>{const _e=fe();_e&&ue(_e)},onCollapseAll:()=>{if(!b)return;const _e=b.files.map(tt=>Jt(tt)),He=_e.some(tt=>!Y.has(tt));j(He?new Set(_e):new Set)},onToggleReviewed:()=>{const _e=fe();if(!_e)return;const He=O.has(_e);he(_e,!He),He||Ce(1)},onUnifiedView:()=>o("unified"),onSplitView:()=>o("split"),onShowHelp:()=>h(!0),onFocusSearch:()=>{const _e=document.querySelector('input[placeholder="Filter files..."]');_e&&_e.focus()},onEscape:()=>h(!1)});const xe=yu(),yt=F.useCallback(()=>{xe.invalidateQueries({queryKey:["diff"]})},[xe]),St=F.useCallback(()=>{xe.invalidateQueries({queryKey:["diff"]}),J()},[xe,J]),Et=F.useCallback(_e=>{L(_e),P.current?.scrollToFile(_e)},[]),Gt=F.useCallback((_e,He)=>{P.current?.scrollToThread(_e,He)},[]),Ot=F.useCallback(_e=>{L(_e)},[]);if(w)return v.jsx("div",{className:"flex flex-col min-h-screen bg-bg text-text font-sans",children:v.jsxs("div",{className:"flex flex-col items-center justify-center p-12 text-deleted text-center",children:[v.jsx("h2",{className:"text-xl mb-2",children:"Failed to load diff"}),v.jsx("p",{className:"text-text-secondary",children:w})]})});const wn=de&&!me;return(x||R||wn)&&!b?v.jsx(Ix,{}):!E||wn?v.jsx(Ix,{}):b&&b.files.length===0&&!x?v.jsxs("div",{className:"flex flex-col items-center justify-center min-h-screen bg-bg text-text font-sans gap-2",children:[v.jsx("div",{className:"text-added opacity-40 mb-1",children:v.jsx(L4,{})}),v.jsx("h2",{className:"text-base font-medium text-text-secondary",children:"No changes found"}),v.jsx("p",{className:"text-xs text-text-muted",children:"There are no differences to display."}),v.jsxs("div",{className:"mt-4 flex flex-col gap-1.5 items-center",children:[v.jsx("p",{className:"text-xs text-text-muted mb-1",children:"Try one of these"}),v.jsx("code",{className:"inline-block px-3 py-1 bg-bg-secondary border border-border rounded-md font-mono text-xs text-text",children:"diffity HEAD~1"}),v.jsx("code",{className:"inline-block px-3 py-1 bg-bg-secondary border border-border rounded-md font-mono text-xs text-text",children:"diffity main..feature"})]})]}):v.jsxs("div",{className:"flex flex-col h-screen bg-bg text-text font-sans",children:[v.jsx(tk,{diff:b,repoName:E?.name||null,branch:E?.branch||null,description:E?.description||null}),v.jsx(cA,{viewMode:a,onViewModeChange:o,hideWhitespace:u,onHideWhitespaceChange:f,theme:g,onToggleTheme:p,onShowHelp:()=>h(!0),diff:b||void 0,diffRef:t,threads:k,onDeleteAllComments:N.deleteAllThreads,onScrollToThread:Gt}),z&&v.jsx(R4,{onRefresh:St}),v.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[v.jsx(k4,{files:b?.files||[],activeFile:C,reviewedFiles:O,filesWithComments:Q,onFileClick:Et}),b?v.jsx(v4,{diff:b,viewMode:a,theme:g,collapsedFiles:Y,onToggleCollapse:ue,reviewedFiles:O,onReviewedChange:he,onActiveFileChange:Ot,handle:P,baseRef:t,canRevert:ne,onRevert:yt,scrollRef:_e=>{se.current=_e},threads:k,commentsEnabled:de,commentActions:N,onAddThread:T,pendingSelection:q,onPendingSelectionChange:G}):null]}),d&&v.jsx(T4,{onClose:()=>h(!1)})]})}function z4(){const{ref:e,theme:t,view:r}=yC();return v.jsx(j4,{refParam:e??"work",initialTheme:t,initialViewMode:r})}DE.createRoot(document.getElementById("root")).render(v.jsx(kE.StrictMode,{children:v.jsx(iC,{client:gC,children:v.jsx(z4,{})})}));
|