@markusylisiurunen/tau 0.2.82 → 0.2.84

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.
@@ -1,1887 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-D4QpJJKB.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-B12qg9BL.js","assets/ruby-Dw2BHqvy.js","assets/haml-B8DHNrY2.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-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/r-Dspwwk_N.js","assets/just-Cw27pwNe.js","assets/perl-C0TMdlhV.js","assets/latex-CWtU0Tv5.js","assets/tex-idrVyKtj.js","assets/liquid-DYVedYrR.js","assets/marko-CnJfTvn9.js","assets/less-B1dDrJ26.js","assets/mdc-BMNejdWA.js","assets/nextflow-Zz6hmt5N.js","assets/nextflow-groovy-BeH2EWoN.js","assets/nginx-BpAMiNFr.js","assets/nim-CVrawwO9.js","assets/php-Dhbhpdrm.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-Uh8Bk_45.js","assets/csharp-COcwbKMJ.js","assets/rst-BrH8l1NY.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-C_ipcX3V.js","assets/templ-P3uqSqPl.js","assets/go-CxLEBnE3.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-DNn4PbVi.js","assets/vue-DN_0RTcg.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-CQOfvN7w.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
2
- (function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function i(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(o){if(o.ep)return;o.ep=!0;const s=i(o);fetch(o.href,s)}})();function vb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yf={exports:{}},dl={};var f0;function zS(){if(f0)return dl;f0=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(a,o,s){var c=null;if(s!==void 0&&(c=""+s),o.key!==void 0&&(c=""+o.key),"key"in o){s={};for(var f in o)f!=="key"&&(s[f]=o[f])}else s=o;return o=s.ref,{$$typeof:e,type:a,key:c,ref:o!==void 0?o:null,props:s}}return dl.Fragment=n,dl.jsx=i,dl.jsxs=i,dl}var d0;function US(){return d0||(d0=1,yf.exports=zS()),yf.exports}var te=US(),bf={exports:{}},_e={};var h0;function HS(){if(h0)return _e;h0=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function b(R){return R===null||typeof R!="object"?null:(R=v&&R[v]||R["@@iterator"],typeof R=="function"?R:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,O={};function A(R,V,w){this.props=R,this.context=V,this.refs=O,this.updater=w||S}A.prototype.isReactComponent={},A.prototype.setState=function(R,V){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,V,"setState")},A.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function T(){}T.prototype=A.prototype;function L(R,V,w){this.props=R,this.context=V,this.refs=O,this.updater=w||S}var U=L.prototype=new T;U.constructor=L,k(U,A.prototype),U.isPureReactComponent=!0;var B=Array.isArray;function N(){}var G={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function ie(R,V,w){var le=w.ref;return{$$typeof:e,type:R,key:V,ref:le!==void 0?le:null,props:w}}function ne(R,V){return ie(R.type,V,R.props)}function K(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function W(R){var V={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(w){return V[w]})}var ue=/\/+/g;function J(R,V){return typeof R=="object"&&R!==null&&R.key!=null?W(""+R.key):V.toString(36)}function ee(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(N,N):(R.status="pending",R.then(function(V){R.status==="pending"&&(R.status="fulfilled",R.value=V)},function(V){R.status==="pending"&&(R.status="rejected",R.reason=V)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function z(R,V,w,le,he){var se=typeof R;(se==="undefined"||se==="boolean")&&(R=null);var ye=!1;if(R===null)ye=!0;else switch(se){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(R.$$typeof){case e:case n:ye=!0;break;case g:return ye=R._init,z(ye(R._payload),V,w,le,he)}}if(ye)return he=he(R),ye=le===""?"."+J(R,0):le,B(he)?(w="",ye!=null&&(w=ye.replace(ue,"$&/")+"/"),z(he,V,w,"",function(Ze){return Ze})):he!=null&&(K(he)&&(he=ne(he,w+(he.key==null||R&&R.key===he.key?"":(""+he.key).replace(ue,"$&/")+"/")+ye)),V.push(he)),1;ye=0;var we=le===""?".":le+":";if(B(R))for(var Ae=0;Ae<R.length;Ae++)le=R[Ae],se=we+J(le,Ae),ye+=z(le,V,w,se,he);else if(Ae=b(R),typeof Ae=="function")for(R=Ae.call(R),Ae=0;!(le=R.next()).done;)le=le.value,se=we+J(le,Ae++),ye+=z(le,V,w,se,he);else if(se==="object"){if(typeof R.then=="function")return z(ee(R),V,w,le,he);throw V=String(R),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return ye}function Y(R,V,w){if(R==null)return R;var le=[],he=0;return z(R,le,"","",function(se){return V.call(w,se,he++)}),le}function ae(R){if(R._status===-1){var V=R._result;V=V(),V.then(function(w){(R._status===0||R._status===-1)&&(R._status=1,R._result=w)},function(w){(R._status===0||R._status===-1)&&(R._status=2,R._result=w)}),R._status===-1&&(R._status=0,R._result=V)}if(R._status===1)return R._result.default;throw R._result}var de=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},x={map:Y,forEach:function(R,V,w){Y(R,function(){V.apply(this,arguments)},w)},count:function(R){var V=0;return Y(R,function(){V++}),V},toArray:function(R){return Y(R,function(V){return V})||[]},only:function(R){if(!K(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return _e.Activity=y,_e.Children=x,_e.Component=A,_e.Fragment=i,_e.Profiler=o,_e.PureComponent=L,_e.StrictMode=a,_e.Suspense=d,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,_e.__COMPILER_RUNTIME={__proto__:null,c:function(R){return G.H.useMemoCache(R)}},_e.cache=function(R){return function(){return R.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(R,V,w){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var le=k({},R.props),he=R.key;if(V!=null)for(se in V.key!==void 0&&(he=""+V.key),V)!$.call(V,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&V.ref===void 0||(le[se]=V[se]);var se=arguments.length-2;if(se===1)le.children=w;else if(1<se){for(var ye=Array(se),we=0;we<se;we++)ye[we]=arguments[we+2];le.children=ye}return ie(R.type,he,le)},_e.createContext=function(R){return R={$$typeof:c,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:s,_context:R},R},_e.createElement=function(R,V,w){var le,he={},se=null;if(V!=null)for(le in V.key!==void 0&&(se=""+V.key),V)$.call(V,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(he[le]=V[le]);var ye=arguments.length-2;if(ye===1)he.children=w;else if(1<ye){for(var we=Array(ye),Ae=0;Ae<ye;Ae++)we[Ae]=arguments[Ae+2];he.children=we}if(R&&R.defaultProps)for(le in ye=R.defaultProps,ye)he[le]===void 0&&(he[le]=ye[le]);return ie(R,se,he)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(R){return{$$typeof:f,render:R}},_e.isValidElement=K,_e.lazy=function(R){return{$$typeof:g,_payload:{_status:-1,_result:R},_init:ae}},_e.memo=function(R,V){return{$$typeof:p,type:R,compare:V===void 0?null:V}},_e.startTransition=function(R){var V=G.T,w={};G.T=w;try{var le=R(),he=G.S;he!==null&&he(w,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(N,de)}catch(se){de(se)}finally{V!==null&&w.types!==null&&(V.types=w.types),G.T=V}},_e.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},_e.use=function(R){return G.H.use(R)},_e.useActionState=function(R,V,w){return G.H.useActionState(R,V,w)},_e.useCallback=function(R,V){return G.H.useCallback(R,V)},_e.useContext=function(R){return G.H.useContext(R)},_e.useDebugValue=function(){},_e.useDeferredValue=function(R,V){return G.H.useDeferredValue(R,V)},_e.useEffect=function(R,V){return G.H.useEffect(R,V)},_e.useEffectEvent=function(R){return G.H.useEffectEvent(R)},_e.useId=function(){return G.H.useId()},_e.useImperativeHandle=function(R,V,w){return G.H.useImperativeHandle(R,V,w)},_e.useInsertionEffect=function(R,V){return G.H.useInsertionEffect(R,V)},_e.useLayoutEffect=function(R,V){return G.H.useLayoutEffect(R,V)},_e.useMemo=function(R,V){return G.H.useMemo(R,V)},_e.useOptimistic=function(R,V){return G.H.useOptimistic(R,V)},_e.useReducer=function(R,V,w){return G.H.useReducer(R,V,w)},_e.useRef=function(R){return G.H.useRef(R)},_e.useState=function(R){return G.H.useState(R)},_e.useSyncExternalStore=function(R,V,w){return G.H.useSyncExternalStore(R,V,w)},_e.useTransition=function(){return G.H.useTransition()},_e.version="19.2.4",_e}var p0;function Hd(){return p0||(p0=1,bf.exports=HS()),bf.exports}var me=Hd(),vf={exports:{}},hl={},_f={exports:{}},Sf={};var m0;function PS(){return m0||(m0=1,(function(e){function n(z,Y){var ae=z.length;z.push(Y);e:for(;0<ae;){var de=ae-1>>>1,x=z[de];if(0<o(x,Y))z[de]=Y,z[ae]=x,ae=de;else break e}}function i(z){return z.length===0?null:z[0]}function a(z){if(z.length===0)return null;var Y=z[0],ae=z.pop();if(ae!==Y){z[0]=ae;e:for(var de=0,x=z.length,R=x>>>1;de<R;){var V=2*(de+1)-1,w=z[V],le=V+1,he=z[le];if(0>o(w,ae))le<x&&0>o(he,w)?(z[de]=he,z[le]=ae,de=le):(z[de]=w,z[V]=ae,de=V);else if(le<x&&0>o(he,ae))z[de]=he,z[le]=ae,de=le;else break e}}return Y}function o(z,Y){var ae=z.sortIndex-Y.sortIndex;return ae!==0?ae:z.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var d=[],p=[],g=1,y=null,v=3,b=!1,S=!1,k=!1,O=!1,A=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function U(z){for(var Y=i(p);Y!==null;){if(Y.callback===null)a(p);else if(Y.startTime<=z)a(p),Y.sortIndex=Y.expirationTime,n(d,Y);else break;Y=i(p)}}function B(z){if(k=!1,U(z),!S)if(i(d)!==null)S=!0,N||(N=!0,W());else{var Y=i(p);Y!==null&&ee(B,Y.startTime-z)}}var N=!1,G=-1,$=5,ie=-1;function ne(){return O?!0:!(e.unstable_now()-ie<$)}function K(){if(O=!1,N){var z=e.unstable_now();ie=z;var Y=!0;try{e:{S=!1,k&&(k=!1,T(G),G=-1),b=!0;var ae=v;try{t:{for(U(z),y=i(d);y!==null&&!(y.expirationTime>z&&ne());){var de=y.callback;if(typeof de=="function"){y.callback=null,v=y.priorityLevel;var x=de(y.expirationTime<=z);if(z=e.unstable_now(),typeof x=="function"){y.callback=x,U(z),Y=!0;break t}y===i(d)&&a(d),U(z)}else a(d);y=i(d)}if(y!==null)Y=!0;else{var R=i(p);R!==null&&ee(B,R.startTime-z),Y=!1}}break e}finally{y=null,v=ae,b=!1}Y=void 0}}finally{Y?W():N=!1}}}var W;if(typeof L=="function")W=function(){L(K)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,J=ue.port2;ue.port1.onmessage=K,W=function(){J.postMessage(null)}}else W=function(){A(K,0)};function ee(z,Y){G=A(function(){z(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(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"):$=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(z){switch(v){case 1:case 2:case 3:var Y=3;break;default:Y=v}var ae=v;v=Y;try{return z()}finally{v=ae}},e.unstable_requestPaint=function(){O=!0},e.unstable_runWithPriority=function(z,Y){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var ae=v;v=z;try{return Y()}finally{v=ae}},e.unstable_scheduleCallback=function(z,Y,ae){var de=e.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?de+ae:de):ae=de,z){case 1:var x=-1;break;case 2:x=250;break;case 5:x=1073741823;break;case 4:x=1e4;break;default:x=5e3}return x=ae+x,z={id:g++,callback:Y,priorityLevel:z,startTime:ae,expirationTime:x,sortIndex:-1},ae>de?(z.sortIndex=ae,n(p,z),i(d)===null&&z===i(p)&&(k?(T(G),G=-1):k=!0,ee(B,ae-de))):(z.sortIndex=x,n(d,z),S||b||(S=!0,N||(N=!0,W()))),z},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(z){var Y=v;return function(){var ae=v;v=Y;try{return z.apply(this,arguments)}finally{v=ae}}}})(Sf)),Sf}var g0;function BS(){return g0||(g0=1,_f.exports=PS()),_f.exports}var Ef={exports:{}},Ct={};var y0;function VS(){if(y0)return Ct;y0=1;var e=Hd();function n(d){var p="https://react.dev/errors/"+d;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+d+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(d,p,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:y==null?null:""+y,children:d,containerInfo:p,implementation:g}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,p){if(d==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Ct.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Ct.createPortal=function(d,p){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(n(299));return s(d,p,null,g)},Ct.flushSync=function(d){var p=c.T,g=a.p;try{if(c.T=null,a.p=2,d)return d()}finally{c.T=p,a.p=g,a.d.f()}},Ct.preconnect=function(d,p){typeof d=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,a.d.C(d,p))},Ct.prefetchDNS=function(d){typeof d=="string"&&a.d.D(d)},Ct.preinit=function(d,p){if(typeof d=="string"&&p&&typeof p.as=="string"){var g=p.as,y=f(g,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,b=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?a.d.S(d,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:b}):g==="script"&&a.d.X(d,{crossOrigin:y,integrity:v,fetchPriority:b,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Ct.preinitModule=function(d,p){if(typeof d=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var g=f(p.as,p.crossOrigin);a.d.M(d,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&a.d.M(d)},Ct.preload=function(d,p){if(typeof d=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var g=p.as,y=f(g,p.crossOrigin);a.d.L(d,g,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Ct.preloadModule=function(d,p){if(typeof d=="string")if(p){var g=f(p.as,p.crossOrigin);a.d.m(d,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else a.d.m(d)},Ct.requestFormReset=function(d){a.d.r(d)},Ct.unstable_batchedUpdates=function(d,p){return d(p)},Ct.useFormState=function(d,p,g){return c.H.useFormState(d,p,g)},Ct.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ct.version="19.2.4",Ct}var b0;function jS(){if(b0)return Ef.exports;b0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Ef.exports=VS(),Ef.exports}var v0;function GS(){if(v0)return hl;v0=1;var e=BS(),n=Hd(),i=jS();function a(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function s(t){var r=t,l=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(l=r.return),t=r.return;while(t)}return r.tag===3?l:null}function c(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function f(t){if(t.tag===31){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function d(t){if(s(t)!==t)throw Error(a(188))}function p(t){var r=t.alternate;if(!r){if(r=s(t),r===null)throw Error(a(188));return r!==t?null:t}for(var l=t,u=r;;){var h=l.return;if(h===null)break;var m=h.alternate;if(m===null){if(u=h.return,u!==null){l=u;continue}break}if(h.child===m.child){for(m=h.child;m;){if(m===l)return d(h),t;if(m===u)return d(h),r;m=m.sibling}throw Error(a(188))}if(l.return!==u.return)l=h,u=m;else{for(var _=!1,E=h.child;E;){if(E===l){_=!0,l=h,u=m;break}if(E===u){_=!0,u=h,l=m;break}E=E.sibling}if(!_){for(E=m.child;E;){if(E===l){_=!0,l=m,u=h;break}if(E===u){_=!0,u=m,l=h;break}E=E.sibling}if(!_)throw Error(a(189))}}if(l.alternate!==u)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?t:r}function g(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=g(t),r!==null)return r;t=t.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),L=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),K=Symbol.iterator;function W(t){return t===null||typeof t!="object"?null:(t=K&&t[K]||t["@@iterator"],typeof t=="function"?t:null)}var ue=Symbol.for("react.client.reference");function J(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ue?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case k:return"Fragment";case A:return"Profiler";case O:return"StrictMode";case B:return"Suspense";case N:return"SuspenseList";case ie:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case S:return"Portal";case L:return t.displayName||"Context";case T:return(t._context.displayName||"Context")+".Consumer";case U:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case G:return r=t.displayName||null,r!==null?r:J(t.type)||"Memo";case $:r=t._payload,t=t._init;try{return J(t(r))}catch{}}return null}var ee=Array.isArray,z=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},de=[],x=-1;function R(t){return{current:t}}function V(t){0>x||(t.current=de[x],de[x]=null,x--)}function w(t,r){x++,de[x]=t.current,t.current=r}var le=R(null),he=R(null),se=R(null),ye=R(null);function we(t,r){switch(w(se,r),w(he,t),w(le,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?Mg(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=Mg(r),t=Ig(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}V(le),w(le,t)}function Ae(){V(le),V(he),V(se)}function Ze(t){t.memoizedState!==null&&w(ye,t);var r=le.current,l=Ig(r,t.type);r!==l&&(w(he,t),w(le,l))}function We(t){he.current===t&&(V(le),V(he)),ye.current===t&&(V(ye),sl._currentValue=ae)}var mn,Tt;function In(t){if(mn===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);mn=r&&r[1]||"",Tt=-1<l.stack.indexOf(`
3
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
4
- `+mn+t+Tt}var cr=!1;function fr(t,r){if(!t||cr)return"";cr=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(q){var j=q}Reflect.construct(t,[],Z)}else{try{Z.call()}catch(q){j=q}t.call(Z.prototype)}}else{try{throw Error()}catch(q){j=q}(Z=t())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(q){if(q&&j&&typeof q.stack=="string")return[q.stack,j.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=u.DetermineComponentFrameRoot(),_=m[0],E=m[1];if(_&&E){var D=_.split(`
5
- `),P=E.split(`
6
- `);for(h=u=0;u<D.length&&!D[u].includes("DetermineComponentFrameRoot");)u++;for(;h<P.length&&!P[h].includes("DetermineComponentFrameRoot");)h++;if(u===D.length||h===P.length)for(u=D.length-1,h=P.length-1;1<=u&&0<=h&&D[u]!==P[h];)h--;for(;1<=u&&0<=h;u--,h--)if(D[u]!==P[h]){if(u!==1||h!==1)do if(u--,h--,0>h||D[u]!==P[h]){var F=`
7
- `+D[u].replace(" at new "," at ");return t.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",t.displayName)),F}while(1<=u&&0<=h);break}}}finally{cr=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?In(l):""}function Bl(t,r){switch(t.tag){case 26:case 27:case 5:return In(t.type);case 16:return In("Lazy");case 13:return t.child!==r&&r!==null?In("Suspense Fallback"):In("Suspense");case 19:return In("SuspenseList");case 0:case 15:return fr(t.type,!1);case 11:return fr(t.type.render,!1);case 1:return fr(t.type,!0);case 31:return In("Activity");default:return""}}function Vl(t){try{var r="",l=null;do r+=Bl(t,l),l=t,t=t.return;while(t);return r}catch(u){return`
8
- Error generating stack: `+u.message+`
9
- `+u.stack}}var dr=Object.prototype.hasOwnProperty,hr=e.unstable_scheduleCallback,_a=e.unstable_cancelCallback,tu=e.unstable_shouldYield,nu=e.unstable_requestPaint,Lt=e.unstable_now,iu=e.unstable_getCurrentPriorityLevel,X=e.unstable_ImmediatePriority,oe=e.unstable_UserBlockingPriority,be=e.unstable_NormalPriority,Te=e.unstable_LowPriority,He=e.unstable_IdlePriority,Gt=e.log,zn=e.unstable_setDisableYieldValue,Rt=null,ct=null;function Ot(t){if(typeof Gt=="function"&&zn(t),ct&&typeof ct.setStrictMode=="function")try{ct.setStrictMode(Rt,t)}catch{}}var qe=Math.clz32?Math.clz32:E1,oi=Math.log,gn=Math.LN2;function E1(t){return t>>>=0,t===0?32:31-(oi(t)/gn|0)|0}var jl=256,Gl=262144,ql=4194304;function Ui(t){var r=t&42;if(r!==0)return r;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function $l(t,r,l){var u=t.pendingLanes;if(u===0)return 0;var h=0,m=t.suspendedLanes,_=t.pingedLanes;t=t.warmLanes;var E=u&134217727;return E!==0?(u=E&~m,u!==0?h=Ui(u):(_&=E,_!==0?h=Ui(_):l||(l=E&~t,l!==0&&(h=Ui(l))))):(E=u&~m,E!==0?h=Ui(E):_!==0?h=Ui(_):l||(l=u&~t,l!==0&&(h=Ui(l)))),h===0?0:r!==0&&r!==h&&(r&m)===0&&(m=h&-h,l=r&-r,m>=l||m===32&&(l&4194048)!==0)?r:h}function Sa(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function x1(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 mh(){var t=ql;return ql<<=1,(ql&62914560)===0&&(ql=4194304),t}function ru(t){for(var r=[],l=0;31>l;l++)r.push(t);return r}function Ea(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function C1(t,r,l,u,h,m){var _=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var E=t.entanglements,D=t.expirationTimes,P=t.hiddenUpdates;for(l=_&~l;0<l;){var F=31-qe(l),Z=1<<F;E[F]=0,D[F]=-1;var j=P[F];if(j!==null)for(P[F]=null,F=0;F<j.length;F++){var q=j[F];q!==null&&(q.lane&=-536870913)}l&=~Z}u!==0&&gh(t,u,0),m!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=m&~(_&~r))}function gh(t,r,l){t.pendingLanes|=r,t.suspendedLanes&=~r;var u=31-qe(r);t.entangledLanes|=r,t.entanglements[u]=t.entanglements[u]|1073741824|l&261930}function yh(t,r){var l=t.entangledLanes|=r;for(t=t.entanglements;l;){var u=31-qe(l),h=1<<u;h&r|t[u]&r&&(t[u]|=r),l&=~h}}function bh(t,r){var l=r&-r;return l=(l&42)!==0?1:au(l),(l&(t.suspendedLanes|r))!==0?0:l}function au(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function lu(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function vh(){var t=Y.p;return t!==0?t:(t=window.event,t===void 0?32:r0(t.type))}function _h(t,r){var l=Y.p;try{return Y.p=t,r()}finally{Y.p=l}}var si=Math.random().toString(36).slice(2),vt="__reactFiber$"+si,Nt="__reactProps$"+si,pr="__reactContainer$"+si,ou="__reactEvents$"+si,w1="__reactListeners$"+si,A1="__reactHandles$"+si,Sh="__reactResources$"+si,xa="__reactMarker$"+si;function su(t){delete t[vt],delete t[Nt],delete t[ou],delete t[w1],delete t[A1]}function mr(t){var r=t[vt];if(r)return r;for(var l=t.parentNode;l;){if(r=l[pr]||l[vt]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(t=jg(t);t!==null;){if(l=t[vt])return l;t=jg(t)}return r}t=l,l=t.parentNode}return null}function gr(t){if(t=t[vt]||t[pr]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function Ca(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(a(33))}function yr(t){var r=t[Sh];return r||(r=t[Sh]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function mt(t){t[xa]=!0}var Eh=new Set,xh={};function Hi(t,r){br(t,r),br(t+"Capture",r)}function br(t,r){for(xh[t]=r,t=0;t<r.length;t++)Eh.add(r[t])}var k1=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]*$"),Ch={},wh={};function T1(t){return dr.call(wh,t)?!0:dr.call(Ch,t)?!1:k1.test(t)?wh[t]=!0:(Ch[t]=!0,!1)}function Fl(t,r,l){if(T1(r))if(l===null)t.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+l)}}function Yl(t,r,l){if(l===null)t.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+l)}}function Un(t,r,l,u){if(u===null)t.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(r,l,""+u)}}function en(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Ah(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function L1(t,r,l){var u=Object.getOwnPropertyDescriptor(t.constructor.prototype,r);if(!t.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var h=u.get,m=u.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return h.call(this)},set:function(_){l=""+_,m.call(this,_)}}),Object.defineProperty(t,r,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(_){l=""+_},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function uu(t){if(!t._valueTracker){var r=Ah(t)?"checked":"value";t._valueTracker=L1(t,r,""+t[r])}}function kh(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var l=r.getValue(),u="";return t&&(u=Ah(t)?t.checked?"true":"false":t.value),t=u,t!==l?(r.setValue(t),!0):!1}function Xl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var R1=/[\n"\\]/g;function tn(t){return t.replace(R1,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function cu(t,r,l,u,h,m,_,E){t.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.type=_:t.removeAttribute("type"),r!=null?_==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+en(r)):t.value!==""+en(r)&&(t.value=""+en(r)):_!=="submit"&&_!=="reset"||t.removeAttribute("value"),r!=null?fu(t,_,en(r)):l!=null?fu(t,_,en(l)):u!=null&&t.removeAttribute("value"),h==null&&m!=null&&(t.defaultChecked=!!m),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?t.name=""+en(E):t.removeAttribute("name")}function Th(t,r,l,u,h,m,_,E){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),r!=null||l!=null){if(!(m!=="submit"&&m!=="reset"||r!=null)){uu(t);return}l=l!=null?""+en(l):"",r=r!=null?""+en(r):l,E||r===t.value||(t.value=r),t.defaultValue=r}u=u??h,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=E?t.checked:!!u,t.defaultChecked=!!u,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(t.name=_),uu(t)}function fu(t,r,l){r==="number"&&Xl(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function vr(t,r,l,u){if(t=t.options,r){r={};for(var h=0;h<l.length;h++)r["$"+l[h]]=!0;for(l=0;l<t.length;l++)h=r.hasOwnProperty("$"+t[l].value),t[l].selected!==h&&(t[l].selected=h),h&&u&&(t[l].defaultSelected=!0)}else{for(l=""+en(l),r=null,h=0;h<t.length;h++){if(t[h].value===l){t[h].selected=!0,u&&(t[h].defaultSelected=!0);return}r!==null||t[h].disabled||(r=t[h])}r!==null&&(r.selected=!0)}}function Lh(t,r,l){if(r!=null&&(r=""+en(r),r!==t.value&&(t.value=r),l==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=l!=null?""+en(l):""}function Rh(t,r,l,u){if(r==null){if(u!=null){if(l!=null)throw Error(a(92));if(ee(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),r=l}l=en(r),t.defaultValue=l,u=t.textContent,u===l&&u!==""&&u!==null&&(t.value=u),uu(t)}function _r(t,r){if(r){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=r;return}}t.textContent=r}var D1=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 Dh(t,r,l){var u=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":u?t.setProperty(r,l):typeof l!="number"||l===0||D1.has(r)?r==="float"?t.cssFloat=l:t[r]=(""+l).trim():t[r]=l+"px"}function Oh(t,r,l){if(r!=null&&typeof r!="object")throw Error(a(62));if(t=t.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?t.setProperty(u,""):u==="float"?t.cssFloat="":t[u]="");for(var h in r)u=r[h],r.hasOwnProperty(h)&&l[h]!==u&&Dh(t,h,u)}else for(var m in r)r.hasOwnProperty(m)&&Dh(t,m,r[m])}function du(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var O1=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"]]),N1=/^[\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 Ql(t){return N1.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Hn(){}var hu=null;function pu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Sr=null,Er=null;function Nh(t){var r=gr(t);if(r&&(t=r.stateNode)){var l=t[Nt]||null;e:switch(t=r.stateNode,r.type){case"input":if(cu(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+tn(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var u=l[r];if(u!==t&&u.form===t.form){var h=u[Nt]||null;if(!h)throw Error(a(90));cu(u,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<l.length;r++)u=l[r],u.form===t.form&&kh(u)}break e;case"textarea":Lh(t,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&vr(t,!!l.multiple,r,!1)}}}var mu=!1;function Mh(t,r,l){if(mu)return t(r,l);mu=!0;try{var u=t(r);return u}finally{if(mu=!1,(Sr!==null||Er!==null)&&(Uo(),Sr&&(r=Sr,t=Er,Er=Sr=null,Nh(r),t)))for(r=0;r<t.length;r++)Nh(t[r])}}function wa(t,r){var l=t.stateNode;if(l===null)return null;var u=l[Nt]||null;if(u===null)return null;l=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(a(231,r,typeof l));return l}var Pn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gu=!1;if(Pn)try{var Aa={};Object.defineProperty(Aa,"passive",{get:function(){gu=!0}}),window.addEventListener("test",Aa,Aa),window.removeEventListener("test",Aa,Aa)}catch{gu=!1}var ui=null,yu=null,Zl=null;function Ih(){if(Zl)return Zl;var t,r=yu,l=r.length,u,h="value"in ui?ui.value:ui.textContent,m=h.length;for(t=0;t<l&&r[t]===h[t];t++);var _=l-t;for(u=1;u<=_&&r[l-u]===h[m-u];u++);return Zl=h.slice(t,1<u?1-u:void 0)}function Kl(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function Wl(){return!0}function zh(){return!1}function Mt(t){function r(l,u,h,m,_){this._reactName=l,this._targetInst=h,this.type=u,this.nativeEvent=m,this.target=_,this.currentTarget=null;for(var E in t)t.hasOwnProperty(E)&&(l=t[E],this[E]=l?l(m):m[E]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Wl:zh,this.isPropagationStopped=zh,this}return y(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Wl)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Wl)},persist:function(){},isPersistent:Wl}),r}var Pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jl=Mt(Pi),ka=y({},Pi,{view:0,detail:0}),M1=Mt(ka),bu,vu,Ta,eo=y({},ka,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Su,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Ta&&(Ta&&t.type==="mousemove"?(bu=t.screenX-Ta.screenX,vu=t.screenY-Ta.screenY):vu=bu=0,Ta=t),bu)},movementY:function(t){return"movementY"in t?t.movementY:vu}}),Uh=Mt(eo),I1=y({},eo,{dataTransfer:0}),z1=Mt(I1),U1=y({},ka,{relatedTarget:0}),_u=Mt(U1),H1=y({},Pi,{animationName:0,elapsedTime:0,pseudoElement:0}),P1=Mt(H1),B1=y({},Pi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),V1=Mt(B1),j1=y({},Pi,{data:0}),Hh=Mt(j1),G1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},q1={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"},$1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function F1(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=$1[t])?!!r[t]:!1}function Su(){return F1}var Y1=y({},ka,{key:function(t){if(t.key){var r=G1[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=Kl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?q1[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Su,charCode:function(t){return t.type==="keypress"?Kl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Kl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),X1=Mt(Y1),Q1=y({},eo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ph=Mt(Q1),Z1=y({},ka,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Su}),K1=Mt(Z1),W1=y({},Pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),J1=Mt(W1),e_=y({},eo,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),t_=Mt(e_),n_=y({},Pi,{newState:0,oldState:0}),i_=Mt(n_),r_=[9,13,27,32],Eu=Pn&&"CompositionEvent"in window,La=null;Pn&&"documentMode"in document&&(La=document.documentMode);var a_=Pn&&"TextEvent"in window&&!La,Bh=Pn&&(!Eu||La&&8<La&&11>=La),Vh=" ",jh=!1;function Gh(t,r){switch(t){case"keyup":return r_.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qh(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var xr=!1;function l_(t,r){switch(t){case"compositionend":return qh(r);case"keypress":return r.which!==32?null:(jh=!0,Vh);case"textInput":return t=r.data,t===Vh&&jh?null:t;default:return null}}function o_(t,r){if(xr)return t==="compositionend"||!Eu&&Gh(t,r)?(t=Ih(),Zl=yu=ui=null,xr=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Bh&&r.locale!=="ko"?null:r.data;default:return null}}var s_={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $h(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!s_[t.type]:r==="textarea"}function Fh(t,r,l,u){Sr?Er?Er.push(u):Er=[u]:Sr=u,r=qo(r,"onChange"),0<r.length&&(l=new Jl("onChange","change",null,l,u),t.push({event:l,listeners:r}))}var Ra=null,Da=null;function u_(t){Tg(t,0)}function to(t){var r=Ca(t);if(kh(r))return t}function Yh(t,r){if(t==="change")return r}var Xh=!1;if(Pn){var xu;if(Pn){var Cu="oninput"in document;if(!Cu){var Qh=document.createElement("div");Qh.setAttribute("oninput","return;"),Cu=typeof Qh.oninput=="function"}xu=Cu}else xu=!1;Xh=xu&&(!document.documentMode||9<document.documentMode)}function Zh(){Ra&&(Ra.detachEvent("onpropertychange",Kh),Da=Ra=null)}function Kh(t){if(t.propertyName==="value"&&to(Da)){var r=[];Fh(r,Da,t,pu(t)),Mh(u_,r)}}function c_(t,r,l){t==="focusin"?(Zh(),Ra=r,Da=l,Ra.attachEvent("onpropertychange",Kh)):t==="focusout"&&Zh()}function f_(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return to(Da)}function d_(t,r){if(t==="click")return to(r)}function h_(t,r){if(t==="input"||t==="change")return to(r)}function p_(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var qt=typeof Object.is=="function"?Object.is:p_;function Oa(t,r){if(qt(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var l=Object.keys(t),u=Object.keys(r);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var h=l[u];if(!dr.call(r,h)||!qt(t[h],r[h]))return!1}return!0}function Wh(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Jh(t,r){var l=Wh(t);t=0;for(var u;l;){if(l.nodeType===3){if(u=t+l.textContent.length,t<=r&&u>=r)return{node:l,offset:r-t};t=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Wh(l)}}function ep(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?ep(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function tp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=Xl(t.document);r instanceof t.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)t=r.contentWindow;else break;r=Xl(t.document)}return r}function wu(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var m_=Pn&&"documentMode"in document&&11>=document.documentMode,Cr=null,Au=null,Na=null,ku=!1;function np(t,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;ku||Cr==null||Cr!==Xl(u)||(u=Cr,"selectionStart"in u&&wu(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Na&&Oa(Na,u)||(Na=u,u=qo(Au,"onSelect"),0<u.length&&(r=new Jl("onSelect","select",null,r,l),t.push({event:r,listeners:u}),r.target=Cr)))}function Bi(t,r){var l={};return l[t.toLowerCase()]=r.toLowerCase(),l["Webkit"+t]="webkit"+r,l["Moz"+t]="moz"+r,l}var wr={animationend:Bi("Animation","AnimationEnd"),animationiteration:Bi("Animation","AnimationIteration"),animationstart:Bi("Animation","AnimationStart"),transitionrun:Bi("Transition","TransitionRun"),transitionstart:Bi("Transition","TransitionStart"),transitioncancel:Bi("Transition","TransitionCancel"),transitionend:Bi("Transition","TransitionEnd")},Tu={},ip={};Pn&&(ip=document.createElement("div").style,"AnimationEvent"in window||(delete wr.animationend.animation,delete wr.animationiteration.animation,delete wr.animationstart.animation),"TransitionEvent"in window||delete wr.transitionend.transition);function Vi(t){if(Tu[t])return Tu[t];if(!wr[t])return t;var r=wr[t],l;for(l in r)if(r.hasOwnProperty(l)&&l in ip)return Tu[t]=r[l];return t}var rp=Vi("animationend"),ap=Vi("animationiteration"),lp=Vi("animationstart"),g_=Vi("transitionrun"),y_=Vi("transitionstart"),b_=Vi("transitioncancel"),op=Vi("transitionend"),sp=new Map,Lu="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(" ");Lu.push("scrollEnd");function yn(t,r){sp.set(t,r),Hi(r,[t])}var no=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},nn=[],Ar=0,Ru=0;function io(){for(var t=Ar,r=Ru=Ar=0;r<t;){var l=nn[r];nn[r++]=null;var u=nn[r];nn[r++]=null;var h=nn[r];nn[r++]=null;var m=nn[r];if(nn[r++]=null,u!==null&&h!==null){var _=u.pending;_===null?h.next=h:(h.next=_.next,_.next=h),u.pending=h}m!==0&&up(l,h,m)}}function ro(t,r,l,u){nn[Ar++]=t,nn[Ar++]=r,nn[Ar++]=l,nn[Ar++]=u,Ru|=u,t.lanes|=u,t=t.alternate,t!==null&&(t.lanes|=u)}function Du(t,r,l,u){return ro(t,r,l,u),ao(t)}function ji(t,r){return ro(t,null,null,r),ao(t)}function up(t,r,l){t.lanes|=l;var u=t.alternate;u!==null&&(u.lanes|=l);for(var h=!1,m=t.return;m!==null;)m.childLanes|=l,u=m.alternate,u!==null&&(u.childLanes|=l),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(h=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,h&&r!==null&&(h=31-qe(l),t=m.hiddenUpdates,u=t[h],u===null?t[h]=[r]:u.push(r),r.lane=l|536870912),m):null}function ao(t){if(50<tl)throw tl=0,Bc=null,Error(a(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var kr={};function v_(t,r,l,u){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(t,r,l,u){return new v_(t,r,l,u)}function Ou(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Bn(t,r){var l=t.alternate;return l===null?(l=$t(t.tag,r,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=r,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,r=t.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function cp(t,r){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,r=l.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function lo(t,r,l,u,h,m){var _=0;if(u=t,typeof t=="function")Ou(t)&&(_=1);else if(typeof t=="string")_=CS(t,l,le.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case ie:return t=$t(31,l,r,h),t.elementType=ie,t.lanes=m,t;case k:return Gi(l.children,h,m,r);case O:_=8,h|=24;break;case A:return t=$t(12,l,r,h|2),t.elementType=A,t.lanes=m,t;case B:return t=$t(13,l,r,h),t.elementType=B,t.lanes=m,t;case N:return t=$t(19,l,r,h),t.elementType=N,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case L:_=10;break e;case T:_=9;break e;case U:_=11;break e;case G:_=14;break e;case $:_=16,u=null;break e}_=29,l=Error(a(130,t===null?"null":typeof t,"")),u=null}return r=$t(_,l,r,h),r.elementType=t,r.type=u,r.lanes=m,r}function Gi(t,r,l,u){return t=$t(7,t,u,r),t.lanes=l,t}function Nu(t,r,l){return t=$t(6,t,null,r),t.lanes=l,t}function fp(t){var r=$t(18,null,null,0);return r.stateNode=t,r}function Mu(t,r,l){return r=$t(4,t.children!==null?t.children:[],t.key,r),r.lanes=l,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var dp=new WeakMap;function rn(t,r){if(typeof t=="object"&&t!==null){var l=dp.get(t);return l!==void 0?l:(r={value:t,source:r,stack:Vl(r)},dp.set(t,r),r)}return{value:t,source:r,stack:Vl(r)}}var Tr=[],Lr=0,oo=null,Ma=0,an=[],ln=0,ci=null,Cn=1,wn="";function Vn(t,r){Tr[Lr++]=Ma,Tr[Lr++]=oo,oo=t,Ma=r}function hp(t,r,l){an[ln++]=Cn,an[ln++]=wn,an[ln++]=ci,ci=t;var u=Cn;t=wn;var h=32-qe(u)-1;u&=~(1<<h),l+=1;var m=32-qe(r)+h;if(30<m){var _=h-h%5;m=(u&(1<<_)-1).toString(32),u>>=_,h-=_,Cn=1<<32-qe(r)+h|l<<h|u,wn=m+t}else Cn=1<<m|l<<h|u,wn=t}function Iu(t){t.return!==null&&(Vn(t,1),hp(t,1,0))}function zu(t){for(;t===oo;)oo=Tr[--Lr],Tr[Lr]=null,Ma=Tr[--Lr],Tr[Lr]=null;for(;t===ci;)ci=an[--ln],an[ln]=null,wn=an[--ln],an[ln]=null,Cn=an[--ln],an[ln]=null}function pp(t,r){an[ln++]=Cn,an[ln++]=wn,an[ln++]=ci,Cn=r.id,wn=r.overflow,ci=t}var _t=null,Xe=null,Ne=!1,fi=null,on=!1,Uu=Error(a(519));function di(t){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ia(rn(r,t)),Uu}function mp(t){var r=t.stateNode,l=t.type,u=t.memoizedProps;switch(r[vt]=t,r[Nt]=u,l){case"dialog":Re("cancel",r),Re("close",r);break;case"iframe":case"object":case"embed":Re("load",r);break;case"video":case"audio":for(l=0;l<il.length;l++)Re(il[l],r);break;case"source":Re("error",r);break;case"img":case"image":case"link":Re("error",r),Re("load",r);break;case"details":Re("toggle",r);break;case"input":Re("invalid",r),Th(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Re("invalid",r);break;case"textarea":Re("invalid",r),Rh(r,u.value,u.defaultValue,u.children)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||u.suppressHydrationWarning===!0||Og(r.textContent,l)?(u.popover!=null&&(Re("beforetoggle",r),Re("toggle",r)),u.onScroll!=null&&Re("scroll",r),u.onScrollEnd!=null&&Re("scrollend",r),u.onClick!=null&&(r.onclick=Hn),r=!0):r=!1,r||di(t,!0)}function gp(t){for(_t=t.return;_t;)switch(_t.tag){case 5:case 31:case 13:on=!1;return;case 27:case 3:on=!0;return;default:_t=_t.return}}function Rr(t){if(t!==_t)return!1;if(!Ne)return gp(t),Ne=!0,!1;var r=t.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||tf(t.type,t.memoizedProps)),l=!l),l&&Xe&&di(t),gp(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));Xe=Vg(t)}else if(r===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));Xe=Vg(t)}else r===27?(r=Xe,Ai(t.type)?(t=of,of=null,Xe=t):Xe=r):Xe=_t?un(t.stateNode.nextSibling):null;return!0}function qi(){Xe=_t=null,Ne=!1}function Hu(){var t=fi;return t!==null&&(Ht===null?Ht=t:Ht.push.apply(Ht,t),fi=null),t}function Ia(t){fi===null?fi=[t]:fi.push(t)}var Pu=R(null),$i=null,jn=null;function hi(t,r,l){w(Pu,r._currentValue),r._currentValue=l}function Gn(t){t._currentValue=Pu.current,V(Pu)}function Bu(t,r,l){for(;t!==null;){var u=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),t===l)break;t=t.return}}function Vu(t,r,l,u){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var m=h.dependencies;if(m!==null){var _=h.child;m=m.firstContext;e:for(;m!==null;){var E=m;m=h;for(var D=0;D<r.length;D++)if(E.context===r[D]){m.lanes|=l,E=m.alternate,E!==null&&(E.lanes|=l),Bu(m.return,l,t),u||(_=null);break e}m=E.next}}else if(h.tag===18){if(_=h.return,_===null)throw Error(a(341));_.lanes|=l,m=_.alternate,m!==null&&(m.lanes|=l),Bu(_,l,t),_=null}else _=h.child;if(_!==null)_.return=h;else for(_=h;_!==null;){if(_===t){_=null;break}if(h=_.sibling,h!==null){h.return=_.return,_=h;break}_=_.return}h=_}}function Dr(t,r,l,u){t=null;for(var h=r,m=!1;h!==null;){if(!m){if((h.flags&524288)!==0)m=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var _=h.alternate;if(_===null)throw Error(a(387));if(_=_.memoizedProps,_!==null){var E=h.type;qt(h.pendingProps.value,_.value)||(t!==null?t.push(E):t=[E])}}else if(h===ye.current){if(_=h.alternate,_===null)throw Error(a(387));_.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(sl):t=[sl])}h=h.return}t!==null&&Vu(r,t,l,u),r.flags|=262144}function so(t){for(t=t.firstContext;t!==null;){if(!qt(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Fi(t){$i=t,jn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function St(t){return yp($i,t)}function uo(t,r){return $i===null&&Fi(t),yp(t,r)}function yp(t,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},jn===null){if(t===null)throw Error(a(308));jn=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else jn=jn.next=r;return l}var __=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(l,u){t.push(u)}};this.abort=function(){r.aborted=!0,t.forEach(function(l){return l()})}},S_=e.unstable_scheduleCallback,E_=e.unstable_NormalPriority,rt={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ju(){return{controller:new __,data:new Map,refCount:0}}function za(t){t.refCount--,t.refCount===0&&S_(E_,function(){t.controller.abort()})}var Ua=null,Gu=0,Or=0,Nr=null;function x_(t,r){if(Ua===null){var l=Ua=[];Gu=0,Or=Fc(),Nr={status:"pending",value:void 0,then:function(u){l.push(u)}}}return Gu++,r.then(bp,bp),r}function bp(){if(--Gu===0&&Ua!==null){Nr!==null&&(Nr.status="fulfilled");var t=Ua;Ua=null,Or=0,Nr=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function C_(t,r){var l=[],u={status:"pending",value:null,reason:null,then:function(h){l.push(h)}};return t.then(function(){u.status="fulfilled",u.value=r;for(var h=0;h<l.length;h++)(0,l[h])(r)},function(h){for(u.status="rejected",u.reason=h,h=0;h<l.length;h++)(0,l[h])(void 0)}),u}var vp=z.S;z.S=function(t,r){ng=Lt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&x_(t,r),vp!==null&&vp(t,r)};var Yi=R(null);function qu(){var t=Yi.current;return t!==null?t:$e.pooledCache}function co(t,r){r===null?w(Yi,Yi.current):w(Yi,r.pool)}function _p(){var t=qu();return t===null?null:{parent:rt._currentValue,pool:t}}var Mr=Error(a(460)),$u=Error(a(474)),fo=Error(a(542)),ho={then:function(){}};function Sp(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Ep(t,r,l){switch(l=t[l],l===void 0?t.push(r):l!==r&&(r.then(Hn,Hn),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Cp(t),t;default:if(typeof r.status=="string")r.then(Hn,Hn);else{if(t=$e,t!==null&&100<t.shellSuspendCounter)throw Error(a(482));t=r,t.status="pending",t.then(function(u){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=u}},function(u){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Cp(t),t}throw Qi=r,Mr}}function Xi(t){try{var r=t._init;return r(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Qi=l,Mr):l}}var Qi=null;function xp(){if(Qi===null)throw Error(a(459));var t=Qi;return Qi=null,t}function Cp(t){if(t===Mr||t===fo)throw Error(a(483))}var Ir=null,Ha=0;function po(t){var r=Ha;return Ha+=1,Ir===null&&(Ir=[]),Ep(Ir,t,r)}function Pa(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function mo(t,r){throw r.$$typeof===v?Error(a(525)):(t=Object.prototype.toString.call(r),Error(a(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function wp(t){function r(I,M){if(t){var H=I.deletions;H===null?(I.deletions=[M],I.flags|=16):H.push(M)}}function l(I,M){if(!t)return null;for(;M!==null;)r(I,M),M=M.sibling;return null}function u(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 h(I,M){return I=Bn(I,M),I.index=0,I.sibling=null,I}function m(I,M,H){return I.index=H,t?(H=I.alternate,H!==null?(H=H.index,H<M?(I.flags|=67108866,M):H):(I.flags|=67108866,M)):(I.flags|=1048576,M)}function _(I){return t&&I.alternate===null&&(I.flags|=67108866),I}function E(I,M,H,Q){return M===null||M.tag!==6?(M=Nu(H,I.mode,Q),M.return=I,M):(M=h(M,H),M.return=I,M)}function D(I,M,H,Q){var pe=H.type;return pe===k?F(I,M,H.props.children,Q,H.key):M!==null&&(M.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===$&&Xi(pe)===M.type)?(M=h(M,H.props),Pa(M,H),M.return=I,M):(M=lo(H.type,H.key,H.props,null,I.mode,Q),Pa(M,H),M.return=I,M)}function P(I,M,H,Q){return M===null||M.tag!==4||M.stateNode.containerInfo!==H.containerInfo||M.stateNode.implementation!==H.implementation?(M=Mu(H,I.mode,Q),M.return=I,M):(M=h(M,H.children||[]),M.return=I,M)}function F(I,M,H,Q,pe){return M===null||M.tag!==7?(M=Gi(H,I.mode,Q,pe),M.return=I,M):(M=h(M,H),M.return=I,M)}function Z(I,M,H){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Nu(""+M,I.mode,H),M.return=I,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case b:return H=lo(M.type,M.key,M.props,null,I.mode,H),Pa(H,M),H.return=I,H;case S:return M=Mu(M,I.mode,H),M.return=I,M;case $:return M=Xi(M),Z(I,M,H)}if(ee(M)||W(M))return M=Gi(M,I.mode,H,null),M.return=I,M;if(typeof M.then=="function")return Z(I,po(M),H);if(M.$$typeof===L)return Z(I,uo(I,M),H);mo(I,M)}return null}function j(I,M,H,Q){var pe=M!==null?M.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return pe!==null?null:E(I,M,""+H,Q);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case b:return H.key===pe?D(I,M,H,Q):null;case S:return H.key===pe?P(I,M,H,Q):null;case $:return H=Xi(H),j(I,M,H,Q)}if(ee(H)||W(H))return pe!==null?null:F(I,M,H,Q,null);if(typeof H.then=="function")return j(I,M,po(H),Q);if(H.$$typeof===L)return j(I,M,uo(I,H),Q);mo(I,H)}return null}function q(I,M,H,Q,pe){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return I=I.get(H)||null,E(M,I,""+Q,pe);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case b:return I=I.get(Q.key===null?H:Q.key)||null,D(M,I,Q,pe);case S:return I=I.get(Q.key===null?H:Q.key)||null,P(M,I,Q,pe);case $:return Q=Xi(Q),q(I,M,H,Q,pe)}if(ee(Q)||W(Q))return I=I.get(H)||null,F(M,I,Q,pe,null);if(typeof Q.then=="function")return q(I,M,H,po(Q),pe);if(Q.$$typeof===L)return q(I,M,H,uo(M,Q),pe);mo(M,Q)}return null}function ce(I,M,H,Q){for(var pe=null,Me=null,fe=M,xe=M=0,Oe=null;fe!==null&&xe<H.length;xe++){fe.index>xe?(Oe=fe,fe=null):Oe=fe.sibling;var Ie=j(I,fe,H[xe],Q);if(Ie===null){fe===null&&(fe=Oe);break}t&&fe&&Ie.alternate===null&&r(I,fe),M=m(Ie,M,xe),Me===null?pe=Ie:Me.sibling=Ie,Me=Ie,fe=Oe}if(xe===H.length)return l(I,fe),Ne&&Vn(I,xe),pe;if(fe===null){for(;xe<H.length;xe++)fe=Z(I,H[xe],Q),fe!==null&&(M=m(fe,M,xe),Me===null?pe=fe:Me.sibling=fe,Me=fe);return Ne&&Vn(I,xe),pe}for(fe=u(fe);xe<H.length;xe++)Oe=q(fe,I,xe,H[xe],Q),Oe!==null&&(t&&Oe.alternate!==null&&fe.delete(Oe.key===null?xe:Oe.key),M=m(Oe,M,xe),Me===null?pe=Oe:Me.sibling=Oe,Me=Oe);return t&&fe.forEach(function(Di){return r(I,Di)}),Ne&&Vn(I,xe),pe}function ge(I,M,H,Q){if(H==null)throw Error(a(151));for(var pe=null,Me=null,fe=M,xe=M=0,Oe=null,Ie=H.next();fe!==null&&!Ie.done;xe++,Ie=H.next()){fe.index>xe?(Oe=fe,fe=null):Oe=fe.sibling;var Di=j(I,fe,Ie.value,Q);if(Di===null){fe===null&&(fe=Oe);break}t&&fe&&Di.alternate===null&&r(I,fe),M=m(Di,M,xe),Me===null?pe=Di:Me.sibling=Di,Me=Di,fe=Oe}if(Ie.done)return l(I,fe),Ne&&Vn(I,xe),pe;if(fe===null){for(;!Ie.done;xe++,Ie=H.next())Ie=Z(I,Ie.value,Q),Ie!==null&&(M=m(Ie,M,xe),Me===null?pe=Ie:Me.sibling=Ie,Me=Ie);return Ne&&Vn(I,xe),pe}for(fe=u(fe);!Ie.done;xe++,Ie=H.next())Ie=q(fe,I,xe,Ie.value,Q),Ie!==null&&(t&&Ie.alternate!==null&&fe.delete(Ie.key===null?xe:Ie.key),M=m(Ie,M,xe),Me===null?pe=Ie:Me.sibling=Ie,Me=Ie);return t&&fe.forEach(function(IS){return r(I,IS)}),Ne&&Vn(I,xe),pe}function Ge(I,M,H,Q){if(typeof H=="object"&&H!==null&&H.type===k&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case b:e:{for(var pe=H.key;M!==null;){if(M.key===pe){if(pe=H.type,pe===k){if(M.tag===7){l(I,M.sibling),Q=h(M,H.props.children),Q.return=I,I=Q;break e}}else if(M.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===$&&Xi(pe)===M.type){l(I,M.sibling),Q=h(M,H.props),Pa(Q,H),Q.return=I,I=Q;break e}l(I,M);break}else r(I,M);M=M.sibling}H.type===k?(Q=Gi(H.props.children,I.mode,Q,H.key),Q.return=I,I=Q):(Q=lo(H.type,H.key,H.props,null,I.mode,Q),Pa(Q,H),Q.return=I,I=Q)}return _(I);case S:e:{for(pe=H.key;M!==null;){if(M.key===pe)if(M.tag===4&&M.stateNode.containerInfo===H.containerInfo&&M.stateNode.implementation===H.implementation){l(I,M.sibling),Q=h(M,H.children||[]),Q.return=I,I=Q;break e}else{l(I,M);break}else r(I,M);M=M.sibling}Q=Mu(H,I.mode,Q),Q.return=I,I=Q}return _(I);case $:return H=Xi(H),Ge(I,M,H,Q)}if(ee(H))return ce(I,M,H,Q);if(W(H)){if(pe=W(H),typeof pe!="function")throw Error(a(150));return H=pe.call(H),ge(I,M,H,Q)}if(typeof H.then=="function")return Ge(I,M,po(H),Q);if(H.$$typeof===L)return Ge(I,M,uo(I,H),Q);mo(I,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,M!==null&&M.tag===6?(l(I,M.sibling),Q=h(M,H),Q.return=I,I=Q):(l(I,M),Q=Nu(H,I.mode,Q),Q.return=I,I=Q),_(I)):l(I,M)}return function(I,M,H,Q){try{Ha=0;var pe=Ge(I,M,H,Q);return Ir=null,pe}catch(fe){if(fe===Mr||fe===fo)throw fe;var Me=$t(29,fe,null,I.mode);return Me.lanes=Q,Me.return=I,Me}}}var Zi=wp(!0),Ap=wp(!1),pi=!1;function Fu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yu(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function mi(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function gi(t,r,l){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,(ze&2)!==0){var h=u.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),u.pending=r,r=ao(t),up(t,null,l),r}return ro(t,u,r,l),ao(t)}function Ba(t,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var u=r.lanes;u&=t.pendingLanes,l|=u,r.lanes=l,yh(t,l)}}function Xu(t,r){var l=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var h=null,m=null;if(l=l.firstBaseUpdate,l!==null){do{var _={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};m===null?h=m=_:m=m.next=_,l=l.next}while(l!==null);m===null?h=m=r:m=m.next=r}else h=m=r;l={baseState:u.baseState,firstBaseUpdate:h,lastBaseUpdate:m,shared:u.shared,callbacks:u.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=r:t.next=r,l.lastBaseUpdate=r}var Qu=!1;function Va(){if(Qu){var t=Nr;if(t!==null)throw t}}function ja(t,r,l,u){Qu=!1;var h=t.updateQueue;pi=!1;var m=h.firstBaseUpdate,_=h.lastBaseUpdate,E=h.shared.pending;if(E!==null){h.shared.pending=null;var D=E,P=D.next;D.next=null,_===null?m=P:_.next=P,_=D;var F=t.alternate;F!==null&&(F=F.updateQueue,E=F.lastBaseUpdate,E!==_&&(E===null?F.firstBaseUpdate=P:E.next=P,F.lastBaseUpdate=D))}if(m!==null){var Z=h.baseState;_=0,F=P=D=null,E=m;do{var j=E.lane&-536870913,q=j!==E.lane;if(q?(De&j)===j:(u&j)===j){j!==0&&j===Or&&(Qu=!0),F!==null&&(F=F.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var ce=t,ge=E;j=r;var Ge=l;switch(ge.tag){case 1:if(ce=ge.payload,typeof ce=="function"){Z=ce.call(Ge,Z,j);break e}Z=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=ge.payload,j=typeof ce=="function"?ce.call(Ge,Z,j):ce,j==null)break e;Z=y({},Z,j);break e;case 2:pi=!0}}j=E.callback,j!==null&&(t.flags|=64,q&&(t.flags|=8192),q=h.callbacks,q===null?h.callbacks=[j]:q.push(j))}else q={lane:j,tag:E.tag,payload:E.payload,callback:E.callback,next:null},F===null?(P=F=q,D=Z):F=F.next=q,_|=j;if(E=E.next,E===null){if(E=h.shared.pending,E===null)break;q=E,E=q.next,q.next=null,h.lastBaseUpdate=q,h.shared.pending=null}}while(!0);F===null&&(D=Z),h.baseState=D,h.firstBaseUpdate=P,h.lastBaseUpdate=F,m===null&&(h.shared.lanes=0),Si|=_,t.lanes=_,t.memoizedState=Z}}function kp(t,r){if(typeof t!="function")throw Error(a(191,t));t.call(r)}function Tp(t,r){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)kp(l[t],r)}var zr=R(null),go=R(0);function Lp(t,r){t=Wn,w(go,t),w(zr,r),Wn=t|r.baseLanes}function Zu(){w(go,Wn),w(zr,zr.current)}function Ku(){Wn=go.current,V(zr),V(go)}var Ft=R(null),sn=null;function yi(t){var r=t.alternate;w(tt,tt.current&1),w(Ft,t),sn===null&&(r===null||zr.current!==null||r.memoizedState!==null)&&(sn=t)}function Wu(t){w(tt,tt.current),w(Ft,t),sn===null&&(sn=t)}function Rp(t){t.tag===22?(w(tt,tt.current),w(Ft,t),sn===null&&(sn=t)):bi()}function bi(){w(tt,tt.current),w(Ft,Ft.current)}function Yt(t){V(Ft),sn===t&&(sn=null),V(tt)}var tt=R(0);function yo(t){for(var r=t;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||af(l)||lf(l)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var qn=0,Ee=null,Ve=null,at=null,bo=!1,Ur=!1,Ki=!1,vo=0,Ga=0,Hr=null,w_=0;function Je(){throw Error(a(321))}function Ju(t,r){if(r===null)return!1;for(var l=0;l<r.length&&l<t.length;l++)if(!qt(t[l],r[l]))return!1;return!0}function ec(t,r,l,u,h,m){return qn=m,Ee=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,z.H=t===null||t.memoizedState===null?hm:mc,Ki=!1,m=l(u,h),Ki=!1,Ur&&(m=Op(r,l,u,h)),Dp(t),m}function Dp(t){z.H=Fa;var r=Ve!==null&&Ve.next!==null;if(qn=0,at=Ve=Ee=null,bo=!1,Ga=0,Hr=null,r)throw Error(a(300));t===null||lt||(t=t.dependencies,t!==null&&so(t)&&(lt=!0))}function Op(t,r,l,u){Ee=t;var h=0;do{if(Ur&&(Hr=null),Ga=0,Ur=!1,25<=h)throw Error(a(301));if(h+=1,at=Ve=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}z.H=pm,m=r(l,u)}while(Ur);return m}function A_(){var t=z.H,r=t.useState()[0];return r=typeof r.then=="function"?qa(r):r,t=t.useState()[0],(Ve!==null?Ve.memoizedState:null)!==t&&(Ee.flags|=1024),r}function tc(){var t=vo!==0;return vo=0,t}function nc(t,r,l){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~l}function ic(t){if(bo){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}bo=!1}qn=0,at=Ve=Ee=null,Ur=!1,Ga=vo=0,Hr=null}function Dt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?Ee.memoizedState=at=t:at=at.next=t,at}function nt(){if(Ve===null){var t=Ee.alternate;t=t!==null?t.memoizedState:null}else t=Ve.next;var r=at===null?Ee.memoizedState:at.next;if(r!==null)at=r,Ve=t;else{if(t===null)throw Ee.alternate===null?Error(a(467)):Error(a(310));Ve=t,t={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},at===null?Ee.memoizedState=at=t:at=at.next=t}return at}function _o(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qa(t){var r=Ga;return Ga+=1,Hr===null&&(Hr=[]),t=Ep(Hr,t,r),r=Ee,(at===null?r.memoizedState:at.next)===null&&(r=r.alternate,z.H=r===null||r.memoizedState===null?hm:mc),t}function So(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return qa(t);if(t.$$typeof===L)return St(t)}throw Error(a(438,String(t)))}function rc(t){var r=null,l=Ee.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=Ee.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=_o(),Ee.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(t),u=0;u<t;u++)l[u]=ne;return r.index++,l}function $n(t,r){return typeof r=="function"?r(t):r}function Eo(t){var r=nt();return ac(r,Ve,t)}function ac(t,r,l){var u=t.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var h=t.baseQueue,m=u.pending;if(m!==null){if(h!==null){var _=h.next;h.next=m.next,m.next=_}r.baseQueue=h=m,u.pending=null}if(m=t.baseState,h===null)t.memoizedState=m;else{r=h.next;var E=_=null,D=null,P=r,F=!1;do{var Z=P.lane&-536870913;if(Z!==P.lane?(De&Z)===Z:(qn&Z)===Z){var j=P.revertLane;if(j===0)D!==null&&(D=D.next={lane:0,revertLane:0,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),Z===Or&&(F=!0);else if((qn&j)===j){P=P.next,j===Or&&(F=!0);continue}else Z={lane:0,revertLane:P.revertLane,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},D===null?(E=D=Z,_=m):D=D.next=Z,Ee.lanes|=j,Si|=j;Z=P.action,Ki&&l(m,Z),m=P.hasEagerState?P.eagerState:l(m,Z)}else j={lane:Z,revertLane:P.revertLane,gesture:P.gesture,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},D===null?(E=D=j,_=m):D=D.next=j,Ee.lanes|=Z,Si|=Z;P=P.next}while(P!==null&&P!==r);if(D===null?_=m:D.next=E,!qt(m,t.memoizedState)&&(lt=!0,F&&(l=Nr,l!==null)))throw l;t.memoizedState=m,t.baseState=_,t.baseQueue=D,u.lastRenderedState=m}return h===null&&(u.lanes=0),[t.memoizedState,u.dispatch]}function lc(t){var r=nt(),l=r.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=t;var u=l.dispatch,h=l.pending,m=r.memoizedState;if(h!==null){l.pending=null;var _=h=h.next;do m=t(m,_.action),_=_.next;while(_!==h);qt(m,r.memoizedState)||(lt=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),l.lastRenderedState=m}return[m,u]}function Np(t,r,l){var u=Ee,h=nt(),m=Ne;if(m){if(l===void 0)throw Error(a(407));l=l()}else l=r();var _=!qt((Ve||h).memoizedState,l);if(_&&(h.memoizedState=l,lt=!0),h=h.queue,uc(zp.bind(null,u,h,t),[t]),h.getSnapshot!==r||_||at!==null&&at.memoizedState.tag&1){if(u.flags|=2048,Pr(9,{destroy:void 0},Ip.bind(null,u,h,l,r),null),$e===null)throw Error(a(349));m||(qn&127)!==0||Mp(u,r,l)}return l}function Mp(t,r,l){t.flags|=16384,t={getSnapshot:r,value:l},r=Ee.updateQueue,r===null?(r=_o(),Ee.updateQueue=r,r.stores=[t]):(l=r.stores,l===null?r.stores=[t]:l.push(t))}function Ip(t,r,l,u){r.value=l,r.getSnapshot=u,Up(r)&&Hp(t)}function zp(t,r,l){return l(function(){Up(r)&&Hp(t)})}function Up(t){var r=t.getSnapshot;t=t.value;try{var l=r();return!qt(t,l)}catch{return!0}}function Hp(t){var r=ji(t,2);r!==null&&Pt(r,t,2)}function oc(t){var r=Dt();if(typeof t=="function"){var l=t;if(t=l(),Ki){Ot(!0);try{l()}finally{Ot(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:t},r}function Pp(t,r,l,u){return t.baseState=l,ac(t,Ve,typeof u=="function"?u:$n)}function k_(t,r,l,u,h){if(wo(t))throw Error(a(485));if(t=r.action,t!==null){var m={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){m.listeners.push(_)}};z.T!==null?l(!0):m.isTransition=!1,u(m),l=r.pending,l===null?(m.next=r.pending=m,Bp(r,m)):(m.next=l.next,r.pending=l.next=m)}}function Bp(t,r){var l=r.action,u=r.payload,h=t.state;if(r.isTransition){var m=z.T,_={};z.T=_;try{var E=l(h,u),D=z.S;D!==null&&D(_,E),Vp(t,r,E)}catch(P){sc(t,r,P)}finally{m!==null&&_.types!==null&&(m.types=_.types),z.T=m}}else try{m=l(h,u),Vp(t,r,m)}catch(P){sc(t,r,P)}}function Vp(t,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){jp(t,r,u)},function(u){return sc(t,r,u)}):jp(t,r,l)}function jp(t,r,l){r.status="fulfilled",r.value=l,Gp(r),t.state=l,r=t.pending,r!==null&&(l=r.next,l===r?t.pending=null:(l=l.next,r.next=l,Bp(t,l)))}function sc(t,r,l){var u=t.pending;if(t.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=l,Gp(r),r=r.next;while(r!==u)}t.action=null}function Gp(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function qp(t,r){return r}function $p(t,r){if(Ne){var l=$e.formState;if(l!==null){e:{var u=Ee;if(Ne){if(Xe){t:{for(var h=Xe,m=on;h.nodeType!==8;){if(!m){h=null;break t}if(h=un(h.nextSibling),h===null){h=null;break t}}m=h.data,h=m==="F!"||m==="F"?h:null}if(h){Xe=un(h.nextSibling),u=h.data==="F!";break e}}di(u)}u=!1}u&&(r=l[0])}}return l=Dt(),l.memoizedState=l.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qp,lastRenderedState:r},l.queue=u,l=cm.bind(null,Ee,u),u.dispatch=l,u=oc(!1),m=pc.bind(null,Ee,!1,u.queue),u=Dt(),h={state:r,dispatch:null,action:t,pending:null},u.queue=h,l=k_.bind(null,Ee,h,m,l),h.dispatch=l,u.memoizedState=t,[r,l,!1]}function Fp(t){var r=nt();return Yp(r,Ve,t)}function Yp(t,r,l){if(r=ac(t,r,qp)[0],t=Eo($n)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=qa(r)}catch(_){throw _===Mr?fo:_}else u=r;r=nt();var h=r.queue,m=h.dispatch;return l!==r.memoizedState&&(Ee.flags|=2048,Pr(9,{destroy:void 0},T_.bind(null,h,l),null)),[u,m,t]}function T_(t,r){t.action=r}function Xp(t){var r=nt(),l=Ve;if(l!==null)return Yp(r,l,t);nt(),r=r.memoizedState,l=nt();var u=l.queue.dispatch;return l.memoizedState=t,[r,u,!1]}function Pr(t,r,l,u){return t={tag:t,create:l,deps:u,inst:r,next:null},r=Ee.updateQueue,r===null&&(r=_o(),Ee.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=t.next=t:(u=l.next,l.next=t,t.next=u,r.lastEffect=t),t}function Qp(){return nt().memoizedState}function xo(t,r,l,u){var h=Dt();Ee.flags|=t,h.memoizedState=Pr(1|r,{destroy:void 0},l,u===void 0?null:u)}function Co(t,r,l,u){var h=nt();u=u===void 0?null:u;var m=h.memoizedState.inst;Ve!==null&&u!==null&&Ju(u,Ve.memoizedState.deps)?h.memoizedState=Pr(r,m,l,u):(Ee.flags|=t,h.memoizedState=Pr(1|r,m,l,u))}function Zp(t,r){xo(8390656,8,t,r)}function uc(t,r){Co(2048,8,t,r)}function L_(t){Ee.flags|=4;var r=Ee.updateQueue;if(r===null)r=_o(),Ee.updateQueue=r,r.events=[t];else{var l=r.events;l===null?r.events=[t]:l.push(t)}}function Kp(t){var r=nt().memoizedState;return L_({ref:r,nextImpl:t}),function(){if((ze&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function Wp(t,r){return Co(4,2,t,r)}function Jp(t,r){return Co(4,4,t,r)}function em(t,r){if(typeof r=="function"){t=t();var l=r(t);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function tm(t,r,l){l=l!=null?l.concat([t]):null,Co(4,4,em.bind(null,r,t),l)}function cc(){}function nm(t,r){var l=nt();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&Ju(r,u[1])?u[0]:(l.memoizedState=[t,r],t)}function im(t,r){var l=nt();r=r===void 0?null:r;var u=l.memoizedState;if(r!==null&&Ju(r,u[1]))return u[0];if(u=t(),Ki){Ot(!0);try{t()}finally{Ot(!1)}}return l.memoizedState=[u,r],u}function fc(t,r,l){return l===void 0||(qn&1073741824)!==0&&(De&261930)===0?t.memoizedState=r:(t.memoizedState=l,t=rg(),Ee.lanes|=t,Si|=t,l)}function rm(t,r,l,u){return qt(l,r)?l:zr.current!==null?(t=fc(t,l,u),qt(t,r)||(lt=!0),t):(qn&42)===0||(qn&1073741824)!==0&&(De&261930)===0?(lt=!0,t.memoizedState=l):(t=rg(),Ee.lanes|=t,Si|=t,r)}function am(t,r,l,u,h){var m=Y.p;Y.p=m!==0&&8>m?m:8;var _=z.T,E={};z.T=E,pc(t,!1,r,l);try{var D=h(),P=z.S;if(P!==null&&P(E,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){var F=C_(D,u);$a(t,r,F,Zt(t))}else $a(t,r,u,Zt(t))}catch(Z){$a(t,r,{then:function(){},status:"rejected",reason:Z},Zt())}finally{Y.p=m,_!==null&&E.types!==null&&(_.types=E.types),z.T=_}}function R_(){}function dc(t,r,l,u){if(t.tag!==5)throw Error(a(476));var h=lm(t).queue;am(t,h,r,ae,l===null?R_:function(){return om(t),l(u)})}function lm(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:ae},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:l},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function om(t){var r=lm(t);r.next===null&&(r=t.alternate.memoizedState),$a(t,r.next.queue,{},Zt())}function hc(){return St(sl)}function sm(){return nt().memoizedState}function um(){return nt().memoizedState}function D_(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var l=Zt();t=mi(l);var u=gi(r,t,l);u!==null&&(Pt(u,r,l),Ba(u,r,l)),r={cache:ju()},t.payload=r;return}r=r.return}}function O_(t,r,l){var u=Zt();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},wo(t)?fm(r,l):(l=Du(t,r,l,u),l!==null&&(Pt(l,t,u),dm(l,r,u)))}function cm(t,r,l){var u=Zt();$a(t,r,l,u)}function $a(t,r,l,u){var h={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(wo(t))fm(r,h);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var _=r.lastRenderedState,E=m(_,l);if(h.hasEagerState=!0,h.eagerState=E,qt(E,_))return ro(t,r,h,0),$e===null&&io(),!1}catch{}if(l=Du(t,r,h,u),l!==null)return Pt(l,t,u),dm(l,r,u),!0}return!1}function pc(t,r,l,u){if(u={lane:2,revertLane:Fc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},wo(t)){if(r)throw Error(a(479))}else r=Du(t,l,u,2),r!==null&&Pt(r,t,2)}function wo(t){var r=t.alternate;return t===Ee||r!==null&&r===Ee}function fm(t,r){Ur=bo=!0;var l=t.pending;l===null?r.next=r:(r.next=l.next,l.next=r),t.pending=r}function dm(t,r,l){if((l&4194048)!==0){var u=r.lanes;u&=t.pendingLanes,l|=u,r.lanes=l,yh(t,l)}}var Fa={readContext:St,use:So,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useLayoutEffect:Je,useInsertionEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useSyncExternalStore:Je,useId:Je,useHostTransitionStatus:Je,useFormState:Je,useActionState:Je,useOptimistic:Je,useMemoCache:Je,useCacheRefresh:Je};Fa.useEffectEvent=Je;var hm={readContext:St,use:So,useCallback:function(t,r){return Dt().memoizedState=[t,r===void 0?null:r],t},useContext:St,useEffect:Zp,useImperativeHandle:function(t,r,l){l=l!=null?l.concat([t]):null,xo(4194308,4,em.bind(null,r,t),l)},useLayoutEffect:function(t,r){return xo(4194308,4,t,r)},useInsertionEffect:function(t,r){xo(4,2,t,r)},useMemo:function(t,r){var l=Dt();r=r===void 0?null:r;var u=t();if(Ki){Ot(!0);try{t()}finally{Ot(!1)}}return l.memoizedState=[u,r],u},useReducer:function(t,r,l){var u=Dt();if(l!==void 0){var h=l(r);if(Ki){Ot(!0);try{l(r)}finally{Ot(!1)}}}else h=r;return u.memoizedState=u.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},u.queue=t,t=t.dispatch=O_.bind(null,Ee,t),[u.memoizedState,t]},useRef:function(t){var r=Dt();return t={current:t},r.memoizedState=t},useState:function(t){t=oc(t);var r=t.queue,l=cm.bind(null,Ee,r);return r.dispatch=l,[t.memoizedState,l]},useDebugValue:cc,useDeferredValue:function(t,r){var l=Dt();return fc(l,t,r)},useTransition:function(){var t=oc(!1);return t=am.bind(null,Ee,t.queue,!0,!1),Dt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,l){var u=Ee,h=Dt();if(Ne){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),$e===null)throw Error(a(349));(De&127)!==0||Mp(u,r,l)}h.memoizedState=l;var m={value:l,getSnapshot:r};return h.queue=m,Zp(zp.bind(null,u,m,t),[t]),u.flags|=2048,Pr(9,{destroy:void 0},Ip.bind(null,u,m,l,r),null),l},useId:function(){var t=Dt(),r=$e.identifierPrefix;if(Ne){var l=wn,u=Cn;l=(u&~(1<<32-qe(u)-1)).toString(32)+l,r="_"+r+"R_"+l,l=vo++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=w_++,r="_"+r+"r_"+l.toString(32)+"_";return t.memoizedState=r},useHostTransitionStatus:hc,useFormState:$p,useActionState:$p,useOptimistic:function(t){var r=Dt();r.memoizedState=r.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=pc.bind(null,Ee,!0,l),l.dispatch=r,[t,r]},useMemoCache:rc,useCacheRefresh:function(){return Dt().memoizedState=D_.bind(null,Ee)},useEffectEvent:function(t){var r=Dt(),l={impl:t};return r.memoizedState=l,function(){if((ze&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},mc={readContext:St,use:So,useCallback:nm,useContext:St,useEffect:uc,useImperativeHandle:tm,useInsertionEffect:Wp,useLayoutEffect:Jp,useMemo:im,useReducer:Eo,useRef:Qp,useState:function(){return Eo($n)},useDebugValue:cc,useDeferredValue:function(t,r){var l=nt();return rm(l,Ve.memoizedState,t,r)},useTransition:function(){var t=Eo($n)[0],r=nt().memoizedState;return[typeof t=="boolean"?t:qa(t),r]},useSyncExternalStore:Np,useId:sm,useHostTransitionStatus:hc,useFormState:Fp,useActionState:Fp,useOptimistic:function(t,r){var l=nt();return Pp(l,Ve,t,r)},useMemoCache:rc,useCacheRefresh:um};mc.useEffectEvent=Kp;var pm={readContext:St,use:So,useCallback:nm,useContext:St,useEffect:uc,useImperativeHandle:tm,useInsertionEffect:Wp,useLayoutEffect:Jp,useMemo:im,useReducer:lc,useRef:Qp,useState:function(){return lc($n)},useDebugValue:cc,useDeferredValue:function(t,r){var l=nt();return Ve===null?fc(l,t,r):rm(l,Ve.memoizedState,t,r)},useTransition:function(){var t=lc($n)[0],r=nt().memoizedState;return[typeof t=="boolean"?t:qa(t),r]},useSyncExternalStore:Np,useId:sm,useHostTransitionStatus:hc,useFormState:Xp,useActionState:Xp,useOptimistic:function(t,r){var l=nt();return Ve!==null?Pp(l,Ve,t,r):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:rc,useCacheRefresh:um};pm.useEffectEvent=Kp;function gc(t,r,l,u){r=t.memoizedState,l=l(u,r),l=l==null?r:y({},r,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var yc={enqueueSetState:function(t,r,l){t=t._reactInternals;var u=Zt(),h=mi(u);h.payload=r,l!=null&&(h.callback=l),r=gi(t,h,u),r!==null&&(Pt(r,t,u),Ba(r,t,u))},enqueueReplaceState:function(t,r,l){t=t._reactInternals;var u=Zt(),h=mi(u);h.tag=1,h.payload=r,l!=null&&(h.callback=l),r=gi(t,h,u),r!==null&&(Pt(r,t,u),Ba(r,t,u))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var l=Zt(),u=mi(l);u.tag=2,r!=null&&(u.callback=r),r=gi(t,u,l),r!==null&&(Pt(r,t,l),Ba(r,t,l))}};function mm(t,r,l,u,h,m,_){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,m,_):r.prototype&&r.prototype.isPureReactComponent?!Oa(l,u)||!Oa(h,m):!0}function gm(t,r,l,u){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,u),r.state!==t&&yc.enqueueReplaceState(r,r.state,null)}function Wi(t,r){var l=r;if("ref"in r){l={};for(var u in r)u!=="ref"&&(l[u]=r[u])}if(t=t.defaultProps){l===r&&(l=y({},l));for(var h in t)l[h]===void 0&&(l[h]=t[h])}return l}function ym(t){no(t)}function bm(t){console.error(t)}function vm(t){no(t)}function Ao(t,r){try{var l=t.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function _m(t,r,l){try{var u=t.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function bc(t,r,l){return l=mi(l),l.tag=3,l.payload={element:null},l.callback=function(){Ao(t,r)},l}function Sm(t){return t=mi(t),t.tag=3,t}function Em(t,r,l,u){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var m=u.value;t.payload=function(){return h(m)},t.callback=function(){_m(r,l,u)}}var _=l.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(t.callback=function(){_m(r,l,u),typeof h!="function"&&(Ei===null?Ei=new Set([this]):Ei.add(this));var E=u.stack;this.componentDidCatch(u.value,{componentStack:E!==null?E:""})})}function N_(t,r,l,u,h){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=l.alternate,r!==null&&Dr(r,l,h,!0),l=Ft.current,l!==null){switch(l.tag){case 31:case 13:return sn===null?Ho():l.alternate===null&&et===0&&(et=3),l.flags&=-257,l.flags|=65536,l.lanes=h,u===ho?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([u]):r.add(u),Gc(t,u,h)),!1;case 22:return l.flags|=65536,u===ho?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([u]):l.add(u)),Gc(t,u,h)),!1}throw Error(a(435,l.tag))}return Gc(t,u,h),Ho(),!1}if(Ne)return r=Ft.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,u!==Uu&&(t=Error(a(422),{cause:u}),Ia(rn(t,l)))):(u!==Uu&&(r=Error(a(423),{cause:u}),Ia(rn(r,l))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,u=rn(u,l),h=bc(t.stateNode,u,h),Xu(t,h),et!==4&&(et=2)),!1;var m=Error(a(520),{cause:u});if(m=rn(m,l),el===null?el=[m]:el.push(m),et!==4&&(et=2),r===null)return!0;u=rn(u,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,t=h&-h,l.lanes|=t,t=bc(l.stateNode,u,t),Xu(l,t),!1;case 1:if(r=l.type,m=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Ei===null||!Ei.has(m))))return l.flags|=65536,h&=-h,l.lanes|=h,h=Sm(h),Em(h,t,l,u),Xu(l,h),!1}l=l.return}while(l!==null);return!1}var vc=Error(a(461)),lt=!1;function Et(t,r,l,u){r.child=t===null?Ap(r,null,l,u):Zi(r,t.child,l,u)}function xm(t,r,l,u,h){l=l.render;var m=r.ref;if("ref"in u){var _={};for(var E in u)E!=="ref"&&(_[E]=u[E])}else _=u;return Fi(r),u=ec(t,r,l,_,m,h),E=tc(),t!==null&&!lt?(nc(t,r,h),Fn(t,r,h)):(Ne&&E&&Iu(r),r.flags|=1,Et(t,r,u,h),r.child)}function Cm(t,r,l,u,h){if(t===null){var m=l.type;return typeof m=="function"&&!Ou(m)&&m.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=m,wm(t,r,m,u,h)):(t=lo(l.type,null,u,r,r.mode,h),t.ref=r.ref,t.return=r,r.child=t)}if(m=t.child,!kc(t,h)){var _=m.memoizedProps;if(l=l.compare,l=l!==null?l:Oa,l(_,u)&&t.ref===r.ref)return Fn(t,r,h)}return r.flags|=1,t=Bn(m,u),t.ref=r.ref,t.return=r,r.child=t}function wm(t,r,l,u,h){if(t!==null){var m=t.memoizedProps;if(Oa(m,u)&&t.ref===r.ref)if(lt=!1,r.pendingProps=u=m,kc(t,h))(t.flags&131072)!==0&&(lt=!0);else return r.lanes=t.lanes,Fn(t,r,h)}return _c(t,r,l,u,h)}function Am(t,r,l,u){var h=u.children,m=t!==null?t.memoizedState:null;if(t===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((r.flags&128)!==0){if(m=m!==null?m.baseLanes|l:l,t!==null){for(u=r.child=t.child,h=0;u!==null;)h=h|u.lanes|u.childLanes,u=u.sibling;u=h&~m}else u=0,r.child=null;return km(t,r,m,l,u)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&co(r,m!==null?m.cachePool:null),m!==null?Lp(r,m):Zu(),Rp(r);else return u=r.lanes=536870912,km(t,r,m!==null?m.baseLanes|l:l,l,u)}else m!==null?(co(r,m.cachePool),Lp(r,m),bi(),r.memoizedState=null):(t!==null&&co(r,null),Zu(),bi());return Et(t,r,h,l),r.child}function Ya(t,r){return t!==null&&t.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function km(t,r,l,u,h){var m=qu();return m=m===null?null:{parent:rt._currentValue,pool:m},r.memoizedState={baseLanes:l,cachePool:m},t!==null&&co(r,null),Zu(),Rp(r),t!==null&&Dr(t,r,u,!0),r.childLanes=h,null}function ko(t,r){return r=Lo({mode:r.mode,children:r.children},t.mode),r.ref=t.ref,t.child=r,r.return=t,r}function Tm(t,r,l){return Zi(r,t.child,null,l),t=ko(r,r.pendingProps),t.flags|=2,Yt(r),r.memoizedState=null,t}function M_(t,r,l){var u=r.pendingProps,h=(r.flags&128)!==0;if(r.flags&=-129,t===null){if(Ne){if(u.mode==="hidden")return t=ko(r,u),r.lanes=536870912,Ya(null,t);if(Wu(r),(t=Xe)?(t=Bg(t,on),t=t!==null&&t.data==="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:ci!==null?{id:Cn,overflow:wn}:null,retryLane:536870912,hydrationErrors:null},l=fp(t),l.return=r,r.child=l,_t=r,Xe=null)):t=null,t===null)throw di(r);return r.lanes=536870912,null}return ko(r,u)}var m=t.memoizedState;if(m!==null){var _=m.dehydrated;if(Wu(r),h)if(r.flags&256)r.flags&=-257,r=Tm(t,r,l);else if(r.memoizedState!==null)r.child=t.child,r.flags|=128,r=null;else throw Error(a(558));else if(lt||Dr(t,r,l,!1),h=(l&t.childLanes)!==0,lt||h){if(u=$e,u!==null&&(_=bh(u,l),_!==0&&_!==m.retryLane))throw m.retryLane=_,ji(t,_),Pt(u,t,_),vc;Ho(),r=Tm(t,r,l)}else t=m.treeContext,Xe=un(_.nextSibling),_t=r,Ne=!0,fi=null,on=!1,t!==null&&pp(r,t),r=ko(r,u),r.flags|=4096;return r}return t=Bn(t.child,{mode:u.mode,children:u.children}),t.ref=r.ref,r.child=t,t.return=r,t}function To(t,r){var l=r.ref;if(l===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(t===null||t.ref!==l)&&(r.flags|=4194816)}}function _c(t,r,l,u,h){return Fi(r),l=ec(t,r,l,u,void 0,h),u=tc(),t!==null&&!lt?(nc(t,r,h),Fn(t,r,h)):(Ne&&u&&Iu(r),r.flags|=1,Et(t,r,l,h),r.child)}function Lm(t,r,l,u,h,m){return Fi(r),r.updateQueue=null,l=Op(r,u,l,h),Dp(t),u=tc(),t!==null&&!lt?(nc(t,r,m),Fn(t,r,m)):(Ne&&u&&Iu(r),r.flags|=1,Et(t,r,l,m),r.child)}function Rm(t,r,l,u,h){if(Fi(r),r.stateNode===null){var m=kr,_=l.contextType;typeof _=="object"&&_!==null&&(m=St(_)),m=new l(u,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=yc,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=u,m.state=r.memoizedState,m.refs={},Fu(r),_=l.contextType,m.context=typeof _=="object"&&_!==null?St(_):kr,m.state=r.memoizedState,_=l.getDerivedStateFromProps,typeof _=="function"&&(gc(r,l,_,u),m.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(_=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),_!==m.state&&yc.enqueueReplaceState(m,m.state,null),ja(r,u,m,h),Va(),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(t===null){m=r.stateNode;var E=r.memoizedProps,D=Wi(l,E);m.props=D;var P=m.context,F=l.contextType;_=kr,typeof F=="object"&&F!==null&&(_=St(F));var Z=l.getDerivedStateFromProps;F=typeof Z=="function"||typeof m.getSnapshotBeforeUpdate=="function",E=r.pendingProps!==E,F||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(E||P!==_)&&gm(r,m,u,_),pi=!1;var j=r.memoizedState;m.state=j,ja(r,u,m,h),Va(),P=r.memoizedState,E||j!==P||pi?(typeof Z=="function"&&(gc(r,l,Z,u),P=r.memoizedState),(D=pi||mm(r,l,D,u,j,P,_))?(F||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=P),m.props=u,m.state=P,m.context=_,u=D):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{m=r.stateNode,Yu(t,r),_=r.memoizedProps,F=Wi(l,_),m.props=F,Z=r.pendingProps,j=m.context,P=l.contextType,D=kr,typeof P=="object"&&P!==null&&(D=St(P)),E=l.getDerivedStateFromProps,(P=typeof E=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(_!==Z||j!==D)&&gm(r,m,u,D),pi=!1,j=r.memoizedState,m.state=j,ja(r,u,m,h),Va();var q=r.memoizedState;_!==Z||j!==q||pi||t!==null&&t.dependencies!==null&&so(t.dependencies)?(typeof E=="function"&&(gc(r,l,E,u),q=r.memoizedState),(F=pi||mm(r,l,F,u,j,q,D)||t!==null&&t.dependencies!==null&&so(t.dependencies))?(P||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(u,q,D),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(u,q,D)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||_===t.memoizedProps&&j===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===t.memoizedProps&&j===t.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=q),m.props=u,m.state=q,m.context=D,u=F):(typeof m.componentDidUpdate!="function"||_===t.memoizedProps&&j===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===t.memoizedProps&&j===t.memoizedState||(r.flags|=1024),u=!1)}return m=u,To(t,r),u=(r.flags&128)!==0,m||u?(m=r.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:m.render(),r.flags|=1,t!==null&&u?(r.child=Zi(r,t.child,null,h),r.child=Zi(r,null,l,h)):Et(t,r,l,h),r.memoizedState=m.state,t=r.child):t=Fn(t,r,h),t}function Dm(t,r,l,u){return qi(),r.flags|=256,Et(t,r,l,u),r.child}var Sc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ec(t){return{baseLanes:t,cachePool:_p()}}function xc(t,r,l){return t=t!==null?t.childLanes&~l:0,r&&(t|=Qt),t}function Om(t,r,l){var u=r.pendingProps,h=!1,m=(r.flags&128)!==0,_;if((_=m)||(_=t!==null&&t.memoizedState===null?!1:(tt.current&2)!==0),_&&(h=!0,r.flags&=-129),_=(r.flags&32)!==0,r.flags&=-33,t===null){if(Ne){if(h?yi(r):bi(),(t=Xe)?(t=Bg(t,on),t=t!==null&&t.data!=="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:ci!==null?{id:Cn,overflow:wn}:null,retryLane:536870912,hydrationErrors:null},l=fp(t),l.return=r,r.child=l,_t=r,Xe=null)):t=null,t===null)throw di(r);return lf(t)?r.lanes=32:r.lanes=536870912,null}var E=u.children;return u=u.fallback,h?(bi(),h=r.mode,E=Lo({mode:"hidden",children:E},h),u=Gi(u,h,l,null),E.return=r,u.return=r,E.sibling=u,r.child=E,u=r.child,u.memoizedState=Ec(l),u.childLanes=xc(t,_,l),r.memoizedState=Sc,Ya(null,u)):(yi(r),Cc(r,E))}var D=t.memoizedState;if(D!==null&&(E=D.dehydrated,E!==null)){if(m)r.flags&256?(yi(r),r.flags&=-257,r=wc(t,r,l)):r.memoizedState!==null?(bi(),r.child=t.child,r.flags|=128,r=null):(bi(),E=u.fallback,h=r.mode,u=Lo({mode:"visible",children:u.children},h),E=Gi(E,h,l,null),E.flags|=2,u.return=r,E.return=r,u.sibling=E,r.child=u,Zi(r,t.child,null,l),u=r.child,u.memoizedState=Ec(l),u.childLanes=xc(t,_,l),r.memoizedState=Sc,r=Ya(null,u));else if(yi(r),lf(E)){if(_=E.nextSibling&&E.nextSibling.dataset,_)var P=_.dgst;_=P,u=Error(a(419)),u.stack="",u.digest=_,Ia({value:u,source:null,stack:null}),r=wc(t,r,l)}else if(lt||Dr(t,r,l,!1),_=(l&t.childLanes)!==0,lt||_){if(_=$e,_!==null&&(u=bh(_,l),u!==0&&u!==D.retryLane))throw D.retryLane=u,ji(t,u),Pt(_,t,u),vc;af(E)||Ho(),r=wc(t,r,l)}else af(E)?(r.flags|=192,r.child=t.child,r=null):(t=D.treeContext,Xe=un(E.nextSibling),_t=r,Ne=!0,fi=null,on=!1,t!==null&&pp(r,t),r=Cc(r,u.children),r.flags|=4096);return r}return h?(bi(),E=u.fallback,h=r.mode,D=t.child,P=D.sibling,u=Bn(D,{mode:"hidden",children:u.children}),u.subtreeFlags=D.subtreeFlags&65011712,P!==null?E=Bn(P,E):(E=Gi(E,h,l,null),E.flags|=2),E.return=r,u.return=r,u.sibling=E,r.child=u,Ya(null,u),u=r.child,E=t.child.memoizedState,E===null?E=Ec(l):(h=E.cachePool,h!==null?(D=rt._currentValue,h=h.parent!==D?{parent:D,pool:D}:h):h=_p(),E={baseLanes:E.baseLanes|l,cachePool:h}),u.memoizedState=E,u.childLanes=xc(t,_,l),r.memoizedState=Sc,Ya(t.child,u)):(yi(r),l=t.child,t=l.sibling,l=Bn(l,{mode:"visible",children:u.children}),l.return=r,l.sibling=null,t!==null&&(_=r.deletions,_===null?(r.deletions=[t],r.flags|=16):_.push(t)),r.child=l,r.memoizedState=null,l)}function Cc(t,r){return r=Lo({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function Lo(t,r){return t=$t(22,t,null,r),t.lanes=0,t}function wc(t,r,l){return Zi(r,t.child,null,l),t=Cc(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function Nm(t,r,l){t.lanes|=r;var u=t.alternate;u!==null&&(u.lanes|=r),Bu(t.return,r,l)}function Ac(t,r,l,u,h,m){var _=t.memoizedState;_===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:h,treeForkCount:m}:(_.isBackwards=r,_.rendering=null,_.renderingStartTime=0,_.last=u,_.tail=l,_.tailMode=h,_.treeForkCount=m)}function Mm(t,r,l){var u=r.pendingProps,h=u.revealOrder,m=u.tail;u=u.children;var _=tt.current,E=(_&2)!==0;if(E?(_=_&1|2,r.flags|=128):_&=1,w(tt,_),Et(t,r,u,l),u=Ne?Ma:0,!E&&t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Nm(t,l,r);else if(t.tag===19)Nm(t,l,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(h){case"forwards":for(l=r.child,h=null;l!==null;)t=l.alternate,t!==null&&yo(t)===null&&(h=l),l=l.sibling;l=h,l===null?(h=r.child,r.child=null):(h=l.sibling,l.sibling=null),Ac(r,!1,h,l,m,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,h=r.child,r.child=null;h!==null;){if(t=h.alternate,t!==null&&yo(t)===null){r.child=h;break}t=h.sibling,h.sibling=l,l=h,h=t}Ac(r,!0,l,null,m,u);break;case"together":Ac(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function Fn(t,r,l){if(t!==null&&(r.dependencies=t.dependencies),Si|=r.lanes,(l&r.childLanes)===0)if(t!==null){if(Dr(t,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(a(153));if(r.child!==null){for(t=r.child,l=Bn(t,t.pendingProps),r.child=l,l.return=r;t.sibling!==null;)t=t.sibling,l=l.sibling=Bn(t,t.pendingProps),l.return=r;l.sibling=null}return r.child}function kc(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&so(t)))}function I_(t,r,l){switch(r.tag){case 3:we(r,r.stateNode.containerInfo),hi(r,rt,t.memoizedState.cache),qi();break;case 27:case 5:Ze(r);break;case 4:we(r,r.stateNode.containerInfo);break;case 10:hi(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Wu(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(yi(r),r.flags|=128,null):(l&r.child.childLanes)!==0?Om(t,r,l):(yi(r),t=Fn(t,r,l),t!==null?t.sibling:null);yi(r);break;case 19:var h=(t.flags&128)!==0;if(u=(l&r.childLanes)!==0,u||(Dr(t,r,l,!1),u=(l&r.childLanes)!==0),h){if(u)return Mm(t,r,l);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),w(tt,tt.current),u)break;return null;case 22:return r.lanes=0,Am(t,r,l,r.pendingProps);case 24:hi(r,rt,t.memoizedState.cache)}return Fn(t,r,l)}function Im(t,r,l){if(t!==null)if(t.memoizedProps!==r.pendingProps)lt=!0;else{if(!kc(t,l)&&(r.flags&128)===0)return lt=!1,I_(t,r,l);lt=(t.flags&131072)!==0}else lt=!1,Ne&&(r.flags&1048576)!==0&&hp(r,Ma,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(t=Xi(r.elementType),r.type=t,typeof t=="function")Ou(t)?(u=Wi(t,u),r.tag=1,r=Rm(null,r,t,u,l)):(r.tag=0,r=_c(null,r,t,u,l));else{if(t!=null){var h=t.$$typeof;if(h===U){r.tag=11,r=xm(null,r,t,u,l);break e}else if(h===G){r.tag=14,r=Cm(null,r,t,u,l);break e}}throw r=J(t)||t,Error(a(306,r,""))}}return r;case 0:return _c(t,r,r.type,r.pendingProps,l);case 1:return u=r.type,h=Wi(u,r.pendingProps),Rm(t,r,u,h,l);case 3:e:{if(we(r,r.stateNode.containerInfo),t===null)throw Error(a(387));u=r.pendingProps;var m=r.memoizedState;h=m.element,Yu(t,r),ja(r,u,null,l);var _=r.memoizedState;if(u=_.cache,hi(r,rt,u),u!==m.cache&&Vu(r,[rt],l,!0),Va(),u=_.element,m.isDehydrated)if(m={element:u,isDehydrated:!1,cache:_.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=Dm(t,r,u,l);break e}else if(u!==h){h=rn(Error(a(424)),r),Ia(h),r=Dm(t,r,u,l);break e}else for(t=r.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,Xe=un(t.firstChild),_t=r,Ne=!0,fi=null,on=!0,l=Ap(r,null,u,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(qi(),u===h){r=Fn(t,r,l);break e}Et(t,r,u,l)}r=r.child}return r;case 26:return To(t,r),t===null?(l=Fg(r.type,null,r.pendingProps,null))?r.memoizedState=l:Ne||(l=r.type,t=r.pendingProps,u=$o(se.current).createElement(l),u[vt]=r,u[Nt]=t,xt(u,l,t),mt(u),r.stateNode=u):r.memoizedState=Fg(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return Ze(r),t===null&&Ne&&(u=r.stateNode=Gg(r.type,r.pendingProps,se.current),_t=r,on=!0,h=Xe,Ai(r.type)?(of=h,Xe=un(u.firstChild)):Xe=h),Et(t,r,r.pendingProps.children,l),To(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&Ne&&((h=u=Xe)&&(u=fS(u,r.type,r.pendingProps,on),u!==null?(r.stateNode=u,_t=r,Xe=un(u.firstChild),on=!1,h=!0):h=!1),h||di(r)),Ze(r),h=r.type,m=r.pendingProps,_=t!==null?t.memoizedProps:null,u=m.children,tf(h,m)?u=null:_!==null&&tf(h,_)&&(r.flags|=32),r.memoizedState!==null&&(h=ec(t,r,A_,null,null,l),sl._currentValue=h),To(t,r),Et(t,r,u,l),r.child;case 6:return t===null&&Ne&&((t=l=Xe)&&(l=dS(l,r.pendingProps,on),l!==null?(r.stateNode=l,_t=r,Xe=null,t=!0):t=!1),t||di(r)),null;case 13:return Om(t,r,l);case 4:return we(r,r.stateNode.containerInfo),u=r.pendingProps,t===null?r.child=Zi(r,null,u,l):Et(t,r,u,l),r.child;case 11:return xm(t,r,r.type,r.pendingProps,l);case 7:return Et(t,r,r.pendingProps,l),r.child;case 8:return Et(t,r,r.pendingProps.children,l),r.child;case 12:return Et(t,r,r.pendingProps.children,l),r.child;case 10:return u=r.pendingProps,hi(r,r.type,u.value),Et(t,r,u.children,l),r.child;case 9:return h=r.type._context,u=r.pendingProps.children,Fi(r),h=St(h),u=u(h),r.flags|=1,Et(t,r,u,l),r.child;case 14:return Cm(t,r,r.type,r.pendingProps,l);case 15:return wm(t,r,r.type,r.pendingProps,l);case 19:return Mm(t,r,l);case 31:return M_(t,r,l);case 22:return Am(t,r,l,r.pendingProps);case 24:return Fi(r),u=St(rt),t===null?(h=qu(),h===null&&(h=$e,m=ju(),h.pooledCache=m,m.refCount++,m!==null&&(h.pooledCacheLanes|=l),h=m),r.memoizedState={parent:u,cache:h},Fu(r),hi(r,rt,h)):((t.lanes&l)!==0&&(Yu(t,r),ja(r,null,null,l),Va()),h=t.memoizedState,m=r.memoizedState,h.parent!==u?(h={parent:u,cache:u},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),hi(r,rt,u)):(u=m.cache,hi(r,rt,u),u!==h.cache&&Vu(r,[rt],l,!0))),Et(t,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function Yn(t){t.flags|=4}function Tc(t,r,l,u,h){if((r=(t.mode&32)!==0)&&(r=!1),r){if(t.flags|=16777216,(h&335544128)===h)if(t.stateNode.complete)t.flags|=8192;else if(sg())t.flags|=8192;else throw Qi=ho,$u}else t.flags&=-16777217}function zm(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Kg(r))if(sg())t.flags|=8192;else throw Qi=ho,$u}function Ro(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?mh():536870912,t.lanes|=r,Gr|=r)}function Xa(t,r){if(!Ne)switch(t.tailMode){case"hidden":r=t.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function Qe(t){var r=t.alternate!==null&&t.alternate.child===t.child,l=0,u=0;if(r)for(var h=t.child;h!==null;)l|=h.lanes|h.childLanes,u|=h.subtreeFlags&65011712,u|=h.flags&65011712,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)l|=h.lanes|h.childLanes,u|=h.subtreeFlags,u|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=u,t.childLanes=l,r}function z_(t,r,l){var u=r.pendingProps;switch(zu(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qe(r),null;case 1:return Qe(r),null;case 3:return l=r.stateNode,u=null,t!==null&&(u=t.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),Gn(rt),Ae(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(Rr(r)?Yn(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Hu())),Qe(r),null;case 26:var h=r.type,m=r.memoizedState;return t===null?(Yn(r),m!==null?(Qe(r),zm(r,m)):(Qe(r),Tc(r,h,null,u,l))):m?m!==t.memoizedState?(Yn(r),Qe(r),zm(r,m)):(Qe(r),r.flags&=-16777217):(t=t.memoizedProps,t!==u&&Yn(r),Qe(r),Tc(r,h,t,u,l)),null;case 27:if(We(r),l=se.current,h=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==u&&Yn(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return Qe(r),null}t=le.current,Rr(r)?mp(r):(t=Gg(h,u,l),r.stateNode=t,Yn(r))}return Qe(r),null;case 5:if(We(r),h=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==u&&Yn(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return Qe(r),null}if(m=le.current,Rr(r))mp(r);else{var _=$o(se.current);switch(m){case 1:m=_.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:m=_.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":m=_.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":m=_.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":m=_.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof u.is=="string"?_.createElement("select",{is:u.is}):_.createElement("select"),u.multiple?m.multiple=!0:u.size&&(m.size=u.size);break;default:m=typeof u.is=="string"?_.createElement(h,{is:u.is}):_.createElement(h)}}m[vt]=r,m[Nt]=u;e:for(_=r.child;_!==null;){if(_.tag===5||_.tag===6)m.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===r)break e;for(;_.sibling===null;){if(_.return===null||_.return===r)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}r.stateNode=m;e:switch(xt(m,h,u),h){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Yn(r)}}return Qe(r),Tc(r,r.type,t===null?null:t.memoizedProps,r.pendingProps,l),null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==u&&Yn(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(t=se.current,Rr(r)){if(t=r.stateNode,l=r.memoizedProps,u=null,h=_t,h!==null)switch(h.tag){case 27:case 5:u=h.memoizedProps}t[vt]=r,t=!!(t.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||Og(t.nodeValue,l)),t||di(r,!0)}else t=$o(t).createTextNode(u),t[vt]=r,r.stateNode=t}return Qe(r),null;case 31:if(l=r.memoizedState,t===null||t.memoizedState!==null){if(u=Rr(r),l!==null){if(t===null){if(!u)throw Error(a(318));if(t=r.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(557));t[vt]=r}else qi(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Qe(r),t=!1}else l=Hu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return r.flags&256?(Yt(r),r):(Yt(r),null);if((r.flags&128)!==0)throw Error(a(558))}return Qe(r),null;case 13:if(u=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=Rr(r),u!==null&&u.dehydrated!==null){if(t===null){if(!h)throw Error(a(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(a(317));h[vt]=r}else qi(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Qe(r),h=!1}else h=Hu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(Yt(r),r):(Yt(r),null)}return Yt(r),(r.flags&128)!==0?(r.lanes=l,r):(l=u!==null,t=t!==null&&t.memoizedState!==null,l&&(u=r.child,h=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(h=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==h&&(u.flags|=2048)),l!==t&&l&&(r.child.flags|=8192),Ro(r,r.updateQueue),Qe(r),null);case 4:return Ae(),t===null&&Zc(r.stateNode.containerInfo),Qe(r),null;case 10:return Gn(r.type),Qe(r),null;case 19:if(V(tt),u=r.memoizedState,u===null)return Qe(r),null;if(h=(r.flags&128)!==0,m=u.rendering,m===null)if(h)Xa(u,!1);else{if(et!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(m=yo(t),m!==null){for(r.flags|=128,Xa(u,!1),t=m.updateQueue,r.updateQueue=t,Ro(r,t),r.subtreeFlags=0,t=l,l=r.child;l!==null;)cp(l,t),l=l.sibling;return w(tt,tt.current&1|2),Ne&&Vn(r,u.treeForkCount),r.child}t=t.sibling}u.tail!==null&&Lt()>Io&&(r.flags|=128,h=!0,Xa(u,!1),r.lanes=4194304)}else{if(!h)if(t=yo(m),t!==null){if(r.flags|=128,h=!0,t=t.updateQueue,r.updateQueue=t,Ro(r,t),Xa(u,!0),u.tail===null&&u.tailMode==="hidden"&&!m.alternate&&!Ne)return Qe(r),null}else 2*Lt()-u.renderingStartTime>Io&&l!==536870912&&(r.flags|=128,h=!0,Xa(u,!1),r.lanes=4194304);u.isBackwards?(m.sibling=r.child,r.child=m):(t=u.last,t!==null?t.sibling=m:r.child=m,u.last=m)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Lt(),t.sibling=null,l=tt.current,w(tt,h?l&1|2:l&1),Ne&&Vn(r,u.treeForkCount),t):(Qe(r),null);case 22:case 23:return Yt(r),Ku(),u=r.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(l&536870912)!==0&&(r.flags&128)===0&&(Qe(r),r.subtreeFlags&6&&(r.flags|=8192)):Qe(r),l=r.updateQueue,l!==null&&Ro(r,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==l&&(r.flags|=2048),t!==null&&V(Yi),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),Gn(rt),Qe(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function U_(t,r){switch(zu(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Gn(rt),Ae(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return We(r),null;case 31:if(r.memoizedState!==null){if(Yt(r),r.alternate===null)throw Error(a(340));qi()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 13:if(Yt(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(a(340));qi()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return V(tt),null;case 4:return Ae(),null;case 10:return Gn(r.type),null;case 22:case 23:return Yt(r),Ku(),t!==null&&V(Yi),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return Gn(rt),null;case 25:return null;default:return null}}function Um(t,r){switch(zu(r),r.tag){case 3:Gn(rt),Ae();break;case 26:case 27:case 5:We(r);break;case 4:Ae();break;case 31:r.memoizedState!==null&&Yt(r);break;case 13:Yt(r);break;case 19:V(tt);break;case 10:Gn(r.type);break;case 22:case 23:Yt(r),Ku(),t!==null&&V(Yi);break;case 24:Gn(rt)}}function Qa(t,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var h=u.next;l=h;do{if((l.tag&t)===t){u=void 0;var m=l.create,_=l.inst;u=m(),_.destroy=u}l=l.next}while(l!==h)}}catch(E){Be(r,r.return,E)}}function vi(t,r,l){try{var u=r.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var m=h.next;u=m;do{if((u.tag&t)===t){var _=u.inst,E=_.destroy;if(E!==void 0){_.destroy=void 0,h=r;var D=l,P=E;try{P()}catch(F){Be(h,D,F)}}}u=u.next}while(u!==m)}}catch(F){Be(r,r.return,F)}}function Hm(t){var r=t.updateQueue;if(r!==null){var l=t.stateNode;try{Tp(r,l)}catch(u){Be(t,t.return,u)}}}function Pm(t,r,l){l.props=Wi(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(u){Be(t,r,u)}}function Za(t,r){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof l=="function"?t.refCleanup=l(u):l.current=u}}catch(h){Be(t,r,h)}}function An(t,r){var l=t.ref,u=t.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(h){Be(t,r,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(h){Be(t,r,h)}else l.current=null}function Bm(t){var r=t.type,l=t.memoizedProps,u=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(h){Be(t,t.return,h)}}function Lc(t,r,l){try{var u=t.stateNode;aS(u,t.type,l,r),u[Nt]=r}catch(h){Be(t,t.return,h)}}function Vm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ai(t.type)||t.tag===4}function Rc(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Vm(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ai(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Dc(t,r,l){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(t),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=Hn));else if(u!==4&&(u===27&&Ai(t.type)&&(l=t.stateNode,r=null),t=t.child,t!==null))for(Dc(t,r,l),t=t.sibling;t!==null;)Dc(t,r,l),t=t.sibling}function Do(t,r,l){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?l.insertBefore(t,r):l.appendChild(t);else if(u!==4&&(u===27&&Ai(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(Do(t,r,l),t=t.sibling;t!==null;)Do(t,r,l),t=t.sibling}function jm(t){var r=t.stateNode,l=t.memoizedProps;try{for(var u=t.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);xt(r,u,l),r[vt]=t,r[Nt]=l}catch(m){Be(t,t.return,m)}}var Xn=!1,ot=!1,Oc=!1,Gm=typeof WeakSet=="function"?WeakSet:Set,gt=null;function H_(t,r){if(t=t.containerInfo,Jc=Wo,t=tp(t),wu(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else e:{l=(l=t.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var h=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{l.nodeType,m.nodeType}catch{l=null;break e}var _=0,E=-1,D=-1,P=0,F=0,Z=t,j=null;t:for(;;){for(var q;Z!==l||h!==0&&Z.nodeType!==3||(E=_+h),Z!==m||u!==0&&Z.nodeType!==3||(D=_+u),Z.nodeType===3&&(_+=Z.nodeValue.length),(q=Z.firstChild)!==null;)j=Z,Z=q;for(;;){if(Z===t)break t;if(j===l&&++P===h&&(E=_),j===m&&++F===u&&(D=_),(q=Z.nextSibling)!==null)break;Z=j,j=Z.parentNode}Z=q}l=E===-1||D===-1?null:{start:E,end:D}}else l=null}l=l||{start:0,end:0}}else l=null;for(ef={focusedElem:t,selectionRange:l},Wo=!1,gt=r;gt!==null;)if(r=gt,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,gt=t;else for(;gt!==null;){switch(r=gt,m=r.alternate,t=r.flags,r.tag){case 0:if((t&4)!==0&&(t=r.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l<t.length;l++)h=t[l],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&m!==null){t=void 0,l=r,h=m.memoizedProps,m=m.memoizedState,u=l.stateNode;try{var ce=Wi(l.type,h);t=u.getSnapshotBeforeUpdate(ce,m),u.__reactInternalSnapshotBeforeUpdate=t}catch(ge){Be(l,l.return,ge)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,l=t.nodeType,l===9)rf(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":rf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(a(163))}if(t=r.sibling,t!==null){t.return=r.return,gt=t;break}gt=r.return}}function qm(t,r,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:Zn(t,l),u&4&&Qa(5,l);break;case 1:if(Zn(t,l),u&4)if(t=l.stateNode,r===null)try{t.componentDidMount()}catch(_){Be(l,l.return,_)}else{var h=Wi(l.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(h,r,t.__reactInternalSnapshotBeforeUpdate)}catch(_){Be(l,l.return,_)}}u&64&&Hm(l),u&512&&Za(l,l.return);break;case 3:if(Zn(t,l),u&64&&(t=l.updateQueue,t!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{Tp(t,r)}catch(_){Be(l,l.return,_)}}break;case 27:r===null&&u&4&&jm(l);case 26:case 5:Zn(t,l),r===null&&u&4&&Bm(l),u&512&&Za(l,l.return);break;case 12:Zn(t,l);break;case 31:Zn(t,l),u&4&&Ym(t,l);break;case 13:Zn(t,l),u&4&&Xm(t,l),u&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=Y_.bind(null,l),hS(t,l))));break;case 22:if(u=l.memoizedState!==null||Xn,!u){r=r!==null&&r.memoizedState!==null||ot,h=Xn;var m=ot;Xn=u,(ot=r)&&!m?Kn(t,l,(l.subtreeFlags&8772)!==0):Zn(t,l),Xn=h,ot=m}break;case 30:break;default:Zn(t,l)}}function $m(t){var r=t.alternate;r!==null&&(t.alternate=null,$m(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&su(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Ke=null,It=!1;function Qn(t,r,l){for(l=l.child;l!==null;)Fm(t,r,l),l=l.sibling}function Fm(t,r,l){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount(Rt,l)}catch{}switch(l.tag){case 26:ot||An(l,r),Qn(t,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:ot||An(l,r);var u=Ke,h=It;Ai(l.type)&&(Ke=l.stateNode,It=!1),Qn(t,r,l),al(l.stateNode),Ke=u,It=h;break;case 5:ot||An(l,r);case 6:if(u=Ke,h=It,Ke=null,Qn(t,r,l),Ke=u,It=h,Ke!==null)if(It)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(l.stateNode)}catch(m){Be(l,r,m)}else try{Ke.removeChild(l.stateNode)}catch(m){Be(l,r,m)}break;case 18:Ke!==null&&(It?(t=Ke,Hg(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Kr(t)):Hg(Ke,l.stateNode));break;case 4:u=Ke,h=It,Ke=l.stateNode.containerInfo,It=!0,Qn(t,r,l),Ke=u,It=h;break;case 0:case 11:case 14:case 15:vi(2,l,r),ot||vi(4,l,r),Qn(t,r,l);break;case 1:ot||(An(l,r),u=l.stateNode,typeof u.componentWillUnmount=="function"&&Pm(l,r,u)),Qn(t,r,l);break;case 21:Qn(t,r,l);break;case 22:ot=(u=ot)||l.memoizedState!==null,Qn(t,r,l),ot=u;break;default:Qn(t,r,l)}}function Ym(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Kr(t)}catch(l){Be(r,r.return,l)}}}function Xm(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Kr(t)}catch(l){Be(r,r.return,l)}}function P_(t){switch(t.tag){case 31:case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new Gm),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new Gm),r;default:throw Error(a(435,t.tag))}}function Oo(t,r){var l=P_(t);r.forEach(function(u){if(!l.has(u)){l.add(u);var h=X_.bind(null,t,u);u.then(h,h)}})}function zt(t,r){var l=r.deletions;if(l!==null)for(var u=0;u<l.length;u++){var h=l[u],m=t,_=r,E=_;e:for(;E!==null;){switch(E.tag){case 27:if(Ai(E.type)){Ke=E.stateNode,It=!1;break e}break;case 5:Ke=E.stateNode,It=!1;break e;case 3:case 4:Ke=E.stateNode.containerInfo,It=!0;break e}E=E.return}if(Ke===null)throw Error(a(160));Fm(m,_,h),Ke=null,It=!1,m=h.alternate,m!==null&&(m.return=null),h.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Qm(r,t),r=r.sibling}var bn=null;function Qm(t,r){var l=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:zt(r,t),Ut(t),u&4&&(vi(3,t,t.return),Qa(3,t),vi(5,t,t.return));break;case 1:zt(r,t),Ut(t),u&512&&(ot||l===null||An(l,l.return)),u&64&&Xn&&(t=t.updateQueue,t!==null&&(u=t.callbacks,u!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var h=bn;if(zt(r,t),Ut(t),u&512&&(ot||l===null||An(l,l.return)),u&4){var m=l!==null?l.memoizedState:null;if(u=t.memoizedState,l===null)if(u===null)if(t.stateNode===null){e:{u=t.type,l=t.memoizedProps,h=h.ownerDocument||h;t:switch(u){case"title":m=h.getElementsByTagName("title")[0],(!m||m[xa]||m[vt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=h.createElement(u),h.head.insertBefore(m,h.querySelector("head > title"))),xt(m,u,l),m[vt]=t,mt(m),u=m;break e;case"link":var _=Qg("link","href",h).get(u+(l.href||""));if(_){for(var E=0;E<_.length;E++)if(m=_[E],m.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&m.getAttribute("rel")===(l.rel==null?null:l.rel)&&m.getAttribute("title")===(l.title==null?null:l.title)&&m.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){_.splice(E,1);break t}}m=h.createElement(u),xt(m,u,l),h.head.appendChild(m);break;case"meta":if(_=Qg("meta","content",h).get(u+(l.content||""))){for(E=0;E<_.length;E++)if(m=_[E],m.getAttribute("content")===(l.content==null?null:""+l.content)&&m.getAttribute("name")===(l.name==null?null:l.name)&&m.getAttribute("property")===(l.property==null?null:l.property)&&m.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&m.getAttribute("charset")===(l.charSet==null?null:l.charSet)){_.splice(E,1);break t}}m=h.createElement(u),xt(m,u,l),h.head.appendChild(m);break;default:throw Error(a(468,u))}m[vt]=t,mt(m),u=m}t.stateNode=u}else Zg(h,t.type,t.stateNode);else t.stateNode=Xg(h,u,t.memoizedProps);else m!==u?(m===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):m.count--,u===null?Zg(h,t.type,t.stateNode):Xg(h,u,t.memoizedProps)):u===null&&t.stateNode!==null&&Lc(t,t.memoizedProps,l.memoizedProps)}break;case 27:zt(r,t),Ut(t),u&512&&(ot||l===null||An(l,l.return)),l!==null&&u&4&&Lc(t,t.memoizedProps,l.memoizedProps);break;case 5:if(zt(r,t),Ut(t),u&512&&(ot||l===null||An(l,l.return)),t.flags&32){h=t.stateNode;try{_r(h,"")}catch(ce){Be(t,t.return,ce)}}u&4&&t.stateNode!=null&&(h=t.memoizedProps,Lc(t,h,l!==null?l.memoizedProps:h)),u&1024&&(Oc=!0);break;case 6:if(zt(r,t),Ut(t),u&4){if(t.stateNode===null)throw Error(a(162));u=t.memoizedProps,l=t.stateNode;try{l.nodeValue=u}catch(ce){Be(t,t.return,ce)}}break;case 3:if(Xo=null,h=bn,bn=Fo(r.containerInfo),zt(r,t),bn=h,Ut(t),u&4&&l!==null&&l.memoizedState.isDehydrated)try{Kr(r.containerInfo)}catch(ce){Be(t,t.return,ce)}Oc&&(Oc=!1,Zm(t));break;case 4:u=bn,bn=Fo(t.stateNode.containerInfo),zt(r,t),Ut(t),bn=u;break;case 12:zt(r,t),Ut(t);break;case 31:zt(r,t),Ut(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Oo(t,u)));break;case 13:zt(r,t),Ut(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Mo=Lt()),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Oo(t,u)));break;case 22:h=t.memoizedState!==null;var D=l!==null&&l.memoizedState!==null,P=Xn,F=ot;if(Xn=P||h,ot=F||D,zt(r,t),ot=F,Xn=P,Ut(t),u&8192)e:for(r=t.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(l===null||D||Xn||ot||Ji(t)),l=null,r=t;;){if(r.tag===5||r.tag===26){if(l===null){D=l=r;try{if(m=D.stateNode,h)_=m.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{E=D.stateNode;var Z=D.memoizedProps.style,j=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;E.style.display=j==null||typeof j=="boolean"?"":(""+j).trim()}}catch(ce){Be(D,D.return,ce)}}}else if(r.tag===6){if(l===null){D=r;try{D.stateNode.nodeValue=h?"":D.memoizedProps}catch(ce){Be(D,D.return,ce)}}}else if(r.tag===18){if(l===null){D=r;try{var q=D.stateNode;h?Pg(q,!0):Pg(D.stateNode,!1)}catch(ce){Be(D,D.return,ce)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=t.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,Oo(t,l))));break;case 19:zt(r,t),Ut(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Oo(t,u)));break;case 30:break;case 21:break;default:zt(r,t),Ut(t)}}function Ut(t){var r=t.flags;if(r&2){try{for(var l,u=t.return;u!==null;){if(Vm(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var h=l.stateNode,m=Rc(t);Do(t,m,h);break;case 5:var _=l.stateNode;l.flags&32&&(_r(_,""),l.flags&=-33);var E=Rc(t);Do(t,E,_);break;case 3:case 4:var D=l.stateNode.containerInfo,P=Rc(t);Dc(t,P,D);break;default:throw Error(a(161))}}catch(F){Be(t,t.return,F)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function Zm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;Zm(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function Zn(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)qm(t,r.alternate,r),r=r.sibling}function Ji(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:vi(4,r,r.return),Ji(r);break;case 1:An(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&Pm(r,r.return,l),Ji(r);break;case 27:al(r.stateNode);case 26:case 5:An(r,r.return),Ji(r);break;case 22:r.memoizedState===null&&Ji(r);break;case 30:Ji(r);break;default:Ji(r)}t=t.sibling}}function Kn(t,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,h=t,m=r,_=m.flags;switch(m.tag){case 0:case 11:case 15:Kn(h,m,l),Qa(4,m);break;case 1:if(Kn(h,m,l),u=m,h=u.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(P){Be(u,u.return,P)}if(u=m,h=u.updateQueue,h!==null){var E=u.stateNode;try{var D=h.shared.hiddenCallbacks;if(D!==null)for(h.shared.hiddenCallbacks=null,h=0;h<D.length;h++)kp(D[h],E)}catch(P){Be(u,u.return,P)}}l&&_&64&&Hm(m),Za(m,m.return);break;case 27:jm(m);case 26:case 5:Kn(h,m,l),l&&u===null&&_&4&&Bm(m),Za(m,m.return);break;case 12:Kn(h,m,l);break;case 31:Kn(h,m,l),l&&_&4&&Ym(h,m);break;case 13:Kn(h,m,l),l&&_&4&&Xm(h,m);break;case 22:m.memoizedState===null&&Kn(h,m,l),Za(m,m.return);break;case 30:break;default:Kn(h,m,l)}r=r.sibling}}function Nc(t,r){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&za(l))}function Mc(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&za(t))}function vn(t,r,l,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Km(t,r,l,u),r=r.sibling}function Km(t,r,l,u){var h=r.flags;switch(r.tag){case 0:case 11:case 15:vn(t,r,l,u),h&2048&&Qa(9,r);break;case 1:vn(t,r,l,u);break;case 3:vn(t,r,l,u),h&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&za(t)));break;case 12:if(h&2048){vn(t,r,l,u),t=r.stateNode;try{var m=r.memoizedProps,_=m.id,E=m.onPostCommit;typeof E=="function"&&E(_,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(D){Be(r,r.return,D)}}else vn(t,r,l,u);break;case 31:vn(t,r,l,u);break;case 13:vn(t,r,l,u);break;case 23:break;case 22:m=r.stateNode,_=r.alternate,r.memoizedState!==null?m._visibility&2?vn(t,r,l,u):Ka(t,r):m._visibility&2?vn(t,r,l,u):(m._visibility|=2,Br(t,r,l,u,(r.subtreeFlags&10256)!==0||!1)),h&2048&&Nc(_,r);break;case 24:vn(t,r,l,u),h&2048&&Mc(r.alternate,r);break;default:vn(t,r,l,u)}}function Br(t,r,l,u,h){for(h=h&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=t,_=r,E=l,D=u,P=_.flags;switch(_.tag){case 0:case 11:case 15:Br(m,_,E,D,h),Qa(8,_);break;case 23:break;case 22:var F=_.stateNode;_.memoizedState!==null?F._visibility&2?Br(m,_,E,D,h):Ka(m,_):(F._visibility|=2,Br(m,_,E,D,h)),h&&P&2048&&Nc(_.alternate,_);break;case 24:Br(m,_,E,D,h),h&&P&2048&&Mc(_.alternate,_);break;default:Br(m,_,E,D,h)}r=r.sibling}}function Ka(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=t,u=r,h=u.flags;switch(u.tag){case 22:Ka(l,u),h&2048&&Nc(u.alternate,u);break;case 24:Ka(l,u),h&2048&&Mc(u.alternate,u);break;default:Ka(l,u)}r=r.sibling}}var Wa=8192;function Vr(t,r,l){if(t.subtreeFlags&Wa)for(t=t.child;t!==null;)Wm(t,r,l),t=t.sibling}function Wm(t,r,l){switch(t.tag){case 26:Vr(t,r,l),t.flags&Wa&&t.memoizedState!==null&&wS(l,bn,t.memoizedState,t.memoizedProps);break;case 5:Vr(t,r,l);break;case 3:case 4:var u=bn;bn=Fo(t.stateNode.containerInfo),Vr(t,r,l),bn=u;break;case 22:t.memoizedState===null&&(u=t.alternate,u!==null&&u.memoizedState!==null?(u=Wa,Wa=16777216,Vr(t,r,l),Wa=u):Vr(t,r,l));break;default:Vr(t,r,l)}}function Jm(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function Ja(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];gt=u,tg(u,t)}Jm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)eg(t),t=t.sibling}function eg(t){switch(t.tag){case 0:case 11:case 15:Ja(t),t.flags&2048&&vi(9,t,t.return);break;case 3:Ja(t);break;case 12:Ja(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,No(t)):Ja(t);break;default:Ja(t)}}function No(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];gt=u,tg(u,t)}Jm(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:vi(8,r,r.return),No(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,No(r));break;default:No(r)}t=t.sibling}}function tg(t,r){for(;gt!==null;){var l=gt;switch(l.tag){case 0:case 11:case 15:vi(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:za(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,gt=u;else e:for(l=t;gt!==null;){u=gt;var h=u.sibling,m=u.return;if($m(u),u===l){gt=null;break e}if(h!==null){h.return=m,gt=h;break e}gt=m}}}var B_={getCacheForType:function(t){var r=St(rt),l=r.data.get(t);return l===void 0&&(l=t(),r.data.set(t,l)),l},cacheSignal:function(){return St(rt).controller.signal}},V_=typeof WeakMap=="function"?WeakMap:Map,ze=0,$e=null,Le=null,De=0,Pe=0,Xt=null,_i=!1,jr=!1,Ic=!1,Wn=0,et=0,Si=0,er=0,zc=0,Qt=0,Gr=0,el=null,Ht=null,Uc=!1,Mo=0,ng=0,Io=1/0,zo=null,Ei=null,ft=0,xi=null,qr=null,Jn=0,Hc=0,Pc=null,ig=null,tl=0,Bc=null;function Zt(){return(ze&2)!==0&&De!==0?De&-De:z.T!==null?Fc():vh()}function rg(){if(Qt===0)if((De&536870912)===0||Ne){var t=Gl;Gl<<=1,(Gl&3932160)===0&&(Gl=262144),Qt=t}else Qt=536870912;return t=Ft.current,t!==null&&(t.flags|=32),Qt}function Pt(t,r,l){(t===$e&&(Pe===2||Pe===9)||t.cancelPendingCommit!==null)&&($r(t,0),Ci(t,De,Qt,!1)),Ea(t,l),((ze&2)===0||t!==$e)&&(t===$e&&((ze&2)===0&&(er|=l),et===4&&Ci(t,De,Qt,!1)),kn(t))}function ag(t,r,l){if((ze&6)!==0)throw Error(a(327));var u=!l&&(r&127)===0&&(r&t.expiredLanes)===0||Sa(t,r),h=u?q_(t,r):jc(t,r,!0),m=u;do{if(h===0){jr&&!u&&Ci(t,r,0,!1);break}else{if(l=t.current.alternate,m&&!j_(l)){h=jc(t,r,!1),m=!1;continue}if(h===2){if(m=r,t.errorRecoveryDisabledLanes&m)var _=0;else _=t.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){r=_;e:{var E=t;h=el;var D=E.current.memoizedState.isDehydrated;if(D&&($r(E,_).flags|=256),_=jc(E,_,!1),_!==2){if(Ic&&!D){E.errorRecoveryDisabledLanes|=m,er|=m,h=4;break e}m=Ht,Ht=h,m!==null&&(Ht===null?Ht=m:Ht.push.apply(Ht,m))}h=_}if(m=!1,h!==2)continue}}if(h===1){$r(t,0),Ci(t,r,0,!0);break}e:{switch(u=t,m=h,m){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Ci(u,r,Qt,!_i);break e;case 2:Ht=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(h=Mo+300-Lt(),10<h)){if(Ci(u,r,Qt,!_i),$l(u,0,!0)!==0)break e;Jn=r,u.timeoutHandle=zg(lg.bind(null,u,l,Ht,zo,Uc,r,Qt,er,Gr,_i,m,"Throttled",-0,0),h);break e}lg(u,l,Ht,zo,Uc,r,Qt,er,Gr,_i,m,null,-0,0)}}break}while(!0);kn(t)}function lg(t,r,l,u,h,m,_,E,D,P,F,Z,j,q){if(t.timeoutHandle=-1,Z=r.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Hn},Wm(r,m,Z);var ce=(m&62914560)===m?Mo-Lt():(m&4194048)===m?ng-Lt():0;if(ce=AS(Z,ce),ce!==null){Jn=m,t.cancelPendingCommit=ce(pg.bind(null,t,r,m,l,u,h,_,E,D,F,Z,null,j,q)),Ci(t,m,_,!P);return}}pg(t,r,m,l,u,h,_,E,D)}function j_(t){for(var r=t;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var h=l[u],m=h.getSnapshot;h=h.value;try{if(!qt(m(),h))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Ci(t,r,l,u){r&=~zc,r&=~er,t.suspendedLanes|=r,t.pingedLanes&=~r,u&&(t.warmLanes|=r),u=t.expirationTimes;for(var h=r;0<h;){var m=31-qe(h),_=1<<m;u[m]=-1,h&=~_}l!==0&&gh(t,l,r)}function Uo(){return(ze&6)===0?(nl(0),!1):!0}function Vc(){if(Le!==null){if(Pe===0)var t=Le.return;else t=Le,jn=$i=null,ic(t),Ir=null,Ha=0,t=Le;for(;t!==null;)Um(t.alternate,t),t=t.return;Le=null}}function $r(t,r){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,sS(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),Jn=0,Vc(),$e=t,Le=l=Bn(t.current,null),De=r,Pe=0,Xt=null,_i=!1,jr=Sa(t,r),Ic=!1,Gr=Qt=zc=er=Si=et=0,Ht=el=null,Uc=!1,(r&8)!==0&&(r|=r&32);var u=t.entangledLanes;if(u!==0)for(t=t.entanglements,u&=r;0<u;){var h=31-qe(u),m=1<<h;r|=t[h],u&=~m}return Wn=r,io(),l}function og(t,r){Ee=null,z.H=Fa,r===Mr||r===fo?(r=xp(),Pe=3):r===$u?(r=xp(),Pe=4):Pe=r===vc?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Xt=r,Le===null&&(et=1,Ao(t,rn(r,t.current)))}function sg(){var t=Ft.current;return t===null?!0:(De&4194048)===De?sn===null:(De&62914560)===De||(De&536870912)!==0?t===sn:!1}function ug(){var t=z.H;return z.H=Fa,t===null?Fa:t}function cg(){var t=z.A;return z.A=B_,t}function Ho(){et=4,_i||(De&4194048)!==De&&Ft.current!==null||(jr=!0),(Si&134217727)===0&&(er&134217727)===0||$e===null||Ci($e,De,Qt,!1)}function jc(t,r,l){var u=ze;ze|=2;var h=ug(),m=cg();($e!==t||De!==r)&&(zo=null,$r(t,r)),r=!1;var _=et;e:do try{if(Pe!==0&&Le!==null){var E=Le,D=Xt;switch(Pe){case 8:Vc(),_=6;break e;case 3:case 2:case 9:case 6:Ft.current===null&&(r=!0);var P=Pe;if(Pe=0,Xt=null,Fr(t,E,D,P),l&&jr){_=0;break e}break;default:P=Pe,Pe=0,Xt=null,Fr(t,E,D,P)}}G_(),_=et;break}catch(F){og(t,F)}while(!0);return r&&t.shellSuspendCounter++,jn=$i=null,ze=u,z.H=h,z.A=m,Le===null&&($e=null,De=0,io()),_}function G_(){for(;Le!==null;)fg(Le)}function q_(t,r){var l=ze;ze|=2;var u=ug(),h=cg();$e!==t||De!==r?(zo=null,Io=Lt()+500,$r(t,r)):jr=Sa(t,r);e:do try{if(Pe!==0&&Le!==null){r=Le;var m=Xt;t:switch(Pe){case 1:Pe=0,Xt=null,Fr(t,r,m,1);break;case 2:case 9:if(Sp(m)){Pe=0,Xt=null,dg(r);break}r=function(){Pe!==2&&Pe!==9||$e!==t||(Pe=7),kn(t)},m.then(r,r);break e;case 3:Pe=7;break e;case 4:Pe=5;break e;case 7:Sp(m)?(Pe=0,Xt=null,dg(r)):(Pe=0,Xt=null,Fr(t,r,m,7));break;case 5:var _=null;switch(Le.tag){case 26:_=Le.memoizedState;case 5:case 27:var E=Le;if(_?Kg(_):E.stateNode.complete){Pe=0,Xt=null;var D=E.sibling;if(D!==null)Le=D;else{var P=E.return;P!==null?(Le=P,Po(P)):Le=null}break t}}Pe=0,Xt=null,Fr(t,r,m,5);break;case 6:Pe=0,Xt=null,Fr(t,r,m,6);break;case 8:Vc(),et=6;break e;default:throw Error(a(462))}}$_();break}catch(F){og(t,F)}while(!0);return jn=$i=null,z.H=u,z.A=h,ze=l,Le!==null?0:($e=null,De=0,io(),et)}function $_(){for(;Le!==null&&!tu();)fg(Le)}function fg(t){var r=Im(t.alternate,t,Wn);t.memoizedProps=t.pendingProps,r===null?Po(t):Le=r}function dg(t){var r=t,l=r.alternate;switch(r.tag){case 15:case 0:r=Lm(l,r,r.pendingProps,r.type,void 0,De);break;case 11:r=Lm(l,r,r.pendingProps,r.type.render,r.ref,De);break;case 5:ic(r);default:Um(l,r),r=Le=cp(r,Wn),r=Im(l,r,Wn)}t.memoizedProps=t.pendingProps,r===null?Po(t):Le=r}function Fr(t,r,l,u){jn=$i=null,ic(r),Ir=null,Ha=0;var h=r.return;try{if(N_(t,h,r,l,De)){et=1,Ao(t,rn(l,t.current)),Le=null;return}}catch(m){if(h!==null)throw Le=h,m;et=1,Ao(t,rn(l,t.current)),Le=null;return}r.flags&32768?(Ne||u===1?t=!0:jr||(De&536870912)!==0?t=!1:(_i=t=!0,(u===2||u===9||u===3||u===6)&&(u=Ft.current,u!==null&&u.tag===13&&(u.flags|=16384))),hg(r,t)):Po(r)}function Po(t){var r=t;do{if((r.flags&32768)!==0){hg(r,_i);return}t=r.return;var l=z_(r.alternate,r,Wn);if(l!==null){Le=l;return}if(r=r.sibling,r!==null){Le=r;return}Le=r=t}while(r!==null);et===0&&(et=5)}function hg(t,r){do{var l=U_(t.alternate,t);if(l!==null){l.flags&=32767,Le=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(t=t.sibling,t!==null)){Le=t;return}Le=t=l}while(t!==null);et=6,Le=null}function pg(t,r,l,u,h,m,_,E,D){t.cancelPendingCommit=null;do Bo();while(ft!==0);if((ze&6)!==0)throw Error(a(327));if(r!==null){if(r===t.current)throw Error(a(177));if(m=r.lanes|r.childLanes,m|=Ru,C1(t,l,m,_,E,D),t===$e&&(Le=$e=null,De=0),qr=r,xi=t,Jn=l,Hc=m,Pc=h,ig=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Q_(be,function(){return vg(),null})):(t.callbackNode=null,t.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=z.T,z.T=null,h=Y.p,Y.p=2,_=ze,ze|=4;try{H_(t,r,l)}finally{ze=_,Y.p=h,z.T=u}}ft=1,mg(),gg(),yg()}}function mg(){if(ft===1){ft=0;var t=xi,r=qr,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=z.T,z.T=null;var u=Y.p;Y.p=2;var h=ze;ze|=4;try{Qm(r,t);var m=ef,_=tp(t.containerInfo),E=m.focusedElem,D=m.selectionRange;if(_!==E&&E&&E.ownerDocument&&ep(E.ownerDocument.documentElement,E)){if(D!==null&&wu(E)){var P=D.start,F=D.end;if(F===void 0&&(F=P),"selectionStart"in E)E.selectionStart=P,E.selectionEnd=Math.min(F,E.value.length);else{var Z=E.ownerDocument||document,j=Z&&Z.defaultView||window;if(j.getSelection){var q=j.getSelection(),ce=E.textContent.length,ge=Math.min(D.start,ce),Ge=D.end===void 0?ge:Math.min(D.end,ce);!q.extend&&ge>Ge&&(_=Ge,Ge=ge,ge=_);var I=Jh(E,ge),M=Jh(E,Ge);if(I&&M&&(q.rangeCount!==1||q.anchorNode!==I.node||q.anchorOffset!==I.offset||q.focusNode!==M.node||q.focusOffset!==M.offset)){var H=Z.createRange();H.setStart(I.node,I.offset),q.removeAllRanges(),ge>Ge?(q.addRange(H),q.extend(M.node,M.offset)):(H.setEnd(M.node,M.offset),q.addRange(H))}}}}for(Z=[],q=E;q=q.parentNode;)q.nodeType===1&&Z.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<Z.length;E++){var Q=Z[E];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}Wo=!!Jc,ef=Jc=null}finally{ze=h,Y.p=u,z.T=l}}t.current=r,ft=2}}function gg(){if(ft===2){ft=0;var t=xi,r=qr,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=z.T,z.T=null;var u=Y.p;Y.p=2;var h=ze;ze|=4;try{qm(t,r.alternate,r)}finally{ze=h,Y.p=u,z.T=l}}ft=3}}function yg(){if(ft===4||ft===3){ft=0,nu();var t=xi,r=qr,l=Jn,u=ig;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?ft=5:(ft=0,qr=xi=null,bg(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(Ei=null),lu(l),r=r.stateNode,ct&&typeof ct.onCommitFiberRoot=="function")try{ct.onCommitFiberRoot(Rt,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=z.T,h=Y.p,Y.p=2,z.T=null;try{for(var m=t.onRecoverableError,_=0;_<u.length;_++){var E=u[_];m(E.value,{componentStack:E.stack})}}finally{z.T=r,Y.p=h}}(Jn&3)!==0&&Bo(),kn(t),h=t.pendingLanes,(l&261930)!==0&&(h&42)!==0?t===Bc?tl++:(tl=0,Bc=t):tl=0,nl(0)}}function bg(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,za(r)))}function Bo(){return mg(),gg(),yg(),vg()}function vg(){if(ft!==5)return!1;var t=xi,r=Hc;Hc=0;var l=lu(Jn),u=z.T,h=Y.p;try{Y.p=32>l?32:l,z.T=null,l=Pc,Pc=null;var m=xi,_=Jn;if(ft=0,qr=xi=null,Jn=0,(ze&6)!==0)throw Error(a(331));var E=ze;if(ze|=4,eg(m.current),Km(m,m.current,_,l),ze=E,nl(0,!1),ct&&typeof ct.onPostCommitFiberRoot=="function")try{ct.onPostCommitFiberRoot(Rt,m)}catch{}return!0}finally{Y.p=h,z.T=u,bg(t,r)}}function _g(t,r,l){r=rn(l,r),r=bc(t.stateNode,r,2),t=gi(t,r,2),t!==null&&(Ea(t,2),kn(t))}function Be(t,r,l){if(t.tag===3)_g(t,t,l);else for(;r!==null;){if(r.tag===3){_g(r,t,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Ei===null||!Ei.has(u))){t=rn(l,t),l=Sm(2),u=gi(r,l,2),u!==null&&(Em(l,u,r,t),Ea(u,2),kn(u));break}}r=r.return}}function Gc(t,r,l){var u=t.pingCache;if(u===null){u=t.pingCache=new V_;var h=new Set;u.set(r,h)}else h=u.get(r),h===void 0&&(h=new Set,u.set(r,h));h.has(l)||(Ic=!0,h.add(l),t=F_.bind(null,t,r,l),r.then(t,t))}function F_(t,r,l){var u=t.pingCache;u!==null&&u.delete(r),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,$e===t&&(De&l)===l&&(et===4||et===3&&(De&62914560)===De&&300>Lt()-Mo?(ze&2)===0&&$r(t,0):zc|=l,Gr===De&&(Gr=0)),kn(t)}function Sg(t,r){r===0&&(r=mh()),t=ji(t,r),t!==null&&(Ea(t,r),kn(t))}function Y_(t){var r=t.memoizedState,l=0;r!==null&&(l=r.retryLane),Sg(t,l)}function X_(t,r){var l=0;switch(t.tag){case 31:case 13:var u=t.stateNode,h=t.memoizedState;h!==null&&(l=h.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(r),Sg(t,l)}function Q_(t,r){return hr(t,r)}var Vo=null,Yr=null,qc=!1,jo=!1,$c=!1,wi=0;function kn(t){t!==Yr&&t.next===null&&(Yr===null?Vo=Yr=t:Yr=Yr.next=t),jo=!0,qc||(qc=!0,K_())}function nl(t,r){if(!$c&&jo){$c=!0;do for(var l=!1,u=Vo;u!==null;){if(t!==0){var h=u.pendingLanes;if(h===0)var m=0;else{var _=u.suspendedLanes,E=u.pingedLanes;m=(1<<31-qe(42|t)+1)-1,m&=h&~(_&~E),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(l=!0,wg(u,m))}else m=De,m=$l(u,u===$e?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(m&3)===0||Sa(u,m)||(l=!0,wg(u,m));u=u.next}while(l);$c=!1}}function Z_(){Eg()}function Eg(){jo=qc=!1;var t=0;wi!==0&&oS()&&(t=wi);for(var r=Lt(),l=null,u=Vo;u!==null;){var h=u.next,m=xg(u,r);m===0?(u.next=null,l===null?Vo=h:l.next=h,h===null&&(Yr=l)):(l=u,(t!==0||(m&3)!==0)&&(jo=!0)),u=h}ft!==0&&ft!==5||nl(t),wi!==0&&(wi=0)}function xg(t,r){for(var l=t.suspendedLanes,u=t.pingedLanes,h=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var _=31-qe(m),E=1<<_,D=h[_];D===-1?((E&l)===0||(E&u)!==0)&&(h[_]=x1(E,r)):D<=r&&(t.expiredLanes|=E),m&=~E}if(r=$e,l=De,l=$l(t,t===r?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u=t.callbackNode,l===0||t===r&&(Pe===2||Pe===9)||t.cancelPendingCommit!==null)return u!==null&&u!==null&&_a(u),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||Sa(t,l)){if(r=l&-l,r===t.callbackPriority)return r;switch(u!==null&&_a(u),lu(l)){case 2:case 8:l=oe;break;case 32:l=be;break;case 268435456:l=He;break;default:l=be}return u=Cg.bind(null,t),l=hr(l,u),t.callbackPriority=r,t.callbackNode=l,r}return u!==null&&u!==null&&_a(u),t.callbackPriority=2,t.callbackNode=null,2}function Cg(t,r){if(ft!==0&&ft!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(Bo()&&t.callbackNode!==l)return null;var u=De;return u=$l(t,t===$e?u:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u===0?null:(ag(t,u,r),xg(t,Lt()),t.callbackNode!=null&&t.callbackNode===l?Cg.bind(null,t):null)}function wg(t,r){if(Bo())return null;ag(t,r,!0)}function K_(){uS(function(){(ze&6)!==0?hr(X,Z_):Eg()})}function Fc(){if(wi===0){var t=Or;t===0&&(t=jl,jl<<=1,(jl&261888)===0&&(jl=256)),wi=t}return wi}function Ag(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Ql(""+t)}function kg(t,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,t.id&&l.setAttribute("form",t.id),r.parentNode.insertBefore(l,r),t=new FormData(t),l.parentNode.removeChild(l),t}function W_(t,r,l,u,h){if(r==="submit"&&l&&l.stateNode===h){var m=Ag((h[Nt]||null).action),_=u.submitter;_&&(r=(r=_[Nt]||null)?Ag(r.formAction):_.getAttribute("formAction"),r!==null&&(m=r,_=null));var E=new Jl("action","action",null,u,h);t.push({event:E,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(wi!==0){var D=_?kg(h,_):new FormData(h);dc(l,{pending:!0,data:D,method:h.method,action:m},null,D)}}else typeof m=="function"&&(E.preventDefault(),D=_?kg(h,_):new FormData(h),dc(l,{pending:!0,data:D,method:h.method,action:m},m,D))},currentTarget:h}]})}}for(var Yc=0;Yc<Lu.length;Yc++){var Xc=Lu[Yc],J_=Xc.toLowerCase(),eS=Xc[0].toUpperCase()+Xc.slice(1);yn(J_,"on"+eS)}yn(rp,"onAnimationEnd"),yn(ap,"onAnimationIteration"),yn(lp,"onAnimationStart"),yn("dblclick","onDoubleClick"),yn("focusin","onFocus"),yn("focusout","onBlur"),yn(g_,"onTransitionRun"),yn(y_,"onTransitionStart"),yn(b_,"onTransitionCancel"),yn(op,"onTransitionEnd"),br("onMouseEnter",["mouseout","mouseover"]),br("onMouseLeave",["mouseout","mouseover"]),br("onPointerEnter",["pointerout","pointerover"]),br("onPointerLeave",["pointerout","pointerover"]),Hi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Hi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Hi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Hi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Hi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Hi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var il="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(" "),tS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(il));function Tg(t,r){r=(r&4)!==0;for(var l=0;l<t.length;l++){var u=t[l],h=u.event;u=u.listeners;e:{var m=void 0;if(r)for(var _=u.length-1;0<=_;_--){var E=u[_],D=E.instance,P=E.currentTarget;if(E=E.listener,D!==m&&h.isPropagationStopped())break e;m=E,h.currentTarget=P;try{m(h)}catch(F){no(F)}h.currentTarget=null,m=D}else for(_=0;_<u.length;_++){if(E=u[_],D=E.instance,P=E.currentTarget,E=E.listener,D!==m&&h.isPropagationStopped())break e;m=E,h.currentTarget=P;try{m(h)}catch(F){no(F)}h.currentTarget=null,m=D}}}}function Re(t,r){var l=r[ou];l===void 0&&(l=r[ou]=new Set);var u=t+"__bubble";l.has(u)||(Lg(r,t,2,!1),l.add(u))}function Qc(t,r,l){var u=0;r&&(u|=4),Lg(l,t,u,r)}var Go="_reactListening"+Math.random().toString(36).slice(2);function Zc(t){if(!t[Go]){t[Go]=!0,Eh.forEach(function(l){l!=="selectionchange"&&(tS.has(l)||Qc(l,!1,t),Qc(l,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[Go]||(r[Go]=!0,Qc("selectionchange",!1,r))}}function Lg(t,r,l,u){switch(r0(r)){case 2:var h=LS;break;case 8:h=RS;break;default:h=df}l=h.bind(null,r,l,t),h=void 0,!gu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),u?h!==void 0?t.addEventListener(r,l,{capture:!0,passive:h}):t.addEventListener(r,l,!0):h!==void 0?t.addEventListener(r,l,{passive:h}):t.addEventListener(r,l,!1)}function Kc(t,r,l,u,h){var m=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var _=u.tag;if(_===3||_===4){var E=u.stateNode.containerInfo;if(E===h)break;if(_===4)for(_=u.return;_!==null;){var D=_.tag;if((D===3||D===4)&&_.stateNode.containerInfo===h)return;_=_.return}for(;E!==null;){if(_=mr(E),_===null)return;if(D=_.tag,D===5||D===6||D===26||D===27){u=m=_;continue e}E=E.parentNode}}u=u.return}Mh(function(){var P=m,F=pu(l),Z=[];e:{var j=sp.get(t);if(j!==void 0){var q=Jl,ce=t;switch(t){case"keypress":if(Kl(l)===0)break e;case"keydown":case"keyup":q=X1;break;case"focusin":ce="focus",q=_u;break;case"focusout":ce="blur",q=_u;break;case"beforeblur":case"afterblur":q=_u;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=Uh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=z1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=K1;break;case rp:case ap:case lp:q=P1;break;case op:q=J1;break;case"scroll":case"scrollend":q=M1;break;case"wheel":q=t_;break;case"copy":case"cut":case"paste":q=V1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Ph;break;case"toggle":case"beforetoggle":q=i_}var ge=(r&4)!==0,Ge=!ge&&(t==="scroll"||t==="scrollend"),I=ge?j!==null?j+"Capture":null:j;ge=[];for(var M=P,H;M!==null;){var Q=M;if(H=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||H===null||I===null||(Q=wa(M,I),Q!=null&&ge.push(rl(M,Q,H))),Ge)break;M=M.return}0<ge.length&&(j=new q(j,ce,null,l,F),Z.push({event:j,listeners:ge}))}}if((r&7)===0){e:{if(j=t==="mouseover"||t==="pointerover",q=t==="mouseout"||t==="pointerout",j&&l!==hu&&(ce=l.relatedTarget||l.fromElement)&&(mr(ce)||ce[pr]))break e;if((q||j)&&(j=F.window===F?F:(j=F.ownerDocument)?j.defaultView||j.parentWindow:window,q?(ce=l.relatedTarget||l.toElement,q=P,ce=ce?mr(ce):null,ce!==null&&(Ge=s(ce),ge=ce.tag,ce!==Ge||ge!==5&&ge!==27&&ge!==6)&&(ce=null)):(q=null,ce=P),q!==ce)){if(ge=Uh,Q="onMouseLeave",I="onMouseEnter",M="mouse",(t==="pointerout"||t==="pointerover")&&(ge=Ph,Q="onPointerLeave",I="onPointerEnter",M="pointer"),Ge=q==null?j:Ca(q),H=ce==null?j:Ca(ce),j=new ge(Q,M+"leave",q,l,F),j.target=Ge,j.relatedTarget=H,Q=null,mr(F)===P&&(ge=new ge(I,M+"enter",ce,l,F),ge.target=H,ge.relatedTarget=Ge,Q=ge),Ge=Q,q&&ce)t:{for(ge=nS,I=q,M=ce,H=0,Q=I;Q;Q=ge(Q))H++;Q=0;for(var pe=M;pe;pe=ge(pe))Q++;for(;0<H-Q;)I=ge(I),H--;for(;0<Q-H;)M=ge(M),Q--;for(;H--;){if(I===M||M!==null&&I===M.alternate){ge=I;break t}I=ge(I),M=ge(M)}ge=null}else ge=null;q!==null&&Rg(Z,j,q,ge,!1),ce!==null&&Ge!==null&&Rg(Z,Ge,ce,ge,!0)}}e:{if(j=P?Ca(P):window,q=j.nodeName&&j.nodeName.toLowerCase(),q==="select"||q==="input"&&j.type==="file")var Me=Yh;else if($h(j))if(Xh)Me=h_;else{Me=f_;var fe=c_}else q=j.nodeName,!q||q.toLowerCase()!=="input"||j.type!=="checkbox"&&j.type!=="radio"?P&&du(P.elementType)&&(Me=Yh):Me=d_;if(Me&&(Me=Me(t,P))){Fh(Z,Me,l,F);break e}fe&&fe(t,j,P),t==="focusout"&&P&&j.type==="number"&&P.memoizedProps.value!=null&&fu(j,"number",j.value)}switch(fe=P?Ca(P):window,t){case"focusin":($h(fe)||fe.contentEditable==="true")&&(Cr=fe,Au=P,Na=null);break;case"focusout":Na=Au=Cr=null;break;case"mousedown":ku=!0;break;case"contextmenu":case"mouseup":case"dragend":ku=!1,np(Z,l,F);break;case"selectionchange":if(m_)break;case"keydown":case"keyup":np(Z,l,F)}var xe;if(Eu)e:{switch(t){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else xr?Gh(t,l)&&(Oe="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(Oe="onCompositionStart");Oe&&(Bh&&l.locale!=="ko"&&(xr||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&xr&&(xe=Ih()):(ui=F,yu="value"in ui?ui.value:ui.textContent,xr=!0)),fe=qo(P,Oe),0<fe.length&&(Oe=new Hh(Oe,t,null,l,F),Z.push({event:Oe,listeners:fe}),xe?Oe.data=xe:(xe=qh(l),xe!==null&&(Oe.data=xe)))),(xe=a_?l_(t,l):o_(t,l))&&(Oe=qo(P,"onBeforeInput"),0<Oe.length&&(fe=new Hh("onBeforeInput","beforeinput",null,l,F),Z.push({event:fe,listeners:Oe}),fe.data=xe)),W_(Z,t,P,l,F)}Tg(Z,r)})}function rl(t,r,l){return{instance:t,listener:r,currentTarget:l}}function qo(t,r){for(var l=r+"Capture",u=[];t!==null;){var h=t,m=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||m===null||(h=wa(t,l),h!=null&&u.unshift(rl(t,h,m)),h=wa(t,r),h!=null&&u.push(rl(t,h,m))),t.tag===3)return u;t=t.return}return[]}function nS(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Rg(t,r,l,u,h){for(var m=r._reactName,_=[];l!==null&&l!==u;){var E=l,D=E.alternate,P=E.stateNode;if(E=E.tag,D!==null&&D===u)break;E!==5&&E!==26&&E!==27||P===null||(D=P,h?(P=wa(l,m),P!=null&&_.unshift(rl(l,P,D))):h||(P=wa(l,m),P!=null&&_.push(rl(l,P,D)))),l=l.return}_.length!==0&&t.push({event:r,listeners:_})}var iS=/\r\n?/g,rS=/\u0000|\uFFFD/g;function Dg(t){return(typeof t=="string"?t:""+t).replace(iS,`
10
- `).replace(rS,"")}function Og(t,r){return r=Dg(r),Dg(t)===r}function je(t,r,l,u,h,m){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||_r(t,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&_r(t,""+u);break;case"className":Yl(t,"class",u);break;case"tabIndex":Yl(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Yl(t,l,u);break;case"style":Oh(t,u,m);break;case"data":if(r!=="object"){Yl(t,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||l!=="href")){t.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(l);break}u=Ql(""+u),t.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(l,"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 m=="function"&&(l==="formAction"?(r!=="input"&&je(t,r,"name",h.name,h,null),je(t,r,"formEncType",h.formEncType,h,null),je(t,r,"formMethod",h.formMethod,h,null),je(t,r,"formTarget",h.formTarget,h,null)):(je(t,r,"encType",h.encType,h,null),je(t,r,"method",h.method,h,null),je(t,r,"target",h.target,h,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(l);break}u=Ql(""+u),t.setAttribute(l,u);break;case"onClick":u!=null&&(t.onclick=Hn);break;case"onScroll":u!=null&&Re("scroll",t);break;case"onScrollEnd":u!=null&&Re("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(h.children!=null)throw Error(a(60));t.innerHTML=l}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}l=Ql(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(l,""+u):t.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":u===!0?t.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(l,u):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(l,u):t.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(l):t.setAttribute(l,u);break;case"popover":Re("beforetoggle",t),Re("toggle",t),Fl(t,"popover",u);break;case"xlinkActuate":Un(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Un(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Un(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Un(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Un(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Un(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Un(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Un(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Un(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Fl(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=O1.get(l)||l,Fl(t,l,u))}}function Wc(t,r,l,u,h,m){switch(l){case"style":Oh(t,u,m);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(h.children!=null)throw Error(a(60));t.innerHTML=l}}break;case"children":typeof u=="string"?_r(t,u):(typeof u=="number"||typeof u=="bigint")&&_r(t,""+u);break;case"onScroll":u!=null&&Re("scroll",t);break;case"onScrollEnd":u!=null&&Re("scrollend",t);break;case"onClick":u!=null&&(t.onclick=Hn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!xh.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(h=l.endsWith("Capture"),r=l.slice(2,h?l.length-7:void 0),m=t[Nt]||null,m=m!=null?m[l]:null,typeof m=="function"&&t.removeEventListener(r,m,h),typeof u=="function")){typeof m!="function"&&m!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(r,u,h);break e}l in t?t[l]=u:u===!0?t.setAttribute(l,""):Fl(t,l,u)}}}function xt(t,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",t),Re("load",t);var u=!1,h=!1,m;for(m in l)if(l.hasOwnProperty(m)){var _=l[m];if(_!=null)switch(m){case"src":u=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:je(t,r,m,_,l,null)}}h&&je(t,r,"srcSet",l.srcSet,l,null),u&&je(t,r,"src",l.src,l,null);return;case"input":Re("invalid",t);var E=m=_=h=null,D=null,P=null;for(u in l)if(l.hasOwnProperty(u)){var F=l[u];if(F!=null)switch(u){case"name":h=F;break;case"type":_=F;break;case"checked":D=F;break;case"defaultChecked":P=F;break;case"value":m=F;break;case"defaultValue":E=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(a(137,r));break;default:je(t,r,u,F,l,null)}}Th(t,m,E,D,P,_,h,!1);return;case"select":Re("invalid",t),u=_=m=null;for(h in l)if(l.hasOwnProperty(h)&&(E=l[h],E!=null))switch(h){case"value":m=E;break;case"defaultValue":_=E;break;case"multiple":u=E;default:je(t,r,h,E,l,null)}r=m,l=_,t.multiple=!!u,r!=null?vr(t,!!u,r,!1):l!=null&&vr(t,!!u,l,!0);return;case"textarea":Re("invalid",t),m=h=u=null;for(_ in l)if(l.hasOwnProperty(_)&&(E=l[_],E!=null))switch(_){case"value":u=E;break;case"defaultValue":h=E;break;case"children":m=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(a(91));break;default:je(t,r,_,E,l,null)}Rh(t,u,h,m);return;case"option":for(D in l)l.hasOwnProperty(D)&&(u=l[D],u!=null)&&(D==="selected"?t.selected=u&&typeof u!="function"&&typeof u!="symbol":je(t,r,D,u,l,null));return;case"dialog":Re("beforetoggle",t),Re("toggle",t),Re("cancel",t),Re("close",t);break;case"iframe":case"object":Re("load",t);break;case"video":case"audio":for(u=0;u<il.length;u++)Re(il[u],t);break;case"image":Re("error",t),Re("load",t);break;case"details":Re("toggle",t);break;case"embed":case"source":case"link":Re("error",t),Re("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(P in l)if(l.hasOwnProperty(P)&&(u=l[P],u!=null))switch(P){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:je(t,r,P,u,l,null)}return;default:if(du(r)){for(F in l)l.hasOwnProperty(F)&&(u=l[F],u!==void 0&&Wc(t,r,F,u,l,void 0));return}}for(E in l)l.hasOwnProperty(E)&&(u=l[E],u!=null&&je(t,r,E,u,l,null))}function aS(t,r,l,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,m=null,_=null,E=null,D=null,P=null,F=null;for(q in l){var Z=l[q];if(l.hasOwnProperty(q)&&Z!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":D=Z;default:u.hasOwnProperty(q)||je(t,r,q,null,u,Z)}}for(var j in u){var q=u[j];if(Z=l[j],u.hasOwnProperty(j)&&(q!=null||Z!=null))switch(j){case"type":m=q;break;case"name":h=q;break;case"checked":P=q;break;case"defaultChecked":F=q;break;case"value":_=q;break;case"defaultValue":E=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(a(137,r));break;default:q!==Z&&je(t,r,j,q,u,Z)}}cu(t,_,E,D,P,F,m,h);return;case"select":q=_=E=j=null;for(m in l)if(D=l[m],l.hasOwnProperty(m)&&D!=null)switch(m){case"value":break;case"multiple":q=D;default:u.hasOwnProperty(m)||je(t,r,m,null,u,D)}for(h in u)if(m=u[h],D=l[h],u.hasOwnProperty(h)&&(m!=null||D!=null))switch(h){case"value":j=m;break;case"defaultValue":E=m;break;case"multiple":_=m;default:m!==D&&je(t,r,h,m,u,D)}r=E,l=_,u=q,j!=null?vr(t,!!l,j,!1):!!u!=!!l&&(r!=null?vr(t,!!l,r,!0):vr(t,!!l,l?[]:"",!1));return;case"textarea":q=j=null;for(E in l)if(h=l[E],l.hasOwnProperty(E)&&h!=null&&!u.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:je(t,r,E,null,u,h)}for(_ in u)if(h=u[_],m=l[_],u.hasOwnProperty(_)&&(h!=null||m!=null))switch(_){case"value":j=h;break;case"defaultValue":q=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(a(91));break;default:h!==m&&je(t,r,_,h,u,m)}Lh(t,j,q);return;case"option":for(var ce in l)j=l[ce],l.hasOwnProperty(ce)&&j!=null&&!u.hasOwnProperty(ce)&&(ce==="selected"?t.selected=!1:je(t,r,ce,null,u,j));for(D in u)j=u[D],q=l[D],u.hasOwnProperty(D)&&j!==q&&(j!=null||q!=null)&&(D==="selected"?t.selected=j&&typeof j!="function"&&typeof j!="symbol":je(t,r,D,j,u,q));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ge in l)j=l[ge],l.hasOwnProperty(ge)&&j!=null&&!u.hasOwnProperty(ge)&&je(t,r,ge,null,u,j);for(P in u)if(j=u[P],q=l[P],u.hasOwnProperty(P)&&j!==q&&(j!=null||q!=null))switch(P){case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(a(137,r));break;default:je(t,r,P,j,u,q)}return;default:if(du(r)){for(var Ge in l)j=l[Ge],l.hasOwnProperty(Ge)&&j!==void 0&&!u.hasOwnProperty(Ge)&&Wc(t,r,Ge,void 0,u,j);for(F in u)j=u[F],q=l[F],!u.hasOwnProperty(F)||j===q||j===void 0&&q===void 0||Wc(t,r,F,j,u,q);return}}for(var I in l)j=l[I],l.hasOwnProperty(I)&&j!=null&&!u.hasOwnProperty(I)&&je(t,r,I,null,u,j);for(Z in u)j=u[Z],q=l[Z],!u.hasOwnProperty(Z)||j===q||j==null&&q==null||je(t,r,Z,j,u,q)}function Ng(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function lS(){if(typeof performance.getEntriesByType=="function"){for(var t=0,r=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var h=l[u],m=h.transferSize,_=h.initiatorType,E=h.duration;if(m&&E&&Ng(_)){for(_=0,E=h.responseEnd,u+=1;u<l.length;u++){var D=l[u],P=D.startTime;if(P>E)break;var F=D.transferSize,Z=D.initiatorType;F&&Ng(Z)&&(D=D.responseEnd,_+=F*(D<E?1:(E-P)/(D-P)))}if(--u,r+=8*(m+_)/(h.duration/1e3),t++,10<t)break}}if(0<t)return r/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Jc=null,ef=null;function $o(t){return t.nodeType===9?t:t.ownerDocument}function Mg(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ig(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function tf(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var nf=null;function oS(){var t=window.event;return t&&t.type==="popstate"?t===nf?!1:(nf=t,!0):(nf=null,!1)}var zg=typeof setTimeout=="function"?setTimeout:void 0,sS=typeof clearTimeout=="function"?clearTimeout:void 0,Ug=typeof Promise=="function"?Promise:void 0,uS=typeof queueMicrotask=="function"?queueMicrotask:typeof Ug<"u"?function(t){return Ug.resolve(null).then(t).catch(cS)}:zg;function cS(t){setTimeout(function(){throw t})}function Ai(t){return t==="head"}function Hg(t,r){var l=r,u=0;do{var h=l.nextSibling;if(t.removeChild(l),h&&h.nodeType===8)if(l=h.data,l==="/$"||l==="/&"){if(u===0){t.removeChild(h),Kr(r);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")al(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,al(l);for(var m=l.firstChild;m;){var _=m.nextSibling,E=m.nodeName;m[xa]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&m.rel.toLowerCase()==="stylesheet"||l.removeChild(m),m=_}}else l==="body"&&al(t.ownerDocument.body);l=h}while(l);Kr(r)}function Pg(t,r){var l=t;t=0;do{var u=l.nextSibling;if(l.nodeType===1?r?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(r?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),u&&u.nodeType===8)if(l=u.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=u}while(l)}function rf(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var l=r;switch(r=r.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":rf(l),su(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function fS(t,r,l,u){for(;t.nodeType===1;){var h=l;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(u){if(!t[xa])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var m=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=un(t.nextSibling),t===null)break}return null}function dS(t,r,l){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=un(t.nextSibling),t===null))return null;return t}function Bg(t,r){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=un(t.nextSibling),t===null))return null;return t}function af(t){return t.data==="$?"||t.data==="$~"}function lf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function hS(t,r){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=r;else if(t.data!=="$?"||l.readyState!=="loading")r();else{var u=function(){r(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),t._reactRetry=u}}function un(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return t}var of=null;function Vg(t){t=t.nextSibling;for(var r=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(r===0)return un(t.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}t=t.nextSibling}return null}function jg(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(r===0)return t;r--}else l!=="/$"&&l!=="/&"||r++}t=t.previousSibling}return null}function Gg(t,r,l){switch(r=$o(l),t){case"html":if(t=r.documentElement,!t)throw Error(a(452));return t;case"head":if(t=r.head,!t)throw Error(a(453));return t;case"body":if(t=r.body,!t)throw Error(a(454));return t;default:throw Error(a(451))}}function al(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);su(t)}var cn=new Map,qg=new Set;function Fo(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var ei=Y.d;Y.d={f:pS,r:mS,D:gS,C:yS,L:bS,m:vS,X:SS,S:_S,M:ES};function pS(){var t=ei.f(),r=Uo();return t||r}function mS(t){var r=gr(t);r!==null&&r.tag===5&&r.type==="form"?om(r):ei.r(t)}var Xr=typeof document>"u"?null:document;function $g(t,r,l){var u=Xr;if(u&&typeof r=="string"&&r){var h=tn(r);h='link[rel="'+t+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),qg.has(h)||(qg.add(h),t={rel:t,crossOrigin:l,href:r},u.querySelector(h)===null&&(r=u.createElement("link"),xt(r,"link",t),mt(r),u.head.appendChild(r)))}}function gS(t){ei.D(t),$g("dns-prefetch",t,null)}function yS(t,r){ei.C(t,r),$g("preconnect",t,r)}function bS(t,r,l){ei.L(t,r,l);var u=Xr;if(u&&t&&r){var h='link[rel="preload"][as="'+tn(r)+'"]';r==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+tn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+tn(l.imageSizes)+'"]')):h+='[href="'+tn(t)+'"]';var m=h;switch(r){case"style":m=Qr(t);break;case"script":m=Zr(t)}cn.has(m)||(t=y({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:t,as:r},l),cn.set(m,t),u.querySelector(h)!==null||r==="style"&&u.querySelector(ll(m))||r==="script"&&u.querySelector(ol(m))||(r=u.createElement("link"),xt(r,"link",t),mt(r),u.head.appendChild(r)))}}function vS(t,r){ei.m(t,r);var l=Xr;if(l&&t){var u=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+tn(u)+'"][href="'+tn(t)+'"]',m=h;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Zr(t)}if(!cn.has(m)&&(t=y({rel:"modulepreload",href:t},r),cn.set(m,t),l.querySelector(h)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ol(m)))return}u=l.createElement("link"),xt(u,"link",t),mt(u),l.head.appendChild(u)}}}function _S(t,r,l){ei.S(t,r,l);var u=Xr;if(u&&t){var h=yr(u).hoistableStyles,m=Qr(t);r=r||"default";var _=h.get(m);if(!_){var E={loading:0,preload:null};if(_=u.querySelector(ll(m)))E.loading=5;else{t=y({rel:"stylesheet",href:t,"data-precedence":r},l),(l=cn.get(m))&&sf(t,l);var D=_=u.createElement("link");mt(D),xt(D,"link",t),D._p=new Promise(function(P,F){D.onload=P,D.onerror=F}),D.addEventListener("load",function(){E.loading|=1}),D.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Yo(_,r,u)}_={type:"stylesheet",instance:_,count:1,state:E},h.set(m,_)}}}function SS(t,r){ei.X(t,r);var l=Xr;if(l&&t){var u=yr(l).hoistableScripts,h=Zr(t),m=u.get(h);m||(m=l.querySelector(ol(h)),m||(t=y({src:t,async:!0},r),(r=cn.get(h))&&uf(t,r),m=l.createElement("script"),mt(m),xt(m,"link",t),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(h,m))}}function ES(t,r){ei.M(t,r);var l=Xr;if(l&&t){var u=yr(l).hoistableScripts,h=Zr(t),m=u.get(h);m||(m=l.querySelector(ol(h)),m||(t=y({src:t,async:!0,type:"module"},r),(r=cn.get(h))&&uf(t,r),m=l.createElement("script"),mt(m),xt(m,"link",t),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(h,m))}}function Fg(t,r,l,u){var h=(h=se.current)?Fo(h):null;if(!h)throw Error(a(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=Qr(l.href),l=yr(h).hoistableStyles,u=l.get(r),u||(u={type:"style",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=Qr(l.href);var m=yr(h).hoistableStyles,_=m.get(t);if(_||(h=h.ownerDocument||h,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,_),(m=h.querySelector(ll(t)))&&!m._p&&(_.instance=m,_.state.loading=5),cn.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},cn.set(t,l),m||xS(h,t,l,_.state))),r&&u===null)throw Error(a(528,""));return _}if(r&&u!==null)throw Error(a(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Zr(l),l=yr(h).hoistableScripts,u=l.get(r),u||(u={type:"script",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,t))}}function Qr(t){return'href="'+tn(t)+'"'}function ll(t){return'link[rel="stylesheet"]['+t+"]"}function Yg(t){return y({},t,{"data-precedence":t.precedence,precedence:null})}function xS(t,r,l,u){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=t.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),xt(r,"link",l),mt(r),t.head.appendChild(r))}function Zr(t){return'[src="'+tn(t)+'"]'}function ol(t){return"script[async]"+t}function Xg(t,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=t.querySelector('style[data-href~="'+tn(l.href)+'"]');if(u)return r.instance=u,mt(u),u;var h=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),mt(u),xt(u,"style",h),Yo(u,l.precedence,t),r.instance=u;case"stylesheet":h=Qr(l.href);var m=t.querySelector(ll(h));if(m)return r.state.loading|=4,r.instance=m,mt(m),m;u=Yg(l),(h=cn.get(h))&&sf(u,h),m=(t.ownerDocument||t).createElement("link"),mt(m);var _=m;return _._p=new Promise(function(E,D){_.onload=E,_.onerror=D}),xt(m,"link",u),r.state.loading|=4,Yo(m,l.precedence,t),r.instance=m;case"script":return m=Zr(l.src),(h=t.querySelector(ol(m)))?(r.instance=h,mt(h),h):(u=l,(h=cn.get(m))&&(u=y({},l),uf(u,h)),t=t.ownerDocument||t,h=t.createElement("script"),mt(h),xt(h,"link",u),t.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,Yo(u,l.precedence,t));return r.instance}function Yo(t,r,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=u.length?u[u.length-1]:null,m=h,_=0;_<u.length;_++){var E=u[_];if(E.dataset.precedence===r)m=E;else if(m!==h)break}m?m.parentNode.insertBefore(t,m.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(t,r.firstChild))}function sf(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function uf(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var Xo=null;function Qg(t,r,l){if(Xo===null){var u=new Map,h=Xo=new Map;h.set(l,u)}else h=Xo,u=h.get(l),u||(u=new Map,h.set(l,u));if(u.has(t))return u;for(u.set(t,null),l=l.getElementsByTagName(t),h=0;h<l.length;h++){var m=l[h];if(!(m[xa]||m[vt]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var _=m.getAttribute(r)||"";_=t+_;var E=u.get(_);E?E.push(m):u.set(_,[m])}}return u}function Zg(t,r,l){t=t.ownerDocument||t,t.head.insertBefore(l,r==="title"?t.querySelector("head > title"):null)}function CS(t,r,l){if(l===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(t=r.disabled,typeof r.precedence=="string"&&t==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Kg(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function wS(t,r,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var h=Qr(u.href),m=r.querySelector(ll(h));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(t.count++,t=Qo.bind(t),r.then(t,t)),l.state.loading|=4,l.instance=m,mt(m);return}m=r.ownerDocument||r,u=Yg(u),(h=cn.get(h))&&sf(u,h),m=m.createElement("link"),mt(m);var _=m;_._p=new Promise(function(E,D){_.onload=E,_.onerror=D}),xt(m,"link",u),l.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=Qo.bind(t),r.addEventListener("load",l),r.addEventListener("error",l))}}var cf=0;function AS(t,r){return t.stylesheets&&t.count===0&&Ko(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var u=setTimeout(function(){if(t.stylesheets&&Ko(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+r);0<t.imgBytes&&cf===0&&(cf=62500*lS());var h=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Ko(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>cf?50:800)+r);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(h)}}:null}function Qo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ko(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Zo=null;function Ko(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Zo=new Map,r.forEach(kS,t),Zo=null,Qo.call(t))}function kS(t,r){if(!(r.state.loading&4)){var l=Zo.get(t);if(l)var u=l.get(null);else{l=new Map,Zo.set(t,l);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<h.length;m++){var _=h[m];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(l.set(_.dataset.precedence,_),u=_)}u&&l.set(null,u)}h=r.instance,_=h.getAttribute("data-precedence"),m=l.get(_)||u,m===u&&l.set(null,h),l.set(_,h),this.count++,u=Qo.bind(this),h.addEventListener("load",u),h.addEventListener("error",u),m?m.parentNode.insertBefore(h,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),r.state.loading|=4}}var sl={$$typeof:L,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function TS(t,r,l,u,h,m,_,E,D){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ru(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ru(0),this.hiddenUpdates=ru(null),this.identifierPrefix=u,this.onUncaughtError=h,this.onCaughtError=m,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=D,this.incompleteTransitions=new Map}function Wg(t,r,l,u,h,m,_,E,D,P,F,Z){return t=new TS(t,r,l,_,D,P,F,Z,E),r=1,m===!0&&(r|=24),m=$t(3,null,null,r),t.current=m,m.stateNode=t,r=ju(),r.refCount++,t.pooledCache=r,r.refCount++,m.memoizedState={element:u,isDehydrated:l,cache:r},Fu(m),t}function Jg(t){return t?(t=kr,t):kr}function e0(t,r,l,u,h,m){h=Jg(h),u.context===null?u.context=h:u.pendingContext=h,u=mi(r),u.payload={element:l},m=m===void 0?null:m,m!==null&&(u.callback=m),l=gi(t,u,r),l!==null&&(Pt(l,t,r),Ba(l,t,r))}function t0(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<r?l:r}}function ff(t,r){t0(t,r),(t=t.alternate)&&t0(t,r)}function n0(t){if(t.tag===13||t.tag===31){var r=ji(t,67108864);r!==null&&Pt(r,t,67108864),ff(t,67108864)}}function i0(t){if(t.tag===13||t.tag===31){var r=Zt();r=au(r);var l=ji(t,r);l!==null&&Pt(l,t,r),ff(t,r)}}var Wo=!0;function LS(t,r,l,u){var h=z.T;z.T=null;var m=Y.p;try{Y.p=2,df(t,r,l,u)}finally{Y.p=m,z.T=h}}function RS(t,r,l,u){var h=z.T;z.T=null;var m=Y.p;try{Y.p=8,df(t,r,l,u)}finally{Y.p=m,z.T=h}}function df(t,r,l,u){if(Wo){var h=hf(u);if(h===null)Kc(t,r,u,Jo,l),a0(t,u);else if(OS(h,t,r,l,u))u.stopPropagation();else if(a0(t,u),r&4&&-1<DS.indexOf(t)){for(;h!==null;){var m=gr(h);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var _=Ui(m.pendingLanes);if(_!==0){var E=m;for(E.pendingLanes|=2,E.entangledLanes|=2;_;){var D=1<<31-qe(_);E.entanglements[1]|=D,_&=~D}kn(m),(ze&6)===0&&(Io=Lt()+500,nl(0))}}break;case 31:case 13:E=ji(m,2),E!==null&&Pt(E,m,2),Uo(),ff(m,2)}if(m=hf(u),m===null&&Kc(t,r,u,Jo,l),m===h)break;h=m}h!==null&&u.stopPropagation()}else Kc(t,r,u,null,l)}}function hf(t){return t=pu(t),pf(t)}var Jo=null;function pf(t){if(Jo=null,t=mr(t),t!==null){var r=s(t);if(r===null)t=null;else{var l=r.tag;if(l===13){if(t=c(r),t!==null)return t;t=null}else if(l===31){if(t=f(r),t!==null)return t;t=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return Jo=t,null}function r0(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(iu()){case X:return 2;case oe:return 8;case be:case Te:return 32;case He:return 268435456;default:return 32}default:return 32}}var mf=!1,ki=null,Ti=null,Li=null,ul=new Map,cl=new Map,Ri=[],DS="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 a0(t,r){switch(t){case"focusin":case"focusout":ki=null;break;case"dragenter":case"dragleave":Ti=null;break;case"mouseover":case"mouseout":Li=null;break;case"pointerover":case"pointerout":ul.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":cl.delete(r.pointerId)}}function fl(t,r,l,u,h,m){return t===null||t.nativeEvent!==m?(t={blockedOn:r,domEventName:l,eventSystemFlags:u,nativeEvent:m,targetContainers:[h]},r!==null&&(r=gr(r),r!==null&&n0(r)),t):(t.eventSystemFlags|=u,r=t.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),t)}function OS(t,r,l,u,h){switch(r){case"focusin":return ki=fl(ki,t,r,l,u,h),!0;case"dragenter":return Ti=fl(Ti,t,r,l,u,h),!0;case"mouseover":return Li=fl(Li,t,r,l,u,h),!0;case"pointerover":var m=h.pointerId;return ul.set(m,fl(ul.get(m)||null,t,r,l,u,h)),!0;case"gotpointercapture":return m=h.pointerId,cl.set(m,fl(cl.get(m)||null,t,r,l,u,h)),!0}return!1}function l0(t){var r=mr(t.target);if(r!==null){var l=s(r);if(l!==null){if(r=l.tag,r===13){if(r=c(l),r!==null){t.blockedOn=r,_h(t.priority,function(){i0(l)});return}}else if(r===31){if(r=f(l),r!==null){t.blockedOn=r,_h(t.priority,function(){i0(l)});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function es(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var l=hf(t.nativeEvent);if(l===null){l=t.nativeEvent;var u=new l.constructor(l.type,l);hu=u,l.target.dispatchEvent(u),hu=null}else return r=gr(l),r!==null&&n0(r),t.blockedOn=l,!1;r.shift()}return!0}function o0(t,r,l){es(t)&&l.delete(r)}function NS(){mf=!1,ki!==null&&es(ki)&&(ki=null),Ti!==null&&es(Ti)&&(Ti=null),Li!==null&&es(Li)&&(Li=null),ul.forEach(o0),cl.forEach(o0)}function ts(t,r){t.blockedOn===r&&(t.blockedOn=null,mf||(mf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,NS)))}var ns=null;function s0(t){ns!==t&&(ns=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ns===t&&(ns=null);for(var r=0;r<t.length;r+=3){var l=t[r],u=t[r+1],h=t[r+2];if(typeof u!="function"){if(pf(u||l)===null)continue;break}var m=gr(l);m!==null&&(t.splice(r,3),r-=3,dc(m,{pending:!0,data:h,method:l.method,action:u},u,h))}}))}function Kr(t){function r(D){return ts(D,t)}ki!==null&&ts(ki,t),Ti!==null&&ts(Ti,t),Li!==null&&ts(Li,t),ul.forEach(r),cl.forEach(r);for(var l=0;l<Ri.length;l++){var u=Ri[l];u.blockedOn===t&&(u.blockedOn=null)}for(;0<Ri.length&&(l=Ri[0],l.blockedOn===null);)l0(l),l.blockedOn===null&&Ri.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var h=l[u],m=l[u+1],_=h[Nt]||null;if(typeof m=="function")_||s0(l);else if(_){var E=null;if(m&&m.hasAttribute("formAction")){if(h=m,_=m[Nt]||null)E=_.formAction;else if(pf(h)!==null)continue}else E=_.action;typeof E=="function"?l[u+1]=E:(l.splice(u,3),u-=3),s0(l)}}}function u0(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(_){return h=_})},focusReset:"manual",scroll:"manual"})}function r(){h!==null&&(h(),h=null),u||setTimeout(l,20)}function l(){if(!u&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,h=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(l,100),function(){u=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),h!==null&&(h(),h=null)}}}function gf(t){this._internalRoot=t}is.prototype.render=gf.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(a(409));var l=r.current,u=Zt();e0(l,u,t,r,null,null)},is.prototype.unmount=gf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;e0(t.current,2,null,t,null,null),Uo(),r[pr]=null}};function is(t){this._internalRoot=t}is.prototype.unstable_scheduleHydration=function(t){if(t){var r=vh();t={blockedOn:null,target:t,priority:r};for(var l=0;l<Ri.length&&r!==0&&r<Ri[l].priority;l++);Ri.splice(l,0,t),l===0&&l0(t)}};var c0=n.version;if(c0!=="19.2.4")throw Error(a(527,c0,"19.2.4"));Y.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(a(188)):(t=Object.keys(t).join(","),Error(a(268,t)));return t=p(r),t=t!==null?g(t):null,t=t===null?null:t.stateNode,t};var MS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rs.isDisabled&&rs.supportsFiber)try{Rt=rs.inject(MS),ct=rs}catch{}}return hl.createRoot=function(t,r){if(!o(t))throw Error(a(299));var l=!1,u="",h=ym,m=bm,_=vm;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(_=r.onRecoverableError)),r=Wg(t,1,!1,null,null,l,u,null,h,m,_,u0),t[pr]=r.current,Zc(t),new gf(r)},hl.hydrateRoot=function(t,r,l){if(!o(t))throw Error(a(299));var u=!1,h="",m=ym,_=bm,E=vm,D=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(m=l.onUncaughtError),l.onCaughtError!==void 0&&(_=l.onCaughtError),l.onRecoverableError!==void 0&&(E=l.onRecoverableError),l.formState!==void 0&&(D=l.formState)),r=Wg(t,1,!0,r,l??null,u,h,D,m,_,E,u0),r.context=Jg(null),l=r.current,u=Zt(),u=au(u),h=mi(u),h.callback=null,gi(l,h,u),l=u,r.current.lanes=l,Ea(r,l),kn(r),t[pr]=r.current,Zc(t),new is(r)},hl.version="19.2.4",hl}var _0;function qS(){if(_0)return vf.exports;_0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),vf.exports=GS(),vf.exports}var $S=qS();async function li(e,n={}){const i=await fetch(e,{headers:{"content-type":"application/json",...n.headers},...n}),a=await i.text(),o=a?JSON.parse(a):{};if(!i.ok)throw new Error(o.error||i.statusText||"request failed");return o}async function FS(){return li("/api/bootstrap")}async function YS(e){return li("/api/diff")}async function tr(e){return li("/api/state",{method:"POST",body:JSON.stringify(e)})}async function XS(e){return li("/api/thread",{method:"POST",body:JSON.stringify(e)})}async function QS(e){return li("/api/thread/reply",{method:"POST",body:JSON.stringify(e)})}async function ZS(e){return li("/api/thread/delete",{method:"POST",body:JSON.stringify({id:e})})}async function KS(e){return li("/api/thread-message",{method:"POST",body:JSON.stringify({id:e})})}async function WS(){return li("/api/review",{method:"POST"})}async function JS(){return li("/api/cancel",{method:"POST"})}const eE={position:"absolute",top:0,bottom:0,textAlign:"center"},tE={display:"contents"};function S0(){return null}const As="diffs-container",nE=/(?=^From [a-f0-9]+ .+$)/m,Ss=/(?=^diff --git)/gm,E0=/(?=^---\s+\S)/gm,iE=/(?=^@@ )/gm,rE=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,xf=new RegExp("(?<=\\n)"),aE=/^(---|\+\+\+)\s+([^\t\r\n]+)/,lE=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,oE=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,sE=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Pd="header-prefix",Bd="header-metadata",Vd="header-custom",Nn={dark:"pierre-dark",light:"pierre-light"},_b="data-theme-css",Sb="data-unsafe-css",oa=1,uE={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,hunkSeparatorHeight:32,fileGap:8},cE=Object.freeze({fromStart:0,fromEnd:0}),x0={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},fE={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function kl(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function dE(e,n){return typeof window>"u"&&n!=null?te.jsxs(te.Fragment,{children:[te.jsx("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:n}}),e]}):te.jsx(te.Fragment,{children:e})}const hE=me.createContext(void 0);function pE(){return me.useContext(hE)}const or=new Map,Cf=new Map,sd=new Map,ud=new Set;function C0(e,n){e=Array.isArray(e)?e:[e];for(let i of e){let a;if(typeof i=="string"){if(a=or.get(i),a==null)throw new Error(`loadResolvedThemes: ${i} is not resolved, you must resolve it before calling loadResolvedThemes`)}else a=i,i=i.name,or.has(i)||or.set(i,a);ud.has(i)||(ud.add(i),n.loadThemeSync(a))}}const mE="modulepreload",gE=function(e){return"/"+e},w0={},C=function(n,i,a){let o=Promise.resolve();if(i&&i.length>0){let p=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};var c=p;document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),d=f?.nonce||f?.getAttribute("nonce");o=p(i.map(g=>{if(g=gE(g),g in w0)return;w0[g]=!0;const y=g.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${v}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":mE,y||(b.as="script"),b.crossOrigin="",b.href=g,d&&b.setAttribute("nonce",d),document.head.appendChild(b),y)return new Promise((S,k)=>{b.addEventListener("load",S),b.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${g}`)))})}))}function s(f){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=f,window.dispatchEvent(d),!d.defaultPrevented)throw f}return o.then(f=>{for(const d of f||[])d.status==="rejected"&&s(d.reason);return n().catch(s)})},Tl=new Map,wf=new Map,yE=new Map,cd=new Set;function A0(e,n){e=Array.isArray(e)?e:[e];for(const i of e){if(cd.has(i.name))continue;let a=Tl.get(i.name);a==null&&(a=i,Tl.set(i.name,a)),cd.add(a.name),n.loadLanguageSync(a.data)}}function Eb(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}let ut=class extends Error{constructor(n){super(n),this.name="ShikiError"}};function bE(e){return jd(e)}function jd(e){return Array.isArray(e)?vE(e):e instanceof RegExp?e:typeof e=="object"?_E(e):e}function vE(e){let n=[];for(let i=0,a=e.length;i<a;i++)n[i]=jd(e[i]);return n}function _E(e){let n={};for(let i in e)n[i]=jd(e[i]);return n}function xb(e,...n){return n.forEach(i=>{for(let a in i)e[a]=i[a]}),e}function Cb(e){const n=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return n===0?e:~n===e.length-1?Cb(e.substring(0,e.length-1)):e.substr(~n+1)}var Af=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,as=class{static hasCaptures(e){return e===null?!1:(Af.lastIndex=0,Af.test(e))}static replaceCaptures(e,n,i){return e.replace(Af,(a,o,s,c)=>{let f=i[parseInt(o||s,10)];if(f){let d=n.substring(f.start,f.end);for(;d[0]===".";)d=d.substring(1);switch(c){case"downcase":return d.toLowerCase();case"upcase":return d.toUpperCase();default:return d}}else return a})}};function wb(e,n){return e<n?-1:e>n?1:0}function Ab(e,n){if(e===null&&n===null)return 0;if(!e)return-1;if(!n)return 1;let i=e.length,a=n.length;if(i===a){for(let o=0;o<i;o++){let s=wb(e[o],n[o]);if(s!==0)return s}return 0}return i-a}function k0(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 kb(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Tb=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const n=this.fn(e);return this.cache.set(e,n),n}},ks=class{constructor(e,n,i){this._colorMap=e,this._defaults=n,this._root=i}static createFromRawTheme(e,n){return this.createFromParsedTheme(xE(e),n)}static createFromParsedTheme(e,n){return wE(e,n)}_cachedMatchRoot=new Tb(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const n=e.scopeName,a=this._cachedMatchRoot.get(n).find(o=>SE(e.parent,o.parentScopes));return a?new Lb(a.fontStyle,a.foreground,a.background):null}},kf=class Es{constructor(n,i){this.parent=n,this.scopeName=i}static push(n,i){for(const a of i)n=new Es(n,a);return n}static from(...n){let i=null;for(let a=0;a<n.length;a++)i=new Es(i,n[a]);return i}push(n){return new Es(this,n)}getSegments(){let n=this;const i=[];for(;n;)i.push(n.scopeName),n=n.parent;return i.reverse(),i}toString(){return this.getSegments().join(" ")}extends(n){return this===n?!0:this.parent===null?!1:this.parent.extends(n)}getExtensionIfDefined(n){const i=[];let a=this;for(;a&&a!==n;)i.push(a.scopeName),a=a.parent;return a===n?i.reverse():void 0}};function SE(e,n){if(n.length===0)return!0;for(let i=0;i<n.length;i++){let a=n[i],o=!1;if(a===">"){if(i===n.length-1)return!1;a=n[++i],o=!0}for(;e&&!EE(e.scopeName,a);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function EE(e,n){return n===e||e.startsWith(n)&&e[n.length]==="."}var Lb=class{constructor(e,n,i){this.fontStyle=e,this.foregroundId=n,this.backgroundId=i}};function xE(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let n=e.settings,i=[],a=0;for(let o=0,s=n.length;o<s;o++){let c=n[o];if(!c.settings)continue;let f;if(typeof c.scope=="string"){let y=c.scope;y=y.replace(/^[,]+/,""),y=y.replace(/[,]+$/,""),f=y.split(",")}else Array.isArray(c.scope)?f=c.scope:f=[""];let d=-1;if(typeof c.settings.fontStyle=="string"){d=0;let y=c.settings.fontStyle.split(" ");for(let v=0,b=y.length;v<b;v++)switch(y[v]){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 p=null;typeof c.settings.foreground=="string"&&k0(c.settings.foreground)&&(p=c.settings.foreground);let g=null;typeof c.settings.background=="string"&&k0(c.settings.background)&&(g=c.settings.background);for(let y=0,v=f.length;y<v;y++){let S=f[y].trim().split(" "),k=S[S.length-1],O=null;S.length>1&&(O=S.slice(0,S.length-1),O.reverse()),i[a++]=new CE(k,O,o,d,p,g)}}return i}var CE=class{constructor(e,n,i,a,o,s){this.scope=e,this.parentScopes=n,this.index=i,this.fontStyle=a,this.foreground=o,this.background=s}},At=(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))(At||{});function wE(e,n){e.sort((d,p)=>{let g=wb(d.scope,p.scope);return g!==0||(g=Ab(d.parentScopes,p.parentScopes),g!==0)?g:d.index-p.index});let i=0,a="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let d=e.shift();d.fontStyle!==-1&&(i=d.fontStyle),d.foreground!==null&&(a=d.foreground),d.background!==null&&(o=d.background)}let s=new AE(n),c=new Lb(i,s.getId(a),s.getId(o)),f=new TE(new fd(0,null,-1,0,0),[]);for(let d=0,p=e.length;d<p;d++){let g=e[d];f.insert(0,g.scope,g.parentScopes,g.fontStyle,s.getId(g.foreground),s.getId(g.background))}return new ks(s,c,f)}var AE=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 n=0,i=e.length;n<i;n++)this._color2id[e[n]]=n,this._id2color[n]=e[n]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let n=this._color2id[e];if(n)return n;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return n=++this._lastColorId,this._color2id[e]=n,this._id2color[n]=e,n}getColorMap(){return this._id2color.slice(0)}},kE=Object.freeze([]),fd=class Rb{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(n,i,a,o,s){this.scopeDepth=n,this.parentScopes=i||kE,this.fontStyle=a,this.foreground=o,this.background=s}clone(){return new Rb(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(n){let i=[];for(let a=0,o=n.length;a<o;a++)i[a]=n[a].clone();return i}acceptOverwrite(n,i,a,o){this.scopeDepth>n?console.log("how did this happen?"):this.scopeDepth=n,i!==-1&&(this.fontStyle=i),a!==0&&(this.foreground=a),o!==0&&(this.background=o)}},TE=class dd{constructor(n,i=[],a={}){this._mainRule=n,this._children=a,this._rulesWithParentScopes=i}_rulesWithParentScopes;static _cmpBySpecificity(n,i){if(n.scopeDepth!==i.scopeDepth)return i.scopeDepth-n.scopeDepth;let a=0,o=0;for(;n.parentScopes[a]===">"&&a++,i.parentScopes[o]===">"&&o++,!(a>=n.parentScopes.length||o>=i.parentScopes.length);){const s=i.parentScopes[o].length-n.parentScopes[a].length;if(s!==0)return s;a++,o++}return i.parentScopes.length-n.parentScopes.length}match(n){if(n!==""){let a=n.indexOf("."),o,s;if(a===-1?(o=n,s=""):(o=n.substring(0,a),s=n.substring(a+1)),this._children.hasOwnProperty(o))return this._children[o].match(s)}const i=this._rulesWithParentScopes.concat(this._mainRule);return i.sort(dd._cmpBySpecificity),i}insert(n,i,a,o,s,c){if(i===""){this._doInsertHere(n,a,o,s,c);return}let f=i.indexOf("."),d,p;f===-1?(d=i,p=""):(d=i.substring(0,f),p=i.substring(f+1));let g;this._children.hasOwnProperty(d)?g=this._children[d]:(g=new dd(this._mainRule.clone(),fd.cloneArr(this._rulesWithParentScopes)),this._children[d]=g),g.insert(n+1,p,a,o,s,c)}_doInsertHere(n,i,a,o,s){if(i===null){this._mainRule.acceptOverwrite(n,a,o,s);return}for(let c=0,f=this._rulesWithParentScopes.length;c<f;c++){let d=this._rulesWithParentScopes[c];if(Ab(d.parentScopes,i)===0){d.acceptOverwrite(n,a,o,s);return}}a===-1&&(a=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new fd(n,i,a,o,s))}},da=class fn{static toBinaryStr(n){return n.toString(2).padStart(32,"0")}static print(n){const i=fn.getLanguageId(n),a=fn.getTokenType(n),o=fn.getFontStyle(n),s=fn.getForeground(n),c=fn.getBackground(n);console.log({languageId:i,tokenType:a,fontStyle:o,foreground:s,background:c})}static getLanguageId(n){return(n&255)>>>0}static getTokenType(n){return(n&768)>>>8}static containsBalancedBrackets(n){return(n&1024)!==0}static getFontStyle(n){return(n&30720)>>>11}static getForeground(n){return(n&16744448)>>>15}static getBackground(n){return(n&4278190080)>>>24}static set(n,i,a,o,s,c,f){let d=fn.getLanguageId(n),p=fn.getTokenType(n),g=fn.containsBalancedBrackets(n)?1:0,y=fn.getFontStyle(n),v=fn.getForeground(n),b=fn.getBackground(n);return i!==0&&(d=i),a!==8&&(p=a),o!==null&&(g=o?1:0),s!==-1&&(y=s),c!==0&&(v=c),f!==0&&(b=f),(d<<0|p<<8|g<<10|y<<11|v<<15|b<<24)>>>0}};function Ts(e,n){const i=[],a=LE(e);let o=a.next();for(;o!==null;){let d=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":d=1;break;case"L":d=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=a.next()}let p=c();if(i.push({matcher:p,priority:d}),o!==",")break;o=a.next()}return i;function s(){if(o==="-"){o=a.next();const d=s();return p=>!!d&&!d(p)}if(o==="("){o=a.next();const d=f();return o===")"&&(o=a.next()),d}if(T0(o)){const d=[];do d.push(o),o=a.next();while(T0(o));return p=>n(d,p)}return null}function c(){const d=[];let p=s();for(;p;)d.push(p),p=s();return g=>d.every(y=>y(g))}function f(){const d=[];let p=c();for(;p&&(d.push(p),o==="|"||o===",");){do o=a.next();while(o==="|"||o===",");p=c()}return g=>d.some(y=>y(g))}}function T0(e){return!!e&&!!e.match(/[\w\.:]+/)}function LE(e){let n=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,i=n.exec(e);return{next:()=>{if(!i)return null;const a=i[0];return i=n.exec(e),a}}}function Db(e){typeof e.dispose=="function"&&e.dispose()}var Ll=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},RE=class{constructor(e,n){this.scopeName=e,this.ruleName=n}toKey(){return`${this.scopeName}#${this.ruleName}`}},DE=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const n=e.toKey();this._seenReferenceKeys.has(n)||(this._seenReferenceKeys.add(n),this._references.push(e))}},OE=class{constructor(e,n){this.repo=e,this.initialScopeName=n,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Ll(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const n=new DE;for(const i of e)NE(i,this.initialScopeName,this.repo,n);for(const i of n.references)if(i instanceof Ll){if(this.seenFullScopeRequests.has(i.scopeName))continue;this.seenFullScopeRequests.add(i.scopeName),this.Q.push(i)}else{if(this.seenFullScopeRequests.has(i.scopeName)||this.seenPartialScopeRequests.has(i.toKey()))continue;this.seenPartialScopeRequests.add(i.toKey()),this.Q.push(i)}}};function NE(e,n,i,a){const o=i.lookup(e.scopeName);if(!o){if(e.scopeName===n)throw new Error(`No grammar provided for <${n}>`);return}const s=i.lookup(n);e instanceof Ll?xs({baseGrammar:s,selfGrammar:o},a):hd(e.ruleName,{baseGrammar:s,selfGrammar:o,repository:o.repository},a);const c=i.injections(e.scopeName);if(c)for(const f of c)a.add(new Ll(f))}function hd(e,n,i){if(n.repository&&n.repository[e]){const a=n.repository[e];Ls([a],n,i)}}function xs(e,n){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ls(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},n),e.selfGrammar.injections&&Ls(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},n)}function Ls(e,n,i){for(const a of e){if(i.visitedRule.has(a))continue;i.visitedRule.add(a);const o=a.repository?xb({},n.repository,a.repository):n.repository;Array.isArray(a.patterns)&&Ls(a.patterns,{...n,repository:o},i);const s=a.include;if(!s)continue;const c=Ob(s);switch(c.kind){case 0:xs({...n,selfGrammar:n.baseGrammar},i);break;case 1:xs(n,i);break;case 2:hd(c.ruleName,{...n,repository:o},i);break;case 3:case 4:const f=c.scopeName===n.selfGrammar.scopeName?n.selfGrammar:c.scopeName===n.baseGrammar.scopeName?n.baseGrammar:void 0;if(f){const d={baseGrammar:n.baseGrammar,selfGrammar:f,repository:o};c.kind===4?hd(c.ruleName,d,i):xs(d,i)}else c.kind===4?i.add(new RE(c.scopeName,c.ruleName)):i.add(new Ll(c.scopeName));break}}}var ME=class{kind=0},IE=class{kind=1},zE=class{constructor(e){this.ruleName=e}kind=2},UE=class{constructor(e){this.scopeName=e}kind=3},HE=class{constructor(e,n){this.scopeName=e,this.ruleName=n}kind=4};function Ob(e){if(e==="$base")return new ME;if(e==="$self")return new IE;const n=e.indexOf("#");if(n===-1)return new UE(e);if(n===0)return new zE(e.substring(1));{const i=e.substring(0,n),a=e.substring(n+1);return new HE(i,a)}}var PE=/\\(\d+)/,L0=/\\(\d+)/g,BE=-1,Nb=-2;var Il=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,n,i,a){this.$location=e,this.id=n,this._name=i||null,this._nameIsCapturing=as.hasCaptures(this._name),this._contentName=a||null,this._contentNameIsCapturing=as.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Cb(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,n){return!this._nameIsCapturing||this._name===null||e===null||n===null?this._name:as.replaceCaptures(this._name,e,n)}getContentName(e,n){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:as.replaceCaptures(this._contentName,e,n)}},VE=class extends Il{retokenizeCapturedWithRuleId;constructor(e,n,i,a,o){super(e,n,i,a),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,n){throw new Error("Not supported!")}compile(e,n){throw new Error("Not supported!")}compileAG(e,n,i,a){throw new Error("Not supported!")}},jE=class extends Il{_match;captures;_cachedCompiledPatterns;constructor(e,n,i,a,o){super(e,n,i,null),this._match=new Rl(a,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,n){n.push(this._match)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,i,a){return this._getCachedCompiledPatterns(e).compileAG(e,i,a)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Dl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},R0=class extends Il{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,n,i,a,o){super(e,n,i,a),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,n){for(const i of this.patterns)e.getRule(i).collectPatterns(e,n)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,i,a){return this._getCachedCompiledPatterns(e).compileAG(e,i,a)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Dl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},pd=class extends Il{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,n,i,a,o,s,c,f,d,p){super(e,n,i,a),this._begin=new Rl(o,this.id),this.beginCaptures=s,this._end=new Rl(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=f,this.applyEndPatternLast=d||!1,this.patterns=p.patterns,this.hasMissingPatterns=p.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,n){return this._end.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e,n).compile(e)}compileAG(e,n,i,a){return this._getCachedCompiledPatterns(e,n).compileAG(e,i,a)}_getCachedCompiledPatterns(e,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Dl;for(const i of this.patterns)e.getRule(i).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,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},Rs=class extends Il{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,n,i,a,o,s,c,f,d){super(e,n,i,a),this._begin=new Rl(o,this.id),this.beginCaptures=s,this.whileCaptures=f,this._while=new Rl(c,Nb),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,n){return this._while.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,i,a){return this._getCachedCompiledPatterns(e).compileAG(e,i,a)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Dl;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,n){return this._getCachedCompiledWhilePatterns(e,n).compile(e)}compileWhileAG(e,n,i,a){return this._getCachedCompiledWhilePatterns(e,n).compileAG(e,i,a)}_getCachedCompiledWhilePatterns(e,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Dl,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||"￿"),this._cachedCompiledWhilePatterns}},Mb=class wt{static createCaptureRule(n,i,a,o,s){return n.registerRule(c=>new VE(i,c,a,o,s))}static getCompiledRuleId(n,i,a){return n.id||i.registerRule(o=>{if(n.id=o,n.match)return new jE(n.$vscodeTextmateLocation,n.id,n.name,n.match,wt._compileCaptures(n.captures,i,a));if(typeof n.begin>"u"){n.repository&&(a=xb({},a,n.repository));let s=n.patterns;return typeof s>"u"&&n.include&&(s=[{include:n.include}]),new R0(n.$vscodeTextmateLocation,n.id,n.name,n.contentName,wt._compilePatterns(s,i,a))}return n.while?new Rs(n.$vscodeTextmateLocation,n.id,n.name,n.contentName,n.begin,wt._compileCaptures(n.beginCaptures||n.captures,i,a),n.while,wt._compileCaptures(n.whileCaptures||n.captures,i,a),wt._compilePatterns(n.patterns,i,a)):new pd(n.$vscodeTextmateLocation,n.id,n.name,n.contentName,n.begin,wt._compileCaptures(n.beginCaptures||n.captures,i,a),n.end,wt._compileCaptures(n.endCaptures||n.captures,i,a),n.applyEndPatternLast,wt._compilePatterns(n.patterns,i,a))}),n.id}static _compileCaptures(n,i,a){let o=[];if(n){let s=0;for(const c in n){if(c==="$vscodeTextmateLocation")continue;const f=parseInt(c,10);f>s&&(s=f)}for(let c=0;c<=s;c++)o[c]=null;for(const c in n){if(c==="$vscodeTextmateLocation")continue;const f=parseInt(c,10);let d=0;n[c].patterns&&(d=wt.getCompiledRuleId(n[c],i,a)),o[f]=wt.createCaptureRule(i,n[c].$vscodeTextmateLocation,n[c].name,n[c].contentName,d)}}return o}static _compilePatterns(n,i,a){let o=[];if(n)for(let s=0,c=n.length;s<c;s++){const f=n[s];let d=-1;if(f.include){const p=Ob(f.include);switch(p.kind){case 0:case 1:d=wt.getCompiledRuleId(a[f.include],i,a);break;case 2:let g=a[p.ruleName];g&&(d=wt.getCompiledRuleId(g,i,a));break;case 3:case 4:const y=p.scopeName,v=p.kind===4?p.ruleName:null,b=i.getExternalGrammar(y,a);if(b)if(v){let S=b.repository[v];S&&(d=wt.getCompiledRuleId(S,i,b.repository))}else d=wt.getCompiledRuleId(b.repository.$self,i,b.repository);break}}else d=wt.getCompiledRuleId(f,i,a);if(d!==-1){const p=i.getRule(d);let g=!1;if((p instanceof R0||p instanceof pd||p instanceof Rs)&&p.hasMissingPatterns&&p.patterns.length===0&&(g=!0),g)continue;o.push(d)}}return{patterns:o,hasMissingPatterns:(n?n.length:0)!==o.length}}},Rl=class Ib{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(n,i){if(n&&typeof n=="string"){const a=n.length;let o=0,s=[],c=!1;for(let f=0;f<a;f++)if(n.charAt(f)==="\\"&&f+1<a){const p=n.charAt(f+1);p==="z"?(s.push(n.substring(o,f)),s.push("$(?!\\n)(?<!\\n)"),o=f+2):(p==="A"||p==="G")&&(c=!0),f++}this.hasAnchor=c,o===0?this.source=n:(s.push(n.substring(o,a)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=n;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=i,typeof this.source=="string"?this.hasBackReferences=PE.test(this.source):this.hasBackReferences=!1}clone(){return new Ib(this.source,this.ruleId)}setSource(n){this.source!==n&&(this.source=n,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(n,i){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let a=i.map(o=>n.substring(o.start,o.end));return L0.lastIndex=0,this.source.replace(L0,(o,s)=>kb(a[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=[],i=[],a=[],o=[],s,c,f,d;for(s=0,c=this.source.length;s<c;s++)f=this.source.charAt(s),n[s]=f,i[s]=f,a[s]=f,o[s]=f,f==="\\"&&s+1<c&&(d=this.source.charAt(s+1),d==="A"?(n[s+1]="￿",i[s+1]="￿",a[s+1]="A",o[s+1]="A"):d==="G"?(n[s+1]="￿",i[s+1]="G",a[s+1]="￿",o[s+1]="G"):(n[s+1]=d,i[s+1]=d,a[s+1]=d,o[s+1]=d),s++);return{A0_G0:n.join(""),A0_G1:i.join(""),A1_G0:a.join(""),A1_G1:o.join("")}}resolveAnchors(n,i){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:n?i?this._anchorCache.A1_G1:this._anchorCache.A1_G0:i?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Dl=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,n){this._items[e].source!==n&&(this._disposeCaches(),this._items[e].setSource(n))}compile(e){if(!this._cached){let n=this._items.map(i=>i.source);this._cached=new D0(e,n,this._items.map(i=>i.ruleId))}return this._cached}compileAG(e,n,i){return this._hasAnchors?n?i?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,n,i)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,n,i)),this._anchorCache.A1_G0):i?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,n,i)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,n,i)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,n,i){let a=this._items.map(o=>o.resolveAnchors(n,i));return new D0(e,a,this._items.map(o=>o.ruleId))}},D0=class{constructor(e,n,i){this.regExps=n,this.rules=i,this.scanner=e.createOnigScanner(n)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let n=0,i=this.rules.length;n<i;n++)e.push(" - "+this.rules[n]+": "+this.regExps[n]);return e.join(`
11
- `)}findNextMatchSync(e,n,i){const a=this.scanner.findNextMatchSync(e,n,i);return a?{ruleId:this.rules[a.index],captureIndices:a.captureIndices}:null}},Tf=class{constructor(e,n){this.languageId=e,this.tokenType=n}},GE=class md{_defaultAttributes;_embeddedLanguagesMatcher;constructor(n,i){this._defaultAttributes=new Tf(n,8),this._embeddedLanguagesMatcher=new qE(Object.entries(i||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(n){return n===null?md._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(n)}static _NULL_SCOPE_METADATA=new Tf(0,0);_getBasicScopeAttributes=new Tb(n=>{const i=this._scopeToLanguage(n),a=this._toStandardTokenType(n);return new Tf(i,a)});_scopeToLanguage(n){return this._embeddedLanguagesMatcher.match(n)||0}_toStandardTokenType(n){const i=n.match(md.STANDARD_TOKEN_TYPE_REGEXP);if(!i)return 8;switch(i[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/},qE=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const n=e.map(([i,a])=>kb(i));n.sort(),n.reverse(),this.scopesRegExp=new RegExp(`^((${n.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const n=e.match(this.scopesRegExp);if(n)return this.values.get(n[1])}},O0=class{constructor(e,n){this.stack=e,this.stoppedEarly=n}};function zb(e,n,i,a,o,s,c,f){const d=n.content.length;let p=!1,g=-1;if(c){const b=$E(e,n,i,a,o,s);o=b.stack,a=b.linePos,i=b.isFirstLine,g=b.anchorPosition}const y=Date.now();for(;!p;){if(f!==0&&Date.now()-y>f)return new O0(o,!0);v()}return new O0(o,!1);function v(){const b=FE(e,n,i,a,o,g);if(!b){s.produce(o,d),p=!0;return}const S=b.captureIndices,k=b.matchedRuleId,O=S&&S.length>0?S[0].end>a:!1;if(k===BE){const A=o.getRule(e);s.produce(o,S[0].start),o=o.withContentNameScopesList(o.nameScopesList),Sl(e,n,i,o,s,A.endCaptures,S),s.produce(o,S[0].end);const T=o;if(o=o.parent,g=T.getAnchorPos(),!O&&T.getEnterPos()===a){o=T,s.produce(o,d),p=!0;return}}else{const A=e.getRule(k);s.produce(o,S[0].start);const T=o,L=A.getName(n.content,S),U=o.contentNameScopesList.pushAttributed(L,e);if(o=o.push(k,a,g,S[0].end===d,null,U,U),A instanceof pd){const B=A;Sl(e,n,i,o,s,B.beginCaptures,S),s.produce(o,S[0].end),g=S[0].end;const N=B.getContentName(n.content,S),G=U.pushAttributed(N,e);if(o=o.withContentNameScopesList(G),B.endHasBackReferences&&(o=o.withEndRule(B.getEndWithResolvedBackReferences(n.content,S))),!O&&T.hasSameRuleAs(o)){o=o.pop(),s.produce(o,d),p=!0;return}}else if(A instanceof Rs){const B=A;Sl(e,n,i,o,s,B.beginCaptures,S),s.produce(o,S[0].end),g=S[0].end;const N=B.getContentName(n.content,S),G=U.pushAttributed(N,e);if(o=o.withContentNameScopesList(G),B.whileHasBackReferences&&(o=o.withEndRule(B.getWhileWithResolvedBackReferences(n.content,S))),!O&&T.hasSameRuleAs(o)){o=o.pop(),s.produce(o,d),p=!0;return}}else if(Sl(e,n,i,o,s,A.captures,S),s.produce(o,S[0].end),o=o.pop(),!O){o=o.safePop(),s.produce(o,d),p=!0;return}}S[0].end>a&&(a=S[0].end,i=!1)}}function $E(e,n,i,a,o,s){let c=o.beginRuleCapturedEOL?0:-1;const f=[];for(let d=o;d;d=d.pop()){const p=d.getRule(e);p instanceof Rs&&f.push({rule:p,stack:d})}for(let d=f.pop();d;d=f.pop()){const{ruleScanner:p,findOptions:g}=QE(d.rule,e,d.stack.endRule,i,a===c),y=p.findNextMatchSync(n,a,g);if(y){if(y.ruleId!==Nb){o=d.stack.pop();break}y.captureIndices&&y.captureIndices.length&&(s.produce(d.stack,y.captureIndices[0].start),Sl(e,n,i,d.stack,s,d.rule.whileCaptures,y.captureIndices),s.produce(d.stack,y.captureIndices[0].end),c=y.captureIndices[0].end,y.captureIndices[0].end>a&&(a=y.captureIndices[0].end,i=!1))}else{o=d.stack.pop();break}}return{stack:o,linePos:a,anchorPosition:c,isFirstLine:i}}function FE(e,n,i,a,o,s){const c=YE(e,n,i,a,o,s),f=e.getInjections();if(f.length===0)return c;const d=XE(f,e,n,i,a,o,s);if(!d)return c;if(!c)return d;const p=c.captureIndices[0].start,g=d.captureIndices[0].start;return g<p||d.priorityMatch&&g===p?d:c}function YE(e,n,i,a,o,s){const c=o.getRule(e),{ruleScanner:f,findOptions:d}=Ub(c,e,o.endRule,i,a===s),p=f.findNextMatchSync(n,a,d);return p?{captureIndices:p.captureIndices,matchedRuleId:p.ruleId}:null}function XE(e,n,i,a,o,s,c){let f=Number.MAX_VALUE,d=null,p,g=0;const y=s.contentNameScopesList.getScopeNames();for(let v=0,b=e.length;v<b;v++){const S=e[v];if(!S.matcher(y))continue;const k=n.getRule(S.ruleId),{ruleScanner:O,findOptions:A}=Ub(k,n,null,a,o===c),T=O.findNextMatchSync(i,o,A);if(!T)continue;const L=T.captureIndices[0].start;if(!(L>=f)&&(f=L,d=T.captureIndices,p=T.ruleId,g=S.priority,f===o))break}return d?{priorityMatch:g===-1,captureIndices:d,matchedRuleId:p}:null}function Ub(e,n,i,a,o){return{ruleScanner:e.compileAG(n,i,a,o),findOptions:0}}function QE(e,n,i,a,o){return{ruleScanner:e.compileWhileAG(n,i,a,o),findOptions:0}}function Sl(e,n,i,a,o,s,c){if(s.length===0)return;const f=n.content,d=Math.min(s.length,c.length),p=[],g=c[0].end;for(let y=0;y<d;y++){const v=s[y];if(v===null)continue;const b=c[y];if(b.length===0)continue;if(b.start>g)break;for(;p.length>0&&p[p.length-1].endPos<=b.start;)o.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop();if(p.length>0?o.produceFromScopes(p[p.length-1].scopes,b.start):o.produce(a,b.start),v.retokenizeCapturedWithRuleId){const k=v.getName(f,c),O=a.contentNameScopesList.pushAttributed(k,e),A=v.getContentName(f,c),T=O.pushAttributed(A,e),L=a.push(v.retokenizeCapturedWithRuleId,b.start,-1,!1,null,O,T),U=e.createOnigString(f.substring(0,b.end));zb(e,U,i&&b.start===0,b.start,L,o,!1,0),Db(U);continue}const S=v.getName(f,c);if(S!==null){const O=(p.length>0?p[p.length-1].scopes:a.contentNameScopesList).pushAttributed(S,e);p.push(new ZE(O,b.end))}}for(;p.length>0;)o.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop()}var ZE=class{scopes;endPos;constructor(e,n){this.scopes=e,this.endPos=n}};function KE(e,n,i,a,o,s,c,f){return new JE(e,n,i,a,o,s,c,f)}function N0(e,n,i,a,o){const s=Ts(n,Ds),c=Mb.getCompiledRuleId(i,a,o.repository);for(const f of s)e.push({debugSelector:n,matcher:f.matcher,ruleId:c,grammar:o,priority:f.priority})}function Ds(e,n){if(n.length<e.length)return!1;let i=0;return e.every(a=>{for(let o=i;o<n.length;o++)if(WE(n[o],a))return i=o+1,!0;return!1})}function WE(e,n){if(!e)return!1;if(e===n)return!0;const i=n.length;return e.length>i&&e.substr(0,i)===n&&e[i]==="."}var JE=class{constructor(e,n,i,a,o,s,c,f){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=f,this._basicScopeAttributesProvider=new GE(i,a),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=c,this._grammar=M0(n,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const d of Object.keys(o)){const p=Ts(d,Ds);for(const g of p)this._tokenTypeMatchers.push({matcher:g.matcher,type:o[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:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},n=[],i=this._rootScopeName,a=e.lookup(i);if(a){const o=a.injections;if(o)for(let c in o)N0(n,c,o[c],this,a);const s=this._grammarRepository.injections(i);s&&s.forEach(c=>{const f=this.getExternalGrammar(c);if(f){const d=f.injectionSelector;d&&N0(n,d,f,this,f)}})}return n.sort((o,s)=>o.priority-s.priority),n}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const n=++this._lastRuleId,i=e(n);return this._ruleId2desc[n]=i,i}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,n){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const i=this._grammarRepository.lookup(e);if(i)return this._includedGrammars[e]=M0(i,n&&n.$base),this._includedGrammars[e]}}tokenizeLine(e,n,i=0){const a=this._tokenize(e,n,!1,i);return{tokens:a.lineTokens.getResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}tokenizeLine2(e,n,i=0){const a=this._tokenize(e,n,!0,i);return{tokens:a.lineTokens.getBinaryResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}_tokenize(e,n,i,a){this._rootId===-1&&(this._rootId=Mb.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!n||n===gd.NULL){o=!0;const p=this._basicScopeAttributesProvider.getDefaultAttributes(),g=this.themeProvider.getDefaults(),y=da.set(0,p.languageId,p.tokenType,null,g.fontStyle,g.foregroundId,g.backgroundId),v=this.getRule(this._rootId).getName(null,null);let b;v?b=El.createRootAndLookUpScopeName(v,y,this):b=El.createRoot("unknown",y),n=new gd(null,this._rootId,-1,-1,!1,null,b,b)}else o=!1,n.reset();e=e+`
12
- `;const s=this.createOnigString(e),c=s.content.length,f=new tx(i,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=zb(this,s,o,0,n,f,!0,a);return Db(s),{lineLength:c,lineTokens:f,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function M0(e,n){return e=bE(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=n||e.repository.$self,e}var El=class Tn{constructor(n,i,a){this.parent=n,this.scopePath=i,this.tokenAttributes=a}static fromExtension(n,i){let a=n,o=n?.scopePath??null;for(const s of i)o=kf.push(o,s.scopeNames),a=new Tn(a,o,s.encodedTokenAttributes);return a}static createRoot(n,i){return new Tn(null,new kf(null,n),i)}static createRootAndLookUpScopeName(n,i,a){const o=a.getMetadataForScope(n),s=new kf(null,n),c=a.themeProvider.themeMatch(s),f=Tn.mergeAttributes(i,o,c);return new Tn(null,s,f)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(n){return Tn.equals(this,n)}static equals(n,i){do{if(n===i||!n&&!i)return!0;if(!n||!i||n.scopeName!==i.scopeName||n.tokenAttributes!==i.tokenAttributes)return!1;n=n.parent,i=i.parent}while(!0)}static mergeAttributes(n,i,a){let o=-1,s=0,c=0;return a!==null&&(o=a.fontStyle,s=a.foregroundId,c=a.backgroundId),da.set(n,i.languageId,i.tokenType,null,o,s,c)}pushAttributed(n,i){if(n===null)return this;if(n.indexOf(" ")===-1)return Tn._pushAttributed(this,n,i);const a=n.split(/ /g);let o=this;for(const s of a)o=Tn._pushAttributed(o,s,i);return o}static _pushAttributed(n,i,a){const o=a.getMetadataForScope(i),s=n.scopePath.push(i),c=a.themeProvider.themeMatch(s),f=Tn.mergeAttributes(n.tokenAttributes,o,c);return new Tn(n,s,f)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(n){const i=[];let a=this;for(;a&&a!==n;)i.push({encodedTokenAttributes:a.tokenAttributes,scopeNames:a.scopePath.getExtensionIfDefined(a.parent?.scopePath??null)}),a=a.parent;return a===n?i.reverse():void 0}},gd=class ir{constructor(n,i,a,o,s,c,f,d){this.parent=n,this.ruleId=i,this.beginRuleCapturedEOL=s,this.endRule=c,this.nameScopesList=f,this.contentNameScopesList=d,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=a,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new ir(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(n){return n===null?!1:ir._equals(this,n)}static _equals(n,i){return n===i?!0:this._structuralEquals(n,i)?El.equals(n.contentNameScopesList,i.contentNameScopesList):!1}static _structuralEquals(n,i){do{if(n===i||!n&&!i)return!0;if(!n||!i||n.depth!==i.depth||n.ruleId!==i.ruleId||n.endRule!==i.endRule)return!1;n=n.parent,i=i.parent}while(!0)}clone(){return this}static _reset(n){for(;n;)n._enterPos=-1,n._anchorPos=-1,n=n.parent}reset(){ir._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(n,i,a,o,s,c,f){return new ir(this,n,i,a,o,s,c,f)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(n){return n.getRule(this.ruleId)}toString(){const n=[];return this._writeString(n,0),"["+n.join(",")+"]"}_writeString(n,i){return this.parent&&(i=this.parent._writeString(n,i)),n[i++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,i}withContentNameScopesList(n){return this.contentNameScopesList===n?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,n)}withEndRule(n){return this.endRule===n?this:new ir(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,n,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(n){let i=this;for(;i&&i._enterPos===n._enterPos;){if(i.ruleId===n.ruleId)return!0;i=i.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(n,i){const a=El.fromExtension(n?.nameScopesList??null,i.nameScopesList);return new ir(n,i.ruleId,i.enterPos??-1,i.anchorPos??-1,i.beginRuleCapturedEOL,i.endRule,a,El.fromExtension(a,i.contentNameScopesList))}},ex=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,n){this.balancedBracketScopes=e.flatMap(i=>i==="*"?(this.allowAny=!0,[]):Ts(i,Ds).map(a=>a.matcher)),this.unbalancedBracketScopes=n.flatMap(i=>Ts(i,Ds).map(a=>a.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const n of this.unbalancedBracketScopes)if(n(e))return!1;for(const n of this.balancedBracketScopes)if(n(e))return!0;return this.allowAny}},tx=class{constructor(e,n,i,a){this.balancedBracketSelectors=a,this._emitBinaryTokens=e,this._tokenTypeOverrides=i,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,n){this.produceFromScopes(e.contentNameScopesList,n)}produceFromScopes(e,n){if(this._lastTokenEndIndex>=n)return;if(this._emitBinaryTokens){let a=e?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=e?.getScopeNames()??[];for(const c of this._tokenTypeOverrides)c.matcher(s)&&(a=da.set(a,0,c.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(a=da.set(a,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===a){this._lastTokenEndIndex=n;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(a),this._lastTokenEndIndex=n;return}const i=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:n,scopes:i}),this._lastTokenEndIndex=n}getResult(e,n){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===n-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,n),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,n){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===n-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,n),this._binaryTokens[this._binaryTokens.length-2]=0);const i=new Uint32Array(this._binaryTokens.length);for(let a=0,o=this._binaryTokens.length;a<o;a++)i[a]=this._binaryTokens[a];return i}},nx=class{constructor(e,n){this._onigLib=n,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,n){this._rawGrammars.set(e.scopeName,e),n&&this._injectionGrammars.set(e.scopeName,n)}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,n,i,a,o){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,KE(e,s,n,i,a,o,this,this._onigLib))}return this._grammars.get(e)}},ix=class{_options;_syncRegistry;_ensureGrammarCache;constructor(n){this._options=n,this._syncRegistry=new nx(ks.createFromRawTheme(n.theme,n.colorMap),n.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(n,i){this._syncRegistry.setTheme(ks.createFromRawTheme(n,i))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(n,i,a){return this.loadGrammarWithConfiguration(n,i,{embeddedLanguages:a})}loadGrammarWithConfiguration(n,i,a){return this._loadGrammar(n,i,a.embeddedLanguages,a.tokenTypes,new ex(a.balancedBracketSelectors||[],a.unbalancedBracketSelectors||[]))}loadGrammar(n){return this._loadGrammar(n,0,null,null,null)}_loadGrammar(n,i,a,o,s){const c=new OE(this._syncRegistry,n);for(;c.Q.length>0;)c.Q.map(f=>this._loadSingleGrammar(f.scopeName)),c.processQueue();return this._grammarForScopeName(n,i,a,o,s)}_loadSingleGrammar(n){this._ensureGrammarCache.has(n)||(this._doLoadSingleGrammar(n),this._ensureGrammarCache.set(n,!0))}_doLoadSingleGrammar(n){const i=this._options.loadGrammar(n);if(i){const a=typeof this._options.getInjections=="function"?this._options.getInjections(n):void 0;this._syncRegistry.addGrammar(i,a)}}addGrammar(n,i=[],a=0,o=null){return this._syncRegistry.addGrammar(n,i),this._grammarForScopeName(n.scopeName,a,o)}_grammarForScopeName(n,i=0,a=null,o=null,s=null){return this._syncRegistry.grammarForScopeName(n,i,a,o,s)}},yd=gd.NULL;const rx=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class zl{constructor(n,i,a){this.normal=i,this.property=n,a&&(this.space=a)}}zl.prototype.normal={};zl.prototype.property={};zl.prototype.space=void 0;function Hb(e,n){const i={},a={};for(const o of e)Object.assign(i,o.property),Object.assign(a,o.normal);return new zl(i,a,n)}function bd(e){return e.toLowerCase()}class jt{constructor(n,i){this.attribute=i,this.property=n}}jt.prototype.attribute="";jt.prototype.booleanish=!1;jt.prototype.boolean=!1;jt.prototype.commaOrSpaceSeparated=!1;jt.prototype.commaSeparated=!1;jt.prototype.defined=!1;jt.prototype.mustUseProperty=!1;jt.prototype.number=!1;jt.prototype.overloadedBoolean=!1;jt.prototype.property="";jt.prototype.spaceSeparated=!1;jt.prototype.space=void 0;let ax=0;const Ce=ur(),st=ur(),vd=ur(),re=ur(),Fe=ur(),sa=ur(),Kt=ur();function ur(){return 2**++ax}const _d=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ce,booleanish:st,commaOrSpaceSeparated:Kt,commaSeparated:sa,number:re,overloadedBoolean:vd,spaceSeparated:Fe},Symbol.toStringTag,{value:"Module"})),Lf=Object.keys(_d);class Gd extends jt{constructor(n,i,a,o){let s=-1;if(super(n,i),I0(this,"space",o),typeof a=="number")for(;++s<Lf.length;){const c=Lf[s];I0(this,Lf[s],(a&_d[c])===_d[c])}}}Gd.prototype.defined=!0;function I0(e,n,i){i&&(e[n]=i)}function ma(e){const n={},i={};for(const[a,o]of Object.entries(e.properties)){const s=new Gd(a,e.transform(e.attributes||{},a),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(s.mustUseProperty=!0),n[a]=s,i[bd(a)]=a,i[bd(s.attribute)]=a}return new zl(n,i,e.space)}const Pb=ma({properties:{ariaActiveDescendant:null,ariaAtomic:st,ariaAutoComplete:null,ariaBusy:st,ariaChecked:st,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:Fe,ariaCurrent:null,ariaDescribedBy:Fe,ariaDetails:null,ariaDisabled:st,ariaDropEffect:Fe,ariaErrorMessage:null,ariaExpanded:st,ariaFlowTo:Fe,ariaGrabbed:st,ariaHasPopup:null,ariaHidden:st,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Fe,ariaLevel:re,ariaLive:null,ariaModal:st,ariaMultiLine:st,ariaMultiSelectable:st,ariaOrientation:null,ariaOwns:Fe,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:st,ariaReadOnly:st,ariaRelevant:null,ariaRequired:st,ariaRoleDescription:Fe,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:st,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Bb(e,n){return n in e?e[n]:n}function Vb(e,n){return Bb(e,n.toLowerCase())}const lx=ma({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:sa,acceptCharset:Fe,accessKey:Fe,action:null,allow:null,allowFullScreen:Ce,allowPaymentRequest:Ce,allowUserMedia:Ce,alt:null,as:null,async:Ce,autoCapitalize:null,autoComplete:Fe,autoFocus:Ce,autoPlay:Ce,blocking:Fe,capture:null,charSet:null,checked:Ce,cite:null,className:Fe,cols:re,colSpan:null,content:null,contentEditable:st,controls:Ce,controlsList:Fe,coords:re|sa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ce,defer:Ce,dir:null,dirName:null,disabled:Ce,download:vd,draggable:st,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ce,formTarget:null,headers:Fe,height:re,hidden:vd,high:re,href:null,hrefLang:null,htmlFor:Fe,httpEquiv:Fe,id:null,imageSizes:null,imageSrcSet:null,inert:Ce,inputMode:null,integrity:null,is:null,isMap:Ce,itemId:null,itemProp:Fe,itemRef:Fe,itemScope:Ce,itemType:Fe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ce,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:Ce,muted:Ce,name:null,nonce:null,noModule:Ce,noValidate:Ce,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:Ce,optimum:re,pattern:null,ping:Fe,placeholder:null,playsInline:Ce,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ce,referrerPolicy:null,rel:Fe,required:Ce,reversed:Ce,rows:re,rowSpan:re,sandbox:Fe,scope:null,scoped:Ce,seamless:Ce,selected:Ce,shadowRootClonable:Ce,shadowRootDelegatesFocus:Ce,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:st,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:Ce,useMap:null,value:st,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Fe,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ce,declare:Ce,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:Ce,noHref:Ce,noShade:Ce,noWrap:Ce,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:st,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ce,disableRemotePlayback:Ce,prefix:null,property:null,results:re,security:null,unselectable:null},space:"html",transform:Vb}),ox=ma({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:Kt,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:Fe,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:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:Ce,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,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:sa,g2:sa,glyphName:sa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:Kt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,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:re,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:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Fe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Kt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Kt,rev:Kt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Kt,requiredFeatures:Kt,requiredFonts:Kt,requiredFormats:Kt,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:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:Kt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Kt,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Kt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Bb}),jb=ma({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Gb=ma({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Vb}),qb=ma({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),sx={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"},ux=/[A-Z]/g,z0=/-[a-z]/g,cx=/^data[-\w.:]+$/i;function $b(e,n){const i=bd(n);let a=n,o=jt;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&cx.test(n)){if(n.charAt(4)==="-"){const s=n.slice(5).replace(z0,dx);a="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=n.slice(4);if(!z0.test(s)){let c=s.replace(ux,fx);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}o=Gd}return new o(a,n)}function fx(e){return"-"+e.toLowerCase()}function dx(e){return e.charAt(1).toUpperCase()}const Fb=Hb([Pb,lx,jb,Gb,qb],"html"),Ul=Hb([Pb,ox,jb,Gb,qb],"svg"),U0={}.hasOwnProperty;function hx(e,n){const i=n||{};function a(o,...s){let c=a.invalid;const f=a.handlers;if(o&&U0.call(o,e)){const d=String(o[e]);c=U0.call(f,d)?f[d]:a.unknown}if(c)return c.call(this,o,...s)}return a.handlers=i.handlers||{},a.invalid=i.invalid,a.unknown=i.unknown,a}const px=/["&'<>`]/g,mx=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,gx=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,yx=/[|\\{}()[\]^$+*?.]/g,H0=new WeakMap;function bx(e,n){if(e=e.replace(n.subset?vx(n.subset):px,a),n.subset||n.escapeOnly)return e;return e.replace(mx,i).replace(gx,a);function i(o,s,c){return n.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,c.charCodeAt(s+2),n)}function a(o,s,c){return n.format(o.charCodeAt(0),c.charCodeAt(s+1),n)}}function vx(e){let n=H0.get(e);return n||(n=_x(e),H0.set(e,n)),n}function _x(e){const n=[];let i=-1;for(;++i<e.length;)n.push(e[i].replace(yx,"\\$&"));return new RegExp("(?:"+n.join("|")+")","g")}const Sx=/[\dA-Fa-f]/;function Ex(e,n,i){const a="&#x"+e.toString(16).toUpperCase();return i&&n&&!Sx.test(String.fromCharCode(n))?a:a+";"}const xx=/\d/;function Cx(e,n,i){const a="&#"+String(e);return i&&n&&!xx.test(String.fromCharCode(n))?a:a+";"}const wx=["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"],Rf={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:"€"},Ax=["cent","copy","divide","gt","lt","not","para","times"],Yb={}.hasOwnProperty,Sd={};let ls;for(ls in Rf)Yb.call(Rf,ls)&&(Sd[Rf[ls]]=ls);const kx=/[^\dA-Za-z]/;function Tx(e,n,i,a){const o=String.fromCharCode(e);if(Yb.call(Sd,o)){const s=Sd[o],c="&"+s;return i&&wx.includes(s)&&!Ax.includes(s)&&(!a||n&&n!==61&&kx.test(String.fromCharCode(n)))?c:c+";"}return""}function Lx(e,n,i){let a=Ex(e,n,i.omitOptionalSemicolons),o;if((i.useNamedReferences||i.useShortestReferences)&&(o=Tx(e,n,i.omitOptionalSemicolons,i.attribute)),(i.useShortestReferences||!o)&&i.useShortestReferences){const s=Cx(e,n,i.omitOptionalSemicolons);s.length<a.length&&(a=s)}return o&&(!i.useShortestReferences||o.length<a.length)?o:a}function ua(e,n){return bx(e,Object.assign({format:Lx},n))}const Rx=/^>|^->|<!--|-->|--!>|<!-$/g,Dx=[">"],Ox=["<",">"];function Nx(e,n,i,a){return a.settings.bogusComments?"<?"+ua(e.value,Object.assign({},a.settings.characterReferences,{subset:Dx}))+">":"<!--"+e.value.replace(Rx,o)+"-->";function o(s){return ua(s,Object.assign({},a.settings.characterReferences,{subset:Ox}))}}function Mx(e,n,i,a){return"<!"+(a.settings.upperDoctype?"DOCTYPE":"doctype")+(a.settings.tightDoctype?"":" ")+"html>"}function P0(e,n){const i=String(e);if(typeof n!="string")throw new TypeError("Expected character");let a=0,o=i.indexOf(n);for(;o!==-1;)a++,o=i.indexOf(n,o+n.length);return a}function Xb(e,n){const i=n||{};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}function Qb(e){return e.join(" ").trim()}const Ix=/[ \t\n\f\r]/g;function js(e){return typeof e=="object"?e.type==="text"?B0(e.value):!1:B0(e)}function B0(e){return e.replace(Ix,"")===""}const pt=Kb(1),Zb=Kb(-1),zx=[];function Kb(e){return n;function n(i,a,o){const s=i?i.children:zx;let c=(a||0)+e,f=s[c];if(!o)for(;f&&js(f);)c+=e,f=s[c];return f}}const Ux={}.hasOwnProperty;function Wb(e){return n;function n(i,a,o){return Ux.call(e,i.tagName)&&e[i.tagName](i,a,o)}}const qd=Wb({body:Px,caption:Df,colgroup:Df,dd:Gx,dt:jx,head:Df,html:Hx,li:Vx,optgroup:qx,option:$x,p:Bx,rp:V0,rt:V0,tbody:Yx,td:j0,tfoot:Xx,th:j0,thead:Fx,tr:Qx});function Df(e,n,i){const a=pt(i,n,!0);return!a||a.type!=="comment"&&!(a.type==="text"&&js(a.value.charAt(0)))}function Hx(e,n,i){const a=pt(i,n);return!a||a.type!=="comment"}function Px(e,n,i){const a=pt(i,n);return!a||a.type!=="comment"}function Bx(e,n,i){const a=pt(i,n);return a?a.type==="element"&&(a.tagName==="address"||a.tagName==="article"||a.tagName==="aside"||a.tagName==="blockquote"||a.tagName==="details"||a.tagName==="div"||a.tagName==="dl"||a.tagName==="fieldset"||a.tagName==="figcaption"||a.tagName==="figure"||a.tagName==="footer"||a.tagName==="form"||a.tagName==="h1"||a.tagName==="h2"||a.tagName==="h3"||a.tagName==="h4"||a.tagName==="h5"||a.tagName==="h6"||a.tagName==="header"||a.tagName==="hgroup"||a.tagName==="hr"||a.tagName==="main"||a.tagName==="menu"||a.tagName==="nav"||a.tagName==="ol"||a.tagName==="p"||a.tagName==="pre"||a.tagName==="section"||a.tagName==="table"||a.tagName==="ul"):!i||!(i.type==="element"&&(i.tagName==="a"||i.tagName==="audio"||i.tagName==="del"||i.tagName==="ins"||i.tagName==="map"||i.tagName==="noscript"||i.tagName==="video"))}function Vx(e,n,i){const a=pt(i,n);return!a||a.type==="element"&&a.tagName==="li"}function jx(e,n,i){const a=pt(i,n);return!!(a&&a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd"))}function Gx(e,n,i){const a=pt(i,n);return!a||a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd")}function V0(e,n,i){const a=pt(i,n);return!a||a.type==="element"&&(a.tagName==="rp"||a.tagName==="rt")}function qx(e,n,i){const a=pt(i,n);return!a||a.type==="element"&&a.tagName==="optgroup"}function $x(e,n,i){const a=pt(i,n);return!a||a.type==="element"&&(a.tagName==="option"||a.tagName==="optgroup")}function Fx(e,n,i){const a=pt(i,n);return!!(a&&a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot"))}function Yx(e,n,i){const a=pt(i,n);return!a||a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot")}function Xx(e,n,i){return!pt(i,n)}function Qx(e,n,i){const a=pt(i,n);return!a||a.type==="element"&&a.tagName==="tr"}function j0(e,n,i){const a=pt(i,n);return!a||a.type==="element"&&(a.tagName==="td"||a.tagName==="th")}const Zx=Wb({body:Jx,colgroup:eC,head:Wx,html:Kx,tbody:tC});function Kx(e){const n=pt(e,-1);return!n||n.type!=="comment"}function Wx(e){const n=new Set;for(const a of e.children)if(a.type==="element"&&(a.tagName==="base"||a.tagName==="title")){if(n.has(a.tagName))return!1;n.add(a.tagName)}const i=e.children[0];return!i||i.type==="element"}function Jx(e){const n=pt(e,-1,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&js(n.value.charAt(0)))&&!(n.type==="element"&&(n.tagName==="meta"||n.tagName==="link"||n.tagName==="script"||n.tagName==="style"||n.tagName==="template"))}function eC(e,n,i){const a=Zb(i,n),o=pt(e,-1,!0);return i&&a&&a.type==="element"&&a.tagName==="colgroup"&&qd(a,i.children.indexOf(a),i)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function tC(e,n,i){const a=Zb(i,n),o=pt(e,-1);return i&&a&&a.type==="element"&&(a.tagName==="thead"||a.tagName==="tbody")&&qd(a,i.children.indexOf(a),i)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const os={name:[[`
13
- \f\r &/=>`.split(""),`
14
- \f\r "&'/=>\``.split("")],[`\0
15
- \f\r "&'/<=>`.split(""),`\0
16
- \f\r "&'/<=>\``.split("")]],unquoted:[[`
17
- \f\r &>`.split(""),`\0
18
- \f\r "&'<=>\``.split("")],[`\0
19
- \f\r "&'<=>\``.split(""),`\0
20
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function nC(e,n,i,a){const o=a.schema,s=o.space==="svg"?!1:a.settings.omitOptionalTags;let c=o.space==="svg"?a.settings.closeEmptyElements:a.settings.voids.includes(e.tagName.toLowerCase());const f=[];let d;o.space==="html"&&e.tagName==="svg"&&(a.schema=Ul);const p=iC(a,e.properties),g=a.all(o.space==="html"&&e.tagName==="template"?e.content:e);return a.schema=o,g&&(c=!1),(p||!s||!Zx(e,n,i))&&(f.push("<",e.tagName,p?" "+p:""),c&&(o.space==="svg"||a.settings.closeSelfClosing)&&(d=p.charAt(p.length-1),(!a.settings.tightSelfClosing||d==="/"||d&&d!=='"'&&d!=="'")&&f.push(" "),f.push("/")),f.push(">")),f.push(g),!c&&(!s||!qd(e,n,i))&&f.push("</"+e.tagName+">"),f.join("")}function iC(e,n){const i=[];let a=-1,o;if(n){for(o in n)if(n[o]!==null&&n[o]!==void 0){const s=rC(e,o,n[o]);s&&i.push(s)}}for(;++a<i.length;){const s=e.settings.tightAttributes?i[a].charAt(i[a].length-1):void 0;a!==i.length-1&&s!=='"'&&s!=="'"&&(i[a]+=" ")}return i.join("")}function rC(e,n,i){const a=$b(e.schema,n),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let c=e.quote,f;if(a.overloadedBoolean&&(i===a.attribute||i==="")?i=!0:(a.boolean||a.overloadedBoolean)&&(typeof i!="string"||i===a.attribute||i==="")&&(i=!!i),i==null||i===!1||typeof i=="number"&&Number.isNaN(i))return"";const d=ua(a.attribute,Object.assign({},e.settings.characterReferences,{subset:os.name[o][s]}));return i===!0||(i=Array.isArray(i)?(a.commaSeparated?Xb:Qb)(i,{padLeft:!e.settings.tightCommaSeparatedLists}):String(i),e.settings.collapseEmptyAttributes&&!i)?d:(e.settings.preferUnquoted&&(f=ua(i,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:os.unquoted[o][s]}))),f!==i&&(e.settings.quoteSmart&&P0(i,c)>P0(i,e.alternative)&&(c=e.alternative),f=c+ua(i,Object.assign({},e.settings.characterReferences,{subset:(c==="'"?os.single:os.double)[o][s],attribute:!0}))+c),d+(f&&"="+f))}const aC=["<","&"];function Jb(e,n,i,a){return i&&i.type==="element"&&(i.tagName==="script"||i.tagName==="style")?e.value:ua(e.value,Object.assign({},a.settings.characterReferences,{subset:aC}))}function lC(e,n,i,a){return a.settings.allowDangerousHtml?e.value:Jb(e,n,i,a)}function oC(e,n,i,a){return a.all(e)}const sC=hx("type",{invalid:uC,unknown:cC,handlers:{comment:Nx,doctype:Mx,element:nC,raw:lC,root:oC,text:Jb}});function uC(e){throw new Error("Expected node, not `"+e+"`")}function cC(e){const n=e;throw new Error("Cannot compile unknown node `"+n.type+"`")}const fC={},dC={},hC=[];function ca(e,n){const i=n||fC,a=i.quote||'"',o=a==='"'?"'":'"';if(a!=='"'&&a!=="'")throw new Error("Invalid quote `"+a+"`, expected `'` or `\"`");return{one:pC,all:mC,settings:{omitOptionalTags:i.omitOptionalTags||!1,allowParseErrors:i.allowParseErrors||!1,allowDangerousCharacters:i.allowDangerousCharacters||!1,quoteSmart:i.quoteSmart||!1,preferUnquoted:i.preferUnquoted||!1,tightAttributes:i.tightAttributes||!1,upperDoctype:i.upperDoctype||!1,tightDoctype:i.tightDoctype||!1,bogusComments:i.bogusComments||!1,tightCommaSeparatedLists:i.tightCommaSeparatedLists||!1,tightSelfClosing:i.tightSelfClosing||!1,collapseEmptyAttributes:i.collapseEmptyAttributes||!1,allowDangerousHtml:i.allowDangerousHtml||!1,voids:i.voids||rx,characterReferences:i.characterReferences||dC,closeSelfClosing:i.closeSelfClosing||!1,closeEmptyElements:i.closeEmptyElements||!1},schema:i.space==="svg"?Ul:Fb,quote:a,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function pC(e,n,i){return sC(e,n,i,this)}function mC(e){const n=[],i=e&&e.children||hC;let a=-1;for(;++a<i.length;)n[a]=this.one(i[a],a,e);return n.join("")}function Os(e,n){const i=typeof e=="string"?{}:{...e.colorReplacements},a=typeof e=="string"?e:e.name;for(const[o,s]of Object.entries(n?.colorReplacements||{}))typeof s=="string"?i[o]=s:o===a&&Object.assign(i,s);return i}function Ii(e,n){return e&&(n?.[e?.toLowerCase()]||e)}function gC(e){return Array.isArray(e)?e:[e]}async function ev(e){return Promise.resolve(typeof e=="function"?e():e).then(n=>n.default||n)}function $d(e){return!e||["plaintext","txt","text","plain"].includes(e)}function tv(e){return e==="ansi"||$d(e)}function Fd(e){return e==="none"}function nv(e){return Fd(e)}function iv(e,n){if(!n)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 i=Array.isArray(n)?n:n.split(/\s+/g);for(const a of i)a&&!e.properties.class.includes(a)&&e.properties.class.push(a);return e}function Gs(e,n=!1){if(e.length===0)return[["",0]];const i=e.split(/(\r?\n)/g);let a=0;const o=[];for(let s=0;s<i.length;s+=2){const c=n?i[s]+(i[s+1]||""):i[s];o.push([c,a]),a+=i[s].length,a+=i[s+1]?.length||0}return o}function yC(e){const n=Gs(e,!0).map(([o])=>o);function i(o){if(o===e.length)return{line:n.length-1,character:n[n.length-1].length};let s=o,c=0;for(const f of n){if(s<f.length)break;s-=f.length,c++}return{line:c,character:s}}function a(o,s){let c=0;for(let f=0;f<o;f++)c+=n[f].length;return c+=s,c}return{lines:n,indexToPos:i,posToIndex:a}}const Yd="light-dark()",bC=["color","background-color"];function vC(e,n){let i=0;const a=[];for(const o of n)o>i&&a.push({...e,content:e.content.slice(i,o),offset:e.offset+i}),i=o;return i<e.content.length&&a.push({...e,content:e.content.slice(i),offset:e.offset+i}),a}function _C(e,n){const i=Array.from(n instanceof Set?n:new Set(n)).sort((a,o)=>a-o);return i.length?e.map(a=>a.flatMap(o=>{const s=i.filter(c=>o.offset<c&&c<o.offset+o.content.length).map(c=>c-o.offset).sort((c,f)=>c-f);return s.length?vC(o,s):o})):e}function SC(e,n,i,a,o="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},c=n.map(g=>Ns(e.variants[g])),f=new Set(c.flatMap(g=>Object.keys(g))),d={},p=(g,y)=>{const v=y==="color"?"":y==="background-color"?"-bg":`-${y}`;return i+n[g]+(y==="color"?"":v)};return c.forEach((g,y)=>{for(const v of f){const b=g[v]||"inherit";if(y===0&&a&&bC.includes(v))if(a===Yd&&c.length>1){const S=n.findIndex(T=>T==="light"),k=n.findIndex(T=>T==="dark");if(S===-1||k===-1)throw new ut('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const O=c[S][v]||"inherit",A=c[k][v]||"inherit";d[v]=`light-dark(${O}, ${A})`,o==="css-vars"&&(d[p(y,v)]=b)}else d[v]=b;else o==="css-vars"&&(d[p(y,v)]=b)}}),s.htmlStyle=d,s}function Ns(e){const n={};if(e.color&&(n.color=e.color),e.bgColor&&(n["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&At.Italic&&(n["font-style"]="italic"),e.fontStyle&At.Bold&&(n["font-weight"]="bold");const i=[];e.fontStyle&At.Underline&&i.push("underline"),e.fontStyle&At.Strikethrough&&i.push("line-through"),i.length&&(n["text-decoration"]=i.join(" "))}return n}function Ed(e){return typeof e=="string"?e:Object.entries(e).map(([n,i])=>`${n}:${i}`).join(";")}const rv=new WeakMap;function qs(e,n){rv.set(e,n)}function Ol(e){return rv.get(e)}class ga{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(n,i){return new ga(Object.fromEntries(gC(i).map(a=>[a,yd])),n)}constructor(...n){if(n.length===2){const[i,a]=n;this.lang=a,this._stacks=i}else{const[i,a,o]=n;this.lang=a,this._stacks={[o]:i}}}getInternalStack(n=this.theme){return this._stacks[n]}getScopes(n=this.theme){return EC(this._stacks[n])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function EC(e){const n=[],i=new Set;function a(o){if(i.has(o))return;i.add(o);const s=o?.nameScopesList?.scopeName;s&&n.push(s),o.parent&&a(o.parent)}return a(e),n}function xC(e,n){if(!(e instanceof ga))throw new ut("Invalid grammar state");return e.getInternalStack(n)}function CC(){const e=new WeakMap;function n(i){if(!e.has(i.meta)){let a=function(c){if(typeof c=="number"){if(c<0||c>i.source.length)throw new ut(`Invalid decoration offset: ${c}. Code length: ${i.source.length}`);return{...o.indexToPos(c),offset:c}}else{const f=o.lines[c.line];if(f===void 0)throw new ut(`Invalid decoration position ${JSON.stringify(c)}. Lines length: ${o.lines.length}`);let d=c.character;if(d<0&&(d=f.length+d),d<0||d>f.length)throw new ut(`Invalid decoration position ${JSON.stringify(c)}. Line ${c.line} length: ${f.length}`);return{...c,character:d,offset:o.posToIndex(c.line,d)}}};const o=yC(i.source),s=(i.options.decorations||[]).map(c=>({...c,start:a(c.start),end:a(c.end)}));wC(s),e.set(i.meta,{decorations:s,converter:o,source:i.source})}return e.get(i.meta)}return{name:"shiki:decorations",tokens(i){if(!this.options.decorations?.length)return;const o=n(this).decorations.flatMap(c=>[c.start.offset,c.end.offset]);return _C(i,o)},code(i){if(!this.options.decorations?.length)return;const a=n(this),o=Array.from(i.children).filter(g=>g.type==="element"&&g.tagName==="span");if(o.length!==a.converter.lines.length)throw new ut(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${a.converter.lines.length}). Failed to apply decorations.`);function s(g,y,v,b){const S=o[g];let k="",O=-1,A=-1;if(y===0&&(O=0),v===0&&(A=0),v===Number.POSITIVE_INFINITY&&(A=S.children.length),O===-1||A===-1)for(let L=0;L<S.children.length;L++)k+=av(S.children[L]),O===-1&&k.length===y&&(O=L+1),A===-1&&k.length===v&&(A=L+1);if(O===-1)throw new ut(`Failed to find start index for decoration ${JSON.stringify(b.start)}`);if(A===-1)throw new ut(`Failed to find end index for decoration ${JSON.stringify(b.end)}`);const T=S.children.slice(O,A);if(!b.alwaysWrap&&T.length===S.children.length)f(S,b,"line");else if(!b.alwaysWrap&&T.length===1&&T[0].type==="element")f(T[0],b,"token");else{const L={type:"element",tagName:"span",properties:{},children:T};f(L,b,"wrapper"),S.children.splice(O,T.length,L)}}function c(g,y){o[g]=f(o[g],y,"line")}function f(g,y,v){const b=y.properties||{},S=y.transform||(k=>k);return g.tagName=y.tagName||"span",g.properties={...g.properties,...b,class:g.properties.class},y.properties?.class&&iv(g,y.properties.class),g=S(g,v)||g,g}const d=[],p=a.decorations.sort((g,y)=>y.start.offset-g.start.offset||g.end.offset-y.end.offset);for(const g of p){const{start:y,end:v}=g;if(y.line===v.line)s(y.line,y.character,v.character,g);else if(y.line<v.line){s(y.line,y.character,Number.POSITIVE_INFINITY,g);for(let b=y.line+1;b<v.line;b++)d.unshift(()=>c(b,g));s(v.line,0,v.character,g)}}d.forEach(g=>g())}}}function wC(e){for(let n=0;n<e.length;n++){const i=e[n];if(i.start.offset>i.end.offset)throw new ut(`Invalid decoration range: ${JSON.stringify(i.start)} - ${JSON.stringify(i.end)}`);for(let a=n+1;a<e.length;a++){const o=e[a],s=i.start.offset<=o.start.offset&&o.start.offset<i.end.offset,c=i.start.offset<o.end.offset&&o.end.offset<=i.end.offset,f=o.start.offset<=i.start.offset&&i.start.offset<o.end.offset,d=o.start.offset<i.end.offset&&i.end.offset<=o.end.offset;if(s||c||f||d){if(s&&c||f&&d||f&&i.start.offset===i.end.offset||c&&o.start.offset===o.end.offset)continue;throw new ut(`Decorations ${JSON.stringify(i.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function av(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(av).join(""):""}const AC=[CC()];function Ms(e){const n=kC(e.transformers||[]);return[...n.pre,...n.normal,...n.post,...AC]}function kC(e){const n=[],i=[],a=[];for(const o of e)switch(o.enforce){case"pre":n.push(o);break;case"post":i.push(o);break;default:a.push(o)}return{pre:n,post:i,normal:a}}var ar=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Of={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function TC(e,n){const i=e.indexOf("\x1B",n);if(i!==-1&&e[i+1]==="["){const a=e.indexOf("m",i);if(a!==-1)return{sequence:e.substring(i+2,a).split(";"),startPosition:i,position:a+1}}return{position:e.length}}function G0(e){const n=e.shift();if(n==="2"){const i=e.splice(0,3).map(a=>Number.parseInt(a));return i.length!==3||i.some(a=>Number.isNaN(a))?void 0:{type:"rgb",rgb:i}}else if(n==="5"){const i=e.shift();if(i)return{type:"table",index:Number(i)}}}function LC(e){const n=[];for(;e.length>0;){const i=e.shift();if(!i)continue;const a=Number.parseInt(i);if(!Number.isNaN(a))if(a===0)n.push({type:"resetAll"});else if(a<=9)Of[a]&&n.push({type:"setDecoration",value:Of[a]});else if(a<=29){const o=Of[a-20];o&&(n.push({type:"resetDecoration",value:o}),o==="dim"&&n.push({type:"resetDecoration",value:"bold"}))}else if(a<=37)n.push({type:"setForegroundColor",value:{type:"named",name:ar[a-30]}});else if(a===38){const o=G0(e);o&&n.push({type:"setForegroundColor",value:o})}else if(a===39)n.push({type:"resetForegroundColor"});else if(a<=47)n.push({type:"setBackgroundColor",value:{type:"named",name:ar[a-40]}});else if(a===48){const o=G0(e);o&&n.push({type:"setBackgroundColor",value:o})}else a===49?n.push({type:"resetBackgroundColor"}):a===53?n.push({type:"setDecoration",value:"overline"}):a===55?n.push({type:"resetDecoration",value:"overline"}):a>=90&&a<=97?n.push({type:"setForegroundColor",value:{type:"named",name:ar[a-90+8]}}):a>=100&&a<=107&&n.push({type:"setBackgroundColor",value:{type:"named",name:ar[a-100+8]}})}return n}function RC(){let e=null,n=null,i=new Set;return{parse(a){const o=[];let s=0;do{const c=TC(a,s),f=c.sequence?a.substring(s,c.startPosition):a.substring(s);if(f.length>0&&o.push({value:f,foreground:e,background:n,decorations:new Set(i)}),c.sequence){const d=LC(c.sequence);for(const p of d)p.type==="resetAll"?(e=null,n=null,i.clear()):p.type==="resetForegroundColor"?e=null:p.type==="resetBackgroundColor"?n=null:p.type==="resetDecoration"&&i.delete(p.value);for(const p of d)p.type==="setForegroundColor"?e=p.value:p.type==="setBackgroundColor"?n=p.value:p.type==="setDecoration"&&i.add(p.value)}s=c.position}while(s<a.length);return o}}}var DC={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 OC(e=DC){function n(f){return e[f]}function i(f){return`#${f.map(d=>Math.max(0,Math.min(d,255)).toString(16).padStart(2,"0")).join("")}`}let a;function o(){if(a)return a;a=[];for(let p=0;p<ar.length;p++)a.push(n(ar[p]));let f=[0,95,135,175,215,255];for(let p=0;p<6;p++)for(let g=0;g<6;g++)for(let y=0;y<6;y++)a.push(i([f[p],f[g],f[y]]));let d=8;for(let p=0;p<24;p++,d+=10)a.push(i([d,d,d]));return a}function s(f){return o()[f]}function c(f){switch(f.type){case"named":return n(f.name);case"rgb":return i(f.rgb);case"table":return s(f.index)}}return{value:c}}const NC={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 MC(e,n,i){const a=Os(e,i),o=Gs(n),s=Object.fromEntries(ar.map(d=>{const p=`terminal.ansi${d[0].toUpperCase()}${d.substring(1)}`,g=e.colors?.[p];return[d,g||NC[d]]})),c=OC(s),f=RC();return o.map(d=>f.parse(d[0]).map(p=>{let g,y;p.decorations.has("reverse")?(g=p.background?c.value(p.background):e.bg,y=p.foreground?c.value(p.foreground):e.fg):(g=p.foreground?c.value(p.foreground):e.fg,y=p.background?c.value(p.background):void 0),g=Ii(g,a),y=Ii(y,a),p.decorations.has("dim")&&(g=IC(g));let v=At.None;return p.decorations.has("bold")&&(v|=At.Bold),p.decorations.has("italic")&&(v|=At.Italic),p.decorations.has("underline")&&(v|=At.Underline),p.decorations.has("strikethrough")&&(v|=At.Strikethrough),{content:p.value,offset:d[1],color:g,bgColor:y,fontStyle:v}}))}function IC(e){const n=e.match(/#([0-9a-f]{3,8})/i);if(n){const a=n[1];if(a.length===8){const o=Math.round(Number.parseInt(a.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${a.slice(0,6)}${o}`}else{if(a.length===6)return`#${a}80`;if(a.length===4){const o=a[0],s=a[1],c=a[2],f=a[3],d=Math.round(Number.parseInt(`${f}${f}`,16)/2).toString(16).padStart(2,"0");return`#${o}${o}${s}${s}${c}${c}${d}`}else if(a.length===3){const o=a[0],s=a[1],c=a[2];return`#${o}${o}${s}${s}${c}${c}80`}}}const i=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return i?`var(${i[1]}-dim)`:e}function Xd(e,n,i={}){const{theme:a=e.getLoadedThemes()[0]}=i,o=e.resolveLangAlias(i.lang||"text");if($d(o)||Fd(a))return Gs(n).map(d=>[{content:d[0],offset:d[1]}]);const{theme:s,colorMap:c}=e.setTheme(a);if(o==="ansi")return MC(s,n,i);const f=e.getLanguage(i.lang||"text");if(i.grammarState){if(i.grammarState.lang!==f.name)throw new ut(`Grammar state language "${i.grammarState.lang}" does not match highlight language "${f.name}"`);if(!i.grammarState.themes.includes(s.name))throw new ut(`Grammar state themes "${i.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return UC(n,f,s,c,i)}function zC(...e){if(e.length===2)return Ol(e[1]);const[n,i,a={}]=e,{lang:o="text",theme:s=n.getLoadedThemes()[0]}=a;if($d(o)||Fd(s))throw new ut("Plain language does not have grammar state");if(o==="ansi")throw new ut("ANSI language does not have grammar state");const{theme:c,colorMap:f}=n.setTheme(s),d=n.getLanguage(o);return new ga(Qd(i,d,c,f,a).stateStack,d.name,c.name)}function UC(e,n,i,a,o){const s=Qd(e,n,i,a,o),c=new ga(s.stateStack,n.name,i.name);return qs(s.tokens,c),s.tokens}function Qd(e,n,i,a,o){const s=Os(i,o),{tokenizeMaxLineLength:c=0,tokenizeTimeLimit:f=500}=o,d=Gs(e);let p=o.grammarState?xC(o.grammarState,i.name)??yd:o.grammarContextCode!=null?Qd(o.grammarContextCode,n,i,a,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:yd,g=[];const y=[];for(let v=0,b=d.length;v<b;v++){const[S,k]=d[v];if(S===""){g=[],y.push([]);continue}if(c>0&&S.length>=c){g=[],y.push([{content:S,offset:k,color:"",fontStyle:0}]);continue}let O,A,T;o.includeExplanation&&(O=n.tokenizeLine(S,p,f),A=O.tokens,T=0);const L=n.tokenizeLine2(S,p,f),U=L.tokens.length/2;for(let B=0;B<U;B++){const N=L.tokens[2*B],G=B+1<U?L.tokens[2*B+2]:S.length;if(N===G)continue;const $=L.tokens[2*B+1],ie=Ii(a[da.getForeground($)],s),ne=da.getFontStyle($),K={content:S.substring(N,G),offset:k+N,color:ie,fontStyle:ne};if(o.includeExplanation){const W=[];if(o.includeExplanation!=="scopeName")for(const J of i.settings){let ee;switch(typeof J.scope){case"string":ee=J.scope.split(/,/).map(z=>z.trim());break;case"object":ee=J.scope;break;default:continue}W.push({settings:J,selectors:ee.map(z=>z.split(/ /))})}K.explanation=[];let ue=0;for(;N+ue<G;){const J=A[T],ee=S.substring(J.startIndex,J.endIndex);ue+=ee.length,K.explanation.push({content:ee,scopes:o.includeExplanation==="scopeName"?HC(J.scopes):PC(W,J.scopes)}),T+=1}}g.push(K)}y.push(g),g=[],p=L.ruleStack}return{tokens:y,stateStack:p}}function HC(e){return e.map(n=>({scopeName:n}))}function PC(e,n){const i=[];for(let a=0,o=n.length;a<o;a++){const s=n[a];i[a]={scopeName:s,themeMatches:VC(e,s,n.slice(0,a))}}return i}function q0(e,n){return e===n||n.substring(0,e.length)===e&&n[e.length]==="."}function BC(e,n,i){if(!q0(e[e.length-1],n))return!1;let a=e.length-2,o=i.length-1;for(;a>=0&&o>=0;)q0(e[a],i[o])&&(a-=1),o-=1;return a===-1}function VC(e,n,i){const a=[];for(const{selectors:o,settings:s}of e)for(const c of o)if(BC(c,n,i)){a.push(s);break}return a}function lv(e,n,i){const a=Object.entries(i.themes).filter(d=>d[1]).map(d=>({color:d[0],theme:d[1]})),o=a.map(d=>{const p=Xd(e,n,{...i,theme:d.theme}),g=Ol(p),y=typeof d.theme=="string"?d.theme:d.theme.name;return{tokens:p,state:g,theme:y}}),s=jC(...o.map(d=>d.tokens)),c=s[0].map((d,p)=>d.map((g,y)=>{const v={content:g.content,variants:{},offset:g.offset};return"includeExplanation"in i&&i.includeExplanation&&(v.explanation=g.explanation),s.forEach((b,S)=>{const{content:k,explanation:O,offset:A,...T}=b[p][y];v.variants[a[S].color]=T}),v})),f=o[0].state?new ga(Object.fromEntries(o.map(d=>[d.theme,d.state?.getInternalStack(d.theme)])),o[0].state.lang):void 0;return f&&qs(c,f),c}function jC(...e){const n=e.map(()=>[]),i=e.length;for(let a=0;a<e[0].length;a++){const o=e.map(d=>d[a]),s=n.map(()=>[]);n.forEach((d,p)=>d.push(s[p]));const c=o.map(()=>0),f=o.map(d=>d[0]);for(;f.every(d=>d);){const d=Math.min(...f.map(p=>p.content.length));for(let p=0;p<i;p++){const g=f[p];g.content.length===d?(s[p].push(g),c[p]+=1,f[p]=o[p][c[p]]):(s[p].push({...g,content:g.content.slice(0,d)}),f[p]={...g,content:g.content.slice(d),offset:g.offset+d})}}}return n}function Is(e,n,i){let a,o,s,c,f,d;if("themes"in i){const{defaultColor:p="light",cssVariablePrefix:g="--shiki-",colorsRendering:y="css-vars"}=i,v=Object.entries(i.themes).filter(A=>A[1]).map(A=>({color:A[0],theme:A[1]})).sort((A,T)=>A.color===p?-1:T.color===p?1:0);if(v.length===0)throw new ut("`themes` option must not be empty");const b=lv(e,n,i);if(d=Ol(b),p&&Yd!==p&&!v.find(A=>A.color===p))throw new ut(`\`themes\` option must contain the defaultColor key \`${p}\``);const S=v.map(A=>e.getTheme(A.theme)),k=v.map(A=>A.color);s=b.map(A=>A.map(T=>SC(T,k,g,p,y))),d&&qs(s,d);const O=v.map(A=>Os(A.theme,i));o=$0(v,S,O,g,p,"fg",y),a=$0(v,S,O,g,p,"bg",y),c=`shiki-themes ${S.map(A=>A.name).join(" ")}`,f=p?void 0:[o,a].join(";")}else if("theme"in i){const p=Os(i.theme,i);s=Xd(e,n,i);const g=e.getTheme(i.theme);a=Ii(g.bg,p),o=Ii(g.fg,p),c=g.name,d=Ol(s)}else throw new ut("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:o,bg:a,themeName:c,rootStyle:f,grammarState:d}}function $0(e,n,i,a,o,s,c){return e.map((f,d)=>{const p=Ii(n[d][s],i[d])||"inherit",g=`${a+f.color}${s==="bg"?"-bg":""}:${p}`;if(d===0&&o){if(o===Yd&&e.length>1){const y=e.findIndex(k=>k.color==="light"),v=e.findIndex(k=>k.color==="dark");if(y===-1||v===-1)throw new ut('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const b=Ii(n[y][s],i[y])||"inherit",S=Ii(n[v][s],i[v])||"inherit";return`light-dark(${b}, ${S});${g}`}return p}return c==="css-vars"?g:null}).filter(f=>!!f).join(";")}function zs(e,n,i,a={meta:{},options:i,codeToHast:(o,s)=>zs(e,o,s),codeToTokens:(o,s)=>Is(e,o,s)}){let o=n;for(const S of Ms(i))o=S.preprocess?.call(a,o,i)||o;let{tokens:s,fg:c,bg:f,themeName:d,rootStyle:p,grammarState:g}=Is(e,o,i);const{mergeWhitespaces:y=!0,mergeSameStyleTokens:v=!1}=i;y===!0?s=qC(s):y==="never"&&(s=$C(s)),v&&(s=FC(s));const b={...a,get source(){return o}};for(const S of Ms(i))s=S.tokens?.call(b,s)||s;return GC(s,{...i,fg:c,bg:f,themeName:d,rootStyle:i.rootStyle===!1?!1:i.rootStyle??p},b,g)}function GC(e,n,i,a=Ol(e)){const o=Ms(n),s=[],c={type:"root",children:[]},{structure:f="classic",tabindex:d="0"}=n,p={class:`shiki ${n.themeName||""}`};n.rootStyle!==!1&&(n.rootStyle!=null?p.style=n.rootStyle:p.style=`background-color:${n.bg};color:${n.fg}`),d!==!1&&d!=null&&(p.tabindex=d.toString());for(const[k,O]of Object.entries(n.meta||{}))k.startsWith("_")||(p[k]=O);let g={type:"element",tagName:"pre",properties:p,children:[],data:n.data},y={type:"element",tagName:"code",properties:{},children:s};const v=[],b={...i,structure:f,addClassToHast:iv,get source(){return i.source},get tokens(){return e},get options(){return n},get root(){return c},get pre(){return g},get code(){return y},get lines(){return v}};if(e.forEach((k,O)=>{O&&(f==="inline"?c.children.push({type:"element",tagName:"br",properties:{},children:[]}):f==="classic"&&s.push({type:"text",value:`
21
- `}));let A={type:"element",tagName:"span",properties:{class:"line"},children:[]},T=0;for(const L of k){let U={type:"element",tagName:"span",properties:{...L.htmlAttrs},children:[{type:"text",value:L.content}]};const B=Ed(L.htmlStyle||Ns(L));B&&(U.properties.style=B);for(const N of o)U=N?.span?.call(b,U,O+1,T,A,L)||U;f==="inline"?c.children.push(U):f==="classic"&&A.children.push(U),T+=L.content.length}if(f==="classic"){for(const L of o)A=L?.line?.call(b,A,O+1)||A;v.push(A),s.push(A)}else f==="inline"&&v.push(A)}),f==="classic"){for(const k of o)y=k?.code?.call(b,y)||y;g.children.push(y);for(const k of o)g=k?.pre?.call(b,g)||g;c.children.push(g)}else if(f==="inline"){const k=[];let O={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const L of c.children)L.type==="element"&&L.tagName==="br"?(k.push(O),O={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(L.type==="element"||L.type==="text")&&O.children.push(L);k.push(O);let T={type:"element",tagName:"code",properties:{},children:k};for(const L of o)T=L?.code?.call(b,T)||T;c.children=[];for(let L=0;L<T.children.length;L++){L>0&&c.children.push({type:"element",tagName:"br",properties:{},children:[]});const U=T.children[L];U.type==="element"&&c.children.push(...U.children)}}let S=c;for(const k of o)S=k?.root?.call(b,S)||S;return a&&qs(S,a),S}function qC(e){return e.map(n=>{const i=[];let a="",o;return n.forEach((s,c)=>{const d=!(s.fontStyle&&(s.fontStyle&At.Underline||s.fontStyle&At.Strikethrough));d&&s.content.match(/^\s+$/)&&n[c+1]?(o===void 0&&(o=s.offset),a+=s.content):a?(d?i.push({...s,offset:o,content:a+s.content}):i.push({content:a,offset:o},s),o=void 0,a=""):i.push(s)}),i})}function $C(e){return e.map(n=>n.flatMap(i=>{if(i.content.match(/^\s+$/))return i;const a=i.content.match(/^(\s*)(.*?)(\s*)$/);if(!a)return i;const[,o,s,c]=a;if(!o&&!c)return i;const f=[{...i,offset:i.offset+o.length,content:s}];return o&&f.unshift({content:o,offset:i.offset}),c&&f.push({content:c,offset:i.offset+o.length+s.length}),f}))}function FC(e){return e.map(n=>{const i=[];for(const a of n){if(i.length===0){i.push({...a});continue}const o=i[i.length-1],s=Ed(o.htmlStyle||Ns(o)),c=Ed(a.htmlStyle||Ns(a)),f=o.fontStyle&&(o.fontStyle&At.Underline||o.fontStyle&At.Strikethrough),d=a.fontStyle&&(a.fontStyle&At.Underline||a.fontStyle&At.Strikethrough);!f&&!d&&s===c?o.content+=a.content:i.push({...a})}return i})}const YC=ca;function XC(e,n,i){const a={meta:{},options:i,codeToHast:(s,c)=>zs(e,s,c),codeToTokens:(s,c)=>Is(e,s,c)};let o=YC(zs(e,n,i,a));for(const s of Ms(i))o=s.postprocess?.call(a,o,i)||o;return o}const F0={light:"#333333",dark:"#bbbbbb"},Y0={light:"#fffffe",dark:"#1e1e1e"},X0="__shiki_resolved";function $s(e){if(e?.[X0])return e;const n={...e};n.tokenColors&&!n.settings&&(n.settings=n.tokenColors,delete n.tokenColors),n.type||="dark",n.colorReplacements={...n.colorReplacements},n.settings||=[];let{bg:i,fg:a}=n;if(!i||!a){const f=n.settings?n.settings.find(d=>!d.name&&!d.scope):void 0;f?.settings?.foreground&&(a=f.settings.foreground),f?.settings?.background&&(i=f.settings.background),!a&&n?.colors?.["editor.foreground"]&&(a=n.colors["editor.foreground"]),!i&&n?.colors?.["editor.background"]&&(i=n.colors["editor.background"]),a||(a=n.type==="light"?F0.light:F0.dark),i||(i=n.type==="light"?Y0.light:Y0.dark),n.fg=a,n.bg=i}n.settings[0]&&n.settings[0].settings&&!n.settings[0].scope||n.settings.unshift({settings:{foreground:n.fg,background:n.bg}});let o=0;const s=new Map;function c(f){if(s.has(f))return s.get(f);o+=1;const d=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return n.colorReplacements?.[`#${d}`]?c(f):(s.set(f,d),d)}n.settings=n.settings.map(f=>{const d=f.settings?.foreground&&!f.settings.foreground.startsWith("#"),p=f.settings?.background&&!f.settings.background.startsWith("#");if(!d&&!p)return f;const g={...f,settings:{...f.settings}};if(d){const y=c(f.settings.foreground);n.colorReplacements[y]=f.settings.foreground,g.settings.foreground=y}if(p){const y=c(f.settings.background);n.colorReplacements[y]=f.settings.background,g.settings.background=y}return g});for(const f of Object.keys(n.colors||{}))if((f==="editor.foreground"||f==="editor.background"||f.startsWith("terminal.ansi"))&&!n.colors[f]?.startsWith("#")){const d=c(n.colors[f]);n.colorReplacements[d]=n.colors[f],n.colors[f]=d}return Object.defineProperty(n,X0,{enumerable:!1,writable:!1,value:!0}),n}async function ov(e){return Array.from(new Set((await Promise.all(e.filter(n=>!tv(n)).map(async n=>await ev(n).then(i=>Array.isArray(i)?i:[i])))).flat()))}async function sv(e){return(await Promise.all(e.map(async i=>nv(i)?null:$s(await ev(i))))).filter(i=>!!i)}let QC=3;function ZC(e,n=3){n>QC||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let la=class extends Error{constructor(n){super(n),this.name="ShikiError"}};function uv(e,n){if(!n)return e;if(n[e]){const i=new Set([e]);for(;n[e];){if(e=n[e],i.has(e))throw new la(`Circular alias \`${Array.from(i).join(" -> ")} -> ${e}\``);i.add(e)}}return e}class KC extends ix{constructor(n,i,a,o={}){super(n),this._resolver=n,this._themes=i,this._langs=a,this._alias=o,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const i=$s(n);return i.name&&(this._resolvedThemes.set(i.name,i),this._loadedThemesCache=null),i}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let i=this._textmateThemeCache.get(n);i||(i=ks.createFromRawTheme(n),this._textmateThemeCache.set(n,i)),this._syncRegistry.setTheme(i)}getGrammar(n){return n=uv(n,this._alias),this._resolvedGrammars.get(n)}loadLanguage(n){if(this.getGrammar(n.name))return;const i=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(n.name)));this._resolver.addLanguage(n);const a={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const o=this.loadGrammarWithConfiguration(n.scopeName,1,a);if(o.name=n.name,this._resolvedGrammars.set(n.name,o),n.aliases&&n.aliases.forEach(s=>{this._alias[s]=n.name}),this._loadedLanguagesCache=null,i.size)for(const s of i)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const o of n)this.resolveEmbeddedLanguages(o);const i=Array.from(this._langGraph.entries()),a=i.filter(([o,s])=>!s);if(a.length){const o=i.filter(([s,c])=>c?(c.embeddedLanguages||c.embeddedLangs)?.some(d=>a.map(([p])=>p).includes(d)):!1).filter(s=>!a.includes(s));throw new la(`Missing languages ${a.map(([s])=>`\`${s}\``).join(", ")}, required by ${o.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[o,s]of i)this._resolver.addLanguage(s);for(const[o,s]of i)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){this._langMap.set(n.name,n),this._langGraph.set(n.name,n);const i=n.embeddedLanguages??n.embeddedLangs;if(i)for(const a of i)this._langGraph.set(a,this._langMap.get(a))}}class WC{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(n,i){this._onigLib={createOnigScanner:a=>n.createScanner(a),createOnigString:a=>n.createString(a)},i.forEach(a=>this.addLanguage(a))}get onigLib(){return this._onigLib}getLangRegistration(n){return this._langs.get(n)}loadGrammar(n){return this._scopeToLang.get(n)}addLanguage(n){this._langs.set(n.name,n),n.aliases&&n.aliases.forEach(i=>{this._langs.set(i,n)}),this._scopeToLang.set(n.scopeName,n),n.injectTo&&n.injectTo.forEach(i=>{this._injections.get(i)||this._injections.set(i,[]),this._injections.get(i).push(n.scopeName)})}getInjections(n){const i=n.split(".");let a=[];for(let o=1;o<=i.length;o++){const s=i.slice(0,o).join(".");a=[...a,...this._injections.get(s)||[]]}return a}}let pl=0;function JC(e){pl+=1,e.warnings!==!1&&pl>=10&&pl%10===0&&console.warn(`[Shiki] ${pl} 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 n=!1;if(!e.engine)throw new la("`engine` option is required for synchronous mode");const i=(e.langs||[]).flat(1),a=(e.themes||[]).flat(1).map($s),o=new WC(e.engine,i),s=new KC(o,a,i,e.langAlias);let c;function f(L){return uv(L,e.langAlias)}function d(L){A();const U=s.getGrammar(typeof L=="string"?L:L.name);if(!U)throw new la(`Language \`${L}\` not found, you may need to load it first`);return U}function p(L){if(L==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};A();const U=s.getTheme(L);if(!U)throw new la(`Theme \`${L}\` not found, you may need to load it first`);return U}function g(L){A();const U=p(L);c!==L&&(s.setTheme(U),c=L);const B=s.getColorMap();return{theme:U,colorMap:B}}function y(){return A(),s.getLoadedThemes()}function v(){return A(),s.getLoadedLanguages()}function b(...L){A(),s.loadLanguages(L.flat(1))}async function S(...L){return b(await ov(L))}function k(...L){A();for(const U of L.flat(1))s.loadTheme(U)}async function O(...L){return A(),k(await sv(L))}function A(){if(n)throw new la("Shiki instance has been disposed")}function T(){n||(n=!0,s.dispose(),pl-=1)}return{setTheme:g,getTheme:p,getLanguage:d,getLoadedThemes:y,getLoadedLanguages:v,resolveLangAlias:f,loadLanguage:S,loadLanguageSync:b,loadTheme:O,loadThemeSync:k,dispose:T,[Symbol.dispose]:T}}async function ew(e){e.engine||ZC("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[n,i,a]=await Promise.all([sv(e.themes||[]),ov(e.langs||[]),e.engine]);return JC({...e,themes:n,langs:i,engine:a})}async function tw(e){const n=await ew(e);return{getLastGrammarState:(...i)=>zC(n,...i),codeToTokensBase:(i,a)=>Xd(n,i,a),codeToTokensWithThemes:(i,a)=>lv(n,i,a),codeToTokens:(i,a)=>Is(n,i,a),codeToHast:(i,a)=>zs(n,i,a),codeToHtml:(i,a)=>XC(n,i,a),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...n,getInternalContext:()=>n}}function nw(e){const n=e.langs,i=e.themes,a=e.engine;async function o(s){function c(y){if(typeof y=="string"){if(y=s.langAlias?.[y]||y,tv(y))return[];const v=n[y];if(!v)throw new ut(`Language \`${y}\` is not included in this bundle. You may want to load it from external source.`);return v}return y}function f(y){if(nv(y))return"none";if(typeof y=="string"){const v=i[y];if(!v)throw new ut(`Theme \`${y}\` is not included in this bundle. You may want to load it from external source.`);return v}return y}const d=(s.themes??[]).map(y=>f(y)),p=(s.langs??[]).map(y=>c(y)),g=await tw({engine:s.engine??a(),...s,themes:d,langs:p});return{...g,loadLanguage(...y){return g.loadLanguage(...y.map(c))},loadTheme(...y){return g.loadTheme(...y.map(f))},getBundledLanguages(){return n},getBundledThemes(){return i}}}return o}const cv=[{id:"abap",name:"ABAP",import:(()=>C(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>C(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>C(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>C(()=>import("./angular-html-CU67Zn6k.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>C(()=>import("./angular-ts-BwZT4LLn.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>C(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>C(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>C(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>C(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>C(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>C(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>C(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>C(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>C(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>C(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>C(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>C(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>C(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>C(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>C(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>C(()=>import("./bird2-DPOp833l.js"),[]))},{id:"blade",name:"Blade",import:(()=>C(()=>import("./blade-D4QpJJKB.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>C(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>C(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>C(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>C(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>C(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>C(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>C(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>C(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>C(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>C(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>C(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>C(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>C(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>C(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>C(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>C(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>C(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>C(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>C(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>C(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>C(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>C(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>C(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>C(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>C(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>C(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>C(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>C(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>C(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>C(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>C(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>C(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>C(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>C(()=>import("./erb-B12qg9BL.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:(()=>C(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>C(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>C(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>C(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>C(()=>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:(()=>C(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>C(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>C(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>C(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>C(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>C(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>C(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>C(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>C(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>C(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>C(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>C(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>C(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>C(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>C(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>C(()=>import("./go-CxLEBnE3.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>C(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>C(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>C(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>C(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>C(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>C(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>C(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>C(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>C(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>C(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>C(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>C(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>C(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>C(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>C(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>C(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>C(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>C(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>C(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>C(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>C(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>C(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>C(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>C(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>C(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>C(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>C(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>C(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>C(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>C(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>C(()=>import("./just-Cw27pwNe.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:(()=>C(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>C(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>C(()=>import("./kusto-DZf3V79B.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>C(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>C(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>C(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>C(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>C(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>C(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>C(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>C(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>C(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>C(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>C(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>C(()=>import("./marko-CnJfTvn9.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>C(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>C(()=>import("./mdc-BMNejdWA.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>C(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>C(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>C(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>C(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>C(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>C(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>C(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>C(()=>import("./nextflow-Zz6hmt5N.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>C(()=>import("./nextflow-groovy-BeH2EWoN.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>C(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>C(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>C(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>C(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>C(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>C(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>C(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>C(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>C(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>C(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>C(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>C(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>C(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>C(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>C(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>C(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>C(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>C(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>C(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>C(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>C(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>C(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>C(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>C(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>C(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>C(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>C(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>C(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>C(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>C(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>C(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>C(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>C(()=>import("./razor-Uh8Bk_45.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>C(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>C(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>C(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>C(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>C(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>C(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>C(()=>import("./rst-BrH8l1NY.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:(()=>C(()=>import("./ruby-Dw2BHqvy.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:(()=>C(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>C(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>C(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>C(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>C(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>C(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>C(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>C(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>C(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>C(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>C(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>C(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>C(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>C(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>C(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>C(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>C(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>C(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>C(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>C(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>C(()=>import("./svelte-C_ipcX3V.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>C(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>C(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>C(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>C(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>C(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>C(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>C(()=>import("./templ-P3uqSqPl.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>C(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>C(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>C(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>C(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>C(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>C(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>C(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>C(()=>import("./twig-DNn4PbVi.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:(()=>C(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>C(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>C(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>C(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>C(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>C(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>C(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>C(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>C(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>C(()=>import("./vue-DN_0RTcg.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>C(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>C(()=>import("./vue-vine-CQOfvN7w.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>C(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>C(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>C(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>C(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>C(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>C(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>C(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>C(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>C(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>C(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>C(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>C(()=>import("./zig-VOosw3JB.js"),[]))}],iw=Object.fromEntries(cv.map(e=>[e.id,e.import])),rw=Object.fromEntries(cv.flatMap(e=>e.aliases?.map(n=>[n,e.import])||[])),xd={...iw,...rw},aw=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>C(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>C(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>C(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>C(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>C(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>C(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>C(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>C(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>C(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>C(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>C(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>C(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>C(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>C(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>C(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>C(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>C(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>C(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>C(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>C(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>C(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>C(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>C(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>C(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>C(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>C(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>C(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>C(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>C(()=>import("./horizon-bright-Cn-bp-IR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>C(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>C(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>C(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>C(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>C(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>C(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>C(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>C(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>C(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>C(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>C(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>C(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>C(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>C(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>C(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>C(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>C(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>C(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>C(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>C(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>C(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>C(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>C(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>C(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>C(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>C(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>C(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>C(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>C(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>C(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>C(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>C(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>C(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>C(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>C(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>C(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],fv=Object.fromEntries(aw.map(e=>[e.id,e.import]));class Zd extends Error{constructor(n){super(n),this.name="ShikiError"}}function lw(){return 2147483648}function ow(){return typeof performance<"u"?performance.now():Date.now()}const sw=(e,n)=>e+(n-e%n)%n;async function uw(e){let n,i;const a={};function o(b){i=b,a.HEAPU8=new Uint8Array(b),a.HEAPU32=new Uint32Array(b)}function s(b,S,k){a.HEAPU8.copyWithin(b,S,S+k)}function c(b){try{return n.grow(b-i.byteLength+65535>>>16),o(n.buffer),1}catch{}}function f(b){const S=a.HEAPU8.length;b=b>>>0;const k=lw();if(b>k)return!1;for(let O=1;O<=4;O*=2){let A=S*(1+.2/O);A=Math.min(A,b+100663296);const T=Math.min(k,sw(Math.max(b,A),65536));if(c(T))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function p(b,S,k=1024){const O=S+k;let A=S;for(;b[A]&&!(A>=O);)++A;if(A-S>16&&b.buffer&&d)return d.decode(b.subarray(S,A));let T="";for(;S<A;){let L=b[S++];if(!(L&128)){T+=String.fromCharCode(L);continue}const U=b[S++]&63;if((L&224)===192){T+=String.fromCharCode((L&31)<<6|U);continue}const B=b[S++]&63;if((L&240)===224?L=(L&15)<<12|U<<6|B:L=(L&7)<<18|U<<12|B<<6|b[S++]&63,L<65536)T+=String.fromCharCode(L);else{const N=L-65536;T+=String.fromCharCode(55296|N>>10,56320|N&1023)}}return T}function g(b,S){return b?p(a.HEAPU8,b,S):""}const y={emscripten_get_now:ow,emscripten_memcpy_big:s,emscripten_resize_heap:f,fd_write:()=>0};async function v(){const S=await e({env:y,wasi_snapshot_preview1:y});n=S.memory,o(n.buffer),Object.assign(a,S),a.UTF8ToString=g}return await v(),a}var cw=Object.defineProperty,fw=(e,n,i)=>n in e?cw(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i,dt=(e,n,i)=>fw(e,typeof n!="symbol"?n+"":n,i);let yt=null;function dw(e){throw new Zd(e.UTF8ToString(e.getLastOnigError()))}class Fs{constructor(n){dt(this,"utf16Length"),dt(this,"utf8Length"),dt(this,"utf16Value"),dt(this,"utf8Value"),dt(this,"utf16OffsetToUtf8"),dt(this,"utf8OffsetToUtf16");const i=n.length,a=Fs._utf8ByteLength(n),o=a!==i,s=o?new Uint32Array(i+1):null;o&&(s[i]=a);const c=o?new Uint32Array(a+1):null;o&&(c[a]=i);const f=new Uint8Array(a);let d=0;for(let p=0;p<i;p++){const g=n.charCodeAt(p);let y=g,v=!1;if(g>=55296&&g<=56319&&p+1<i){const b=n.charCodeAt(p+1);b>=56320&&b<=57343&&(y=(g-55296<<10)+65536|b-56320,v=!0)}o&&(s[p]=d,v&&(s[p+1]=d),y<=127?c[d+0]=p:y<=2047?(c[d+0]=p,c[d+1]=p):y<=65535?(c[d+0]=p,c[d+1]=p,c[d+2]=p):(c[d+0]=p,c[d+1]=p,c[d+2]=p,c[d+3]=p)),y<=127?f[d++]=y:y<=2047?(f[d++]=192|(y&1984)>>>6,f[d++]=128|(y&63)>>>0):y<=65535?(f[d++]=224|(y&61440)>>>12,f[d++]=128|(y&4032)>>>6,f[d++]=128|(y&63)>>>0):(f[d++]=240|(y&1835008)>>>18,f[d++]=128|(y&258048)>>>12,f[d++]=128|(y&4032)>>>6,f[d++]=128|(y&63)>>>0),v&&p++}this.utf16Length=i,this.utf8Length=a,this.utf16Value=n,this.utf8Value=f,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=c}static _utf8ByteLength(n){let i=0;for(let a=0,o=n.length;a<o;a++){const s=n.charCodeAt(a);let c=s,f=!1;if(s>=55296&&s<=56319&&a+1<o){const d=n.charCodeAt(a+1);d>=56320&&d<=57343&&(c=(s-55296<<10)+65536|d-56320,f=!0)}c<=127?i+=1:c<=2047?i+=2:c<=65535?i+=3:i+=4,f&&a++}return i}createString(n){const i=n.omalloc(this.utf8Length);return n.HEAPU8.set(this.utf8Value,i),i}}const Ys=class Ln{constructor(n){if(dt(this,"id",++Ln.LAST_ID),dt(this,"_onigBinding"),dt(this,"content"),dt(this,"utf16Length"),dt(this,"utf8Length"),dt(this,"utf16OffsetToUtf8"),dt(this,"utf8OffsetToUtf16"),dt(this,"ptr"),!yt)throw new Zd("Must invoke loadWasm first.");this._onigBinding=yt,this.content=n;const i=new Fs(n);this.utf16Length=i.utf16Length,this.utf8Length=i.utf8Length,this.utf16OffsetToUtf8=i.utf16OffsetToUtf8,this.utf8OffsetToUtf16=i.utf8OffsetToUtf16,this.utf8Length<1e4&&!Ln._sharedPtrInUse?(Ln._sharedPtr||(Ln._sharedPtr=yt.omalloc(1e4)),Ln._sharedPtrInUse=!0,yt.HEAPU8.set(i.utf8Value,Ln._sharedPtr),this.ptr=Ln._sharedPtr):this.ptr=i.createString(yt)}convertUtf8OffsetToUtf16(n){return this.utf8OffsetToUtf16?n<0?0:n>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[n]:n}convertUtf16OffsetToUtf8(n){return this.utf16OffsetToUtf8?n<0?0:n>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[n]:n}dispose(){this.ptr===Ln._sharedPtr?Ln._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};dt(Ys,"LAST_ID",0);dt(Ys,"_sharedPtr",0);dt(Ys,"_sharedPtrInUse",!1);let dv=Ys;class hw{constructor(n){if(dt(this,"_onigBinding"),dt(this,"_ptr"),!yt)throw new Zd("Must invoke loadWasm first.");const i=[],a=[];for(let f=0,d=n.length;f<d;f++){const p=new Fs(n[f]);i[f]=p.createString(yt),a[f]=p.utf8Length}const o=yt.omalloc(4*n.length);yt.HEAPU32.set(i,o/4);const s=yt.omalloc(4*n.length);yt.HEAPU32.set(a,s/4);const c=yt.createOnigScanner(o,s,n.length);for(let f=0,d=n.length;f<d;f++)yt.ofree(i[f]);yt.ofree(s),yt.ofree(o),c===0&&dw(yt),this._onigBinding=yt,this._ptr=c}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(n,i,a){let o=0;if(typeof a=="number"&&(o=a),typeof n=="string"){n=new dv(n);const s=this._findNextMatchSync(n,i,!1,o);return n.dispose(),s}return this._findNextMatchSync(n,i,!1,o)}_findNextMatchSync(n,i,a,o){const s=this._onigBinding,c=s.findNextOnigScannerMatch(this._ptr,n.id,n.ptr,n.utf8Length,n.convertUtf16OffsetToUtf8(i),o);if(c===0)return null;const f=s.HEAPU32;let d=c/4;const p=f[d++],g=f[d++],y=[];for(let v=0;v<g;v++){const b=n.convertUtf8OffsetToUtf16(f[d++]),S=n.convertUtf8OffsetToUtf16(f[d++]);y[v]={start:b,end:S,length:S-b}}return{index:p,captureIndices:y}}}function pw(e){return typeof e.instantiator=="function"}function mw(e){return typeof e.default=="function"}function gw(e){return typeof e.data<"u"}function yw(e){return typeof Response<"u"&&e instanceof Response}function bw(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 ss;function vw(e){if(ss)return ss;async function n(){yt=await uw(async i=>{let a=e;return a=await a,typeof a=="function"&&(a=await a(i)),typeof a=="function"&&(a=await a(i)),pw(a)?a=await a.instantiator(i):mw(a)?a=await a.default(i):(gw(a)&&(a=a.data),yw(a)?typeof WebAssembly.instantiateStreaming=="function"?a=await _w(a)(i):a=await Sw(a)(i):bw(a)?a=await Nf(a)(i):a instanceof WebAssembly.Module?a=await Nf(a)(i):"default"in a&&a.default instanceof WebAssembly.Module&&(a=await Nf(a.default)(i))),"instance"in a&&(a=a.instance),"exports"in a&&(a=a.exports),a})}return ss=n(),ss}function Nf(e){return n=>WebAssembly.instantiate(e,n)}function _w(e){return n=>WebAssembly.instantiateStreaming(e,n)}function Sw(e){return async n=>{const i=await e.arrayBuffer();return WebAssembly.instantiate(i,n)}}async function hv(e){return e&&await vw(e),{createScanner(n){return new hw(n.map(i=>typeof i=="string"?i:i.source))},createString(n){return new dv(n)}}}const Ew=nw({langs:xd,themes:fv,engine:()=>hv(C(()=>import("./wasm-CG6Dc4jp.js"),[]))});function ya(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function xw(e,n,i){return e.has(n)||e.set(n,i),e.get(n)}const Kd=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),bt=String.raw;function ba(e,n){if(e==null)throw new Error(n??"Value expected");return e}const pv=bt`\[\^?`,mv=`c.? | C(?:-.?)?|${bt`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${bt`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${bt`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${bt`o\{[^\}]*\}?`}|${bt`\d{1,3}`}`,Wd=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,us=new RegExp(bt`
22
- \\ (?:
23
- ${mv}
24
- | [gk]<[^>]*>?
25
- | [gk]'[^']*'?
26
- | .
27
- )
28
- | \( (?:
29
- \? (?:
30
- [:=!>({]
31
- | <[=!]
32
- | <[^>]*>
33
- | '[^']*'
34
- | ~\|?
35
- | #(?:[^)\\]|\\.?)*
36
- | [^:)]*[:)]
37
- )?
38
- | \*[^\)]*\)?
39
- )?
40
- | (?:${Wd.source})+
41
- | ${pv}
42
- | .
43
- `.replace(/\s+/g,""),"gsu"),Mf=new RegExp(bt`
44
- \\ (?:
45
- ${mv}
46
- | .
47
- )
48
- | \[:(?:\^?\p{Alpha}+|\^):\]
49
- | ${pv}
50
- | &&
51
- | .
52
- `.replace(/\s+/g,""),"gsu");function Cw(e,n={}){const i={flags:"",...n,rules:{captureGroup:!1,singleline:!1,...n.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const a=Gw(i.flags),o=[a.extended],s={captureGroup:i.rules.captureGroup,getCurrentModX(){return o.at(-1)},numOpenGroups:0,popModX(){o.pop()},pushModX(y){o.push(y)},replaceCurrentModX(y){o[o.length-1]=y},singleline:i.rules.singleline};let c=[],f;for(us.lastIndex=0;f=us.exec(e);){const y=ww(s,e,f[0],us.lastIndex);y.tokens?c.push(...y.tokens):y.token&&c.push(y.token),y.lastIndex!==void 0&&(us.lastIndex=y.lastIndex)}const d=[];let p=0;c.filter(y=>y.type==="GroupOpen").forEach(y=>{y.kind==="capturing"?y.number=++p:y.raw==="("&&d.push(y)}),p||d.forEach((y,v)=>{y.kind="capturing",y.number=v+1});const g=p||d.length;return{tokens:c.map(y=>y.type==="EscapedNumber"?$w(y,g):y).flat(),flags:a}}function ww(e,n,i,a){const[o,s]=i;if(i==="["||i==="[^"){const c=Aw(n,i,a);return{tokens:c.tokens,lastIndex:c.lastIndex}}if(o==="\\"){if("AbBGyYzZ".includes(s))return{token:Q0(i,i)};if(/^\\g[<']/.test(i)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(i))throw new Error(`Invalid group name "${i}"`);return{token:zw(i)}}if(/^\\k[<']/.test(i)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(i))throw new Error(`Invalid group name "${i}"`);return{token:yv(i)}}if(s==="K")return{token:bv("keep",i)};if(s==="N"||s==="R")return{token:lr("newline",i,{negate:s==="N"})};if(s==="O")return{token:lr("any",i)};if(s==="X")return{token:lr("text_segment",i)};const c=gv(i,{inCharClass:!1});return Array.isArray(c)?{tokens:c}:{token:c}}if(o==="("){if(s==="*")return{token:Bw(i)};if(i==="(?{")throw new Error(`Unsupported callout "${i}"`);if(i.startsWith("(?#")){if(n[a]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:a+1}}if(/^\(\?[-imx]+[:)]$/.test(i))return{token:Pw(i,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,i==="("&&!e.captureGroup||i==="(?:")return{token:ra("group",i)};if(i==="(?>")return{token:ra("atomic",i)};if(i==="(?="||i==="(?!"||i==="(?<="||i==="(?<!")return{token:ra(i[2]==="<"?"lookbehind":"lookahead",i,{negate:i.endsWith("!")})};if(i==="("&&e.captureGroup||i.startsWith("(?<")&&i.endsWith(">")||i.startsWith("(?'")&&i.endsWith("'"))return{token:ra("capturing",i,{...i!=="("&&{name:i.slice(3,-1)}})};if(i.startsWith("(?~")){if(i==="(?~|")throw new Error(`Unsupported absence function kind "${i}"`);return{token:ra("absence_repeater",i)}}throw i==="(?("?new Error(`Unsupported conditional "${i}"`):new Error(`Invalid or unsupported group option "${i}"`)}if(i===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:Nw(i)}}if(e.getCurrentModX()){if(i==="#"){const c=n.indexOf(`
53
- `,a);return{lastIndex:c===-1?n.length:c}}if(/^\s$/.test(i)){const c=/\s+/y;return c.lastIndex=a,{lastIndex:c.exec(n)?c.lastIndex:a}}}if(i===".")return{token:lr("dot",i)};if(i==="^"||i==="$"){const c=e.singleline?{"^":bt`\A`,$:bt`\Z`}[i]:i;return{token:Q0(c,i)}}return i==="|"?{token:Tw(i)}:Wd.test(i)?{tokens:Fw(i)}:{token:ri(ya(i),i)}}function Aw(e,n,i){const a=[Z0(n[1]==="^",n)];let o=1,s;for(Mf.lastIndex=i;s=Mf.exec(e);){const c=s[0];if(c[0]==="["&&c[1]!==":")o++,a.push(Z0(c[1]==="^",c));else if(c==="]"){if(a.at(-1).type==="CharacterClassOpen")a.push(ri(93,c));else if(o--,a.push(Lw(c)),!o)break}else{const f=kw(c);Array.isArray(f)?a.push(...f):a.push(f)}}return{tokens:a,lastIndex:Mf.lastIndex||e.length}}function kw(e){if(e[0]==="\\")return gv(e,{inCharClass:!0});if(e[0]==="["){const n=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!n||!Kd.has(n.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return lr("posix",e,{value:n.groups.name,negate:!!n.groups.negate})}return e==="-"?Rw(e):e==="&&"?Dw(e):ri(ya(e),e)}function gv(e,{inCharClass:n}){const i=e[1];if(i==="c"||i==="C")return Hw(e);if("dDhHsSwW".includes(i))return Vw(e);if(e.startsWith(bt`\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 jw(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const a=e.split(/\\x/).slice(1).map(c=>parseInt(c,16)),o=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(a)),s=new TextEncoder;return[...o].map(c=>{const f=[...s.encode(c)].map(d=>`\\x${d.toString(16)}`).join("");return ri(ya(c),f)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(i==="u"||i==="x")return ri(qw(e),e);if(K0.has(i))return ri(K0.get(i),e);if(/\d/.test(i))return Ow(n,e);if(e==="\\")throw new Error(bt`Incomplete escape "\"`);if(i==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return ri(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function Tw(e){return{type:"Alternator",raw:e}}function Q0(e,n){return{type:"Assertion",kind:e,raw:n}}function yv(e){return{type:"Backreference",raw:e}}function ri(e,n){return{type:"Character",value:e,raw:n}}function Lw(e){return{type:"CharacterClassClose",raw:e}}function Rw(e){return{type:"CharacterClassHyphen",raw:e}}function Dw(e){return{type:"CharacterClassIntersector",raw:e}}function Z0(e,n){return{type:"CharacterClassOpen",negate:e,raw:n}}function lr(e,n,i={}){return{type:"CharacterSet",kind:e,...i,raw:n}}function bv(e,n,i={}){return e==="keep"?{type:"Directive",kind:e,raw:n}:{type:"Directive",kind:e,flags:ba(i.flags),raw:n}}function Ow(e,n){return{type:"EscapedNumber",inCharClass:e,raw:n}}function Nw(e){return{type:"GroupClose",raw:e}}function ra(e,n,i={}){return{type:"GroupOpen",kind:e,...i,raw:n}}function Mw(e,n,i,a){return{type:"NamedCallout",kind:e,tag:n,arguments:i,raw:a}}function Iw(e,n,i,a){return{type:"Quantifier",kind:e,min:n,max:i,raw:a}}function zw(e){return{type:"Subroutine",raw:e}}const Uw=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),K0=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Hw(e){const n=e[1]==="c"?e[2]:e[3];if(!n||!/[A-Za-z]/.test(n))throw new Error(`Unsupported control character "${e}"`);return ri(ya(n.toUpperCase())-64,e)}function Pw(e,n){let{on:i,off:a}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;a??="";const o=(n.getCurrentModX()||i.includes("x"))&&!a.includes("x"),s=J0(i),c=J0(a),f={};if(s&&(f.enable=s),c&&(f.disable=c),e.endsWith(")"))return n.replaceCurrentModX(o),bv("flags",e,{flags:f});if(e.endsWith(":"))return n.pushModX(o),n.numOpenGroups++,ra("group",e,{...(s||c)&&{flags:f}});throw new Error(`Unexpected flag modifier "${e}"`)}function Bw(e){const n=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!n)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:i,tag:a,args:o}=n.groups;if(!i)throw new Error(`Invalid named callout "${e}"`);if(a==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const s=o?o.split(",").filter(g=>g!=="").map(g=>/^[+-]?\d+$/.test(g)?+g:g):[],[c,f,d]=s,p=Uw.has(i)?i.toLowerCase():"custom";switch(p){case"fail":case"mismatch":case"skip":if(s.length>0)throw new Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(typeof c=="string")throw new Error(`Named callout argument must be a number "${c}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument one must be a tag or number "${c}"`);if(s.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(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(s.length===1&&(typeof c=="number"||!/^[<>X]$/.test(c)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${c}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument one must be a tag or number "${c}"`);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 "${i}"`);default:throw new Error(`Unexpected named callout kind "${p}"`)}return Mw(p,a??null,o?.split(",")??null,e)}function W0(e){let n=null,i,a;if(e[0]==="{"){const{minStr:o,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,c=1e5;if(+o>c||s&&+s>c)throw new Error("Quantifier value unsupported in Oniguruma");if(i=+o,a=s===void 0?+o:s===""?1/0:+s,i>a&&(n="possessive",[i,a]=[a,i]),e.endsWith("?")){if(n==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');n="lazy"}else n||(n="greedy")}else i=e[0]==="+"?1:0,a=e[0]==="?"?1:1/0,n=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return Iw(n,i,a,e)}function Vw(e){const n=e[1].toLowerCase();return lr({d:"digit",h:"hex",s:"space",w:"word"}[n],e,{negate:e[1]!==n})}function jw(e){const{p:n,neg:i,value:a}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return lr("property",e,{value:a,negate:n==="P"&&!i||n==="p"&&!!i})}function J0(e){const n={};return e.includes("i")&&(n.ignoreCase=!0),e.includes("m")&&(n.dotAll=!0),e.includes("x")&&(n.extended=!0),Object.keys(n).length?n:null}function Gw(e){const n={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let i=0;i<e.length;i++){const a=e[i];if(!"imxDPSWy".includes(a))throw new Error(`Invalid flag "${a}"`);if(a==="y"){if(!/^y{[gw]}/.test(e.slice(i)))throw new Error('Invalid or unspecified flag "y" mode');n.textSegmentMode=e[i+2]==="g"?"grapheme":"word",i+=3;continue}n[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[a]]=!0}return n}function qw(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 n=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(n,16)}function $w(e,n){const{raw:i,inCharClass:a}=e,o=i.slice(1);if(!a&&(o!=="0"&&o.length===1||o[0]!=="0"&&+o<=n))return[yv(i)];const s=[],c=o.match(/^[0-7]+|\d/g);for(let f=0;f<c.length;f++){const d=c[f];let p;if(f===0&&d!=="8"&&d!=="9"){if(p=parseInt(d,8),p>127)throw new Error(bt`Octal encoded byte above 177 unsupported "${i}"`)}else p=ya(d);s.push(ri(p,(f===0?"\\":"")+d))}return s}function Fw(e){const n=[],i=new RegExp(Wd,"gy");let a;for(;a=i.exec(e);){const o=a[0];if(o[0]==="{"){const s=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(o);if(s){const{min:c,max:f}=s.groups;if(+c>+f&&o.endsWith("?")){i.lastIndex--,n.push(W0(o.slice(0,-1)));continue}}}n.push(W0(o))}return n}function vv(e,n){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const i=e.body[0];return!n||Object.keys(n).every(a=>n[a]===i[a])}function Yw(e){return Xw.has(e.type)}const Xw=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function _v(e,n={}){const i={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...n,rules:{captureGroup:!1,singleline:!1,...n.rules}},a=Cw(e,{flags:i.flags,rules:{captureGroup:i.rules.captureGroup,singleline:i.rules.singleline}}),o=(v,b)=>{const S=a.tokens[s.nextIndex];switch(s.parent=v,s.nextIndex++,S.type){case"Alternator":return sr();case"Assertion":return Qw(S);case"Backreference":return Zw(S,s);case"Character":return Xs(S.value,{useLastValid:!!b.isCheckingRangeEnd});case"CharacterClassHyphen":return Kw(S,s,b);case"CharacterClassOpen":return Ww(S,s,b);case"CharacterSet":return Jw(S,s);case"Directive":return aA(S.kind,{flags:S.flags});case"GroupOpen":return eA(S,s,b);case"NamedCallout":return oA(S.kind,S.tag,S.arguments);case"Quantifier":return tA(S,s);case"Subroutine":return nA(S,s);default:throw new Error(`Unexpected token type "${S.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:i.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:i.skipBackrefValidation,skipLookbehindValidation:i.skipLookbehindValidation,skipPropertyNameValidation:i.skipPropertyNameValidation,subroutines:[],tokens:a.tokens,unicodePropertyMap:i.unicodePropertyMap,walk:o},c=uA(lA(a.flags));let f=c.body[0];for(;s.nextIndex<a.tokens.length;){const v=o(f,{});v.type==="Alternative"?(c.body.push(v),f=v):f.body.push(v)}const{capturingGroups:d,hasNumberedRef:p,namedGroupsByName:g,subroutines:y}=s;if(p&&g.size&&!i.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:v}of y)if(typeof v=="number"){if(v>d.length)throw new Error("Subroutine uses a group number that's not defined");v&&(d[v-1].isSubroutined=!0)}else if(g.has(v)){if(g.get(v).length>1)throw new Error(bt`Subroutine uses a duplicate group name "\g<${v}>"`);g.get(v)[0].isSubroutined=!0}else throw new Error(bt`Subroutine uses a group name that's not defined "\g<${v}>"`);return c}function Qw({kind:e}){return Cd(ba({"^":"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===bt`\B`||e===bt`\Y`})}function Zw({raw:e},n){const i=/^\\k[<']/.test(e),a=i?e.slice(3,-1):e.slice(1),o=(s,c=!1)=>{const f=n.capturingGroups.length;let d=!1;if(s>f)if(n.skipBackrefValidation)d=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return n.hasNumberedRef=!0,wd(c?f+1-s:s,{orphan:d})};if(i){const s=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(a);if(s)return o(+s.groups.num,!!s.groups.sign);if(/[-+]/.test(a))throw new Error(`Invalid backref name "${e}"`);if(!n.namedGroupsByName.has(a))throw new Error(`Group name not defined to the left "${e}"`);return wd(a)}return o(+a)}function Kw(e,n,i){const{tokens:a,walk:o}=n,s=n.parent,c=s.body.at(-1),f=a[n.nextIndex];if(!i.isCheckingRangeEnd&&c&&c.type!=="CharacterClass"&&c.type!=="CharacterClassRange"&&f&&f.type!=="CharacterClassOpen"&&f.type!=="CharacterClassClose"&&f.type!=="CharacterClassIntersector"){const d=o(s,{...i,isCheckingRangeEnd:!0});if(c.type==="Character"&&d.type==="Character")return s.body.pop(),rA(c,d);throw new Error("Invalid character class range")}return Xs(ya("-"))}function Ww({negate:e},n,i){const{tokens:a,walk:o}=n,s=a[n.nextIndex],c=[Cs()];let f=ny(s);for(;f.type!=="CharacterClassClose";){if(f.type==="CharacterClassIntersector")c.push(Cs()),n.nextIndex++;else{const p=c.at(-1);p.body.push(o(p,i))}f=ny(a[n.nextIndex],s)}const d=Cs({negate:e});return c.length===1?d.body=c[0].body:(d.kind="intersection",d.body=c.map(p=>p.body.length===1?p.body[0]:p)),n.nextIndex++,d}function Jw({kind:e,negate:n,value:i},a){const{normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:c}=a;if(e==="property"){const f=Qs(i);if(Kd.has(f)&&!c?.has(f))e="posix",i=f;else return aa(i,{negate:n,normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:c})}return e==="posix"?sA(i,{negate:n}):Ad(e,{negate:n})}function eA(e,n,i){const{tokens:a,capturingGroups:o,namedGroupsByName:s,skipLookbehindValidation:c,walk:f}=n,d=cA(e),p=d.type==="AbsenceFunction",g=ty(d),y=g&&d.negate;if(d.type==="CapturingGroup"&&(o.push(d),d.name&&xw(s,d.name,[]).push(d)),p&&i.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let v=iy(a[n.nextIndex]);for(;v.type!=="GroupClose";){if(v.type==="Alternator")d.body.push(sr()),n.nextIndex++;else{const b=d.body.at(-1),S=f(b,{...i,isInAbsenceFunction:i.isInAbsenceFunction||p,isInLookbehind:i.isInLookbehind||g,isInNegLookbehind:i.isInNegLookbehind||y});if(b.body.push(S),(g||i.isInLookbehind)&&!c){const k="Lookbehind includes a pattern not allowed by Oniguruma";if(y||i.isInNegLookbehind){if(ey(S)||S.type==="CapturingGroup")throw new Error(k)}else if(ey(S)||ty(S)&&S.negate)throw new Error(k)}}v=iy(a[n.nextIndex])}return n.nextIndex++,d}function tA({kind:e,min:n,max:i},a){const o=a.parent,s=o.body.at(-1);if(!s||!Yw(s))throw new Error("Quantifier requires a repeatable token");const c=Ev(e,n,i,s);return o.body.pop(),c}function nA({raw:e},n){const{capturingGroups:i,subroutines:a}=n;let o=e.slice(3,-1);const s=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);if(s){const f=+s.groups.num,d=i.length;if(n.hasNumberedRef=!0,o={"":f,"+":d+f,"-":d+1-f}[s.groups.sign],o<1)throw new Error("Invalid subroutine number")}else o==="0"&&(o=0);const c=xv(o);return a.push(c),c}function iA(e,n){return{type:"AbsenceFunction",kind:e,body:Hl(n?.body)}}function sr(e){return{type:"Alternative",body:Cv(e?.body)}}function Cd(e,n){const i={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(i.negate=!!n?.negate),i}function wd(e,n){const i=!!n?.orphan;return{type:"Backreference",ref:e,...i&&{orphan:i}}}function Sv(e,n){const i={name:void 0,isSubroutined:!1,...n};if(i.name!==void 0&&!fA(i.name))throw new Error(`Group name "${i.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...i.name&&{name:i.name},...i.isSubroutined&&{isSubroutined:i.isSubroutined},body:Hl(n?.body)}}function Xs(e,n){const i={useLastValid:!1,...n};if(e>1114111){const a=e.toString(16);if(i.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${a}}"`):new Error(`Invalid code point out of range in JS "\\x{${a}}"`)}return{type:"Character",value:e}}function Cs(e){const n={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:n.kind,negate:n.negate,body:Cv(e?.body)}}function rA(e,n){if(n.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:n}}function Ad(e,n){const i=!!n?.negate,a={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(a.negate=i),(e==="text_segment"||e==="newline"&&!i)&&(a.variableLength=!0),a}function aA(e,n={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:ba(n.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function lA(e){return{type:"Flags",...e}}function En(e){const n=e?.atomic,i=e?.flags;if(n&&i)throw new Error("Atomic group cannot have flags");return{type:"Group",...n&&{atomic:n},...i&&{flags:i},body:Hl(e?.body)}}function rr(e){const n={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:n.behind?"lookbehind":"lookahead",negate:n.negate,body:Hl(e?.body)}}function oA(e,n,i){return{type:"NamedCallout",kind:e,tag:n,arguments:i}}function sA(e,n){const i=!!n?.negate;if(!Kd.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:i}}function Ev(e,n,i,a){if(n>i)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:n,max:i,body:a}}function uA(e,n){return{type:"Regex",body:Hl(n?.body),flags:e}}function xv(e){return{type:"Subroutine",ref:e}}function aa(e,n){const i={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...n};let a=i.unicodePropertyMap?.get(Qs(e));if(!a){if(i.normalizeUnknownPropertyNames)a=dA(e);else if(i.unicodePropertyMap&&!i.skipPropertyNameValidation)throw new Error(bt`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:a??e,negate:i.negate}}function cA({flags:e,kind:n,name:i,negate:a,number:o}){switch(n){case"absence_repeater":return iA("repeater");case"atomic":return En({atomic:!0});case"capturing":return Sv(o,{name:i});case"group":return En({flags:e});case"lookahead":case"lookbehind":return rr({behind:n==="lookbehind",negate:a});default:throw new Error(`Unexpected group kind "${n}"`)}}function Hl(e){if(e===void 0)e=[sr()];else if(!Array.isArray(e)||!e.length||!e.every(n=>n.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function Cv(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(n=>!!n.type))throw new Error("Invalid body; expected array of nodes");return e}function ey(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function ty(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function fA(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function dA(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}function Qs(e){return e.replace(/[- _]+/g,"").toLowerCase()}function ny(e,n){return ba(e,`${n?.type==="Character"&&n.value===93?"Empty":"Unclosed"} character class`)}function iy(e){return ba(e,"Unclosed group")}function xl(e,n,i=null){function a(s,c){for(let f=0;f<s.length;f++){const d=o(s[f],c,f,s);f=Math.max(-1,f+d)}}function o(s,c=null,f=null,d=null){let p=0,g=!1;const y={node:s,parent:c,key:f,container:d,root:e,remove(){cs(d).splice(Math.max(0,Wr(f)+p),1),p--,g=!0},removeAllNextSiblings(){return cs(d).splice(Wr(f)+1)},removeAllPrevSiblings(){const A=Wr(f)+p;return p-=A,cs(d).splice(0,Math.max(0,A))},replaceWith(A,T={}){const L=!!T.traverse;d?d[Math.max(0,Wr(f)+p)]=A:ba(c,"Can't replace root node")[f]=A,L&&o(A,c,f,d),g=!0},replaceWithMultiple(A,T={}){const L=!!T.traverse;if(cs(d).splice(Math.max(0,Wr(f)+p),1,...A),p+=A.length-1,L){let U=0;for(let B=0;B<A.length;B++)U+=o(A[B],c,Wr(f)+B+U,d)}g=!0},skip(){g=!0}},{type:v}=s,b=n["*"],S=n[v],k=typeof b=="function"?b:b?.enter,O=typeof S=="function"?S:S?.enter;if(k?.(y,i),O?.(y,i),!g)switch(v){case"AbsenceFunction":case"CapturingGroup":case"Group":a(s.body,s);break;case"Alternative":case"CharacterClass":a(s.body,s);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":o(s.min,s,"min"),o(s.max,s,"max");break;case"LookaroundAssertion":a(s.body,s);break;case"Quantifier":o(s.body,s,"body");break;case"Regex":a(s.body,s),o(s.flags,s,"flags");break;default:throw new Error(`Unexpected node type "${v}"`)}return S?.exit?.(y,i),b?.exit?.(y,i),p}return o(e),e}function cs(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Wr(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const hA=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function pA(e,n){for(let i=0;i<e.length;i++)e[i]>=n&&e[i]++}function mA(e,n,i,a){return e.slice(0,n)+a+e.slice(n+i.length)}const pn=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Jd(e,n,i,a){const o=new RegExp(String.raw`${n}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let c=0,f="";for(const d of e.matchAll(o)){const{0:p,groups:{$skip:g}}=d;if(!g&&(!a||a===pn.DEFAULT==!c)){i instanceof Function?f+=i(d,{context:c?pn.CHAR_CLASS:pn.DEFAULT,negated:s[s.length-1]}):f+=i;continue}p[0]==="["?(c++,s.push(p[1]==="^")):p==="]"&&c&&(c--,s.pop()),f+=p}return f}function wv(e,n,i,a){Jd(e,n,i,a)}function gA(e,n,i=0,a){if(!new RegExp(n,"su").test(e))return null;const o=new RegExp(`${n}|(?<$skip>\\\\?.)`,"gsu");o.lastIndex=i;let s=0,c;for(;c=o.exec(e);){const{0:f,groups:{$skip:d}}=c;if(!d&&(!a||a===pn.DEFAULT==!s))return c;f==="["?s++:f==="]"&&s&&s--,o.lastIndex==c.index&&o.lastIndex++}return null}function fs(e,n,i){return!!gA(e,n,0,i)}function yA(e,n){const i=/\\?./gsu;i.lastIndex=n;let a=e.length,o=0,s=1,c;for(;c=i.exec(e);){const[f]=c;if(f==="[")o++;else if(o)f==="]"&&o--;else if(f==="(")s++;else if(f===")"&&(s--,!s)){a=c.index;break}}return e.slice(n,a)}const ry=new RegExp(String.raw`(?<noncapturingStart>${hA})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function bA(e,n){const i=n?.hiddenCaptures??[];let a=n?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:a,hiddenCaptures:i};const o="(?>",s="(?:(?=(",c=[0],f=[];let d=0,p=0,g=NaN,y;do{y=!1;let v=0,b=0,S=!1,k;for(ry.lastIndex=Number.isNaN(g)?0:g+s.length;k=ry.exec(e);){const{0:O,index:A,groups:{capturingStart:T,noncapturingStart:L}}=k;if(O==="[")v++;else if(v)O==="]"&&v--;else if(O===o&&!S)g=A,S=!0;else if(S&&L)b++;else if(T)S?b++:(d++,c.push(d+p));else if(O===")"&&S){if(!b){p++;const U=d+p;if(e=`${e.slice(0,g)}${s}${e.slice(g+o.length,A)}))<$$${U}>)${e.slice(A+1)}`,y=!0,f.push(U),pA(i,U),a.size){const B=new Map;a.forEach((N,G)=>{B.set(G>=U?G+1:G,N.map($=>$>=U?$+1:$))}),a=B}break}b--}}}while(y);return i.push(...f),e=Jd(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:v,groups:{backrefNum:b,wrappedBackrefNum:S}})=>{if(b){const k=+b;if(k>c.length-1)throw new Error(`Backref "${v}" greater than number of captures`);return`\\${c[k]}`}return`\\${S}`},pn.DEFAULT),{pattern:e,captureTransfers:a,hiddenCaptures:i}}const Av=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,If=new RegExp(String.raw`
54
- \\(?: \d+
55
- | c[A-Za-z]
56
- | [gk]<[^>]+>
57
- | [pPu]\{[^\}]+\}
58
- | u[A-Fa-f\d]{4}
59
- | x[A-Fa-f\d]{2}
60
- )
61
- | \((?: \? (?: [:=!>]
62
- | <(?:[=!]|[^>]+>)
63
- | [A-Za-z\-]+:
64
- | \(DEFINE\)
65
- ))?
66
- | (?<qBase>${Av})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
67
- | \\?.
68
- `.replace(/\s+/g,""),"gsu");function vA(e){if(!new RegExp(`${Av}\\+`).test(e))return{pattern:e};const n=[];let i=null,a=null,o="",s=0,c;for(If.lastIndex=0;c=If.exec(e);){const{0:f,index:d,groups:{qBase:p,qMod:g,invalidQ:y}}=c;if(f==="[")s||(a=d),s++;else if(f==="]")s?s--:a=null;else if(!s)if(g==="+"&&o&&!o.startsWith("(")){if(y)throw new Error(`Invalid quantifier "${f}"`);let v=-1;if(/^\{\d+\}$/.test(p))e=mA(e,d+p.length,g,"");else{if(o===")"||o==="]"){const b=o===")"?i:a;if(b===null)throw new Error(`Invalid unmatched "${o}"`);e=`${e.slice(0,b)}(?>${e.slice(b,d)}${p})${e.slice(d+f.length)}`}else e=`${e.slice(0,d-o.length)}(?>${o}${p})${e.slice(d+f.length)}`;v+=4}If.lastIndex+=v}else f[0]==="("?n.push(d):f===")"&&(i=n.length?n.pop():null);o=f}return{pattern:e}}const hn=String.raw,_A=hn`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,kd=hn`\(\?R=(?<rDepth>[^\)]+)\)|${_A}`,Zs=hn`\(\?<(?![=!])(?<captureName>[^>]+)>`,kv=hn`${Zs}|(?<unnamed>\()(?!\?)`,nr=new RegExp(hn`${Zs}|${kd}|\(\?|\\?.`,"gsu"),zf="Cannot use multiple overlapping recursions";function SA(e,n){const{hiddenCaptures:i,mode:a}={hiddenCaptures:[],mode:"plugin",...n};let o=n?.captureTransfers??new Map;if(!new RegExp(kd,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:i};if(a==="plugin"&&fs(e,hn`\(\?\(DEFINE\)`,pn.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],c=fs(e,hn`\\[1-9]`,pn.DEFAULT),f=new Map,d=[];let p=!1,g=0,y=0,v;for(nr.lastIndex=0;v=nr.exec(e);){const{0:b,groups:{captureName:S,rDepth:k,gRNameOrNum:O,gRDepth:A}}=v;if(b==="[")g++;else if(g)b==="]"&&g--;else if(k){if(ay(k),p)throw new Error(zf);if(c)throw new Error(`${a==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const T=e.slice(0,v.index),L=e.slice(nr.lastIndex);if(fs(L,kd,pn.DEFAULT))throw new Error(zf);const U=+k-1;e=ly(T,L,U,!1,i,s,y),o=sy(o,T,U,s.length,0,y);break}else if(O){ay(A);let T=!1;for(const W of d)if(W.name===O||W.num===+O){if(T=!0,W.hasRecursedWithin)throw new Error(zf);break}if(!T)throw new Error(hn`Recursive \g cannot be used outside the referenced group "${a==="external"?O:hn`\g<${O}&R=${A}>`}"`);const L=f.get(O),U=yA(e,L);if(c&&fs(U,hn`${Zs}|\((?!\?)`,pn.DEFAULT))throw new Error(`${a==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const B=e.slice(L,v.index),N=U.slice(B.length+b.length),G=s.length,$=+A-1,ie=ly(B,N,$,!0,i,s,y);o=sy(o,B,$,s.length-G,G,y);const ne=e.slice(0,L),K=e.slice(L+U.length);e=`${ne}${ie}${K}`,nr.lastIndex+=ie.length-b.length-B.length-N.length,d.forEach(W=>W.hasRecursedWithin=!0),p=!0}else if(S)y++,f.set(String(y),nr.lastIndex),f.set(S,nr.lastIndex),d.push({num:y,name:S});else if(b[0]==="("){const T=b==="(";T&&(y++,f.set(String(y),nr.lastIndex)),d.push(T?{num:y}:{})}else b===")"&&d.pop()}return i.push(...s),{pattern:e,captureTransfers:o,hiddenCaptures:i}}function ay(e){const n=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(n);if(e=+e,e<2||e>100)throw new Error(n)}function ly(e,n,i,a,o,s,c){const f=new Set;a&&wv(e+n,Zs,({groups:{captureName:p}})=>{f.add(p)},pn.DEFAULT);const d=[i,a?f:null,o,s,c];return`${e}${oy(`(?:${e}`,"forward",...d)}(?:)${oy(`${n})`,"backward",...d)}${n}`}function oy(e,n,i,a,o,s,c){const d=g=>n==="forward"?g+2:i-g+2-1;let p="";for(let g=0;g<i;g++){const y=d(g);p+=Jd(e,hn`${kv}|\\k<(?<backref>[^>]+)>`,({0:v,groups:{captureName:b,unnamed:S,backref:k}})=>{if(k&&a&&!a.has(k))return v;const O=`_$${y}`;if(S||b){const A=c+s.length+1;return s.push(A),EA(o,A),S?v:`(?<${b}${O}>`}return hn`\k<${k}${O}>`},pn.DEFAULT)}return p}function EA(e,n){for(let i=0;i<e.length;i++)e[i]>=n&&e[i]++}function sy(e,n,i,a,o,s){if(e.size&&a){let c=0;wv(n,kv,()=>c++,pn.DEFAULT);const f=s-c+o,d=new Map;return e.forEach((p,g)=>{const y=(a-c*i)/i,v=c*i,b=g>f+c?g+a:g,S=[];for(const k of p)if(k<=f)S.push(k);else if(k>f+c+y)S.push(k+a);else if(k<=f+c)for(let O=0;O<=i;O++)S.push(k+c*O);else for(let O=0;O<=i;O++)S.push(k+v+y*O);d.set(b,S)}),d}return e}var ht=String.fromCodePoint,Se=String.raw,xn={},Ks=globalThis.RegExp;xn.flagGroups=(()=>{try{new Ks("(?i:)")}catch{return!1}return!0})();xn.unicodeSets=(()=>{try{new Ks("[[]]","v")}catch{return!1}return!0})();xn.bugFlagVLiteralHyphenIsRange=xn.unicodeSets?(()=>{try{new Ks(Se`[\d\-a]`,"v")}catch{return!0}return!1})():!1;xn.bugNestedClassIgnoresNegation=xn.unicodeSets&&new Ks("[[^a]]","v").test("a");function Us(e,{enable:n,disable:i}){return{dotAll:!i?.dotAll&&!!(n?.dotAll||e.dotAll),ignoreCase:!i?.ignoreCase&&!!(n?.ignoreCase||e.ignoreCase)}}function Nl(e,n,i){return e.has(n)||e.set(n,i),e.get(n)}function Td(e,n){return uy[e]>=uy[n]}function xA(e,n){if(e==null)throw new Error(n??"Value expected");return e}var uy={ES2025:2025,ES2024:2024,ES2018:2018},CA={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function Tv(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!CA[e.target])throw new Error(`Unexpected target "${e.target}"`);const n={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 n.target==="auto"&&(n.target=xn.flagGroups?"ES2025":xn.unicodeSets?"ES2024":"ES2018"),n}var wA="[ -\r ]",AA=new Set([ht(304),ht(305)]),ti=Se`[\p{L}\p{M}\p{N}\p{Pc}]`;function Lv(e){if(AA.has(e))return[e];const n=new Set,i=e.toLowerCase(),a=i.toUpperCase(),o=LA.get(i),s=kA.get(i),c=TA.get(i);return[...a].length===1&&n.add(a),c&&n.add(c),o&&n.add(o),n.add(i),s&&n.add(s),[...n]}var eh=new Map(`C Other
69
- Cc Control cntrl
70
- Cf Format
71
- Cn Unassigned
72
- Co Private_Use
73
- Cs Surrogate
74
- L Letter
75
- LC Cased_Letter
76
- Ll Lowercase_Letter
77
- Lm Modifier_Letter
78
- Lo Other_Letter
79
- Lt Titlecase_Letter
80
- Lu Uppercase_Letter
81
- M Mark Combining_Mark
82
- Mc Spacing_Mark
83
- Me Enclosing_Mark
84
- Mn Nonspacing_Mark
85
- N Number
86
- Nd Decimal_Number digit
87
- Nl Letter_Number
88
- No Other_Number
89
- P Punctuation punct
90
- Pc Connector_Punctuation
91
- Pd Dash_Punctuation
92
- Pe Close_Punctuation
93
- Pf Final_Punctuation
94
- Pi Initial_Punctuation
95
- Po Other_Punctuation
96
- Ps Open_Punctuation
97
- S Symbol
98
- Sc Currency_Symbol
99
- Sk Modifier_Symbol
100
- Sm Math_Symbol
101
- So Other_Symbol
102
- Z Separator
103
- Zl Line_Separator
104
- Zp Paragraph_Separator
105
- Zs Space_Separator
106
- ASCII
107
- ASCII_Hex_Digit AHex
108
- Alphabetic Alpha
109
- Any
110
- Assigned
111
- Bidi_Control Bidi_C
112
- Bidi_Mirrored Bidi_M
113
- Case_Ignorable CI
114
- Cased
115
- Changes_When_Casefolded CWCF
116
- Changes_When_Casemapped CWCM
117
- Changes_When_Lowercased CWL
118
- Changes_When_NFKC_Casefolded CWKCF
119
- Changes_When_Titlecased CWT
120
- Changes_When_Uppercased CWU
121
- Dash
122
- Default_Ignorable_Code_Point DI
123
- Deprecated Dep
124
- Diacritic Dia
125
- Emoji
126
- Emoji_Component EComp
127
- Emoji_Modifier EMod
128
- Emoji_Modifier_Base EBase
129
- Emoji_Presentation EPres
130
- Extended_Pictographic ExtPict
131
- Extender Ext
132
- Grapheme_Base Gr_Base
133
- Grapheme_Extend Gr_Ext
134
- Hex_Digit Hex
135
- IDS_Binary_Operator IDSB
136
- IDS_Trinary_Operator IDST
137
- ID_Continue IDC
138
- ID_Start IDS
139
- Ideographic Ideo
140
- Join_Control Join_C
141
- Logical_Order_Exception LOE
142
- Lowercase Lower
143
- Math
144
- Noncharacter_Code_Point NChar
145
- Pattern_Syntax Pat_Syn
146
- Pattern_White_Space Pat_WS
147
- Quotation_Mark QMark
148
- Radical
149
- Regional_Indicator RI
150
- Sentence_Terminal STerm
151
- Soft_Dotted SD
152
- Terminal_Punctuation Term
153
- Unified_Ideograph UIdeo
154
- Uppercase Upper
155
- Variation_Selector VS
156
- White_Space space
157
- XID_Continue XIDC
158
- XID_Start XIDS`.split(/\s/).map(e=>[Qs(e),e])),kA=new Map([["s",ht(383)],[ht(383),"s"]]),TA=new Map([[ht(223),ht(7838)],[ht(107),ht(8490)],[ht(229),ht(8491)],[ht(969),ht(8486)]]),LA=new Map([Ni(453),Ni(456),Ni(459),Ni(498),...Uf(8072,8079),...Uf(8088,8095),...Uf(8104,8111),Ni(8124),Ni(8140),Ni(8188)]),RA=new Map([["alnum",Se`[\p{Alpha}\p{Nd}]`],["alpha",Se`\p{Alpha}`],["ascii",Se`\p{ASCII}`],["blank",Se`[\p{Zs}\t]`],["cntrl",Se`\p{Cc}`],["digit",Se`\p{Nd}`],["graph",Se`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Se`\p{Lower}`],["print",Se`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Se`[\p{P}\p{S}]`],["space",Se`\p{space}`],["upper",Se`\p{Upper}`],["word",Se`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Se`\p{AHex}`]]);function DA(e,n){const i=[];for(let a=e;a<=n;a++)i.push(a);return i}function Ni(e){const n=ht(e);return[n.toLowerCase(),n]}function Uf(e,n){return DA(e,n).map(i=>Ni(i))}var Rv=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function OA(e,n){const i={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...n};Dv(e);const a={accuracy:i.accuracy,asciiWordBoundaries:i.asciiWordBoundaries,avoidSubclass:i.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Td(i.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};xl(e,NA,a);const o={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},s={currentFlags:o,prevFlags:null,globalFlags:o,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:a.subroutineRefMap};xl(e,MA,s);const c={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return xl(e,IA,c),e._originMap=s.groupOriginByCopy,e._strategy=a.strategy,e}var NA={AbsenceFunction({node:e,parent:n,replaceWith:i}){const{body:a,kind:o}=e;if(o==="repeater"){const s=En();s.body[0].body.push(rr({negate:!0,body:a}),aa("Any"));const c=En();c.body[0].body.push(Ev("greedy",0,1/0,s)),i(it(c,n),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:n,key:i},{flagDirectivesByAlt:a}){const o=e.body.filter(s=>s.kind==="flags");for(let s=i+1;s<n.body.length;s++){const c=n.body[s];Nl(a,c,[]).push(...o)}},exit({node:e},{flagDirectivesByAlt:n}){if(n.get(e)?.length){const i=Nv(n.get(e));if(i){const a=En({flags:i});a.body[0].body=e.body,e.body=[it(a,e)]}}}},Assertion({node:e,parent:n,key:i,container:a,root:o,remove:s,replaceWith:c},f){const{kind:d,negate:p}=e,{asciiWordBoundaries:g,avoidSubclass:y,supportedGNodes:v,wordIsAscii:b}=f;if(d==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${p?"Y":"y"}"`);if(d==="line_end")c(it(rr({body:[sr({body:[Cd("string_end")]}),sr({body:[Xs(10)]})]}),n));else if(d==="line_start")c(it(ni(Se`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),n));else if(d==="search_start")if(v.has(e))o.flags.sticky=!0,s();else{const S=a[i-1];if(S&&VA(S))c(it(rr({negate:!0}),n));else{if(y)throw new Error(Se`Uses "\G" in a way that requires a subclass`);c(Mi(Cd("string_start"),n)),f.strategy="clip_search"}}else if(!(d==="string_end"||d==="string_start"))if(d==="string_end_newline")c(it(ni(Se`(?=\n?\z)`),n));else if(d==="word_boundary"){if(!b&&!g){const S=`(?:(?<=${ti})(?!${ti})|(?<!${ti})(?=${ti}))`,k=`(?:(?<=${ti})(?=${ti})|(?<!${ti})(?!${ti}))`;c(it(ni(p?k:S),n))}}else throw new Error(`Unexpected assertion kind "${d}"`)},Backreference({node:e},{jsGroupNameMap:n}){let{ref:i}=e;typeof i=="string"&&!Pf(i)&&(i=Hf(i,n),e.ref=i)},CapturingGroup({node:e},{jsGroupNameMap:n,subroutineRefMap:i}){let{name:a}=e;a&&!Pf(a)&&(a=Hf(a,n),e.name=a),i.set(e.number,e),a&&i.set(a,e)},CharacterClassRange({node:e,parent:n,replaceWith:i}){if(n.kind==="intersection"){const a=Cs({body:[e]});i(it(a,n),{traverse:!0})}},CharacterSet({node:e,parent:n,replaceWith:i},{accuracy:a,minTargetEs2024:o,digitIsAscii:s,spaceIsAscii:c,wordIsAscii:f}){const{kind:d,negate:p,value:g}=e;if(s&&(d==="digit"||g==="digit")){i(Mi(Ad("digit",{negate:p}),n));return}if(c&&(d==="space"||g==="space")){i(it(Bf(ni(wA),p),n));return}if(f&&(d==="word"||g==="word")){i(Mi(Ad("word",{negate:p}),n));return}if(d==="any")i(Mi(aa("Any"),n));else if(d==="digit")i(Mi(aa("Nd",{negate:p}),n));else if(d!=="dot")if(d==="text_segment"){if(a==="strict")throw new Error(Se`Use of "\X" requires non-strict accuracy`);const y="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",v=Se`\p{RI}{2}|${y}(?:\u200D${y})*`;i(it(ni(Se`(?>\r\n|${o?Se`\p{RGI_Emoji}`:v}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),n))}else if(d==="hex")i(Mi(aa("AHex",{negate:p}),n));else if(d==="newline")i(it(ni(p?`[^
159
- ]`:`(?>\r
160
- ?|[
161
- \v\f…\u2028\u2029])`),n));else if(d==="posix")if(!o&&(g==="graph"||g==="print")){if(a==="strict")throw new Error(`POSIX class "${g}" requires min target ES2024 or non-strict accuracy`);let y={graph:"!-~",print:" -~"}[g];p&&(y=`\0-${ht(y.codePointAt(0)-1)}${ht(y.codePointAt(2)+1)}-􏿿`),i(it(ni(`[${y}]`),n))}else i(it(Bf(ni(RA.get(g)),p),n));else if(d==="property")eh.has(Qs(g))||(e.key="sc");else if(d==="space")i(Mi(aa("space",{negate:p}),n));else if(d==="word")i(it(Bf(ni(ti),p),n));else throw new Error(`Unexpected character set kind "${d}"`)},Directive({node:e,parent:n,root:i,remove:a,replaceWith:o,removeAllPrevSiblings:s,removeAllNextSiblings:c}){const{kind:f,flags:d}=e;if(f==="flags")if(!d.enable&&!d.disable)a();else{const p=En({flags:d});p.body[0].body=c(),o(it(p,n),{traverse:!0})}else if(f==="keep"){const p=i.body[0],y=i.body.length===1&&vv(p,{type:"Group"})&&p.body[0].body.length===1?p.body[0]:i;if(n.parent!==y||y.body.length>1)throw new Error(Se`Uses "\K" in a way that's unsupported`);const v=rr({behind:!0});v.body[0].body=s(),o(it(v,n))}else throw new Error(`Unexpected directive kind "${f}"`)},Flags({node:e,parent:n}){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(i=>delete e[i]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),n.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:n,disable:i}=e.flags;n?.extended&&delete n.extended,i?.extended&&delete i.extended,n?.dotAll&&i?.dotAll&&delete n.dotAll,n?.ignoreCase&&i?.ignoreCase&&delete n.ignoreCase,n&&!Object.keys(n).length&&delete e.flags.enable,i&&!Object.keys(i).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},n){const{kind:i}=e;i==="lookbehind"&&(n.passedLookbehind=!0)},NamedCallout({node:e,parent:n,replaceWith:i}){const{kind:a}=e;if(a==="fail")i(it(rr({negate:!0}),n));else throw new Error(`Unsupported named callout "(*${a.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const n=En();n.body[0].body.push(e.body),e.body=it(n,e)}},Regex:{enter({node:e},{supportedGNodes:n}){const i=[];let a=!1,o=!1;for(const s of e.body)if(s.body.length===1&&s.body[0].kind==="search_start")s.body.pop();else{const c=Iv(s.body);c?(a=!0,Array.isArray(c)?i.push(...c):i.push(c)):o=!0}a&&!o&&i.forEach(s=>n.add(s))},exit(e,{accuracy:n,passedLookbehind:i,strategy:a}){if(n==="strict"&&i&&a)throw new Error(Se`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:n}){let{ref:i}=e;typeof i=="string"&&!Pf(i)&&(i=Hf(i,n),e.ref=i)}},MA={Backreference({node:e},{multiplexCapturesToLeftByRef:n,reffedNodesByReferencer:i}){const{orphan:a,ref:o}=e;a||i.set(e,[...n.get(o).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:n,replaceWith:i,skip:a},{groupOriginByCopy:o,groupsByName:s,multiplexCapturesToLeftByRef:c,openRefs:f,reffedNodesByReferencer:d}){const p=o.get(e);if(p&&f.has(e.number)){const y=Mi(cy(e.number),n);d.set(y,f.get(e.number)),i(y);return}f.set(e.number,e),c.set(e.number,[]),e.name&&Nl(c,e.name,[]);const g=c.get(e.name??e.number);for(let y=0;y<g.length;y++){const v=g[y];if(p===v.node||p&&p===v.origin||e===v.origin){g.splice(y,1);break}}if(c.get(e.number).push({node:e,origin:p}),e.name&&c.get(e.name).push({node:e,origin:p}),e.name){const y=Nl(s,e.name,new Map);let v=!1;if(p)v=!0;else for(const b of y.values())if(!b.hasDuplicateNameToRemove){v=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:v})}},exit({node:e},{openRefs:n}){n.delete(e.number)}},Group:{enter({node:e},n){n.prevFlags=n.currentFlags,e.flags&&(n.currentFlags=Us(n.currentFlags,e.flags))},exit(e,n){n.currentFlags=n.prevFlags}},Subroutine({node:e,parent:n,replaceWith:i},a){const{isRecursive:o,ref:s}=e;if(o){let g=n;for(;(g=g.parent)&&!(g.type==="CapturingGroup"&&(g.name===s||g.number===s)););a.reffedNodesByReferencer.set(e,g);return}const c=a.subroutineRefMap.get(s),f=s===0,d=f?cy(0):Ov(c,a.groupOriginByCopy,null);let p=d;if(!f){const g=Nv(HA(c,v=>v.type==="Group"&&!!v.flags)),y=g?Us(a.globalFlags,g):a.globalFlags;zA(y,a.currentFlags)||(p=En({flags:PA(y)}),p.body[0].body.push(d))}i(it(p,n),{traverse:!f})}},IA={Backreference({node:e,parent:n,replaceWith:i},a){if(e.orphan){a.highestOrphanBackref=Math.max(a.highestOrphanBackref,e.ref);return}const s=a.reffedNodesByReferencer.get(e).filter(c=>UA(c,e));if(!s.length)i(it(rr({negate:!0}),n));else if(s.length>1){const c=En({atomic:!0,body:s.reverse().map(f=>sr({body:[wd(f.number)]}))});i(it(c,n))}else e.ref=s[0].number},CapturingGroup({node:e},n){e.number=++n.numCapturesToLeft,e.name&&n.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},n){const i=Math.max(n.highestOrphanBackref-n.numCapturesToLeft,0);for(let a=0;a<i;a++){const o=Sv();e.body.at(-1).body.push(o)}}},Subroutine({node:e},n){!e.isRecursive||e.ref===0||(e.ref=n.reffedNodesByReferencer.get(e).number)}};function Dv(e){xl(e,{"*"({node:n,parent:i}){n.parent=i}})}function zA(e,n){return e.dotAll===n.dotAll&&e.ignoreCase===n.ignoreCase}function UA(e,n){let i=n;do{if(i.type==="Regex")return!1;if(i.type==="Alternative")continue;if(i===e)return!1;const a=Mv(i.parent);for(const o of a){if(o===i)break;if(o===e||zv(o,e))return!0}}while(i=i.parent);throw new Error("Unexpected path")}function Ov(e,n,i,a){const o=Array.isArray(e)?[]:{};for(const[s,c]of Object.entries(e))s==="parent"?o.parent=Array.isArray(i)?a:i:c&&typeof c=="object"?o[s]=Ov(c,n,o,i):(s==="type"&&c==="CapturingGroup"&&n.set(o,n.get(e)??e),o[s]=c);return o}function cy(e){const n=xv(e);return n.isRecursive=!0,n}function HA(e,n){const i=[];for(;e=e.parent;)(!n||n(e))&&i.push(e);return i}function Hf(e,n){if(n.has(e))return n.get(e);const i=`$${n.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return n.set(e,i),i}function Nv(e){const n=["dotAll","ignoreCase"],i={enable:{},disable:{}};return e.forEach(({flags:a})=>{n.forEach(o=>{a.enable?.[o]&&(delete i.disable[o],i.enable[o]=!0),a.disable?.[o]&&(i.disable[o]=!0)})}),Object.keys(i.enable).length||delete i.enable,Object.keys(i.disable).length||delete i.disable,i.enable||i.disable?i:null}function PA({dotAll:e,ignoreCase:n}){const i={};return(e||n)&&(i.enable={},e&&(i.enable.dotAll=!0),n&&(i.enable.ignoreCase=!0)),(!e||!n)&&(i.disable={},!e&&(i.disable.dotAll=!0),!n&&(i.disable.ignoreCase=!0)),i}function Mv(e){if(!e)throw new Error("Node expected");const{body:n}=e;return Array.isArray(n)?n:n?[n]:null}function Iv(e){const n=e.find(i=>i.kind==="search_start"||jA(i,{negate:!1})||!BA(i));if(!n)return null;if(n.kind==="search_start")return n;if(n.type==="LookaroundAssertion")return n.body[0].body[0];if(n.type==="CapturingGroup"||n.type==="Group"){const i=[];for(const a of n.body){const o=Iv(a.body);if(!o)return null;Array.isArray(o)?i.push(...o):i.push(o)}return i}return null}function zv(e,n){const i=Mv(e)??[];for(const a of i)if(a===n||zv(a,n))return!0;return!1}function BA({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function VA(e){const n=["Character","CharacterClass","CharacterSet"];return n.includes(e.type)||e.type==="Quantifier"&&e.min&&n.includes(e.body.type)}function jA(e,n){const i={negate:null,...n};return e.type==="LookaroundAssertion"&&(i.negate===null||e.negate===i.negate)&&e.body.length===1&&vv(e.body[0],{type:"Assertion",kind:"search_start"})}function Pf(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function ni(e,n){const a=_v(e,{...n,unicodePropertyMap:eh}).body;return a.length>1||a[0].body.length>1?En({body:a}):a[0].body[0]}function Bf(e,n){return e.negate=n,e}function Mi(e,n){return e.parent=n,e}function it(e,n){return Dv(e),e.parent=n,e}function GA(e,n){const i=Tv(n),a=Td(i.target,"ES2024"),o=Td(i.target,"ES2025"),s=i.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let c=null,f=null;if(!o){const b=[e.flags.ignoreCase];xl(e,qA,{getCurrentModI:()=>b.at(-1),popModI(){b.pop()},pushModI(S){b.push(S)},setHasCasedChar(){b.at(-1)?c=!0:f=!0}})}const d={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||c)&&!f)};let p=e;const g={accuracy:i.accuracy,appliedGlobalFlags:d,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:p,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!o&&c&&f),useFlagMods:o,useFlagV:a,verbose:i.verbose};function y(b){return g.lastNode=p,p=b,xA($A[b.type],`Unexpected node type "${b.type}"`)(b,g,y)}const v={pattern:e.body.map(y).join("|"),flags:y(e.flags),options:{...e.options}};return a||(delete v.options.force.v,v.options.disable.v=!0,v.options.unicodeSetsPlugin=null),v._captureTransfers=new Map,v._hiddenCaptures=[],g.captureMap.forEach((b,S)=>{b.hidden&&v._hiddenCaptures.push(S),b.transferTo&&Nl(v._captureTransfers,b.transferTo,[]).push(S)}),v}var qA={"*":{enter({node:e},n){if(dy(e)){const i=n.getCurrentModI();n.pushModI(e.flags?Us({ignoreCase:i},e.flags).ignoreCase:i)}},exit({node:e},n){dy(e)&&n.popModI()}},Backreference(e,n){n.setHasCasedChar()},Character({node:e},n){th(ht(e.value))&&n.setHasCasedChar()},CharacterClassRange({node:e,skip:n},i){n(),Uv(e,{firstOnly:!0}).length&&i.setHasCasedChar()},CharacterSet({node:e},n){e.kind==="property"&&Rv.has(e.value)&&n.setHasCasedChar()}},$A={Alternative({body:e},n,i){return e.map(i).join("")},Assertion({kind:e,negate:n}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return n?Se`\B`:Se`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},n){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!n.useFlagMods&&n.accuracy==="strict"&&n.currentFlags.ignoreCase&&!n.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,n,i){const{body:a,name:o,number:s}=e,c={ignoreCase:n.currentFlags.ignoreCase},f=n.originMap.get(e);return f&&(c.hidden=!0,s>f.number&&(c.transferTo=f.number)),n.captureMap.set(s,c),`(${o?`?<${o}>`:""}${a.map(i).join("|")})`},Character({value:e},n){const i=ht(e),a=Jr(e,{escDigit:n.lastNode.type==="Backreference",inCharClass:n.inCharClass,useFlagV:n.useFlagV});if(a!==i)return a;if(n.useAppliedIgnoreCase&&n.currentFlags.ignoreCase&&th(i)){const o=Lv(i);return n.inCharClass?o.join(""):o.length>1?`[${o.join("")}]`:o[0]}return i},CharacterClass(e,n,i){const{kind:a,negate:o,parent:s}=e;let{body:c}=e;if(a==="intersection"&&!n.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");xn.bugFlagVLiteralHyphenIsRange&&n.useFlagV&&c.some(hy)&&(c=[Xs(45),...c.filter(p=>!hy(p))]);const f=()=>`[${o?"^":""}${c.map(i).join(a==="intersection"?"&&":"")}]`;if(!n.inCharClass){if((!n.useFlagV||xn.bugNestedClassIgnoresNegation)&&!o){const g=c.filter(y=>y.type==="CharacterClass"&&y.kind==="union"&&y.negate);if(g.length){const y=En(),v=y.body[0];return y.parent=s,v.parent=y,c=c.filter(b=>!g.includes(b)),e.body=c,c.length?(e.parent=v,v.body.push(e)):y.body.pop(),g.forEach(b=>{const S=sr({body:[b]});b.parent=S,S.parent=y,y.body.push(S)}),i(y)}}n.inCharClass=!0;const p=f();return n.inCharClass=!1,p}const d=c[0];if(a==="union"&&!o&&d&&((!n.useFlagV||!n.verbose)&&s.kind==="union"&&!(xn.bugFlagVLiteralHyphenIsRange&&n.useFlagV)||!n.verbose&&s.kind==="intersection"&&c.length===1&&d.type!=="CharacterClassRange"))return c.map(i).join("");if(!n.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return f()},CharacterClassRange(e,n){const i=e.min.value,a=e.max.value,o={escDigit:!1,inCharClass:!0,useFlagV:n.useFlagV},s=Jr(i,o),c=Jr(a,o),f=new Set;if(n.useAppliedIgnoreCase&&n.currentFlags.ignoreCase){const d=Uv(e);ZA(d).forEach(g=>{f.add(Array.isArray(g)?`${Jr(g[0],o)}-${Jr(g[1],o)}`:Jr(g,o))})}return`${s}-${c}${[...f].join("")}`},CharacterSet({kind:e,negate:n,value:i,key:a},o){if(e==="dot")return o.currentFlags.dotAll?o.appliedGlobalFlags.dotAll||o.useFlagMods?".":"[^]":Se`[^\n]`;if(e==="digit")return n?Se`\D`:Se`\d`;if(e==="property"){if(o.useAppliedIgnoreCase&&o.currentFlags.ignoreCase&&Rv.has(i))throw new Error(`Unicode property "${i}" can't be case-insensitive when other chars have specific case`);return`${n?Se`\P`:Se`\p`}{${a?`${a}=`:""}${i}}`}if(e==="word")return n?Se`\W`:Se`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,n){return(n.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:n,flags:i,parent:a},o,s){const c=o.currentFlags;i&&(o.currentFlags=Us(c,i));const f=n.map(s).join("|"),d=!o.verbose&&n.length===1&&a.type!=="Quantifier"&&!e&&(!o.useFlagMods||!i)?f:`(?${KA(e,i,o.useFlagMods)}${f})`;return o.currentFlags=c,d},LookaroundAssertion({body:e,kind:n,negate:i},a,o){return`(?${`${n==="lookahead"?"":"<"}${i?"!":"="}`}${e.map(o).join("|")})`},Quantifier(e,n,i){return i(e.body)+WA(e)},Subroutine({isRecursive:e,ref:n},i){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const a=i.recursionLimit;return n===0?`(?R=${a})`:Se`\g<${n}&R=${a}>`}},FA=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),YA=new Set(["-","\\","]","^","["]),XA=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),fy=new Map([[9,Se`\t`],[10,Se`\n`],[11,Se`\v`],[12,Se`\f`],[13,Se`\r`],[8232,Se`\u2028`],[8233,Se`\u2029`],[65279,Se`\uFEFF`]]),QA=new RegExp("^\\p{Cased}$","u");function th(e){return QA.test(e)}function Uv(e,n){const i=!!n?.firstOnly,a=e.min.value,o=e.max.value,s=[];if(a<65&&(o===65535||o>=131071)||a===65536&&o>=131071)return s;for(let c=a;c<=o;c++){const f=ht(c);if(!th(f))continue;const d=Lv(f).filter(p=>{const g=p.codePointAt(0);return g<a||g>o});if(d.length&&(s.push(...d),i))break}return s}function Jr(e,{escDigit:n,inCharClass:i,useFlagV:a}){if(fy.has(e))return fy.get(e);if(e<32||e>126&&e<160||e>262143||n&&JA(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const o=i?a?XA:YA:FA,s=ht(e);return(o.has(s)?"\\":"")+s}function ZA(e){const n=e.map(o=>o.codePointAt(0)).sort((o,s)=>o-s),i=[];let a=null;for(let o=0;o<n.length;o++)n[o+1]===n[o]+1?a??=n[o]:a===null?i.push(n[o]):(i.push([a,n[o]]),a=null);return i}function KA(e,n,i){if(e)return">";let a="";if(n&&i){const{enable:o,disable:s}=n;a=(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")+(s?"-":"")+(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")}return`${a}:`}function WA({kind:e,max:n,min:i}){let a;return!i&&n===1?a="?":!i&&n===1/0?a="*":i===1&&n===1/0?a="+":i===n?a=`{${i}}`:a=`{${i},${n===1/0?"":n}}`,a+{greedy:"",lazy:"?",possessive:"+"}[e]}function dy({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function JA(e){return e>47&&e<58}function hy({type:e,value:n}){return e==="Character"&&n===45}var ek=class Ld extends RegExp{#t=new Map;#e=null;#i;#n=null;#r=null;rawOptions={};get source(){return this.#i||"(?:)"}constructor(n,i,a){const o=!!a?.lazyCompile;if(n instanceof RegExp){if(a)throw new Error("Cannot provide options when copying a regexp");const s=n;super(s,i),this.#i=s.source,s instanceof Ld&&(this.#t=s.#t,this.#n=s.#n,this.#r=s.#r,this.rawOptions=s.rawOptions)}else{const s={hiddenCaptures:[],strategy:null,transfers:[],...a};super(o?"":n,i),this.#i=n,this.#t=nk(s.hiddenCaptures,s.transfers),this.#r=s.strategy,this.rawOptions=a??{}}o||(this.#e=this)}exec(n){if(!this.#e){const{lazyCompile:o,...s}=this.rawOptions;this.#e=new Ld(this.#i,this.flags,s)}const i=this.global||this.sticky,a=this.lastIndex;if(this.#r==="clip_search"&&i&&a){this.lastIndex=0;const o=this.#a(n.slice(a));return o&&(tk(o,a,n,this.hasIndices),this.lastIndex+=a),o}return this.#a(n)}#a(n){this.#e.lastIndex=this.lastIndex;const i=super.exec.call(this.#e,n);if(this.lastIndex=this.#e.lastIndex,!i||!this.#t.size)return i;const a=[...i];i.length=1;let o;this.hasIndices&&(o=[...i.indices],i.indices.length=1);const s=[0];for(let c=1;c<a.length;c++){const{hidden:f,transferTo:d}=this.#t.get(c)??{};if(f?s.push(null):(s.push(i.length),i.push(a[c]),this.hasIndices&&i.indices.push(o[c])),d&&a[c]!==void 0){const p=s[d];if(!p)throw new Error(`Invalid capture transfer to "${p}"`);if(i[p]=a[c],this.hasIndices&&(i.indices[p]=o[c]),i.groups){this.#n||(this.#n=ik(this.source));const g=this.#n.get(d);g&&(i.groups[g]=a[c],this.hasIndices&&(i.indices.groups[g]=o[c]))}}}return i}};function tk(e,n,i,a){if(e.index+=n,e.input=i,a){const o=e.indices;for(let c=0;c<o.length;c++){const f=o[c];f&&(o[c]=[f[0]+n,f[1]+n])}const s=o.groups;s&&Object.keys(s).forEach(c=>{const f=s[c];f&&(s[c]=[f[0]+n,f[1]+n])})}}function nk(e,n){const i=new Map;for(const a of e)i.set(a,{hidden:!0});for(const[a,o]of n)for(const s of o)Nl(i,s,{}).transferTo=a;return i}function ik(e){const n=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,i=new Map;let a=0,o=0,s;for(;s=n.exec(e);){const{0:c,groups:{capture:f,name:d}}=s;c==="["?a++:a?c==="]"&&a--:f&&(o++,d&&i.set(o,d))}return i}function rk(e,n){const i=ak(e,n);return i.options?new ek(i.pattern,i.flags,i.options):new RegExp(i.pattern,i.flags)}function ak(e,n){const i=Tv(n),a=_v(e,{flags:i.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:i.rules.captureGroup,singleline:i.rules.singleline},skipBackrefValidation:i.rules.allowOrphanBackrefs,unicodePropertyMap:eh}),o=OA(a,{accuracy:i.accuracy,asciiWordBoundaries:i.rules.asciiWordBoundaries,avoidSubclass:i.avoidSubclass,bestEffortTarget:i.target}),s=GA(o,i),c=SA(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),f=vA(c.pattern),d=bA(f.pattern,{captureTransfers:c.captureTransfers,hiddenCaptures:c.hiddenCaptures}),p={pattern:d.pattern,flags:`${i.hasIndices?"d":""}${i.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(i.avoidSubclass){if(i.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const g=d.hiddenCaptures.sort((S,k)=>S-k),y=Array.from(d.captureTransfers),v=o._strategy,b=p.pattern.length>=i.lazyCompileLength;(g.length||y.length||v||b)&&(p.options={...g.length&&{hiddenCaptures:g},...y.length&&{transfers:y},...v&&{strategy:v},...b&&{lazyCompile:b}})}return p}const py=4294967295;class lk{constructor(n,i={}){this.patterns=n,this.options=i;const{forgiving:a=!1,cache:o,regexConstructor:s}=i;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=n.map(c=>{if(typeof c!="string")return c;const f=o?.get(c);if(f){if(f instanceof RegExp)return f;if(a)return null;throw f}try{const d=s(c);return o?.set(c,d),d}catch(d){if(o?.set(c,d),a)return null;throw d}})}regexps;findNextMatchSync(n,i,a){const o=typeof n=="string"?n:n.content,s=[];function c(f,d,p=0){return{index:f,captureIndices:d.indices.map(g=>g==null?{start:py,end:py,length:0}:{start:g[0]+p,end:g[1]+p,length:g[1]-g[0]})}}for(let f=0;f<this.regexps.length;f++){const d=this.regexps[f];if(d)try{d.lastIndex=i;const p=d.exec(o);if(!p)continue;if(p.index===i)return c(f,p,0);s.push([f,p,0])}catch(p){if(this.options.forgiving)continue;throw p}}if(s.length){const f=Math.min(...s.map(d=>d[1].index));for(const[d,p,g]of s)if(p.index===f)return c(d,p,g)}return null}}function ok(e,n){return rk(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...n})}function sk(e={}){const n=Object.assign({target:"auto",cache:new Map},e);return n.regexConstructor||=i=>ok(i,{target:n.target}),{createScanner(i){return new lk(i,n)},createString(i){return{content:i}}}}async function uk(e){if(Eb())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const n=wf.get(e);if(n!=null)return n;try{let i=yE.get(e);if(i==null&&Object.prototype.hasOwnProperty.call(xd,e)&&(i=xd[e]),i==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const a=i().then(({default:o})=>{const s={name:e,data:o};return Tl.has(e)||Tl.set(e,s),s});return wf.set(e,a),await a}finally{wf.delete(e)}}function ck(e){return Tl.get(e)??uk(e)}async function fk(e){if(Eb())throw new Error(`resolveTheme("${e}") cannot be called from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const n=Cf.get(e);if(n!=null)return n;try{const i=sd.get(e)??fv[e];if(i==null)throw new Error(`resolveTheme: No valid loader for ${e}`);const a=i().then(s=>dk(e,"default"in s?s.default:s));Cf.set(e,a);const o=await a;if(o.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${o.name}`);return or.set(o.name,o),o}finally{Cf.delete(e)}}function dk(e,n){const i=or.get(e);return i??(n=$s(n),or.set(e,n),n)}function hk(e){return or.get(e)??fk(e)}function Hv(e,n){if(sd.has(e)){console.error("SharedHighlight.registerCustomTheme: theme name already registered",e);return}sd.set(e,n)}let Dn;async function pk({themes:e,langs:n,preferredHighlighter:i="shiki-js"}){Dn??=Ew({themes:[],langs:["text"],engine:i==="shiki-wasm"?hv(C(()=>import("./wasm-CG6Dc4jp.js"),[])):sk()});const a=gk(Dn)?await Dn:Dn;Dn=a;const o=[];for(const c of n){if(c==="text"||c==="ansi")continue;const f=ck(c);"then"in f?o.push(f):A0(f,a)}const s=[];for(const c of e){const f=hk(c);"then"in f?s.push(f):C0(f,Dn)}return(o.length>0||s.length>0)&&await Promise.all([Promise.all(o).then(c=>{A0(c,a)}),Promise.all(s).then(c=>{C0(c,a)})]),a}function mk(){if(Dn!=null&&!("then"in Dn))return Dn}function gk(e=Dn){return e!=null&&"then"in e}Hv("pierre-dark",async()=>{const e=await C(()=>import("./pierre-dark-ClCaJvdG.js"),[]);return{...e.default??e,name:"pierre-dark"}});Hv("pierre-light",async()=>{const e=await C(()=>import("./pierre-light-zjGsWSiE.js"),[]);return{...e.default??e,name:"pierre-light"}});function Pv(e=Nn){const n=[];return typeof e=="string"?n.push(e):(n.push(e.dark),n.push(e.light)),n}function Bv(e,n){return e==null||n==null||typeof e=="string"||typeof n=="string"?e===n:e.dark===n.dark&&e.light===n.light}const ea=new Map,ml={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function ha(e){if(ea.has(e))return ea.get(e)??"text";if(ml[e]!=null)return ml[e];const n=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(n!=null){if(ea.has(n[1]))return ea.get(n[1])??"text";if(ml[n[1]]!=null)return ml[n[1]]??"text"}const i=e.match(/\.([^.]+)$/)?.[1]??"";return ea.has(i)?ea.get(i)??"text":ml[i]??"text"}function pa(e){return e.replace(/\n$|\r\n$/,"")}function ai(e){return{type:"text",value:e}}function ke({tagName:e,children:n=[],properties:i={}}){return{type:"element",tagName:e,properties:i,children:n}}function Hs({name:e,width:n=16,height:i=16,properties:a}){return ke({tagName:"svg",properties:{width:n,height:i,viewBox:"0 0 16 16",...a},children:[ke({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function yk(e){let n=e.children[0];for(;n!=null;){if(n.type==="element"&&n.tagName==="code")return n;"children"in n?n=n.children[0]:n=null}}function ds(e){return ke({tagName:"div",properties:{"data-gutter":""},children:e})}function bk(e,n,i,a={}){return ke({tagName:"div",properties:{"data-line-type":e,"data-column-number":n,"data-line-index":i,...a},children:n!=null?[ke({tagName:"span",properties:{"data-line-number-content":""},children:[ai(`${n}`)]})]:void 0})}function _n(e,n,i){return ke({tagName:"div",properties:{"data-gutter-buffer":n,"data-buffer-size":i,"data-line-type":n==="annotation"?void 0:e,style:n==="annotation"?`grid-row: span ${i};`:`grid-row: span ${i};min-height:calc(${i} * 1lh);`}})}function vk(e,n,i){const a=typeof i.lineInfo=="function"?i.lineInfo(n):i.lineInfo[n-1];if(a==null){const o=`processLine: line ${n}, contains no state.lineInfo`;throw console.error(o,{node:e,line:n,state:i}),new Error(o)}return e.tagName="div",e.properties["data-line"]=a.lineNumber,e.properties["data-alt-line"]=a.altLineNumber,e.properties["data-line-type"]=a.type,e.properties["data-line-index"]=a.lineIndex,e.children.length===0&&e.children.push(ai(`
162
- `)),e}function _k(e={}){const{classPrefix:n="__shiki_",classSuffix:i="",classReplacer:a=f=>f}=e,o=new Map;function s(f){return Object.entries(f).map(([d,p])=>`${d}:${p}`).join(";")}function c(f){const d=typeof f=="string"?f:s(f);let p=n+Sk(d)+i;return p=a(p),o.has(p)||o.set(p,typeof f=="string"?f:{...f}),p}return{name:"@shikijs/transformers:style-to-class",pre(f){if(!f.properties.style)return;const d=c(f.properties.style);delete f.properties.style,this.addClassToHast(f,d)},tokens(f){for(const d of f)for(const p of d){if(!p.htmlStyle)continue;const g=c(p.htmlStyle);p.htmlStyle={},p.htmlAttrs||={},p.htmlAttrs.class?p.htmlAttrs.class+=` ${g}`:p.htmlAttrs.class=g}},getClassRegistry(){return o},getCSS(){let f="";for(const[d,p]of o.entries())f+=`.${d}{${typeof p=="string"?p:s(p)}}`;return f},clearRegistry(){o.clear()}}}function Sk(e,n=0){let i=3735928559^n,a=1103547991^n;for(let o=0,s;o<e.length;o++)s=e.charCodeAt(o),i=Math.imul(i^s,2654435761),a=Math.imul(a^s,1597334677);return i=Math.imul(i^i>>>16,2246822507),i^=Math.imul(a^a>>>13,3266489909),a=Math.imul(a^a>>>16,2246822507),a^=Math.imul(i^i>>>13,3266489909),(4294967296*(2097151&a)+(i>>>0)).toString(36).slice(0,6)}function Ek(e=!1){const n={lineInfo:[]},i=[{line(a){return delete a.properties.class,a},pre(a){const o=yk(a),s=[];if(o!=null){let c=1;for(const f of o.children)f.type==="element"&&(s.push(vk(f,c,n)),c++);o.children=s}return a}}];return e&&i.push(xk,my),{state:n,transformers:i,toClass:my}}const my=_k({classPrefix:"hl-"}),xk={name:"token-style-normalizer",tokens(e){for(const n of e)for(const i of n){if(i.htmlStyle!=null)continue;const a={};i.color!=null&&(a.color=i.color),i.bgColor!=null&&(a["background-color"]=i.bgColor),i.fontStyle!=null&&i.fontStyle!==0&&((i.fontStyle&1)!==0&&(a["font-style"]="italic"),(i.fontStyle&2)!==0&&(a["font-weight"]="bold"),(i.fontStyle&4)!==0&&(a["text-decoration"]="underline")),Object.keys(a).length>0&&(i.htmlStyle=a)}}};function Sn(e){return`--${e==="token"?"diffs-token":"diffs"}-`}function Ck({theme:e=Nn,highlighter:n,prefix:i}){let a="";if(typeof e=="string"){const o=n.getTheme(e);a+=`color:${o.fg};`,a+=`background-color:${o.bg};`,a+=`${Sn("global")}fg:${o.fg};`,a+=`${Sn("global")}bg:${o.bg};`,a+=Vf(o,i)}else{let o=n.getTheme(e.dark);a+=`${Sn("global")}dark:${o.fg};`,a+=`${Sn("global")}dark-bg:${o.bg};`,a+=Vf(o,"dark"),o=n.getTheme(e.light),a+=`${Sn("global")}light:${o.fg};`,a+=`${Sn("global")}light-bg:${o.bg};`,a+=Vf(o,"light")}return a}function Vf(e,n){n=n!=null?`${n}-`:"";let i="";const a=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];a!=null&&(i+=`${Sn("global")}${n}addition-color:${a};`);const o=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];o!=null&&(i+=`${Sn("global")}${n}deletion-color:${o};`);const s=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return s!=null&&(i+=`${Sn("global")}${n}modified-color:${s};`),i}function gy(e){let n=e.children[0];for(;n!=null;){if(n.type==="element"&&n.tagName==="code")return n.children;"children"in n?n=n.children[0]:n=null}throw console.error(e),new Error("getLineNodes: Unable to find children")}function yy(e,n){return e?.cacheKey===n?.cacheKey&&e?.contents===n?.contents&&e?.name===n?.name&&e?.lang===n?.lang}function wk(e){const n=e.lang??ha(e.name),i=e.lang??(e.prevName!=null?ha(e.prevName):"text");return n==="text"&&i==="text"}function Ps({diff:e,diffStyle:n,startingLine:i=0,totalLines:a=1/0,expandedHunks:o,collapsedContextThreshold:s=oa,callback:c}){const f={finalHunk:e.hunks.at(-1),viewportStart:i,viewportEnd:i+a,isWindowedHighlight:i>0||a<1/0,splitCount:0,unifiedCount:0,shouldBreak(){if(!f.isWindowedHighlight)return!1;const g=f.unifiedCount>=i+a,y=f.splitCount>=i+a;return n==="unified"?g:(n==="split"||g)&&y},shouldSkip(g,y){if(!f.isWindowedHighlight)return!1;const v=f.unifiedCount+g<i,b=f.splitCount+y<i;return n==="unified"?v:(n==="split"||v)&&b},incrementCounts(g,y){(n==="unified"||n==="both")&&(f.unifiedCount+=g),(n==="split"||n==="both")&&(f.splitCount+=y)},isInWindow(g,y){if(!f.isWindowedHighlight)return!0;const v=f.isInUnifiedWindow(g),b=f.isInSplitWindow(y);return n==="unified"?v:n==="split"?b:v||b},isInUnifiedWindow(g){return!f.isWindowedHighlight||f.unifiedCount>=i-g&&f.unifiedCount<i+a},isInSplitWindow(g){return!f.isWindowedHighlight||f.splitCount>=i-g&&f.splitCount<i+a},emit(g,y=!1){return y||(n==="unified"?f.incrementCounts(1,0):n==="split"?f.incrementCounts(0,1):f.incrementCounts(1,1)),c(g)??!1}};e:for(const[g,y]of e.hunks.entries()){let k=function($,ie){return b==null||b.collapsedLines<=0||b.fromStart+b.fromEnd>0?0:n==="unified"?$===y.unifiedLineStart+y.unifiedLineCount-1?b.collapsedLines:0:ie===y.splitLineStart+y.splitLineCount-1?b.collapsedLines:0},O=function(){if(v.collapsedLines===0)return 0;const $=v.collapsedLines;return v.collapsedLines=0,$};var d=k,p=O;if(f.shouldBreak())break;const v=by(e.isPartial,y.collapsedBefore,o,g,s),b=(()=>{if(y!==f.finalHunk||!Ak(e))return;const $=e.additionLines.length-(y.additionLineIndex+y.additionCount),ie=e.deletionLines.length-(y.deletionLineIndex+y.deletionCount);if($!==ie)throw new Error(`iterateOverDiff: trailing context mismatch (additions=${$}, deletions=${ie}) for ${e.name}`);const ne=Math.min($,ie);return by(e.isPartial,ne,o,e.hunks.length,s)})(),S=v.fromStart+v.fromEnd;if(f.shouldSkip(S,S))f.incrementCounts(S,S),O();else{let $=y.unifiedLineStart-v.rangeSize,ie=y.splitLineStart-v.rangeSize,ne=y.deletionLineIndex-v.rangeSize,K=y.additionLineIndex-v.rangeSize,W=y.deletionStart-v.rangeSize,ue=y.additionStart-v.rangeSize,J=0;for(;J<v.fromStart;){if(f.isInWindow(0,0)){if(f.emit({hunkIndex:g,hunk:y,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:W+J,lineIndex:ne+J,noEOFCR:!1,unifiedLineIndex:$+J,splitLineIndex:ie+J},additionLine:{unifiedLineIndex:$+J,splitLineIndex:ie+J,lineIndex:K+J,lineNumber:ue+J,noEOFCR:!1}}))break e}else f.incrementCounts(1,1);J++}for($=y.unifiedLineStart-v.fromEnd,ie=y.splitLineStart-v.fromEnd,ne=y.deletionLineIndex-v.fromEnd,K=y.additionLineIndex-v.fromEnd,W=y.deletionStart-v.fromEnd,ue=y.additionStart-v.fromEnd,J=0;J<v.fromEnd;){if(f.isInWindow(0,0)){if(f.emit({hunkIndex:g,hunk:y,collapsedBefore:O(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:W+J,lineIndex:ne+J,noEOFCR:!1,unifiedLineIndex:$+J,splitLineIndex:ie+J},additionLine:{unifiedLineIndex:$+J,splitLineIndex:ie+J,lineIndex:K+J,lineNumber:ue+J,noEOFCR:!1}}))break e}else f.incrementCounts(1,1);J++}}let A=y.unifiedLineStart,T=y.splitLineStart,L=y.deletionLineIndex,U=y.additionLineIndex,B=y.deletionStart,N=y.additionStart;const G=y.hunkContent.at(-1);for(const $ of y.hunkContent){if(f.shouldBreak())break e;const ie=$===G;if($.type==="context"){if(f.shouldSkip($.lines,$.lines))f.incrementCounts($.lines,$.lines),O();else{let ne=0;for(;ne<$.lines;){if(f.isInWindow(0,0)){const K=ie&&ne===$.lines-1,W=A+ne,ue=T+ne;if(f.emit({hunkIndex:g,hunk:y,collapsedBefore:O(),collapsedAfter:k(W,ue),type:"context",deletionLine:{lineNumber:B+ne,lineIndex:L+ne,noEOFCR:K&&y.noEOFCRDeletions,unifiedLineIndex:W,splitLineIndex:ue},additionLine:{unifiedLineIndex:W,splitLineIndex:ue,lineIndex:U+ne,lineNumber:N+ne,noEOFCR:K&&y.noEOFCRAdditions}}))break e}else f.incrementCounts(1,1);ne++}}A+=$.lines,T+=$.lines,L+=$.lines,U+=$.lines,B+=$.lines,N+=$.lines}else{const ne=Math.max($.deletions,$.additions),K=$.deletions+$.additions;if(!f.shouldSkip(K,ne)){const W=kk(f,$,n);for(const[ue,J]of W)for(let ee=ue;ee<J;ee++){const z=k(A+ee,n==="unified"?T+(ee<$.deletions?ee:ee-$.deletions):T+ee);if(f.emit(Tk({hunkIndex:g,hunk:y,collapsedBefore:O(),collapsedAfter:z,diffStyle:n,index:ee,unifiedLineIndex:A,splitLineIndex:T,additionLineIndex:U,deletionLineIndex:L,additionLineNumber:N,deletionLineNumber:B,content:$,isLastContent:ie,unifiedCount:K,splitCount:ne}),!0))break e}}O(),f.incrementCounts(K,ne),A+=K,T+=ne,L+=$.deletions,U+=$.additions,B+=$.deletions,N+=$.additions}}if(b!=null){const{collapsedLines:$,fromStart:ie,fromEnd:ne}=b,K=ie+ne;let W=0;for(;W<K;){if(f.shouldBreak())break e;if(f.isInWindow(0,0)){const ue=W===K-1;if(f.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:ue?$:0,type:"context-expanded",deletionLine:{lineNumber:B+W,lineIndex:L+W,noEOFCR:!1,unifiedLineIndex:A+W,splitLineIndex:T+W},additionLine:{unifiedLineIndex:A+W,splitLineIndex:T+W,lineIndex:U+W,lineNumber:N+W,noEOFCR:!1}}))break e}else f.incrementCounts(1,1);W++}}}}function by(e,n,i,a,o){if(n=Math.max(n,0),n===0||e)return{fromStart:0,fromEnd:0,rangeSize:n,collapsedLines:Math.max(n,0)};if(i===!0||n<=o)return{fromStart:n,fromEnd:0,rangeSize:n,collapsedLines:0};const s=i?.get(a),c=Math.min(Math.max(s?.fromStart??0,0),n),f=Math.min(Math.max(s?.fromEnd??0,0),n),d=c+f,p=d>=n;return{fromStart:p?n:c,fromEnd:p?0:f,rangeSize:n,collapsedLines:Math.max(n-d,0)}}function Ak(e){const n=e.hunks.at(-1);return n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0?!1:n.additionLineIndex+n.additionCount<e.additionLines.length||n.deletionLineIndex+n.deletionCount<e.deletionLines.length}function kk(e,n,i){if(!e.isWindowedHighlight)return[[0,i==="unified"?n.deletions+n.additions:Math.max(n.deletions,n.additions)]];const a=i!=="split",o=i!=="unified",s=i==="unified"?"unified":"split",c=[];function f(y,v){if(y+v<=e.viewportStart||y>=e.viewportEnd)return;const b=Math.max(0,e.viewportStart-y),S=Math.min(v,e.viewportEnd-y);return S>b?[b,S]:void 0}function d(y,v){return s==="split"?y:v==="additions"?[y[0]+n.deletions,y[1]+n.deletions]:y}function p(y,v){if(y==null)return;const[b,S]=d(y,v);S>b&&c.push([b,S])}if(a&&(p(f(e.unifiedCount,n.deletions),"deletions"),p(f(e.unifiedCount+n.deletions,n.additions),"additions")),o&&(p(f(e.splitCount,n.deletions),"deletions"),p(f(e.splitCount,n.additions),"additions")),c.length===0)return c;c.sort((y,v)=>y[0]-v[0]);const g=[c[0]];for(const[y,v]of c.slice(1)){const b=g[g.length-1];y<=b[1]?b[1]=Math.max(b[1],v):g.push([y,v])}return g}function Tk({hunkIndex:e,hunk:n,collapsedAfter:i,collapsedBefore:a,diffStyle:o,index:s,unifiedLineIndex:c,splitLineIndex:f,additionLineIndex:d,deletionLineIndex:p,additionLineNumber:g,deletionLineNumber:y,content:v,isLastContent:b,unifiedCount:S,splitCount:k}){const O=s<v.deletions?c+s:void 0,A=o==="unified"?s>=v.deletions?c+s:void 0:s<v.additions?c+v.deletions+s:void 0,T=o==="unified"?f+(s<v.deletions?s:s-v.deletions):f+s,L=s<v.deletions?p+s:void 0,U=s<v.deletions?y+s:void 0,B=o==="unified"?s>=v.deletions?d+(s-v.deletions):void 0:s<v.additions?d+s:void 0,N=o==="unified"?s>=v.deletions?g+(s-v.deletions):void 0:s<v.additions?g+s:void 0,G=o==="unified"?b&&s===v.deletions-1&&n.noEOFCRDeletions:b&&s===k-1&&n.noEOFCRDeletions,$=o==="unified"?b&&s===S-1&&n.noEOFCRAdditions:b&&s===k-1&&n.noEOFCRAdditions,ie=L!=null&&U!=null&&O!=null?{lineNumber:U,lineIndex:L,noEOFCR:G,unifiedLineIndex:O,splitLineIndex:T}:void 0,ne=B!=null&&N!=null&&A!=null?{unifiedLineIndex:A,splitLineIndex:T,lineIndex:B,lineNumber:N,noEOFCR:$}:void 0;if(ie==null&&ne!=null)return{type:"change",hunkIndex:e,hunk:n,collapsedAfter:i,collapsedBefore:a,deletionLine:void 0,additionLine:ne};if(ie!=null&&ne==null)return{type:"change",hunkIndex:e,hunk:n,collapsedAfter:i,collapsedBefore:a,deletionLine:ie,additionLine:void 0};if(ie==null||ne==null)throw new Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:e,hunk:n,collapsedAfter:i,collapsedBefore:a,deletionLine:ie,additionLine:ne}}class nh{diff(n,i,a={}){let o;typeof a=="function"?(o=a,a={}):"callback"in a&&(o=a.callback);const s=this.castInput(n,a),c=this.castInput(i,a),f=this.removeEmpty(this.tokenize(s,a)),d=this.removeEmpty(this.tokenize(c,a));return this.diffWithOptionsObj(f,d,a,o)}diffWithOptionsObj(n,i,a,o){var s;const c=T=>{if(T=this.postProcess(T,a),o){setTimeout(function(){o(T)},0);return}else return T},f=i.length,d=n.length;let p=1,g=f+d;a.maxEditLength!=null&&(g=Math.min(g,a.maxEditLength));const y=(s=a.timeout)!==null&&s!==void 0?s:1/0,v=Date.now()+y,b=[{oldPos:-1,lastComponent:void 0}];let S=this.extractCommon(b[0],i,n,0,a);if(b[0].oldPos+1>=d&&S+1>=f)return c(this.buildValues(b[0].lastComponent,i,n));let k=-1/0,O=1/0;const A=()=>{for(let T=Math.max(k,-p);T<=Math.min(O,p);T+=2){let L;const U=b[T-1],B=b[T+1];U&&(b[T-1]=void 0);let N=!1;if(B){const $=B.oldPos-T;N=B&&0<=$&&$<f}const G=U&&U.oldPos+1<d;if(!N&&!G){b[T]=void 0;continue}if(!G||N&&U.oldPos<B.oldPos?L=this.addToPath(B,!0,!1,0,a):L=this.addToPath(U,!1,!0,1,a),S=this.extractCommon(L,i,n,T,a),L.oldPos+1>=d&&S+1>=f)return c(this.buildValues(L.lastComponent,i,n))||!0;b[T]=L,L.oldPos+1>=d&&(O=Math.min(O,T-1)),S+1>=f&&(k=Math.max(k,T+1))}p++};if(o)(function T(){setTimeout(function(){if(p>g||Date.now()>v)return o(void 0);A()||T()},0)})();else for(;p<=g&&Date.now()<=v;){const T=A();if(T)return T}}addToPath(n,i,a,o,s){const c=n.lastComponent;return c&&!s.oneChangePerToken&&c.added===i&&c.removed===a?{oldPos:n.oldPos+o,lastComponent:{count:c.count+1,added:i,removed:a,previousComponent:c.previousComponent}}:{oldPos:n.oldPos+o,lastComponent:{count:1,added:i,removed:a,previousComponent:c}}}extractCommon(n,i,a,o,s){const c=i.length,f=a.length;let d=n.oldPos,p=d-o,g=0;for(;p+1<c&&d+1<f&&this.equals(a[d+1],i[p+1],s);)p++,d++,g++,s.oneChangePerToken&&(n.lastComponent={count:1,previousComponent:n.lastComponent,added:!1,removed:!1});return g&&!s.oneChangePerToken&&(n.lastComponent={count:g,previousComponent:n.lastComponent,added:!1,removed:!1}),n.oldPos=d,p}equals(n,i,a){return a.comparator?a.comparator(n,i):n===i||!!a.ignoreCase&&n.toLowerCase()===i.toLowerCase()}removeEmpty(n){const i=[];for(let a=0;a<n.length;a++)n[a]&&i.push(n[a]);return i}castInput(n,i){return n}tokenize(n,i){return Array.from(n)}join(n){return n.join("")}postProcess(n,i){return n}get useLongestToken(){return!1}buildValues(n,i,a){const o=[];let s;for(;n;)o.push(n),s=n.previousComponent,delete n.previousComponent,n=s;o.reverse();const c=o.length;let f=0,d=0,p=0;for(;f<c;f++){const g=o[f];if(g.removed)g.value=this.join(a.slice(p,p+g.count)),p+=g.count;else{if(!g.added&&this.useLongestToken){let y=i.slice(d,d+g.count);y=y.map(function(v,b){const S=a[p+b];return S.length>v.length?S:v}),g.value=this.join(y)}else g.value=this.join(i.slice(d,d+g.count));d+=g.count,g.added||(p+=g.count)}}return o}}class Lk extends nh{}const Rk=new Lk;function Dk(e,n,i){return Rk.diff(e,n,i)}const vy="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class Ok extends nh{tokenize(n){const i=new RegExp(`(\\r?\\n)|[${vy}]+|[^\\S\\n\\r]+|[^${vy}]`,"ug");return n.match(i)||[]}}const Nk=new Ok;function Mk(e,n,i){return Nk.diff(e,n,i)}class Ik extends nh{constructor(){super(...arguments),this.tokenize=Uk}equals(n,i,a){return a.ignoreWhitespace?((!a.newlineIsToken||!n.includes(`
163
- `))&&(n=n.trim()),(!a.newlineIsToken||!i.includes(`
164
- `))&&(i=i.trim())):a.ignoreNewlineAtEof&&!a.newlineIsToken&&(n.endsWith(`
165
- `)&&(n=n.slice(0,-1)),i.endsWith(`
166
- `)&&(i=i.slice(0,-1))),super.equals(n,i,a)}}const zk=new Ik;function _y(e,n,i){return zk.diff(e,n,i)}function Uk(e,n){n.stripTrailingCr&&(e=e.replace(/\r\n/g,`
167
- `));const i=[],a=e.split(/(\n|\r\n)/);a[a.length-1]||a.pop();for(let o=0;o<a.length;o++){const s=a[o];o%2&&!n.newlineIsToken?i[i.length-1]+=s:i.push(s)}return i}const Hk={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function Pk(e,n,i,a,o,s,c){let f;f={},typeof f.context>"u"&&(f.context=4);const d=f.context;if(f.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(f.callback){const{callback:g}=f;_y(i,a,Object.assign(Object.assign({},f),{callback:y=>{const v=p(y);g(v)}}))}else return p(_y(i,a,f));function p(g){if(!g)return;g.push({value:"",lines:[]});function y(T){return T.map(function(L){return" "+L})}const v=[];let b=0,S=0,k=[],O=1,A=1;for(let T=0;T<g.length;T++){const L=g[T],U=L.lines||Vk(L.value);if(L.lines=U,L.added||L.removed){if(!b){const B=g[T-1];b=O,S=A,B&&(k=d>0?y(B.lines.slice(-d)):[],b-=k.length,S-=k.length)}for(const B of U)k.push((L.added?"+":"-")+B);L.added?A+=U.length:O+=U.length}else{if(b)if(U.length<=d*2&&T<g.length-2)for(const B of y(U))k.push(B);else{const B=Math.min(U.length,d);for(const G of y(U.slice(0,B)))k.push(G);const N={oldStart:b,oldLines:O-b+B,newStart:S,newLines:A-S+B,lines:k};v.push(N),b=0,S=0,k=[]}O+=U.length,A+=U.length}}for(const T of v)for(let L=0;L<T.lines.length;L++)T.lines[L].endsWith(`
168
- `)?T.lines[L]=T.lines[L].slice(0,-1):(T.lines.splice(L+1,0,"\"),L++);return{oldFileName:e,newFileName:n,oldHeader:o,newHeader:s,hunks:v}}}function Vv(e,n){if(n||(n=Hk),Array.isArray(e)){if(e.length>1&&!n.includeFileHeaders)throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return e.map(a=>Vv(a,n)).join(`
169
- `)}const i=[];n.includeIndex&&e.oldFileName==e.newFileName&&i.push("Index: "+e.oldFileName),n.includeUnderline&&i.push("==================================================================="),n.includeFileHeaders&&(i.push("--- "+e.oldFileName+(typeof e.oldHeader>"u"?"":" "+e.oldHeader)),i.push("+++ "+e.newFileName+(typeof e.newHeader>"u"?"":" "+e.newHeader)));for(let a=0;a<e.hunks.length;a++){const o=e.hunks[a];o.oldLines===0&&(o.oldStart-=1),o.newLines===0&&(o.newStart-=1),i.push("@@ -"+o.oldStart+","+o.oldLines+" +"+o.newStart+","+o.newLines+" @@");for(const s of o.lines)i.push(s)}return i.join(`
170
- `)+`
171
- `}function Bk(e,n,i,a,o,s,c){{const f=Pk(e,n,i,a,o,s);return f?Vv(f,void 0):void 0}}function Vk(e){const n=e.endsWith(`
172
- `),i=e.split(`
173
- `).map(a=>a+`
174
- `);return n?i.pop():i.push(i.pop().slice(0,-1)),i}function Sy({line:e,spanStart:n,spanLength:i}){return{start:{line:e,character:n},end:{line:e,character:n+i},properties:{"data-diff-span":""},alwaysWrap:!0}}function hs({item:e,arr:n,enableJoin:i,isNeutral:a=!1,isLastItem:o=!1}){const s=n[n.length-1];if(s==null||o||!i){n.push([a?0:1,e.value]);return}const c=s[0]===0;if(a===c||a&&e.value.length===1&&!c){s[1]+=e.value;return}n.push([a?0:1,e.value])}const jk={forcePlainText:!1};function Gk(e,n,i,{forcePlainText:a,startingLine:o,totalLines:s,expandedHunks:c,collapsedContextThreshold:f=oa}=jk){a?(o??=0,s??=1/0):(o=0,s=1/0);const d=o>0||s<1/0,p=typeof i.theme=="string"?n.getTheme(i.theme).type:void 0,g=Ck({theme:i.theme,highlighter:n}),y=a&&!d&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":i.lineDiffType,v={deletionLines:[],additionLines:[]},b=!a&&!e.isPartial,S=a?c:void 0,k=new Map;function O(T){const L=b?0:T,U=k.get(L)??$k();return k.set(L,U),U}function A(T,L,U,B){if(d){let N=U.at(-1);(N==null||N.targetIndex+N.count!==L)&&(N={targetIndex:L,originalOffset:B.length,count:0},U.push(N)),N.count++}B.push(T)}Ps({diff:e,diffStyle:"both",startingLine:o,totalLines:s,expandedHunks:d?S:!0,collapsedContextThreshold:f,callback:({hunkIndex:T,additionLine:L,deletionLine:U,type:B})=>{const N=O(T),G=L!=null?L.splitLineIndex:U.splitLineIndex;B==="change"&&L!=null&&U!=null&&qk({additionLine:e.additionLines[L.lineIndex],deletionLine:e.deletionLines[U.lineIndex],deletionLineIndex:N.deletionContent.length,additionLineIndex:N.additionContent.length,deletionDecorations:N.deletionDecorations,additionDecorations:N.additionDecorations,lineDiffType:y}),U!=null&&(A(e.deletionLines[U.lineIndex],U.lineIndex,N.deletionSegments,N.deletionContent),N.deletionInfo.push({type:B==="change"?"change-deletion":B,lineNumber:U.lineNumber,altLineNumber:B==="change"?void 0:L.lineNumber??void 0,lineIndex:`${U.unifiedLineIndex},${G}`})),L!=null&&(A(e.additionLines[L.lineIndex],L.lineIndex,N.additionSegments,N.additionContent),N.additionInfo.push({type:B==="change"?"change-addition":B,lineNumber:L.lineNumber,altLineNumber:B==="change"?void 0:U.lineNumber??void 0,lineIndex:`${L.unifiedLineIndex},${G}`}))}});for(const T of k.values()){if(T.deletionContent.length===0&&T.additionContent.length===0)continue;const L={name:e.prevName??e.name,contents:T.deletionContent.value},U={name:e.name,contents:T.additionContent.value},{deletionLines:B,additionLines:N}=Fk({deletionFile:L,deletionInfo:T.deletionInfo,deletionDecorations:T.deletionDecorations,additionFile:U,additionInfo:T.additionInfo,additionDecorations:T.additionDecorations,highlighter:n,options:i,languageOverride:a?"text":e.lang});if(b){v.deletionLines=B,v.additionLines=N;continue}if(T.deletionSegments.length>0)for(const G of T.deletionSegments)for(let $=0;$<G.count;$++)v.deletionLines[G.targetIndex+$]=B[G.originalOffset+$];else v.deletionLines.push(...B);if(T.additionSegments.length>0)for(const G of T.additionSegments)for(let $=0;$<G.count;$++)v.additionLines[G.targetIndex+$]=N[G.originalOffset+$];else v.additionLines.push(...N)}return{code:v,themeStyles:g,baseThemeType:p}}function qk({deletionLine:e,additionLine:n,deletionLineIndex:i,additionLineIndex:a,deletionDecorations:o,additionDecorations:s,lineDiffType:c}){if(e==null||n==null||c==="none")return;e=pa(e),n=pa(n);const f=c==="char"?Dk(e,n):Mk(e,n),d=[],p=[],g=c==="word-alt",y=f.at(-1);for(const b of f){const S=b===y;!b.added&&!b.removed?(hs({item:b,arr:d,enableJoin:g,isNeutral:!0,isLastItem:S}),hs({item:b,arr:p,enableJoin:g,isNeutral:!0,isLastItem:S})):b.removed?hs({item:b,arr:d,enableJoin:g,isLastItem:S}):hs({item:b,arr:p,enableJoin:g,isLastItem:S})}let v=0;for(const b of d)b[0]===1&&o.push(Sy({line:i,spanStart:v,spanLength:b[1].length})),v+=b[1].length;v=0;for(const b of p)b[0]===1&&s.push(Sy({line:a,spanStart:v,spanLength:b[1].length})),v+=b[1].length}function $k(){return{deletionContent:{push(e){this.value+=e,this.length++},value:"",length:0},additionContent:{push(e){this.value+=e,this.length++},value:"",length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function Fk({deletionFile:e,additionFile:n,deletionInfo:i,additionInfo:a,highlighter:o,deletionDecorations:s,additionDecorations:c,languageOverride:f,options:{theme:d=Nn,...p}}){const g=f??ha(e.name),y=f??ha(n.name),{state:v,transformers:b}=Ek(),S=typeof d=="string"?{...p,lang:"text",theme:d,transformers:b,decorations:void 0,defaultColor:!1,cssVariablePrefix:Sn("token")}:{...p,lang:"text",themes:d,transformers:b,decorations:void 0,defaultColor:!1,cssVariablePrefix:Sn("token")};return{deletionLines:e.contents===""?[]:(S.lang=g,v.lineInfo=i,S.decorations=s,gy(o.codeToHast(pa(e.contents),S))),additionLines:n.contents===""?[]:(S.lang=y,S.decorations=c,v.lineInfo=a,gy(o.codeToHast(pa(n.contents),S)))}}const Yk=me.createContext(void 0);function Xk(e){const n=me.useRef(e);return me.useInsertionEffect(()=>{n.current=e}),me.useCallback((...i)=>n.current(...i),[])}function Qk(e,n){return e.lineNumber===n.lineNumber&&e.side===n.side}function Ey(e,n){return e?.start===n?.start&&e?.end===n?.end&&e?.side===n?.side&&e?.endSide===n?.endSide}function Zk(){return ke({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[Hs({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}var Kk=class{hoveredLine;pre;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,n){this.mode=e,this.options=n}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:n=!1,enableGutterUtility:i=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),i?this.ensureGutterUtilityNode(n):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e){const n=!(e===this.selectedRange||Ey(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!n||(this.selectedRange=e,this.renderSelection(),n&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{if(this.hoveredLine!=null){if(this.mode==="diff"&&this.hoveredLine.type==="diff-line")return{lineNumber:this.hoveredLine.lineNumber,side:this.hoveredLine.annotationSide};if(this.mode==="file"&&this.hoveredLine.type==="line")return{lineNumber:this.hoveredLine.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:n,onLineClick:i,onLineNumberClick:a,onMergeConflictActionClick:o}=this.options;n==null&&i==null&&a==null&&o==null||this.options.onGutterUtilityClick!=null&&Ay(e.composedPath())||(ii(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{const{lineHoverHighlight:n="disabled",onLineEnter:i,onLineLeave:a,enableGutterUtility:o=!1}=this.options;n==="disabled"&&!o&&i==null&&a==null||(ii(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:n}=this.options;if(ii(n,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null){ii(n,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no .hoveredLine");return}this.gutterUtilityContainer?.remove(),this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()};handlePointerEvent({eventType:e,event:n}){const{__debugPointerEvents:i}=this.options,a=n.composedPath();ii(i,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:a});const o=this.resolvePointerTarget(a);ii(i,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",o);const{onLineClick:s,onLineNumberClick:c,onLineEnter:f,onLineLeave:d,onHunkExpand:p,onMergeConflictActionClick:g}=this.options;switch(e){case"move":if(gl(o)&&this.hoveredLine?.lineElement===o.lineElement)break;this.hoveredLine!=null&&(this.gutterUtilityContainer?.remove(),d?.({...this.hoveredLine,event:n}),this.clearHoveredLine()),gl(o)&&(this.setHoveredLine(this.toEventBaseProps(o)),this.gutterUtilityContainer!=null&&o.numberElement.appendChild(this.gutterUtilityContainer),f?.({...this.hoveredLine,event:n}));break;case"click":{if(o==null)break;if(eT(o)&&g!=null){g(o);break}if(Jk(o)&&p!=null){p(o.hunkIndex,n.shiftKey?"both":o.direction,n.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!gl(o))break;const y=this.toEventBaseProps(o);c!=null&&o.numberColumn?c({...y,event:n}):s?.({...y,event:n});break}}}syncPointerListeners(e){const{__debugPointerEvents:n,lineHoverHighlight:i="disabled",onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onHunkExpand:f,onMergeConflictActionClick:d,enableGutterUtility:p=!1,enableLineSelection:g=!1,onGutterUtilityClick:y}=this.options,v=y!=null,b=i!=="disabled"||a!=null||o!=null||f!=null||d!=null||s!=null||c!=null||p||g||v;b&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,ii(n,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const O=[];return(n==="both"||n==="click")&&(a!=null&&O.push("onLineClick"),o!=null&&O.push("onLineNumberClick"),f!=null&&O.push("expandable hunk separators"),d!=null&&O.push("merge conflict actions")),O})()),ii(n,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),ii(n,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!b&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const S=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",k=this.pointerSession.mode==="gutterSelecting";(!g&&S||!v&&k)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:n,enableLineSelection:i=!1}=this.options,a=e!=null,o=n!=null||i;a&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!a&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),o&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!o&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType==="mouse"&&e.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const n=e.composedPath();Ay(n)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e,n):this.startLineSelectionFromPointerDown(e,n)};startLineSelectionFromPointerDown(e,n){const{enableLineSelection:i=!1}=this.options;if(!i)return;const a=this.getSelectionPointerInfo(n,!0);if(a==null)return;const{pre:o}=this;if(o==null)return;e.preventDefault();const{lineNumber:s,eventSide:c,lineIndex:f}=a;if(e.shiftKey&&this.selectedRange!=null){const d=this.getIndexesFromSelection(this.selectedRange,o.getAttribute("data-diff-type")==="split");if(d==null)return;const p=d.start<=d.end?f>=d.start:f<=d.end;this.selectionAnchor={lineNumber:p?this.selectedRange.start:this.selectedRange.end,side:p?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(s,c,!1),this.notifySelectionStart(this.selectedRange),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===s&&this.selectedRange?.end===s){const d={lineNumber:s,side:c};this.selectionAnchor=d,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:d,pending:d},this.attachDocumentPointerListeners();return}this.selectedRange=null,this.selectionAnchor={lineNumber:s,side:c},this.updateSelection(s,c,!1),this.notifySelectionStart(this.selectedRange),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e,n){const{enableLineSelection:i=!1,onGutterUtilityClick:a}=this.options;if(a==null)return;const o=this.getSelectionPointFromPath(n);o!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:o,current:o},i&&(this.selectionAnchor={lineNumber:o.lineNumber,side:o.side},this.updateSelection(o.lineNumber,o.side,!1),this.notifySelectionStart(this.selectedRange)),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:n=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;const i=this.getSelectionPointFromPath(e.composedPath());if(i==null)return;this.pointerSession.current=i,n===!0&&this.updateSelection(i.lineNumber,i.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;const i=this.getSelectionPointerInfo(e.composedPath(),!1);if(i==null||this.selectionAnchor==null)return;this.updateSelection(i.lineNumber,i.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;const i=this.getSelectionPointerInfo(e.composedPath(),!1);if(i==null||this.selectionAnchor==null)return;const a={lineNumber:i.lineNumber,side:i.eventSide};if(Qk(this.pointerSession.pending,a))return;this.updateSelection(i.lineNumber,i.eventSide,!1),this.notifySelectionStart(this.selectedRange),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:n=!1,onGutterUtilityClick:i}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;const a=this.getSelectionPointFromPath(e.composedPath());a!=null&&(this.pointerSession.current=a,n&&this.updateSelection(a.lineNumber,a.side)),i?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,n&&(this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:n="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,n!=="disabled"&&((n==="both"||n==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(n==="both"||n==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const n=document.createElement("div");n.innerHTML=ca(Zk());const i=n.firstElementChild;if(!(i instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");i.remove(),this.gutterUtilityButton=i}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}getSelectionPointerInfo(e,n){const i=this.resolvePointerTarget(e);if(gl(i)&&!(n&&!i.numberColumn)&&i.splitLineIndex!=null)return{lineIndex:i.splitLineIndex,lineNumber:i.lineNumber,eventSide:this.mode==="diff"?i.side:void 0}}getSelectionPointFromPath(e){const n=this.resolvePointerTarget(e);if(gl(n))return{lineNumber:n.lineNumber,side:this.mode==="diff"?n.side:void 0}}getLineIndex(e,n){const{getLineIndex:i}=this.options;return i!=null?i(e,n):[e-1,e-1]}updateSelection(e,n,i=!0){const{selectedRange:a}=this;let o;if(e==null)o=null;else{const s=this.selectionAnchor?.side??n,c=this.selectionAnchor?.lineNumber??e;o=this.buildSelectionRange(c,e,s,n)}Ey(a??void 0,o??void 0)||(this.selectedRange=o,i&&this.notifySelectionChangeDelta(),this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection))}getIndexesFromSelection(e,n){if(this.pre==null)return;const i=this.getLineIndex(e.start,e.side),a=this.getLineIndex(e.end,e.endSide??e.side);return i!=null&&a!=null?{start:n?i[1]:i[0],end:n?a[1]:a[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const e=this.pre.querySelectorAll("[data-selected-line]");for(const f of e)f.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:n}=this.pre;if(n.length===0)return;if(n.length>2)throw console.error(n),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const i=this.pre.getAttribute("data-diff-type")==="split",a=this.getIndexesFromSelection(this.selectedRange,i);if(a==null)throw console.error({rowRange:a,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const o=a.start===a.end,s=Math.min(a.start,a.end),c=Math.max(a.start,a.end);for(const f of n){const[d,p]=f.children,g=p.children.length;if(g!==d.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let y=0;y<g;y++){const v=p.children[y],b=d.children[y];if(!(v instanceof HTMLElement)||!(b instanceof HTMLElement))continue;const S=this.parseLineIndex(v,i);if((S??0)>c)break;if(S==null||S<s)continue;let k=o?"single":S===s?"first":S===c?"last":"";v.setAttribute("data-selected-line",k),b.setAttribute("data-selected-line",k),b.nextSibling instanceof HTMLElement&&v.nextSibling instanceof HTMLElement&&(v.nextSibling.hasAttribute("data-line-annotation")||v.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(o?(k="last",v.setAttribute("data-selected-line","first")):S===s?k="":S===c&&v.setAttribute("data-selected-line",""),v.nextSibling.setAttribute("data-selected-line",k),b.nextSibling.setAttribute("data-selected-line",k))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.selectedRange??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.selectedRange??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode==="file"?{type:"line",lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:"diff-line",annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}buildSelectedLineRange(e,n){return this.buildSelectionRange(e.lineNumber,n.lineNumber,e.side,n.side)}buildSelectionRange(e,n,i,a){return{start:e,end:n,...i!=null?{side:i}:{},...i!==a&&a!=null?{endSide:a}:{}}}resolvePointerTarget(e){let n=!1,i,a,o,s,c,f,d,p;for(const v of e){if(!(v instanceof HTMLElement))continue;if(p==null&&v.hasAttribute("data-merge-conflict-action")){const O=v.getAttribute("data-merge-conflict-action")??void 0,A=v.getAttribute("data-merge-conflict-conflict-index")??void 0,T=A!=null?Number.parseInt(A,10):NaN;tT(O)&&Number.isFinite(T)&&(p={kind:"merge-conflict-action",resolution:O,conflictIndex:T})}const b=c==null?v.getAttribute("data-column-number")??void 0:void 0;if(b!=null){c=v,d=Number.parseInt(b,10),n=!0,i=wy(v),s=v.getAttribute("data-line-index")??void 0;continue}const S=o==null?v.getAttribute("data-line")??void 0:void 0;if(S!=null){o=v,d=Number.parseInt(S,10),i=wy(v),s=v.getAttribute("data-line-index")??void 0;continue}if(f==null&&v.hasAttribute("data-expand-button")){f={hunkIndex:void 0,direction:v.hasAttribute("data-expand-up")?"up":v.hasAttribute("data-expand-down")?"down":"both"};continue}const k=f!=null?v.getAttribute("data-expand-index")??void 0:void 0;if(f!=null&&k!=null){const O=Number.parseInt(k,10);Number.isNaN(O)||(f.hunkIndex=O);continue}if(a==null&&v.hasAttribute("data-code")){a=v;break}}if(p!=null)return p;if(f?.hunkIndex!=null)return{type:"line-info",hunkIndex:f.hunkIndex,direction:f.direction};if(o??=s!=null?Cy(a,`[data-line][data-line-index="${s}"]`):void 0,c??=s!=null?Cy(a,`[data-column-number][data-line-index="${s}"]`):void 0,a==null||o==null||c==null||i==null||d==null||Number.isNaN(d))return;const g=this.parseLineIndex(o,this.isSplitDiff());if(this.mode==="file")return{kind:"line",lineType:i,lineElement:o,lineNumber:d,numberColumn:n,numberElement:c,side:void 0,splitLineIndex:g};const y=(()=>{switch(i){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return a.hasAttribute("data-deletions")?"deletions":"additions"}})();return{kind:"line",lineType:i,lineElement:o,lineNumber:d,numberColumn:n,numberElement:c,side:y,splitLineIndex:g}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,n){const i=(e.getAttribute("data-line-index")??"").split(",").map(a=>Number.parseInt(a,10)).filter(a=>!Number.isNaN(a));if(n&&i.length===2)return i[1];if(!n)return i[0]}};function xy({enableGutterUtility:e,enableHoverUtility:n,lineHoverHighlight:i,onGutterUtilityClick:a,onLineClick:o,onLineEnter:s,onLineLeave:c,onLineNumberClick:f,renderGutterUtility:d,renderHoverUtility:p,__debugPointerEvents:g,enableLineSelection:y,onLineSelected:v,onLineSelectionStart:b,onLineSelectionChange:S,onLineSelectionEnd:k},O,A,T){return{enableGutterUtility:Wk({enableGutterUtility:e,enableHoverUtility:n,renderGutterUtility:d,renderHoverUtility:p,onGutterUtilityClick:a}),usesCustomGutterUtility:d!=null||p!=null,lineHoverHighlight:i,onGutterUtilityClick:a,onHunkExpand:O,onMergeConflictActionClick:T,onLineClick:o,onLineEnter:s,onLineLeave:c,onLineNumberClick:f,__debugPointerEvents:g,enableLineSelection:y,onLineSelected:v,onLineSelectionStart:b,onLineSelectionChange:S,onLineSelectionEnd:k,getLineIndex:A}}function Wk({enableGutterUtility:e,enableHoverUtility:n,renderGutterUtility:i,renderHoverUtility:a,onGutterUtilityClick:o}){if(e!==void 0&&n!==void 0)throw new Error("Cannot use both 'enableGutterUtility' and deprecated 'enableHoverUtility'. Use only 'enableGutterUtility'.");if(i!=null&&a!=null)throw new Error("Cannot use both 'renderGutterUtility' and deprecated 'renderHoverUtility'. Use only 'renderGutterUtility'.");if(o!=null&&(i!=null||a!=null))throw new Error("Cannot use both 'onGutterUtilityClick' and render utility callbacks ('renderGutterUtility'/'renderHoverUtility'). Use only one gutter utility API.");return e??n??!1}function gl(e){return e!=null&&"kind"in e&&e.kind==="line"}function Jk(e){return"type"in e&&e.type==="line-info"}function eT(e){return"kind"in e&&e.kind==="merge-conflict-action"}function tT(e){return e==="current"||e==="incoming"||e==="both"}function Cy(e,n){const i=e?.querySelector(n);return i instanceof HTMLElement?i:void 0}function wy(e){const n=e.getAttribute("data-line-type");if(n!=null)switch(n){case"change-deletion":case"change-addition":case"context":case"context-expanded":return n;default:return}}function Ay(e){for(const n of e)if(n instanceof HTMLElement&&n.hasAttribute("data-utility-button"))return!0;return!1}function ii(e="none",n,...i){switch(e){case"none":return;case"both":break;case"click":if(n!=="click")return;break;case"move":if(n!=="move")return;break}console.log(...i)}var nT=class{observedNodes=new Map;queuedUpdates=new Map;cleanUp(){this.resizeObserver?.disconnect(),this.observedNodes.clear(),this.queuedUpdates.clear()}resizeObserver;setup(e,n){this.resizeObserver??=new ResizeObserver(this.handleResizeObserver);const i=e.querySelectorAll("code"),a=new Map(this.observedNodes);this.observedNodes.clear();for(const o of i){let s=a.get(o);if(s!=null&&s.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let c=o.firstElementChild;c instanceof HTMLElement||(c=null),s!=null?(this.observedNodes.set(o,s),a.delete(o),s.numberElement!==c?(s.numberElement!=null&&this.resizeObserver.unobserve(s.numberElement),c!=null&&(this.resizeObserver.observe(c),a.delete(c),this.observedNodes.set(c,s)),s.numberElement=c):s.numberElement!=null&&(a.delete(s.numberElement),this.observedNodes.set(s.numberElement,s))):(s={type:"code",codeElement:o,numberElement:c,codeWidth:"auto",numberWidth:0},this.observedNodes.set(o,s),this.resizeObserver.observe(o),c!=null&&(this.observedNodes.set(c,s),this.resizeObserver.observe(c)))}if(i.length>1&&!n){const o=e.querySelectorAll('[data-line-annotation*=","]'),s=new Map;for(const c of o){if(!(c instanceof HTMLElement))continue;const{lineAnnotation:f=""}=c.dataset;if(!/^\d+,\d+$/.test(f)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:f,element:c});continue}let d=s.get(f);d==null&&(d=[],s.set(f,d)),d.push(c)}for(const[c,f]of s){if(f.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",c,f);continue}const[d,p]=f,g=d.firstElementChild,y=p.firstElementChild;if(!(d instanceof HTMLElement)||!(p instanceof HTMLElement)||!(g instanceof HTMLElement)||!(y instanceof HTMLElement))continue;let v=a.get(g);if(v!=null){this.observedNodes.set(g,v),this.observedNodes.set(y,v),a.delete(g),a.delete(y);continue}v={type:"annotations",column1:{container:d,child:g,childHeight:g.getBoundingClientRect().height},column2:{container:p,child:y,childHeight:y.getBoundingClientRect().height},currentHeight:"auto"};const b=Math.max(v.column1.childHeight,v.column2.childHeight);this.applyNewHeight(v,b),this.observedNodes.set(g,v),this.observedNodes.set(y,v),this.resizeObserver.observe(g),this.resizeObserver.observe(y)}}for(const o of a.keys())o.isConnected&&(o.style.removeProperty("--diffs-column-content-width"),o.style.removeProperty("--diffs-column-number-width"),o.style.removeProperty("--diffs-column-width"),o.parentElement instanceof HTMLElement&&o.parentElement.style.removeProperty("--diffs-annotation-min-height")),this.resizeObserver.unobserve(o);a.clear()}handleResizeObserver=e=>{for(const n of e){const{target:i,borderBoxSize:a}=n;if(!(i instanceof HTMLElement)){console.error("FileDiff.handleResizeObserver: Invalid element for ResizeObserver",n);continue}const o=this.observedNodes.get(i);if(o==null){console.error("FileDiff.handleResizeObserver: Not a valid observed node",n);continue}const s=a[0];if(o.type==="annotations"){const c=(()=>{if(i===o.column1.child)return o.column1;if(i===o.column2.child)return o.column2})();if(c==null){console.error("FileDiff.handleResizeObserver: Couldn't find a column for",{item:o,target:i});continue}c.childHeight=s.blockSize;const f=Math.max(o.column1.childHeight,o.column2.childHeight);this.applyNewHeight(o,f)}else if(o.type==="code"){const c=[i,s.inlineSize],f=this.queuedUpdates.get(o)??[];f.push(c),this.queuedUpdates.set(o,f)}}this.handleColumnChange()};handleColumnChange=()=>{for(const[e,n]of this.queuedUpdates)for(const[i,a]of n)if(i===e.codeElement){const o=Math.max(Math.floor(a),0);if(o!==e.codeWidth){const s=Math.max(o-e.numberWidth,0);e.codeWidth=o===0?"auto":o,e.codeElement.style.setProperty("--diffs-column-content-width",`${s>0?`${s}px`:"auto"}`),e.codeElement.style.setProperty("--diffs-column-width",`${typeof e.codeWidth=="number"?`${e.codeWidth}px`:"auto"}`)}e.numberElement!=null&&typeof e.codeWidth=="number"&&e.numberWidth===0&&n.push([e.numberElement,e.numberElement.getBoundingClientRect().width])}else if(i===e.numberElement){const o=Math.max(Math.ceil(a),0);if(o!==e.numberWidth&&(e.numberWidth=o,e.codeElement.style.setProperty("--diffs-column-number-width",`${e.numberWidth===0?"auto":`${e.numberWidth}px`}`),e.codeWidth!=="auto")){const s=Math.max(e.codeWidth-e.numberWidth,0);e.codeElement.style.setProperty("--diffs-column-content-width",`${s===0?"auto":`${s}px`}`)}}this.queuedUpdates.clear()};applyNewHeight(e,n){n!==e.currentHeight&&(e.currentHeight=Math.max(n,0),e.column1.container.style.setProperty("--diffs-annotation-min-height",`${e.currentHeight}px`),e.column2.container.style.setProperty("--diffs-annotation-min-height",`${e.currentHeight}px`))}};function jv(e,n){return e==null||n==null?e===n:e.startingLine===n.startingLine&&e.totalLines===n.totalLines&&e.bufferBefore===n.bufferBefore&&e.bufferAfter===n.bufferAfter}function ky(e){for(const n of Array.isArray(e)?e:[e])if(!cd.has(n))return!1;return!0}function jf(e){for(const n of Pv(e))if(!ud.has(n))return!1;return!0}function iT(e){return ke({tagName:"div",children:[ke({tagName:"div",children:e.annotations?.map(n=>ke({tagName:"slot",properties:{name:n}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function rT(e,n){return ke({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${n}`}})}function aT(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function lT({fileOrDiff:e,mode:n}){const i="type"in e?e:void 0,a={"data-diffs-header":n,"data-change-type":i?.type};return ke({tagName:"div",children:[n==="custom"?ke({tagName:"slot",properties:{name:Vd}}):oT({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...n==="custom"?[]:[sT(i)]],properties:a})}function oT({name:e,prevName:n,iconType:i}){const a=[ke({tagName:"slot",properties:{name:Pd}}),Hs({name:aT(i),properties:{"data-change-icon":i}})];return n!=null&&(a.push(ke({tagName:"div",children:[ke({tagName:"bdi",children:[ai(n)]})],properties:{"data-prev-name":""}})),a.push(Hs({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),a.push(ke({tagName:"div",children:[ke({tagName:"bdi",children:[ai(e)]})],properties:{"data-title":""}})),ke({tagName:"div",children:a,properties:{"data-header-content":""}})}function sT(e){const n=[];if(e!=null){let i=0,a=0;for(const o of e.hunks)i+=o.additionLines,a+=o.deletionLines;(a>0||i===0)&&n.push(ke({tagName:"span",children:[ai(`-${a}`)],properties:{"data-deletions-count":""}})),(i>0||a===0)&&n.push(ke({tagName:"span",children:[ai(`+${i}`)],properties:{"data-additions-count":""}}))}return n.push(ke({tagName:"slot",properties:{name:Bd}})),ke({tagName:"div",children:n,properties:{"data-metadata":""}})}function uT(e){return ke({tagName:"pre",properties:cT(e)})}function cT({diffIndicators:e,disableBackground:n,disableLineNumbers:i,overflow:a,split:o,totalLines:s,type:c,customProperties:f}){return{...f,"data-diff":c==="diff"?"":void 0,"data-file":c==="file"?"":void 0,"data-diff-type":c==="diff"?o?"split":"single":void 0,"data-overflow":a,"data-disable-line-numbers":i?"":void 0,"data-background":n?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,tabIndex:0,style:`--diffs-min-number-column-width-default:${`${s}`.length}ch;`}}function fT(e,{theme:n,preferredHighlighter:i="shiki-js"}){return{langs:[e??"text"],themes:Pv(n),preferredHighlighter:i}}const dT=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
175
- <symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
176
- <path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
177
- </symbol>
178
- <symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
179
- <path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
180
- </symbol>
181
- <symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
182
- <path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
183
- </symbol>
184
- <symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
185
- <path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
186
- </symbol>
187
- <symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
188
- <path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
189
- </symbol>
190
- <symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
191
- <path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
192
- </symbol>
193
- <symbol id="diffs-icon-expand" viewBox="0 0 16 16">
194
- <path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
195
- </symbol>
196
- <symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
197
- <path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
198
- </symbol>
199
- <symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
200
- <path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
201
- </symbol>
202
- <symbol id="diffs-icon-plus" viewBox="0 0 16 16">
203
- <path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>
204
- </symbol>
205
- <symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
206
- <path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
207
- </symbol>
208
- <symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
209
- <path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
210
- </symbol>
211
- <symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
212
- <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
213
- </symbol>
214
- <symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
215
- <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
216
- </symbol>
217
- <symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
218
- <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
219
- </symbol>
220
- <symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
221
- <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
222
- </symbol>
223
- <symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
224
- <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
225
- </symbol>
226
- </svg>`;function hT(e,n){return e==null||n==null?e===n:pT(e.customProperties,n.customProperties)&&e.type===n.type&&e.diffIndicators===n.diffIndicators&&e.disableBackground===n.disableBackground&&e.disableLineNumbers===n.disableLineNumbers&&e.overflow===n.overflow&&e.split===n.split&&e.totalLines===n.totalLines}const Ty={};function pT(e=Ty,n=Ty){if(e===n)return!0;const i=Object.keys(e),a=Object.keys(n);if(i.length!==a.length)return!1;for(const o of i)if(e[o]!==n[o])return!1;return!0}function mT(e){const n=document.createElement("div");return n.dataset.annotationSlot="",n.slot=e,n.style.whiteSpace="normal",n}function gT(){const e=document.createElement("div");return e.slot="gutter-utility-slot",e.style.position="absolute",e.style.top="0",e.style.bottom="0",e.style.textAlign="center",e.style.whiteSpace="normal",e}function yT(){const e=document.createElement("style");return e.setAttribute(Sb,""),e}var bT=`@layer base, theme, rendered, unsafe;
227
-
228
- @layer base {
229
- :host {
230
- --diffs-font-fallback:
231
- 'SF Mono', Monaco, Consolas, 'Ubuntu Mono', 'Liberation Mono',
232
- 'Courier New', monospace;
233
- --diffs-header-font-fallback:
234
- system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
235
- 'Noto Sans', 'Liberation Sans', Arial, sans-serif;
236
-
237
- --diffs-mixer: light-dark(black, white);
238
- --diffs-gap-fallback: 8px;
239
-
240
- --diffs-added-light: #0dbe4e;
241
- --diffs-added-dark: #5ecc71;
242
- --diffs-modified-light: #009fff;
243
- --diffs-modified-dark: #69b1ff;
244
- --diffs-deleted-light: #ff2e3f;
245
- --diffs-deleted-dark: #ff6762;
246
-
247
- /*
248
- // Available CSS Color Overrides
249
- --diffs-bg-buffer-override
250
- --diffs-bg-hover-override
251
- --diffs-bg-context-override
252
- --diffs-bg-separator-override
253
-
254
- --diffs-fg-number-override
255
- --diffs-fg-number-addition-override
256
- --diffs-fg-number-deletion-override
257
- --diffs-fg-conflict-marker-override
258
-
259
- --diffs-deletion-color-override
260
- --diffs-addition-color-override
261
- --diffs-modified-color-override
262
-
263
- --diffs-bg-deletion-override
264
- --diffs-bg-deletion-number-override
265
- --diffs-bg-deletion-hover-override
266
- --diffs-bg-deletion-emphasis-override
267
-
268
- --diffs-bg-addition-override
269
- --diffs-bg-addition-number-override
270
- --diffs-bg-addition-hover-override
271
- --diffs-bg-addition-emphasis-override
272
-
273
- // Line Selection Color Overrides (for enableLineSelection)
274
- --diffs-selection-color-override
275
- --diffs-bg-selection-override
276
- --diffs-bg-selection-number-override
277
- --diffs-bg-selection-background-override
278
- --diffs-bg-selection-number-background-override
279
-
280
- // Available CSS Layout Overrides
281
- --diffs-gap-inline
282
- --diffs-gap-block
283
- --diffs-gap-style
284
- --diffs-tab-size
285
- */
286
-
287
- color-scheme: light dark;
288
- display: block;
289
- font-family: var(
290
- --diffs-header-font-family,
291
- var(--diffs-header-font-fallback)
292
- );
293
- font-size: var(--diffs-font-size, 13px);
294
- line-height: var(--diffs-line-height, 20px);
295
- font-feature-settings: var(--diffs-font-features);
296
-
297
- /* NOTE(amadeus): we cannot use 'in oklch' because current versions of cursor
298
- * and vscode use an older build of chrome that appears to have a bug with
299
- * color-mix and 'in oklch', so use 'in lab' instead */
300
- --diffs-bg: light-dark(
301
- var(--diffs-light-bg, #fff),
302
- var(--diffs-dark-bg, #000)
303
- );
304
- --diffs-bg-buffer: var(
305
- --diffs-bg-buffer-override,
306
- light-dark(
307
- color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)),
308
- color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))
309
- )
310
- );
311
- --diffs-bg-hover: var(
312
- --diffs-bg-hover-override,
313
- light-dark(
314
- color-mix(in lab, var(--diffs-bg) 97%, var(--diffs-mixer)),
315
- color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-mixer))
316
- )
317
- );
318
-
319
- --diffs-bg-context: var(
320
- --diffs-bg-context-override,
321
- light-dark(
322
- color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)),
323
- color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))
324
- )
325
- );
326
- --diffs-bg-context-number: var(
327
- --diffs-bg-context-number-override,
328
- light-dark(
329
- color-mix(in lab, var(--diffs-bg-context) 80%, var(--diffs-bg)),
330
- color-mix(in lab, var(--diffs-bg-context) 60%, var(--diffs-bg))
331
- )
332
- );
333
- --diffs-bg-conflict-marker: var(
334
- --diffs-bg-conflict-marker-override,
335
- light-dark(
336
- color-mix(
337
- in lab,
338
- var(--diffs-bg-context) 88%,
339
- var(--diffs-modified-base)
340
- ),
341
- color-mix(
342
- in lab,
343
- var(--diffs-bg-context) 80%,
344
- var(--diffs-modified-base)
345
- )
346
- )
347
- );
348
- --diffs-bg-conflict-current: var(
349
- --diffs-bg-conflict-current-override,
350
- light-dark(#e5f8ea, #274432)
351
- );
352
- --diffs-bg-conflict-base: var(
353
- --diffs-bg-conflict-base-override,
354
- light-dark(
355
- color-mix(
356
- in lab,
357
- var(--diffs-bg-context) 90%,
358
- var(--diffs-modified-base)
359
- ),
360
- color-mix(
361
- in lab,
362
- var(--diffs-bg-context) 82%,
363
- var(--diffs-modified-base)
364
- )
365
- )
366
- );
367
- --diffs-bg-conflict-incoming: var(
368
- --diffs-bg-conflict-incoming-override,
369
- light-dark(#e6f1ff, #253b5a)
370
- );
371
- --diffs-bg-conflict-marker-number: var(
372
- --diffs-bg-conflict-marker-number-override,
373
- light-dark(
374
- color-mix(in lab, var(--diffs-bg-conflict-marker) 72%, var(--diffs-bg)),
375
- color-mix(in lab, var(--diffs-bg-conflict-marker) 54%, var(--diffs-bg))
376
- )
377
- );
378
- --diffs-bg-conflict-current-number: var(
379
- --diffs-bg-conflict-current-number-override,
380
- light-dark(#d7f1de, #30533d)
381
- );
382
- --diffs-bg-conflict-base-number: var(
383
- --diffs-bg-conflict-base-number-override,
384
- light-dark(
385
- color-mix(in lab, var(--diffs-bg-conflict-base) 72%, var(--diffs-bg)),
386
- color-mix(in lab, var(--diffs-bg-conflict-base) 54%, var(--diffs-bg))
387
- )
388
- );
389
- --diffs-bg-conflict-incoming-number: var(
390
- --diffs-bg-conflict-incoming-number-override,
391
- light-dark(#d8e8ff, #2f4b73)
392
- );
393
- --conflict-bg-current: var(
394
- --conflict-bg-current-override,
395
- var(--diffs-bg-addition)
396
- );
397
- --conflict-bg-incoming: var(
398
- --conflict-bg-incoming-override,
399
- light-dark(
400
- color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-modified-base)),
401
- color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-modified-base))
402
- )
403
- );
404
- --conflict-bg-current-number: var(
405
- --conflict-bg-current-number-override,
406
- var(--diffs-bg-addition-number)
407
- );
408
- --conflict-bg-incoming-number: var(
409
- --conflict-bg-incoming-number-override,
410
- light-dark(
411
- color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-modified-base)),
412
- color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-modified-base))
413
- )
414
- );
415
- --conflict-bg-current-header: var(
416
- --conflict-bg-current-header-override,
417
- light-dark(
418
- color-mix(in lab, var(--diffs-bg) 78%, var(--diffs-addition-base)),
419
- color-mix(in lab, var(--diffs-bg) 68%, var(--diffs-addition-base))
420
- )
421
- );
422
- --conflict-bg-incoming-header: var(
423
- --conflict-bg-incoming-header-override,
424
- light-dark(
425
- color-mix(in lab, var(--diffs-bg) 78%, var(--diffs-modified-base)),
426
- color-mix(in lab, var(--diffs-bg) 68%, var(--diffs-modified-base))
427
- )
428
- );
429
- --conflict-bg-current-header-number: var(
430
- --conflict-bg-current-header-number-override,
431
- light-dark(
432
- color-mix(in lab, var(--diffs-bg) 72%, var(--diffs-addition-base)),
433
- color-mix(in lab, var(--diffs-bg) 62%, var(--diffs-addition-base))
434
- )
435
- );
436
- --conflict-bg-incoming-header-number: var(
437
- --conflict-bg-incoming-header-number-override,
438
- light-dark(
439
- color-mix(in lab, var(--diffs-bg) 72%, var(--diffs-modified-base)),
440
- color-mix(in lab, var(--diffs-bg) 62%, var(--diffs-modified-base))
441
- )
442
- );
443
-
444
- --diffs-bg-separator: var(
445
- --diffs-bg-separator-override,
446
- light-dark(
447
- color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)),
448
- color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))
449
- )
450
- );
451
-
452
- --diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));
453
- --diffs-fg-number: var(
454
- --diffs-fg-number-override,
455
- light-dark(
456
- color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)),
457
- color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))
458
- )
459
- );
460
- --diffs-fg-conflict-marker: var(
461
- --diffs-fg-conflict-marker-override,
462
- var(--diffs-fg-number)
463
- );
464
-
465
- --diffs-deletion-base: var(
466
- --diffs-deletion-color-override,
467
- light-dark(
468
- var(
469
- --diffs-light-deletion-color,
470
- var(--diffs-deletion-color, var(--diffs-deleted-light))
471
- ),
472
- var(
473
- --diffs-dark-deletion-color,
474
- var(--diffs-deletion-color, var(--diffs-deleted-dark))
475
- )
476
- )
477
- );
478
- --diffs-addition-base: var(
479
- --diffs-addition-color-override,
480
- light-dark(
481
- var(
482
- --diffs-light-addition-color,
483
- var(--diffs-addition-color, var(--diffs-added-light))
484
- ),
485
- var(
486
- --diffs-dark-addition-color,
487
- var(--diffs-addition-color, var(--diffs-added-dark))
488
- )
489
- )
490
- );
491
- --diffs-modified-base: var(
492
- --diffs-modified-color-override,
493
- light-dark(
494
- var(
495
- --diffs-light-modified-color,
496
- var(--diffs-modified-color, var(--diffs-modified-light))
497
- ),
498
- var(
499
- --diffs-dark-modified-color,
500
- var(--diffs-modified-color, var(--diffs-modified-dark))
501
- )
502
- )
503
- );
504
-
505
- /* NOTE(amadeus): we cannot use 'in oklch' because current versions of cursor
506
- * and vscode use an older build of chrome that appears to have a bug with
507
- * color-mix and 'in oklch', so use 'in lab' instead */
508
- --diffs-bg-deletion: var(
509
- --diffs-bg-deletion-override,
510
- light-dark(
511
- color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)),
512
- color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))
513
- )
514
- );
515
- --diffs-bg-deletion-number: var(
516
- --diffs-bg-deletion-number-override,
517
- light-dark(
518
- color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-deletion-base)),
519
- color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-deletion-base))
520
- )
521
- );
522
- --diffs-bg-deletion-hover: var(
523
- --diffs-bg-deletion-hover-override,
524
- light-dark(
525
- color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base)),
526
- color-mix(in lab, var(--diffs-bg) 75%, var(--diffs-deletion-base))
527
- )
528
- );
529
- --diffs-bg-deletion-emphasis: var(
530
- --diffs-bg-deletion-emphasis-override,
531
- light-dark(
532
- rgb(from var(--diffs-deletion-base) r g b / 0.15),
533
- rgb(from var(--diffs-deletion-base) r g b / 0.2)
534
- )
535
- );
536
-
537
- --diffs-bg-addition: var(
538
- --diffs-bg-addition-override,
539
- light-dark(
540
- color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)),
541
- color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))
542
- )
543
- );
544
- --diffs-bg-addition-number: var(
545
- --diffs-bg-addition-number-override,
546
- light-dark(
547
- color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-addition-base)),
548
- color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-addition-base))
549
- )
550
- );
551
- --diffs-bg-addition-hover: var(
552
- --diffs-bg-addition-hover-override,
553
- light-dark(
554
- color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base)),
555
- color-mix(in lab, var(--diffs-bg) 70%, var(--diffs-addition-base))
556
- )
557
- );
558
- --diffs-bg-addition-emphasis: var(
559
- --diffs-bg-addition-emphasis-override,
560
- light-dark(
561
- rgb(from var(--diffs-addition-base) r g b / 0.15),
562
- rgb(from var(--diffs-addition-base) r g b / 0.2)
563
- )
564
- );
565
-
566
- --diffs-selection-base: var(--diffs-modified-base);
567
- --diffs-selection-number-fg: light-dark(
568
- color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)),
569
- color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer))
570
- );
571
- --diffs-bg-selection: var(
572
- --diffs-bg-selection-override,
573
- light-dark(
574
- color-mix(in lab, var(--diffs-bg) 82%, var(--diffs-selection-base)),
575
- color-mix(in lab, var(--diffs-bg) 75%, var(--diffs-selection-base))
576
- )
577
- );
578
- --diffs-bg-selection-number: var(
579
- --diffs-bg-selection-number-override,
580
- light-dark(
581
- color-mix(in lab, var(--diffs-bg) 75%, var(--diffs-selection-base)),
582
- color-mix(in lab, var(--diffs-bg) 60%, var(--diffs-selection-base))
583
- )
584
- );
585
-
586
- background-color: var(--diffs-bg);
587
- color: var(--diffs-fg);
588
- }
589
-
590
- /* NOTE(mdo): Some semantic HTML elements (e.g. \`pre\`, \`code\`) have default
591
- * user-agent styles. These must be overridden to use our custom styles. */
592
- pre,
593
- code,
594
- [data-error-wrapper] {
595
- isolation: isolate;
596
- margin: 0;
597
- padding: 0;
598
- display: block;
599
- outline: none;
600
- font-family: var(--diffs-font-family, var(--diffs-font-fallback));
601
- }
602
-
603
- pre,
604
- code {
605
- background-color: var(--diffs-bg);
606
- }
607
-
608
- code {
609
- contain: content;
610
- }
611
-
612
- *,
613
- *::before,
614
- *::after {
615
- box-sizing: border-box;
616
- }
617
-
618
- [data-icon-sprite] {
619
- display: none;
620
- }
621
-
622
- /* NOTE(mdo): Headers and separators are within pre/code, so we need to reset
623
- * their font-family explicitly. */
624
- [data-diffs-header],
625
- [data-separator] {
626
- font-family: var(
627
- --diffs-header-font-family,
628
- var(--diffs-header-font-fallback)
629
- );
630
- }
631
-
632
- [data-file-info] {
633
- padding: 10px;
634
- font-weight: 700;
635
- color: var(--fg);
636
- /* NOTE(amadeus): we cannot use 'in oklch' because current versions of cursor
637
- * and vscode use an older build of chrome that appears to have a bug with
638
- * color-mix and 'in oklch', so use 'in lab' instead */
639
- background-color: color-mix(in lab, var(--bg) 98%, var(--fg));
640
- border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));
641
- }
642
-
643
- [data-diff],
644
- [data-file] {
645
- /* This feels a bit crazy to me... so I need to think about it a bit more... */
646
- --diffs-grid-number-column-width: minmax(min-content, max-content);
647
- --diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;
648
-
649
- &[data-dehydrated] {
650
- --diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);
651
- }
652
-
653
- &:hover [data-code]::-webkit-scrollbar-thumb {
654
- background-color: var(--diffs-bg-context);
655
- }
656
- }
657
-
658
- [data-line] span {
659
- color: light-dark(
660
- var(--diffs-token-light, var(--diffs-light)),
661
- var(--diffs-token-dark, var(--diffs-dark))
662
- );
663
- background-color: light-dark(
664
- var(--diffs-token-light-bg, inherit),
665
- var(--diffs-token-dark-bg, inherit)
666
- );
667
- font-weight: light-dark(
668
- var(--diffs-token-light-font-weight, inherit),
669
- var(--diffs-token-dark-font-weight, inherit)
670
- );
671
- font-style: light-dark(
672
- var(--diffs-token-light-font-style, inherit),
673
- var(--diffs-token-dark-font-style, inherit)
674
- );
675
- -webkit-text-decoration: light-dark(
676
- var(--diffs-token-light-text-decoration, inherit),
677
- var(--diffs-token-dark-text-decoration, inherit)
678
- );
679
- text-decoration: light-dark(
680
- var(--diffs-token-light-text-decoration, inherit),
681
- var(--diffs-token-dark-text-decoration, inherit)
682
- );
683
- }
684
-
685
- [data-line],
686
- [data-gutter-buffer],
687
- [data-line-annotation],
688
- [data-no-newline] {
689
- color: var(--diffs-fg);
690
- background-color: var(--diffs-line-bg, var(--diffs-bg));
691
- }
692
-
693
- [data-no-newline] {
694
- -webkit-user-select: none;
695
- user-select: none;
696
-
697
- span {
698
- opacity: 0.6;
699
- }
700
- }
701
-
702
- [data-diff-type='split'][data-overflow='scroll'] {
703
- display: grid;
704
- grid-template-columns: 1fr 1fr;
705
-
706
- [data-additions] {
707
- border-left: 1px solid var(--diffs-bg);
708
- }
709
-
710
- [data-deletions] {
711
- border-right: 1px solid var(--diffs-bg);
712
- }
713
- }
714
-
715
- [data-code] {
716
- display: grid;
717
- grid-auto-flow: dense;
718
- grid-template-columns: var(--diffs-code-grid);
719
- overflow: scroll clip;
720
- overscroll-behavior-x: none;
721
- tab-size: var(--diffs-tab-size, 2);
722
- align-self: flex-start;
723
- padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));
724
- padding-bottom: max(
725
- 0px,
726
- calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) - 6px)
727
- );
728
- }
729
-
730
- [data-container-size] {
731
- container-type: inline-size;
732
- }
733
-
734
- [data-code]::-webkit-scrollbar {
735
- width: 0;
736
- height: 6px;
737
- }
738
-
739
- [data-code]::-webkit-scrollbar-track {
740
- background: transparent;
741
- }
742
-
743
- [data-code]::-webkit-scrollbar-thumb {
744
- background-color: transparent;
745
- border: 1px solid transparent;
746
- background-clip: content-box;
747
- border-radius: 3px;
748
- }
749
-
750
- [data-code]::-webkit-scrollbar-corner {
751
- background-color: transparent;
752
- }
753
-
754
- /*
755
- * If we apply these rules globally it will mean that webkit will opt into the
756
- * standards compliant version of custom css scrollbars, which we do not want
757
- * because the custom stuff will look better
758
- */
759
- @supports (-moz-appearance: none) {
760
- [data-code] {
761
- scrollbar-width: thin;
762
- scrollbar-color: var(--diffs-bg-context) transparent;
763
- padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));
764
- }
765
- }
766
-
767
- [data-diffs-header] ~ [data-diff],
768
- [data-diffs-header] ~ [data-file] {
769
- [data-code],
770
- &[data-overflow='wrap'] {
771
- padding-top: 0;
772
- }
773
- }
774
-
775
- [data-gutter] {
776
- display: grid;
777
- grid-template-rows: subgrid;
778
- grid-template-columns: subgrid;
779
- grid-column: 1;
780
- z-index: 3;
781
- position: relative;
782
- background-color: var(--diffs-bg);
783
-
784
- [data-gutter-buffer],
785
- [data-column-number] {
786
- border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));
787
- }
788
- }
789
-
790
- [data-content] {
791
- display: grid;
792
- grid-template-rows: subgrid;
793
- grid-template-columns: subgrid;
794
- grid-column: 2;
795
- min-width: 0;
796
- }
797
-
798
- [data-diff-type='split'][data-overflow='wrap'] {
799
- display: grid;
800
- grid-auto-flow: dense;
801
- grid-template-columns: repeat(2, var(--diffs-code-grid));
802
- padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
803
-
804
- [data-deletions] {
805
- display: contents;
806
-
807
- [data-gutter] {
808
- grid-column: 1;
809
- }
810
-
811
- [data-content] {
812
- grid-column: 2;
813
- border-right: 1px solid var(--diffs-bg);
814
- }
815
- }
816
-
817
- [data-additions] {
818
- display: contents;
819
-
820
- [data-gutter] {
821
- grid-column: 3;
822
- border-left: 1px solid var(--diffs-bg);
823
- }
824
-
825
- [data-content] {
826
- grid-column: 4;
827
- }
828
- }
829
- }
830
-
831
- [data-overflow='scroll'] [data-gutter] {
832
- position: sticky;
833
- left: 0;
834
- }
835
-
836
- [data-line-annotation][data-selected-line] {
837
- background-color: unset;
838
-
839
- &::before {
840
- content: '';
841
- /* FIXME(amadeus): This needs to be audited ... */
842
- position: sticky;
843
- top: 0;
844
- left: 0;
845
- display: block;
846
- border-right: var(--diffs-gap-style, 1px solid var(--diffs-bg));
847
- background-color: var(--diffs-bg-selection-number);
848
- }
849
-
850
- [data-annotation-content] {
851
- background-color: var(--diffs-bg-selection);
852
- }
853
- }
854
-
855
- [data-interactive-lines] [data-line] {
856
- cursor: pointer;
857
- }
858
-
859
- [data-content-buffer],
860
- [data-gutter-buffer] {
861
- position: relative;
862
- -webkit-user-select: none;
863
- user-select: none;
864
- min-height: 1lh;
865
- }
866
-
867
- [data-gutter-buffer='annotation'] {
868
- min-height: 0;
869
- }
870
-
871
- [data-gutter-buffer='buffer'] {
872
- background-size: 8px 8px;
873
- background-position: 0 0;
874
- background-origin: border-box;
875
- background-color: var(--diffs-bg);
876
- /* This is incredibley expensive... */
877
- background-image: repeating-linear-gradient(
878
- -45deg,
879
- transparent,
880
- transparent calc(3px * 1.414),
881
- rgb(from var(--diffs-bg-buffer) r g b / 0.8) calc(3px * 1.414),
882
- rgb(from var(--diffs-bg-buffer) r g b / 0.8) calc(4px * 1.414)
883
- );
884
- }
885
-
886
- [data-content-buffer] {
887
- grid-column: 1;
888
- /* We multiply by 1.414 (√2) to better approximate the diagonal repeat distance */
889
- background-size: 8px 8px;
890
- background-position: 5px 0;
891
- background-origin: border-box;
892
- background-color: var(--diffs-bg);
893
- /* This is incredibley expensive... */
894
- background-image: repeating-linear-gradient(
895
- -45deg,
896
- transparent,
897
- transparent calc(3px * 1.414),
898
- var(--diffs-bg-buffer) calc(3px * 1.414),
899
- var(--diffs-bg-buffer) calc(4px * 1.414)
900
- );
901
- }
902
-
903
- [data-separator] {
904
- box-sizing: content-box;
905
- background-color: var(--diffs-bg);
906
- }
907
-
908
- [data-separator='simple'] {
909
- min-height: 4px;
910
- }
911
-
912
- [data-separator='line-info'],
913
- [data-separator='line-info-basic'],
914
- [data-separator='metadata'],
915
- [data-separator='simple'] {
916
- background-color: var(--diffs-bg-separator);
917
- }
918
-
919
- [data-separator='line-info'],
920
- [data-separator='line-info-basic'],
921
- [data-separator='metadata'] {
922
- height: 32px;
923
- position: relative;
924
- }
925
-
926
- [data-separator-wrapper] {
927
- -webkit-user-select: none;
928
- user-select: none;
929
- fill: currentColor;
930
- position: absolute;
931
- inset-inline: 0;
932
- display: flex;
933
- align-items: center;
934
- background-color: var(--diffs-bg);
935
- height: 100%;
936
- }
937
-
938
- [data-content] [data-separator-wrapper] {
939
- display: none;
940
- }
941
-
942
- [data-separator='metadata'] [data-separator-wrapper] {
943
- inset-inline: 100% auto;
944
- padding-inline: 1ch;
945
- height: 100%;
946
- background-color: var(--diffs-bg-separator);
947
- color: var(--diffs-fg-number);
948
- white-space: nowrap;
949
- overflow: hidden;
950
- text-overflow: ellipsis;
951
- min-width: min-content;
952
- }
953
-
954
- [data-separator='line-info'] {
955
- margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
956
- }
957
-
958
- [data-separator='line-info-basic'],
959
- [data-separator='metadata'] {
960
- margin-block: 0;
961
- }
962
-
963
- [data-separator='line-info'][data-separator-first] {
964
- margin-top: 0;
965
- }
966
-
967
- [data-separator='line-info'][data-separator-last] {
968
- margin-bottom: 0;
969
- }
970
-
971
- [data-expand-index] [data-separator-wrapper] {
972
- display: grid;
973
- grid-template-columns: 32px auto;
974
- }
975
-
976
- [data-expand-index] [data-separator-wrapper][data-separator-multi-button] {
977
- grid-template-columns: 32px 32px auto;
978
- }
979
-
980
- [data-expand-button],
981
- [data-separator-content] {
982
- display: flex;
983
- flex: 0 0 auto;
984
- align-items: center;
985
- background-color: var(--diffs-bg-separator);
986
- }
987
-
988
- [data-expand-button] {
989
- justify-content: center;
990
- flex-shrink: 0;
991
- cursor: pointer;
992
- min-width: 32px;
993
- align-self: stretch;
994
- color: var(--diffs-fg-number);
995
- border-right: 2px solid var(--diffs-bg);
996
-
997
- &:hover {
998
- color: var(--diffs-fg);
999
- }
1000
- }
1001
-
1002
- [data-expand-down] [data-icon] {
1003
- transform: scaleY(-1);
1004
- }
1005
-
1006
- [data-separator-content] {
1007
- flex: 1 1 auto;
1008
- padding: 0 1ch;
1009
- height: 100%;
1010
- color: var(--diffs-fg-number);
1011
-
1012
- overflow: hidden;
1013
- justify-content: flex-start;
1014
- }
1015
-
1016
- [data-separator='line-info'],
1017
- [data-separator='line-info-basic'] {
1018
- [data-separator-content] {
1019
- height: 100%;
1020
- -webkit-user-select: none;
1021
- user-select: none;
1022
- overflow: clip;
1023
- }
1024
- }
1025
-
1026
- @supports (width: 1cqi) {
1027
- [data-unified] {
1028
- [data-separator='line-info'] [data-separator-wrapper] {
1029
- padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1030
- width: 100cqi;
1031
-
1032
- [data-separator-content] {
1033
- border-radius: 6px;
1034
- }
1035
- }
1036
-
1037
- [data-separator='line-info'][data-expand-index]
1038
- [data-separator-wrapper]
1039
- [data-separator-content] {
1040
- border-top-left-radius: unset;
1041
- border-bottom-left-radius: unset;
1042
- }
1043
- }
1044
-
1045
- [data-gutter] {
1046
- [data-separator='line-info'] [data-separator-wrapper] {
1047
- padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1048
- }
1049
-
1050
- [data-separator='line-info'] [data-separator-content] {
1051
- border-top-left-radius: 6px;
1052
- border-bottom-left-radius: 6px;
1053
- }
1054
-
1055
- [data-separator='line-info'][data-expand-index] [data-separator-content] {
1056
- border-top-left-radius: unset;
1057
- border-bottom-left-radius: unset;
1058
- }
1059
- }
1060
-
1061
- [data-additions] {
1062
- [data-content] [data-separator='line-info'] {
1063
- background-color: var(--diffs-bg);
1064
-
1065
- [data-separator-wrapper] {
1066
- display: none;
1067
- }
1068
- }
1069
-
1070
- [data-gutter] [data-separator='line-info'] [data-separator-wrapper] {
1071
- display: block;
1072
- height: 100%;
1073
- background-color: var(--diffs-bg-separator);
1074
- border-top-right-radius: 6px;
1075
- border-bottom-right-radius: 6px;
1076
-
1077
- [data-separator-content],
1078
- [data-expand-button] {
1079
- display: none;
1080
- }
1081
- }
1082
- }
1083
-
1084
- [data-overflow='scroll']
1085
- [data-additions]
1086
- [data-gutter]
1087
- [data-separator='line-info']
1088
- [data-separator-wrapper] {
1089
- width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));
1090
- }
1091
-
1092
- [data-overflow='wrap']
1093
- [data-additions]
1094
- [data-content]
1095
- [data-separator='line-info']
1096
- [data-separator-wrapper] {
1097
- background-color: var(--diffs-bg-separator);
1098
- display: block;
1099
- height: 100%;
1100
- margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1101
- border-top-right-radius: 6px;
1102
- border-bottom-right-radius: 6px;
1103
-
1104
- [data-separator-content],
1105
- [data-expand-button] {
1106
- display: none;
1107
- }
1108
- }
1109
-
1110
- [data-separator='line-info'] [data-separator-wrapper] {
1111
- [data-expand-both],
1112
- [data-expand-down],
1113
- [data-expand-up] {
1114
- border-top-left-radius: 6px;
1115
- border-bottom-left-radius: 6px;
1116
- }
1117
- }
1118
-
1119
- @media (pointer: fine) {
1120
- [data-separator='line-info'] [data-separator-wrapper] {
1121
- &[data-separator-multi-button] {
1122
- [data-expand-up] {
1123
- border-top-left-radius: 6px;
1124
- border-bottom-left-radius: unset;
1125
- }
1126
-
1127
- [data-expand-down] {
1128
- border-bottom-left-radius: 6px;
1129
- border-top-left-radius: unset;
1130
- }
1131
- }
1132
- }
1133
- }
1134
- }
1135
-
1136
- @media (pointer: coarse) {
1137
- [data-separator='line-info-basic']
1138
- [data-separator-wrapper][data-separator-multi-button] {
1139
- grid-template-columns: 34px 34px auto;
1140
-
1141
- [data-separator-content] {
1142
- grid-column: unset;
1143
- grid-row: unset;
1144
- }
1145
- }
1146
-
1147
- @supports (width: 1cqi) {
1148
- [data-separator='line-info'] [data-separator-wrapper] {
1149
- [data-expand-both],
1150
- [data-expand-down],
1151
- [data-expand-up] {
1152
- border-top-left-radius: 6px;
1153
- border-bottom-left-radius: 6px;
1154
- }
1155
-
1156
- &[data-separator-multi-button] {
1157
- [data-expand-up] {
1158
- border-top-left-radius: 6px;
1159
- border-bottom-left-radius: 6px;
1160
- }
1161
-
1162
- [data-expand-down] {
1163
- border-bottom-left-radius: unset;
1164
- border-top-left-radius: unset;
1165
- }
1166
- }
1167
- }
1168
- }
1169
- }
1170
-
1171
- @media (pointer: fine) {
1172
- [data-separator-wrapper][data-separator-multi-button] {
1173
- display: grid;
1174
- grid-template-rows: 50% 50%;
1175
-
1176
- [data-separator-content] {
1177
- grid-column: 2;
1178
- grid-row: 1 / -1;
1179
- min-width: min-content;
1180
- }
1181
-
1182
- [data-expand-button] {
1183
- grid-column: 1;
1184
- }
1185
- }
1186
-
1187
- [data-separator='line-info'] [data-separator-wrapper],
1188
- [data-separator='line-info']
1189
- [data-separator-wrapper][data-separator-multi-button] {
1190
- grid-template-columns: 34px auto;
1191
- }
1192
-
1193
- [data-separator='line-info-basic'][data-expand-index]
1194
- [data-separator-wrapper] {
1195
- grid-template-columns: 100% auto;
1196
- }
1197
-
1198
- [data-separator='line-info'],
1199
- [data-separator='line-info-basic'] {
1200
- [data-separator-multi-button] {
1201
- [data-expand-up] {
1202
- border-bottom: 1px solid var(--diffs-bg);
1203
- border-right: 2px solid var(--diffs-bg);
1204
- }
1205
- [data-expand-down] {
1206
- border-top: 1px solid var(--diffs-bg);
1207
- border-right: 2px solid var(--diffs-bg);
1208
- }
1209
- }
1210
- }
1211
- }
1212
-
1213
- [data-additions] [data-gutter] [data-separator-wrapper],
1214
- [data-additions] [data-separator='line-info-basic'] [data-separator-wrapper],
1215
- [data-content] [data-separator-wrapper] {
1216
- display: none;
1217
- }
1218
-
1219
- [data-line-annotation],
1220
- [data-gutter-buffer='annotation'] {
1221
- --diffs-line-bg: var(--diffs-bg-context);
1222
- }
1223
-
1224
- [data-merge-conflict-actions],
1225
- [data-gutter-buffer='merge-conflict-action'] {
1226
- --diffs-line-bg: var(--diffs-bg-context);
1227
- }
1228
-
1229
- [data-has-merge-conflict] [data-line-annotation],
1230
- [data-has-merge-conflict] [data-gutter-buffer='annotation'] {
1231
- --diffs-line-bg: var(--diffs-bg);
1232
- }
1233
-
1234
- [data-has-merge-conflict] [data-gutter-buffer='merge-conflict-action'] {
1235
- --diffs-line-bg: var(--diffs-bg);
1236
- }
1237
-
1238
- [data-line-annotation] {
1239
- min-height: var(--diffs-annotation-min-height, 0);
1240
- z-index: 2;
1241
- }
1242
-
1243
- [data-merge-conflict-actions] {
1244
- z-index: 2;
1245
- }
1246
-
1247
- [data-separator='custom'] {
1248
- display: grid;
1249
- grid-template-columns: subgrid;
1250
- }
1251
-
1252
- [data-line],
1253
- [data-column-number],
1254
- [data-no-newline] {
1255
- position: relative;
1256
- padding-inline: 1ch;
1257
- }
1258
-
1259
- [data-indicators='classic'] [data-line] {
1260
- padding-inline-start: 2ch;
1261
- }
1262
-
1263
- [data-indicators='classic'] {
1264
- [data-line-type='change-addition'],
1265
- [data-line-type='change-deletion'] {
1266
- &[data-no-newline],
1267
- &[data-line] {
1268
- &::before {
1269
- display: inline-block;
1270
- width: 1ch;
1271
- height: 1lh;
1272
- position: absolute;
1273
- top: 0;
1274
- left: 0;
1275
- -webkit-user-select: none;
1276
- user-select: none;
1277
- }
1278
- }
1279
- }
1280
-
1281
- [data-line-type='change-addition'] {
1282
- &[data-line],
1283
- &[data-no-newline] {
1284
- &::before {
1285
- content: '+';
1286
- color: var(--diffs-addition-base);
1287
- }
1288
- }
1289
- }
1290
-
1291
- [data-line-type='change-deletion'] {
1292
- &[data-line],
1293
- &[data-no-newline] {
1294
- &::before {
1295
- content: '-';
1296
- color: var(--diffs-deletion-base);
1297
- }
1298
- }
1299
- }
1300
- }
1301
-
1302
- [data-indicators='bars'] {
1303
- [data-line-type='change-deletion'],
1304
- [data-line-type='change-addition'] {
1305
- &[data-column-number] {
1306
- &::before {
1307
- content: '';
1308
- display: block;
1309
- width: 4px;
1310
- height: 100%;
1311
- position: absolute;
1312
- top: 0;
1313
- left: 0;
1314
- -webkit-user-select: none;
1315
- user-select: none;
1316
- contain: strict;
1317
- }
1318
- }
1319
- }
1320
-
1321
- [data-line-type='change-deletion'] {
1322
- &[data-column-number] {
1323
- &::before {
1324
- background-image: linear-gradient(
1325
- 0deg,
1326
- var(--diffs-bg-deletion) 50%,
1327
- var(--diffs-deletion-base) 50%
1328
- );
1329
- background-repeat: repeat;
1330
- background-size: 2px 2px;
1331
- background-size: calc(1lh / round(1lh / 2px))
1332
- calc(1lh / round(1lh / 2px));
1333
- }
1334
- }
1335
- }
1336
-
1337
- [data-line-type='change-addition'] {
1338
- &[data-column-number] {
1339
- &::before {
1340
- background-color: var(--diffs-addition-base);
1341
- }
1342
- }
1343
- }
1344
- }
1345
-
1346
- [data-overflow='wrap'] {
1347
- [data-line],
1348
- [data-annotation-content] {
1349
- white-space: pre-wrap;
1350
- word-break: break-word;
1351
- }
1352
- }
1353
-
1354
- [data-overflow='scroll'] [data-line] {
1355
- white-space: pre;
1356
- min-height: 1lh;
1357
- }
1358
-
1359
- [data-column-number] {
1360
- box-sizing: content-box;
1361
- text-align: right;
1362
- -webkit-user-select: none;
1363
- user-select: none;
1364
- background-color: var(--diffs-bg);
1365
- color: var(--diffs-fg-number);
1366
- padding-left: 2ch;
1367
- }
1368
-
1369
- [data-line-number-content] {
1370
- display: inline-block;
1371
- min-width: var(
1372
- --diffs-min-number-column-width,
1373
- var(--diffs-min-number-column-width-default, 3ch)
1374
- );
1375
- }
1376
-
1377
- [data-disable-line-numbers] {
1378
- [data-column-number] {
1379
- min-width: 4px;
1380
- padding: 0;
1381
- }
1382
-
1383
- [data-line-number-content] {
1384
- display: none;
1385
- }
1386
-
1387
- [data-gutter-utility-slot] {
1388
- right: unset;
1389
- left: 0;
1390
- justify-content: flex-start;
1391
- }
1392
-
1393
- &[data-indicators='bars'] [data-gutter-utility-slot] {
1394
- /* Using 5px here because theres a 1px separator after the bar */
1395
- left: 5px;
1396
- }
1397
- }
1398
-
1399
- [data-file][data-disable-line-numbers] {
1400
- [data-gutter-buffer],
1401
- [data-column-number] {
1402
- min-width: 0;
1403
- border-right: 0;
1404
- }
1405
- }
1406
-
1407
- [data-interactive-line-numbers] [data-column-number] {
1408
- cursor: pointer;
1409
- }
1410
-
1411
- [data-diff-span] {
1412
- border-radius: 3px;
1413
- -webkit-box-decoration-break: clone;
1414
- box-decoration-break: clone;
1415
- }
1416
-
1417
- [data-line-type='change-addition'] {
1418
- &[data-column-number] {
1419
- color: var(
1420
- --diffs-fg-number-addition-override,
1421
- var(--diffs-addition-base)
1422
- );
1423
- }
1424
-
1425
- > [data-diff-span] {
1426
- background-color: var(--diffs-bg-addition-emphasis);
1427
- }
1428
- }
1429
-
1430
- [data-line-type='change-deletion'] {
1431
- &[data-column-number] {
1432
- color: var(
1433
- --diffs-fg-number-deletion-override,
1434
- var(--diffs-deletion-base)
1435
- );
1436
- }
1437
-
1438
- [data-diff-span] {
1439
- background-color: var(--diffs-bg-deletion-emphasis);
1440
- }
1441
- }
1442
-
1443
- [data-background] [data-line-type='change-addition'] {
1444
- --diffs-line-bg: var(--diffs-bg-addition);
1445
-
1446
- &[data-column-number] {
1447
- background-color: var(--diffs-bg-addition-number);
1448
- }
1449
- }
1450
-
1451
- [data-background] [data-line-type='change-deletion'] {
1452
- --diffs-line-bg: var(--diffs-bg-deletion);
1453
-
1454
- &[data-column-number] {
1455
- background-color: var(--diffs-bg-deletion-number);
1456
- }
1457
- }
1458
-
1459
- [data-merge-conflict='marker-start'],
1460
- [data-merge-conflict='marker-base'],
1461
- [data-merge-conflict='marker-separator'],
1462
- [data-merge-conflict='marker-end'] {
1463
- padding-left: 1ch;
1464
- color: var(--diffs-fg);
1465
- }
1466
-
1467
- [data-merge-conflict='marker-start'],
1468
- [data-merge-conflict='marker-end'] {
1469
- display: flex;
1470
- align-items: center;
1471
-
1472
- &::after {
1473
- color: var(--diffs-fg-conflict-marker);
1474
- font-style: normal;
1475
- font-size: 0.75rem;
1476
- line-height: 1.25rem;
1477
- padding-left: 1ch;
1478
- font-family: var(
1479
- --diffs-header-font-family,
1480
- var(--diffs-header-font-fallback)
1481
- );
1482
- }
1483
- }
1484
-
1485
- [data-merge-conflict='marker-start']::after {
1486
- content: '(Current Change)';
1487
- }
1488
-
1489
- [data-merge-conflict='marker-end']::after {
1490
- content: '(Incoming Change)';
1491
- }
1492
-
1493
- [data-merge-conflict='marker-base'],
1494
- [data-merge-conflict='marker-end'] {
1495
- &[data-line],
1496
- &[data-no-newline] {
1497
- background-color: var(--diffs-bg-conflict-marker);
1498
- }
1499
-
1500
- &[data-column-number] {
1501
- background-color: var(--diffs-bg-conflict-marker-number);
1502
- color: var(--diffs-fg-conflict-marker);
1503
-
1504
- [data-line-number-content] {
1505
- color: var(--diffs-fg-conflict-marker);
1506
- }
1507
- }
1508
- }
1509
-
1510
- [data-merge-conflict='current'] {
1511
- &[data-line],
1512
- &[data-no-newline] {
1513
- background-color: var(--conflict-bg-current);
1514
- }
1515
-
1516
- &[data-column-number] {
1517
- background-color: var(--conflict-bg-current-number);
1518
- color: var(--diffs-addition-base);
1519
- }
1520
- }
1521
-
1522
- [data-gutter-buffer='merge-conflict-marker-start'],
1523
- [data-merge-conflict='marker-start'] {
1524
- background-color: var(--conflict-bg-current-header);
1525
- }
1526
-
1527
- [data-gutter-buffer='merge-conflict-marker-end'],
1528
- [data-merge-conflict='marker-end'] {
1529
- background-color: var(--conflict-bg-incoming-header);
1530
- }
1531
-
1532
- [data-merge-conflict='marker-separator'] {
1533
- &[data-line],
1534
- &[data-no-newline] {
1535
- background-color: var(--diffs-bg);
1536
- }
1537
-
1538
- &[data-column-number] {
1539
- background-color: var(--diffs-bg);
1540
- }
1541
- }
1542
-
1543
- [data-merge-conflict='base'] {
1544
- &[data-line],
1545
- &[data-no-newline] {
1546
- background-color: var(--diffs-bg-conflict-base);
1547
- }
1548
-
1549
- &[data-column-number] {
1550
- background-color: var(--diffs-bg-conflict-base-number);
1551
- color: var(--diffs-modified-base);
1552
- }
1553
- }
1554
-
1555
- [data-merge-conflict='incoming'] {
1556
- &[data-line],
1557
- &[data-no-newline] {
1558
- background-color: var(--conflict-bg-incoming);
1559
- }
1560
-
1561
- &[data-column-number] {
1562
- background-color: var(--conflict-bg-incoming-number);
1563
- color: var(--diffs-modified-base);
1564
- }
1565
- }
1566
-
1567
- @media (pointer: fine) {
1568
- [data-column-number],
1569
- [data-line] {
1570
- &[data-hovered] {
1571
- background-color: var(--diffs-bg-hover);
1572
- }
1573
- }
1574
-
1575
- [data-background] {
1576
- [data-column-number],
1577
- [data-line] {
1578
- &[data-hovered] {
1579
- &[data-line-type='change-deletion'] {
1580
- background-color: var(--diffs-bg-deletion-hover);
1581
- }
1582
-
1583
- &[data-line-type='change-addition'] {
1584
- background-color: var(--diffs-bg-addition-hover);
1585
- }
1586
- }
1587
- }
1588
- }
1589
- }
1590
-
1591
- [data-diffs-header='default'] {
1592
- position: relative;
1593
- background-color: var(--diffs-bg);
1594
- display: flex;
1595
- flex-direction: row;
1596
- justify-content: space-between;
1597
- align-items: center;
1598
- gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1599
- min-height: calc(
1600
- 1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3)
1601
- );
1602
- padding-inline: 16px;
1603
- top: 0;
1604
- z-index: 2;
1605
- }
1606
-
1607
- [data-header-content] {
1608
- display: flex;
1609
- flex-direction: row;
1610
- align-items: center;
1611
- gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1612
- min-width: 0;
1613
- white-space: nowrap;
1614
- }
1615
-
1616
- [data-header-content] [data-prev-name],
1617
- [data-header-content] [data-title] {
1618
- direction: rtl;
1619
- overflow: hidden;
1620
- text-overflow: ellipsis;
1621
- min-width: 0;
1622
- white-space: nowrap;
1623
- }
1624
-
1625
- [data-prev-name] {
1626
- opacity: 0.7;
1627
- }
1628
-
1629
- [data-rename-icon] {
1630
- fill: currentColor;
1631
- flex-shrink: 0;
1632
- flex-grow: 0;
1633
- }
1634
-
1635
- [data-diffs-header='default'] [data-metadata] {
1636
- display: flex;
1637
- align-items: center;
1638
- gap: 1ch;
1639
- white-space: nowrap;
1640
- }
1641
-
1642
- [data-diffs-header='default'] [data-additions-count] {
1643
- font-family: var(--diffs-font-family, var(--diffs-font-fallback));
1644
- color: var(--diffs-addition-base);
1645
- }
1646
-
1647
- [data-diffs-header='default'] [data-deletions-count] {
1648
- font-family: var(--diffs-font-family, var(--diffs-font-fallback));
1649
- color: var(--diffs-deletion-base);
1650
- }
1651
-
1652
- [data-annotation-content] {
1653
- position: relative;
1654
- display: flow-root;
1655
- align-self: flex-start;
1656
- z-index: 2;
1657
- min-width: 0;
1658
- isolation: isolate;
1659
- }
1660
-
1661
- [data-merge-conflict-actions-content] {
1662
- display: flex;
1663
- align-items: center;
1664
- gap: 0.25rem;
1665
- padding-inline: 0.5rem;
1666
- min-height: 1.75rem;
1667
- font-family: var(
1668
- --diffs-header-font-family,
1669
- var(--diffs-header-font-fallback)
1670
- );
1671
- font-size: 0.75rem;
1672
- line-height: 1.2;
1673
- color: var(--diffs-fg);
1674
- }
1675
-
1676
- [data-merge-conflict-action] {
1677
- appearance: none;
1678
- border: 0;
1679
- background: transparent;
1680
- color: var(--diffs-fg-number);
1681
- font: inherit;
1682
- font-style: normal;
1683
- cursor: pointer;
1684
- padding: 0;
1685
- }
1686
-
1687
- [data-merge-conflict-action]:hover {
1688
- color: var(--diffs-fg);
1689
- }
1690
-
1691
- [data-merge-conflict-action='current']:hover {
1692
- color: var(--diffs-addition-base);
1693
- }
1694
-
1695
- [data-merge-conflict-action='incoming']:hover {
1696
- color: var(--diffs-modified-base);
1697
- }
1698
-
1699
- [data-merge-conflict-action-separator] {
1700
- color: var(--diffs-fg-number);
1701
- opacity: 0.6;
1702
- -webkit-user-select: none;
1703
- user-select: none;
1704
- }
1705
-
1706
- /* Sticky positioning has a composite costs, so we should _only_ pay it if we
1707
- * need to */
1708
- [data-overflow='scroll'] [data-annotation-content] {
1709
- position: sticky;
1710
- width: var(--diffs-column-content-width, auto);
1711
- left: var(--diffs-column-number-width, 0);
1712
- }
1713
-
1714
- [data-overflow='scroll'] [data-merge-conflict-actions-content] {
1715
- position: sticky;
1716
- width: var(--diffs-column-content-width, auto);
1717
- left: var(--diffs-column-number-width, 0);
1718
- }
1719
-
1720
- /* Undo some of the stuff that the 'pre' tag does */
1721
- [data-annotation-slot] {
1722
- text-wrap-mode: wrap;
1723
- word-break: normal;
1724
- white-space-collapse: collapse;
1725
- }
1726
-
1727
- [data-change-icon] {
1728
- fill: currentColor;
1729
- flex-shrink: 0;
1730
- }
1731
-
1732
- [data-change-icon='change'],
1733
- [data-change-icon='rename-pure'],
1734
- [data-change-icon='rename-changed'] {
1735
- color: var(--diffs-modified-base);
1736
- }
1737
-
1738
- [data-change-icon='new'] {
1739
- color: var(--diffs-addition-base);
1740
- }
1741
-
1742
- [data-change-icon='deleted'] {
1743
- color: var(--diffs-deletion-base);
1744
- }
1745
-
1746
- [data-change-icon='file'] {
1747
- opacity: 0.6;
1748
- }
1749
-
1750
- /* Line selection highlighting */
1751
- [data-selected-line] {
1752
- &[data-gutter-buffer='annotation'],
1753
- &[data-column-number] {
1754
- color: var(--diffs-selection-number-fg);
1755
- background-color: var(--diffs-bg-selection-number);
1756
- }
1757
-
1758
- &[data-line] {
1759
- background-color: var(--diffs-bg-selection);
1760
- }
1761
- }
1762
-
1763
- [data-line-type='change-addition'],
1764
- [data-line-type='change-deletion'] {
1765
- &[data-selected-line] {
1766
- &[data-line],
1767
- &[data-line][data-hovered] {
1768
- background-color: light-dark(
1769
- color-mix(
1770
- in lab,
1771
- var(--diffs-line-bg, var(--diffs-bg)) 82%,
1772
- var(--diffs-selection-base)
1773
- ),
1774
- color-mix(
1775
- in lab,
1776
- var(--diffs-line-bg, var(--diffs-bg)) 75%,
1777
- var(--diffs-selection-base)
1778
- )
1779
- );
1780
- }
1781
-
1782
- &[data-column-number],
1783
- &[data-column-number][data-hovered] {
1784
- color: var(--diffs-selection-number-fg);
1785
- background-color: light-dark(
1786
- color-mix(
1787
- in lab,
1788
- var(--diffs-line-bg, var(--diffs-bg)) 75%,
1789
- var(--diffs-selection-base)
1790
- ),
1791
- color-mix(
1792
- in lab,
1793
- var(--diffs-line-bg, var(--diffs-bg)) 60%,
1794
- var(--diffs-selection-base)
1795
- )
1796
- );
1797
- }
1798
- }
1799
- }
1800
-
1801
- [data-gutter-utility-slot] {
1802
- position: absolute;
1803
- top: 0;
1804
- bottom: 0;
1805
- right: 0;
1806
- display: flex;
1807
- justify-content: flex-end;
1808
- }
1809
-
1810
- [data-unmodified-lines] {
1811
- display: block;
1812
- overflow: hidden;
1813
- min-width: 0;
1814
- text-overflow: ellipsis;
1815
- white-space: nowrap;
1816
- flex: 0 1 auto;
1817
- }
1818
-
1819
- [data-error-wrapper] {
1820
- overflow: auto;
1821
- padding: var(--diffs-gap-block, var(--diffs-gap-fallback))
1822
- var(--diffs-gap-inline, var(--diffs-gap-fallback));
1823
- max-height: 400px;
1824
- scrollbar-width: none;
1825
-
1826
- [data-error-message] {
1827
- font-weight: bold;
1828
- font-size: 18px;
1829
- color: var(--diffs-deletion-base);
1830
- }
1831
-
1832
- [data-error-stack] {
1833
- color: var(--diffs-fg-number);
1834
- }
1835
- }
1836
-
1837
- [data-placeholder] {
1838
- contain: strict;
1839
- }
1840
-
1841
- [data-utility-button] {
1842
- display: flex;
1843
- align-items: center;
1844
- justify-content: center;
1845
- border: none;
1846
- appearance: none;
1847
- width: 1lh;
1848
- height: 1lh;
1849
- margin-right: calc((1lh - 1ch) * -1);
1850
- padding: 0;
1851
- cursor: pointer;
1852
- font-size: var(--diffs-font-size, 13px);
1853
- line-height: var(--diffs-line-height, 20px);
1854
- border-radius: 4px;
1855
- background-color: var(--diffs-modified-base);
1856
- color: var(--diffs-bg);
1857
- fill: currentColor;
1858
- position: relative;
1859
- z-index: 4;
1860
- }
1861
- }
1862
- `;const Gv="@layer base, theme, rendered, unsafe;";function vT(e){return`${Gv}
1863
- @layer unsafe {
1864
- ${e}
1865
- }`}function _T(e,n="system"){return`${Gv}
1866
- @layer rendered {
1867
- :host {${n==="system"?"":`
1868
- color-scheme: ${n};`}
1869
- ${e}
1870
- }
1871
- }`}function Gf({code:e,pre:n,columnType:i,rowSpan:a,containerSize:o=!1}={}){return e==null&&(e=document.createElement("code"),e.setAttribute("data-code",""),i!=null&&e.setAttribute(`data-${i}`,""),n?.appendChild(e)),a!=null?e.style.setProperty("grid-row",`span ${a}`):e.style.removeProperty("grid-row"),o?e.setAttribute("data-container-size",""):e.removeAttribute("data-container-size"),e}function ST({shadowRoot:e,currentNode:n,themeCSS:i}){if(i.trim()===""){n?.remove();return}return n??=ET(),n.textContent=i,n.parentNode!==e&&e.appendChild(n),n}function ET(){const e=document.createElement("style");return e.setAttribute(_b,""),e}function xT(e,n){if(n==null)return;const i=e.shadowRoot??e.attachShadow({mode:"open"});i.innerHTML===""&&(i.innerHTML=n)}function CT(e,{type:n,diffIndicators:i,disableBackground:a,disableLineNumbers:o,overflow:s,split:c,totalLines:f,customProperties:d}){if(d!=null)for(const p in d){const g=d[p];g!=null&&e.setAttribute(p,`${g}`)}switch(n==="diff"?(e.setAttribute("data-diff",""),e.removeAttribute("data-file")):(e.setAttribute("data-file",""),e.removeAttribute("data-diff")),i){case"bars":case"classic":e.setAttribute("data-indicators",i);break;case"none":e.removeAttribute("data-indicators");break}return o?e.setAttribute("data-disable-line-numbers",""):e.removeAttribute("data-disable-line-numbers"),a?e.removeAttribute("data-background"):e.setAttribute("data-background",""),n==="diff"?e.setAttribute("data-diff-type",c?"split":"single"):e.removeAttribute("data-diff-type"),e.setAttribute("data-overflow",s),e.tabIndex=0,e.style.setProperty("--diffs-min-number-column-width-default",`${`${f}`.length}ch`),e}if(typeof HTMLElement<"u"&&customElements.get(As)==null){let e;class n extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const a=this.attachShadow({mode:"open"});e==null&&(e=new CSSStyleSheet,e.replaceSync(bT)),a.adoptedStyleSheets=[e]}}customElements.define(As,n)}const wT=!0;function AT(e,n,i){if(e===n||e==null||n==null)return e===n;const a=new Set(i),o=Object.keys(e),s=new Set(Object.keys(n));for(const c of o)if(s.delete(c),!a.has(c)&&(!(c in n)||e[c]!==n[c]))return!1;for(const c of Array.from(s))if(!a.has(c))return!1;return!0}function kT(e,n){return Bv(e?.theme??Nn,n?.theme??Nn)&&AT(e,n,["theme"])}function TT({hunkIndex:e,lineIndex:n,conflictIndex:i}){return`merge-conflict-action-${e}-${n}-${i}`}function LT(e,n){const i=n.hunks[e.hunkIndex];if(i!=null)return{hunkIndex:e.hunkIndex,lineIndex:RT(i,e.startContentIndex)}}function RT(e,n){let i=e.unifiedLineStart;for(let a=0;a<n;a++){const o=e.hunkContent[a];i+=o.type==="context"?o.lines:o.deletions+o.additions}return i}function DT({fileDiff:e,actions:n,renderCustomHeader:i,renderHeaderPrefix:a,renderHeaderMetadata:o,renderAnnotation:s,renderGutterUtility:c,renderHoverUtility:f,renderMergeConflictUtility:d,lineAnnotations:p,getHoveredLine:g,getInstance:y}){const v=c??f,b=i?.(e),S=a?.(e),k=o?.(e);return te.jsxs(te.Fragment,{children:[b!=null?te.jsx("div",{slot:Vd,children:b}):te.jsxs(te.Fragment,{children:[S!=null&&te.jsx("div",{slot:Pd,children:S}),k!=null&&te.jsx("div",{slot:Bd,children:k})]}),s!=null&&p?.map((O,A)=>te.jsx("div",{slot:kl(O),children:s(O)},A)),n!=null&&d!=null&&y!=null&&n.map(O=>{if(O==null)return;const A=OT(O,e);return te.jsx("div",{slot:A,style:tE,children:d(O,y)},A)}),v!=null&&te.jsx("div",{slot:"gutter-utility-slot",style:eE,children:v(g)})]})}function OT(e,n){const i=LT(e,n);return i!=null?TT({hunkIndex:i.hunkIndex,lineIndex:i.lineIndex,conflictIndex:e.conflictIndex}):void 0}var NT=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,this.enabled=!1)}setup(e,n,i){if(n==null||i==null)for(const a of e.children??[])a instanceof HTMLElement&&("deletions"in a.dataset?n=a:"additions"in a.dataset&&(i=a));if(i==null||n==null){this.cleanUp();return}this.codeDeletions!==n&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeDeletions=n,n.addEventListener("scroll",this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==i&&(this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),this.codeAdditions=i,i.addEventListener("scroll",this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function ps(e){return ke({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function ms(e){return ke({tagName:"div",children:[ke({tagName:"span",children:[ai("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":e,"data-column-content":""}})}function qf(e){return ke({tagName:"div",children:[Hs({name:e==="both"?"diffs-icon-expand-all":"diffs-icon-expand",properties:{"data-icon":""}})],properties:{"data-expand-button":"","data-expand-both":e==="both"?"":void 0,"data-expand-up":e==="up"?"":void 0,"data-expand-down":e==="down"?"":void 0}})}function ta({type:e,content:n,expandIndex:i,chunked:a=!1,slotName:o,isFirstHunk:s,isLastHunk:c}){const f=[];if(e==="metadata"&&n!=null&&f.push(ke({tagName:"div",children:[ai(n)],properties:{"data-separator-wrapper":""}})),(e==="line-info"||e==="line-info-basic")&&n!=null){const d=[];i!=null&&(a?(s||d.push(qf("up")),c||d.push(qf("down"))):d.push(qf(!s&&!c?"both":s?"down":"up"))),d.push(ke({tagName:"div",children:[ke({tagName:"span",children:[ai(n)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),f.push(ke({tagName:"div",children:d,properties:{"data-separator-wrapper":"","data-separator-multi-button":d.length>2?"":void 0}}))}return e==="custom"&&o!=null&&f.push(ke({tagName:"slot",properties:{name:o}})),ke({tagName:"div",children:f,properties:{"data-separator":f.length===0?"simple":e,"data-expand-index":i,"data-separator-first":s?"":void 0,"data-separator-last":c?"":void 0}})}function MT(e,n){return`hunk-separator-${e}-${n}`}function IT(e){const n=e.at(-1);return n==null?0:Math.max(n.additionStart+n.additionCount,n.deletionStart+n.deletionCount)}function zT(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}let UT=-1;var HT=class{__id=`diff-hunks-renderer:${++UT}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;constructor(e={theme:Nn},n,i){this.options=e,this.onRenderUpdate=n,this.workerManager=i,i?.isWorkingPool()!==!0&&(this.highlighter=jf(e.theme??Nn)?mk():void 0)}cleanUp(){this.highlighter=void 0,this.diff=void 0,this.renderCache=void 0,this.workerManager?.cleanUpPendingTasks(this),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.renderCache=void 0,this.workerManager?.cleanUpPendingTasks(this)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,n,i=this.getOptionsWithDefaults().expansionLineCount){const a={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(n==="up"||n==="both")&&(a.fromStart+=i),(n==="down"||n==="both")&&(a.fromEnd+=i),this.renderCache?.highlighted!==!0&&(this.renderCache=void 0),this.expandedHunks.set(e,a)}getExpandedHunk(e){return this.expandedHunks.get(e)??cE}getExpandedHunksMap(){return this.expandedHunks}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(const n of e){const i=(()=>{switch(n.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),a=i[n.lineNumber]??[];i[n.lineNumber]=a,a.push(n)}}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e}}getSplitLineDecoration({side:e,type:n}){return n!=="change"?{gutterLineType:n}:{gutterLineType:e==="deletions"?"change-deletion":"change-addition"}}createAnnotationElement(e){return iT(e)}getOptionsWithDefaults(){const{diffIndicators:e="bars",diffStyle:n="split",disableBackground:i=!1,disableFileHeader:a=!1,disableLineNumbers:o=!1,disableVirtualizationBuffers:s=!1,collapsed:c=!1,expandUnchanged:f=!1,collapsedContextThreshold:d=oa,expansionLineCount:p=100,hunkSeparators:g="line-info",lineDiffType:y="word-alt",maxLineDiffLength:v=1e3,overflow:b="scroll",theme:S=Nn,headerRenderMode:k="default",tokenizeMaxLineLength:O=1e3,useCSSClasses:A=!1}=this.options;return{diffIndicators:e,diffStyle:n,disableBackground:i,disableFileHeader:a,disableLineNumbers:o,disableVirtualizationBuffers:s,collapsed:c,expandUnchanged:f,collapsedContextThreshold:d,expansionLineCount:p,hunkSeparators:g,lineDiffType:y,maxLineDiffLength:v,overflow:b,theme:this.workerManager?.getDiffRenderOptions().theme??S,headerRenderMode:k,tokenizeMaxLineLength:O,useCSSClasses:A}}async initializeHighlighter(){return this.highlighter=await pk(fT(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;const{options:n}=this.getRenderOptions(e);let i=this.workerManager?.getDiffResultCache(e);i!=null&&!$f(n,i.options)&&(i=void 0),this.renderCache??={diff:e,highlighted:!wk(e),options:n,result:i?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0&&this.renderCache.result==null&&this.workerManager.highlightDiffAST(this,this.diff)}getRenderOptions(e){const n=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();const{theme:a,tokenizeMaxLineLength:o,lineDiffType:s}=this.getOptionsWithDefaults();return{theme:a,tokenizeMaxLineLength:o,lineDiffType:s}})();this.getOptionsWithDefaults();const{renderCache:i}=this;return i?.result==null?{options:n,forceRender:!0}:e!==i.diff||!$f(n,i.options)?{options:n,forceRender:!0}:{options:n,forceRender:!1}}renderDiff(e=this.renderCache?.diff,n=x0){if(e==null)return;const{expandUnchanged:i=!1,collapsedContextThreshold:a}=this.getOptionsWithDefaults(),o=this.workerManager?.getDiffResultCache(e);o!=null&&this.renderCache==null&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...o});const{options:s,forceRender:c}=this.getRenderOptions(e);if(this.renderCache??={diff:e,highlighted:!1,options:s,result:void 0,renderRange:void 0},this.workerManager?.isWorkingPool()===!0)(this.renderCache.result==null||!this.renderCache.highlighted&&(e!==this.renderCache.diff||!jv(this.renderCache.renderRange,n)))&&(this.renderCache.diff=e,this.renderCache.result=this.workerManager.getPlainDiffAST(e,n.startingLine,n.totalLines,zT(n)||i?!0:this.expandedHunks,a),this.renderCache.renderRange=n),n.totalLines>0&&(!this.renderCache.highlighted||c)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??ha(e.name);const f=this.highlighter!=null&&jf(s.theme),d=this.highlighter!=null&&ky(this.computedLang);if(this.highlighter!=null&&f&&(c||!this.renderCache.highlighted&&d||this.renderCache.result==null)){const{result:p,options:g}=this.renderDiffWithHighlighter(e,this.highlighter,!d);this.renderCache={diff:e,options:g,highlighted:d,result:p,renderRange:void 0}}(!f||!d)&&this.asyncHighlight(e).then(({result:p,options:g})=>{this.onHighlightSuccess(e,p,g)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,n,this.renderCache.result):void 0}async asyncRender(e,n=x0){const{result:i}=await this.asyncHighlight(e);return this.processDiffResult(e,n,i)}createPreElement(e,n,i){const{diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c}=this.getOptionsWithDefaults();return uT({type:"diff",diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:e,totalLines:n,customProperties:i})}async asyncHighlight(e){this.computedLang=e.lang??ha(e.name);const n=this.highlighter!=null&&jf(this.options.theme??Nn),i=this.highlighter!=null&&ky(this.computedLang);return(this.highlighter==null||!n||!i)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter)}renderDiffWithHighlighter(e,n,i=!1){const{options:a}=this.getRenderOptions(e),{collapsedContextThreshold:o}=this.getOptionsWithDefaults();return{result:Gk(e,n,a,{forcePlainText:i,expandedHunks:i?!0:void 0,collapsedContextThreshold:o}),options:a}}onHighlightSuccess(e,n,i){if(this.renderCache==null)return;const a=!this.renderCache.highlighted||!$f(this.renderCache.options,i)||this.renderCache.diff!==e;this.renderCache={diff:e,options:i,highlighted:!0,result:n,renderRange:void 0},a&&this.onRenderUpdate?.()}onHighlightError(e){console.error(e)}processDiffResult(e,n,{code:i,themeStyles:a,baseThemeType:o}){const{diffStyle:s,disableFileHeader:c,expandUnchanged:f,expansionLineCount:d,collapsedContextThreshold:p,hunkSeparators:g}=this.getOptionsWithDefaults();this.diff=e;const y=s==="unified";let v=[],b=[],S=[];const k=[],{additionLines:O,deletionLines:A}=i,T={rowCount:0,hunkSeparators:g,additionsContentAST:v,deletionsContentAST:b,unifiedContentAST:S,unifiedGutterAST:ds(),deletionsGutterAST:ds(),additionsGutterAST:ds(),expansionLineCount:d,hunkData:k,incrementRowCount(ue=1){T.rowCount+=ue},pushToGutter(ue,J){switch(ue){case"unified":T.unifiedGutterAST.children.push(J);break;case"deletions":T.deletionsGutterAST.children.push(J);break;case"additions":T.additionsGutterAST.children.push(J);break}}},L=PT(e),U={size:0,side:void 0,increment(){this.size+=1},flush(){if(s!=="unified"){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side==="additions"?(T.pushToGutter("additions",_n(void 0,"buffer",this.size)),v?.push(ps(this.size))):(T.pushToGutter("deletions",_n(void 0,"buffer",this.size)),b?.push(ps(this.size))),this.size=0,this.side=void 0}}},B=(ue,J,ee,z,Y)=>{T.pushToGutter(ue,bk(J,ee,z,Y))};function N(ue){U.flush(),s==="unified"?Ff("unified",ue,T):(Ff("deletions",ue,T),Ff("additions",ue,T))}Ps({diff:e,diffStyle:s,startingLine:n.startingLine,totalLines:n.totalLines,expandedHunks:f?!0:this.expandedHunks,collapsedContextThreshold:p,callback:({hunkIndex:ue,hunk:J,collapsedBefore:ee,collapsedAfter:z,additionLine:Y,deletionLine:ae,type:de})=>{const x=ae!=null?ae.splitLineIndex:Y.splitLineIndex,R=Y!=null?Y.unifiedLineIndex:ae.unifiedLineIndex;s==="split"&&de!=="change"&&U.flush(),ee>0&&N({hunkIndex:ue,collapsedLines:ee,rangeSize:Math.max(J?.collapsedBefore??0,0),hunkSpecs:J?.hunkSpecs,isFirstHunk:ue===0,isLastHunk:!1,isExpandable:!e.isPartial});const V=s==="unified"?R:x,w={type:de,hunkIndex:ue,lineIndex:V,unifiedLineIndex:R,splitLineIndex:x,deletionLine:ae,additionLine:Y};if(s==="unified"){const se=this.getUnifiedInjectedRowsForLine?.(w);se?.before!=null&&Ry(se.before,T);let ye=ae!=null?A[ae.lineIndex]:void 0,we=Y!=null?O[Y.lineIndex]:void 0;if(ye==null&&we==null){const We="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(We,{file:e.name}),new Error(We)}const Ae=de==="change"?Y!=null?"change-addition":"change-deletion":de,Ze=this.getUnifiedLineDecoration({type:de,lineType:Ae,additionLineIndex:Y?.lineIndex,deletionLineIndex:ae?.lineIndex});B("unified",Ze.gutterLineType,Y!=null?Y.lineNumber:ae.lineNumber,`${R},${x}`,Ze.gutterProperties),we!=null?we=gs(we,Ze.contentProperties):ye!=null&&(ye=gs(ye,Ze.contentProperties)),Oy({diffStyle:"unified",type:de,deletionLine:ye,additionLine:we,unifiedSpan:this.getAnnotations("unified",ae?.lineNumber,Y?.lineNumber,ue,V),createAnnotationElement:We=>this.createAnnotationElement(We),context:T}),se?.after!=null&&Ry(se.after,T)}else{const se=this.getSplitInjectedRowsForLine?.(w);se?.before!=null&&Dy(se.before,T,U);let ye=ae!=null?A[ae.lineIndex]:void 0,we=Y!=null?O[Y.lineIndex]:void 0;const Ae=this.getSplitLineDecoration({side:"deletions",type:de,lineIndex:ae?.lineIndex}),Ze=this.getSplitLineDecoration({side:"additions",type:de,lineIndex:Y?.lineIndex});if(ye==null&&we==null){const Tt="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(Tt,{file:e.name}),new Error(Tt)}const We=(()=>{if(de==="change"){if(we==null)return"additions";if(ye==null)return"deletions"}})();if(We!=null){if(U.side!=null&&U.side!==We)throw new Error("DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits");U.side=We,U.increment()}const mn=this.getAnnotations("split",ae?.lineNumber,Y?.lineNumber,ue,V);if(mn!=null&&U.size>0&&U.flush(),ae!=null){const Tt=gs(ye,Ae.contentProperties);B("deletions",Ae.gutterLineType,ae.lineNumber,`${ae.unifiedLineIndex},${x}`,Ae.gutterProperties),Tt!=null&&(ye=Tt)}if(Y!=null){const Tt=gs(we,Ze.contentProperties);B("additions",Ze.gutterLineType,Y.lineNumber,`${Y.unifiedLineIndex},${x}`,Ze.gutterProperties),Tt!=null&&(we=Tt)}Oy({diffStyle:"split",type:de,additionLine:we,deletionLine:ye,...mn,createAnnotationElement:Tt=>this.createAnnotationElement(Tt),context:T}),se?.after!=null&&Dy(se.after,T,U)}const le=ae?.noEOFCR??!1,he=Y?.noEOFCR??!1;if(he||le){if(le){const se=de==="context"||de==="context-expanded"?de:"change-deletion";s==="unified"?(T.unifiedContentAST.push(ms(se)),T.pushToGutter("unified",_n(se,"metadata",1))):(T.deletionsContentAST.push(ms(se)),T.pushToGutter("deletions",_n(se,"metadata",1)),he||(T.pushToGutter("additions",_n(void 0,"buffer",1)),T.additionsContentAST.push(ps(1))))}if(he){const se=de==="context"||de==="context-expanded"?de:"change-addition";s==="unified"?(T.unifiedContentAST.push(ms(se)),T.pushToGutter("unified",_n(se,"metadata",1))):(T.additionsContentAST.push(ms(se)),T.pushToGutter("additions",_n(se,"metadata",1)),le||(T.pushToGutter("deletions",_n(void 0,"buffer",1)),T.deletionsContentAST.push(ps(1))))}T.incrementRowCount(1)}z>0&&g!=="simple"&&N({hunkIndex:de==="context-expanded"?ue:ue+1,collapsedLines:z,rangeSize:L,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),T.incrementRowCount(1)}}),s==="split"&&U.flush();const G=Math.max(IT(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),$=n.bufferBefore>0||n.bufferAfter>0,ie=!y&&e.type!=="deleted",ne=!y&&e.type!=="new",K=T.rowCount>0||$;v=ie&&K?v:void 0,b=ne&&K?b:void 0,S=y&&K?S:void 0;const W=this.createPreElement(b!=null&&v!=null,G);return{unifiedGutterAST:y&&K?T.unifiedGutterAST.children:void 0,unifiedContentAST:S,deletionsGutterAST:ne&&K?T.deletionsGutterAST.children:void 0,deletionsContentAST:b,additionsGutterAST:ie&&K?T.additionsGutterAST.children:void 0,additionsContentAST:v,hunkData:k,preNode:W,themeStyles:a,baseThemeType:o,headerElement:c?void 0:this.renderHeader(this.diff),totalLines:G,rowCount:T.rowCount,bufferBefore:n.bufferBefore,bufferAfter:n.bufferAfter,css:""}}renderCodeAST(e,n){const i=e==="unified"?n.unifiedGutterAST:e==="deletions"?n.deletionsGutterAST:n.additionsGutterAST,a=e==="unified"?n.unifiedContentAST:e==="deletions"?n.deletionsContentAST:n.additionsContentAST;if(i==null||a==null)return;const o=ds(i);return o.properties.style=`grid-row: span ${n.rowCount}`,[o,rT(a,n.rowCount)]}renderFullAST(e,n=[]){const i=this.getOptionsWithDefaults().hunkSeparators==="line-info",a=this.renderCodeAST("unified",e);if(a!=null)return n.push(ke({tagName:"code",children:a,properties:{"data-code":"","data-container-size":i?"":void 0,"data-unified":""}})),{...e.preNode,children:n};const o=this.renderCodeAST("deletions",e);o!=null&&n.push(ke({tagName:"code",children:o,properties:{"data-code":"","data-container-size":i?"":void 0,"data-deletions":""}}));const s=this.renderCodeAST("additions",e);return s!=null&&n.push(ke({tagName:"code",children:s,properties:{"data-code":"","data-container-size":i?"":void 0,"data-additions":""}})),{...e.preNode,children:n}}renderFullHTML(e,n=[]){return ca(this.renderFullAST(e,n))}renderPartialHTML(e,n){return n==null?ca(e):ca(ke({tagName:"code",children:e,properties:{"data-code":"","data-container-size":this.getOptionsWithDefaults().hunkSeparators==="line-info"?"":void 0,[`data-${n}`]:""}}))}getAnnotations(e,n,i,a,o){const s={type:"annotation",hunkIndex:a,lineIndex:o,annotations:[]};if(n!=null)for(const f of this.deletionAnnotations[n]??[])s.annotations.push(kl(f));const c={type:"annotation",hunkIndex:a,lineIndex:o,annotations:[]};if(i!=null)for(const f of this.additionAnnotations[i]??[])(e==="unified"?s:c).annotations.push(kl(f));if(e==="unified")return s.annotations.length>0?s:void 0;if(!(c.annotations.length===0&&s.annotations.length===0))return{deletionSpan:s,additionSpan:c}}renderHeader(e){const{headerRenderMode:n}=this.getOptionsWithDefaults();return lT({fileOrDiff:e,mode:n})}};function $f(e,n){return Bv(e.theme,n.theme)&&e.tokenizeMaxLineLength===n.tokenizeMaxLineLength&&e.lineDiffType===n.lineDiffType}function Ly(e){return`${e} unmodified line${e>1?"s":""}`}function Ry(e,n){for(const i of e)n.unifiedContentAST.push(i.content),n.pushToGutter("unified",i.gutter),n.incrementRowCount(1)}function Dy(e,n,i){for(const{deletion:a,addition:o}of e){if(a==null&&o==null)continue;const s=a!=null&&o!=null?void 0:a==null?"deletions":"additions";(s==null||i.side!==s)&&i.flush(),a!=null&&(n.deletionsContentAST.push(a.content),n.pushToGutter("deletions",a.gutter)),o!=null&&(n.additionsContentAST.push(o.content),n.pushToGutter("additions",o.gutter)),s!=null&&(i.side=s,i.increment()),n.incrementRowCount(1)}}function Oy({diffStyle:e,type:n,deletionLine:i,additionLine:a,unifiedSpan:o,deletionSpan:s,additionSpan:c,createAnnotationElement:f,context:d}){let p=!1;if(e==="unified"){if(a!=null?d.unifiedContentAST.push(a):i!=null&&d.unifiedContentAST.push(i),o!=null){const g=n==="change"?i!=null?"change-deletion":"change-addition":n;d.unifiedContentAST.push(f(o)),d.pushToGutter("unified",_n(g,"annotation",1)),p=!0}}else if(e==="split"){if(i!=null&&d.deletionsContentAST.push(i),a!=null&&d.additionsContentAST.push(a),s!=null){const g=n==="change"?i!=null?"change-deletion":"context":n;d.deletionsContentAST.push(f(s)),d.pushToGutter("deletions",_n(g,"annotation",1)),p=!0}if(c!=null){const g=n==="change"?a!=null?"change-addition":"context":n;d.additionsContentAST.push(f(c)),d.pushToGutter("additions",_n(g,"annotation",1)),p=!0}}p&&d.incrementRowCount(1)}function Ff(e,{hunkIndex:n,collapsedLines:i,rangeSize:a,hunkSpecs:o,isFirstHunk:s,isLastHunk:c,isExpandable:f},d){if(i<=0)return;const p=e==="unified"?d.unifiedContentAST:e==="deletions"?d.deletionsContentAST:d.additionsContentAST;if(d.hunkSeparators==="metadata"){o!=null&&(d.pushToGutter(e,ta({type:"metadata",content:o,isFirstHunk:s,isLastHunk:c})),p.push(ta({type:"metadata",content:o,isFirstHunk:s,isLastHunk:c})),e!=="additions"&&d.incrementRowCount(1));return}if(d.hunkSeparators==="simple"){n>0&&(d.pushToGutter(e,ta({type:"simple",isFirstHunk:s,isLastHunk:!1})),p.push(ta({type:"simple",isFirstHunk:s,isLastHunk:!1})),e!=="additions"&&d.incrementRowCount(1));return}const g=MT(e,n),y=a>d.expansionLineCount,v=f?n:void 0;d.pushToGutter(e,ta({type:d.hunkSeparators,content:Ly(i),expandIndex:v,chunked:y,slotName:g,isFirstHunk:s,isLastHunk:c})),p.push(ta({type:d.hunkSeparators,content:Ly(i),expandIndex:v,chunked:y,slotName:g,isFirstHunk:s,isLastHunk:c})),e!=="additions"&&d.incrementRowCount(1),d.hunkData.push({slotName:g,hunkIndex:n,lines:i,type:e,expandable:f?{up:!s,down:!c,chunked:y}:void 0})}function gs(e,n){return e==null||e.type!=="element"||n==null?e:{...e,properties:{...e.properties,...n}}}function PT(e){const n=e.hunks.at(-1);if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;const i=e.additionLines.length-(n.additionLineIndex+n.additionCount),a=e.deletionLines.length-(n.deletionLineIndex+n.deletionCount);if(i!==a)throw new Error(`DiffHunksRenderer.processDiffResult: trailing context mismatch (additions=${i}, deletions=${a}) for ${e.name}`);return Math.min(i,a)}function BT(e,n){return e.lineNumber===n.lineNumber&&e.side===n.side&&e.metadata===n.metadata}function VT(e,n){return e.slotName===n.slotName&&e.hunkIndex===n.hunkIndex&&e.lines===n.lines&&e.type===n.type&&e.expandable?.chunked===n.expandable?.chunked&&e.expandable?.up===n.expandable?.up&&e.expandable?.down===n.expandable?.down}function jT(e){const n=e[0];if(n!=="+"&&n!=="-"&&n!==" "&&n!=="\\"){console.error(`parseLineType: Invalid firstChar: "${n}", full line: "${e}"`);return}const i=e.substring(1);return{line:i===""?`
1872
- `:i,type:n===" "?"context":n==="\\"?"metadata":n==="+"?"addition":"deletion"}}function GT(e,n,i=!1){const a=Ss.test(e),o=e.split(a?Ss:E0);let s;const c=[];for(const f of o){if(a&&!Ss.test(f)){if(s==null)s=f;else{if(i)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",f)}continue}else if(!a&&!E0.test(f)){if(s==null)s=f;else{if(i)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",f)}continue}const d=qv(f,{cacheKey:n!=null?`${n}-${c.length}`:void 0,isGitDiff:a,throwOnError:i});d!=null&&c.push(d)}return{patchMetadata:s,files:c}}function qv(e,{cacheKey:n,isGitDiff:i=Ss.test(e),oldFile:a,newFile:o,throwOnError:s=!1}={}){let c=0;const f=e.split(iE);let d;const p=a==null||o==null;let g=0,y=0;for(const v of f){const b=v.split(xf),S=b.shift();if(S==null){if(s)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",v);continue}const k=S.match(rE);let O=0,A=0;if(k==null||d==null){if(d!=null){if(s)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",v);continue}d={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:p,additionLines:!p&&a!=null&&o!=null?o.contents.split(xf):[],deletionLines:!p&&a!=null&&o!=null?a.contents.split(xf):[],cacheKey:n},d.additionLines.length===1&&o?.contents===""&&(d.additionLines.length=0),d.deletionLines.length===1&&a?.contents===""&&(d.deletionLines.length=0),b.unshift(S);for(const G of b){const $=G.match(i?lE:aE);if(G.startsWith("diff --git")){const[,,ie,,ne]=G.trim().match(oE)??[];d.name=ne.trim(),ie!==ne&&(d.prevName=ie.trim())}else if($!=null){const[,ie,ne]=$;ie==="---"&&ne!=="/dev/null"?(d.prevName=ne.trim(),d.name=ne.trim()):ie==="+++"&&ne!=="/dev/null"&&(d.name=ne.trim())}else if(i){if(G.startsWith("new mode ")&&(d.mode=G.replace("new mode","").trim()),G.startsWith("old mode ")&&(d.prevMode=G.replace("old mode","").trim()),G.startsWith("new file mode")&&(d.type="new",d.mode=G.replace("new file mode","").trim()),G.startsWith("deleted file mode")&&(d.type="deleted",d.mode=G.replace("deleted file mode","").trim()),G.startsWith("similarity index")&&(G.startsWith("similarity index 100%")?d.type="rename-pure":d.type="rename-changed"),G.startsWith("index ")){const[,ie,ne,K]=G.trim().match(sE)??[];ie!=null&&(d.prevObjectId=ie),ne!=null&&(d.newObjectId=ne),K!=null&&(d.mode=K)}G.startsWith("rename from ")&&(d.prevName=G.replace("rename from ","").trim()),G.startsWith("rename to ")&&(d.name=G.replace("rename to ","").trim())}}continue}let T,L;for(;b.length>0&&(b[b.length-1]===`
1873
- `||b[b.length-1]==="\r"||b[b.length-1]===`\r
1874
- `||b[b.length-1]==="");)b.pop();const U=parseInt(k[3]),B=parseInt(k[1]);g=p?g:B-1,y=p?y:U-1;const N={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:parseInt(k[4]??"1"),additionStart:U,additionLines:O,deletionCount:parseInt(k[2]??"1"),deletionStart:B,deletionLines:A,deletionLineIndex:g,additionLineIndex:y,hunkContent:[],hunkContext:k[5],hunkSpecs:S,noEOFCRAdditions:!1,noEOFCRDeletions:!1};if(isNaN(N.additionCount)||isNaN(N.deletionCount)||isNaN(N.additionStart)||isNaN(N.deletionStart)){if(s)throw Error("parsePatchContent: invalid hunk metadata");console.error("parsePatchContent: invalid hunk metadata",N);continue}for(const G of b){const $=jT(G);if($==null){console.error("processFile: invalid rawLine:",G);continue}const{type:ie,line:ne}=$;if(ie==="addition")(T==null||T.type!=="change")&&(T=Yf("change",g,y),N.hunkContent.push(T)),y++,p&&d.additionLines.push(ne),T.additions++,O++,L="addition";else if(ie==="deletion")(T==null||T.type!=="change")&&(T=Yf("change",g,y),N.hunkContent.push(T)),g++,p&&d.deletionLines.push(ne),T.deletions++,A++,L="deletion";else if(ie==="context")(T==null||T.type!=="context")&&(T=Yf("context",g,y),N.hunkContent.push(T)),y++,g++,p&&(d.deletionLines.push(ne),d.additionLines.push(ne)),T.lines++,L="context";else if(ie==="metadata"&&T!=null){if(T.type==="context"?(N.noEOFCRAdditions=!0,N.noEOFCRDeletions=!0):L==="deletion"?N.noEOFCRDeletions=!0:L==="addition"&&(N.noEOFCRAdditions=!0),p&&(L==="addition"||L==="context")){const K=d.additionLines.length-1;K>=0&&(d.additionLines[K]=pa(d.additionLines[K]))}if(p&&(L==="deletion"||L==="context")){const K=d.deletionLines.length-1;K>=0&&(d.deletionLines[K]=pa(d.deletionLines[K]))}}}N.additionLines=O,N.deletionLines=A,N.collapsedBefore=Math.max(N.additionStart-1-c,0),d.hunks.push(N),c=N.additionStart+N.additionCount-1;for(const G of N.hunkContent)G.type==="context"?(N.splitLineCount+=G.lines,N.unifiedLineCount+=G.lines):(N.splitLineCount+=Math.max(G.additions,G.deletions),N.unifiedLineCount+=G.deletions+G.additions);N.splitLineStart=d.splitLineCount+N.collapsedBefore,N.unifiedLineStart=d.unifiedLineCount+N.collapsedBefore,d.splitLineCount+=N.collapsedBefore+N.splitLineCount,d.unifiedLineCount+=N.collapsedBefore+N.unifiedLineCount}if(d!=null){if(d.hunks.length>0&&!p&&d.additionLines.length>0&&d.deletionLines.length>0){const v=d.hunks[d.hunks.length-1],b=v.additionStart+v.additionCount-1,S=d.additionLines.length,k=Math.max(S-b,0);d.splitLineCount+=k,d.unifiedLineCount+=k}return i||(d.prevName!=null&&d.name!==d.prevName?d.hunks.length>0?d.type="rename-changed":d.type="rename-pure":o!=null&&o.contents===""?d.type="deleted":a!=null&&a.contents===""&&(d.type="new")),d.type!=="rename-pure"&&d.type!=="rename-changed"&&(d.prevName=void 0),d}}function qT(e,n,i=!1){const a=[];for(const o of e.split(nE))try{a.push(GT(o,n!=null?`${n}-${a.length}`:void 0,i))}catch(s){if(i)throw s;console.error(s)}return a}function Yf(e,n,i){return e==="change"?{type:"change",additions:0,deletions:0,additionLineIndex:i,deletionLineIndex:n}:{type:"context",lines:0,additionLineIndex:i,deletionLineIndex:n}}function Rd(e,n,i,a=!1){const o=qv(Bk(e.name,n.name,e.contents,n.contents,e.header,n.header),{cacheKey:(()=>{if(e.cacheKey!=null&&n.cacheKey!=null)return`${e.cacheKey}:${n.cacheKey}`})(),oldFile:e,newFile:n,throwOnError:a});if(o==null)throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");return o}let $T=-1;var $v=class{static LoadedCustomComponent=wT;__id=`file-diff:${++$T}`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;lastRowCount;enabled=!0;constructor(n={theme:Nn},i,a=!1){this.options=n,this.workerManager=i,this.isContainerManaged=a,this.hunksRenderer=this.createHunksRenderer(n),this.resizeManager=new nT,this.scrollSyncManager=new NT,this.interactionManager=new Kk("diff",xy(n,typeof n.hunkSeparators=="function"||(n.hunkSeparators??"line-info")==="line-info"||n.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(n){return{...n,headerRenderMode:n.renderCustomHeader!=null?"custom":"default",hunkSeparators:typeof n.hunkSeparators=="function"?"custom":n.hunkSeparators}}createHunksRenderer(n){return new HT(this.getHunksRendererOptions(n),this.handleHighlightRender,this.workerManager)}getLineIndex=(n,i="additions")=>{if(this.fileDiff==null)return;const a=this.fileDiff.hunks.at(-1);let o,s;e:for(const c of this.fileDiff.hunks){let f=i==="deletions"?c.deletionStart:c.additionStart;const d=i==="deletions"?c.deletionCount:c.additionCount;let p=c.splitLineStart,g=c.unifiedLineStart;if(n<f){const y=f-n;o=Math.max(g-y,0),s=Math.max(p-y,0);break e}if(n>=f+d){if(c===a){const y=n-(f+d);o=g+c.unifiedLineCount+y,s=p+c.splitLineCount+y;break e}continue}for(const y of c.hunkContent)if(y.type==="context")if(n<f+y.lines){const v=n-f;s=p+v,o=g+v;break e}else f+=y.lines,p+=y.lines,g+=y.lines;else{const v=i==="deletions"?y.deletions:y.additions;if(n<f+v){const b=n-f;o=g+(i==="additions"?y.deletions:0)+b,s=p+b;break e}else f+=v,p+=Math.max(y.deletions,y.additions),g+=y.deletions+y.additions}break e}if(!(o==null||s==null))return[o,s]};setOptions(n){n!=null&&(this.options=n,this.hunksRenderer.setOptions(this.getHunksRendererOptions(n)),this.interactionManager.setOptions(xy(n,typeof n.hunkSeparators=="function"||(n.hunkSeparators??"line-info")==="line-info"||n.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex)))}mergeOptions(n){this.options={...this.options,...n}}setThemeType(n){(this.options.themeType??"system")!==n&&(this.mergeOptions({themeType:n}),!(typeof this.options.theme=="string"||this.fileContainer==null||this.appliedThemeCSS==null)&&this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,n,this.appliedThemeCSS.baseThemeType))}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(n){this.lineAnnotations=n}canPartiallyRender(n,i,a){return!(n||i||a||typeof this.options.hunkSeparators=="function")}setSelectedLines(n){this.interactionManager.setSelection(n)}cleanUp(n=!1){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer?.shadowRoot!=null&&(this.fileContainer.shadowRoot.innerHTML=""),this.fileContainer=void 0,this.pre!=null&&(this.pre.innerHTML="",this.pre=void 0),this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.lastRenderedHeaderHTML=void 0,this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,n?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(n){const{fileContainer:i,prerenderedHTML:a,preventEmit:o=!1,lineAnnotations:s,oldFile:c,newFile:f,fileDiff:d}=n;this.hydrateElements(i,a),this.pre==null&&this.headerElement==null?this.render({...n,preventEmit:!0}):this.hydrationSetup({fileDiff:d,oldFile:c,newFile:f,lineAnnotations:s}),o||this.emitPostRender()}hydrateElements(n,i){xT(n,i);for(const a of n.shadowRoot?.children??[]){if(a instanceof SVGElement){this.spriteSVG=a;continue}if(a instanceof HTMLElement){if(a instanceof HTMLPreElement){this.pre=a;for(const o of a.children)!(o instanceof HTMLElement)||o.tagName.toLowerCase()!=="code"||("deletions"in o.dataset&&(this.codeDeletions=o),"additions"in o.dataset&&(this.codeAdditions=o),"unified"in o.dataset&&(this.codeUnified=o));continue}if("diffsHeader"in a.dataset){this.headerElement=a;continue}if(a instanceof HTMLStyleElement&&a.hasAttribute(_b)){this.themeCSSStyle=a;continue}if(a instanceof HTMLStyleElement&&a.hasAttribute(Sb)){this.unsafeCSSStyle=a,this.appliedUnsafeCSS=a.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=n}hydrationSetup({fileDiff:n,oldFile:i,newFile:a,lineAnnotations:o}){const{diffStyle:s="split",overflow:c="scroll"}=this.options;this.lineAnnotations=o??this.lineAnnotations,this.additionFile=a,this.deletionFile=i,this.fileDiff=n??(i!=null&&a!=null?Rd(i,a):void 0),this.pre!=null&&(this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,c==="wrap"),c==="scroll"&&s==="split"&&this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions))}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}handleExpandHunk=(n,i,a)=>{this.expandHunk(n,i,a)};expandHunk=(n,i,a)=>{this.hunksRenderer.expandHunk(n,i,a),this.rerender()};render({oldFile:n,newFile:i,fileDiff:a,forceRender:o=!1,preventEmit:s=!1,lineAnnotations:c,fileContainer:f,containerWrapper:d,renderRange:p}){if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");const{collapsed:g=!1}=this.options,y=g?void 0:p,v=n!=null&&i!=null&&(!yy(n,this.deletionFile)||!yy(i,this.additionFile));let b=a!=null&&a!==this.fileDiff;const S=c!=null&&(c.length>0||this.lineAnnotations.length>0)?c!==this.lineAnnotations:!1;if(!g&&jv(y,this.renderRange)&&!o&&!S&&(a!=null&&a===this.fileDiff||a==null&&!v))return!1;const{renderRange:k}=this;if(this.renderRange=y,this.deletionFile=n,this.additionFile=i,a!=null?this.fileDiff=a:n!=null&&i!=null&&v&&(b=!0,this.fileDiff=Rd(n,i)),c!=null&&this.setLineAnnotations(c),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{diffStyle:O="split",disableErrorHandling:A=!1,disableFileHeader:T=!1,overflow:L="scroll",themeType:U="system"}=this.options;if(T&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),f=this.getOrCreateFileContainer(f,d),g){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const B=this.hunksRenderer.renderDiff(this.fileDiff,fE);B!=null&&this.applyThemeState(f,B.themeStyles,U,B.baseThemeType),B?.headerElement!=null&&this.applyHeaderToDOM(B.headerElement,f),this.renderSeparators([]),this.injectUnsafeCSS()}catch(B){if(A)throw B;console.error(B),B instanceof Error&&this.applyErrorToDOM(B,f)}return s||this.emitPostRender(),!0}try{const B=this.getOrCreatePreNode(f);if(!(this.canPartiallyRender(o,S,v||b)&&this.applyPartialRender({previousRenderRange:k,renderRange:y}))){const N=this.hunksRenderer.renderDiff(this.fileDiff,y);if(N==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(f,N.themeStyles,U,N.baseThemeType),N.headerElement!=null&&this.applyHeaderToDOM(N.headerElement,f),N.additionsContentAST!=null||N.deletionsContentAST!=null||N.unifiedContentAST!=null?this.applyHunksToDOM(B,N):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(N.hunkData)}this.applyBuffers(B,y),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.interactionManager.setup(B),this.resizeManager.setup(B,L==="wrap"),L==="scroll"&&O==="split"?this.scrollSyncManager.setup(B,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp()}catch(B){if(A)throw B;console.error(B),B instanceof Error&&this.applyErrorToDOM(B,f)}return s||this.emitPostRender(),!0}emitPostRender(){this.fileContainer!=null&&this.options.onPostRender?.(this.fileContainer,this)}removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:n}of this.separatorCache.values())n.remove();this.separatorCache.clear();for(const{element:n}of this.annotationCache.values())n.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(n){if(this.fileContainer==null)return!1;if(this.cleanChildNodes(),this.placeHolder==null){const i=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",i.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${n}px`),!0}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.gutterUtilityContent?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.gutterUtilityContent=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0}renderSeparators(n){const{hunkSeparators:i}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof i!="function"){for(const{element:o}of this.separatorCache.values())o.remove();this.separatorCache.clear();return}const a=new Map(this.separatorCache);for(const o of n){const s=o.slotName;let c=this.separatorCache.get(s);if(c==null||!VT(o,c.hunkData)){c?.element.remove();const f=document.createElement("div");f.style.display="contents",f.slot=o.slotName;const d=i(o,this);d!=null&&f.appendChild(d),this.fileContainer.appendChild(f),c={element:f,hunkData:o},this.separatorCache.set(s,c)}a.delete(s)}for(const[o,{element:s}]of a.entries())this.separatorCache.delete(o),s.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:a}of this.annotationCache.values())a.remove();this.annotationCache.clear();return}const n=new Map(this.annotationCache),{renderAnnotation:i}=this.options;if(i!=null&&this.lineAnnotations.length>0)for(const[a,o]of this.lineAnnotations.entries()){const s=`${a}-${kl(o)}`;let c=this.annotationCache.get(s);if(c==null||!BT(o,c.annotation)){c?.element.remove();const f=i(o);if(f==null)continue;c={element:mT(kl(o)),annotation:o},c.element.appendChild(f),this.fileContainer.appendChild(c.element),this.annotationCache.set(s,c)}n.delete(s)}for(const[a,{element:o}]of n.entries())this.annotationCache.delete(a),o.remove()}renderGutterUtility(){const n=this.options.renderGutterUtility??this.options.renderHoverUtility;if(this.fileContainer==null||n==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const i=n(this.interactionManager.getHoveredLine);if(i!=null&&this.gutterUtilityContent!=null)return;if(i==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const a=gT();a.appendChild(i),this.fileContainer.appendChild(a),this.gutterUtilityContent=a}getOrCreateFileContainer(n,i){const a=this.fileContainer;if(this.fileContainer=n??this.fileContainer??document.createElement(As),a!=null&&a!==this.fileContainer&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),i!=null&&this.fileContainer.parentNode!==i&&i.appendChild(this.fileContainer),this.spriteSVG==null){const o=document.createElement("div");o.innerHTML=dT;const s=o.firstChild;s instanceof SVGElement&&(this.spriteSVG=s,this.fileContainer.shadowRoot?.appendChild(this.spriteSVG))}return this.fileContainer}getFileContainer(){return this.fileContainer}getOrCreatePreNode(n){const i=n.shadowRoot??n.attachShadow({mode:"open"});return this.pre==null?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,i.appendChild(this.pre)):this.pre.parentNode!==i&&(i.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(n){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(const i of Array.from(n.children))i instanceof HTMLElement&&(i.hasAttribute("data-unified")?this.codeUnified=i:i.hasAttribute("data-deletions")?this.codeDeletions=i:i.hasAttribute("data-additions")&&(this.codeAdditions=i))}applyHeaderToDOM(n,i){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const{fileDiff:a}=this,o=ca(n);if(o!==this.lastRenderedHeaderHTML){const g=document.createElement("div");g.innerHTML=o;const y=g.firstElementChild;if(!(y instanceof HTMLElement))return;this.headerElement!=null?i.shadowRoot?.replaceChild(y,this.headerElement):i.shadowRoot?.prepend(y),this.headerElement=y,this.lastRenderedHeaderHTML=o}if(this.isContainerManaged||a==null)return;const{renderCustomHeader:s,renderHeaderPrefix:c,renderHeaderMetadata:f}=this.options;if(s!=null){const g=s(a)??void 0;this.headerCustom=this.upsertHeaderSlotElement(i,this.headerCustom,Vd,g),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}const d=c?.(a)??void 0,p=f?.(a)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(i,this.headerPrefix,Pd,d),this.headerMetadata=this.upsertHeaderSlotElement(i,this.headerMetadata,Bd,p),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(n,i,a,o){if(o==null){i?.remove();return}const s=i??this.createHeaderSlotElement(a);return i==null&&n.appendChild(s),this.replaceHeaderSlotContent(s,o),s}replaceHeaderSlotContent(n,i){n.replaceChildren(),i instanceof Element?n.appendChild(i):n.innerText=`${i}`}createHeaderSlotElement(n){const i=document.createElement("div");return i.slot=n,i}injectUnsafeCSS(){const{unsafeCSS:n}=this.options,i=this.fileContainer?.shadowRoot;if(i!=null){if(n==null||n===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===i&&this.appliedUnsafeCSS===n||(this.unsafeCSSStyle??=yT(),this.unsafeCSSStyle.parentNode!==i&&i.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=vT(n),this.appliedUnsafeCSS=n)}}applyThemeState(n,i,a,o){const s=n.shadowRoot??n.attachShadow({mode:"open"}),c=o??a;this.themeCSSStyle?.parentNode===s&&this.appliedThemeCSS?.themeStyles===i&&this.appliedThemeCSS.themeType===c||(this.themeCSSStyle=ST({shadowRoot:s,currentNode:this.themeCSSStyle,themeCSS:_T(i,c)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{themeStyles:i,themeType:c,baseThemeType:o}:void 0)}applyHunksToDOM(n,i){const{overflow:a="scroll"}=this.options,o=(this.options.hunkSeparators??"line-info")==="line-info",s=a==="wrap"?i.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(n,i);let c=!1;const f=[],d=this.hunksRenderer.renderCodeAST("unified",i),p=this.hunksRenderer.renderCodeAST("deletions",i),g=this.hunksRenderer.renderCodeAST("additions",i);d!=null?(c=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=Gf({code:this.codeUnified,columnType:"unified",rowSpan:s,containerSize:o}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(d),f.push(this.codeUnified)):p!=null||g!=null?(p!=null?(c=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=Gf({code:this.codeDeletions,columnType:"deletions",rowSpan:s,containerSize:o}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(p),f.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),g!=null?(c=c||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=Gf({code:this.codeAdditions,columnType:"additions",rowSpan:s,containerSize:o}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(g),f.push(this.codeAdditions)):(this.codeAdditions?.remove(),this.codeAdditions=void 0)):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0),f.length===0?n.textContent="":c&&n.replaceChildren(...f),this.lastRowCount=i.rowCount}applyPartialRender({previousRenderRange:n,renderRange:i}){const{pre:a,codeUnified:o,codeAdditions:s,codeDeletions:c,options:{diffStyle:f="split"}}=this;if(a==null||n==null||i==null||!Number.isFinite(n.totalLines)||!Number.isFinite(i.totalLines)||this.lastRowCount==null)return!1;const d=this.getCodeColumns(f,o,c,s);if(d==null)return!1;const p=n.startingLine,g=i.startingLine,y=p+n.totalLines,v=g+i.totalLines,b=Math.max(p,g),S=Math.min(y,v);if(S<=b)return!1;const k=Math.max(0,b-p),O=Math.max(0,y-S),A=this.trimColumns({columns:d,trimStart:k,trimEnd:O,previousStart:p,overlapStart:b,overlapEnd:S,diffStyle:f});if(A<0)throw new Error("applyPartialRender: failed to trim to overlap");if(this.lastRowCount<A)throw new Error("applyPartialRender: trimmed beyond DOM row count");let T=this.lastRowCount-A;const L=(G,$)=>{if(!($<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:G,totalLines:$,bufferBefore:0,bufferAfter:0})},U=L(g,Math.max(b-g,0));if(U==null&&g<b)return!1;const B=L(S,Math.max(v-S,0));if(B==null&&v>S)return!1;const N=(G,$)=>{if(G!=null){if(f==="unified"&&!Array.isArray(d))this.insertPartialHTML(f,d,G,$);else if(f==="split"&&Array.isArray(d))this.insertPartialHTML(f,d,G,$);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");T+=G.rowCount}};return this.cleanupErrorWrapper(),N(U,"afterbegin"),N(B,"beforeend"),this.lastRowCount!==T&&(this.applyRowSpan(f,d,T),this.lastRowCount=T),!0}insertPartialHTML(n,i,a,o){if(n==="unified"&&!Array.isArray(i)){const s=this.hunksRenderer.renderCodeAST("unified",a);this.renderPartialColumn(i,s,o)}else if(n==="split"&&Array.isArray(i)){const s=this.hunksRenderer.renderCodeAST("deletions",a),c=this.hunksRenderer.renderCodeAST("additions",a);this.renderPartialColumn(i[0],s,o),this.renderPartialColumn(i[1],c,o)}else throw new Error("FileDiff.insertPartialHTML: Invalid argument composition")}renderPartialColumn(n,i,a){if(n==null||i==null)return;const o=Ny(i[0]),s=Ny(i[1]);if(o==null||s==null)throw new Error("FileDiff.insertPartialHTML: Unexpected AST structure");const c=s.at(0);a==="beforeend"&&c?.type==="element"&&typeof c.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(c.properties["data-buffer-size"],n.content.children[n.content.children.length-1],n.gutter.children[n.gutter.children.length-1],o,s,!0);const f=s.at(-1);a==="afterbegin"&&f?.type==="element"&&typeof f.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(f.properties["data-buffer-size"],n.content.children[0],n.gutter.children[0],o,s,!1),n.gutter.insertAdjacentHTML(a,this.hunksRenderer.renderPartialHTML(o)),n.content.insertAdjacentHTML(a,this.hunksRenderer.renderPartialHTML(s))}mergeBuffersIfNecessary(n,i,a,o,s,c){if(!(i instanceof HTMLElement)||!(a instanceof HTMLElement))return;const f=this.getBufferSize(i.dataset);f!=null&&(c?(o.shift(),s.shift()):(o.pop(),s.pop()),this.updateBufferSize(i,f+n),this.updateBufferSize(a,f+n))}applyRowSpan(n,i,a){const o=s=>{s!=null&&(s.gutter.style.setProperty("grid-row",`span ${a}`),s.content.style.setProperty("grid-row",`span ${a}`))};if(n==="unified"&&!Array.isArray(i))o(i);else if(n==="split"&&Array.isArray(i))o(i[0]),o(i[1]);else throw new Error("dun fuuuuked up")}trimColumnRows(n,i,a){let o=0,s=0,c=0,f=!1;const d=a>=0;if(n==null)return 0;const p=Array.from(n.content.children),g=Array.from(n.gutter.children);if(p.length!==g.length)throw new Error("FileDiff.trimColumnRows: columns do not match");for(;c<p.length&&!(i<=0&&!d&&!f);){const y=g[c],v=p[c];if(c++,!(y instanceof HTMLElement)||!(v instanceof HTMLElement))throw console.error({gutterElement:y,contentElement:v}),new Error("FileDiff.trimColumnRows: invalid row elements");if(f&&(f=!1,y.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in v.dataset||y.dataset.gutterBuffer==="metadata"&&"noNewline"in v.dataset)){y.remove(),v.remove(),s++;continue}if("lineIndex"in y.dataset&&"lineIndex"in v.dataset){(i>0||d&&o>=a)&&(y.remove(),v.remove(),i>0&&(i--,i===0&&(f=!0)),s++),o++;continue}if("separator"in y.dataset&&"separator"in v.dataset){(i>0||d&&o>=a)&&(y.remove(),v.remove(),s++);continue}if(y.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in v.dataset){(i>0||d&&o>=a)&&(y.remove(),v.remove(),s++);continue}if(y.dataset.gutterBuffer==="metadata"&&"noNewline"in v.dataset){(i>0||d&&o>=a)&&(y.remove(),v.remove(),s++);continue}if(y.dataset.gutterBuffer==="buffer"&&"contentBuffer"in v.dataset){const b=this.getBufferSize(v.dataset);if(b==null)throw new Error("FileDiff.trimColumnRows: invalid element");if(i>0){const S=Math.min(i,b),k=b-S;k>0?(this.updateBufferSize(y,k),this.updateBufferSize(v,k),s+=S):(y.remove(),v.remove(),s+=b),i-=S}else if(d){const S=o,k=o+b-1;if(a<=S)y.remove(),v.remove(),s+=b;else if(a<=k){const O=k-a+1,A=b-O;this.updateBufferSize(y,A),this.updateBufferSize(v,A),s+=O}}o+=b;continue}throw console.error({gutterElement:y,contentElement:v}),new Error("FileDiff.trimColumnRows: unknown row elements")}return s}trimColumns({columns:n,diffStyle:i,overlapEnd:a,overlapStart:o,previousStart:s,trimEnd:c,trimStart:f}){const d=Math.max(0,o-s),p=a-s;if(p<0)throw new Error("FileDiff.trimColumns: overlap ends before previous");const g=f>0,y=c>0;if(!g&&!y)return 0;const v=g?d:0,b=y?p:-1;if(i==="unified"&&!Array.isArray(n))return this.trimColumnRows(n,v,b);if(i==="split"&&Array.isArray(n)){const S=this.trimColumnRows(n[0],v,b),k=this.trimColumnRows(n[1],v,b);if(n[0]!=null&&n[1]!=null&&S!==k)throw new Error("FileDiff.trimColumns: split columns out of sync");return n[0]!=null?S:k}else throw console.error({diffStyle:i,columns:n}),new Error("FileDiff.trimColumns: Invalid columns for diffType")}getBufferSize(n){const i=Number.parseInt(n?.bufferSize??"",10);return Number.isNaN(i)?void 0:i}updateBufferSize(n,i){n.dataset.bufferSize=`${i}`,n.style.setProperty("grid-row",`span ${i}`),n.style.setProperty("min-height",`calc(${i} * 1lh)`)}getCodeColumns(n,i,a,o){function s(c){if(c==null)return;const f=c.children[0],d=c.children[1];if(!(!(f instanceof HTMLElement)||!(d instanceof HTMLElement)||f.dataset.gutter==null||d.dataset.content==null))return{gutter:f,content:d}}if(n==="unified")return s(i);{const c=s(a),f=s(o);return c!=null||f!=null?[c,f]:void 0}}applyBuffers(n,i){const{disableVirtualizationBuffers:a=!1}=this.options;if(a||i==null){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}i.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",n.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${i.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),i.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",n.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${i.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}applyPreNodeAttributes(n,{additionsContentAST:i,deletionsContentAST:a,totalLines:o},s){const{diffIndicators:c="bars",disableBackground:f=!1,disableLineNumbers:d=!1,overflow:p="scroll",diffStyle:g="split"}=this.options,y={type:"diff",diffIndicators:c,disableBackground:f,disableLineNumbers:d,overflow:p,split:g==="unified"?!1:i!=null&&a!=null,totalLines:o,customProperties:s};hT(y,this.appliedPreAttributes)||(CT(n,y),this.appliedPreAttributes=y)}applyErrorToDOM(n,i){this.cleanupErrorWrapper();const a=this.getOrCreatePreNode(i);a.innerHTML="",a.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const o=i.shadowRoot??i.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.innerHTML="",o.appendChild(this.errorWrapper);const s=document.createElement("div");s.dataset.errorMessage="",s.innerText=n.message,this.errorWrapper.appendChild(s);const c=document.createElement("pre");c.dataset.errorStack="",c.innerText=n.stack??"No Error Stack",this.errorWrapper.appendChild(c)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function Ny(e){if(!(e==null||e.type!=="element"))return e.children??[]}function FT(e,n){const i={...uE,...n};return i.hunkSeparatorHeight=YT(e,n?.hunkSeparatorHeight),i}function YT(e,n){if(n!=null)return n;switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}let XT=-1;var QT=class extends $v{__id=`little-virtualized-file-diff:${++XT}`;top;height=0;metrics;heightCache=new Map;isVisible=!1;virtualizer;constructor(e,n,i,a,o=!1){super(e,a,o);const{hunkSeparators:s="line-info"}=this.options;this.virtualizer=n,this.metrics=FT(typeof s=="function"?"custom":s,i)}getLineHeight(e,n=!1){const i=this.heightCache.get(e);if(i!=null)return i;const a=n?2:1;return this.metrics.lineHeight*a}setOptions(e){if(e==null)return;const n=this.options.diffStyle,i=this.options.overflow,a=this.options.collapsed;super.setOptions(e),(n!==this.options.diffStyle||i!==this.options.overflow||a!==this.options.collapsed)&&(this.heightCache.clear(),this.computeApproximateSize(),this.renderRange=void 0),this.virtualizer.instanceChanged(this)}reconcileHeights(){const{overflow:e="scroll"}=this.options;if(this.fileContainer!=null&&(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer)),this.fileContainer==null||this.fileDiff==null){this.height=0;return}if(e==="scroll"&&this.lineAnnotations.length===0&&!this.virtualizer.config.resizeDebugging)return;const n=this.getDiffStyle();let i=!1;const a=n==="split"?[this.codeDeletions,this.codeAdditions]:[this.codeUnified];for(const o of a){if(o==null)continue;const s=o.children[1];if(s instanceof HTMLElement)for(const c of s.children){if(!(c instanceof HTMLElement))continue;const f=c.dataset.lineIndex;if(f==null)continue;const d=KT(f,n);let p=c.getBoundingClientRect().height,g=!1;c.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in c.nextElementSibling.dataset||"noNewline"in c.nextElementSibling.dataset)&&("noNewline"in c.nextElementSibling.dataset&&(g=!0),p+=c.nextElementSibling.getBoundingClientRect().height);const y=this.getLineHeight(d,g);p!==y&&(i=!0,p===this.metrics.lineHeight*(g?2:1)?this.heightCache.delete(d):this.heightCache.set(d,p))}}(i||this.virtualizer.config.resizeDebugging)&&this.computeApproximateSize()}onRender=e=>this.fileContainer==null?!1:(e&&(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer)),this.render());cleanUp(){this.fileContainer!=null&&this.virtualizer.disconnect(this.fileContainer),super.cleanUp()}expandHunk=(e,n,i)=>{this.hunksRenderer.expandHunk(e,n,i),this.computeApproximateSize(),this.renderRange=void 0,this.virtualizer.instanceChanged(this)};setVisibility(e){this.fileContainer!=null&&(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}computeApproximateSize(){const e=this.height===0;if(this.height=0,this.fileDiff==null)return;const{disableFileHeader:n=!1,expandUnchanged:i=!1,collapsed:a=!1,collapsedContextThreshold:o=oa,hunkSeparators:s="line-info"}=this.options,{diffHeaderHeight:c,fileGap:f,hunkSeparatorHeight:d}=this.metrics,p=this.getDiffStyle(),g=s!=="simple"&&s!=="metadata"&&s!=="line-info-basic"?f:0;if(n?s!=="simple"&&s!=="metadata"&&(this.height+=f):this.height+=c,!a&&(Ps({diff:this.fileDiff,diffStyle:p,expandedHunks:i?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:y,collapsedBefore:v,collapsedAfter:b,deletionLine:S,additionLine:k})=>{const O=k!=null?k.splitLineIndex:S.splitLineIndex,A=k!=null?k.unifiedLineIndex:S.unifiedLineIndex,T=(k?.noEOFCR??!1)||(S?.noEOFCR??!1);v>0&&(y>0&&(this.height+=g),this.height+=d+g),this.height+=this.getLineHeight(p==="split"?O:A,T),b>0&&s!=="simple"&&(this.height+=g+d)}}),this.fileDiff.hunks.length>0&&(this.height+=f),this.fileContainer!=null&&this.virtualizer.config.resizeDebugging&&!e)){const y=this.fileContainer.getBoundingClientRect();y.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:this.fileDiff.name,elementHeight:y.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}}render({fileContainer:e,oldFile:n,newFile:i,fileDiff:a,...o}={}){const s=this.fileContainer==null;if(this.fileDiff??=a??(n!=null&&i!=null?Rd(n,i):void 0),e=this.getOrCreateFileContainer(e),this.fileDiff==null)return console.error("VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data"),!1;if(s?(this.computeApproximateSize(),this.virtualizer.connect(e,this),this.top??=this.virtualizer.getOffsetInScrollContainer(e),this.isVisible=this.virtualizer.isInstanceVisible(this.top,this.height)):this.top??=this.virtualizer.getOffsetInScrollContainer(e),!this.isVisible)return this.renderPlaceholder(this.height);const c=this.virtualizer.getWindowSpecs(),f=this.computeRenderRangeFromWindow(this.fileDiff,this.top,c);return super.render({fileDiff:this.fileDiff,fileContainer:e,renderRange:f,oldFile:n,newFile:i,...o})}getDiffStyle(){return this.options.diffStyle??"split"}getExpandedRegion(e,n,i){if(i<=0||e)return{fromStart:0,fromEnd:0,collapsedLines:Math.max(i,0),renderAll:!1};const{expandUnchanged:a=!1,collapsedContextThreshold:o=oa}=this.options;if(a||i<=o)return{fromStart:i,fromEnd:0,collapsedLines:0,renderAll:!0};const s=this.hunksRenderer.getExpandedHunk(n),c=Math.min(Math.max(s.fromStart,0),i),f=Math.min(Math.max(s.fromEnd,0),i),d=c+f,p=d>=i;return{fromStart:c,fromEnd:f,collapsedLines:Math.max(i-d,0),renderAll:p}}getExpandedLineCount(e,n){let i=0;if(e.isPartial){for(const o of e.hunks)i+=n==="split"?o.splitLineCount:o.unifiedLineCount;return i}for(const[o,s]of e.hunks.entries()){const c=n==="split"?s.splitLineCount:s.unifiedLineCount;i+=c;const f=Math.max(s.collapsedBefore,0),{fromStart:d,fromEnd:p,renderAll:g}=this.getExpandedRegion(e.isPartial,o,f);f>0&&(i+=g?f:d+p)}const a=e.hunks.at(-1);if(a!=null&&ZT(e)){const o=e.additionLines.length-(a.additionLineIndex+a.additionCount),s=e.deletionLines.length-(a.deletionLineIndex+a.deletionCount);if(a!=null&&o!==s)throw new Error(`VirtualizedFileDiff: trailing context mismatch (additions=${o}, deletions=${s}) for ${e.name}`);const c=Math.min(o,s);if(a!=null&&c>0){const{fromStart:f,renderAll:d}=this.getExpandedRegion(e.isPartial,e.hunks.length,c);i+=d?c:f}}return i}computeRenderRangeFromWindow(e,n,{top:i,bottom:a}){const{disableFileHeader:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=oa,hunkSeparators:f="line-info"}=this.options,{diffHeaderHeight:d,fileGap:p,hunkLineCount:g,hunkSeparatorHeight:y,lineHeight:v}=this.metrics,b=this.getDiffStyle(),S=this.height,k=this.getExpandedLineCount(e,b),O=o?p:d;if(n<i-S||n>a)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:S-O-p};if(k<=g||e.hunks.length===0)return{startingLine:0,totalLines:g,bufferBefore:0,bufferAfter:0};const A=Math.ceil(Math.max(a-i,0)/v),T=Math.ceil(A/g)*g+g,L=T/g,U=L,B=[],N=(i+a)/2,G=f==="simple"||f==="metadata"||f==="line-info-basic"?0:p;let $=n+O,ie=0,ne,K,W;if(Ps({diff:e,diffStyle:b,expandedHunks:s?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:c,callback:({hunkIndex:R,collapsedBefore:V,collapsedAfter:w,deletionLine:le,additionLine:he})=>{const se=he!=null?he.splitLineIndex:le.splitLineIndex,ye=he!=null?he.unifiedLineIndex:le.unifiedLineIndex,we=(he?.noEOFCR??!1)||(le?.noEOFCR??!1);let Ae=V>0?y+G+(R>0?G:0):0;R===0&&f==="simple"&&(Ae=0),$+=Ae;const Ze=ie%g===0;if(Ze&&(B.push($-(n+O+Ae)),W!=null)){if(W<=0)return!0;W--}const We=this.getLineHeight(b==="split"?se:ye,we),mn=Math.floor(ie/g);return $>i-We&&$<a&&(ne??=mn),K==null&&$+We>N&&(K=mn),W==null&&$>=a&&Ze&&(W=U),ie++,$+=We,w>0&&f!=="simple"&&($+=y+G),!1}}),ne==null)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:S-O-p};const ue=B.length;K??=ne;const J=Math.round(K-L/2),ee=Math.max(0,ue-L),z=Math.max(0,Math.min(J,ee)),Y=z*g,ae=J<0?T+J*g:T,de=B[z]??0,x=z+ae/g;return{startingLine:Y,totalLines:ae,bufferBefore:de,bufferAfter:x<B.length?S-O-B[x]-p:S-($-n)-p}}};function ZT(e){const n=e.hunks.at(-1);return n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0?!1:n.additionLineIndex+n.additionCount<e.additionLines.length||n.deletionLineIndex+n.deletionCount<e.deletionLines.length}function KT(e,n){const[i,a]=e.split(",").map(Number);return n==="split"?a:i}const WT=typeof window>"u"?me.useEffect:me.useLayoutEffect;function JT({fileDiff:e,options:n,lineAnnotations:i,selectedLines:a,prerenderedHTML:o,metrics:s,hasGutterRenderUtility:c,hasCustomHeader:f,disableWorkerPool:d}){const p=pE(),g=me.useContext(Yk),y=me.useRef(null),v=Xk(b=>{if(b!=null){if(y.current!=null)throw new Error("useFileDiffInstance: An instance should not already exist when a node is created");p!=null?y.current=new QT(Xf({hasCustomHeader:f,hasGutterRenderUtility:c,options:n}),p,s,d?void 0:g,!0):y.current=new $v(Xf({hasCustomHeader:f,hasGutterRenderUtility:c,options:n}),d?void 0:g,!0),y.current.hydrate({fileDiff:e,fileContainer:b,lineAnnotations:i,prerenderedHTML:o})}else{if(y.current==null)throw new Error("useFileDiffInstance: A FileDiff instance should exist when unmounting");y.current.cleanUp(),y.current=null}});return WT(()=>{const{current:b}=y;if(b==null)return;const S=Xf({hasCustomHeader:f,hasGutterRenderUtility:c,options:n}),k=!kT(b.options,S);b.setOptions(S),b.render({forceRender:k,fileDiff:e,lineAnnotations:i}),a!==void 0&&b.setSelectedLines(a)}),{ref:v,getHoveredLine:me.useCallback(()=>y.current?.getHoveredLine(),[])}}function Xf({options:e,hasCustomHeader:n,hasGutterRenderUtility:i}){return i||n?{...e,renderCustomHeader:n?S0:void 0,renderGutterUtility:i?S0:void 0}:e}function e2({fileDiff:e,options:n,metrics:i,lineAnnotations:a,selectedLines:o,className:s,style:c,prerenderedHTML:f,renderAnnotation:d,renderCustomHeader:p,renderHeaderPrefix:g,renderHeaderMetadata:y,renderGutterUtility:v,renderHoverUtility:b,disableWorkerPool:S=!1}){const{ref:k,getHoveredLine:O}=JT({fileDiff:e,options:n,metrics:i,lineAnnotations:a,selectedLines:o,prerenderedHTML:f,hasGutterRenderUtility:v!=null||b!=null,hasCustomHeader:p!=null,disableWorkerPool:S});return te.jsx(As,{ref:k,className:s,style:c,children:dE(DT({fileDiff:e,renderCustomHeader:p,renderHeaderPrefix:g,renderHeaderMetadata:y,renderAnnotation:d,renderGutterUtility:v,lineAnnotations:a,renderHoverUtility:b,getHoveredLine:O}),f)})}const Fv=(...e)=>e.filter((n,i,a)=>!!n&&n.trim()!==""&&a.indexOf(n)===i).join(" ").trim();const t2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const n2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,i,a)=>a?a.toUpperCase():i.toLowerCase());const My=e=>{const n=n2(e);return n.charAt(0).toUpperCase()+n.slice(1)};var Qf={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const i2=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},r2=me.createContext({}),a2=()=>me.useContext(r2),l2=me.forwardRef(({color:e,size:n,strokeWidth:i,absoluteStrokeWidth:a,className:o="",children:s,iconNode:c,...f},d)=>{const{size:p=24,strokeWidth:g=2,absoluteStrokeWidth:y=!1,color:v="currentColor",className:b=""}=a2()??{},S=a??y?Number(i??g)*24/Number(n??p):i??g;return me.createElement("svg",{ref:d,...Qf,width:n??p??Qf.width,height:n??p??Qf.height,stroke:e??v,strokeWidth:S,className:Fv("lucide",b,o),...!s&&!i2(f)&&{"aria-hidden":"true"},...f},[...c.map(([k,O])=>me.createElement(k,O)),...Array.isArray(s)?s:[s]])});const Jt=(e,n)=>{const i=me.forwardRef(({className:a,...o},s)=>me.createElement(l2,{ref:s,iconNode:n,className:Fv(`lucide-${t2(My(e))}`,`lucide-${e}`,a),...o}));return i.displayName=My(e),i};const o2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],s2=Jt("check",o2);const u2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],c2=Jt("chevron-down",u2);const f2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],d2=Jt("chevron-right",f2);const h2=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],p2=Jt("chevrons-down-up",h2);const m2=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],g2=Jt("chevrons-up-down",m2);const y2=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],b2=Jt("eye-off",y2);const v2=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],_2=Jt("loader",v2);const S2=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]],Yv=Jt("message-square-plus",S2);const E2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],x2=Jt("panel-left",E2);const C2=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],w2=Jt("send",C2);const A2=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],k2=Jt("sparkles",A2);const T2=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],L2=Jt("trash-2",T2);const R2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],D2=Jt("x",R2);function O2({body:e,onChange:n,onSave:i,onCancel:a}){const o=me.useRef(null);me.useEffect(()=>{o.current?.focus()},[]);const s=c=>{c.key==="Enter"&&(c.metaKey||c.ctrlKey)&&(c.preventDefault(),i()),c.key==="Escape"&&(c.preventDefault(),a())};return te.jsxs("div",{className:"comment-editor",children:[te.jsx("textarea",{ref:o,className:"comment-input",value:e,onChange:c=>n(c.target.value),onKeyDown:s,placeholder:"Add a comment…",rows:2}),te.jsxs("div",{className:"comment-actions",children:[te.jsx("button",{type:"button",className:"btn ghost",onClick:a,children:"cancel"}),te.jsx("button",{type:"button",className:"btn primary",onClick:i,children:"comment"})]})]})}const N2=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,M2=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,I2={};function Iy(e,n){return(I2.jsx?M2:N2).test(e)}var na={},Zf,zy;function z2(){if(zy)return Zf;zy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
1875
- `,p="/",g="*",y="",v="comment",b="declaration";function S(O,A){if(typeof O!="string")throw new TypeError("First argument must be a string");if(!O)return[];A=A||{};var T=1,L=1;function U(J){var ee=J.match(n);ee&&(T+=ee.length);var z=J.lastIndexOf(d);L=~z?J.length-z:L+J.length}function B(){var J={line:T,column:L};return function(ee){return ee.position=new N(J),ie(),ee}}function N(J){this.start=J,this.end={line:T,column:L},this.source=A.source}N.prototype.content=O;function G(J){var ee=new Error(A.source+":"+T+":"+L+": "+J);if(ee.reason=J,ee.filename=A.source,ee.line=T,ee.column=L,ee.source=O,!A.silent)throw ee}function $(J){var ee=J.exec(O);if(ee){var z=ee[0];return U(z),O=O.slice(z.length),ee}}function ie(){$(i)}function ne(J){var ee;for(J=J||[];ee=K();)ee!==!1&&J.push(ee);return J}function K(){var J=B();if(!(p!=O.charAt(0)||g!=O.charAt(1))){for(var ee=2;y!=O.charAt(ee)&&(g!=O.charAt(ee)||p!=O.charAt(ee+1));)++ee;if(ee+=2,y===O.charAt(ee-1))return G("End of comment missing");var z=O.slice(2,ee-2);return L+=2,U(z),O=O.slice(ee),L+=2,J({type:v,comment:z})}}function W(){var J=B(),ee=$(a);if(ee){if(K(),!$(o))return G("property missing ':'");var z=$(s),Y=J({type:b,property:k(ee[0].replace(e,y)),value:z?k(z[0].replace(e,y)):y});return $(c),Y}}function ue(){var J=[];ne(J);for(var ee;ee=W();)ee!==!1&&(J.push(ee),ne(J));return J}return ie(),ue()}function k(O){return O?O.replace(f,y):y}return Zf=S,Zf}var Uy;function U2(){if(Uy)return na;Uy=1;var e=na&&na.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(na,"__esModule",{value:!0}),na.default=i;const n=e(z2());function i(a,o){let s=null;if(!a||typeof a!="string")return s;const c=(0,n.default)(a),f=typeof o=="function";return c.forEach(d=>{if(d.type!=="declaration")return;const{property:p,value:g}=d;f?o(p,g,d):g&&(s=s||{},s[p]=g)}),s}return na}var yl={},Hy;function H2(){if(Hy)return yl;Hy=1,Object.defineProperty(yl,"__esModule",{value:!0}),yl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,i=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(p){return!p||i.test(p)||e.test(p)},c=function(p,g){return g.toUpperCase()},f=function(p,g){return"".concat(g,"-")},d=function(p,g){return g===void 0&&(g={}),s(p)?p:(p=p.toLowerCase(),g.reactCompat?p=p.replace(o,f):p=p.replace(a,f),p.replace(n,c))};return yl.camelCase=d,yl}var bl,Py;function P2(){if(Py)return bl;Py=1;var e=bl&&bl.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},n=e(U2()),i=H2();function a(o,s){var c={};return!o||typeof o!="string"||(0,n.default)(o,function(f,d){f&&d&&(c[(0,i.camelCase)(f,s)]=d)}),c}return a.default=a,bl=a,bl}var B2=P2();const V2=vb(B2),Xv=Qv("end"),ih=Qv("start");function Qv(e){return n;function n(i){const a=i&&i.position&&i.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function j2(e){const n=ih(e),i=Xv(e);if(n&&i)return{start:n,end:i}}function Cl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?By(e.position):"start"in e||"end"in e?By(e):"line"in e||"column"in e?Dd(e):""}function Dd(e){return Vy(e&&e.line)+":"+Vy(e&&e.column)}function By(e){return Dd(e&&e.start)+"-"+Dd(e&&e.end)}function Vy(e){return e&&typeof e=="number"?e:1}class kt extends Error{constructor(n,i,a){super(),typeof i=="string"&&(a=i,i=void 0);let o="",s={},c=!1;if(i&&("line"in i&&"column"in i?s={place:i}:"start"in i&&"end"in i?s={place:i}:"type"in i?s={ancestors:[i],place:i.position}:s={...i}),typeof n=="string"?o=n:!s.cause&&n&&(c=!0,o=n.message,s.cause=n),!s.ruleId&&!s.source&&typeof a=="string"){const d=a.indexOf(":");d===-1?s.ruleId=a:(s.source=a.slice(0,d),s.ruleId=a.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const f=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=Cl(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}kt.prototype.file="";kt.prototype.name="";kt.prototype.reason="";kt.prototype.message="";kt.prototype.stack="";kt.prototype.column=void 0;kt.prototype.line=void 0;kt.prototype.ancestors=void 0;kt.prototype.cause=void 0;kt.prototype.fatal=void 0;kt.prototype.place=void 0;kt.prototype.ruleId=void 0;kt.prototype.source=void 0;const rh={}.hasOwnProperty,G2=new Map,q2=/[A-Z]/g,$2=new Set(["table","tbody","thead","tfoot","tr"]),F2=new Set(["td","th"]),Zv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Y2(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=n.filePath||void 0;let a;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=tL(i,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=eL(i,n.jsx,n.jsxs)}const o={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:a,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Ul:Fb,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},s=Kv(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function Kv(e,n,i){if(n.type==="element")return X2(e,n,i);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Q2(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return K2(e,n,i);if(n.type==="mdxjsEsm")return Z2(e,n);if(n.type==="root")return W2(e,n,i);if(n.type==="text")return J2(e,n)}function X2(e,n,i){const a=e.schema;let o=a;n.tagName.toLowerCase()==="svg"&&a.space==="html"&&(o=Ul,e.schema=o),e.ancestors.push(n);const s=Jv(e,n.tagName,!1),c=nL(e,n);let f=lh(e,n);return $2.has(n.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!js(d):!0})),Wv(e,c,s,n),ah(c,f),e.ancestors.pop(),e.schema=a,e.create(n,s,c,i)}function Q2(e,n){if(n.data&&n.data.estree&&e.evaluater){const a=n.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}Ml(e,n.position)}function Z2(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Ml(e,n.position)}function K2(e,n,i){const a=e.schema;let o=a;n.name==="svg"&&a.space==="html"&&(o=Ul,e.schema=o),e.ancestors.push(n);const s=n.name===null?e.Fragment:Jv(e,n.name,!0),c=iL(e,n),f=lh(e,n);return Wv(e,c,s,n),ah(c,f),e.ancestors.pop(),e.schema=a,e.create(n,s,c,i)}function W2(e,n,i){const a={};return ah(a,lh(e,n)),e.create(n,e.Fragment,a,i)}function J2(e,n){return n.value}function Wv(e,n,i,a){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(n.node=a)}function ah(e,n){if(n.length>0){const i=n.length>1?n:n[0];i&&(e.children=i)}}function eL(e,n,i){return a;function a(o,s,c,f){const p=Array.isArray(c.children)?i:n;return f?p(s,c,f):p(s,c)}}function tL(e,n){return i;function i(a,o,s,c){const f=Array.isArray(s.children),d=ih(a);return n(o,s,c,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function nL(e,n){const i={};let a,o;for(o in n.properties)if(o!=="children"&&rh.call(n.properties,o)){const s=rL(e,o,n.properties[o]);if(s){const[c,f]=s;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&F2.has(n.tagName)?a=f:i[c]=f}}if(a){const s=i.style||(i.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return i}function iL(e,n){const i={};for(const a of n.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const s=a.data.estree.body[0];s.type;const c=s.expression;c.type;const f=c.properties[0];f.type,Object.assign(i,e.evaluater.evaluateExpression(f.argument))}else Ml(e,n.position);else{const o=a.name;let s;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,s=e.evaluater.evaluateExpression(f.expression)}else Ml(e,n.position);else s=a.value===null?!0:a.value;i[o]=s}return i}function lh(e,n){const i=[];let a=-1;const o=e.passKeys?new Map:G2;for(;++a<n.children.length;){const s=n.children[a];let c;if(e.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const p=o.get(d)||0;c=d+"-"+p,o.set(d,p+1)}}const f=Kv(e,s,c);f!==void 0&&i.push(f)}return i}function rL(e,n,i){const a=$b(e.schema,n);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=a.commaSeparated?Xb(i):Qb(i)),a.property==="style"){let o=typeof i=="object"?i:aL(e,String(i));return e.stylePropertyNameCase==="css"&&(o=lL(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&a.space?sx[a.property]||a.property:a.attribute,i]}}function aL(e,n){try{return V2(n,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const a=i,o=new kt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Zv+"#cannot-parse-style-attribute",o}}function Jv(e,n,i){let a;if(!i)a={type:"Literal",value:n};else if(n.includes(".")){const o=n.split(".");let s=-1,c;for(;++s<o.length;){const f=Iy(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}a=c}else a=Iy(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(a.type==="Literal"){const o=a.value;return rh.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(a);Ml(e)}function Ml(e,n){const i=new kt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Zv+"#cannot-handle-mdx-estrees-without-createevaluater",i}function lL(e){const n={};let i;for(i in e)rh.call(e,i)&&(n[oL(i)]=e[i]);return n}function oL(e){let n=e.replace(q2,sL);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function sL(e){return"-"+e.toLowerCase()}const Kf={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"]},uL={};function cL(e,n){const i=uL,a=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return e1(e,a,o)}function e1(e,n,i){if(fL(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return jy(e.children,n,i)}return Array.isArray(e)?jy(e,n,i):""}function jy(e,n,i){const a=[];let o=-1;for(;++o<e.length;)a[o]=e1(e[o],n,i);return a.join("")}function fL(e){return!!(e&&typeof e=="object")}const Gy=document.createElement("i");function oh(e){const n="&"+e+";";Gy.innerHTML=n;const i=Gy.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===n?!1:i}function Mn(e,n,i,a){const o=e.length;let s=0,c;if(n<0?n=-n>o?0:o+n:n=n>o?o:n,i=i>0?i:0,a.length<1e4)c=Array.from(a),c.unshift(n,i),e.splice(...c);else for(i&&e.splice(n,i);s<a.length;)c=a.slice(s,s+1e4),c.unshift(n,0),e.splice(...c),s+=1e4,n+=1e4}function dn(e,n){return e.length>0?(Mn(e,e.length,0,n),e):n}const qy={}.hasOwnProperty;function dL(e){const n={};let i=-1;for(;++i<e.length;)hL(n,e[i]);return n}function hL(e,n){let i;for(i in n){const o=(qy.call(e,i)?e[i]:void 0)||(e[i]={}),s=n[i];let c;if(s)for(c in s){qy.call(o,c)||(o[c]=[]);const f=s[c];pL(o[c],Array.isArray(f)?f:f?[f]:[])}}}function pL(e,n){let i=-1;const a=[];for(;++i<n.length;)(n[i].add==="after"?e:a).push(n[i]);Mn(e,0,0,a)}function t1(e,n){const i=Number.parseInt(e,n);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function fa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const On=zi(/[A-Za-z]/),Wt=zi(/[\dA-Za-z]/),mL=zi(/[#-'*+\--9=?A-Z^-~]/);function Od(e){return e!==null&&(e<32||e===127)}const Nd=zi(/\d/),gL=zi(/[\dA-Fa-f]/),yL=zi(/[!-/:-@[-`{-~]/);function ve(e){return e!==null&&e<-2}function Vt(e){return e!==null&&(e<0||e===32)}function Ue(e){return e===-2||e===-1||e===32}const bL=zi(new RegExp("\\p{P}|\\p{S}","u")),vL=zi(/\s/);function zi(e){return n;function n(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function va(e){const n=[];let i=-1,a=0,o=0;for(;++i<e.length;){const s=e.charCodeAt(i);let c="";if(s===37&&Wt(e.charCodeAt(i+1))&&Wt(e.charCodeAt(i+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const f=e.charCodeAt(i+1);s<56320&&f>56319&&f<57344?(c=String.fromCharCode(s,f),o=1):c="�"}else c=String.fromCharCode(s);c&&(n.push(e.slice(a,i),encodeURIComponent(c)),a=i+o+1,c=""),o&&(i+=o,o=0)}return n.join("")+e.slice(a)}function Ye(e,n,i,a){const o=a?a-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(d){return Ue(d)?(e.enter(i),f(d)):n(d)}function f(d){return Ue(d)&&s++<o?(e.consume(d),f):(e.exit(i),n(d))}}const _L={tokenize:SL};function SL(e){const n=e.attempt(this.parser.constructs.contentInitial,a,o);let i;return n;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ye(e,n,"linePrefix")}function o(f){return e.enter("paragraph"),s(f)}function s(f){const d=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=d),i=d,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return ve(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),c)}}const EL={tokenize:xL},$y={tokenize:CL};function xL(e){const n=this,i=[];let a=0,o,s,c;return f;function f(L){if(a<i.length){const U=i[a];return n.containerState=U[1],e.attempt(U[0].continuation,d,p)(L)}return p(L)}function d(L){if(a++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,o&&T();const U=n.events.length;let B=U,N;for(;B--;)if(n.events[B][0]==="exit"&&n.events[B][1].type==="chunkFlow"){N=n.events[B][1].end;break}A(a);let G=U;for(;G<n.events.length;)n.events[G][1].end={...N},G++;return Mn(n.events,B+1,0,n.events.slice(U)),n.events.length=G,p(L)}return f(L)}function p(L){if(a===i.length){if(!o)return v(L);if(o.currentConstruct&&o.currentConstruct.concrete)return S(L);n.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return n.containerState={},e.check($y,g,y)(L)}function g(L){return o&&T(),A(a),v(L)}function y(L){return n.parser.lazy[n.now().line]=a!==i.length,c=n.now().offset,S(L)}function v(L){return n.containerState={},e.attempt($y,b,S)(L)}function b(L){return a++,i.push([n.currentConstruct,n.containerState]),v(L)}function S(L){if(L===null){o&&T(),A(0),e.consume(L);return}return o=o||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),k(L)}function k(L){if(L===null){O(e.exit("chunkFlow"),!0),A(0),e.consume(L);return}return ve(L)?(e.consume(L),O(e.exit("chunkFlow")),a=0,n.interrupt=void 0,f):(e.consume(L),k)}function O(L,U){const B=n.sliceStream(L);if(U&&B.push(null),L.previous=s,s&&(s.next=L),s=L,o.defineSkip(L.start),o.write(B),n.parser.lazy[L.start.line]){let N=o.events.length;for(;N--;)if(o.events[N][1].start.offset<c&&(!o.events[N][1].end||o.events[N][1].end.offset>c))return;const G=n.events.length;let $=G,ie,ne;for(;$--;)if(n.events[$][0]==="exit"&&n.events[$][1].type==="chunkFlow"){if(ie){ne=n.events[$][1].end;break}ie=!0}for(A(a),N=G;N<n.events.length;)n.events[N][1].end={...ne},N++;Mn(n.events,$+1,0,n.events.slice(G)),n.events.length=N}}function A(L){let U=i.length;for(;U-- >L;){const B=i[U];n.containerState=B[1],B[0].exit.call(n,e)}i.length=L}function T(){o.write([null]),s=void 0,o=void 0,n.containerState._closeFlow=void 0}}function CL(e,n,i){return Ye(e,e.attempt(this.parser.constructs.document,n,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fy(e){if(e===null||Vt(e)||vL(e))return 1;if(bL(e))return 2}function sh(e,n,i){const a=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!a.includes(s)&&(n=s(n,i),a.push(s))}return n}const Md={name:"attention",resolveAll:wL,tokenize:AL};function wL(e,n){let i=-1,a,o,s,c,f,d,p,g;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(a=i;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&n.sliceSerialize(e[a][1]).charCodeAt(0)===n.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[a][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;d=e[a][1].end.offset-e[a][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const y={...e[a][1].end},v={...e[i][1].start};Yy(y,-d),Yy(v,d),c={type:d>1?"strongSequence":"emphasisSequence",start:y,end:{...e[a][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:v},s={type:d>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[i][1].start}},o={type:d>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[a][1].end={...c.start},e[i][1].start={...f.end},p=[],e[a][1].end.offset-e[a][1].start.offset&&(p=dn(p,[["enter",e[a][1],n],["exit",e[a][1],n]])),p=dn(p,[["enter",o,n],["enter",c,n],["exit",c,n],["enter",s,n]]),p=dn(p,sh(n.parser.constructs.insideSpan.null,e.slice(a+1,i),n)),p=dn(p,[["exit",s,n],["enter",f,n],["exit",f,n],["exit",o,n]]),e[i][1].end.offset-e[i][1].start.offset?(g=2,p=dn(p,[["enter",e[i][1],n],["exit",e[i][1],n]])):g=0,Mn(e,a-1,i-a+3,p),i=a+p.length-g-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function AL(e,n){const i=this.parser.constructs.attentionMarkers.null,a=this.previous,o=Fy(a);let s;return c;function c(d){return s=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===s)return e.consume(d),f;const p=e.exit("attentionSequence"),g=Fy(d),y=!g||g===2&&o||i.includes(d),v=!o||o===2&&g||i.includes(a);return p._open=!!(s===42?y:y&&(o||!v)),p._close=!!(s===42?v:v&&(g||!y)),n(d)}}function Yy(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const kL={name:"autolink",tokenize:TL};function TL(e,n,i){let a=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(b){return On(b)?(e.consume(b),c):b===64?i(b):p(b)}function c(b){return b===43||b===45||b===46||Wt(b)?(a=1,f(b)):p(b)}function f(b){return b===58?(e.consume(b),a=0,d):(b===43||b===45||b===46||Wt(b))&&a++<32?(e.consume(b),f):(a=0,p(b))}function d(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):b===null||b===32||b===60||Od(b)?i(b):(e.consume(b),d)}function p(b){return b===64?(e.consume(b),g):mL(b)?(e.consume(b),p):i(b)}function g(b){return Wt(b)?y(b):i(b)}function y(b){return b===46?(e.consume(b),a=0,g):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):v(b)}function v(b){if((b===45||Wt(b))&&a++<63){const S=b===45?v:y;return e.consume(b),S}return i(b)}}const Ws={partial:!0,tokenize:LL};function LL(e,n,i){return a;function a(s){return Ue(s)?Ye(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||ve(s)?n(s):i(s)}}const n1={continuation:{tokenize:DL},exit:OL,name:"blockQuote",tokenize:RL};function RL(e,n,i){const a=this;return o;function o(c){if(c===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),s}return i(c)}function s(c){return Ue(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function DL(e,n,i){const a=this;return o;function o(c){return Ue(c)?Ye(e,s,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return e.attempt(n1,n,i)(c)}}function OL(e){e.exit("blockQuote")}const i1={name:"characterEscape",tokenize:NL};function NL(e,n,i){return a;function a(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return yL(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):i(s)}}const r1={name:"characterReference",tokenize:ML};function ML(e,n,i){const a=this;let o=0,s,c;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),d}function d(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),s=31,c=Wt,g(y))}function p(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,c=gL,g):(e.enter("characterReferenceValue"),s=7,c=Nd,g(y))}function g(y){if(y===59&&o){const v=e.exit("characterReferenceValue");return c===Wt&&!oh(a.sliceSerialize(v))?i(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return c(y)&&o++<s?(e.consume(y),g):i(y)}}const Xy={partial:!0,tokenize:zL},Qy={concrete:!0,name:"codeFenced",tokenize:IL};function IL(e,n,i){const a=this,o={partial:!0,tokenize:B};let s=0,c=0,f;return d;function d(N){return p(N)}function p(N){const G=a.events[a.events.length-1];return s=G&&G[1].type==="linePrefix"?G[2].sliceSerialize(G[1],!0).length:0,f=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(N)}function g(N){return N===f?(c++,e.consume(N),g):c<3?i(N):(e.exit("codeFencedFenceSequence"),Ue(N)?Ye(e,y,"whitespace")(N):y(N))}function y(N){return N===null||ve(N)?(e.exit("codeFencedFence"),a.interrupt?n(N):e.check(Xy,k,U)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(N))}function v(N){return N===null||ve(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(N)):Ue(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ye(e,b,"whitespace")(N)):N===96&&N===f?i(N):(e.consume(N),v)}function b(N){return N===null||ve(N)?y(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(N))}function S(N){return N===null||ve(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(N)):N===96&&N===f?i(N):(e.consume(N),S)}function k(N){return e.attempt(o,U,O)(N)}function O(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),A}function A(N){return s>0&&Ue(N)?Ye(e,T,"linePrefix",s+1)(N):T(N)}function T(N){return N===null||ve(N)?e.check(Xy,k,U)(N):(e.enter("codeFlowValue"),L(N))}function L(N){return N===null||ve(N)?(e.exit("codeFlowValue"),T(N)):(e.consume(N),L)}function U(N){return e.exit("codeFenced"),n(N)}function B(N,G,$){let ie=0;return ne;function ne(ee){return N.enter("lineEnding"),N.consume(ee),N.exit("lineEnding"),K}function K(ee){return N.enter("codeFencedFence"),Ue(ee)?Ye(N,W,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ee):W(ee)}function W(ee){return ee===f?(N.enter("codeFencedFenceSequence"),ue(ee)):$(ee)}function ue(ee){return ee===f?(ie++,N.consume(ee),ue):ie>=c?(N.exit("codeFencedFenceSequence"),Ue(ee)?Ye(N,J,"whitespace")(ee):J(ee)):$(ee)}function J(ee){return ee===null||ve(ee)?(N.exit("codeFencedFence"),G(ee)):$(ee)}}}function zL(e,n,i){const a=this;return o;function o(c){return c===null?i(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s)}function s(c){return a.parser.lazy[a.now().line]?i(c):n(c)}}const Wf={name:"codeIndented",tokenize:HL},UL={partial:!0,tokenize:PL};function HL(e,n,i){const a=this;return o;function o(p){return e.enter("codeIndented"),Ye(e,s,"linePrefix",5)(p)}function s(p){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(p):i(p)}function c(p){return p===null?d(p):ve(p)?e.attempt(UL,c,d)(p):(e.enter("codeFlowValue"),f(p))}function f(p){return p===null||ve(p)?(e.exit("codeFlowValue"),c(p)):(e.consume(p),f)}function d(p){return e.exit("codeIndented"),n(p)}}function PL(e,n,i){const a=this;return o;function o(c){return a.parser.lazy[a.now().line]?i(c):ve(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):Ye(e,s,"linePrefix",5)(c)}function s(c){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):ve(c)?o(c):i(c)}}const BL={name:"codeText",previous:jL,resolve:VL,tokenize:GL};function VL(e){let n=e.length-4,i=3,a,o;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(a=i;++a<n;)if(e[a][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[n][1].type="codeTextPadding",i+=2,n-=2;break}}for(a=i-1,n++;++a<=n;)o===void 0?a!==n&&e[a][1].type!=="lineEnding"&&(o=a):(a===n||e[a][1].type==="lineEnding")&&(e[o][1].type="codeTextData",a!==o+2&&(e[o][1].end=e[a-1][1].end,e.splice(o+2,a-o-2),n-=a-o-2,a=o+2),o=void 0);return e}function jL(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function GL(e,n,i){let a=0,o,s;return c;function c(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),a++,f):(e.exit("codeTextSequence"),d(y))}function d(y){return y===null?i(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),d):y===96?(s=e.enter("codeTextSequence"),o=0,g(y)):ve(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),d):(e.enter("codeTextData"),p(y))}function p(y){return y===null||y===32||y===96||ve(y)?(e.exit("codeTextData"),d(y)):(e.consume(y),p)}function g(y){return y===96?(e.consume(y),o++,g):o===a?(e.exit("codeTextSequence"),e.exit("codeText"),n(y)):(s.type="codeTextData",p(y))}}class qL{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,i){const a=i??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(n,a):n>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(n,i,a){const o=i||0;this.setCursor(Math.trunc(n));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return a&&vl(this.left,a),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),vl(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),vl(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const i=this.left.splice(n,Number.POSITIVE_INFINITY);vl(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);vl(this.left,i.reverse())}}}function vl(e,n){let i=0;if(n.length<1e4)e.push(...n);else for(;i<n.length;)e.push(...n.slice(i,i+1e4)),i+=1e4}function a1(e){const n={};let i=-1,a,o,s,c,f,d,p;const g=new qL(e);for(;++i<g.length;){for(;i in n;)i=n[i];if(a=g.get(i),i&&a[1].type==="chunkFlow"&&g.get(i-1)[1].type==="listItemPrefix"&&(d=a[1]._tokenizer.events,s=0,s<d.length&&d[s][1].type==="lineEndingBlank"&&(s+=2),s<d.length&&d[s][1].type==="content"))for(;++s<d.length&&d[s][1].type!=="content";)d[s][1].type==="chunkText"&&(d[s][1]._isInFirstContentOfListItem=!0,s++);if(a[0]==="enter")a[1].contentType&&(Object.assign(n,$L(g,i)),i=n[i],p=!0);else if(a[1]._container){for(s=i,o=void 0;s--;)if(c=g.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(g.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(a[1].end={...g.get(o)[1].start},f=g.slice(o,i),f.unshift(a),g.splice(o,i-o+1,f))}}return Mn(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!p}function $L(e,n){const i=e.get(n)[1],a=e.get(n)[2];let o=n-1;const s=[];let c=i._tokenizer;c||(c=a.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,d=[],p={};let g,y,v=-1,b=i,S=0,k=0;const O=[k];for(;b;){for(;e.get(++o)[1]!==b;);s.push(o),b._tokenizer||(g=a.sliceStream(b),b.next||g.push(null),y&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=b,b=b.next}for(b=i;++v<f.length;)f[v][0]==="exit"&&f[v-1][0]==="enter"&&f[v][1].type===f[v-1][1].type&&f[v][1].start.line!==f[v][1].end.line&&(k=v+1,O.push(k),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):O.pop(),v=O.length;v--;){const A=f.slice(O[v],O[v+1]),T=s.pop();d.push([T,T+A.length-1]),e.splice(T,2,A)}for(d.reverse(),v=-1;++v<d.length;)p[S+d[v][0]]=S+d[v][1],S+=d[v][1]-d[v][0]-1;return p}const FL={resolve:XL,tokenize:QL},YL={partial:!0,tokenize:ZL};function XL(e){return a1(e),e}function QL(e,n){let i;return a;function a(f){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?s(f):ve(f)?e.check(YL,c,s)(f):(e.consume(f),o)}function s(f){return e.exit("chunkContent"),e.exit("content"),n(f)}function c(f){return e.consume(f),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}function ZL(e,n,i){const a=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ye(e,s,"linePrefix")}function s(c){if(c===null||ve(c))return i(c);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):e.interrupt(a.parser.constructs.flow,i,n)(c)}}function l1(e,n,i,a,o,s,c,f,d){const p=d||Number.POSITIVE_INFINITY;let g=0;return y;function y(A){return A===60?(e.enter(a),e.enter(o),e.enter(s),e.consume(A),e.exit(s),v):A===null||A===32||A===41||Od(A)?i(A):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),k(A))}function v(A){return A===62?(e.enter(s),e.consume(A),e.exit(s),e.exit(o),e.exit(a),n):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===62?(e.exit("chunkString"),e.exit(f),v(A)):A===null||A===60||ve(A)?i(A):(e.consume(A),A===92?S:b)}function S(A){return A===60||A===62||A===92?(e.consume(A),b):b(A)}function k(A){return!g&&(A===null||A===41||Vt(A))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),n(A)):g<p&&A===40?(e.consume(A),g++,k):A===41?(e.consume(A),g--,k):A===null||A===32||A===40||Od(A)?i(A):(e.consume(A),A===92?O:k)}function O(A){return A===40||A===41||A===92?(e.consume(A),k):k(A)}}function o1(e,n,i,a,o,s){const c=this;let f=0,d;return p;function p(b){return e.enter(a),e.enter(o),e.consume(b),e.exit(o),e.enter(s),g}function g(b){return f>999||b===null||b===91||b===93&&!d||b===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?i(b):b===93?(e.exit(s),e.enter(o),e.consume(b),e.exit(o),e.exit(a),n):ve(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||b===91||b===93||ve(b)||f++>999?(e.exit("chunkString"),g(b)):(e.consume(b),d||(d=!Ue(b)),b===92?v:y)}function v(b){return b===91||b===92||b===93?(e.consume(b),f++,y):y(b)}}function s1(e,n,i,a,o,s){let c;return f;function f(v){return v===34||v===39||v===40?(e.enter(a),e.enter(o),e.consume(v),e.exit(o),c=v===40?41:v,d):i(v)}function d(v){return v===c?(e.enter(o),e.consume(v),e.exit(o),e.exit(a),n):(e.enter(s),p(v))}function p(v){return v===c?(e.exit(s),d(c)):v===null?i(v):ve(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Ye(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===c||v===null||ve(v)?(e.exit("chunkString"),p(v)):(e.consume(v),v===92?y:g)}function y(v){return v===c||v===92?(e.consume(v),g):g(v)}}function wl(e,n){let i;return a;function a(o){return ve(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i=!0,a):Ue(o)?Ye(e,a,i?"linePrefix":"lineSuffix")(o):n(o)}}const KL={name:"definition",tokenize:JL},WL={partial:!0,tokenize:eR};function JL(e,n,i){const a=this;let o;return s;function s(b){return e.enter("definition"),c(b)}function c(b){return o1.call(a,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return o=fa(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),d):i(b)}function d(b){return Vt(b)?wl(e,p)(b):p(b)}function p(b){return l1(e,g,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function g(b){return e.attempt(WL,y,y)(b)}function y(b){return Ue(b)?Ye(e,v,"whitespace")(b):v(b)}function v(b){return b===null||ve(b)?(e.exit("definition"),a.parser.defined.push(o),n(b)):i(b)}}function eR(e,n,i){return a;function a(f){return Vt(f)?wl(e,o)(f):i(f)}function o(f){return s1(e,s,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return Ue(f)?Ye(e,c,"whitespace")(f):c(f)}function c(f){return f===null||ve(f)?n(f):i(f)}}const tR={name:"hardBreakEscape",tokenize:nR};function nR(e,n,i){return a;function a(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return ve(s)?(e.exit("hardBreakEscape"),n(s)):i(s)}}const iR={name:"headingAtx",resolve:rR,tokenize:aR};function rR(e,n){let i=e.length-2,a=3,o,s;return e[a][1].type==="whitespace"&&(a+=2),i-2>a&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(a===i-1||i-4>a&&e[i-2][1].type==="whitespace")&&(i-=a+1===i?2:4),i>a&&(o={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},s={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},Mn(e,a,i-a+1,[["enter",o,n],["enter",s,n],["exit",s,n],["exit",o,n]])),e}function aR(e,n,i){let a=0;return o;function o(g){return e.enter("atxHeading"),s(g)}function s(g){return e.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&a++<6?(e.consume(g),c):g===null||Vt(g)?(e.exit("atxHeadingSequence"),f(g)):i(g)}function f(g){return g===35?(e.enter("atxHeadingSequence"),d(g)):g===null||ve(g)?(e.exit("atxHeading"),n(g)):Ue(g)?Ye(e,f,"whitespace")(g):(e.enter("atxHeadingText"),p(g))}function d(g){return g===35?(e.consume(g),d):(e.exit("atxHeadingSequence"),f(g))}function p(g){return g===null||g===35||Vt(g)?(e.exit("atxHeadingText"),f(g)):(e.consume(g),p)}}const lR=["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"],Zy=["pre","script","style","textarea"],oR={concrete:!0,name:"htmlFlow",resolveTo:cR,tokenize:fR},sR={partial:!0,tokenize:hR},uR={partial:!0,tokenize:dR};function cR(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function fR(e,n,i){const a=this;let o,s,c,f,d;return p;function p(w){return g(w)}function g(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),y}function y(w){return w===33?(e.consume(w),v):w===47?(e.consume(w),s=!0,k):w===63?(e.consume(w),o=3,a.interrupt?n:x):On(w)?(e.consume(w),c=String.fromCharCode(w),O):i(w)}function v(w){return w===45?(e.consume(w),o=2,b):w===91?(e.consume(w),o=5,f=0,S):On(w)?(e.consume(w),o=4,a.interrupt?n:x):i(w)}function b(w){return w===45?(e.consume(w),a.interrupt?n:x):i(w)}function S(w){const le="CDATA[";return w===le.charCodeAt(f++)?(e.consume(w),f===le.length?a.interrupt?n:W:S):i(w)}function k(w){return On(w)?(e.consume(w),c=String.fromCharCode(w),O):i(w)}function O(w){if(w===null||w===47||w===62||Vt(w)){const le=w===47,he=c.toLowerCase();return!le&&!s&&Zy.includes(he)?(o=1,a.interrupt?n(w):W(w)):lR.includes(c.toLowerCase())?(o=6,le?(e.consume(w),A):a.interrupt?n(w):W(w)):(o=7,a.interrupt&&!a.parser.lazy[a.now().line]?i(w):s?T(w):L(w))}return w===45||Wt(w)?(e.consume(w),c+=String.fromCharCode(w),O):i(w)}function A(w){return w===62?(e.consume(w),a.interrupt?n:W):i(w)}function T(w){return Ue(w)?(e.consume(w),T):ne(w)}function L(w){return w===47?(e.consume(w),ne):w===58||w===95||On(w)?(e.consume(w),U):Ue(w)?(e.consume(w),L):ne(w)}function U(w){return w===45||w===46||w===58||w===95||Wt(w)?(e.consume(w),U):B(w)}function B(w){return w===61?(e.consume(w),N):Ue(w)?(e.consume(w),B):L(w)}function N(w){return w===null||w===60||w===61||w===62||w===96?i(w):w===34||w===39?(e.consume(w),d=w,G):Ue(w)?(e.consume(w),N):$(w)}function G(w){return w===d?(e.consume(w),d=null,ie):w===null||ve(w)?i(w):(e.consume(w),G)}function $(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||Vt(w)?B(w):(e.consume(w),$)}function ie(w){return w===47||w===62||Ue(w)?L(w):i(w)}function ne(w){return w===62?(e.consume(w),K):i(w)}function K(w){return w===null||ve(w)?W(w):Ue(w)?(e.consume(w),K):i(w)}function W(w){return w===45&&o===2?(e.consume(w),z):w===60&&o===1?(e.consume(w),Y):w===62&&o===4?(e.consume(w),R):w===63&&o===3?(e.consume(w),x):w===93&&o===5?(e.consume(w),de):ve(w)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(sR,V,ue)(w)):w===null||ve(w)?(e.exit("htmlFlowData"),ue(w)):(e.consume(w),W)}function ue(w){return e.check(uR,J,V)(w)}function J(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),ee}function ee(w){return w===null||ve(w)?ue(w):(e.enter("htmlFlowData"),W(w))}function z(w){return w===45?(e.consume(w),x):W(w)}function Y(w){return w===47?(e.consume(w),c="",ae):W(w)}function ae(w){if(w===62){const le=c.toLowerCase();return Zy.includes(le)?(e.consume(w),R):W(w)}return On(w)&&c.length<8?(e.consume(w),c+=String.fromCharCode(w),ae):W(w)}function de(w){return w===93?(e.consume(w),x):W(w)}function x(w){return w===62?(e.consume(w),R):w===45&&o===2?(e.consume(w),x):W(w)}function R(w){return w===null||ve(w)?(e.exit("htmlFlowData"),V(w)):(e.consume(w),R)}function V(w){return e.exit("htmlFlow"),n(w)}}function dR(e,n,i){const a=this;return o;function o(c){return ve(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):i(c)}function s(c){return a.parser.lazy[a.now().line]?i(c):n(c)}}function hR(e,n,i){return a;function a(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ws,n,i)}}const pR={name:"htmlText",tokenize:mR};function mR(e,n,i){const a=this;let o,s,c;return f;function f(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),d}function d(x){return x===33?(e.consume(x),p):x===47?(e.consume(x),B):x===63?(e.consume(x),L):On(x)?(e.consume(x),$):i(x)}function p(x){return x===45?(e.consume(x),g):x===91?(e.consume(x),s=0,S):On(x)?(e.consume(x),T):i(x)}function g(x){return x===45?(e.consume(x),b):i(x)}function y(x){return x===null?i(x):x===45?(e.consume(x),v):ve(x)?(c=y,Y(x)):(e.consume(x),y)}function v(x){return x===45?(e.consume(x),b):y(x)}function b(x){return x===62?z(x):x===45?v(x):y(x)}function S(x){const R="CDATA[";return x===R.charCodeAt(s++)?(e.consume(x),s===R.length?k:S):i(x)}function k(x){return x===null?i(x):x===93?(e.consume(x),O):ve(x)?(c=k,Y(x)):(e.consume(x),k)}function O(x){return x===93?(e.consume(x),A):k(x)}function A(x){return x===62?z(x):x===93?(e.consume(x),A):k(x)}function T(x){return x===null||x===62?z(x):ve(x)?(c=T,Y(x)):(e.consume(x),T)}function L(x){return x===null?i(x):x===63?(e.consume(x),U):ve(x)?(c=L,Y(x)):(e.consume(x),L)}function U(x){return x===62?z(x):L(x)}function B(x){return On(x)?(e.consume(x),N):i(x)}function N(x){return x===45||Wt(x)?(e.consume(x),N):G(x)}function G(x){return ve(x)?(c=G,Y(x)):Ue(x)?(e.consume(x),G):z(x)}function $(x){return x===45||Wt(x)?(e.consume(x),$):x===47||x===62||Vt(x)?ie(x):i(x)}function ie(x){return x===47?(e.consume(x),z):x===58||x===95||On(x)?(e.consume(x),ne):ve(x)?(c=ie,Y(x)):Ue(x)?(e.consume(x),ie):z(x)}function ne(x){return x===45||x===46||x===58||x===95||Wt(x)?(e.consume(x),ne):K(x)}function K(x){return x===61?(e.consume(x),W):ve(x)?(c=K,Y(x)):Ue(x)?(e.consume(x),K):ie(x)}function W(x){return x===null||x===60||x===61||x===62||x===96?i(x):x===34||x===39?(e.consume(x),o=x,ue):ve(x)?(c=W,Y(x)):Ue(x)?(e.consume(x),W):(e.consume(x),J)}function ue(x){return x===o?(e.consume(x),o=void 0,ee):x===null?i(x):ve(x)?(c=ue,Y(x)):(e.consume(x),ue)}function J(x){return x===null||x===34||x===39||x===60||x===61||x===96?i(x):x===47||x===62||Vt(x)?ie(x):(e.consume(x),J)}function ee(x){return x===47||x===62||Vt(x)?ie(x):i(x)}function z(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),n):i(x)}function Y(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),ae}function ae(x){return Ue(x)?Ye(e,de,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):de(x)}function de(x){return e.enter("htmlTextData"),c(x)}}const uh={name:"labelEnd",resolveAll:vR,resolveTo:_R,tokenize:SR},gR={tokenize:ER},yR={tokenize:xR},bR={tokenize:CR};function vR(e){let n=-1;const i=[];for(;++n<e.length;){const a=e[n][1];if(i.push(e[n]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const o=a.type==="labelImage"?4:2;a.type="data",n+=o}}return e.length!==i.length&&Mn(e,0,e.length,i),e}function _R(e,n){let i=e.length,a=0,o,s,c,f;for(;i--;)if(o=e[i][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[i][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[i][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=i,o.type!=="labelLink")){a=2;break}}else o.type==="labelEnd"&&(c=i);const d={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[s][1].start},end:{...e[c][1].end}},g={type:"labelText",start:{...e[s+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",d,n],["enter",p,n]],f=dn(f,e.slice(s+1,s+a+3)),f=dn(f,[["enter",g,n]]),f=dn(f,sh(n.parser.constructs.insideSpan.null,e.slice(s+a+4,c-3),n)),f=dn(f,[["exit",g,n],e[c-2],e[c-1],["exit",p,n]]),f=dn(f,e.slice(c+1)),f=dn(f,[["exit",d,n]]),Mn(e,s,e.length,f),e}function SR(e,n,i){const a=this;let o=a.events.length,s,c;for(;o--;)if((a.events[o][1].type==="labelImage"||a.events[o][1].type==="labelLink")&&!a.events[o][1]._balanced){s=a.events[o][1];break}return f;function f(v){return s?s._inactive?y(v):(c=a.parser.defined.includes(fa(a.sliceSerialize({start:s.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),d):i(v)}function d(v){return v===40?e.attempt(gR,g,c?g:y)(v):v===91?e.attempt(yR,g,c?p:y)(v):c?g(v):y(v)}function p(v){return e.attempt(bR,g,y)(v)}function g(v){return n(v)}function y(v){return s._balanced=!0,i(v)}}function ER(e,n,i){return a;function a(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),o}function o(y){return Vt(y)?wl(e,s)(y):s(y)}function s(y){return y===41?g(y):l1(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Vt(y)?wl(e,d)(y):g(y)}function f(y){return i(y)}function d(y){return y===34||y===39||y===40?s1(e,p,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function p(y){return Vt(y)?wl(e,g)(y):g(y)}function g(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),n):i(y)}}function xR(e,n,i){const a=this;return o;function o(f){return o1.call(a,e,s,c,"reference","referenceMarker","referenceString")(f)}function s(f){return a.parser.defined.includes(fa(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?n(f):i(f)}function c(f){return i(f)}}function CR(e,n,i){return a;function a(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),o}function o(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),n):i(s)}}const wR={name:"labelStartImage",resolveAll:uh.resolveAll,tokenize:AR};function AR(e,n,i){const a=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),s}function s(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):i(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?i(f):n(f)}}const kR={name:"labelStartLink",resolveAll:uh.resolveAll,tokenize:TR};function TR(e,n,i){const a=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?i(c):n(c)}}const Jf={name:"lineEnding",tokenize:LR};function LR(e,n){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ye(e,n,"linePrefix")}}const ws={name:"thematicBreak",tokenize:RR};function RR(e,n,i){let a=0,o;return s;function s(p){return e.enter("thematicBreak"),c(p)}function c(p){return o=p,f(p)}function f(p){return p===o?(e.enter("thematicBreakSequence"),d(p)):a>=3&&(p===null||ve(p))?(e.exit("thematicBreak"),n(p)):i(p)}function d(p){return p===o?(e.consume(p),a++,d):(e.exit("thematicBreakSequence"),Ue(p)?Ye(e,f,"whitespace")(p):f(p))}}const Bt={continuation:{tokenize:MR},exit:zR,name:"list",tokenize:NR},DR={partial:!0,tokenize:UR},OR={partial:!0,tokenize:IR};function NR(e,n,i){const a=this,o=a.events[a.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return f;function f(b){const S=a.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!a.containerState.marker||b===a.containerState.marker:Nd(b)){if(a.containerState.type||(a.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(ws,i,p)(b):p(b);if(!a.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(b)}return i(b)}function d(b){return Nd(b)&&++c<10?(e.consume(b),d):(!a.interrupt||c<2)&&(a.containerState.marker?b===a.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),p(b)):i(b)}function p(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||b,e.check(Ws,a.interrupt?i:g,e.attempt(DR,v,y))}function g(b){return a.containerState.initialBlankLine=!0,s++,v(b)}function y(b){return Ue(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),v):i(b)}function v(b){return a.containerState.size=s+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(b)}}function MR(e,n,i){const a=this;return a.containerState._closeFlow=void 0,e.check(Ws,o,s);function o(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Ye(e,n,"listItemIndent",a.containerState.size+1)(f)}function s(f){return a.containerState.furtherBlankLines||!Ue(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(OR,n,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,Ye(e,e.attempt(Bt,n,i),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function IR(e,n,i){const a=this;return Ye(e,o,"listItemIndent",a.containerState.size+1);function o(s){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?n(s):i(s)}}function zR(e){e.exit(this.containerState.type)}function UR(e,n,i){const a=this;return Ye(e,o,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const c=a.events[a.events.length-1];return!Ue(s)&&c&&c[1].type==="listItemPrefixWhitespace"?n(s):i(s)}}const Ky={name:"setextUnderline",resolveTo:HR,tokenize:PR};function HR(e,n){let i=e.length,a,o,s;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){a=i;break}e[i][1].type==="paragraph"&&(o=i)}else e[i][1].type==="content"&&e.splice(i,1),!s&&e[i][1].type==="definition"&&(s=i);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",c,n]),e.splice(s+1,0,["exit",e[a][1],n]),e[a][1].end={...e[s][1].end}):e[a][1]=c,e.push(["exit",c,n]),e}function PR(e,n,i){const a=this;let o;return s;function s(p){let g=a.events.length,y;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){y=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||y)?(e.enter("setextHeadingLine"),o=p,c(p)):i(p)}function c(p){return e.enter("setextHeadingLineSequence"),f(p)}function f(p){return p===o?(e.consume(p),f):(e.exit("setextHeadingLineSequence"),Ue(p)?Ye(e,d,"lineSuffix")(p):d(p))}function d(p){return p===null||ve(p)?(e.exit("setextHeadingLine"),n(p)):i(p)}}const BR={tokenize:VR};function VR(e){const n=this,i=e.attempt(Ws,a,e.attempt(this.parser.constructs.flowInitial,o,Ye(e,e.attempt(this.parser.constructs.flow,o,e.attempt(FL,o)),"linePrefix")));return i;function a(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),n.currentConstruct=void 0,i}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n.currentConstruct=void 0,i}}const jR={resolveAll:c1()},GR=u1("string"),qR=u1("text");function u1(e){return{resolveAll:c1(e==="text"?$R:void 0),tokenize:n};function n(i){const a=this,o=this.parser.constructs[e],s=i.attempt(o,c,f);return c;function c(g){return p(g)?s(g):f(g)}function f(g){if(g===null){i.consume(g);return}return i.enter("data"),i.consume(g),d}function d(g){return p(g)?(i.exit("data"),s(g)):(i.consume(g),d)}function p(g){if(g===null)return!0;const y=o[g];let v=-1;if(y)for(;++v<y.length;){const b=y[v];if(!b.previous||b.previous.call(a,a.previous))return!0}return!1}}}function c1(e){return n;function n(i,a){let o=-1,s;for(;++o<=i.length;)s===void 0?i[o]&&i[o][1].type==="data"&&(s=o,o++):(!i[o]||i[o][1].type!=="data")&&(o!==s+2&&(i[s][1].end=i[o-1][1].end,i.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(i,a):i}}function $R(e,n){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const a=e[i-1][1],o=n.sliceStream(a);let s=o.length,c=-1,f=0,d;for(;s--;){const p=o[s];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(p===-2)d=!0,f++;else if(p!==-1){s++;break}}if(n._contentTypeTextTrailing&&i===e.length&&(f=0),f){const p={type:i===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:a.start._bufferIndex+c,_index:a.start._index+s,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...p.start},a.start.offset===a.end.offset?Object.assign(a,p):(e.splice(i,0,["enter",p,n],["exit",p,n]),i+=2)}i++}return e}const FR={42:Bt,43:Bt,45:Bt,48:Bt,49:Bt,50:Bt,51:Bt,52:Bt,53:Bt,54:Bt,55:Bt,56:Bt,57:Bt,62:n1},YR={91:KL},XR={[-2]:Wf,[-1]:Wf,32:Wf},QR={35:iR,42:ws,45:[Ky,ws],60:oR,61:Ky,95:ws,96:Qy,126:Qy},ZR={38:r1,92:i1},KR={[-5]:Jf,[-4]:Jf,[-3]:Jf,33:wR,38:r1,42:Md,60:[kL,pR],91:kR,92:[tR,i1],93:uh,95:Md,96:BL},WR={null:[Md,jR]},JR={null:[42,95]},eD={null:[]},tD=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:JR,contentInitial:YR,disable:eD,document:FR,flow:QR,flowInitial:XR,insideSpan:WR,string:ZR,text:KR},Symbol.toStringTag,{value:"Module"}));function nD(e,n,i){let a={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const o={},s=[];let c=[],f=[];const d={attempt:G(B),check:G(N),consume:T,enter:L,exit:U,interrupt:G(N,{interrupt:!0})},p={code:null,containerState:{},defineSkip:k,events:[],now:S,parser:e,previous:null,sliceSerialize:v,sliceStream:b,write:y};let g=n.tokenize.call(p,d);return n.resolveAll&&s.push(n),p;function y(K){return c=dn(c,K),O(),c[c.length-1]!==null?[]:($(n,0),p.events=sh(s,p.events,p),p.events)}function v(K,W){return rD(b(K),W)}function b(K){return iD(c,K)}function S(){const{_bufferIndex:K,_index:W,line:ue,column:J,offset:ee}=a;return{_bufferIndex:K,_index:W,line:ue,column:J,offset:ee}}function k(K){o[K.line]=K.column,ne()}function O(){let K;for(;a._index<c.length;){const W=c[a._index];if(typeof W=="string")for(K=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===K&&a._bufferIndex<W.length;)A(W.charCodeAt(a._bufferIndex));else A(W)}}function A(K){g=g(K)}function T(K){ve(K)?(a.line++,a.column=1,a.offset+=K===-3?2:1,ne()):K!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),p.previous=K}function L(K,W){const ue=W||{};return ue.type=K,ue.start=S(),p.events.push(["enter",ue,p]),f.push(ue),ue}function U(K){const W=f.pop();return W.end=S(),p.events.push(["exit",W,p]),W}function B(K,W){$(K,W.from)}function N(K,W){W.restore()}function G(K,W){return ue;function ue(J,ee,z){let Y,ae,de,x;return Array.isArray(J)?V(J):"tokenize"in J?V([J]):R(J);function R(se){return ye;function ye(we){const Ae=we!==null&&se[we],Ze=we!==null&&se.null,We=[...Array.isArray(Ae)?Ae:Ae?[Ae]:[],...Array.isArray(Ze)?Ze:Ze?[Ze]:[]];return V(We)(we)}}function V(se){return Y=se,ae=0,se.length===0?z:w(se[ae])}function w(se){return ye;function ye(we){return x=ie(),de=se,se.partial||(p.currentConstruct=se),se.name&&p.parser.constructs.disable.null.includes(se.name)?he():se.tokenize.call(W?Object.assign(Object.create(p),W):p,d,le,he)(we)}}function le(se){return K(de,x),ee}function he(se){return x.restore(),++ae<Y.length?w(Y[ae]):z}}}function $(K,W){K.resolveAll&&!s.includes(K)&&s.push(K),K.resolve&&Mn(p.events,W,p.events.length-W,K.resolve(p.events.slice(W),p)),K.resolveTo&&(p.events=K.resolveTo(p.events,p))}function ie(){const K=S(),W=p.previous,ue=p.currentConstruct,J=p.events.length,ee=Array.from(f);return{from:J,restore:z};function z(){a=K,p.previous=W,p.currentConstruct=ue,p.events.length=J,f=ee,ne()}}function ne(){a.line in o&&a.column<2&&(a.column=o[a.line],a.offset+=o[a.line]-1)}}function iD(e,n){const i=n.start._index,a=n.start._bufferIndex,o=n.end._index,s=n.end._bufferIndex;let c;if(i===o)c=[e[i].slice(a,s)];else{if(c=e.slice(i,o),a>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}s>0&&c.push(e[o].slice(0,s))}return c}function rD(e,n){let i=-1;const a=[];let o;for(;++i<e.length;){const s=e[i];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
1876
- `;break}case-3:{c=`\r
1877
- `;break}case-2:{c=n?" ":" ";break}case-1:{if(!n&&o)continue;c=" ";break}default:c=String.fromCharCode(s)}o=s===-2,a.push(c)}return a.join("")}function aD(e){const a={constructs:dL([tD,...(e||{}).extensions||[]]),content:o(_L),defined:[],document:o(EL),flow:o(BR),lazy:{},string:o(GR),text:o(qR)};return a;function o(s){return c;function c(f){return nD(a,s,f)}}}function lD(e){for(;!a1(e););return e}const Wy=/[\0\t\n\r]/g;function oD(){let e=1,n="",i=!0,a;return o;function o(s,c,f){const d=[];let p,g,y,v,b;for(s=n+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),y=0,n="",i&&(s.charCodeAt(0)===65279&&y++,i=void 0);y<s.length;){if(Wy.lastIndex=y,p=Wy.exec(s),v=p&&p.index!==void 0?p.index:s.length,b=s.charCodeAt(v),!p){n=s.slice(y);break}if(b===10&&y===v&&a)d.push(-3),a=void 0;else switch(a&&(d.push(-5),a=void 0),y<v&&(d.push(s.slice(y,v)),e+=v-y),b){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:a=!0,e=1}y=v+1}return f&&(a&&d.push(-5),n&&d.push(n),d.push(null)),d}}const sD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function uD(e){return e.replace(sD,cD)}function cD(e,n,i){if(n)return n;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),s=o===120||o===88;return t1(i.slice(s?2:1),s?16:10)}return oh(i)||e}const f1={}.hasOwnProperty;function fD(e,n,i){return n&&typeof n=="object"&&(i=n,n=void 0),dD(i)(lD(aD(i).document().write(oD()(e,n,!0))))}function dD(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(dr),autolinkProtocol:ie,autolinkEmail:ie,atxHeading:s(cr),blockQuote:s(Ze),characterEscape:ie,characterReference:ie,codeFenced:s(We),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(We,c),codeText:s(mn,c),codeTextData:ie,data:ie,codeFlowValue:ie,definition:s(Tt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(In),hardBreakEscape:s(fr),hardBreakTrailing:s(fr),htmlFlow:s(Bl,c),htmlFlowData:ie,htmlText:s(Bl,c),htmlTextData:ie,image:s(Vl),label:c,link:s(dr),listItem:s(_a),listItemValue:v,listOrdered:s(hr,y),listUnordered:s(hr),paragraph:s(tu),reference:w,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(cr),strong:s(nu),thematicBreak:s(iu)},exit:{atxHeading:d(),atxHeadingSequence:B,autolink:d(),autolinkEmail:Ae,autolinkProtocol:we,blockQuote:d(),characterEscapeValue:ne,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:se,characterReference:ye,codeFenced:d(O),codeFencedFence:k,codeFencedFenceInfo:b,codeFencedFenceMeta:S,codeFlowValue:ne,codeIndented:d(A),codeText:d(ee),codeTextData:ne,data:ne,definition:d(),definitionDestinationString:U,definitionLabelString:T,definitionTitleString:L,emphasis:d(),hardBreakEscape:d(W),hardBreakTrailing:d(W),htmlFlow:d(ue),htmlFlowData:ne,htmlText:d(J),htmlTextData:ne,image:d(Y),label:de,labelText:ae,lineEnding:K,link:d(z),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:le,resourceDestinationString:x,resourceTitleString:R,resource:V,setextHeading:d($),setextHeadingLineSequence:G,setextHeadingText:N,strong:d(),thematicBreak:d()}};d1(n,(e||{}).mdastExtensions||[]);const i={};return a;function a(X){let oe={type:"root",children:[]};const be={stack:[oe],tokenStack:[],config:n,enter:f,exit:p,buffer:c,resume:g,data:i},Te=[];let He=-1;for(;++He<X.length;)if(X[He][1].type==="listOrdered"||X[He][1].type==="listUnordered")if(X[He][0]==="enter")Te.push(He);else{const Gt=Te.pop();He=o(X,Gt,He)}for(He=-1;++He<X.length;){const Gt=n[X[He][0]];f1.call(Gt,X[He][1].type)&&Gt[X[He][1].type].call(Object.assign({sliceSerialize:X[He][2].sliceSerialize},be),X[He][1])}if(be.tokenStack.length>0){const Gt=be.tokenStack[be.tokenStack.length-1];(Gt[1]||Jy).call(be,void 0,Gt[0])}for(oe.position={start:Oi(X.length>0?X[0][1].start:{line:1,column:1,offset:0}),end:Oi(X.length>0?X[X.length-2][1].end:{line:1,column:1,offset:0})},He=-1;++He<n.transforms.length;)oe=n.transforms[He](oe)||oe;return oe}function o(X,oe,be){let Te=oe-1,He=-1,Gt=!1,zn,Rt,ct,Ot;for(;++Te<=be;){const qe=X[Te];switch(qe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{qe[0]==="enter"?He++:He--,Ot=void 0;break}case"lineEndingBlank":{qe[0]==="enter"&&(zn&&!Ot&&!He&&!ct&&(ct=Te),Ot=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ot=void 0}if(!He&&qe[0]==="enter"&&qe[1].type==="listItemPrefix"||He===-1&&qe[0]==="exit"&&(qe[1].type==="listUnordered"||qe[1].type==="listOrdered")){if(zn){let oi=Te;for(Rt=void 0;oi--;){const gn=X[oi];if(gn[1].type==="lineEnding"||gn[1].type==="lineEndingBlank"){if(gn[0]==="exit")continue;Rt&&(X[Rt][1].type="lineEndingBlank",Gt=!0),gn[1].type="lineEnding",Rt=oi}else if(!(gn[1].type==="linePrefix"||gn[1].type==="blockQuotePrefix"||gn[1].type==="blockQuotePrefixWhitespace"||gn[1].type==="blockQuoteMarker"||gn[1].type==="listItemIndent"))break}ct&&(!Rt||ct<Rt)&&(zn._spread=!0),zn.end=Object.assign({},Rt?X[Rt][1].start:qe[1].end),X.splice(Rt||Te,0,["exit",zn,qe[2]]),Te++,be++}if(qe[1].type==="listItemPrefix"){const oi={type:"listItem",_spread:!1,start:Object.assign({},qe[1].start),end:void 0};zn=oi,X.splice(Te,0,["enter",oi,qe[2]]),Te++,be++,ct=void 0,Ot=!0}}}return X[oe][1]._spread=Gt,be}function s(X,oe){return be;function be(Te){f.call(this,X(Te),Te),oe&&oe.call(this,Te)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(X,oe,be){this.stack[this.stack.length-1].children.push(X),this.stack.push(X),this.tokenStack.push([oe,be||void 0]),X.position={start:Oi(oe.start),end:void 0}}function d(X){return oe;function oe(be){X&&X.call(this,be),p.call(this,be)}}function p(X,oe){const be=this.stack.pop(),Te=this.tokenStack.pop();if(Te)Te[0].type!==X.type&&(oe?oe.call(this,X,Te[0]):(Te[1]||Jy).call(this,X,Te[0]));else throw new Error("Cannot close `"+X.type+"` ("+Cl({start:X.start,end:X.end})+"): it’s not open");be.position.end=Oi(X.end)}function g(){return cL(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function v(X){if(this.data.expectingFirstListItemValue){const oe=this.stack[this.stack.length-2];oe.start=Number.parseInt(this.sliceSerialize(X),10),this.data.expectingFirstListItemValue=void 0}}function b(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.lang=X}function S(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.meta=X}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function O(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.value=X.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.value=X.replace(/(\r?\n|\r)$/g,"")}function T(X){const oe=this.resume(),be=this.stack[this.stack.length-1];be.label=oe,be.identifier=fa(this.sliceSerialize(X)).toLowerCase()}function L(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.title=X}function U(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.url=X}function B(X){const oe=this.stack[this.stack.length-1];if(!oe.depth){const be=this.sliceSerialize(X).length;oe.depth=be}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function G(X){const oe=this.stack[this.stack.length-1];oe.depth=this.sliceSerialize(X).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function ie(X){const be=this.stack[this.stack.length-1].children;let Te=be[be.length-1];(!Te||Te.type!=="text")&&(Te=Lt(),Te.position={start:Oi(X.start),end:void 0},be.push(Te)),this.stack.push(Te)}function ne(X){const oe=this.stack.pop();oe.value+=this.sliceSerialize(X),oe.position.end=Oi(X.end)}function K(X){const oe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const be=oe.children[oe.children.length-1];be.position.end=Oi(X.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(oe.type)&&(ie.call(this,X),ne.call(this,X))}function W(){this.data.atHardBreak=!0}function ue(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.value=X}function J(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.value=X}function ee(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.value=X}function z(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=oe,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function Y(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=oe,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function ae(X){const oe=this.sliceSerialize(X),be=this.stack[this.stack.length-2];be.label=uD(oe),be.identifier=fa(oe).toLowerCase()}function de(){const X=this.stack[this.stack.length-1],oe=this.resume(),be=this.stack[this.stack.length-1];if(this.data.inReference=!0,be.type==="link"){const Te=X.children;be.children=Te}else be.alt=oe}function x(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.url=X}function R(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.title=X}function V(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function le(X){const oe=this.resume(),be=this.stack[this.stack.length-1];be.label=oe,be.identifier=fa(this.sliceSerialize(X)).toLowerCase(),this.data.referenceType="full"}function he(X){this.data.characterReferenceType=X.type}function se(X){const oe=this.sliceSerialize(X),be=this.data.characterReferenceType;let Te;be?(Te=t1(oe,be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Te=oh(oe);const He=this.stack[this.stack.length-1];He.value+=Te}function ye(X){const oe=this.stack.pop();oe.position.end=Oi(X.end)}function we(X){ne.call(this,X);const oe=this.stack[this.stack.length-1];oe.url=this.sliceSerialize(X)}function Ae(X){ne.call(this,X);const oe=this.stack[this.stack.length-1];oe.url="mailto:"+this.sliceSerialize(X)}function Ze(){return{type:"blockquote",children:[]}}function We(){return{type:"code",lang:null,meta:null,value:""}}function mn(){return{type:"inlineCode",value:""}}function Tt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function In(){return{type:"emphasis",children:[]}}function cr(){return{type:"heading",depth:0,children:[]}}function fr(){return{type:"break"}}function Bl(){return{type:"html",value:""}}function Vl(){return{type:"image",title:null,url:"",alt:null}}function dr(){return{type:"link",title:null,url:"",children:[]}}function hr(X){return{type:"list",ordered:X.type==="listOrdered",start:null,spread:X._spread,children:[]}}function _a(X){return{type:"listItem",spread:X._spread,checked:null,children:[]}}function tu(){return{type:"paragraph",children:[]}}function nu(){return{type:"strong",children:[]}}function Lt(){return{type:"text",value:""}}function iu(){return{type:"thematicBreak"}}}function Oi(e){return{line:e.line,column:e.column,offset:e.offset}}function d1(e,n){let i=-1;for(;++i<n.length;){const a=n[i];Array.isArray(a)?d1(e,a):hD(e,a)}}function hD(e,n){let i;for(i in n)if(f1.call(n,i))switch(i){case"canContainEols":{const a=n[i];a&&e[i].push(...a);break}case"transforms":{const a=n[i];a&&e[i].push(...a);break}case"enter":case"exit":{const a=n[i];a&&Object.assign(e[i],a);break}}}function Jy(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Cl({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Cl({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Cl({start:n.start,end:n.end})+") is still open")}function pD(e){const n=this;n.parser=i;function i(a){return fD(a,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function mD(e,n){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,i),e.applyData(n,i)}function gD(e,n){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,i),[e.applyData(n,i),{type:"text",value:`
1878
- `}]}function yD(e,n){const i=n.value?n.value+`
1879
- `:"",a={},o=n.lang?n.lang.split(/\s+/):[];o.length>0&&(a.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:a,children:[{type:"text",value:i}]};return n.meta&&(s.data={meta:n.meta}),e.patch(n,s),s=e.applyData(n,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(n,s),s}function bD(e,n){const i={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function vD(e,n){const i={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function _D(e,n){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(n.identifier).toUpperCase(),o=va(a.toLowerCase()),s=e.footnoteOrder.indexOf(a);let c,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=s+1,f+=1,e.footnoteCounts.set(a,f);const d={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+o,id:i+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(n,d);const p={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(n,p),e.applyData(n,p)}function SD(e,n){const i={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function ED(e,n){if(e.options.allowDangerousHtml){const i={type:"raw",value:n.value};return e.patch(n,i),e.applyData(n,i)}}function h1(e,n){const i=n.referenceType;let a="]";if(i==="collapsed"?a+="[]":i==="full"&&(a+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+a}];const o=e.all(n),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=a:o.push({type:"text",value:a}),o}function xD(e,n){const i=String(n.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return h1(e,n);const o={src:va(a.url||""),alt:n.alt};a.title!==null&&a.title!==void 0&&(o.title=a.title);const s={type:"element",tagName:"img",properties:o,children:[]};return e.patch(n,s),e.applyData(n,s)}function CD(e,n){const i={src:va(n.url)};n.alt!==null&&n.alt!==void 0&&(i.alt=n.alt),n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,a),e.applyData(n,a)}function wD(e,n){const i={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,i);const a={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(n,a),e.applyData(n,a)}function AD(e,n){const i=String(n.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return h1(e,n);const o={href:va(a.url||"")};a.title!==null&&a.title!==void 0&&(o.title=a.title);const s={type:"element",tagName:"a",properties:o,children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function kD(e,n){const i={href:va(n.url)};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function TD(e,n,i){const a=e.all(n),o=i?LD(i):p1(n),s={},c=[];if(typeof n.checked=="boolean"){const g=a[0];let y;g&&g.type==="element"&&g.tagName==="p"?y=g:(y={type:"element",tagName:"p",properties:{},children:[]},a.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const g=a[f];(o||f!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
1880
- `}),g.type==="element"&&g.tagName==="p"&&!o?c.push(...g.children):c.push(g)}const d=a[a.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&c.push({type:"text",value:`
1881
- `});const p={type:"element",tagName:"li",properties:s,children:c};return e.patch(n,p),e.applyData(n,p)}function LD(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const i=e.children;let a=-1;for(;!n&&++a<i.length;)n=p1(i[a])}return n}function p1(e){const n=e.spread;return n??e.children.length>1}function RD(e,n){const i={},a=e.all(n);let o=-1;for(typeof n.start=="number"&&n.start!==1&&(i.start=n.start);++o<a.length;){const c=a[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const s={type:"element",tagName:n.ordered?"ol":"ul",properties:i,children:e.wrap(a,!0)};return e.patch(n,s),e.applyData(n,s)}function DD(e,n){const i={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function OD(e,n){const i={type:"root",children:e.wrap(e.all(n))};return e.patch(n,i),e.applyData(n,i)}function ND(e,n){const i={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function MD(e,n){const i=e.all(n),a=i.shift(),o=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(n.children[0],c),o.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},f=ih(n.children[1]),d=Xv(n.children[n.children.length-1]);f&&d&&(c.position={start:f,end:d}),o.push(c)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,s),e.applyData(n,s)}function ID(e,n,i){const a=i?i.children:void 0,s=(a?a.indexOf(n):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,f=c?c.length:n.children.length;let d=-1;const p=[];for(;++d<f;){const y=n.children[d],v={},b=c?c[d]:void 0;b&&(v.align=b);let S={type:"element",tagName:s,properties:v,children:[]};y&&(S.children=e.all(y),e.patch(y,S),S=e.applyData(y,S)),p.push(S)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(n,g),e.applyData(n,g)}function zD(e,n){const i={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}const eb=9,tb=32;function UD(e){const n=String(e),i=/\r?\n|\r/g;let a=i.exec(n),o=0;const s=[];for(;a;)s.push(nb(n.slice(o,a.index),o>0,!0),a[0]),o=a.index+a[0].length,a=i.exec(n);return s.push(nb(n.slice(o),o>0,!1)),s.join("")}function nb(e,n,i){let a=0,o=e.length;if(n){let s=e.codePointAt(a);for(;s===eb||s===tb;)a++,s=e.codePointAt(a)}if(i){let s=e.codePointAt(o-1);for(;s===eb||s===tb;)o--,s=e.codePointAt(o-1)}return o>a?e.slice(a,o):""}function HD(e,n){const i={type:"text",value:UD(String(n.value))};return e.patch(n,i),e.applyData(n,i)}function PD(e,n){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,i),e.applyData(n,i)}const BD={blockquote:mD,break:gD,code:yD,delete:bD,emphasis:vD,footnoteReference:_D,heading:SD,html:ED,imageReference:xD,image:CD,inlineCode:wD,linkReference:AD,link:kD,listItem:TD,list:RD,paragraph:DD,root:OD,strong:ND,table:MD,tableCell:zD,tableRow:ID,text:HD,thematicBreak:PD,toml:ys,yaml:ys,definition:ys,footnoteDefinition:ys};function ys(){}const m1=-1,Js=0,Al=1,Bs=2,ch=3,fh=4,dh=5,hh=6,g1=7,y1=8,ib=typeof self=="object"?self:globalThis,VD=(e,n)=>{const i=(o,s)=>(e.set(s,o),o),a=o=>{if(e.has(o))return e.get(o);const[s,c]=n[o];switch(s){case Js:case m1:return i(c,o);case Al:{const f=i([],o);for(const d of c)f.push(a(d));return f}case Bs:{const f=i({},o);for(const[d,p]of c)f[a(d)]=a(p);return f}case ch:return i(new Date(c),o);case fh:{const{source:f,flags:d}=c;return i(new RegExp(f,d),o)}case dh:{const f=i(new Map,o);for(const[d,p]of c)f.set(a(d),a(p));return f}case hh:{const f=i(new Set,o);for(const d of c)f.add(a(d));return f}case g1:{const{name:f,message:d}=c;return i(new ib[f](d),o)}case y1:return i(BigInt(c),o);case"BigInt":return i(Object(BigInt(c)),o);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return i(new DataView(f),c)}}return i(new ib[s](c),o)};return a},rb=e=>VD(new Map,e)(0),ia="",{toString:jD}={},{keys:GD}=Object,_l=e=>{const n=typeof e;if(n!=="object"||!e)return[Js,n];const i=jD.call(e).slice(8,-1);switch(i){case"Array":return[Al,ia];case"Object":return[Bs,ia];case"Date":return[ch,ia];case"RegExp":return[fh,ia];case"Map":return[dh,ia];case"Set":return[hh,ia];case"DataView":return[Al,i]}return i.includes("Array")?[Al,i]:i.includes("Error")?[g1,i]:[Bs,i]},bs=([e,n])=>e===Js&&(n==="function"||n==="symbol"),qD=(e,n,i,a)=>{const o=(c,f)=>{const d=a.push(c)-1;return i.set(f,d),d},s=c=>{if(i.has(c))return i.get(c);let[f,d]=_l(c);switch(f){case Js:{let g=c;switch(d){case"bigint":f=y1,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);g=null;break;case"undefined":return o([m1],c)}return o([f,g],c)}case Al:{if(d){let v=c;return d==="DataView"?v=new Uint8Array(c.buffer):d==="ArrayBuffer"&&(v=new Uint8Array(c)),o([d,[...v]],c)}const g=[],y=o([f,g],c);for(const v of c)g.push(s(v));return y}case Bs:{if(d)switch(d){case"BigInt":return o([d,c.toString()],c);case"Boolean":case"Number":case"String":return o([d,c.valueOf()],c)}if(n&&"toJSON"in c)return s(c.toJSON());const g=[],y=o([f,g],c);for(const v of GD(c))(e||!bs(_l(c[v])))&&g.push([s(v),s(c[v])]);return y}case ch:return o([f,c.toISOString()],c);case fh:{const{source:g,flags:y}=c;return o([f,{source:g,flags:y}],c)}case dh:{const g=[],y=o([f,g],c);for(const[v,b]of c)(e||!(bs(_l(v))||bs(_l(b))))&&g.push([s(v),s(b)]);return y}case hh:{const g=[],y=o([f,g],c);for(const v of c)(e||!bs(_l(v)))&&g.push(s(v));return y}}const{message:p}=c;return o([f,{name:d,message:p}],c)};return s},ab=(e,{json:n,lossy:i}={})=>{const a=[];return qD(!(n||i),!!n,new Map,a)(e),a},Vs=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?rb(ab(e,n)):structuredClone(e):(e,n)=>rb(ab(e,n));function $D(e,n){const i=[{type:"text",value:"↩"}];return n>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),i}function FD(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function YD(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||$D,a=e.options.footnoteBackLabel||FD,o=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[d]);if(!p)continue;const g=e.all(p),y=String(p.identifier).toUpperCase(),v=va(y.toLowerCase());let b=0;const S=[],k=e.footnoteCounts.get(y);for(;k!==void 0&&++b<=k;){S.length>0&&S.push({type:"text",value:" "});let T=typeof i=="string"?i:i(d,b);typeof T=="string"&&(T={type:"text",value:T}),S.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+v+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(d,b),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const O=g[g.length-1];if(O&&O.type==="element"&&O.tagName==="p"){const T=O.children[O.children.length-1];T&&T.type==="text"?T.value+=" ":O.children.push({type:"text",value:" "}),O.children.push(...S)}else g.push(...S);const A={type:"element",tagName:"li",properties:{id:n+"fn-"+v},children:e.wrap(g,!0)};e.patch(p,A),f.push(A)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Vs(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
1882
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
1883
- `}]}}const b1=(function(e){if(e==null)return KD;if(typeof e=="function")return eu(e);if(typeof e=="object")return Array.isArray(e)?XD(e):QD(e);if(typeof e=="string")return ZD(e);throw new Error("Expected function, string, or object as test")});function XD(e){const n=[];let i=-1;for(;++i<e.length;)n[i]=b1(e[i]);return eu(a);function a(...o){let s=-1;for(;++s<n.length;)if(n[s].apply(this,o))return!0;return!1}}function QD(e){const n=e;return eu(i);function i(a){const o=a;let s;for(s in e)if(o[s]!==n[s])return!1;return!0}}function ZD(e){return eu(n);function n(i){return i&&i.type===e}}function eu(e){return n;function n(i,a,o){return!!(WD(i)&&e.call(this,i,typeof a=="number"?a:void 0,o||void 0))}}function KD(){return!0}function WD(e){return e!==null&&typeof e=="object"&&"type"in e}const v1=[],JD=!0,lb=!1,eO="skip";function tO(e,n,i,a){let o;typeof n=="function"&&typeof i!="function"?(a=i,i=n):o=n;const s=b1(o),c=a?-1:1;f(e,void 0,[])();function f(d,p,g){const y=d&&typeof d=="object"?d:{};if(typeof y.type=="string"){const b=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(d.type+(b?"<"+b+">":""))+")"})}return v;function v(){let b=v1,S,k,O;if((!n||s(d,p,g[g.length-1]||void 0))&&(b=nO(i(d,g)),b[0]===lb))return b;if("children"in d&&d.children){const A=d;if(A.children&&b[0]!==eO)for(k=(a?A.children.length:-1)+c,O=g.concat(A);k>-1&&k<A.children.length;){const T=A.children[k];if(S=f(T,k,O)(),S[0]===lb)return S;k=typeof S[1]=="number"?S[1]:k+c}}return b}}}function nO(e){return Array.isArray(e)?e:typeof e=="number"?[JD,e]:e==null?v1:[e]}function _1(e,n,i,a){let o,s,c;typeof n=="function"&&typeof i!="function"?(s=void 0,c=n,o=i):(s=n,c=i,o=a),tO(e,s,f,o);function f(d,p){const g=p[p.length-1],y=g?g.children.indexOf(d):void 0;return c(d,y,g)}}const Id={}.hasOwnProperty,iO={};function rO(e,n){const i=n||iO,a=new Map,o=new Map,s=new Map,c={...BD,...i.handlers},f={all:p,applyData:lO,definitionById:a,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:c,one:d,options:i,patch:aO,wrap:sO};return _1(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const y=g.type==="definition"?a:o,v=String(g.identifier).toUpperCase();y.has(v)||y.set(v,g)}}),f;function d(g,y){const v=g.type,b=f.handlers[v];if(Id.call(f.handlers,v)&&b)return b(f,g,y);if(f.options.passThrough&&f.options.passThrough.includes(v)){if("children"in g){const{children:k,...O}=g,A=Vs(O);return A.children=f.all(g),A}return Vs(g)}return(f.options.unknownHandler||oO)(f,g,y)}function p(g){const y=[];if("children"in g){const v=g.children;let b=-1;for(;++b<v.length;){const S=f.one(v[b],g);if(S){if(b&&v[b-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=ob(S.value)),!Array.isArray(S)&&S.type==="element")){const k=S.children[0];k&&k.type==="text"&&(k.value=ob(k.value))}Array.isArray(S)?y.push(...S):y.push(S)}}}return y}}function aO(e,n){e.position&&(n.position=j2(e))}function lO(e,n){let i=n;if(e&&e.data){const a=e.data.hName,o=e.data.hChildren,s=e.data.hProperties;if(typeof a=="string")if(i.type==="element")i.tagName=a;else{const c="children"in i?i.children:[i];i={type:"element",tagName:a,properties:{},children:c}}i.type==="element"&&s&&Object.assign(i.properties,Vs(s)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function oO(e,n){const i=n.data||{},a="value"in n&&!(Id.call(i,"hProperties")||Id.call(i,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function sO(e,n){const i=[];let a=-1;for(n&&i.push({type:"text",value:`
1884
- `});++a<e.length;)a&&i.push({type:"text",value:`
1885
- `}),i.push(e[a]);return n&&e.length>0&&i.push({type:"text",value:`
1886
- `}),i}function ob(e){let n=0,i=e.charCodeAt(n);for(;i===9||i===32;)n++,i=e.charCodeAt(n);return e.slice(n)}function sb(e,n){const i=rO(e,n),a=i.one(e,void 0),o=YD(i),s=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
1887
- `},o),s}function uO(e,n){return e&&"run"in e?async function(i,a){const o=sb(i,{file:a,...n});await e.run(o,a)}:function(i,a){return sb(i,{file:a,...e||n})}}function ub(e){if(e)throw e}var ed,cb;function cO(){if(cb)return ed;cb=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(p){return typeof Array.isArray=="function"?Array.isArray(p):n.call(p)==="[object Array]"},s=function(p){if(!p||n.call(p)!=="[object Object]")return!1;var g=e.call(p,"constructor"),y=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!g&&!y)return!1;var v;for(v in p);return typeof v>"u"||e.call(p,v)},c=function(p,g){i&&g.name==="__proto__"?i(p,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):p[g.name]=g.newValue},f=function(p,g){if(g==="__proto__")if(e.call(p,g)){if(a)return a(p,g).value}else return;return p[g]};return ed=function d(){var p,g,y,v,b,S,k=arguments[0],O=1,A=arguments.length,T=!1;for(typeof k=="boolean"&&(T=k,k=arguments[1]||{},O=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});O<A;++O)if(p=arguments[O],p!=null)for(g in p)y=f(k,g),v=f(p,g),k!==v&&(T&&v&&(s(v)||(b=o(v)))?(b?(b=!1,S=y&&o(y)?y:[]):S=y&&s(y)?y:{},c(k,{name:g,newValue:d(T,S,v)})):typeof v<"u"&&c(k,{name:g,newValue:v}));return k},ed}var fO=cO();const td=vb(fO);function zd(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function dO(){const e=[],n={run:i,use:a};return n;function i(...o){let s=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...o);function f(d,...p){const g=e[++s];let y=-1;if(d){c(d);return}for(;++y<o.length;)(p[y]===null||p[y]===void 0)&&(p[y]=o[y]);o=p,g?hO(g,f)(...p):c(null,...p)}}function a(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),n}}function hO(e,n){let i;return a;function a(...c){const f=e.length>c.length;let d;f&&c.push(o);try{d=e.apply(this,c)}catch(p){const g=p;if(f&&i)throw g;return o(g)}f||(d&&d.then&&typeof d.then=="function"?d.then(s,o):d instanceof Error?o(d):s(d))}function o(c,...f){i||(i=!0,n(c,...f))}function s(c){o(null,c)}}const Rn={basename:pO,dirname:mO,extname:gO,join:yO,sep:"/"};function pO(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Pl(e);let i=0,a=-1,o=e.length,s;if(n===void 0||n.length===0||n.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(s){i=o+1;break}}else a<0&&(s=!0,a=o+1);return a<0?"":e.slice(i,a)}if(n===e)return"";let c=-1,f=n.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){i=o+1;break}}else c<0&&(s=!0,c=o+1),f>-1&&(e.codePointAt(o)===n.codePointAt(f--)?f<0&&(a=o):(f=-1,a=c));return i===a?a=c:a<0&&(a=e.length),e.slice(i,a)}function mO(e){if(Pl(e),e.length===0)return".";let n=-1,i=e.length,a;for(;--i;)if(e.codePointAt(i)===47){if(a){n=i;break}}else a||(a=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function gO(e){Pl(e);let n=e.length,i=-1,a=0,o=-1,s=0,c;for(;n--;){const f=e.codePointAt(n);if(f===47){if(c){a=n+1;break}continue}i<0&&(c=!0,i=n+1),f===46?o<0?o=n:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||i<0||s===0||s===1&&o===i-1&&o===a+1?"":e.slice(o,i)}function yO(...e){let n=-1,i;for(;++n<e.length;)Pl(e[n]),e[n]&&(i=i===void 0?e[n]:i+"/"+e[n]);return i===void 0?".":bO(i)}function bO(e){Pl(e);const n=e.codePointAt(0)===47;let i=vO(e,!n);return i.length===0&&!n&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),n?"/"+i:i}function vO(e,n){let i="",a=0,o=-1,s=0,c=-1,f,d;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(o===c-1||s===1))if(o!==c-1&&s===2){if(i.length<2||a!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(d=i.lastIndexOf("/"),d!==i.length-1){d<0?(i="",a=0):(i=i.slice(0,d),a=i.length-1-i.lastIndexOf("/")),o=c,s=0;continue}}else if(i.length>0){i="",a=0,o=c,s=0;continue}}n&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(o+1,c):i=e.slice(o+1,c),a=c-o-1;o=c,s=0}else f===46&&s>-1?s++:s=-1}return i}function Pl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _O={cwd:SO};function SO(){return"/"}function Ud(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function EO(e){if(typeof e=="string")e=new URL(e);else if(!Ud(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return xO(e)}function xO(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const n=e.pathname;let i=-1;for(;++i<n.length;)if(n.codePointAt(i)===37&&n.codePointAt(i+1)===50){const a=n.codePointAt(i+2);if(a===70||a===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(n)}const nd=["history","path","basename","stem","extname","dirname"];class S1{constructor(n){let i;n?Ud(n)?i={path:n}:typeof n=="string"||CO(n)?i={value:n}:i=n:i={},this.cwd="cwd"in i?"":_O.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<nd.length;){const s=nd[a];s in i&&i[s]!==void 0&&i[s]!==null&&(this[s]=s==="history"?[...i[s]]:i[s])}let o;for(o in i)nd.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?Rn.basename(this.path):void 0}set basename(n){rd(n,"basename"),id(n,"basename"),this.path=Rn.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Rn.dirname(this.path):void 0}set dirname(n){fb(this.basename,"dirname"),this.path=Rn.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Rn.extname(this.path):void 0}set extname(n){if(id(n,"extname"),fb(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Rn.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Ud(n)&&(n=EO(n)),rd(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Rn.basename(this.path,this.extname):void 0}set stem(n){rd(n,"stem"),id(n,"stem"),this.path=Rn.join(this.dirname||"",n+(this.extname||""))}fail(n,i,a){const o=this.message(n,i,a);throw o.fatal=!0,o}info(n,i,a){const o=this.message(n,i,a);return o.fatal=void 0,o}message(n,i,a){const o=new kt(n,i,a);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function id(e,n){if(e&&e.includes(Rn.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Rn.sep+"`")}function rd(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function fb(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function CO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const wO=(function(e){const a=this.constructor.prototype,o=a[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,a),s}),AO={}.hasOwnProperty;class ph extends wO{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=dO()}copy(){const n=new ph;let i=-1;for(;++i<this.attachers.length;){const a=this.attachers[i];n.use(...a)}return n.data(td(!0,{},this.namespace)),n}data(n,i){return typeof n=="string"?arguments.length===2?(od("data",this.frozen),this.namespace[n]=i,this):AO.call(this.namespace,n)&&this.namespace[n]||void 0:n?(od("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const o=i.call(n,...a);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const i=vs(n),a=this.parser||this.Parser;return ad("parse",a),a(String(i),i)}process(n,i){const a=this;return this.freeze(),ad("process",this.parser||this.Parser),ld("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(s,c){const f=vs(n),d=a.parse(f);a.run(d,f,function(g,y,v){if(g||!y||!v)return p(g);const b=y,S=a.stringify(b,v);LO(S)?v.value=S:v.result=S,p(g,v)});function p(g,y){g||!y?c(g):s?s(y):i(void 0,y)}}}processSync(n){let i=!1,a;return this.freeze(),ad("processSync",this.parser||this.Parser),ld("processSync",this.compiler||this.Compiler),this.process(n,o),hb("processSync","process",i),a;function o(s,c){i=!0,ub(s),a=c}}run(n,i,a){db(n),this.freeze();const o=this.transformers;return!a&&typeof i=="function"&&(a=i,i=void 0),a?s(void 0,a):new Promise(s);function s(c,f){const d=vs(i);o.run(n,d,p);function p(g,y,v){const b=y||n;g?f(g):c?c(b):a(void 0,b,v)}}}runSync(n,i){let a=!1,o;return this.run(n,i,s),hb("runSync","run",a),o;function s(c,f){ub(c),o=f,a=!0}}stringify(n,i){this.freeze();const a=vs(i),o=this.compiler||this.Compiler;return ld("stringify",o),db(n),o(n,a)}use(n,...i){const a=this.attachers,o=this.namespace;if(od("use",this.frozen),n!=null)if(typeof n=="function")d(n,i);else if(typeof n=="object")Array.isArray(n)?f(n):c(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function s(p){if(typeof p=="function")d(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[g,...y]=p;d(g,y)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))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(p.plugins),p.settings&&(o.settings=td(!0,o.settings,p.settings))}function f(p){let g=-1;if(p!=null)if(Array.isArray(p))for(;++g<p.length;){const y=p[g];s(y)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function d(p,g){let y=-1,v=-1;for(;++y<a.length;)if(a[y][0]===p){v=y;break}if(v===-1)a.push([p,...g]);else if(g.length>0){let[b,...S]=g;const k=a[v][1];zd(k)&&zd(b)&&(b=td(!0,k,b)),a[v]=[p,b,...S]}}}}const kO=new ph().freeze();function ad(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ld(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function od(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function db(e){if(!zd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function hb(e,n,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function vs(e){return TO(e)?e:new S1(e)}function TO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function LO(e){return typeof e=="string"||RO(e)}function RO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const DO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",pb=[],mb={allowDangerousHtml:!0},OO=/^(https?|ircs?|mailto|xmpp)$/i,NO=[{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 MO(e){const n=IO(e),i=zO(e);return UO(n.runSync(n.parse(i),i),e)}function IO(e){const n=e.rehypePlugins||pb,i=e.remarkPlugins||pb,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...mb}:mb;return kO().use(pD).use(i).use(uO,a).use(n)}function zO(e){const n=e.children||"",i=new S1;return typeof n=="string"&&(i.value=n),i}function UO(e,n){const i=n.allowedElements,a=n.allowElement,o=n.components,s=n.disallowedElements,c=n.skipHtml,f=n.unwrapDisallowed,d=n.urlTransform||HO;for(const g of NO)Object.hasOwn(n,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+DO+g.id,void 0);return _1(e,p),Y2(e,{Fragment:te.Fragment,components:o,ignoreInvalidStyle:!0,jsx:te.jsx,jsxs:te.jsxs,passKeys:!0,passNode:!0});function p(g,y,v){if(g.type==="raw"&&v&&typeof y=="number")return c?v.children.splice(y,1):v.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let b;for(b in Kf)if(Object.hasOwn(Kf,b)&&Object.hasOwn(g.properties,b)){const S=g.properties[b],k=Kf[b];(k===null||k.includes(g.tagName))&&(g.properties[b]=d(String(S||""),b,g))}}if(g.type==="element"){let b=i?!i.includes(g.tagName):s?s.includes(g.tagName):!1;if(!b&&a&&typeof y=="number"&&(b=!a(g,y,v)),b&&v&&typeof y=="number")return f&&g.children?v.children.splice(y,1,...g.children):v.children.splice(y,1),y}}}function HO(e){const n=e.indexOf(":"),i=e.indexOf("?"),a=e.indexOf("#"),o=e.indexOf("/");return n===-1||o!==-1&&n>o||i!==-1&&n>i||a!==-1&&n>a||OO.test(e.slice(0,n))?e:""}function PO({thread:e,onDelete:n,onAddReply:i,onRequestAgent:a}){const[o,s]=me.useState(""),c=e.messages[e.messages.length-1],f=c?.role==="user",d=e.messages.some(b=>b.role==="assistant"),p=f&&!e.loading,g=d&&c?.role==="assistant"&&!e.loading,y=me.useCallback(()=>{const b=o.trim();b&&(s(""),i(b))},[o,i]),v=me.useCallback(b=>{b.key==="Enter"&&(b.metaKey||b.ctrlKey)&&(b.preventDefault(),y())},[y]);return te.jsxs("div",{className:"thread-card",children:[te.jsx("button",{type:"button",className:"icon-btn ghost thread-delete","aria-label":"Delete thread",onClick:n,children:te.jsx(L2,{size:11})}),te.jsxs("div",{className:"thread-messages",children:[e.messages.map((b,S)=>te.jsxs("div",{className:`thread-msg thread-msg-${b.role}`,children:[te.jsx("span",{className:"thread-msg-role",children:b.role==="user"?"you":"agent"}),te.jsx("div",{className:"thread-msg-text",children:te.jsx(MO,{children:b.text})})]},S)),e.loading&&te.jsxs("div",{className:"thread-msg thread-msg-assistant",children:[te.jsx("span",{className:"thread-msg-role",children:"agent"}),te.jsxs("span",{className:"thread-msg-text thread-loading",children:[te.jsx(_2,{size:11,className:"spin"}),"thinking…"]})]})]}),g&&te.jsx("textarea",{className:"thread-reply-input",value:o,onChange:b=>s(b.target.value),onKeyDown:v,placeholder:"Reply…",rows:1}),te.jsxs("div",{className:"thread-actions",children:[g&&te.jsxs("button",{type:"button",className:"btn ghost",disabled:!o.trim(),onClick:y,children:[te.jsx(Yv,{size:12}),"reply"]}),p&&te.jsxs("button",{type:"button",className:"btn primary",onClick:a,children:[te.jsx(k2,{size:12}),"ask agent"]})]})]})}const BO={theme:"github-dark-default",themeType:"dark",diffStyle:"unified",diffIndicators:"none",lineDiffType:"none",disableFileHeader:!0,overflow:"wrap",unsafeCSS:":host { --diffs-dark-bg: #0e0e0e; --diffs-bg: #0e0e0e; } pre { background-color: #0e0e0e !important; --diffs-bg: #0e0e0e !important; }"};function VO({file:e,diffStyle:n,collapsed:i,viewed:a,annotations:o,onToggleCollapsed:s,onToggleViewed:c,onLineActivate:f,onDraftChange:d,onSaveDraft:p,onCancelDraft:g,onDeleteThread:y,onAddReply:v,onRequestAgent:b}){const S=me.useMemo(()=>({...BO,diffStyle:n,onLineNumberClick:({lineNumber:O,annotationSide:A})=>{f(e.id,O,A)}}),[n,e.id,f]),k=me.useCallback(O=>{const A=O.metadata;return A.type==="draft"?te.jsx(O2,{body:A.draft.body,onChange:d,onSave:p,onCancel:g}):te.jsx(PO,{thread:A.thread,onDelete:()=>y(A.thread.id),onAddReply:T=>v(A.thread.id,T),onRequestAgent:()=>b(A.thread.id)})},[d,p,g,y,v,b]);return te.jsxs("section",{className:"file-section",id:`file-${e.id}`,children:[te.jsxs("div",{className:"file-header",children:[te.jsxs("button",{type:"button",className:"file-toggle",onClick:()=>s(e.id),"aria-label":i?"Expand file":"Collapse file",children:[i?te.jsx(d2,{size:14}):te.jsx(c2,{size:14}),te.jsx("span",{className:"file-path",children:e.displayPath})]}),te.jsxs("div",{className:"file-meta",children:[te.jsxs("span",{className:"stat-add",children:["+",e.additions]}),te.jsxs("span",{className:"stat-del",children:["-",e.deletions]}),te.jsxs("button",{type:"button",className:`viewed-btn${a?" checked":""}`,onClick:()=>c(e.id),"aria-label":a?"Mark as not viewed":"Mark as viewed",children:[te.jsx("span",{className:"viewed-check",children:a&&te.jsx(s2,{size:10,strokeWidth:3})}),"viewed"]})]})]}),!i&&te.jsx("div",{className:"file-body",children:te.jsx(e2,{className:"diff-view",fileDiff:e.file,options:S,lineAnnotations:o,renderAnnotation:k})})]})}function jO({open:e,files:n,viewed:i,onJumpToFile:a}){return te.jsx("aside",{className:`sidebar${e?" open":""}`,children:n.map(o=>te.jsxs("button",{type:"button",className:`sidebar-item${i[o.id]?" viewed":""}`,onClick:()=>a(o.id),children:[te.jsx("span",{className:"sidebar-path",children:o.displayPath}),te.jsxs("span",{className:"sidebar-stats",children:[te.jsxs("span",{className:"stat-add",children:["+",o.additions]}),te.jsxs("span",{className:"stat-del",children:["-",o.deletions]})]})]},o.id))})}function _s({icon:e,label:n,size:i=14,className:a="",...o}){return te.jsx("button",{type:"button",className:`icon-btn ${a}`,"aria-label":n,...o,children:te.jsx(e,{size:i})})}function GO({value:e,options:n,onChange:i}){return te.jsx("div",{className:"toggle-group",role:"radiogroup",children:n.map(a=>te.jsx("button",{type:"button",role:"radio","aria-checked":e===a,className:`toggle-group-item${e===a?" active":""}`,onClick:()=>i(a),children:a},a))})}function qO({fileCount:e,viewedCount:n,additions:i,deletions:a,commentCount:o,diffCommand:s,diffStyle:c,sidebarOpen:f,finished:d,status:p,onToggleSidebar:g,onExpandAll:y,onCollapseViewed:v,onCollapseAll:b,onDiffStyleChange:S,onSubmit:k,onCancel:O}){return te.jsxs("header",{className:"top-bar",children:[te.jsxs("div",{className:"top-bar-left",children:[te.jsx(_s,{icon:x2,label:"Toggle file list",className:f?"active":"",onClick:g}),te.jsxs("span",{className:"meta",children:[n,"/",e]}),te.jsxs("span",{className:"stat-add",children:["+",i]}),te.jsxs("span",{className:"stat-del",children:["-",a]}),o>0&&te.jsxs("span",{className:"meta comment-count",children:[te.jsx(Yv,{size:12}),o]}),s&&te.jsx("span",{className:"meta dim",children:s})]}),te.jsxs("div",{className:"top-bar-right",children:[p&&te.jsx("span",{className:"meta status-text",children:p}),te.jsxs("div",{className:"btn-group",children:[te.jsx(_s,{icon:g2,label:"Expand all files",onClick:y}),te.jsx(_s,{icon:b2,label:"Collapse viewed files",onClick:v}),te.jsx(_s,{icon:p2,label:"Collapse all files",onClick:b})]}),te.jsx(GO,{value:c,options:["split","unified"],onChange:S}),te.jsxs("button",{type:"button",className:"btn primary",onClick:k,disabled:d,children:[te.jsx(w2,{size:12}),"submit"]}),te.jsxs("button",{type:"button",className:"btn ghost",onClick:O,disabled:d,children:[te.jsx(D2,{size:12}),"cancel"]})]})]})}function $O(e,n,i){if(!e.trim())return[];const a=qT(e,i);let o=0;return a.flatMap(s=>s.files.map(c=>{const f=c.hunks.reduce((y,v)=>y+v.hunkContent.reduce((b,S)=>b+(S.type==="change"?S.additions:0),0),0),d=c.hunks.reduce((y,v)=>y+v.hunkContent.reduce((b,S)=>b+(S.type==="change"?S.deletions:0),0),0),p=c.prevName&&c.prevName!==c.name?`${c.prevName} → ${c.name}`:c.name,g=FO(c,n);return{id:c.cacheKey??`${c.name}::${o++}`,file:c,displayPath:p,oldRepoPath:g.oldRepoPath,newRepoPath:g.newRepoPath,additions:f,deletions:d}}))}function FO(e,n){const i=n?.find(a=>YO(a,e));return i?{oldRepoPath:i.oldPath,newRepoPath:i.newPath??i.path}:{oldRepoPath:e.prevName,newRepoPath:e.name}}function YO(e,n){return e.path===n.name||e.newPath===n.name||e.oldPath&&e.oldPath===n.prevName?!0:e.path===n.prevName}const XO=[],QO={diffStyle:"split",sidebarOpen:!1,collapsedFileIds:[],viewedFileIds:[],threads:[]};function ZO(){const[e,n]=me.useState(null),[i,a]=me.useState(null),[o,s]=me.useState(QO),[c,f]=me.useState(null),[d,p]=me.useState(!1),[g,y]=me.useState(""),v=me.useCallback(x=>{s(x)},[]),b=me.useCallback(async(x,R={})=>{try{const V=await x;v(V.state)}catch(V){R.onError?.(),y(V instanceof Error?V.message:String(V))}},[v]);me.useEffect(()=>{FS().then(x=>{if(!x.state)throw new Error("diff tool bootstrap response did not include review state");return n(x),v(x.state),YS()}).then(x=>a(x)).catch(x=>y(x instanceof Error?x.message:String(x)))},[v]);const S=i&&"patch"in i?i.patch:"",k=me.useMemo(()=>$O(S,e?.files,e?.context.sessionId),[S,e]),O=me.useMemo(()=>gb(o.collapsedFileIds),[o.collapsedFileIds]),A=me.useMemo(()=>gb(o.viewedFileIds),[o.viewedFileIds]),T=me.useMemo(()=>k.reduce((x,R)=>({additions:x.additions+R.additions,deletions:x.deletions+R.deletions}),{additions:0,deletions:0}),[k]),L=me.useCallback(x=>{document.getElementById(`file-${x}`)?.scrollIntoView({behavior:"smooth",block:"start"})},[]),U=me.useCallback(x=>{b(tr({collapsedFileIds:yb(o.collapsedFileIds,x)}))},[o.collapsedFileIds,b]),B=me.useCallback(x=>{const R=yb(o.viewedFileIds,x),w=R.includes(x)?bb([...o.collapsedFileIds,x]):o.collapsedFileIds;b(tr({viewedFileIds:R,collapsedFileIds:w}))},[o.collapsedFileIds,o.viewedFileIds,b]),N=me.useCallback(()=>{b(tr({collapsedFileIds:[]}))},[b]),G=me.useCallback(()=>{b(tr({collapsedFileIds:k.map(x=>x.id)}))},[k,b]),$=me.useCallback(()=>{b(tr({collapsedFileIds:bb([...o.collapsedFileIds,...o.viewedFileIds])}))},[o.collapsedFileIds,o.viewedFileIds,b]),ie=me.useCallback((x,R,V)=>{f(w=>w&&w.fileId===x&&w.lineNumber===R&&w.side===V?w:{fileId:x,lineNumber:R,side:V,body:""})},[]),ne=me.useCallback(x=>{f(R=>R&&{...R,body:x})},[]),K=me.useCallback(()=>{if(!c)return;const x=c.body.trim();if(!x){f(null);return}const R=k.find(w=>w.id===c.fileId),V=c.side==="deletions"?R?.oldRepoPath??R?.newRepoPath??c.fileId:R?.newRepoPath??R?.oldRepoPath??c.fileId;b(XS({fileId:c.fileId,filePath:V,lineNumber:c.lineNumber,side:c.side,body:x}).then(w=>(f(null),w)))},[c,k,b]),W=me.useCallback(()=>f(null),[]),ue=me.useCallback(x=>{b(ZS(x))},[b]),J=me.useCallback((x,R)=>{b(QS({id:x,text:R}))},[b]),ee=me.useCallback(x=>{y(""),s(R=>({...R,threads:R.threads.map(V=>V.id===x?{...V,loading:!0}:V)})),b(KS(x),{onError:()=>{s(R=>({...R,threads:R.threads.map(V=>V.id===x?{...V,loading:!1}:V)}))}})},[b]),z=me.useMemo(()=>{const x=new Map;for(const R of o.threads){const V={lineNumber:R.lineNumber,side:R.side,metadata:{type:"thread",thread:R}},w=x.get(R.fileId);w?w.push(V):x.set(R.fileId,[V])}return x},[o.threads]),Y=me.useMemo(()=>c?{lineNumber:c.lineNumber,side:c.side,metadata:{type:"draft",draft:c}}:null,[c]),ae=async()=>{p(!0),y("Returning review…");try{await WS(),y("Review returned. You can close this tab.")}catch(x){p(!1),y(x instanceof Error?x.message:String(x))}},de=async()=>{p(!0),y("Cancelling…");try{await JS(),y("Cancelled. You can close this tab.")}catch(x){p(!1),y(x instanceof Error?x.message:String(x))}};return te.jsxs("div",{className:`app${o.sidebarOpen?" sidebar-open":""}`,children:[te.jsx(qO,{fileCount:k.length,viewedCount:o.viewedFileIds.length,additions:T.additions,deletions:T.deletions,commentCount:o.threads.length,diffCommand:e?.context.diffCommand,diffStyle:o.diffStyle,sidebarOpen:o.sidebarOpen,finished:d,status:g,onToggleSidebar:()=>{b(tr({sidebarOpen:!o.sidebarOpen}))},onExpandAll:N,onCollapseViewed:$,onCollapseAll:G,onDiffStyleChange:x=>{b(tr({diffStyle:x}))},onSubmit:ae,onCancel:de}),te.jsx(jO,{open:o.sidebarOpen,files:k,viewed:A,onJumpToFile:L}),te.jsxs("main",{className:"content",children:[k.length===0&&te.jsx("div",{className:"empty",children:g||"loading…"}),k.map(x=>{const R=z.get(x.id)??XO,V=c&&c.fileId===x.id&&Y?[...R,Y]:R;return te.jsx(VO,{file:x,diffStyle:o.diffStyle,collapsed:O[x.id]??!1,viewed:A[x.id]??!1,annotations:V,onToggleCollapsed:U,onToggleViewed:B,onLineActivate:ie,onDraftChange:ne,onSaveDraft:K,onCancelDraft:W,onDeleteThread:ue,onAddReply:J,onRequestAgent:ee},x.id)})]})]})}function gb(e){return Object.fromEntries(e.map(n=>[n,!0]))}function yb(e,n){return e.includes(n)?e.filter(i=>i!==n):[...e,n]}function bb(e){return[...new Set(e)]}$S.createRoot(document.getElementById("root")).render(te.jsx(me.StrictMode,{children:te.jsx(ZO,{})}));