@markusylisiurunen/tau 0.2.111 → 0.2.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/dist/core/config/content_loader.js +3 -1
- package/dist/core/config/content_loader.js.map +1 -1
- package/dist/core/diff_review/index.js.map +1 -1
- package/dist/core/diff_review/session.js +2 -2
- package/dist/core/diff_review/session.js.map +1 -1
- package/dist/core/diff_review/snapshot.js +92 -20
- package/dist/core/diff_review/snapshot.js.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/personas.js +2 -1
- package/dist/core/personas.js.map +1 -1
- package/dist/core/session/runner.js +59 -1
- package/dist/core/session/runner.js.map +1 -1
- package/dist/core/tools/catalog.js +3 -1
- package/dist/core/tools/catalog.js.map +1 -1
- package/dist/core/tools/diff_review.js +369 -0
- package/dist/core/tools/diff_review.js.map +1 -0
- package/dist/core/tools/registry.js.map +1 -1
- package/dist/core/tools/tool_names.js +2 -0
- package/dist/core/tools/tool_names.js.map +1 -1
- package/dist/core/version.js +1 -1
- package/dist/diff_tool/app/dist/assets/{angular-html-CU67Zn6k.js → angular-html-DMxchsRu.js} +1 -1
- package/dist/diff_tool/app/dist/assets/angular-ts-DzOHUlBM.js +1 -0
- package/dist/diff_tool/app/dist/assets/{index-Czg-eJwd.css → index-BuEYkrDR.css} +1 -1
- package/dist/diff_tool/app/dist/assets/index-Cpuc6JJD.js +252 -0
- package/dist/diff_tool/app/dist/index.html +2 -2
- package/dist/main.js +10 -2
- package/dist/main.js.map +1 -1
- package/dist/starter/prompts/guided-review-branch.md +7 -0
- package/dist/starter/prompts/guided-review-current-changes.md +7 -0
- package/dist/starter/prompts/guided-review-last-commit.md +7 -0
- package/dist/starter/skills/guided-review/SKILL.md +91 -0
- package/dist/tui/chat_controller/diff_review_service.js +2 -2
- package/dist/tui/chat_controller/diff_review_service.js.map +1 -1
- package/dist/tui/chat_controller.js +9 -4
- package/dist/tui/chat_controller.js.map +1 -1
- package/dist/tui/tool_ui_router.js +38 -0
- package/dist/tui/tool_ui_router.js.map +1 -1
- package/dist/tui/ui/tool_ui_registry.js +170 -0
- package/dist/tui/ui/tool_ui_registry.js.map +1 -1
- package/package.json +4 -4
- package/dist/diff_tool/app/dist/assets/angular-ts-BwZT4LLn.js +0 -1
- package/dist/diff_tool/app/dist/assets/index-D1e3Qk8w.js +0 -1887
|
@@ -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 t=document.createElement("link").relList;if(t&&t.supports&&t.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 Ub(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bf={exports:{}},yl={};var Sy;function lE(){if(Sy)return yl;Sy=1;var e=Symbol.for("react.transitional.element"),t=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 yl.Fragment=t,yl.jsx=i,yl.jsxs=i,yl}var Ey;function oE(){return Ey||(Ey=1,bf.exports=lE()),bf.exports}var H=oE(),vf={exports:{}},Ee={};var xy;function sE(){if(xy)return Ee;xy=1;var e=Symbol.for("react.transitional.element"),t=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(O){return O===null||typeof O!="object"?null:(O=v&&O[v]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,D={};function x(O,F,w){this.props=O,this.context=F,this.refs=D,this.updater=w||S}x.prototype.isReactComponent={},x.prototype.setState=function(O,F){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,F,"setState")},x.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function T(){}T.prototype=x.prototype;function k(O,F,w){this.props=O,this.context=F,this.refs=D,this.updater=w||S}var I=k.prototype=new T;I.constructor=k,A(I,x.prototype),I.isPureReactComponent=!0;var z=Array.isArray;function R(){}var P={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function ee(O,F,w){var se=w.ref;return{$$typeof:e,type:O,key:F,ref:se!==void 0?se:null,props:w}}function ae(O,F){return ee(O.type,F,O.props)}function ne(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function W(O){var F={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(w){return F[w]})}var fe=/\/+/g;function ie(O,F){return typeof O=="object"&&O!==null&&O.key!=null?W(""+O.key):F.toString(36)}function te(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(R,R):(O.status="pending",O.then(function(F){O.status==="pending"&&(O.status="fulfilled",O.value=F)},function(F){O.status==="pending"&&(O.status="rejected",O.reason=F)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function B(O,F,w,se,me){var ce=typeof O;(ce==="undefined"||ce==="boolean")&&(O=null);var be=!1;if(O===null)be=!0;else switch(ce){case"bigint":case"string":case"number":be=!0;break;case"object":switch(O.$$typeof){case e:case t:be=!0;break;case g:return be=O._init,B(be(O._payload),F,w,se,me)}}if(be)return me=me(O),be=se===""?"."+ie(O,0):se,z(me)?(w="",be!=null&&(w=be.replace(fe,"$&/")+"/"),B(me,F,w,"",function(Xe){return Xe})):me!=null&&(ne(me)&&(me=ae(me,w+(me.key==null||O&&O.key===me.key?"":(""+me.key).replace(fe,"$&/")+"/")+be)),F.push(me)),1;be=0;var Te=se===""?".":se+":";if(z(O))for(var Le=0;Le<O.length;Le++)se=O[Le],ce=Te+ie(se,Le),be+=B(se,F,w,ce,me);else if(Le=b(O),typeof Le=="function")for(O=Le.call(O),Le=0;!(se=O.next()).done;)se=se.value,ce=Te+ie(se,Le++),be+=B(se,F,w,ce,me);else if(ce==="object"){if(typeof O.then=="function")return B(te(O),F,w,se,me);throw F=String(O),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return be}function X(O,F,w){if(O==null)return O;var se=[],me=0;return B(O,se,"","",function(ce){return F.call(w,ce,me++)}),se}function oe(O){if(O._status===-1){var F=O._result;F=F(),F.then(function(w){(O._status===0||O._status===-1)&&(O._status=1,O._result=w)},function(w){(O._status===0||O._status===-1)&&(O._status=2,O._result=w)}),O._status===-1&&(O._status=0,O._result=F)}if(O._status===1)return O._result.default;throw O._result}var he=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},L={map:X,forEach:function(O,F,w){X(O,function(){F.apply(this,arguments)},w)},count:function(O){var F=0;return X(O,function(){F++}),F},toArray:function(O){return X(O,function(F){return F})||[]},only:function(O){if(!ne(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Ee.Activity=y,Ee.Children=L,Ee.Component=x,Ee.Fragment=i,Ee.Profiler=o,Ee.PureComponent=k,Ee.StrictMode=a,Ee.Suspense=d,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,Ee.__COMPILER_RUNTIME={__proto__:null,c:function(O){return P.H.useMemoCache(O)}},Ee.cache=function(O){return function(){return O.apply(null,arguments)}},Ee.cacheSignal=function(){return null},Ee.cloneElement=function(O,F,w){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var se=A({},O.props),me=O.key;if(F!=null)for(ce in F.key!==void 0&&(me=""+F.key),F)!G.call(F,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&F.ref===void 0||(se[ce]=F[ce]);var ce=arguments.length-2;if(ce===1)se.children=w;else if(1<ce){for(var be=Array(ce),Te=0;Te<ce;Te++)be[Te]=arguments[Te+2];se.children=be}return ee(O.type,me,se)},Ee.createContext=function(O){return O={$$typeof:c,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:s,_context:O},O},Ee.createElement=function(O,F,w){var se,me={},ce=null;if(F!=null)for(se in F.key!==void 0&&(ce=""+F.key),F)G.call(F,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(me[se]=F[se]);var be=arguments.length-2;if(be===1)me.children=w;else if(1<be){for(var Te=Array(be),Le=0;Le<be;Le++)Te[Le]=arguments[Le+2];me.children=Te}if(O&&O.defaultProps)for(se in be=O.defaultProps,be)me[se]===void 0&&(me[se]=be[se]);return ee(O,ce,me)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(O){return{$$typeof:f,render:O}},Ee.isValidElement=ne,Ee.lazy=function(O){return{$$typeof:g,_payload:{_status:-1,_result:O},_init:oe}},Ee.memo=function(O,F){return{$$typeof:p,type:O,compare:F===void 0?null:F}},Ee.startTransition=function(O){var F=P.T,w={};P.T=w;try{var se=O(),me=P.S;me!==null&&me(w,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(R,he)}catch(ce){he(ce)}finally{F!==null&&w.types!==null&&(F.types=w.types),P.T=F}},Ee.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},Ee.use=function(O){return P.H.use(O)},Ee.useActionState=function(O,F,w){return P.H.useActionState(O,F,w)},Ee.useCallback=function(O,F){return P.H.useCallback(O,F)},Ee.useContext=function(O){return P.H.useContext(O)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(O,F){return P.H.useDeferredValue(O,F)},Ee.useEffect=function(O,F){return P.H.useEffect(O,F)},Ee.useEffectEvent=function(O){return P.H.useEffectEvent(O)},Ee.useId=function(){return P.H.useId()},Ee.useImperativeHandle=function(O,F,w){return P.H.useImperativeHandle(O,F,w)},Ee.useInsertionEffect=function(O,F){return P.H.useInsertionEffect(O,F)},Ee.useLayoutEffect=function(O,F){return P.H.useLayoutEffect(O,F)},Ee.useMemo=function(O,F){return P.H.useMemo(O,F)},Ee.useOptimistic=function(O,F){return P.H.useOptimistic(O,F)},Ee.useReducer=function(O,F,w){return P.H.useReducer(O,F,w)},Ee.useRef=function(O){return P.H.useRef(O)},Ee.useState=function(O){return P.H.useState(O)},Ee.useSyncExternalStore=function(O,F,w){return P.H.useSyncExternalStore(O,F,w)},Ee.useTransition=function(){return P.H.useTransition()},Ee.version="19.2.5",Ee}var Cy;function qd(){return Cy||(Cy=1,vf.exports=sE()),vf.exports}var re=qd(),_f={exports:{}},bl={},Sf={exports:{}},Ef={};var wy;function uE(){return wy||(wy=1,(function(e){function t(B,X){var oe=B.length;B.push(X);e:for(;0<oe;){var he=oe-1>>>1,L=B[he];if(0<o(L,X))B[he]=X,B[oe]=L,oe=he;else break e}}function i(B){return B.length===0?null:B[0]}function a(B){if(B.length===0)return null;var X=B[0],oe=B.pop();if(oe!==X){B[0]=oe;e:for(var he=0,L=B.length,O=L>>>1;he<O;){var F=2*(he+1)-1,w=B[F],se=F+1,me=B[se];if(0>o(w,oe))se<L&&0>o(me,w)?(B[he]=me,B[se]=oe,he=se):(B[he]=w,B[F]=oe,he=F);else if(se<L&&0>o(me,oe))B[he]=me,B[se]=oe,he=se;else break e}}return X}function o(B,X){var oe=B.sortIndex-X.sortIndex;return oe!==0?oe:B.id-X.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,A=!1,D=!1,x=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function I(B){for(var X=i(p);X!==null;){if(X.callback===null)a(p);else if(X.startTime<=B)a(p),X.sortIndex=X.expirationTime,t(d,X);else break;X=i(p)}}function z(B){if(A=!1,I(B),!S)if(i(d)!==null)S=!0,R||(R=!0,W());else{var X=i(p);X!==null&&te(z,X.startTime-B)}}var R=!1,P=-1,G=5,ee=-1;function ae(){return D?!0:!(e.unstable_now()-ee<G)}function ne(){if(D=!1,R){var B=e.unstable_now();ee=B;var X=!0;try{e:{S=!1,A&&(A=!1,T(P),P=-1),b=!0;var oe=v;try{t:{for(I(B),y=i(d);y!==null&&!(y.expirationTime>B&&ae());){var he=y.callback;if(typeof he=="function"){y.callback=null,v=y.priorityLevel;var L=he(y.expirationTime<=B);if(B=e.unstable_now(),typeof L=="function"){y.callback=L,I(B),X=!0;break t}y===i(d)&&a(d),I(B)}else a(d);y=i(d)}if(y!==null)X=!0;else{var O=i(p);O!==null&&te(z,O.startTime-B),X=!1}}break e}finally{y=null,v=oe,b=!1}X=void 0}}finally{X?W():R=!1}}}var W;if(typeof k=="function")W=function(){k(ne)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,ie=fe.port2;fe.port1.onmessage=ne,W=function(){ie.postMessage(null)}}else W=function(){x(ne,0)};function te(B,X){P=x(function(){B(e.unstable_now())},X)}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(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(B){switch(v){case 1:case 2:case 3:var X=3;break;default:X=v}var oe=v;v=X;try{return B()}finally{v=oe}},e.unstable_requestPaint=function(){D=!0},e.unstable_runWithPriority=function(B,X){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var oe=v;v=B;try{return X()}finally{v=oe}},e.unstable_scheduleCallback=function(B,X,oe){var he=e.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?he+oe:he):oe=he,B){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=oe+L,B={id:g++,callback:X,priorityLevel:B,startTime:oe,expirationTime:L,sortIndex:-1},oe>he?(B.sortIndex=oe,t(p,B),i(d)===null&&B===i(p)&&(A?(T(P),P=-1):A=!0,te(z,oe-he))):(B.sortIndex=L,t(d,B),S||b||(S=!0,R||(R=!0,W()))),B},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(B){var X=v;return function(){var oe=v;v=X;try{return B.apply(this,arguments)}finally{v=oe}}}})(Ef)),Ef}var ky;function cE(){return ky||(ky=1,Sf.exports=uE()),Sf.exports}var xf={exports:{}},Rt={};var Ay;function fE(){if(Ay)return Rt;Ay=1;var e=qd();function t(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(t(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 Rt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Rt.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(t(299));return s(d,p,null,g)},Rt.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()}},Rt.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))},Rt.prefetchDNS=function(d){typeof d=="string"&&a.d.D(d)},Rt.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})}},Rt.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)},Rt.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})}},Rt.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)},Rt.requestFormReset=function(d){a.d.r(d)},Rt.unstable_batchedUpdates=function(d,p){return d(p)},Rt.useFormState=function(d,p,g){return c.H.useFormState(d,p,g)},Rt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Rt.version="19.2.5",Rt}var Ty;function dE(){if(Ty)return xf.exports;Ty=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),xf.exports=fE(),xf.exports}var Ly;function hE(){if(Ly)return bl;Ly=1;var e=cE(),t=qd(),i=dE();function a(n){var r="https://react.dev/errors/"+n;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 #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function s(n){var r=n,l=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(l=r.return),n=r.return;while(n)}return r.tag===3?l:null}function c(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function f(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function d(n){if(s(n)!==n)throw Error(a(188))}function p(n){var r=n.alternate;if(!r){if(r=s(n),r===null)throw Error(a(188));return r!==n?null:n}for(var l=n,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),n;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?n:r}function g(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=g(n),r!==null)return r;n=n.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),k=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),ae=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function W(n){return n===null||typeof n!="object"?null:(n=ne&&n[ne]||n["@@iterator"],typeof n=="function"?n:null)}var fe=Symbol.for("react.client.reference");function ie(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===fe?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case A:return"Fragment";case x:return"Profiler";case D:return"StrictMode";case z:return"Suspense";case R:return"SuspenseList";case ee:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case k:return n.displayName||"Context";case T:return(n._context.displayName||"Context")+".Consumer";case I:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case P:return r=n.displayName||null,r!==null?r:ie(n.type)||"Memo";case G:r=n._payload,n=n._init;try{return ie(n(r))}catch{}}return null}var te=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},he=[],L=-1;function O(n){return{current:n}}function F(n){0>L||(n.current=he[L],he[L]=null,L--)}function w(n,r){L++,he[L]=n.current,n.current=r}var se=O(null),me=O(null),ce=O(null),be=O(null);function Te(n,r){switch(w(ce,r),w(me,n),w(se,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?$g(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=$g(r),n=qg(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}F(se),w(se,n)}function Le(){F(se),F(me),F(ce)}function Xe(n){n.memoizedState!==null&&w(be,n);var r=se.current,l=qg(r,n.type);r!==l&&(w(me,n),w(se,l))}function et(n){me.current===n&&(F(se),F(me)),be.current===n&&(F(be),hl._currentValue=oe)}var qt,xt;function gn(n){if(qt===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);qt=r&&r[1]||"",xt=-1<l.stack.indexOf(`
|
|
3
|
-
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
-
`+qt+n+xt}var oi=!1;function si(n,r){if(!n||oi)return"";oi=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var J=function(){throw Error()};if(Object.defineProperty(J.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(J,[])}catch(q){var $=q}Reflect.construct(n,[],J)}else{try{J.call()}catch(q){$=q}n.call(J.prototype)}}else{try{throw Error()}catch(q){$=q}(J=n())&&typeof J.catch=="function"&&J.catch(function(){})}}catch(q){if(q&&$&&typeof q.stack=="string")return[q.stack,$.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 N=_.split(`
|
|
5
|
-
`),V=E.split(`
|
|
6
|
-
`);for(h=u=0;u<N.length&&!N[u].includes("DetermineComponentFrameRoot");)u++;for(;h<V.length&&!V[h].includes("DetermineComponentFrameRoot");)h++;if(u===N.length||h===V.length)for(u=N.length-1,h=V.length-1;1<=u&&0<=h&&N[u]!==V[h];)h--;for(;1<=u&&0<=h;u--,h--)if(N[u]!==V[h]){if(u!==1||h!==1)do if(u--,h--,0>h||N[u]!==V[h]){var Y=`
|
|
7
|
-
`+N[u].replace(" at new "," at ");return n.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",n.displayName)),Y}while(1<=u&&0<=h);break}}}finally{oi=!1,Error.prepareStackTrace=l}return(l=n?n.displayName||n.name:"")?gn(l):""}function ui(n,r){switch(n.tag){case 26:case 27:case 5:return gn(n.type);case 16:return gn("Lazy");case 13:return n.child!==r&&r!==null?gn("Suspense Fallback"):gn("Suspense");case 19:return gn("SuspenseList");case 0:case 15:return si(n.type,!1);case 11:return si(n.type.render,!1);case 1:return si(n.type,!0);case 31:return gn("Activity");default:return""}}function mr(n){try{var r="",l=null;do r+=ui(n,l),l=n,n=n.return;while(n);return r}catch(u){return`
|
|
8
|
-
Error generating stack: `+u.message+`
|
|
9
|
-
`+u.stack}}var ci=Object.prototype.hasOwnProperty,fi=e.unstable_scheduleCallback,di=e.unstable_cancelCallback,gr=e.unstable_shouldYield,Ca=e.unstable_requestPaint,Ct=e.unstable_now,wa=e.unstable_getCurrentPriorityLevel,Q=e.unstable_ImmediatePriority,ue=e.unstable_UserBlockingPriority,_e=e.unstable_NormalPriority,Z=e.unstable_LowPriority,pe=e.unstable_IdlePriority,xe=e.log,Qe=e.unstable_setDisableYieldValue,nt=null,Be=null;function st(n){if(typeof xe=="function"&&Qe(n),Be&&typeof Be.setStrictMode=="function")try{Be.setStrictMode(nt,n)}catch{}}var Fe=Math.clz32?Math.clz32:F1,hi=Math.log,yn=Math.LN2;function F1(n){return n>>>=0,n===0?32:31-(hi(n)/yn|0)|0}var $l=256,ql=262144,Fl=4194304;function Gi(n){var r=n&42;if(r!==0)return r;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Yl(n,r,l){var u=n.pendingLanes;if(u===0)return 0;var h=0,m=n.suspendedLanes,_=n.pingedLanes;n=n.warmLanes;var E=u&134217727;return E!==0?(u=E&~m,u!==0?h=Gi(u):(_&=E,_!==0?h=Gi(_):l||(l=E&~n,l!==0&&(h=Gi(l))))):(E=u&~m,E!==0?h=Gi(E):_!==0?h=Gi(_):l||(l=u&~n,l!==0&&(h=Gi(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 ka(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function Y1(n,r){switch(n){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 wh(){var n=Fl;return Fl<<=1,(Fl&62914560)===0&&(Fl=4194304),n}function au(n){for(var r=[],l=0;31>l;l++)r.push(n);return r}function Aa(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function X1(n,r,l,u,h,m){var _=n.pendingLanes;n.pendingLanes=l,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=l,n.entangledLanes&=l,n.errorRecoveryDisabledLanes&=l,n.shellSuspendCounter=0;var E=n.entanglements,N=n.expirationTimes,V=n.hiddenUpdates;for(l=_&~l;0<l;){var Y=31-Fe(l),J=1<<Y;E[Y]=0,N[Y]=-1;var $=V[Y];if($!==null)for(V[Y]=null,Y=0;Y<$.length;Y++){var q=$[Y];q!==null&&(q.lane&=-536870913)}l&=~J}u!==0&&kh(n,u,0),m!==0&&h===0&&n.tag!==0&&(n.suspendedLanes|=m&~(_&~r))}function kh(n,r,l){n.pendingLanes|=r,n.suspendedLanes&=~r;var u=31-Fe(r);n.entangledLanes|=r,n.entanglements[u]=n.entanglements[u]|1073741824|l&261930}function Ah(n,r){var l=n.entangledLanes|=r;for(n=n.entanglements;l;){var u=31-Fe(l),h=1<<u;h&r|n[u]&r&&(n[u]|=r),l&=~h}}function Th(n,r){var l=r&-r;return l=(l&42)!==0?1:lu(l),(l&(n.suspendedLanes|r))!==0?0:l}function lu(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function ou(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Lh(){var n=X.p;return n!==0?n:(n=window.event,n===void 0?32:py(n.type))}function Rh(n,r){var l=X.p;try{return X.p=n,r()}finally{X.p=l}}var pi=Math.random().toString(36).slice(2),wt="__reactFiber$"+pi,It="__reactProps$"+pi,yr="__reactContainer$"+pi,su="__reactEvents$"+pi,Q1="__reactListeners$"+pi,Z1="__reactHandles$"+pi,Dh="__reactResources$"+pi,Ta="__reactMarker$"+pi;function uu(n){delete n[wt],delete n[It],delete n[su],delete n[Q1],delete n[Z1]}function br(n){var r=n[wt];if(r)return r;for(var l=n.parentNode;l;){if(r=l[yr]||l[wt]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(n=Wg(n);n!==null;){if(l=n[wt])return l;n=Wg(n)}return r}n=l,l=n.parentNode}return null}function vr(n){if(n=n[wt]||n[yr]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function La(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(a(33))}function _r(n){var r=n[Dh];return r||(r=n[Dh]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function vt(n){n[Ta]=!0}var Nh=new Set,Oh={};function $i(n,r){Sr(n,r),Sr(n+"Capture",r)}function Sr(n,r){for(Oh[n]=r,n=0;n<r.length;n++)Nh.add(r[n])}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]*$"),Mh={},Ih={};function W1(n){return ci.call(Ih,n)?!0:ci.call(Mh,n)?!1:K1.test(n)?Ih[n]=!0:(Mh[n]=!0,!1)}function Xl(n,r,l){if(W1(r))if(l===null)n.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+l)}}function Ql(n,r,l){if(l===null)n.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+l)}}function Hn(n,r,l,u){if(u===null)n.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(l);return}n.setAttributeNS(r,l,""+u)}}function tn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function zh(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function J1(n,r,l){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var h=u.get,m=u.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return h.call(this)},set:function(_){l=""+_,m.call(this,_)}}),Object.defineProperty(n,r,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(_){l=""+_},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function cu(n){if(!n._valueTracker){var r=zh(n)?"checked":"value";n._valueTracker=J1(n,r,""+n[r])}}function Uh(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var l=r.getValue(),u="";return n&&(u=zh(n)?n.checked?"true":"false":n.value),n=u,n!==l?(r.setValue(n),!0):!1}function Zl(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var e_=/[\n"\\]/g;function nn(n){return n.replace(e_,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function fu(n,r,l,u,h,m,_,E){n.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?n.type=_:n.removeAttribute("type"),r!=null?_==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+tn(r)):n.value!==""+tn(r)&&(n.value=""+tn(r)):_!=="submit"&&_!=="reset"||n.removeAttribute("value"),r!=null?du(n,_,tn(r)):l!=null?du(n,_,tn(l)):u!=null&&n.removeAttribute("value"),h==null&&m!=null&&(n.defaultChecked=!!m),h!=null&&(n.checked=h&&typeof h!="function"&&typeof h!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?n.name=""+tn(E):n.removeAttribute("name")}function Hh(n,r,l,u,h,m,_,E){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(n.type=m),r!=null||l!=null){if(!(m!=="submit"&&m!=="reset"||r!=null)){cu(n);return}l=l!=null?""+tn(l):"",r=r!=null?""+tn(r):l,E||r===n.value||(n.value=r),n.defaultValue=r}u=u??h,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=E?n.checked:!!u,n.defaultChecked=!!u,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(n.name=_),cu(n)}function du(n,r,l){r==="number"&&Zl(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function Er(n,r,l,u){if(n=n.options,r){r={};for(var h=0;h<l.length;h++)r["$"+l[h]]=!0;for(l=0;l<n.length;l++)h=r.hasOwnProperty("$"+n[l].value),n[l].selected!==h&&(n[l].selected=h),h&&u&&(n[l].defaultSelected=!0)}else{for(l=""+tn(l),r=null,h=0;h<n.length;h++){if(n[h].value===l){n[h].selected=!0,u&&(n[h].defaultSelected=!0);return}r!==null||n[h].disabled||(r=n[h])}r!==null&&(r.selected=!0)}}function Ph(n,r,l){if(r!=null&&(r=""+tn(r),r!==n.value&&(n.value=r),l==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=l!=null?""+tn(l):""}function Bh(n,r,l,u){if(r==null){if(u!=null){if(l!=null)throw Error(a(92));if(te(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),r=l}l=tn(r),n.defaultValue=l,u=n.textContent,u===l&&u!==""&&u!==null&&(n.value=u),cu(n)}function xr(n,r){if(r){var l=n.firstChild;if(l&&l===n.lastChild&&l.nodeType===3){l.nodeValue=r;return}}n.textContent=r}var t_=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 jh(n,r,l){var u=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":u?n.setProperty(r,l):typeof l!="number"||l===0||t_.has(r)?r==="float"?n.cssFloat=l:n[r]=(""+l).trim():n[r]=l+"px"}function Vh(n,r,l){if(r!=null&&typeof r!="object")throw Error(a(62));if(n=n.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var h in r)u=r[h],r.hasOwnProperty(h)&&l[h]!==u&&jh(n,h,u)}else for(var m in r)r.hasOwnProperty(m)&&jh(n,m,r[m])}function hu(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var n_=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"]]),i_=/^[\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 Kl(n){return i_.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Pn(){}var pu=null;function mu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Cr=null,wr=null;function Gh(n){var r=vr(n);if(r&&(n=r.stateNode)){var l=n[It]||null;e:switch(n=r.stateNode,r.type){case"input":if(fu(n,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=n;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+nn(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var u=l[r];if(u!==n&&u.form===n.form){var h=u[It]||null;if(!h)throw Error(a(90));fu(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===n.form&&Uh(u)}break e;case"textarea":Ph(n,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&Er(n,!!l.multiple,r,!1)}}}var gu=!1;function $h(n,r,l){if(gu)return n(r,l);gu=!0;try{var u=n(r);return u}finally{if(gu=!1,(Cr!==null||wr!==null)&&(Po(),Cr&&(r=Cr,n=wr,wr=Cr=null,Gh(r),n)))for(r=0;r<n.length;r++)Gh(n[r])}}function Ra(n,r){var l=n.stateNode;if(l===null)return null;var u=l[It]||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)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(l&&typeof l!="function")throw Error(a(231,r,typeof l));return l}var Bn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yu=!1;if(Bn)try{var Da={};Object.defineProperty(Da,"passive",{get:function(){yu=!0}}),window.addEventListener("test",Da,Da),window.removeEventListener("test",Da,Da)}catch{yu=!1}var mi=null,bu=null,Wl=null;function qh(){if(Wl)return Wl;var n,r=bu,l=r.length,u,h="value"in mi?mi.value:mi.textContent,m=h.length;for(n=0;n<l&&r[n]===h[n];n++);var _=l-n;for(u=1;u<=_&&r[l-u]===h[m-u];u++);return Wl=h.slice(n,1<u?1-u:void 0)}function Jl(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function eo(){return!0}function Fh(){return!1}function zt(n){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 n)n.hasOwnProperty(E)&&(l=n[E],this[E]=l?l(m):m[E]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?eo:Fh,this.isPropagationStopped=Fh,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=eo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=eo)},persist:function(){},isPersistent:eo}),r}var qi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},to=zt(qi),Na=y({},qi,{view:0,detail:0}),r_=zt(Na),vu,_u,Oa,no=y({},Na,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Eu,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Oa&&(Oa&&n.type==="mousemove"?(vu=n.screenX-Oa.screenX,_u=n.screenY-Oa.screenY):_u=vu=0,Oa=n),vu)},movementY:function(n){return"movementY"in n?n.movementY:_u}}),Yh=zt(no),a_=y({},no,{dataTransfer:0}),l_=zt(a_),o_=y({},Na,{relatedTarget:0}),Su=zt(o_),s_=y({},qi,{animationName:0,elapsedTime:0,pseudoElement:0}),u_=zt(s_),c_=y({},qi,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),f_=zt(c_),d_=y({},qi,{data:0}),Xh=zt(d_),h_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},p_={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"},m_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function g_(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=m_[n])?!!r[n]:!1}function Eu(){return g_}var y_=y({},Na,{key:function(n){if(n.key){var r=h_[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=Jl(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?p_[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Eu,charCode:function(n){return n.type==="keypress"?Jl(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Jl(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),b_=zt(y_),v_=y({},no,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qh=zt(v_),__=y({},Na,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Eu}),S_=zt(__),E_=y({},qi,{propertyName:0,elapsedTime:0,pseudoElement:0}),x_=zt(E_),C_=y({},no,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),w_=zt(C_),k_=y({},qi,{newState:0,oldState:0}),A_=zt(k_),T_=[9,13,27,32],xu=Bn&&"CompositionEvent"in window,Ma=null;Bn&&"documentMode"in document&&(Ma=document.documentMode);var L_=Bn&&"TextEvent"in window&&!Ma,Zh=Bn&&(!xu||Ma&&8<Ma&&11>=Ma),Kh=" ",Wh=!1;function Jh(n,r){switch(n){case"keyup":return T_.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ep(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var kr=!1;function R_(n,r){switch(n){case"compositionend":return ep(r);case"keypress":return r.which!==32?null:(Wh=!0,Kh);case"textInput":return n=r.data,n===Kh&&Wh?null:n;default:return null}}function D_(n,r){if(kr)return n==="compositionend"||!xu&&Jh(n,r)?(n=qh(),Wl=bu=mi=null,kr=!1,n):null;switch(n){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 Zh&&r.locale!=="ko"?null:r.data;default:return null}}var N_={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function tp(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!N_[n.type]:r==="textarea"}function np(n,r,l,u){Cr?wr?wr.push(u):wr=[u]:Cr=u,r=Fo(r,"onChange"),0<r.length&&(l=new to("onChange","change",null,l,u),n.push({event:l,listeners:r}))}var Ia=null,za=null;function O_(n){Hg(n,0)}function io(n){var r=La(n);if(Uh(r))return n}function ip(n,r){if(n==="change")return r}var rp=!1;if(Bn){var Cu;if(Bn){var wu="oninput"in document;if(!wu){var ap=document.createElement("div");ap.setAttribute("oninput","return;"),wu=typeof ap.oninput=="function"}Cu=wu}else Cu=!1;rp=Cu&&(!document.documentMode||9<document.documentMode)}function lp(){Ia&&(Ia.detachEvent("onpropertychange",op),za=Ia=null)}function op(n){if(n.propertyName==="value"&&io(za)){var r=[];np(r,za,n,mu(n)),$h(O_,r)}}function M_(n,r,l){n==="focusin"?(lp(),Ia=r,za=l,Ia.attachEvent("onpropertychange",op)):n==="focusout"&&lp()}function I_(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return io(za)}function z_(n,r){if(n==="click")return io(r)}function U_(n,r){if(n==="input"||n==="change")return io(r)}function H_(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Ft=typeof Object.is=="function"?Object.is:H_;function Ua(n,r){if(Ft(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var l=Object.keys(n),u=Object.keys(r);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var h=l[u];if(!ci.call(r,h)||!Ft(n[h],r[h]))return!1}return!0}function sp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function up(n,r){var l=sp(n);n=0;for(var u;l;){if(l.nodeType===3){if(u=n+l.textContent.length,n<=r&&u>=r)return{node:l,offset:r-n};n=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=sp(l)}}function cp(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?cp(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function fp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Zl(n.document);r instanceof n.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)n=r.contentWindow;else break;r=Zl(n.document)}return r}function ku(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var P_=Bn&&"documentMode"in document&&11>=document.documentMode,Ar=null,Au=null,Ha=null,Tu=!1;function dp(n,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Tu||Ar==null||Ar!==Zl(u)||(u=Ar,"selectionStart"in u&&ku(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}),Ha&&Ua(Ha,u)||(Ha=u,u=Fo(Au,"onSelect"),0<u.length&&(r=new to("onSelect","select",null,r,l),n.push({event:r,listeners:u}),r.target=Ar)))}function Fi(n,r){var l={};return l[n.toLowerCase()]=r.toLowerCase(),l["Webkit"+n]="webkit"+r,l["Moz"+n]="moz"+r,l}var Tr={animationend:Fi("Animation","AnimationEnd"),animationiteration:Fi("Animation","AnimationIteration"),animationstart:Fi("Animation","AnimationStart"),transitionrun:Fi("Transition","TransitionRun"),transitionstart:Fi("Transition","TransitionStart"),transitioncancel:Fi("Transition","TransitionCancel"),transitionend:Fi("Transition","TransitionEnd")},Lu={},hp={};Bn&&(hp=document.createElement("div").style,"AnimationEvent"in window||(delete Tr.animationend.animation,delete Tr.animationiteration.animation,delete Tr.animationstart.animation),"TransitionEvent"in window||delete Tr.transitionend.transition);function Yi(n){if(Lu[n])return Lu[n];if(!Tr[n])return n;var r=Tr[n],l;for(l in r)if(r.hasOwnProperty(l)&&l in hp)return Lu[n]=r[l];return n}var pp=Yi("animationend"),mp=Yi("animationiteration"),gp=Yi("animationstart"),B_=Yi("transitionrun"),j_=Yi("transitionstart"),V_=Yi("transitioncancel"),yp=Yi("transitionend"),bp=new Map,Ru="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(" ");Ru.push("scrollEnd");function bn(n,r){bp.set(n,r),$i(r,[n])}var ro=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},rn=[],Lr=0,Du=0;function ao(){for(var n=Lr,r=Du=Lr=0;r<n;){var l=rn[r];rn[r++]=null;var u=rn[r];rn[r++]=null;var h=rn[r];rn[r++]=null;var m=rn[r];if(rn[r++]=null,u!==null&&h!==null){var _=u.pending;_===null?h.next=h:(h.next=_.next,_.next=h),u.pending=h}m!==0&&vp(l,h,m)}}function lo(n,r,l,u){rn[Lr++]=n,rn[Lr++]=r,rn[Lr++]=l,rn[Lr++]=u,Du|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function Nu(n,r,l,u){return lo(n,r,l,u),oo(n)}function Xi(n,r){return lo(n,null,null,r),oo(n)}function vp(n,r,l){n.lanes|=l;var u=n.alternate;u!==null&&(u.lanes|=l);for(var h=!1,m=n.return;m!==null;)m.childLanes|=l,u=m.alternate,u!==null&&(u.childLanes|=l),m.tag===22&&(n=m.stateNode,n===null||n._visibility&1||(h=!0)),n=m,m=m.return;return n.tag===3?(m=n.stateNode,h&&r!==null&&(h=31-Fe(l),n=m.hiddenUpdates,u=n[h],u===null?n[h]=[r]:u.push(r),r.lane=l|536870912),m):null}function oo(n){if(50<ll)throw ll=0,jc=null,Error(a(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var Rr={};function G_(n,r,l,u){this.tag=n,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 Yt(n,r,l,u){return new G_(n,r,l,u)}function Ou(n){return n=n.prototype,!(!n||!n.isReactComponent)}function jn(n,r){var l=n.alternate;return l===null?(l=Yt(n.tag,r,n.key,n.mode),l.elementType=n.elementType,l.type=n.type,l.stateNode=n.stateNode,l.alternate=n,n.alternate=l):(l.pendingProps=r,l.type=n.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=n.flags&65011712,l.childLanes=n.childLanes,l.lanes=n.lanes,l.child=n.child,l.memoizedProps=n.memoizedProps,l.memoizedState=n.memoizedState,l.updateQueue=n.updateQueue,r=n.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=n.sibling,l.index=n.index,l.ref=n.ref,l.refCleanup=n.refCleanup,l}function _p(n,r){n.flags&=65011714;var l=n.alternate;return l===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=l.childLanes,n.lanes=l.lanes,n.child=l.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=l.memoizedProps,n.memoizedState=l.memoizedState,n.updateQueue=l.updateQueue,n.type=l.type,r=l.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function so(n,r,l,u,h,m){var _=0;if(u=n,typeof n=="function")Ou(n)&&(_=1);else if(typeof n=="string")_=XS(n,l,se.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case ee:return n=Yt(31,l,r,h),n.elementType=ee,n.lanes=m,n;case A:return Qi(l.children,h,m,r);case D:_=8,h|=24;break;case x:return n=Yt(12,l,r,h|2),n.elementType=x,n.lanes=m,n;case z:return n=Yt(13,l,r,h),n.elementType=z,n.lanes=m,n;case R:return n=Yt(19,l,r,h),n.elementType=R,n.lanes=m,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case k:_=10;break e;case T:_=9;break e;case I:_=11;break e;case P:_=14;break e;case G:_=16,u=null;break e}_=29,l=Error(a(130,n===null?"null":typeof n,"")),u=null}return r=Yt(_,l,r,h),r.elementType=n,r.type=u,r.lanes=m,r}function Qi(n,r,l,u){return n=Yt(7,n,u,r),n.lanes=l,n}function Mu(n,r,l){return n=Yt(6,n,null,r),n.lanes=l,n}function Sp(n){var r=Yt(18,null,null,0);return r.stateNode=n,r}function Iu(n,r,l){return r=Yt(4,n.children!==null?n.children:[],n.key,r),r.lanes=l,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var Ep=new WeakMap;function an(n,r){if(typeof n=="object"&&n!==null){var l=Ep.get(n);return l!==void 0?l:(r={value:n,source:r,stack:mr(r)},Ep.set(n,r),r)}return{value:n,source:r,stack:mr(r)}}var Dr=[],Nr=0,uo=null,Pa=0,ln=[],on=0,gi=null,An=1,Tn="";function Vn(n,r){Dr[Nr++]=Pa,Dr[Nr++]=uo,uo=n,Pa=r}function xp(n,r,l){ln[on++]=An,ln[on++]=Tn,ln[on++]=gi,gi=n;var u=An;n=Tn;var h=32-Fe(u)-1;u&=~(1<<h),l+=1;var m=32-Fe(r)+h;if(30<m){var _=h-h%5;m=(u&(1<<_)-1).toString(32),u>>=_,h-=_,An=1<<32-Fe(r)+h|l<<h|u,Tn=m+n}else An=1<<m|l<<h|u,Tn=n}function zu(n){n.return!==null&&(Vn(n,1),xp(n,1,0))}function Uu(n){for(;n===uo;)uo=Dr[--Nr],Dr[Nr]=null,Pa=Dr[--Nr],Dr[Nr]=null;for(;n===gi;)gi=ln[--on],ln[on]=null,Tn=ln[--on],ln[on]=null,An=ln[--on],ln[on]=null}function Cp(n,r){ln[on++]=An,ln[on++]=Tn,ln[on++]=gi,An=r.id,Tn=r.overflow,gi=n}var kt=null,We=null,Ie=!1,yi=null,sn=!1,Hu=Error(a(519));function bi(n){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ba(an(r,n)),Hu}function wp(n){var r=n.stateNode,l=n.type,u=n.memoizedProps;switch(r[wt]=n,r[It]=u,l){case"dialog":Ne("cancel",r),Ne("close",r);break;case"iframe":case"object":case"embed":Ne("load",r);break;case"video":case"audio":for(l=0;l<sl.length;l++)Ne(sl[l],r);break;case"source":Ne("error",r);break;case"img":case"image":case"link":Ne("error",r),Ne("load",r);break;case"details":Ne("toggle",r);break;case"input":Ne("invalid",r),Hh(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Ne("invalid",r);break;case"textarea":Ne("invalid",r),Bh(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||Vg(r.textContent,l)?(u.popover!=null&&(Ne("beforetoggle",r),Ne("toggle",r)),u.onScroll!=null&&Ne("scroll",r),u.onScrollEnd!=null&&Ne("scrollend",r),u.onClick!=null&&(r.onclick=Pn),r=!0):r=!1,r||bi(n,!0)}function kp(n){for(kt=n.return;kt;)switch(kt.tag){case 5:case 31:case 13:sn=!1;return;case 27:case 3:sn=!0;return;default:kt=kt.return}}function Or(n){if(n!==kt)return!1;if(!Ie)return kp(n),Ie=!0,!1;var r=n.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=n.type,l=!(l!=="form"&&l!=="button")||nf(n.type,n.memoizedProps)),l=!l),l&&We&&bi(n),kp(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));We=Kg(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));We=Kg(n)}else r===27?(r=We,Ni(n.type)?(n=sf,sf=null,We=n):We=r):We=kt?cn(n.stateNode.nextSibling):null;return!0}function Zi(){We=kt=null,Ie=!1}function Pu(){var n=yi;return n!==null&&(Bt===null?Bt=n:Bt.push.apply(Bt,n),yi=null),n}function Ba(n){yi===null?yi=[n]:yi.push(n)}var Bu=O(null),Ki=null,Gn=null;function vi(n,r,l){w(Bu,r._currentValue),r._currentValue=l}function $n(n){n._currentValue=Bu.current,F(Bu)}function ju(n,r,l){for(;n!==null;){var u=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),n===l)break;n=n.return}}function Vu(n,r,l,u){var h=n.child;for(h!==null&&(h.return=n);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 N=0;N<r.length;N++)if(E.context===r[N]){m.lanes|=l,E=m.alternate,E!==null&&(E.lanes|=l),ju(m.return,l,n),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),ju(_,l,n),_=null}else _=h.child;if(_!==null)_.return=h;else for(_=h;_!==null;){if(_===n){_=null;break}if(h=_.sibling,h!==null){h.return=_.return,_=h;break}_=_.return}h=_}}function Mr(n,r,l,u){n=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;Ft(h.pendingProps.value,_.value)||(n!==null?n.push(E):n=[E])}}else if(h===be.current){if(_=h.alternate,_===null)throw Error(a(387));_.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(n!==null?n.push(hl):n=[hl])}h=h.return}n!==null&&Vu(r,n,l,u),r.flags|=262144}function co(n){for(n=n.firstContext;n!==null;){if(!Ft(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Wi(n){Ki=n,Gn=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function At(n){return Ap(Ki,n)}function fo(n,r){return Ki===null&&Wi(n),Ap(n,r)}function Ap(n,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},Gn===null){if(n===null)throw Error(a(308));Gn=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else Gn=Gn.next=r;return l}var $_=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(l,u){n.push(u)}};this.abort=function(){r.aborted=!0,n.forEach(function(l){return l()})}},q_=e.unstable_scheduleCallback,F_=e.unstable_NormalPriority,ut={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Gu(){return{controller:new $_,data:new Map,refCount:0}}function ja(n){n.refCount--,n.refCount===0&&q_(F_,function(){n.controller.abort()})}var Va=null,$u=0,Ir=0,zr=null;function Y_(n,r){if(Va===null){var l=Va=[];$u=0,Ir=Yc(),zr={status:"pending",value:void 0,then:function(u){l.push(u)}}}return $u++,r.then(Tp,Tp),r}function Tp(){if(--$u===0&&Va!==null){zr!==null&&(zr.status="fulfilled");var n=Va;Va=null,Ir=0,zr=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function X_(n,r){var l=[],u={status:"pending",value:null,reason:null,then:function(h){l.push(h)}};return n.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 Lp=B.S;B.S=function(n,r){dg=Ct(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&Y_(n,r),Lp!==null&&Lp(n,r)};var Ji=O(null);function qu(){var n=Ji.current;return n!==null?n:Ye.pooledCache}function ho(n,r){r===null?w(Ji,Ji.current):w(Ji,r.pool)}function Rp(){var n=qu();return n===null?null:{parent:ut._currentValue,pool:n}}var Ur=Error(a(460)),Fu=Error(a(474)),po=Error(a(542)),mo={then:function(){}};function Dp(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Np(n,r,l){switch(l=n[l],l===void 0?n.push(r):l!==r&&(r.then(Pn,Pn),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Mp(n),n;default:if(typeof r.status=="string")r.then(Pn,Pn);else{if(n=Ye,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=r,n.status="pending",n.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 n=r.reason,Mp(n),n}throw tr=r,Ur}}function er(n){try{var r=n._init;return r(n._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(tr=l,Ur):l}}var tr=null;function Op(){if(tr===null)throw Error(a(459));var n=tr;return tr=null,n}function Mp(n){if(n===Ur||n===po)throw Error(a(483))}var Hr=null,Ga=0;function go(n){var r=Ga;return Ga+=1,Hr===null&&(Hr=[]),Np(Hr,n,r)}function $a(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function yo(n,r){throw r.$$typeof===v?Error(a(525)):(n=Object.prototype.toString.call(r),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function Ip(n){function r(U,M){if(n){var j=U.deletions;j===null?(U.deletions=[M],U.flags|=16):j.push(M)}}function l(U,M){if(!n)return null;for(;M!==null;)r(U,M),M=M.sibling;return null}function u(U){for(var M=new Map;U!==null;)U.key!==null?M.set(U.key,U):M.set(U.index,U),U=U.sibling;return M}function h(U,M){return U=jn(U,M),U.index=0,U.sibling=null,U}function m(U,M,j){return U.index=j,n?(j=U.alternate,j!==null?(j=j.index,j<M?(U.flags|=67108866,M):j):(U.flags|=67108866,M)):(U.flags|=1048576,M)}function _(U){return n&&U.alternate===null&&(U.flags|=67108866),U}function E(U,M,j,K){return M===null||M.tag!==6?(M=Mu(j,U.mode,K),M.return=U,M):(M=h(M,j),M.return=U,M)}function N(U,M,j,K){var ye=j.type;return ye===A?Y(U,M,j.props.children,K,j.key):M!==null&&(M.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===G&&er(ye)===M.type)?(M=h(M,j.props),$a(M,j),M.return=U,M):(M=so(j.type,j.key,j.props,null,U.mode,K),$a(M,j),M.return=U,M)}function V(U,M,j,K){return M===null||M.tag!==4||M.stateNode.containerInfo!==j.containerInfo||M.stateNode.implementation!==j.implementation?(M=Iu(j,U.mode,K),M.return=U,M):(M=h(M,j.children||[]),M.return=U,M)}function Y(U,M,j,K,ye){return M===null||M.tag!==7?(M=Qi(j,U.mode,K,ye),M.return=U,M):(M=h(M,j),M.return=U,M)}function J(U,M,j){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Mu(""+M,U.mode,j),M.return=U,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case b:return j=so(M.type,M.key,M.props,null,U.mode,j),$a(j,M),j.return=U,j;case S:return M=Iu(M,U.mode,j),M.return=U,M;case G:return M=er(M),J(U,M,j)}if(te(M)||W(M))return M=Qi(M,U.mode,j,null),M.return=U,M;if(typeof M.then=="function")return J(U,go(M),j);if(M.$$typeof===k)return J(U,fo(U,M),j);yo(U,M)}return null}function $(U,M,j,K){var ye=M!==null?M.key:null;if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return ye!==null?null:E(U,M,""+j,K);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case b:return j.key===ye?N(U,M,j,K):null;case S:return j.key===ye?V(U,M,j,K):null;case G:return j=er(j),$(U,M,j,K)}if(te(j)||W(j))return ye!==null?null:Y(U,M,j,K,null);if(typeof j.then=="function")return $(U,M,go(j),K);if(j.$$typeof===k)return $(U,M,fo(U,j),K);yo(U,j)}return null}function q(U,M,j,K,ye){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return U=U.get(j)||null,E(M,U,""+K,ye);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case b:return U=U.get(K.key===null?j:K.key)||null,N(M,U,K,ye);case S:return U=U.get(K.key===null?j:K.key)||null,V(M,U,K,ye);case G:return K=er(K),q(U,M,j,K,ye)}if(te(K)||W(K))return U=U.get(j)||null,Y(M,U,K,ye,null);if(typeof K.then=="function")return q(U,M,j,go(K),ye);if(K.$$typeof===k)return q(U,M,j,fo(M,K),ye);yo(M,K)}return null}function de(U,M,j,K){for(var ye=null,ze=null,ge=M,ke=M=0,Me=null;ge!==null&&ke<j.length;ke++){ge.index>ke?(Me=ge,ge=null):Me=ge.sibling;var Ue=$(U,ge,j[ke],K);if(Ue===null){ge===null&&(ge=Me);break}n&&ge&&Ue.alternate===null&&r(U,ge),M=m(Ue,M,ke),ze===null?ye=Ue:ze.sibling=Ue,ze=Ue,ge=Me}if(ke===j.length)return l(U,ge),Ie&&Vn(U,ke),ye;if(ge===null){for(;ke<j.length;ke++)ge=J(U,j[ke],K),ge!==null&&(M=m(ge,M,ke),ze===null?ye=ge:ze.sibling=ge,ze=ge);return Ie&&Vn(U,ke),ye}for(ge=u(ge);ke<j.length;ke++)Me=q(ge,U,ke,j[ke],K),Me!==null&&(n&&Me.alternate!==null&&ge.delete(Me.key===null?ke:Me.key),M=m(Me,M,ke),ze===null?ye=Me:ze.sibling=Me,ze=Me);return n&&ge.forEach(function(Ui){return r(U,Ui)}),Ie&&Vn(U,ke),ye}function ve(U,M,j,K){if(j==null)throw Error(a(151));for(var ye=null,ze=null,ge=M,ke=M=0,Me=null,Ue=j.next();ge!==null&&!Ue.done;ke++,Ue=j.next()){ge.index>ke?(Me=ge,ge=null):Me=ge.sibling;var Ui=$(U,ge,Ue.value,K);if(Ui===null){ge===null&&(ge=Me);break}n&&ge&&Ui.alternate===null&&r(U,ge),M=m(Ui,M,ke),ze===null?ye=Ui:ze.sibling=Ui,ze=Ui,ge=Me}if(Ue.done)return l(U,ge),Ie&&Vn(U,ke),ye;if(ge===null){for(;!Ue.done;ke++,Ue=j.next())Ue=J(U,Ue.value,K),Ue!==null&&(M=m(Ue,M,ke),ze===null?ye=Ue:ze.sibling=Ue,ze=Ue);return Ie&&Vn(U,ke),ye}for(ge=u(ge);!Ue.done;ke++,Ue=j.next())Ue=q(ge,U,ke,Ue.value,K),Ue!==null&&(n&&Ue.alternate!==null&&ge.delete(Ue.key===null?ke:Ue.key),M=m(Ue,M,ke),ze===null?ye=Ue:ze.sibling=Ue,ze=Ue);return n&&ge.forEach(function(aE){return r(U,aE)}),Ie&&Vn(U,ke),ye}function qe(U,M,j,K){if(typeof j=="object"&&j!==null&&j.type===A&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case b:e:{for(var ye=j.key;M!==null;){if(M.key===ye){if(ye=j.type,ye===A){if(M.tag===7){l(U,M.sibling),K=h(M,j.props.children),K.return=U,U=K;break e}}else if(M.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===G&&er(ye)===M.type){l(U,M.sibling),K=h(M,j.props),$a(K,j),K.return=U,U=K;break e}l(U,M);break}else r(U,M);M=M.sibling}j.type===A?(K=Qi(j.props.children,U.mode,K,j.key),K.return=U,U=K):(K=so(j.type,j.key,j.props,null,U.mode,K),$a(K,j),K.return=U,U=K)}return _(U);case S:e:{for(ye=j.key;M!==null;){if(M.key===ye)if(M.tag===4&&M.stateNode.containerInfo===j.containerInfo&&M.stateNode.implementation===j.implementation){l(U,M.sibling),K=h(M,j.children||[]),K.return=U,U=K;break e}else{l(U,M);break}else r(U,M);M=M.sibling}K=Iu(j,U.mode,K),K.return=U,U=K}return _(U);case G:return j=er(j),qe(U,M,j,K)}if(te(j))return de(U,M,j,K);if(W(j)){if(ye=W(j),typeof ye!="function")throw Error(a(150));return j=ye.call(j),ve(U,M,j,K)}if(typeof j.then=="function")return qe(U,M,go(j),K);if(j.$$typeof===k)return qe(U,M,fo(U,j),K);yo(U,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(j=""+j,M!==null&&M.tag===6?(l(U,M.sibling),K=h(M,j),K.return=U,U=K):(l(U,M),K=Mu(j,U.mode,K),K.return=U,U=K),_(U)):l(U,M)}return function(U,M,j,K){try{Ga=0;var ye=qe(U,M,j,K);return Hr=null,ye}catch(ge){if(ge===Ur||ge===po)throw ge;var ze=Yt(29,ge,null,U.mode);return ze.lanes=K,ze.return=U,ze}}}var nr=Ip(!0),zp=Ip(!1),_i=!1;function Yu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xu(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Si(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ei(n,r,l){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(He&2)!==0){var h=u.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),u.pending=r,r=oo(n),vp(n,null,l),r}return lo(n,u,r,l),oo(n)}function qa(n,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,Ah(n,l)}}function Qu(n,r){var l=n.updateQueue,u=n.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},n.updateQueue=l;return}n=l.lastBaseUpdate,n===null?l.firstBaseUpdate=r:n.next=r,l.lastBaseUpdate=r}var Zu=!1;function Fa(){if(Zu){var n=zr;if(n!==null)throw n}}function Ya(n,r,l,u){Zu=!1;var h=n.updateQueue;_i=!1;var m=h.firstBaseUpdate,_=h.lastBaseUpdate,E=h.shared.pending;if(E!==null){h.shared.pending=null;var N=E,V=N.next;N.next=null,_===null?m=V:_.next=V,_=N;var Y=n.alternate;Y!==null&&(Y=Y.updateQueue,E=Y.lastBaseUpdate,E!==_&&(E===null?Y.firstBaseUpdate=V:E.next=V,Y.lastBaseUpdate=N))}if(m!==null){var J=h.baseState;_=0,Y=V=N=null,E=m;do{var $=E.lane&-536870913,q=$!==E.lane;if(q?(Oe&$)===$:(u&$)===$){$!==0&&$===Ir&&(Zu=!0),Y!==null&&(Y=Y.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var de=n,ve=E;$=r;var qe=l;switch(ve.tag){case 1:if(de=ve.payload,typeof de=="function"){J=de.call(qe,J,$);break e}J=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=ve.payload,$=typeof de=="function"?de.call(qe,J,$):de,$==null)break e;J=y({},J,$);break e;case 2:_i=!0}}$=E.callback,$!==null&&(n.flags|=64,q&&(n.flags|=8192),q=h.callbacks,q===null?h.callbacks=[$]:q.push($))}else q={lane:$,tag:E.tag,payload:E.payload,callback:E.callback,next:null},Y===null?(V=Y=q,N=J):Y=Y.next=q,_|=$;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);Y===null&&(N=J),h.baseState=N,h.firstBaseUpdate=V,h.lastBaseUpdate=Y,m===null&&(h.shared.lanes=0),Ai|=_,n.lanes=_,n.memoizedState=J}}function Up(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function Hp(n,r){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;n<l.length;n++)Up(l[n],r)}var Pr=O(null),bo=O(0);function Pp(n,r){n=Jn,w(bo,n),w(Pr,r),Jn=n|r.baseLanes}function Ku(){w(bo,Jn),w(Pr,Pr.current)}function Wu(){Jn=bo.current,F(Pr),F(bo)}var Xt=O(null),un=null;function xi(n){var r=n.alternate;w(at,at.current&1),w(Xt,n),un===null&&(r===null||Pr.current!==null||r.memoizedState!==null)&&(un=n)}function Ju(n){w(at,at.current),w(Xt,n),un===null&&(un=n)}function Bp(n){n.tag===22?(w(at,at.current),w(Xt,n),un===null&&(un=n)):Ci()}function Ci(){w(at,at.current),w(Xt,Xt.current)}function Qt(n){F(Xt),un===n&&(un=null),F(at)}var at=O(0);function vo(n){for(var r=n;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||lf(l)||of(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===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var qn=0,we=null,Ge=null,ct=null,_o=!1,Br=!1,ir=!1,So=0,Xa=0,jr=null,Q_=0;function it(){throw Error(a(321))}function ec(n,r){if(r===null)return!1;for(var l=0;l<r.length&&l<n.length;l++)if(!Ft(n[l],r[l]))return!1;return!0}function tc(n,r,l,u,h,m){return qn=m,we=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,B.H=n===null||n.memoizedState===null?xm:gc,ir=!1,m=l(u,h),ir=!1,Br&&(m=Vp(r,l,u,h)),jp(n),m}function jp(n){B.H=Ka;var r=Ge!==null&&Ge.next!==null;if(qn=0,ct=Ge=we=null,_o=!1,Xa=0,jr=null,r)throw Error(a(300));n===null||ft||(n=n.dependencies,n!==null&&co(n)&&(ft=!0))}function Vp(n,r,l,u){we=n;var h=0;do{if(Br&&(jr=null),Xa=0,Br=!1,25<=h)throw Error(a(301));if(h+=1,ct=Ge=null,n.updateQueue!=null){var m=n.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}B.H=Cm,m=r(l,u)}while(Br);return m}function Z_(){var n=B.H,r=n.useState()[0];return r=typeof r.then=="function"?Qa(r):r,n=n.useState()[0],(Ge!==null?Ge.memoizedState:null)!==n&&(we.flags|=1024),r}function nc(){var n=So!==0;return So=0,n}function ic(n,r,l){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~l}function rc(n){if(_o){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}_o=!1}qn=0,ct=Ge=we=null,Br=!1,Xa=So=0,jr=null}function Mt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?we.memoizedState=ct=n:ct=ct.next=n,ct}function lt(){if(Ge===null){var n=we.alternate;n=n!==null?n.memoizedState:null}else n=Ge.next;var r=ct===null?we.memoizedState:ct.next;if(r!==null)ct=r,Ge=n;else{if(n===null)throw we.alternate===null?Error(a(467)):Error(a(310));Ge=n,n={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},ct===null?we.memoizedState=ct=n:ct=ct.next=n}return ct}function Eo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Qa(n){var r=Xa;return Xa+=1,jr===null&&(jr=[]),n=Np(jr,n,r),r=we,(ct===null?r.memoizedState:ct.next)===null&&(r=r.alternate,B.H=r===null||r.memoizedState===null?xm:gc),n}function xo(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Qa(n);if(n.$$typeof===k)return At(n)}throw Error(a(438,String(n)))}function ac(n){var r=null,l=we.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=we.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=Eo(),we.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(n),u=0;u<n;u++)l[u]=ae;return r.index++,l}function Fn(n,r){return typeof r=="function"?r(n):r}function Co(n){var r=lt();return lc(r,Ge,n)}function lc(n,r,l){var u=n.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var h=n.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=n.baseState,h===null)n.memoizedState=m;else{r=h.next;var E=_=null,N=null,V=r,Y=!1;do{var J=V.lane&-536870913;if(J!==V.lane?(Oe&J)===J:(qn&J)===J){var $=V.revertLane;if($===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),J===Ir&&(Y=!0);else if((qn&$)===$){V=V.next,$===Ir&&(Y=!0);continue}else J={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},N===null?(E=N=J,_=m):N=N.next=J,we.lanes|=$,Ai|=$;J=V.action,ir&&l(m,J),m=V.hasEagerState?V.eagerState:l(m,J)}else $={lane:J,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},N===null?(E=N=$,_=m):N=N.next=$,we.lanes|=J,Ai|=J;V=V.next}while(V!==null&&V!==r);if(N===null?_=m:N.next=E,!Ft(m,n.memoizedState)&&(ft=!0,Y&&(l=zr,l!==null)))throw l;n.memoizedState=m,n.baseState=_,n.baseQueue=N,u.lastRenderedState=m}return h===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function oc(n){var r=lt(),l=r.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=n;var u=l.dispatch,h=l.pending,m=r.memoizedState;if(h!==null){l.pending=null;var _=h=h.next;do m=n(m,_.action),_=_.next;while(_!==h);Ft(m,r.memoizedState)||(ft=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),l.lastRenderedState=m}return[m,u]}function Gp(n,r,l){var u=we,h=lt(),m=Ie;if(m){if(l===void 0)throw Error(a(407));l=l()}else l=r();var _=!Ft((Ge||h).memoizedState,l);if(_&&(h.memoizedState=l,ft=!0),h=h.queue,cc(Fp.bind(null,u,h,n),[n]),h.getSnapshot!==r||_||ct!==null&&ct.memoizedState.tag&1){if(u.flags|=2048,Vr(9,{destroy:void 0},qp.bind(null,u,h,l,r),null),Ye===null)throw Error(a(349));m||(qn&127)!==0||$p(u,r,l)}return l}function $p(n,r,l){n.flags|=16384,n={getSnapshot:r,value:l},r=we.updateQueue,r===null?(r=Eo(),we.updateQueue=r,r.stores=[n]):(l=r.stores,l===null?r.stores=[n]:l.push(n))}function qp(n,r,l,u){r.value=l,r.getSnapshot=u,Yp(r)&&Xp(n)}function Fp(n,r,l){return l(function(){Yp(r)&&Xp(n)})}function Yp(n){var r=n.getSnapshot;n=n.value;try{var l=r();return!Ft(n,l)}catch{return!0}}function Xp(n){var r=Xi(n,2);r!==null&&jt(r,n,2)}function sc(n){var r=Mt();if(typeof n=="function"){var l=n;if(n=l(),ir){st(!0);try{l()}finally{st(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:n},r}function Qp(n,r,l,u){return n.baseState=l,lc(n,Ge,typeof u=="function"?u:Fn)}function K_(n,r,l,u,h){if(Ao(n))throw Error(a(485));if(n=r.action,n!==null){var m={payload:h,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){m.listeners.push(_)}};B.T!==null?l(!0):m.isTransition=!1,u(m),l=r.pending,l===null?(m.next=r.pending=m,Zp(r,m)):(m.next=l.next,r.pending=l.next=m)}}function Zp(n,r){var l=r.action,u=r.payload,h=n.state;if(r.isTransition){var m=B.T,_={};B.T=_;try{var E=l(h,u),N=B.S;N!==null&&N(_,E),Kp(n,r,E)}catch(V){uc(n,r,V)}finally{m!==null&&_.types!==null&&(m.types=_.types),B.T=m}}else try{m=l(h,u),Kp(n,r,m)}catch(V){uc(n,r,V)}}function Kp(n,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){Wp(n,r,u)},function(u){return uc(n,r,u)}):Wp(n,r,l)}function Wp(n,r,l){r.status="fulfilled",r.value=l,Jp(r),n.state=l,r=n.pending,r!==null&&(l=r.next,l===r?n.pending=null:(l=l.next,r.next=l,Zp(n,l)))}function uc(n,r,l){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=l,Jp(r),r=r.next;while(r!==u)}n.action=null}function Jp(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function em(n,r){return r}function tm(n,r){if(Ie){var l=Ye.formState;if(l!==null){e:{var u=we;if(Ie){if(We){t:{for(var h=We,m=sn;h.nodeType!==8;){if(!m){h=null;break t}if(h=cn(h.nextSibling),h===null){h=null;break t}}m=h.data,h=m==="F!"||m==="F"?h:null}if(h){We=cn(h.nextSibling),u=h.data==="F!";break e}}bi(u)}u=!1}u&&(r=l[0])}}return l=Mt(),l.memoizedState=l.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:em,lastRenderedState:r},l.queue=u,l=_m.bind(null,we,u),u.dispatch=l,u=sc(!1),m=mc.bind(null,we,!1,u.queue),u=Mt(),h={state:r,dispatch:null,action:n,pending:null},u.queue=h,l=K_.bind(null,we,h,m,l),h.dispatch=l,u.memoizedState=n,[r,l,!1]}function nm(n){var r=lt();return im(r,Ge,n)}function im(n,r,l){if(r=lc(n,r,em)[0],n=Co(Fn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=Qa(r)}catch(_){throw _===Ur?po:_}else u=r;r=lt();var h=r.queue,m=h.dispatch;return l!==r.memoizedState&&(we.flags|=2048,Vr(9,{destroy:void 0},W_.bind(null,h,l),null)),[u,m,n]}function W_(n,r){n.action=r}function rm(n){var r=lt(),l=Ge;if(l!==null)return im(r,l,n);lt(),r=r.memoizedState,l=lt();var u=l.queue.dispatch;return l.memoizedState=n,[r,u,!1]}function Vr(n,r,l,u){return n={tag:n,create:l,deps:u,inst:r,next:null},r=we.updateQueue,r===null&&(r=Eo(),we.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=n.next=n:(u=l.next,l.next=n,n.next=u,r.lastEffect=n),n}function am(){return lt().memoizedState}function wo(n,r,l,u){var h=Mt();we.flags|=n,h.memoizedState=Vr(1|r,{destroy:void 0},l,u===void 0?null:u)}function ko(n,r,l,u){var h=lt();u=u===void 0?null:u;var m=h.memoizedState.inst;Ge!==null&&u!==null&&ec(u,Ge.memoizedState.deps)?h.memoizedState=Vr(r,m,l,u):(we.flags|=n,h.memoizedState=Vr(1|r,m,l,u))}function lm(n,r){wo(8390656,8,n,r)}function cc(n,r){ko(2048,8,n,r)}function J_(n){we.flags|=4;var r=we.updateQueue;if(r===null)r=Eo(),we.updateQueue=r,r.events=[n];else{var l=r.events;l===null?r.events=[n]:l.push(n)}}function om(n){var r=lt().memoizedState;return J_({ref:r,nextImpl:n}),function(){if((He&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function sm(n,r){return ko(4,2,n,r)}function um(n,r){return ko(4,4,n,r)}function cm(n,r){if(typeof r=="function"){n=n();var l=r(n);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function fm(n,r,l){l=l!=null?l.concat([n]):null,ko(4,4,cm.bind(null,r,n),l)}function fc(){}function dm(n,r){var l=lt();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&ec(r,u[1])?u[0]:(l.memoizedState=[n,r],n)}function hm(n,r){var l=lt();r=r===void 0?null:r;var u=l.memoizedState;if(r!==null&&ec(r,u[1]))return u[0];if(u=n(),ir){st(!0);try{n()}finally{st(!1)}}return l.memoizedState=[u,r],u}function dc(n,r,l){return l===void 0||(qn&1073741824)!==0&&(Oe&261930)===0?n.memoizedState=r:(n.memoizedState=l,n=pg(),we.lanes|=n,Ai|=n,l)}function pm(n,r,l,u){return Ft(l,r)?l:Pr.current!==null?(n=dc(n,l,u),Ft(n,r)||(ft=!0),n):(qn&42)===0||(qn&1073741824)!==0&&(Oe&261930)===0?(ft=!0,n.memoizedState=l):(n=pg(),we.lanes|=n,Ai|=n,r)}function mm(n,r,l,u,h){var m=X.p;X.p=m!==0&&8>m?m:8;var _=B.T,E={};B.T=E,mc(n,!1,r,l);try{var N=h(),V=B.S;if(V!==null&&V(E,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var Y=X_(N,u);Za(n,r,Y,Wt(n))}else Za(n,r,u,Wt(n))}catch(J){Za(n,r,{then:function(){},status:"rejected",reason:J},Wt())}finally{X.p=m,_!==null&&E.types!==null&&(_.types=E.types),B.T=_}}function eS(){}function hc(n,r,l,u){if(n.tag!==5)throw Error(a(476));var h=gm(n).queue;mm(n,h,r,oe,l===null?eS:function(){return ym(n),l(u)})}function gm(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:oe},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:l},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function ym(n){var r=gm(n);r.next===null&&(r=n.alternate.memoizedState),Za(n,r.next.queue,{},Wt())}function pc(){return At(hl)}function bm(){return lt().memoizedState}function vm(){return lt().memoizedState}function tS(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var l=Wt();n=Si(l);var u=Ei(r,n,l);u!==null&&(jt(u,r,l),qa(u,r,l)),r={cache:Gu()},n.payload=r;return}r=r.return}}function nS(n,r,l){var u=Wt();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ao(n)?Sm(r,l):(l=Nu(n,r,l,u),l!==null&&(jt(l,n,u),Em(l,r,u)))}function _m(n,r,l){var u=Wt();Za(n,r,l,u)}function Za(n,r,l,u){var h={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ao(n))Sm(r,h);else{var m=n.alternate;if(n.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,Ft(E,_))return lo(n,r,h,0),Ye===null&&ao(),!1}catch{}if(l=Nu(n,r,h,u),l!==null)return jt(l,n,u),Em(l,r,u),!0}return!1}function mc(n,r,l,u){if(u={lane:2,revertLane:Yc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Ao(n)){if(r)throw Error(a(479))}else r=Nu(n,l,u,2),r!==null&&jt(r,n,2)}function Ao(n){var r=n.alternate;return n===we||r!==null&&r===we}function Sm(n,r){Br=_o=!0;var l=n.pending;l===null?r.next=r:(r.next=l.next,l.next=r),n.pending=r}function Em(n,r,l){if((l&4194048)!==0){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,Ah(n,l)}}var Ka={readContext:At,use:xo,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useLayoutEffect:it,useInsertionEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useSyncExternalStore:it,useId:it,useHostTransitionStatus:it,useFormState:it,useActionState:it,useOptimistic:it,useMemoCache:it,useCacheRefresh:it};Ka.useEffectEvent=it;var xm={readContext:At,use:xo,useCallback:function(n,r){return Mt().memoizedState=[n,r===void 0?null:r],n},useContext:At,useEffect:lm,useImperativeHandle:function(n,r,l){l=l!=null?l.concat([n]):null,wo(4194308,4,cm.bind(null,r,n),l)},useLayoutEffect:function(n,r){return wo(4194308,4,n,r)},useInsertionEffect:function(n,r){wo(4,2,n,r)},useMemo:function(n,r){var l=Mt();r=r===void 0?null:r;var u=n();if(ir){st(!0);try{n()}finally{st(!1)}}return l.memoizedState=[u,r],u},useReducer:function(n,r,l){var u=Mt();if(l!==void 0){var h=l(r);if(ir){st(!0);try{l(r)}finally{st(!1)}}}else h=r;return u.memoizedState=u.baseState=h,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:h},u.queue=n,n=n.dispatch=nS.bind(null,we,n),[u.memoizedState,n]},useRef:function(n){var r=Mt();return n={current:n},r.memoizedState=n},useState:function(n){n=sc(n);var r=n.queue,l=_m.bind(null,we,r);return r.dispatch=l,[n.memoizedState,l]},useDebugValue:fc,useDeferredValue:function(n,r){var l=Mt();return dc(l,n,r)},useTransition:function(){var n=sc(!1);return n=mm.bind(null,we,n.queue,!0,!1),Mt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,l){var u=we,h=Mt();if(Ie){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),Ye===null)throw Error(a(349));(Oe&127)!==0||$p(u,r,l)}h.memoizedState=l;var m={value:l,getSnapshot:r};return h.queue=m,lm(Fp.bind(null,u,m,n),[n]),u.flags|=2048,Vr(9,{destroy:void 0},qp.bind(null,u,m,l,r),null),l},useId:function(){var n=Mt(),r=Ye.identifierPrefix;if(Ie){var l=Tn,u=An;l=(u&~(1<<32-Fe(u)-1)).toString(32)+l,r="_"+r+"R_"+l,l=So++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=Q_++,r="_"+r+"r_"+l.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:pc,useFormState:tm,useActionState:tm,useOptimistic:function(n){var r=Mt();r.memoizedState=r.baseState=n;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=mc.bind(null,we,!0,l),l.dispatch=r,[n,r]},useMemoCache:ac,useCacheRefresh:function(){return Mt().memoizedState=tS.bind(null,we)},useEffectEvent:function(n){var r=Mt(),l={impl:n};return r.memoizedState=l,function(){if((He&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},gc={readContext:At,use:xo,useCallback:dm,useContext:At,useEffect:cc,useImperativeHandle:fm,useInsertionEffect:sm,useLayoutEffect:um,useMemo:hm,useReducer:Co,useRef:am,useState:function(){return Co(Fn)},useDebugValue:fc,useDeferredValue:function(n,r){var l=lt();return pm(l,Ge.memoizedState,n,r)},useTransition:function(){var n=Co(Fn)[0],r=lt().memoizedState;return[typeof n=="boolean"?n:Qa(n),r]},useSyncExternalStore:Gp,useId:bm,useHostTransitionStatus:pc,useFormState:nm,useActionState:nm,useOptimistic:function(n,r){var l=lt();return Qp(l,Ge,n,r)},useMemoCache:ac,useCacheRefresh:vm};gc.useEffectEvent=om;var Cm={readContext:At,use:xo,useCallback:dm,useContext:At,useEffect:cc,useImperativeHandle:fm,useInsertionEffect:sm,useLayoutEffect:um,useMemo:hm,useReducer:oc,useRef:am,useState:function(){return oc(Fn)},useDebugValue:fc,useDeferredValue:function(n,r){var l=lt();return Ge===null?dc(l,n,r):pm(l,Ge.memoizedState,n,r)},useTransition:function(){var n=oc(Fn)[0],r=lt().memoizedState;return[typeof n=="boolean"?n:Qa(n),r]},useSyncExternalStore:Gp,useId:bm,useHostTransitionStatus:pc,useFormState:rm,useActionState:rm,useOptimistic:function(n,r){var l=lt();return Ge!==null?Qp(l,Ge,n,r):(l.baseState=n,[n,l.queue.dispatch])},useMemoCache:ac,useCacheRefresh:vm};Cm.useEffectEvent=om;function yc(n,r,l,u){r=n.memoizedState,l=l(u,r),l=l==null?r:y({},r,l),n.memoizedState=l,n.lanes===0&&(n.updateQueue.baseState=l)}var bc={enqueueSetState:function(n,r,l){n=n._reactInternals;var u=Wt(),h=Si(u);h.payload=r,l!=null&&(h.callback=l),r=Ei(n,h,u),r!==null&&(jt(r,n,u),qa(r,n,u))},enqueueReplaceState:function(n,r,l){n=n._reactInternals;var u=Wt(),h=Si(u);h.tag=1,h.payload=r,l!=null&&(h.callback=l),r=Ei(n,h,u),r!==null&&(jt(r,n,u),qa(r,n,u))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var l=Wt(),u=Si(l);u.tag=2,r!=null&&(u.callback=r),r=Ei(n,u,l),r!==null&&(jt(r,n,l),qa(r,n,l))}};function wm(n,r,l,u,h,m,_){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,m,_):r.prototype&&r.prototype.isPureReactComponent?!Ua(l,u)||!Ua(h,m):!0}function km(n,r,l,u){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,u),r.state!==n&&bc.enqueueReplaceState(r,r.state,null)}function rr(n,r){var l=r;if("ref"in r){l={};for(var u in r)u!=="ref"&&(l[u]=r[u])}if(n=n.defaultProps){l===r&&(l=y({},l));for(var h in n)l[h]===void 0&&(l[h]=n[h])}return l}function Am(n){ro(n)}function Tm(n){console.error(n)}function Lm(n){ro(n)}function To(n,r){try{var l=n.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function Rm(n,r,l){try{var u=n.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function vc(n,r,l){return l=Si(l),l.tag=3,l.payload={element:null},l.callback=function(){To(n,r)},l}function Dm(n){return n=Si(n),n.tag=3,n}function Nm(n,r,l,u){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var m=u.value;n.payload=function(){return h(m)},n.callback=function(){Rm(r,l,u)}}var _=l.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(n.callback=function(){Rm(r,l,u),typeof h!="function"&&(Ti===null?Ti=new Set([this]):Ti.add(this));var E=u.stack;this.componentDidCatch(u.value,{componentStack:E!==null?E:""})})}function iS(n,r,l,u,h){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=l.alternate,r!==null&&Mr(r,l,h,!0),l=Xt.current,l!==null){switch(l.tag){case 31:case 13:return un===null?Bo():l.alternate===null&&rt===0&&(rt=3),l.flags&=-257,l.flags|=65536,l.lanes=h,u===mo?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([u]):r.add(u),$c(n,u,h)),!1;case 22:return l.flags|=65536,u===mo?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)),$c(n,u,h)),!1}throw Error(a(435,l.tag))}return $c(n,u,h),Bo(),!1}if(Ie)return r=Xt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,u!==Hu&&(n=Error(a(422),{cause:u}),Ba(an(n,l)))):(u!==Hu&&(r=Error(a(423),{cause:u}),Ba(an(r,l))),n=n.current.alternate,n.flags|=65536,h&=-h,n.lanes|=h,u=an(u,l),h=vc(n.stateNode,u,h),Qu(n,h),rt!==4&&(rt=2)),!1;var m=Error(a(520),{cause:u});if(m=an(m,l),al===null?al=[m]:al.push(m),rt!==4&&(rt=2),r===null)return!0;u=an(u,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,n=h&-h,l.lanes|=n,n=vc(l.stateNode,u,n),Qu(l,n),!1;case 1:if(r=l.type,m=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Ti===null||!Ti.has(m))))return l.flags|=65536,h&=-h,l.lanes|=h,h=Dm(h),Nm(h,n,l,u),Qu(l,h),!1}l=l.return}while(l!==null);return!1}var _c=Error(a(461)),ft=!1;function Tt(n,r,l,u){r.child=n===null?zp(r,null,l,u):nr(r,n.child,l,u)}function Om(n,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 Wi(r),u=tc(n,r,l,_,m,h),E=nc(),n!==null&&!ft?(ic(n,r,h),Yn(n,r,h)):(Ie&&E&&zu(r),r.flags|=1,Tt(n,r,u,h),r.child)}function Mm(n,r,l,u,h){if(n===null){var m=l.type;return typeof m=="function"&&!Ou(m)&&m.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=m,Im(n,r,m,u,h)):(n=so(l.type,null,u,r,r.mode,h),n.ref=r.ref,n.return=r,r.child=n)}if(m=n.child,!Tc(n,h)){var _=m.memoizedProps;if(l=l.compare,l=l!==null?l:Ua,l(_,u)&&n.ref===r.ref)return Yn(n,r,h)}return r.flags|=1,n=jn(m,u),n.ref=r.ref,n.return=r,r.child=n}function Im(n,r,l,u,h){if(n!==null){var m=n.memoizedProps;if(Ua(m,u)&&n.ref===r.ref)if(ft=!1,r.pendingProps=u=m,Tc(n,h))(n.flags&131072)!==0&&(ft=!0);else return r.lanes=n.lanes,Yn(n,r,h)}return Sc(n,r,l,u,h)}function zm(n,r,l,u){var h=u.children,m=n!==null?n.memoizedState:null;if(n===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,n!==null){for(u=r.child=n.child,h=0;u!==null;)h=h|u.lanes|u.childLanes,u=u.sibling;u=h&~m}else u=0,r.child=null;return Um(n,r,m,l,u)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&ho(r,m!==null?m.cachePool:null),m!==null?Pp(r,m):Ku(),Bp(r);else return u=r.lanes=536870912,Um(n,r,m!==null?m.baseLanes|l:l,l,u)}else m!==null?(ho(r,m.cachePool),Pp(r,m),Ci(),r.memoizedState=null):(n!==null&&ho(r,null),Ku(),Ci());return Tt(n,r,h,l),r.child}function Wa(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Um(n,r,l,u,h){var m=qu();return m=m===null?null:{parent:ut._currentValue,pool:m},r.memoizedState={baseLanes:l,cachePool:m},n!==null&&ho(r,null),Ku(),Bp(r),n!==null&&Mr(n,r,u,!0),r.childLanes=h,null}function Lo(n,r){return r=Do({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function Hm(n,r,l){return nr(r,n.child,null,l),n=Lo(r,r.pendingProps),n.flags|=2,Qt(r),r.memoizedState=null,n}function rS(n,r,l){var u=r.pendingProps,h=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Ie){if(u.mode==="hidden")return n=Lo(r,u),r.lanes=536870912,Wa(null,n);if(Ju(r),(n=We)?(n=Zg(n,sn),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:gi!==null?{id:An,overflow:Tn}:null,retryLane:536870912,hydrationErrors:null},l=Sp(n),l.return=r,r.child=l,kt=r,We=null)):n=null,n===null)throw bi(r);return r.lanes=536870912,null}return Lo(r,u)}var m=n.memoizedState;if(m!==null){var _=m.dehydrated;if(Ju(r),h)if(r.flags&256)r.flags&=-257,r=Hm(n,r,l);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(a(558));else if(ft||Mr(n,r,l,!1),h=(l&n.childLanes)!==0,ft||h){if(u=Ye,u!==null&&(_=Th(u,l),_!==0&&_!==m.retryLane))throw m.retryLane=_,Xi(n,_),jt(u,n,_),_c;Bo(),r=Hm(n,r,l)}else n=m.treeContext,We=cn(_.nextSibling),kt=r,Ie=!0,yi=null,sn=!1,n!==null&&Cp(r,n),r=Lo(r,u),r.flags|=4096;return r}return n=jn(n.child,{mode:u.mode,children:u.children}),n.ref=r.ref,r.child=n,n.return=r,n}function Ro(n,r){var l=r.ref;if(l===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(n===null||n.ref!==l)&&(r.flags|=4194816)}}function Sc(n,r,l,u,h){return Wi(r),l=tc(n,r,l,u,void 0,h),u=nc(),n!==null&&!ft?(ic(n,r,h),Yn(n,r,h)):(Ie&&u&&zu(r),r.flags|=1,Tt(n,r,l,h),r.child)}function Pm(n,r,l,u,h,m){return Wi(r),r.updateQueue=null,l=Vp(r,u,l,h),jp(n),u=nc(),n!==null&&!ft?(ic(n,r,m),Yn(n,r,m)):(Ie&&u&&zu(r),r.flags|=1,Tt(n,r,l,m),r.child)}function Bm(n,r,l,u,h){if(Wi(r),r.stateNode===null){var m=Rr,_=l.contextType;typeof _=="object"&&_!==null&&(m=At(_)),m=new l(u,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=bc,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=u,m.state=r.memoizedState,m.refs={},Yu(r),_=l.contextType,m.context=typeof _=="object"&&_!==null?At(_):Rr,m.state=r.memoizedState,_=l.getDerivedStateFromProps,typeof _=="function"&&(yc(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&&bc.enqueueReplaceState(m,m.state,null),Ya(r,u,m,h),Fa(),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(n===null){m=r.stateNode;var E=r.memoizedProps,N=rr(l,E);m.props=N;var V=m.context,Y=l.contextType;_=Rr,typeof Y=="object"&&Y!==null&&(_=At(Y));var J=l.getDerivedStateFromProps;Y=typeof J=="function"||typeof m.getSnapshotBeforeUpdate=="function",E=r.pendingProps!==E,Y||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(E||V!==_)&&km(r,m,u,_),_i=!1;var $=r.memoizedState;m.state=$,Ya(r,u,m,h),Fa(),V=r.memoizedState,E||$!==V||_i?(typeof J=="function"&&(yc(r,l,J,u),V=r.memoizedState),(N=_i||wm(r,l,N,u,$,V,_))?(Y||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=V),m.props=u,m.state=V,m.context=_,u=N):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{m=r.stateNode,Xu(n,r),_=r.memoizedProps,Y=rr(l,_),m.props=Y,J=r.pendingProps,$=m.context,V=l.contextType,N=Rr,typeof V=="object"&&V!==null&&(N=At(V)),E=l.getDerivedStateFromProps,(V=typeof E=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(_!==J||$!==N)&&km(r,m,u,N),_i=!1,$=r.memoizedState,m.state=$,Ya(r,u,m,h),Fa();var q=r.memoizedState;_!==J||$!==q||_i||n!==null&&n.dependencies!==null&&co(n.dependencies)?(typeof E=="function"&&(yc(r,l,E,u),q=r.memoizedState),(Y=_i||wm(r,l,Y,u,$,q,N)||n!==null&&n.dependencies!==null&&co(n.dependencies))?(V||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(u,q,N),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(u,q,N)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||_===n.memoizedProps&&$===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&$===n.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=q),m.props=u,m.state=q,m.context=N,u=Y):(typeof m.componentDidUpdate!="function"||_===n.memoizedProps&&$===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&$===n.memoizedState||(r.flags|=1024),u=!1)}return m=u,Ro(n,r),u=(r.flags&128)!==0,m||u?(m=r.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:m.render(),r.flags|=1,n!==null&&u?(r.child=nr(r,n.child,null,h),r.child=nr(r,null,l,h)):Tt(n,r,l,h),r.memoizedState=m.state,n=r.child):n=Yn(n,r,h),n}function jm(n,r,l,u){return Zi(),r.flags|=256,Tt(n,r,l,u),r.child}var Ec={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xc(n){return{baseLanes:n,cachePool:Rp()}}function Cc(n,r,l){return n=n!==null?n.childLanes&~l:0,r&&(n|=Kt),n}function Vm(n,r,l){var u=r.pendingProps,h=!1,m=(r.flags&128)!==0,_;if((_=m)||(_=n!==null&&n.memoizedState===null?!1:(at.current&2)!==0),_&&(h=!0,r.flags&=-129),_=(r.flags&32)!==0,r.flags&=-33,n===null){if(Ie){if(h?xi(r):Ci(),(n=We)?(n=Zg(n,sn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:gi!==null?{id:An,overflow:Tn}:null,retryLane:536870912,hydrationErrors:null},l=Sp(n),l.return=r,r.child=l,kt=r,We=null)):n=null,n===null)throw bi(r);return of(n)?r.lanes=32:r.lanes=536870912,null}var E=u.children;return u=u.fallback,h?(Ci(),h=r.mode,E=Do({mode:"hidden",children:E},h),u=Qi(u,h,l,null),E.return=r,u.return=r,E.sibling=u,r.child=E,u=r.child,u.memoizedState=xc(l),u.childLanes=Cc(n,_,l),r.memoizedState=Ec,Wa(null,u)):(xi(r),wc(r,E))}var N=n.memoizedState;if(N!==null&&(E=N.dehydrated,E!==null)){if(m)r.flags&256?(xi(r),r.flags&=-257,r=kc(n,r,l)):r.memoizedState!==null?(Ci(),r.child=n.child,r.flags|=128,r=null):(Ci(),E=u.fallback,h=r.mode,u=Do({mode:"visible",children:u.children},h),E=Qi(E,h,l,null),E.flags|=2,u.return=r,E.return=r,u.sibling=E,r.child=u,nr(r,n.child,null,l),u=r.child,u.memoizedState=xc(l),u.childLanes=Cc(n,_,l),r.memoizedState=Ec,r=Wa(null,u));else if(xi(r),of(E)){if(_=E.nextSibling&&E.nextSibling.dataset,_)var V=_.dgst;_=V,u=Error(a(419)),u.stack="",u.digest=_,Ba({value:u,source:null,stack:null}),r=kc(n,r,l)}else if(ft||Mr(n,r,l,!1),_=(l&n.childLanes)!==0,ft||_){if(_=Ye,_!==null&&(u=Th(_,l),u!==0&&u!==N.retryLane))throw N.retryLane=u,Xi(n,u),jt(_,n,u),_c;lf(E)||Bo(),r=kc(n,r,l)}else lf(E)?(r.flags|=192,r.child=n.child,r=null):(n=N.treeContext,We=cn(E.nextSibling),kt=r,Ie=!0,yi=null,sn=!1,n!==null&&Cp(r,n),r=wc(r,u.children),r.flags|=4096);return r}return h?(Ci(),E=u.fallback,h=r.mode,N=n.child,V=N.sibling,u=jn(N,{mode:"hidden",children:u.children}),u.subtreeFlags=N.subtreeFlags&65011712,V!==null?E=jn(V,E):(E=Qi(E,h,l,null),E.flags|=2),E.return=r,u.return=r,u.sibling=E,r.child=u,Wa(null,u),u=r.child,E=n.child.memoizedState,E===null?E=xc(l):(h=E.cachePool,h!==null?(N=ut._currentValue,h=h.parent!==N?{parent:N,pool:N}:h):h=Rp(),E={baseLanes:E.baseLanes|l,cachePool:h}),u.memoizedState=E,u.childLanes=Cc(n,_,l),r.memoizedState=Ec,Wa(n.child,u)):(xi(r),l=n.child,n=l.sibling,l=jn(l,{mode:"visible",children:u.children}),l.return=r,l.sibling=null,n!==null&&(_=r.deletions,_===null?(r.deletions=[n],r.flags|=16):_.push(n)),r.child=l,r.memoizedState=null,l)}function wc(n,r){return r=Do({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function Do(n,r){return n=Yt(22,n,null,r),n.lanes=0,n}function kc(n,r,l){return nr(r,n.child,null,l),n=wc(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function Gm(n,r,l){n.lanes|=r;var u=n.alternate;u!==null&&(u.lanes|=r),ju(n.return,r,l)}function Ac(n,r,l,u,h,m){var _=n.memoizedState;_===null?n.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 $m(n,r,l){var u=r.pendingProps,h=u.revealOrder,m=u.tail;u=u.children;var _=at.current,E=(_&2)!==0;if(E?(_=_&1|2,r.flags|=128):_&=1,w(at,_),Tt(n,r,u,l),u=Ie?Pa:0,!E&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Gm(n,l,r);else if(n.tag===19)Gm(n,l,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(h){case"forwards":for(l=r.child,h=null;l!==null;)n=l.alternate,n!==null&&vo(n)===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(n=h.alternate,n!==null&&vo(n)===null){r.child=h;break}n=h.sibling,h.sibling=l,l=h,h=n}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 Yn(n,r,l){if(n!==null&&(r.dependencies=n.dependencies),Ai|=r.lanes,(l&r.childLanes)===0)if(n!==null){if(Mr(n,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(a(153));if(r.child!==null){for(n=r.child,l=jn(n,n.pendingProps),r.child=l,l.return=r;n.sibling!==null;)n=n.sibling,l=l.sibling=jn(n,n.pendingProps),l.return=r;l.sibling=null}return r.child}function Tc(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&co(n)))}function aS(n,r,l){switch(r.tag){case 3:Te(r,r.stateNode.containerInfo),vi(r,ut,n.memoizedState.cache),Zi();break;case 27:case 5:Xe(r);break;case 4:Te(r,r.stateNode.containerInfo);break;case 10:vi(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Ju(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(xi(r),r.flags|=128,null):(l&r.child.childLanes)!==0?Vm(n,r,l):(xi(r),n=Yn(n,r,l),n!==null?n.sibling:null);xi(r);break;case 19:var h=(n.flags&128)!==0;if(u=(l&r.childLanes)!==0,u||(Mr(n,r,l,!1),u=(l&r.childLanes)!==0),h){if(u)return $m(n,r,l);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),w(at,at.current),u)break;return null;case 22:return r.lanes=0,zm(n,r,l,r.pendingProps);case 24:vi(r,ut,n.memoizedState.cache)}return Yn(n,r,l)}function qm(n,r,l){if(n!==null)if(n.memoizedProps!==r.pendingProps)ft=!0;else{if(!Tc(n,l)&&(r.flags&128)===0)return ft=!1,aS(n,r,l);ft=(n.flags&131072)!==0}else ft=!1,Ie&&(r.flags&1048576)!==0&&xp(r,Pa,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(n=er(r.elementType),r.type=n,typeof n=="function")Ou(n)?(u=rr(n,u),r.tag=1,r=Bm(null,r,n,u,l)):(r.tag=0,r=Sc(null,r,n,u,l));else{if(n!=null){var h=n.$$typeof;if(h===I){r.tag=11,r=Om(null,r,n,u,l);break e}else if(h===P){r.tag=14,r=Mm(null,r,n,u,l);break e}}throw r=ie(n)||n,Error(a(306,r,""))}}return r;case 0:return Sc(n,r,r.type,r.pendingProps,l);case 1:return u=r.type,h=rr(u,r.pendingProps),Bm(n,r,u,h,l);case 3:e:{if(Te(r,r.stateNode.containerInfo),n===null)throw Error(a(387));u=r.pendingProps;var m=r.memoizedState;h=m.element,Xu(n,r),Ya(r,u,null,l);var _=r.memoizedState;if(u=_.cache,vi(r,ut,u),u!==m.cache&&Vu(r,[ut],l,!0),Fa(),u=_.element,m.isDehydrated)if(m={element:u,isDehydrated:!1,cache:_.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=jm(n,r,u,l);break e}else if(u!==h){h=an(Error(a(424)),r),Ba(h),r=jm(n,r,u,l);break e}else for(n=r.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,We=cn(n.firstChild),kt=r,Ie=!0,yi=null,sn=!0,l=zp(r,null,u,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Zi(),u===h){r=Yn(n,r,l);break e}Tt(n,r,u,l)}r=r.child}return r;case 26:return Ro(n,r),n===null?(l=ny(r.type,null,r.pendingProps,null))?r.memoizedState=l:Ie||(l=r.type,n=r.pendingProps,u=Yo(ce.current).createElement(l),u[wt]=r,u[It]=n,Lt(u,l,n),vt(u),r.stateNode=u):r.memoizedState=ny(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return Xe(r),n===null&&Ie&&(u=r.stateNode=Jg(r.type,r.pendingProps,ce.current),kt=r,sn=!0,h=We,Ni(r.type)?(sf=h,We=cn(u.firstChild)):We=h),Tt(n,r,r.pendingProps.children,l),Ro(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Ie&&((h=u=We)&&(u=IS(u,r.type,r.pendingProps,sn),u!==null?(r.stateNode=u,kt=r,We=cn(u.firstChild),sn=!1,h=!0):h=!1),h||bi(r)),Xe(r),h=r.type,m=r.pendingProps,_=n!==null?n.memoizedProps:null,u=m.children,nf(h,m)?u=null:_!==null&&nf(h,_)&&(r.flags|=32),r.memoizedState!==null&&(h=tc(n,r,Z_,null,null,l),hl._currentValue=h),Ro(n,r),Tt(n,r,u,l),r.child;case 6:return n===null&&Ie&&((n=l=We)&&(l=zS(l,r.pendingProps,sn),l!==null?(r.stateNode=l,kt=r,We=null,n=!0):n=!1),n||bi(r)),null;case 13:return Vm(n,r,l);case 4:return Te(r,r.stateNode.containerInfo),u=r.pendingProps,n===null?r.child=nr(r,null,u,l):Tt(n,r,u,l),r.child;case 11:return Om(n,r,r.type,r.pendingProps,l);case 7:return Tt(n,r,r.pendingProps,l),r.child;case 8:return Tt(n,r,r.pendingProps.children,l),r.child;case 12:return Tt(n,r,r.pendingProps.children,l),r.child;case 10:return u=r.pendingProps,vi(r,r.type,u.value),Tt(n,r,u.children,l),r.child;case 9:return h=r.type._context,u=r.pendingProps.children,Wi(r),h=At(h),u=u(h),r.flags|=1,Tt(n,r,u,l),r.child;case 14:return Mm(n,r,r.type,r.pendingProps,l);case 15:return Im(n,r,r.type,r.pendingProps,l);case 19:return $m(n,r,l);case 31:return rS(n,r,l);case 22:return zm(n,r,l,r.pendingProps);case 24:return Wi(r),u=At(ut),n===null?(h=qu(),h===null&&(h=Ye,m=Gu(),h.pooledCache=m,m.refCount++,m!==null&&(h.pooledCacheLanes|=l),h=m),r.memoizedState={parent:u,cache:h},Yu(r),vi(r,ut,h)):((n.lanes&l)!==0&&(Xu(n,r),Ya(r,null,null,l),Fa()),h=n.memoizedState,m=r.memoizedState,h.parent!==u?(h={parent:u,cache:u},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),vi(r,ut,u)):(u=m.cache,vi(r,ut,u),u!==h.cache&&Vu(r,[ut],l,!0))),Tt(n,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function Xn(n){n.flags|=4}function Lc(n,r,l,u,h){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(h&335544128)===h)if(n.stateNode.complete)n.flags|=8192;else if(bg())n.flags|=8192;else throw tr=mo,Fu}else n.flags&=-16777217}function Fm(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!oy(r))if(bg())n.flags|=8192;else throw tr=mo,Fu}function No(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?wh():536870912,n.lanes|=r,Fr|=r)}function Ja(n,r){if(!Ie)switch(n.tailMode){case"hidden":r=n.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?n.tail=null:l.sibling=null;break;case"collapsed":l=n.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function Je(n){var r=n.alternate!==null&&n.alternate.child===n.child,l=0,u=0;if(r)for(var h=n.child;h!==null;)l|=h.lanes|h.childLanes,u|=h.subtreeFlags&65011712,u|=h.flags&65011712,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)l|=h.lanes|h.childLanes,u|=h.subtreeFlags,u|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=u,n.childLanes=l,r}function lS(n,r,l){var u=r.pendingProps;switch(Uu(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(r),null;case 1:return Je(r),null;case 3:return l=r.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),$n(ut),Le(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(n===null||n.child===null)&&(Or(r)?Xn(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Pu())),Je(r),null;case 26:var h=r.type,m=r.memoizedState;return n===null?(Xn(r),m!==null?(Je(r),Fm(r,m)):(Je(r),Lc(r,h,null,u,l))):m?m!==n.memoizedState?(Xn(r),Je(r),Fm(r,m)):(Je(r),r.flags&=-16777217):(n=n.memoizedProps,n!==u&&Xn(r),Je(r),Lc(r,h,n,u,l)),null;case 27:if(et(r),l=ce.current,h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&Xn(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return Je(r),null}n=se.current,Or(r)?wp(r):(n=Jg(h,u,l),r.stateNode=n,Xn(r))}return Je(r),null;case 5:if(et(r),h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&Xn(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return Je(r),null}if(m=se.current,Or(r))wp(r);else{var _=Yo(ce.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[wt]=r,m[It]=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(Lt(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&&Xn(r)}}return Je(r),Lc(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,l),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==u&&Xn(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(n=ce.current,Or(r)){if(n=r.stateNode,l=r.memoizedProps,u=null,h=kt,h!==null)switch(h.tag){case 27:case 5:u=h.memoizedProps}n[wt]=r,n=!!(n.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||Vg(n.nodeValue,l)),n||bi(r,!0)}else n=Yo(n).createTextNode(u),n[wt]=r,r.stateNode=n}return Je(r),null;case 31:if(l=r.memoizedState,n===null||n.memoizedState!==null){if(u=Or(r),l!==null){if(n===null){if(!u)throw Error(a(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[wt]=r}else Zi(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Je(r),n=!1}else l=Pu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=l),n=!0;if(!n)return r.flags&256?(Qt(r),r):(Qt(r),null);if((r.flags&128)!==0)throw Error(a(558))}return Je(r),null;case 13:if(u=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(h=Or(r),u!==null&&u.dehydrated!==null){if(n===null){if(!h)throw Error(a(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(a(317));h[wt]=r}else Zi(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Je(r),h=!1}else h=Pu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(Qt(r),r):(Qt(r),null)}return Qt(r),(r.flags&128)!==0?(r.lanes=l,r):(l=u!==null,n=n!==null&&n.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!==n&&l&&(r.child.flags|=8192),No(r,r.updateQueue),Je(r),null);case 4:return Le(),n===null&&Kc(r.stateNode.containerInfo),Je(r),null;case 10:return $n(r.type),Je(r),null;case 19:if(F(at),u=r.memoizedState,u===null)return Je(r),null;if(h=(r.flags&128)!==0,m=u.rendering,m===null)if(h)Ja(u,!1);else{if(rt!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(m=vo(n),m!==null){for(r.flags|=128,Ja(u,!1),n=m.updateQueue,r.updateQueue=n,No(r,n),r.subtreeFlags=0,n=l,l=r.child;l!==null;)_p(l,n),l=l.sibling;return w(at,at.current&1|2),Ie&&Vn(r,u.treeForkCount),r.child}n=n.sibling}u.tail!==null&&Ct()>Uo&&(r.flags|=128,h=!0,Ja(u,!1),r.lanes=4194304)}else{if(!h)if(n=vo(m),n!==null){if(r.flags|=128,h=!0,n=n.updateQueue,r.updateQueue=n,No(r,n),Ja(u,!0),u.tail===null&&u.tailMode==="hidden"&&!m.alternate&&!Ie)return Je(r),null}else 2*Ct()-u.renderingStartTime>Uo&&l!==536870912&&(r.flags|=128,h=!0,Ja(u,!1),r.lanes=4194304);u.isBackwards?(m.sibling=r.child,r.child=m):(n=u.last,n!==null?n.sibling=m:r.child=m,u.last=m)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=Ct(),n.sibling=null,l=at.current,w(at,h?l&1|2:l&1),Ie&&Vn(r,u.treeForkCount),n):(Je(r),null);case 22:case 23:return Qt(r),Wu(),u=r.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(l&536870912)!==0&&(r.flags&128)===0&&(Je(r),r.subtreeFlags&6&&(r.flags|=8192)):Je(r),l=r.updateQueue,l!==null&&No(r,l.retryQueue),l=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==l&&(r.flags|=2048),n!==null&&F(Ji),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),$n(ut),Je(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function oS(n,r){switch(Uu(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return $n(ut),Le(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return et(r),null;case 31:if(r.memoizedState!==null){if(Qt(r),r.alternate===null)throw Error(a(340));Zi()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(Qt(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Zi()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return F(at),null;case 4:return Le(),null;case 10:return $n(r.type),null;case 22:case 23:return Qt(r),Wu(),n!==null&&F(Ji),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return $n(ut),null;case 25:return null;default:return null}}function Ym(n,r){switch(Uu(r),r.tag){case 3:$n(ut),Le();break;case 26:case 27:case 5:et(r);break;case 4:Le();break;case 31:r.memoizedState!==null&&Qt(r);break;case 13:Qt(r);break;case 19:F(at);break;case 10:$n(r.type);break;case 22:case 23:Qt(r),Wu(),n!==null&&F(Ji);break;case 24:$n(ut)}}function el(n,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&n)===n){u=void 0;var m=l.create,_=l.inst;u=m(),_.destroy=u}l=l.next}while(l!==h)}}catch(E){Ve(r,r.return,E)}}function wi(n,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&n)===n){var _=u.inst,E=_.destroy;if(E!==void 0){_.destroy=void 0,h=r;var N=l,V=E;try{V()}catch(Y){Ve(h,N,Y)}}}u=u.next}while(u!==m)}}catch(Y){Ve(r,r.return,Y)}}function Xm(n){var r=n.updateQueue;if(r!==null){var l=n.stateNode;try{Hp(r,l)}catch(u){Ve(n,n.return,u)}}}function Qm(n,r,l){l.props=rr(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(u){Ve(n,r,u)}}function tl(n,r){try{var l=n.ref;if(l!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof l=="function"?n.refCleanup=l(u):l.current=u}}catch(h){Ve(n,r,h)}}function Ln(n,r){var l=n.ref,u=n.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(h){Ve(n,r,h)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(h){Ve(n,r,h)}else l.current=null}function Zm(n){var r=n.type,l=n.memoizedProps,u=n.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){Ve(n,n.return,h)}}function Rc(n,r,l){try{var u=n.stateNode;LS(u,n.type,l,r),u[It]=r}catch(h){Ve(n,n.return,h)}}function Km(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Ni(n.type)||n.tag===4}function Dc(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Km(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Ni(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Nc(n,r,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(n,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(n),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=Pn));else if(u!==4&&(u===27&&Ni(n.type)&&(l=n.stateNode,r=null),n=n.child,n!==null))for(Nc(n,r,l),n=n.sibling;n!==null;)Nc(n,r,l),n=n.sibling}function Oo(n,r,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?l.insertBefore(n,r):l.appendChild(n);else if(u!==4&&(u===27&&Ni(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(Oo(n,r,l),n=n.sibling;n!==null;)Oo(n,r,l),n=n.sibling}function Wm(n){var r=n.stateNode,l=n.memoizedProps;try{for(var u=n.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);Lt(r,u,l),r[wt]=n,r[It]=l}catch(m){Ve(n,n.return,m)}}var Qn=!1,dt=!1,Oc=!1,Jm=typeof WeakSet=="function"?WeakSet:Set,_t=null;function sS(n,r){if(n=n.containerInfo,ef=es,n=fp(n),ku(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.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,N=-1,V=0,Y=0,J=n,$=null;t:for(;;){for(var q;J!==l||h!==0&&J.nodeType!==3||(E=_+h),J!==m||u!==0&&J.nodeType!==3||(N=_+u),J.nodeType===3&&(_+=J.nodeValue.length),(q=J.firstChild)!==null;)$=J,J=q;for(;;){if(J===n)break t;if($===l&&++V===h&&(E=_),$===m&&++Y===u&&(N=_),(q=J.nextSibling)!==null)break;J=$,$=J.parentNode}J=q}l=E===-1||N===-1?null:{start:E,end:N}}else l=null}l=l||{start:0,end:0}}else l=null;for(tf={focusedElem:n,selectionRange:l},es=!1,_t=r;_t!==null;)if(r=_t,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,_t=n;else for(;_t!==null;){switch(r=_t,m=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(l=0;l<n.length;l++)h=n[l],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&m!==null){n=void 0,l=r,h=m.memoizedProps,m=m.memoizedState,u=l.stateNode;try{var de=rr(l.type,h);n=u.getSnapshotBeforeUpdate(de,m),u.__reactInternalSnapshotBeforeUpdate=n}catch(ve){Ve(l,l.return,ve)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,l=n.nodeType,l===9)af(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":af(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=r.sibling,n!==null){n.return=r.return,_t=n;break}_t=r.return}}function eg(n,r,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:Kn(n,l),u&4&&el(5,l);break;case 1:if(Kn(n,l),u&4)if(n=l.stateNode,r===null)try{n.componentDidMount()}catch(_){Ve(l,l.return,_)}else{var h=rr(l.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(h,r,n.__reactInternalSnapshotBeforeUpdate)}catch(_){Ve(l,l.return,_)}}u&64&&Xm(l),u&512&&tl(l,l.return);break;case 3:if(Kn(n,l),u&64&&(n=l.updateQueue,n!==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{Hp(n,r)}catch(_){Ve(l,l.return,_)}}break;case 27:r===null&&u&4&&Wm(l);case 26:case 5:Kn(n,l),r===null&&u&4&&Zm(l),u&512&&tl(l,l.return);break;case 12:Kn(n,l);break;case 31:Kn(n,l),u&4&&ig(n,l);break;case 13:Kn(n,l),u&4&&rg(n,l),u&64&&(n=l.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(l=yS.bind(null,l),US(n,l))));break;case 22:if(u=l.memoizedState!==null||Qn,!u){r=r!==null&&r.memoizedState!==null||dt,h=Qn;var m=dt;Qn=u,(dt=r)&&!m?Wn(n,l,(l.subtreeFlags&8772)!==0):Kn(n,l),Qn=h,dt=m}break;case 30:break;default:Kn(n,l)}}function tg(n){var r=n.alternate;r!==null&&(n.alternate=null,tg(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&uu(r)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var tt=null,Ut=!1;function Zn(n,r,l){for(l=l.child;l!==null;)ng(n,r,l),l=l.sibling}function ng(n,r,l){if(Be&&typeof Be.onCommitFiberUnmount=="function")try{Be.onCommitFiberUnmount(nt,l)}catch{}switch(l.tag){case 26:dt||Ln(l,r),Zn(n,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:dt||Ln(l,r);var u=tt,h=Ut;Ni(l.type)&&(tt=l.stateNode,Ut=!1),Zn(n,r,l),cl(l.stateNode),tt=u,Ut=h;break;case 5:dt||Ln(l,r);case 6:if(u=tt,h=Ut,tt=null,Zn(n,r,l),tt=u,Ut=h,tt!==null)if(Ut)try{(tt.nodeType===9?tt.body:tt.nodeName==="HTML"?tt.ownerDocument.body:tt).removeChild(l.stateNode)}catch(m){Ve(l,r,m)}else try{tt.removeChild(l.stateNode)}catch(m){Ve(l,r,m)}break;case 18:tt!==null&&(Ut?(n=tt,Xg(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,l.stateNode),ea(n)):Xg(tt,l.stateNode));break;case 4:u=tt,h=Ut,tt=l.stateNode.containerInfo,Ut=!0,Zn(n,r,l),tt=u,Ut=h;break;case 0:case 11:case 14:case 15:wi(2,l,r),dt||wi(4,l,r),Zn(n,r,l);break;case 1:dt||(Ln(l,r),u=l.stateNode,typeof u.componentWillUnmount=="function"&&Qm(l,r,u)),Zn(n,r,l);break;case 21:Zn(n,r,l);break;case 22:dt=(u=dt)||l.memoizedState!==null,Zn(n,r,l),dt=u;break;default:Zn(n,r,l)}}function ig(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ea(n)}catch(l){Ve(r,r.return,l)}}}function rg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ea(n)}catch(l){Ve(r,r.return,l)}}function uS(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new Jm),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new Jm),r;default:throw Error(a(435,n.tag))}}function Mo(n,r){var l=uS(n);r.forEach(function(u){if(!l.has(u)){l.add(u);var h=bS.bind(null,n,u);u.then(h,h)}})}function Ht(n,r){var l=r.deletions;if(l!==null)for(var u=0;u<l.length;u++){var h=l[u],m=n,_=r,E=_;e:for(;E!==null;){switch(E.tag){case 27:if(Ni(E.type)){tt=E.stateNode,Ut=!1;break e}break;case 5:tt=E.stateNode,Ut=!1;break e;case 3:case 4:tt=E.stateNode.containerInfo,Ut=!0;break e}E=E.return}if(tt===null)throw Error(a(160));ng(m,_,h),tt=null,Ut=!1,m=h.alternate,m!==null&&(m.return=null),h.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)ag(r,n),r=r.sibling}var vn=null;function ag(n,r){var l=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Ht(r,n),Pt(n),u&4&&(wi(3,n,n.return),el(3,n),wi(5,n,n.return));break;case 1:Ht(r,n),Pt(n),u&512&&(dt||l===null||Ln(l,l.return)),u&64&&Qn&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(l=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var h=vn;if(Ht(r,n),Pt(n),u&512&&(dt||l===null||Ln(l,l.return)),u&4){var m=l!==null?l.memoizedState:null;if(u=n.memoizedState,l===null)if(u===null)if(n.stateNode===null){e:{u=n.type,l=n.memoizedProps,h=h.ownerDocument||h;t:switch(u){case"title":m=h.getElementsByTagName("title")[0],(!m||m[Ta]||m[wt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=h.createElement(u),h.head.insertBefore(m,h.querySelector("head > title"))),Lt(m,u,l),m[wt]=n,vt(m),u=m;break e;case"link":var _=ay("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),Lt(m,u,l),h.head.appendChild(m);break;case"meta":if(_=ay("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),Lt(m,u,l),h.head.appendChild(m);break;default:throw Error(a(468,u))}m[wt]=n,vt(m),u=m}n.stateNode=u}else ly(h,n.type,n.stateNode);else n.stateNode=ry(h,u,n.memoizedProps);else m!==u?(m===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):m.count--,u===null?ly(h,n.type,n.stateNode):ry(h,u,n.memoizedProps)):u===null&&n.stateNode!==null&&Rc(n,n.memoizedProps,l.memoizedProps)}break;case 27:Ht(r,n),Pt(n),u&512&&(dt||l===null||Ln(l,l.return)),l!==null&&u&4&&Rc(n,n.memoizedProps,l.memoizedProps);break;case 5:if(Ht(r,n),Pt(n),u&512&&(dt||l===null||Ln(l,l.return)),n.flags&32){h=n.stateNode;try{xr(h,"")}catch(de){Ve(n,n.return,de)}}u&4&&n.stateNode!=null&&(h=n.memoizedProps,Rc(n,h,l!==null?l.memoizedProps:h)),u&1024&&(Oc=!0);break;case 6:if(Ht(r,n),Pt(n),u&4){if(n.stateNode===null)throw Error(a(162));u=n.memoizedProps,l=n.stateNode;try{l.nodeValue=u}catch(de){Ve(n,n.return,de)}}break;case 3:if(Zo=null,h=vn,vn=Xo(r.containerInfo),Ht(r,n),vn=h,Pt(n),u&4&&l!==null&&l.memoizedState.isDehydrated)try{ea(r.containerInfo)}catch(de){Ve(n,n.return,de)}Oc&&(Oc=!1,lg(n));break;case 4:u=vn,vn=Xo(n.stateNode.containerInfo),Ht(r,n),Pt(n),vn=u;break;case 12:Ht(r,n),Pt(n);break;case 31:Ht(r,n),Pt(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Mo(n,u)));break;case 13:Ht(r,n),Pt(n),n.child.flags&8192&&n.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(zo=Ct()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Mo(n,u)));break;case 22:h=n.memoizedState!==null;var N=l!==null&&l.memoizedState!==null,V=Qn,Y=dt;if(Qn=V||h,dt=Y||N,Ht(r,n),dt=Y,Qn=V,Pt(n),u&8192)e:for(r=n.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(l===null||N||Qn||dt||ar(n)),l=null,r=n;;){if(r.tag===5||r.tag===26){if(l===null){N=l=r;try{if(m=N.stateNode,h)_=m.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{E=N.stateNode;var J=N.memoizedProps.style,$=J!=null&&J.hasOwnProperty("display")?J.display:null;E.style.display=$==null||typeof $=="boolean"?"":(""+$).trim()}}catch(de){Ve(N,N.return,de)}}}else if(r.tag===6){if(l===null){N=r;try{N.stateNode.nodeValue=h?"":N.memoizedProps}catch(de){Ve(N,N.return,de)}}}else if(r.tag===18){if(l===null){N=r;try{var q=N.stateNode;h?Qg(q,!0):Qg(N.stateNode,!1)}catch(de){Ve(N,N.return,de)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=n.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,Mo(n,l))));break;case 19:Ht(r,n),Pt(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Mo(n,u)));break;case 30:break;case 21:break;default:Ht(r,n),Pt(n)}}function Pt(n){var r=n.flags;if(r&2){try{for(var l,u=n.return;u!==null;){if(Km(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var h=l.stateNode,m=Dc(n);Oo(n,m,h);break;case 5:var _=l.stateNode;l.flags&32&&(xr(_,""),l.flags&=-33);var E=Dc(n);Oo(n,E,_);break;case 3:case 4:var N=l.stateNode.containerInfo,V=Dc(n);Nc(n,V,N);break;default:throw Error(a(161))}}catch(Y){Ve(n,n.return,Y)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function lg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;lg(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function Kn(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)eg(n,r.alternate,r),r=r.sibling}function ar(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:wi(4,r,r.return),ar(r);break;case 1:Ln(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&Qm(r,r.return,l),ar(r);break;case 27:cl(r.stateNode);case 26:case 5:Ln(r,r.return),ar(r);break;case 22:r.memoizedState===null&&ar(r);break;case 30:ar(r);break;default:ar(r)}n=n.sibling}}function Wn(n,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,h=n,m=r,_=m.flags;switch(m.tag){case 0:case 11:case 15:Wn(h,m,l),el(4,m);break;case 1:if(Wn(h,m,l),u=m,h=u.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(V){Ve(u,u.return,V)}if(u=m,h=u.updateQueue,h!==null){var E=u.stateNode;try{var N=h.shared.hiddenCallbacks;if(N!==null)for(h.shared.hiddenCallbacks=null,h=0;h<N.length;h++)Up(N[h],E)}catch(V){Ve(u,u.return,V)}}l&&_&64&&Xm(m),tl(m,m.return);break;case 27:Wm(m);case 26:case 5:Wn(h,m,l),l&&u===null&&_&4&&Zm(m),tl(m,m.return);break;case 12:Wn(h,m,l);break;case 31:Wn(h,m,l),l&&_&4&&ig(h,m);break;case 13:Wn(h,m,l),l&&_&4&&rg(h,m);break;case 22:m.memoizedState===null&&Wn(h,m,l),tl(m,m.return);break;case 30:break;default:Wn(h,m,l)}r=r.sibling}}function Mc(n,r){var l=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==l&&(n!=null&&n.refCount++,l!=null&&ja(l))}function Ic(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&ja(n))}function _n(n,r,l,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)og(n,r,l,u),r=r.sibling}function og(n,r,l,u){var h=r.flags;switch(r.tag){case 0:case 11:case 15:_n(n,r,l,u),h&2048&&el(9,r);break;case 1:_n(n,r,l,u);break;case 3:_n(n,r,l,u),h&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&ja(n)));break;case 12:if(h&2048){_n(n,r,l,u),n=r.stateNode;try{var m=r.memoizedProps,_=m.id,E=m.onPostCommit;typeof E=="function"&&E(_,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(N){Ve(r,r.return,N)}}else _n(n,r,l,u);break;case 31:_n(n,r,l,u);break;case 13:_n(n,r,l,u);break;case 23:break;case 22:m=r.stateNode,_=r.alternate,r.memoizedState!==null?m._visibility&2?_n(n,r,l,u):nl(n,r):m._visibility&2?_n(n,r,l,u):(m._visibility|=2,Gr(n,r,l,u,(r.subtreeFlags&10256)!==0||!1)),h&2048&&Mc(_,r);break;case 24:_n(n,r,l,u),h&2048&&Ic(r.alternate,r);break;default:_n(n,r,l,u)}}function Gr(n,r,l,u,h){for(h=h&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=n,_=r,E=l,N=u,V=_.flags;switch(_.tag){case 0:case 11:case 15:Gr(m,_,E,N,h),el(8,_);break;case 23:break;case 22:var Y=_.stateNode;_.memoizedState!==null?Y._visibility&2?Gr(m,_,E,N,h):nl(m,_):(Y._visibility|=2,Gr(m,_,E,N,h)),h&&V&2048&&Mc(_.alternate,_);break;case 24:Gr(m,_,E,N,h),h&&V&2048&&Ic(_.alternate,_);break;default:Gr(m,_,E,N,h)}r=r.sibling}}function nl(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=n,u=r,h=u.flags;switch(u.tag){case 22:nl(l,u),h&2048&&Mc(u.alternate,u);break;case 24:nl(l,u),h&2048&&Ic(u.alternate,u);break;default:nl(l,u)}r=r.sibling}}var il=8192;function $r(n,r,l){if(n.subtreeFlags&il)for(n=n.child;n!==null;)sg(n,r,l),n=n.sibling}function sg(n,r,l){switch(n.tag){case 26:$r(n,r,l),n.flags&il&&n.memoizedState!==null&&QS(l,vn,n.memoizedState,n.memoizedProps);break;case 5:$r(n,r,l);break;case 3:case 4:var u=vn;vn=Xo(n.stateNode.containerInfo),$r(n,r,l),vn=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=il,il=16777216,$r(n,r,l),il=u):$r(n,r,l));break;default:$r(n,r,l)}}function ug(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function rl(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];_t=u,fg(u,n)}ug(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)cg(n),n=n.sibling}function cg(n){switch(n.tag){case 0:case 11:case 15:rl(n),n.flags&2048&&wi(9,n,n.return);break;case 3:rl(n);break;case 12:rl(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,Io(n)):rl(n);break;default:rl(n)}}function Io(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];_t=u,fg(u,n)}ug(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:wi(8,r,r.return),Io(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,Io(r));break;default:Io(r)}n=n.sibling}}function fg(n,r){for(;_t!==null;){var l=_t;switch(l.tag){case 0:case 11:case 15:wi(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:ja(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,_t=u;else e:for(l=n;_t!==null;){u=_t;var h=u.sibling,m=u.return;if(tg(u),u===l){_t=null;break e}if(h!==null){h.return=m,_t=h;break e}_t=m}}}var cS={getCacheForType:function(n){var r=At(ut),l=r.data.get(n);return l===void 0&&(l=n(),r.data.set(n,l)),l},cacheSignal:function(){return At(ut).controller.signal}},fS=typeof WeakMap=="function"?WeakMap:Map,He=0,Ye=null,De=null,Oe=0,je=0,Zt=null,ki=!1,qr=!1,zc=!1,Jn=0,rt=0,Ai=0,lr=0,Uc=0,Kt=0,Fr=0,al=null,Bt=null,Hc=!1,zo=0,dg=0,Uo=1/0,Ho=null,Ti=null,mt=0,Li=null,Yr=null,ei=0,Pc=0,Bc=null,hg=null,ll=0,jc=null;function Wt(){return(He&2)!==0&&Oe!==0?Oe&-Oe:B.T!==null?Yc():Lh()}function pg(){if(Kt===0)if((Oe&536870912)===0||Ie){var n=ql;ql<<=1,(ql&3932160)===0&&(ql=262144),Kt=n}else Kt=536870912;return n=Xt.current,n!==null&&(n.flags|=32),Kt}function jt(n,r,l){(n===Ye&&(je===2||je===9)||n.cancelPendingCommit!==null)&&(Xr(n,0),Ri(n,Oe,Kt,!1)),Aa(n,l),((He&2)===0||n!==Ye)&&(n===Ye&&((He&2)===0&&(lr|=l),rt===4&&Ri(n,Oe,Kt,!1)),Rn(n))}function mg(n,r,l){if((He&6)!==0)throw Error(a(327));var u=!l&&(r&127)===0&&(r&n.expiredLanes)===0||ka(n,r),h=u?pS(n,r):Gc(n,r,!0),m=u;do{if(h===0){qr&&!u&&Ri(n,r,0,!1);break}else{if(l=n.current.alternate,m&&!dS(l)){h=Gc(n,r,!1),m=!1;continue}if(h===2){if(m=r,n.errorRecoveryDisabledLanes&m)var _=0;else _=n.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){r=_;e:{var E=n;h=al;var N=E.current.memoizedState.isDehydrated;if(N&&(Xr(E,_).flags|=256),_=Gc(E,_,!1),_!==2){if(zc&&!N){E.errorRecoveryDisabledLanes|=m,lr|=m,h=4;break e}m=Bt,Bt=h,m!==null&&(Bt===null?Bt=m:Bt.push.apply(Bt,m))}h=_}if(m=!1,h!==2)continue}}if(h===1){Xr(n,0),Ri(n,r,0,!0);break}e:{switch(u=n,m=h,m){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Ri(u,r,Kt,!ki);break e;case 2:Bt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(h=zo+300-Ct(),10<h)){if(Ri(u,r,Kt,!ki),Yl(u,0,!0)!==0)break e;ei=r,u.timeoutHandle=Fg(gg.bind(null,u,l,Bt,Ho,Hc,r,Kt,lr,Fr,ki,m,"Throttled",-0,0),h);break e}gg(u,l,Bt,Ho,Hc,r,Kt,lr,Fr,ki,m,null,-0,0)}}break}while(!0);Rn(n)}function gg(n,r,l,u,h,m,_,E,N,V,Y,J,$,q){if(n.timeoutHandle=-1,J=r.subtreeFlags,J&8192||(J&16785408)===16785408){J={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pn},sg(r,m,J);var de=(m&62914560)===m?zo-Ct():(m&4194048)===m?dg-Ct():0;if(de=ZS(J,de),de!==null){ei=m,n.cancelPendingCommit=de(Cg.bind(null,n,r,m,l,u,h,_,E,N,Y,J,null,$,q)),Ri(n,m,_,!V);return}}Cg(n,r,m,l,u,h,_,E,N)}function dS(n){for(var r=n;;){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(!Ft(m(),h))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Ri(n,r,l,u){r&=~Uc,r&=~lr,n.suspendedLanes|=r,n.pingedLanes&=~r,u&&(n.warmLanes|=r),u=n.expirationTimes;for(var h=r;0<h;){var m=31-Fe(h),_=1<<m;u[m]=-1,h&=~_}l!==0&&kh(n,l,r)}function Po(){return(He&6)===0?(ol(0),!1):!0}function Vc(){if(De!==null){if(je===0)var n=De.return;else n=De,Gn=Ki=null,rc(n),Hr=null,Ga=0,n=De;for(;n!==null;)Ym(n.alternate,n),n=n.return;De=null}}function Xr(n,r){var l=n.timeoutHandle;l!==-1&&(n.timeoutHandle=-1,NS(l)),l=n.cancelPendingCommit,l!==null&&(n.cancelPendingCommit=null,l()),ei=0,Vc(),Ye=n,De=l=jn(n.current,null),Oe=r,je=0,Zt=null,ki=!1,qr=ka(n,r),zc=!1,Fr=Kt=Uc=lr=Ai=rt=0,Bt=al=null,Hc=!1,(r&8)!==0&&(r|=r&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=r;0<u;){var h=31-Fe(u),m=1<<h;r|=n[h],u&=~m}return Jn=r,ao(),l}function yg(n,r){we=null,B.H=Ka,r===Ur||r===po?(r=Op(),je=3):r===Fu?(r=Op(),je=4):je=r===_c?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Zt=r,De===null&&(rt=1,To(n,an(r,n.current)))}function bg(){var n=Xt.current;return n===null?!0:(Oe&4194048)===Oe?un===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?n===un:!1}function vg(){var n=B.H;return B.H=Ka,n===null?Ka:n}function _g(){var n=B.A;return B.A=cS,n}function Bo(){rt=4,ki||(Oe&4194048)!==Oe&&Xt.current!==null||(qr=!0),(Ai&134217727)===0&&(lr&134217727)===0||Ye===null||Ri(Ye,Oe,Kt,!1)}function Gc(n,r,l){var u=He;He|=2;var h=vg(),m=_g();(Ye!==n||Oe!==r)&&(Ho=null,Xr(n,r)),r=!1;var _=rt;e:do try{if(je!==0&&De!==null){var E=De,N=Zt;switch(je){case 8:Vc(),_=6;break e;case 3:case 2:case 9:case 6:Xt.current===null&&(r=!0);var V=je;if(je=0,Zt=null,Qr(n,E,N,V),l&&qr){_=0;break e}break;default:V=je,je=0,Zt=null,Qr(n,E,N,V)}}hS(),_=rt;break}catch(Y){yg(n,Y)}while(!0);return r&&n.shellSuspendCounter++,Gn=Ki=null,He=u,B.H=h,B.A=m,De===null&&(Ye=null,Oe=0,ao()),_}function hS(){for(;De!==null;)Sg(De)}function pS(n,r){var l=He;He|=2;var u=vg(),h=_g();Ye!==n||Oe!==r?(Ho=null,Uo=Ct()+500,Xr(n,r)):qr=ka(n,r);e:do try{if(je!==0&&De!==null){r=De;var m=Zt;t:switch(je){case 1:je=0,Zt=null,Qr(n,r,m,1);break;case 2:case 9:if(Dp(m)){je=0,Zt=null,Eg(r);break}r=function(){je!==2&&je!==9||Ye!==n||(je=7),Rn(n)},m.then(r,r);break e;case 3:je=7;break e;case 4:je=5;break e;case 7:Dp(m)?(je=0,Zt=null,Eg(r)):(je=0,Zt=null,Qr(n,r,m,7));break;case 5:var _=null;switch(De.tag){case 26:_=De.memoizedState;case 5:case 27:var E=De;if(_?oy(_):E.stateNode.complete){je=0,Zt=null;var N=E.sibling;if(N!==null)De=N;else{var V=E.return;V!==null?(De=V,jo(V)):De=null}break t}}je=0,Zt=null,Qr(n,r,m,5);break;case 6:je=0,Zt=null,Qr(n,r,m,6);break;case 8:Vc(),rt=6;break e;default:throw Error(a(462))}}mS();break}catch(Y){yg(n,Y)}while(!0);return Gn=Ki=null,B.H=u,B.A=h,He=l,De!==null?0:(Ye=null,Oe=0,ao(),rt)}function mS(){for(;De!==null&&!gr();)Sg(De)}function Sg(n){var r=qm(n.alternate,n,Jn);n.memoizedProps=n.pendingProps,r===null?jo(n):De=r}function Eg(n){var r=n,l=r.alternate;switch(r.tag){case 15:case 0:r=Pm(l,r,r.pendingProps,r.type,void 0,Oe);break;case 11:r=Pm(l,r,r.pendingProps,r.type.render,r.ref,Oe);break;case 5:rc(r);default:Ym(l,r),r=De=_p(r,Jn),r=qm(l,r,Jn)}n.memoizedProps=n.pendingProps,r===null?jo(n):De=r}function Qr(n,r,l,u){Gn=Ki=null,rc(r),Hr=null,Ga=0;var h=r.return;try{if(iS(n,h,r,l,Oe)){rt=1,To(n,an(l,n.current)),De=null;return}}catch(m){if(h!==null)throw De=h,m;rt=1,To(n,an(l,n.current)),De=null;return}r.flags&32768?(Ie||u===1?n=!0:qr||(Oe&536870912)!==0?n=!1:(ki=n=!0,(u===2||u===9||u===3||u===6)&&(u=Xt.current,u!==null&&u.tag===13&&(u.flags|=16384))),xg(r,n)):jo(r)}function jo(n){var r=n;do{if((r.flags&32768)!==0){xg(r,ki);return}n=r.return;var l=lS(r.alternate,r,Jn);if(l!==null){De=l;return}if(r=r.sibling,r!==null){De=r;return}De=r=n}while(r!==null);rt===0&&(rt=5)}function xg(n,r){do{var l=oS(n.alternate,n);if(l!==null){l.flags&=32767,De=l;return}if(l=n.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(n=n.sibling,n!==null)){De=n;return}De=n=l}while(n!==null);rt=6,De=null}function Cg(n,r,l,u,h,m,_,E,N){n.cancelPendingCommit=null;do Vo();while(mt!==0);if((He&6)!==0)throw Error(a(327));if(r!==null){if(r===n.current)throw Error(a(177));if(m=r.lanes|r.childLanes,m|=Du,X1(n,l,m,_,E,N),n===Ye&&(De=Ye=null,Oe=0),Yr=r,Li=n,ei=l,Pc=m,Bc=h,hg=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,vS(_e,function(){return Lg(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=B.T,B.T=null,h=X.p,X.p=2,_=He,He|=4;try{sS(n,r,l)}finally{He=_,X.p=h,B.T=u}}mt=1,wg(),kg(),Ag()}}function wg(){if(mt===1){mt=0;var n=Li,r=Yr,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=B.T,B.T=null;var u=X.p;X.p=2;var h=He;He|=4;try{ag(r,n);var m=tf,_=fp(n.containerInfo),E=m.focusedElem,N=m.selectionRange;if(_!==E&&E&&E.ownerDocument&&cp(E.ownerDocument.documentElement,E)){if(N!==null&&ku(E)){var V=N.start,Y=N.end;if(Y===void 0&&(Y=V),"selectionStart"in E)E.selectionStart=V,E.selectionEnd=Math.min(Y,E.value.length);else{var J=E.ownerDocument||document,$=J&&J.defaultView||window;if($.getSelection){var q=$.getSelection(),de=E.textContent.length,ve=Math.min(N.start,de),qe=N.end===void 0?ve:Math.min(N.end,de);!q.extend&&ve>qe&&(_=qe,qe=ve,ve=_);var U=up(E,ve),M=up(E,qe);if(U&&M&&(q.rangeCount!==1||q.anchorNode!==U.node||q.anchorOffset!==U.offset||q.focusNode!==M.node||q.focusOffset!==M.offset)){var j=J.createRange();j.setStart(U.node,U.offset),q.removeAllRanges(),ve>qe?(q.addRange(j),q.extend(M.node,M.offset)):(j.setEnd(M.node,M.offset),q.addRange(j))}}}}for(J=[],q=E;q=q.parentNode;)q.nodeType===1&&J.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<J.length;E++){var K=J[E];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}es=!!ef,tf=ef=null}finally{He=h,X.p=u,B.T=l}}n.current=r,mt=2}}function kg(){if(mt===2){mt=0;var n=Li,r=Yr,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=B.T,B.T=null;var u=X.p;X.p=2;var h=He;He|=4;try{eg(n,r.alternate,r)}finally{He=h,X.p=u,B.T=l}}mt=3}}function Ag(){if(mt===4||mt===3){mt=0,Ca();var n=Li,r=Yr,l=ei,u=hg;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?mt=5:(mt=0,Yr=Li=null,Tg(n,n.pendingLanes));var h=n.pendingLanes;if(h===0&&(Ti=null),ou(l),r=r.stateNode,Be&&typeof Be.onCommitFiberRoot=="function")try{Be.onCommitFiberRoot(nt,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=B.T,h=X.p,X.p=2,B.T=null;try{for(var m=n.onRecoverableError,_=0;_<u.length;_++){var E=u[_];m(E.value,{componentStack:E.stack})}}finally{B.T=r,X.p=h}}(ei&3)!==0&&Vo(),Rn(n),h=n.pendingLanes,(l&261930)!==0&&(h&42)!==0?n===jc?ll++:(ll=0,jc=n):ll=0,ol(0)}}function Tg(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,ja(r)))}function Vo(){return wg(),kg(),Ag(),Lg()}function Lg(){if(mt!==5)return!1;var n=Li,r=Pc;Pc=0;var l=ou(ei),u=B.T,h=X.p;try{X.p=32>l?32:l,B.T=null,l=Bc,Bc=null;var m=Li,_=ei;if(mt=0,Yr=Li=null,ei=0,(He&6)!==0)throw Error(a(331));var E=He;if(He|=4,cg(m.current),og(m,m.current,_,l),He=E,ol(0,!1),Be&&typeof Be.onPostCommitFiberRoot=="function")try{Be.onPostCommitFiberRoot(nt,m)}catch{}return!0}finally{X.p=h,B.T=u,Tg(n,r)}}function Rg(n,r,l){r=an(l,r),r=vc(n.stateNode,r,2),n=Ei(n,r,2),n!==null&&(Aa(n,2),Rn(n))}function Ve(n,r,l){if(n.tag===3)Rg(n,n,l);else for(;r!==null;){if(r.tag===3){Rg(r,n,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Ti===null||!Ti.has(u))){n=an(l,n),l=Dm(2),u=Ei(r,l,2),u!==null&&(Nm(l,u,r,n),Aa(u,2),Rn(u));break}}r=r.return}}function $c(n,r,l){var u=n.pingCache;if(u===null){u=n.pingCache=new fS;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)||(zc=!0,h.add(l),n=gS.bind(null,n,r,l),r.then(n,n))}function gS(n,r,l){var u=n.pingCache;u!==null&&u.delete(r),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,Ye===n&&(Oe&l)===l&&(rt===4||rt===3&&(Oe&62914560)===Oe&&300>Ct()-zo?(He&2)===0&&Xr(n,0):Uc|=l,Fr===Oe&&(Fr=0)),Rn(n)}function Dg(n,r){r===0&&(r=wh()),n=Xi(n,r),n!==null&&(Aa(n,r),Rn(n))}function yS(n){var r=n.memoizedState,l=0;r!==null&&(l=r.retryLane),Dg(n,l)}function bS(n,r){var l=0;switch(n.tag){case 31:case 13:var u=n.stateNode,h=n.memoizedState;h!==null&&(l=h.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(r),Dg(n,l)}function vS(n,r){return fi(n,r)}var Go=null,Zr=null,qc=!1,$o=!1,Fc=!1,Di=0;function Rn(n){n!==Zr&&n.next===null&&(Zr===null?Go=Zr=n:Zr=Zr.next=n),$o=!0,qc||(qc=!0,SS())}function ol(n,r){if(!Fc&&$o){Fc=!0;do for(var l=!1,u=Go;u!==null;){if(n!==0){var h=u.pendingLanes;if(h===0)var m=0;else{var _=u.suspendedLanes,E=u.pingedLanes;m=(1<<31-Fe(42|n)+1)-1,m&=h&~(_&~E),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(l=!0,Ig(u,m))}else m=Oe,m=Yl(u,u===Ye?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(m&3)===0||ka(u,m)||(l=!0,Ig(u,m));u=u.next}while(l);Fc=!1}}function _S(){Ng()}function Ng(){$o=qc=!1;var n=0;Di!==0&&DS()&&(n=Di);for(var r=Ct(),l=null,u=Go;u!==null;){var h=u.next,m=Og(u,r);m===0?(u.next=null,l===null?Go=h:l.next=h,h===null&&(Zr=l)):(l=u,(n!==0||(m&3)!==0)&&($o=!0)),u=h}mt!==0&&mt!==5||ol(n),Di!==0&&(Di=0)}function Og(n,r){for(var l=n.suspendedLanes,u=n.pingedLanes,h=n.expirationTimes,m=n.pendingLanes&-62914561;0<m;){var _=31-Fe(m),E=1<<_,N=h[_];N===-1?((E&l)===0||(E&u)!==0)&&(h[_]=Y1(E,r)):N<=r&&(n.expiredLanes|=E),m&=~E}if(r=Ye,l=Oe,l=Yl(n,n===r?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,l===0||n===r&&(je===2||je===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&di(u),n.callbackNode=null,n.callbackPriority=0;if((l&3)===0||ka(n,l)){if(r=l&-l,r===n.callbackPriority)return r;switch(u!==null&&di(u),ou(l)){case 2:case 8:l=ue;break;case 32:l=_e;break;case 268435456:l=pe;break;default:l=_e}return u=Mg.bind(null,n),l=fi(l,u),n.callbackPriority=r,n.callbackNode=l,r}return u!==null&&u!==null&&di(u),n.callbackPriority=2,n.callbackNode=null,2}function Mg(n,r){if(mt!==0&&mt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var l=n.callbackNode;if(Vo()&&n.callbackNode!==l)return null;var u=Oe;return u=Yl(n,n===Ye?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(mg(n,u,r),Og(n,Ct()),n.callbackNode!=null&&n.callbackNode===l?Mg.bind(null,n):null)}function Ig(n,r){if(Vo())return null;mg(n,r,!0)}function SS(){OS(function(){(He&6)!==0?fi(Q,_S):Ng()})}function Yc(){if(Di===0){var n=Ir;n===0&&(n=$l,$l<<=1,($l&261888)===0&&($l=256)),Di=n}return Di}function zg(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Kl(""+n)}function Ug(n,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,n.id&&l.setAttribute("form",n.id),r.parentNode.insertBefore(l,r),n=new FormData(n),l.parentNode.removeChild(l),n}function ES(n,r,l,u,h){if(r==="submit"&&l&&l.stateNode===h){var m=zg((h[It]||null).action),_=u.submitter;_&&(r=(r=_[It]||null)?zg(r.formAction):_.getAttribute("formAction"),r!==null&&(m=r,_=null));var E=new to("action","action",null,u,h);n.push({event:E,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Di!==0){var N=_?Ug(h,_):new FormData(h);hc(l,{pending:!0,data:N,method:h.method,action:m},null,N)}}else typeof m=="function"&&(E.preventDefault(),N=_?Ug(h,_):new FormData(h),hc(l,{pending:!0,data:N,method:h.method,action:m},m,N))},currentTarget:h}]})}}for(var Xc=0;Xc<Ru.length;Xc++){var Qc=Ru[Xc],xS=Qc.toLowerCase(),CS=Qc[0].toUpperCase()+Qc.slice(1);bn(xS,"on"+CS)}bn(pp,"onAnimationEnd"),bn(mp,"onAnimationIteration"),bn(gp,"onAnimationStart"),bn("dblclick","onDoubleClick"),bn("focusin","onFocus"),bn("focusout","onBlur"),bn(B_,"onTransitionRun"),bn(j_,"onTransitionStart"),bn(V_,"onTransitionCancel"),bn(yp,"onTransitionEnd"),Sr("onMouseEnter",["mouseout","mouseover"]),Sr("onMouseLeave",["mouseout","mouseover"]),Sr("onPointerEnter",["pointerout","pointerover"]),Sr("onPointerLeave",["pointerout","pointerover"]),$i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$i("onBeforeInput",["compositionend","keypress","textInput","paste"]),$i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var sl="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(" "),wS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(sl));function Hg(n,r){r=(r&4)!==0;for(var l=0;l<n.length;l++){var u=n[l],h=u.event;u=u.listeners;e:{var m=void 0;if(r)for(var _=u.length-1;0<=_;_--){var E=u[_],N=E.instance,V=E.currentTarget;if(E=E.listener,N!==m&&h.isPropagationStopped())break e;m=E,h.currentTarget=V;try{m(h)}catch(Y){ro(Y)}h.currentTarget=null,m=N}else for(_=0;_<u.length;_++){if(E=u[_],N=E.instance,V=E.currentTarget,E=E.listener,N!==m&&h.isPropagationStopped())break e;m=E,h.currentTarget=V;try{m(h)}catch(Y){ro(Y)}h.currentTarget=null,m=N}}}}function Ne(n,r){var l=r[su];l===void 0&&(l=r[su]=new Set);var u=n+"__bubble";l.has(u)||(Pg(r,n,2,!1),l.add(u))}function Zc(n,r,l){var u=0;r&&(u|=4),Pg(l,n,u,r)}var qo="_reactListening"+Math.random().toString(36).slice(2);function Kc(n){if(!n[qo]){n[qo]=!0,Nh.forEach(function(l){l!=="selectionchange"&&(wS.has(l)||Zc(l,!1,n),Zc(l,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[qo]||(r[qo]=!0,Zc("selectionchange",!1,r))}}function Pg(n,r,l,u){switch(py(r)){case 2:var h=JS;break;case 8:h=eE;break;default:h=hf}l=h.bind(null,r,l,n),h=void 0,!yu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),u?h!==void 0?n.addEventListener(r,l,{capture:!0,passive:h}):n.addEventListener(r,l,!0):h!==void 0?n.addEventListener(r,l,{passive:h}):n.addEventListener(r,l,!1)}function Wc(n,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 N=_.tag;if((N===3||N===4)&&_.stateNode.containerInfo===h)return;_=_.return}for(;E!==null;){if(_=br(E),_===null)return;if(N=_.tag,N===5||N===6||N===26||N===27){u=m=_;continue e}E=E.parentNode}}u=u.return}$h(function(){var V=m,Y=mu(l),J=[];e:{var $=bp.get(n);if($!==void 0){var q=to,de=n;switch(n){case"keypress":if(Jl(l)===0)break e;case"keydown":case"keyup":q=b_;break;case"focusin":de="focus",q=Su;break;case"focusout":de="blur",q=Su;break;case"beforeblur":case"afterblur":q=Su;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=Yh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=l_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=S_;break;case pp:case mp:case gp:q=u_;break;case yp:q=x_;break;case"scroll":case"scrollend":q=r_;break;case"wheel":q=w_;break;case"copy":case"cut":case"paste":q=f_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Qh;break;case"toggle":case"beforetoggle":q=A_}var ve=(r&4)!==0,qe=!ve&&(n==="scroll"||n==="scrollend"),U=ve?$!==null?$+"Capture":null:$;ve=[];for(var M=V,j;M!==null;){var K=M;if(j=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||j===null||U===null||(K=Ra(M,U),K!=null&&ve.push(ul(M,K,j))),qe)break;M=M.return}0<ve.length&&($=new q($,de,null,l,Y),J.push({event:$,listeners:ve}))}}if((r&7)===0){e:{if($=n==="mouseover"||n==="pointerover",q=n==="mouseout"||n==="pointerout",$&&l!==pu&&(de=l.relatedTarget||l.fromElement)&&(br(de)||de[yr]))break e;if((q||$)&&($=Y.window===Y?Y:($=Y.ownerDocument)?$.defaultView||$.parentWindow:window,q?(de=l.relatedTarget||l.toElement,q=V,de=de?br(de):null,de!==null&&(qe=s(de),ve=de.tag,de!==qe||ve!==5&&ve!==27&&ve!==6)&&(de=null)):(q=null,de=V),q!==de)){if(ve=Yh,K="onMouseLeave",U="onMouseEnter",M="mouse",(n==="pointerout"||n==="pointerover")&&(ve=Qh,K="onPointerLeave",U="onPointerEnter",M="pointer"),qe=q==null?$:La(q),j=de==null?$:La(de),$=new ve(K,M+"leave",q,l,Y),$.target=qe,$.relatedTarget=j,K=null,br(Y)===V&&(ve=new ve(U,M+"enter",de,l,Y),ve.target=j,ve.relatedTarget=qe,K=ve),qe=K,q&&de)t:{for(ve=kS,U=q,M=de,j=0,K=U;K;K=ve(K))j++;K=0;for(var ye=M;ye;ye=ve(ye))K++;for(;0<j-K;)U=ve(U),j--;for(;0<K-j;)M=ve(M),K--;for(;j--;){if(U===M||M!==null&&U===M.alternate){ve=U;break t}U=ve(U),M=ve(M)}ve=null}else ve=null;q!==null&&Bg(J,$,q,ve,!1),de!==null&&qe!==null&&Bg(J,qe,de,ve,!0)}}e:{if($=V?La(V):window,q=$.nodeName&&$.nodeName.toLowerCase(),q==="select"||q==="input"&&$.type==="file")var ze=ip;else if(tp($))if(rp)ze=U_;else{ze=I_;var ge=M_}else q=$.nodeName,!q||q.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?V&&hu(V.elementType)&&(ze=ip):ze=z_;if(ze&&(ze=ze(n,V))){np(J,ze,l,Y);break e}ge&&ge(n,$,V),n==="focusout"&&V&&$.type==="number"&&V.memoizedProps.value!=null&&du($,"number",$.value)}switch(ge=V?La(V):window,n){case"focusin":(tp(ge)||ge.contentEditable==="true")&&(Ar=ge,Au=V,Ha=null);break;case"focusout":Ha=Au=Ar=null;break;case"mousedown":Tu=!0;break;case"contextmenu":case"mouseup":case"dragend":Tu=!1,dp(J,l,Y);break;case"selectionchange":if(P_)break;case"keydown":case"keyup":dp(J,l,Y)}var ke;if(xu)e:{switch(n){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else kr?Jh(n,l)&&(Me="onCompositionEnd"):n==="keydown"&&l.keyCode===229&&(Me="onCompositionStart");Me&&(Zh&&l.locale!=="ko"&&(kr||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&kr&&(ke=qh()):(mi=Y,bu="value"in mi?mi.value:mi.textContent,kr=!0)),ge=Fo(V,Me),0<ge.length&&(Me=new Xh(Me,n,null,l,Y),J.push({event:Me,listeners:ge}),ke?Me.data=ke:(ke=ep(l),ke!==null&&(Me.data=ke)))),(ke=L_?R_(n,l):D_(n,l))&&(Me=Fo(V,"onBeforeInput"),0<Me.length&&(ge=new Xh("onBeforeInput","beforeinput",null,l,Y),J.push({event:ge,listeners:Me}),ge.data=ke)),ES(J,n,V,l,Y)}Hg(J,r)})}function ul(n,r,l){return{instance:n,listener:r,currentTarget:l}}function Fo(n,r){for(var l=r+"Capture",u=[];n!==null;){var h=n,m=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||m===null||(h=Ra(n,l),h!=null&&u.unshift(ul(n,h,m)),h=Ra(n,r),h!=null&&u.push(ul(n,h,m))),n.tag===3)return u;n=n.return}return[]}function kS(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Bg(n,r,l,u,h){for(var m=r._reactName,_=[];l!==null&&l!==u;){var E=l,N=E.alternate,V=E.stateNode;if(E=E.tag,N!==null&&N===u)break;E!==5&&E!==26&&E!==27||V===null||(N=V,h?(V=Ra(l,m),V!=null&&_.unshift(ul(l,V,N))):h||(V=Ra(l,m),V!=null&&_.push(ul(l,V,N)))),l=l.return}_.length!==0&&n.push({event:r,listeners:_})}var AS=/\r\n?/g,TS=/\u0000|\uFFFD/g;function jg(n){return(typeof n=="string"?n:""+n).replace(AS,`
|
|
10
|
-
`).replace(TS,"")}function Vg(n,r){return r=jg(r),jg(n)===r}function $e(n,r,l,u,h,m){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||xr(n,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&xr(n,""+u);break;case"className":Ql(n,"class",u);break;case"tabIndex":Ql(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Ql(n,l,u);break;case"style":Vh(n,u,m);break;case"data":if(r!=="object"){Ql(n,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||l!=="href")){n.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=Kl(""+u),n.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){n.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"&&$e(n,r,"name",h.name,h,null),$e(n,r,"formEncType",h.formEncType,h,null),$e(n,r,"formMethod",h.formMethod,h,null),$e(n,r,"formTarget",h.formTarget,h,null)):($e(n,r,"encType",h.encType,h,null),$e(n,r,"method",h.method,h,null),$e(n,r,"target",h.target,h,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=Kl(""+u),n.setAttribute(l,u);break;case"onClick":u!=null&&(n.onclick=Pn);break;case"onScroll":u!=null&&Ne("scroll",n);break;case"onScrollEnd":u!=null&&Ne("scrollend",n);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));n.innerHTML=l}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}l=Kl(""+u),n.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"?n.setAttribute(l,""+u):n.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"?n.setAttribute(l,""):n.removeAttribute(l);break;case"capture":case"download":u===!0?n.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,u):n.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(l,u):n.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(l):n.setAttribute(l,u);break;case"popover":Ne("beforetoggle",n),Ne("toggle",n),Xl(n,"popover",u);break;case"xlinkActuate":Hn(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Hn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Hn(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Hn(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Hn(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Hn(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Hn(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Hn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Hn(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Xl(n,"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=n_.get(l)||l,Xl(n,l,u))}}function Jc(n,r,l,u,h,m){switch(l){case"style":Vh(n,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));n.innerHTML=l}}break;case"children":typeof u=="string"?xr(n,u):(typeof u=="number"||typeof u=="bigint")&&xr(n,""+u);break;case"onScroll":u!=null&&Ne("scroll",n);break;case"onScrollEnd":u!=null&&Ne("scrollend",n);break;case"onClick":u!=null&&(n.onclick=Pn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Oh.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=n[It]||null,m=m!=null?m[l]:null,typeof m=="function"&&n.removeEventListener(r,m,h),typeof u=="function")){typeof m!="function"&&m!==null&&(l in n?n[l]=null:n.hasAttribute(l)&&n.removeAttribute(l)),n.addEventListener(r,u,h);break e}l in n?n[l]=u:u===!0?n.setAttribute(l,""):Xl(n,l,u)}}}function Lt(n,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",n),Ne("load",n);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:$e(n,r,m,_,l,null)}}h&&$e(n,r,"srcSet",l.srcSet,l,null),u&&$e(n,r,"src",l.src,l,null);return;case"input":Ne("invalid",n);var E=m=_=h=null,N=null,V=null;for(u in l)if(l.hasOwnProperty(u)){var Y=l[u];if(Y!=null)switch(u){case"name":h=Y;break;case"type":_=Y;break;case"checked":N=Y;break;case"defaultChecked":V=Y;break;case"value":m=Y;break;case"defaultValue":E=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(a(137,r));break;default:$e(n,r,u,Y,l,null)}}Hh(n,m,E,N,V,_,h,!1);return;case"select":Ne("invalid",n),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:$e(n,r,h,E,l,null)}r=m,l=_,n.multiple=!!u,r!=null?Er(n,!!u,r,!1):l!=null&&Er(n,!!u,l,!0);return;case"textarea":Ne("invalid",n),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:$e(n,r,_,E,l,null)}Bh(n,u,h,m);return;case"option":for(N in l)l.hasOwnProperty(N)&&(u=l[N],u!=null)&&(N==="selected"?n.selected=u&&typeof u!="function"&&typeof u!="symbol":$e(n,r,N,u,l,null));return;case"dialog":Ne("beforetoggle",n),Ne("toggle",n),Ne("cancel",n),Ne("close",n);break;case"iframe":case"object":Ne("load",n);break;case"video":case"audio":for(u=0;u<sl.length;u++)Ne(sl[u],n);break;case"image":Ne("error",n),Ne("load",n);break;case"details":Ne("toggle",n);break;case"embed":case"source":case"link":Ne("error",n),Ne("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(V in l)if(l.hasOwnProperty(V)&&(u=l[V],u!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:$e(n,r,V,u,l,null)}return;default:if(hu(r)){for(Y in l)l.hasOwnProperty(Y)&&(u=l[Y],u!==void 0&&Jc(n,r,Y,u,l,void 0));return}}for(E in l)l.hasOwnProperty(E)&&(u=l[E],u!=null&&$e(n,r,E,u,l,null))}function LS(n,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,N=null,V=null,Y=null;for(q in l){var J=l[q];if(l.hasOwnProperty(q)&&J!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":N=J;default:u.hasOwnProperty(q)||$e(n,r,q,null,u,J)}}for(var $ in u){var q=u[$];if(J=l[$],u.hasOwnProperty($)&&(q!=null||J!=null))switch($){case"type":m=q;break;case"name":h=q;break;case"checked":V=q;break;case"defaultChecked":Y=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!==J&&$e(n,r,$,q,u,J)}}fu(n,_,E,N,V,Y,m,h);return;case"select":q=_=E=$=null;for(m in l)if(N=l[m],l.hasOwnProperty(m)&&N!=null)switch(m){case"value":break;case"multiple":q=N;default:u.hasOwnProperty(m)||$e(n,r,m,null,u,N)}for(h in u)if(m=u[h],N=l[h],u.hasOwnProperty(h)&&(m!=null||N!=null))switch(h){case"value":$=m;break;case"defaultValue":E=m;break;case"multiple":_=m;default:m!==N&&$e(n,r,h,m,u,N)}r=E,l=_,u=q,$!=null?Er(n,!!l,$,!1):!!u!=!!l&&(r!=null?Er(n,!!l,r,!0):Er(n,!!l,l?[]:"",!1));return;case"textarea":q=$=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:$e(n,r,E,null,u,h)}for(_ in u)if(h=u[_],m=l[_],u.hasOwnProperty(_)&&(h!=null||m!=null))switch(_){case"value":$=h;break;case"defaultValue":q=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(a(91));break;default:h!==m&&$e(n,r,_,h,u,m)}Ph(n,$,q);return;case"option":for(var de in l)$=l[de],l.hasOwnProperty(de)&&$!=null&&!u.hasOwnProperty(de)&&(de==="selected"?n.selected=!1:$e(n,r,de,null,u,$));for(N in u)$=u[N],q=l[N],u.hasOwnProperty(N)&&$!==q&&($!=null||q!=null)&&(N==="selected"?n.selected=$&&typeof $!="function"&&typeof $!="symbol":$e(n,r,N,$,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 ve in l)$=l[ve],l.hasOwnProperty(ve)&&$!=null&&!u.hasOwnProperty(ve)&&$e(n,r,ve,null,u,$);for(V in u)if($=u[V],q=l[V],u.hasOwnProperty(V)&&$!==q&&($!=null||q!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(a(137,r));break;default:$e(n,r,V,$,u,q)}return;default:if(hu(r)){for(var qe in l)$=l[qe],l.hasOwnProperty(qe)&&$!==void 0&&!u.hasOwnProperty(qe)&&Jc(n,r,qe,void 0,u,$);for(Y in u)$=u[Y],q=l[Y],!u.hasOwnProperty(Y)||$===q||$===void 0&&q===void 0||Jc(n,r,Y,$,u,q);return}}for(var U in l)$=l[U],l.hasOwnProperty(U)&&$!=null&&!u.hasOwnProperty(U)&&$e(n,r,U,null,u,$);for(J in u)$=u[J],q=l[J],!u.hasOwnProperty(J)||$===q||$==null&&q==null||$e(n,r,J,$,u,q)}function Gg(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function RS(){if(typeof performance.getEntriesByType=="function"){for(var n=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&&Gg(_)){for(_=0,E=h.responseEnd,u+=1;u<l.length;u++){var N=l[u],V=N.startTime;if(V>E)break;var Y=N.transferSize,J=N.initiatorType;Y&&Gg(J)&&(N=N.responseEnd,_+=Y*(N<E?1:(E-V)/(N-V)))}if(--u,r+=8*(m+_)/(h.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var ef=null,tf=null;function Yo(n){return n.nodeType===9?n:n.ownerDocument}function $g(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function qg(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function nf(n,r){return n==="textarea"||n==="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 rf=null;function DS(){var n=window.event;return n&&n.type==="popstate"?n===rf?!1:(rf=n,!0):(rf=null,!1)}var Fg=typeof setTimeout=="function"?setTimeout:void 0,NS=typeof clearTimeout=="function"?clearTimeout:void 0,Yg=typeof Promise=="function"?Promise:void 0,OS=typeof queueMicrotask=="function"?queueMicrotask:typeof Yg<"u"?function(n){return Yg.resolve(null).then(n).catch(MS)}:Fg;function MS(n){setTimeout(function(){throw n})}function Ni(n){return n==="head"}function Xg(n,r){var l=r,u=0;do{var h=l.nextSibling;if(n.removeChild(l),h&&h.nodeType===8)if(l=h.data,l==="/$"||l==="/&"){if(u===0){n.removeChild(h),ea(r);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")cl(n.ownerDocument.documentElement);else if(l==="head"){l=n.ownerDocument.head,cl(l);for(var m=l.firstChild;m;){var _=m.nextSibling,E=m.nodeName;m[Ta]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&m.rel.toLowerCase()==="stylesheet"||l.removeChild(m),m=_}}else l==="body"&&cl(n.ownerDocument.body);l=h}while(l);ea(r)}function Qg(n,r){var l=n;n=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(n===0)break;n--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||n++;l=u}while(l)}function af(n){var r=n.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":af(l),uu(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}n.removeChild(l)}}function IS(n,r,l,u){for(;n.nodeType===1;){var h=l;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[Ta])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(m=n.getAttribute("rel"),m==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(m!==h.rel||n.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||n.getAttribute("title")!==(h.title==null?null:h.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(m=n.getAttribute("src"),(m!==(h.src==null?null:h.src)||n.getAttribute("type")!==(h.type==null?null:h.type)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&m&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var m=h.name==null?null:""+h.name;if(h.type==="hidden"&&n.getAttribute("name")===m)return n}else return n;if(n=cn(n.nextSibling),n===null)break}return null}function zS(n,r,l){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!l||(n=cn(n.nextSibling),n===null))return null;return n}function Zg(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=cn(n.nextSibling),n===null))return null;return n}function lf(n){return n.data==="$?"||n.data==="$~"}function of(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function US(n,r){var l=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||l.readyState!=="loading")r();else{var u=function(){r(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function cn(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return n}var sf=null;function Kg(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var l=n.data;if(l==="/$"||l==="/&"){if(r===0)return cn(n.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}n=n.nextSibling}return null}function Wg(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var l=n.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(r===0)return n;r--}else l!=="/$"&&l!=="/&"||r++}n=n.previousSibling}return null}function Jg(n,r,l){switch(r=Yo(l),n){case"html":if(n=r.documentElement,!n)throw Error(a(452));return n;case"head":if(n=r.head,!n)throw Error(a(453));return n;case"body":if(n=r.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function cl(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);uu(n)}var fn=new Map,ey=new Set;function Xo(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var ti=X.d;X.d={f:HS,r:PS,D:BS,C:jS,L:VS,m:GS,X:qS,S:$S,M:FS};function HS(){var n=ti.f(),r=Po();return n||r}function PS(n){var r=vr(n);r!==null&&r.tag===5&&r.type==="form"?ym(r):ti.r(n)}var Kr=typeof document>"u"?null:document;function ty(n,r,l){var u=Kr;if(u&&typeof r=="string"&&r){var h=nn(r);h='link[rel="'+n+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),ey.has(h)||(ey.add(h),n={rel:n,crossOrigin:l,href:r},u.querySelector(h)===null&&(r=u.createElement("link"),Lt(r,"link",n),vt(r),u.head.appendChild(r)))}}function BS(n){ti.D(n),ty("dns-prefetch",n,null)}function jS(n,r){ti.C(n,r),ty("preconnect",n,r)}function VS(n,r,l){ti.L(n,r,l);var u=Kr;if(u&&n&&r){var h='link[rel="preload"][as="'+nn(r)+'"]';r==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+nn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+nn(l.imageSizes)+'"]')):h+='[href="'+nn(n)+'"]';var m=h;switch(r){case"style":m=Wr(n);break;case"script":m=Jr(n)}fn.has(m)||(n=y({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:n,as:r},l),fn.set(m,n),u.querySelector(h)!==null||r==="style"&&u.querySelector(fl(m))||r==="script"&&u.querySelector(dl(m))||(r=u.createElement("link"),Lt(r,"link",n),vt(r),u.head.appendChild(r)))}}function GS(n,r){ti.m(n,r);var l=Kr;if(l&&n){var u=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+nn(u)+'"][href="'+nn(n)+'"]',m=h;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Jr(n)}if(!fn.has(m)&&(n=y({rel:"modulepreload",href:n},r),fn.set(m,n),l.querySelector(h)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(dl(m)))return}u=l.createElement("link"),Lt(u,"link",n),vt(u),l.head.appendChild(u)}}}function $S(n,r,l){ti.S(n,r,l);var u=Kr;if(u&&n){var h=_r(u).hoistableStyles,m=Wr(n);r=r||"default";var _=h.get(m);if(!_){var E={loading:0,preload:null};if(_=u.querySelector(fl(m)))E.loading=5;else{n=y({rel:"stylesheet",href:n,"data-precedence":r},l),(l=fn.get(m))&&uf(n,l);var N=_=u.createElement("link");vt(N),Lt(N,"link",n),N._p=new Promise(function(V,Y){N.onload=V,N.onerror=Y}),N.addEventListener("load",function(){E.loading|=1}),N.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Qo(_,r,u)}_={type:"stylesheet",instance:_,count:1,state:E},h.set(m,_)}}}function qS(n,r){ti.X(n,r);var l=Kr;if(l&&n){var u=_r(l).hoistableScripts,h=Jr(n),m=u.get(h);m||(m=l.querySelector(dl(h)),m||(n=y({src:n,async:!0},r),(r=fn.get(h))&&cf(n,r),m=l.createElement("script"),vt(m),Lt(m,"link",n),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(h,m))}}function FS(n,r){ti.M(n,r);var l=Kr;if(l&&n){var u=_r(l).hoistableScripts,h=Jr(n),m=u.get(h);m||(m=l.querySelector(dl(h)),m||(n=y({src:n,async:!0,type:"module"},r),(r=fn.get(h))&&cf(n,r),m=l.createElement("script"),vt(m),Lt(m,"link",n),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(h,m))}}function ny(n,r,l,u){var h=(h=ce.current)?Xo(h):null;if(!h)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=Wr(l.href),l=_r(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"){n=Wr(l.href);var m=_r(h).hoistableStyles,_=m.get(n);if(_||(h=h.ownerDocument||h,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(n,_),(m=h.querySelector(fl(n)))&&!m._p&&(_.instance=m,_.state.loading=5),fn.has(n)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},fn.set(n,l),m||YS(h,n,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=Jr(l),l=_r(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,n))}}function Wr(n){return'href="'+nn(n)+'"'}function fl(n){return'link[rel="stylesheet"]['+n+"]"}function iy(n){return y({},n,{"data-precedence":n.precedence,precedence:null})}function YS(n,r,l,u){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=n.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),Lt(r,"link",l),vt(r),n.head.appendChild(r))}function Jr(n){return'[src="'+nn(n)+'"]'}function dl(n){return"script[async]"+n}function ry(n,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=n.querySelector('style[data-href~="'+nn(l.href)+'"]');if(u)return r.instance=u,vt(u),u;var h=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),vt(u),Lt(u,"style",h),Qo(u,l.precedence,n),r.instance=u;case"stylesheet":h=Wr(l.href);var m=n.querySelector(fl(h));if(m)return r.state.loading|=4,r.instance=m,vt(m),m;u=iy(l),(h=fn.get(h))&&uf(u,h),m=(n.ownerDocument||n).createElement("link"),vt(m);var _=m;return _._p=new Promise(function(E,N){_.onload=E,_.onerror=N}),Lt(m,"link",u),r.state.loading|=4,Qo(m,l.precedence,n),r.instance=m;case"script":return m=Jr(l.src),(h=n.querySelector(dl(m)))?(r.instance=h,vt(h),h):(u=l,(h=fn.get(m))&&(u=y({},l),cf(u,h)),n=n.ownerDocument||n,h=n.createElement("script"),vt(h),Lt(h,"link",u),n.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,Qo(u,l.precedence,n));return r.instance}function Qo(n,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(n,m.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(n,r.firstChild))}function uf(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function cf(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var Zo=null;function ay(n,r,l){if(Zo===null){var u=new Map,h=Zo=new Map;h.set(l,u)}else h=Zo,u=h.get(l),u||(u=new Map,h.set(l,u));if(u.has(n))return u;for(u.set(n,null),l=l.getElementsByTagName(n),h=0;h<l.length;h++){var m=l[h];if(!(m[Ta]||m[wt]||n==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var _=m.getAttribute(r)||"";_=n+_;var E=u.get(_);E?E.push(m):u.set(_,[m])}}return u}function ly(n,r,l){n=n.ownerDocument||n,n.head.insertBefore(l,r==="title"?n.querySelector("head > title"):null)}function XS(n,r,l){if(l===1||r.itemProp!=null)return!1;switch(n){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"?(n=r.disabled,typeof r.precedence=="string"&&n==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 oy(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function QS(n,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=Wr(u.href),m=r.querySelector(fl(h));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=Ko.bind(n),r.then(n,n)),l.state.loading|=4,l.instance=m,vt(m);return}m=r.ownerDocument||r,u=iy(u),(h=fn.get(h))&&uf(u,h),m=m.createElement("link"),vt(m);var _=m;_._p=new Promise(function(E,N){_.onload=E,_.onerror=N}),Lt(m,"link",u),l.instance=m}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(n.count++,l=Ko.bind(n),r.addEventListener("load",l),r.addEventListener("error",l))}}var ff=0;function ZS(n,r){return n.stylesheets&&n.count===0&&Jo(n,n.stylesheets),0<n.count||0<n.imgCount?function(l){var u=setTimeout(function(){if(n.stylesheets&&Jo(n,n.stylesheets),n.unsuspend){var m=n.unsuspend;n.unsuspend=null,m()}},6e4+r);0<n.imgBytes&&ff===0&&(ff=62500*RS());var h=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Jo(n,n.stylesheets),n.unsuspend)){var m=n.unsuspend;n.unsuspend=null,m()}},(n.imgBytes>ff?50:800)+r);return n.unsuspend=l,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(h)}}:null}function Ko(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Jo(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Wo=null;function Jo(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Wo=new Map,r.forEach(KS,n),Wo=null,Ko.call(n))}function KS(n,r){if(!(r.state.loading&4)){var l=Wo.get(n);if(l)var u=l.get(null);else{l=new Map,Wo.set(n,l);for(var h=n.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=Ko.bind(this),h.addEventListener("load",u),h.addEventListener("error",u),m?m.parentNode.insertBefore(h,m.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(h,n.firstChild)),r.state.loading|=4}}var hl={$$typeof:k,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function WS(n,r,l,u,h,m,_,E,N){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=au(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=au(0),this.hiddenUpdates=au(null),this.identifierPrefix=u,this.onUncaughtError=h,this.onCaughtError=m,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function sy(n,r,l,u,h,m,_,E,N,V,Y,J){return n=new WS(n,r,l,_,N,V,Y,J,E),r=1,m===!0&&(r|=24),m=Yt(3,null,null,r),n.current=m,m.stateNode=n,r=Gu(),r.refCount++,n.pooledCache=r,r.refCount++,m.memoizedState={element:u,isDehydrated:l,cache:r},Yu(m),n}function uy(n){return n?(n=Rr,n):Rr}function cy(n,r,l,u,h,m){h=uy(h),u.context===null?u.context=h:u.pendingContext=h,u=Si(r),u.payload={element:l},m=m===void 0?null:m,m!==null&&(u.callback=m),l=Ei(n,u,r),l!==null&&(jt(l,n,r),qa(l,n,r))}function fy(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var l=n.retryLane;n.retryLane=l!==0&&l<r?l:r}}function df(n,r){fy(n,r),(n=n.alternate)&&fy(n,r)}function dy(n){if(n.tag===13||n.tag===31){var r=Xi(n,67108864);r!==null&&jt(r,n,67108864),df(n,67108864)}}function hy(n){if(n.tag===13||n.tag===31){var r=Wt();r=lu(r);var l=Xi(n,r);l!==null&&jt(l,n,r),df(n,r)}}var es=!0;function JS(n,r,l,u){var h=B.T;B.T=null;var m=X.p;try{X.p=2,hf(n,r,l,u)}finally{X.p=m,B.T=h}}function eE(n,r,l,u){var h=B.T;B.T=null;var m=X.p;try{X.p=8,hf(n,r,l,u)}finally{X.p=m,B.T=h}}function hf(n,r,l,u){if(es){var h=pf(u);if(h===null)Wc(n,r,u,ts,l),my(n,u);else if(nE(h,n,r,l,u))u.stopPropagation();else if(my(n,u),r&4&&-1<tE.indexOf(n)){for(;h!==null;){var m=vr(h);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var _=Gi(m.pendingLanes);if(_!==0){var E=m;for(E.pendingLanes|=2,E.entangledLanes|=2;_;){var N=1<<31-Fe(_);E.entanglements[1]|=N,_&=~N}Rn(m),(He&6)===0&&(Uo=Ct()+500,ol(0))}}break;case 31:case 13:E=Xi(m,2),E!==null&&jt(E,m,2),Po(),df(m,2)}if(m=pf(u),m===null&&Wc(n,r,u,ts,l),m===h)break;h=m}h!==null&&u.stopPropagation()}else Wc(n,r,u,null,l)}}function pf(n){return n=mu(n),mf(n)}var ts=null;function mf(n){if(ts=null,n=br(n),n!==null){var r=s(n);if(r===null)n=null;else{var l=r.tag;if(l===13){if(n=c(r),n!==null)return n;n=null}else if(l===31){if(n=f(r),n!==null)return n;n=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return ts=n,null}function py(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(wa()){case Q:return 2;case ue:return 8;case _e:case Z:return 32;case pe:return 268435456;default:return 32}default:return 32}}var gf=!1,Oi=null,Mi=null,Ii=null,pl=new Map,ml=new Map,zi=[],tE="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 my(n,r){switch(n){case"focusin":case"focusout":Oi=null;break;case"dragenter":case"dragleave":Mi=null;break;case"mouseover":case"mouseout":Ii=null;break;case"pointerover":case"pointerout":pl.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":ml.delete(r.pointerId)}}function gl(n,r,l,u,h,m){return n===null||n.nativeEvent!==m?(n={blockedOn:r,domEventName:l,eventSystemFlags:u,nativeEvent:m,targetContainers:[h]},r!==null&&(r=vr(r),r!==null&&dy(r)),n):(n.eventSystemFlags|=u,r=n.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),n)}function nE(n,r,l,u,h){switch(r){case"focusin":return Oi=gl(Oi,n,r,l,u,h),!0;case"dragenter":return Mi=gl(Mi,n,r,l,u,h),!0;case"mouseover":return Ii=gl(Ii,n,r,l,u,h),!0;case"pointerover":var m=h.pointerId;return pl.set(m,gl(pl.get(m)||null,n,r,l,u,h)),!0;case"gotpointercapture":return m=h.pointerId,ml.set(m,gl(ml.get(m)||null,n,r,l,u,h)),!0}return!1}function gy(n){var r=br(n.target);if(r!==null){var l=s(r);if(l!==null){if(r=l.tag,r===13){if(r=c(l),r!==null){n.blockedOn=r,Rh(n.priority,function(){hy(l)});return}}else if(r===31){if(r=f(l),r!==null){n.blockedOn=r,Rh(n.priority,function(){hy(l)});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){n.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}n.blockedOn=null}function ns(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var l=pf(n.nativeEvent);if(l===null){l=n.nativeEvent;var u=new l.constructor(l.type,l);pu=u,l.target.dispatchEvent(u),pu=null}else return r=vr(l),r!==null&&dy(r),n.blockedOn=l,!1;r.shift()}return!0}function yy(n,r,l){ns(n)&&l.delete(r)}function iE(){gf=!1,Oi!==null&&ns(Oi)&&(Oi=null),Mi!==null&&ns(Mi)&&(Mi=null),Ii!==null&&ns(Ii)&&(Ii=null),pl.forEach(yy),ml.forEach(yy)}function is(n,r){n.blockedOn===r&&(n.blockedOn=null,gf||(gf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,iE)))}var rs=null;function by(n){rs!==n&&(rs=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){rs===n&&(rs=null);for(var r=0;r<n.length;r+=3){var l=n[r],u=n[r+1],h=n[r+2];if(typeof u!="function"){if(mf(u||l)===null)continue;break}var m=vr(l);m!==null&&(n.splice(r,3),r-=3,hc(m,{pending:!0,data:h,method:l.method,action:u},u,h))}}))}function ea(n){function r(N){return is(N,n)}Oi!==null&&is(Oi,n),Mi!==null&&is(Mi,n),Ii!==null&&is(Ii,n),pl.forEach(r),ml.forEach(r);for(var l=0;l<zi.length;l++){var u=zi[l];u.blockedOn===n&&(u.blockedOn=null)}for(;0<zi.length&&(l=zi[0],l.blockedOn===null);)gy(l),l.blockedOn===null&&zi.shift();if(l=(n.ownerDocument||n).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var h=l[u],m=l[u+1],_=h[It]||null;if(typeof m=="function")_||by(l);else if(_){var E=null;if(m&&m.hasAttribute("formAction")){if(h=m,_=m[It]||null)E=_.formAction;else if(mf(h)!==null)continue}else E=_.action;typeof E=="function"?l[u+1]=E:(l.splice(u,3),u-=3),by(l)}}}function vy(){function n(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",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(l,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),h!==null&&(h(),h=null)}}}function yf(n){this._internalRoot=n}as.prototype.render=yf.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(a(409));var l=r.current,u=Wt();cy(l,u,n,r,null,null)},as.prototype.unmount=yf.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;cy(n.current,2,null,n,null,null),Po(),r[yr]=null}};function as(n){this._internalRoot=n}as.prototype.unstable_scheduleHydration=function(n){if(n){var r=Lh();n={blockedOn:null,target:n,priority:r};for(var l=0;l<zi.length&&r!==0&&r<zi[l].priority;l++);zi.splice(l,0,n),l===0&&gy(n)}};var _y=t.version;if(_y!=="19.2.5")throw Error(a(527,_y,"19.2.5"));X.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=p(r),n=n!==null?g(n):null,n=n===null?null:n.stateNode,n};var rE={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ls=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ls.isDisabled&&ls.supportsFiber)try{nt=ls.inject(rE),Be=ls}catch{}}return bl.createRoot=function(n,r){if(!o(n))throw Error(a(299));var l=!1,u="",h=Am,m=Tm,_=Lm;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=sy(n,1,!1,null,null,l,u,null,h,m,_,vy),n[yr]=r.current,Kc(n),new yf(r)},bl.hydrateRoot=function(n,r,l){if(!o(n))throw Error(a(299));var u=!1,h="",m=Am,_=Tm,E=Lm,N=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&&(N=l.formState)),r=sy(n,1,!0,r,l??null,u,h,N,m,_,E,vy),r.context=uy(null),l=r.current,u=Wt(),u=lu(u),h=Si(u),h.callback=null,Ei(l,h,u),l=u,r.current.lanes=l,Aa(r,l),Rn(r),n[yr]=r.current,Kc(n),new as(r)},bl.version="19.2.5",bl}var Ry;function pE(){if(Ry)return _f.exports;Ry=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),_f.exports=hE(),_f.exports}var mE=pE();async function wn(e,t={}){const i=await fetch(e,{headers:{"content-type":"application/json",...t.headers},...t}),a=await gE(i);if(!i.ok)throw new Error(a.error||i.statusText||`request to ${e} failed`);return a}async function gE(e){const t=await e.text();if(!t)return{};try{return JSON.parse(t)}catch{throw new Error("server returned an invalid JSON response")}}async function yE(){return wn("/api/bootstrap")}async function bE(e){return wn("/api/diff")}async function vE(e){return wn("/api/state",{method:"POST",body:JSON.stringify(e)})}async function Dy(e){return wn("/api/thread",{method:"POST",body:JSON.stringify(e)})}async function Ny(e){return wn("/api/thread/reply",{method:"POST",body:JSON.stringify(e)})}async function Cf(e){return wn("/api/thread-message",{method:"POST",body:JSON.stringify({id:e})})}async function _E(e){return wn("/api/thread/resolve",{method:"POST",body:JSON.stringify(e)})}async function SE(e){return wn("/api/thread/collapse",{method:"POST",body:JSON.stringify(e)})}async function EE(){return wn("/api/brief/generate",{method:"POST"})}async function xE(){return wn("/api/review",{method:"POST"})}async function CE(){return wn("/api/cancel",{method:"POST"})}const wE={diffStyle:"split",overflowMode:"wrap",sidebarOpen:!1,sidebarWidth:"narrow",collapsedFileIds:[],viewedFileIds:[],threads:[],brief:{content:"",loading:!1}};function kE(e){return{...e,diffStyle:e.diffStyle==="split"?"split":"stacked",overflowMode:e.overflowMode==="scroll"?"scroll":"wrap",sidebarWidth:e.sidebarWidth==="wide"?"wide":"narrow",threads:e.threads.map(t=>({...t,anchor:t.anchor.kind==="line"?{...t.anchor}:{kind:"detached"},resolved:!!t.resolved,collapsed:!!t.collapsed})),brief:{...e.brief.threadId?{threadId:e.brief.threadId}:{},content:e.brief.content,loading:!!e.brief.loading}}}function Fd(e){return e.anchor.kind==="line"}function AE(e){return e.anchor.kind==="detached"}function Oy(e){return Object.fromEntries(e.map(t=>[t,!0]))}function My(e,t){return e.includes(t)?e.filter(i=>i!==t):[...e,t]}function wf(e){return[...new Set(e)]}function TE(e,t){return{additions:e.additions+t.additions,deletions:e.deletions+t.deletions}}function LE(e){const t=new Map;for(const i of e){if(!Fd(i))continue;const a={lineNumber:i.anchor.lineNumber,side:i.anchor.side,metadata:{type:"thread",thread:i}},o=t.get(i.anchor.fileId);o?o.push(a):t.set(i.anchor.fileId,[a])}return t}function RE(e){const t=new Map;for(const i of e)Fd(i)&&t.set(i.anchor.fileId,(t.get(i.anchor.fileId)??0)+1);return t}function DE(e,t,i,a){return!a||i?.fileId!==t?e:[...e,a]}function NE(e,t,i){return{...e,threads:e.threads.map(a=>a.id===t?{...a,loading:i}:a)}}function OE(e,t){return{...e,brief:{...e.brief,loading:t}}}function ME(e,t){const i=t.find(a=>a.id===e.fileId);return e.side==="deletions"?i?.oldRepoPath??i?.newRepoPath??e.fileId:i?.newRepoPath??i?.oldRepoPath??e.fileId}const Hb=(...e)=>e.filter((t,i,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===i).join(" ").trim();const IE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const zE=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,i,a)=>a?a.toUpperCase():i.toLowerCase());const Iy=e=>{const t=zE(e);return t.charAt(0).toUpperCase()+t.slice(1)};var kf={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 UE=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},HE=re.createContext({}),PE=()=>re.useContext(HE),BE=re.forwardRef(({color:e,size:t,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=""}=PE()??{},S=a??y?Number(i??g)*24/Number(t??p):i??g;return re.createElement("svg",{ref:d,...kf,width:t??p??kf.width,height:t??p??kf.height,stroke:e??v,strokeWidth:S,className:Hb("lucide",b,o),...!s&&!UE(f)&&{"aria-hidden":"true"},...f},[...c.map(([A,D])=>re.createElement(A,D)),...Array.isArray(s)?s:[s]])});const kn=(e,t)=>{const i=re.forwardRef(({className:a,...o},s)=>re.createElement(BE,{ref:s,iconNode:t,className:Hb(`lucide-${IE(Iy(e))}`,`lucide-${e}`,a),...o}));return i.displayName=Iy(e),i};const jE=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],VE=kn("check",jE);const GE=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],$E=kn("chevron-down",GE);const qE=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],FE=kn("chevron-right",qE);const YE=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],Pb=kn("chevrons-down-up",YE);const XE=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Bb=kn("chevrons-up-down",XE);const QE=[["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"}]],ZE=kn("eye-off",QE);const KE=[["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"}]],jb=kn("message-square",KE);const WE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],JE=kn("panel-left",WE);const ex=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],tx=kn("scroll-text",ex);const nx=[["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"}]],ix=kn("sparkles",nx);const rx=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Vb=kn("x",rx);function oa({icon:e,label:t,size:i=14,className:a="",...o}){return H.jsx("button",{type:"button",className:`icon-btn ${a}`,"aria-label":t,...o,children:H.jsx(e,{size:i})})}function Gb({open:e,title:t,ariaLabel:i,closeLabel:a,widthClassName:o,bodyClassName:s,onClose:c,children:f}){return re.useEffect(()=>{if(!e)return;const d=p=>{p.key==="Escape"&&c()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[e,c]),e?H.jsx("div",{className:"dialog-backdrop",onClick:c,children:H.jsxs("div",{className:`dialog${o?` ${o}`:""}`,role:"dialog","aria-modal":"true","aria-label":i,onClick:d=>d.stopPropagation(),children:[H.jsxs("div",{className:"dialog-header",children:[H.jsx("div",{className:"dialog-heading",children:H.jsx("div",{className:"dialog-title",children:t})}),H.jsx("div",{className:"dialog-actions",children:H.jsx(oa,{icon:Vb,size:16,label:a,className:"dialog-close",onClick:c})})]}),H.jsx("div",{className:`dialog-body-wrap${s?` ${s}`:""}`,children:f})]})}):null}function $b(e,t){const i=t||{};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const ax=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ox={};function zy(e,t){return(ox.jsx?lx:ax).test(e)}const sx=/[ \t\n\f\r]/g;function Fs(e){return typeof e=="object"?e.type==="text"?Uy(e.value):!1:Uy(e)}function Uy(e){return e.replace(sx,"")===""}class Pl{constructor(t,i,a){this.normal=i,this.property=t,a&&(this.space=a)}}Pl.prototype.normal={};Pl.prototype.property={};Pl.prototype.space=void 0;function qb(e,t){const i={},a={};for(const o of e)Object.assign(i,o.property),Object.assign(a,o.normal);return new Pl(i,a,t)}function hd(e){return e.toLowerCase()}class $t{constructor(t,i){this.attribute=i,this.property=t}}$t.prototype.attribute="";$t.prototype.booleanish=!1;$t.prototype.boolean=!1;$t.prototype.commaOrSpaceSeparated=!1;$t.prototype.commaSeparated=!1;$t.prototype.defined=!1;$t.prototype.mustUseProperty=!1;$t.prototype.number=!1;$t.prototype.overloadedBoolean=!1;$t.prototype.property="";$t.prototype.spaceSeparated=!1;$t.prototype.space=void 0;let ux=0;const Ae=pr(),ht=pr(),pd=pr(),le=pr(),Ze=pr(),fa=pr(),Jt=pr();function pr(){return 2**++ux}const md=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ae,booleanish:ht,commaOrSpaceSeparated:Jt,commaSeparated:fa,number:le,overloadedBoolean:pd,spaceSeparated:Ze},Symbol.toStringTag,{value:"Module"})),Af=Object.keys(md);class Yd extends $t{constructor(t,i,a,o){let s=-1;if(super(t,i),Hy(this,"space",o),typeof a=="number")for(;++s<Af.length;){const c=Af[s];Hy(this,Af[s],(a&md[c])===md[c])}}}Yd.prototype.defined=!0;function Hy(e,t,i){i&&(e[t]=i)}function va(e){const t={},i={};for(const[a,o]of Object.entries(e.properties)){const s=new Yd(a,e.transform(e.attributes||{},a),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(s.mustUseProperty=!0),t[a]=s,i[hd(a)]=a,i[hd(s.attribute)]=a}return new Pl(t,i,e.space)}const Fb=va({properties:{ariaActiveDescendant:null,ariaAtomic:ht,ariaAutoComplete:null,ariaBusy:ht,ariaChecked:ht,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:Ze,ariaCurrent:null,ariaDescribedBy:Ze,ariaDetails:null,ariaDisabled:ht,ariaDropEffect:Ze,ariaErrorMessage:null,ariaExpanded:ht,ariaFlowTo:Ze,ariaGrabbed:ht,ariaHasPopup:null,ariaHidden:ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ze,ariaLevel:le,ariaLive:null,ariaModal:ht,ariaMultiLine:ht,ariaMultiSelectable:ht,ariaOrientation:null,ariaOwns:Ze,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:ht,ariaReadOnly:ht,ariaRelevant:null,ariaRequired:ht,ariaRoleDescription:Ze,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:ht,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Yb(e,t){return t in e?e[t]:t}function Xb(e,t){return Yb(e,t.toLowerCase())}const cx=va({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fa,acceptCharset:Ze,accessKey:Ze,action:null,allow:null,allowFullScreen:Ae,allowPaymentRequest:Ae,allowUserMedia:Ae,alt:null,as:null,async:Ae,autoCapitalize:null,autoComplete:Ze,autoFocus:Ae,autoPlay:Ae,blocking:Ze,capture:null,charSet:null,checked:Ae,cite:null,className:Ze,cols:le,colSpan:null,content:null,contentEditable:ht,controls:Ae,controlsList:Ze,coords:le|fa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ae,defer:Ae,dir:null,dirName:null,disabled:Ae,download:pd,draggable:ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ae,formTarget:null,headers:Ze,height:le,hidden:pd,high:le,href:null,hrefLang:null,htmlFor:Ze,httpEquiv:Ze,id:null,imageSizes:null,imageSrcSet:null,inert:Ae,inputMode:null,integrity:null,is:null,isMap:Ae,itemId:null,itemProp:Ze,itemRef:Ze,itemScope:Ae,itemType:Ze,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ae,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:Ae,muted:Ae,name:null,nonce:null,noModule:Ae,noValidate:Ae,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:Ae,optimum:le,pattern:null,ping:Ze,placeholder:null,playsInline:Ae,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ae,referrerPolicy:null,rel:Ze,required:Ae,reversed:Ae,rows:le,rowSpan:le,sandbox:Ze,scope:null,scoped:Ae,seamless:Ae,selected:Ae,shadowRootClonable:Ae,shadowRootDelegatesFocus:Ae,shadowRootMode:null,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:Ae,useMap:null,value:ht,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ze,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ae,declare:Ae,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:Ae,noHref:Ae,noShade:Ae,noWrap:Ae,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:ht,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ae,disableRemotePlayback:Ae,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:Xb}),fx=va({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:Jt,accentHeight:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:Ze,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:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:Ae,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,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:fa,g2:fa,glyphName:fa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:Jt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,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:le,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:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ze,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Jt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Jt,rev:Jt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Jt,requiredFeatures:Jt,requiredFonts:Jt,requiredFormats:Jt,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:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:Jt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Jt,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Jt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Yb}),Qb=va({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Zb=va({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Xb}),Kb=va({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),dx={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"},hx=/[A-Z]/g,Py=/-[a-z]/g,px=/^data[-\w.:]+$/i;function Wb(e,t){const i=hd(t);let a=t,o=$t;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&px.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Py,gx);a="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Py.test(s)){let c=s.replace(hx,mx);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}o=Yd}return new o(a,t)}function mx(e){return"-"+e.toLowerCase()}function gx(e){return e.charAt(1).toUpperCase()}const Jb=qb([Fb,cx,Qb,Zb,Kb],"html"),Bl=qb([Fb,fx,Qb,Zb,Kb],"svg");function ev(e){return e.join(" ").trim()}var ta={},Tf,By;function yx(){if(By)return Tf;By=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
|
|
11
|
-
`,p="/",g="*",y="",v="comment",b="declaration";function S(D,x){if(typeof D!="string")throw new TypeError("First argument must be a string");if(!D)return[];x=x||{};var T=1,k=1;function I(ie){var te=ie.match(t);te&&(T+=te.length);var B=ie.lastIndexOf(d);k=~B?ie.length-B:k+ie.length}function z(){var ie={line:T,column:k};return function(te){return te.position=new R(ie),ee(),te}}function R(ie){this.start=ie,this.end={line:T,column:k},this.source=x.source}R.prototype.content=D;function P(ie){var te=new Error(x.source+":"+T+":"+k+": "+ie);if(te.reason=ie,te.filename=x.source,te.line=T,te.column=k,te.source=D,!x.silent)throw te}function G(ie){var te=ie.exec(D);if(te){var B=te[0];return I(B),D=D.slice(B.length),te}}function ee(){G(i)}function ae(ie){var te;for(ie=ie||[];te=ne();)te!==!1&&ie.push(te);return ie}function ne(){var ie=z();if(!(p!=D.charAt(0)||g!=D.charAt(1))){for(var te=2;y!=D.charAt(te)&&(g!=D.charAt(te)||p!=D.charAt(te+1));)++te;if(te+=2,y===D.charAt(te-1))return P("End of comment missing");var B=D.slice(2,te-2);return k+=2,I(B),D=D.slice(te),k+=2,ie({type:v,comment:B})}}function W(){var ie=z(),te=G(a);if(te){if(ne(),!G(o))return P("property missing ':'");var B=G(s),X=ie({type:b,property:A(te[0].replace(e,y)),value:B?A(B[0].replace(e,y)):y});return G(c),X}}function fe(){var ie=[];ae(ie);for(var te;te=W();)te!==!1&&(ie.push(te),ae(ie));return ie}return ee(),fe()}function A(D){return D?D.replace(f,y):y}return Tf=S,Tf}var jy;function bx(){if(jy)return ta;jy=1;var e=ta&&ta.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(ta,"__esModule",{value:!0}),ta.default=i;const t=e(yx());function i(a,o){let s=null;if(!a||typeof a!="string")return s;const c=(0,t.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 ta}var vl={},Vy;function vx(){if(Vy)return vl;Vy=1,Object.defineProperty(vl,"__esModule",{value:!0}),vl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([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(t,c))};return vl.camelCase=d,vl}var _l,Gy;function _x(){if(Gy)return _l;Gy=1;var e=_l&&_l.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(bx()),i=vx();function a(o,s){var c={};return!o||typeof o!="string"||(0,t.default)(o,function(f,d){f&&d&&(c[(0,i.camelCase)(f,s)]=d)}),c}return a.default=a,_l=a,_l}var Sx=_x();const Ex=Ub(Sx),tv=nv("end"),Xd=nv("start");function nv(e){return t;function t(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 xx(e){const t=Xd(e),i=tv(e);if(t&&i)return{start:t,end:i}}function kl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?$y(e.position):"start"in e||"end"in e?$y(e):"line"in e||"column"in e?gd(e):""}function gd(e){return qy(e&&e.line)+":"+qy(e&&e.column)}function $y(e){return gd(e&&e.start)+"-"+gd(e&&e.end)}function qy(e){return e&&typeof e=="number"?e:1}class Ot extends Error{constructor(t,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 t=="string"?o=t:!s.cause&&t&&(c=!0,o=t.message,s.cause=t),!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=kl(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}}Ot.prototype.file="";Ot.prototype.name="";Ot.prototype.reason="";Ot.prototype.message="";Ot.prototype.stack="";Ot.prototype.column=void 0;Ot.prototype.line=void 0;Ot.prototype.ancestors=void 0;Ot.prototype.cause=void 0;Ot.prototype.fatal=void 0;Ot.prototype.place=void 0;Ot.prototype.ruleId=void 0;Ot.prototype.source=void 0;const Qd={}.hasOwnProperty,Cx=new Map,wx=/[A-Z]/g,kx=new Set(["table","tbody","thead","tfoot","tr"]),Ax=new Set(["td","th"]),iv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Tx(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=zx(i,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=Ix(i,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Bl:Jb,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=rv(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function rv(e,t,i){if(t.type==="element")return Lx(e,t,i);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Rx(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Nx(e,t,i);if(t.type==="mdxjsEsm")return Dx(e,t);if(t.type==="root")return Ox(e,t,i);if(t.type==="text")return Mx(e,t)}function Lx(e,t,i){const a=e.schema;let o=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(o=Bl,e.schema=o),e.ancestors.push(t);const s=lv(e,t.tagName,!1),c=Ux(e,t);let f=Kd(e,t);return kx.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!Fs(d):!0})),av(e,c,s,t),Zd(c,f),e.ancestors.pop(),e.schema=a,e.create(t,s,c,i)}function Rx(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}Dl(e,t.position)}function Dx(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Dl(e,t.position)}function Nx(e,t,i){const a=e.schema;let o=a;t.name==="svg"&&a.space==="html"&&(o=Bl,e.schema=o),e.ancestors.push(t);const s=t.name===null?e.Fragment:lv(e,t.name,!0),c=Hx(e,t),f=Kd(e,t);return av(e,c,s,t),Zd(c,f),e.ancestors.pop(),e.schema=a,e.create(t,s,c,i)}function Ox(e,t,i){const a={};return Zd(a,Kd(e,t)),e.create(t,e.Fragment,a,i)}function Mx(e,t){return t.value}function av(e,t,i,a){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(t.node=a)}function Zd(e,t){if(t.length>0){const i=t.length>1?t:t[0];i&&(e.children=i)}}function Ix(e,t,i){return a;function a(o,s,c,f){const p=Array.isArray(c.children)?i:t;return f?p(s,c,f):p(s,c)}}function zx(e,t){return i;function i(a,o,s,c){const f=Array.isArray(s.children),d=Xd(a);return t(o,s,c,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function Ux(e,t){const i={};let a,o;for(o in t.properties)if(o!=="children"&&Qd.call(t.properties,o)){const s=Px(e,o,t.properties[o]);if(s){const[c,f]=s;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&Ax.has(t.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 Hx(e,t){const i={};for(const a of t.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 Dl(e,t.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 Dl(e,t.position);else s=a.value===null?!0:a.value;i[o]=s}return i}function Kd(e,t){const i=[];let a=-1;const o=e.passKeys?new Map:Cx;for(;++a<t.children.length;){const s=t.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=rv(e,s,c);f!==void 0&&i.push(f)}return i}function Px(e,t,i){const a=Wb(e.schema,t);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=a.commaSeparated?$b(i):ev(i)),a.property==="style"){let o=typeof i=="object"?i:Bx(e,String(i));return e.stylePropertyNameCase==="css"&&(o=jx(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&a.space?dx[a.property]||a.property:a.attribute,i]}}function Bx(e,t){try{return Ex(t,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const a=i,o=new Ot("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=iv+"#cannot-parse-style-attribute",o}}function lv(e,t,i){let a;if(!i)a={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let s=-1,c;for(;++s<o.length;){const f=zy(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=zy(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const o=a.value;return Qd.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(a);Dl(e)}function Dl(e,t){const i=new Ot("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=iv+"#cannot-handle-mdx-estrees-without-createevaluater",i}function jx(e){const t={};let i;for(i in e)Qd.call(e,i)&&(t[Vx(i)]=e[i]);return t}function Vx(e){let t=e.replace(wx,Gx);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Gx(e){return"-"+e.toLowerCase()}const Lf={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"]},$x={};function qx(e,t){const i=$x,a=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return ov(e,a,o)}function ov(e,t,i){if(Fx(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Fy(e.children,t,i)}return Array.isArray(e)?Fy(e,t,i):""}function Fy(e,t,i){const a=[];let o=-1;for(;++o<e.length;)a[o]=ov(e[o],t,i);return a.join("")}function Fx(e){return!!(e&&typeof e=="object")}const Yy=document.createElement("i");function Wd(e){const t="&"+e+";";Yy.innerHTML=t;const i=Yy.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===t?!1:i}function Un(e,t,i,a){const o=e.length;let s=0,c;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,i=i>0?i:0,a.length<1e4)c=Array.from(a),c.unshift(t,i),e.splice(...c);else for(i&&e.splice(t,i);s<a.length;)c=a.slice(s,s+1e4),c.unshift(t,0),e.splice(...c),s+=1e4,t+=1e4}function hn(e,t){return e.length>0?(Un(e,e.length,0,t),e):t}const Xy={}.hasOwnProperty;function Yx(e){const t={};let i=-1;for(;++i<e.length;)Xx(t,e[i]);return t}function Xx(e,t){let i;for(i in t){const o=(Xy.call(e,i)?e[i]:void 0)||(e[i]={}),s=t[i];let c;if(s)for(c in s){Xy.call(o,c)||(o[c]=[]);const f=s[c];Qx(o[c],Array.isArray(f)?f:f?[f]:[])}}}function Qx(e,t){let i=-1;const a=[];for(;++i<t.length;)(t[i].add==="after"?e:a).push(t[i]);Un(e,0,0,a)}function sv(e,t){const i=Number.parseInt(e,t);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 da(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const In=Vi(/[A-Za-z]/),en=Vi(/[\dA-Za-z]/),Zx=Vi(/[#-'*+\--9=?A-Z^-~]/);function yd(e){return e!==null&&(e<32||e===127)}const bd=Vi(/\d/),Kx=Vi(/[\dA-Fa-f]/),Wx=Vi(/[!-/:-@[-`{-~]/);function Se(e){return e!==null&&e<-2}function Gt(e){return e!==null&&(e<0||e===32)}function Pe(e){return e===-2||e===-1||e===32}const Jx=Vi(new RegExp("\\p{P}|\\p{S}","u")),eC=Vi(/\s/);function Vi(e){return t;function t(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function _a(e){const t=[];let i=-1,a=0,o=0;for(;++i<e.length;){const s=e.charCodeAt(i);let c="";if(s===37&&en(e.charCodeAt(i+1))&&en(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&&(t.push(e.slice(a,i),encodeURIComponent(c)),a=i+o+1,c=""),o&&(i+=o,o=0)}return t.join("")+e.slice(a)}function Ke(e,t,i,a){const o=a?a-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(d){return Pe(d)?(e.enter(i),f(d)):t(d)}function f(d){return Pe(d)&&s++<o?(e.consume(d),f):(e.exit(i),t(d))}}const tC={tokenize:nC};function nC(e){const t=e.attempt(this.parser.constructs.contentInitial,a,o);let i;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ke(e,t,"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 Se(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),c)}}const iC={tokenize:rC},Qy={tokenize:aC};function rC(e){const t=this,i=[];let a=0,o,s,c;return f;function f(k){if(a<i.length){const I=i[a];return t.containerState=I[1],e.attempt(I[0].continuation,d,p)(k)}return p(k)}function d(k){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&T();const I=t.events.length;let z=I,R;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){R=t.events[z][1].end;break}x(a);let P=I;for(;P<t.events.length;)t.events[P][1].end={...R},P++;return Un(t.events,z+1,0,t.events.slice(I)),t.events.length=P,p(k)}return f(k)}function p(k){if(a===i.length){if(!o)return v(k);if(o.currentConstruct&&o.currentConstruct.concrete)return S(k);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Qy,g,y)(k)}function g(k){return o&&T(),x(a),v(k)}function y(k){return t.parser.lazy[t.now().line]=a!==i.length,c=t.now().offset,S(k)}function v(k){return t.containerState={},e.attempt(Qy,b,S)(k)}function b(k){return a++,i.push([t.currentConstruct,t.containerState]),v(k)}function S(k){if(k===null){o&&T(),x(0),e.consume(k);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),A(k)}function A(k){if(k===null){D(e.exit("chunkFlow"),!0),x(0),e.consume(k);return}return Se(k)?(e.consume(k),D(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(k),A)}function D(k,I){const z=t.sliceStream(k);if(I&&z.push(null),k.previous=s,s&&(s.next=k),s=k,o.defineSkip(k.start),o.write(z),t.parser.lazy[k.start.line]){let R=o.events.length;for(;R--;)if(o.events[R][1].start.offset<c&&(!o.events[R][1].end||o.events[R][1].end.offset>c))return;const P=t.events.length;let G=P,ee,ae;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){if(ee){ae=t.events[G][1].end;break}ee=!0}for(x(a),R=P;R<t.events.length;)t.events[R][1].end={...ae},R++;Un(t.events,G+1,0,t.events.slice(P)),t.events.length=R}}function x(k){let I=i.length;for(;I-- >k;){const z=i[I];t.containerState=z[1],z[0].exit.call(t,e)}i.length=k}function T(){o.write([null]),s=void 0,o=void 0,t.containerState._closeFlow=void 0}}function aC(e,t,i){return Ke(e,e.attempt(this.parser.constructs.document,t,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Zy(e){if(e===null||Gt(e)||eC(e))return 1;if(Jx(e))return 2}function Jd(e,t,i){const a=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!a.includes(s)&&(t=s(t,i),a.push(s))}return t}const vd={name:"attention",resolveAll:lC,tokenize:oC};function lC(e,t){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&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.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};Ky(y,-d),Ky(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=hn(p,[["enter",e[a][1],t],["exit",e[a][1],t]])),p=hn(p,[["enter",o,t],["enter",c,t],["exit",c,t],["enter",s,t]]),p=hn(p,Jd(t.parser.constructs.insideSpan.null,e.slice(a+1,i),t)),p=hn(p,[["exit",s,t],["enter",f,t],["exit",f,t],["exit",o,t]]),e[i][1].end.offset-e[i][1].start.offset?(g=2,p=hn(p,[["enter",e[i][1],t],["exit",e[i][1],t]])):g=0,Un(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 oC(e,t){const i=this.parser.constructs.attentionMarkers.null,a=this.previous,o=Zy(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=Zy(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)),t(d)}}function Ky(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const sC={name:"autolink",tokenize:uC};function uC(e,t,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 In(b)?(e.consume(b),c):b===64?i(b):p(b)}function c(b){return b===43||b===45||b===46||en(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||en(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"),t):b===null||b===32||b===60||yd(b)?i(b):(e.consume(b),d)}function p(b){return b===64?(e.consume(b),g):Zx(b)?(e.consume(b),p):i(b)}function g(b){return en(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"),t):v(b)}function v(b){if((b===45||en(b))&&a++<63){const S=b===45?v:y;return e.consume(b),S}return i(b)}}const Ys={partial:!0,tokenize:cC};function cC(e,t,i){return a;function a(s){return Pe(s)?Ke(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||Se(s)?t(s):i(s)}}const uv={continuation:{tokenize:dC},exit:hC,name:"blockQuote",tokenize:fC};function fC(e,t,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 Pe(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function dC(e,t,i){const a=this;return o;function o(c){return Pe(c)?Ke(e,s,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return e.attempt(uv,t,i)(c)}}function hC(e){e.exit("blockQuote")}const cv={name:"characterEscape",tokenize:pC};function pC(e,t,i){return a;function a(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return Wx(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):i(s)}}const fv={name:"characterReference",tokenize:mC};function mC(e,t,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=en,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=Kx,g):(e.enter("characterReferenceValue"),s=7,c=bd,g(y))}function g(y){if(y===59&&o){const v=e.exit("characterReferenceValue");return c===en&&!Wd(a.sliceSerialize(v))?i(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(y)&&o++<s?(e.consume(y),g):i(y)}}const Wy={partial:!0,tokenize:yC},Jy={concrete:!0,name:"codeFenced",tokenize:gC};function gC(e,t,i){const a=this,o={partial:!0,tokenize:z};let s=0,c=0,f;return d;function d(R){return p(R)}function p(R){const P=a.events[a.events.length-1];return s=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,f=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(R)}function g(R){return R===f?(c++,e.consume(R),g):c<3?i(R):(e.exit("codeFencedFenceSequence"),Pe(R)?Ke(e,y,"whitespace")(R):y(R))}function y(R){return R===null||Se(R)?(e.exit("codeFencedFence"),a.interrupt?t(R):e.check(Wy,A,I)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(R))}function v(R){return R===null||Se(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(R)):Pe(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ke(e,b,"whitespace")(R)):R===96&&R===f?i(R):(e.consume(R),v)}function b(R){return R===null||Se(R)?y(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(R))}function S(R){return R===null||Se(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(R)):R===96&&R===f?i(R):(e.consume(R),S)}function A(R){return e.attempt(o,I,D)(R)}function D(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),x}function x(R){return s>0&&Pe(R)?Ke(e,T,"linePrefix",s+1)(R):T(R)}function T(R){return R===null||Se(R)?e.check(Wy,A,I)(R):(e.enter("codeFlowValue"),k(R))}function k(R){return R===null||Se(R)?(e.exit("codeFlowValue"),T(R)):(e.consume(R),k)}function I(R){return e.exit("codeFenced"),t(R)}function z(R,P,G){let ee=0;return ae;function ae(te){return R.enter("lineEnding"),R.consume(te),R.exit("lineEnding"),ne}function ne(te){return R.enter("codeFencedFence"),Pe(te)?Ke(R,W,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):W(te)}function W(te){return te===f?(R.enter("codeFencedFenceSequence"),fe(te)):G(te)}function fe(te){return te===f?(ee++,R.consume(te),fe):ee>=c?(R.exit("codeFencedFenceSequence"),Pe(te)?Ke(R,ie,"whitespace")(te):ie(te)):G(te)}function ie(te){return te===null||Se(te)?(R.exit("codeFencedFence"),P(te)):G(te)}}}function yC(e,t,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):t(c)}}const Rf={name:"codeIndented",tokenize:vC},bC={partial:!0,tokenize:_C};function vC(e,t,i){const a=this;return o;function o(p){return e.enter("codeIndented"),Ke(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):Se(p)?e.attempt(bC,c,d)(p):(e.enter("codeFlowValue"),f(p))}function f(p){return p===null||Se(p)?(e.exit("codeFlowValue"),c(p)):(e.consume(p),f)}function d(p){return e.exit("codeIndented"),t(p)}}function _C(e,t,i){const a=this;return o;function o(c){return a.parser.lazy[a.now().line]?i(c):Se(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):Ke(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?t(c):Se(c)?o(c):i(c)}}const SC={name:"codeText",previous:xC,resolve:EC,tokenize:CC};function EC(e){let t=e.length-4,i=3,a,o;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=i;++a<t;)if(e[a][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[t][1].type="codeTextPadding",i+=2,t-=2;break}}for(a=i-1,t++;++a<=t;)o===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(o=a):(a===t||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),t-=a-o-2,a=o+2),o=void 0);return e}function xC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function CC(e,t,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)):Se(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||Se(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"),t(y)):(s.type="codeTextData",p(y))}}class wC{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,i){const a=i??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,i,a){const o=i||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return a&&Sl(this.left,a),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Sl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Sl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const i=this.left.splice(t,Number.POSITIVE_INFINITY);Sl(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Sl(this.left,i.reverse())}}}function Sl(e,t){let i=0;if(t.length<1e4)e.push(...t);else for(;i<t.length;)e.push(...t.slice(i,i+1e4)),i+=1e4}function dv(e){const t={};let i=-1,a,o,s,c,f,d,p;const g=new wC(e);for(;++i<g.length;){for(;i in t;)i=t[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(t,kC(g,i)),i=t[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 Un(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!p}function kC(e,t){const i=e.get(t)[1],a=e.get(t)[2];let o=t-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,A=0;const D=[A];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&&(A=v+1,D.push(A),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):D.pop(),v=D.length;v--;){const x=f.slice(D[v],D[v+1]),T=s.pop();d.push([T,T+x.length-1]),e.splice(T,2,x)}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 AC={resolve:LC,tokenize:RC},TC={partial:!0,tokenize:DC};function LC(e){return dv(e),e}function RC(e,t){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):Se(f)?e.check(TC,c,s)(f):(e.consume(f),o)}function s(f){return e.exit("chunkContent"),e.exit("content"),t(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 DC(e,t,i){const a=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ke(e,s,"linePrefix")}function s(c){if(c===null||Se(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?t(c):e.interrupt(a.parser.constructs.flow,i,t)(c)}}function hv(e,t,i,a,o,s,c,f,d){const p=d||Number.POSITIVE_INFINITY;let g=0;return y;function y(x){return x===60?(e.enter(a),e.enter(o),e.enter(s),e.consume(x),e.exit(s),v):x===null||x===32||x===41||yd(x)?i(x):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),A(x))}function v(x){return x===62?(e.enter(s),e.consume(x),e.exit(s),e.exit(o),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(x))}function b(x){return x===62?(e.exit("chunkString"),e.exit(f),v(x)):x===null||x===60||Se(x)?i(x):(e.consume(x),x===92?S:b)}function S(x){return x===60||x===62||x===92?(e.consume(x),b):b(x)}function A(x){return!g&&(x===null||x===41||Gt(x))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(x)):g<p&&x===40?(e.consume(x),g++,A):x===41?(e.consume(x),g--,A):x===null||x===32||x===40||yd(x)?i(x):(e.consume(x),x===92?D:A)}function D(x){return x===40||x===41||x===92?(e.consume(x),A):A(x)}}function pv(e,t,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),t):Se(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||Se(b)||f++>999?(e.exit("chunkString"),g(b)):(e.consume(b),d||(d=!Pe(b)),b===92?v:y)}function v(b){return b===91||b===92||b===93?(e.consume(b),f++,y):y(b)}}function mv(e,t,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),t):(e.enter(s),p(v))}function p(v){return v===c?(e.exit(s),d(c)):v===null?i(v):Se(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Ke(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===c||v===null||Se(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 Al(e,t){let i;return a;function a(o){return Se(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i=!0,a):Pe(o)?Ke(e,a,i?"linePrefix":"lineSuffix")(o):t(o)}}const NC={name:"definition",tokenize:MC},OC={partial:!0,tokenize:IC};function MC(e,t,i){const a=this;let o;return s;function s(b){return e.enter("definition"),c(b)}function c(b){return pv.call(a,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return o=da(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 Gt(b)?Al(e,p)(b):p(b)}function p(b){return hv(e,g,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function g(b){return e.attempt(OC,y,y)(b)}function y(b){return Pe(b)?Ke(e,v,"whitespace")(b):v(b)}function v(b){return b===null||Se(b)?(e.exit("definition"),a.parser.defined.push(o),t(b)):i(b)}}function IC(e,t,i){return a;function a(f){return Gt(f)?Al(e,o)(f):i(f)}function o(f){return mv(e,s,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return Pe(f)?Ke(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Se(f)?t(f):i(f)}}const zC={name:"hardBreakEscape",tokenize:UC};function UC(e,t,i){return a;function a(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return Se(s)?(e.exit("hardBreakEscape"),t(s)):i(s)}}const HC={name:"headingAtx",resolve:PC,tokenize:BC};function PC(e,t){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"},Un(e,a,i-a+1,[["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t]])),e}function BC(e,t,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||Gt(g)?(e.exit("atxHeadingSequence"),f(g)):i(g)}function f(g){return g===35?(e.enter("atxHeadingSequence"),d(g)):g===null||Se(g)?(e.exit("atxHeading"),t(g)):Pe(g)?Ke(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||Gt(g)?(e.exit("atxHeadingText"),f(g)):(e.consume(g),p)}}const jC=["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"],e0=["pre","script","style","textarea"],VC={concrete:!0,name:"htmlFlow",resolveTo:qC,tokenize:FC},GC={partial:!0,tokenize:XC},$C={partial:!0,tokenize:YC};function qC(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function FC(e,t,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,A):w===63?(e.consume(w),o=3,a.interrupt?t:L):In(w)?(e.consume(w),c=String.fromCharCode(w),D):i(w)}function v(w){return w===45?(e.consume(w),o=2,b):w===91?(e.consume(w),o=5,f=0,S):In(w)?(e.consume(w),o=4,a.interrupt?t:L):i(w)}function b(w){return w===45?(e.consume(w),a.interrupt?t:L):i(w)}function S(w){const se="CDATA[";return w===se.charCodeAt(f++)?(e.consume(w),f===se.length?a.interrupt?t:W:S):i(w)}function A(w){return In(w)?(e.consume(w),c=String.fromCharCode(w),D):i(w)}function D(w){if(w===null||w===47||w===62||Gt(w)){const se=w===47,me=c.toLowerCase();return!se&&!s&&e0.includes(me)?(o=1,a.interrupt?t(w):W(w)):jC.includes(c.toLowerCase())?(o=6,se?(e.consume(w),x):a.interrupt?t(w):W(w)):(o=7,a.interrupt&&!a.parser.lazy[a.now().line]?i(w):s?T(w):k(w))}return w===45||en(w)?(e.consume(w),c+=String.fromCharCode(w),D):i(w)}function x(w){return w===62?(e.consume(w),a.interrupt?t:W):i(w)}function T(w){return Pe(w)?(e.consume(w),T):ae(w)}function k(w){return w===47?(e.consume(w),ae):w===58||w===95||In(w)?(e.consume(w),I):Pe(w)?(e.consume(w),k):ae(w)}function I(w){return w===45||w===46||w===58||w===95||en(w)?(e.consume(w),I):z(w)}function z(w){return w===61?(e.consume(w),R):Pe(w)?(e.consume(w),z):k(w)}function R(w){return w===null||w===60||w===61||w===62||w===96?i(w):w===34||w===39?(e.consume(w),d=w,P):Pe(w)?(e.consume(w),R):G(w)}function P(w){return w===d?(e.consume(w),d=null,ee):w===null||Se(w)?i(w):(e.consume(w),P)}function G(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||Gt(w)?z(w):(e.consume(w),G)}function ee(w){return w===47||w===62||Pe(w)?k(w):i(w)}function ae(w){return w===62?(e.consume(w),ne):i(w)}function ne(w){return w===null||Se(w)?W(w):Pe(w)?(e.consume(w),ne):i(w)}function W(w){return w===45&&o===2?(e.consume(w),B):w===60&&o===1?(e.consume(w),X):w===62&&o===4?(e.consume(w),O):w===63&&o===3?(e.consume(w),L):w===93&&o===5?(e.consume(w),he):Se(w)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(GC,F,fe)(w)):w===null||Se(w)?(e.exit("htmlFlowData"),fe(w)):(e.consume(w),W)}function fe(w){return e.check($C,ie,F)(w)}function ie(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),te}function te(w){return w===null||Se(w)?fe(w):(e.enter("htmlFlowData"),W(w))}function B(w){return w===45?(e.consume(w),L):W(w)}function X(w){return w===47?(e.consume(w),c="",oe):W(w)}function oe(w){if(w===62){const se=c.toLowerCase();return e0.includes(se)?(e.consume(w),O):W(w)}return In(w)&&c.length<8?(e.consume(w),c+=String.fromCharCode(w),oe):W(w)}function he(w){return w===93?(e.consume(w),L):W(w)}function L(w){return w===62?(e.consume(w),O):w===45&&o===2?(e.consume(w),L):W(w)}function O(w){return w===null||Se(w)?(e.exit("htmlFlowData"),F(w)):(e.consume(w),O)}function F(w){return e.exit("htmlFlow"),t(w)}}function YC(e,t,i){const a=this;return o;function o(c){return Se(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):t(c)}}function XC(e,t,i){return a;function a(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ys,t,i)}}const QC={name:"htmlText",tokenize:ZC};function ZC(e,t,i){const a=this;let o,s,c;return f;function f(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),d}function d(L){return L===33?(e.consume(L),p):L===47?(e.consume(L),z):L===63?(e.consume(L),k):In(L)?(e.consume(L),G):i(L)}function p(L){return L===45?(e.consume(L),g):L===91?(e.consume(L),s=0,S):In(L)?(e.consume(L),T):i(L)}function g(L){return L===45?(e.consume(L),b):i(L)}function y(L){return L===null?i(L):L===45?(e.consume(L),v):Se(L)?(c=y,X(L)):(e.consume(L),y)}function v(L){return L===45?(e.consume(L),b):y(L)}function b(L){return L===62?B(L):L===45?v(L):y(L)}function S(L){const O="CDATA[";return L===O.charCodeAt(s++)?(e.consume(L),s===O.length?A:S):i(L)}function A(L){return L===null?i(L):L===93?(e.consume(L),D):Se(L)?(c=A,X(L)):(e.consume(L),A)}function D(L){return L===93?(e.consume(L),x):A(L)}function x(L){return L===62?B(L):L===93?(e.consume(L),x):A(L)}function T(L){return L===null||L===62?B(L):Se(L)?(c=T,X(L)):(e.consume(L),T)}function k(L){return L===null?i(L):L===63?(e.consume(L),I):Se(L)?(c=k,X(L)):(e.consume(L),k)}function I(L){return L===62?B(L):k(L)}function z(L){return In(L)?(e.consume(L),R):i(L)}function R(L){return L===45||en(L)?(e.consume(L),R):P(L)}function P(L){return Se(L)?(c=P,X(L)):Pe(L)?(e.consume(L),P):B(L)}function G(L){return L===45||en(L)?(e.consume(L),G):L===47||L===62||Gt(L)?ee(L):i(L)}function ee(L){return L===47?(e.consume(L),B):L===58||L===95||In(L)?(e.consume(L),ae):Se(L)?(c=ee,X(L)):Pe(L)?(e.consume(L),ee):B(L)}function ae(L){return L===45||L===46||L===58||L===95||en(L)?(e.consume(L),ae):ne(L)}function ne(L){return L===61?(e.consume(L),W):Se(L)?(c=ne,X(L)):Pe(L)?(e.consume(L),ne):ee(L)}function W(L){return L===null||L===60||L===61||L===62||L===96?i(L):L===34||L===39?(e.consume(L),o=L,fe):Se(L)?(c=W,X(L)):Pe(L)?(e.consume(L),W):(e.consume(L),ie)}function fe(L){return L===o?(e.consume(L),o=void 0,te):L===null?i(L):Se(L)?(c=fe,X(L)):(e.consume(L),fe)}function ie(L){return L===null||L===34||L===39||L===60||L===61||L===96?i(L):L===47||L===62||Gt(L)?ee(L):(e.consume(L),ie)}function te(L){return L===47||L===62||Gt(L)?ee(L):i(L)}function B(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):i(L)}function X(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),oe}function oe(L){return Pe(L)?Ke(e,he,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):he(L)}function he(L){return e.enter("htmlTextData"),c(L)}}const eh={name:"labelEnd",resolveAll:ew,resolveTo:tw,tokenize:nw},KC={tokenize:iw},WC={tokenize:rw},JC={tokenize:aw};function ew(e){let t=-1;const i=[];for(;++t<e.length;){const a=e[t][1];if(i.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const o=a.type==="labelImage"?4:2;a.type="data",t+=o}}return e.length!==i.length&&Un(e,0,e.length,i),e}function tw(e,t){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,t],["enter",p,t]],f=hn(f,e.slice(s+1,s+a+3)),f=hn(f,[["enter",g,t]]),f=hn(f,Jd(t.parser.constructs.insideSpan.null,e.slice(s+a+4,c-3),t)),f=hn(f,[["exit",g,t],e[c-2],e[c-1],["exit",p,t]]),f=hn(f,e.slice(c+1)),f=hn(f,[["exit",d,t]]),Un(e,s,e.length,f),e}function nw(e,t,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(da(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(KC,g,c?g:y)(v):v===91?e.attempt(WC,g,c?p:y)(v):c?g(v):y(v)}function p(v){return e.attempt(JC,g,y)(v)}function g(v){return t(v)}function y(v){return s._balanced=!0,i(v)}}function iw(e,t,i){return a;function a(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),o}function o(y){return Gt(y)?Al(e,s)(y):s(y)}function s(y){return y===41?g(y):hv(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Gt(y)?Al(e,d)(y):g(y)}function f(y){return i(y)}function d(y){return y===34||y===39||y===40?mv(e,p,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function p(y){return Gt(y)?Al(e,g)(y):g(y)}function g(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),t):i(y)}}function rw(e,t,i){const a=this;return o;function o(f){return pv.call(a,e,s,c,"reference","referenceMarker","referenceString")(f)}function s(f){return a.parser.defined.includes(da(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):i(f)}function c(f){return i(f)}}function aw(e,t,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"),t):i(s)}}const lw={name:"labelStartImage",resolveAll:eh.resolveAll,tokenize:ow};function ow(e,t,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):t(f)}}const sw={name:"labelStartLink",resolveAll:eh.resolveAll,tokenize:uw};function uw(e,t,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):t(c)}}const Df={name:"lineEnding",tokenize:cw};function cw(e,t){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ke(e,t,"linePrefix")}}const xs={name:"thematicBreak",tokenize:fw};function fw(e,t,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||Se(p))?(e.exit("thematicBreak"),t(p)):i(p)}function d(p){return p===o?(e.consume(p),a++,d):(e.exit("thematicBreakSequence"),Pe(p)?Ke(e,f,"whitespace")(p):f(p))}}const Vt={continuation:{tokenize:mw},exit:yw,name:"list",tokenize:pw},dw={partial:!0,tokenize:bw},hw={partial:!0,tokenize:gw};function pw(e,t,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:bd(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(xs,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 bd(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(Ys,a.interrupt?i:g,e.attempt(dw,v,y))}function g(b){return a.containerState.initialBlankLine=!0,s++,v(b)}function y(b){return Pe(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,t(b)}}function mw(e,t,i){const a=this;return a.containerState._closeFlow=void 0,e.check(Ys,o,s);function o(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Ke(e,t,"listItemIndent",a.containerState.size+1)(f)}function s(f){return a.containerState.furtherBlankLines||!Pe(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(hw,t,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,Ke(e,e.attempt(Vt,t,i),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function gw(e,t,i){const a=this;return Ke(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?t(s):i(s)}}function yw(e){e.exit(this.containerState.type)}function bw(e,t,i){const a=this;return Ke(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!Pe(s)&&c&&c[1].type==="listItemPrefixWhitespace"?t(s):i(s)}}const t0={name:"setextUnderline",resolveTo:vw,tokenize:_w};function vw(e,t){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,t]),e.splice(s+1,0,["exit",e[a][1],t]),e[a][1].end={...e[s][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function _w(e,t,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"),Pe(p)?Ke(e,d,"lineSuffix")(p):d(p))}function d(p){return p===null||Se(p)?(e.exit("setextHeadingLine"),t(p)):i(p)}}const Sw={tokenize:Ew};function Ew(e){const t=this,i=e.attempt(Ys,a,e.attempt(this.parser.constructs.flowInitial,o,Ke(e,e.attempt(this.parser.constructs.flow,o,e.attempt(AC,o)),"linePrefix")));return i;function a(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,i}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,i}}const xw={resolveAll:yv()},Cw=gv("string"),ww=gv("text");function gv(e){return{resolveAll:yv(e==="text"?kw:void 0),tokenize:t};function t(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 yv(e){return t;function t(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 kw(e,t){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=t.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(t._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,t],["exit",p,t]),i+=2)}i++}return e}const Aw={42:Vt,43:Vt,45:Vt,48:Vt,49:Vt,50:Vt,51:Vt,52:Vt,53:Vt,54:Vt,55:Vt,56:Vt,57:Vt,62:uv},Tw={91:NC},Lw={[-2]:Rf,[-1]:Rf,32:Rf},Rw={35:HC,42:xs,45:[t0,xs],60:VC,61:t0,95:xs,96:Jy,126:Jy},Dw={38:fv,92:cv},Nw={[-5]:Df,[-4]:Df,[-3]:Df,33:lw,38:fv,42:vd,60:[sC,QC],91:sw,92:[zC,cv],93:eh,95:vd,96:SC},Ow={null:[vd,xw]},Mw={null:[42,95]},Iw={null:[]},zw=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Mw,contentInitial:Tw,disable:Iw,document:Aw,flow:Rw,flowInitial:Lw,insideSpan:Ow,string:Dw,text:Nw},Symbol.toStringTag,{value:"Module"}));function Uw(e,t,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:P(z),check:P(R),consume:T,enter:k,exit:I,interrupt:P(R,{interrupt:!0})},p={code:null,containerState:{},defineSkip:A,events:[],now:S,parser:e,previous:null,sliceSerialize:v,sliceStream:b,write:y};let g=t.tokenize.call(p,d);return t.resolveAll&&s.push(t),p;function y(ne){return c=hn(c,ne),D(),c[c.length-1]!==null?[]:(G(t,0),p.events=Jd(s,p.events,p),p.events)}function v(ne,W){return Pw(b(ne),W)}function b(ne){return Hw(c,ne)}function S(){const{_bufferIndex:ne,_index:W,line:fe,column:ie,offset:te}=a;return{_bufferIndex:ne,_index:W,line:fe,column:ie,offset:te}}function A(ne){o[ne.line]=ne.column,ae()}function D(){let ne;for(;a._index<c.length;){const W=c[a._index];if(typeof W=="string")for(ne=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===ne&&a._bufferIndex<W.length;)x(W.charCodeAt(a._bufferIndex));else x(W)}}function x(ne){g=g(ne)}function T(ne){Se(ne)?(a.line++,a.column=1,a.offset+=ne===-3?2:1,ae()):ne!==-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=ne}function k(ne,W){const fe=W||{};return fe.type=ne,fe.start=S(),p.events.push(["enter",fe,p]),f.push(fe),fe}function I(ne){const W=f.pop();return W.end=S(),p.events.push(["exit",W,p]),W}function z(ne,W){G(ne,W.from)}function R(ne,W){W.restore()}function P(ne,W){return fe;function fe(ie,te,B){let X,oe,he,L;return Array.isArray(ie)?F(ie):"tokenize"in ie?F([ie]):O(ie);function O(ce){return be;function be(Te){const Le=Te!==null&&ce[Te],Xe=Te!==null&&ce.null,et=[...Array.isArray(Le)?Le:Le?[Le]:[],...Array.isArray(Xe)?Xe:Xe?[Xe]:[]];return F(et)(Te)}}function F(ce){return X=ce,oe=0,ce.length===0?B:w(ce[oe])}function w(ce){return be;function be(Te){return L=ee(),he=ce,ce.partial||(p.currentConstruct=ce),ce.name&&p.parser.constructs.disable.null.includes(ce.name)?me():ce.tokenize.call(W?Object.assign(Object.create(p),W):p,d,se,me)(Te)}}function se(ce){return ne(he,L),te}function me(ce){return L.restore(),++oe<X.length?w(X[oe]):B}}}function G(ne,W){ne.resolveAll&&!s.includes(ne)&&s.push(ne),ne.resolve&&Un(p.events,W,p.events.length-W,ne.resolve(p.events.slice(W),p)),ne.resolveTo&&(p.events=ne.resolveTo(p.events,p))}function ee(){const ne=S(),W=p.previous,fe=p.currentConstruct,ie=p.events.length,te=Array.from(f);return{from:ie,restore:B};function B(){a=ne,p.previous=W,p.currentConstruct=fe,p.events.length=ie,f=te,ae()}}function ae(){a.line in o&&a.column<2&&(a.column=o[a.line],a.offset+=o[a.line]-1)}}function Hw(e,t){const i=t.start._index,a=t.start._bufferIndex,o=t.end._index,s=t.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 Pw(e,t){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=`
|
|
12
|
-
`;break}case-3:{c=`\r
|
|
13
|
-
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&o)continue;c=" ";break}default:c=String.fromCharCode(s)}o=s===-2,a.push(c)}return a.join("")}function Bw(e){const a={constructs:Yx([zw,...(e||{}).extensions||[]]),content:o(tC),defined:[],document:o(iC),flow:o(Sw),lazy:{},string:o(Cw),text:o(ww)};return a;function o(s){return c;function c(f){return Uw(a,s,f)}}}function jw(e){for(;!dv(e););return e}const n0=/[\0\t\n\r]/g;function Vw(){let e=1,t="",i=!0,a;return o;function o(s,c,f){const d=[];let p,g,y,v,b;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),y=0,t="",i&&(s.charCodeAt(0)===65279&&y++,i=void 0);y<s.length;){if(n0.lastIndex=y,p=n0.exec(s),v=p&&p.index!==void 0?p.index:s.length,b=s.charCodeAt(v),!p){t=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),t&&d.push(t),d.push(null)),d}}const Gw=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function $w(e){return e.replace(Gw,qw)}function qw(e,t,i){if(t)return t;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),s=o===120||o===88;return sv(i.slice(s?2:1),s?16:10)}return Wd(i)||e}const bv={}.hasOwnProperty;function Fw(e,t,i){return t&&typeof t=="object"&&(i=t,t=void 0),Yw(i)(jw(Bw(i).document().write(Vw()(e,t,!0))))}function Yw(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ci),autolinkProtocol:ee,autolinkEmail:ee,atxHeading:s(oi),blockQuote:s(Xe),characterEscape:ee,characterReference:ee,codeFenced:s(et),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(et,c),codeText:s(qt,c),codeTextData:ee,data:ee,codeFlowValue:ee,definition:s(xt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(gn),hardBreakEscape:s(si),hardBreakTrailing:s(si),htmlFlow:s(ui,c),htmlFlowData:ee,htmlText:s(ui,c),htmlTextData:ee,image:s(mr),label:c,link:s(ci),listItem:s(di),listItemValue:v,listOrdered:s(fi,y),listUnordered:s(fi),paragraph:s(gr),reference:w,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(oi),strong:s(Ca),thematicBreak:s(wa)},exit:{atxHeading:d(),atxHeadingSequence:z,autolink:d(),autolinkEmail:Le,autolinkProtocol:Te,blockQuote:d(),characterEscapeValue:ae,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:ce,characterReference:be,codeFenced:d(D),codeFencedFence:A,codeFencedFenceInfo:b,codeFencedFenceMeta:S,codeFlowValue:ae,codeIndented:d(x),codeText:d(te),codeTextData:ae,data:ae,definition:d(),definitionDestinationString:I,definitionLabelString:T,definitionTitleString:k,emphasis:d(),hardBreakEscape:d(W),hardBreakTrailing:d(W),htmlFlow:d(fe),htmlFlowData:ae,htmlText:d(ie),htmlTextData:ae,image:d(X),label:he,labelText:oe,lineEnding:ne,link:d(B),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:se,resourceDestinationString:L,resourceTitleString:O,resource:F,setextHeading:d(G),setextHeadingLineSequence:P,setextHeadingText:R,strong:d(),thematicBreak:d()}};vv(t,(e||{}).mdastExtensions||[]);const i={};return a;function a(Q){let ue={type:"root",children:[]};const _e={stack:[ue],tokenStack:[],config:t,enter:f,exit:p,buffer:c,resume:g,data:i},Z=[];let pe=-1;for(;++pe<Q.length;)if(Q[pe][1].type==="listOrdered"||Q[pe][1].type==="listUnordered")if(Q[pe][0]==="enter")Z.push(pe);else{const xe=Z.pop();pe=o(Q,xe,pe)}for(pe=-1;++pe<Q.length;){const xe=t[Q[pe][0]];bv.call(xe,Q[pe][1].type)&&xe[Q[pe][1].type].call(Object.assign({sliceSerialize:Q[pe][2].sliceSerialize},_e),Q[pe][1])}if(_e.tokenStack.length>0){const xe=_e.tokenStack[_e.tokenStack.length-1];(xe[1]||i0).call(_e,void 0,xe[0])}for(ue.position={start:Hi(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:Hi(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},pe=-1;++pe<t.transforms.length;)ue=t.transforms[pe](ue)||ue;return ue}function o(Q,ue,_e){let Z=ue-1,pe=-1,xe=!1,Qe,nt,Be,st;for(;++Z<=_e;){const Fe=Q[Z];switch(Fe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Fe[0]==="enter"?pe++:pe--,st=void 0;break}case"lineEndingBlank":{Fe[0]==="enter"&&(Qe&&!st&&!pe&&!Be&&(Be=Z),st=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:st=void 0}if(!pe&&Fe[0]==="enter"&&Fe[1].type==="listItemPrefix"||pe===-1&&Fe[0]==="exit"&&(Fe[1].type==="listUnordered"||Fe[1].type==="listOrdered")){if(Qe){let hi=Z;for(nt=void 0;hi--;){const yn=Q[hi];if(yn[1].type==="lineEnding"||yn[1].type==="lineEndingBlank"){if(yn[0]==="exit")continue;nt&&(Q[nt][1].type="lineEndingBlank",xe=!0),yn[1].type="lineEnding",nt=hi}else if(!(yn[1].type==="linePrefix"||yn[1].type==="blockQuotePrefix"||yn[1].type==="blockQuotePrefixWhitespace"||yn[1].type==="blockQuoteMarker"||yn[1].type==="listItemIndent"))break}Be&&(!nt||Be<nt)&&(Qe._spread=!0),Qe.end=Object.assign({},nt?Q[nt][1].start:Fe[1].end),Q.splice(nt||Z,0,["exit",Qe,Fe[2]]),Z++,_e++}if(Fe[1].type==="listItemPrefix"){const hi={type:"listItem",_spread:!1,start:Object.assign({},Fe[1].start),end:void 0};Qe=hi,Q.splice(Z,0,["enter",hi,Fe[2]]),Z++,_e++,Be=void 0,st=!0}}}return Q[ue][1]._spread=xe,_e}function s(Q,ue){return _e;function _e(Z){f.call(this,Q(Z),Z),ue&&ue.call(this,Z)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(Q,ue,_e){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([ue,_e||void 0]),Q.position={start:Hi(ue.start),end:void 0}}function d(Q){return ue;function ue(_e){Q&&Q.call(this,_e),p.call(this,_e)}}function p(Q,ue){const _e=this.stack.pop(),Z=this.tokenStack.pop();if(Z)Z[0].type!==Q.type&&(ue?ue.call(this,Q,Z[0]):(Z[1]||i0).call(this,Q,Z[0]));else throw new Error("Cannot close `"+Q.type+"` ("+kl({start:Q.start,end:Q.end})+"): it’s not open");_e.position.end=Hi(Q.end)}function g(){return qx(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function v(Q){if(this.data.expectingFirstListItemValue){const ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function b(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=Q}function S(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=Q}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function D(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q.replace(/(\r?\n|\r)$/g,"")}function T(Q){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.label=ue,_e.identifier=da(this.sliceSerialize(Q)).toLowerCase()}function k(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.title=Q}function I(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.url=Q}function z(Q){const ue=this.stack[this.stack.length-1];if(!ue.depth){const _e=this.sliceSerialize(Q).length;ue.depth=_e}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function P(Q){const ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function ee(Q){const _e=this.stack[this.stack.length-1].children;let Z=_e[_e.length-1];(!Z||Z.type!=="text")&&(Z=Ct(),Z.position={start:Hi(Q.start),end:void 0},_e.push(Z)),this.stack.push(Z)}function ae(Q){const ue=this.stack.pop();ue.value+=this.sliceSerialize(Q),ue.position.end=Hi(Q.end)}function ne(Q){const ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){const _e=ue.children[ue.children.length-1];_e.position.end=Hi(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ue.type)&&(ee.call(this,Q),ae.call(this,Q))}function W(){this.data.atHardBreak=!0}function fe(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q}function ie(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q}function te(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q}function B(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ue,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function X(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ue,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function oe(Q){const ue=this.sliceSerialize(Q),_e=this.stack[this.stack.length-2];_e.label=$w(ue),_e.identifier=da(ue).toLowerCase()}function he(){const Q=this.stack[this.stack.length-1],ue=this.resume(),_e=this.stack[this.stack.length-1];if(this.data.inReference=!0,_e.type==="link"){const Z=Q.children;_e.children=Z}else _e.alt=ue}function L(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.url=Q}function O(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.title=Q}function F(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function se(Q){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.label=ue,_e.identifier=da(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function me(Q){this.data.characterReferenceType=Q.type}function ce(Q){const ue=this.sliceSerialize(Q),_e=this.data.characterReferenceType;let Z;_e?(Z=sv(ue,_e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Z=Wd(ue);const pe=this.stack[this.stack.length-1];pe.value+=Z}function be(Q){const ue=this.stack.pop();ue.position.end=Hi(Q.end)}function Te(Q){ae.call(this,Q);const ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(Q)}function Le(Q){ae.call(this,Q);const ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(Q)}function Xe(){return{type:"blockquote",children:[]}}function et(){return{type:"code",lang:null,meta:null,value:""}}function qt(){return{type:"inlineCode",value:""}}function xt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function gn(){return{type:"emphasis",children:[]}}function oi(){return{type:"heading",depth:0,children:[]}}function si(){return{type:"break"}}function ui(){return{type:"html",value:""}}function mr(){return{type:"image",title:null,url:"",alt:null}}function ci(){return{type:"link",title:null,url:"",children:[]}}function fi(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function di(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function gr(){return{type:"paragraph",children:[]}}function Ca(){return{type:"strong",children:[]}}function Ct(){return{type:"text",value:""}}function wa(){return{type:"thematicBreak"}}}function Hi(e){return{line:e.line,column:e.column,offset:e.offset}}function vv(e,t){let i=-1;for(;++i<t.length;){const a=t[i];Array.isArray(a)?vv(e,a):Xw(e,a)}}function Xw(e,t){let i;for(i in t)if(bv.call(t,i))switch(i){case"canContainEols":{const a=t[i];a&&e[i].push(...a);break}case"transforms":{const a=t[i];a&&e[i].push(...a);break}case"enter":case"exit":{const a=t[i];a&&Object.assign(e[i],a);break}}}function i0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+kl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+kl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+kl({start:t.start,end:t.end})+") is still open")}function Qw(e){const t=this;t.parser=i;function i(a){return Fw(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Zw(e,t){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,i),e.applyData(t,i)}function Kw(e,t){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,i),[e.applyData(t,i),{type:"text",value:`
|
|
14
|
-
`}]}function Ww(e,t){const i=t.value?t.value+`
|
|
15
|
-
`:"",a={},o=t.lang?t.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 t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function Jw(e,t){const i={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function ek(e,t){const i={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function tk(e,t){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),o=_a(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(t,d);const p={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,p),e.applyData(t,p)}function nk(e,t){const i={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function ik(e,t){if(e.options.allowDangerousHtml){const i={type:"raw",value:t.value};return e.patch(t,i),e.applyData(t,i)}}function _v(e,t){const i=t.referenceType;let a="]";if(i==="collapsed"?a+="[]":i==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const o=e.all(t),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 rk(e,t){const i=String(t.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return _v(e,t);const o={src:_a(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(o.title=a.title);const s={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,s),e.applyData(t,s)}function ak(e,t){const i={src:_a(t.url)};t.alt!==null&&t.alt!==void 0&&(i.alt=t.alt),t.title!==null&&t.title!==void 0&&(i.title=t.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function lk(e,t){const i={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,i);const a={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(t,a),e.applyData(t,a)}function ok(e,t){const i=String(t.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return _v(e,t);const o={href:_a(a.url||"")};a.title!==null&&a.title!==void 0&&(o.title=a.title);const s={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function sk(e,t){const i={href:_a(t.url)};t.title!==null&&t.title!==void 0&&(i.title=t.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function uk(e,t,i){const a=e.all(t),o=i?ck(i):Sv(t),s={},c=[];if(typeof t.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:t.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:`
|
|
16
|
-
`}),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:`
|
|
17
|
-
`});const p={type:"element",tagName:"li",properties:s,children:c};return e.patch(t,p),e.applyData(t,p)}function ck(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const i=e.children;let a=-1;for(;!t&&++a<i.length;)t=Sv(i[a])}return t}function Sv(e){const t=e.spread;return t??e.children.length>1}function fk(e,t){const i={},a=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(i.start=t.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:t.ordered?"ol":"ul",properties:i,children:e.wrap(a,!0)};return e.patch(t,s),e.applyData(t,s)}function dk(e,t){const i={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function hk(e,t){const i={type:"root",children:e.wrap(e.all(t))};return e.patch(t,i),e.applyData(t,i)}function pk(e,t){const i={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function mk(e,t){const i=e.all(t),a=i.shift(),o=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),o.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},f=Xd(t.children[1]),d=tv(t.children[t.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(t,s),e.applyData(t,s)}function gk(e,t,i){const a=i?i.children:void 0,s=(a?a.indexOf(t):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,f=c?c.length:t.children.length;let d=-1;const p=[];for(;++d<f;){const y=t.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(t,g),e.applyData(t,g)}function yk(e,t){const i={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}const r0=9,a0=32;function bk(e){const t=String(e),i=/\r?\n|\r/g;let a=i.exec(t),o=0;const s=[];for(;a;)s.push(l0(t.slice(o,a.index),o>0,!0),a[0]),o=a.index+a[0].length,a=i.exec(t);return s.push(l0(t.slice(o),o>0,!1)),s.join("")}function l0(e,t,i){let a=0,o=e.length;if(t){let s=e.codePointAt(a);for(;s===r0||s===a0;)a++,s=e.codePointAt(a)}if(i){let s=e.codePointAt(o-1);for(;s===r0||s===a0;)o--,s=e.codePointAt(o-1)}return o>a?e.slice(a,o):""}function vk(e,t){const i={type:"text",value:bk(String(t.value))};return e.patch(t,i),e.applyData(t,i)}function _k(e,t){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,i),e.applyData(t,i)}const Sk={blockquote:Zw,break:Kw,code:Ww,delete:Jw,emphasis:ek,footnoteReference:tk,heading:nk,html:ik,imageReference:rk,image:ak,inlineCode:lk,linkReference:ok,link:sk,listItem:uk,list:fk,paragraph:dk,root:hk,strong:pk,table:mk,tableCell:yk,tableRow:gk,text:vk,thematicBreak:_k,toml:os,yaml:os,definition:os,footnoteDefinition:os};function os(){}const Ev=-1,Xs=0,Tl=1,Rs=2,th=3,nh=4,ih=5,rh=6,xv=7,Cv=8,o0=typeof self=="object"?self:globalThis,Ek=(e,t)=>{const i=(o,s)=>(e.set(s,o),o),a=o=>{if(e.has(o))return e.get(o);const[s,c]=t[o];switch(s){case Xs:case Ev:return i(c,o);case Tl:{const f=i([],o);for(const d of c)f.push(a(d));return f}case Rs:{const f=i({},o);for(const[d,p]of c)f[a(d)]=a(p);return f}case th:return i(new Date(c),o);case nh:{const{source:f,flags:d}=c;return i(new RegExp(f,d),o)}case ih:{const f=i(new Map,o);for(const[d,p]of c)f.set(a(d),a(p));return f}case rh:{const f=i(new Set,o);for(const d of c)f.add(a(d));return f}case xv:{const{name:f,message:d}=c;return i(new o0[f](d),o)}case Cv: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 o0[s](c),o)};return a},s0=e=>Ek(new Map,e)(0),na="",{toString:xk}={},{keys:Ck}=Object,El=e=>{const t=typeof e;if(t!=="object"||!e)return[Xs,t];const i=xk.call(e).slice(8,-1);switch(i){case"Array":return[Tl,na];case"Object":return[Rs,na];case"Date":return[th,na];case"RegExp":return[nh,na];case"Map":return[ih,na];case"Set":return[rh,na];case"DataView":return[Tl,i]}return i.includes("Array")?[Tl,i]:i.includes("Error")?[xv,i]:[Rs,i]},ss=([e,t])=>e===Xs&&(t==="function"||t==="symbol"),wk=(e,t,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]=El(c);switch(f){case Xs:{let g=c;switch(d){case"bigint":f=Cv,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);g=null;break;case"undefined":return o([Ev],c)}return o([f,g],c)}case Tl:{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 Rs:{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(t&&"toJSON"in c)return s(c.toJSON());const g=[],y=o([f,g],c);for(const v of Ck(c))(e||!ss(El(c[v])))&&g.push([s(v),s(c[v])]);return y}case th:return o([f,c.toISOString()],c);case nh:{const{source:g,flags:y}=c;return o([f,{source:g,flags:y}],c)}case ih:{const g=[],y=o([f,g],c);for(const[v,b]of c)(e||!(ss(El(v))||ss(El(b))))&&g.push([s(v),s(b)]);return y}case rh:{const g=[],y=o([f,g],c);for(const v of c)(e||!ss(El(v)))&&g.push(s(v));return y}}const{message:p}=c;return o([f,{name:d,message:p}],c)};return s},u0=(e,{json:t,lossy:i}={})=>{const a=[];return wk(!(t||i),!!t,new Map,a)(e),a},Ds=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?s0(u0(e,t)):structuredClone(e):(e,t)=>s0(u0(e,t));function kk(e,t){const i=[{type:"text",value:"↩"}];return t>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),i}function Ak(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Tk(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||kk,a=e.options.footnoteBackLabel||Ak,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=_a(y.toLowerCase());let b=0;const S=[],A=e.footnoteCounts.get(y);for(;A!==void 0&&++b<=A;){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:"#"+t+"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 D=g[g.length-1];if(D&&D.type==="element"&&D.tagName==="p"){const T=D.children[D.children.length-1];T&&T.type==="text"?T.value+=" ":D.children.push({type:"text",value:" "}),D.children.push(...S)}else g.push(...S);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(g,!0)};e.patch(p,x),f.push(x)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Ds(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
18
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
19
|
-
`}]}}const wv=(function(e){if(e==null)return Nk;if(typeof e=="function")return Qs(e);if(typeof e=="object")return Array.isArray(e)?Lk(e):Rk(e);if(typeof e=="string")return Dk(e);throw new Error("Expected function, string, or object as test")});function Lk(e){const t=[];let i=-1;for(;++i<e.length;)t[i]=wv(e[i]);return Qs(a);function a(...o){let s=-1;for(;++s<t.length;)if(t[s].apply(this,o))return!0;return!1}}function Rk(e){const t=e;return Qs(i);function i(a){const o=a;let s;for(s in e)if(o[s]!==t[s])return!1;return!0}}function Dk(e){return Qs(t);function t(i){return i&&i.type===e}}function Qs(e){return t;function t(i,a,o){return!!(Ok(i)&&e.call(this,i,typeof a=="number"?a:void 0,o||void 0))}}function Nk(){return!0}function Ok(e){return e!==null&&typeof e=="object"&&"type"in e}const kv=[],Mk=!0,c0=!1,Ik="skip";function zk(e,t,i,a){let o;typeof t=="function"&&typeof i!="function"?(a=i,i=t):o=t;const s=wv(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=kv,S,A,D;if((!t||s(d,p,g[g.length-1]||void 0))&&(b=Uk(i(d,g)),b[0]===c0))return b;if("children"in d&&d.children){const x=d;if(x.children&&b[0]!==Ik)for(A=(a?x.children.length:-1)+c,D=g.concat(x);A>-1&&A<x.children.length;){const T=x.children[A];if(S=f(T,A,D)(),S[0]===c0)return S;A=typeof S[1]=="number"?S[1]:A+c}}return b}}}function Uk(e){return Array.isArray(e)?e:typeof e=="number"?[Mk,e]:e==null?kv:[e]}function Av(e,t,i,a){let o,s,c;typeof t=="function"&&typeof i!="function"?(s=void 0,c=t,o=i):(s=t,c=i,o=a),zk(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 _d={}.hasOwnProperty,Hk={};function Pk(e,t){const i=t||Hk,a=new Map,o=new Map,s=new Map,c={...Sk,...i.handlers},f={all:p,applyData:jk,definitionById:a,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:c,one:d,options:i,patch:Bk,wrap:Gk};return Av(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(_d.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:A,...D}=g,x=Ds(D);return x.children=f.all(g),x}return Ds(g)}return(f.options.unknownHandler||Vk)(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=f0(S.value)),!Array.isArray(S)&&S.type==="element")){const A=S.children[0];A&&A.type==="text"&&(A.value=f0(A.value))}Array.isArray(S)?y.push(...S):y.push(S)}}}return y}}function Bk(e,t){e.position&&(t.position=xx(e))}function jk(e,t){let i=t;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,Ds(s)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function Vk(e,t){const i=t.data||{},a="value"in t&&!(_d.call(i,"hProperties")||_d.call(i,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Gk(e,t){const i=[];let a=-1;for(t&&i.push({type:"text",value:`
|
|
20
|
-
`});++a<e.length;)a&&i.push({type:"text",value:`
|
|
21
|
-
`}),i.push(e[a]);return t&&e.length>0&&i.push({type:"text",value:`
|
|
22
|
-
`}),i}function f0(e){let t=0,i=e.charCodeAt(t);for(;i===9||i===32;)t++,i=e.charCodeAt(t);return e.slice(t)}function d0(e,t){const i=Pk(e,t),a=i.one(e,void 0),o=Tk(i),s=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
|
|
23
|
-
`},o),s}function $k(e,t){return e&&"run"in e?async function(i,a){const o=d0(i,{file:a,...t});await e.run(o,a)}:function(i,a){return d0(i,{file:a,...e||t})}}function h0(e){if(e)throw e}var Nf,p0;function qk(){if(p0)return Nf;p0=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},s=function(p){if(!p||t.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 Nf=function d(){var p,g,y,v,b,S,A=arguments[0],D=1,x=arguments.length,T=!1;for(typeof A=="boolean"&&(T=A,A=arguments[1]||{},D=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});D<x;++D)if(p=arguments[D],p!=null)for(g in p)y=f(A,g),v=f(p,g),A!==v&&(T&&v&&(s(v)||(b=o(v)))?(b?(b=!1,S=y&&o(y)?y:[]):S=y&&s(y)?y:{},c(A,{name:g,newValue:d(T,S,v)})):typeof v<"u"&&c(A,{name:g,newValue:v}));return A},Nf}var Fk=qk();const Of=Ub(Fk);function Sd(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Yk(){const e=[],t={run:i,use:a};return t;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?Xk(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),t}}function Xk(e,t){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,t(c,...f))}function s(c){o(null,c)}}const On={basename:Qk,dirname:Zk,extname:Kk,join:Wk,sep:"/"};function Qk(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');jl(e);let i=0,a=-1,o=e.length,s;if(t===void 0||t.length===0||t.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(t===e)return"";let c=-1,f=t.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)===t.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 Zk(e){if(jl(e),e.length===0)return".";let t=-1,i=e.length,a;for(;--i;)if(e.codePointAt(i)===47){if(a){t=i;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Kk(e){jl(e);let t=e.length,i=-1,a=0,o=-1,s=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){a=t+1;break}continue}i<0&&(c=!0,i=t+1),f===46?o<0?o=t: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 Wk(...e){let t=-1,i;for(;++t<e.length;)jl(e[t]),e[t]&&(i=i===void 0?e[t]:i+"/"+e[t]);return i===void 0?".":Jk(i)}function Jk(e){jl(e);const t=e.codePointAt(0)===47;let i=eA(e,!t);return i.length===0&&!t&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),t?"/"+i:i}function eA(e,t){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}}t&&(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 jl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tA={cwd:nA};function nA(){return"/"}function Ed(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function iA(e){if(typeof e=="string")e=new URL(e);else if(!Ed(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return rA(e)}function rA(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let i=-1;for(;++i<t.length;)if(t.codePointAt(i)===37&&t.codePointAt(i+1)===50){const a=t.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(t)}const Mf=["history","path","basename","stem","extname","dirname"];class Tv{constructor(t){let i;t?Ed(t)?i={path:t}:typeof t=="string"||aA(t)?i={value:t}:i=t:i={},this.cwd="cwd"in i?"":tA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Mf.length;){const s=Mf[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)Mf.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?On.basename(this.path):void 0}set basename(t){zf(t,"basename"),If(t,"basename"),this.path=On.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?On.dirname(this.path):void 0}set dirname(t){m0(this.basename,"dirname"),this.path=On.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?On.extname(this.path):void 0}set extname(t){if(If(t,"extname"),m0(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=On.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ed(t)&&(t=iA(t)),zf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?On.basename(this.path,this.extname):void 0}set stem(t){zf(t,"stem"),If(t,"stem"),this.path=On.join(this.dirname||"",t+(this.extname||""))}fail(t,i,a){const o=this.message(t,i,a);throw o.fatal=!0,o}info(t,i,a){const o=this.message(t,i,a);return o.fatal=void 0,o}message(t,i,a){const o=new Ot(t,i,a);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function If(e,t){if(e&&e.includes(On.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+On.sep+"`")}function zf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function m0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function aA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const lA=(function(e){const a=this.constructor.prototype,o=a[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,a),s}),oA={}.hasOwnProperty;class ah extends lA{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=Yk()}copy(){const t=new ah;let i=-1;for(;++i<this.attachers.length;){const a=this.attachers[i];t.use(...a)}return t.data(Of(!0,{},this.namespace)),t}data(t,i){return typeof t=="string"?arguments.length===2?(Pf("data",this.frozen),this.namespace[t]=i,this):oA.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Pf("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const o=i.call(t,...a);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const i=us(t),a=this.parser||this.Parser;return Uf("parse",a),a(String(i),i)}process(t,i){const a=this;return this.freeze(),Uf("process",this.parser||this.Parser),Hf("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(s,c){const f=us(t),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);cA(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(t){let i=!1,a;return this.freeze(),Uf("processSync",this.parser||this.Parser),Hf("processSync",this.compiler||this.Compiler),this.process(t,o),y0("processSync","process",i),a;function o(s,c){i=!0,h0(s),a=c}}run(t,i,a){g0(t),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=us(i);o.run(t,d,p);function p(g,y,v){const b=y||t;g?f(g):c?c(b):a(void 0,b,v)}}}runSync(t,i){let a=!1,o;return this.run(t,i,s),y0("runSync","run",a),o;function s(c,f){h0(c),o=f,a=!0}}stringify(t,i){this.freeze();const a=us(i),o=this.compiler||this.Compiler;return Hf("stringify",o),g0(t),o(t,a)}use(t,...i){const a=this.attachers,o=this.namespace;if(Pf("use",this.frozen),t!=null)if(typeof t=="function")d(t,i);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");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=Of(!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 A=a[v][1];Sd(A)&&Sd(b)&&(b=Of(!0,A,b)),a[v]=[p,b,...S]}}}}const sA=new ah().freeze();function Uf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Hf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Pf(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function g0(e){if(!Sd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function y0(e,t,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function us(e){return uA(e)?e:new Tv(e)}function uA(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function cA(e){return typeof e=="string"||fA(e)}function fA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dA="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",b0=[],v0={allowDangerousHtml:!0},hA=/^(https?|ircs?|mailto|xmpp)$/i,pA=[{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 mA(e){const t=gA(e),i=yA(e);return bA(t.runSync(t.parse(i),i),e)}function gA(e){const t=e.rehypePlugins||b0,i=e.remarkPlugins||b0,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...v0}:v0;return sA().use(Qw).use(i).use($k,a).use(t)}function yA(e){const t=e.children||"",i=new Tv;return typeof t=="string"&&(i.value=t),i}function bA(e,t){const i=t.allowedElements,a=t.allowElement,o=t.components,s=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||vA;for(const g of pA)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+dA+g.id,void 0);return Av(e,p),Tx(e,{Fragment:H.Fragment,components:o,ignoreInvalidStyle:!0,jsx:H.jsx,jsxs:H.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 Lf)if(Object.hasOwn(Lf,b)&&Object.hasOwn(g.properties,b)){const S=g.properties[b],A=Lf[b];(A===null||A.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 vA(e){const t=e.indexOf(":"),i=e.indexOf("?"),a=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||i!==-1&&t>i||a!==-1&&t>a||hA.test(e.slice(0,t))?e:""}const _A="modulepreload",SA=function(e){return"/"+e},_0={},C=function(t,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=SA(g),g in _0)return;_0[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":_A,y||(b.as="script"),b.crossOrigin="",b.href=g,d&&b.setAttribute("nonce",d),document.head.appendChild(b),y)return new Promise((S,A)=>{b.addEventListener("load",S),b.addEventListener("error",()=>A(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 t().catch(s)})};let pt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function EA(e){return lh(e)}function lh(e){return Array.isArray(e)?xA(e):e instanceof RegExp?e:typeof e=="object"?CA(e):e}function xA(e){let t=[];for(let i=0,a=e.length;i<a;i++)t[i]=lh(e[i]);return t}function CA(e){let t={};for(let i in e)t[i]=lh(e[i]);return t}function Lv(e,...t){return t.forEach(i=>{for(let a in i)e[a]=i[a]}),e}function Rv(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Rv(e.substring(0,e.length-1)):e.substr(~t+1)}var Bf=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,cs=class{static hasCaptures(e){return e===null?!1:(Bf.lastIndex=0,Bf.test(e))}static replaceCaptures(e,t,i){return e.replace(Bf,(a,o,s,c)=>{let f=i[parseInt(o||s,10)];if(f){let d=t.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 Dv(e,t){return e<t?-1:e>t?1:0}function Nv(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let i=e.length,a=t.length;if(i===a){for(let o=0;o<i;o++){let s=Dv(e[o],t[o]);if(s!==0)return s}return 0}return i-a}function S0(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 Ov(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Mv=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Ns=class{constructor(e,t,i){this._colorMap=e,this._defaults=t,this._root=i}static createFromRawTheme(e,t){return this.createFromParsedTheme(AA(e),t)}static createFromParsedTheme(e,t){return LA(e,t)}_cachedMatchRoot=new Mv(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,a=this._cachedMatchRoot.get(t).find(o=>wA(e.parent,o.parentScopes));return a?new Iv(a.fontStyle,a.foreground,a.background):null}},jf=class Cs{constructor(t,i){this.parent=t,this.scopeName=i}static push(t,i){for(const a of i)t=new Cs(t,a);return t}static from(...t){let i=null;for(let a=0;a<t.length;a++)i=new Cs(i,t[a]);return i}push(t){return new Cs(this,t)}getSegments(){let t=this;const i=[];for(;t;)i.push(t.scopeName),t=t.parent;return i.reverse(),i}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const i=[];let a=this;for(;a&&a!==t;)i.push(a.scopeName),a=a.parent;return a===t?i.reverse():void 0}};function wA(e,t){if(t.length===0)return!0;for(let i=0;i<t.length;i++){let a=t[i],o=!1;if(a===">"){if(i===t.length-1)return!1;a=t[++i],o=!0}for(;e&&!kA(e.scopeName,a);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function kA(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Iv=class{constructor(e,t,i){this.fontStyle=e,this.foregroundId=t,this.backgroundId=i}};function AA(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,i=[],a=0;for(let o=0,s=t.length;o<s;o++){let c=t[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"&&S0(c.settings.foreground)&&(p=c.settings.foreground);let g=null;typeof c.settings.background=="string"&&S0(c.settings.background)&&(g=c.settings.background);for(let y=0,v=f.length;y<v;y++){let S=f[y].trim().split(" "),A=S[S.length-1],D=null;S.length>1&&(D=S.slice(0,S.length-1),D.reverse()),i[a++]=new TA(A,D,o,d,p,g)}}return i}var TA=class{constructor(e,t,i,a,o,s){this.scope=e,this.parentScopes=t,this.index=i,this.fontStyle=a,this.foreground=o,this.background=s}},Nt=(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))(Nt||{});function LA(e,t){e.sort((d,p)=>{let g=Dv(d.scope,p.scope);return g!==0||(g=Nv(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 RA(t),c=new Iv(i,s.getId(a),s.getId(o)),f=new NA(new xd(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 Ns(s,c,f)}var RA=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,i=e.length;t<i;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},DA=Object.freeze([]),xd=class zv{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,i,a,o,s){this.scopeDepth=t,this.parentScopes=i||DA,this.fontStyle=a,this.foreground=o,this.background=s}clone(){return new zv(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let i=[];for(let a=0,o=t.length;a<o;a++)i[a]=t[a].clone();return i}acceptOverwrite(t,i,a,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,i!==-1&&(this.fontStyle=i),a!==0&&(this.foreground=a),o!==0&&(this.background=o)}},NA=class Cd{constructor(t,i=[],a={}){this._mainRule=t,this._children=a,this._rulesWithParentScopes=i}_rulesWithParentScopes;static _cmpBySpecificity(t,i){if(t.scopeDepth!==i.scopeDepth)return i.scopeDepth-t.scopeDepth;let a=0,o=0;for(;t.parentScopes[a]===">"&&a++,i.parentScopes[o]===">"&&o++,!(a>=t.parentScopes.length||o>=i.parentScopes.length);){const s=i.parentScopes[o].length-t.parentScopes[a].length;if(s!==0)return s;a++,o++}return i.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let a=t.indexOf("."),o,s;if(a===-1?(o=t,s=""):(o=t.substring(0,a),s=t.substring(a+1)),this._children.hasOwnProperty(o))return this._children[o].match(s)}const i=this._rulesWithParentScopes.concat(this._mainRule);return i.sort(Cd._cmpBySpecificity),i}insert(t,i,a,o,s,c){if(i===""){this._doInsertHere(t,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 Cd(this._mainRule.clone(),xd.cloneArr(this._rulesWithParentScopes)),this._children[d]=g),g.insert(t+1,p,a,o,s,c)}_doInsertHere(t,i,a,o,s){if(i===null){this._mainRule.acceptOverwrite(t,a,o,s);return}for(let c=0,f=this._rulesWithParentScopes.length;c<f;c++){let d=this._rulesWithParentScopes[c];if(Nv(d.parentScopes,i)===0){d.acceptOverwrite(t,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 xd(t,i,a,o,s))}},ga=class dn{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const i=dn.getLanguageId(t),a=dn.getTokenType(t),o=dn.getFontStyle(t),s=dn.getForeground(t),c=dn.getBackground(t);console.log({languageId:i,tokenType:a,fontStyle:o,foreground:s,background:c})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,i,a,o,s,c,f){let d=dn.getLanguageId(t),p=dn.getTokenType(t),g=dn.containsBalancedBrackets(t)?1:0,y=dn.getFontStyle(t),v=dn.getForeground(t),b=dn.getBackground(t);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 Os(e,t){const i=[],a=OA(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(E0(o)){const d=[];do d.push(o),o=a.next();while(E0(o));return p=>t(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 E0(e){return!!e&&!!e.match(/[\w\.:]+/)}function OA(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,i=t.exec(e);return{next:()=>{if(!i)return null;const a=i[0];return i=t.exec(e),a}}}function Uv(e){typeof e.dispose=="function"&&e.dispose()}var Nl=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},MA=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},IA=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},zA=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Nl(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new IA;for(const i of e)UA(i,this.initialScopeName,this.repo,t);for(const i of t.references)if(i instanceof Nl){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 UA(e,t,i,a){const o=i.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=i.lookup(t);e instanceof Nl?ws({baseGrammar:s,selfGrammar:o},a):wd(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 Nl(f))}function wd(e,t,i){if(t.repository&&t.repository[e]){const a=t.repository[e];Ms([a],t,i)}}function ws(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ms(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Ms(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Ms(e,t,i){for(const a of e){if(i.visitedRule.has(a))continue;i.visitedRule.add(a);const o=a.repository?Lv({},t.repository,a.repository):t.repository;Array.isArray(a.patterns)&&Ms(a.patterns,{...t,repository:o},i);const s=a.include;if(!s)continue;const c=Hv(s);switch(c.kind){case 0:ws({...t,selfGrammar:t.baseGrammar},i);break;case 1:ws(t,i);break;case 2:wd(c.ruleName,{...t,repository:o},i);break;case 3:case 4:const f=c.scopeName===t.selfGrammar.scopeName?t.selfGrammar:c.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(f){const d={baseGrammar:t.baseGrammar,selfGrammar:f,repository:o};c.kind===4?wd(c.ruleName,d,i):ws(d,i)}else c.kind===4?i.add(new MA(c.scopeName,c.ruleName)):i.add(new Nl(c.scopeName));break}}}var HA=class{kind=0},PA=class{kind=1},BA=class{constructor(e){this.ruleName=e}kind=2},jA=class{constructor(e){this.scopeName=e}kind=3},VA=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Hv(e){if(e==="$base")return new HA;if(e==="$self")return new PA;const t=e.indexOf("#");if(t===-1)return new jA(e);if(t===0)return new BA(e.substring(1));{const i=e.substring(0,t),a=e.substring(t+1);return new VA(i,a)}}var GA=/\\(\d+)/,x0=/\\(\d+)/g,$A=-1,Pv=-2;var Vl=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,i,a){this.$location=e,this.id=t,this._name=i||null,this._nameIsCapturing=cs.hasCaptures(this._name),this._contentName=a||null,this._contentNameIsCapturing=cs.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Rv(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:cs.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:cs.replaceCaptures(this._contentName,e,t)}},qA=class extends Vl{retokenizeCapturedWithRuleId;constructor(e,t,i,a,o){super(e,t,i,a),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,i,a){throw new Error("Not supported!")}},FA=class extends Vl{_match;captures;_cachedCompiledPatterns;constructor(e,t,i,a,o){super(e,t,i,null),this._match=new Ol(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,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,i,a){return this._getCachedCompiledPatterns(e).compileAG(e,i,a)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ml,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},C0=class extends Vl{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,i,a,o){super(e,t,i,a),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const i of this.patterns)e.getRule(i).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,i,a){return this._getCachedCompiledPatterns(e).compileAG(e,i,a)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ml,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},kd=class extends Vl{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,i,a,o,s,c,f,d,p){super(e,t,i,a),this._begin=new Ol(o,this.id),this.beginCaptures=s,this._end=new Ol(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,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,i,a){return this._getCachedCompiledPatterns(e,t).compileAG(e,i,a)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ml;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,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Is=class extends Vl{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,i,a,o,s,c,f,d){super(e,t,i,a),this._begin=new Ol(o,this.id),this.beginCaptures=s,this.whileCaptures=f,this._while=new Ol(c,Pv),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=d.patterns,this.hasMissingPatterns=d.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,i,a){return this._getCachedCompiledPatterns(e).compileAG(e,i,a)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ml;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,i,a){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,i,a)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Ml,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},Bv=class Dt{static createCaptureRule(t,i,a,o,s){return t.registerRule(c=>new qA(i,c,a,o,s))}static getCompiledRuleId(t,i,a){return t.id||i.registerRule(o=>{if(t.id=o,t.match)return new FA(t.$vscodeTextmateLocation,t.id,t.name,t.match,Dt._compileCaptures(t.captures,i,a));if(typeof t.begin>"u"){t.repository&&(a=Lv({},a,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new C0(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Dt._compilePatterns(s,i,a))}return t.while?new Is(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Dt._compileCaptures(t.beginCaptures||t.captures,i,a),t.while,Dt._compileCaptures(t.whileCaptures||t.captures,i,a),Dt._compilePatterns(t.patterns,i,a)):new kd(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Dt._compileCaptures(t.beginCaptures||t.captures,i,a),t.end,Dt._compileCaptures(t.endCaptures||t.captures,i,a),t.applyEndPatternLast,Dt._compilePatterns(t.patterns,i,a))}),t.id}static _compileCaptures(t,i,a){let o=[];if(t){let s=0;for(const c in t){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 t){if(c==="$vscodeTextmateLocation")continue;const f=parseInt(c,10);let d=0;t[c].patterns&&(d=Dt.getCompiledRuleId(t[c],i,a)),o[f]=Dt.createCaptureRule(i,t[c].$vscodeTextmateLocation,t[c].name,t[c].contentName,d)}}return o}static _compilePatterns(t,i,a){let o=[];if(t)for(let s=0,c=t.length;s<c;s++){const f=t[s];let d=-1;if(f.include){const p=Hv(f.include);switch(p.kind){case 0:case 1:d=Dt.getCompiledRuleId(a[f.include],i,a);break;case 2:let g=a[p.ruleName];g&&(d=Dt.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=Dt.getCompiledRuleId(S,i,b.repository))}else d=Dt.getCompiledRuleId(b.repository.$self,i,b.repository);break}}else d=Dt.getCompiledRuleId(f,i,a);if(d!==-1){const p=i.getRule(d);let g=!1;if((p instanceof C0||p instanceof kd||p instanceof Is)&&p.hasMissingPatterns&&p.patterns.length===0&&(g=!0),g)continue;o.push(d)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Ol=class jv{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,i){if(t&&typeof t=="string"){const a=t.length;let o=0,s=[],c=!1;for(let f=0;f<a;f++)if(t.charAt(f)==="\\"&&f+1<a){const p=t.charAt(f+1);p==="z"?(s.push(t.substring(o,f)),s.push("$(?!\\n)(?<!\\n)"),o=f+2):(p==="A"||p==="G")&&(c=!0),f++}this.hasAnchor=c,o===0?this.source=t:(s.push(t.substring(o,a)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=i,typeof this.source=="string"?this.hasBackReferences=GA.test(this.source):this.hasBackReferences=!1}clone(){return new jv(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,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=>t.substring(o.start,o.end));return x0.lastIndex=0,this.source.replace(x0,(o,s)=>Ov(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 t=[],i=[],a=[],o=[],s,c,f,d;for(s=0,c=this.source.length;s<c;s++)f=this.source.charAt(s),t[s]=f,i[s]=f,a[s]=f,o[s]=f,f==="\\"&&s+1<c&&(d=this.source.charAt(s+1),d==="A"?(t[s+1]="",i[s+1]="",a[s+1]="A",o[s+1]="A"):d==="G"?(t[s+1]="",i[s+1]="G",a[s+1]="",o[s+1]="G"):(t[s+1]=d,i[s+1]=d,a[s+1]=d,o[s+1]=d),s++);return{A0_G0:t.join(""),A0_G1:i.join(""),A1_G0:a.join(""),A1_G1:o.join("")}}resolveAnchors(t,i){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?i?this._anchorCache.A1_G1:this._anchorCache.A1_G0:i?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Ml=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(i=>i.source);this._cached=new w0(e,t,this._items.map(i=>i.ruleId))}return this._cached}compileAG(e,t,i){return this._hasAnchors?t?i?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,i)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,i)),this._anchorCache.A1_G0):i?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,i)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,i)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,i){let a=this._items.map(o=>o.resolveAnchors(t,i));return new w0(e,a,this._items.map(o=>o.ruleId))}},w0=class{constructor(e,t,i){this.regExps=t,this.rules=i,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,i=this.rules.length;t<i;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
24
|
-
`)}findNextMatchSync(e,t,i){const a=this.scanner.findNextMatchSync(e,t,i);return a?{ruleId:this.rules[a.index],captureIndices:a.captureIndices}:null}},Vf=class{constructor(e,t){this.languageId=e,this.tokenType=t}},YA=class Ad{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,i){this._defaultAttributes=new Vf(t,8),this._embeddedLanguagesMatcher=new XA(Object.entries(i||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Ad._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Vf(0,0);_getBasicScopeAttributes=new Mv(t=>{const i=this._scopeToLanguage(t),a=this._toStandardTokenType(t);return new Vf(i,a)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const i=t.match(Ad.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/},XA=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([i,a])=>Ov(i));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},k0=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Vv(e,t,i,a,o,s,c,f){const d=t.content.length;let p=!1,g=-1;if(c){const b=QA(e,t,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 k0(o,!0);v()}return new k0(o,!1);function v(){const b=ZA(e,t,i,a,o,g);if(!b){s.produce(o,d),p=!0;return}const S=b.captureIndices,A=b.matchedRuleId,D=S&&S.length>0?S[0].end>a:!1;if(A===$A){const x=o.getRule(e);s.produce(o,S[0].start),o=o.withContentNameScopesList(o.nameScopesList),wl(e,t,i,o,s,x.endCaptures,S),s.produce(o,S[0].end);const T=o;if(o=o.parent,g=T.getAnchorPos(),!D&&T.getEnterPos()===a){o=T,s.produce(o,d),p=!0;return}}else{const x=e.getRule(A);s.produce(o,S[0].start);const T=o,k=x.getName(t.content,S),I=o.contentNameScopesList.pushAttributed(k,e);if(o=o.push(A,a,g,S[0].end===d,null,I,I),x instanceof kd){const z=x;wl(e,t,i,o,s,z.beginCaptures,S),s.produce(o,S[0].end),g=S[0].end;const R=z.getContentName(t.content,S),P=I.pushAttributed(R,e);if(o=o.withContentNameScopesList(P),z.endHasBackReferences&&(o=o.withEndRule(z.getEndWithResolvedBackReferences(t.content,S))),!D&&T.hasSameRuleAs(o)){o=o.pop(),s.produce(o,d),p=!0;return}}else if(x instanceof Is){const z=x;wl(e,t,i,o,s,z.beginCaptures,S),s.produce(o,S[0].end),g=S[0].end;const R=z.getContentName(t.content,S),P=I.pushAttributed(R,e);if(o=o.withContentNameScopesList(P),z.whileHasBackReferences&&(o=o.withEndRule(z.getWhileWithResolvedBackReferences(t.content,S))),!D&&T.hasSameRuleAs(o)){o=o.pop(),s.produce(o,d),p=!0;return}}else if(wl(e,t,i,o,s,x.captures,S),s.produce(o,S[0].end),o=o.pop(),!D){o=o.safePop(),s.produce(o,d),p=!0;return}}S[0].end>a&&(a=S[0].end,i=!1)}}function QA(e,t,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 Is&&f.push({rule:p,stack:d})}for(let d=f.pop();d;d=f.pop()){const{ruleScanner:p,findOptions:g}=JA(d.rule,e,d.stack.endRule,i,a===c),y=p.findNextMatchSync(t,a,g);if(y){if(y.ruleId!==Pv){o=d.stack.pop();break}y.captureIndices&&y.captureIndices.length&&(s.produce(d.stack,y.captureIndices[0].start),wl(e,t,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 ZA(e,t,i,a,o,s){const c=KA(e,t,i,a,o,s),f=e.getInjections();if(f.length===0)return c;const d=WA(f,e,t,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 KA(e,t,i,a,o,s){const c=o.getRule(e),{ruleScanner:f,findOptions:d}=Gv(c,e,o.endRule,i,a===s),p=f.findNextMatchSync(t,a,d);return p?{captureIndices:p.captureIndices,matchedRuleId:p.ruleId}:null}function WA(e,t,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 A=t.getRule(S.ruleId),{ruleScanner:D,findOptions:x}=Gv(A,t,null,a,o===c),T=D.findNextMatchSync(i,o,x);if(!T)continue;const k=T.captureIndices[0].start;if(!(k>=f)&&(f=k,d=T.captureIndices,p=T.ruleId,g=S.priority,f===o))break}return d?{priorityMatch:g===-1,captureIndices:d,matchedRuleId:p}:null}function Gv(e,t,i,a,o){return{ruleScanner:e.compileAG(t,i,a,o),findOptions:0}}function JA(e,t,i,a,o){return{ruleScanner:e.compileWhileAG(t,i,a,o),findOptions:0}}function wl(e,t,i,a,o,s,c){if(s.length===0)return;const f=t.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 A=v.getName(f,c),D=a.contentNameScopesList.pushAttributed(A,e),x=v.getContentName(f,c),T=D.pushAttributed(x,e),k=a.push(v.retokenizeCapturedWithRuleId,b.start,-1,!1,null,D,T),I=e.createOnigString(f.substring(0,b.end));Vv(e,I,i&&b.start===0,b.start,k,o,!1,0),Uv(I);continue}const S=v.getName(f,c);if(S!==null){const D=(p.length>0?p[p.length-1].scopes:a.contentNameScopesList).pushAttributed(S,e);p.push(new eT(D,b.end))}}for(;p.length>0;)o.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop()}var eT=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function tT(e,t,i,a,o,s,c,f){return new iT(e,t,i,a,o,s,c,f)}function A0(e,t,i,a,o){const s=Os(t,zs),c=Bv.getCompiledRuleId(i,a,o.repository);for(const f of s)e.push({debugSelector:t,matcher:f.matcher,ruleId:c,grammar:o,priority:f.priority})}function zs(e,t){if(t.length<e.length)return!1;let i=0;return e.every(a=>{for(let o=i;o<t.length;o++)if(nT(t[o],a))return i=o+1,!0;return!1})}function nT(e,t){if(!e)return!1;if(e===t)return!0;const i=t.length;return e.length>i&&e.substr(0,i)===t&&e[i]==="."}var iT=class{constructor(e,t,i,a,o,s,c,f){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=f,this._basicScopeAttributesProvider=new YA(i,a),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=c,this._grammar=T0(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const d of Object.keys(o)){const p=Os(d,zs);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)},t=[],i=this._rootScopeName,a=e.lookup(i);if(a){const o=a.injections;if(o)for(let c in o)A0(t,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&&A0(t,d,f,this,f)}})}return t.sort((o,s)=>o.priority-s.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,i=e(t);return this._ruleId2desc[t]=i,i}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const i=this._grammarRepository.lookup(e);if(i)return this._includedGrammars[e]=T0(i,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,i=0){const a=this._tokenize(e,t,!1,i);return{tokens:a.lineTokens.getResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}tokenizeLine2(e,t,i=0){const a=this._tokenize(e,t,!0,i);return{tokens:a.lineTokens.getBinaryResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}_tokenize(e,t,i,a){this._rootId===-1&&(this._rootId=Bv.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===Td.NULL){o=!0;const p=this._basicScopeAttributesProvider.getDefaultAttributes(),g=this.themeProvider.getDefaults(),y=ga.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=Ll.createRootAndLookUpScopeName(v,y,this):b=Ll.createRoot("unknown",y),t=new Td(null,this._rootId,-1,-1,!1,null,b,b)}else o=!1,t.reset();e=e+`
|
|
25
|
-
`;const s=this.createOnigString(e),c=s.content.length,f=new aT(i,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=Vv(this,s,o,0,t,f,!0,a);return Uv(s),{lineLength:c,lineTokens:f,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function T0(e,t){return e=EA(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Ll=class Dn{constructor(t,i,a){this.parent=t,this.scopePath=i,this.tokenAttributes=a}static fromExtension(t,i){let a=t,o=t?.scopePath??null;for(const s of i)o=jf.push(o,s.scopeNames),a=new Dn(a,o,s.encodedTokenAttributes);return a}static createRoot(t,i){return new Dn(null,new jf(null,t),i)}static createRootAndLookUpScopeName(t,i,a){const o=a.getMetadataForScope(t),s=new jf(null,t),c=a.themeProvider.themeMatch(s),f=Dn.mergeAttributes(i,o,c);return new Dn(null,s,f)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Dn.equals(this,t)}static equals(t,i){do{if(t===i||!t&&!i)return!0;if(!t||!i||t.scopeName!==i.scopeName||t.tokenAttributes!==i.tokenAttributes)return!1;t=t.parent,i=i.parent}while(!0)}static mergeAttributes(t,i,a){let o=-1,s=0,c=0;return a!==null&&(o=a.fontStyle,s=a.foregroundId,c=a.backgroundId),ga.set(t,i.languageId,i.tokenType,null,o,s,c)}pushAttributed(t,i){if(t===null)return this;if(t.indexOf(" ")===-1)return Dn._pushAttributed(this,t,i);const a=t.split(/ /g);let o=this;for(const s of a)o=Dn._pushAttributed(o,s,i);return o}static _pushAttributed(t,i,a){const o=a.getMetadataForScope(i),s=t.scopePath.push(i),c=a.themeProvider.themeMatch(s),f=Dn.mergeAttributes(t.tokenAttributes,o,c);return new Dn(t,s,f)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const i=[];let a=this;for(;a&&a!==t;)i.push({encodedTokenAttributes:a.tokenAttributes,scopeNames:a.scopePath.getExtensionIfDefined(a.parent?.scopePath??null)}),a=a.parent;return a===t?i.reverse():void 0}},Td=class sr{constructor(t,i,a,o,s,c,f,d){this.parent=t,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 sr(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:sr._equals(this,t)}static _equals(t,i){return t===i?!0:this._structuralEquals(t,i)?Ll.equals(t.contentNameScopesList,i.contentNameScopesList):!1}static _structuralEquals(t,i){do{if(t===i||!t&&!i)return!0;if(!t||!i||t.depth!==i.depth||t.ruleId!==i.ruleId||t.endRule!==i.endRule)return!1;t=t.parent,i=i.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){sr._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,i,a,o,s,c,f){return new sr(this,t,i,a,o,s,c,f)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,i){return this.parent&&(i=this.parent._writeString(t,i)),t[i++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,i}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new sr(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let i=this;for(;i&&i._enterPos===t._enterPos;){if(i.ruleId===t.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(t,i){const a=Ll.fromExtension(t?.nameScopesList??null,i.nameScopesList);return new sr(t,i.ruleId,i.enterPos??-1,i.anchorPos??-1,i.beginRuleCapturedEOL,i.endRule,a,Ll.fromExtension(a,i.contentNameScopesList))}},rT=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(i=>i==="*"?(this.allowAny=!0,[]):Os(i,zs).map(a=>a.matcher)),this.unbalancedBracketScopes=t.flatMap(i=>Os(i,zs).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 t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},aT=class{constructor(e,t,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,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)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=ga.set(a,0,c.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(a=ga.set(a,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===a){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(a),this._lastTokenEndIndex=t;return}const i=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:i}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const i=new Uint32Array(this._binaryTokens.length);for(let a=0,o=this._binaryTokens.length;a<o;a++)i[a]=this._binaryTokens[a];return i}},lT=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,i,a,o){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,tT(e,s,t,i,a,o,this,this._onigLib))}return this._grammars.get(e)}},oT=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new lT(Ns.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,i){this._syncRegistry.setTheme(Ns.createFromRawTheme(t,i))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,i,a){return this.loadGrammarWithConfiguration(t,i,{embeddedLanguages:a})}loadGrammarWithConfiguration(t,i,a){return this._loadGrammar(t,i,a.embeddedLanguages,a.tokenTypes,new rT(a.balancedBracketSelectors||[],a.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,i,a,o,s){const c=new zA(this._syncRegistry,t);for(;c.Q.length>0;)c.Q.map(f=>this._loadSingleGrammar(f.scopeName)),c.processQueue();return this._grammarForScopeName(t,i,a,o,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const i=this._options.loadGrammar(t);if(i){const a=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(i,a)}}addGrammar(t,i=[],a=0,o=null){return this._syncRegistry.addGrammar(t,i),this._grammarForScopeName(t.scopeName,a,o)}_grammarForScopeName(t,i=0,a=null,o=null,s=null){return this._syncRegistry.grammarForScopeName(t,i,a,o,s)}},Ld=Td.NULL;const sT=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],L0={}.hasOwnProperty;function uT(e,t){const i=t||{};function a(o,...s){let c=a.invalid;const f=a.handlers;if(o&&L0.call(o,e)){const d=String(o[e]);c=L0.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 cT=/["&'<>`]/g,fT=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,dT=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,hT=/[|\\{}()[\]^$+*?.]/g,R0=new WeakMap;function pT(e,t){if(e=e.replace(t.subset?mT(t.subset):cT,a),t.subset||t.escapeOnly)return e;return e.replace(fT,i).replace(dT,a);function i(o,s,c){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,c.charCodeAt(s+2),t)}function a(o,s,c){return t.format(o.charCodeAt(0),c.charCodeAt(s+1),t)}}function mT(e){let t=R0.get(e);return t||(t=gT(e),R0.set(e,t)),t}function gT(e){const t=[];let i=-1;for(;++i<e.length;)t.push(e[i].replace(hT,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const yT=/[\dA-Fa-f]/;function bT(e,t,i){const a="&#x"+e.toString(16).toUpperCase();return i&&t&&!yT.test(String.fromCharCode(t))?a:a+";"}const vT=/\d/;function _T(e,t,i){const a="&#"+String(e);return i&&t&&!vT.test(String.fromCharCode(t))?a:a+";"}const ST=["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"],Gf={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:"€"},ET=["cent","copy","divide","gt","lt","not","para","times"],$v={}.hasOwnProperty,Rd={};let fs;for(fs in Gf)$v.call(Gf,fs)&&(Rd[Gf[fs]]=fs);const xT=/[^\dA-Za-z]/;function CT(e,t,i,a){const o=String.fromCharCode(e);if($v.call(Rd,o)){const s=Rd[o],c="&"+s;return i&&ST.includes(s)&&!ET.includes(s)&&(!a||t&&t!==61&&xT.test(String.fromCharCode(t)))?c:c+";"}return""}function wT(e,t,i){let a=bT(e,t,i.omitOptionalSemicolons),o;if((i.useNamedReferences||i.useShortestReferences)&&(o=CT(e,t,i.omitOptionalSemicolons,i.attribute)),(i.useShortestReferences||!o)&&i.useShortestReferences){const s=_T(e,t,i.omitOptionalSemicolons);s.length<a.length&&(a=s)}return o&&(!i.useShortestReferences||o.length<a.length)?o:a}function ha(e,t){return pT(e,Object.assign({format:wT},t))}const kT=/^>|^->|<!--|-->|--!>|<!-$/g,AT=[">"],TT=["<",">"];function LT(e,t,i,a){return a.settings.bogusComments?"<?"+ha(e.value,Object.assign({},a.settings.characterReferences,{subset:AT}))+">":"<!--"+e.value.replace(kT,o)+"-->";function o(s){return ha(s,Object.assign({},a.settings.characterReferences,{subset:TT}))}}function RT(e,t,i,a){return"<!"+(a.settings.upperDoctype?"DOCTYPE":"doctype")+(a.settings.tightDoctype?"":" ")+"html>"}function D0(e,t){const i=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,o=i.indexOf(t);for(;o!==-1;)a++,o=i.indexOf(t,o+t.length);return a}const bt=Fv(1),qv=Fv(-1),DT=[];function Fv(e){return t;function t(i,a,o){const s=i?i.children:DT;let c=(a||0)+e,f=s[c];if(!o)for(;f&&Fs(f);)c+=e,f=s[c];return f}}const NT={}.hasOwnProperty;function Yv(e){return t;function t(i,a,o){return NT.call(e,i.tagName)&&e[i.tagName](i,a,o)}}const oh=Yv({body:MT,caption:$f,colgroup:$f,dd:HT,dt:UT,head:$f,html:OT,li:zT,optgroup:PT,option:BT,p:IT,rp:N0,rt:N0,tbody:VT,td:O0,tfoot:GT,th:O0,thead:jT,tr:$T});function $f(e,t,i){const a=bt(i,t,!0);return!a||a.type!=="comment"&&!(a.type==="text"&&Fs(a.value.charAt(0)))}function OT(e,t,i){const a=bt(i,t);return!a||a.type!=="comment"}function MT(e,t,i){const a=bt(i,t);return!a||a.type!=="comment"}function IT(e,t,i){const a=bt(i,t);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 zT(e,t,i){const a=bt(i,t);return!a||a.type==="element"&&a.tagName==="li"}function UT(e,t,i){const a=bt(i,t);return!!(a&&a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd"))}function HT(e,t,i){const a=bt(i,t);return!a||a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd")}function N0(e,t,i){const a=bt(i,t);return!a||a.type==="element"&&(a.tagName==="rp"||a.tagName==="rt")}function PT(e,t,i){const a=bt(i,t);return!a||a.type==="element"&&a.tagName==="optgroup"}function BT(e,t,i){const a=bt(i,t);return!a||a.type==="element"&&(a.tagName==="option"||a.tagName==="optgroup")}function jT(e,t,i){const a=bt(i,t);return!!(a&&a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot"))}function VT(e,t,i){const a=bt(i,t);return!a||a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot")}function GT(e,t,i){return!bt(i,t)}function $T(e,t,i){const a=bt(i,t);return!a||a.type==="element"&&a.tagName==="tr"}function O0(e,t,i){const a=bt(i,t);return!a||a.type==="element"&&(a.tagName==="td"||a.tagName==="th")}const qT=Yv({body:XT,colgroup:QT,head:YT,html:FT,tbody:ZT});function FT(e){const t=bt(e,-1);return!t||t.type!=="comment"}function YT(e){const t=new Set;for(const a of e.children)if(a.type==="element"&&(a.tagName==="base"||a.tagName==="title")){if(t.has(a.tagName))return!1;t.add(a.tagName)}const i=e.children[0];return!i||i.type==="element"}function XT(e){const t=bt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Fs(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function QT(e,t,i){const a=qv(i,t),o=bt(e,-1,!0);return i&&a&&a.type==="element"&&a.tagName==="colgroup"&&oh(a,i.children.indexOf(a),i)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function ZT(e,t,i){const a=qv(i,t),o=bt(e,-1);return i&&a&&a.type==="element"&&(a.tagName==="thead"||a.tagName==="tbody")&&oh(a,i.children.indexOf(a),i)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const ds={name:[[`
|
|
26
|
-
\f\r &/=>`.split(""),`
|
|
27
|
-
\f\r "&'/=>\``.split("")],[`\0
|
|
28
|
-
\f\r "&'/<=>`.split(""),`\0
|
|
29
|
-
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
30
|
-
\f\r &>`.split(""),`\0
|
|
31
|
-
\f\r "&'<=>\``.split("")],[`\0
|
|
32
|
-
\f\r "&'<=>\``.split(""),`\0
|
|
33
|
-
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function KT(e,t,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=Bl);const p=WT(a,e.properties),g=a.all(o.space==="html"&&e.tagName==="template"?e.content:e);return a.schema=o,g&&(c=!1),(p||!s||!qT(e,t,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||!oh(e,t,i))&&f.push("</"+e.tagName+">"),f.join("")}function WT(e,t){const i=[];let a=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const s=JT(e,o,t[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 JT(e,t,i){const a=Wb(e.schema,t),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=ha(a.attribute,Object.assign({},e.settings.characterReferences,{subset:ds.name[o][s]}));return i===!0||(i=Array.isArray(i)?(a.commaSeparated?$b:ev)(i,{padLeft:!e.settings.tightCommaSeparatedLists}):String(i),e.settings.collapseEmptyAttributes&&!i)?d:(e.settings.preferUnquoted&&(f=ha(i,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:ds.unquoted[o][s]}))),f!==i&&(e.settings.quoteSmart&&D0(i,c)>D0(i,e.alternative)&&(c=e.alternative),f=c+ha(i,Object.assign({},e.settings.characterReferences,{subset:(c==="'"?ds.single:ds.double)[o][s],attribute:!0}))+c),d+(f&&"="+f))}const e2=["<","&"];function Xv(e,t,i,a){return i&&i.type==="element"&&(i.tagName==="script"||i.tagName==="style")?e.value:ha(e.value,Object.assign({},a.settings.characterReferences,{subset:e2}))}function t2(e,t,i,a){return a.settings.allowDangerousHtml?e.value:Xv(e,t,i,a)}function n2(e,t,i,a){return a.all(e)}const i2=uT("type",{invalid:r2,unknown:a2,handlers:{comment:LT,doctype:RT,element:KT,raw:t2,root:n2,text:Xv}});function r2(e){throw new Error("Expected node, not `"+e+"`")}function a2(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const l2={},o2={},s2=[];function pa(e,t){const i=t||l2,a=i.quote||'"',o=a==='"'?"'":'"';if(a!=='"'&&a!=="'")throw new Error("Invalid quote `"+a+"`, expected `'` or `\"`");return{one:u2,all:c2,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||sT,characterReferences:i.characterReferences||o2,closeSelfClosing:i.closeSelfClosing||!1,closeEmptyElements:i.closeEmptyElements||!1},schema:i.space==="svg"?Bl:Jb,quote:a,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function u2(e,t,i){return i2(e,t,i,this)}function c2(e){const t=[],i=e&&e.children||s2;let a=-1;for(;++a<i.length;)t[a]=this.one(i[a],a,e);return t.join("")}function Us(e,t){const i=typeof e=="string"?{}:{...e.colorReplacements},a=typeof e=="string"?e:e.name;for(const[o,s]of Object.entries(t?.colorReplacements||{}))typeof s=="string"?i[o]=s:o===a&&Object.assign(i,s);return i}function ji(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function f2(e){return Array.isArray(e)?e:[e]}async function Qv(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function sh(e){return!e||["plaintext","txt","text","plain"].includes(e)}function Zv(e){return e==="ansi"||sh(e)}function uh(e){return e==="none"}function Kv(e){return uh(e)}function Wv(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const i=Array.isArray(t)?t:t.split(/\s+/g);for(const a of i)a&&!e.properties.class.includes(a)&&e.properties.class.push(a);return e}function Zs(e,t=!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=t?i[s]+(i[s+1]||""):i[s];o.push([c,a]),a+=i[s].length,a+=i[s+1]?.length||0}return o}function d2(e){const t=Zs(e,!0).map(([o])=>o);function i(o){if(o===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=o,c=0;for(const f of t){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+=t[f].length;return c+=s,c}return{lines:t,indexToPos:i,posToIndex:a}}function h2(e,t,i){const a=new Set;for(const s of e.matchAll(/:?lang=["']([^"']+)["']/g)){const c=s[1].toLowerCase().trim();c&&a.add(c)}for(const s of e.matchAll(/(?:```|~~~)([\w-]+)/g)){const c=s[1].toLowerCase().trim();c&&a.add(c)}for(const s of e.matchAll(/\\begin\{([\w-]+)\}/g)){const c=s[1].toLowerCase().trim();c&&a.add(c)}for(const s of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const c=s[1].toLowerCase().trim(),f=c.includes("/")?c.split("/").pop():c;f&&a.add(f)}if(!i)return Array.from(a);const o=i.getBundledLanguages();return Array.from(a).filter(s=>s&&o[s])}const ch="light-dark()",p2=["color","background-color"];function m2(e,t){let i=0;const a=[];for(const o of t)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 g2(e,t){const i=Array.from(t instanceof Set?t:new Set(t)).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?m2(o,s):o})):e}function y2(e,t,i,a,o="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},c=t.map(g=>Hs(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+t[g]+(y==="color"?"":v)};return c.forEach((g,y)=>{for(const v of f){const b=g[v]||"inherit";if(y===0&&a&&p2.includes(v))if(a===ch&&c.length>1){const S=t.findIndex(T=>T==="light"),A=t.findIndex(T=>T==="dark");if(S===-1||A===-1)throw new pt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const D=c[S][v]||"inherit",x=c[A][v]||"inherit";d[v]=`light-dark(${D}, ${x})`,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 Hs(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Nt.Italic&&(t["font-style"]="italic"),e.fontStyle&Nt.Bold&&(t["font-weight"]="bold");const i=[];e.fontStyle&Nt.Underline&&i.push("underline"),e.fontStyle&Nt.Strikethrough&&i.push("line-through"),i.length&&(t["text-decoration"]=i.join(" "))}return t}function Dd(e){return typeof e=="string"?e:Object.entries(e).map(([t,i])=>`${t}:${i}`).join(";")}const Jv=new WeakMap;function Ks(e,t){Jv.set(e,t)}function Il(e){return Jv.get(e)}class Sa{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,i){return new Sa(Object.fromEntries(f2(i).map(a=>[a,Ld])),t)}constructor(...t){if(t.length===2){const[i,a]=t;this.lang=a,this._stacks=i}else{const[i,a,o]=t;this.lang=a,this._stacks={[o]:i}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return b2(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function b2(e){const t=[],i=new Set;function a(o){if(i.has(o))return;i.add(o);const s=o?.nameScopesList?.scopeName;s&&t.push(s),o.parent&&a(o.parent)}return a(e),t}function v2(e,t){if(!(e instanceof Sa))throw new pt("Invalid grammar state");return e.getInternalStack(t)}function _2(){const e=new WeakMap;function t(i){if(!e.has(i.meta)){let a=function(c){if(typeof c=="number"){if(c<0||c>i.source.length)throw new pt(`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 pt(`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 pt(`Invalid decoration position ${JSON.stringify(c)}. Line ${c.line} length: ${f.length}`);return{...c,character:d,offset:o.posToIndex(c.line,d)}}};const o=d2(i.source),s=(i.options.decorations||[]).map(c=>({...c,start:a(c.start),end:a(c.end)}));S2(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=t(this).decorations.flatMap(c=>[c.start.offset,c.end.offset]);return g2(i,o)},code(i){if(!this.options.decorations?.length)return;const a=t(this),o=Array.from(i.children).filter(g=>g.type==="element"&&g.tagName==="span");if(o.length!==a.converter.lines.length)throw new pt(`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 A="",D=-1,x=-1;if(y===0&&(D=0),v===0&&(x=0),v===Number.POSITIVE_INFINITY&&(x=S.children.length),D===-1||x===-1)for(let k=0;k<S.children.length;k++)A+=e1(S.children[k]),D===-1&&A.length===y&&(D=k+1),x===-1&&A.length===v&&(x=k+1);if(D===-1)throw new pt(`Failed to find start index for decoration ${JSON.stringify(b.start)}`);if(x===-1)throw new pt(`Failed to find end index for decoration ${JSON.stringify(b.end)}`);const T=S.children.slice(D,x);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 k={type:"element",tagName:"span",properties:{},children:T};f(k,b,"wrapper"),S.children.splice(D,T.length,k)}}function c(g,y){o[g]=f(o[g],y,"line")}function f(g,y,v){const b=y.properties||{},S=y.transform||(A=>A);return g.tagName=y.tagName||"span",g.properties={...g.properties,...b,class:g.properties.class},y.properties?.class&&Wv(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 S2(e){for(let t=0;t<e.length;t++){const i=e[t];if(i.start.offset>i.end.offset)throw new pt(`Invalid decoration range: ${JSON.stringify(i.start)} - ${JSON.stringify(i.end)}`);for(let a=t+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 pt(`Decorations ${JSON.stringify(i.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function e1(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(e1).join(""):""}const E2=[_2()];function Ps(e){const t=x2(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...E2]}function x2(e){const t=[],i=[],a=[];for(const o of e)switch(o.enforce){case"pre":t.push(o);break;case"post":i.push(o);break;default:a.push(o)}return{pre:t,post:i,normal:a}}var cr=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],qf={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function C2(e,t){const i=e.indexOf("\x1B",t);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 M0(e){const t=e.shift();if(t==="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(t==="5"){const i=e.shift();if(i)return{type:"table",index:Number(i)}}}function w2(e){const t=[];for(;e.length>0;){const i=e.shift();if(!i)continue;const a=Number.parseInt(i);if(!Number.isNaN(a))if(a===0)t.push({type:"resetAll"});else if(a<=9)qf[a]&&t.push({type:"setDecoration",value:qf[a]});else if(a<=29){const o=qf[a-20];o&&(t.push({type:"resetDecoration",value:o}),o==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(a<=37)t.push({type:"setForegroundColor",value:{type:"named",name:cr[a-30]}});else if(a===38){const o=M0(e);o&&t.push({type:"setForegroundColor",value:o})}else if(a===39)t.push({type:"resetForegroundColor"});else if(a<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:cr[a-40]}});else if(a===48){const o=M0(e);o&&t.push({type:"setBackgroundColor",value:o})}else a===49?t.push({type:"resetBackgroundColor"}):a===53?t.push({type:"setDecoration",value:"overline"}):a===55?t.push({type:"resetDecoration",value:"overline"}):a>=90&&a<=97?t.push({type:"setForegroundColor",value:{type:"named",name:cr[a-90+8]}}):a>=100&&a<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:cr[a-100+8]}})}return t}function k2(){let e=null,t=null,i=new Set;return{parse(a){const o=[];let s=0;do{const c=C2(a,s),f=c.sequence?a.substring(s,c.startPosition):a.substring(s);if(f.length>0&&o.push({value:f,foreground:e,background:t,decorations:new Set(i)}),c.sequence){const d=w2(c.sequence);for(const p of d)p.type==="resetAll"?(e=null,t=null,i.clear()):p.type==="resetForegroundColor"?e=null:p.type==="resetBackgroundColor"?t=null:p.type==="resetDecoration"&&i.delete(p.value);for(const p of d)p.type==="setForegroundColor"?e=p.value:p.type==="setBackgroundColor"?t=p.value:p.type==="setDecoration"&&i.add(p.value)}s=c.position}while(s<a.length);return o}}}var A2={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 T2(e=A2){function t(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<cr.length;p++)a.push(t(cr[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 t(f.name);case"rgb":return i(f.rgb);case"table":return s(f.index)}}return{value:c}}const L2={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 R2(e,t,i){const a=Us(e,i),o=Zs(t),s=Object.fromEntries(cr.map(d=>{const p=`terminal.ansi${d[0].toUpperCase()}${d.substring(1)}`,g=e.colors?.[p];return[d,g||L2[d]]})),c=T2(s),f=k2();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=ji(g,a),y=ji(y,a),p.decorations.has("dim")&&(g=D2(g));let v=Nt.None;return p.decorations.has("bold")&&(v|=Nt.Bold),p.decorations.has("italic")&&(v|=Nt.Italic),p.decorations.has("underline")&&(v|=Nt.Underline),p.decorations.has("strikethrough")&&(v|=Nt.Strikethrough),{content:p.value,offset:d[1],color:g,bgColor:y,fontStyle:v}}))}function D2(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const a=t[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 fh(e,t,i={}){const{theme:a=e.getLoadedThemes()[0]}=i,o=e.resolveLangAlias(i.lang||"text");if(sh(o)||uh(a))return Zs(t).map(d=>[{content:d[0],offset:d[1]}]);const{theme:s,colorMap:c}=e.setTheme(a);if(o==="ansi")return R2(s,t,i);const f=e.getLanguage(i.lang||"text");if(i.grammarState){if(i.grammarState.lang!==f.name)throw new pt(`Grammar state language "${i.grammarState.lang}" does not match highlight language "${f.name}"`);if(!i.grammarState.themes.includes(s.name))throw new pt(`Grammar state themes "${i.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return O2(t,f,s,c,i)}function N2(...e){if(e.length===2)return Il(e[1]);const[t,i,a={}]=e,{lang:o="text",theme:s=t.getLoadedThemes()[0]}=a;if(sh(o)||uh(s))throw new pt("Plain language does not have grammar state");if(o==="ansi")throw new pt("ANSI language does not have grammar state");const{theme:c,colorMap:f}=t.setTheme(s),d=t.getLanguage(o);return new Sa(dh(i,d,c,f,a).stateStack,d.name,c.name)}function O2(e,t,i,a,o){const s=dh(e,t,i,a,o),c=new Sa(s.stateStack,t.name,i.name);return Ks(s.tokens,c),s.tokens}function dh(e,t,i,a,o){const s=Us(i,o),{tokenizeMaxLineLength:c=0,tokenizeTimeLimit:f=500}=o,d=Zs(e);let p=o.grammarState?v2(o.grammarState,i.name)??Ld:o.grammarContextCode!=null?dh(o.grammarContextCode,t,i,a,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ld,g=[];const y=[];for(let v=0,b=d.length;v<b;v++){const[S,A]=d[v];if(S===""){g=[],y.push([]);continue}if(c>0&&S.length>=c){g=[],y.push([{content:S,offset:A,color:"",fontStyle:0}]);continue}let D,x,T;o.includeExplanation&&(D=t.tokenizeLine(S,p,f),x=D.tokens,T=0);const k=t.tokenizeLine2(S,p,f),I=k.tokens.length/2;for(let z=0;z<I;z++){const R=k.tokens[2*z],P=z+1<I?k.tokens[2*z+2]:S.length;if(R===P)continue;const G=k.tokens[2*z+1],ee=ji(a[ga.getForeground(G)],s),ae=ga.getFontStyle(G),ne={content:S.substring(R,P),offset:A+R,color:ee,fontStyle:ae};if(o.includeExplanation){const W=[];if(o.includeExplanation!=="scopeName")for(const ie of i.settings){let te;switch(typeof ie.scope){case"string":te=ie.scope.split(/,/).map(B=>B.trim());break;case"object":te=ie.scope;break;default:continue}W.push({settings:ie,selectors:te.map(B=>B.split(/ /))})}ne.explanation=[];let fe=0;for(;R+fe<P;){const ie=x[T],te=S.substring(ie.startIndex,ie.endIndex);fe+=te.length,ne.explanation.push({content:te,scopes:o.includeExplanation==="scopeName"?M2(ie.scopes):I2(W,ie.scopes)}),T+=1}}g.push(ne)}y.push(g),g=[],p=k.ruleStack}return{tokens:y,stateStack:p}}function M2(e){return e.map(t=>({scopeName:t}))}function I2(e,t){const i=[];for(let a=0,o=t.length;a<o;a++){const s=t[a];i[a]={scopeName:s,themeMatches:U2(e,s,t.slice(0,a))}}return i}function I0(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function z2(e,t,i){if(!I0(e[e.length-1],t))return!1;let a=e.length-2,o=i.length-1;for(;a>=0&&o>=0;)I0(e[a],i[o])&&(a-=1),o-=1;return a===-1}function U2(e,t,i){const a=[];for(const{selectors:o,settings:s}of e)for(const c of o)if(z2(c,t,i)){a.push(s);break}return a}function t1(e,t,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=fh(e,t,{...i,theme:d.theme}),g=Il(p),y=typeof d.theme=="string"?d.theme:d.theme.name;return{tokens:p,state:g,theme:y}}),s=H2(...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:A,explanation:D,offset:x,...T}=b[p][y];v.variants[a[S].color]=T}),v})),f=o[0].state?new Sa(Object.fromEntries(o.map(d=>[d.theme,d.state?.getInternalStack(d.theme)])),o[0].state.lang):void 0;return f&&Ks(c,f),c}function H2(...e){const t=e.map(()=>[]),i=e.length;for(let a=0;a<e[0].length;a++){const o=e.map(d=>d[a]),s=t.map(()=>[]);t.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 t}function Bs(e,t,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(x=>x[1]).map(x=>({color:x[0],theme:x[1]})).sort((x,T)=>x.color===p?-1:T.color===p?1:0);if(v.length===0)throw new pt("`themes` option must not be empty");const b=t1(e,t,i);if(d=Il(b),p&&ch!==p&&!v.find(x=>x.color===p))throw new pt(`\`themes\` option must contain the defaultColor key \`${p}\``);const S=v.map(x=>e.getTheme(x.theme)),A=v.map(x=>x.color);s=b.map(x=>x.map(T=>y2(T,A,g,p,y))),d&&Ks(s,d);const D=v.map(x=>Us(x.theme,i));o=z0(v,S,D,g,p,"fg",y),a=z0(v,S,D,g,p,"bg",y),c=`shiki-themes ${S.map(x=>x.name).join(" ")}`,f=p?void 0:[o,a].join(";")}else if("theme"in i){const p=Us(i.theme,i);s=fh(e,t,i);const g=e.getTheme(i.theme);a=ji(g.bg,p),o=ji(g.fg,p),c=g.name,d=Il(s)}else throw new pt("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:o,bg:a,themeName:c,rootStyle:f,grammarState:d}}function z0(e,t,i,a,o,s,c){return e.map((f,d)=>{const p=ji(t[d][s],i[d])||"inherit",g=`${a+f.color}${s==="bg"?"-bg":""}:${p}`;if(d===0&&o){if(o===ch&&e.length>1){const y=e.findIndex(A=>A.color==="light"),v=e.findIndex(A=>A.color==="dark");if(y===-1||v===-1)throw new pt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const b=ji(t[y][s],i[y])||"inherit",S=ji(t[v][s],i[v])||"inherit";return`light-dark(${b}, ${S});${g}`}return p}return c==="css-vars"?g:null}).filter(f=>!!f).join(";")}function js(e,t,i,a={meta:{},options:i,codeToHast:(o,s)=>js(e,o,s),codeToTokens:(o,s)=>Bs(e,o,s)}){let o=t;for(const S of Ps(i))o=S.preprocess?.call(a,o,i)||o;let{tokens:s,fg:c,bg:f,themeName:d,rootStyle:p,grammarState:g}=Bs(e,o,i);const{mergeWhitespaces:y=!0,mergeSameStyleTokens:v=!1}=i;y===!0?s=B2(s):y==="never"&&(s=j2(s)),v&&(s=V2(s));const b={...a,get source(){return o}};for(const S of Ps(i))s=S.tokens?.call(b,s)||s;return P2(s,{...i,fg:c,bg:f,themeName:d,rootStyle:i.rootStyle===!1?!1:i.rootStyle??p},b,g)}function P2(e,t,i,a=Il(e)){const o=Ps(t),s=[],c={type:"root",children:[]},{structure:f="classic",tabindex:d="0"}=t,p={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?p.style=t.rootStyle:p.style=`background-color:${t.bg};color:${t.fg}`),d!==!1&&d!=null&&(p.tabindex=d.toString());for(const[A,D]of Object.entries(t.meta||{}))A.startsWith("_")||(p[A]=D);let g={type:"element",tagName:"pre",properties:p,children:[],data:t.data},y={type:"element",tagName:"code",properties:{},children:s};const v=[],b={...i,structure:f,addClassToHast:Wv,get source(){return i.source},get tokens(){return e},get options(){return t},get root(){return c},get pre(){return g},get code(){return y},get lines(){return v}};if(e.forEach((A,D)=>{D&&(f==="inline"?c.children.push({type:"element",tagName:"br",properties:{},children:[]}):f==="classic"&&s.push({type:"text",value:`
|
|
34
|
-
`}));let x={type:"element",tagName:"span",properties:{class:"line"},children:[]},T=0;for(const k of A){let I={type:"element",tagName:"span",properties:{...k.htmlAttrs},children:[{type:"text",value:k.content}]};const z=Dd(k.htmlStyle||Hs(k));z&&(I.properties.style=z);for(const R of o)I=R?.span?.call(b,I,D+1,T,x,k)||I;f==="inline"?c.children.push(I):f==="classic"&&x.children.push(I),T+=k.content.length}if(f==="classic"){for(const k of o)x=k?.line?.call(b,x,D+1)||x;v.push(x),s.push(x)}else f==="inline"&&v.push(x)}),f==="classic"){for(const A of o)y=A?.code?.call(b,y)||y;g.children.push(y);for(const A of o)g=A?.pre?.call(b,g)||g;c.children.push(g)}else if(f==="inline"){const A=[];let D={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const k of c.children)k.type==="element"&&k.tagName==="br"?(A.push(D),D={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(k.type==="element"||k.type==="text")&&D.children.push(k);A.push(D);let T={type:"element",tagName:"code",properties:{},children:A};for(const k of o)T=k?.code?.call(b,T)||T;c.children=[];for(let k=0;k<T.children.length;k++){k>0&&c.children.push({type:"element",tagName:"br",properties:{},children:[]});const I=T.children[k];I.type==="element"&&c.children.push(...I.children)}}let S=c;for(const A of o)S=A?.root?.call(b,S)||S;return a&&Ks(S,a),S}function B2(e){return e.map(t=>{const i=[];let a="",o;return t.forEach((s,c)=>{const d=!(s.fontStyle&&(s.fontStyle&Nt.Underline||s.fontStyle&Nt.Strikethrough));d&&s.content.match(/^\s+$/)&&t[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 j2(e){return e.map(t=>t.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 V2(e){return e.map(t=>{const i=[];for(const a of t){if(i.length===0){i.push({...a});continue}const o=i[i.length-1],s=Dd(o.htmlStyle||Hs(o)),c=Dd(a.htmlStyle||Hs(a)),f=o.fontStyle&&(o.fontStyle&Nt.Underline||o.fontStyle&Nt.Strikethrough),d=a.fontStyle&&(a.fontStyle&Nt.Underline||a.fontStyle&Nt.Strikethrough);!f&&!d&&s===c?o.content+=a.content:i.push({...a})}return i})}const G2=pa;function $2(e,t,i){const a={meta:{},options:i,codeToHast:(s,c)=>js(e,s,c),codeToTokens:(s,c)=>Bs(e,s,c)};let o=G2(js(e,t,i,a));for(const s of Ps(i))o=s.postprocess?.call(a,o,i)||o;return o}const U0={light:"#333333",dark:"#bbbbbb"},H0={light:"#fffffe",dark:"#1e1e1e"},P0="__shiki_resolved";function Ws(e){if(e?.[P0])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:i,fg:a}=t;if(!i||!a){const f=t.settings?t.settings.find(d=>!d.name&&!d.scope):void 0;f?.settings?.foreground&&(a=f.settings.foreground),f?.settings?.background&&(i=f.settings.background),!a&&t?.colors?.["editor.foreground"]&&(a=t.colors["editor.foreground"]),!i&&t?.colors?.["editor.background"]&&(i=t.colors["editor.background"]),a||(a=t.type==="light"?U0.light:U0.dark),i||(i=t.type==="light"?H0.light:H0.dark),t.fg=a,t.bg=i}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.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 t.colorReplacements?.[`#${d}`]?c(f):(s.set(f,d),d)}t.settings=t.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);t.colorReplacements[y]=f.settings.foreground,g.settings.foreground=y}if(p){const y=c(f.settings.background);t.colorReplacements[y]=f.settings.background,g.settings.background=y}return g});for(const f of Object.keys(t.colors||{}))if((f==="editor.foreground"||f==="editor.background"||f.startsWith("terminal.ansi"))&&!t.colors[f]?.startsWith("#")){const d=c(t.colors[f]);t.colorReplacements[d]=t.colors[f],t.colors[f]=d}return Object.defineProperty(t,P0,{enumerable:!1,writable:!1,value:!0}),t}async function n1(e){return Array.from(new Set((await Promise.all(e.filter(t=>!Zv(t)).map(async t=>await Qv(t).then(i=>Array.isArray(i)?i:[i])))).flat()))}async function i1(e){return(await Promise.all(e.map(async i=>Kv(i)?null:Ws(await Qv(i))))).filter(i=>!!i)}let q2=3;function F2(e,t=3){t>q2||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let ca=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function r1(e,t){if(!t)return e;if(t[e]){const i=new Set([e]);for(;t[e];){if(e=t[e],i.has(e))throw new ca(`Circular alias \`${Array.from(i).join(" -> ")} -> ${e}\``);i.add(e)}}return e}class Y2 extends oT{constructor(t,i,a,o={}){super(t),this._resolver=t,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(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const i=Ws(t);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(t){let i=this._textmateThemeCache.get(t);i||(i=Ns.createFromRawTheme(t),this._textmateThemeCache.set(t,i)),this._syncRegistry.setTheme(i)}getGrammar(t){return t=r1(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const i=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const a={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const o=this.loadGrammarWithConfiguration(t.scopeName,1,a);if(o.name=t.name,this._resolvedGrammars.set(t.name,o),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.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(t){for(const o of t)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 ca(`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(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const i=t.embeddedLanguages??t.embeddedLangs;if(i)for(const a of i)this._langGraph.set(a,this._langMap.get(a))}}class X2{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,i){this._onigLib={createOnigScanner:a=>t.createScanner(a),createOnigString:a=>t.createString(a)},i.forEach(a=>this.addLanguage(a))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(i=>{this._langs.set(i,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(i=>{this._injections.get(i)||this._injections.set(i,[]),this._injections.get(i).push(t.scopeName)})}getInjections(t){const i=t.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 xl=0;function Q2(e){xl+=1,e.warnings!==!1&&xl>=10&&xl%10===0&&console.warn(`[Shiki] ${xl} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new ca("`engine` option is required for synchronous mode");const i=(e.langs||[]).flat(1),a=(e.themes||[]).flat(1).map(Ws),o=new X2(e.engine,i),s=new Y2(o,a,i,e.langAlias);let c;function f(k){return r1(k,e.langAlias)}function d(k){x();const I=s.getGrammar(typeof k=="string"?k:k.name);if(!I)throw new ca(`Language \`${k}\` not found, you may need to load it first`);return I}function p(k){if(k==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};x();const I=s.getTheme(k);if(!I)throw new ca(`Theme \`${k}\` not found, you may need to load it first`);return I}function g(k){x();const I=p(k);c!==k&&(s.setTheme(I),c=k);const z=s.getColorMap();return{theme:I,colorMap:z}}function y(){return x(),s.getLoadedThemes()}function v(){return x(),s.getLoadedLanguages()}function b(...k){x(),s.loadLanguages(k.flat(1))}async function S(...k){return b(await n1(k))}function A(...k){x();for(const I of k.flat(1))s.loadTheme(I)}async function D(...k){return x(),A(await i1(k))}function x(){if(t)throw new ca("Shiki instance has been disposed")}function T(){t||(t=!0,s.dispose(),xl-=1)}return{setTheme:g,getTheme:p,getLanguage:d,getLoadedThemes:y,getLoadedLanguages:v,resolveLangAlias:f,loadLanguage:S,loadLanguageSync:b,loadTheme:D,loadThemeSync:A,dispose:T,[Symbol.dispose]:T}}async function Z2(e){e.engine||F2("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,i,a]=await Promise.all([i1(e.themes||[]),n1(e.langs||[]),e.engine]);return Q2({...e,themes:t,langs:i,engine:a})}async function K2(e){const t=await Z2(e);return{getLastGrammarState:(...i)=>N2(t,...i),codeToTokensBase:(i,a)=>fh(t,i,a),codeToTokensWithThemes:(i,a)=>t1(t,i,a),codeToTokens:(i,a)=>Bs(t,i,a),codeToHast:(i,a)=>js(t,i,a),codeToHtml:(i,a)=>$2(t,i,a),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function W2(e){const t=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,Zv(y))return[];const v=t[y];if(!v)throw new pt(`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(Kv(y))return"none";if(typeof y=="string"){const v=i[y];if(!v)throw new pt(`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 K2({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 t},getBundledThemes(){return i}}}return o}function J2(e){let t;async function i(a={}){if(t){const o=await t;return await Promise.all([o.loadTheme(...a.themes||[]),o.loadLanguage(...a.langs||[])]),o}else{t=e({...a,themes:[],langs:[]});const o=await t;return await Promise.all([o.loadTheme(...a.themes||[]),o.loadLanguage(...a.langs||[])]),o}}return i}function eL(e,t){const i=J2(e);async function a(o,s){const c=await i({langs:[s.lang],themes:"theme"in s?[s.theme]:Object.values(s.themes)}),f=await t?.guessEmbeddedLanguages?.(o,s.lang,c);return f&&await c.loadLanguage(...f),c}return{getSingletonHighlighter(o){return i(o)},async codeToHtml(o,s){return(await a(o,s)).codeToHtml(o,s)},async codeToHast(o,s){return(await a(o,s)).codeToHast(o,s)},async codeToTokens(o,s){return(await a(o,s)).codeToTokens(o,s)},async codeToTokensBase(o,s){return(await a(o,s)).codeToTokensBase(o,s)},async codeToTokensWithThemes(o,s){return(await a(o,s)).codeToTokensWithThemes(o,s)},async getLastGrammarState(o,s){return(await i({langs:[s.lang],themes:[s.theme]})).getLastGrammarState(o,s)}}}const a1=[{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"),[]))}],tL=Object.fromEntries(a1.map(e=>[e.id,e.import])),nL=Object.fromEntries(a1.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Nd={...tL,...nL},iL=[{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"),[]))}],l1=Object.fromEntries(iL.map(e=>[e.id,e.import]));class hh extends Error{constructor(t){super(t),this.name="ShikiError"}}function rL(){return 2147483648}function aL(){return typeof performance<"u"?performance.now():Date.now()}const lL=(e,t)=>e+(t-e%t)%t;async function oL(e){let t,i;const a={};function o(b){i=b,a.HEAPU8=new Uint8Array(b),a.HEAPU32=new Uint32Array(b)}function s(b,S,A){a.HEAPU8.copyWithin(b,S,S+A)}function c(b){try{return t.grow(b-i.byteLength+65535>>>16),o(t.buffer),1}catch{}}function f(b){const S=a.HEAPU8.length;b=b>>>0;const A=rL();if(b>A)return!1;for(let D=1;D<=4;D*=2){let x=S*(1+.2/D);x=Math.min(x,b+100663296);const T=Math.min(A,lL(Math.max(b,x),65536));if(c(T))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function p(b,S,A=1024){const D=S+A;let x=S;for(;b[x]&&!(x>=D);)++x;if(x-S>16&&b.buffer&&d)return d.decode(b.subarray(S,x));let T="";for(;S<x;){let k=b[S++];if(!(k&128)){T+=String.fromCharCode(k);continue}const I=b[S++]&63;if((k&224)===192){T+=String.fromCharCode((k&31)<<6|I);continue}const z=b[S++]&63;if((k&240)===224?k=(k&15)<<12|I<<6|z:k=(k&7)<<18|I<<12|z<<6|b[S++]&63,k<65536)T+=String.fromCharCode(k);else{const R=k-65536;T+=String.fromCharCode(55296|R>>10,56320|R&1023)}}return T}function g(b,S){return b?p(a.HEAPU8,b,S):""}const y={emscripten_get_now:aL,emscripten_memcpy_big:s,emscripten_resize_heap:f,fd_write:()=>0};async function v(){const S=await e({env:y,wasi_snapshot_preview1:y});t=S.memory,o(t.buffer),Object.assign(a,S),a.UTF8ToString=g}return await v(),a}var sL=Object.defineProperty,uL=(e,t,i)=>t in e?sL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,gt=(e,t,i)=>uL(e,typeof t!="symbol"?t+"":t,i);let St=null;function cL(e){throw new hh(e.UTF8ToString(e.getLastOnigError()))}class Js{constructor(t){gt(this,"utf16Length"),gt(this,"utf8Length"),gt(this,"utf16Value"),gt(this,"utf8Value"),gt(this,"utf16OffsetToUtf8"),gt(this,"utf8OffsetToUtf16");const i=t.length,a=Js._utf8ByteLength(t),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=t.charCodeAt(p);let y=g,v=!1;if(g>=55296&&g<=56319&&p+1<i){const b=t.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=t,this.utf8Value=f,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=c}static _utf8ByteLength(t){let i=0;for(let a=0,o=t.length;a<o;a++){const s=t.charCodeAt(a);let c=s,f=!1;if(s>=55296&&s<=56319&&a+1<o){const d=t.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(t){const i=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,i),i}}const eu=class Nn{constructor(t){if(gt(this,"id",++Nn.LAST_ID),gt(this,"_onigBinding"),gt(this,"content"),gt(this,"utf16Length"),gt(this,"utf8Length"),gt(this,"utf16OffsetToUtf8"),gt(this,"utf8OffsetToUtf16"),gt(this,"ptr"),!St)throw new hh("Must invoke loadWasm first.");this._onigBinding=St,this.content=t;const i=new Js(t);this.utf16Length=i.utf16Length,this.utf8Length=i.utf8Length,this.utf16OffsetToUtf8=i.utf16OffsetToUtf8,this.utf8OffsetToUtf16=i.utf8OffsetToUtf16,this.utf8Length<1e4&&!Nn._sharedPtrInUse?(Nn._sharedPtr||(Nn._sharedPtr=St.omalloc(1e4)),Nn._sharedPtrInUse=!0,St.HEAPU8.set(i.utf8Value,Nn._sharedPtr),this.ptr=Nn._sharedPtr):this.ptr=i.createString(St)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Nn._sharedPtr?Nn._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};gt(eu,"LAST_ID",0);gt(eu,"_sharedPtr",0);gt(eu,"_sharedPtrInUse",!1);let o1=eu;class fL{constructor(t){if(gt(this,"_onigBinding"),gt(this,"_ptr"),!St)throw new hh("Must invoke loadWasm first.");const i=[],a=[];for(let f=0,d=t.length;f<d;f++){const p=new Js(t[f]);i[f]=p.createString(St),a[f]=p.utf8Length}const o=St.omalloc(4*t.length);St.HEAPU32.set(i,o/4);const s=St.omalloc(4*t.length);St.HEAPU32.set(a,s/4);const c=St.createOnigScanner(o,s,t.length);for(let f=0,d=t.length;f<d;f++)St.ofree(i[f]);St.ofree(s),St.ofree(o),c===0&&cL(St),this._onigBinding=St,this._ptr=c}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,i,a){let o=0;if(typeof a=="number"&&(o=a),typeof t=="string"){t=new o1(t);const s=this._findNextMatchSync(t,i,!1,o);return t.dispose(),s}return this._findNextMatchSync(t,i,!1,o)}_findNextMatchSync(t,i,a,o){const s=this._onigBinding,c=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.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=t.convertUtf8OffsetToUtf16(f[d++]),S=t.convertUtf8OffsetToUtf16(f[d++]);y[v]={start:b,end:S,length:S-b}}return{index:p,captureIndices:y}}}function dL(e){return typeof e.instantiator=="function"}function hL(e){return typeof e.default=="function"}function pL(e){return typeof e.data<"u"}function mL(e){return typeof Response<"u"&&e instanceof Response}function gL(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 hs;function yL(e){if(hs)return hs;async function t(){St=await oL(async i=>{let a=e;return a=await a,typeof a=="function"&&(a=await a(i)),typeof a=="function"&&(a=await a(i)),dL(a)?a=await a.instantiator(i):hL(a)?a=await a.default(i):(pL(a)&&(a=a.data),mL(a)?typeof WebAssembly.instantiateStreaming=="function"?a=await bL(a)(i):a=await vL(a)(i):gL(a)?a=await Ff(a)(i):a instanceof WebAssembly.Module?a=await Ff(a)(i):"default"in a&&a.default instanceof WebAssembly.Module&&(a=await Ff(a.default)(i))),"instance"in a&&(a=a.instance),"exports"in a&&(a=a.exports),a})}return hs=t(),hs}function Ff(e){return t=>WebAssembly.instantiate(e,t)}function bL(e){return t=>WebAssembly.instantiateStreaming(e,t)}function vL(e){return async t=>{const i=await e.arrayBuffer();return WebAssembly.instantiate(i,t)}}async function s1(e){return e&&await yL(e),{createScanner(t){return new fL(t.map(i=>typeof i=="string"?i:i.source))},createString(t){return new o1(t)}}}const u1=W2({langs:Nd,themes:l1,engine:()=>s1(C(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:B0}=eL(u1,{guessEmbeddedLanguages:h2});function Ea(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function _L(e,t,i){return e.has(t)||e.set(t,i),e.get(t)}const ph=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Et=String.raw;function xa(e,t){if(e==null)throw new Error(t??"Value expected");return e}const c1=Et`\[\^?`,f1=`c.? | C(?:-.?)?|${Et`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Et`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Et`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Et`o\{[^\}]*\}?`}|${Et`\d{1,3}`}`,mh=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,ps=new RegExp(Et`
|
|
35
|
-
\\ (?:
|
|
36
|
-
${f1}
|
|
37
|
-
| [gk]<[^>]*>?
|
|
38
|
-
| [gk]'[^']*'?
|
|
39
|
-
| .
|
|
40
|
-
)
|
|
41
|
-
| \( (?:
|
|
42
|
-
\? (?:
|
|
43
|
-
[:=!>({]
|
|
44
|
-
| <[=!]
|
|
45
|
-
| <[^>]*>
|
|
46
|
-
| '[^']*'
|
|
47
|
-
| ~\|?
|
|
48
|
-
| #(?:[^)\\]|\\.?)*
|
|
49
|
-
| [^:)]*[:)]
|
|
50
|
-
)?
|
|
51
|
-
| \*[^\)]*\)?
|
|
52
|
-
)?
|
|
53
|
-
| (?:${mh.source})+
|
|
54
|
-
| ${c1}
|
|
55
|
-
| .
|
|
56
|
-
`.replace(/\s+/g,""),"gsu"),Yf=new RegExp(Et`
|
|
57
|
-
\\ (?:
|
|
58
|
-
${f1}
|
|
59
|
-
| .
|
|
60
|
-
)
|
|
61
|
-
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
62
|
-
| ${c1}
|
|
63
|
-
| &&
|
|
64
|
-
| .
|
|
65
|
-
`.replace(/\s+/g,""),"gsu");function SL(e,t={}){const i={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const a=BL(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(ps.lastIndex=0;f=ps.exec(e);){const y=EL(s,e,f[0],ps.lastIndex);y.tokens?c.push(...y.tokens):y.token&&c.push(y.token),y.lastIndex!==void 0&&(ps.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"?VL(y,g):y).flat(),flags:a}}function EL(e,t,i,a){const[o,s]=i;if(i==="["||i==="[^"){const c=xL(t,i,a);return{tokens:c.tokens,lastIndex:c.lastIndex}}if(o==="\\"){if("AbBGyYzZ".includes(s))return{token:j0(i,i)};if(/^\\g[<']/.test(i)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(i))throw new Error(`Invalid group name "${i}"`);return{token:OL(i)}}if(/^\\k[<']/.test(i)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(i))throw new Error(`Invalid group name "${i}"`);return{token:h1(i)}}if(s==="K")return{token:p1("keep",i)};if(s==="N"||s==="R")return{token:fr("newline",i,{negate:s==="N"})};if(s==="O")return{token:fr("any",i)};if(s==="X")return{token:fr("text_segment",i)};const c=d1(i,{inCharClass:!1});return Array.isArray(c)?{tokens:c}:{token:c}}if(o==="("){if(s==="*")return{token:UL(i)};if(i==="(?{")throw new Error(`Unsupported callout "${i}"`);if(i.startsWith("(?#")){if(t[a]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:a+1}}if(/^\(\?[-imx]+[:)]$/.test(i))return{token:zL(i,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,i==="("&&!e.captureGroup||i==="(?:")return{token:sa("group",i)};if(i==="(?>")return{token:sa("atomic",i)};if(i==="(?="||i==="(?!"||i==="(?<="||i==="(?<!")return{token:sa(i[2]==="<"?"lookbehind":"lookahead",i,{negate:i.endsWith("!")})};if(i==="("&&e.captureGroup||i.startsWith("(?<")&&i.endsWith(">")||i.startsWith("(?'")&&i.endsWith("'"))return{token:sa("capturing",i,{...i!=="("&&{name:i.slice(3,-1)}})};if(i.startsWith("(?~")){if(i==="(?~|")throw new Error(`Unsupported absence function kind "${i}"`);return{token:sa("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:RL(i)}}if(e.getCurrentModX()){if(i==="#"){const c=t.indexOf(`
|
|
66
|
-
`,a);return{lastIndex:c===-1?t.length:c}}if(/^\s$/.test(i)){const c=/\s+/y;return c.lastIndex=a,{lastIndex:c.exec(t)?c.lastIndex:a}}}if(i===".")return{token:fr("dot",i)};if(i==="^"||i==="$"){const c=e.singleline?{"^":Et`\A`,$:Et`\Z`}[i]:i;return{token:j0(c,i)}}return i==="|"?{token:wL(i)}:mh.test(i)?{tokens:GL(i)}:{token:ai(Ea(i),i)}}function xL(e,t,i){const a=[V0(t[1]==="^",t)];let o=1,s;for(Yf.lastIndex=i;s=Yf.exec(e);){const c=s[0];if(c[0]==="["&&c[1]!==":")o++,a.push(V0(c[1]==="^",c));else if(c==="]"){if(a.at(-1).type==="CharacterClassOpen")a.push(ai(93,c));else if(o--,a.push(kL(c)),!o)break}else{const f=CL(c);Array.isArray(f)?a.push(...f):a.push(f)}}return{tokens:a,lastIndex:Yf.lastIndex||e.length}}function CL(e){if(e[0]==="\\")return d1(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!ph.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return fr("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?AL(e):e==="&&"?TL(e):ai(Ea(e),e)}function d1(e,{inCharClass:t}){const i=e[1];if(i==="c"||i==="C")return IL(e);if("dDhHsSwW".includes(i))return HL(e);if(e.startsWith(Et`\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 PL(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 ai(Ea(c),f)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(i==="u"||i==="x")return ai(jL(e),e);if(G0.has(i))return ai(G0.get(i),e);if(/\d/.test(i))return LL(t,e);if(e==="\\")throw new Error(Et`Incomplete escape "\"`);if(i==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return ai(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function wL(e){return{type:"Alternator",raw:e}}function j0(e,t){return{type:"Assertion",kind:e,raw:t}}function h1(e){return{type:"Backreference",raw:e}}function ai(e,t){return{type:"Character",value:e,raw:t}}function kL(e){return{type:"CharacterClassClose",raw:e}}function AL(e){return{type:"CharacterClassHyphen",raw:e}}function TL(e){return{type:"CharacterClassIntersector",raw:e}}function V0(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function fr(e,t,i={}){return{type:"CharacterSet",kind:e,...i,raw:t}}function p1(e,t,i={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:xa(i.flags),raw:t}}function LL(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function RL(e){return{type:"GroupClose",raw:e}}function sa(e,t,i={}){return{type:"GroupOpen",kind:e,...i,raw:t}}function DL(e,t,i,a){return{type:"NamedCallout",kind:e,tag:t,arguments:i,raw:a}}function NL(e,t,i,a){return{type:"Quantifier",kind:e,min:t,max:i,raw:a}}function OL(e){return{type:"Subroutine",raw:e}}const ML=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),G0=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function IL(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return ai(Ea(t.toUpperCase())-64,e)}function zL(e,t){let{on:i,off:a}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;a??="";const o=(t.getCurrentModX()||i.includes("x"))&&!a.includes("x"),s=q0(i),c=q0(a),f={};if(s&&(f.enable=s),c&&(f.disable=c),e.endsWith(")"))return t.replaceCurrentModX(o),p1("flags",e,{flags:f});if(e.endsWith(":"))return t.pushModX(o),t.numOpenGroups++,sa("group",e,{...(s||c)&&{flags:f}});throw new Error(`Unexpected flag modifier "${e}"`)}function UL(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:i,tag:a,args:o}=t.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=ML.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 DL(p,a??null,o?.split(",")??null,e)}function $0(e){let t=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&&(t="possessive",[i,a]=[a,i]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else i=e[0]==="+"?1:0,a=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return NL(t,i,a,e)}function HL(e){const t=e[1].toLowerCase();return fr({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function PL(e){const{p:t,neg:i,value:a}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return fr("property",e,{value:a,negate:t==="P"&&!i||t==="p"&&!!i})}function q0(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function BL(e){const t={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');t.textSegmentMode=e[i+2]==="g"?"grapheme":"word",i+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[a]]=!0}return t}function jL(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function VL(e,t){const{raw:i,inCharClass:a}=e,o=i.slice(1);if(!a&&(o!=="0"&&o.length===1||o[0]!=="0"&&+o<=t))return[h1(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(Et`Octal encoded byte above 177 unsupported "${i}"`)}else p=Ea(d);s.push(ai(p,(f===0?"\\":"")+d))}return s}function GL(e){const t=[],i=new RegExp(mh,"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--,t.push($0(o.slice(0,-1)));continue}}}t.push($0(o))}return t}function m1(e,t){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!t||Object.keys(t).every(a=>t[a]===i[a])}function $L(e){return qL.has(e.type)}const qL=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function g1(e,t={}){const i={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},a=SL(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 hr();case"Assertion":return FL(S);case"Backreference":return YL(S,s);case"Character":return tu(S.value,{useLastValid:!!b.isCheckingRangeEnd});case"CharacterClassHyphen":return XL(S,s,b);case"CharacterClassOpen":return QL(S,s,b);case"CharacterSet":return ZL(S,s);case"Directive":return nR(S.kind,{flags:S.flags});case"GroupOpen":return KL(S,s,b);case"NamedCallout":return rR(S.kind,S.tag,S.arguments);case"Quantifier":return WL(S,s);case"Subroutine":return JL(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=lR(iR(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(Et`Subroutine uses a duplicate group name "\g<${v}>"`);g.get(v)[0].isSubroutined=!0}else throw new Error(Et`Subroutine uses a group name that's not defined "\g<${v}>"`);return c}function FL({kind:e}){return Od(xa({"^":"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===Et`\B`||e===Et`\Y`})}function YL({raw:e},t){const i=/^\\k[<']/.test(e),a=i?e.slice(3,-1):e.slice(1),o=(s,c=!1)=>{const f=t.capturingGroups.length;let d=!1;if(s>f)if(t.skipBackrefValidation)d=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,Md(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(!t.namedGroupsByName.has(a))throw new Error(`Group name not defined to the left "${e}"`);return Md(a)}return o(+a)}function XL(e,t,i){const{tokens:a,walk:o}=t,s=t.parent,c=s.body.at(-1),f=a[t.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(),tR(c,d);throw new Error("Invalid character class range")}return tu(Ea("-"))}function QL({negate:e},t,i){const{tokens:a,walk:o}=t,s=a[t.nextIndex],c=[ks()];let f=X0(s);for(;f.type!=="CharacterClassClose";){if(f.type==="CharacterClassIntersector")c.push(ks()),t.nextIndex++;else{const p=c.at(-1);p.body.push(o(p,i))}f=X0(a[t.nextIndex],s)}const d=ks({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)),t.nextIndex++,d}function ZL({kind:e,negate:t,value:i},a){const{normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:c}=a;if(e==="property"){const f=nu(i);if(ph.has(f)&&!c?.has(f))e="posix",i=f;else return ua(i,{negate:t,normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:c})}return e==="posix"?aR(i,{negate:t}):Id(e,{negate:t})}function KL(e,t,i){const{tokens:a,capturingGroups:o,namedGroupsByName:s,skipLookbehindValidation:c,walk:f}=t,d=oR(e),p=d.type==="AbsenceFunction",g=Y0(d),y=g&&d.negate;if(d.type==="CapturingGroup"&&(o.push(d),d.name&&_L(s,d.name,[]).push(d)),p&&i.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let v=Q0(a[t.nextIndex]);for(;v.type!=="GroupClose";){if(v.type==="Alternator")d.body.push(hr()),t.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 A="Lookbehind includes a pattern not allowed by Oniguruma";if(y||i.isInNegLookbehind){if(F0(S)||S.type==="CapturingGroup")throw new Error(A)}else if(F0(S)||Y0(S)&&S.negate)throw new Error(A)}}v=Q0(a[t.nextIndex])}return t.nextIndex++,d}function WL({kind:e,min:t,max:i},a){const o=a.parent,s=o.body.at(-1);if(!s||!$L(s))throw new Error("Quantifier requires a repeatable token");const c=b1(e,t,i,s);return o.body.pop(),c}function JL({raw:e},t){const{capturingGroups:i,subroutines:a}=t;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(t.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=v1(o);return a.push(c),c}function eR(e,t){return{type:"AbsenceFunction",kind:e,body:Gl(t?.body)}}function hr(e){return{type:"Alternative",body:_1(e?.body)}}function Od(e,t){const i={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(i.negate=!!t?.negate),i}function Md(e,t){const i=!!t?.orphan;return{type:"Backreference",ref:e,...i&&{orphan:i}}}function y1(e,t){const i={name:void 0,isSubroutined:!1,...t};if(i.name!==void 0&&!sR(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:Gl(t?.body)}}function tu(e,t){const i={useLastValid:!1,...t};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 ks(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:_1(e?.body)}}function tR(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function Id(e,t){const i=!!t?.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 nR(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:xa(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function iR(e){return{type:"Flags",...e}}function xn(e){const t=e?.atomic,i=e?.flags;if(t&&i)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...i&&{flags:i},body:Gl(e?.body)}}function ur(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Gl(e?.body)}}function rR(e,t,i){return{type:"NamedCallout",kind:e,tag:t,arguments:i}}function aR(e,t){const i=!!t?.negate;if(!ph.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:i}}function b1(e,t,i,a){if(t>i)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:i,body:a}}function lR(e,t){return{type:"Regex",body:Gl(t?.body),flags:e}}function v1(e){return{type:"Subroutine",ref:e}}function ua(e,t){const i={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let a=i.unicodePropertyMap?.get(nu(e));if(!a){if(i.normalizeUnknownPropertyNames)a=uR(e);else if(i.unicodePropertyMap&&!i.skipPropertyNameValidation)throw new Error(Et`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:a??e,negate:i.negate}}function oR({flags:e,kind:t,name:i,negate:a,number:o}){switch(t){case"absence_repeater":return eR("repeater");case"atomic":return xn({atomic:!0});case"capturing":return y1(o,{name:i});case"group":return xn({flags:e});case"lookahead":case"lookbehind":return ur({behind:t==="lookbehind",negate:a});default:throw new Error(`Unexpected group kind "${t}"`)}}function Gl(e){if(e===void 0)e=[hr()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function _1(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function F0(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function Y0(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function sR(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function uR(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function nu(e){return e.replace(/[- _]+/g,"").toLowerCase()}function X0(e,t){return xa(e,`${t?.type==="Character"&&t.value===93?"Empty":"Unclosed"} character class`)}function Q0(e){return xa(e,"Unclosed group")}function Rl(e,t,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(){ms(d).splice(Math.max(0,ia(f)+p),1),p--,g=!0},removeAllNextSiblings(){return ms(d).splice(ia(f)+1)},removeAllPrevSiblings(){const x=ia(f)+p;return p-=x,ms(d).splice(0,Math.max(0,x))},replaceWith(x,T={}){const k=!!T.traverse;d?d[Math.max(0,ia(f)+p)]=x:xa(c,"Can't replace root node")[f]=x,k&&o(x,c,f,d),g=!0},replaceWithMultiple(x,T={}){const k=!!T.traverse;if(ms(d).splice(Math.max(0,ia(f)+p),1,...x),p+=x.length-1,k){let I=0;for(let z=0;z<x.length;z++)I+=o(x[z],c,ia(f)+z+I,d)}g=!0},skip(){g=!0}},{type:v}=s,b=t["*"],S=t[v],A=typeof b=="function"?b:b?.enter,D=typeof S=="function"?S:S?.enter;if(A?.(y,i),D?.(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 ms(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function ia(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const cR=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function fR(e,t){for(let i=0;i<e.length;i++)e[i]>=t&&e[i]++}function dR(e,t,i,a){return e.slice(0,t)+a+e.slice(t+i.length)}const mn=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function gh(e,t,i,a){const o=new RegExp(String.raw`${t}|(?<$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===mn.DEFAULT==!c)){i instanceof Function?f+=i(d,{context:c?mn.CHAR_CLASS:mn.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 S1(e,t,i,a){gh(e,t,i,a)}function hR(e,t,i=0,a){if(!new RegExp(t,"su").test(e))return null;const o=new RegExp(`${t}|(?<$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===mn.DEFAULT==!s))return c;f==="["?s++:f==="]"&&s&&s--,o.lastIndex==c.index&&o.lastIndex++}return null}function gs(e,t,i){return!!hR(e,t,0,i)}function pR(e,t){const i=/\\?./gsu;i.lastIndex=t;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(t,a)}const Z0=new RegExp(String.raw`(?<noncapturingStart>${cR})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function mR(e,t){const i=t?.hiddenCaptures??[];let a=t?.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,A;for(Z0.lastIndex=Number.isNaN(g)?0:g+s.length;A=Z0.exec(e);){const{0:D,index:x,groups:{capturingStart:T,noncapturingStart:k}}=A;if(D==="[")v++;else if(v)D==="]"&&v--;else if(D===o&&!S)g=x,S=!0;else if(S&&k)b++;else if(T)S?b++:(d++,c.push(d+p));else if(D===")"&&S){if(!b){p++;const I=d+p;if(e=`${e.slice(0,g)}${s}${e.slice(g+o.length,x)}))<$$${I}>)${e.slice(x+1)}`,y=!0,f.push(I),fR(i,I),a.size){const z=new Map;a.forEach((R,P)=>{z.set(P>=I?P+1:P,R.map(G=>G>=I?G+1:G))}),a=z}break}b--}}}while(y);return i.push(...f),e=gh(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:v,groups:{backrefNum:b,wrappedBackrefNum:S}})=>{if(b){const A=+b;if(A>c.length-1)throw new Error(`Backref "${v}" greater than number of captures`);return`\\${c[A]}`}return`\\${S}`},mn.DEFAULT),{pattern:e,captureTransfers:a,hiddenCaptures:i}}const E1=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Xf=new RegExp(String.raw`
|
|
67
|
-
\\(?: \d+
|
|
68
|
-
| c[A-Za-z]
|
|
69
|
-
| [gk]<[^>]+>
|
|
70
|
-
| [pPu]\{[^\}]+\}
|
|
71
|
-
| u[A-Fa-f\d]{4}
|
|
72
|
-
| x[A-Fa-f\d]{2}
|
|
73
|
-
)
|
|
74
|
-
| \((?: \? (?: [:=!>]
|
|
75
|
-
| <(?:[=!]|[^>]+>)
|
|
76
|
-
| [A-Za-z\-]+:
|
|
77
|
-
| \(DEFINE\)
|
|
78
|
-
))?
|
|
79
|
-
| (?<qBase>${E1})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
80
|
-
| \\?.
|
|
81
|
-
`.replace(/\s+/g,""),"gsu");function gR(e){if(!new RegExp(`${E1}\\+`).test(e))return{pattern:e};const t=[];let i=null,a=null,o="",s=0,c;for(Xf.lastIndex=0;c=Xf.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=dR(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}Xf.lastIndex+=v}else f[0]==="("?t.push(d):f===")"&&(i=t.length?t.pop():null);o=f}return{pattern:e}}const pn=String.raw,yR=pn`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,zd=pn`\(\?R=(?<rDepth>[^\)]+)\)|${yR}`,iu=pn`\(\?<(?![=!])(?<captureName>[^>]+)>`,x1=pn`${iu}|(?<unnamed>\()(?!\?)`,or=new RegExp(pn`${iu}|${zd}|\(\?|\\?.`,"gsu"),Qf="Cannot use multiple overlapping recursions";function bR(e,t){const{hiddenCaptures:i,mode:a}={hiddenCaptures:[],mode:"plugin",...t};let o=t?.captureTransfers??new Map;if(!new RegExp(zd,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:i};if(a==="plugin"&&gs(e,pn`\(\?\(DEFINE\)`,mn.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],c=gs(e,pn`\\[1-9]`,mn.DEFAULT),f=new Map,d=[];let p=!1,g=0,y=0,v;for(or.lastIndex=0;v=or.exec(e);){const{0:b,groups:{captureName:S,rDepth:A,gRNameOrNum:D,gRDepth:x}}=v;if(b==="[")g++;else if(g)b==="]"&&g--;else if(A){if(K0(A),p)throw new Error(Qf);if(c)throw new Error(`${a==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const T=e.slice(0,v.index),k=e.slice(or.lastIndex);if(gs(k,zd,mn.DEFAULT))throw new Error(Qf);const I=+A-1;e=W0(T,k,I,!1,i,s,y),o=eb(o,T,I,s.length,0,y);break}else if(D){K0(x);let T=!1;for(const W of d)if(W.name===D||W.num===+D){if(T=!0,W.hasRecursedWithin)throw new Error(Qf);break}if(!T)throw new Error(pn`Recursive \g cannot be used outside the referenced group "${a==="external"?D:pn`\g<${D}&R=${x}>`}"`);const k=f.get(D),I=pR(e,k);if(c&&gs(I,pn`${iu}|\((?!\?)`,mn.DEFAULT))throw new Error(`${a==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const z=e.slice(k,v.index),R=I.slice(z.length+b.length),P=s.length,G=+x-1,ee=W0(z,R,G,!0,i,s,y);o=eb(o,z,G,s.length-P,P,y);const ae=e.slice(0,k),ne=e.slice(k+I.length);e=`${ae}${ee}${ne}`,or.lastIndex+=ee.length-b.length-z.length-R.length,d.forEach(W=>W.hasRecursedWithin=!0),p=!0}else if(S)y++,f.set(String(y),or.lastIndex),f.set(S,or.lastIndex),d.push({num:y,name:S});else if(b[0]==="("){const T=b==="(";T&&(y++,f.set(String(y),or.lastIndex)),d.push(T?{num:y}:{})}else b===")"&&d.pop()}return i.push(...s),{pattern:e,captureTransfers:o,hiddenCaptures:i}}function K0(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function W0(e,t,i,a,o,s,c){const f=new Set;a&&S1(e+t,iu,({groups:{captureName:p}})=>{f.add(p)},mn.DEFAULT);const d=[i,a?f:null,o,s,c];return`${e}${J0(`(?:${e}`,"forward",...d)}(?:)${J0(`${t})`,"backward",...d)}${t}`}function J0(e,t,i,a,o,s,c){const d=g=>t==="forward"?g+2:i-g+2-1;let p="";for(let g=0;g<i;g++){const y=d(g);p+=gh(e,pn`${x1}|\\k<(?<backref>[^>]+)>`,({0:v,groups:{captureName:b,unnamed:S,backref:A}})=>{if(A&&a&&!a.has(A))return v;const D=`_$${y}`;if(S||b){const x=c+s.length+1;return s.push(x),vR(o,x),S?v:`(?<${b}${D}>`}return pn`\k<${A}${D}>`},mn.DEFAULT)}return p}function vR(e,t){for(let i=0;i<e.length;i++)e[i]>=t&&e[i]++}function eb(e,t,i,a,o,s){if(e.size&&a){let c=0;S1(t,x1,()=>c++,mn.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 A of p)if(A<=f)S.push(A);else if(A>f+c+y)S.push(A+a);else if(A<=f+c)for(let D=0;D<=i;D++)S.push(A+c*D);else for(let D=0;D<=i;D++)S.push(A+v+y*D);d.set(b,S)}),d}return e}var yt=String.fromCodePoint,Ce=String.raw,Cn={},ru=globalThis.RegExp;Cn.flagGroups=(()=>{try{new ru("(?i:)")}catch{return!1}return!0})();Cn.unicodeSets=(()=>{try{new ru("[[]]","v")}catch{return!1}return!0})();Cn.bugFlagVLiteralHyphenIsRange=Cn.unicodeSets?(()=>{try{new ru(Ce`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Cn.bugNestedClassIgnoresNegation=Cn.unicodeSets&&new ru("[[^a]]","v").test("a");function Vs(e,{enable:t,disable:i}){return{dotAll:!i?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!i?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function zl(e,t,i){return e.has(t)||e.set(t,i),e.get(t)}function Ud(e,t){return tb[e]>=tb[t]}function _R(e,t){if(e==null)throw new Error(t??"Value expected");return e}var tb={ES2025:2025,ES2024:2024,ES2018:2018},SR={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function C1(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!SR[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=Cn.flagGroups?"ES2025":Cn.unicodeSets?"ES2024":"ES2018"),t}var ER="[ -\r ]",xR=new Set([yt(304),yt(305)]),ni=Ce`[\p{L}\p{M}\p{N}\p{Pc}]`;function w1(e){if(xR.has(e))return[e];const t=new Set,i=e.toLowerCase(),a=i.toUpperCase(),o=kR.get(i),s=CR.get(i),c=wR.get(i);return[...a].length===1&&t.add(a),c&&t.add(c),o&&t.add(o),t.add(i),s&&t.add(s),[...t]}var yh=new Map(`C Other
|
|
82
|
-
Cc Control cntrl
|
|
83
|
-
Cf Format
|
|
84
|
-
Cn Unassigned
|
|
85
|
-
Co Private_Use
|
|
86
|
-
Cs Surrogate
|
|
87
|
-
L Letter
|
|
88
|
-
LC Cased_Letter
|
|
89
|
-
Ll Lowercase_Letter
|
|
90
|
-
Lm Modifier_Letter
|
|
91
|
-
Lo Other_Letter
|
|
92
|
-
Lt Titlecase_Letter
|
|
93
|
-
Lu Uppercase_Letter
|
|
94
|
-
M Mark Combining_Mark
|
|
95
|
-
Mc Spacing_Mark
|
|
96
|
-
Me Enclosing_Mark
|
|
97
|
-
Mn Nonspacing_Mark
|
|
98
|
-
N Number
|
|
99
|
-
Nd Decimal_Number digit
|
|
100
|
-
Nl Letter_Number
|
|
101
|
-
No Other_Number
|
|
102
|
-
P Punctuation punct
|
|
103
|
-
Pc Connector_Punctuation
|
|
104
|
-
Pd Dash_Punctuation
|
|
105
|
-
Pe Close_Punctuation
|
|
106
|
-
Pf Final_Punctuation
|
|
107
|
-
Pi Initial_Punctuation
|
|
108
|
-
Po Other_Punctuation
|
|
109
|
-
Ps Open_Punctuation
|
|
110
|
-
S Symbol
|
|
111
|
-
Sc Currency_Symbol
|
|
112
|
-
Sk Modifier_Symbol
|
|
113
|
-
Sm Math_Symbol
|
|
114
|
-
So Other_Symbol
|
|
115
|
-
Z Separator
|
|
116
|
-
Zl Line_Separator
|
|
117
|
-
Zp Paragraph_Separator
|
|
118
|
-
Zs Space_Separator
|
|
119
|
-
ASCII
|
|
120
|
-
ASCII_Hex_Digit AHex
|
|
121
|
-
Alphabetic Alpha
|
|
122
|
-
Any
|
|
123
|
-
Assigned
|
|
124
|
-
Bidi_Control Bidi_C
|
|
125
|
-
Bidi_Mirrored Bidi_M
|
|
126
|
-
Case_Ignorable CI
|
|
127
|
-
Cased
|
|
128
|
-
Changes_When_Casefolded CWCF
|
|
129
|
-
Changes_When_Casemapped CWCM
|
|
130
|
-
Changes_When_Lowercased CWL
|
|
131
|
-
Changes_When_NFKC_Casefolded CWKCF
|
|
132
|
-
Changes_When_Titlecased CWT
|
|
133
|
-
Changes_When_Uppercased CWU
|
|
134
|
-
Dash
|
|
135
|
-
Default_Ignorable_Code_Point DI
|
|
136
|
-
Deprecated Dep
|
|
137
|
-
Diacritic Dia
|
|
138
|
-
Emoji
|
|
139
|
-
Emoji_Component EComp
|
|
140
|
-
Emoji_Modifier EMod
|
|
141
|
-
Emoji_Modifier_Base EBase
|
|
142
|
-
Emoji_Presentation EPres
|
|
143
|
-
Extended_Pictographic ExtPict
|
|
144
|
-
Extender Ext
|
|
145
|
-
Grapheme_Base Gr_Base
|
|
146
|
-
Grapheme_Extend Gr_Ext
|
|
147
|
-
Hex_Digit Hex
|
|
148
|
-
IDS_Binary_Operator IDSB
|
|
149
|
-
IDS_Trinary_Operator IDST
|
|
150
|
-
ID_Continue IDC
|
|
151
|
-
ID_Start IDS
|
|
152
|
-
Ideographic Ideo
|
|
153
|
-
Join_Control Join_C
|
|
154
|
-
Logical_Order_Exception LOE
|
|
155
|
-
Lowercase Lower
|
|
156
|
-
Math
|
|
157
|
-
Noncharacter_Code_Point NChar
|
|
158
|
-
Pattern_Syntax Pat_Syn
|
|
159
|
-
Pattern_White_Space Pat_WS
|
|
160
|
-
Quotation_Mark QMark
|
|
161
|
-
Radical
|
|
162
|
-
Regional_Indicator RI
|
|
163
|
-
Sentence_Terminal STerm
|
|
164
|
-
Soft_Dotted SD
|
|
165
|
-
Terminal_Punctuation Term
|
|
166
|
-
Unified_Ideograph UIdeo
|
|
167
|
-
Uppercase Upper
|
|
168
|
-
Variation_Selector VS
|
|
169
|
-
White_Space space
|
|
170
|
-
XID_Continue XIDC
|
|
171
|
-
XID_Start XIDS`.split(/\s/).map(e=>[nu(e),e])),CR=new Map([["s",yt(383)],[yt(383),"s"]]),wR=new Map([[yt(223),yt(7838)],[yt(107),yt(8490)],[yt(229),yt(8491)],[yt(969),yt(8486)]]),kR=new Map([Pi(453),Pi(456),Pi(459),Pi(498),...Zf(8072,8079),...Zf(8088,8095),...Zf(8104,8111),Pi(8124),Pi(8140),Pi(8188)]),AR=new Map([["alnum",Ce`[\p{Alpha}\p{Nd}]`],["alpha",Ce`\p{Alpha}`],["ascii",Ce`\p{ASCII}`],["blank",Ce`[\p{Zs}\t]`],["cntrl",Ce`\p{Cc}`],["digit",Ce`\p{Nd}`],["graph",Ce`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Ce`\p{Lower}`],["print",Ce`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Ce`[\p{P}\p{S}]`],["space",Ce`\p{space}`],["upper",Ce`\p{Upper}`],["word",Ce`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Ce`\p{AHex}`]]);function TR(e,t){const i=[];for(let a=e;a<=t;a++)i.push(a);return i}function Pi(e){const t=yt(e);return[t.toLowerCase(),t]}function Zf(e,t){return TR(e,t).map(i=>Pi(i))}var k1=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function LR(e,t){const i={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};A1(e);const a={accuracy:i.accuracy,asciiWordBoundaries:i.asciiWordBoundaries,avoidSubclass:i.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Ud(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};Rl(e,RR,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};Rl(e,DR,s);const c={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return Rl(e,NR,c),e._originMap=s.groupOriginByCopy,e._strategy=a.strategy,e}var RR={AbsenceFunction({node:e,parent:t,replaceWith:i}){const{body:a,kind:o}=e;if(o==="repeater"){const s=xn();s.body[0].body.push(ur({negate:!0,body:a}),ua("Any"));const c=xn();c.body[0].body.push(b1("greedy",0,1/0,s)),i(ot(c,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:i},{flagDirectivesByAlt:a}){const o=e.body.filter(s=>s.kind==="flags");for(let s=i+1;s<t.body.length;s++){const c=t.body[s];zl(a,c,[]).push(...o)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const i=L1(t.get(e));if(i){const a=xn({flags:i});a.body[0].body=e.body,e.body=[ot(a,e)]}}}},Assertion({node:e,parent:t,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(ot(ur({body:[hr({body:[Od("string_end")]}),hr({body:[tu(10)]})]}),t));else if(d==="line_start")c(ot(ii(Ce`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(d==="search_start")if(v.has(e))o.flags.sticky=!0,s();else{const S=a[i-1];if(S&&HR(S))c(ot(ur({negate:!0}),t));else{if(y)throw new Error(Ce`Uses "\G" in a way that requires a subclass`);c(Bi(Od("string_start"),t)),f.strategy="clip_search"}}else if(!(d==="string_end"||d==="string_start"))if(d==="string_end_newline")c(ot(ii(Ce`(?=\n?\z)`),t));else if(d==="word_boundary"){if(!b&&!g){const S=`(?:(?<=${ni})(?!${ni})|(?<!${ni})(?=${ni}))`,A=`(?:(?<=${ni})(?=${ni})|(?<!${ni})(?!${ni}))`;c(ot(ii(p?A:S),t))}}else throw new Error(`Unexpected assertion kind "${d}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:i}=e;typeof i=="string"&&!Wf(i)&&(i=Kf(i,t),e.ref=i)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:i}){let{name:a}=e;a&&!Wf(a)&&(a=Kf(a,t),e.name=a),i.set(e.number,e),a&&i.set(a,e)},CharacterClassRange({node:e,parent:t,replaceWith:i}){if(t.kind==="intersection"){const a=ks({body:[e]});i(ot(a,t),{traverse:!0})}},CharacterSet({node:e,parent:t,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(Bi(Id("digit",{negate:p}),t));return}if(c&&(d==="space"||g==="space")){i(ot(Jf(ii(ER),p),t));return}if(f&&(d==="word"||g==="word")){i(Bi(Id("word",{negate:p}),t));return}if(d==="any")i(Bi(ua("Any"),t));else if(d==="digit")i(Bi(ua("Nd",{negate:p}),t));else if(d!=="dot")if(d==="text_segment"){if(a==="strict")throw new Error(Ce`Use of "\X" requires non-strict accuracy`);const y="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",v=Ce`\p{RI}{2}|${y}(?:\u200D${y})*`;i(ot(ii(Ce`(?>\r\n|${o?Ce`\p{RGI_Emoji}`:v}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(d==="hex")i(Bi(ua("AHex",{negate:p}),t));else if(d==="newline")i(ot(ii(p?`[^
|
|
172
|
-
]`:`(?>\r
|
|
173
|
-
?|[
|
|
174
|
-
\v\f
\u2028\u2029])`),t));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-${yt(y.codePointAt(0)-1)}${yt(y.codePointAt(2)+1)}-`),i(ot(ii(`[${y}]`),t))}else i(ot(Jf(ii(AR.get(g)),p),t));else if(d==="property")yh.has(nu(g))||(e.key="sc");else if(d==="space")i(Bi(ua("space",{negate:p}),t));else if(d==="word")i(ot(Jf(ii(ni),p),t));else throw new Error(`Unexpected character set kind "${d}"`)},Directive({node:e,parent:t,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=xn({flags:d});p.body[0].body=c(),o(ot(p,t),{traverse:!0})}else if(f==="keep"){const p=i.body[0],y=i.body.length===1&&m1(p,{type:"Group"})&&p.body[0].body.length===1?p.body[0]:i;if(t.parent!==y||y.body.length>1)throw new Error(Ce`Uses "\K" in a way that's unsupported`);const v=ur({behind:!0});v.body[0].body=s(),o(ot(v,t))}else throw new Error(`Unexpected directive kind "${f}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(i=>delete e[i]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:i}=e.flags;t?.extended&&delete t.extended,i?.extended&&delete i.extended,t?.dotAll&&i?.dotAll&&delete t.dotAll,t?.ignoreCase&&i?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).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},t){const{kind:i}=e;i==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:i}){const{kind:a}=e;if(a==="fail")i(ot(ur({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${a.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=xn();t.body[0].body.push(e.body),e.body=ot(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){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=D1(s.body);c?(a=!0,Array.isArray(c)?i.push(...c):i.push(c)):o=!0}a&&!o&&i.forEach(s=>t.add(s))},exit(e,{accuracy:t,passedLookbehind:i,strategy:a}){if(t==="strict"&&i&&a)throw new Error(Ce`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:i}=e;typeof i=="string"&&!Wf(i)&&(i=Kf(i,t),e.ref=i)}},DR={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:i}){const{orphan:a,ref:o}=e;a||i.set(e,[...t.get(o).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:t,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=Bi(nb(e.number),t);d.set(y,f.get(e.number)),i(y);return}f.set(e.number,e),c.set(e.number,[]),e.name&&zl(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=zl(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:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Vs(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:i},a){const{isRecursive:o,ref:s}=e;if(o){let g=t;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?nb(0):T1(c,a.groupOriginByCopy,null);let p=d;if(!f){const g=L1(IR(c,v=>v.type==="Group"&&!!v.flags)),y=g?Vs(a.globalFlags,g):a.globalFlags;OR(y,a.currentFlags)||(p=xn({flags:zR(y)}),p.body[0].body.push(d))}i(ot(p,t),{traverse:!f})}},NR={Backreference({node:e,parent:t,replaceWith:i},a){if(e.orphan){a.highestOrphanBackref=Math.max(a.highestOrphanBackref,e.ref);return}const s=a.reffedNodesByReferencer.get(e).filter(c=>MR(c,e));if(!s.length)i(ot(ur({negate:!0}),t));else if(s.length>1){const c=xn({atomic:!0,body:s.reverse().map(f=>hr({body:[Md(f.number)]}))});i(ot(c,t))}else e.ref=s[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const i=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let a=0;a<i;a++){const o=y1();e.body.at(-1).body.push(o)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function A1(e){Rl(e,{"*"({node:t,parent:i}){t.parent=i}})}function OR(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function MR(e,t){let i=t;do{if(i.type==="Regex")return!1;if(i.type==="Alternative")continue;if(i===e)return!1;const a=R1(i.parent);for(const o of a){if(o===i)break;if(o===e||N1(o,e))return!0}}while(i=i.parent);throw new Error("Unexpected path")}function T1(e,t,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]=T1(c,t,o,i):(s==="type"&&c==="CapturingGroup"&&t.set(o,t.get(e)??e),o[s]=c);return o}function nb(e){const t=v1(e);return t.isRecursive=!0,t}function IR(e,t){const i=[];for(;e=e.parent;)(!t||t(e))&&i.push(e);return i}function Kf(e,t){if(t.has(e))return t.get(e);const i=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,i),i}function L1(e){const t=["dotAll","ignoreCase"],i={enable:{},disable:{}};return e.forEach(({flags:a})=>{t.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 zR({dotAll:e,ignoreCase:t}){const i={};return(e||t)&&(i.enable={},e&&(i.enable.dotAll=!0),t&&(i.enable.ignoreCase=!0)),(!e||!t)&&(i.disable={},!e&&(i.disable.dotAll=!0),!t&&(i.disable.ignoreCase=!0)),i}function R1(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function D1(e){const t=e.find(i=>i.kind==="search_start"||PR(i,{negate:!1})||!UR(i));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const i=[];for(const a of t.body){const o=D1(a.body);if(!o)return null;Array.isArray(o)?i.push(...o):i.push(o)}return i}return null}function N1(e,t){const i=R1(e)??[];for(const a of i)if(a===t||N1(a,t))return!0;return!1}function UR({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function HR(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function PR(e,t){const i={negate:null,...t};return e.type==="LookaroundAssertion"&&(i.negate===null||e.negate===i.negate)&&e.body.length===1&&m1(e.body[0],{type:"Assertion",kind:"search_start"})}function Wf(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function ii(e,t){const a=g1(e,{...t,unicodePropertyMap:yh}).body;return a.length>1||a[0].body.length>1?xn({body:a}):a[0].body[0]}function Jf(e,t){return e.negate=t,e}function Bi(e,t){return e.parent=t,e}function ot(e,t){return A1(e),e.parent=t,e}function BR(e,t){const i=C1(t),a=Ud(i.target,"ES2024"),o=Ud(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];Rl(e,jR,{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,_R(VR[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&&zl(v._captureTransfers,b.transferTo,[]).push(S)}),v}var jR={"*":{enter({node:e},t){if(rb(e)){const i=t.getCurrentModI();t.pushModI(e.flags?Vs({ignoreCase:i},e.flags).ignoreCase:i)}},exit({node:e},t){rb(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){bh(yt(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},i){t(),O1(e,{firstOnly:!0}).length&&i.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&k1.has(e.value)&&t.setHasCasedChar()}},VR={Alternative({body:e},t,i){return e.map(i).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?Ce`\B`:Ce`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,i){const{body:a,name:o,number:s}=e,c={ignoreCase:t.currentFlags.ignoreCase},f=t.originMap.get(e);return f&&(c.hidden=!0,s>f.number&&(c.transferTo=f.number)),t.captureMap.set(s,c),`(${o?`?<${o}>`:""}${a.map(i).join("|")})`},Character({value:e},t){const i=yt(e),a=ra(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(a!==i)return a;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&bh(i)){const o=w1(i);return t.inCharClass?o.join(""):o.length>1?`[${o.join("")}]`:o[0]}return i},CharacterClass(e,t,i){const{kind:a,negate:o,parent:s}=e;let{body:c}=e;if(a==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Cn.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&c.some(ab)&&(c=[tu(45),...c.filter(p=>!ab(p))]);const f=()=>`[${o?"^":""}${c.map(i).join(a==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Cn.bugNestedClassIgnoresNegation)&&!o){const g=c.filter(y=>y.type==="CharacterClass"&&y.kind==="union"&&y.negate);if(g.length){const y=xn(),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=hr({body:[b]});b.parent=S,S.parent=y,y.body.push(S)}),i(y)}}t.inCharClass=!0;const p=f();return t.inCharClass=!1,p}const d=c[0];if(a==="union"&&!o&&d&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(Cn.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&c.length===1&&d.type!=="CharacterClassRange"))return c.map(i).join("");if(!t.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return f()},CharacterClassRange(e,t){const i=e.min.value,a=e.max.value,o={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=ra(i,o),c=ra(a,o),f=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const d=O1(e);YR(d).forEach(g=>{f.add(Array.isArray(g)?`${ra(g[0],o)}-${ra(g[1],o)}`:ra(g,o))})}return`${s}-${c}${[...f].join("")}`},CharacterSet({kind:e,negate:t,value:i,key:a},o){if(e==="dot")return o.currentFlags.dotAll?o.appliedGlobalFlags.dotAll||o.useFlagMods?".":"[^]":Ce`[^\n]`;if(e==="digit")return t?Ce`\D`:Ce`\d`;if(e==="property"){if(o.useAppliedIgnoreCase&&o.currentFlags.ignoreCase&&k1.has(i))throw new Error(`Unicode property "${i}" can't be case-insensitive when other chars have specific case`);return`${t?Ce`\P`:Ce`\p`}{${a?`${a}=`:""}${i}}`}if(e==="word")return t?Ce`\W`:Ce`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:i,parent:a},o,s){const c=o.currentFlags;i&&(o.currentFlags=Vs(c,i));const f=t.map(s).join("|"),d=!o.verbose&&t.length===1&&a.type!=="Quantifier"&&!e&&(!o.useFlagMods||!i)?f:`(?${XR(e,i,o.useFlagMods)}${f})`;return o.currentFlags=c,d},LookaroundAssertion({body:e,kind:t,negate:i},a,o){return`(?${`${t==="lookahead"?"":"<"}${i?"!":"="}`}${e.map(o).join("|")})`},Quantifier(e,t,i){return i(e.body)+QR(e)},Subroutine({isRecursive:e,ref:t},i){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const a=i.recursionLimit;return t===0?`(?R=${a})`:Ce`\g<${t}&R=${a}>`}},GR=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),$R=new Set(["-","\\","]","^","["]),qR=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),ib=new Map([[9,Ce`\t`],[10,Ce`\n`],[11,Ce`\v`],[12,Ce`\f`],[13,Ce`\r`],[8232,Ce`\u2028`],[8233,Ce`\u2029`],[65279,Ce`\uFEFF`]]),FR=new RegExp("^\\p{Cased}$","u");function bh(e){return FR.test(e)}function O1(e,t){const i=!!t?.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=yt(c);if(!bh(f))continue;const d=w1(f).filter(p=>{const g=p.codePointAt(0);return g<a||g>o});if(d.length&&(s.push(...d),i))break}return s}function ra(e,{escDigit:t,inCharClass:i,useFlagV:a}){if(ib.has(e))return ib.get(e);if(e<32||e>126&&e<160||e>262143||t&&ZR(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const o=i?a?qR:$R:GR,s=yt(e);return(o.has(s)?"\\":"")+s}function YR(e){const t=e.map(o=>o.codePointAt(0)).sort((o,s)=>o-s),i=[];let a=null;for(let o=0;o<t.length;o++)t[o+1]===t[o]+1?a??=t[o]:a===null?i.push(t[o]):(i.push([a,t[o]]),a=null);return i}function XR(e,t,i){if(e)return">";let a="";if(t&&i){const{enable:o,disable:s}=t;a=(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")+(s?"-":"")+(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")}return`${a}:`}function QR({kind:e,max:t,min:i}){let a;return!i&&t===1?a="?":!i&&t===1/0?a="*":i===1&&t===1/0?a="+":i===t?a=`{${i}}`:a=`{${i},${t===1/0?"":t}}`,a+{greedy:"",lazy:"?",possessive:"+"}[e]}function rb({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function ZR(e){return e>47&&e<58}function ab({type:e,value:t}){return e==="Character"&&t===45}var KR=class Hd extends RegExp{#t=new Map;#e=null;#i;#n=null;#r=null;rawOptions={};get source(){return this.#i||"(?:)"}constructor(t,i,a){const o=!!a?.lazyCompile;if(t instanceof RegExp){if(a)throw new Error("Cannot provide options when copying a regexp");const s=t;super(s,i),this.#i=s.source,s instanceof Hd&&(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?"":t,i),this.#i=t,this.#t=JR(s.hiddenCaptures,s.transfers),this.#r=s.strategy,this.rawOptions=a??{}}o||(this.#e=this)}exec(t){if(!this.#e){const{lazyCompile:o,...s}=this.rawOptions;this.#e=new Hd(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(t.slice(a));return o&&(WR(o,a,t,this.hasIndices),this.lastIndex+=a),o}return this.#a(t)}#a(t){this.#e.lastIndex=this.lastIndex;const i=super.exec.call(this.#e,t);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=eD(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 WR(e,t,i,a){if(e.index+=t,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]+t,f[1]+t])}const s=o.groups;s&&Object.keys(s).forEach(c=>{const f=s[c];f&&(s[c]=[f[0]+t,f[1]+t])})}}function JR(e,t){const i=new Map;for(const a of e)i.set(a,{hidden:!0});for(const[a,o]of t)for(const s of o)zl(i,s,{}).transferTo=a;return i}function eD(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,i=new Map;let a=0,o=0,s;for(;s=t.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 tD(e,t){const i=nD(e,t);return i.options?new KR(i.pattern,i.flags,i.options):new RegExp(i.pattern,i.flags)}function nD(e,t){const i=C1(t),a=g1(e,{flags:i.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:i.rules.captureGroup,singleline:i.rules.singleline},skipBackrefValidation:i.rules.allowOrphanBackrefs,unicodePropertyMap:yh}),o=LR(a,{accuracy:i.accuracy,asciiWordBoundaries:i.rules.asciiWordBoundaries,avoidSubclass:i.avoidSubclass,bestEffortTarget:i.target}),s=BR(o,i),c=bR(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),f=gR(c.pattern),d=mR(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,A)=>S-A),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 lb=4294967295;class iD{constructor(t,i={}){this.patterns=t,this.options=i;const{forgiving:a=!1,cache:o,regexConstructor:s}=i;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.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(t,i,a){const o=typeof t=="string"?t:t.content,s=[];function c(f,d,p=0){return{index:f,captureIndices:d.indices.map(g=>g==null?{start:lb,end:lb,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 rD(e,t){return tD(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function aD(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=i=>rD(i,{target:t.target}),{createScanner(i){return new iD(i,t)},createString(i){return{content:i}}}}const ob=new Map;function lD({className:e,children:t}){const[i,a]=re.useState(null),o=e?.match(/language-([^\s]+)/)?.[1]??"text",s=String(t??"").replace(/\n$/,"");return re.useEffect(()=>{let c=!1;return a(null),oD(s,o).then(f=>{c||a(f)}),()=>{c=!0}},[s,o]),i===null?H.jsx("pre",{children:H.jsx("code",{children:t})}):H.jsx("div",{dangerouslySetInnerHTML:{__html:i}})}async function oD(e,t){const i=`${t}\0${e}`,a=ob.get(i);if(a)return a;const o=sD(e,t).catch(()=>null);return ob.set(i,o),o}async function sD(e,t){try{return await B0(e,{lang:t,theme:"github-dark-default"})}catch{return B0(e,{lang:"text",theme:"github-dark-default"})}}function vh({content:e,className:t,variant:i}){const a=["markdown-content",i?`markdown-content-${i}`:null,t].filter(Boolean).join(" ");return H.jsx("div",{className:a,children:H.jsx(mA,{components:{pre({children:o}){if(re.isValidElement(o)){const{className:s,children:c}=o.props;return H.jsx(lD,{className:s,children:c})}return H.jsx("pre",{children:o})}},children:e})})}function uD({open:e,content:t,loading:i,onClose:a}){return H.jsx(Gb,{open:e,title:"brief",ariaLabel:"Reviewer brief",closeLabel:"close brief",bodyClassName:"brief-dialog-body-wrap",onClose:a,children:i&&!t?H.jsx("div",{className:"brief-dialog-empty",children:"Generating brief…"}):H.jsx(vh,{content:t,className:"brief-dialog-body",variant:"brief"})})}function M1({checked:e,label:t,onChange:i,className:a}){return H.jsxs("label",{className:`checkbox-btn${a?` ${a}`:""}`,children:[H.jsx("input",{type:"checkbox",className:"checkbox-input",checked:e,onChange:o=>i(o.target.checked)}),H.jsx("span",{className:"checkbox-box","aria-hidden":"true",children:e&&H.jsx(VE,{size:10,strokeWidth:3})}),H.jsx("span",{children:t})]})}function cD({open:e,thread:t,body:i,skipAgentResponse:a,onBodyChange:o,onSkipAgentResponseChange:s,onSubmit:c,onClose:f,onToggleResolved:d}){const p=re.useRef(null),g=re.useRef(null),y=t?"conversation":"new conversation",v=t?.resolved?"reopen":"resolve",b=t?"comment":"start thread",S=i.trim().length>0,A=re.useMemo(()=>t?.messages??[],[t]);re.useEffect(()=>{e&&p.current?.focus()},[e,t?.id]),re.useLayoutEffect(()=>{if(!e)return;const x=g.current;x&&(x.scrollTop=x.scrollHeight)},[A.length,e,t?.id,t?.loading]);const D=x=>{x.key==="Enter"&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),S&&c()),x.key==="Escape"&&(x.preventDefault(),f())};return H.jsx(Gb,{open:e,title:y,ariaLabel:y,closeLabel:"close conversation",bodyClassName:"detached-thread-dialog-body-wrap",onClose:f,children:H.jsxs("div",{className:"detached-thread-dialog-layout",children:[H.jsxs("div",{ref:g,className:"detached-thread-dialog-messages",children:[A.map((x,T)=>H.jsxs("div",{className:`detached-thread-dialog-message detached-thread-dialog-message-${x.role}`,children:[H.jsx("span",{className:"detached-thread-dialog-role",children:x.role==="user"?"you":"agent"}),H.jsx(vh,{content:x.text,className:"detached-thread-dialog-text",variant:"thread"})]},`${x.role}:${T}:${x.text}`)),t?.loading&&H.jsxs("div",{className:"detached-thread-dialog-message detached-thread-dialog-message-assistant",children:[H.jsx("span",{className:"detached-thread-dialog-role",children:"agent"}),H.jsx("span",{className:"detached-thread-dialog-thinking",children:"thinking…"})]})]}),H.jsxs("div",{className:"detached-thread-dialog-composer",style:{borderTop:A.length===0?"none":void 0},children:[H.jsx("textarea",{ref:p,className:"text-input-area detached-thread-dialog-input",value:i,onChange:x=>o(x.target.value),onKeyDown:D,placeholder:t?"Reply…":"Start a conversation…",rows:3}),H.jsxs("div",{className:"detached-thread-dialog-actions",children:[H.jsx(M1,{checked:a,label:"skip agent reply",onChange:s}),t&&H.jsx("button",{type:"button",className:"btn detached-thread-dialog-secondary",onClick:()=>d(!t.resolved),children:v}),H.jsx("button",{type:"button",className:"btn primary",disabled:!S,onClick:c,children:b})]})]})]})})}const fD={position:"absolute",top:0,bottom:0,textAlign:"center"},dD={display:"contents"};function sb(){return null}const Gs="diffs-container",hD=/(?=^From [a-f0-9]+ .+$)/m,As=/(?=^diff --git)/gm,ub=/(?=^---\s+\S)/gm,pD=/(?=^@@ )/gm,mD=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,ed=new RegExp("(?<=\\n)"),gD=/^(---|\+\+\+)\s+([^\t\r\n]+)/,yD=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,bD=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,vD=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,_h="header-prefix",Sh="header-metadata",Eh="header-custom",zn={dark:"pierre-dark",light:"pierre-light"},I1="data-theme-css",z1="data-unsafe-css",ma=1,_D={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,hunkSeparatorHeight:32,fileGap:8},SD=Object.freeze({fromStart:0,fromEnd:0}),cb={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},ED={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function Ul(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function xD(e,t){return typeof window>"u"&&t!=null?H.jsxs(H.Fragment,{children:[H.jsx("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:t}}),e]}):H.jsx(H.Fragment,{children:e})}const CD=re.createContext(void 0);function wD(){return re.useContext(CD)}const dr=new Map,td=new Map,Pd=new Map,Bd=new Set;function fb(e,t){e=Array.isArray(e)?e:[e];for(let i of e){let a;if(typeof i=="string"){if(a=dr.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,dr.has(i)||dr.set(i,a);Bd.has(i)||(Bd.add(i),t.loadThemeSync(a))}}const Hl=new Map,nd=new Map,kD=new Map,jd=new Set;function db(e,t){e=Array.isArray(e)?e:[e];for(const i of e){if(jd.has(i.name))continue;let a=Hl.get(i.name);a==null&&(a=i,Hl.set(i.name,a)),jd.add(a.name),t.loadLanguageSync(a.data)}}function U1(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function AD(e){if(U1())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 t=nd.get(e);if(t!=null)return t;try{let i=kD.get(e);if(i==null&&Object.prototype.hasOwnProperty.call(Nd,e)&&(i=Nd[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 Hl.has(e)||Hl.set(e,s),s});return nd.set(e,a),await a}finally{nd.delete(e)}}function TD(e){return Hl.get(e)??AD(e)}async function LD(e){if(U1())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 t=td.get(e);if(t!=null)return t;try{const i=Pd.get(e)??l1[e];if(i==null)throw new Error(`resolveTheme: No valid loader for ${e}`);const a=i().then(s=>RD(e,"default"in s?s.default:s));td.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 dr.set(o.name,o),o}finally{td.delete(e)}}function RD(e,t){const i=dr.get(e);return i??(t=Ws(t),dr.set(e,t),t)}function DD(e){return dr.get(e)??LD(e)}function H1(e,t){if(Pd.has(e)){console.error("SharedHighlight.registerCustomTheme: theme name already registered",e);return}Pd.set(e,t)}let Mn;async function ND({themes:e,langs:t,preferredHighlighter:i="shiki-js"}){Mn??=u1({themes:[],langs:["text"],engine:i==="shiki-wasm"?s1(C(()=>import("./wasm-CG6Dc4jp.js"),[])):aD()});const a=MD(Mn)?await Mn:Mn;Mn=a;const o=[];for(const c of t){if(c==="text"||c==="ansi")continue;const f=TD(c);"then"in f?o.push(f):db(f,a)}const s=[];for(const c of e){const f=DD(c);"then"in f?s.push(f):fb(f,Mn)}return(o.length>0||s.length>0)&&await Promise.all([Promise.all(o).then(c=>{db(c,a)}),Promise.all(s).then(c=>{fb(c,a)})]),a}function OD(){if(Mn!=null&&!("then"in Mn))return Mn}function MD(e=Mn){return e!=null&&"then"in e}H1("pierre-dark",async()=>{const{default:e}=await C(async()=>{const{default:t}=await import("./pierre-dark-DF2SEV7i.js");return{default:t}},[]);return{...e,name:"pierre-dark"}});H1("pierre-light",async()=>{const{default:e}=await C(async()=>{const{default:t}=await import("./pierre-light-DOlZxES8.js");return{default:t}},[]);return{...e,name:"pierre-light"}});function P1(e=zn){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function B1(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}const aa=new Map,Cl={"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 ya(e){if(aa.has(e))return aa.get(e)??"text";if(Cl[e]!=null)return Cl[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(aa.has(t[1]))return aa.get(t[1])??"text";if(Cl[t[1]]!=null)return Cl[t[1]]??"text"}const i=e.match(/\.([^.]+)$/)?.[1]??"";return aa.has(i)?aa.get(i)??"text":Cl[i]??"text"}function ba(e){return e.replace(/\n$|\r\n$/,"")}function li(e){return{type:"text",value:e}}function Re({tagName:e,children:t=[],properties:i={}}){return{type:"element",tagName:e,properties:i,children:t}}function $s({name:e,width:t=16,height:i=16,properties:a}){return Re({tagName:"svg",properties:{width:t,height:i,viewBox:"0 0 16 16",...a},children:[Re({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function ID(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t;"children"in t?t=t.children[0]:t=null}}function ys(e){return Re({tagName:"div",properties:{"data-gutter":""},children:e})}function zD(e,t,i,a={}){return Re({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":i,...a},children:t!=null?[Re({tagName:"span",properties:{"data-line-number-content":""},children:[li(`${t}`)]})]:void 0})}function Sn(e,t,i){return Re({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":i,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${i};`:`grid-row: span ${i};min-height:calc(${i} * 1lh);`}})}function UD(e,t,i){const a=typeof i.lineInfo=="function"?i.lineInfo(t):i.lineInfo[t-1];if(a==null){const o=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(o,{node:e,line:t,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(li(`
|
|
175
|
-
`)),e}const bs=Symbol("no-token"),id=Symbol("multiple-tokens");function j1(e){const t=HD(e);if(t!=null)return t;let i=bs;const a=[];let o=[],s;const c=()=>{if(o.length===0||s==null){o=[],s=void 0;return}if(o.length===1){const d=o[0];if(d?.type==="element"){PD(d,s);for(const p of d.children)Ts(p)}else Ts(d);a.push(d),o=[],s=void 0;return}for(const d of o)Ts(d);a.push(Re({tagName:"span",properties:{"data-char":s},children:o})),o=[],s=void 0},f=d=>{if(d!==bs){if(d===id){i=id;return}if(i===bs){i=d;return}i!==d&&(i=id)}};for(const d of e.children){const p=d.type==="element"?j1(d):bs;if(f(p),typeof p!="number"){c(),a.push(d);continue}s!=null&&s!==p&&c(),s??=p,o.push(d)}return c(),e.children=a,i}function HD(e){const t=e.properties["data-char"];if(typeof t=="number")return t}function Ts(e){if(e.type==="element"){e.properties["data-char"]=void 0;for(const t of e.children)Ts(t)}}function PD(e,t){e.properties["data-char"]=t}function BD(e={}){const{classPrefix:t="__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=t+jD(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 jD(e,t=0){let i=3735928559^t,a=1103547991^t;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 VD(e=!1,t=!1){const i={lineInfo:[]},a=[{line(o){return delete o.properties.class,o},pre(o){const s=ID(o),c=[];if(s!=null){let f=1;for(const d of s.children)d.type==="element"&&(e&&j1(d),c.push(UD(d,f,i)),f++);s.children=c}return o},...e?{tokens(o){for(const s of o){let c=0;for(const f of s){const d=f;d.__lineChar??=c,c+=f.content.length}}},preprocess(o,s){s.mergeWhitespaces="never"},span(o,s,c,f,d){if(d?.offset!=null&&d.content!=null){const p=d.__lineChar;return p!=null&&(o.properties["data-char"]=p),o}return o}}:null}];return t&&a.push(GD,hb),{state:i,transformers:a,toClass:hb}}const hb=BD({classPrefix:"hl-"}),GD={name:"token-style-normalizer",tokens(e){for(const t of e)for(const i of t){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 En(e){return`--${e==="token"?"diffs-token":"diffs"}-`}function $D({theme:e=zn,highlighter:t,prefix:i}){let a="";if(typeof e=="string"){const o=t.getTheme(e);a+=`color:${o.fg};`,a+=`background-color:${o.bg};`,a+=`${En("global")}fg:${o.fg};`,a+=`${En("global")}bg:${o.bg};`,a+=rd(o,i)}else{let o=t.getTheme(e.dark);a+=`${En("global")}dark:${o.fg};`,a+=`${En("global")}dark-bg:${o.bg};`,a+=rd(o,"dark"),o=t.getTheme(e.light),a+=`${En("global")}light:${o.fg};`,a+=`${En("global")}light-bg:${o.bg};`,a+=rd(o,"light")}return a}function rd(e,t){t=t!=null?`${t}-`:"";let i="";const a=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];a!=null&&(i+=`${En("global")}${t}addition-color:${a};`);const o=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];o!=null&&(i+=`${En("global")}${t}deletion-color:${o};`);const s=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return s!=null&&(i+=`${En("global")}${t}modified-color:${s};`),i}function pb(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t.children;"children"in t?t=t.children[0]:t=null}throw console.error(e),new Error("getLineNodes: Unable to find children")}function mb(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function ad(e,t){return B1(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function qD(e){const t=e.lang??ya(e.name),i=e.lang??(e.prevName!=null?ya(e.prevName):"text");return t==="text"&&i==="text"}function qs({diff:e,diffStyle:t,startingLine:i=0,totalLines:a=1/0,expandedHunks:o,collapsedContextThreshold:s=ma,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 t==="unified"?g:(t==="split"||g)&&y},shouldSkip(g,y){if(!f.isWindowedHighlight)return!1;const v=f.unifiedCount+g<i,b=f.splitCount+y<i;return t==="unified"?v:(t==="split"||v)&&b},incrementCounts(g,y){(t==="unified"||t==="both")&&(f.unifiedCount+=g),(t==="split"||t==="both")&&(f.splitCount+=y)},isInWindow(g,y){if(!f.isWindowedHighlight)return!0;const v=f.isInUnifiedWindow(g),b=f.isInSplitWindow(y);return t==="unified"?v:t==="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||(t==="unified"?f.incrementCounts(1,0):t==="split"?f.incrementCounts(0,1):f.incrementCounts(1,1)),c(g)??!1}};e:for(const[g,y]of e.hunks.entries()){let A=function(G,ee){return b==null||b.collapsedLines<=0||b.fromStart+b.fromEnd>0?0:t==="unified"?G===y.unifiedLineStart+y.unifiedLineCount-1?b.collapsedLines:0:ee===y.splitLineStart+y.splitLineCount-1?b.collapsedLines:0},D=function(){if(v.collapsedLines===0)return 0;const G=v.collapsedLines;return v.collapsedLines=0,G};var d=A,p=D;if(f.shouldBreak())break;const v=gb(e.isPartial,y.collapsedBefore,o,g,s),b=(()=>{if(y!==f.finalHunk||!FD(e))return;const G=e.additionLines.length-(y.additionLineIndex+y.additionCount),ee=e.deletionLines.length-(y.deletionLineIndex+y.deletionCount);if(G!==ee)throw new Error(`iterateOverDiff: trailing context mismatch (additions=${G}, deletions=${ee}) for ${e.name}`);const ae=Math.min(G,ee);return gb(e.isPartial,ae,o,e.hunks.length,s)})(),S=v.fromStart+v.fromEnd;if(f.shouldSkip(S,S))f.incrementCounts(S,S),D();else{let G=y.unifiedLineStart-v.rangeSize,ee=y.splitLineStart-v.rangeSize,ae=y.deletionLineIndex-v.rangeSize,ne=y.additionLineIndex-v.rangeSize,W=y.deletionStart-v.rangeSize,fe=y.additionStart-v.rangeSize,ie=0;for(;ie<v.fromStart;){if(f.isInWindow(0,0)){if(f.emit({hunkIndex:g,hunk:y,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:W+ie,lineIndex:ae+ie,noEOFCR:!1,unifiedLineIndex:G+ie,splitLineIndex:ee+ie},additionLine:{unifiedLineIndex:G+ie,splitLineIndex:ee+ie,lineIndex:ne+ie,lineNumber:fe+ie,noEOFCR:!1}}))break e}else f.incrementCounts(1,1);ie++}for(G=y.unifiedLineStart-v.fromEnd,ee=y.splitLineStart-v.fromEnd,ae=y.deletionLineIndex-v.fromEnd,ne=y.additionLineIndex-v.fromEnd,W=y.deletionStart-v.fromEnd,fe=y.additionStart-v.fromEnd,ie=0;ie<v.fromEnd;){if(f.isInWindow(0,0)){if(f.emit({hunkIndex:g,hunk:y,collapsedBefore:D(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:W+ie,lineIndex:ae+ie,noEOFCR:!1,unifiedLineIndex:G+ie,splitLineIndex:ee+ie},additionLine:{unifiedLineIndex:G+ie,splitLineIndex:ee+ie,lineIndex:ne+ie,lineNumber:fe+ie,noEOFCR:!1}}))break e}else f.incrementCounts(1,1);ie++}}let x=y.unifiedLineStart,T=y.splitLineStart,k=y.deletionLineIndex,I=y.additionLineIndex,z=y.deletionStart,R=y.additionStart;const P=y.hunkContent.at(-1);for(const G of y.hunkContent){if(f.shouldBreak())break e;const ee=G===P;if(G.type==="context"){if(f.shouldSkip(G.lines,G.lines))f.incrementCounts(G.lines,G.lines),D();else{let ae=0;for(;ae<G.lines;){if(f.isInWindow(0,0)){const ne=ee&&ae===G.lines-1,W=x+ae,fe=T+ae;if(f.emit({hunkIndex:g,hunk:y,collapsedBefore:D(),collapsedAfter:A(W,fe),type:"context",deletionLine:{lineNumber:z+ae,lineIndex:k+ae,noEOFCR:ne&&y.noEOFCRDeletions,unifiedLineIndex:W,splitLineIndex:fe},additionLine:{unifiedLineIndex:W,splitLineIndex:fe,lineIndex:I+ae,lineNumber:R+ae,noEOFCR:ne&&y.noEOFCRAdditions}}))break e}else f.incrementCounts(1,1);ae++}}x+=G.lines,T+=G.lines,k+=G.lines,I+=G.lines,z+=G.lines,R+=G.lines}else{const ae=Math.max(G.deletions,G.additions),ne=G.deletions+G.additions;if(!f.shouldSkip(ne,ae)){const W=YD(f,G,t);for(const[fe,ie]of W)for(let te=fe;te<ie;te++){const B=A(x+te,t==="unified"?T+(te<G.deletions?te:te-G.deletions):T+te);if(f.emit(XD({hunkIndex:g,hunk:y,collapsedBefore:D(),collapsedAfter:B,diffStyle:t,index:te,unifiedLineIndex:x,splitLineIndex:T,additionLineIndex:I,deletionLineIndex:k,additionLineNumber:R,deletionLineNumber:z,content:G,isLastContent:ee,unifiedCount:ne,splitCount:ae}),!0))break e}}D(),f.incrementCounts(ne,ae),x+=ne,T+=ae,k+=G.deletions,I+=G.additions,z+=G.deletions,R+=G.additions}}if(b!=null){const{collapsedLines:G,fromStart:ee,fromEnd:ae}=b,ne=ee+ae;let W=0;for(;W<ne;){if(f.shouldBreak())break e;if(f.isInWindow(0,0)){const fe=W===ne-1;if(f.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:fe?G:0,type:"context-expanded",deletionLine:{lineNumber:z+W,lineIndex:k+W,noEOFCR:!1,unifiedLineIndex:x+W,splitLineIndex:T+W},additionLine:{unifiedLineIndex:x+W,splitLineIndex:T+W,lineIndex:I+W,lineNumber:R+W,noEOFCR:!1}}))break e}else f.incrementCounts(1,1);W++}}}}function gb(e,t,i,a,o){if(t=Math.max(t,0),t===0||e)return{fromStart:0,fromEnd:0,rangeSize:t,collapsedLines:Math.max(t,0)};if(i===!0||t<=o)return{fromStart:t,fromEnd:0,rangeSize:t,collapsedLines:0};const s=i?.get(a),c=Math.min(Math.max(s?.fromStart??0,0),t),f=Math.min(Math.max(s?.fromEnd??0,0),t),d=c+f,p=d>=t;return{fromStart:p?t:c,fromEnd:p?0:f,rangeSize:t,collapsedLines:Math.max(t-d,0)}}function FD(e){const t=e.hunks.at(-1);return t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0?!1:t.additionLineIndex+t.additionCount<e.additionLines.length||t.deletionLineIndex+t.deletionCount<e.deletionLines.length}function YD(e,t,i){if(!e.isWindowedHighlight)return[[0,i==="unified"?t.deletions+t.additions:Math.max(t.deletions,t.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]+t.deletions,y[1]+t.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,t.deletions),"deletions"),p(f(e.unifiedCount+t.deletions,t.additions),"additions")),o&&(p(f(e.splitCount,t.deletions),"deletions"),p(f(e.splitCount,t.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 XD({hunkIndex:e,hunk:t,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:A}){const D=s<v.deletions?c+s:void 0,x=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,k=s<v.deletions?p+s:void 0,I=s<v.deletions?y+s:void 0,z=o==="unified"?s>=v.deletions?d+(s-v.deletions):void 0:s<v.additions?d+s:void 0,R=o==="unified"?s>=v.deletions?g+(s-v.deletions):void 0:s<v.additions?g+s:void 0,P=o==="unified"?b&&s===v.deletions-1&&t.noEOFCRDeletions:b&&s===A-1&&t.noEOFCRDeletions,G=o==="unified"?b&&s===S-1&&t.noEOFCRAdditions:b&&s===A-1&&t.noEOFCRAdditions,ee=k!=null&&I!=null&&D!=null?{lineNumber:I,lineIndex:k,noEOFCR:P,unifiedLineIndex:D,splitLineIndex:T}:void 0,ae=z!=null&&R!=null&&x!=null?{unifiedLineIndex:x,splitLineIndex:T,lineIndex:z,lineNumber:R,noEOFCR:G}:void 0;if(ee==null&&ae!=null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:void 0,additionLine:ae};if(ee!=null&&ae==null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:ee,additionLine:void 0};if(ee==null||ae==null)throw new Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:ee,additionLine:ae}}class xh{diff(t,i,a={}){let o;typeof a=="function"?(o=a,a={}):"callback"in a&&(o=a.callback);const s=this.castInput(t,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(t,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=t.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,t,0,a);if(b[0].oldPos+1>=d&&S+1>=f)return c(this.buildValues(b[0].lastComponent,i,t));let A=-1/0,D=1/0;const x=()=>{for(let T=Math.max(A,-p);T<=Math.min(D,p);T+=2){let k;const I=b[T-1],z=b[T+1];I&&(b[T-1]=void 0);let R=!1;if(z){const G=z.oldPos-T;R=z&&0<=G&&G<f}const P=I&&I.oldPos+1<d;if(!R&&!P){b[T]=void 0;continue}if(!P||R&&I.oldPos<z.oldPos?k=this.addToPath(z,!0,!1,0,a):k=this.addToPath(I,!1,!0,1,a),S=this.extractCommon(k,i,t,T,a),k.oldPos+1>=d&&S+1>=f)return c(this.buildValues(k.lastComponent,i,t))||!0;b[T]=k,k.oldPos+1>=d&&(D=Math.min(D,T-1)),S+1>=f&&(A=Math.max(A,T+1))}p++};if(o)(function T(){setTimeout(function(){if(p>g||Date.now()>v)return o(void 0);x()||T()},0)})();else for(;p<=g&&Date.now()<=v;){const T=x();if(T)return T}}addToPath(t,i,a,o,s){const c=t.lastComponent;return c&&!s.oneChangePerToken&&c.added===i&&c.removed===a?{oldPos:t.oldPos+o,lastComponent:{count:c.count+1,added:i,removed:a,previousComponent:c.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:i,removed:a,previousComponent:c}}}extractCommon(t,i,a,o,s){const c=i.length,f=a.length;let d=t.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&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return g&&!s.oneChangePerToken&&(t.lastComponent={count:g,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=d,p}equals(t,i,a){return a.comparator?a.comparator(t,i):t===i||!!a.ignoreCase&&t.toLowerCase()===i.toLowerCase()}removeEmpty(t){const i=[];for(let a=0;a<t.length;a++)t[a]&&i.push(t[a]);return i}castInput(t,i){return t}tokenize(t,i){return Array.from(t)}join(t){return t.join("")}postProcess(t,i){return t}get useLongestToken(){return!1}buildValues(t,i,a){const o=[];let s;for(;t;)o.push(t),s=t.previousComponent,delete t.previousComponent,t=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 QD extends xh{}const ZD=new QD;function KD(e,t,i){return ZD.diff(e,t,i)}const yb="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 WD extends xh{tokenize(t){const i=new RegExp(`(\\r?\\n)|[${yb}]+|[^\\S\\n\\r]+|[^${yb}]`,"ug");return t.match(i)||[]}}const JD=new WD;function eN(e,t,i){return JD.diff(e,t,i)}class tN extends xh{constructor(){super(...arguments),this.tokenize=iN}equals(t,i,a){return a.ignoreWhitespace?((!a.newlineIsToken||!t.includes(`
|
|
176
|
-
`))&&(t=t.trim()),(!a.newlineIsToken||!i.includes(`
|
|
177
|
-
`))&&(i=i.trim())):a.ignoreNewlineAtEof&&!a.newlineIsToken&&(t.endsWith(`
|
|
178
|
-
`)&&(t=t.slice(0,-1)),i.endsWith(`
|
|
179
|
-
`)&&(i=i.slice(0,-1))),super.equals(t,i,a)}}const nN=new tN;function bb(e,t,i){return nN.diff(e,t,i)}function iN(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
180
|
-
`));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&&!t.newlineIsToken?i[i.length-1]+=s:i.push(s)}return i}const rN={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function vb(e,t,i,a,o,s,c){let f;c?typeof c=="function"?f={callback:c}:f=c: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;bb(i,a,Object.assign(Object.assign({},f),{callback:y=>{const v=p(y);g(v)}}))}else return p(bb(i,a,f));function p(g){if(!g)return;g.push({value:"",lines:[]});function y(T){return T.map(function(k){return" "+k})}const v=[];let b=0,S=0,A=[],D=1,x=1;for(let T=0;T<g.length;T++){const k=g[T],I=k.lines||lN(k.value);if(k.lines=I,k.added||k.removed){if(!b){const z=g[T-1];b=D,S=x,z&&(A=d>0?y(z.lines.slice(-d)):[],b-=A.length,S-=A.length)}for(const z of I)A.push((k.added?"+":"-")+z);k.added?x+=I.length:D+=I.length}else{if(b)if(I.length<=d*2&&T<g.length-2)for(const z of y(I))A.push(z);else{const z=Math.min(I.length,d);for(const P of y(I.slice(0,z)))A.push(P);const R={oldStart:b,oldLines:D-b+z,newStart:S,newLines:x-S+z,lines:A};v.push(R),b=0,S=0,A=[]}D+=I.length,x+=I.length}}for(const T of v)for(let k=0;k<T.lines.length;k++)T.lines[k].endsWith(`
|
|
181
|
-
`)?T.lines[k]=T.lines[k].slice(0,-1):(T.lines.splice(k+1,0,"\"),k++);return{oldFileName:e,newFileName:t,oldHeader:o,newHeader:s,hunks:v}}}function Vd(e,t){if(t||(t=rN),Array.isArray(e)){if(e.length>1&&!t.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=>Vd(a,t)).join(`
|
|
182
|
-
`)}const i=[];t.includeIndex&&e.oldFileName==e.newFileName&&i.push("Index: "+e.oldFileName),t.includeUnderline&&i.push("==================================================================="),t.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(`
|
|
183
|
-
`)+`
|
|
184
|
-
`}function aN(e,t,i,a,o,s,c){if(typeof c=="function"&&(c={callback:c}),c?.callback){const{callback:f}=c;vb(e,t,i,a,o,s,Object.assign(Object.assign({},c),{callback:d=>{f(d?Vd(d,c.headerOptions):void 0)}}))}else{const f=vb(e,t,i,a,o,s,c);return f?Vd(f,c?.headerOptions):void 0}}function lN(e){const t=e.endsWith(`
|
|
185
|
-
`),i=e.split(`
|
|
186
|
-
`).map(a=>a+`
|
|
187
|
-
`);return t?i.pop():i.push(i.pop().slice(0,-1)),i}function _b({line:e,spanStart:t,spanLength:i}){return{start:{line:e,character:t},end:{line:e,character:t+i},properties:{"data-diff-span":""},alwaysWrap:!0}}function vs({item:e,arr:t,enableJoin:i,isNeutral:a=!1,isLastItem:o=!1}){const s=t[t.length-1];if(s==null||o||!i){t.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}t.push([a?0:1,e.value])}const oN={forcePlainText:!1};function sN(e,t,i,{forcePlainText:a,startingLine:o,totalLines:s,expandedHunks:c,collapsedContextThreshold:f=ma}=oN){a?(o??=0,s??=1/0):(o=0,s=1/0);const d=o>0||s<1/0,p=typeof i.theme=="string"?t.getTheme(i.theme).type:void 0,g=$D({theme:i.theme,highlighter:t}),y=a&&!d&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":i.lineDiffType,v={deletionLines:[],additionLines:[]},{maxLineDiffLength:b}=i,S=!a&&!e.isPartial,A=a?c:void 0,D=new Map;function x(k){const I=S?0:k,z=D.get(I)??cN();return D.set(I,z),z}function T(k,I,z,R){if(d){let P=z.at(-1);(P==null||P.targetIndex+P.count!==I)&&(P={targetIndex:I,originalOffset:R.length,count:0},z.push(P)),P.count++}R.push(k)}qs({diff:e,diffStyle:"both",startingLine:o,totalLines:s,expandedHunks:d?A:!0,collapsedContextThreshold:f,callback:({hunkIndex:k,additionLine:I,deletionLine:z,type:R})=>{const P=x(k),G=I!=null?I.splitLineIndex:z.splitLineIndex;R==="change"&&I!=null&&z!=null&&uN({additionLine:e.additionLines[I.lineIndex],deletionLine:e.deletionLines[z.lineIndex],deletionLineIndex:P.deletionContent.length,additionLineIndex:P.additionContent.length,deletionDecorations:P.deletionDecorations,additionDecorations:P.additionDecorations,lineDiffType:y,maxLineDiffLength:b}),z!=null&&(T(e.deletionLines[z.lineIndex],z.lineIndex,P.deletionSegments,P.deletionContent),P.deletionInfo.push({type:R==="change"?"change-deletion":R,lineNumber:z.lineNumber,altLineNumber:R==="change"?void 0:I.lineNumber??void 0,lineIndex:`${z.unifiedLineIndex},${G}`})),I!=null&&(T(e.additionLines[I.lineIndex],I.lineIndex,P.additionSegments,P.additionContent),P.additionInfo.push({type:R==="change"?"change-addition":R,lineNumber:I.lineNumber,altLineNumber:R==="change"?void 0:z.lineNumber??void 0,lineIndex:`${I.unifiedLineIndex},${G}`}))}});for(const k of D.values()){if(k.deletionContent.length===0&&k.additionContent.length===0)continue;const I={name:e.prevName??e.name,contents:k.deletionContent.value},z={name:e.name,contents:k.additionContent.value},{deletionLines:R,additionLines:P}=fN({deletionFile:I,deletionInfo:k.deletionInfo,deletionDecorations:k.deletionDecorations,additionFile:z,additionInfo:k.additionInfo,additionDecorations:k.additionDecorations,highlighter:t,options:i,languageOverride:a?"text":e.lang});if(S){v.deletionLines=R,v.additionLines=P;continue}if(k.deletionSegments.length>0)for(const G of k.deletionSegments)for(let ee=0;ee<G.count;ee++)v.deletionLines[G.targetIndex+ee]=R[G.originalOffset+ee];else v.deletionLines.push(...R);if(k.additionSegments.length>0)for(const G of k.additionSegments)for(let ee=0;ee<G.count;ee++)v.additionLines[G.targetIndex+ee]=P[G.originalOffset+ee];else v.additionLines.push(...P)}return{code:v,themeStyles:g,baseThemeType:p}}function uN({deletionLine:e,additionLine:t,deletionLineIndex:i,additionLineIndex:a,deletionDecorations:o,additionDecorations:s,lineDiffType:c,maxLineDiffLength:f}){if(e==null||t==null||c==="none"||(e=ba(e),t=ba(t),e.length>f||t.length>f))return;const d=c==="char"?KD(e,t):eN(e,t),p=[],g=[],y=c==="word-alt",v=d.at(-1);for(const S of d){const A=S===v;!S.added&&!S.removed?(vs({item:S,arr:p,enableJoin:y,isNeutral:!0,isLastItem:A}),vs({item:S,arr:g,enableJoin:y,isNeutral:!0,isLastItem:A})):S.removed?vs({item:S,arr:p,enableJoin:y,isLastItem:A}):vs({item:S,arr:g,enableJoin:y,isLastItem:A})}let b=0;for(const S of p)S[0]===1&&o.push(_b({line:i,spanStart:b,spanLength:S[1].length})),b+=S[1].length;b=0;for(const S of g)S[0]===1&&s.push(_b({line:a,spanStart:b,spanLength:S[1].length})),b+=S[1].length}function cN(){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 fN({deletionFile:e,additionFile:t,deletionInfo:i,additionInfo:a,highlighter:o,deletionDecorations:s,additionDecorations:c,languageOverride:f,options:{theme:d=zn,...p}}){const g=f??ya(e.name),y=f??ya(t.name),{state:v,transformers:b}=VD(p.useTokenTransformer),S=typeof d=="string"?{...p,lang:"text",theme:d,transformers:b,decorations:void 0,defaultColor:!1,cssVariablePrefix:En("token")}:{...p,lang:"text",themes:d,transformers:b,decorations:void 0,defaultColor:!1,cssVariablePrefix:En("token")};return{deletionLines:e.contents===""?[]:(S.lang=g,v.lineInfo=i,S.decorations=s,pb(o.codeToHast(ba(e.contents),S))),additionLines:t.contents===""?[]:(S.lang=y,S.decorations=c,v.lineInfo=a,pb(o.codeToHast(ba(t.contents),S)))}}const dN=re.createContext(void 0);function hN(e){const t=re.useRef(e);return re.useInsertionEffect(()=>{t.current=e}),re.useCallback((...i)=>t.current(...i),[])}function pN(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function Sb(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function mN(){return Re({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[$s({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}var gN=class{hoveredLine;hoveredToken;pre;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}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.clearHoveredToken(),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:t=!1,enableGutterUtility:i=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),i?this.ensureGutterUtilityNode(t):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 t=!(e===this.selectedRange||Sb(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!t||(this.selectedRange=e,this.renderSelection(),t&&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:t,onLineClick:i,onLineNumberClick:a,onTokenClick:o,onMergeConflictActionClick:s}=this.options;t==null&&i==null&&a==null&&s==null&&o==null||this.options.onGutterUtilityClick!=null&&kb(e.composedPath())||(ri(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{const{lineHoverHighlight:t="disabled",onLineEnter:i,onLineLeave:a,onTokenEnter:o,onTokenLeave:s,enableGutterUtility:c=!1}=this.options;t==="disabled"&&!c&&i==null&&a==null&&o==null&&s==null||(ri(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(ri(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){ri(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.gutterUtilityContainer?.remove(),this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine())};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:i}=this.options,a=t.composedPath();ri(i,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:a});const o=this.resolvePointerTarget(a);ri(i,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",o);const{onLineClick:s,onLineNumberClick:c,onLineEnter:f,onLineLeave:d,onTokenClick:p,onTokenEnter:g,onTokenLeave:y,onHunkExpand:v,onMergeConflictActionClick:b}=this.options;switch(e){case"move":{const S=ld(o)&&this.hoveredLine?.lineElement===o.lineElement;Ls(o)&&this.hoveredToken?.tokenElement===o.tokenElement||(this.hoveredToken!=null&&(y?.(this.hoveredToken,t),this.clearHoveredToken()),Ls(o)&&(this.setHoveredToken(this.toTokenEventBaseProps(o)),g?.(this.hoveredToken,t))),S||(this.hoveredLine!=null&&(this.gutterUtilityContainer?.remove(),d?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),ld(o)&&(this.setHoveredLine(this.toEventBaseProps(o)),this.gutterUtilityContainer!=null&&o.numberElement.appendChild(this.gutterUtilityContainer),f?.({...this.hoveredLine,event:t})));break}case"click":{if(o==null)break;if(vN(o)&&b!=null){b(o);break}if(bN(o)&&v!=null){v(o.hunkIndex,t.shiftKey?"both":o.direction,t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!ld(o))break;Ls(o)&&p!=null&&p(this.toTokenEventBaseProps(o),t);const S=this.toEventBaseProps(o);c!=null&&o.numberColumn?c({...S,event:t}):s?.({...S,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:i="disabled",onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:f,onTokenEnter:d,onTokenLeave:p,onHunkExpand:g,onMergeConflictActionClick:y,enableGutterUtility:v=!1,enableLineSelection:b=!1,onGutterUtilityClick:S}=this.options,A=S!=null,D=i!=="disabled"||a!=null||o!=null||s!=null||c!=null||f!=null||d!=null||p!=null||g!=null||y!=null||v||b||A;D&&!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,ri(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const k=[];return(t==="both"||t==="click")&&(a!=null&&k.push("onLineClick"),o!=null&&k.push("onLineNumberClick"),g!=null&&k.push("expandable hunk separators"),y!=null&&k.push("merge conflict actions")),k})()),ri(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),ri(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!D&&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 x=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",T=this.pointerSession.mode==="gutterSelecting";(!b&&x||!A&&T)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:i=!1}=this.options,a=e!=null,o=t!=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 t=e.composedPath();kb(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e,t):this.startLineSelectionFromPointerDown(e,t)};startLineSelectionFromPointerDown(e,t){const{enableLineSelection:i=!1}=this.options;if(!i)return;const a=this.getSelectionPointerInfo(t,!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,t){const{enableLineSelection:i=!1,onGutterUtilityClick:a}=this.options;if(a==null)return;const o=this.getSelectionPointFromPath(t);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:t=!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,t===!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(pN(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:t=!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,t&&this.updateSelection(a.lineNumber,a.side)),i?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(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:t="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!=="disabled"&&((t==="both"||t==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(t==="both"||t==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}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 t=document.createElement("div");t.innerHTML=pa(mN());const i=t.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,t){const i=this.resolvePointerTarget(e);if(Gd(i)&&!(t&&!i.numberColumn)&&i.splitLineIndex!=null)return{lineIndex:i.splitLineIndex,lineNumber:i.lineNumber,eventSide:this.mode==="diff"?i.side:void 0}}getSelectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(Gd(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}getLineIndex(e,t){const{getLineIndex:i}=this.options;return i!=null?i(e,t):[e-1,e-1]}updateSelection(e,t,i=!0){const{selectedRange:a}=this;let o;if(e==null)o=null;else{const s=this.selectionAnchor?.side??t,c=this.selectionAnchor?.lineNumber??e;o=this.buildSelectionRange(c,e,s,t)}Sb(a??void 0,o??void 0)||(this.selectedRange=o,i&&this.notifySelectionChangeDelta(),this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection))}getIndexesFromSelection(e,t){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:t?i[1]:i[0],end:t?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:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),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 t){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 A=o?"single":S===s?"first":S===c?"last":"";v.setAttribute("data-selected-line",A),b.setAttribute("data-selected-line",A),b.nextSibling instanceof HTMLElement&&v.nextSibling instanceof HTMLElement&&(v.nextSibling.hasAttribute("data-line-annotation")||v.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(o?(A="last",v.setAttribute("data-selected-line","first")):S===s?A="":S===c&&v.setAttribute("data-selected-line",""),v.nextSibling.setAttribute("data-selected-line",A),b.nextSibling.setAttribute("data-selected-line",A))}}};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}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:i,side:a,tokenElement:o,tokenText:s}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:i,tokenElement:o,tokenText:s}:{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:i,side:a,tokenElement:o,tokenText:s}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,i,a){return{start:e,end:t,...i!=null?{side:i}:{},...i!==a&&a!=null?{endSide:a}:{}}}resolvePointerTarget(e){let t=!1,i,a,o,s,c,f,d,p,g,y;for(const b of e){if(!(b instanceof HTMLElement))continue;if(y==null&&b.hasAttribute("data-merge-conflict-action")){const x=b.getAttribute("data-merge-conflict-action")??void 0,T=b.getAttribute("data-merge-conflict-conflict-index")??void 0,k=T!=null?Number.parseInt(T,10):NaN;_N(x)&&Number.isFinite(k)&&(y={kind:"merge-conflict-action",resolution:x,conflictIndex:k})}if(f==null&&b.hasAttribute("data-char")){f=b;const x=b.getAttribute("data-char");if(x!=null){const T=Number.parseInt(x,10);if(!Number.isNaN(T)){const k=b.textContent??"",I=T+k.length;(k.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(d={tokenElement:f,lineCharStart:T,lineCharEnd:I,tokenText:k});continue}}}const S=c==null?b.getAttribute("data-column-number")??void 0:void 0;if(S!=null){c=b,g=Number.parseInt(S,10),t=!0,i=wb(b),s=b.getAttribute("data-line-index")??void 0;continue}const A=o==null?b.getAttribute("data-line")??void 0:void 0;if(A!=null){o=b,g=Number.parseInt(A,10),i=wb(b),s=b.getAttribute("data-line-index")??void 0;continue}if(p==null&&b.hasAttribute("data-expand-button")){p={hunkIndex:void 0,direction:b.hasAttribute("data-expand-up")?"up":b.hasAttribute("data-expand-down")?"down":"both"};continue}const D=p!=null?b.getAttribute("data-expand-index")??void 0:void 0;if(p!=null&&D!=null){const x=Number.parseInt(D,10);Number.isNaN(x)||(p.hunkIndex=x);continue}if(a==null&&b.hasAttribute("data-code")){a=b;break}}if(y!=null)return y;if(p?.hunkIndex!=null)return{type:"line-info",hunkIndex:p.hunkIndex,direction:p.direction};if(o??=s!=null?xb(a,`[data-line][data-line-index="${s}"]`):void 0,c??=s!=null?xb(a,`[data-column-number][data-line-index="${s}"]`):void 0,a==null||o==null||c==null||i==null||g==null||Number.isNaN(g))return;const v=this.parseLineIndex(o,this.isSplitDiff());return d!=null?this.mode==="file"?{kind:"token",lineType:i,lineElement:o,lineNumber:g,numberColumn:t,numberElement:c,side:void 0,splitLineIndex:v,...d}:{kind:"token",lineType:i,lineElement:o,lineNumber:g,numberColumn:t,numberElement:c,side:Cb(i,a),splitLineIndex:v,...d}:this.mode==="file"?{kind:"line",lineType:i,lineElement:o,lineNumber:g,numberColumn:t,numberElement:c,side:void 0,splitLineIndex:v}:{kind:"line",lineType:i,lineElement:o,lineNumber:g,numberColumn:t,numberElement:c,side:Cb(i,a),splitLineIndex:v}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){const i=(e.getAttribute("data-line-index")??"").split(",").map(a=>Number.parseInt(a,10)).filter(a=>!Number.isNaN(a));if(t&&i.length===2)return i[1];if(!t)return i[0]}};function Eb({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,enableHoverUtility:i,lineHoverHighlight:a,onGutterUtilityClick:o,onLineClick:s,onLineEnter:c,onLineLeave:f,onLineNumberClick:d,onTokenClick:p,onTokenEnter:g,onTokenLeave:y,renderGutterUtility:v,renderHoverUtility:b,__debugPointerEvents:S,enableLineSelection:A,onLineSelected:D,onLineSelectionStart:x,onLineSelectionChange:T,onLineSelectionEnd:k},I,z,R){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:yN({enableGutterUtility:t,enableHoverUtility:i,renderGutterUtility:v,renderHoverUtility:b,onGutterUtilityClick:o}),usesCustomGutterUtility:v!=null||b!=null,lineHoverHighlight:a,onGutterUtilityClick:o,onHunkExpand:I,onMergeConflictActionClick:R,onLineClick:s,onLineEnter:c,onLineLeave:f,onLineNumberClick:d,onTokenClick:p,onTokenEnter:g,onTokenLeave:y,__debugPointerEvents:S,enableLineSelection:A,onLineSelected:D,onLineSelectionStart:x,onLineSelectionChange:T,onLineSelectionEnd:k,getLineIndex:z}}function yN({enableGutterUtility:e,enableHoverUtility:t,renderGutterUtility:i,renderHoverUtility:a,onGutterUtilityClick:o}){if(e!==void 0&&t!==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??t??!1}function Gd(e){return e!=null&&"kind"in e&&e.kind==="line"}function Ls(e){return e!=null&&"kind"in e&&e.kind==="token"}function ld(e){return Gd(e)||Ls(e)}function bN(e){return"type"in e&&e.type==="line-info"}function vN(e){return"kind"in e&&e.kind==="merge-conflict-action"}function _N(e){return e==="current"||e==="incoming"||e==="both"}function xb(e,t){const i=e?.querySelector(t);return i instanceof HTMLElement?i:void 0}function Cb(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function wb(e){const t=e.getAttribute("data-line-type");if(t!=null)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function kb(e){for(const t of e)if(t instanceof HTMLElement&&t.hasAttribute("data-utility-button"))return!0;return!1}function ri(e="none",t,...i){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...i)}var SN=class{observedNodes=new Map;queuedUpdates=new Map;cleanUp(){this.resizeObserver?.disconnect(),this.observedNodes.clear(),this.queuedUpdates.clear()}resizeObserver;setup(e,t){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&&!t){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 t of e){const{target:i,borderBoxSize:a}=t;if(!(i instanceof HTMLElement)){console.error("FileDiff.handleResizeObserver: Invalid element for ResizeObserver",t);continue}const o=this.observedNodes.get(i);if(o==null){console.error("FileDiff.handleResizeObserver: Not a valid observed node",t);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,t]of this.queuedUpdates)for(const[i,a]of t)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&&t.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,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,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 V1(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function Ab(e){for(const t of Array.isArray(e)?e:[e])if(!jd.has(t))return!1;return!0}function od(e){for(const t of P1(e))if(!Bd.has(t))return!1;return!0}function EN(e){return Re({tagName:"div",children:[Re({tagName:"div",children:e.annotations?.map(t=>Re({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function xN(e,t){return Re({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function CN(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 wN({fileOrDiff:e,mode:t}){const i="type"in e?e:void 0,a={"data-diffs-header":t,"data-change-type":i?.type};return Re({tagName:"div",children:[t==="custom"?Re({tagName:"slot",properties:{name:Eh}}):kN({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...t==="custom"?[]:[AN(i)]],properties:a})}function kN({name:e,prevName:t,iconType:i}){const a=[Re({tagName:"slot",properties:{name:_h}}),$s({name:CN(i),properties:{"data-change-icon":i}})];return t!=null&&(a.push(Re({tagName:"div",children:[Re({tagName:"bdi",children:[li(t)]})],properties:{"data-prev-name":""}})),a.push($s({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),a.push(Re({tagName:"div",children:[Re({tagName:"bdi",children:[li(e)]})],properties:{"data-title":""}})),Re({tagName:"div",children:a,properties:{"data-header-content":""}})}function AN(e){const t=[];if(e!=null){let i=0,a=0;for(const o of e.hunks)i+=o.additionLines,a+=o.deletionLines;(a>0||i===0)&&t.push(Re({tagName:"span",children:[li(`-${a}`)],properties:{"data-deletions-count":""}})),(i>0||a===0)&&t.push(Re({tagName:"span",children:[li(`+${i}`)],properties:{"data-additions-count":""}}))}return t.push(Re({tagName:"slot",properties:{name:Sh}})),Re({tagName:"div",children:t,properties:{"data-metadata":""}})}function TN(e){return Re({tagName:"pre",properties:LN(e)})}function LN({diffIndicators:e,disableBackground:t,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":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,tabIndex:0,style:`--diffs-min-number-column-width-default:${`${s}`.length}ch;`}}function RN(e,{theme:t,preferredHighlighter:i="shiki-js"}){return{langs:[e??"text"],themes:P1(t),preferredHighlighter:i}}function DN(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}const NN=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
188
|
-
<symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
|
|
189
|
-
<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"/>
|
|
190
|
-
</symbol>
|
|
191
|
-
<symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
|
|
192
|
-
<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"/>
|
|
193
|
-
</symbol>
|
|
194
|
-
<symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
|
|
195
|
-
<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"/>
|
|
196
|
-
</symbol>
|
|
197
|
-
<symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
|
|
198
|
-
<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"/>
|
|
199
|
-
</symbol>
|
|
200
|
-
<symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
|
|
201
|
-
<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"/>
|
|
202
|
-
</symbol>
|
|
203
|
-
<symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
|
|
204
|
-
<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"/>
|
|
205
|
-
</symbol>
|
|
206
|
-
<symbol id="diffs-icon-expand" viewBox="0 0 16 16">
|
|
207
|
-
<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"/>
|
|
208
|
-
</symbol>
|
|
209
|
-
<symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
|
|
210
|
-
<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"/>
|
|
211
|
-
</symbol>
|
|
212
|
-
<symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
|
|
213
|
-
<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"/>
|
|
214
|
-
</symbol>
|
|
215
|
-
<symbol id="diffs-icon-plus" viewBox="0 0 16 16">
|
|
216
|
-
<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"/>
|
|
217
|
-
</symbol>
|
|
218
|
-
<symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
|
|
219
|
-
<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"/>
|
|
220
|
-
</symbol>
|
|
221
|
-
<symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
|
|
222
|
-
<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"/>
|
|
223
|
-
</symbol>
|
|
224
|
-
<symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
|
|
225
|
-
<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"/>
|
|
226
|
-
</symbol>
|
|
227
|
-
<symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
|
|
228
|
-
<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"/>
|
|
229
|
-
</symbol>
|
|
230
|
-
<symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
|
|
231
|
-
<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"/>
|
|
232
|
-
</symbol>
|
|
233
|
-
<symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
|
|
234
|
-
<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"/>
|
|
235
|
-
</symbol>
|
|
236
|
-
<symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
|
|
237
|
-
<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"/>
|
|
238
|
-
</symbol>
|
|
239
|
-
</svg>`;function ON(e,t){return e==null||t==null?e===t:MN(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}const Tb={};function MN(e=Tb,t=Tb){if(e===t)return!0;const i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(const o of i)if(e[o]!==t[o])return!1;return!0}function IN(e){const t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}function zN(){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 UN(){const e=document.createElement("style");return e.setAttribute(z1,""),e}var HN=`@layer base, theme, rendered, unsafe;
|
|
240
|
-
|
|
241
|
-
@layer base {
|
|
242
|
-
:host {
|
|
243
|
-
--diffs-font-fallback:
|
|
244
|
-
'SF Mono', Monaco, Consolas, 'Ubuntu Mono', 'Liberation Mono',
|
|
245
|
-
'Courier New', monospace;
|
|
246
|
-
--diffs-header-font-fallback:
|
|
247
|
-
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
248
|
-
'Noto Sans', 'Liberation Sans', Arial, sans-serif;
|
|
249
|
-
|
|
250
|
-
--diffs-mixer: light-dark(black, white);
|
|
251
|
-
--diffs-gap-fallback: 8px;
|
|
252
|
-
|
|
253
|
-
--diffs-added-light: #0dbe4e;
|
|
254
|
-
--diffs-added-dark: #5ecc71;
|
|
255
|
-
--diffs-modified-light: #009fff;
|
|
256
|
-
--diffs-modified-dark: #69b1ff;
|
|
257
|
-
--diffs-deleted-light: #ff2e3f;
|
|
258
|
-
--diffs-deleted-dark: #ff6762;
|
|
259
|
-
|
|
260
|
-
/*
|
|
261
|
-
// Available CSS Color Overrides
|
|
262
|
-
--diffs-bg-buffer-override
|
|
263
|
-
--diffs-bg-hover-override
|
|
264
|
-
--diffs-bg-context-override
|
|
265
|
-
--diffs-bg-separator-override
|
|
266
|
-
|
|
267
|
-
--diffs-fg-number-override
|
|
268
|
-
--diffs-fg-number-addition-override
|
|
269
|
-
--diffs-fg-number-deletion-override
|
|
270
|
-
--diffs-fg-conflict-marker-override
|
|
271
|
-
|
|
272
|
-
--diffs-deletion-color-override
|
|
273
|
-
--diffs-addition-color-override
|
|
274
|
-
--diffs-modified-color-override
|
|
275
|
-
|
|
276
|
-
--diffs-bg-deletion-override
|
|
277
|
-
--diffs-bg-deletion-number-override
|
|
278
|
-
--diffs-bg-deletion-hover-override
|
|
279
|
-
--diffs-bg-deletion-emphasis-override
|
|
280
|
-
|
|
281
|
-
--diffs-bg-addition-override
|
|
282
|
-
--diffs-bg-addition-number-override
|
|
283
|
-
--diffs-bg-addition-hover-override
|
|
284
|
-
--diffs-bg-addition-emphasis-override
|
|
285
|
-
|
|
286
|
-
// Line Selection Color Overrides (for enableLineSelection)
|
|
287
|
-
--diffs-selection-color-override
|
|
288
|
-
--diffs-bg-selection-override
|
|
289
|
-
--diffs-bg-selection-number-override
|
|
290
|
-
--diffs-bg-selection-background-override
|
|
291
|
-
--diffs-bg-selection-number-background-override
|
|
292
|
-
|
|
293
|
-
// Available CSS Layout Overrides
|
|
294
|
-
--diffs-gap-inline
|
|
295
|
-
--diffs-gap-block
|
|
296
|
-
--diffs-gap-style
|
|
297
|
-
--diffs-tab-size
|
|
298
|
-
*/
|
|
299
|
-
|
|
300
|
-
color-scheme: light dark;
|
|
301
|
-
display: block;
|
|
302
|
-
font-family: var(
|
|
303
|
-
--diffs-header-font-family,
|
|
304
|
-
var(--diffs-header-font-fallback)
|
|
305
|
-
);
|
|
306
|
-
font-size: var(--diffs-font-size, 13px);
|
|
307
|
-
line-height: var(--diffs-line-height, 20px);
|
|
308
|
-
font-feature-settings: var(--diffs-font-features);
|
|
309
|
-
|
|
310
|
-
/* NOTE(amadeus): we cannot use 'in oklch' because current versions of cursor
|
|
311
|
-
* and vscode use an older build of chrome that appears to have a bug with
|
|
312
|
-
* color-mix and 'in oklch', so use 'in lab' instead */
|
|
313
|
-
--diffs-bg: light-dark(
|
|
314
|
-
var(--diffs-light-bg, #fff),
|
|
315
|
-
var(--diffs-dark-bg, #000)
|
|
316
|
-
);
|
|
317
|
-
--diffs-bg-buffer: var(
|
|
318
|
-
--diffs-bg-buffer-override,
|
|
319
|
-
light-dark(
|
|
320
|
-
color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)),
|
|
321
|
-
color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))
|
|
322
|
-
)
|
|
323
|
-
);
|
|
324
|
-
--diffs-bg-hover: var(
|
|
325
|
-
--diffs-bg-hover-override,
|
|
326
|
-
light-dark(
|
|
327
|
-
color-mix(in lab, var(--diffs-bg) 97%, var(--diffs-mixer)),
|
|
328
|
-
color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-mixer))
|
|
329
|
-
)
|
|
330
|
-
);
|
|
331
|
-
|
|
332
|
-
--diffs-bg-context: var(
|
|
333
|
-
--diffs-bg-context-override,
|
|
334
|
-
light-dark(
|
|
335
|
-
color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)),
|
|
336
|
-
color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))
|
|
337
|
-
)
|
|
338
|
-
);
|
|
339
|
-
--diffs-bg-context-number: var(
|
|
340
|
-
--diffs-bg-context-number-override,
|
|
341
|
-
light-dark(
|
|
342
|
-
color-mix(in lab, var(--diffs-bg-context) 80%, var(--diffs-bg)),
|
|
343
|
-
color-mix(in lab, var(--diffs-bg-context) 60%, var(--diffs-bg))
|
|
344
|
-
)
|
|
345
|
-
);
|
|
346
|
-
--diffs-bg-conflict-marker: var(
|
|
347
|
-
--diffs-bg-conflict-marker-override,
|
|
348
|
-
light-dark(
|
|
349
|
-
color-mix(
|
|
350
|
-
in lab,
|
|
351
|
-
var(--diffs-bg-context) 88%,
|
|
352
|
-
var(--diffs-modified-base)
|
|
353
|
-
),
|
|
354
|
-
color-mix(
|
|
355
|
-
in lab,
|
|
356
|
-
var(--diffs-bg-context) 80%,
|
|
357
|
-
var(--diffs-modified-base)
|
|
358
|
-
)
|
|
359
|
-
)
|
|
360
|
-
);
|
|
361
|
-
--diffs-bg-conflict-current: var(
|
|
362
|
-
--diffs-bg-conflict-current-override,
|
|
363
|
-
light-dark(#e5f8ea, #274432)
|
|
364
|
-
);
|
|
365
|
-
--diffs-bg-conflict-base: var(
|
|
366
|
-
--diffs-bg-conflict-base-override,
|
|
367
|
-
light-dark(
|
|
368
|
-
color-mix(
|
|
369
|
-
in lab,
|
|
370
|
-
var(--diffs-bg-context) 90%,
|
|
371
|
-
var(--diffs-modified-base)
|
|
372
|
-
),
|
|
373
|
-
color-mix(
|
|
374
|
-
in lab,
|
|
375
|
-
var(--diffs-bg-context) 82%,
|
|
376
|
-
var(--diffs-modified-base)
|
|
377
|
-
)
|
|
378
|
-
)
|
|
379
|
-
);
|
|
380
|
-
--diffs-bg-conflict-incoming: var(
|
|
381
|
-
--diffs-bg-conflict-incoming-override,
|
|
382
|
-
light-dark(#e6f1ff, #253b5a)
|
|
383
|
-
);
|
|
384
|
-
--diffs-bg-conflict-marker-number: var(
|
|
385
|
-
--diffs-bg-conflict-marker-number-override,
|
|
386
|
-
light-dark(
|
|
387
|
-
color-mix(in lab, var(--diffs-bg-conflict-marker) 72%, var(--diffs-bg)),
|
|
388
|
-
color-mix(in lab, var(--diffs-bg-conflict-marker) 54%, var(--diffs-bg))
|
|
389
|
-
)
|
|
390
|
-
);
|
|
391
|
-
--diffs-bg-conflict-current-number: var(
|
|
392
|
-
--diffs-bg-conflict-current-number-override,
|
|
393
|
-
light-dark(#d7f1de, #30533d)
|
|
394
|
-
);
|
|
395
|
-
--diffs-bg-conflict-base-number: var(
|
|
396
|
-
--diffs-bg-conflict-base-number-override,
|
|
397
|
-
light-dark(
|
|
398
|
-
color-mix(in lab, var(--diffs-bg-conflict-base) 72%, var(--diffs-bg)),
|
|
399
|
-
color-mix(in lab, var(--diffs-bg-conflict-base) 54%, var(--diffs-bg))
|
|
400
|
-
)
|
|
401
|
-
);
|
|
402
|
-
--diffs-bg-conflict-incoming-number: var(
|
|
403
|
-
--diffs-bg-conflict-incoming-number-override,
|
|
404
|
-
light-dark(#d8e8ff, #2f4b73)
|
|
405
|
-
);
|
|
406
|
-
--conflict-bg-current: var(
|
|
407
|
-
--conflict-bg-current-override,
|
|
408
|
-
var(--diffs-bg-addition)
|
|
409
|
-
);
|
|
410
|
-
--conflict-bg-incoming: var(
|
|
411
|
-
--conflict-bg-incoming-override,
|
|
412
|
-
light-dark(
|
|
413
|
-
color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-modified-base)),
|
|
414
|
-
color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-modified-base))
|
|
415
|
-
)
|
|
416
|
-
);
|
|
417
|
-
--conflict-bg-current-number: var(
|
|
418
|
-
--conflict-bg-current-number-override,
|
|
419
|
-
var(--diffs-bg-addition-number)
|
|
420
|
-
);
|
|
421
|
-
--conflict-bg-incoming-number: var(
|
|
422
|
-
--conflict-bg-incoming-number-override,
|
|
423
|
-
light-dark(
|
|
424
|
-
color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-modified-base)),
|
|
425
|
-
color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-modified-base))
|
|
426
|
-
)
|
|
427
|
-
);
|
|
428
|
-
--conflict-bg-current-header: var(
|
|
429
|
-
--conflict-bg-current-header-override,
|
|
430
|
-
light-dark(
|
|
431
|
-
color-mix(in lab, var(--diffs-bg) 78%, var(--diffs-addition-base)),
|
|
432
|
-
color-mix(in lab, var(--diffs-bg) 68%, var(--diffs-addition-base))
|
|
433
|
-
)
|
|
434
|
-
);
|
|
435
|
-
--conflict-bg-incoming-header: var(
|
|
436
|
-
--conflict-bg-incoming-header-override,
|
|
437
|
-
light-dark(
|
|
438
|
-
color-mix(in lab, var(--diffs-bg) 78%, var(--diffs-modified-base)),
|
|
439
|
-
color-mix(in lab, var(--diffs-bg) 68%, var(--diffs-modified-base))
|
|
440
|
-
)
|
|
441
|
-
);
|
|
442
|
-
--conflict-bg-current-header-number: var(
|
|
443
|
-
--conflict-bg-current-header-number-override,
|
|
444
|
-
light-dark(
|
|
445
|
-
color-mix(in lab, var(--diffs-bg) 72%, var(--diffs-addition-base)),
|
|
446
|
-
color-mix(in lab, var(--diffs-bg) 62%, var(--diffs-addition-base))
|
|
447
|
-
)
|
|
448
|
-
);
|
|
449
|
-
--conflict-bg-incoming-header-number: var(
|
|
450
|
-
--conflict-bg-incoming-header-number-override,
|
|
451
|
-
light-dark(
|
|
452
|
-
color-mix(in lab, var(--diffs-bg) 72%, var(--diffs-modified-base)),
|
|
453
|
-
color-mix(in lab, var(--diffs-bg) 62%, var(--diffs-modified-base))
|
|
454
|
-
)
|
|
455
|
-
);
|
|
456
|
-
|
|
457
|
-
--diffs-bg-separator: var(
|
|
458
|
-
--diffs-bg-separator-override,
|
|
459
|
-
light-dark(
|
|
460
|
-
color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)),
|
|
461
|
-
color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))
|
|
462
|
-
)
|
|
463
|
-
);
|
|
464
|
-
|
|
465
|
-
--diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));
|
|
466
|
-
--diffs-fg-number: var(
|
|
467
|
-
--diffs-fg-number-override,
|
|
468
|
-
light-dark(
|
|
469
|
-
color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)),
|
|
470
|
-
color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))
|
|
471
|
-
)
|
|
472
|
-
);
|
|
473
|
-
--diffs-fg-conflict-marker: var(
|
|
474
|
-
--diffs-fg-conflict-marker-override,
|
|
475
|
-
var(--diffs-fg-number)
|
|
476
|
-
);
|
|
477
|
-
|
|
478
|
-
--diffs-deletion-base: var(
|
|
479
|
-
--diffs-deletion-color-override,
|
|
480
|
-
light-dark(
|
|
481
|
-
var(
|
|
482
|
-
--diffs-light-deletion-color,
|
|
483
|
-
var(--diffs-deletion-color, var(--diffs-deleted-light))
|
|
484
|
-
),
|
|
485
|
-
var(
|
|
486
|
-
--diffs-dark-deletion-color,
|
|
487
|
-
var(--diffs-deletion-color, var(--diffs-deleted-dark))
|
|
488
|
-
)
|
|
489
|
-
)
|
|
490
|
-
);
|
|
491
|
-
--diffs-addition-base: var(
|
|
492
|
-
--diffs-addition-color-override,
|
|
493
|
-
light-dark(
|
|
494
|
-
var(
|
|
495
|
-
--diffs-light-addition-color,
|
|
496
|
-
var(--diffs-addition-color, var(--diffs-added-light))
|
|
497
|
-
),
|
|
498
|
-
var(
|
|
499
|
-
--diffs-dark-addition-color,
|
|
500
|
-
var(--diffs-addition-color, var(--diffs-added-dark))
|
|
501
|
-
)
|
|
502
|
-
)
|
|
503
|
-
);
|
|
504
|
-
--diffs-modified-base: var(
|
|
505
|
-
--diffs-modified-color-override,
|
|
506
|
-
light-dark(
|
|
507
|
-
var(
|
|
508
|
-
--diffs-light-modified-color,
|
|
509
|
-
var(--diffs-modified-color, var(--diffs-modified-light))
|
|
510
|
-
),
|
|
511
|
-
var(
|
|
512
|
-
--diffs-dark-modified-color,
|
|
513
|
-
var(--diffs-modified-color, var(--diffs-modified-dark))
|
|
514
|
-
)
|
|
515
|
-
)
|
|
516
|
-
);
|
|
517
|
-
|
|
518
|
-
/* NOTE(amadeus): we cannot use 'in oklch' because current versions of cursor
|
|
519
|
-
* and vscode use an older build of chrome that appears to have a bug with
|
|
520
|
-
* color-mix and 'in oklch', so use 'in lab' instead */
|
|
521
|
-
--diffs-bg-deletion: var(
|
|
522
|
-
--diffs-bg-deletion-override,
|
|
523
|
-
light-dark(
|
|
524
|
-
color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)),
|
|
525
|
-
color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))
|
|
526
|
-
)
|
|
527
|
-
);
|
|
528
|
-
--diffs-bg-deletion-number: var(
|
|
529
|
-
--diffs-bg-deletion-number-override,
|
|
530
|
-
light-dark(
|
|
531
|
-
color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-deletion-base)),
|
|
532
|
-
color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-deletion-base))
|
|
533
|
-
)
|
|
534
|
-
);
|
|
535
|
-
--diffs-bg-deletion-hover: var(
|
|
536
|
-
--diffs-bg-deletion-hover-override,
|
|
537
|
-
light-dark(
|
|
538
|
-
color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base)),
|
|
539
|
-
color-mix(in lab, var(--diffs-bg) 75%, var(--diffs-deletion-base))
|
|
540
|
-
)
|
|
541
|
-
);
|
|
542
|
-
--diffs-bg-deletion-emphasis: var(
|
|
543
|
-
--diffs-bg-deletion-emphasis-override,
|
|
544
|
-
light-dark(
|
|
545
|
-
rgb(from var(--diffs-deletion-base) r g b / 0.15),
|
|
546
|
-
rgb(from var(--diffs-deletion-base) r g b / 0.2)
|
|
547
|
-
)
|
|
548
|
-
);
|
|
549
|
-
|
|
550
|
-
--diffs-bg-addition: var(
|
|
551
|
-
--diffs-bg-addition-override,
|
|
552
|
-
light-dark(
|
|
553
|
-
color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)),
|
|
554
|
-
color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))
|
|
555
|
-
)
|
|
556
|
-
);
|
|
557
|
-
--diffs-bg-addition-number: var(
|
|
558
|
-
--diffs-bg-addition-number-override,
|
|
559
|
-
light-dark(
|
|
560
|
-
color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-addition-base)),
|
|
561
|
-
color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-addition-base))
|
|
562
|
-
)
|
|
563
|
-
);
|
|
564
|
-
--diffs-bg-addition-hover: var(
|
|
565
|
-
--diffs-bg-addition-hover-override,
|
|
566
|
-
light-dark(
|
|
567
|
-
color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base)),
|
|
568
|
-
color-mix(in lab, var(--diffs-bg) 70%, var(--diffs-addition-base))
|
|
569
|
-
)
|
|
570
|
-
);
|
|
571
|
-
--diffs-bg-addition-emphasis: var(
|
|
572
|
-
--diffs-bg-addition-emphasis-override,
|
|
573
|
-
light-dark(
|
|
574
|
-
rgb(from var(--diffs-addition-base) r g b / 0.15),
|
|
575
|
-
rgb(from var(--diffs-addition-base) r g b / 0.2)
|
|
576
|
-
)
|
|
577
|
-
);
|
|
578
|
-
|
|
579
|
-
--diffs-selection-base: var(--diffs-modified-base);
|
|
580
|
-
--diffs-selection-number-fg: light-dark(
|
|
581
|
-
color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)),
|
|
582
|
-
color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer))
|
|
583
|
-
);
|
|
584
|
-
--diffs-bg-selection: var(
|
|
585
|
-
--diffs-bg-selection-override,
|
|
586
|
-
light-dark(
|
|
587
|
-
color-mix(in lab, var(--diffs-bg) 82%, var(--diffs-selection-base)),
|
|
588
|
-
color-mix(in lab, var(--diffs-bg) 75%, var(--diffs-selection-base))
|
|
589
|
-
)
|
|
590
|
-
);
|
|
591
|
-
--diffs-bg-selection-number: var(
|
|
592
|
-
--diffs-bg-selection-number-override,
|
|
593
|
-
light-dark(
|
|
594
|
-
color-mix(in lab, var(--diffs-bg) 75%, var(--diffs-selection-base)),
|
|
595
|
-
color-mix(in lab, var(--diffs-bg) 60%, var(--diffs-selection-base))
|
|
596
|
-
)
|
|
597
|
-
);
|
|
598
|
-
|
|
599
|
-
background-color: var(--diffs-bg);
|
|
600
|
-
color: var(--diffs-fg);
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
/* NOTE(mdo): Some semantic HTML elements (e.g. \`pre\`, \`code\`) have default
|
|
604
|
-
* user-agent styles. These must be overridden to use our custom styles. */
|
|
605
|
-
pre,
|
|
606
|
-
code,
|
|
607
|
-
[data-error-wrapper] {
|
|
608
|
-
isolation: isolate;
|
|
609
|
-
margin: 0;
|
|
610
|
-
padding: 0;
|
|
611
|
-
display: block;
|
|
612
|
-
outline: none;
|
|
613
|
-
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
pre,
|
|
617
|
-
code {
|
|
618
|
-
background-color: var(--diffs-bg);
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
code {
|
|
622
|
-
contain: content;
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
*,
|
|
626
|
-
*::before,
|
|
627
|
-
*::after {
|
|
628
|
-
box-sizing: border-box;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
[data-icon-sprite] {
|
|
632
|
-
display: none;
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
/* NOTE(mdo): Headers and separators are within pre/code, so we need to reset
|
|
636
|
-
* their font-family explicitly. */
|
|
637
|
-
[data-diffs-header],
|
|
638
|
-
[data-separator] {
|
|
639
|
-
font-family: var(
|
|
640
|
-
--diffs-header-font-family,
|
|
641
|
-
var(--diffs-header-font-fallback)
|
|
642
|
-
);
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
[data-file-info] {
|
|
646
|
-
padding: 10px;
|
|
647
|
-
font-weight: 700;
|
|
648
|
-
color: var(--fg);
|
|
649
|
-
/* NOTE(amadeus): we cannot use 'in oklch' because current versions of cursor
|
|
650
|
-
* and vscode use an older build of chrome that appears to have a bug with
|
|
651
|
-
* color-mix and 'in oklch', so use 'in lab' instead */
|
|
652
|
-
background-color: color-mix(in lab, var(--bg) 98%, var(--fg));
|
|
653
|
-
border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
[data-diff],
|
|
657
|
-
[data-file] {
|
|
658
|
-
/* This feels a bit crazy to me... so I need to think about it a bit more... */
|
|
659
|
-
--diffs-grid-number-column-width: minmax(min-content, max-content);
|
|
660
|
-
--diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;
|
|
661
|
-
|
|
662
|
-
&[data-dehydrated] {
|
|
663
|
-
--diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
&:hover [data-code]::-webkit-scrollbar-thumb {
|
|
667
|
-
background-color: var(--diffs-bg-context);
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
[data-line] span {
|
|
672
|
-
color: light-dark(
|
|
673
|
-
var(--diffs-token-light, var(--diffs-light)),
|
|
674
|
-
var(--diffs-token-dark, var(--diffs-dark))
|
|
675
|
-
);
|
|
676
|
-
background-color: light-dark(
|
|
677
|
-
var(--diffs-token-light-bg, inherit),
|
|
678
|
-
var(--diffs-token-dark-bg, inherit)
|
|
679
|
-
);
|
|
680
|
-
font-weight: light-dark(
|
|
681
|
-
var(--diffs-token-light-font-weight, inherit),
|
|
682
|
-
var(--diffs-token-dark-font-weight, inherit)
|
|
683
|
-
);
|
|
684
|
-
font-style: light-dark(
|
|
685
|
-
var(--diffs-token-light-font-style, inherit),
|
|
686
|
-
var(--diffs-token-dark-font-style, inherit)
|
|
687
|
-
);
|
|
688
|
-
-webkit-text-decoration: light-dark(
|
|
689
|
-
var(--diffs-token-light-text-decoration, inherit),
|
|
690
|
-
var(--diffs-token-dark-text-decoration, inherit)
|
|
691
|
-
);
|
|
692
|
-
text-decoration: light-dark(
|
|
693
|
-
var(--diffs-token-light-text-decoration, inherit),
|
|
694
|
-
var(--diffs-token-dark-text-decoration, inherit)
|
|
695
|
-
);
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
[data-line],
|
|
699
|
-
[data-gutter-buffer],
|
|
700
|
-
[data-line-annotation],
|
|
701
|
-
[data-no-newline] {
|
|
702
|
-
color: var(--diffs-fg);
|
|
703
|
-
background-color: var(--diffs-line-bg, var(--diffs-bg));
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
[data-no-newline] {
|
|
707
|
-
-webkit-user-select: none;
|
|
708
|
-
user-select: none;
|
|
709
|
-
|
|
710
|
-
span {
|
|
711
|
-
opacity: 0.6;
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
[data-diff-type='split'][data-overflow='scroll'] {
|
|
716
|
-
display: grid;
|
|
717
|
-
grid-template-columns: 1fr 1fr;
|
|
718
|
-
|
|
719
|
-
[data-additions] {
|
|
720
|
-
border-left: 1px solid var(--diffs-bg);
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
[data-deletions] {
|
|
724
|
-
border-right: 1px solid var(--diffs-bg);
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
[data-code] {
|
|
729
|
-
display: grid;
|
|
730
|
-
grid-auto-flow: dense;
|
|
731
|
-
grid-template-columns: var(--diffs-code-grid);
|
|
732
|
-
overflow: scroll clip;
|
|
733
|
-
overscroll-behavior-x: none;
|
|
734
|
-
tab-size: var(--diffs-tab-size, 2);
|
|
735
|
-
align-self: flex-start;
|
|
736
|
-
padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
737
|
-
padding-bottom: max(
|
|
738
|
-
0px,
|
|
739
|
-
calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) - 6px)
|
|
740
|
-
);
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
[data-container-size] {
|
|
744
|
-
container-type: inline-size;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
[data-code]::-webkit-scrollbar {
|
|
748
|
-
width: 0;
|
|
749
|
-
height: 6px;
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
[data-code]::-webkit-scrollbar-track {
|
|
753
|
-
background: transparent;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
[data-code]::-webkit-scrollbar-thumb {
|
|
757
|
-
background-color: transparent;
|
|
758
|
-
border: 1px solid transparent;
|
|
759
|
-
background-clip: content-box;
|
|
760
|
-
border-radius: 3px;
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
[data-code]::-webkit-scrollbar-corner {
|
|
764
|
-
background-color: transparent;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
/*
|
|
768
|
-
* If we apply these rules globally it will mean that webkit will opt into the
|
|
769
|
-
* standards compliant version of custom css scrollbars, which we do not want
|
|
770
|
-
* because the custom stuff will look better
|
|
771
|
-
*/
|
|
772
|
-
@supports (-moz-appearance: none) {
|
|
773
|
-
[data-code] {
|
|
774
|
-
scrollbar-width: thin;
|
|
775
|
-
scrollbar-color: var(--diffs-bg-context) transparent;
|
|
776
|
-
padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
777
|
-
}
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
[data-diffs-header] ~ [data-diff],
|
|
781
|
-
[data-diffs-header] ~ [data-file] {
|
|
782
|
-
[data-code],
|
|
783
|
-
&[data-overflow='wrap'] {
|
|
784
|
-
padding-top: 0;
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
[data-gutter] {
|
|
789
|
-
display: grid;
|
|
790
|
-
grid-template-rows: subgrid;
|
|
791
|
-
grid-template-columns: subgrid;
|
|
792
|
-
grid-column: 1;
|
|
793
|
-
z-index: 3;
|
|
794
|
-
position: relative;
|
|
795
|
-
background-color: var(--diffs-bg);
|
|
796
|
-
|
|
797
|
-
[data-gutter-buffer],
|
|
798
|
-
[data-column-number] {
|
|
799
|
-
border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
[data-content] {
|
|
804
|
-
display: grid;
|
|
805
|
-
grid-template-rows: subgrid;
|
|
806
|
-
grid-template-columns: subgrid;
|
|
807
|
-
grid-column: 2;
|
|
808
|
-
min-width: 0;
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
[data-diff-type='split'][data-overflow='wrap'] {
|
|
812
|
-
display: grid;
|
|
813
|
-
grid-auto-flow: dense;
|
|
814
|
-
grid-template-columns: repeat(2, var(--diffs-code-grid));
|
|
815
|
-
padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
816
|
-
|
|
817
|
-
[data-deletions] {
|
|
818
|
-
display: contents;
|
|
819
|
-
|
|
820
|
-
[data-gutter] {
|
|
821
|
-
grid-column: 1;
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
[data-content] {
|
|
825
|
-
grid-column: 2;
|
|
826
|
-
border-right: 1px solid var(--diffs-bg);
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
[data-additions] {
|
|
831
|
-
display: contents;
|
|
832
|
-
|
|
833
|
-
[data-gutter] {
|
|
834
|
-
grid-column: 3;
|
|
835
|
-
border-left: 1px solid var(--diffs-bg);
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
[data-content] {
|
|
839
|
-
grid-column: 4;
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
[data-overflow='scroll'] [data-gutter] {
|
|
845
|
-
position: sticky;
|
|
846
|
-
left: 0;
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
[data-line-annotation][data-selected-line] {
|
|
850
|
-
background-color: unset;
|
|
851
|
-
|
|
852
|
-
&::before {
|
|
853
|
-
content: '';
|
|
854
|
-
/* FIXME(amadeus): This needs to be audited ... */
|
|
855
|
-
position: sticky;
|
|
856
|
-
top: 0;
|
|
857
|
-
left: 0;
|
|
858
|
-
display: block;
|
|
859
|
-
border-right: var(--diffs-gap-style, 1px solid var(--diffs-bg));
|
|
860
|
-
background-color: var(--diffs-bg-selection-number);
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
[data-annotation-content] {
|
|
864
|
-
background-color: var(--diffs-bg-selection);
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
[data-interactive-lines] [data-line] {
|
|
869
|
-
cursor: pointer;
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
[data-content-buffer],
|
|
873
|
-
[data-gutter-buffer] {
|
|
874
|
-
position: relative;
|
|
875
|
-
-webkit-user-select: none;
|
|
876
|
-
user-select: none;
|
|
877
|
-
min-height: 1lh;
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
[data-gutter-buffer='annotation'] {
|
|
881
|
-
min-height: 0;
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
[data-gutter-buffer='buffer'] {
|
|
885
|
-
background-size: 8px 8px;
|
|
886
|
-
background-position: 0 0;
|
|
887
|
-
background-origin: border-box;
|
|
888
|
-
background-color: var(--diffs-bg);
|
|
889
|
-
/* This is incredibley expensive... */
|
|
890
|
-
background-image: repeating-linear-gradient(
|
|
891
|
-
-45deg,
|
|
892
|
-
transparent,
|
|
893
|
-
transparent calc(3px * 1.414),
|
|
894
|
-
rgb(from var(--diffs-bg-buffer) r g b / 0.8) calc(3px * 1.414),
|
|
895
|
-
rgb(from var(--diffs-bg-buffer) r g b / 0.8) calc(4px * 1.414)
|
|
896
|
-
);
|
|
897
|
-
}
|
|
898
|
-
|
|
899
|
-
[data-content-buffer] {
|
|
900
|
-
grid-column: 1;
|
|
901
|
-
/* We multiply by 1.414 (√2) to better approximate the diagonal repeat distance */
|
|
902
|
-
background-size: 8px 8px;
|
|
903
|
-
background-position: 5px 0;
|
|
904
|
-
background-origin: border-box;
|
|
905
|
-
background-color: var(--diffs-bg);
|
|
906
|
-
/* This is incredibley expensive... */
|
|
907
|
-
background-image: repeating-linear-gradient(
|
|
908
|
-
-45deg,
|
|
909
|
-
transparent,
|
|
910
|
-
transparent calc(3px * 1.414),
|
|
911
|
-
var(--diffs-bg-buffer) calc(3px * 1.414),
|
|
912
|
-
var(--diffs-bg-buffer) calc(4px * 1.414)
|
|
913
|
-
);
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
[data-separator] {
|
|
917
|
-
box-sizing: content-box;
|
|
918
|
-
background-color: var(--diffs-bg);
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
[data-separator='simple'] {
|
|
922
|
-
min-height: 4px;
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
[data-separator='line-info'],
|
|
926
|
-
[data-separator='line-info-basic'],
|
|
927
|
-
[data-separator='metadata'],
|
|
928
|
-
[data-separator='simple'] {
|
|
929
|
-
background-color: var(--diffs-bg-separator);
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
[data-separator='line-info'],
|
|
933
|
-
[data-separator='line-info-basic'],
|
|
934
|
-
[data-separator='metadata'] {
|
|
935
|
-
height: 32px;
|
|
936
|
-
position: relative;
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
[data-separator-wrapper] {
|
|
940
|
-
-webkit-user-select: none;
|
|
941
|
-
user-select: none;
|
|
942
|
-
fill: currentColor;
|
|
943
|
-
position: absolute;
|
|
944
|
-
inset-inline: 0;
|
|
945
|
-
display: flex;
|
|
946
|
-
align-items: center;
|
|
947
|
-
background-color: var(--diffs-bg);
|
|
948
|
-
height: 100%;
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
[data-content] [data-separator-wrapper] {
|
|
952
|
-
display: none;
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
[data-separator='metadata'] [data-separator-wrapper] {
|
|
956
|
-
inset-inline: 100% auto;
|
|
957
|
-
padding-inline: 1ch;
|
|
958
|
-
height: 100%;
|
|
959
|
-
background-color: var(--diffs-bg-separator);
|
|
960
|
-
color: var(--diffs-fg-number);
|
|
961
|
-
white-space: nowrap;
|
|
962
|
-
overflow: hidden;
|
|
963
|
-
text-overflow: ellipsis;
|
|
964
|
-
min-width: min-content;
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
[data-separator='line-info'] {
|
|
968
|
-
margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
[data-separator='line-info-basic'],
|
|
972
|
-
[data-separator='metadata'] {
|
|
973
|
-
margin-block: 0;
|
|
974
|
-
}
|
|
975
|
-
|
|
976
|
-
[data-separator='line-info'][data-separator-first] {
|
|
977
|
-
margin-top: 0;
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
[data-separator='line-info'][data-separator-last] {
|
|
981
|
-
margin-bottom: 0;
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
[data-expand-index] [data-separator-wrapper] {
|
|
985
|
-
display: grid;
|
|
986
|
-
grid-template-columns: 32px auto;
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
[data-expand-index] [data-separator-wrapper][data-separator-multi-button] {
|
|
990
|
-
grid-template-columns: 32px 32px auto;
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
[data-expand-button],
|
|
994
|
-
[data-separator-content] {
|
|
995
|
-
display: flex;
|
|
996
|
-
flex: 0 0 auto;
|
|
997
|
-
align-items: center;
|
|
998
|
-
background-color: var(--diffs-bg-separator);
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
[data-expand-button] {
|
|
1002
|
-
justify-content: center;
|
|
1003
|
-
flex-shrink: 0;
|
|
1004
|
-
cursor: pointer;
|
|
1005
|
-
min-width: 32px;
|
|
1006
|
-
align-self: stretch;
|
|
1007
|
-
color: var(--diffs-fg-number);
|
|
1008
|
-
border-right: 2px solid var(--diffs-bg);
|
|
1009
|
-
|
|
1010
|
-
&:hover {
|
|
1011
|
-
color: var(--diffs-fg);
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
[data-expand-down] [data-icon] {
|
|
1016
|
-
transform: scaleY(-1);
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
[data-separator-content] {
|
|
1020
|
-
flex: 1 1 auto;
|
|
1021
|
-
padding: 0 1ch;
|
|
1022
|
-
height: 100%;
|
|
1023
|
-
color: var(--diffs-fg-number);
|
|
1024
|
-
|
|
1025
|
-
overflow: hidden;
|
|
1026
|
-
justify-content: flex-start;
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
[data-separator='line-info'],
|
|
1030
|
-
[data-separator='line-info-basic'] {
|
|
1031
|
-
[data-separator-content] {
|
|
1032
|
-
height: 100%;
|
|
1033
|
-
-webkit-user-select: none;
|
|
1034
|
-
user-select: none;
|
|
1035
|
-
overflow: clip;
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
@supports (width: 1cqi) {
|
|
1040
|
-
[data-unified] {
|
|
1041
|
-
[data-separator='line-info'] [data-separator-wrapper] {
|
|
1042
|
-
padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1043
|
-
width: 100cqi;
|
|
1044
|
-
|
|
1045
|
-
[data-separator-content] {
|
|
1046
|
-
border-radius: 6px;
|
|
1047
|
-
}
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
[data-separator='line-info'][data-expand-index]
|
|
1051
|
-
[data-separator-wrapper]
|
|
1052
|
-
[data-separator-content] {
|
|
1053
|
-
border-top-left-radius: unset;
|
|
1054
|
-
border-bottom-left-radius: unset;
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
[data-gutter] {
|
|
1059
|
-
[data-separator='line-info'] [data-separator-wrapper] {
|
|
1060
|
-
padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
[data-separator='line-info'] [data-separator-content] {
|
|
1064
|
-
border-top-left-radius: 6px;
|
|
1065
|
-
border-bottom-left-radius: 6px;
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
[data-separator='line-info'][data-expand-index] [data-separator-content] {
|
|
1069
|
-
border-top-left-radius: unset;
|
|
1070
|
-
border-bottom-left-radius: unset;
|
|
1071
|
-
}
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
[data-additions] {
|
|
1075
|
-
[data-content] [data-separator='line-info'] {
|
|
1076
|
-
background-color: var(--diffs-bg);
|
|
1077
|
-
|
|
1078
|
-
[data-separator-wrapper] {
|
|
1079
|
-
display: none;
|
|
1080
|
-
}
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
[data-gutter] [data-separator='line-info'] [data-separator-wrapper] {
|
|
1084
|
-
display: block;
|
|
1085
|
-
height: 100%;
|
|
1086
|
-
background-color: var(--diffs-bg-separator);
|
|
1087
|
-
border-top-right-radius: 6px;
|
|
1088
|
-
border-bottom-right-radius: 6px;
|
|
1089
|
-
|
|
1090
|
-
[data-separator-content],
|
|
1091
|
-
[data-expand-button] {
|
|
1092
|
-
display: none;
|
|
1093
|
-
}
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
[data-overflow='scroll']
|
|
1098
|
-
[data-additions]
|
|
1099
|
-
[data-gutter]
|
|
1100
|
-
[data-separator='line-info']
|
|
1101
|
-
[data-separator-wrapper] {
|
|
1102
|
-
width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
[data-overflow='wrap']
|
|
1106
|
-
[data-additions]
|
|
1107
|
-
[data-content]
|
|
1108
|
-
[data-separator='line-info']
|
|
1109
|
-
[data-separator-wrapper] {
|
|
1110
|
-
background-color: var(--diffs-bg-separator);
|
|
1111
|
-
display: block;
|
|
1112
|
-
height: 100%;
|
|
1113
|
-
margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1114
|
-
border-top-right-radius: 6px;
|
|
1115
|
-
border-bottom-right-radius: 6px;
|
|
1116
|
-
|
|
1117
|
-
[data-separator-content],
|
|
1118
|
-
[data-expand-button] {
|
|
1119
|
-
display: none;
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
[data-separator='line-info'] [data-separator-wrapper] {
|
|
1124
|
-
[data-expand-both],
|
|
1125
|
-
[data-expand-down],
|
|
1126
|
-
[data-expand-up] {
|
|
1127
|
-
border-top-left-radius: 6px;
|
|
1128
|
-
border-bottom-left-radius: 6px;
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
@media (pointer: fine) {
|
|
1133
|
-
[data-separator='line-info'] [data-separator-wrapper] {
|
|
1134
|
-
&[data-separator-multi-button] {
|
|
1135
|
-
[data-expand-up] {
|
|
1136
|
-
border-top-left-radius: 6px;
|
|
1137
|
-
border-bottom-left-radius: unset;
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
[data-expand-down] {
|
|
1141
|
-
border-bottom-left-radius: 6px;
|
|
1142
|
-
border-top-left-radius: unset;
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
@media (pointer: coarse) {
|
|
1150
|
-
[data-separator='line-info-basic']
|
|
1151
|
-
[data-separator-wrapper][data-separator-multi-button] {
|
|
1152
|
-
grid-template-columns: 34px 34px auto;
|
|
1153
|
-
|
|
1154
|
-
[data-separator-content] {
|
|
1155
|
-
grid-column: unset;
|
|
1156
|
-
grid-row: unset;
|
|
1157
|
-
}
|
|
1158
|
-
}
|
|
1159
|
-
|
|
1160
|
-
@supports (width: 1cqi) {
|
|
1161
|
-
[data-separator='line-info'] [data-separator-wrapper] {
|
|
1162
|
-
[data-expand-both],
|
|
1163
|
-
[data-expand-down],
|
|
1164
|
-
[data-expand-up] {
|
|
1165
|
-
border-top-left-radius: 6px;
|
|
1166
|
-
border-bottom-left-radius: 6px;
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
|
-
&[data-separator-multi-button] {
|
|
1170
|
-
[data-expand-up] {
|
|
1171
|
-
border-top-left-radius: 6px;
|
|
1172
|
-
border-bottom-left-radius: 6px;
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
[data-expand-down] {
|
|
1176
|
-
border-bottom-left-radius: unset;
|
|
1177
|
-
border-top-left-radius: unset;
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
@media (pointer: fine) {
|
|
1185
|
-
[data-separator-wrapper][data-separator-multi-button] {
|
|
1186
|
-
display: grid;
|
|
1187
|
-
grid-template-rows: 50% 50%;
|
|
1188
|
-
|
|
1189
|
-
[data-separator-content] {
|
|
1190
|
-
grid-column: 2;
|
|
1191
|
-
grid-row: 1 / -1;
|
|
1192
|
-
min-width: min-content;
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
[data-expand-button] {
|
|
1196
|
-
grid-column: 1;
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
[data-separator='line-info'] [data-separator-wrapper],
|
|
1201
|
-
[data-separator='line-info']
|
|
1202
|
-
[data-separator-wrapper][data-separator-multi-button] {
|
|
1203
|
-
grid-template-columns: 34px auto;
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
[data-separator='line-info-basic'][data-expand-index]
|
|
1207
|
-
[data-separator-wrapper] {
|
|
1208
|
-
grid-template-columns: 100% auto;
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
[data-separator='line-info'],
|
|
1212
|
-
[data-separator='line-info-basic'] {
|
|
1213
|
-
[data-separator-multi-button] {
|
|
1214
|
-
[data-expand-up] {
|
|
1215
|
-
border-bottom: 1px solid var(--diffs-bg);
|
|
1216
|
-
border-right: 2px solid var(--diffs-bg);
|
|
1217
|
-
}
|
|
1218
|
-
[data-expand-down] {
|
|
1219
|
-
border-top: 1px solid var(--diffs-bg);
|
|
1220
|
-
border-right: 2px solid var(--diffs-bg);
|
|
1221
|
-
}
|
|
1222
|
-
}
|
|
1223
|
-
}
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
[data-additions] [data-gutter] [data-separator-wrapper],
|
|
1227
|
-
[data-additions] [data-separator='line-info-basic'] [data-separator-wrapper],
|
|
1228
|
-
[data-content] [data-separator-wrapper] {
|
|
1229
|
-
display: none;
|
|
1230
|
-
}
|
|
1231
|
-
|
|
1232
|
-
[data-line-annotation],
|
|
1233
|
-
[data-gutter-buffer='annotation'] {
|
|
1234
|
-
--diffs-line-bg: var(--diffs-bg-context);
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
[data-merge-conflict-actions],
|
|
1238
|
-
[data-gutter-buffer='merge-conflict-action'] {
|
|
1239
|
-
--diffs-line-bg: var(--diffs-bg-context);
|
|
1240
|
-
}
|
|
1241
|
-
|
|
1242
|
-
[data-has-merge-conflict] [data-line-annotation],
|
|
1243
|
-
[data-has-merge-conflict] [data-gutter-buffer='annotation'] {
|
|
1244
|
-
--diffs-line-bg: var(--diffs-bg);
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
[data-has-merge-conflict] [data-gutter-buffer='merge-conflict-action'] {
|
|
1248
|
-
--diffs-line-bg: var(--diffs-bg);
|
|
1249
|
-
}
|
|
1250
|
-
|
|
1251
|
-
[data-line-annotation] {
|
|
1252
|
-
min-height: var(--diffs-annotation-min-height, 0);
|
|
1253
|
-
z-index: 2;
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
[data-merge-conflict-actions] {
|
|
1257
|
-
z-index: 2;
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
[data-separator='custom'] {
|
|
1261
|
-
display: grid;
|
|
1262
|
-
grid-template-columns: subgrid;
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
[data-line],
|
|
1266
|
-
[data-column-number],
|
|
1267
|
-
[data-no-newline] {
|
|
1268
|
-
position: relative;
|
|
1269
|
-
padding-inline: 1ch;
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
[data-indicators='classic'] [data-line] {
|
|
1273
|
-
padding-inline-start: 2ch;
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
[data-indicators='classic'] {
|
|
1277
|
-
[data-line-type='change-addition'],
|
|
1278
|
-
[data-line-type='change-deletion'] {
|
|
1279
|
-
&[data-no-newline],
|
|
1280
|
-
&[data-line] {
|
|
1281
|
-
&::before {
|
|
1282
|
-
display: inline-block;
|
|
1283
|
-
width: 1ch;
|
|
1284
|
-
height: 1lh;
|
|
1285
|
-
position: absolute;
|
|
1286
|
-
top: 0;
|
|
1287
|
-
left: 0;
|
|
1288
|
-
-webkit-user-select: none;
|
|
1289
|
-
user-select: none;
|
|
1290
|
-
}
|
|
1291
|
-
}
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
[data-line-type='change-addition'] {
|
|
1295
|
-
&[data-line],
|
|
1296
|
-
&[data-no-newline] {
|
|
1297
|
-
&::before {
|
|
1298
|
-
content: '+';
|
|
1299
|
-
color: var(--diffs-addition-base);
|
|
1300
|
-
}
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
|
|
1304
|
-
[data-line-type='change-deletion'] {
|
|
1305
|
-
&[data-line],
|
|
1306
|
-
&[data-no-newline] {
|
|
1307
|
-
&::before {
|
|
1308
|
-
content: '-';
|
|
1309
|
-
color: var(--diffs-deletion-base);
|
|
1310
|
-
}
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
[data-indicators='bars'] {
|
|
1316
|
-
[data-line-type='change-deletion'],
|
|
1317
|
-
[data-line-type='change-addition'] {
|
|
1318
|
-
&[data-column-number] {
|
|
1319
|
-
&::before {
|
|
1320
|
-
content: '';
|
|
1321
|
-
display: block;
|
|
1322
|
-
width: 4px;
|
|
1323
|
-
height: 100%;
|
|
1324
|
-
position: absolute;
|
|
1325
|
-
top: 0;
|
|
1326
|
-
left: 0;
|
|
1327
|
-
-webkit-user-select: none;
|
|
1328
|
-
user-select: none;
|
|
1329
|
-
contain: strict;
|
|
1330
|
-
}
|
|
1331
|
-
}
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
[data-line-type='change-deletion'] {
|
|
1335
|
-
&[data-column-number] {
|
|
1336
|
-
&::before {
|
|
1337
|
-
background-image: linear-gradient(
|
|
1338
|
-
0deg,
|
|
1339
|
-
var(--diffs-bg-deletion) 50%,
|
|
1340
|
-
var(--diffs-deletion-base) 50%
|
|
1341
|
-
);
|
|
1342
|
-
background-repeat: repeat;
|
|
1343
|
-
background-size: 2px 2px;
|
|
1344
|
-
background-size: calc(1lh / round(1lh / 2px))
|
|
1345
|
-
calc(1lh / round(1lh / 2px));
|
|
1346
|
-
}
|
|
1347
|
-
}
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
[data-line-type='change-addition'] {
|
|
1351
|
-
&[data-column-number] {
|
|
1352
|
-
&::before {
|
|
1353
|
-
background-color: var(--diffs-addition-base);
|
|
1354
|
-
}
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
[data-overflow='wrap'] {
|
|
1360
|
-
[data-line],
|
|
1361
|
-
[data-annotation-content] {
|
|
1362
|
-
white-space: pre-wrap;
|
|
1363
|
-
word-break: break-word;
|
|
1364
|
-
}
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
|
-
[data-overflow='scroll'] [data-line] {
|
|
1368
|
-
white-space: pre;
|
|
1369
|
-
min-height: 1lh;
|
|
1370
|
-
}
|
|
1371
|
-
|
|
1372
|
-
[data-column-number] {
|
|
1373
|
-
box-sizing: content-box;
|
|
1374
|
-
text-align: right;
|
|
1375
|
-
-webkit-user-select: none;
|
|
1376
|
-
user-select: none;
|
|
1377
|
-
background-color: var(--diffs-bg);
|
|
1378
|
-
color: var(--diffs-fg-number);
|
|
1379
|
-
padding-left: 2ch;
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
[data-line-number-content] {
|
|
1383
|
-
display: inline-block;
|
|
1384
|
-
min-width: var(
|
|
1385
|
-
--diffs-min-number-column-width,
|
|
1386
|
-
var(--diffs-min-number-column-width-default, 3ch)
|
|
1387
|
-
);
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
[data-disable-line-numbers] {
|
|
1391
|
-
[data-column-number] {
|
|
1392
|
-
min-width: 4px;
|
|
1393
|
-
padding: 0;
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
|
-
[data-line-number-content] {
|
|
1397
|
-
display: none;
|
|
1398
|
-
}
|
|
1399
|
-
|
|
1400
|
-
[data-gutter-utility-slot] {
|
|
1401
|
-
right: unset;
|
|
1402
|
-
left: 0;
|
|
1403
|
-
justify-content: flex-start;
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
&[data-indicators='bars'] [data-gutter-utility-slot] {
|
|
1407
|
-
/* Using 5px here because theres a 1px separator after the bar */
|
|
1408
|
-
left: 5px;
|
|
1409
|
-
}
|
|
1410
|
-
}
|
|
1411
|
-
|
|
1412
|
-
[data-file][data-disable-line-numbers] {
|
|
1413
|
-
[data-gutter-buffer],
|
|
1414
|
-
[data-column-number] {
|
|
1415
|
-
min-width: 0;
|
|
1416
|
-
border-right: 0;
|
|
1417
|
-
}
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
[data-interactive-line-numbers] [data-column-number] {
|
|
1421
|
-
cursor: pointer;
|
|
1422
|
-
}
|
|
1423
|
-
|
|
1424
|
-
[data-diff-span] {
|
|
1425
|
-
border-radius: 3px;
|
|
1426
|
-
-webkit-box-decoration-break: clone;
|
|
1427
|
-
box-decoration-break: clone;
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
[data-line-type='change-addition'] {
|
|
1431
|
-
&[data-column-number] {
|
|
1432
|
-
color: var(
|
|
1433
|
-
--diffs-fg-number-addition-override,
|
|
1434
|
-
var(--diffs-addition-base)
|
|
1435
|
-
);
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
|
-
[data-diff-span] {
|
|
1439
|
-
background-color: var(--diffs-bg-addition-emphasis);
|
|
1440
|
-
}
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
[data-line-type='change-deletion'] {
|
|
1444
|
-
&[data-column-number] {
|
|
1445
|
-
color: var(
|
|
1446
|
-
--diffs-fg-number-deletion-override,
|
|
1447
|
-
var(--diffs-deletion-base)
|
|
1448
|
-
);
|
|
1449
|
-
}
|
|
1450
|
-
|
|
1451
|
-
[data-diff-span] {
|
|
1452
|
-
background-color: var(--diffs-bg-deletion-emphasis);
|
|
1453
|
-
}
|
|
1454
|
-
}
|
|
1455
|
-
|
|
1456
|
-
[data-background] [data-line-type='change-addition'] {
|
|
1457
|
-
--diffs-line-bg: var(--diffs-bg-addition);
|
|
1458
|
-
|
|
1459
|
-
&[data-column-number] {
|
|
1460
|
-
background-color: var(--diffs-bg-addition-number);
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
|
-
[data-background] [data-line-type='change-deletion'] {
|
|
1465
|
-
--diffs-line-bg: var(--diffs-bg-deletion);
|
|
1466
|
-
|
|
1467
|
-
&[data-column-number] {
|
|
1468
|
-
background-color: var(--diffs-bg-deletion-number);
|
|
1469
|
-
}
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
[data-merge-conflict='marker-start'],
|
|
1473
|
-
[data-merge-conflict='marker-base'],
|
|
1474
|
-
[data-merge-conflict='marker-separator'],
|
|
1475
|
-
[data-merge-conflict='marker-end'] {
|
|
1476
|
-
padding-left: 1ch;
|
|
1477
|
-
color: var(--diffs-fg);
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
[data-merge-conflict='marker-start'],
|
|
1481
|
-
[data-merge-conflict='marker-end'] {
|
|
1482
|
-
display: flex;
|
|
1483
|
-
align-items: center;
|
|
1484
|
-
|
|
1485
|
-
&::after {
|
|
1486
|
-
color: var(--diffs-fg-conflict-marker);
|
|
1487
|
-
font-style: normal;
|
|
1488
|
-
font-size: 0.75rem;
|
|
1489
|
-
line-height: 1.25rem;
|
|
1490
|
-
padding-left: 1ch;
|
|
1491
|
-
font-family: var(
|
|
1492
|
-
--diffs-header-font-family,
|
|
1493
|
-
var(--diffs-header-font-fallback)
|
|
1494
|
-
);
|
|
1495
|
-
}
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
[data-merge-conflict='marker-start']::after {
|
|
1499
|
-
content: '(Current Change)';
|
|
1500
|
-
}
|
|
1501
|
-
|
|
1502
|
-
[data-merge-conflict='marker-end']::after {
|
|
1503
|
-
content: '(Incoming Change)';
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
[data-merge-conflict='marker-base'],
|
|
1507
|
-
[data-merge-conflict='marker-end'] {
|
|
1508
|
-
&[data-line],
|
|
1509
|
-
&[data-no-newline] {
|
|
1510
|
-
background-color: var(--diffs-bg-conflict-marker);
|
|
1511
|
-
}
|
|
1512
|
-
|
|
1513
|
-
&[data-column-number] {
|
|
1514
|
-
background-color: var(--diffs-bg-conflict-marker-number);
|
|
1515
|
-
color: var(--diffs-fg-conflict-marker);
|
|
1516
|
-
|
|
1517
|
-
[data-line-number-content] {
|
|
1518
|
-
color: var(--diffs-fg-conflict-marker);
|
|
1519
|
-
}
|
|
1520
|
-
}
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
|
-
[data-merge-conflict='current'] {
|
|
1524
|
-
&[data-line],
|
|
1525
|
-
&[data-no-newline] {
|
|
1526
|
-
background-color: var(--conflict-bg-current);
|
|
1527
|
-
}
|
|
1528
|
-
|
|
1529
|
-
&[data-column-number] {
|
|
1530
|
-
background-color: var(--conflict-bg-current-number);
|
|
1531
|
-
color: var(--diffs-addition-base);
|
|
1532
|
-
}
|
|
1533
|
-
}
|
|
1534
|
-
|
|
1535
|
-
[data-gutter-buffer='merge-conflict-marker-start'],
|
|
1536
|
-
[data-merge-conflict='marker-start'] {
|
|
1537
|
-
background-color: var(--conflict-bg-current-header);
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
[data-gutter-buffer='merge-conflict-marker-end'],
|
|
1541
|
-
[data-merge-conflict='marker-end'] {
|
|
1542
|
-
background-color: var(--conflict-bg-incoming-header);
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
[data-merge-conflict='marker-separator'] {
|
|
1546
|
-
&[data-line],
|
|
1547
|
-
&[data-no-newline] {
|
|
1548
|
-
background-color: var(--diffs-bg);
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
&[data-column-number] {
|
|
1552
|
-
background-color: var(--diffs-bg);
|
|
1553
|
-
}
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
[data-merge-conflict='base'] {
|
|
1557
|
-
&[data-line],
|
|
1558
|
-
&[data-no-newline] {
|
|
1559
|
-
background-color: var(--diffs-bg-conflict-base);
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
&[data-column-number] {
|
|
1563
|
-
background-color: var(--diffs-bg-conflict-base-number);
|
|
1564
|
-
color: var(--diffs-modified-base);
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
[data-merge-conflict='incoming'] {
|
|
1569
|
-
&[data-line],
|
|
1570
|
-
&[data-no-newline] {
|
|
1571
|
-
background-color: var(--conflict-bg-incoming);
|
|
1572
|
-
}
|
|
1573
|
-
|
|
1574
|
-
&[data-column-number] {
|
|
1575
|
-
background-color: var(--conflict-bg-incoming-number);
|
|
1576
|
-
color: var(--diffs-modified-base);
|
|
1577
|
-
}
|
|
1578
|
-
}
|
|
1579
|
-
|
|
1580
|
-
@media (pointer: fine) {
|
|
1581
|
-
[data-column-number],
|
|
1582
|
-
[data-line] {
|
|
1583
|
-
&[data-hovered] {
|
|
1584
|
-
background-color: var(--diffs-bg-hover);
|
|
1585
|
-
}
|
|
1586
|
-
}
|
|
1587
|
-
|
|
1588
|
-
[data-background] {
|
|
1589
|
-
[data-column-number],
|
|
1590
|
-
[data-line] {
|
|
1591
|
-
&[data-hovered] {
|
|
1592
|
-
&[data-line-type='change-deletion'] {
|
|
1593
|
-
background-color: var(--diffs-bg-deletion-hover);
|
|
1594
|
-
}
|
|
1595
|
-
|
|
1596
|
-
&[data-line-type='change-addition'] {
|
|
1597
|
-
background-color: var(--diffs-bg-addition-hover);
|
|
1598
|
-
}
|
|
1599
|
-
}
|
|
1600
|
-
}
|
|
1601
|
-
}
|
|
1602
|
-
}
|
|
1603
|
-
|
|
1604
|
-
[data-diffs-header='default'] {
|
|
1605
|
-
position: relative;
|
|
1606
|
-
background-color: var(--diffs-bg);
|
|
1607
|
-
display: flex;
|
|
1608
|
-
flex-direction: row;
|
|
1609
|
-
justify-content: space-between;
|
|
1610
|
-
align-items: center;
|
|
1611
|
-
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1612
|
-
min-height: calc(
|
|
1613
|
-
1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3)
|
|
1614
|
-
);
|
|
1615
|
-
padding-inline: 16px;
|
|
1616
|
-
top: 0;
|
|
1617
|
-
z-index: 2;
|
|
1618
|
-
}
|
|
1619
|
-
|
|
1620
|
-
[data-header-content] {
|
|
1621
|
-
display: flex;
|
|
1622
|
-
flex-direction: row;
|
|
1623
|
-
align-items: center;
|
|
1624
|
-
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1625
|
-
min-width: 0;
|
|
1626
|
-
white-space: nowrap;
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
[data-header-content] [data-prev-name],
|
|
1630
|
-
[data-header-content] [data-title] {
|
|
1631
|
-
direction: rtl;
|
|
1632
|
-
overflow: hidden;
|
|
1633
|
-
text-overflow: ellipsis;
|
|
1634
|
-
min-width: 0;
|
|
1635
|
-
white-space: nowrap;
|
|
1636
|
-
}
|
|
1637
|
-
|
|
1638
|
-
[data-prev-name] {
|
|
1639
|
-
opacity: 0.7;
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
[data-rename-icon] {
|
|
1643
|
-
fill: currentColor;
|
|
1644
|
-
flex-shrink: 0;
|
|
1645
|
-
flex-grow: 0;
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1648
|
-
[data-diffs-header='default'] [data-metadata] {
|
|
1649
|
-
display: flex;
|
|
1650
|
-
align-items: center;
|
|
1651
|
-
gap: 1ch;
|
|
1652
|
-
white-space: nowrap;
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
[data-diffs-header='default'] [data-additions-count] {
|
|
1656
|
-
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1657
|
-
color: var(--diffs-addition-base);
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
|
-
[data-diffs-header='default'] [data-deletions-count] {
|
|
1661
|
-
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1662
|
-
color: var(--diffs-deletion-base);
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
|
-
[data-annotation-content] {
|
|
1666
|
-
position: relative;
|
|
1667
|
-
display: flow-root;
|
|
1668
|
-
align-self: flex-start;
|
|
1669
|
-
z-index: 2;
|
|
1670
|
-
min-width: 0;
|
|
1671
|
-
isolation: isolate;
|
|
1672
|
-
}
|
|
1673
|
-
|
|
1674
|
-
[data-merge-conflict-actions-content] {
|
|
1675
|
-
display: flex;
|
|
1676
|
-
align-items: center;
|
|
1677
|
-
gap: 0.25rem;
|
|
1678
|
-
padding-inline: 0.5rem;
|
|
1679
|
-
min-height: 1.75rem;
|
|
1680
|
-
font-family: var(
|
|
1681
|
-
--diffs-header-font-family,
|
|
1682
|
-
var(--diffs-header-font-fallback)
|
|
1683
|
-
);
|
|
1684
|
-
font-size: 0.75rem;
|
|
1685
|
-
line-height: 1.2;
|
|
1686
|
-
color: var(--diffs-fg);
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
|
-
[data-merge-conflict-action] {
|
|
1690
|
-
appearance: none;
|
|
1691
|
-
border: 0;
|
|
1692
|
-
background: transparent;
|
|
1693
|
-
color: var(--diffs-fg-number);
|
|
1694
|
-
font: inherit;
|
|
1695
|
-
font-style: normal;
|
|
1696
|
-
cursor: pointer;
|
|
1697
|
-
padding: 0;
|
|
1698
|
-
}
|
|
1699
|
-
|
|
1700
|
-
[data-merge-conflict-action]:hover {
|
|
1701
|
-
color: var(--diffs-fg);
|
|
1702
|
-
}
|
|
1703
|
-
|
|
1704
|
-
[data-merge-conflict-action='current']:hover {
|
|
1705
|
-
color: var(--diffs-addition-base);
|
|
1706
|
-
}
|
|
1707
|
-
|
|
1708
|
-
[data-merge-conflict-action='incoming']:hover {
|
|
1709
|
-
color: var(--diffs-modified-base);
|
|
1710
|
-
}
|
|
1711
|
-
|
|
1712
|
-
[data-merge-conflict-action-separator] {
|
|
1713
|
-
color: var(--diffs-fg-number);
|
|
1714
|
-
opacity: 0.6;
|
|
1715
|
-
-webkit-user-select: none;
|
|
1716
|
-
user-select: none;
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
/* Sticky positioning has a composite costs, so we should _only_ pay it if we
|
|
1720
|
-
* need to */
|
|
1721
|
-
[data-overflow='scroll'] [data-annotation-content] {
|
|
1722
|
-
position: sticky;
|
|
1723
|
-
width: var(--diffs-column-content-width, auto);
|
|
1724
|
-
left: var(--diffs-column-number-width, 0);
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
[data-overflow='scroll'] [data-merge-conflict-actions-content] {
|
|
1728
|
-
position: sticky;
|
|
1729
|
-
width: var(--diffs-column-content-width, auto);
|
|
1730
|
-
left: var(--diffs-column-number-width, 0);
|
|
1731
|
-
}
|
|
1732
|
-
|
|
1733
|
-
/* Undo some of the stuff that the 'pre' tag does */
|
|
1734
|
-
[data-annotation-slot] {
|
|
1735
|
-
text-wrap-mode: wrap;
|
|
1736
|
-
word-break: normal;
|
|
1737
|
-
white-space-collapse: collapse;
|
|
1738
|
-
}
|
|
1739
|
-
|
|
1740
|
-
[data-change-icon] {
|
|
1741
|
-
fill: currentColor;
|
|
1742
|
-
flex-shrink: 0;
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
[data-change-icon='change'],
|
|
1746
|
-
[data-change-icon='rename-pure'],
|
|
1747
|
-
[data-change-icon='rename-changed'] {
|
|
1748
|
-
color: var(--diffs-modified-base);
|
|
1749
|
-
}
|
|
1750
|
-
|
|
1751
|
-
[data-change-icon='new'] {
|
|
1752
|
-
color: var(--diffs-addition-base);
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
[data-change-icon='deleted'] {
|
|
1756
|
-
color: var(--diffs-deletion-base);
|
|
1757
|
-
}
|
|
1758
|
-
|
|
1759
|
-
[data-change-icon='file'] {
|
|
1760
|
-
opacity: 0.6;
|
|
1761
|
-
}
|
|
1762
|
-
|
|
1763
|
-
/* Line selection highlighting */
|
|
1764
|
-
[data-selected-line] {
|
|
1765
|
-
&[data-gutter-buffer='annotation'],
|
|
1766
|
-
&[data-column-number] {
|
|
1767
|
-
color: var(--diffs-selection-number-fg);
|
|
1768
|
-
background-color: var(--diffs-bg-selection-number);
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1771
|
-
&[data-line] {
|
|
1772
|
-
background-color: var(--diffs-bg-selection);
|
|
1773
|
-
}
|
|
1774
|
-
}
|
|
1775
|
-
|
|
1776
|
-
[data-line-type='change-addition'],
|
|
1777
|
-
[data-line-type='change-deletion'] {
|
|
1778
|
-
&[data-selected-line] {
|
|
1779
|
-
&[data-line],
|
|
1780
|
-
&[data-line][data-hovered] {
|
|
1781
|
-
background-color: light-dark(
|
|
1782
|
-
color-mix(
|
|
1783
|
-
in lab,
|
|
1784
|
-
var(--diffs-line-bg, var(--diffs-bg)) 82%,
|
|
1785
|
-
var(--diffs-selection-base)
|
|
1786
|
-
),
|
|
1787
|
-
color-mix(
|
|
1788
|
-
in lab,
|
|
1789
|
-
var(--diffs-line-bg, var(--diffs-bg)) 75%,
|
|
1790
|
-
var(--diffs-selection-base)
|
|
1791
|
-
)
|
|
1792
|
-
);
|
|
1793
|
-
}
|
|
1794
|
-
|
|
1795
|
-
&[data-column-number],
|
|
1796
|
-
&[data-column-number][data-hovered] {
|
|
1797
|
-
color: var(--diffs-selection-number-fg);
|
|
1798
|
-
background-color: light-dark(
|
|
1799
|
-
color-mix(
|
|
1800
|
-
in lab,
|
|
1801
|
-
var(--diffs-line-bg, var(--diffs-bg)) 75%,
|
|
1802
|
-
var(--diffs-selection-base)
|
|
1803
|
-
),
|
|
1804
|
-
color-mix(
|
|
1805
|
-
in lab,
|
|
1806
|
-
var(--diffs-line-bg, var(--diffs-bg)) 60%,
|
|
1807
|
-
var(--diffs-selection-base)
|
|
1808
|
-
)
|
|
1809
|
-
);
|
|
1810
|
-
}
|
|
1811
|
-
}
|
|
1812
|
-
}
|
|
1813
|
-
|
|
1814
|
-
[data-gutter-utility-slot] {
|
|
1815
|
-
position: absolute;
|
|
1816
|
-
top: 0;
|
|
1817
|
-
bottom: 0;
|
|
1818
|
-
right: 0;
|
|
1819
|
-
display: flex;
|
|
1820
|
-
justify-content: flex-end;
|
|
1821
|
-
}
|
|
1822
|
-
|
|
1823
|
-
[data-unmodified-lines] {
|
|
1824
|
-
display: block;
|
|
1825
|
-
overflow: hidden;
|
|
1826
|
-
min-width: 0;
|
|
1827
|
-
text-overflow: ellipsis;
|
|
1828
|
-
white-space: nowrap;
|
|
1829
|
-
flex: 0 1 auto;
|
|
1830
|
-
}
|
|
1831
|
-
|
|
1832
|
-
[data-error-wrapper] {
|
|
1833
|
-
overflow: auto;
|
|
1834
|
-
padding: var(--diffs-gap-block, var(--diffs-gap-fallback))
|
|
1835
|
-
var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1836
|
-
max-height: 400px;
|
|
1837
|
-
scrollbar-width: none;
|
|
1838
|
-
|
|
1839
|
-
[data-error-message] {
|
|
1840
|
-
font-weight: bold;
|
|
1841
|
-
font-size: 18px;
|
|
1842
|
-
color: var(--diffs-deletion-base);
|
|
1843
|
-
}
|
|
1844
|
-
|
|
1845
|
-
[data-error-stack] {
|
|
1846
|
-
color: var(--diffs-fg-number);
|
|
1847
|
-
}
|
|
1848
|
-
}
|
|
1849
|
-
|
|
1850
|
-
[data-placeholder] {
|
|
1851
|
-
contain: strict;
|
|
1852
|
-
}
|
|
1853
|
-
|
|
1854
|
-
[data-utility-button] {
|
|
1855
|
-
display: flex;
|
|
1856
|
-
align-items: center;
|
|
1857
|
-
justify-content: center;
|
|
1858
|
-
border: none;
|
|
1859
|
-
appearance: none;
|
|
1860
|
-
width: 1lh;
|
|
1861
|
-
height: 1lh;
|
|
1862
|
-
margin-right: calc((1lh - 1ch) * -1);
|
|
1863
|
-
padding: 0;
|
|
1864
|
-
cursor: pointer;
|
|
1865
|
-
font-size: var(--diffs-font-size, 13px);
|
|
1866
|
-
line-height: var(--diffs-line-height, 20px);
|
|
1867
|
-
border-radius: 4px;
|
|
1868
|
-
background-color: var(--diffs-modified-base);
|
|
1869
|
-
color: var(--diffs-bg);
|
|
1870
|
-
fill: currentColor;
|
|
1871
|
-
position: relative;
|
|
1872
|
-
z-index: 4;
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
`;const G1="@layer base, theme, rendered, unsafe;";function PN(e){return`${G1}
|
|
1876
|
-
@layer unsafe {
|
|
1877
|
-
${e}
|
|
1878
|
-
}`}function BN(e,t="system"){return`${G1}
|
|
1879
|
-
@layer rendered {
|
|
1880
|
-
:host {${t==="system"?"":`
|
|
1881
|
-
color-scheme: ${t};`}
|
|
1882
|
-
${e}
|
|
1883
|
-
}
|
|
1884
|
-
}`}function sd({code:e,pre:t,columnType:i,rowSpan:a,containerSize:o=!1}={}){return e==null&&(e=document.createElement("code"),e.setAttribute("data-code",""),i!=null&&e.setAttribute(`data-${i}`,""),t?.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 jN({shadowRoot:e,currentNode:t,themeCSS:i}){if(i.trim()===""){t?.remove();return}return t??=VN(),t.textContent=i,t.parentNode!==e&&e.appendChild(t),t}function VN(){const e=document.createElement("style");return e.setAttribute(I1,""),e}function GN(e,t){if(t==null)return;const i=e.shadowRoot??e.attachShadow({mode:"open"});i.innerHTML===""&&(i.innerHTML=t)}function $N(e,{type:t,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(t==="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",""),t==="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(Gs)==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const a=this.attachShadow({mode:"open"});e==null&&(e=new CSSStyleSheet,e.replaceSync(HN)),a.adoptedStyleSheets=[e]}}customElements.define(Gs,t)}const qN=!0;function Lb(e,t,i){if(e===t||e==null||t==null)return e===t;const a=new Set(i),o=Object.keys(e),s=new Set(Object.keys(t));for(const c of o)if(s.delete(c),!a.has(c)&&(!(c in t)||e[c]!==t[c]))return!1;for(const c of Array.from(s))if(!a.has(c))return!1;return!0}function FN(e,t){const i=e?.theme??zn,a=t?.theme??zn,o=Rb(e),s=Rb(t);return B1(i,a)&&Lb(e,t,["theme","parseDiffOptions"])&&Lb(o,s)}function Rb(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function YN({hunkIndex:e,lineIndex:t,conflictIndex:i}){return`merge-conflict-action-${e}-${t}-${i}`}function XN(e,t){const i=t.hunks[e.hunkIndex];if(i!=null)return{hunkIndex:e.hunkIndex,lineIndex:QN(i,e.startContentIndex)}}function QN(e,t){let i=e.unifiedLineStart;for(let a=0;a<t;a++){const o=e.hunkContent[a];i+=o.type==="context"?o.lines:o.deletions+o.additions}return i}function ZN({fileDiff:e,actions:t,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),A=o?.(e);return H.jsxs(H.Fragment,{children:[b!=null?H.jsx("div",{slot:Eh,children:b}):H.jsxs(H.Fragment,{children:[S!=null&&H.jsx("div",{slot:_h,children:S}),A!=null&&H.jsx("div",{slot:Sh,children:A})]}),s!=null&&p?.map((D,x)=>H.jsx("div",{slot:Ul(D),children:s(D)},x)),t!=null&&d!=null&&y!=null&&t.map(D=>{if(D==null)return;const x=KN(D,e);return H.jsx("div",{slot:x,style:dD,children:d(D,y)},x)}),v!=null&&H.jsx("div",{slot:"gutter-utility-slot",style:fD,children:v(g)})]})}function KN(e,t){const i=XN(e,t);return i!=null?YN({hunkIndex:i.hunkIndex,lineIndex:i.lineIndex,conflictIndex:e.conflictIndex}):void 0}var WN=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,t,i){if(t==null||i==null)for(const a of e.children??[])a instanceof HTMLElement&&("deletions"in a.dataset?t=a:"additions"in a.dataset&&(i=a));if(i==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeDeletions=t,t.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 _s(e){return Re({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function Ss(e){return Re({tagName:"div",children:[Re({tagName:"span",children:[li("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":e,"data-column-content":""}})}function ud(e){return Re({tagName:"div",children:[$s({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 la({type:e,content:t,expandIndex:i,chunked:a=!1,slotName:o,isFirstHunk:s,isLastHunk:c}){const f=[];if(e==="metadata"&&t!=null&&f.push(Re({tagName:"div",children:[li(t)],properties:{"data-separator-wrapper":""}})),(e==="line-info"||e==="line-info-basic")&&t!=null){const d=[];i!=null&&(a?(s||d.push(ud("up")),c||d.push(ud("down"))):d.push(ud(!s&&!c?"both":s?"down":"up"))),d.push(Re({tagName:"div",children:[Re({tagName:"span",children:[li(t)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),f.push(Re({tagName:"div",children:d,properties:{"data-separator-wrapper":"","data-separator-multi-button":d.length>2?"":void 0}}))}return e==="custom"&&o!=null&&f.push(Re({tagName:"slot",properties:{name:o}})),Re({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 JN(e,t){return`hunk-separator-${e}-${t}`}function eO(e){const t=e.at(-1);return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}function tO(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}let nO=-1;var iO=class{__id=`diff-hunks-renderer:${++nO}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;constructor(e={theme:zn},t,i){this.options=e,this.onRenderUpdate=t,this.workerManager=i,i?.isWorkingPool()!==!0&&(this.highlighter=od(e.theme??zn)?OD():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,t,i=this.getOptionsWithDefaults().expansionLineCount){const a={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t==="up"||t==="both")&&(a.fromStart+=i),(t==="down"||t==="both")&&(a.fromEnd+=i),this.renderCache?.highlighted!==!0&&(this.renderCache=void 0),this.expandedHunks.set(e,a)}getExpandedHunk(e){return this.expandedHunks.get(e)??SD}getExpandedHunksMap(){return this.expandedHunks}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(const t of e){const i=(()=>{switch(t.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),a=i[t.lineNumber]??[];i[t.lineNumber]=a,a.push(t)}}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e}}getSplitLineDecoration({side:e,type:t}){return t!=="change"?{gutterLineType:t}:{gutterLineType:e==="deletions"?"change-deletion":"change-addition"}}createAnnotationElement(e){return EN(e)}getOptionsWithDefaults(){const{diffIndicators:e="bars",diffStyle:t="split",disableBackground:i=!1,disableFileHeader:a=!1,disableLineNumbers:o=!1,disableVirtualizationBuffers:s=!1,collapsed:c=!1,expandUnchanged:f=!1,collapsedContextThreshold:d=ma,expansionLineCount:p=100,hunkSeparators:g="line-info",lineDiffType:y="word-alt",maxLineDiffLength:v=1e3,overflow:b="scroll",theme:S=zn,headerRenderMode:A="default",tokenizeMaxLineLength:D=1e3,useTokenTransformer:x=!1,useCSSClasses:T=!1}=this.options;return{diffIndicators:e,diffStyle:t,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:A,tokenizeMaxLineLength:D,useTokenTransformer:x,useCSSClasses:T}}async initializeHighlighter(){return this.highlighter=await ND(RN(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;const{options:t}=this.getRenderOptions(e);let i=this.workerManager?.getDiffResultCache(e);i!=null&&!ad(t,i.options)&&(i=void 0),this.renderCache??={diff:e,highlighted:!qD(e),options:t,result:i?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0&&this.renderCache.result==null&&this.workerManager.highlightDiffAST(this,this.diff)}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();const{theme:a,tokenizeMaxLineLength:o,lineDiffType:s,maxLineDiffLength:c}=this.getOptionsWithDefaults();return{theme:a,useTokenTransformer:DN(this.options),tokenizeMaxLineLength:o,lineDiffType:s,maxLineDiffLength:c}})();this.getOptionsWithDefaults();const{renderCache:i}=this;return i?.result==null?{options:t,forceRender:!0}:e!==i.diff||!ad(t,i.options)?{options:t,forceRender:!0}:{options:t,forceRender:!1}}renderDiff(e=this.renderCache?.diff,t=cb){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||!V1(this.renderCache.renderRange,t)))&&(this.renderCache.diff=e,this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,tO(t)||i?!0:this.expandedHunks,a),this.renderCache.renderRange=t),t.totalLines>0&&(!this.renderCache.highlighted||c)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??ya(e.name);const f=this.highlighter!=null&&od(s.theme),d=this.highlighter!=null&&Ab(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,t,this.renderCache.result):void 0}async asyncRender(e,t=cb){const{result:i}=await this.asyncHighlight(e);return this.processDiffResult(e,t,i)}createPreElement(e,t,i){const{diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c}=this.getOptionsWithDefaults();return TN({type:"diff",diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:e,totalLines:t,customProperties:i})}async asyncHighlight(e){this.computedLang=e.lang??ya(e.name);const t=this.highlighter!=null&&od(this.options.theme??zn),i=this.highlighter!=null&&Ab(this.computedLang);return(this.highlighter==null||!t||!i)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter)}renderDiffWithHighlighter(e,t,i=!1){const{options:a}=this.getRenderOptions(e),{collapsedContextThreshold:o}=this.getOptionsWithDefaults();return{result:sN(e,t,a,{forcePlainText:i,expandedHunks:i?!0:void 0,collapsedContextThreshold:o}),options:a}}onHighlightSuccess(e,t,i){if(this.renderCache==null)return;const a=!this.renderCache.highlighted||!ad(this.renderCache.options,i)||this.renderCache.diff!==e;this.renderCache={diff:e,options:i,highlighted:!0,result:t,renderRange:void 0},a&&this.onRenderUpdate?.()}onHighlightError(e){console.error(e)}processDiffResult(e,t,{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 A=[],{additionLines:D,deletionLines:x}=i,T={rowCount:0,hunkSeparators:g,additionsContentAST:v,deletionsContentAST:b,unifiedContentAST:S,unifiedGutterAST:ys(),deletionsGutterAST:ys(),additionsGutterAST:ys(),expansionLineCount:d,hunkData:A,incrementRowCount(fe=1){T.rowCount+=fe},pushToGutter(fe,ie){switch(fe){case"unified":T.unifiedGutterAST.children.push(ie);break;case"deletions":T.deletionsGutterAST.children.push(ie);break;case"additions":T.additionsGutterAST.children.push(ie);break}}},k=rO(e),I={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",Sn(void 0,"buffer",this.size)),v?.push(_s(this.size))):(T.pushToGutter("deletions",Sn(void 0,"buffer",this.size)),b?.push(_s(this.size))),this.size=0,this.side=void 0}}},z=(fe,ie,te,B,X)=>{T.pushToGutter(fe,zD(ie,te,B,X))};function R(fe){I.flush(),s==="unified"?cd("unified",fe,T):(cd("deletions",fe,T),cd("additions",fe,T))}qs({diff:e,diffStyle:s,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:f?!0:this.expandedHunks,collapsedContextThreshold:p,callback:({hunkIndex:fe,hunk:ie,collapsedBefore:te,collapsedAfter:B,additionLine:X,deletionLine:oe,type:he})=>{const L=oe!=null?oe.splitLineIndex:X.splitLineIndex,O=X!=null?X.unifiedLineIndex:oe.unifiedLineIndex;s==="split"&&he!=="change"&&I.flush(),te>0&&R({hunkIndex:fe,collapsedLines:te,rangeSize:Math.max(ie?.collapsedBefore??0,0),hunkSpecs:ie?.hunkSpecs,isFirstHunk:fe===0,isLastHunk:!1,isExpandable:!e.isPartial});const F=s==="unified"?O:L,w={type:he,hunkIndex:fe,lineIndex:F,unifiedLineIndex:O,splitLineIndex:L,deletionLine:oe,additionLine:X};if(s==="unified"){const ce=this.getUnifiedInjectedRowsForLine?.(w);ce?.before!=null&&Nb(ce.before,T);let be=oe!=null?x[oe.lineIndex]:void 0,Te=X!=null?D[X.lineIndex]:void 0;if(be==null&&Te==null){const et="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(et,{file:e.name}),new Error(et)}const Le=he==="change"?X!=null?"change-addition":"change-deletion":he,Xe=this.getUnifiedLineDecoration({type:he,lineType:Le,additionLineIndex:X?.lineIndex,deletionLineIndex:oe?.lineIndex});z("unified",Xe.gutterLineType,X!=null?X.lineNumber:oe.lineNumber,`${O},${L}`,Xe.gutterProperties),Te!=null?Te=Es(Te,Xe.contentProperties):be!=null&&(be=Es(be,Xe.contentProperties)),Mb({diffStyle:"unified",type:he,deletionLine:be,additionLine:Te,unifiedSpan:this.getAnnotations("unified",oe?.lineNumber,X?.lineNumber,fe,F),createAnnotationElement:et=>this.createAnnotationElement(et),context:T}),ce?.after!=null&&Nb(ce.after,T)}else{const ce=this.getSplitInjectedRowsForLine?.(w);ce?.before!=null&&Ob(ce.before,T,I);let be=oe!=null?x[oe.lineIndex]:void 0,Te=X!=null?D[X.lineIndex]:void 0;const Le=this.getSplitLineDecoration({side:"deletions",type:he,lineIndex:oe?.lineIndex}),Xe=this.getSplitLineDecoration({side:"additions",type:he,lineIndex:X?.lineIndex});if(be==null&&Te==null){const xt="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(xt,{file:e.name}),new Error(xt)}const et=(()=>{if(he==="change"){if(Te==null)return"additions";if(be==null)return"deletions"}})();if(et!=null){if(I.side!=null&&I.side!==et)throw new Error("DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits");I.side=et,I.increment()}const qt=this.getAnnotations("split",oe?.lineNumber,X?.lineNumber,fe,F);if(qt!=null&&I.size>0&&I.flush(),oe!=null){const xt=Es(be,Le.contentProperties);z("deletions",Le.gutterLineType,oe.lineNumber,`${oe.unifiedLineIndex},${L}`,Le.gutterProperties),xt!=null&&(be=xt)}if(X!=null){const xt=Es(Te,Xe.contentProperties);z("additions",Xe.gutterLineType,X.lineNumber,`${X.unifiedLineIndex},${L}`,Xe.gutterProperties),xt!=null&&(Te=xt)}Mb({diffStyle:"split",type:he,additionLine:Te,deletionLine:be,...qt,createAnnotationElement:xt=>this.createAnnotationElement(xt),context:T}),ce?.after!=null&&Ob(ce.after,T,I)}const se=oe?.noEOFCR??!1,me=X?.noEOFCR??!1;if(me||se){if(se){const ce=he==="context"||he==="context-expanded"?he:"change-deletion";s==="unified"?(T.unifiedContentAST.push(Ss(ce)),T.pushToGutter("unified",Sn(ce,"metadata",1))):(T.deletionsContentAST.push(Ss(ce)),T.pushToGutter("deletions",Sn(ce,"metadata",1)),me||(T.pushToGutter("additions",Sn(void 0,"buffer",1)),T.additionsContentAST.push(_s(1))))}if(me){const ce=he==="context"||he==="context-expanded"?he:"change-addition";s==="unified"?(T.unifiedContentAST.push(Ss(ce)),T.pushToGutter("unified",Sn(ce,"metadata",1))):(T.additionsContentAST.push(Ss(ce)),T.pushToGutter("additions",Sn(ce,"metadata",1)),se||(T.pushToGutter("deletions",Sn(void 0,"buffer",1)),T.deletionsContentAST.push(_s(1))))}T.incrementRowCount(1)}B>0&&g!=="simple"&&R({hunkIndex:he==="context-expanded"?fe:fe+1,collapsedLines:B,rangeSize:k,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),T.incrementRowCount(1)}}),s==="split"&&I.flush();const P=Math.max(eO(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),G=t.bufferBefore>0||t.bufferAfter>0,ee=!y&&e.type!=="deleted",ae=!y&&e.type!=="new",ne=T.rowCount>0||G;v=ee&&ne?v:void 0,b=ae&&ne?b:void 0,S=y&&ne?S:void 0;const W=this.createPreElement(b!=null&&v!=null,P);return{unifiedGutterAST:y&&ne?T.unifiedGutterAST.children:void 0,unifiedContentAST:S,deletionsGutterAST:ae&&ne?T.deletionsGutterAST.children:void 0,deletionsContentAST:b,additionsGutterAST:ee&&ne?T.additionsGutterAST.children:void 0,additionsContentAST:v,hunkData:A,preNode:W,themeStyles:a,baseThemeType:o,headerElement:c?void 0:this.renderHeader(this.diff),totalLines:P,rowCount:T.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderCodeAST(e,t){const i=e==="unified"?t.unifiedGutterAST:e==="deletions"?t.deletionsGutterAST:t.additionsGutterAST,a=e==="unified"?t.unifiedContentAST:e==="deletions"?t.deletionsContentAST:t.additionsContentAST;if(i==null||a==null)return;const o=ys(i);return o.properties.style=`grid-row: span ${t.rowCount}`,[o,xN(a,t.rowCount)]}renderFullAST(e,t=[]){const i=this.getOptionsWithDefaults().hunkSeparators==="line-info",a=this.renderCodeAST("unified",e);if(a!=null)return t.push(Re({tagName:"code",children:a,properties:{"data-code":"","data-container-size":i?"":void 0,"data-unified":""}})),{...e.preNode,children:t};const o=this.renderCodeAST("deletions",e);o!=null&&t.push(Re({tagName:"code",children:o,properties:{"data-code":"","data-container-size":i?"":void 0,"data-deletions":""}}));const s=this.renderCodeAST("additions",e);return s!=null&&t.push(Re({tagName:"code",children:s,properties:{"data-code":"","data-container-size":i?"":void 0,"data-additions":""}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return pa(this.renderFullAST(e,t))}renderPartialHTML(e,t){return t==null?pa(e):pa(Re({tagName:"code",children:e,properties:{"data-code":"","data-container-size":this.getOptionsWithDefaults().hunkSeparators==="line-info"?"":void 0,[`data-${t}`]:""}}))}getAnnotations(e,t,i,a,o){const s={type:"annotation",hunkIndex:a,lineIndex:o,annotations:[]};if(t!=null)for(const f of this.deletionAnnotations[t]??[])s.annotations.push(Ul(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(Ul(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:t}=this.getOptionsWithDefaults();return wN({fileOrDiff:e,mode:t})}};function Db(e){return`${e} unmodified line${e>1?"s":""}`}function Nb(e,t){for(const i of e)t.unifiedContentAST.push(i.content),t.pushToGutter("unified",i.gutter),t.incrementRowCount(1)}function Ob(e,t,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&&(t.deletionsContentAST.push(a.content),t.pushToGutter("deletions",a.gutter)),o!=null&&(t.additionsContentAST.push(o.content),t.pushToGutter("additions",o.gutter)),s!=null&&(i.side=s,i.increment()),t.incrementRowCount(1)}}function Mb({diffStyle:e,type:t,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=t==="change"?i!=null?"change-deletion":"change-addition":t;d.unifiedContentAST.push(f(o)),d.pushToGutter("unified",Sn(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=t==="change"?i!=null?"change-deletion":"context":t;d.deletionsContentAST.push(f(s)),d.pushToGutter("deletions",Sn(g,"annotation",1)),p=!0}if(c!=null){const g=t==="change"?a!=null?"change-addition":"context":t;d.additionsContentAST.push(f(c)),d.pushToGutter("additions",Sn(g,"annotation",1)),p=!0}}p&&d.incrementRowCount(1)}function cd(e,{hunkIndex:t,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,la({type:"metadata",content:o,isFirstHunk:s,isLastHunk:c})),p.push(la({type:"metadata",content:o,isFirstHunk:s,isLastHunk:c})),e!=="additions"&&d.incrementRowCount(1));return}if(d.hunkSeparators==="simple"){t>0&&(d.pushToGutter(e,la({type:"simple",isFirstHunk:s,isLastHunk:!1})),p.push(la({type:"simple",isFirstHunk:s,isLastHunk:!1})),e!=="additions"&&d.incrementRowCount(1));return}const g=JN(e,t),y=a>d.expansionLineCount,v=f?t:void 0;d.pushToGutter(e,la({type:d.hunkSeparators,content:Db(i),expandIndex:v,chunked:y,slotName:g,isFirstHunk:s,isLastHunk:c})),p.push(la({type:d.hunkSeparators,content:Db(i),expandIndex:v,chunked:y,slotName:g,isFirstHunk:s,isLastHunk:c})),e!=="additions"&&d.incrementRowCount(1),d.hunkData.push({slotName:g,hunkIndex:t,lines:i,type:e,expandable:f?{up:!s,down:!c,chunked:y}:void 0})}function Es(e,t){return e==null||e.type!=="element"||t==null?e:{...e,properties:{...e.properties,...t}}}function rO(e){const t=e.hunks.at(-1);if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;const i=e.additionLines.length-(t.additionLineIndex+t.additionCount),a=e.deletionLines.length-(t.deletionLineIndex+t.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 aO(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function lO(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}function oO(e){const t=e[0];if(t!=="+"&&t!=="-"&&t!==" "&&t!=="\\"){console.error(`parseLineType: Invalid firstChar: "${t}", full line: "${e}"`);return}const i=e.substring(1);return{line:i===""?`
|
|
1885
|
-
`:i,type:t===" "?"context":t==="\\"?"metadata":t==="+"?"addition":"deletion"}}function sO(e,t,i=!1){const a=As.test(e),o=e.split(a?As:ub);let s;const c=[];for(const f of o){if(a&&!As.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&&!ub.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=$1(f,{cacheKey:t!=null?`${t}-${c.length}`:void 0,isGitDiff:a,throwOnError:i});d!=null&&c.push(d)}return{patchMetadata:s,files:c}}function $1(e,{cacheKey:t,isGitDiff:i=As.test(e),oldFile:a,newFile:o,throwOnError:s=!1}={}){let c=0;const f=e.split(pD);let d;const p=a==null||o==null;let g=0,y=0;for(const v of f){const b=v.split(ed),S=b.shift();if(S==null){if(s)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",v);continue}const A=S.match(mD);let D=0,x=0;if(A==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(ed):[],deletionLines:!p&&a!=null&&o!=null?a.contents.split(ed):[],cacheKey:t},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 P of b){const G=P.match(i?yD:gD);if(P.startsWith("diff --git")){const[,,ee,,ae]=P.trim().match(bD)??[];d.name=ae.trim(),ee!==ae&&(d.prevName=ee.trim())}else if(G!=null){const[,ee,ae]=G;ee==="---"&&ae!=="/dev/null"?(d.prevName=ae.trim(),d.name=ae.trim()):ee==="+++"&&ae!=="/dev/null"&&(d.name=ae.trim())}else if(i){if(P.startsWith("new mode ")&&(d.mode=P.replace("new mode","").trim()),P.startsWith("old mode ")&&(d.prevMode=P.replace("old mode","").trim()),P.startsWith("new file mode")&&(d.type="new",d.mode=P.replace("new file mode","").trim()),P.startsWith("deleted file mode")&&(d.type="deleted",d.mode=P.replace("deleted file mode","").trim()),P.startsWith("similarity index")&&(P.startsWith("similarity index 100%")?d.type="rename-pure":d.type="rename-changed"),P.startsWith("index ")){const[,ee,ae,ne]=P.trim().match(vD)??[];ee!=null&&(d.prevObjectId=ee),ae!=null&&(d.newObjectId=ae),ne!=null&&(d.mode=ne)}P.startsWith("rename from ")&&(d.prevName=P.replace("rename from ","").trim()),P.startsWith("rename to ")&&(d.name=P.replace("rename to ","").trim())}}continue}let T,k;for(;b.length>0&&(b[b.length-1]===`
|
|
1886
|
-
`||b[b.length-1]==="\r"||b[b.length-1]===`\r
|
|
1887
|
-
`||b[b.length-1]==="");)b.pop();const I=parseInt(A[3]),z=parseInt(A[1]);g=p?g:z-1,y=p?y:I-1;const R={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:parseInt(A[4]??"1"),additionStart:I,additionLines:D,deletionCount:parseInt(A[2]??"1"),deletionStart:z,deletionLines:x,deletionLineIndex:g,additionLineIndex:y,hunkContent:[],hunkContext:A[5],hunkSpecs:S,noEOFCRAdditions:!1,noEOFCRDeletions:!1};if(isNaN(R.additionCount)||isNaN(R.deletionCount)||isNaN(R.additionStart)||isNaN(R.deletionStart)){if(s)throw Error("parsePatchContent: invalid hunk metadata");console.error("parsePatchContent: invalid hunk metadata",R);continue}for(const P of b){const G=oO(P);if(G==null){console.error("processFile: invalid rawLine:",P);continue}const{type:ee,line:ae}=G;if(ee==="addition")(T==null||T.type!=="change")&&(T=fd("change",g,y),R.hunkContent.push(T)),y++,p&&d.additionLines.push(ae),T.additions++,D++,k="addition";else if(ee==="deletion")(T==null||T.type!=="change")&&(T=fd("change",g,y),R.hunkContent.push(T)),g++,p&&d.deletionLines.push(ae),T.deletions++,x++,k="deletion";else if(ee==="context")(T==null||T.type!=="context")&&(T=fd("context",g,y),R.hunkContent.push(T)),y++,g++,p&&(d.deletionLines.push(ae),d.additionLines.push(ae)),T.lines++,k="context";else if(ee==="metadata"&&T!=null){if(T.type==="context"?(R.noEOFCRAdditions=!0,R.noEOFCRDeletions=!0):k==="deletion"?R.noEOFCRDeletions=!0:k==="addition"&&(R.noEOFCRAdditions=!0),p&&(k==="addition"||k==="context")){const ne=d.additionLines.length-1;ne>=0&&(d.additionLines[ne]=ba(d.additionLines[ne]))}if(p&&(k==="deletion"||k==="context")){const ne=d.deletionLines.length-1;ne>=0&&(d.deletionLines[ne]=ba(d.deletionLines[ne]))}}}R.additionLines=D,R.deletionLines=x,R.collapsedBefore=Math.max(R.additionStart-1-c,0),d.hunks.push(R),c=R.additionStart+R.additionCount-1;for(const P of R.hunkContent)P.type==="context"?(R.splitLineCount+=P.lines,R.unifiedLineCount+=P.lines):(R.splitLineCount+=Math.max(P.additions,P.deletions),R.unifiedLineCount+=P.deletions+P.additions);R.splitLineStart=d.splitLineCount+R.collapsedBefore,R.unifiedLineStart=d.unifiedLineCount+R.collapsedBefore,d.splitLineCount+=R.collapsedBefore+R.splitLineCount,d.unifiedLineCount+=R.collapsedBefore+R.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,A=Math.max(S-b,0);d.splitLineCount+=A,d.unifiedLineCount+=A}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 uO(e,t,i=!1){const a=[];for(const o of e.split(hD))try{a.push(sO(o,t!=null?`${t}-${a.length}`:void 0,i))}catch(s){if(i)throw s;console.error(s)}return a}function fd(e,t,i){return e==="change"?{type:"change",additions:0,deletions:0,additionLineIndex:i,deletionLineIndex:t}:{type:"context",lines:0,additionLineIndex:i,deletionLineIndex:t}}function $d(e,t,i,a=!1){const o=$1(aN(e.name,t.name,e.contents,t.contents,e.header,t.header,i),{cacheKey:(()=>{if(e.cacheKey!=null&&t.cacheKey!=null)return`${e.cacheKey}:${t.cacheKey}`})(),oldFile:e,newFile:t,throwOnError:a});if(o==null)throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");return t.lang!=null&&(o.lang=t.lang),o}let cO=-1;var q1=class{static LoadedCustomComponent=qN;__id=`file-diff:${++cO}`;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(t={theme:zn},i,a=!1){this.options=t,this.workerManager=i,this.isContainerManaged=a,this.hunksRenderer=this.createHunksRenderer(t),this.resizeManager=new SN,this.scrollSyncManager=new WN,this.interactionManager=new gN("diff",Eb(t,typeof t.hunkSeparators=="function"||(t.hunkSeparators??"line-info")==="line-info"||t.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(t){return{...t,headerRenderMode:t.renderCustomHeader!=null?"custom":"default",hunkSeparators:typeof t.hunkSeparators=="function"?"custom":t.hunkSeparators}}createHunksRenderer(t){return new iO(this.getHunksRendererOptions(t),this.handleHighlightRender,this.workerManager)}getLineIndex=(t,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(t<f){const y=f-t;o=Math.max(g-y,0),s=Math.max(p-y,0);break e}if(t>=f+d){if(c===a){const y=t-(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(t<f+y.lines){const v=t-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(t<f+v){const b=t-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(t){t!=null&&(this.options=t,this.hunksRenderer.setOptions(this.getHunksRendererOptions(t)),this.interactionManager.setOptions(Eb(t,typeof t.hunkSeparators=="function"||(t.hunkSeparators??"line-info")==="line-info"||t.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex)))}mergeOptions(t){this.options={...this.options,...t}}setThemeType(t){(this.options.themeType??"system")!==t&&(this.mergeOptions({themeType:t}),!(typeof this.options.theme=="string"||this.fileContainer==null||this.appliedThemeCSS==null)&&this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,t,this.appliedThemeCSS.baseThemeType))}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}canPartiallyRender(t,i,a){return!(t||i||a||typeof this.options.hunkSeparators=="function")}setSelectedLines(t){this.interactionManager.setSelection(t)}cleanUp(t=!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,t?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(t){const{fileContainer:i,prerenderedHTML:a,preventEmit:o=!1,lineAnnotations:s,oldFile:c,newFile:f,fileDiff:d}=t;this.hydrateElements(i,a),this.pre==null&&this.headerElement==null?this.render({...t,preventEmit:!0}):this.hydrationSetup({fileDiff:d,oldFile:c,newFile:f,lineAnnotations:s}),o||this.emitPostRender()}hydrateElements(t,i){GN(t,i);for(const a of t.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(I1)){this.themeCSSStyle=a;continue}if(a instanceof HTMLStyleElement&&a.hasAttribute(z1)){this.unsafeCSSStyle=a,this.appliedUnsafeCSS=a.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),(this.pre!=null||this.headerElement!=null)&&(this.fileContainer=t)}hydrationSetup({fileDiff:t,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=t??(i!=null&&a!=null?$d(i,a,this.options.parseDiffOptions):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=(t,i,a)=>{this.expandHunk(t,i,a)};expandHunk=(t,i,a)=>{this.hunksRenderer.expandHunk(t,i,a),this.rerender()};render({oldFile:t,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=t!=null&&i!=null&&(!mb(t,this.deletionFile)||!mb(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&&V1(y,this.renderRange)&&!o&&!S&&(a!=null&&a===this.fileDiff||a==null&&!v))return!1;const{renderRange:A}=this;if(this.renderRange=y,this.deletionFile=t,this.additionFile=i,a!=null?this.fileDiff=a:t!=null&&i!=null&&v&&(b=!0,this.fileDiff=$d(t,i,this.options.parseDiffOptions)),c!=null&&this.setLineAnnotations(c),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{diffStyle:D="split",disableErrorHandling:x=!1,disableFileHeader:T=!1,overflow:k="scroll",themeType:I="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 z=this.hunksRenderer.renderDiff(this.fileDiff,ED);z!=null&&this.applyThemeState(f,z.themeStyles,I,z.baseThemeType),z?.headerElement!=null&&this.applyHeaderToDOM(z.headerElement,f),this.renderSeparators([]),this.injectUnsafeCSS()}catch(z){if(x)throw z;console.error(z),z instanceof Error&&this.applyErrorToDOM(z,f)}return s||this.emitPostRender(),!0}try{const z=this.getOrCreatePreNode(f);if(!(this.canPartiallyRender(o,S,v||b)&&this.applyPartialRender({previousRenderRange:A,renderRange:y}))){const R=this.hunksRenderer.renderDiff(this.fileDiff,y);if(R==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(f,R.themeStyles,I,R.baseThemeType),R.headerElement!=null&&this.applyHeaderToDOM(R.headerElement,f),R.additionsContentAST!=null||R.deletionsContentAST!=null||R.unifiedContentAST!=null?this.applyHunksToDOM(z,R):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(R.hunkData)}this.applyBuffers(z,y),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.interactionManager.setup(z),this.resizeManager.setup(z,k==="wrap"),k==="scroll"&&D==="split"?this.scrollSyncManager.setup(z,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp()}catch(z){if(x)throw z;console.error(z),z instanceof Error&&this.applyErrorToDOM(z,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:t}of this.separatorCache.values())t.remove();this.separatorCache.clear();for(const{element:t}of this.annotationCache.values())t.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(t){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",`${t}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(t){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 t){const s=o.slotName;let c=this.separatorCache.get(s);if(c==null||!lO(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 t=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}-${Ul(o)}`;let c=this.annotationCache.get(s);if(c==null||!aO(o,c.annotation)){c?.element.remove();const f=i(o);if(f==null)continue;c={element:IN(Ul(o)),annotation:o},c.element.appendChild(f),this.fileContainer.appendChild(c.element),this.annotationCache.set(s,c)}t.delete(s)}for(const[a,{element:o}]of t.entries())this.annotationCache.delete(a),o.remove()}renderGutterUtility(){const t=this.options.renderGutterUtility??this.options.renderHoverUtility;if(this.fileContainer==null||t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const i=t(this.interactionManager.getHoveredLine);if(i!=null&&this.gutterUtilityContent!=null)return;if(i==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const a=zN();a.appendChild(i),this.fileContainer.appendChild(a),this.gutterUtilityContent=a}getOrCreateFileContainer(t,i){const a=this.fileContainer;if(this.fileContainer=t??this.fileContainer??document.createElement(Gs),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=NN;const s=o.firstChild;s instanceof SVGElement&&(this.spriteSVG=s,this.fileContainer.shadowRoot?.appendChild(this.spriteSVG))}return this.fileContainer}getFileContainer(){return this.fileContainer}getOrCreatePreNode(t){const i=t.shadowRoot??t.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(t){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(const i of Array.from(t.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(t,i){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const{fileDiff:a}=this,o=pa(t);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,Eh,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,_h,d),this.headerMetadata=this.upsertHeaderSlotElement(i,this.headerMetadata,Sh,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(t,i,a,o){if(o==null){i?.remove();return}const s=i??this.createHeaderSlotElement(a);return i==null&&t.appendChild(s),this.replaceHeaderSlotContent(s,o),s}replaceHeaderSlotContent(t,i){t.replaceChildren(),i instanceof Element?t.appendChild(i):t.innerText=`${i}`}createHeaderSlotElement(t){const i=document.createElement("div");return i.slot=t,i}injectUnsafeCSS(){const{unsafeCSS:t}=this.options,i=this.fileContainer?.shadowRoot;if(i!=null){if(t==null||t===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===i&&this.appliedUnsafeCSS===t||(this.unsafeCSSStyle??=UN(),this.unsafeCSSStyle.parentNode!==i&&i.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=PN(t),this.appliedUnsafeCSS=t)}}applyThemeState(t,i,a,o){const s=t.shadowRoot??t.attachShadow({mode:"open"}),c=o??a;this.themeCSSStyle?.parentNode===s&&this.appliedThemeCSS?.themeStyles===i&&this.appliedThemeCSS.themeType===c||(this.themeCSSStyle=jN({shadowRoot:s,currentNode:this.themeCSSStyle,themeCSS:BN(i,c)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{themeStyles:i,themeType:c,baseThemeType:o}:void 0)}applyHunksToDOM(t,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(t,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=sd({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=sd({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=sd({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?t.textContent="":c&&t.replaceChildren(...f),this.lastRowCount=i.rowCount}applyPartialRender({previousRenderRange:t,renderRange:i}){const{pre:a,codeUnified:o,codeAdditions:s,codeDeletions:c,options:{diffStyle:f="split"}}=this;if(a==null||t==null||i==null||!Number.isFinite(t.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=t.startingLine,g=i.startingLine,y=p+t.totalLines,v=g+i.totalLines,b=Math.max(p,g),S=Math.min(y,v);if(S<=b)return!1;const A=Math.max(0,b-p),D=Math.max(0,y-S),x=this.trimColumns({columns:d,trimStart:A,trimEnd:D,previousStart:p,overlapStart:b,overlapEnd:S,diffStyle:f});if(x<0)throw new Error("applyPartialRender: failed to trim to overlap");if(this.lastRowCount<x)throw new Error("applyPartialRender: trimmed beyond DOM row count");let T=this.lastRowCount-x;const k=(P,G)=>{if(!(G<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:P,totalLines:G,bufferBefore:0,bufferAfter:0})},I=k(g,Math.max(b-g,0));if(I==null&&g<b)return!1;const z=k(S,Math.max(v-S,0));if(z==null&&v>S)return!1;const R=(P,G)=>{if(P!=null){if(f==="unified"&&!Array.isArray(d))this.insertPartialHTML(f,d,P,G);else if(f==="split"&&Array.isArray(d))this.insertPartialHTML(f,d,P,G);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");T+=P.rowCount}};return this.cleanupErrorWrapper(),R(I,"afterbegin"),R(z,"beforeend"),this.lastRowCount!==T&&(this.applyRowSpan(f,d,T),this.lastRowCount=T),!0}insertPartialHTML(t,i,a,o){if(t==="unified"&&!Array.isArray(i)){const s=this.hunksRenderer.renderCodeAST("unified",a);this.renderPartialColumn(i,s,o)}else if(t==="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(t,i,a){if(t==null||i==null)return;const o=Ib(i[0]),s=Ib(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"],t.content.children[t.content.children.length-1],t.gutter.children[t.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"],t.content.children[0],t.gutter.children[0],o,s,!1),t.gutter.insertAdjacentHTML(a,this.hunksRenderer.renderPartialHTML(o)),t.content.insertAdjacentHTML(a,this.hunksRenderer.renderPartialHTML(s))}mergeBuffersIfNecessary(t,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+t),this.updateBufferSize(a,f+t))}applyRowSpan(t,i,a){const o=s=>{s!=null&&(s.gutter.style.setProperty("grid-row",`span ${a}`),s.content.style.setProperty("grid-row",`span ${a}`))};if(t==="unified"&&!Array.isArray(i))o(i);else if(t==="split"&&Array.isArray(i))o(i[0]),o(i[1]);else throw new Error("dun fuuuuked up")}trimColumnRows(t,i,a){let o=0,s=0,c=0,f=!1;const d=a>=0;if(t==null)return 0;const p=Array.from(t.content.children),g=Array.from(t.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),A=b-S;A>0?(this.updateBufferSize(y,A),this.updateBufferSize(v,A),s+=S):(y.remove(),v.remove(),s+=b),i-=S}else if(d){const S=o,A=o+b-1;if(a<=S)y.remove(),v.remove(),s+=b;else if(a<=A){const D=A-a+1,x=b-D;this.updateBufferSize(y,x),this.updateBufferSize(v,x),s+=D}}o+=b;continue}throw console.error({gutterElement:y,contentElement:v}),new Error("FileDiff.trimColumnRows: unknown row elements")}return s}trimColumns({columns:t,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(t))return this.trimColumnRows(t,v,b);if(i==="split"&&Array.isArray(t)){const S=this.trimColumnRows(t[0],v,b),A=this.trimColumnRows(t[1],v,b);if(t[0]!=null&&t[1]!=null&&S!==A)throw new Error("FileDiff.trimColumns: split columns out of sync");return t[0]!=null?S:A}else throw console.error({diffStyle:i,columns:t}),new Error("FileDiff.trimColumns: Invalid columns for diffType")}getBufferSize(t){const i=Number.parseInt(t?.bufferSize??"",10);return Number.isNaN(i)?void 0:i}updateBufferSize(t,i){t.dataset.bufferSize=`${i}`,t.style.setProperty("grid-row",`span ${i}`),t.style.setProperty("min-height",`calc(${i} * 1lh)`)}getCodeColumns(t,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(t==="unified")return s(i);{const c=s(a),f=s(o);return c!=null||f!=null?[c,f]:void 0}}applyBuffers(t,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",t.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",t.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(t,{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};ON(y,this.appliedPreAttributes)||($N(t,y),this.appliedPreAttributes=y)}applyErrorToDOM(t,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=t.message,this.errorWrapper.appendChild(s);const c=document.createElement("pre");c.dataset.errorStack="",c.innerText=t.stack??"No Error Stack",this.errorWrapper.appendChild(c)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function Ib(e){if(!(e==null||e.type!=="element"))return e.children??[]}function fO(e,t){const i={..._D,...t};return i.hunkSeparatorHeight=dO(e,t?.hunkSeparatorHeight),i}function dO(e,t){if(t!=null)return t;switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}let hO=-1;var pO=class extends q1{__id=`little-virtualized-file-diff:${++hO}`;top;height=0;metrics;heightCache=new Map;isVisible=!1;virtualizer;constructor(e,t,i,a,o=!1){super(e,a,o);const{hunkSeparators:s="line-info"}=this.options;this.virtualizer=t,this.metrics=fO(typeof s=="function"?"custom":s,i)}getLineHeight(e,t=!1){const i=this.heightCache.get(e);if(i!=null)return i;const a=t?2:1;return this.metrics.lineHeight*a}setOptions(e){if(e==null)return;const t=this.options.diffStyle,i=this.options.overflow,a=this.options.collapsed;super.setOptions(e),(t!==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 t=this.getDiffStyle();let i=!1;const a=t==="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=gO(f,t);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,t,i)=>{this.hunksRenderer.expandHunk(e,t,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:t=!1,expandUnchanged:i=!1,collapsed:a=!1,collapsedContextThreshold:o=ma,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(t?s!=="simple"&&s!=="metadata"&&(this.height+=f):this.height+=c,!a&&(qs({diff:this.fileDiff,diffStyle:p,expandedHunks:i?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:y,collapsedBefore:v,collapsedAfter:b,deletionLine:S,additionLine:A})=>{const D=A!=null?A.splitLineIndex:S.splitLineIndex,x=A!=null?A.unifiedLineIndex:S.unifiedLineIndex,T=(A?.noEOFCR??!1)||(S?.noEOFCR??!1);v>0&&(y>0&&(this.height+=g),this.height+=d+g),this.height+=this.getLineHeight(p==="split"?D:x,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:t,newFile:i,fileDiff:a,...o}={}){const s=this.fileContainer==null;if(this.fileDiff??=a??(t!=null&&i!=null?$d(t,i,this.options.parseDiffOptions):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:t,newFile:i,...o})}getDiffStyle(){return this.options.diffStyle??"split"}getExpandedRegion(e,t,i){if(i<=0||e)return{fromStart:0,fromEnd:0,collapsedLines:Math.max(i,0),renderAll:!1};const{expandUnchanged:a=!1,collapsedContextThreshold:o=ma}=this.options;if(a||i<=o)return{fromStart:i,fromEnd:0,collapsedLines:0,renderAll:!0};const s=this.hunksRenderer.getExpandedHunk(t),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,t){let i=0;if(e.isPartial){for(const o of e.hunks)i+=t==="split"?o.splitLineCount:o.unifiedLineCount;return i}for(const[o,s]of e.hunks.entries()){const c=t==="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&&mO(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,t,{top:i,bottom:a}){const{disableFileHeader:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=ma,hunkSeparators:f="line-info"}=this.options,{diffHeaderHeight:d,fileGap:p,hunkLineCount:g,hunkSeparatorHeight:y,lineHeight:v}=this.metrics,b=this.getDiffStyle(),S=this.height,A=this.getExpandedLineCount(e,b),D=o?p:d;if(t<i-S||t>a)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:S-D-p};if(A<=g||e.hunks.length===0)return{startingLine:0,totalLines:g,bufferBefore:0,bufferAfter:0};const x=Math.ceil(Math.max(a-i,0)/v),T=Math.ceil(x/g)*g+g,k=T/g,I=k,z=[],R=(i+a)/2,P=f==="simple"||f==="metadata"||f==="line-info-basic"?0:p;let G=t+D,ee=0,ae,ne,W;if(qs({diff:e,diffStyle:b,expandedHunks:s?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:c,callback:({hunkIndex:O,collapsedBefore:F,collapsedAfter:w,deletionLine:se,additionLine:me})=>{const ce=me!=null?me.splitLineIndex:se.splitLineIndex,be=me!=null?me.unifiedLineIndex:se.unifiedLineIndex,Te=(me?.noEOFCR??!1)||(se?.noEOFCR??!1);let Le=F>0?y+P+(O>0?P:0):0;O===0&&f==="simple"&&(Le=0),G+=Le;const Xe=ee%g===0;if(Xe&&(z.push(G-(t+D+Le)),W!=null)){if(W<=0)return!0;W--}const et=this.getLineHeight(b==="split"?ce:be,Te),qt=Math.floor(ee/g);return G>i-et&&G<a&&(ae??=qt),ne==null&&G+et>R&&(ne=qt),W==null&&G>=a&&Xe&&(W=I),ee++,G+=et,w>0&&f!=="simple"&&(G+=y+P),!1}}),ae==null)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:S-D-p};const fe=z.length;ne??=ae;const ie=Math.round(ne-k/2),te=Math.max(0,fe-k),B=Math.max(0,Math.min(ie,te)),X=B*g,oe=ie<0?T+ie*g:T,he=z[B]??0,L=B+oe/g;return{startingLine:X,totalLines:oe,bufferBefore:he,bufferAfter:L<z.length?S-D-z[L]-p:S-(G-t)-p}}};function mO(e){const t=e.hunks.at(-1);return t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0?!1:t.additionLineIndex+t.additionCount<e.additionLines.length||t.deletionLineIndex+t.deletionCount<e.deletionLines.length}function gO(e,t){const[i,a]=e.split(",").map(Number);return t==="split"?a:i}const yO=typeof window>"u"?re.useEffect:re.useLayoutEffect;function bO({fileDiff:e,options:t,lineAnnotations:i,selectedLines:a,prerenderedHTML:o,metrics:s,hasGutterRenderUtility:c,hasCustomHeader:f,disableWorkerPool:d}){const p=wD(),g=re.useContext(dN),y=re.useRef(null),v=hN(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 pO(dd({hasCustomHeader:f,hasGutterRenderUtility:c,options:t}),p,s,d?void 0:g,!0):y.current=new q1(dd({hasCustomHeader:f,hasGutterRenderUtility:c,options:t}),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 yO(()=>{const{current:b}=y;if(b==null)return;const S=dd({hasCustomHeader:f,hasGutterRenderUtility:c,options:t}),A=!FN(b.options,S);b.setOptions(S),b.render({forceRender:A,fileDiff:e,lineAnnotations:i}),a!==void 0&&b.setSelectedLines(a)}),{ref:v,getHoveredLine:re.useCallback(()=>y.current?.getHoveredLine(),[])}}function dd({options:e,hasCustomHeader:t,hasGutterRenderUtility:i}){return i||t?{...e,renderCustomHeader:t?sb:void 0,renderGutterUtility:i?sb:void 0}:e}function vO({fileDiff:e,options:t,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:A,getHoveredLine:D}=bO({fileDiff:e,options:t,metrics:i,lineAnnotations:a,selectedLines:o,prerenderedHTML:f,hasGutterRenderUtility:v!=null||b!=null,hasCustomHeader:p!=null,disableWorkerPool:S});return H.jsx(Gs,{ref:A,className:s,style:c,children:xD(ZN({fileDiff:e,renderCustomHeader:p,renderHeaderPrefix:g,renderHeaderMetadata:y,renderAnnotation:d,renderGutterUtility:v,lineAnnotations:a,renderHoverUtility:b,getHoveredLine:D}),f)})}const _O=re.memo(function({onSave:t,onCancel:i}){const a=re.useRef(null);re.useEffect(()=>{a.current?.focus()},[]);const o=()=>{const c=a.current?.value??"";t(c)},s=c=>{c.key==="Enter"&&(c.metaKey||c.ctrlKey)&&(c.preventDefault(),o()),c.key==="Escape"&&(c.preventDefault(),i())};return H.jsxs("div",{className:"comment-editor",children:[H.jsx("textarea",{ref:a,className:"text-input-area comment-input",onKeyDown:s,placeholder:"Add a comment…",rows:2}),H.jsxs("div",{className:"comment-actions",children:[H.jsx("button",{type:"button",className:"btn ghost",onClick:i,children:"cancel"}),H.jsx("button",{type:"button",className:"btn primary",onClick:o,children:"comment"})]})]})});function Ch({additions:e,deletions:t,className:i}){const a=["diff-stats",i].filter(Boolean).join(" ");return H.jsxs("span",{className:a,children:[H.jsxs("span",{className:"stat-add",children:["+",e]}),H.jsxs("span",{className:"stat-del",children:["-",t]})]})}const SO=re.memo(function({thread:t,onAddReply:i,onRequestAgent:a,onToggleResolved:o,onToggleCollapsed:s}){const[c,f]=re.useState(!1),[d,p]=re.useState(!1),g=re.useRef(null),v=t.messages[t.messages.length-1]?.role==="user"&&!t.loading&&!t.resolved,b=t.messages.length,S=`${t.resolved?"Resolved thread":"Thread"} with ${b} comment${b===1?"":"s"}`,A=t.resolved?"reopen":"resolve";re.useEffect(()=>{c&&g.current?.focus()},[c]);const D=re.useCallback(()=>{const I=g.current?.value.trim()??"";I&&(g.current&&(g.current.value=""),p(!1),f(!1),i(I))},[i]),x=re.useCallback(I=>{I.key==="Enter"&&(I.metaKey||I.ctrlKey)&&(I.preventDefault(),D())},[D]),T=re.useCallback(()=>{o(!t.resolved)},[o,t.resolved]),k=re.useCallback(()=>{g.current&&(g.current.value=""),p(!1),f(!1)},[]);return t.collapsed?H.jsx("div",{className:`thread-card collapsed${t.resolved?" resolved":""}`,children:H.jsx("div",{className:"thread-collapsed-row",children:H.jsxs("button",{type:"button",className:"thread-toggle",onClick:()=>s(!1),"aria-label":"Expand thread","aria-expanded":!1,children:[H.jsx(Bb,{size:14}),H.jsx("span",{className:"thread-summary",children:S})]})})}):H.jsxs("div",{className:`thread-card${t.resolved?" resolved":""}`,children:[H.jsx("div",{className:"thread-header-row",children:H.jsxs("button",{type:"button",className:"thread-toggle",onClick:()=>s(!0),"aria-label":"Collapse thread","aria-expanded":!0,children:[H.jsx(Pb,{size:14}),H.jsx("span",{className:"thread-summary",children:S})]})}),H.jsxs("div",{className:"thread-messages",children:[t.messages.map((I,z)=>{const R=v&&I.role==="user"&&z===t.messages.length-1;return H.jsxs("div",{className:`thread-msg thread-msg-${I.role}`,children:[H.jsx("span",{className:"thread-msg-role",children:I.role==="user"?"you":"agent"}),H.jsx(vh,{content:I.text,className:"thread-msg-text",variant:"thread"}),R&&H.jsx("div",{className:"thread-msg-actions",children:H.jsxs("button",{type:"button",className:"btn",onClick:a,children:[H.jsx(ix,{size:14}),"ask agent"]})})]},`${I.role}:${z}:${I.text}`)}),t.loading&&H.jsxs("div",{className:"thread-msg thread-msg-assistant",children:[H.jsx("span",{className:"thread-msg-role",children:"agent"}),H.jsx("span",{className:"thread-msg-thinking",children:"thinking…"})]})]}),H.jsx("div",{className:"thread-footer",children:c?H.jsxs(H.Fragment,{children:[H.jsx("textarea",{ref:g,className:"text-input-area thread-reply-input",onChange:I=>{const z=I.target.value.trim().length>0;p(R=>R===z?R:z)},onKeyDown:x,placeholder:"Reply…",rows:3}),H.jsxs("div",{className:"thread-actions",children:[H.jsx("button",{type:"button",className:"btn ghost",onClick:k,children:"cancel"}),H.jsx("button",{type:"button",className:"btn primary",disabled:!d,onClick:D,children:"comment"})]})]}):H.jsxs("div",{className:"thread-actions",children:[H.jsx("button",{type:"button",className:"btn ghost",onClick:T,children:A}),H.jsx("button",{type:"button",className:"btn",onClick:()=>f(!0),children:"reply"})]})})]})}),EO={theme:"github-dark-default",themeType:"dark",diffStyle:"unified",diffIndicators:"none",lineDiffType:"word-alt",disableFileHeader:!0,overflow:"wrap",unsafeCSS:[":host { --diffs-dark-bg: var(--bg); --diffs-bg: var(--bg); font-weight: var(--font-weight-code); }","pre { background-color: var(--bg) !important; --diffs-bg: var(--bg) !important; }","[data-annotation-slot], [data-annotation-content] { font-family: var(--font-family-ui); }","[data-annotation-slot] code, [data-annotation-slot] pre, [data-annotation-content] code, [data-annotation-content] pre { font-family: var(--font-family-code); }","[data-overflow='wrap'] [data-code] { overflow-x: hidden; }","[data-overflow='wrap'] [data-annotation-content] { width: auto; }"].join(" ")},xO=re.memo(function({file:t,diffStyle:i,overflowMode:a,collapsed:o,viewed:s,annotations:c,unresolvedThreadCount:f,onToggleCollapsed:d,onToggleViewed:p,onLineActivate:g,onSaveDraft:y,onCancelDraft:v,onAddReply:b,onRequestAgent:S,onToggleResolved:A,onToggleThreadCollapsed:D}){const x=re.useMemo(()=>({...EO,diffStyle:i==="split"?"split":"unified",overflow:a,onLineNumberClick:({lineNumber:I,annotationSide:z})=>{g(t.id,I,z)}}),[i,t.id,g,a]),T=re.useCallback(k=>{if(k.metadata.type==="draft")return H.jsx(_O,{onSave:y,onCancel:v});const{thread:I}=k.metadata;return H.jsx(SO,{thread:I,onAddReply:z=>b(I.id,z),onRequestAgent:()=>S(I.id),onToggleResolved:z=>A(I.id,z),onToggleCollapsed:z=>D(I.id,z)})},[b,v,S,y,A,D]);return H.jsxs("section",{className:`file-section${o?" collapsed":""}`,id:`file-${t.id}`,children:[H.jsxs("div",{className:"file-header",children:[H.jsxs("button",{type:"button",className:"file-toggle",onClick:()=>d(t.id),"aria-label":o?"Expand file":"Collapse file",children:[o?H.jsx(FE,{size:14}):H.jsx($E,{size:14}),H.jsx("span",{className:"file-path",children:t.displayPath}),f>0&&H.jsxs("span",{className:"file-thread-count","aria-label":`${f} unresolved comment thread${f===1?"":"s"}`,title:`${f} unresolved comment thread${f===1?"":"s"}`,children:[H.jsx(jb,{size:12}),H.jsx("span",{children:f})]})]}),H.jsxs("div",{className:"file-meta",children:[H.jsx(Ch,{additions:t.additions,deletions:t.deletions}),H.jsx(M1,{checked:s,label:"viewed",className:"viewed-checkbox",onChange:()=>p(t.id)})]})]}),!o&&H.jsx("div",{className:"file-body",children:H.jsx(vO,{className:"diff-view",fileDiff:t.file,options:x,lineAnnotations:c,renderAnnotation:T})})]})});function CO({open:e,widthMode:t,files:i,viewed:a,detachedThreads:o,selectedDetachedThreadId:s,onJumpToFile:c,onCreateDetachedThread:f,onOpenDetachedThread:d,onToggleWidth:p}){const g=t==="wide"?"Use narrow sidebar":"Use wide sidebar";return H.jsxs("aside",{className:`sidebar${e?" open":""}`,children:[H.jsx("button",{type:"button",className:"sidebar-width-toggle","aria-label":g,title:g,onClick:p}),H.jsxs("section",{className:"sidebar-section",children:[H.jsxs("div",{className:"sidebar-section-header",children:[H.jsx("h2",{className:"sidebar-section-title",children:"conversations"}),H.jsx("button",{type:"button",className:"btn sidebar-action",onClick:f,children:"new thread"})]}),H.jsx("div",{className:"sidebar-conversations",children:o.length===0?H.jsx("p",{className:"sidebar-empty",children:"no conversations yet"}):o.map(y=>{const v=DO(y),b=y.loading?"active":"idle";return H.jsx("button",{type:"button",className:`sidebar-thread-item${s===y.id?" selected":""}${y.resolved?" resolved":""}`,onClick:()=>d(y.id),title:v,children:H.jsxs("span",{className:"sidebar-thread-row",children:[H.jsx("span",{className:"sidebar-thread-name",children:v}),H.jsx("span",{className:`sidebar-thread-status-dot ${b}`,"aria-label":b,title:b})]})},y.id)})})]}),H.jsx("div",{className:"sidebar-divider"}),H.jsxs("section",{className:"sidebar-section",children:[H.jsx("div",{className:"sidebar-section-header",children:H.jsx("h2",{className:"sidebar-section-title",children:"files"})}),H.jsx("div",{className:"sidebar-file-list",children:i.map(y=>H.jsx("button",{type:"button",className:`sidebar-item${a[y.id]?" viewed":""}`,onClick:()=>c(y.id),children:H.jsx(wO,{path:y.displayPath,stats:H.jsx(Ch,{additions:y.additions,deletions:y.deletions,className:"sidebar-stats"})})},y.id))})]})]})}function wO({path:e,stats:t}){const i=re.useRef(null),a=re.useRef(null),o=re.useRef(null),[s,c]=re.useState(()=>AO(e)),f=re.useMemo(()=>kO(),[]);return re.useLayoutEffect(()=>{const d=i.current,p=a.current,g=o.current;if(!d||!p||!g)return;const y=()=>{const b=d.clientWidth,S=g.offsetWidth,D=b-S-8;if(D<=0){c(e);return}const x=window.getComputedStyle(p);c(TO(e,D,x.font,f))};y();const v=new ResizeObserver(y);return v.observe(d),v.observe(g),()=>{v.disconnect()}},[f,e]),H.jsxs("span",{ref:i,className:"sidebar-row",children:[H.jsx("span",{ref:a,className:"sidebar-path",title:e,children:s}),H.jsx("span",{ref:o,children:t})]})}function kO(){const t=document.createElement("canvas").getContext("2d");return(i,a)=>t?(t.font=a,t.measureText(i).width):i.length*8}function AO(e){const t=e.split("/"),i=t.pop()??e;return t.length<=2?e:`${t[0]}/…/${i}`}function TO(e,t,i,a){const o=LO(e);for(const s of o)if(a(s,i)<=t)return s;return o[o.length-1]??e}function LO(e){const t=e.split("/"),i=t.pop()??e,a=t,o=[e];a.length>0&&o.push(`${a.join("/")}/${i}`),a.length>2&&(o.push(`${a[0]}/…/${a.slice(1).join("/")}/${i}`),o.push(`${a[0]}/…/${a.slice(-2).join("/")}/${i}`),o.push(`${a[0]}/…/${i}`),o.push(`${a[0]}/…/${a[a.length-1]}/${i}`)),a.length>0&&(o.push(`…/${i}`),o.push(`…/${a[a.length-1]}/${i}`));const s=RO(i);return a.length>0&&(o.push(`${a[0]}/…/${s}`),o.push(`${a[0]}/…/${a[a.length-1]}/${s}`),o.push(`…/${s}`)),o.push(s),[...new Set(o)]}function RO(e){const t=e.lastIndexOf(".");if(t<=1||t===e.length-1)return e.length<=24?e:`${e.slice(0,20)}…`;const i=e.slice(0,t),a=e.slice(t);return i.length<=18?e:`${i.slice(0,14)}…${a}`}function DO(e){const t=e.messages.find(a=>a.role==="user"),i=NO(t?.text??"");return i?i.length<=128?i:`${i.slice(0,125).trimEnd()}…`:"new conversation"}function NO(e){return e.replace(/\s+/g," ").trim()}function OO({value:e,options:t,onChange:i}){return H.jsx("div",{className:"toggle-group",role:"radiogroup",children:t.map(a=>H.jsx("button",{type:"button",role:"radio","aria-checked":e===a.value,className:`toggle-group-item${e===a.value?" active":""}`,onClick:()=>i(a.value),children:a.label},a.value))})}function MO({fileCount:e,viewedCount:t,additions:i,deletions:a,commentCount:o,diffCommand:s,diffStyle:c,overflowMode:f,sidebarOpen:d,finished:p,status:g,briefLoading:y,hasBrief:v,hasUnresolvedFileThreads:b,onBriefClick:S,onToggleSidebar:A,onExpandAll:D,onExpandUnresolved:x,onCollapseViewed:T,onCollapseAll:k,onDiffStyleChange:I,onOverflowModeChange:z,onSubmit:R,onCancel:P}){const G=c==="split"?"split":"stacked",ee=f==="scroll"?"scroll":"wrap",ae=e>0?Math.round(t/e*100):0;return H.jsxs("header",{className:"top-bar",children:[H.jsxs("div",{className:"top-bar-left",children:[H.jsx(oa,{icon:JE,label:"Toggle sidebar",className:d?"active":"",onClick:A}),H.jsxs("button",{type:"button",className:"btn top-bar-action top-bar-brief-action",onClick:S,disabled:y,children:[H.jsx(tx,{size:14}),y?"generating brief…":v?"view brief":"brief"]}),H.jsxs("div",{className:"top-bar-diff-meta","aria-label":`${i} additions and ${a} deletions${s?`, ${s}`:""}`,children:[H.jsx(Ch,{additions:i,deletions:a}),s&&H.jsx("span",{className:"top-bar-meta top-bar-meta-dim top-bar-diff-command",title:s,children:s})]})]}),H.jsxs("div",{className:"top-bar-right",children:[H.jsxs("div",{className:"top-bar-viewed","aria-label":`${t} of ${e} viewed, ${o} unresolved comments`,children:[H.jsx("span",{className:"top-bar-viewed-ring",style:{background:`conic-gradient(var(--accent-add) ${ae}%, var(--border) ${ae}% 100%)`},"aria-hidden":"true",children:H.jsx("span",{className:"top-bar-viewed-ring-inner"})}),H.jsxs("span",{className:"top-bar-viewed-text",children:[t," of ",e," viewed"]})]}),g&&H.jsx("span",{className:"top-bar-meta top-bar-status",children:g}),H.jsxs("div",{className:"btn-group",children:[H.jsx(oa,{icon:Bb,label:"Expand all files",onClick:D}),H.jsx(oa,{icon:jb,label:"Expand files with unresolved threads",onClick:x,disabled:!b}),H.jsx(oa,{icon:ZE,label:"Collapse viewed files",onClick:T}),H.jsx(oa,{icon:Pb,label:"Collapse all files",onClick:k})]}),H.jsxs("button",{type:"button",className:`top-bar-toggle${ee==="wrap"?" active":""}`,onClick:()=>z(ee==="wrap"?"scroll":"wrap"),"aria-pressed":ee==="wrap","aria-label":"Toggle wrapped diff lines",children:[H.jsx("span",{className:"top-bar-toggle-switch","aria-hidden":"true",children:H.jsx("span",{className:"top-bar-toggle-thumb"})}),H.jsx("span",{className:"top-bar-toggle-label",children:"wrap"})]}),H.jsx(OO,{value:G,options:[{value:"split",label:"split"},{value:"stacked",label:"stacked"}],onChange:I}),H.jsx("button",{type:"button",className:"btn top-bar-action top-bar-action-primary",onClick:R,disabled:p,children:"submit"}),H.jsx("button",{type:"button",className:"btn top-bar-action top-bar-action-cancel",onClick:P,disabled:p,"aria-label":"cancel",children:H.jsx(Vb,{size:14,strokeWidth:2.25})})]})]})}function IO(e,t,i){if(!e.trim())return[];const a=uO(e,i),o=zO(t);let s=0;return a.flatMap(c=>c.files.map(f=>{const d=UO(f,o);return{id:f.cacheKey??`${f.name}::${s++}`,file:f,displayPath:d.displayPath,oldRepoPath:d.oldRepoPath,newRepoPath:d.newRepoPath,additions:zb(f,"additions"),deletions:zb(f,"deletions")}}))}function zb(e,t){return e.hunks.reduce((i,a)=>i+a.hunkContent.reduce((o,s)=>o+(s.type==="change"?s[t]:0),0),0)}function zO(e){const t=new Map;for(const i of e??[]){const a={displayPath:i.oldPath&&i.newPath&&i.oldPath!==i.newPath?`${i.oldPath} → ${i.newPath}`:i.path,oldRepoPath:i.oldPath,newRepoPath:i.newPath??i.path};t.set(i.path,a),i.newPath&&t.set(i.newPath,a),i.oldPath&&t.set(i.oldPath,a)}return t}function UO(e,t){const i=t.get(e.name)||(e.prevName?t.get(e.prevName):void 0);return i||{displayPath:e.prevName&&e.prevName!==e.name?`${e.prevName} → ${e.name}`:e.name,oldRepoPath:e.prevName,newRepoPath:e.name}}const HO=[];function PO(){const[e,t]=re.useState(null),[i,a]=re.useState(null),[o,s]=re.useState(wE),[c,f]=re.useState(null),[d,p]=re.useState(""),[g,y]=re.useState(!1),[v,b]=re.useState(null),[S,A]=re.useState(!1),[D,x]=re.useState(""),[T,k]=re.useState(!1),I=re.useRef(null),z=re.useRef(0),R=re.useCallback(Z=>{s(kE(Z))},[]),P=re.useCallback(async(Z,pe={})=>{try{const xe=await Z;R(xe.state)}catch(xe){pe.onError?.(),x(xe instanceof Error?xe.message:String(xe))}},[R]),G=re.useCallback((Z,pe)=>{P(vE(Z),pe)},[P]),ee=re.useCallback((Z,pe)=>{s(xe=>NE(xe,Z,pe))},[]),ae=re.useCallback(Z=>{s(pe=>OE(pe,Z))},[]);re.useEffect(()=>{let Z=!0;return(async()=>{try{const xe=await yE();if(!xe.state)throw new Error("diff tool bootstrap response did not include review state");if(!Z)return;t(xe),R(xe.state);const Qe=await bE();Z&&a(Qe)}catch(xe){Z&&x(xe instanceof Error?xe.message:String(xe))}})(),()=>{Z=!1}},[R]);const ne=i&&"patch"in i?i.patch:"",W=re.useMemo(()=>IO(ne,e?.files,e?.context.sessionId),[ne,e]),fe=re.useMemo(()=>Oy(o.collapsedFileIds),[o.collapsedFileIds]),ie=re.useMemo(()=>Oy(o.viewedFileIds),[o.viewedFileIds]),te=re.useMemo(()=>o.threads.filter(Z=>!Z.resolved),[o.threads]),B=te.length,X=re.useMemo(()=>[...o.threads.filter(AE)].reverse(),[o.threads]),oe=re.useMemo(()=>v?.mode!=="thread"?null:X.find(Z=>Z.id===v.threadId)??null,[v,X]),he=re.useMemo(()=>wf(te.filter(Fd).map(Z=>Z.anchor.fileId)),[te]),L=re.useMemo(()=>RE(te),[te]),O=o.brief.content.trim().length>0,F=re.useMemo(()=>W.reduce(TE,{additions:0,deletions:0}),[W]),w=re.useCallback((Z,pe="smooth")=>{document.getElementById(`file-${Z}`)?.scrollIntoView({behavior:pe,block:"start"})},[]),se=re.useCallback(Z=>{G({collapsedFileIds:My(o.collapsedFileIds,Z)})},[G,o.collapsedFileIds]),me=re.useCallback(Z=>{const pe=My(o.viewedFileIds,Z),xe=pe.includes(Z),Qe=xe?wf([...o.collapsedFileIds,Z]):o.collapsedFileIds;I.current=xe&&!o.collapsedFileIds.includes(Z)?Z:null,G({viewedFileIds:pe,collapsedFileIds:Qe},{onError:()=>{I.current=null}})},[G,o.collapsedFileIds,o.viewedFileIds]),ce=re.useCallback(()=>{G({collapsedFileIds:[]})},[G]),be=re.useCallback(()=>{G({collapsedFileIds:W.map(Z=>Z.id)})},[G,W]),Te=re.useCallback(()=>{if(he.length===0)return;const Z=new Set(he);G({collapsedFileIds:o.collapsedFileIds.filter(pe=>!Z.has(pe))})},[G,he,o.collapsedFileIds]),Le=re.useCallback(()=>{G({collapsedFileIds:wf([...o.collapsedFileIds,...o.viewedFileIds])})},[G,o.collapsedFileIds,o.viewedFileIds]);re.useLayoutEffect(()=>{const Z=I.current;Z&&(I.current=null,w(Z,"auto"))},[o.collapsedFileIds,w]);const Xe=re.useCallback((Z,pe,xe)=>{f(Qe=>Qe&&Qe.fileId===Z&&Qe.lineNumber===pe&&Qe.side===xe?Qe:{fileId:Z,lineNumber:pe,side:xe})},[]),et=re.useCallback(Z=>{if(!c)return;const pe=Z.trim();if(!pe){f(null);return}P(Dy({body:pe,anchor:{kind:"line",fileId:c.fileId,filePath:ME(c,W),lineNumber:c.lineNumber,side:c.side}}).then(xe=>(f(null),xe)))},[c,W,P]),qt=re.useCallback(()=>f(null),[]),xt=re.useCallback(()=>{z.current+=1,p(""),y(!1),b({mode:"new"})},[]),gn=re.useCallback(Z=>{z.current+=1,p(""),y(!1),b({mode:"thread",threadId:Z})},[]),oi=re.useCallback(()=>{z.current+=1,p(""),y(!1),b(null)},[]),si=re.useCallback(Z=>{p(Z)},[]),ui=re.useCallback(Z=>z.current!==Z?!1:(p(""),y(!1),!0),[]),mr=re.useCallback(async()=>{const Z=d.trim();if(!Z)return;const pe=!g,xe=z.current;x("");try{if(v?.mode==="thread"){const Be=await Ny({id:v.threadId,text:Z});if(R(Be.state),!ui(xe)||!pe)return;ee(v.threadId,!0);try{const st=await Cf(v.threadId);R(st.state)}catch(st){ee(v.threadId,!1),x(st instanceof Error?st.message:String(st))}return}const Qe=await Dy({body:Z,anchor:{kind:"detached"}});R(Qe.state);const nt=[...Qe.state.threads].filter(Be=>Be.anchor.kind==="detached").at(-1);if(!ui(xe)||(b(nt?{mode:"thread",threadId:nt.id}:null),!pe||!nt))return;ee(nt.id,!0);try{const Be=await Cf(nt.id);R(Be.state)}catch(Be){ee(nt.id,!1),x(Be instanceof Error?Be.message:String(Be))}}catch(Qe){x(Qe instanceof Error?Qe.message:String(Qe))}},[R,d,g,v,ui,ee]),ci=re.useCallback((Z,pe)=>{P(Ny({id:Z,text:pe}))},[P]),fi=re.useCallback(Z=>{x(""),ee(Z,!0),P(Cf(Z),{onError:()=>{ee(Z,!1)}})},[ee,P]),di=re.useCallback(()=>{x(""),ae(!0),P(EE(),{onError:()=>{ae(!1)}})},[ae,P]),gr=re.useCallback((Z,pe)=>{P(_E({id:Z,resolved:pe}))},[P]),Ca=re.useCallback((Z,pe)=>{P(SE({id:Z,collapsed:pe}))},[P]),Ct=re.useMemo(()=>LE(o.threads),[o.threads]),wa=re.useMemo(()=>c?{lineNumber:c.lineNumber,side:c.side,metadata:{type:"draft",draft:c}}:null,[c]),Q=re.useCallback(async()=>{A(!0),x("Returning review…");try{await xE(),x("Review returned. You can close this tab.")}catch(Z){A(!1),x(Z instanceof Error?Z.message:String(Z))}},[]),ue=re.useCallback(async()=>{A(!0),x("Cancelling…");try{await CE(),x("Cancelled. You can close this tab.")}catch(Z){A(!1),x(Z instanceof Error?Z.message:String(Z))}},[]),_e=re.useCallback(()=>{if(O){k(!0);return}di()},[O,di]);return H.jsxs(H.Fragment,{children:[H.jsxs("div",{className:`app${o.sidebarOpen?" sidebar-open":""}${o.sidebarWidth==="wide"?" sidebar-wide":""}`,children:[H.jsx(MO,{fileCount:W.length,viewedCount:o.viewedFileIds.length,additions:F.additions,deletions:F.deletions,commentCount:B,diffCommand:e?.context.diffCommand,diffStyle:o.diffStyle,overflowMode:o.overflowMode,sidebarOpen:o.sidebarOpen,finished:S,status:D,briefLoading:o.brief.loading,hasBrief:O,hasUnresolvedFileThreads:he.length>0,onBriefClick:_e,onToggleSidebar:()=>{G({sidebarOpen:!o.sidebarOpen})},onExpandAll:ce,onExpandUnresolved:Te,onCollapseViewed:Le,onCollapseAll:be,onDiffStyleChange:Z=>{G({diffStyle:Z})},onOverflowModeChange:Z=>{G({overflowMode:Z})},onSubmit:Q,onCancel:ue}),H.jsx(CO,{open:o.sidebarOpen,widthMode:o.sidebarWidth,files:W,viewed:ie,detachedThreads:X,selectedDetachedThreadId:v?.mode==="thread"?v.threadId:null,onJumpToFile:w,onCreateDetachedThread:xt,onOpenDetachedThread:gn,onToggleWidth:()=>{G({sidebarWidth:o.sidebarWidth==="wide"?"narrow":"wide"})}}),H.jsxs("main",{className:"content",children:[W.length===0&&H.jsx("div",{className:"empty",children:D||"loading…"}),W.map(Z=>{const pe=Ct.get(Z.id)??HO,xe=DE(pe,Z.id,c,wa);return H.jsx(xO,{file:Z,diffStyle:o.diffStyle,overflowMode:o.overflowMode,collapsed:fe[Z.id]??!1,viewed:ie[Z.id]??!1,annotations:xe,unresolvedThreadCount:L.get(Z.id)??0,onToggleCollapsed:se,onToggleViewed:me,onLineActivate:Xe,onSaveDraft:et,onCancelDraft:qt,onAddReply:ci,onRequestAgent:fi,onToggleResolved:gr,onToggleThreadCollapsed:Ca},Z.id)})]})]}),H.jsx(uD,{open:T,content:o.brief.content,loading:o.brief.loading,onClose:()=>k(!1)}),H.jsx(cD,{open:v!==null,thread:oe,body:d,skipAgentResponse:g,onBodyChange:si,onSkipAgentResponseChange:y,onSubmit:mr,onClose:oi,onToggleResolved:Z=>{oe&&gr(oe.id,Z)}})]})}mE.createRoot(document.getElementById("root")).render(H.jsx(re.StrictMode,{children:H.jsx(PO,{})}));
|