@markusylisiurunen/tau 0.3.14 → 0.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/core/diff_review/bridge.js +30 -2
  2. package/dist/core/diff_review/bridge.js.map +1 -1
  3. package/dist/core/session/session_engine.js +1 -4
  4. package/dist/core/session/session_engine.js.map +1 -1
  5. package/dist/core/telegram/adapter.js +15 -0
  6. package/dist/core/telegram/adapter.js.map +1 -1
  7. package/dist/core/tools/nook.js +16 -5
  8. package/dist/core/tools/nook.js.map +1 -1
  9. package/dist/core/utils/gemini_transcription.js +17 -3
  10. package/dist/core/utils/gemini_transcription.js.map +1 -1
  11. package/dist/core/utils/messages.js +13 -0
  12. package/dist/core/utils/messages.js.map +1 -1
  13. package/dist/core/utils/speech_to_text.js +1 -0
  14. package/dist/core/utils/speech_to_text.js.map +1 -1
  15. package/dist/core/utils/speech_to_text_context.js +76 -0
  16. package/dist/core/utils/speech_to_text_context.js.map +1 -0
  17. package/dist/core/version.js +1 -1
  18. package/dist/diff_tool/app/dist/assets/index-D466OuVg.js +1580 -0
  19. package/dist/diff_tool/app/dist/assets/pierre-dark-CyvmCCZW.js +1 -0
  20. package/dist/diff_tool/app/dist/assets/pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js +1 -0
  21. package/dist/diff_tool/app/dist/assets/pierre-dark-soft-BHGpRqa4.js +1 -0
  22. package/dist/diff_tool/app/dist/assets/pierre-dark-tritanopia-Beq2gCRQ.js +1 -0
  23. package/dist/diff_tool/app/dist/assets/pierre-dark-vibrant-BWBVywrn.js +1 -0
  24. package/dist/diff_tool/app/dist/assets/pierre-light-480U9XYS.js +1 -0
  25. package/dist/diff_tool/app/dist/assets/pierre-light-protanopia-deuteranopia-CaVOBURG.js +1 -0
  26. package/dist/diff_tool/app/dist/assets/pierre-light-soft-CVdyfjmI.js +1 -0
  27. package/dist/diff_tool/app/dist/assets/pierre-light-tritanopia-B4_gpKOM.js +1 -0
  28. package/dist/diff_tool/app/dist/assets/pierre-light-vibrant-DdTDNdfJ.js +1 -0
  29. package/dist/diff_tool/app/dist/index.html +1 -1
  30. package/dist/host/session_protocol_handler.js +99 -79
  31. package/dist/host/session_protocol_handler.js.map +1 -1
  32. package/dist/nook/README.md +1 -1
  33. package/dist/nook/worker/index.js +4 -2
  34. package/dist/nook/worker/index.js.map +1 -1
  35. package/dist/tui/chat_controller/history_message_model.js +2 -11
  36. package/dist/tui/chat_controller/history_message_model.js.map +1 -1
  37. package/dist/tui/chat_controller/queued_user_messages.js +6 -0
  38. package/dist/tui/chat_controller/queued_user_messages.js.map +1 -1
  39. package/dist/tui/listen_capture.js +1 -0
  40. package/dist/tui/listen_capture.js.map +1 -1
  41. package/dist/tui/session_chat_controller.js +14 -25
  42. package/dist/tui/session_chat_controller.js.map +1 -1
  43. package/dist/tui/ui/agent_activity_format.js +4 -0
  44. package/dist/tui/ui/agent_activity_format.js.map +1 -1
  45. package/dist/tui/ui/diff_review_message.js +2 -2
  46. package/dist/tui/ui/diff_review_message.js.map +1 -1
  47. package/package.json +10 -10
  48. package/dist/diff_tool/app/dist/assets/index-ivRn2dP2.js +0 -258
  49. package/dist/diff_tool/app/dist/assets/pierre-dark-Dy3oF52j.js +0 -1
  50. package/dist/diff_tool/app/dist/assets/pierre-dark-soft-K7D5SChL.js +0 -1
  51. package/dist/diff_tool/app/dist/assets/pierre-light-DhMpYZcV.js +0 -1
  52. package/dist/diff_tool/app/dist/assets/pierre-light-soft-cPlVRKcQ.js +0 -1
@@ -0,0 +1,1580 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DMxchsRu.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-DzOHUlBM.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 _v(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vf={exports:{}},Nl={};var Q0;function sx(){if(Q0)return Nl;Q0=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 d in o)d!=="key"&&(s[d]=o[d])}else s=o;return o=s.ref,{$$typeof:e,type:a,key:c,ref:o!==void 0?o:null,props:s}}return Nl.Fragment=t,Nl.jsx=i,Nl.jsxs=i,Nl}var Z0;function ux(){return Z0||(Z0=1,Vf.exports=sx()),Vf.exports}var z=ux(),jf={exports:{}},xe={};var K0;function cx(){if(K0)return xe;K0=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"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),b=Symbol.iterator;function v(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,D={};function C(O,X,A){this.props=O,this.context=X,this.refs=D,this.updater=A||S}C.prototype.isReactComponent={},C.prototype.setState=function(O,X){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,X,"setState")},C.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function w(){}w.prototype=C.prototype;function T(O,X,A){this.props=O,this.context=X,this.refs=D,this.updater=A||S}var I=T.prototype=new w;I.constructor=T,k(I,C.prototype),I.isPureReactComponent=!0;var B=Array.isArray;function R(){}var U={H:null,A:null,T:null,S:null},ie=Object.prototype.hasOwnProperty;function ne(O,X,A){var ce=A.ref;return{$$typeof:e,type:O,key:X,ref:ce!==void 0?ce:null,props:A}}function ae(O,X){return ne(O.type,X,O.props)}function W(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function F(O){var X={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(A){return X[A]})}var J=/\/+/g;function K(O,X){return typeof O=="object"&&O!==null&&O.key!=null?F(""+O.key):X.toString(36)}function Y(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(X){O.status==="pending"&&(O.status="fulfilled",O.value=X)},function(X){O.status==="pending"&&(O.status="rejected",O.reason=X)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function H(O,X,A,ce,me){var he=typeof O;(he==="undefined"||he==="boolean")&&(O=null);var Ee=!1;if(O===null)Ee=!0;else switch(he){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(O.$$typeof){case e:case t:Ee=!0;break;case y:return Ee=O._init,H(Ee(O._payload),X,A,ce,me)}}if(Ee)return me=me(O),Ee=ce===""?"."+K(O,0):ce,B(me)?(A="",Ee!=null&&(A=Ee.replace(J,"$&/")+"/"),H(me,X,A,"",function(He){return He})):me!=null&&(W(me)&&(me=ae(me,A+(me.key==null||O&&O.key===me.key?"":(""+me.key).replace(J,"$&/")+"/")+Ee)),X.push(me)),1;Ee=0;var ze=ce===""?".":ce+":";if(B(O))for(var ge=0;ge<O.length;ge++)ce=O[ge],he=ze+K(ce,ge),Ee+=H(ce,X,A,he,me);else if(ge=v(O),typeof ge=="function")for(O=ge.call(O),ge=0;!(ce=O.next()).done;)ce=ce.value,he=ze+K(ce,ge++),Ee+=H(ce,X,A,he,me);else if(he==="object"){if(typeof O.then=="function")return H(Y(O),X,A,ce,me);throw X=String(O),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function q(O,X,A){if(O==null)return O;var ce=[],me=0;return H(O,ce,"","",function(he){return X.call(A,he,me++)}),ce}function oe(O){if(O._status===-1){var X=O._result;X=X(),X.then(function(A){(O._status===0||O._status===-1)&&(O._status=1,O._result=A)},function(A){(O._status===0||O._status===-1)&&(O._status=2,O._result=A)}),O._status===-1&&(O._status=0,O._result=X)}if(O._status===1)return O._result.default;throw O._result}var de=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=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(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},L={map:q,forEach:function(O,X,A){q(O,function(){X.apply(this,arguments)},A)},count:function(O){var X=0;return q(O,function(){X++}),X},toArray:function(O){return q(O,function(X){return X})||[]},only:function(O){if(!W(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return xe.Activity=m,xe.Children=L,xe.Component=C,xe.Fragment=i,xe.Profiler=o,xe.PureComponent=T,xe.StrictMode=a,xe.Suspense=f,xe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,xe.__COMPILER_RUNTIME={__proto__:null,c:function(O){return U.H.useMemoCache(O)}},xe.cache=function(O){return function(){return O.apply(null,arguments)}},xe.cacheSignal=function(){return null},xe.cloneElement=function(O,X,A){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var ce=k({},O.props),me=O.key;if(X!=null)for(he in X.key!==void 0&&(me=""+X.key),X)!ie.call(X,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&X.ref===void 0||(ce[he]=X[he]);var he=arguments.length-2;if(he===1)ce.children=A;else if(1<he){for(var Ee=Array(he),ze=0;ze<he;ze++)Ee[ze]=arguments[ze+2];ce.children=Ee}return ne(O.type,me,ce)},xe.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},xe.createElement=function(O,X,A){var ce,me={},he=null;if(X!=null)for(ce in X.key!==void 0&&(he=""+X.key),X)ie.call(X,ce)&&ce!=="key"&&ce!=="__self"&&ce!=="__source"&&(me[ce]=X[ce]);var Ee=arguments.length-2;if(Ee===1)me.children=A;else if(1<Ee){for(var ze=Array(Ee),ge=0;ge<Ee;ge++)ze[ge]=arguments[ge+2];me.children=ze}if(O&&O.defaultProps)for(ce in Ee=O.defaultProps,Ee)me[ce]===void 0&&(me[ce]=Ee[ce]);return ne(O,he,me)},xe.createRef=function(){return{current:null}},xe.forwardRef=function(O){return{$$typeof:d,render:O}},xe.isValidElement=W,xe.lazy=function(O){return{$$typeof:y,_payload:{_status:-1,_result:O},_init:oe}},xe.memo=function(O,X){return{$$typeof:h,type:O,compare:X===void 0?null:X}},xe.startTransition=function(O){var X=U.T,A={};U.T=A;try{var ce=O(),me=U.S;me!==null&&me(A,ce),typeof ce=="object"&&ce!==null&&typeof ce.then=="function"&&ce.then(R,de)}catch(he){de(he)}finally{X!==null&&A.types!==null&&(X.types=A.types),U.T=X}},xe.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},xe.use=function(O){return U.H.use(O)},xe.useActionState=function(O,X,A){return U.H.useActionState(O,X,A)},xe.useCallback=function(O,X){return U.H.useCallback(O,X)},xe.useContext=function(O){return U.H.useContext(O)},xe.useDebugValue=function(){},xe.useDeferredValue=function(O,X){return U.H.useDeferredValue(O,X)},xe.useEffect=function(O,X){return U.H.useEffect(O,X)},xe.useEffectEvent=function(O){return U.H.useEffectEvent(O)},xe.useId=function(){return U.H.useId()},xe.useImperativeHandle=function(O,X,A){return U.H.useImperativeHandle(O,X,A)},xe.useInsertionEffect=function(O,X){return U.H.useInsertionEffect(O,X)},xe.useLayoutEffect=function(O,X){return U.H.useLayoutEffect(O,X)},xe.useMemo=function(O,X){return U.H.useMemo(O,X)},xe.useOptimistic=function(O,X){return U.H.useOptimistic(O,X)},xe.useReducer=function(O,X,A){return U.H.useReducer(O,X,A)},xe.useRef=function(O){return U.H.useRef(O)},xe.useState=function(O){return U.H.useState(O)},xe.useSyncExternalStore=function(O,X,A){return U.H.useSyncExternalStore(O,X,A)},xe.useTransition=function(){return U.H.useTransition()},xe.version="19.2.7",xe}var W0;function Sh(){return W0||(W0=1,jf.exports=cx()),jf.exports}var te=Sh(),Gf={exports:{}},Ol={},$f={exports:{}},Ff={};var J0;function fx(){return J0||(J0=1,(function(e){function t(H,q){var oe=H.length;H.push(q);e:for(;0<oe;){var de=oe-1>>>1,L=H[de];if(0<o(L,q))H[de]=q,H[oe]=L,oe=de;else break e}}function i(H){return H.length===0?null:H[0]}function a(H){if(H.length===0)return null;var q=H[0],oe=H.pop();if(oe!==q){H[0]=oe;e:for(var de=0,L=H.length,O=L>>>1;de<O;){var X=2*(de+1)-1,A=H[X],ce=X+1,me=H[ce];if(0>o(A,oe))ce<L&&0>o(me,A)?(H[de]=me,H[ce]=oe,de=ce):(H[de]=A,H[X]=oe,de=X);else if(ce<L&&0>o(me,oe))H[de]=me,H[ce]=oe,de=ce;else break e}}return q}function o(H,q){var oe=H.sortIndex-q.sortIndex;return oe!==0?oe:H.id-q.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,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],h=[],y=1,m=null,b=3,v=!1,S=!1,k=!1,D=!1,C=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function I(H){for(var q=i(h);q!==null;){if(q.callback===null)a(h);else if(q.startTime<=H)a(h),q.sortIndex=q.expirationTime,t(f,q);else break;q=i(h)}}function B(H){if(k=!1,I(H),!S)if(i(f)!==null)S=!0,R||(R=!0,F());else{var q=i(h);q!==null&&Y(B,q.startTime-H)}}var R=!1,U=-1,ie=5,ne=-1;function ae(){return D?!0:!(e.unstable_now()-ne<ie)}function W(){if(D=!1,R){var H=e.unstable_now();ne=H;var q=!0;try{e:{S=!1,k&&(k=!1,w(U),U=-1),v=!0;var oe=b;try{t:{for(I(H),m=i(f);m!==null&&!(m.expirationTime>H&&ae());){var de=m.callback;if(typeof de=="function"){m.callback=null,b=m.priorityLevel;var L=de(m.expirationTime<=H);if(H=e.unstable_now(),typeof L=="function"){m.callback=L,I(H),q=!0;break t}m===i(f)&&a(f),I(H)}else a(f);m=i(f)}if(m!==null)q=!0;else{var O=i(h);O!==null&&Y(B,O.startTime-H),q=!1}}break e}finally{m=null,b=oe,v=!1}q=void 0}}finally{q?F():R=!1}}}var F;if(typeof T=="function")F=function(){T(W)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,K=J.port2;J.port1.onmessage=W,F=function(){K.postMessage(null)}}else F=function(){C(W,0)};function Y(H,q){U=C(function(){H(e.unstable_now())},q)}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(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ie=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(H){switch(b){case 1:case 2:case 3:var q=3;break;default:q=b}var oe=b;b=q;try{return H()}finally{b=oe}},e.unstable_requestPaint=function(){D=!0},e.unstable_runWithPriority=function(H,q){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var oe=b;b=H;try{return q()}finally{b=oe}},e.unstable_scheduleCallback=function(H,q,oe){var de=e.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?de+oe:de):oe=de,H){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,H={id:y++,callback:q,priorityLevel:H,startTime:oe,expirationTime:L,sortIndex:-1},oe>de?(H.sortIndex=oe,t(h,H),i(f)===null&&H===i(h)&&(k?(w(U),U=-1):k=!0,Y(B,oe-de))):(H.sortIndex=L,t(f,H),S||v||(S=!0,R||(R=!0,F()))),H},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(H){var q=b;return function(){var oe=b;b=q;try{return H.apply(this,arguments)}finally{b=oe}}}})(Ff)),Ff}var ey;function dx(){return ey||(ey=1,$f.exports=fx()),$f.exports}var qf={exports:{}},zt={};var ty;function hx(){if(ty)return zt;ty=1;var e=Sh();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)h+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+f+"; visit "+h+" 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(f,h,y){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:m==null?null:""+m,children:f,containerInfo:h,implementation:y}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,zt.createPortal=function(f,h){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return s(f,h,null,y)},zt.flushSync=function(f){var h=c.T,y=a.p;try{if(c.T=null,a.p=2,f)return f()}finally{c.T=h,a.p=y,a.d.f()}},zt.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(f,h))},zt.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},zt.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var y=h.as,m=d(y,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;y==="style"?a.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:m,integrity:b,fetchPriority:v}):y==="script"&&a.d.X(f,{crossOrigin:m,integrity:b,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},zt.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var y=d(h.as,h.crossOrigin);a.d.M(f,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(f)},zt.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var y=h.as,m=d(y,h.crossOrigin);a.d.L(f,y,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},zt.preloadModule=function(f,h){if(typeof f=="string")if(h){var y=d(h.as,h.crossOrigin);a.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(f)},zt.requestFormReset=function(f){a.d.r(f)},zt.unstable_batchedUpdates=function(f,h){return f(h)},zt.useFormState=function(f,h,y){return c.H.useFormState(f,h,y)},zt.useFormStatus=function(){return c.H.useHostTransitionStatus()},zt.version="19.2.7",zt}var ny;function px(){if(ny)return qf.exports;ny=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(),qf.exports=hx(),qf.exports}var iy;function mx(){if(iy)return Ol;iy=1;var e=dx(),t=Sh(),i=px();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 d(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 f(n){if(s(n)!==n)throw Error(a(188))}function h(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 p=l.return;if(p===null)break;var g=p.alternate;if(g===null){if(u=p.return,u!==null){l=u;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===l)return f(p),n;if(g===u)return f(p),r;g=g.sibling}throw Error(a(188))}if(l.return!==u.return)l=p,u=g;else{for(var _=!1,x=p.child;x;){if(x===l){_=!0,l=p,u=g;break}if(x===u){_=!0,u=p,l=g;break}x=x.sibling}if(!_){for(x=g.child;x;){if(x===l){_=!0,l=g,u=p;break}if(x===u){_=!0,u=g,l=p;break}x=x.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 y(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=y(n),r!==null)return r;n=n.sibling}return null}var m=Object.assign,b=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),T=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),ae=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function F(n){return n===null||typeof n!="object"?null:(n=W&&n[W]||n["@@iterator"],typeof n=="function"?n:null)}var J=Symbol.for("react.client.reference");function K(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===J?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case k:return"Fragment";case C:return"Profiler";case D:return"StrictMode";case B:return"Suspense";case R:return"SuspenseList";case ne:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case T:return n.displayName||"Context";case w: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 U:return r=n.displayName||null,r!==null?r:K(n.type)||"Memo";case ie:r=n._payload,n=n._init;try{return K(n(r))}catch{}}return null}var Y=Array.isArray,H=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},de=[],L=-1;function O(n){return{current:n}}function X(n){0>L||(n.current=de[L],de[L]=null,L--)}function A(n,r){L++,de[L]=n.current,n.current=r}var ce=O(null),me=O(null),he=O(null),Ee=O(null);function ze(n,r){switch(A(he,r),A(me,n),A(ce,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?b0(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=b0(r),n=v0(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}X(ce),A(ce,n)}function ge(){X(ce),X(me),X(he)}function He(n){n.memoizedState!==null&&A(Ee,n);var r=ce.current,l=v0(r,n.type);r!==l&&(A(me,n),A(ce,l))}function $e(n){me.current===n&&(X(ce),X(me)),Ee.current===n&&(X(Ee),Al._currentValue=oe)}var At,Et;function We(n){if(At===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);At=r&&r[1]||"",Et=-1<l.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+At+n+Et}var jt=!1;function rt(n,r){if(!n||jt)return"";jt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var re=function(){throw Error()};if(Object.defineProperty(re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(re,[])}catch($){var G=$}Reflect.construct(n,[],re)}else{try{re.call()}catch($){G=$}n.call(re.prototype)}}else{try{throw Error()}catch($){G=$}(re=n())&&typeof re.catch=="function"&&re.catch(function(){})}}catch($){if($&&G&&typeof $.stack=="string")return[$.stack,G.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=u.DetermineComponentFrameRoot(),_=g[0],x=g[1];if(_&&x){var N=_.split(`
5
+ `),j=x.split(`
6
+ `);for(p=u=0;u<N.length&&!N[u].includes("DetermineComponentFrameRoot");)u++;for(;p<j.length&&!j[p].includes("DetermineComponentFrameRoot");)p++;if(u===N.length||p===j.length)for(u=N.length-1,p=j.length-1;1<=u&&0<=p&&N[u]!==j[p];)p--;for(;1<=u&&0<=p;u--,p--)if(N[u]!==j[p]){if(u!==1||p!==1)do if(u--,p--,0>p||N[u]!==j[p]){var Z=`
7
+ `+N[u].replace(" at new "," at ");return n.displayName&&Z.includes("<anonymous>")&&(Z=Z.replace("<anonymous>",n.displayName)),Z}while(1<=u&&0<=p);break}}}finally{jt=!1,Error.prepareStackTrace=l}return(l=n?n.displayName||n.name:"")?We(l):""}function In(n,r){switch(n.tag){case 26:case 27:case 5:return We(n.type);case 16:return We("Lazy");case 13:return n.child!==r&&r!==null?We("Suspense Fallback"):We("Suspense");case 19:return We("SuspenseList");case 0:case 15:return rt(n.type,!1);case 11:return rt(n.type.render,!1);case 1:return rt(n.type,!0);case 31:return We("Activity");default:return""}}function zn(n){try{var r="",l=null;do r+=In(n,l),l=n,n=n.return;while(n);return r}catch(u){return`
8
+ Error generating stack: `+u.message+`
9
+ `+u.stack}}var xi=Object.prototype.hasOwnProperty,Ci=e.unstable_scheduleCallback,ir=e.unstable_cancelCallback,Va=e.unstable_shouldYield,ja=e.unstable_requestPaint,Lt=e.unstable_now,Lr=e.unstable_getCurrentPriorityLevel,Q=e.unstable_ImmediatePriority,ue=e.unstable_UserBlockingPriority,_e=e.unstable_NormalPriority,Te=e.unstable_LowPriority,Pe=e.unstable_IdlePriority,Bt=e.log,Tn=e.unstable_setDisableYieldValue,xt=null,at=null;function It(n){if(typeof Bt=="function"&&Tn(n),at&&typeof at.setStrictMode=="function")try{at.setStrictMode(xt,n)}catch{}}var Ge=Math.clz32?Math.clz32:Au,Hn=Math.log,en=Math.LN2;function Au(n){return n>>>=0,n===0?32:31-(Hn(n)/en|0)|0}var Rr=256,Kn=262144,Dr=4194304;function Wn(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 Nr(n,r,l){var u=n.pendingLanes;if(u===0)return 0;var p=0,g=n.suspendedLanes,_=n.pingedLanes;n=n.warmLanes;var x=u&134217727;return x!==0?(u=x&~g,u!==0?p=Wn(u):(_&=x,_!==0?p=Wn(_):l||(l=x&~n,l!==0&&(p=Wn(l))))):(x=u&~g,x!==0?p=Wn(x):_!==0?p=Wn(_):l||(l=u&~n,l!==0&&(p=Wn(l)))),p===0?0:r!==0&&r!==p&&(r&g)===0&&(g=p&-p,l=r&-r,g>=l||g===32&&(l&4194048)!==0)?r:p}function rr(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function le(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 ye(){var n=Dr;return Dr<<=1,(Dr&62914560)===0&&(Dr=4194304),n}function we(n){for(var r=[],l=0;31>l;l++)r.push(n);return r}function Fe(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Pn(n,r,l,u,p,g){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 x=n.entanglements,N=n.expirationTimes,j=n.hiddenUpdates;for(l=_&~l;0<l;){var Z=31-Ge(l),re=1<<Z;x[Z]=0,N[Z]=-1;var G=j[Z];if(G!==null)for(j[Z]=null,Z=0;Z<G.length;Z++){var $=G[Z];$!==null&&($.lane&=-536870913)}l&=~re}u!==0&&Jn(n,u,0),g!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=g&~(_&~r))}function Jn(n,r,l){n.pendingLanes|=r,n.suspendedLanes&=~r;var u=31-Ge(r);n.entangledLanes|=r,n.entanglements[u]=n.entanglements[u]|1073741824|l&261930}function tp(n,r){var l=n.entangledLanes|=r;for(n=n.entanglements;l;){var u=31-Ge(l),p=1<<u;p&r|n[u]&r&&(n[u]|=r),l&=~p}}function np(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 Ru(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function ip(){var n=q.p;return n!==0?n:(n=window.event,n===void 0?32:j0(n.type))}function rp(n,r){var l=q.p;try{return q.p=n,r()}finally{q.p=l}}var wi=Math.random().toString(36).slice(2),Rt="__reactFiber$"+wi,Gt="__reactProps$"+wi,Or="__reactContainer$"+wi,Du="__reactEvents$"+wi,K1="__reactListeners$"+wi,W1="__reactHandles$"+wi,ap="__reactResources$"+wi,Ga="__reactMarker$"+wi;function Nu(n){delete n[Rt],delete n[Gt],delete n[Du],delete n[K1],delete n[W1]}function Mr(n){var r=n[Rt];if(r)return r;for(var l=n.parentNode;l;){if(r=l[Or]||l[Rt]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(n=k0(n);n!==null;){if(l=n[Rt])return l;n=k0(n)}return r}n=l,l=n.parentNode}return null}function Ir(n){if(n=n[Rt]||n[Or]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function $a(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(a(33))}function zr(n){var r=n[ap];return r||(r=n[ap]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Ct(n){n[Ga]=!0}var lp=new Set,op={};function ar(n,r){Hr(n,r),Hr(n+"Capture",r)}function Hr(n,r){for(op[n]=r,n=0;n<r.length;n++)lp.add(r[n])}var J1=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]*$"),sp={},up={};function eS(n){return xi.call(up,n)?!0:xi.call(sp,n)?!1:J1.test(n)?up[n]=!0:(sp[n]=!0,!1)}function po(n,r,l){if(eS(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 mo(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 ei(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 fn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function cp(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function tS(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 p=u.get,g=u.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return p.call(this)},set:function(_){l=""+_,g.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 Ou(n){if(!n._valueTracker){var r=cp(n)?"checked":"value";n._valueTracker=tS(n,r,""+n[r])}}function fp(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var l=r.getValue(),u="";return n&&(u=cp(n)?n.checked?"true":"false":n.value),n=u,n!==l?(r.setValue(n),!0):!1}function go(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 nS=/[\n"\\]/g;function dn(n){return n.replace(nS,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Mu(n,r,l,u,p,g,_,x){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=""+fn(r)):n.value!==""+fn(r)&&(n.value=""+fn(r)):_!=="submit"&&_!=="reset"||n.removeAttribute("value"),r!=null?Iu(n,_,fn(r)):l!=null?Iu(n,_,fn(l)):u!=null&&n.removeAttribute("value"),p==null&&g!=null&&(n.defaultChecked=!!g),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?n.name=""+fn(x):n.removeAttribute("name")}function dp(n,r,l,u,p,g,_,x){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(n.type=g),r!=null||l!=null){if(!(g!=="submit"&&g!=="reset"||r!=null)){Ou(n);return}l=l!=null?""+fn(l):"",r=r!=null?""+fn(r):l,x||r===n.value||(n.value=r),n.defaultValue=r}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=x?n.checked:!!u,n.defaultChecked=!!u,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(n.name=_),Ou(n)}function Iu(n,r,l){r==="number"&&go(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function Pr(n,r,l,u){if(n=n.options,r){r={};for(var p=0;p<l.length;p++)r["$"+l[p]]=!0;for(l=0;l<n.length;l++)p=r.hasOwnProperty("$"+n[l].value),n[l].selected!==p&&(n[l].selected=p),p&&u&&(n[l].defaultSelected=!0)}else{for(l=""+fn(l),r=null,p=0;p<n.length;p++){if(n[p].value===l){n[p].selected=!0,u&&(n[p].defaultSelected=!0);return}r!==null||n[p].disabled||(r=n[p])}r!==null&&(r.selected=!0)}}function hp(n,r,l){if(r!=null&&(r=""+fn(r),r!==n.value&&(n.value=r),l==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=l!=null?""+fn(l):""}function pp(n,r,l,u){if(r==null){if(u!=null){if(l!=null)throw Error(a(92));if(Y(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),r=l}l=fn(r),n.defaultValue=l,u=n.textContent,u===l&&u!==""&&u!==null&&(n.value=u),Ou(n)}function Ur(n,r){if(r){var l=n.firstChild;if(l&&l===n.lastChild&&l.nodeType===3){l.nodeValue=r;return}}n.textContent=r}var iS=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 mp(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||iS.has(r)?r==="float"?n.cssFloat=l:n[r]=(""+l).trim():n[r]=l+"px"}function gp(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 p in r)u=r[p],r.hasOwnProperty(p)&&l[p]!==u&&mp(n,p,u)}else for(var g in r)r.hasOwnProperty(g)&&mp(n,g,r[g])}function zu(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 rS=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"]]),aS=/^[\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 yo(n){return aS.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function ti(){}var Hu=null;function Pu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Br=null,Vr=null;function yp(n){var r=Ir(n);if(r&&(n=r.stateNode)){var l=n[Gt]||null;e:switch(n=r.stateNode,r.type){case"input":if(Mu(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="'+dn(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var u=l[r];if(u!==n&&u.form===n.form){var p=u[Gt]||null;if(!p)throw Error(a(90));Mu(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(r=0;r<l.length;r++)u=l[r],u.form===n.form&&fp(u)}break e;case"textarea":hp(n,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&Pr(n,!!l.multiple,r,!1)}}}var Uu=!1;function bp(n,r,l){if(Uu)return n(r,l);Uu=!0;try{var u=n(r);return u}finally{if(Uu=!1,(Br!==null||Vr!==null)&&(rs(),Br&&(r=Br,n=Vr,Vr=Br=null,yp(r),n)))for(r=0;r<n.length;r++)yp(n[r])}}function Fa(n,r){var l=n.stateNode;if(l===null)return null;var u=l[Gt]||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 ni=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bu=!1;if(ni)try{var qa={};Object.defineProperty(qa,"passive",{get:function(){Bu=!0}}),window.addEventListener("test",qa,qa),window.removeEventListener("test",qa,qa)}catch{Bu=!1}var ki=null,Vu=null,bo=null;function vp(){if(bo)return bo;var n,r=Vu,l=r.length,u,p="value"in ki?ki.value:ki.textContent,g=p.length;for(n=0;n<l&&r[n]===p[n];n++);var _=l-n;for(u=1;u<=_&&r[l-u]===p[g-u];u++);return bo=p.slice(n,1<u?1-u:void 0)}function vo(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 _o(){return!0}function _p(){return!1}function $t(n){function r(l,u,p,g,_){this._reactName=l,this._targetInst=p,this.type=u,this.nativeEvent=g,this.target=_,this.currentTarget=null;for(var x in n)n.hasOwnProperty(x)&&(l=n[x],this[x]=l?l(g):g[x]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?_o:_p,this.isPropagationStopped=_p,this}return m(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=_o)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=_o)},persist:function(){},isPersistent:_o}),r}var lr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},So=$t(lr),Ya=m({},lr,{view:0,detail:0}),lS=$t(Ya),ju,Gu,Xa,Eo=m({},Ya,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fu,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!==Xa&&(Xa&&n.type==="mousemove"?(ju=n.screenX-Xa.screenX,Gu=n.screenY-Xa.screenY):Gu=ju=0,Xa=n),ju)},movementY:function(n){return"movementY"in n?n.movementY:Gu}}),Sp=$t(Eo),oS=m({},Eo,{dataTransfer:0}),sS=$t(oS),uS=m({},Ya,{relatedTarget:0}),$u=$t(uS),cS=m({},lr,{animationName:0,elapsedTime:0,pseudoElement:0}),fS=$t(cS),dS=m({},lr,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),hS=$t(dS),pS=m({},lr,{data:0}),Ep=$t(pS),mS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gS={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"},yS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bS(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=yS[n])?!!r[n]:!1}function Fu(){return bS}var vS=m({},Ya,{key:function(n){if(n.key){var r=mS[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=vo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?gS[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fu,charCode:function(n){return n.type==="keypress"?vo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?vo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),_S=$t(vS),SS=m({},Eo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xp=$t(SS),ES=m({},Ya,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fu}),xS=$t(ES),CS=m({},lr,{propertyName:0,elapsedTime:0,pseudoElement:0}),wS=$t(CS),kS=m({},Eo,{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}),TS=$t(kS),AS=m({},lr,{newState:0,oldState:0}),LS=$t(AS),RS=[9,13,27,32],qu=ni&&"CompositionEvent"in window,Qa=null;ni&&"documentMode"in document&&(Qa=document.documentMode);var DS=ni&&"TextEvent"in window&&!Qa,Cp=ni&&(!qu||Qa&&8<Qa&&11>=Qa),wp=" ",kp=!1;function Tp(n,r){switch(n){case"keyup":return RS.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ap(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var jr=!1;function NS(n,r){switch(n){case"compositionend":return Ap(r);case"keypress":return r.which!==32?null:(kp=!0,wp);case"textInput":return n=r.data,n===wp&&kp?null:n;default:return null}}function OS(n,r){if(jr)return n==="compositionend"||!qu&&Tp(n,r)?(n=vp(),bo=Vu=ki=null,jr=!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 Cp&&r.locale!=="ko"?null:r.data;default:return null}}var MS={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 Lp(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!MS[n.type]:r==="textarea"}function Rp(n,r,l,u){Br?Vr?Vr.push(u):Vr=[u]:Br=u,r=fs(r,"onChange"),0<r.length&&(l=new So("onChange","change",null,l,u),n.push({event:l,listeners:r}))}var Za=null,Ka=null;function IS(n){d0(n,0)}function xo(n){var r=$a(n);if(fp(r))return n}function Dp(n,r){if(n==="change")return r}var Np=!1;if(ni){var Yu;if(ni){var Xu="oninput"in document;if(!Xu){var Op=document.createElement("div");Op.setAttribute("oninput","return;"),Xu=typeof Op.oninput=="function"}Yu=Xu}else Yu=!1;Np=Yu&&(!document.documentMode||9<document.documentMode)}function Mp(){Za&&(Za.detachEvent("onpropertychange",Ip),Ka=Za=null)}function Ip(n){if(n.propertyName==="value"&&xo(Ka)){var r=[];Rp(r,Ka,n,Pu(n)),bp(IS,r)}}function zS(n,r,l){n==="focusin"?(Mp(),Za=r,Ka=l,Za.attachEvent("onpropertychange",Ip)):n==="focusout"&&Mp()}function HS(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return xo(Ka)}function PS(n,r){if(n==="click")return xo(r)}function US(n,r){if(n==="input"||n==="change")return xo(r)}function BS(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var tn=typeof Object.is=="function"?Object.is:BS;function Wa(n,r){if(tn(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 p=l[u];if(!xi.call(r,p)||!tn(n[p],r[p]))return!1}return!0}function zp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Hp(n,r){var l=zp(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=zp(l)}}function Pp(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?Pp(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function Up(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=go(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=go(n.document)}return r}function Qu(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 VS=ni&&"documentMode"in document&&11>=document.documentMode,Gr=null,Zu=null,Ja=null,Ku=!1;function Bp(n,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Ku||Gr==null||Gr!==go(u)||(u=Gr,"selectionStart"in u&&Qu(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}),Ja&&Wa(Ja,u)||(Ja=u,u=fs(Zu,"onSelect"),0<u.length&&(r=new So("onSelect","select",null,r,l),n.push({event:r,listeners:u}),r.target=Gr)))}function or(n,r){var l={};return l[n.toLowerCase()]=r.toLowerCase(),l["Webkit"+n]="webkit"+r,l["Moz"+n]="moz"+r,l}var $r={animationend:or("Animation","AnimationEnd"),animationiteration:or("Animation","AnimationIteration"),animationstart:or("Animation","AnimationStart"),transitionrun:or("Transition","TransitionRun"),transitionstart:or("Transition","TransitionStart"),transitioncancel:or("Transition","TransitionCancel"),transitionend:or("Transition","TransitionEnd")},Wu={},Vp={};ni&&(Vp=document.createElement("div").style,"AnimationEvent"in window||(delete $r.animationend.animation,delete $r.animationiteration.animation,delete $r.animationstart.animation),"TransitionEvent"in window||delete $r.transitionend.transition);function sr(n){if(Wu[n])return Wu[n];if(!$r[n])return n;var r=$r[n],l;for(l in r)if(r.hasOwnProperty(l)&&l in Vp)return Wu[n]=r[l];return n}var jp=sr("animationend"),Gp=sr("animationiteration"),$p=sr("animationstart"),jS=sr("transitionrun"),GS=sr("transitionstart"),$S=sr("transitioncancel"),Fp=sr("transitionend"),qp=new Map,Ju="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(" ");Ju.push("scrollEnd");function An(n,r){qp.set(n,r),ar(r,[n])}var Co=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)},hn=[],Fr=0,ec=0;function wo(){for(var n=Fr,r=ec=Fr=0;r<n;){var l=hn[r];hn[r++]=null;var u=hn[r];hn[r++]=null;var p=hn[r];hn[r++]=null;var g=hn[r];if(hn[r++]=null,u!==null&&p!==null){var _=u.pending;_===null?p.next=p:(p.next=_.next,_.next=p),u.pending=p}g!==0&&Yp(l,p,g)}}function ko(n,r,l,u){hn[Fr++]=n,hn[Fr++]=r,hn[Fr++]=l,hn[Fr++]=u,ec|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function tc(n,r,l,u){return ko(n,r,l,u),To(n)}function ur(n,r){return ko(n,null,null,r),To(n)}function Yp(n,r,l){n.lanes|=l;var u=n.alternate;u!==null&&(u.lanes|=l);for(var p=!1,g=n.return;g!==null;)g.childLanes|=l,u=g.alternate,u!==null&&(u.childLanes|=l),g.tag===22&&(n=g.stateNode,n===null||n._visibility&1||(p=!0)),n=g,g=g.return;return n.tag===3?(g=n.stateNode,p&&r!==null&&(p=31-Ge(l),n=g.hiddenUpdates,u=n[p],u===null?n[p]=[r]:u.push(r),r.lane=l|536870912),g):null}function To(n){if(50<Sl)throw Sl=0,ff=null,Error(a(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var qr={};function FS(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 nn(n,r,l,u){return new FS(n,r,l,u)}function nc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function ii(n,r){var l=n.alternate;return l===null?(l=nn(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 Xp(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 Ao(n,r,l,u,p,g){var _=0;if(u=n,typeof n=="function")nc(n)&&(_=1);else if(typeof n=="string")_=ZE(n,l,ce.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case ne:return n=nn(31,l,r,p),n.elementType=ne,n.lanes=g,n;case k:return cr(l.children,p,g,r);case D:_=8,p|=24;break;case C:return n=nn(12,l,r,p|2),n.elementType=C,n.lanes=g,n;case B:return n=nn(13,l,r,p),n.elementType=B,n.lanes=g,n;case R:return n=nn(19,l,r,p),n.elementType=R,n.lanes=g,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case T:_=10;break e;case w:_=9;break e;case I:_=11;break e;case U:_=14;break e;case ie:_=16,u=null;break e}_=29,l=Error(a(130,n===null?"null":typeof n,"")),u=null}return r=nn(_,l,r,p),r.elementType=n,r.type=u,r.lanes=g,r}function cr(n,r,l,u){return n=nn(7,n,u,r),n.lanes=l,n}function ic(n,r,l){return n=nn(6,n,null,r),n.lanes=l,n}function Qp(n){var r=nn(18,null,null,0);return r.stateNode=n,r}function rc(n,r,l){return r=nn(4,n.children!==null?n.children:[],n.key,r),r.lanes=l,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var Zp=new WeakMap;function pn(n,r){if(typeof n=="object"&&n!==null){var l=Zp.get(n);return l!==void 0?l:(r={value:n,source:r,stack:zn(r)},Zp.set(n,r),r)}return{value:n,source:r,stack:zn(r)}}var Yr=[],Xr=0,Lo=null,el=0,mn=[],gn=0,Ti=null,Un=1,Bn="";function ri(n,r){Yr[Xr++]=el,Yr[Xr++]=Lo,Lo=n,el=r}function Kp(n,r,l){mn[gn++]=Un,mn[gn++]=Bn,mn[gn++]=Ti,Ti=n;var u=Un;n=Bn;var p=32-Ge(u)-1;u&=~(1<<p),l+=1;var g=32-Ge(r)+p;if(30<g){var _=p-p%5;g=(u&(1<<_)-1).toString(32),u>>=_,p-=_,Un=1<<32-Ge(r)+p|l<<p|u,Bn=g+n}else Un=1<<g|l<<p|u,Bn=n}function ac(n){n.return!==null&&(ri(n,1),Kp(n,1,0))}function lc(n){for(;n===Lo;)Lo=Yr[--Xr],Yr[Xr]=null,el=Yr[--Xr],Yr[Xr]=null;for(;n===Ti;)Ti=mn[--gn],mn[gn]=null,Bn=mn[--gn],mn[gn]=null,Un=mn[--gn],mn[gn]=null}function Wp(n,r){mn[gn++]=Un,mn[gn++]=Bn,mn[gn++]=Ti,Un=r.id,Bn=r.overflow,Ti=n}var Dt=null,tt=null,Ie=!1,Ai=null,yn=!1,oc=Error(a(519));function Li(n){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw tl(pn(r,n)),oc}function Jp(n){var r=n.stateNode,l=n.type,u=n.memoizedProps;switch(r[Rt]=n,r[Gt]=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<xl.length;l++)Ne(xl[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),dp(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),pp(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||g0(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=ti),r=!0):r=!1,r||Li(n,!0)}function em(n){for(Dt=n.return;Dt;)switch(Dt.tag){case 5:case 31:case 13:yn=!1;return;case 27:case 3:yn=!0;return;default:Dt=Dt.return}}function Qr(n){if(n!==Dt)return!1;if(!Ie)return em(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")||kf(n.type,n.memoizedProps)),l=!l),l&&tt&&Li(n),em(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));tt=w0(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));tt=w0(n)}else r===27?(r=tt,Gi(n.type)?(n=Df,Df=null,tt=n):tt=r):tt=Dt?vn(n.stateNode.nextSibling):null;return!0}function fr(){tt=Dt=null,Ie=!1}function sc(){var n=Ai;return n!==null&&(Xt===null?Xt=n:Xt.push.apply(Xt,n),Ai=null),n}function tl(n){Ai===null?Ai=[n]:Ai.push(n)}var uc=O(null),dr=null,ai=null;function Ri(n,r,l){A(uc,r._currentValue),r._currentValue=l}function li(n){n._currentValue=uc.current,X(uc)}function cc(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 fc(n,r,l,u){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var g=p.dependencies;if(g!==null){var _=p.child;g=g.firstContext;e:for(;g!==null;){var x=g;g=p;for(var N=0;N<r.length;N++)if(x.context===r[N]){g.lanes|=l,x=g.alternate,x!==null&&(x.lanes|=l),cc(g.return,l,n),u||(_=null);break e}g=x.next}}else if(p.tag===18){if(_=p.return,_===null)throw Error(a(341));_.lanes|=l,g=_.alternate,g!==null&&(g.lanes|=l),cc(_,l,n),_=null}else _=p.child;if(_!==null)_.return=p;else for(_=p;_!==null;){if(_===n){_=null;break}if(p=_.sibling,p!==null){p.return=_.return,_=p;break}_=_.return}p=_}}function Zr(n,r,l,u){n=null;for(var p=r,g=!1;p!==null;){if(!g){if((p.flags&524288)!==0)g=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var _=p.alternate;if(_===null)throw Error(a(387));if(_=_.memoizedProps,_!==null){var x=p.type;tn(p.pendingProps.value,_.value)||(n!==null?n.push(x):n=[x])}}else if(p===Ee.current){if(_=p.alternate,_===null)throw Error(a(387));_.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(Al):n=[Al])}p=p.return}n!==null&&fc(r,n,l,u),r.flags|=262144}function Ro(n){for(n=n.firstContext;n!==null;){if(!tn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function hr(n){dr=n,ai=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Nt(n){return tm(dr,n)}function Do(n,r){return dr===null&&hr(n),tm(n,r)}function tm(n,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},ai===null){if(n===null)throw Error(a(308));ai=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else ai=ai.next=r;return l}var qS=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()})}},YS=e.unstable_scheduleCallback,XS=e.unstable_NormalPriority,ft={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function dc(){return{controller:new qS,data:new Map,refCount:0}}function nl(n){n.refCount--,n.refCount===0&&YS(XS,function(){n.controller.abort()})}var il=null,hc=0,Kr=0,Wr=null;function QS(n,r){if(il===null){var l=il=[];hc=0,Kr=yf(),Wr={status:"pending",value:void 0,then:function(u){l.push(u)}}}return hc++,r.then(nm,nm),r}function nm(){if(--hc===0&&il!==null){Wr!==null&&(Wr.status="fulfilled");var n=il;il=null,Kr=0,Wr=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function ZS(n,r){var l=[],u={status:"pending",value:null,reason:null,then:function(p){l.push(p)}};return n.then(function(){u.status="fulfilled",u.value=r;for(var p=0;p<l.length;p++)(0,l[p])(r)},function(p){for(u.status="rejected",u.reason=p,p=0;p<l.length;p++)(0,l[p])(void 0)}),u}var im=H.S;H.S=function(n,r){Bg=Lt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&QS(n,r),im!==null&&im(n,r)};var pr=O(null);function pc(){var n=pr.current;return n!==null?n:Ke.pooledCache}function No(n,r){r===null?A(pr,pr.current):A(pr,r.pool)}function rm(){var n=pc();return n===null?null:{parent:ft._currentValue,pool:n}}var Jr=Error(a(460)),mc=Error(a(474)),Oo=Error(a(542)),Mo={then:function(){}};function am(n){return n=n.status,n==="fulfilled"||n==="rejected"}function lm(n,r,l){switch(l=n[l],l===void 0?n.push(r):l!==r&&(r.then(ti,ti),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,sm(n),n;default:if(typeof r.status=="string")r.then(ti,ti);else{if(n=Ke,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=r,n.status="pending",n.then(function(u){if(r.status==="pending"){var p=r;p.status="fulfilled",p.value=u}},function(u){if(r.status==="pending"){var p=r;p.status="rejected",p.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,sm(n),n}throw gr=r,Jr}}function mr(n){try{var r=n._init;return r(n._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(gr=l,Jr):l}}var gr=null;function om(){if(gr===null)throw Error(a(459));var n=gr;return gr=null,n}function sm(n){if(n===Jr||n===Oo)throw Error(a(483))}var ea=null,rl=0;function Io(n){var r=rl;return rl+=1,ea===null&&(ea=[]),lm(ea,n,r)}function al(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function zo(n,r){throw r.$$typeof===b?Error(a(525)):(n=Object.prototype.toString.call(r),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function um(n){function r(P,M){if(n){var V=P.deletions;V===null?(P.deletions=[M],P.flags|=16):V.push(M)}}function l(P,M){if(!n)return null;for(;M!==null;)r(P,M),M=M.sibling;return null}function u(P){for(var M=new Map;P!==null;)P.key!==null?M.set(P.key,P):M.set(P.index,P),P=P.sibling;return M}function p(P,M){return P=ii(P,M),P.index=0,P.sibling=null,P}function g(P,M,V){return P.index=V,n?(V=P.alternate,V!==null?(V=V.index,V<M?(P.flags|=67108866,M):V):(P.flags|=67108866,M)):(P.flags|=1048576,M)}function _(P){return n&&P.alternate===null&&(P.flags|=67108866),P}function x(P,M,V,ee){return M===null||M.tag!==6?(M=ic(V,P.mode,ee),M.return=P,M):(M=p(M,V),M.return=P,M)}function N(P,M,V,ee){var be=V.type;return be===k?Z(P,M,V.props.children,ee,V.key):M!==null&&(M.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===ie&&mr(be)===M.type)?(M=p(M,V.props),al(M,V),M.return=P,M):(M=Ao(V.type,V.key,V.props,null,P.mode,ee),al(M,V),M.return=P,M)}function j(P,M,V,ee){return M===null||M.tag!==4||M.stateNode.containerInfo!==V.containerInfo||M.stateNode.implementation!==V.implementation?(M=rc(V,P.mode,ee),M.return=P,M):(M=p(M,V.children||[]),M.return=P,M)}function Z(P,M,V,ee,be){return M===null||M.tag!==7?(M=cr(V,P.mode,ee,be),M.return=P,M):(M=p(M,V),M.return=P,M)}function re(P,M,V){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=ic(""+M,P.mode,V),M.return=P,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case v:return V=Ao(M.type,M.key,M.props,null,P.mode,V),al(V,M),V.return=P,V;case S:return M=rc(M,P.mode,V),M.return=P,M;case ie:return M=mr(M),re(P,M,V)}if(Y(M)||F(M))return M=cr(M,P.mode,V,null),M.return=P,M;if(typeof M.then=="function")return re(P,Io(M),V);if(M.$$typeof===T)return re(P,Do(P,M),V);zo(P,M)}return null}function G(P,M,V,ee){var be=M!==null?M.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return be!==null?null:x(P,M,""+V,ee);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case v:return V.key===be?N(P,M,V,ee):null;case S:return V.key===be?j(P,M,V,ee):null;case ie:return V=mr(V),G(P,M,V,ee)}if(Y(V)||F(V))return be!==null?null:Z(P,M,V,ee,null);if(typeof V.then=="function")return G(P,M,Io(V),ee);if(V.$$typeof===T)return G(P,M,Do(P,V),ee);zo(P,V)}return null}function $(P,M,V,ee,be){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return P=P.get(V)||null,x(M,P,""+ee,be);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case v:return P=P.get(ee.key===null?V:ee.key)||null,N(M,P,ee,be);case S:return P=P.get(ee.key===null?V:ee.key)||null,j(M,P,ee,be);case ie:return ee=mr(ee),$(P,M,V,ee,be)}if(Y(ee)||F(ee))return P=P.get(V)||null,Z(M,P,ee,be,null);if(typeof ee.then=="function")return $(P,M,V,Io(ee),be);if(ee.$$typeof===T)return $(P,M,V,Do(M,ee),be);zo(M,ee)}return null}function fe(P,M,V,ee){for(var be=null,Ue=null,pe=M,Ae=M=0,Me=null;pe!==null&&Ae<V.length;Ae++){pe.index>Ae?(Me=pe,pe=null):Me=pe.sibling;var Be=G(P,pe,V[Ae],ee);if(Be===null){pe===null&&(pe=Me);break}n&&pe&&Be.alternate===null&&r(P,pe),M=g(Be,M,Ae),Ue===null?be=Be:Ue.sibling=Be,Ue=Be,pe=Me}if(Ae===V.length)return l(P,pe),Ie&&ri(P,Ae),be;if(pe===null){for(;Ae<V.length;Ae++)pe=re(P,V[Ae],ee),pe!==null&&(M=g(pe,M,Ae),Ue===null?be=pe:Ue.sibling=pe,Ue=pe);return Ie&&ri(P,Ae),be}for(pe=u(pe);Ae<V.length;Ae++)Me=$(pe,P,Ae,V[Ae],ee),Me!==null&&(n&&Me.alternate!==null&&pe.delete(Me.key===null?Ae:Me.key),M=g(Me,M,Ae),Ue===null?be=Me:Ue.sibling=Me,Ue=Me);return n&&pe.forEach(function(Xi){return r(P,Xi)}),Ie&&ri(P,Ae),be}function ve(P,M,V,ee){if(V==null)throw Error(a(151));for(var be=null,Ue=null,pe=M,Ae=M=0,Me=null,Be=V.next();pe!==null&&!Be.done;Ae++,Be=V.next()){pe.index>Ae?(Me=pe,pe=null):Me=pe.sibling;var Xi=G(P,pe,Be.value,ee);if(Xi===null){pe===null&&(pe=Me);break}n&&pe&&Xi.alternate===null&&r(P,pe),M=g(Xi,M,Ae),Ue===null?be=Xi:Ue.sibling=Xi,Ue=Xi,pe=Me}if(Be.done)return l(P,pe),Ie&&ri(P,Ae),be;if(pe===null){for(;!Be.done;Ae++,Be=V.next())Be=re(P,Be.value,ee),Be!==null&&(M=g(Be,M,Ae),Ue===null?be=Be:Ue.sibling=Be,Ue=Be);return Ie&&ri(P,Ae),be}for(pe=u(pe);!Be.done;Ae++,Be=V.next())Be=$(pe,P,Ae,Be.value,ee),Be!==null&&(n&&Be.alternate!==null&&pe.delete(Be.key===null?Ae:Be.key),M=g(Be,M,Ae),Ue===null?be=Be:Ue.sibling=Be,Ue=Be);return n&&pe.forEach(function(ox){return r(P,ox)}),Ie&&ri(P,Ae),be}function Ze(P,M,V,ee){if(typeof V=="object"&&V!==null&&V.type===k&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case v:e:{for(var be=V.key;M!==null;){if(M.key===be){if(be=V.type,be===k){if(M.tag===7){l(P,M.sibling),ee=p(M,V.props.children),ee.return=P,P=ee;break e}}else if(M.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===ie&&mr(be)===M.type){l(P,M.sibling),ee=p(M,V.props),al(ee,V),ee.return=P,P=ee;break e}l(P,M);break}else r(P,M);M=M.sibling}V.type===k?(ee=cr(V.props.children,P.mode,ee,V.key),ee.return=P,P=ee):(ee=Ao(V.type,V.key,V.props,null,P.mode,ee),al(ee,V),ee.return=P,P=ee)}return _(P);case S:e:{for(be=V.key;M!==null;){if(M.key===be)if(M.tag===4&&M.stateNode.containerInfo===V.containerInfo&&M.stateNode.implementation===V.implementation){l(P,M.sibling),ee=p(M,V.children||[]),ee.return=P,P=ee;break e}else{l(P,M);break}else r(P,M);M=M.sibling}ee=rc(V,P.mode,ee),ee.return=P,P=ee}return _(P);case ie:return V=mr(V),Ze(P,M,V,ee)}if(Y(V))return fe(P,M,V,ee);if(F(V)){if(be=F(V),typeof be!="function")throw Error(a(150));return V=be.call(V),ve(P,M,V,ee)}if(typeof V.then=="function")return Ze(P,M,Io(V),ee);if(V.$$typeof===T)return Ze(P,M,Do(P,V),ee);zo(P,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,M!==null&&M.tag===6?(l(P,M.sibling),ee=p(M,V),ee.return=P,P=ee):(l(P,M),ee=ic(V,P.mode,ee),ee.return=P,P=ee),_(P)):l(P,M)}return function(P,M,V,ee){try{rl=0;var be=Ze(P,M,V,ee);return ea=null,be}catch(pe){if(pe===Jr||pe===Oo)throw pe;var Ue=nn(29,pe,null,P.mode);return Ue.lanes=ee,Ue.return=P,Ue}}}var yr=um(!0),cm=um(!1),Di=!1;function gc(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function yc(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 Ni(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Oi(n,r,l){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(Ve&2)!==0){var p=u.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),u.pending=r,r=To(n),Yp(n,null,l),r}return ko(n,u,r,l),To(n)}function ll(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,tp(n,l)}}function bc(n,r){var l=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var p=null,g=null;if(l=l.firstBaseUpdate,l!==null){do{var _={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};g===null?p=g=_:g=g.next=_,l=l.next}while(l!==null);g===null?p=g=r:g=g.next=r}else p=g=r;l={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:g,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 vc=!1;function ol(){if(vc){var n=Wr;if(n!==null)throw n}}function sl(n,r,l,u){vc=!1;var p=n.updateQueue;Di=!1;var g=p.firstBaseUpdate,_=p.lastBaseUpdate,x=p.shared.pending;if(x!==null){p.shared.pending=null;var N=x,j=N.next;N.next=null,_===null?g=j:_.next=j,_=N;var Z=n.alternate;Z!==null&&(Z=Z.updateQueue,x=Z.lastBaseUpdate,x!==_&&(x===null?Z.firstBaseUpdate=j:x.next=j,Z.lastBaseUpdate=N))}if(g!==null){var re=p.baseState;_=0,Z=j=N=null,x=g;do{var G=x.lane&-536870913,$=G!==x.lane;if($?(Oe&G)===G:(u&G)===G){G!==0&&G===Kr&&(vc=!0),Z!==null&&(Z=Z.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var fe=n,ve=x;G=r;var Ze=l;switch(ve.tag){case 1:if(fe=ve.payload,typeof fe=="function"){re=fe.call(Ze,re,G);break e}re=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=ve.payload,G=typeof fe=="function"?fe.call(Ze,re,G):fe,G==null)break e;re=m({},re,G);break e;case 2:Di=!0}}G=x.callback,G!==null&&(n.flags|=64,$&&(n.flags|=8192),$=p.callbacks,$===null?p.callbacks=[G]:$.push(G))}else $={lane:G,tag:x.tag,payload:x.payload,callback:x.callback,next:null},Z===null?(j=Z=$,N=re):Z=Z.next=$,_|=G;if(x=x.next,x===null){if(x=p.shared.pending,x===null)break;$=x,x=$.next,$.next=null,p.lastBaseUpdate=$,p.shared.pending=null}}while(!0);Z===null&&(N=re),p.baseState=N,p.firstBaseUpdate=j,p.lastBaseUpdate=Z,g===null&&(p.shared.lanes=0),Pi|=_,n.lanes=_,n.memoizedState=re}}function fm(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function dm(n,r){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;n<l.length;n++)fm(l[n],r)}var ta=O(null),Ho=O(0);function hm(n,r){n=mi,A(Ho,n),A(ta,r),mi=n|r.baseLanes}function _c(){A(Ho,mi),A(ta,ta.current)}function Sc(){mi=Ho.current,X(ta),X(Ho)}var rn=O(null),bn=null;function Mi(n){var r=n.alternate;A(st,st.current&1),A(rn,n),bn===null&&(r===null||ta.current!==null||r.memoizedState!==null)&&(bn=n)}function Ec(n){A(st,st.current),A(rn,n),bn===null&&(bn=n)}function pm(n){n.tag===22?(A(st,st.current),A(rn,n),bn===null&&(bn=n)):Ii()}function Ii(){A(st,st.current),A(rn,rn.current)}function an(n){X(rn),bn===n&&(bn=null),X(st)}var st=O(0);function Po(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)||Rf(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 oi=0,ke=null,Xe=null,dt=null,Uo=!1,na=!1,br=!1,Bo=0,ul=0,ia=null,KS=0;function lt(){throw Error(a(321))}function xc(n,r){if(r===null)return!1;for(var l=0;l<r.length&&l<n.length;l++)if(!tn(n[l],r[l]))return!1;return!0}function Cc(n,r,l,u,p,g){return oi=g,ke=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,H.H=n===null||n.memoizedState===null?Km:Uc,br=!1,g=l(u,p),br=!1,na&&(g=gm(r,l,u,p)),mm(n),g}function mm(n){H.H=dl;var r=Xe!==null&&Xe.next!==null;if(oi=0,dt=Xe=ke=null,Uo=!1,ul=0,ia=null,r)throw Error(a(300));n===null||ht||(n=n.dependencies,n!==null&&Ro(n)&&(ht=!0))}function gm(n,r,l,u){ke=n;var p=0;do{if(na&&(ia=null),ul=0,na=!1,25<=p)throw Error(a(301));if(p+=1,dt=Xe=null,n.updateQueue!=null){var g=n.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}H.H=Wm,g=r(l,u)}while(na);return g}function WS(){var n=H.H,r=n.useState()[0];return r=typeof r.then=="function"?cl(r):r,n=n.useState()[0],(Xe!==null?Xe.memoizedState:null)!==n&&(ke.flags|=1024),r}function wc(){var n=Bo!==0;return Bo=0,n}function kc(n,r,l){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~l}function Tc(n){if(Uo){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}Uo=!1}oi=0,dt=Xe=ke=null,na=!1,ul=Bo=0,ia=null}function Vt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?ke.memoizedState=dt=n:dt=dt.next=n,dt}function ut(){if(Xe===null){var n=ke.alternate;n=n!==null?n.memoizedState:null}else n=Xe.next;var r=dt===null?ke.memoizedState:dt.next;if(r!==null)dt=r,Xe=n;else{if(n===null)throw ke.alternate===null?Error(a(467)):Error(a(310));Xe=n,n={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},dt===null?ke.memoizedState=dt=n:dt=dt.next=n}return dt}function Vo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cl(n){var r=ul;return ul+=1,ia===null&&(ia=[]),n=lm(ia,n,r),r=ke,(dt===null?r.memoizedState:dt.next)===null&&(r=r.alternate,H.H=r===null||r.memoizedState===null?Km:Uc),n}function jo(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return cl(n);if(n.$$typeof===T)return Nt(n)}throw Error(a(438,String(n)))}function Ac(n){var r=null,l=ke.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=ke.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=Vo(),ke.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 si(n,r){return typeof r=="function"?r(n):r}function Go(n){var r=ut();return Lc(r,Xe,n)}function Lc(n,r,l){var u=n.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var p=n.baseQueue,g=u.pending;if(g!==null){if(p!==null){var _=p.next;p.next=g.next,g.next=_}r.baseQueue=p=g,u.pending=null}if(g=n.baseState,p===null)n.memoizedState=g;else{r=p.next;var x=_=null,N=null,j=r,Z=!1;do{var re=j.lane&-536870913;if(re!==j.lane?(Oe&re)===re:(oi&re)===re){var G=j.revertLane;if(G===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),re===Kr&&(Z=!0);else if((oi&G)===G){j=j.next,G===Kr&&(Z=!0);continue}else re={lane:0,revertLane:j.revertLane,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},N===null?(x=N=re,_=g):N=N.next=re,ke.lanes|=G,Pi|=G;re=j.action,br&&l(g,re),g=j.hasEagerState?j.eagerState:l(g,re)}else G={lane:re,revertLane:j.revertLane,gesture:j.gesture,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},N===null?(x=N=G,_=g):N=N.next=G,ke.lanes|=re,Pi|=re;j=j.next}while(j!==null&&j!==r);if(N===null?_=g:N.next=x,!tn(g,n.memoizedState)&&(ht=!0,Z&&(l=Wr,l!==null)))throw l;n.memoizedState=g,n.baseState=_,n.baseQueue=N,u.lastRenderedState=g}return p===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function Rc(n){var r=ut(),l=r.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=n;var u=l.dispatch,p=l.pending,g=r.memoizedState;if(p!==null){l.pending=null;var _=p=p.next;do g=n(g,_.action),_=_.next;while(_!==p);tn(g,r.memoizedState)||(ht=!0),r.memoizedState=g,r.baseQueue===null&&(r.baseState=g),l.lastRenderedState=g}return[g,u]}function ym(n,r,l){var u=ke,p=ut(),g=Ie;if(g){if(l===void 0)throw Error(a(407));l=l()}else l=r();var _=!tn((Xe||p).memoizedState,l);if(_&&(p.memoizedState=l,ht=!0),p=p.queue,Oc(_m.bind(null,u,p,n),[n]),p.getSnapshot!==r||_||dt!==null&&dt.memoizedState.tag&1){if(u.flags|=2048,ra(9,{destroy:void 0},vm.bind(null,u,p,l,r),null),Ke===null)throw Error(a(349));g||(oi&127)!==0||bm(u,r,l)}return l}function bm(n,r,l){n.flags|=16384,n={getSnapshot:r,value:l},r=ke.updateQueue,r===null?(r=Vo(),ke.updateQueue=r,r.stores=[n]):(l=r.stores,l===null?r.stores=[n]:l.push(n))}function vm(n,r,l,u){r.value=l,r.getSnapshot=u,Sm(r)&&Em(n)}function _m(n,r,l){return l(function(){Sm(r)&&Em(n)})}function Sm(n){var r=n.getSnapshot;n=n.value;try{var l=r();return!tn(n,l)}catch{return!0}}function Em(n){var r=ur(n,2);r!==null&&Qt(r,n,2)}function Dc(n){var r=Vt();if(typeof n=="function"){var l=n;if(n=l(),br){It(!0);try{l()}finally{It(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:n},r}function xm(n,r,l,u){return n.baseState=l,Lc(n,Xe,typeof u=="function"?u:si)}function JS(n,r,l,u,p){if(qo(n))throw Error(a(485));if(n=r.action,n!==null){var g={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){g.listeners.push(_)}};H.T!==null?l(!0):g.isTransition=!1,u(g),l=r.pending,l===null?(g.next=r.pending=g,Cm(r,g)):(g.next=l.next,r.pending=l.next=g)}}function Cm(n,r){var l=r.action,u=r.payload,p=n.state;if(r.isTransition){var g=H.T,_={};H.T=_;try{var x=l(p,u),N=H.S;N!==null&&N(_,x),wm(n,r,x)}catch(j){Nc(n,r,j)}finally{g!==null&&_.types!==null&&(g.types=_.types),H.T=g}}else try{g=l(p,u),wm(n,r,g)}catch(j){Nc(n,r,j)}}function wm(n,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){km(n,r,u)},function(u){return Nc(n,r,u)}):km(n,r,l)}function km(n,r,l){r.status="fulfilled",r.value=l,Tm(r),n.state=l,r=n.pending,r!==null&&(l=r.next,l===r?n.pending=null:(l=l.next,r.next=l,Cm(n,l)))}function Nc(n,r,l){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=l,Tm(r),r=r.next;while(r!==u)}n.action=null}function Tm(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function Am(n,r){return r}function Lm(n,r){if(Ie){var l=Ke.formState;if(l!==null){e:{var u=ke;if(Ie){if(tt){t:{for(var p=tt,g=yn;p.nodeType!==8;){if(!g){p=null;break t}if(p=vn(p.nextSibling),p===null){p=null;break t}}g=p.data,p=g==="F!"||g==="F"?p:null}if(p){tt=vn(p.nextSibling),u=p.data==="F!";break e}}Li(u)}u=!1}u&&(r=l[0])}}return l=Vt(),l.memoizedState=l.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Am,lastRenderedState:r},l.queue=u,l=Xm.bind(null,ke,u),u.dispatch=l,u=Dc(!1),g=Pc.bind(null,ke,!1,u.queue),u=Vt(),p={state:r,dispatch:null,action:n,pending:null},u.queue=p,l=JS.bind(null,ke,p,g,l),p.dispatch=l,u.memoizedState=n,[r,l,!1]}function Rm(n){var r=ut();return Dm(r,Xe,n)}function Dm(n,r,l){if(r=Lc(n,r,Am)[0],n=Go(si)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=cl(r)}catch(_){throw _===Jr?Oo:_}else u=r;r=ut();var p=r.queue,g=p.dispatch;return l!==r.memoizedState&&(ke.flags|=2048,ra(9,{destroy:void 0},eE.bind(null,p,l),null)),[u,g,n]}function eE(n,r){n.action=r}function Nm(n){var r=ut(),l=Xe;if(l!==null)return Dm(r,l,n);ut(),r=r.memoizedState,l=ut();var u=l.queue.dispatch;return l.memoizedState=n,[r,u,!1]}function ra(n,r,l,u){return n={tag:n,create:l,deps:u,inst:r,next:null},r=ke.updateQueue,r===null&&(r=Vo(),ke.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 Om(){return ut().memoizedState}function $o(n,r,l,u){var p=Vt();ke.flags|=n,p.memoizedState=ra(1|r,{destroy:void 0},l,u===void 0?null:u)}function Fo(n,r,l,u){var p=ut();u=u===void 0?null:u;var g=p.memoizedState.inst;Xe!==null&&u!==null&&xc(u,Xe.memoizedState.deps)?p.memoizedState=ra(r,g,l,u):(ke.flags|=n,p.memoizedState=ra(1|r,g,l,u))}function Mm(n,r){$o(8390656,8,n,r)}function Oc(n,r){Fo(2048,8,n,r)}function tE(n){ke.flags|=4;var r=ke.updateQueue;if(r===null)r=Vo(),ke.updateQueue=r,r.events=[n];else{var l=r.events;l===null?r.events=[n]:l.push(n)}}function Im(n){var r=ut().memoizedState;return tE({ref:r,nextImpl:n}),function(){if((Ve&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function zm(n,r){return Fo(4,2,n,r)}function Hm(n,r){return Fo(4,4,n,r)}function Pm(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 Um(n,r,l){l=l!=null?l.concat([n]):null,Fo(4,4,Pm.bind(null,r,n),l)}function Mc(){}function Bm(n,r){var l=ut();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&xc(r,u[1])?u[0]:(l.memoizedState=[n,r],n)}function Vm(n,r){var l=ut();r=r===void 0?null:r;var u=l.memoizedState;if(r!==null&&xc(r,u[1]))return u[0];if(u=n(),br){It(!0);try{n()}finally{It(!1)}}return l.memoizedState=[u,r],u}function Ic(n,r,l){return l===void 0||(oi&1073741824)!==0&&(Oe&261930)===0?n.memoizedState=r:(n.memoizedState=l,n=jg(),ke.lanes|=n,Pi|=n,l)}function jm(n,r,l,u){return tn(l,r)?l:ta.current!==null?(n=Ic(n,l,u),tn(n,r)||(ht=!0),n):(oi&42)===0||(oi&1073741824)!==0&&(Oe&261930)===0?(ht=!0,n.memoizedState=l):(n=jg(),ke.lanes|=n,Pi|=n,r)}function Gm(n,r,l,u,p){var g=q.p;q.p=g!==0&&8>g?g:8;var _=H.T,x={};H.T=x,Pc(n,!1,r,l);try{var N=p(),j=H.S;if(j!==null&&j(x,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var Z=ZS(N,u);fl(n,r,Z,sn(n))}else fl(n,r,u,sn(n))}catch(re){fl(n,r,{then:function(){},status:"rejected",reason:re},sn())}finally{q.p=g,_!==null&&x.types!==null&&(_.types=x.types),H.T=_}}function nE(){}function zc(n,r,l,u){if(n.tag!==5)throw Error(a(476));var p=$m(n).queue;Gm(n,p,r,oe,l===null?nE:function(){return Fm(n),l(u)})}function $m(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:si,lastRenderedState:oe},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:l},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function Fm(n){var r=$m(n);r.next===null&&(r=n.alternate.memoizedState),fl(n,r.next.queue,{},sn())}function Hc(){return Nt(Al)}function qm(){return ut().memoizedState}function Ym(){return ut().memoizedState}function iE(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var l=sn();n=Ni(l);var u=Oi(r,n,l);u!==null&&(Qt(u,r,l),ll(u,r,l)),r={cache:dc()},n.payload=r;return}r=r.return}}function rE(n,r,l){var u=sn();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},qo(n)?Qm(r,l):(l=tc(n,r,l,u),l!==null&&(Qt(l,n,u),Zm(l,r,u)))}function Xm(n,r,l){var u=sn();fl(n,r,l,u)}function fl(n,r,l,u){var p={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(qo(n))Qm(r,p);else{var g=n.alternate;if(n.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var _=r.lastRenderedState,x=g(_,l);if(p.hasEagerState=!0,p.eagerState=x,tn(x,_))return ko(n,r,p,0),Ke===null&&wo(),!1}catch{}if(l=tc(n,r,p,u),l!==null)return Qt(l,n,u),Zm(l,r,u),!0}return!1}function Pc(n,r,l,u){if(u={lane:2,revertLane:yf(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},qo(n)){if(r)throw Error(a(479))}else r=tc(n,l,u,2),r!==null&&Qt(r,n,2)}function qo(n){var r=n.alternate;return n===ke||r!==null&&r===ke}function Qm(n,r){na=Uo=!0;var l=n.pending;l===null?r.next=r:(r.next=l.next,l.next=r),n.pending=r}function Zm(n,r,l){if((l&4194048)!==0){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,tp(n,l)}}var dl={readContext:Nt,use:jo,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useLayoutEffect:lt,useInsertionEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useSyncExternalStore:lt,useId:lt,useHostTransitionStatus:lt,useFormState:lt,useActionState:lt,useOptimistic:lt,useMemoCache:lt,useCacheRefresh:lt};dl.useEffectEvent=lt;var Km={readContext:Nt,use:jo,useCallback:function(n,r){return Vt().memoizedState=[n,r===void 0?null:r],n},useContext:Nt,useEffect:Mm,useImperativeHandle:function(n,r,l){l=l!=null?l.concat([n]):null,$o(4194308,4,Pm.bind(null,r,n),l)},useLayoutEffect:function(n,r){return $o(4194308,4,n,r)},useInsertionEffect:function(n,r){$o(4,2,n,r)},useMemo:function(n,r){var l=Vt();r=r===void 0?null:r;var u=n();if(br){It(!0);try{n()}finally{It(!1)}}return l.memoizedState=[u,r],u},useReducer:function(n,r,l){var u=Vt();if(l!==void 0){var p=l(r);if(br){It(!0);try{l(r)}finally{It(!1)}}}else p=r;return u.memoizedState=u.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},u.queue=n,n=n.dispatch=rE.bind(null,ke,n),[u.memoizedState,n]},useRef:function(n){var r=Vt();return n={current:n},r.memoizedState=n},useState:function(n){n=Dc(n);var r=n.queue,l=Xm.bind(null,ke,r);return r.dispatch=l,[n.memoizedState,l]},useDebugValue:Mc,useDeferredValue:function(n,r){var l=Vt();return Ic(l,n,r)},useTransition:function(){var n=Dc(!1);return n=Gm.bind(null,ke,n.queue,!0,!1),Vt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,l){var u=ke,p=Vt();if(Ie){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),Ke===null)throw Error(a(349));(Oe&127)!==0||bm(u,r,l)}p.memoizedState=l;var g={value:l,getSnapshot:r};return p.queue=g,Mm(_m.bind(null,u,g,n),[n]),u.flags|=2048,ra(9,{destroy:void 0},vm.bind(null,u,g,l,r),null),l},useId:function(){var n=Vt(),r=Ke.identifierPrefix;if(Ie){var l=Bn,u=Un;l=(u&~(1<<32-Ge(u)-1)).toString(32)+l,r="_"+r+"R_"+l,l=Bo++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=KS++,r="_"+r+"r_"+l.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:Hc,useFormState:Lm,useActionState:Lm,useOptimistic:function(n){var r=Vt();r.memoizedState=r.baseState=n;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=Pc.bind(null,ke,!0,l),l.dispatch=r,[n,r]},useMemoCache:Ac,useCacheRefresh:function(){return Vt().memoizedState=iE.bind(null,ke)},useEffectEvent:function(n){var r=Vt(),l={impl:n};return r.memoizedState=l,function(){if((Ve&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},Uc={readContext:Nt,use:jo,useCallback:Bm,useContext:Nt,useEffect:Oc,useImperativeHandle:Um,useInsertionEffect:zm,useLayoutEffect:Hm,useMemo:Vm,useReducer:Go,useRef:Om,useState:function(){return Go(si)},useDebugValue:Mc,useDeferredValue:function(n,r){var l=ut();return jm(l,Xe.memoizedState,n,r)},useTransition:function(){var n=Go(si)[0],r=ut().memoizedState;return[typeof n=="boolean"?n:cl(n),r]},useSyncExternalStore:ym,useId:qm,useHostTransitionStatus:Hc,useFormState:Rm,useActionState:Rm,useOptimistic:function(n,r){var l=ut();return xm(l,Xe,n,r)},useMemoCache:Ac,useCacheRefresh:Ym};Uc.useEffectEvent=Im;var Wm={readContext:Nt,use:jo,useCallback:Bm,useContext:Nt,useEffect:Oc,useImperativeHandle:Um,useInsertionEffect:zm,useLayoutEffect:Hm,useMemo:Vm,useReducer:Rc,useRef:Om,useState:function(){return Rc(si)},useDebugValue:Mc,useDeferredValue:function(n,r){var l=ut();return Xe===null?Ic(l,n,r):jm(l,Xe.memoizedState,n,r)},useTransition:function(){var n=Rc(si)[0],r=ut().memoizedState;return[typeof n=="boolean"?n:cl(n),r]},useSyncExternalStore:ym,useId:qm,useHostTransitionStatus:Hc,useFormState:Nm,useActionState:Nm,useOptimistic:function(n,r){var l=ut();return Xe!==null?xm(l,Xe,n,r):(l.baseState=n,[n,l.queue.dispatch])},useMemoCache:Ac,useCacheRefresh:Ym};Wm.useEffectEvent=Im;function Bc(n,r,l,u){r=n.memoizedState,l=l(u,r),l=l==null?r:m({},r,l),n.memoizedState=l,n.lanes===0&&(n.updateQueue.baseState=l)}var Vc={enqueueSetState:function(n,r,l){n=n._reactInternals;var u=sn(),p=Ni(u);p.payload=r,l!=null&&(p.callback=l),r=Oi(n,p,u),r!==null&&(Qt(r,n,u),ll(r,n,u))},enqueueReplaceState:function(n,r,l){n=n._reactInternals;var u=sn(),p=Ni(u);p.tag=1,p.payload=r,l!=null&&(p.callback=l),r=Oi(n,p,u),r!==null&&(Qt(r,n,u),ll(r,n,u))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var l=sn(),u=Ni(l);u.tag=2,r!=null&&(u.callback=r),r=Oi(n,u,l),r!==null&&(Qt(r,n,l),ll(r,n,l))}};function Jm(n,r,l,u,p,g,_){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,g,_):r.prototype&&r.prototype.isPureReactComponent?!Wa(l,u)||!Wa(p,g):!0}function eg(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&&Vc.enqueueReplaceState(r,r.state,null)}function vr(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=m({},l));for(var p in n)l[p]===void 0&&(l[p]=n[p])}return l}function tg(n){Co(n)}function ng(n){console.error(n)}function ig(n){Co(n)}function Yo(n,r){try{var l=n.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function rg(n,r,l){try{var u=n.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function jc(n,r,l){return l=Ni(l),l.tag=3,l.payload={element:null},l.callback=function(){Yo(n,r)},l}function ag(n){return n=Ni(n),n.tag=3,n}function lg(n,r,l,u){var p=l.type.getDerivedStateFromError;if(typeof p=="function"){var g=u.value;n.payload=function(){return p(g)},n.callback=function(){rg(r,l,u)}}var _=l.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(n.callback=function(){rg(r,l,u),typeof p!="function"&&(Ui===null?Ui=new Set([this]):Ui.add(this));var x=u.stack;this.componentDidCatch(u.value,{componentStack:x!==null?x:""})})}function aE(n,r,l,u,p){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=l.alternate,r!==null&&Zr(r,l,p,!0),l=rn.current,l!==null){switch(l.tag){case 31:case 13:return bn===null?as():l.alternate===null&&ot===0&&(ot=3),l.flags&=-257,l.flags|=65536,l.lanes=p,u===Mo?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([u]):r.add(u),pf(n,u,p)),!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)),pf(n,u,p)),!1}throw Error(a(435,l.tag))}return pf(n,u,p),as(),!1}if(Ie)return r=rn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,u!==oc&&(n=Error(a(422),{cause:u}),tl(pn(n,l)))):(u!==oc&&(r=Error(a(423),{cause:u}),tl(pn(r,l))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,u=pn(u,l),p=jc(n.stateNode,u,p),bc(n,p),ot!==4&&(ot=2)),!1;var g=Error(a(520),{cause:u});if(g=pn(g,l),_l===null?_l=[g]:_l.push(g),ot!==4&&(ot=2),r===null)return!0;u=pn(u,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,n=p&-p,l.lanes|=n,n=jc(l.stateNode,u,n),bc(l,n),!1;case 1:if(r=l.type,g=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Ui===null||!Ui.has(g))))return l.flags|=65536,p&=-p,l.lanes|=p,p=ag(p),lg(p,n,l,u),bc(l,p),!1}l=l.return}while(l!==null);return!1}var Gc=Error(a(461)),ht=!1;function Ot(n,r,l,u){r.child=n===null?cm(r,null,l,u):yr(r,n.child,l,u)}function og(n,r,l,u,p){l=l.render;var g=r.ref;if("ref"in u){var _={};for(var x in u)x!=="ref"&&(_[x]=u[x])}else _=u;return hr(r),u=Cc(n,r,l,_,g,p),x=wc(),n!==null&&!ht?(kc(n,r,p),ui(n,r,p)):(Ie&&x&&ac(r),r.flags|=1,Ot(n,r,u,p),r.child)}function sg(n,r,l,u,p){if(n===null){var g=l.type;return typeof g=="function"&&!nc(g)&&g.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=g,ug(n,r,g,u,p)):(n=Ao(l.type,null,u,r,r.mode,p),n.ref=r.ref,n.return=r,r.child=n)}if(g=n.child,!Kc(n,p)){var _=g.memoizedProps;if(l=l.compare,l=l!==null?l:Wa,l(_,u)&&n.ref===r.ref)return ui(n,r,p)}return r.flags|=1,n=ii(g,u),n.ref=r.ref,n.return=r,r.child=n}function ug(n,r,l,u,p){if(n!==null){var g=n.memoizedProps;if(Wa(g,u)&&n.ref===r.ref)if(ht=!1,r.pendingProps=u=g,Kc(n,p))(n.flags&131072)!==0&&(ht=!0);else return r.lanes=n.lanes,ui(n,r,p)}return $c(n,r,l,u,p)}function cg(n,r,l,u){var p=u.children,g=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(g=g!==null?g.baseLanes|l:l,n!==null){for(u=r.child=n.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~g}else u=0,r.child=null;return fg(n,r,g,l,u)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&No(r,g!==null?g.cachePool:null),g!==null?hm(r,g):_c(),pm(r);else return u=r.lanes=536870912,fg(n,r,g!==null?g.baseLanes|l:l,l,u)}else g!==null?(No(r,g.cachePool),hm(r,g),Ii(),r.memoizedState=null):(n!==null&&No(r,null),_c(),Ii());return Ot(n,r,p,l),r.child}function hl(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function fg(n,r,l,u,p){var g=pc();return g=g===null?null:{parent:ft._currentValue,pool:g},r.memoizedState={baseLanes:l,cachePool:g},n!==null&&No(r,null),_c(),pm(r),n!==null&&Zr(n,r,u,!0),r.childLanes=p,null}function Xo(n,r){return r=Zo({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function dg(n,r,l){return yr(r,n.child,null,l),n=Xo(r,r.pendingProps),n.flags|=2,an(r),r.memoizedState=null,n}function lE(n,r,l){var u=r.pendingProps,p=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Ie){if(u.mode==="hidden")return n=Xo(r,u),r.lanes=536870912,hl(null,n);if(Ec(r),(n=tt)?(n=C0(n,yn),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Ti!==null?{id:Un,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},l=Qp(n),l.return=r,r.child=l,Dt=r,tt=null)):n=null,n===null)throw Li(r);return r.lanes=536870912,null}return Xo(r,u)}var g=n.memoizedState;if(g!==null){var _=g.dehydrated;if(Ec(r),p)if(r.flags&256)r.flags&=-257,r=dg(n,r,l);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(a(558));else if(ht||Zr(n,r,l,!1),p=(l&n.childLanes)!==0,ht||p){if(u=Ke,u!==null&&(_=np(u,l),_!==0&&_!==g.retryLane))throw g.retryLane=_,ur(n,_),Qt(u,n,_),Gc;as(),r=dg(n,r,l)}else n=g.treeContext,tt=vn(_.nextSibling),Dt=r,Ie=!0,Ai=null,yn=!1,n!==null&&Wp(r,n),r=Xo(r,u),r.flags|=4096;return r}return n=ii(n.child,{mode:u.mode,children:u.children}),n.ref=r.ref,r.child=n,n.return=r,n}function Qo(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 $c(n,r,l,u,p){return hr(r),l=Cc(n,r,l,u,void 0,p),u=wc(),n!==null&&!ht?(kc(n,r,p),ui(n,r,p)):(Ie&&u&&ac(r),r.flags|=1,Ot(n,r,l,p),r.child)}function hg(n,r,l,u,p,g){return hr(r),r.updateQueue=null,l=gm(r,u,l,p),mm(n),u=wc(),n!==null&&!ht?(kc(n,r,g),ui(n,r,g)):(Ie&&u&&ac(r),r.flags|=1,Ot(n,r,l,g),r.child)}function pg(n,r,l,u,p){if(hr(r),r.stateNode===null){var g=qr,_=l.contextType;typeof _=="object"&&_!==null&&(g=Nt(_)),g=new l(u,g),r.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Vc,r.stateNode=g,g._reactInternals=r,g=r.stateNode,g.props=u,g.state=r.memoizedState,g.refs={},gc(r),_=l.contextType,g.context=typeof _=="object"&&_!==null?Nt(_):qr,g.state=r.memoizedState,_=l.getDerivedStateFromProps,typeof _=="function"&&(Bc(r,l,_,u),g.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(_=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),_!==g.state&&Vc.enqueueReplaceState(g,g.state,null),sl(r,u,g,p),ol(),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(n===null){g=r.stateNode;var x=r.memoizedProps,N=vr(l,x);g.props=N;var j=g.context,Z=l.contextType;_=qr,typeof Z=="object"&&Z!==null&&(_=Nt(Z));var re=l.getDerivedStateFromProps;Z=typeof re=="function"||typeof g.getSnapshotBeforeUpdate=="function",x=r.pendingProps!==x,Z||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(x||j!==_)&&eg(r,g,u,_),Di=!1;var G=r.memoizedState;g.state=G,sl(r,u,g,p),ol(),j=r.memoizedState,x||G!==j||Di?(typeof re=="function"&&(Bc(r,l,re,u),j=r.memoizedState),(N=Di||Jm(r,l,N,u,G,j,_))?(Z||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(r.flags|=4194308)):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=j),g.props=u,g.state=j,g.context=_,u=N):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{g=r.stateNode,yc(n,r),_=r.memoizedProps,Z=vr(l,_),g.props=Z,re=r.pendingProps,G=g.context,j=l.contextType,N=qr,typeof j=="object"&&j!==null&&(N=Nt(j)),x=l.getDerivedStateFromProps,(j=typeof x=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(_!==re||G!==N)&&eg(r,g,u,N),Di=!1,G=r.memoizedState,g.state=G,sl(r,u,g,p),ol();var $=r.memoizedState;_!==re||G!==$||Di||n!==null&&n.dependencies!==null&&Ro(n.dependencies)?(typeof x=="function"&&(Bc(r,l,x,u),$=r.memoizedState),(Z=Di||Jm(r,l,Z,u,G,$,N)||n!==null&&n.dependencies!==null&&Ro(n.dependencies))?(j||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(u,$,N),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(u,$,N)),typeof g.componentDidUpdate=="function"&&(r.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof g.componentDidUpdate!="function"||_===n.memoizedProps&&G===n.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&G===n.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=$),g.props=u,g.state=$,g.context=N,u=Z):(typeof g.componentDidUpdate!="function"||_===n.memoizedProps&&G===n.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&G===n.memoizedState||(r.flags|=1024),u=!1)}return g=u,Qo(n,r),u=(r.flags&128)!==0,g||u?(g=r.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:g.render(),r.flags|=1,n!==null&&u?(r.child=yr(r,n.child,null,p),r.child=yr(r,null,l,p)):Ot(n,r,l,p),r.memoizedState=g.state,n=r.child):n=ui(n,r,p),n}function mg(n,r,l,u){return fr(),r.flags|=256,Ot(n,r,l,u),r.child}var Fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function qc(n){return{baseLanes:n,cachePool:rm()}}function Yc(n,r,l){return n=n!==null?n.childLanes&~l:0,r&&(n|=on),n}function gg(n,r,l){var u=r.pendingProps,p=!1,g=(r.flags&128)!==0,_;if((_=g)||(_=n!==null&&n.memoizedState===null?!1:(st.current&2)!==0),_&&(p=!0,r.flags&=-129),_=(r.flags&32)!==0,r.flags&=-33,n===null){if(Ie){if(p?Mi(r):Ii(),(n=tt)?(n=C0(n,yn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Ti!==null?{id:Un,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},l=Qp(n),l.return=r,r.child=l,Dt=r,tt=null)):n=null,n===null)throw Li(r);return Rf(n)?r.lanes=32:r.lanes=536870912,null}var x=u.children;return u=u.fallback,p?(Ii(),p=r.mode,x=Zo({mode:"hidden",children:x},p),u=cr(u,p,l,null),x.return=r,u.return=r,x.sibling=u,r.child=x,u=r.child,u.memoizedState=qc(l),u.childLanes=Yc(n,_,l),r.memoizedState=Fc,hl(null,u)):(Mi(r),Xc(r,x))}var N=n.memoizedState;if(N!==null&&(x=N.dehydrated,x!==null)){if(g)r.flags&256?(Mi(r),r.flags&=-257,r=Qc(n,r,l)):r.memoizedState!==null?(Ii(),r.child=n.child,r.flags|=128,r=null):(Ii(),x=u.fallback,p=r.mode,u=Zo({mode:"visible",children:u.children},p),x=cr(x,p,l,null),x.flags|=2,u.return=r,x.return=r,u.sibling=x,r.child=u,yr(r,n.child,null,l),u=r.child,u.memoizedState=qc(l),u.childLanes=Yc(n,_,l),r.memoizedState=Fc,r=hl(null,u));else if(Mi(r),Rf(x)){if(_=x.nextSibling&&x.nextSibling.dataset,_)var j=_.dgst;_=j,u=Error(a(419)),u.stack="",u.digest=_,tl({value:u,source:null,stack:null}),r=Qc(n,r,l)}else if(ht||Zr(n,r,l,!1),_=(l&n.childLanes)!==0,ht||_){if(_=Ke,_!==null&&(u=np(_,l),u!==0&&u!==N.retryLane))throw N.retryLane=u,ur(n,u),Qt(_,n,u),Gc;Lf(x)||as(),r=Qc(n,r,l)}else Lf(x)?(r.flags|=192,r.child=n.child,r=null):(n=N.treeContext,tt=vn(x.nextSibling),Dt=r,Ie=!0,Ai=null,yn=!1,n!==null&&Wp(r,n),r=Xc(r,u.children),r.flags|=4096);return r}return p?(Ii(),x=u.fallback,p=r.mode,N=n.child,j=N.sibling,u=ii(N,{mode:"hidden",children:u.children}),u.subtreeFlags=N.subtreeFlags&65011712,j!==null?x=ii(j,x):(x=cr(x,p,l,null),x.flags|=2),x.return=r,u.return=r,u.sibling=x,r.child=u,hl(null,u),u=r.child,x=n.child.memoizedState,x===null?x=qc(l):(p=x.cachePool,p!==null?(N=ft._currentValue,p=p.parent!==N?{parent:N,pool:N}:p):p=rm(),x={baseLanes:x.baseLanes|l,cachePool:p}),u.memoizedState=x,u.childLanes=Yc(n,_,l),r.memoizedState=Fc,hl(n.child,u)):(Mi(r),l=n.child,n=l.sibling,l=ii(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 Xc(n,r){return r=Zo({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function Zo(n,r){return n=nn(22,n,null,r),n.lanes=0,n}function Qc(n,r,l){return yr(r,n.child,null,l),n=Xc(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function yg(n,r,l){n.lanes|=r;var u=n.alternate;u!==null&&(u.lanes|=r),cc(n.return,r,l)}function Zc(n,r,l,u,p,g){var _=n.memoizedState;_===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:p,treeForkCount:g}:(_.isBackwards=r,_.rendering=null,_.renderingStartTime=0,_.last=u,_.tail=l,_.tailMode=p,_.treeForkCount=g)}function bg(n,r,l){var u=r.pendingProps,p=u.revealOrder,g=u.tail;u=u.children;var _=st.current,x=(_&2)!==0;if(x?(_=_&1|2,r.flags|=128):_&=1,A(st,_),Ot(n,r,u,l),u=Ie?el:0,!x&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&yg(n,l,r);else if(n.tag===19)yg(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(p){case"forwards":for(l=r.child,p=null;l!==null;)n=l.alternate,n!==null&&Po(n)===null&&(p=l),l=l.sibling;l=p,l===null?(p=r.child,r.child=null):(p=l.sibling,l.sibling=null),Zc(r,!1,p,l,g,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,p=r.child,r.child=null;p!==null;){if(n=p.alternate,n!==null&&Po(n)===null){r.child=p;break}n=p.sibling,p.sibling=l,l=p,p=n}Zc(r,!0,l,null,g,u);break;case"together":Zc(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function ui(n,r,l){if(n!==null&&(r.dependencies=n.dependencies),Pi|=r.lanes,(l&r.childLanes)===0)if(n!==null){if(Zr(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=ii(n,n.pendingProps),r.child=l,l.return=r;n.sibling!==null;)n=n.sibling,l=l.sibling=ii(n,n.pendingProps),l.return=r;l.sibling=null}return r.child}function Kc(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&Ro(n)))}function oE(n,r,l){switch(r.tag){case 3:ze(r,r.stateNode.containerInfo),Ri(r,ft,n.memoizedState.cache),fr();break;case 27:case 5:He(r);break;case 4:ze(r,r.stateNode.containerInfo);break;case 10:Ri(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Ec(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(Mi(r),r.flags|=128,null):(l&r.child.childLanes)!==0?gg(n,r,l):(Mi(r),n=ui(n,r,l),n!==null?n.sibling:null);Mi(r);break;case 19:var p=(n.flags&128)!==0;if(u=(l&r.childLanes)!==0,u||(Zr(n,r,l,!1),u=(l&r.childLanes)!==0),p){if(u)return bg(n,r,l);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),A(st,st.current),u)break;return null;case 22:return r.lanes=0,cg(n,r,l,r.pendingProps);case 24:Ri(r,ft,n.memoizedState.cache)}return ui(n,r,l)}function vg(n,r,l){if(n!==null)if(n.memoizedProps!==r.pendingProps)ht=!0;else{if(!Kc(n,l)&&(r.flags&128)===0)return ht=!1,oE(n,r,l);ht=(n.flags&131072)!==0}else ht=!1,Ie&&(r.flags&1048576)!==0&&Kp(r,el,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(n=mr(r.elementType),r.type=n,typeof n=="function")nc(n)?(u=vr(n,u),r.tag=1,r=pg(null,r,n,u,l)):(r.tag=0,r=$c(null,r,n,u,l));else{if(n!=null){var p=n.$$typeof;if(p===I){r.tag=11,r=og(null,r,n,u,l);break e}else if(p===U){r.tag=14,r=sg(null,r,n,u,l);break e}}throw r=K(n)||n,Error(a(306,r,""))}}return r;case 0:return $c(n,r,r.type,r.pendingProps,l);case 1:return u=r.type,p=vr(u,r.pendingProps),pg(n,r,u,p,l);case 3:e:{if(ze(r,r.stateNode.containerInfo),n===null)throw Error(a(387));u=r.pendingProps;var g=r.memoizedState;p=g.element,yc(n,r),sl(r,u,null,l);var _=r.memoizedState;if(u=_.cache,Ri(r,ft,u),u!==g.cache&&fc(r,[ft],l,!0),ol(),u=_.element,g.isDehydrated)if(g={element:u,isDehydrated:!1,cache:_.cache},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){r=mg(n,r,u,l);break e}else if(u!==p){p=pn(Error(a(424)),r),tl(p),r=mg(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,tt=vn(n.firstChild),Dt=r,Ie=!0,Ai=null,yn=!0,l=cm(r,null,u,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(fr(),u===p){r=ui(n,r,l);break e}Ot(n,r,u,l)}r=r.child}return r;case 26:return Qo(n,r),n===null?(l=R0(r.type,null,r.pendingProps,null))?r.memoizedState=l:Ie||(l=r.type,n=r.pendingProps,u=ds(he.current).createElement(l),u[Rt]=r,u[Gt]=n,Mt(u,l,n),Ct(u),r.stateNode=u):r.memoizedState=R0(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return He(r),n===null&&Ie&&(u=r.stateNode=T0(r.type,r.pendingProps,he.current),Dt=r,yn=!0,p=tt,Gi(r.type)?(Df=p,tt=vn(u.firstChild)):tt=p),Ot(n,r,r.pendingProps.children,l),Qo(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Ie&&((p=u=tt)&&(u=HE(u,r.type,r.pendingProps,yn),u!==null?(r.stateNode=u,Dt=r,tt=vn(u.firstChild),yn=!1,p=!0):p=!1),p||Li(r)),He(r),p=r.type,g=r.pendingProps,_=n!==null?n.memoizedProps:null,u=g.children,kf(p,g)?u=null:_!==null&&kf(p,_)&&(r.flags|=32),r.memoizedState!==null&&(p=Cc(n,r,WS,null,null,l),Al._currentValue=p),Qo(n,r),Ot(n,r,u,l),r.child;case 6:return n===null&&Ie&&((n=l=tt)&&(l=PE(l,r.pendingProps,yn),l!==null?(r.stateNode=l,Dt=r,tt=null,n=!0):n=!1),n||Li(r)),null;case 13:return gg(n,r,l);case 4:return ze(r,r.stateNode.containerInfo),u=r.pendingProps,n===null?r.child=yr(r,null,u,l):Ot(n,r,u,l),r.child;case 11:return og(n,r,r.type,r.pendingProps,l);case 7:return Ot(n,r,r.pendingProps,l),r.child;case 8:return Ot(n,r,r.pendingProps.children,l),r.child;case 12:return Ot(n,r,r.pendingProps.children,l),r.child;case 10:return u=r.pendingProps,Ri(r,r.type,u.value),Ot(n,r,u.children,l),r.child;case 9:return p=r.type._context,u=r.pendingProps.children,hr(r),p=Nt(p),u=u(p),r.flags|=1,Ot(n,r,u,l),r.child;case 14:return sg(n,r,r.type,r.pendingProps,l);case 15:return ug(n,r,r.type,r.pendingProps,l);case 19:return bg(n,r,l);case 31:return lE(n,r,l);case 22:return cg(n,r,l,r.pendingProps);case 24:return hr(r),u=Nt(ft),n===null?(p=pc(),p===null&&(p=Ke,g=dc(),p.pooledCache=g,g.refCount++,g!==null&&(p.pooledCacheLanes|=l),p=g),r.memoizedState={parent:u,cache:p},gc(r),Ri(r,ft,p)):((n.lanes&l)!==0&&(yc(n,r),sl(r,null,null,l),ol()),p=n.memoizedState,g=r.memoizedState,p.parent!==u?(p={parent:u,cache:u},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),Ri(r,ft,u)):(u=g.cache,Ri(r,ft,u),u!==p.cache&&fc(r,[ft],l,!0))),Ot(n,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function ci(n){n.flags|=4}function Wc(n,r,l,u,p){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(qg())n.flags|=8192;else throw gr=Mo,mc}else n.flags&=-16777217}function _g(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!I0(r))if(qg())n.flags|=8192;else throw gr=Mo,mc}function Ko(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?ye():536870912,n.lanes|=r,sa|=r)}function pl(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 nt(n){var r=n.alternate!==null&&n.alternate.child===n.child,l=0,u=0;if(r)for(var p=n.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=u,n.childLanes=l,r}function sE(n,r,l){var u=r.pendingProps;switch(lc(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nt(r),null;case 1:return nt(r),null;case 3:return l=r.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),li(ft),ge(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(n===null||n.child===null)&&(Qr(r)?ci(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,sc())),nt(r),null;case 26:var p=r.type,g=r.memoizedState;return n===null?(ci(r),g!==null?(nt(r),_g(r,g)):(nt(r),Wc(r,p,null,u,l))):g?g!==n.memoizedState?(ci(r),nt(r),_g(r,g)):(nt(r),r.flags&=-16777217):(n=n.memoizedProps,n!==u&&ci(r),nt(r),Wc(r,p,n,u,l)),null;case 27:if($e(r),l=he.current,p=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&ci(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return nt(r),null}n=ce.current,Qr(r)?Jp(r):(n=T0(p,u,l),r.stateNode=n,ci(r))}return nt(r),null;case 5:if($e(r),p=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&ci(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return nt(r),null}if(g=ce.current,Qr(r))Jp(r);else{var _=ds(he.current);switch(g){case 1:g=_.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:g=_.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":g=_.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":g=_.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":g=_.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof u.is=="string"?_.createElement("select",{is:u.is}):_.createElement("select"),u.multiple?g.multiple=!0:u.size&&(g.size=u.size);break;default:g=typeof u.is=="string"?_.createElement(p,{is:u.is}):_.createElement(p)}}g[Rt]=r,g[Gt]=u;e:for(_=r.child;_!==null;){if(_.tag===5||_.tag===6)g.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=g;e:switch(Mt(g,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&ci(r)}}return nt(r),Wc(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,l),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==u&&ci(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(n=he.current,Qr(r)){if(n=r.stateNode,l=r.memoizedProps,u=null,p=Dt,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}n[Rt]=r,n=!!(n.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||g0(n.nodeValue,l)),n||Li(r,!0)}else n=ds(n).createTextNode(u),n[Rt]=r,r.stateNode=n}return nt(r),null;case 31:if(l=r.memoizedState,n===null||n.memoizedState!==null){if(u=Qr(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[Rt]=r}else fr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;nt(r),n=!1}else l=sc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=l),n=!0;if(!n)return r.flags&256?(an(r),r):(an(r),null);if((r.flags&128)!==0)throw Error(a(558))}return nt(r),null;case 13:if(u=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=Qr(r),u!==null&&u.dehydrated!==null){if(n===null){if(!p)throw Error(a(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[Rt]=r}else fr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;nt(r),p=!1}else p=sc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?(an(r),r):(an(r),null)}return an(r),(r.flags&128)!==0?(r.lanes=l,r):(l=u!==null,n=n!==null&&n.memoizedState!==null,l&&(u=r.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),g=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),g!==p&&(u.flags|=2048)),l!==n&&l&&(r.child.flags|=8192),Ko(r,r.updateQueue),nt(r),null);case 4:return ge(),n===null&&Sf(r.stateNode.containerInfo),nt(r),null;case 10:return li(r.type),nt(r),null;case 19:if(X(st),u=r.memoizedState,u===null)return nt(r),null;if(p=(r.flags&128)!==0,g=u.rendering,g===null)if(p)pl(u,!1);else{if(ot!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(g=Po(n),g!==null){for(r.flags|=128,pl(u,!1),n=g.updateQueue,r.updateQueue=n,Ko(r,n),r.subtreeFlags=0,n=l,l=r.child;l!==null;)Xp(l,n),l=l.sibling;return A(st,st.current&1|2),Ie&&ri(r,u.treeForkCount),r.child}n=n.sibling}u.tail!==null&&Lt()>ns&&(r.flags|=128,p=!0,pl(u,!1),r.lanes=4194304)}else{if(!p)if(n=Po(g),n!==null){if(r.flags|=128,p=!0,n=n.updateQueue,r.updateQueue=n,Ko(r,n),pl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!g.alternate&&!Ie)return nt(r),null}else 2*Lt()-u.renderingStartTime>ns&&l!==536870912&&(r.flags|=128,p=!0,pl(u,!1),r.lanes=4194304);u.isBackwards?(g.sibling=r.child,r.child=g):(n=u.last,n!==null?n.sibling=g:r.child=g,u.last=g)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=Lt(),n.sibling=null,l=st.current,A(st,p?l&1|2:l&1),Ie&&ri(r,u.treeForkCount),n):(nt(r),null);case 22:case 23:return an(r),Sc(),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&&(nt(r),r.subtreeFlags&6&&(r.flags|=8192)):nt(r),l=r.updateQueue,l!==null&&Ko(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&&X(pr),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),li(ft),nt(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function uE(n,r){switch(lc(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return li(ft),ge(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return $e(r),null;case 31:if(r.memoizedState!==null){if(an(r),r.alternate===null)throw Error(a(340));fr()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(an(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));fr()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return X(st),null;case 4:return ge(),null;case 10:return li(r.type),null;case 22:case 23:return an(r),Sc(),n!==null&&X(pr),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return li(ft),null;case 25:return null;default:return null}}function Sg(n,r){switch(lc(r),r.tag){case 3:li(ft),ge();break;case 26:case 27:case 5:$e(r);break;case 4:ge();break;case 31:r.memoizedState!==null&&an(r);break;case 13:an(r);break;case 19:X(st);break;case 10:li(r.type);break;case 22:case 23:an(r),Sc(),n!==null&&X(pr);break;case 24:li(ft)}}function ml(n,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var p=u.next;l=p;do{if((l.tag&n)===n){u=void 0;var g=l.create,_=l.inst;u=g(),_.destroy=u}l=l.next}while(l!==p)}}catch(x){Ye(r,r.return,x)}}function zi(n,r,l){try{var u=r.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var g=p.next;u=g;do{if((u.tag&n)===n){var _=u.inst,x=_.destroy;if(x!==void 0){_.destroy=void 0,p=r;var N=l,j=x;try{j()}catch(Z){Ye(p,N,Z)}}}u=u.next}while(u!==g)}}catch(Z){Ye(r,r.return,Z)}}function Eg(n){var r=n.updateQueue;if(r!==null){var l=n.stateNode;try{dm(r,l)}catch(u){Ye(n,n.return,u)}}}function xg(n,r,l){l.props=vr(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(u){Ye(n,r,u)}}function gl(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(p){Ye(n,r,p)}}function Vn(n,r){var l=n.ref,u=n.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(p){Ye(n,r,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(p){Ye(n,r,p)}else l.current=null}function Cg(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(p){Ye(n,n.return,p)}}function Jc(n,r,l){try{var u=n.stateNode;DE(u,n.type,l,r),u[Gt]=r}catch(p){Ye(n,n.return,p)}}function wg(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Gi(n.type)||n.tag===4}function ef(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||wg(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&&Gi(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 tf(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=ti));else if(u!==4&&(u===27&&Gi(n.type)&&(l=n.stateNode,r=null),n=n.child,n!==null))for(tf(n,r,l),n=n.sibling;n!==null;)tf(n,r,l),n=n.sibling}function Wo(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&&Gi(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(Wo(n,r,l),n=n.sibling;n!==null;)Wo(n,r,l),n=n.sibling}function kg(n){var r=n.stateNode,l=n.memoizedProps;try{for(var u=n.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);Mt(r,u,l),r[Rt]=n,r[Gt]=l}catch(g){Ye(n,n.return,g)}}var fi=!1,pt=!1,nf=!1,Tg=typeof WeakSet=="function"?WeakSet:Set,wt=null;function cE(n,r){if(n=n.containerInfo,Cf=vs,n=Up(n),Qu(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 p=u.anchorOffset,g=u.focusNode;u=u.focusOffset;try{l.nodeType,g.nodeType}catch{l=null;break e}var _=0,x=-1,N=-1,j=0,Z=0,re=n,G=null;t:for(;;){for(var $;re!==l||p!==0&&re.nodeType!==3||(x=_+p),re!==g||u!==0&&re.nodeType!==3||(N=_+u),re.nodeType===3&&(_+=re.nodeValue.length),($=re.firstChild)!==null;)G=re,re=$;for(;;){if(re===n)break t;if(G===l&&++j===p&&(x=_),G===g&&++Z===u&&(N=_),($=re.nextSibling)!==null)break;re=G,G=re.parentNode}re=$}l=x===-1||N===-1?null:{start:x,end:N}}else l=null}l=l||{start:0,end:0}}else l=null;for(wf={focusedElem:n,selectionRange:l},vs=!1,wt=r;wt!==null;)if(r=wt,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,wt=n;else for(;wt!==null;){switch(r=wt,g=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++)p=n[l],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&g!==null){n=void 0,l=r,p=g.memoizedProps,g=g.memoizedState,u=l.stateNode;try{var fe=vr(l.type,p);n=u.getSnapshotBeforeUpdate(fe,g),u.__reactInternalSnapshotBeforeUpdate=n}catch(ve){Ye(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,wt=n;break}wt=r.return}}function Ag(n,r,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:hi(n,l),u&4&&ml(5,l);break;case 1:if(hi(n,l),u&4)if(n=l.stateNode,r===null)try{n.componentDidMount()}catch(_){Ye(l,l.return,_)}else{var p=vr(l.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(p,r,n.__reactInternalSnapshotBeforeUpdate)}catch(_){Ye(l,l.return,_)}}u&64&&Eg(l),u&512&&gl(l,l.return);break;case 3:if(hi(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{dm(n,r)}catch(_){Ye(l,l.return,_)}}break;case 27:r===null&&u&4&&kg(l);case 26:case 5:hi(n,l),r===null&&u&4&&Cg(l),u&512&&gl(l,l.return);break;case 12:hi(n,l);break;case 31:hi(n,l),u&4&&Dg(n,l);break;case 13:hi(n,l),u&4&&Ng(n,l),u&64&&(n=l.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(l=vE.bind(null,l),UE(n,l))));break;case 22:if(u=l.memoizedState!==null||fi,!u){r=r!==null&&r.memoizedState!==null||pt,p=fi;var g=pt;fi=u,(pt=r)&&!g?pi(n,l,(l.subtreeFlags&8772)!==0):hi(n,l),fi=p,pt=g}break;case 30:break;default:hi(n,l)}}function Lg(n){var r=n.alternate;r!==null&&(n.alternate=null,Lg(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&Nu(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 it=null,Ft=!1;function di(n,r,l){for(l=l.child;l!==null;)Rg(n,r,l),l=l.sibling}function Rg(n,r,l){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(xt,l)}catch{}switch(l.tag){case 26:pt||Vn(l,r),di(n,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:pt||Vn(l,r);var u=it,p=Ft;Gi(l.type)&&(it=l.stateNode,Ft=!1),di(n,r,l),wl(l.stateNode),it=u,Ft=p;break;case 5:pt||Vn(l,r);case 6:if(u=it,p=Ft,it=null,di(n,r,l),it=u,Ft=p,it!==null)if(Ft)try{(it.nodeType===9?it.body:it.nodeName==="HTML"?it.ownerDocument.body:it).removeChild(l.stateNode)}catch(g){Ye(l,r,g)}else try{it.removeChild(l.stateNode)}catch(g){Ye(l,r,g)}break;case 18:it!==null&&(Ft?(n=it,E0(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,l.stateNode),ga(n)):E0(it,l.stateNode));break;case 4:u=it,p=Ft,it=l.stateNode.containerInfo,Ft=!0,di(n,r,l),it=u,Ft=p;break;case 0:case 11:case 14:case 15:zi(2,l,r),pt||zi(4,l,r),di(n,r,l);break;case 1:pt||(Vn(l,r),u=l.stateNode,typeof u.componentWillUnmount=="function"&&xg(l,r,u)),di(n,r,l);break;case 21:di(n,r,l);break;case 22:pt=(u=pt)||l.memoizedState!==null,di(n,r,l),pt=u;break;default:di(n,r,l)}}function Dg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ga(n)}catch(l){Ye(r,r.return,l)}}}function Ng(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ga(n)}catch(l){Ye(r,r.return,l)}}function fE(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new Tg),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new Tg),r;default:throw Error(a(435,n.tag))}}function Jo(n,r){var l=fE(n);r.forEach(function(u){if(!l.has(u)){l.add(u);var p=_E.bind(null,n,u);u.then(p,p)}})}function qt(n,r){var l=r.deletions;if(l!==null)for(var u=0;u<l.length;u++){var p=l[u],g=n,_=r,x=_;e:for(;x!==null;){switch(x.tag){case 27:if(Gi(x.type)){it=x.stateNode,Ft=!1;break e}break;case 5:it=x.stateNode,Ft=!1;break e;case 3:case 4:it=x.stateNode.containerInfo,Ft=!0;break e}x=x.return}if(it===null)throw Error(a(160));Rg(g,_,p),it=null,Ft=!1,g=p.alternate,g!==null&&(g.return=null),p.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Og(r,n),r=r.sibling}var Ln=null;function Og(n,r){var l=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:qt(r,n),Yt(n),u&4&&(zi(3,n,n.return),ml(3,n),zi(5,n,n.return));break;case 1:qt(r,n),Yt(n),u&512&&(pt||l===null||Vn(l,l.return)),u&64&&fi&&(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 p=Ln;if(qt(r,n),Yt(n),u&512&&(pt||l===null||Vn(l,l.return)),u&4){var g=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,p=p.ownerDocument||p;t:switch(u){case"title":g=p.getElementsByTagName("title")[0],(!g||g[Ga]||g[Rt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=p.createElement(u),p.head.insertBefore(g,p.querySelector("head > title"))),Mt(g,u,l),g[Rt]=n,Ct(g),u=g;break e;case"link":var _=O0("link","href",p).get(u+(l.href||""));if(_){for(var x=0;x<_.length;x++)if(g=_[x],g.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&g.getAttribute("rel")===(l.rel==null?null:l.rel)&&g.getAttribute("title")===(l.title==null?null:l.title)&&g.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){_.splice(x,1);break t}}g=p.createElement(u),Mt(g,u,l),p.head.appendChild(g);break;case"meta":if(_=O0("meta","content",p).get(u+(l.content||""))){for(x=0;x<_.length;x++)if(g=_[x],g.getAttribute("content")===(l.content==null?null:""+l.content)&&g.getAttribute("name")===(l.name==null?null:l.name)&&g.getAttribute("property")===(l.property==null?null:l.property)&&g.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&g.getAttribute("charset")===(l.charSet==null?null:l.charSet)){_.splice(x,1);break t}}g=p.createElement(u),Mt(g,u,l),p.head.appendChild(g);break;default:throw Error(a(468,u))}g[Rt]=n,Ct(g),u=g}n.stateNode=u}else M0(p,n.type,n.stateNode);else n.stateNode=N0(p,u,n.memoizedProps);else g!==u?(g===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):g.count--,u===null?M0(p,n.type,n.stateNode):N0(p,u,n.memoizedProps)):u===null&&n.stateNode!==null&&Jc(n,n.memoizedProps,l.memoizedProps)}break;case 27:qt(r,n),Yt(n),u&512&&(pt||l===null||Vn(l,l.return)),l!==null&&u&4&&Jc(n,n.memoizedProps,l.memoizedProps);break;case 5:if(qt(r,n),Yt(n),u&512&&(pt||l===null||Vn(l,l.return)),n.flags&32){p=n.stateNode;try{Ur(p,"")}catch(fe){Ye(n,n.return,fe)}}u&4&&n.stateNode!=null&&(p=n.memoizedProps,Jc(n,p,l!==null?l.memoizedProps:p)),u&1024&&(nf=!0);break;case 6:if(qt(r,n),Yt(n),u&4){if(n.stateNode===null)throw Error(a(162));u=n.memoizedProps,l=n.stateNode;try{l.nodeValue=u}catch(fe){Ye(n,n.return,fe)}}break;case 3:if(ms=null,p=Ln,Ln=hs(r.containerInfo),qt(r,n),Ln=p,Yt(n),u&4&&l!==null&&l.memoizedState.isDehydrated)try{ga(r.containerInfo)}catch(fe){Ye(n,n.return,fe)}nf&&(nf=!1,Mg(n));break;case 4:u=Ln,Ln=hs(n.stateNode.containerInfo),qt(r,n),Yt(n),Ln=u;break;case 12:qt(r,n),Yt(n);break;case 31:qt(r,n),Yt(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Jo(n,u)));break;case 13:qt(r,n),Yt(n),n.child.flags&8192&&n.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(ts=Lt()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Jo(n,u)));break;case 22:p=n.memoizedState!==null;var N=l!==null&&l.memoizedState!==null,j=fi,Z=pt;if(fi=j||p,pt=Z||N,qt(r,n),pt=Z,fi=j,Yt(n),u&8192)e:for(r=n.stateNode,r._visibility=p?r._visibility&-2:r._visibility|1,p&&(l===null||N||fi||pt||_r(n)),l=null,r=n;;){if(r.tag===5||r.tag===26){if(l===null){N=l=r;try{if(g=N.stateNode,p)_=g.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{x=N.stateNode;var re=N.memoizedProps.style,G=re!=null&&re.hasOwnProperty("display")?re.display:null;x.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(fe){Ye(N,N.return,fe)}}}else if(r.tag===6){if(l===null){N=r;try{N.stateNode.nodeValue=p?"":N.memoizedProps}catch(fe){Ye(N,N.return,fe)}}}else if(r.tag===18){if(l===null){N=r;try{var $=N.stateNode;p?x0($,!0):x0(N.stateNode,!1)}catch(fe){Ye(N,N.return,fe)}}}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,Jo(n,l))));break;case 19:qt(r,n),Yt(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Jo(n,u)));break;case 30:break;case 21:break;default:qt(r,n),Yt(n)}}function Yt(n){var r=n.flags;if(r&2){try{for(var l,u=n.return;u!==null;){if(wg(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var p=l.stateNode,g=ef(n);Wo(n,g,p);break;case 5:var _=l.stateNode;l.flags&32&&(Ur(_,""),l.flags&=-33);var x=ef(n);Wo(n,x,_);break;case 3:case 4:var N=l.stateNode.containerInfo,j=ef(n);tf(n,j,N);break;default:throw Error(a(161))}}catch(Z){Ye(n,n.return,Z)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function Mg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;Mg(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function hi(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Ag(n,r.alternate,r),r=r.sibling}function _r(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:zi(4,r,r.return),_r(r);break;case 1:Vn(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&xg(r,r.return,l),_r(r);break;case 27:wl(r.stateNode);case 26:case 5:Vn(r,r.return),_r(r);break;case 22:r.memoizedState===null&&_r(r);break;case 30:_r(r);break;default:_r(r)}n=n.sibling}}function pi(n,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,p=n,g=r,_=g.flags;switch(g.tag){case 0:case 11:case 15:pi(p,g,l),ml(4,g);break;case 1:if(pi(p,g,l),u=g,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(j){Ye(u,u.return,j)}if(u=g,p=u.updateQueue,p!==null){var x=u.stateNode;try{var N=p.shared.hiddenCallbacks;if(N!==null)for(p.shared.hiddenCallbacks=null,p=0;p<N.length;p++)fm(N[p],x)}catch(j){Ye(u,u.return,j)}}l&&_&64&&Eg(g),gl(g,g.return);break;case 27:kg(g);case 26:case 5:pi(p,g,l),l&&u===null&&_&4&&Cg(g),gl(g,g.return);break;case 12:pi(p,g,l);break;case 31:pi(p,g,l),l&&_&4&&Dg(p,g);break;case 13:pi(p,g,l),l&&_&4&&Ng(p,g);break;case 22:g.memoizedState===null&&pi(p,g,l),gl(g,g.return);break;case 30:break;default:pi(p,g,l)}r=r.sibling}}function rf(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&&nl(l))}function af(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&nl(n))}function Rn(n,r,l,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Ig(n,r,l,u),r=r.sibling}function Ig(n,r,l,u){var p=r.flags;switch(r.tag){case 0:case 11:case 15:Rn(n,r,l,u),p&2048&&ml(9,r);break;case 1:Rn(n,r,l,u);break;case 3:Rn(n,r,l,u),p&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&nl(n)));break;case 12:if(p&2048){Rn(n,r,l,u),n=r.stateNode;try{var g=r.memoizedProps,_=g.id,x=g.onPostCommit;typeof x=="function"&&x(_,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(N){Ye(r,r.return,N)}}else Rn(n,r,l,u);break;case 31:Rn(n,r,l,u);break;case 13:Rn(n,r,l,u);break;case 23:break;case 22:g=r.stateNode,_=r.alternate,r.memoizedState!==null?g._visibility&2?Rn(n,r,l,u):yl(n,r):g._visibility&2?Rn(n,r,l,u):(g._visibility|=2,aa(n,r,l,u,(r.subtreeFlags&10256)!==0||!1)),p&2048&&rf(_,r);break;case 24:Rn(n,r,l,u),p&2048&&af(r.alternate,r);break;default:Rn(n,r,l,u)}}function aa(n,r,l,u,p){for(p=p&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var g=n,_=r,x=l,N=u,j=_.flags;switch(_.tag){case 0:case 11:case 15:aa(g,_,x,N,p),ml(8,_);break;case 23:break;case 22:var Z=_.stateNode;_.memoizedState!==null?Z._visibility&2?aa(g,_,x,N,p):yl(g,_):(Z._visibility|=2,aa(g,_,x,N,p)),p&&j&2048&&rf(_.alternate,_);break;case 24:aa(g,_,x,N,p),p&&j&2048&&af(_.alternate,_);break;default:aa(g,_,x,N,p)}r=r.sibling}}function yl(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=n,u=r,p=u.flags;switch(u.tag){case 22:yl(l,u),p&2048&&rf(u.alternate,u);break;case 24:yl(l,u),p&2048&&af(u.alternate,u);break;default:yl(l,u)}r=r.sibling}}var bl=8192;function la(n,r,l){if(n.subtreeFlags&bl)for(n=n.child;n!==null;)zg(n,r,l),n=n.sibling}function zg(n,r,l){switch(n.tag){case 26:la(n,r,l),n.flags&bl&&n.memoizedState!==null&&KE(l,Ln,n.memoizedState,n.memoizedProps);break;case 5:la(n,r,l);break;case 3:case 4:var u=Ln;Ln=hs(n.stateNode.containerInfo),la(n,r,l),Ln=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=bl,bl=16777216,la(n,r,l),bl=u):la(n,r,l));break;default:la(n,r,l)}}function Hg(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 vl(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];wt=u,Ug(u,n)}Hg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Pg(n),n=n.sibling}function Pg(n){switch(n.tag){case 0:case 11:case 15:vl(n),n.flags&2048&&zi(9,n,n.return);break;case 3:vl(n);break;case 12:vl(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,es(n)):vl(n);break;default:vl(n)}}function es(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];wt=u,Ug(u,n)}Hg(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:zi(8,r,r.return),es(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,es(r));break;default:es(r)}n=n.sibling}}function Ug(n,r){for(;wt!==null;){var l=wt;switch(l.tag){case 0:case 11:case 15:zi(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:nl(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,wt=u;else e:for(l=n;wt!==null;){u=wt;var p=u.sibling,g=u.return;if(Lg(u),u===l){wt=null;break e}if(p!==null){p.return=g,wt=p;break e}wt=g}}}var dE={getCacheForType:function(n){var r=Nt(ft),l=r.data.get(n);return l===void 0&&(l=n(),r.data.set(n,l)),l},cacheSignal:function(){return Nt(ft).controller.signal}},hE=typeof WeakMap=="function"?WeakMap:Map,Ve=0,Ke=null,De=null,Oe=0,qe=0,ln=null,Hi=!1,oa=!1,lf=!1,mi=0,ot=0,Pi=0,Sr=0,of=0,on=0,sa=0,_l=null,Xt=null,sf=!1,ts=0,Bg=0,ns=1/0,is=null,Ui=null,yt=0,Bi=null,ua=null,gi=0,uf=0,cf=null,Vg=null,Sl=0,ff=null;function sn(){return(Ve&2)!==0&&Oe!==0?Oe&-Oe:H.T!==null?yf():ip()}function jg(){if(on===0)if((Oe&536870912)===0||Ie){var n=Kn;Kn<<=1,(Kn&3932160)===0&&(Kn=262144),on=n}else on=536870912;return n=rn.current,n!==null&&(n.flags|=32),on}function Qt(n,r,l){(n===Ke&&(qe===2||qe===9)||n.cancelPendingCommit!==null)&&(ca(n,0),Vi(n,Oe,on,!1)),Fe(n,l),((Ve&2)===0||n!==Ke)&&(n===Ke&&((Ve&2)===0&&(Sr|=l),ot===4&&Vi(n,Oe,on,!1)),jn(n))}function Gg(n,r,l){if((Ve&6)!==0)throw Error(a(327));var u=!l&&(r&127)===0&&(r&n.expiredLanes)===0||rr(n,r),p=u?gE(n,r):hf(n,r,!0),g=u;do{if(p===0){oa&&!u&&Vi(n,r,0,!1);break}else{if(l=n.current.alternate,g&&!pE(l)){p=hf(n,r,!1),g=!1;continue}if(p===2){if(g=r,n.errorRecoveryDisabledLanes&g)var _=0;else _=n.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){r=_;e:{var x=n;p=_l;var N=x.current.memoizedState.isDehydrated;if(N&&(ca(x,_).flags|=256),_=hf(x,_,!1),_!==2){if(lf&&!N){x.errorRecoveryDisabledLanes|=g,Sr|=g,p=4;break e}g=Xt,Xt=p,g!==null&&(Xt===null?Xt=g:Xt.push.apply(Xt,g))}p=_}if(g=!1,p!==2)continue}}if(p===1){ca(n,0),Vi(n,r,0,!0);break}e:{switch(u=n,g=p,g){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Vi(u,r,on,!Hi);break e;case 2:Xt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(p=ts+300-Lt(),10<p)){if(Vi(u,r,on,!Hi),Nr(u,0,!0)!==0)break e;gi=r,u.timeoutHandle=_0($g.bind(null,u,l,Xt,is,sf,r,on,Sr,sa,Hi,g,"Throttled",-0,0),p);break e}$g(u,l,Xt,is,sf,r,on,Sr,sa,Hi,g,null,-0,0)}}break}while(!0);jn(n)}function $g(n,r,l,u,p,g,_,x,N,j,Z,re,G,$){if(n.timeoutHandle=-1,re=r.subtreeFlags,re&8192||(re&16785408)===16785408){re={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ti},zg(r,g,re);var fe=(g&62914560)===g?ts-Lt():(g&4194048)===g?Bg-Lt():0;if(fe=WE(re,fe),fe!==null){gi=g,n.cancelPendingCommit=fe(Wg.bind(null,n,r,g,l,u,p,_,x,N,Z,re,null,G,$)),Vi(n,g,_,!j);return}}Wg(n,r,g,l,u,p,_,x,N)}function pE(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 p=l[u],g=p.getSnapshot;p=p.value;try{if(!tn(g(),p))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 Vi(n,r,l,u){r&=~of,r&=~Sr,n.suspendedLanes|=r,n.pingedLanes&=~r,u&&(n.warmLanes|=r),u=n.expirationTimes;for(var p=r;0<p;){var g=31-Ge(p),_=1<<g;u[g]=-1,p&=~_}l!==0&&Jn(n,l,r)}function rs(){return(Ve&6)===0?(El(0),!1):!0}function df(){if(De!==null){if(qe===0)var n=De.return;else n=De,ai=dr=null,Tc(n),ea=null,rl=0,n=De;for(;n!==null;)Sg(n.alternate,n),n=n.return;De=null}}function ca(n,r){var l=n.timeoutHandle;l!==-1&&(n.timeoutHandle=-1,ME(l)),l=n.cancelPendingCommit,l!==null&&(n.cancelPendingCommit=null,l()),gi=0,df(),Ke=n,De=l=ii(n.current,null),Oe=r,qe=0,ln=null,Hi=!1,oa=rr(n,r),lf=!1,sa=on=of=Sr=Pi=ot=0,Xt=_l=null,sf=!1,(r&8)!==0&&(r|=r&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=r;0<u;){var p=31-Ge(u),g=1<<p;r|=n[p],u&=~g}return mi=r,wo(),l}function Fg(n,r){ke=null,H.H=dl,r===Jr||r===Oo?(r=om(),qe=3):r===mc?(r=om(),qe=4):qe=r===Gc?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,ln=r,De===null&&(ot=1,Yo(n,pn(r,n.current)))}function qg(){var n=rn.current;return n===null?!0:(Oe&4194048)===Oe?bn===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?n===bn:!1}function Yg(){var n=H.H;return H.H=dl,n===null?dl:n}function Xg(){var n=H.A;return H.A=dE,n}function as(){ot=4,Hi||(Oe&4194048)!==Oe&&rn.current!==null||(oa=!0),(Pi&134217727)===0&&(Sr&134217727)===0||Ke===null||Vi(Ke,Oe,on,!1)}function hf(n,r,l){var u=Ve;Ve|=2;var p=Yg(),g=Xg();(Ke!==n||Oe!==r)&&(is=null,ca(n,r)),r=!1;var _=ot;e:do try{if(qe!==0&&De!==null){var x=De,N=ln;switch(qe){case 8:df(),_=6;break e;case 3:case 2:case 9:case 6:rn.current===null&&(r=!0);var j=qe;if(qe=0,ln=null,fa(n,x,N,j),l&&oa){_=0;break e}break;default:j=qe,qe=0,ln=null,fa(n,x,N,j)}}mE(),_=ot;break}catch(Z){Fg(n,Z)}while(!0);return r&&n.shellSuspendCounter++,ai=dr=null,Ve=u,H.H=p,H.A=g,De===null&&(Ke=null,Oe=0,wo()),_}function mE(){for(;De!==null;)Qg(De)}function gE(n,r){var l=Ve;Ve|=2;var u=Yg(),p=Xg();Ke!==n||Oe!==r?(is=null,ns=Lt()+500,ca(n,r)):oa=rr(n,r);e:do try{if(qe!==0&&De!==null){r=De;var g=ln;t:switch(qe){case 1:qe=0,ln=null,fa(n,r,g,1);break;case 2:case 9:if(am(g)){qe=0,ln=null,Zg(r);break}r=function(){qe!==2&&qe!==9||Ke!==n||(qe=7),jn(n)},g.then(r,r);break e;case 3:qe=7;break e;case 4:qe=5;break e;case 7:am(g)?(qe=0,ln=null,Zg(r)):(qe=0,ln=null,fa(n,r,g,7));break;case 5:var _=null;switch(De.tag){case 26:_=De.memoizedState;case 5:case 27:var x=De;if(_?I0(_):x.stateNode.complete){qe=0,ln=null;var N=x.sibling;if(N!==null)De=N;else{var j=x.return;j!==null?(De=j,ls(j)):De=null}break t}}qe=0,ln=null,fa(n,r,g,5);break;case 6:qe=0,ln=null,fa(n,r,g,6);break;case 8:df(),ot=6;break e;default:throw Error(a(462))}}yE();break}catch(Z){Fg(n,Z)}while(!0);return ai=dr=null,H.H=u,H.A=p,Ve=l,De!==null?0:(Ke=null,Oe=0,wo(),ot)}function yE(){for(;De!==null&&!Va();)Qg(De)}function Qg(n){var r=vg(n.alternate,n,mi);n.memoizedProps=n.pendingProps,r===null?ls(n):De=r}function Zg(n){var r=n,l=r.alternate;switch(r.tag){case 15:case 0:r=hg(l,r,r.pendingProps,r.type,void 0,Oe);break;case 11:r=hg(l,r,r.pendingProps,r.type.render,r.ref,Oe);break;case 5:Tc(r);default:Sg(l,r),r=De=Xp(r,mi),r=vg(l,r,mi)}n.memoizedProps=n.pendingProps,r===null?ls(n):De=r}function fa(n,r,l,u){ai=dr=null,Tc(r),ea=null,rl=0;var p=r.return;try{if(aE(n,p,r,l,Oe)){ot=1,Yo(n,pn(l,n.current)),De=null;return}}catch(g){if(p!==null)throw De=p,g;ot=1,Yo(n,pn(l,n.current)),De=null;return}r.flags&32768?(Ie||u===1?n=!0:oa||(Oe&536870912)!==0?n=!1:(Hi=n=!0,(u===2||u===9||u===3||u===6)&&(u=rn.current,u!==null&&u.tag===13&&(u.flags|=16384))),Kg(r,n)):ls(r)}function ls(n){var r=n;do{if((r.flags&32768)!==0){Kg(r,Hi);return}n=r.return;var l=sE(r.alternate,r,mi);if(l!==null){De=l;return}if(r=r.sibling,r!==null){De=r;return}De=r=n}while(r!==null);ot===0&&(ot=5)}function Kg(n,r){do{var l=uE(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);ot=6,De=null}function Wg(n,r,l,u,p,g,_,x,N){n.cancelPendingCommit=null;do os();while(yt!==0);if((Ve&6)!==0)throw Error(a(327));if(r!==null){if(r===n.current)throw Error(a(177));if(g=r.lanes|r.childLanes,g|=ec,Pn(n,l,g,_,x,N),n===Ke&&(De=Ke=null,Oe=0),ua=r,Bi=n,gi=l,uf=g,cf=p,Vg=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,SE(_e,function(){return i0(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=H.T,H.T=null,p=q.p,q.p=2,_=Ve,Ve|=4;try{cE(n,r,l)}finally{Ve=_,q.p=p,H.T=u}}yt=1,Jg(),e0(),t0()}}function Jg(){if(yt===1){yt=0;var n=Bi,r=ua,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=H.T,H.T=null;var u=q.p;q.p=2;var p=Ve;Ve|=4;try{Og(r,n);var g=wf,_=Up(n.containerInfo),x=g.focusedElem,N=g.selectionRange;if(_!==x&&x&&x.ownerDocument&&Pp(x.ownerDocument.documentElement,x)){if(N!==null&&Qu(x)){var j=N.start,Z=N.end;if(Z===void 0&&(Z=j),"selectionStart"in x)x.selectionStart=j,x.selectionEnd=Math.min(Z,x.value.length);else{var re=x.ownerDocument||document,G=re&&re.defaultView||window;if(G.getSelection){var $=G.getSelection(),fe=x.textContent.length,ve=Math.min(N.start,fe),Ze=N.end===void 0?ve:Math.min(N.end,fe);!$.extend&&ve>Ze&&(_=Ze,Ze=ve,ve=_);var P=Hp(x,ve),M=Hp(x,Ze);if(P&&M&&($.rangeCount!==1||$.anchorNode!==P.node||$.anchorOffset!==P.offset||$.focusNode!==M.node||$.focusOffset!==M.offset)){var V=re.createRange();V.setStart(P.node,P.offset),$.removeAllRanges(),ve>Ze?($.addRange(V),$.extend(M.node,M.offset)):(V.setEnd(M.node,M.offset),$.addRange(V))}}}}for(re=[],$=x;$=$.parentNode;)$.nodeType===1&&re.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<re.length;x++){var ee=re[x];ee.element.scrollLeft=ee.left,ee.element.scrollTop=ee.top}}vs=!!Cf,wf=Cf=null}finally{Ve=p,q.p=u,H.T=l}}n.current=r,yt=2}}function e0(){if(yt===2){yt=0;var n=Bi,r=ua,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=H.T,H.T=null;var u=q.p;q.p=2;var p=Ve;Ve|=4;try{Ag(n,r.alternate,r)}finally{Ve=p,q.p=u,H.T=l}}yt=3}}function t0(){if(yt===4||yt===3){yt=0,ja();var n=Bi,r=ua,l=gi,u=Vg;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?yt=5:(yt=0,ua=Bi=null,n0(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(Ui=null),Ru(l),r=r.stateNode,at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(xt,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=H.T,p=q.p,q.p=2,H.T=null;try{for(var g=n.onRecoverableError,_=0;_<u.length;_++){var x=u[_];g(x.value,{componentStack:x.stack})}}finally{H.T=r,q.p=p}}(gi&3)!==0&&os(),jn(n),p=n.pendingLanes,(l&261930)!==0&&(p&42)!==0?n===ff?Sl++:(Sl=0,ff=n):Sl=0,El(0)}}function n0(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,nl(r)))}function os(){return Jg(),e0(),t0(),i0()}function i0(){if(yt!==5)return!1;var n=Bi,r=uf;uf=0;var l=Ru(gi),u=H.T,p=q.p;try{q.p=32>l?32:l,H.T=null,l=cf,cf=null;var g=Bi,_=gi;if(yt=0,ua=Bi=null,gi=0,(Ve&6)!==0)throw Error(a(331));var x=Ve;if(Ve|=4,Pg(g.current),Ig(g,g.current,_,l),Ve=x,El(0,!1),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(xt,g)}catch{}return!0}finally{q.p=p,H.T=u,n0(n,r)}}function r0(n,r,l){r=pn(l,r),r=jc(n.stateNode,r,2),n=Oi(n,r,2),n!==null&&(Fe(n,2),jn(n))}function Ye(n,r,l){if(n.tag===3)r0(n,n,l);else for(;r!==null;){if(r.tag===3){r0(r,n,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Ui===null||!Ui.has(u))){n=pn(l,n),l=ag(2),u=Oi(r,l,2),u!==null&&(lg(l,u,r,n),Fe(u,2),jn(u));break}}r=r.return}}function pf(n,r,l){var u=n.pingCache;if(u===null){u=n.pingCache=new hE;var p=new Set;u.set(r,p)}else p=u.get(r),p===void 0&&(p=new Set,u.set(r,p));p.has(l)||(lf=!0,p.add(l),n=bE.bind(null,n,r,l),r.then(n,n))}function bE(n,r,l){var u=n.pingCache;u!==null&&u.delete(r),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,Ke===n&&(Oe&l)===l&&(ot===4||ot===3&&(Oe&62914560)===Oe&&300>Lt()-ts?(Ve&2)===0&&ca(n,0):of|=l,sa===Oe&&(sa=0)),jn(n)}function a0(n,r){r===0&&(r=ye()),n=ur(n,r),n!==null&&(Fe(n,r),jn(n))}function vE(n){var r=n.memoizedState,l=0;r!==null&&(l=r.retryLane),a0(n,l)}function _E(n,r){var l=0;switch(n.tag){case 31:case 13:var u=n.stateNode,p=n.memoizedState;p!==null&&(l=p.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(r),a0(n,l)}function SE(n,r){return Ci(n,r)}var ss=null,da=null,mf=!1,us=!1,gf=!1,ji=0;function jn(n){n!==da&&n.next===null&&(da===null?ss=da=n:da=da.next=n),us=!0,mf||(mf=!0,xE())}function El(n,r){if(!gf&&us){gf=!0;do for(var l=!1,u=ss;u!==null;){if(n!==0){var p=u.pendingLanes;if(p===0)var g=0;else{var _=u.suspendedLanes,x=u.pingedLanes;g=(1<<31-Ge(42|n)+1)-1,g&=p&~(_&~x),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(l=!0,u0(u,g))}else g=Oe,g=Nr(u,u===Ke?g:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(g&3)===0||rr(u,g)||(l=!0,u0(u,g));u=u.next}while(l);gf=!1}}function EE(){l0()}function l0(){us=mf=!1;var n=0;ji!==0&&OE()&&(n=ji);for(var r=Lt(),l=null,u=ss;u!==null;){var p=u.next,g=o0(u,r);g===0?(u.next=null,l===null?ss=p:l.next=p,p===null&&(da=l)):(l=u,(n!==0||(g&3)!==0)&&(us=!0)),u=p}yt!==0&&yt!==5||El(n),ji!==0&&(ji=0)}function o0(n,r){for(var l=n.suspendedLanes,u=n.pingedLanes,p=n.expirationTimes,g=n.pendingLanes&-62914561;0<g;){var _=31-Ge(g),x=1<<_,N=p[_];N===-1?((x&l)===0||(x&u)!==0)&&(p[_]=le(x,r)):N<=r&&(n.expiredLanes|=x),g&=~x}if(r=Ke,l=Oe,l=Nr(n,n===r?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,l===0||n===r&&(qe===2||qe===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&ir(u),n.callbackNode=null,n.callbackPriority=0;if((l&3)===0||rr(n,l)){if(r=l&-l,r===n.callbackPriority)return r;switch(u!==null&&ir(u),Ru(l)){case 2:case 8:l=ue;break;case 32:l=_e;break;case 268435456:l=Pe;break;default:l=_e}return u=s0.bind(null,n),l=Ci(l,u),n.callbackPriority=r,n.callbackNode=l,r}return u!==null&&u!==null&&ir(u),n.callbackPriority=2,n.callbackNode=null,2}function s0(n,r){if(yt!==0&&yt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var l=n.callbackNode;if(os()&&n.callbackNode!==l)return null;var u=Oe;return u=Nr(n,n===Ke?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(Gg(n,u,r),o0(n,Lt()),n.callbackNode!=null&&n.callbackNode===l?s0.bind(null,n):null)}function u0(n,r){if(os())return null;Gg(n,r,!0)}function xE(){IE(function(){(Ve&6)!==0?Ci(Q,EE):l0()})}function yf(){if(ji===0){var n=Kr;n===0&&(n=Rr,Rr<<=1,(Rr&261888)===0&&(Rr=256)),ji=n}return ji}function c0(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:yo(""+n)}function f0(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 CE(n,r,l,u,p){if(r==="submit"&&l&&l.stateNode===p){var g=c0((p[Gt]||null).action),_=u.submitter;_&&(r=(r=_[Gt]||null)?c0(r.formAction):_.getAttribute("formAction"),r!==null&&(g=r,_=null));var x=new So("action","action",null,u,p);n.push({event:x,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ji!==0){var N=_?f0(p,_):new FormData(p);zc(l,{pending:!0,data:N,method:p.method,action:g},null,N)}}else typeof g=="function"&&(x.preventDefault(),N=_?f0(p,_):new FormData(p),zc(l,{pending:!0,data:N,method:p.method,action:g},g,N))},currentTarget:p}]})}}for(var bf=0;bf<Ju.length;bf++){var vf=Ju[bf],wE=vf.toLowerCase(),kE=vf[0].toUpperCase()+vf.slice(1);An(wE,"on"+kE)}An(jp,"onAnimationEnd"),An(Gp,"onAnimationIteration"),An($p,"onAnimationStart"),An("dblclick","onDoubleClick"),An("focusin","onFocus"),An("focusout","onBlur"),An(jS,"onTransitionRun"),An(GS,"onTransitionStart"),An($S,"onTransitionCancel"),An(Fp,"onTransitionEnd"),Hr("onMouseEnter",["mouseout","mouseover"]),Hr("onMouseLeave",["mouseout","mouseover"]),Hr("onPointerEnter",["pointerout","pointerover"]),Hr("onPointerLeave",["pointerout","pointerover"]),ar("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ar("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ar("onBeforeInput",["compositionend","keypress","textInput","paste"]),ar("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ar("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ar("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xl="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(" "),TE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xl));function d0(n,r){r=(r&4)!==0;for(var l=0;l<n.length;l++){var u=n[l],p=u.event;u=u.listeners;e:{var g=void 0;if(r)for(var _=u.length-1;0<=_;_--){var x=u[_],N=x.instance,j=x.currentTarget;if(x=x.listener,N!==g&&p.isPropagationStopped())break e;g=x,p.currentTarget=j;try{g(p)}catch(Z){Co(Z)}p.currentTarget=null,g=N}else for(_=0;_<u.length;_++){if(x=u[_],N=x.instance,j=x.currentTarget,x=x.listener,N!==g&&p.isPropagationStopped())break e;g=x,p.currentTarget=j;try{g(p)}catch(Z){Co(Z)}p.currentTarget=null,g=N}}}}function Ne(n,r){var l=r[Du];l===void 0&&(l=r[Du]=new Set);var u=n+"__bubble";l.has(u)||(h0(r,n,2,!1),l.add(u))}function _f(n,r,l){var u=0;r&&(u|=4),h0(l,n,u,r)}var cs="_reactListening"+Math.random().toString(36).slice(2);function Sf(n){if(!n[cs]){n[cs]=!0,lp.forEach(function(l){l!=="selectionchange"&&(TE.has(l)||_f(l,!1,n),_f(l,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[cs]||(r[cs]=!0,_f("selectionchange",!1,r))}}function h0(n,r,l,u){switch(j0(r)){case 2:var p=tx;break;case 8:p=nx;break;default:p=zf}l=p.bind(null,r,l,n),p=void 0,!Bu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),u?p!==void 0?n.addEventListener(r,l,{capture:!0,passive:p}):n.addEventListener(r,l,!0):p!==void 0?n.addEventListener(r,l,{passive:p}):n.addEventListener(r,l,!1)}function Ef(n,r,l,u,p){var g=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var _=u.tag;if(_===3||_===4){var x=u.stateNode.containerInfo;if(x===p)break;if(_===4)for(_=u.return;_!==null;){var N=_.tag;if((N===3||N===4)&&_.stateNode.containerInfo===p)return;_=_.return}for(;x!==null;){if(_=Mr(x),_===null)return;if(N=_.tag,N===5||N===6||N===26||N===27){u=g=_;continue e}x=x.parentNode}}u=u.return}bp(function(){var j=g,Z=Pu(l),re=[];e:{var G=qp.get(n);if(G!==void 0){var $=So,fe=n;switch(n){case"keypress":if(vo(l)===0)break e;case"keydown":case"keyup":$=_S;break;case"focusin":fe="focus",$=$u;break;case"focusout":fe="blur",$=$u;break;case"beforeblur":case"afterblur":$=$u;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":$=Sp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=sS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=xS;break;case jp:case Gp:case $p:$=fS;break;case Fp:$=wS;break;case"scroll":case"scrollend":$=lS;break;case"wheel":$=TS;break;case"copy":case"cut":case"paste":$=hS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=xp;break;case"toggle":case"beforetoggle":$=LS}var ve=(r&4)!==0,Ze=!ve&&(n==="scroll"||n==="scrollend"),P=ve?G!==null?G+"Capture":null:G;ve=[];for(var M=j,V;M!==null;){var ee=M;if(V=ee.stateNode,ee=ee.tag,ee!==5&&ee!==26&&ee!==27||V===null||P===null||(ee=Fa(M,P),ee!=null&&ve.push(Cl(M,ee,V))),Ze)break;M=M.return}0<ve.length&&(G=new $(G,fe,null,l,Z),re.push({event:G,listeners:ve}))}}if((r&7)===0){e:{if(G=n==="mouseover"||n==="pointerover",$=n==="mouseout"||n==="pointerout",G&&l!==Hu&&(fe=l.relatedTarget||l.fromElement)&&(Mr(fe)||fe[Or]))break e;if(($||G)&&(G=Z.window===Z?Z:(G=Z.ownerDocument)?G.defaultView||G.parentWindow:window,$?(fe=l.relatedTarget||l.toElement,$=j,fe=fe?Mr(fe):null,fe!==null&&(Ze=s(fe),ve=fe.tag,fe!==Ze||ve!==5&&ve!==27&&ve!==6)&&(fe=null)):($=null,fe=j),$!==fe)){if(ve=Sp,ee="onMouseLeave",P="onMouseEnter",M="mouse",(n==="pointerout"||n==="pointerover")&&(ve=xp,ee="onPointerLeave",P="onPointerEnter",M="pointer"),Ze=$==null?G:$a($),V=fe==null?G:$a(fe),G=new ve(ee,M+"leave",$,l,Z),G.target=Ze,G.relatedTarget=V,ee=null,Mr(Z)===j&&(ve=new ve(P,M+"enter",fe,l,Z),ve.target=V,ve.relatedTarget=Ze,ee=ve),Ze=ee,$&&fe)t:{for(ve=AE,P=$,M=fe,V=0,ee=P;ee;ee=ve(ee))V++;ee=0;for(var be=M;be;be=ve(be))ee++;for(;0<V-ee;)P=ve(P),V--;for(;0<ee-V;)M=ve(M),ee--;for(;V--;){if(P===M||M!==null&&P===M.alternate){ve=P;break t}P=ve(P),M=ve(M)}ve=null}else ve=null;$!==null&&p0(re,G,$,ve,!1),fe!==null&&Ze!==null&&p0(re,Ze,fe,ve,!0)}}e:{if(G=j?$a(j):window,$=G.nodeName&&G.nodeName.toLowerCase(),$==="select"||$==="input"&&G.type==="file")var Ue=Dp;else if(Lp(G))if(Np)Ue=US;else{Ue=HS;var pe=zS}else $=G.nodeName,!$||$.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?j&&zu(j.elementType)&&(Ue=Dp):Ue=PS;if(Ue&&(Ue=Ue(n,j))){Rp(re,Ue,l,Z);break e}pe&&pe(n,G,j),n==="focusout"&&j&&G.type==="number"&&j.memoizedProps.value!=null&&Iu(G,"number",G.value)}switch(pe=j?$a(j):window,n){case"focusin":(Lp(pe)||pe.contentEditable==="true")&&(Gr=pe,Zu=j,Ja=null);break;case"focusout":Ja=Zu=Gr=null;break;case"mousedown":Ku=!0;break;case"contextmenu":case"mouseup":case"dragend":Ku=!1,Bp(re,l,Z);break;case"selectionchange":if(VS)break;case"keydown":case"keyup":Bp(re,l,Z)}var Ae;if(qu)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 jr?Tp(n,l)&&(Me="onCompositionEnd"):n==="keydown"&&l.keyCode===229&&(Me="onCompositionStart");Me&&(Cp&&l.locale!=="ko"&&(jr||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&jr&&(Ae=vp()):(ki=Z,Vu="value"in ki?ki.value:ki.textContent,jr=!0)),pe=fs(j,Me),0<pe.length&&(Me=new Ep(Me,n,null,l,Z),re.push({event:Me,listeners:pe}),Ae?Me.data=Ae:(Ae=Ap(l),Ae!==null&&(Me.data=Ae)))),(Ae=DS?NS(n,l):OS(n,l))&&(Me=fs(j,"onBeforeInput"),0<Me.length&&(pe=new Ep("onBeforeInput","beforeinput",null,l,Z),re.push({event:pe,listeners:Me}),pe.data=Ae)),CE(re,n,j,l,Z)}d0(re,r)})}function Cl(n,r,l){return{instance:n,listener:r,currentTarget:l}}function fs(n,r){for(var l=r+"Capture",u=[];n!==null;){var p=n,g=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||g===null||(p=Fa(n,l),p!=null&&u.unshift(Cl(n,p,g)),p=Fa(n,r),p!=null&&u.push(Cl(n,p,g))),n.tag===3)return u;n=n.return}return[]}function AE(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function p0(n,r,l,u,p){for(var g=r._reactName,_=[];l!==null&&l!==u;){var x=l,N=x.alternate,j=x.stateNode;if(x=x.tag,N!==null&&N===u)break;x!==5&&x!==26&&x!==27||j===null||(N=j,p?(j=Fa(l,g),j!=null&&_.unshift(Cl(l,j,N))):p||(j=Fa(l,g),j!=null&&_.push(Cl(l,j,N)))),l=l.return}_.length!==0&&n.push({event:r,listeners:_})}var LE=/\r\n?/g,RE=/\u0000|\uFFFD/g;function m0(n){return(typeof n=="string"?n:""+n).replace(LE,`
10
+ `).replace(RE,"")}function g0(n,r){return r=m0(r),m0(n)===r}function Qe(n,r,l,u,p,g){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||Ur(n,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&Ur(n,""+u);break;case"className":mo(n,"class",u);break;case"tabIndex":mo(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":mo(n,l,u);break;case"style":gp(n,u,g);break;case"data":if(r!=="object"){mo(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=yo(""+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 g=="function"&&(l==="formAction"?(r!=="input"&&Qe(n,r,"name",p.name,p,null),Qe(n,r,"formEncType",p.formEncType,p,null),Qe(n,r,"formMethod",p.formMethod,p,null),Qe(n,r,"formTarget",p.formTarget,p,null)):(Qe(n,r,"encType",p.encType,p,null),Qe(n,r,"method",p.method,p,null),Qe(n,r,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=yo(""+u),n.setAttribute(l,u);break;case"onClick":u!=null&&(n.onclick=ti);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(p.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=yo(""+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),po(n,"popover",u);break;case"xlinkActuate":ei(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":ei(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":ei(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":ei(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":ei(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":ei(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":ei(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":ei(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":ei(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":po(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=rS.get(l)||l,po(n,l,u))}}function xf(n,r,l,u,p,g){switch(l){case"style":gp(n,u,g);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(p.children!=null)throw Error(a(60));n.innerHTML=l}}break;case"children":typeof u=="string"?Ur(n,u):(typeof u=="number"||typeof u=="bigint")&&Ur(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=ti);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!op.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(p=l.endsWith("Capture"),r=l.slice(2,p?l.length-7:void 0),g=n[Gt]||null,g=g!=null?g[l]:null,typeof g=="function"&&n.removeEventListener(r,g,p),typeof u=="function")){typeof g!="function"&&g!==null&&(l in n?n[l]=null:n.hasAttribute(l)&&n.removeAttribute(l)),n.addEventListener(r,u,p);break e}l in n?n[l]=u:u===!0?n.setAttribute(l,""):po(n,l,u)}}}function Mt(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,p=!1,g;for(g in l)if(l.hasOwnProperty(g)){var _=l[g];if(_!=null)switch(g){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Qe(n,r,g,_,l,null)}}p&&Qe(n,r,"srcSet",l.srcSet,l,null),u&&Qe(n,r,"src",l.src,l,null);return;case"input":Ne("invalid",n);var x=g=_=p=null,N=null,j=null;for(u in l)if(l.hasOwnProperty(u)){var Z=l[u];if(Z!=null)switch(u){case"name":p=Z;break;case"type":_=Z;break;case"checked":N=Z;break;case"defaultChecked":j=Z;break;case"value":g=Z;break;case"defaultValue":x=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(a(137,r));break;default:Qe(n,r,u,Z,l,null)}}dp(n,g,x,N,j,_,p,!1);return;case"select":Ne("invalid",n),u=_=g=null;for(p in l)if(l.hasOwnProperty(p)&&(x=l[p],x!=null))switch(p){case"value":g=x;break;case"defaultValue":_=x;break;case"multiple":u=x;default:Qe(n,r,p,x,l,null)}r=g,l=_,n.multiple=!!u,r!=null?Pr(n,!!u,r,!1):l!=null&&Pr(n,!!u,l,!0);return;case"textarea":Ne("invalid",n),g=p=u=null;for(_ in l)if(l.hasOwnProperty(_)&&(x=l[_],x!=null))switch(_){case"value":u=x;break;case"defaultValue":p=x;break;case"children":g=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(a(91));break;default:Qe(n,r,_,x,l,null)}pp(n,u,p,g);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":Qe(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<xl.length;u++)Ne(xl[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(j in l)if(l.hasOwnProperty(j)&&(u=l[j],u!=null))switch(j){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Qe(n,r,j,u,l,null)}return;default:if(zu(r)){for(Z in l)l.hasOwnProperty(Z)&&(u=l[Z],u!==void 0&&xf(n,r,Z,u,l,void 0));return}}for(x in l)l.hasOwnProperty(x)&&(u=l[x],u!=null&&Qe(n,r,x,u,l,null))}function DE(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 p=null,g=null,_=null,x=null,N=null,j=null,Z=null;for($ in l){var re=l[$];if(l.hasOwnProperty($)&&re!=null)switch($){case"checked":break;case"value":break;case"defaultValue":N=re;default:u.hasOwnProperty($)||Qe(n,r,$,null,u,re)}}for(var G in u){var $=u[G];if(re=l[G],u.hasOwnProperty(G)&&($!=null||re!=null))switch(G){case"type":g=$;break;case"name":p=$;break;case"checked":j=$;break;case"defaultChecked":Z=$;break;case"value":_=$;break;case"defaultValue":x=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(a(137,r));break;default:$!==re&&Qe(n,r,G,$,u,re)}}Mu(n,_,x,N,j,Z,g,p);return;case"select":$=_=x=G=null;for(g in l)if(N=l[g],l.hasOwnProperty(g)&&N!=null)switch(g){case"value":break;case"multiple":$=N;default:u.hasOwnProperty(g)||Qe(n,r,g,null,u,N)}for(p in u)if(g=u[p],N=l[p],u.hasOwnProperty(p)&&(g!=null||N!=null))switch(p){case"value":G=g;break;case"defaultValue":x=g;break;case"multiple":_=g;default:g!==N&&Qe(n,r,p,g,u,N)}r=x,l=_,u=$,G!=null?Pr(n,!!l,G,!1):!!u!=!!l&&(r!=null?Pr(n,!!l,r,!0):Pr(n,!!l,l?[]:"",!1));return;case"textarea":$=G=null;for(x in l)if(p=l[x],l.hasOwnProperty(x)&&p!=null&&!u.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Qe(n,r,x,null,u,p)}for(_ in u)if(p=u[_],g=l[_],u.hasOwnProperty(_)&&(p!=null||g!=null))switch(_){case"value":G=p;break;case"defaultValue":$=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==g&&Qe(n,r,_,p,u,g)}hp(n,G,$);return;case"option":for(var fe in l)G=l[fe],l.hasOwnProperty(fe)&&G!=null&&!u.hasOwnProperty(fe)&&(fe==="selected"?n.selected=!1:Qe(n,r,fe,null,u,G));for(N in u)G=u[N],$=l[N],u.hasOwnProperty(N)&&G!==$&&(G!=null||$!=null)&&(N==="selected"?n.selected=G&&typeof G!="function"&&typeof G!="symbol":Qe(n,r,N,G,u,$));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)G=l[ve],l.hasOwnProperty(ve)&&G!=null&&!u.hasOwnProperty(ve)&&Qe(n,r,ve,null,u,G);for(j in u)if(G=u[j],$=l[j],u.hasOwnProperty(j)&&G!==$&&(G!=null||$!=null))switch(j){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(a(137,r));break;default:Qe(n,r,j,G,u,$)}return;default:if(zu(r)){for(var Ze in l)G=l[Ze],l.hasOwnProperty(Ze)&&G!==void 0&&!u.hasOwnProperty(Ze)&&xf(n,r,Ze,void 0,u,G);for(Z in u)G=u[Z],$=l[Z],!u.hasOwnProperty(Z)||G===$||G===void 0&&$===void 0||xf(n,r,Z,G,u,$);return}}for(var P in l)G=l[P],l.hasOwnProperty(P)&&G!=null&&!u.hasOwnProperty(P)&&Qe(n,r,P,null,u,G);for(re in u)G=u[re],$=l[re],!u.hasOwnProperty(re)||G===$||G==null&&$==null||Qe(n,r,re,G,u,$)}function y0(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function NE(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var p=l[u],g=p.transferSize,_=p.initiatorType,x=p.duration;if(g&&x&&y0(_)){for(_=0,x=p.responseEnd,u+=1;u<l.length;u++){var N=l[u],j=N.startTime;if(j>x)break;var Z=N.transferSize,re=N.initiatorType;Z&&y0(re)&&(N=N.responseEnd,_+=Z*(N<x?1:(x-j)/(N-j)))}if(--u,r+=8*(g+_)/(p.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 Cf=null,wf=null;function ds(n){return n.nodeType===9?n:n.ownerDocument}function b0(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 v0(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 kf(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 Tf=null;function OE(){var n=window.event;return n&&n.type==="popstate"?n===Tf?!1:(Tf=n,!0):(Tf=null,!1)}var _0=typeof setTimeout=="function"?setTimeout:void 0,ME=typeof clearTimeout=="function"?clearTimeout:void 0,S0=typeof Promise=="function"?Promise:void 0,IE=typeof queueMicrotask=="function"?queueMicrotask:typeof S0<"u"?function(n){return S0.resolve(null).then(n).catch(zE)}:_0;function zE(n){setTimeout(function(){throw n})}function Gi(n){return n==="head"}function E0(n,r){var l=r,u=0;do{var p=l.nextSibling;if(n.removeChild(l),p&&p.nodeType===8)if(l=p.data,l==="/$"||l==="/&"){if(u===0){n.removeChild(p),ga(r);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")wl(n.ownerDocument.documentElement);else if(l==="head"){l=n.ownerDocument.head,wl(l);for(var g=l.firstChild;g;){var _=g.nextSibling,x=g.nodeName;g[Ga]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&g.rel.toLowerCase()==="stylesheet"||l.removeChild(g),g=_}}else l==="body"&&wl(n.ownerDocument.body);l=p}while(l);ga(r)}function x0(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),Nu(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}n.removeChild(l)}}function HE(n,r,l,u){for(;n.nodeType===1;){var p=l;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[Ga])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(g=n.getAttribute("rel"),g==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(g!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(g=n.getAttribute("src"),(g!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&g&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var g=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===g)return n}else return n;if(n=vn(n.nextSibling),n===null)break}return null}function PE(n,r,l){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!l||(n=vn(n.nextSibling),n===null))return null;return n}function C0(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=vn(n.nextSibling),n===null))return null;return n}function Lf(n){return n.data==="$?"||n.data==="$~"}function Rf(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function UE(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 vn(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 Df=null;function w0(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var l=n.data;if(l==="/$"||l==="/&"){if(r===0)return vn(n.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}n=n.nextSibling}return null}function k0(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 T0(n,r,l){switch(r=ds(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 wl(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);Nu(n)}var _n=new Map,A0=new Set;function hs(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var yi=q.d;q.d={f:BE,r:VE,D:jE,C:GE,L:$E,m:FE,X:YE,S:qE,M:XE};function BE(){var n=yi.f(),r=rs();return n||r}function VE(n){var r=Ir(n);r!==null&&r.tag===5&&r.type==="form"?Fm(r):yi.r(n)}var ha=typeof document>"u"?null:document;function L0(n,r,l){var u=ha;if(u&&typeof r=="string"&&r){var p=dn(r);p='link[rel="'+n+'"][href="'+p+'"]',typeof l=="string"&&(p+='[crossorigin="'+l+'"]'),A0.has(p)||(A0.add(p),n={rel:n,crossOrigin:l,href:r},u.querySelector(p)===null&&(r=u.createElement("link"),Mt(r,"link",n),Ct(r),u.head.appendChild(r)))}}function jE(n){yi.D(n),L0("dns-prefetch",n,null)}function GE(n,r){yi.C(n,r),L0("preconnect",n,r)}function $E(n,r,l){yi.L(n,r,l);var u=ha;if(u&&n&&r){var p='link[rel="preload"][as="'+dn(r)+'"]';r==="image"&&l&&l.imageSrcSet?(p+='[imagesrcset="'+dn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(p+='[imagesizes="'+dn(l.imageSizes)+'"]')):p+='[href="'+dn(n)+'"]';var g=p;switch(r){case"style":g=pa(n);break;case"script":g=ma(n)}_n.has(g)||(n=m({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:n,as:r},l),_n.set(g,n),u.querySelector(p)!==null||r==="style"&&u.querySelector(kl(g))||r==="script"&&u.querySelector(Tl(g))||(r=u.createElement("link"),Mt(r,"link",n),Ct(r),u.head.appendChild(r)))}}function FE(n,r){yi.m(n,r);var l=ha;if(l&&n){var u=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+dn(u)+'"][href="'+dn(n)+'"]',g=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=ma(n)}if(!_n.has(g)&&(n=m({rel:"modulepreload",href:n},r),_n.set(g,n),l.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Tl(g)))return}u=l.createElement("link"),Mt(u,"link",n),Ct(u),l.head.appendChild(u)}}}function qE(n,r,l){yi.S(n,r,l);var u=ha;if(u&&n){var p=zr(u).hoistableStyles,g=pa(n);r=r||"default";var _=p.get(g);if(!_){var x={loading:0,preload:null};if(_=u.querySelector(kl(g)))x.loading=5;else{n=m({rel:"stylesheet",href:n,"data-precedence":r},l),(l=_n.get(g))&&Nf(n,l);var N=_=u.createElement("link");Ct(N),Mt(N,"link",n),N._p=new Promise(function(j,Z){N.onload=j,N.onerror=Z}),N.addEventListener("load",function(){x.loading|=1}),N.addEventListener("error",function(){x.loading|=2}),x.loading|=4,ps(_,r,u)}_={type:"stylesheet",instance:_,count:1,state:x},p.set(g,_)}}}function YE(n,r){yi.X(n,r);var l=ha;if(l&&n){var u=zr(l).hoistableScripts,p=ma(n),g=u.get(p);g||(g=l.querySelector(Tl(p)),g||(n=m({src:n,async:!0},r),(r=_n.get(p))&&Of(n,r),g=l.createElement("script"),Ct(g),Mt(g,"link",n),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},u.set(p,g))}}function XE(n,r){yi.M(n,r);var l=ha;if(l&&n){var u=zr(l).hoistableScripts,p=ma(n),g=u.get(p);g||(g=l.querySelector(Tl(p)),g||(n=m({src:n,async:!0,type:"module"},r),(r=_n.get(p))&&Of(n,r),g=l.createElement("script"),Ct(g),Mt(g,"link",n),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},u.set(p,g))}}function R0(n,r,l,u){var p=(p=he.current)?hs(p):null;if(!p)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=pa(l.href),l=zr(p).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=pa(l.href);var g=zr(p).hoistableStyles,_=g.get(n);if(_||(p=p.ownerDocument||p,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(n,_),(g=p.querySelector(kl(n)))&&!g._p&&(_.instance=g,_.state.loading=5),_n.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},_n.set(n,l),g||QE(p,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=ma(l),l=zr(p).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 pa(n){return'href="'+dn(n)+'"'}function kl(n){return'link[rel="stylesheet"]['+n+"]"}function D0(n){return m({},n,{"data-precedence":n.precedence,precedence:null})}function QE(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}),Mt(r,"link",l),Ct(r),n.head.appendChild(r))}function ma(n){return'[src="'+dn(n)+'"]'}function Tl(n){return"script[async]"+n}function N0(n,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=n.querySelector('style[data-href~="'+dn(l.href)+'"]');if(u)return r.instance=u,Ct(u),u;var p=m({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),Ct(u),Mt(u,"style",p),ps(u,l.precedence,n),r.instance=u;case"stylesheet":p=pa(l.href);var g=n.querySelector(kl(p));if(g)return r.state.loading|=4,r.instance=g,Ct(g),g;u=D0(l),(p=_n.get(p))&&Nf(u,p),g=(n.ownerDocument||n).createElement("link"),Ct(g);var _=g;return _._p=new Promise(function(x,N){_.onload=x,_.onerror=N}),Mt(g,"link",u),r.state.loading|=4,ps(g,l.precedence,n),r.instance=g;case"script":return g=ma(l.src),(p=n.querySelector(Tl(g)))?(r.instance=p,Ct(p),p):(u=l,(p=_n.get(g))&&(u=m({},l),Of(u,p)),n=n.ownerDocument||n,p=n.createElement("script"),Ct(p),Mt(p,"link",u),n.head.appendChild(p),r.instance=p);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,ps(u,l.precedence,n));return r.instance}function ps(n,r,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,g=p,_=0;_<u.length;_++){var x=u[_];if(x.dataset.precedence===r)g=x;else if(g!==p)break}g?g.parentNode.insertBefore(n,g.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(n,r.firstChild))}function Nf(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function Of(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var ms=null;function O0(n,r,l){if(ms===null){var u=new Map,p=ms=new Map;p.set(l,u)}else p=ms,u=p.get(l),u||(u=new Map,p.set(l,u));if(u.has(n))return u;for(u.set(n,null),l=l.getElementsByTagName(n),p=0;p<l.length;p++){var g=l[p];if(!(g[Ga]||g[Rt]||n==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var _=g.getAttribute(r)||"";_=n+_;var x=u.get(_);x?x.push(g):u.set(_,[g])}}return u}function M0(n,r,l){n=n.ownerDocument||n,n.head.insertBefore(l,r==="title"?n.querySelector("head > title"):null)}function ZE(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 I0(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function KE(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 p=pa(u.href),g=r.querySelector(kl(p));if(g){r=g._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=gs.bind(n),r.then(n,n)),l.state.loading|=4,l.instance=g,Ct(g);return}g=r.ownerDocument||r,u=D0(u),(p=_n.get(p))&&Nf(u,p),g=g.createElement("link"),Ct(g);var _=g;_._p=new Promise(function(x,N){_.onload=x,_.onerror=N}),Mt(g,"link",u),l.instance=g}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(n.count++,l=gs.bind(n),r.addEventListener("load",l),r.addEventListener("error",l))}}var Mf=0;function WE(n,r){return n.stylesheets&&n.count===0&&bs(n,n.stylesheets),0<n.count||0<n.imgCount?function(l){var u=setTimeout(function(){if(n.stylesheets&&bs(n,n.stylesheets),n.unsuspend){var g=n.unsuspend;n.unsuspend=null,g()}},6e4+r);0<n.imgBytes&&Mf===0&&(Mf=62500*NE());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&bs(n,n.stylesheets),n.unsuspend)){var g=n.unsuspend;n.unsuspend=null,g()}},(n.imgBytes>Mf?50:800)+r);return n.unsuspend=l,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function gs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)bs(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var ys=null;function bs(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,ys=new Map,r.forEach(JE,n),ys=null,gs.call(n))}function JE(n,r){if(!(r.state.loading&4)){var l=ys.get(n);if(l)var u=l.get(null);else{l=new Map,ys.set(n,l);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<p.length;g++){var _=p[g];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(l.set(_.dataset.precedence,_),u=_)}u&&l.set(null,u)}p=r.instance,_=p.getAttribute("data-precedence"),g=l.get(_)||u,g===u&&l.set(null,p),l.set(_,p),this.count++,u=gs.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),g?g.parentNode.insertBefore(p,g.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),r.state.loading|=4}}var Al={$$typeof:T,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function ex(n,r,l,u,p,g,_,x,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=we(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=we(0),this.hiddenUpdates=we(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=g,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function z0(n,r,l,u,p,g,_,x,N,j,Z,re){return n=new ex(n,r,l,_,N,j,Z,re,x),r=1,g===!0&&(r|=24),g=nn(3,null,null,r),n.current=g,g.stateNode=n,r=dc(),r.refCount++,n.pooledCache=r,r.refCount++,g.memoizedState={element:u,isDehydrated:l,cache:r},gc(g),n}function H0(n){return n?(n=qr,n):qr}function P0(n,r,l,u,p,g){p=H0(p),u.context===null?u.context=p:u.pendingContext=p,u=Ni(r),u.payload={element:l},g=g===void 0?null:g,g!==null&&(u.callback=g),l=Oi(n,u,r),l!==null&&(Qt(l,n,r),ll(l,n,r))}function U0(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var l=n.retryLane;n.retryLane=l!==0&&l<r?l:r}}function If(n,r){U0(n,r),(n=n.alternate)&&U0(n,r)}function B0(n){if(n.tag===13||n.tag===31){var r=ur(n,67108864);r!==null&&Qt(r,n,67108864),If(n,67108864)}}function V0(n){if(n.tag===13||n.tag===31){var r=sn();r=Lu(r);var l=ur(n,r);l!==null&&Qt(l,n,r),If(n,r)}}var vs=!0;function tx(n,r,l,u){var p=H.T;H.T=null;var g=q.p;try{q.p=2,zf(n,r,l,u)}finally{q.p=g,H.T=p}}function nx(n,r,l,u){var p=H.T;H.T=null;var g=q.p;try{q.p=8,zf(n,r,l,u)}finally{q.p=g,H.T=p}}function zf(n,r,l,u){if(vs){var p=Hf(u);if(p===null)Ef(n,r,u,_s,l),G0(n,u);else if(rx(p,n,r,l,u))u.stopPropagation();else if(G0(n,u),r&4&&-1<ix.indexOf(n)){for(;p!==null;){var g=Ir(p);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var _=Wn(g.pendingLanes);if(_!==0){var x=g;for(x.pendingLanes|=2,x.entangledLanes|=2;_;){var N=1<<31-Ge(_);x.entanglements[1]|=N,_&=~N}jn(g),(Ve&6)===0&&(ns=Lt()+500,El(0))}}break;case 31:case 13:x=ur(g,2),x!==null&&Qt(x,g,2),rs(),If(g,2)}if(g=Hf(u),g===null&&Ef(n,r,u,_s,l),g===p)break;p=g}p!==null&&u.stopPropagation()}else Ef(n,r,u,null,l)}}function Hf(n){return n=Pu(n),Pf(n)}var _s=null;function Pf(n){if(_s=null,n=Mr(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=d(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 _s=n,null}function j0(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(Lr()){case Q:return 2;case ue:return 8;case _e:case Te:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var Uf=!1,$i=null,Fi=null,qi=null,Ll=new Map,Rl=new Map,Yi=[],ix="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 G0(n,r){switch(n){case"focusin":case"focusout":$i=null;break;case"dragenter":case"dragleave":Fi=null;break;case"mouseover":case"mouseout":qi=null;break;case"pointerover":case"pointerout":Ll.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rl.delete(r.pointerId)}}function Dl(n,r,l,u,p,g){return n===null||n.nativeEvent!==g?(n={blockedOn:r,domEventName:l,eventSystemFlags:u,nativeEvent:g,targetContainers:[p]},r!==null&&(r=Ir(r),r!==null&&B0(r)),n):(n.eventSystemFlags|=u,r=n.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),n)}function rx(n,r,l,u,p){switch(r){case"focusin":return $i=Dl($i,n,r,l,u,p),!0;case"dragenter":return Fi=Dl(Fi,n,r,l,u,p),!0;case"mouseover":return qi=Dl(qi,n,r,l,u,p),!0;case"pointerover":var g=p.pointerId;return Ll.set(g,Dl(Ll.get(g)||null,n,r,l,u,p)),!0;case"gotpointercapture":return g=p.pointerId,Rl.set(g,Dl(Rl.get(g)||null,n,r,l,u,p)),!0}return!1}function $0(n){var r=Mr(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,rp(n.priority,function(){V0(l)});return}}else if(r===31){if(r=d(l),r!==null){n.blockedOn=r,rp(n.priority,function(){V0(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 Ss(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var l=Hf(n.nativeEvent);if(l===null){l=n.nativeEvent;var u=new l.constructor(l.type,l);Hu=u,l.target.dispatchEvent(u),Hu=null}else return r=Ir(l),r!==null&&B0(r),n.blockedOn=l,!1;r.shift()}return!0}function F0(n,r,l){Ss(n)&&l.delete(r)}function ax(){Uf=!1,$i!==null&&Ss($i)&&($i=null),Fi!==null&&Ss(Fi)&&(Fi=null),qi!==null&&Ss(qi)&&(qi=null),Ll.forEach(F0),Rl.forEach(F0)}function Es(n,r){n.blockedOn===r&&(n.blockedOn=null,Uf||(Uf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,ax)))}var xs=null;function q0(n){xs!==n&&(xs=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){xs===n&&(xs=null);for(var r=0;r<n.length;r+=3){var l=n[r],u=n[r+1],p=n[r+2];if(typeof u!="function"){if(Pf(u||l)===null)continue;break}var g=Ir(l);g!==null&&(n.splice(r,3),r-=3,zc(g,{pending:!0,data:p,method:l.method,action:u},u,p))}}))}function ga(n){function r(N){return Es(N,n)}$i!==null&&Es($i,n),Fi!==null&&Es(Fi,n),qi!==null&&Es(qi,n),Ll.forEach(r),Rl.forEach(r);for(var l=0;l<Yi.length;l++){var u=Yi[l];u.blockedOn===n&&(u.blockedOn=null)}for(;0<Yi.length&&(l=Yi[0],l.blockedOn===null);)$0(l),l.blockedOn===null&&Yi.shift();if(l=(n.ownerDocument||n).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var p=l[u],g=l[u+1],_=p[Gt]||null;if(typeof g=="function")_||q0(l);else if(_){var x=null;if(g&&g.hasAttribute("formAction")){if(p=g,_=g[Gt]||null)x=_.formAction;else if(Pf(p)!==null)continue}else x=_.action;typeof x=="function"?l[u+1]=x:(l.splice(u,3),u-=3),q0(l)}}}function Y0(){function n(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(_){return p=_})},focusReset:"manual",scroll:"manual"})}function r(){p!==null&&(p(),p=null),u||setTimeout(l,20)}function l(){if(!u&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=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),p!==null&&(p(),p=null)}}}function Bf(n){this._internalRoot=n}Cs.prototype.render=Bf.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(a(409));var l=r.current,u=sn();P0(l,u,n,r,null,null)},Cs.prototype.unmount=Bf.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;P0(n.current,2,null,n,null,null),rs(),r[Or]=null}};function Cs(n){this._internalRoot=n}Cs.prototype.unstable_scheduleHydration=function(n){if(n){var r=ip();n={blockedOn:null,target:n,priority:r};for(var l=0;l<Yi.length&&r!==0&&r<Yi[l].priority;l++);Yi.splice(l,0,n),l===0&&$0(n)}};var X0=t.version;if(X0!=="19.2.7")throw Error(a(527,X0,"19.2.7"));q.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=h(r),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var lx={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ws=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ws.isDisabled&&ws.supportsFiber)try{xt=ws.inject(lx),at=ws}catch{}}return Ol.createRoot=function(n,r){if(!o(n))throw Error(a(299));var l=!1,u="",p=tg,g=ng,_=ig;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(g=r.onCaughtError),r.onRecoverableError!==void 0&&(_=r.onRecoverableError)),r=z0(n,1,!1,null,null,l,u,null,p,g,_,Y0),n[Or]=r.current,Sf(n),new Bf(r)},Ol.hydrateRoot=function(n,r,l){if(!o(n))throw Error(a(299));var u=!1,p="",g=tg,_=ng,x=ig,N=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(g=l.onUncaughtError),l.onCaughtError!==void 0&&(_=l.onCaughtError),l.onRecoverableError!==void 0&&(x=l.onRecoverableError),l.formState!==void 0&&(N=l.formState)),r=z0(n,1,!0,r,l??null,u,p,N,g,_,x,Y0),r.context=H0(null),l=r.current,u=sn(),u=Lu(u),p=Ni(u),p.callback=null,Oi(l,p,u),l=u,r.current.lanes=l,Fe(r,l),jn(r),n[Or]=r.current,Sf(n),new Cs(r)},Ol.version="19.2.7",Ol}var ry;function gx(){if(ry)return Gf.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(),Gf.exports=mx(),Gf.exports}var yx=gx();async function kn(e,t={}){const i=await fetch(e,{headers:{"content-type":"application/json",...t.headers},...t}),a=await bx(i);if(!i.ok)throw new Error(a.error||i.statusText||`request to ${e} failed`);return a}async function bx(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 vx(){return kn("/api/bootstrap")}async function _x(e){return kn("/api/diff")}async function Sx(e){return kn("/api/state",{method:"POST",body:JSON.stringify(e)})}async function ay(e){return kn("/api/thread",{method:"POST",body:JSON.stringify(e)})}async function Yf(e){return kn("/api/thread/reply",{method:"POST",body:JSON.stringify(e)})}async function Ex(e){return kn("/api/thread-message",{method:"POST",body:JSON.stringify({id:e})})}async function xx(e){return kn("/api/thread-message/delete",{method:"POST",body:JSON.stringify(e)})}async function Cx(e){return kn("/api/thread/resolve",{method:"POST",body:JSON.stringify(e)})}async function wx(e){return kn("/api/thread/collapse",{method:"POST",body:JSON.stringify(e)})}async function kx(){return kn("/api/brief/generate",{method:"POST"})}async function Tx(e){return kn("/api/review",{method:"POST",body:JSON.stringify({message:e})})}async function Ax(){return kn("/api/cancel",{method:"POST"})}const Lx=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","horizon-bright","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],Eh="github-dark-dimmed",Rx={diffStyle:"split",overflowMode:"wrap",codeTheme:Eh,sidebarOpen:!1,collapsedFileIds:[],viewedFileIds:[],threads:[],brief:{content:"",loading:!1}},Dx=new Set(Lx);function Nx(e){return{...e,diffStyle:e.diffStyle==="split"?"split":"stacked",overflowMode:e.overflowMode==="scroll"?"scroll":"wrap",codeTheme:Ix(e.codeTheme),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 xh(e){return e.anchor.kind==="line"}function Ox(e){return e.anchor.kind==="detached"}function ly(e){return Object.fromEntries(e.map(t=>[t,!0]))}function oy(e,t){return e.includes(t)?e.filter(i=>i!==t):[...e,t]}function Xf(e){return[...new Set(e)]}function Mx(e,t){return{additions:e.additions+t.additions,deletions:e.deletions+t.deletions}}function Ix(e){return Dx.has(e)?e:Eh}function zx(e){const t=new Map;for(const i of e){if(!xh(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 Hx(e){const t=new Map;for(const i of e)xh(i)&&t.set(i.anchor.fileId,(t.get(i.anchor.fileId)??0)+1);return t}function Px(e,t,i,a){return!a||i?.fileId!==t?e:[...e,a]}function Ux(e,t,i){return{...e,threads:e.threads.map(a=>a.id===t?{...a,loading:i}:a)}}function Bx(e,t){return{...e,brief:{...e.brief,loading:t}}}function Vx(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 Sv=(...e)=>e.filter((t,i,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===i).join(" ").trim();const jx=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Gx=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,i,a)=>a?a.toUpperCase():i.toLowerCase());const sy=e=>{const t=Gx(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Qf={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const $x=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},Fx=te.createContext({}),qx=()=>te.useContext(Fx),Yx=te.forwardRef(({color:e,size:t,strokeWidth:i,absoluteStrokeWidth:a,className:o="",children:s,iconNode:c,...d},f)=>{const{size:h=24,strokeWidth:y=2,absoluteStrokeWidth:m=!1,color:b="currentColor",className:v=""}=qx()??{},S=a??m?Number(i??y)*24/Number(t??h):i??y;return te.createElement("svg",{ref:f,...Qf,width:t??h??Qf.width,height:t??h??Qf.height,stroke:e??b,strokeWidth:S,className:Sv("lucide",v,o),...!s&&!$x(d)&&{"aria-hidden":"true"},...d},[...c.map(([k,D])=>te.createElement(k,D)),...Array.isArray(s)?s:[s]])});const Wt=(e,t)=>{const i=te.forwardRef(({className:a,...o},s)=>te.createElement(Yx,{ref:s,iconNode:t,className:Sv(`lucide-${jx(sy(e))}`,`lucide-${e}`,a),...o}));return i.displayName=sy(e),i};const Xx=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Qx=Wt("check",Xx);const Zx=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ev=Wt("chevron-down",Zx);const Kx=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Wx=Wt("chevron-right",Kx);const Jx=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],xv=Wt("chevrons-down-up",Jx);const eC=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Cv=Wt("chevrons-up-down",eC);const tC=[["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"}]],nC=Wt("eye-off",tC);const iC=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],rC=Wt("file-diff",iC);const aC=[["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"}]],wv=Wt("message-square",aC);const lC=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],oC=Wt("messages-square",lC);const sC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],uC=Wt("panel-left",sC);const cC=[["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"}]],fC=Wt("scroll-text",cC);const dC=[["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"}]],hC=Wt("sparkles",dC);const pC=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],kv=Wt("trash",pC);const mC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Tv=Wt("x",mC);function xa({icon:e,label:t,size:i=14,className:a="",...o}){return z.jsx("button",{type:"button",className:`icon-btn ${a}`,"aria-label":t,...o,children:z.jsx(e,{size:i})})}function Av({open:e,title:t,ariaLabel:i,closeLabel:a,widthClassName:o,bodyClassName:s,onClose:c,children:d}){return te.useEffect(()=>{if(!e)return;const f=h=>{h.key==="Escape"&&c()};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[e,c]),e?z.jsx("div",{className:"dialog-backdrop",onClick:c,children:z.jsxs("div",{className:`dialog${o?` ${o}`:""}`,role:"dialog","aria-modal":"true","aria-label":i,onClick:f=>f.stopPropagation(),children:[z.jsxs("div",{className:"dialog-header",children:[z.jsx("div",{className:"dialog-heading",children:z.jsx("div",{className:"dialog-title",children:t})}),z.jsx("div",{className:"dialog-actions",children:z.jsx(xa,{icon:Tv,size:16,label:a,className:"dialog-close",onClick:c})})]}),z.jsx("div",{className:`dialog-body-wrap${s?` ${s}`:""}`,children:d})]})}):null}function Lv(e,t){const i=t||{};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const gC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bC={};function uy(e,t){return(bC.jsx?yC:gC).test(e)}const vC=/[ \t\n\f\r]/g;function pu(e){return typeof e=="object"?e.type==="text"?cy(e.value):!1:cy(e)}function cy(e){return e.replace(vC,"")===""}class so{constructor(t,i,a){this.normal=i,this.property=t,a&&(this.space=a)}}so.prototype.normal={};so.prototype.property={};so.prototype.space=void 0;function Rv(e,t){const i={},a={};for(const o of e)Object.assign(i,o.property),Object.assign(a,o.normal);return new so(i,a,t)}function Ud(e){return e.toLowerCase()}class Jt{constructor(t,i){this.attribute=i,this.property=t}}Jt.prototype.attribute="";Jt.prototype.booleanish=!1;Jt.prototype.boolean=!1;Jt.prototype.commaOrSpaceSeparated=!1;Jt.prototype.commaSeparated=!1;Jt.prototype.defined=!1;Jt.prototype.mustUseProperty=!1;Jt.prototype.number=!1;Jt.prototype.overloadedBoolean=!1;Jt.prototype.property="";Jt.prototype.spaceSeparated=!1;Jt.prototype.space=void 0;let _C=0;const Le=Ar(),mt=Ar(),Bd=Ar(),se=Ar(),Je=Ar(),La=Ar(),un=Ar();function Ar(){return 2**++_C}const Vd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:mt,commaOrSpaceSeparated:un,commaSeparated:La,number:se,overloadedBoolean:Bd,spaceSeparated:Je},Symbol.toStringTag,{value:"Module"})),Zf=Object.keys(Vd);class Ch extends Jt{constructor(t,i,a,o){let s=-1;if(super(t,i),fy(this,"space",o),typeof a=="number")for(;++s<Zf.length;){const c=Zf[s];fy(this,Zf[s],(a&Vd[c])===Vd[c])}}}Ch.prototype.defined=!0;function fy(e,t,i){i&&(e[t]=i)}function za(e){const t={},i={};for(const[a,o]of Object.entries(e.properties)){const s=new Ch(a,e.transform(e.attributes||{},a),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(s.mustUseProperty=!0),t[a]=s,i[Ud(a)]=a,i[Ud(s.attribute)]=a}return new so(t,i,e.space)}const Dv=za({properties:{ariaActiveDescendant:null,ariaAtomic:mt,ariaAutoComplete:null,ariaBusy:mt,ariaChecked:mt,ariaColCount:se,ariaColIndex:se,ariaColSpan:se,ariaControls:Je,ariaCurrent:null,ariaDescribedBy:Je,ariaDetails:null,ariaDisabled:mt,ariaDropEffect:Je,ariaErrorMessage:null,ariaExpanded:mt,ariaFlowTo:Je,ariaGrabbed:mt,ariaHasPopup:null,ariaHidden:mt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Je,ariaLevel:se,ariaLive:null,ariaModal:mt,ariaMultiLine:mt,ariaMultiSelectable:mt,ariaOrientation:null,ariaOwns:Je,ariaPlaceholder:null,ariaPosInSet:se,ariaPressed:mt,ariaReadOnly:mt,ariaRelevant:null,ariaRequired:mt,ariaRoleDescription:Je,ariaRowCount:se,ariaRowIndex:se,ariaRowSpan:se,ariaSelected:mt,ariaSetSize:se,ariaSort:null,ariaValueMax:se,ariaValueMin:se,ariaValueNow:se,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Nv(e,t){return t in e?e[t]:t}function Ov(e,t){return Nv(e,t.toLowerCase())}const SC=za({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:La,acceptCharset:Je,accessKey:Je,action:null,allow:null,allowFullScreen:Le,allowPaymentRequest:Le,allowUserMedia:Le,alt:null,as:null,async:Le,autoCapitalize:null,autoComplete:Je,autoFocus:Le,autoPlay:Le,blocking:Je,capture:null,charSet:null,checked:Le,cite:null,className:Je,cols:se,colSpan:null,content:null,contentEditable:mt,controls:Le,controlsList:Je,coords:se|La,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Le,defer:Le,dir:null,dirName:null,disabled:Le,download:Bd,draggable:mt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Le,formTarget:null,headers:Je,height:se,hidden:Bd,high:se,href:null,hrefLang:null,htmlFor:Je,httpEquiv:Je,id:null,imageSizes:null,imageSrcSet:null,inert:Le,inputMode:null,integrity:null,is:null,isMap:Le,itemId:null,itemProp:Je,itemRef:Je,itemScope:Le,itemType:Je,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Le,low:se,manifest:null,max:null,maxLength:se,media:null,method:null,min:null,minLength:se,multiple:Le,muted:Le,name:null,nonce:null,noModule:Le,noValidate:Le,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:Le,optimum:se,pattern:null,ping:Je,placeholder:null,playsInline:Le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Le,referrerPolicy:null,rel:Je,required:Le,reversed:Le,rows:se,rowSpan:se,sandbox:Je,scope:null,scoped:Le,seamless:Le,selected:Le,shadowRootClonable:Le,shadowRootDelegatesFocus:Le,shadowRootMode:null,shape:null,size:se,sizes:null,slot:null,span:se,spellCheck:mt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:se,step:null,style:null,tabIndex:se,target:null,title:null,translate:null,type:null,typeMustMatch:Le,useMap:null,value:mt,width:se,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Je,axis:null,background:null,bgColor:null,border:se,borderColor:null,bottomMargin:se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Le,declare:Le,event:null,face:null,frame:null,frameBorder:null,hSpace:se,leftMargin:se,link:null,longDesc:null,lowSrc:null,marginHeight:se,marginWidth:se,noResize:Le,noHref:Le,noShade:Le,noWrap:Le,object:null,profile:null,prompt:null,rev:null,rightMargin:se,rules:null,scheme:null,scrolling:mt,standby:null,summary:null,text:null,topMargin:se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:se,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Le,disableRemotePlayback:Le,prefix:null,property:null,results:se,security:null,unselectable:null},space:"html",transform:Ov}),EC=za({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:un,accentHeight:se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:se,amplitude:se,arabicForm:null,ascent:se,attributeName:null,attributeType:null,azimuth:se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:se,by:null,calcMode:null,capHeight:se,className:Je,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:se,diffuseConstant:se,direction:null,display:null,dur:null,divisor:se,dominantBaseline:null,download:Le,dx:null,dy:null,edgeMode:null,editable:null,elevation:se,enableBackground:null,end:null,event:null,exponent:se,externalResourcesRequired:null,fill:null,fillOpacity:se,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:La,g2:La,glyphName:La,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:se,horizOriginX:se,horizOriginY:se,id:null,ideographic:se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:se,k:se,k1:se,k2:se,k3:se,k4:se,kernelMatrix:un,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:se,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:se,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:se,overlineThickness:se,paintOrder:null,panose1:null,path:null,pathLength:se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Je,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:se,pointsAtY:se,pointsAtZ:se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:un,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:un,rev:un,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:un,requiredFeatures:un,requiredFonts:un,requiredFormats:un,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:se,specularExponent:se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:se,strikethroughThickness:se,string:null,stroke:null,strokeDashArray:un,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:se,strokeOpacity:se,strokeWidth:null,style:null,surfaceScale:se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:un,tabIndex:se,tableValues:null,target:null,targetX:se,targetY:se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:un,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:se,underlineThickness:se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:se,values:null,vAlphabetic:se,vMathematical:se,vectorEffect:null,vHanging:se,vIdeographic:se,version:null,vertAdvY:se,vertOriginX:se,vertOriginY:se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Nv}),Mv=za({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()}}),Iv=za({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ov}),zv=za({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),xC={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"},CC=/[A-Z]/g,dy=/-[a-z]/g,wC=/^data[-\w.:]+$/i;function Hv(e,t){const i=Ud(t);let a=t,o=Jt;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&wC.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(dy,TC);a="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!dy.test(s)){let c=s.replace(CC,kC);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}o=Ch}return new o(a,t)}function kC(e){return"-"+e.toLowerCase()}function TC(e){return e.charAt(1).toUpperCase()}const Pv=Rv([Dv,SC,Mv,Iv,zv],"html"),uo=Rv([Dv,EC,Mv,Iv,zv],"svg");function Uv(e){return e.join(" ").trim()}var ya={},Kf,hy;function AC(){if(hy)return Kf;hy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,f=`
11
+ `,h="/",y="*",m="",b="comment",v="declaration";function S(D,C){if(typeof D!="string")throw new TypeError("First argument must be a string");if(!D)return[];C=C||{};var w=1,T=1;function I(K){var Y=K.match(t);Y&&(w+=Y.length);var H=K.lastIndexOf(f);T=~H?K.length-H:T+K.length}function B(){var K={line:w,column:T};return function(Y){return Y.position=new R(K),ne(),Y}}function R(K){this.start=K,this.end={line:w,column:T},this.source=C.source}R.prototype.content=D;function U(K){var Y=new Error(C.source+":"+w+":"+T+": "+K);if(Y.reason=K,Y.filename=C.source,Y.line=w,Y.column=T,Y.source=D,!C.silent)throw Y}function ie(K){var Y=K.exec(D);if(Y){var H=Y[0];return I(H),D=D.slice(H.length),Y}}function ne(){ie(i)}function ae(K){var Y;for(K=K||[];Y=W();)Y!==!1&&K.push(Y);return K}function W(){var K=B();if(!(h!=D.charAt(0)||y!=D.charAt(1))){for(var Y=2;m!=D.charAt(Y)&&(y!=D.charAt(Y)||h!=D.charAt(Y+1));)++Y;if(Y+=2,m===D.charAt(Y-1))return U("End of comment missing");var H=D.slice(2,Y-2);return T+=2,I(H),D=D.slice(Y),T+=2,K({type:b,comment:H})}}function F(){var K=B(),Y=ie(a);if(Y){if(W(),!ie(o))return U("property missing ':'");var H=ie(s),q=K({type:v,property:k(Y[0].replace(e,m)),value:H?k(H[0].replace(e,m)):m});return ie(c),q}}function J(){var K=[];ae(K);for(var Y;Y=F();)Y!==!1&&(K.push(Y),ae(K));return K}return ne(),J()}function k(D){return D?D.replace(d,m):m}return Kf=S,Kf}var py;function LC(){if(py)return ya;py=1;var e=ya&&ya.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(ya,"__esModule",{value:!0}),ya.default=i;const t=e(AC());function i(a,o){let s=null;if(!a||typeof a!="string")return s;const c=(0,t.default)(a),d=typeof o=="function";return c.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:y}=f;d?o(h,y,f):y&&(s=s||{},s[h]=y)}),s}return ya}var Ml={},my;function RC(){if(my)return Ml;my=1,Object.defineProperty(Ml,"__esModule",{value:!0}),Ml.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,i=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(h){return!h||i.test(h)||e.test(h)},c=function(h,y){return y.toUpperCase()},d=function(h,y){return"".concat(y,"-")},f=function(h,y){return y===void 0&&(y={}),s(h)?h:(h=h.toLowerCase(),y.reactCompat?h=h.replace(o,d):h=h.replace(a,d),h.replace(t,c))};return Ml.camelCase=f,Ml}var Il,gy;function DC(){if(gy)return Il;gy=1;var e=Il&&Il.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(LC()),i=RC();function a(o,s){var c={};return!o||typeof o!="string"||(0,t.default)(o,function(d,f){d&&f&&(c[(0,i.camelCase)(d,s)]=f)}),c}return a.default=a,Il=a,Il}var NC=DC();const OC=_v(NC),Bv=Vv("end"),wh=Vv("start");function Vv(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 MC(e){const t=wh(e),i=Bv(e);if(t&&i)return{start:t,end:i}}function ql(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?yy(e.position):"start"in e||"end"in e?yy(e):"line"in e||"column"in e?jd(e):""}function jd(e){return by(e&&e.line)+":"+by(e&&e.column)}function yy(e){return jd(e&&e.start)+"-"+jd(e&&e.end)}function by(e){return e&&typeof e=="number"?e:1}class Ut 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 f=a.indexOf(":");f===-1?s.ruleId=a:(s.source=a.slice(0,f),s.ruleId=a.slice(f+1))}if(!s.place&&s.ancestors&&s.ancestors){const f=s.ancestors[s.ancestors.length-1];f&&(s.place=f.position)}const d=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=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=d?d.line:void 0,this.name=ql(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}}Ut.prototype.file="";Ut.prototype.name="";Ut.prototype.reason="";Ut.prototype.message="";Ut.prototype.stack="";Ut.prototype.column=void 0;Ut.prototype.line=void 0;Ut.prototype.ancestors=void 0;Ut.prototype.cause=void 0;Ut.prototype.fatal=void 0;Ut.prototype.place=void 0;Ut.prototype.ruleId=void 0;Ut.prototype.source=void 0;const kh={}.hasOwnProperty,IC=new Map,zC=/[A-Z]/g,HC=new Set(["table","tbody","thead","tfoot","tr"]),PC=new Set(["td","th"]),jv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function UC(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=YC(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=qC(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"?uo:Pv,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Gv(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function Gv(e,t,i){if(t.type==="element")return BC(e,t,i);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return VC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return GC(e,t,i);if(t.type==="mdxjsEsm")return jC(e,t);if(t.type==="root")return $C(e,t,i);if(t.type==="text")return FC(e,t)}function BC(e,t,i){const a=e.schema;let o=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(o=uo,e.schema=o),e.ancestors.push(t);const s=Fv(e,t.tagName,!1),c=XC(e,t);let d=Ah(e,t);return HC.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!pu(f):!0})),$v(e,c,s,t),Th(c,d),e.ancestors.pop(),e.schema=a,e.create(t,s,c,i)}function VC(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)}Wl(e,t.position)}function jC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Wl(e,t.position)}function GC(e,t,i){const a=e.schema;let o=a;t.name==="svg"&&a.space==="html"&&(o=uo,e.schema=o),e.ancestors.push(t);const s=t.name===null?e.Fragment:Fv(e,t.name,!0),c=QC(e,t),d=Ah(e,t);return $v(e,c,s,t),Th(c,d),e.ancestors.pop(),e.schema=a,e.create(t,s,c,i)}function $C(e,t,i){const a={};return Th(a,Ah(e,t)),e.create(t,e.Fragment,a,i)}function FC(e,t){return t.value}function $v(e,t,i,a){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(t.node=a)}function Th(e,t){if(t.length>0){const i=t.length>1?t:t[0];i&&(e.children=i)}}function qC(e,t,i){return a;function a(o,s,c,d){const h=Array.isArray(c.children)?i:t;return d?h(s,c,d):h(s,c)}}function YC(e,t){return i;function i(a,o,s,c){const d=Array.isArray(s.children),f=wh(a);return t(o,s,c,d,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function XC(e,t){const i={};let a,o;for(o in t.properties)if(o!=="children"&&kh.call(t.properties,o)){const s=ZC(e,o,t.properties[o]);if(s){const[c,d]=s;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&PC.has(t.tagName)?a=d:i[c]=d}}if(a){const s=i.style||(i.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return i}function QC(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 d=c.properties[0];d.type,Object.assign(i,e.evaluater.evaluateExpression(d.argument))}else Wl(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 d=a.value.data.estree.body[0];d.type,s=e.evaluater.evaluateExpression(d.expression)}else Wl(e,t.position);else s=a.value===null?!0:a.value;i[o]=s}return i}function Ah(e,t){const i=[];let a=-1;const o=e.passKeys?new Map:IC;for(;++a<t.children.length;){const s=t.children[a];let c;if(e.passKeys){const f=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(f){const h=o.get(f)||0;c=f+"-"+h,o.set(f,h+1)}}const d=Gv(e,s,c);d!==void 0&&i.push(d)}return i}function ZC(e,t,i){const a=Hv(e.schema,t);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=a.commaSeparated?Lv(i):Uv(i)),a.property==="style"){let o=typeof i=="object"?i:KC(e,String(i));return e.stylePropertyNameCase==="css"&&(o=WC(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&a.space?xC[a.property]||a.property:a.attribute,i]}}function KC(e,t){try{return OC(t,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const a=i,o=new Ut("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=jv+"#cannot-parse-style-attribute",o}}function Fv(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 d=uy(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(s&&d.type==="Literal"),optional:!1}:d}a=c}else a=uy(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const o=a.value;return kh.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(a);Wl(e)}function Wl(e,t){const i=new Ut("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=jv+"#cannot-handle-mdx-estrees-without-createevaluater",i}function WC(e){const t={};let i;for(i in e)kh.call(e,i)&&(t[JC(i)]=e[i]);return t}function JC(e){let t=e.replace(zC,ew);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ew(e){return"-"+e.toLowerCase()}const Wf={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"]},tw={};function nw(e,t){const i=tw,a=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return qv(e,a,o)}function qv(e,t,i){if(iw(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 vy(e.children,t,i)}return Array.isArray(e)?vy(e,t,i):""}function vy(e,t,i){const a=[];let o=-1;for(;++o<e.length;)a[o]=qv(e[o],t,i);return a.join("")}function iw(e){return!!(e&&typeof e=="object")}const _y=document.createElement("i");function Lh(e){const t="&"+e+";";_y.innerHTML=t;const i=_y.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===t?!1:i}function Zn(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 En(e,t){return e.length>0?(Zn(e,e.length,0,t),e):t}const Sy={}.hasOwnProperty;function rw(e){const t={};let i=-1;for(;++i<e.length;)aw(t,e[i]);return t}function aw(e,t){let i;for(i in t){const o=(Sy.call(e,i)?e[i]:void 0)||(e[i]={}),s=t[i];let c;if(s)for(c in s){Sy.call(o,c)||(o[c]=[]);const d=s[c];lw(o[c],Array.isArray(d)?d:d?[d]:[])}}}function lw(e,t){let i=-1;const a=[];for(;++i<t.length;)(t[i].add==="after"?e:a).push(t[i]);Zn(e,0,0,a)}function Yv(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 Ra(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Xn=nr(/[A-Za-z]/),cn=nr(/[\dA-Za-z]/),ow=nr(/[#-'*+\--9=?A-Z^-~]/);function Gd(e){return e!==null&&(e<32||e===127)}const $d=nr(/\d/),sw=nr(/[\dA-Fa-f]/),uw=nr(/[!-/:-@[-`{-~]/);function Se(e){return e!==null&&e<-2}function Kt(e){return e!==null&&(e<0||e===32)}function je(e){return e===-2||e===-1||e===32}const cw=nr(new RegExp("\\p{P}|\\p{S}","u")),fw=nr(/\s/);function nr(e){return t;function t(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function Ha(e){const t=[];let i=-1,a=0,o=0;for(;++i<e.length;){const s=e.charCodeAt(i);let c="";if(s===37&&cn(e.charCodeAt(i+1))&&cn(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 d=e.charCodeAt(i+1);s<56320&&d>56319&&d<57344?(c=String.fromCharCode(s,d),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 et(e,t,i,a){const o=a?a-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(f){return je(f)?(e.enter(i),d(f)):t(f)}function d(f){return je(f)&&s++<o?(e.consume(f),d):(e.exit(i),t(f))}}const dw={tokenize:hw};function hw(e){const t=e.attempt(this.parser.constructs.contentInitial,a,o);let i;return t;function a(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),et(e,t,"linePrefix")}function o(d){return e.enter("paragraph"),s(d)}function s(d){const f=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=f),i=f,c(d)}function c(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Se(d)?(e.consume(d),e.exit("chunkText"),s):(e.consume(d),c)}}const pw={tokenize:mw},Ey={tokenize:gw};function mw(e){const t=this,i=[];let a=0,o,s,c;return d;function d(T){if(a<i.length){const I=i[a];return t.containerState=I[1],e.attempt(I[0].continuation,f,h)(T)}return h(T)}function f(T){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&w();const I=t.events.length;let B=I,R;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){R=t.events[B][1].end;break}C(a);let U=I;for(;U<t.events.length;)t.events[U][1].end={...R},U++;return Zn(t.events,B+1,0,t.events.slice(I)),t.events.length=U,h(T)}return d(T)}function h(T){if(a===i.length){if(!o)return b(T);if(o.currentConstruct&&o.currentConstruct.concrete)return S(T);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ey,y,m)(T)}function y(T){return o&&w(),C(a),b(T)}function m(T){return t.parser.lazy[t.now().line]=a!==i.length,c=t.now().offset,S(T)}function b(T){return t.containerState={},e.attempt(Ey,v,S)(T)}function v(T){return a++,i.push([t.currentConstruct,t.containerState]),b(T)}function S(T){if(T===null){o&&w(),C(0),e.consume(T);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),k(T)}function k(T){if(T===null){D(e.exit("chunkFlow"),!0),C(0),e.consume(T);return}return Se(T)?(e.consume(T),D(e.exit("chunkFlow")),a=0,t.interrupt=void 0,d):(e.consume(T),k)}function D(T,I){const B=t.sliceStream(T);if(I&&B.push(null),T.previous=s,s&&(s.next=T),s=T,o.defineSkip(T.start),o.write(B),t.parser.lazy[T.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 U=t.events.length;let ie=U,ne,ae;for(;ie--;)if(t.events[ie][0]==="exit"&&t.events[ie][1].type==="chunkFlow"){if(ne){ae=t.events[ie][1].end;break}ne=!0}for(C(a),R=U;R<t.events.length;)t.events[R][1].end={...ae},R++;Zn(t.events,ie+1,0,t.events.slice(U)),t.events.length=R}}function C(T){let I=i.length;for(;I-- >T;){const B=i[I];t.containerState=B[1],B[0].exit.call(t,e)}i.length=T}function w(){o.write([null]),s=void 0,o=void 0,t.containerState._closeFlow=void 0}}function gw(e,t,i){return et(e,e.attempt(this.parser.constructs.document,t,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function xy(e){if(e===null||Kt(e)||fw(e))return 1;if(cw(e))return 2}function Rh(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 Fd={name:"attention",resolveAll:yw,tokenize:bw};function yw(e,t){let i=-1,a,o,s,c,d,f,h,y;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;f=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 m={...e[a][1].end},b={...e[i][1].start};Cy(m,-f),Cy(b,f),c={type:f>1?"strongSequence":"emphasisSequence",start:m,end:{...e[a][1].end}},d={type:f>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:b},s={type:f>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[i][1].start}},o={type:f>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[a][1].end={...c.start},e[i][1].start={...d.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=En(h,[["enter",e[a][1],t],["exit",e[a][1],t]])),h=En(h,[["enter",o,t],["enter",c,t],["exit",c,t],["enter",s,t]]),h=En(h,Rh(t.parser.constructs.insideSpan.null,e.slice(a+1,i),t)),h=En(h,[["exit",s,t],["enter",d,t],["exit",d,t],["exit",o,t]]),e[i][1].end.offset-e[i][1].start.offset?(y=2,h=En(h,[["enter",e[i][1],t],["exit",e[i][1],t]])):y=0,Zn(e,a-1,i-a+3,h),i=a+h.length-y-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function bw(e,t){const i=this.parser.constructs.attentionMarkers.null,a=this.previous,o=xy(a);let s;return c;function c(f){return s=f,e.enter("attentionSequence"),d(f)}function d(f){if(f===s)return e.consume(f),d;const h=e.exit("attentionSequence"),y=xy(f),m=!y||y===2&&o||i.includes(f),b=!o||o===2&&y||i.includes(a);return h._open=!!(s===42?m:m&&(o||!b)),h._close=!!(s===42?b:b&&(y||!m)),t(f)}}function Cy(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const vw={name:"autolink",tokenize:_w};function _w(e,t,i){let a=0;return o;function o(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(v){return Xn(v)?(e.consume(v),c):v===64?i(v):h(v)}function c(v){return v===43||v===45||v===46||cn(v)?(a=1,d(v)):h(v)}function d(v){return v===58?(e.consume(v),a=0,f):(v===43||v===45||v===46||cn(v))&&a++<32?(e.consume(v),d):(a=0,h(v))}function f(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Gd(v)?i(v):(e.consume(v),f)}function h(v){return v===64?(e.consume(v),y):ow(v)?(e.consume(v),h):i(v)}function y(v){return cn(v)?m(v):i(v)}function m(v){return v===46?(e.consume(v),a=0,y):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):b(v)}function b(v){if((v===45||cn(v))&&a++<63){const S=v===45?b:m;return e.consume(v),S}return i(v)}}const mu={partial:!0,tokenize:Sw};function Sw(e,t,i){return a;function a(s){return je(s)?et(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||Se(s)?t(s):i(s)}}const Xv={continuation:{tokenize:xw},exit:Cw,name:"blockQuote",tokenize:Ew};function Ew(e,t,i){const a=this;return o;function o(c){if(c===62){const d=a.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),s}return i(c)}function s(c){return je(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function xw(e,t,i){const a=this;return o;function o(c){return je(c)?et(e,s,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return e.attempt(Xv,t,i)(c)}}function Cw(e){e.exit("blockQuote")}const Qv={name:"characterEscape",tokenize:ww};function ww(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 uw(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):i(s)}}const Zv={name:"characterReference",tokenize:kw};function kw(e,t,i){const a=this;let o=0,s,c;return d;function d(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),f}function f(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),s=31,c=cn,y(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,c=sw,y):(e.enter("characterReferenceValue"),s=7,c=$d,y(m))}function y(m){if(m===59&&o){const b=e.exit("characterReferenceValue");return c===cn&&!Lh(a.sliceSerialize(b))?i(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(m)&&o++<s?(e.consume(m),y):i(m)}}const wy={partial:!0,tokenize:Aw},ky={concrete:!0,name:"codeFenced",tokenize:Tw};function Tw(e,t,i){const a=this,o={partial:!0,tokenize:B};let s=0,c=0,d;return f;function f(R){return h(R)}function h(R){const U=a.events[a.events.length-1];return s=U&&U[1].type==="linePrefix"?U[2].sliceSerialize(U[1],!0).length:0,d=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(R)}function y(R){return R===d?(c++,e.consume(R),y):c<3?i(R):(e.exit("codeFencedFenceSequence"),je(R)?et(e,m,"whitespace")(R):m(R))}function m(R){return R===null||Se(R)?(e.exit("codeFencedFence"),a.interrupt?t(R):e.check(wy,k,I)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(R))}function b(R){return R===null||Se(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(R)):je(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),et(e,v,"whitespace")(R)):R===96&&R===d?i(R):(e.consume(R),b)}function v(R){return R===null||Se(R)?m(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"),m(R)):R===96&&R===d?i(R):(e.consume(R),S)}function k(R){return e.attempt(o,I,D)(R)}function D(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),C}function C(R){return s>0&&je(R)?et(e,w,"linePrefix",s+1)(R):w(R)}function w(R){return R===null||Se(R)?e.check(wy,k,I)(R):(e.enter("codeFlowValue"),T(R))}function T(R){return R===null||Se(R)?(e.exit("codeFlowValue"),w(R)):(e.consume(R),T)}function I(R){return e.exit("codeFenced"),t(R)}function B(R,U,ie){let ne=0;return ae;function ae(Y){return R.enter("lineEnding"),R.consume(Y),R.exit("lineEnding"),W}function W(Y){return R.enter("codeFencedFence"),je(Y)?et(R,F,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):F(Y)}function F(Y){return Y===d?(R.enter("codeFencedFenceSequence"),J(Y)):ie(Y)}function J(Y){return Y===d?(ne++,R.consume(Y),J):ne>=c?(R.exit("codeFencedFenceSequence"),je(Y)?et(R,K,"whitespace")(Y):K(Y)):ie(Y)}function K(Y){return Y===null||Se(Y)?(R.exit("codeFencedFence"),U(Y)):ie(Y)}}}function Aw(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 Jf={name:"codeIndented",tokenize:Rw},Lw={partial:!0,tokenize:Dw};function Rw(e,t,i){const a=this;return o;function o(h){return e.enter("codeIndented"),et(e,s,"linePrefix",5)(h)}function s(h){const y=a.events[a.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(h):i(h)}function c(h){return h===null?f(h):Se(h)?e.attempt(Lw,c,f)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||Se(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),d)}function f(h){return e.exit("codeIndented"),t(h)}}function Dw(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):et(e,s,"linePrefix",5)(c)}function s(c){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):Se(c)?o(c):i(c)}}const Nw={name:"codeText",previous:Mw,resolve:Ow,tokenize:Iw};function Ow(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 Mw(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Iw(e,t,i){let a=0,o,s;return c;function c(m){return e.enter("codeText"),e.enter("codeTextSequence"),d(m)}function d(m){return m===96?(e.consume(m),a++,d):(e.exit("codeTextSequence"),f(m))}function f(m){return m===null?i(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),f):m===96?(s=e.enter("codeTextSequence"),o=0,y(m)):Se(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||Se(m)?(e.exit("codeTextData"),f(m)):(e.consume(m),h)}function y(m){return m===96?(e.consume(m),o++,y):o===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(s.type="codeTextData",h(m))}}class zw{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&&zl(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),zl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),zl(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);zl(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);zl(this.left,i.reverse())}}}function zl(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 Kv(e){const t={};let i=-1,a,o,s,c,d,f,h;const y=new zw(e);for(;++i<y.length;){for(;i in t;)i=t[i];if(a=y.get(i),i&&a[1].type==="chunkFlow"&&y.get(i-1)[1].type==="listItemPrefix"&&(f=a[1]._tokenizer.events,s=0,s<f.length&&f[s][1].type==="lineEndingBlank"&&(s+=2),s<f.length&&f[s][1].type==="content"))for(;++s<f.length&&f[s][1].type!=="content";)f[s][1].type==="chunkText"&&(f[s][1]._isInFirstContentOfListItem=!0,s++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,Hw(y,i)),i=t[i],h=!0);else if(a[1]._container){for(s=i,o=void 0;s--;)if(c=y.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(y.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={...y.get(o)[1].start},d=y.slice(o,i),d.unshift(a),y.splice(o,i-o+1,d))}}return Zn(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!h}function Hw(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 d=c.events,f=[],h={};let y,m,b=-1,v=i,S=0,k=0;const D=[k];for(;v;){for(;e.get(++o)[1]!==v;);s.push(o),v._tokenizer||(y=a.sliceStream(v),v.next||y.push(null),m&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),m=v,v=v.next}for(v=i;++b<d.length;)d[b][0]==="exit"&&d[b-1][0]==="enter"&&d[b][1].type===d[b-1][1].type&&d[b][1].start.line!==d[b][1].end.line&&(k=b+1,D.push(k),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):D.pop(),b=D.length;b--;){const C=d.slice(D[b],D[b+1]),w=s.pop();f.push([w,w+C.length-1]),e.splice(w,2,C)}for(f.reverse(),b=-1;++b<f.length;)h[S+f[b][0]]=S+f[b][1],S+=f[b][1]-f[b][0]-1;return h}const Pw={resolve:Bw,tokenize:Vw},Uw={partial:!0,tokenize:jw};function Bw(e){return Kv(e),e}function Vw(e,t){let i;return a;function a(d){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),o(d)}function o(d){return d===null?s(d):Se(d)?e.check(Uw,c,s)(d):(e.consume(d),o)}function s(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function c(d){return e.consume(d),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}function jw(e,t,i){const a=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),et(e,s,"linePrefix")}function s(c){if(c===null||Se(c))return i(c);const d=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,i,t)(c)}}function Wv(e,t,i,a,o,s,c,d,f){const h=f||Number.POSITIVE_INFINITY;let y=0;return m;function m(C){return C===60?(e.enter(a),e.enter(o),e.enter(s),e.consume(C),e.exit(s),b):C===null||C===32||C===41||Gd(C)?i(C):(e.enter(a),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),k(C))}function b(C){return C===62?(e.enter(s),e.consume(C),e.exit(s),e.exit(o),e.exit(a),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),v(C))}function v(C){return C===62?(e.exit("chunkString"),e.exit(d),b(C)):C===null||C===60||Se(C)?i(C):(e.consume(C),C===92?S:v)}function S(C){return C===60||C===62||C===92?(e.consume(C),v):v(C)}function k(C){return!y&&(C===null||C===41||Kt(C))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(a),t(C)):y<h&&C===40?(e.consume(C),y++,k):C===41?(e.consume(C),y--,k):C===null||C===32||C===40||Gd(C)?i(C):(e.consume(C),C===92?D:k)}function D(C){return C===40||C===41||C===92?(e.consume(C),k):k(C)}}function Jv(e,t,i,a,o,s){const c=this;let d=0,f;return h;function h(v){return e.enter(a),e.enter(o),e.consume(v),e.exit(o),e.enter(s),y}function y(v){return d>999||v===null||v===91||v===93&&!f||v===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?i(v):v===93?(e.exit(s),e.enter(o),e.consume(v),e.exit(o),e.exit(a),t):Se(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===null||v===91||v===93||Se(v)||d++>999?(e.exit("chunkString"),y(v)):(e.consume(v),f||(f=!je(v)),v===92?b:m)}function b(v){return v===91||v===92||v===93?(e.consume(v),d++,m):m(v)}}function e_(e,t,i,a,o,s){let c;return d;function d(b){return b===34||b===39||b===40?(e.enter(a),e.enter(o),e.consume(b),e.exit(o),c=b===40?41:b,f):i(b)}function f(b){return b===c?(e.enter(o),e.consume(b),e.exit(o),e.exit(a),t):(e.enter(s),h(b))}function h(b){return b===c?(e.exit(s),f(c)):b===null?i(b):Se(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),et(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===c||b===null||Se(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?m:y)}function m(b){return b===c||b===92?(e.consume(b),y):y(b)}}function Yl(e,t){let i;return a;function a(o){return Se(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i=!0,a):je(o)?et(e,a,i?"linePrefix":"lineSuffix")(o):t(o)}}const Gw={name:"definition",tokenize:Fw},$w={partial:!0,tokenize:qw};function Fw(e,t,i){const a=this;let o;return s;function s(v){return e.enter("definition"),c(v)}function c(v){return Jv.call(a,e,d,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function d(v){return o=Ra(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),f):i(v)}function f(v){return Kt(v)?Yl(e,h)(v):h(v)}function h(v){return Wv(e,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function y(v){return e.attempt($w,m,m)(v)}function m(v){return je(v)?et(e,b,"whitespace")(v):b(v)}function b(v){return v===null||Se(v)?(e.exit("definition"),a.parser.defined.push(o),t(v)):i(v)}}function qw(e,t,i){return a;function a(d){return Kt(d)?Yl(e,o)(d):i(d)}function o(d){return e_(e,s,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function s(d){return je(d)?et(e,c,"whitespace")(d):c(d)}function c(d){return d===null||Se(d)?t(d):i(d)}}const Yw={name:"hardBreakEscape",tokenize:Xw};function Xw(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 Qw={name:"headingAtx",resolve:Zw,tokenize:Kw};function Zw(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"},Zn(e,a,i-a+1,[["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t]])),e}function Kw(e,t,i){let a=0;return o;function o(y){return e.enter("atxHeading"),s(y)}function s(y){return e.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&a++<6?(e.consume(y),c):y===null||Kt(y)?(e.exit("atxHeadingSequence"),d(y)):i(y)}function d(y){return y===35?(e.enter("atxHeadingSequence"),f(y)):y===null||Se(y)?(e.exit("atxHeading"),t(y)):je(y)?et(e,d,"whitespace")(y):(e.enter("atxHeadingText"),h(y))}function f(y){return y===35?(e.consume(y),f):(e.exit("atxHeadingSequence"),d(y))}function h(y){return y===null||y===35||Kt(y)?(e.exit("atxHeadingText"),d(y)):(e.consume(y),h)}}const Ww=["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"],Ty=["pre","script","style","textarea"],Jw={concrete:!0,name:"htmlFlow",resolveTo:nk,tokenize:ik},ek={partial:!0,tokenize:ak},tk={partial:!0,tokenize:rk};function nk(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 ik(e,t,i){const a=this;let o,s,c,d,f;return h;function h(A){return y(A)}function y(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),m}function m(A){return A===33?(e.consume(A),b):A===47?(e.consume(A),s=!0,k):A===63?(e.consume(A),o=3,a.interrupt?t:L):Xn(A)?(e.consume(A),c=String.fromCharCode(A),D):i(A)}function b(A){return A===45?(e.consume(A),o=2,v):A===91?(e.consume(A),o=5,d=0,S):Xn(A)?(e.consume(A),o=4,a.interrupt?t:L):i(A)}function v(A){return A===45?(e.consume(A),a.interrupt?t:L):i(A)}function S(A){const ce="CDATA[";return A===ce.charCodeAt(d++)?(e.consume(A),d===ce.length?a.interrupt?t:F:S):i(A)}function k(A){return Xn(A)?(e.consume(A),c=String.fromCharCode(A),D):i(A)}function D(A){if(A===null||A===47||A===62||Kt(A)){const ce=A===47,me=c.toLowerCase();return!ce&&!s&&Ty.includes(me)?(o=1,a.interrupt?t(A):F(A)):Ww.includes(c.toLowerCase())?(o=6,ce?(e.consume(A),C):a.interrupt?t(A):F(A)):(o=7,a.interrupt&&!a.parser.lazy[a.now().line]?i(A):s?w(A):T(A))}return A===45||cn(A)?(e.consume(A),c+=String.fromCharCode(A),D):i(A)}function C(A){return A===62?(e.consume(A),a.interrupt?t:F):i(A)}function w(A){return je(A)?(e.consume(A),w):ae(A)}function T(A){return A===47?(e.consume(A),ae):A===58||A===95||Xn(A)?(e.consume(A),I):je(A)?(e.consume(A),T):ae(A)}function I(A){return A===45||A===46||A===58||A===95||cn(A)?(e.consume(A),I):B(A)}function B(A){return A===61?(e.consume(A),R):je(A)?(e.consume(A),B):T(A)}function R(A){return A===null||A===60||A===61||A===62||A===96?i(A):A===34||A===39?(e.consume(A),f=A,U):je(A)?(e.consume(A),R):ie(A)}function U(A){return A===f?(e.consume(A),f=null,ne):A===null||Se(A)?i(A):(e.consume(A),U)}function ie(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||Kt(A)?B(A):(e.consume(A),ie)}function ne(A){return A===47||A===62||je(A)?T(A):i(A)}function ae(A){return A===62?(e.consume(A),W):i(A)}function W(A){return A===null||Se(A)?F(A):je(A)?(e.consume(A),W):i(A)}function F(A){return A===45&&o===2?(e.consume(A),H):A===60&&o===1?(e.consume(A),q):A===62&&o===4?(e.consume(A),O):A===63&&o===3?(e.consume(A),L):A===93&&o===5?(e.consume(A),de):Se(A)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(ek,X,J)(A)):A===null||Se(A)?(e.exit("htmlFlowData"),J(A)):(e.consume(A),F)}function J(A){return e.check(tk,K,X)(A)}function K(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),Y}function Y(A){return A===null||Se(A)?J(A):(e.enter("htmlFlowData"),F(A))}function H(A){return A===45?(e.consume(A),L):F(A)}function q(A){return A===47?(e.consume(A),c="",oe):F(A)}function oe(A){if(A===62){const ce=c.toLowerCase();return Ty.includes(ce)?(e.consume(A),O):F(A)}return Xn(A)&&c.length<8?(e.consume(A),c+=String.fromCharCode(A),oe):F(A)}function de(A){return A===93?(e.consume(A),L):F(A)}function L(A){return A===62?(e.consume(A),O):A===45&&o===2?(e.consume(A),L):F(A)}function O(A){return A===null||Se(A)?(e.exit("htmlFlowData"),X(A)):(e.consume(A),O)}function X(A){return e.exit("htmlFlow"),t(A)}}function rk(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 ak(e,t,i){return a;function a(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(mu,t,i)}}const lk={name:"htmlText",tokenize:ok};function ok(e,t,i){const a=this;let o,s,c;return d;function d(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),f}function f(L){return L===33?(e.consume(L),h):L===47?(e.consume(L),B):L===63?(e.consume(L),T):Xn(L)?(e.consume(L),ie):i(L)}function h(L){return L===45?(e.consume(L),y):L===91?(e.consume(L),s=0,S):Xn(L)?(e.consume(L),w):i(L)}function y(L){return L===45?(e.consume(L),v):i(L)}function m(L){return L===null?i(L):L===45?(e.consume(L),b):Se(L)?(c=m,q(L)):(e.consume(L),m)}function b(L){return L===45?(e.consume(L),v):m(L)}function v(L){return L===62?H(L):L===45?b(L):m(L)}function S(L){const O="CDATA[";return L===O.charCodeAt(s++)?(e.consume(L),s===O.length?k:S):i(L)}function k(L){return L===null?i(L):L===93?(e.consume(L),D):Se(L)?(c=k,q(L)):(e.consume(L),k)}function D(L){return L===93?(e.consume(L),C):k(L)}function C(L){return L===62?H(L):L===93?(e.consume(L),C):k(L)}function w(L){return L===null||L===62?H(L):Se(L)?(c=w,q(L)):(e.consume(L),w)}function T(L){return L===null?i(L):L===63?(e.consume(L),I):Se(L)?(c=T,q(L)):(e.consume(L),T)}function I(L){return L===62?H(L):T(L)}function B(L){return Xn(L)?(e.consume(L),R):i(L)}function R(L){return L===45||cn(L)?(e.consume(L),R):U(L)}function U(L){return Se(L)?(c=U,q(L)):je(L)?(e.consume(L),U):H(L)}function ie(L){return L===45||cn(L)?(e.consume(L),ie):L===47||L===62||Kt(L)?ne(L):i(L)}function ne(L){return L===47?(e.consume(L),H):L===58||L===95||Xn(L)?(e.consume(L),ae):Se(L)?(c=ne,q(L)):je(L)?(e.consume(L),ne):H(L)}function ae(L){return L===45||L===46||L===58||L===95||cn(L)?(e.consume(L),ae):W(L)}function W(L){return L===61?(e.consume(L),F):Se(L)?(c=W,q(L)):je(L)?(e.consume(L),W):ne(L)}function F(L){return L===null||L===60||L===61||L===62||L===96?i(L):L===34||L===39?(e.consume(L),o=L,J):Se(L)?(c=F,q(L)):je(L)?(e.consume(L),F):(e.consume(L),K)}function J(L){return L===o?(e.consume(L),o=void 0,Y):L===null?i(L):Se(L)?(c=J,q(L)):(e.consume(L),J)}function K(L){return L===null||L===34||L===39||L===60||L===61||L===96?i(L):L===47||L===62||Kt(L)?ne(L):(e.consume(L),K)}function Y(L){return L===47||L===62||Kt(L)?ne(L):i(L)}function H(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):i(L)}function q(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),oe}function oe(L){return je(L)?et(e,de,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):de(L)}function de(L){return e.enter("htmlTextData"),c(L)}}const Dh={name:"labelEnd",resolveAll:fk,resolveTo:dk,tokenize:hk},sk={tokenize:pk},uk={tokenize:mk},ck={tokenize:gk};function fk(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&&Zn(e,0,e.length,i),e}function dk(e,t){let i=e.length,a=0,o,s,c,d;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 f={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[s][1].start},end:{...e[c][1].end}},y={type:"labelText",start:{...e[s+a+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",f,t],["enter",h,t]],d=En(d,e.slice(s+1,s+a+3)),d=En(d,[["enter",y,t]]),d=En(d,Rh(t.parser.constructs.insideSpan.null,e.slice(s+a+4,c-3),t)),d=En(d,[["exit",y,t],e[c-2],e[c-1],["exit",h,t]]),d=En(d,e.slice(c+1)),d=En(d,[["exit",f,t]]),Zn(e,s,e.length,d),e}function hk(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 d;function d(b){return s?s._inactive?m(b):(c=a.parser.defined.includes(Ra(a.sliceSerialize({start:s.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),f):i(b)}function f(b){return b===40?e.attempt(sk,y,c?y:m)(b):b===91?e.attempt(uk,y,c?h:m)(b):c?y(b):m(b)}function h(b){return e.attempt(ck,y,m)(b)}function y(b){return t(b)}function m(b){return s._balanced=!0,i(b)}}function pk(e,t,i){return a;function a(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return Kt(m)?Yl(e,s)(m):s(m)}function s(m){return m===41?y(m):Wv(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function c(m){return Kt(m)?Yl(e,f)(m):y(m)}function d(m){return i(m)}function f(m){return m===34||m===39||m===40?e_(e,h,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):y(m)}function h(m){return Kt(m)?Yl(e,y)(m):y(m)}function y(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):i(m)}}function mk(e,t,i){const a=this;return o;function o(d){return Jv.call(a,e,s,c,"reference","referenceMarker","referenceString")(d)}function s(d){return a.parser.defined.includes(Ra(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(d):i(d)}function c(d){return i(d)}}function gk(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 yk={name:"labelStartImage",resolveAll:Dh.resolveAll,tokenize:bk};function bk(e,t,i){const a=this;return o;function o(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),s}function s(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),c):i(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in a.parser.constructs?i(d):t(d)}}const vk={name:"labelStartLink",resolveAll:Dh.resolveAll,tokenize:_k};function _k(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 ed={name:"lineEnding",tokenize:Sk};function Sk(e,t){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),et(e,t,"linePrefix")}}const Xs={name:"thematicBreak",tokenize:Ek};function Ek(e,t,i){let a=0,o;return s;function s(h){return e.enter("thematicBreak"),c(h)}function c(h){return o=h,d(h)}function d(h){return h===o?(e.enter("thematicBreakSequence"),f(h)):a>=3&&(h===null||Se(h))?(e.exit("thematicBreak"),t(h)):i(h)}function f(h){return h===o?(e.consume(h),a++,f):(e.exit("thematicBreakSequence"),je(h)?et(e,d,"whitespace")(h):d(h))}}const Zt={continuation:{tokenize:kk},exit:Ak,name:"list",tokenize:wk},xk={partial:!0,tokenize:Lk},Ck={partial:!0,tokenize:Tk};function wk(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 d;function d(v){const S=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:$d(v)){if(a.containerState.type||(a.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Xs,i,h)(v):h(v);if(!a.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(v)}return i(v)}function f(v){return $d(v)&&++c<10?(e.consume(v),f):(!a.interrupt||c<2)&&(a.containerState.marker?v===a.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):i(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,e.check(mu,a.interrupt?i:y,e.attempt(xk,b,m))}function y(v){return a.containerState.initialBlankLine=!0,s++,b(v)}function m(v){return je(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),b):i(v)}function b(v){return a.containerState.size=s+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function kk(e,t,i){const a=this;return a.containerState._closeFlow=void 0,e.check(mu,o,s);function o(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,et(e,t,"listItemIndent",a.containerState.size+1)(d)}function s(d){return a.containerState.furtherBlankLines||!je(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(Ck,t,c)(d))}function c(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,et(e,e.attempt(Zt,t,i),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function Tk(e,t,i){const a=this;return et(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 Ak(e){e.exit(this.containerState.type)}function Lk(e,t,i){const a=this;return et(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!je(s)&&c&&c[1].type==="listItemPrefixWhitespace"?t(s):i(s)}}const Ay={name:"setextUnderline",resolveTo:Rk,tokenize:Dk};function Rk(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 Dk(e,t,i){const a=this;let o;return s;function s(h){let y=a.events.length,m;for(;y--;)if(a.events[y][1].type!=="lineEnding"&&a.events[y][1].type!=="linePrefix"&&a.events[y][1].type!=="content"){m=a.events[y][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||m)?(e.enter("setextHeadingLine"),o=h,c(h)):i(h)}function c(h){return e.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===o?(e.consume(h),d):(e.exit("setextHeadingLineSequence"),je(h)?et(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||Se(h)?(e.exit("setextHeadingLine"),t(h)):i(h)}}const Nk={tokenize:Ok};function Ok(e){const t=this,i=e.attempt(mu,a,e.attempt(this.parser.constructs.flowInitial,o,et(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Pw,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 Mk={resolveAll:n_()},Ik=t_("string"),zk=t_("text");function t_(e){return{resolveAll:n_(e==="text"?Hk:void 0),tokenize:t};function t(i){const a=this,o=this.parser.constructs[e],s=i.attempt(o,c,d);return c;function c(y){return h(y)?s(y):d(y)}function d(y){if(y===null){i.consume(y);return}return i.enter("data"),i.consume(y),f}function f(y){return h(y)?(i.exit("data"),s(y)):(i.consume(y),f)}function h(y){if(y===null)return!0;const m=o[y];let b=-1;if(m)for(;++b<m.length;){const v=m[b];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function n_(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 Hk(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,d=0,f;for(;s--;){const h=o[s];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(h===-2)f=!0,d++;else if(h!==-1){s++;break}}if(t._contentTypeTextTrailing&&i===e.length&&(d=0),d){const h={type:i===e.length||f||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:a.start._bufferIndex+c,_index:a.start._index+s,line:a.end.line,column:a.end.column-d,offset:a.end.offset-d},end:{...a.end}};a.end={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(e.splice(i,0,["enter",h,t],["exit",h,t]),i+=2)}i++}return e}const Pk={42:Zt,43:Zt,45:Zt,48:Zt,49:Zt,50:Zt,51:Zt,52:Zt,53:Zt,54:Zt,55:Zt,56:Zt,57:Zt,62:Xv},Uk={91:Gw},Bk={[-2]:Jf,[-1]:Jf,32:Jf},Vk={35:Qw,42:Xs,45:[Ay,Xs],60:Jw,61:Ay,95:Xs,96:ky,126:ky},jk={38:Zv,92:Qv},Gk={[-5]:ed,[-4]:ed,[-3]:ed,33:yk,38:Zv,42:Fd,60:[vw,lk],91:vk,92:[Yw,Qv],93:Dh,95:Fd,96:Nw},$k={null:[Fd,Mk]},Fk={null:[42,95]},qk={null:[]},Yk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Fk,contentInitial:Uk,disable:qk,document:Pk,flow:Vk,flowInitial:Bk,insideSpan:$k,string:jk,text:Gk},Symbol.toStringTag,{value:"Module"}));function Xk(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=[],d=[];const f={attempt:U(B),check:U(R),consume:w,enter:T,exit:I,interrupt:U(R,{interrupt:!0})},h={code:null,containerState:{},defineSkip:k,events:[],now:S,parser:e,previous:null,sliceSerialize:b,sliceStream:v,write:m};let y=t.tokenize.call(h,f);return t.resolveAll&&s.push(t),h;function m(W){return c=En(c,W),D(),c[c.length-1]!==null?[]:(ie(t,0),h.events=Rh(s,h.events,h),h.events)}function b(W,F){return Zk(v(W),F)}function v(W){return Qk(c,W)}function S(){const{_bufferIndex:W,_index:F,line:J,column:K,offset:Y}=a;return{_bufferIndex:W,_index:F,line:J,column:K,offset:Y}}function k(W){o[W.line]=W.column,ae()}function D(){let W;for(;a._index<c.length;){const F=c[a._index];if(typeof F=="string")for(W=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===W&&a._bufferIndex<F.length;)C(F.charCodeAt(a._bufferIndex));else C(F)}}function C(W){y=y(W)}function w(W){Se(W)?(a.line++,a.column=1,a.offset+=W===-3?2:1,ae()):W!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=W}function T(W,F){const J=F||{};return J.type=W,J.start=S(),h.events.push(["enter",J,h]),d.push(J),J}function I(W){const F=d.pop();return F.end=S(),h.events.push(["exit",F,h]),F}function B(W,F){ie(W,F.from)}function R(W,F){F.restore()}function U(W,F){return J;function J(K,Y,H){let q,oe,de,L;return Array.isArray(K)?X(K):"tokenize"in K?X([K]):O(K);function O(he){return Ee;function Ee(ze){const ge=ze!==null&&he[ze],He=ze!==null&&he.null,$e=[...Array.isArray(ge)?ge:ge?[ge]:[],...Array.isArray(He)?He:He?[He]:[]];return X($e)(ze)}}function X(he){return q=he,oe=0,he.length===0?H:A(he[oe])}function A(he){return Ee;function Ee(ze){return L=ne(),de=he,he.partial||(h.currentConstruct=he),he.name&&h.parser.constructs.disable.null.includes(he.name)?me():he.tokenize.call(F?Object.assign(Object.create(h),F):h,f,ce,me)(ze)}}function ce(he){return W(de,L),Y}function me(he){return L.restore(),++oe<q.length?A(q[oe]):H}}}function ie(W,F){W.resolveAll&&!s.includes(W)&&s.push(W),W.resolve&&Zn(h.events,F,h.events.length-F,W.resolve(h.events.slice(F),h)),W.resolveTo&&(h.events=W.resolveTo(h.events,h))}function ne(){const W=S(),F=h.previous,J=h.currentConstruct,K=h.events.length,Y=Array.from(d);return{from:K,restore:H};function H(){a=W,h.previous=F,h.currentConstruct=J,h.events.length=K,d=Y,ae()}}function ae(){a.line in o&&a.column<2&&(a.column=o[a.line],a.offset+=o[a.line]-1)}}function Qk(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 d=c[0];typeof d=="string"?c[0]=d.slice(a):c.shift()}s>0&&c.push(e[o].slice(0,s))}return c}function Zk(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 Kk(e){const a={constructs:rw([Yk,...(e||{}).extensions||[]]),content:o(dw),defined:[],document:o(pw),flow:o(Nk),lazy:{},string:o(Ik),text:o(zk)};return a;function o(s){return c;function c(d){return Xk(a,s,d)}}}function Wk(e){for(;!Kv(e););return e}const Ly=/[\0\t\n\r]/g;function Jk(){let e=1,t="",i=!0,a;return o;function o(s,c,d){const f=[];let h,y,m,b,v;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),m=0,t="",i&&(s.charCodeAt(0)===65279&&m++,i=void 0);m<s.length;){if(Ly.lastIndex=m,h=Ly.exec(s),b=h&&h.index!==void 0?h.index:s.length,v=s.charCodeAt(b),!h){t=s.slice(m);break}if(v===10&&m===b&&a)f.push(-3),a=void 0;else switch(a&&(f.push(-5),a=void 0),m<b&&(f.push(s.slice(m,b)),e+=b-m),v){case 0:{f.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,f.push(-2);e++<y;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:a=!0,e=1}m=b+1}return d&&(a&&f.push(-5),t&&f.push(t),f.push(null)),f}}const eT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tT(e){return e.replace(eT,nT)}function nT(e,t,i){if(t)return t;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),s=o===120||o===88;return Yv(i.slice(s?2:1),s?16:10)}return Lh(i)||e}const i_={}.hasOwnProperty;function iT(e,t,i){return t&&typeof t=="object"&&(i=t,t=void 0),rT(i)(Wk(Kk(i).document().write(Jk()(e,t,!0))))}function rT(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(xi),autolinkProtocol:ne,autolinkEmail:ne,atxHeading:s(jt),blockQuote:s(He),characterEscape:ne,characterReference:ne,codeFenced:s($e),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s($e,c),codeText:s(At,c),codeTextData:ne,data:ne,codeFlowValue:ne,definition:s(Et),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(We),hardBreakEscape:s(rt),hardBreakTrailing:s(rt),htmlFlow:s(In,c),htmlFlowData:ne,htmlText:s(In,c),htmlTextData:ne,image:s(zn),label:c,link:s(xi),listItem:s(ir),listItemValue:b,listOrdered:s(Ci,m),listUnordered:s(Ci),paragraph:s(Va),reference:A,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(jt),strong:s(ja),thematicBreak:s(Lr)},exit:{atxHeading:f(),atxHeadingSequence:B,autolink:f(),autolinkEmail:ge,autolinkProtocol:ze,blockQuote:f(),characterEscapeValue:ae,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:he,characterReference:Ee,codeFenced:f(D),codeFencedFence:k,codeFencedFenceInfo:v,codeFencedFenceMeta:S,codeFlowValue:ae,codeIndented:f(C),codeText:f(Y),codeTextData:ae,data:ae,definition:f(),definitionDestinationString:I,definitionLabelString:w,definitionTitleString:T,emphasis:f(),hardBreakEscape:f(F),hardBreakTrailing:f(F),htmlFlow:f(J),htmlFlowData:ae,htmlText:f(K),htmlTextData:ae,image:f(q),label:de,labelText:oe,lineEnding:W,link:f(H),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:ce,resourceDestinationString:L,resourceTitleString:O,resource:X,setextHeading:f(ie),setextHeadingLineSequence:U,setextHeadingText:R,strong:f(),thematicBreak:f()}};r_(t,(e||{}).mdastExtensions||[]);const i={};return a;function a(Q){let ue={type:"root",children:[]};const _e={stack:[ue],tokenStack:[],config:t,enter:d,exit:h,buffer:c,resume:y,data:i},Te=[];let Pe=-1;for(;++Pe<Q.length;)if(Q[Pe][1].type==="listOrdered"||Q[Pe][1].type==="listUnordered")if(Q[Pe][0]==="enter")Te.push(Pe);else{const Bt=Te.pop();Pe=o(Q,Bt,Pe)}for(Pe=-1;++Pe<Q.length;){const Bt=t[Q[Pe][0]];i_.call(Bt,Q[Pe][1].type)&&Bt[Q[Pe][1].type].call(Object.assign({sliceSerialize:Q[Pe][2].sliceSerialize},_e),Q[Pe][1])}if(_e.tokenStack.length>0){const Bt=_e.tokenStack[_e.tokenStack.length-1];(Bt[1]||Ry).call(_e,void 0,Bt[0])}for(ue.position={start:Qi(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:Qi(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 Te=ue-1,Pe=-1,Bt=!1,Tn,xt,at,It;for(;++Te<=_e;){const Ge=Q[Te];switch(Ge[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ge[0]==="enter"?Pe++:Pe--,It=void 0;break}case"lineEndingBlank":{Ge[0]==="enter"&&(Tn&&!It&&!Pe&&!at&&(at=Te),It=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:It=void 0}if(!Pe&&Ge[0]==="enter"&&Ge[1].type==="listItemPrefix"||Pe===-1&&Ge[0]==="exit"&&(Ge[1].type==="listUnordered"||Ge[1].type==="listOrdered")){if(Tn){let Hn=Te;for(xt=void 0;Hn--;){const en=Q[Hn];if(en[1].type==="lineEnding"||en[1].type==="lineEndingBlank"){if(en[0]==="exit")continue;xt&&(Q[xt][1].type="lineEndingBlank",Bt=!0),en[1].type="lineEnding",xt=Hn}else if(!(en[1].type==="linePrefix"||en[1].type==="blockQuotePrefix"||en[1].type==="blockQuotePrefixWhitespace"||en[1].type==="blockQuoteMarker"||en[1].type==="listItemIndent"))break}at&&(!xt||at<xt)&&(Tn._spread=!0),Tn.end=Object.assign({},xt?Q[xt][1].start:Ge[1].end),Q.splice(xt||Te,0,["exit",Tn,Ge[2]]),Te++,_e++}if(Ge[1].type==="listItemPrefix"){const Hn={type:"listItem",_spread:!1,start:Object.assign({},Ge[1].start),end:void 0};Tn=Hn,Q.splice(Te,0,["enter",Hn,Ge[2]]),Te++,_e++,at=void 0,It=!0}}}return Q[ue][1]._spread=Bt,_e}function s(Q,ue){return _e;function _e(Te){d.call(this,Q(Te),Te),ue&&ue.call(this,Te)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(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:Qi(ue.start),end:void 0}}function f(Q){return ue;function ue(_e){Q&&Q.call(this,_e),h.call(this,_e)}}function h(Q,ue){const _e=this.stack.pop(),Te=this.tokenStack.pop();if(Te)Te[0].type!==Q.type&&(ue?ue.call(this,Q,Te[0]):(Te[1]||Ry).call(this,Q,Te[0]));else throw new Error("Cannot close `"+Q.type+"` ("+ql({start:Q.start,end:Q.end})+"): it’s not open");_e.position.end=Qi(Q.end)}function y(){return nw(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(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 v(){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 k(){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 C(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q.replace(/(\r?\n|\r)$/g,"")}function w(Q){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.label=ue,_e.identifier=Ra(this.sliceSerialize(Q)).toLowerCase()}function T(){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 B(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 U(Q){const ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function ie(){this.data.setextHeadingSlurpLineEnding=void 0}function ne(Q){const _e=this.stack[this.stack.length-1].children;let Te=_e[_e.length-1];(!Te||Te.type!=="text")&&(Te=Lt(),Te.position={start:Qi(Q.start),end:void 0},_e.push(Te)),this.stack.push(Te)}function ae(Q){const ue=this.stack.pop();ue.value+=this.sliceSerialize(Q),ue.position.end=Qi(Q.end)}function W(Q){const ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){const _e=ue.children[ue.children.length-1];_e.position.end=Qi(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ue.type)&&(ne.call(this,Q),ae.call(this,Q))}function F(){this.data.atHardBreak=!0}function J(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q}function K(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q}function Y(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q}function H(){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 q(){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=tT(ue),_e.identifier=Ra(ue).toLowerCase()}function de(){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 Te=Q.children;_e.children=Te}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 X(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function ce(Q){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.label=ue,_e.identifier=Ra(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function me(Q){this.data.characterReferenceType=Q.type}function he(Q){const ue=this.sliceSerialize(Q),_e=this.data.characterReferenceType;let Te;_e?(Te=Yv(ue,_e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Te=Lh(ue);const Pe=this.stack[this.stack.length-1];Pe.value+=Te}function Ee(Q){const ue=this.stack.pop();ue.position.end=Qi(Q.end)}function ze(Q){ae.call(this,Q);const ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(Q)}function ge(Q){ae.call(this,Q);const ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(Q)}function He(){return{type:"blockquote",children:[]}}function $e(){return{type:"code",lang:null,meta:null,value:""}}function At(){return{type:"inlineCode",value:""}}function Et(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function We(){return{type:"emphasis",children:[]}}function jt(){return{type:"heading",depth:0,children:[]}}function rt(){return{type:"break"}}function In(){return{type:"html",value:""}}function zn(){return{type:"image",title:null,url:"",alt:null}}function xi(){return{type:"link",title:null,url:"",children:[]}}function Ci(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function ir(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function Va(){return{type:"paragraph",children:[]}}function ja(){return{type:"strong",children:[]}}function Lt(){return{type:"text",value:""}}function Lr(){return{type:"thematicBreak"}}}function Qi(e){return{line:e.line,column:e.column,offset:e.offset}}function r_(e,t){let i=-1;for(;++i<t.length;){const a=t[i];Array.isArray(a)?r_(e,a):aT(e,a)}}function aT(e,t){let i;for(i in t)if(i_.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 Ry(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ql({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ql({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ql({start:t.start,end:t.end})+") is still open")}function lT(e){const t=this;t.parser=i;function i(a){return iT(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function oT(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 sT(e,t){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,i),[e.applyData(t,i),{type:"text",value:`
14
+ `}]}function uT(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 cT(e,t){const i={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function fT(e,t){const i={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function dT(e,t){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),o=Ha(a.toLowerCase()),s=e.footnoteOrder.indexOf(a);let c,d=e.footnoteCounts.get(a);d===void 0?(d=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=s+1,d+=1,e.footnoteCounts.set(a,d);const f={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+o,id:i+"fnref-"+o+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function hT(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 pT(e,t){if(e.options.allowDangerousHtml){const i={type:"raw",value:t.value};return e.patch(t,i),e.applyData(t,i)}}function a_(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 mT(e,t){const i=String(t.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return a_(e,t);const o={src:Ha(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 gT(e,t){const i={src:Ha(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 yT(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 bT(e,t){const i=String(t.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return a_(e,t);const o={href:Ha(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 vT(e,t){const i={href:Ha(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 _T(e,t,i){const a=e.all(t),o=i?ST(i):l_(t),s={},c=[];if(typeof t.checked=="boolean"){const y=a[0];let m;y&&y.type==="element"&&y.tagName==="p"?m=y:(m={type:"element",tagName:"p",properties:{},children:[]},a.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let d=-1;for(;++d<a.length;){const y=a[d];(o||d!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
16
+ `}),y.type==="element"&&y.tagName==="p"&&!o?c.push(...y.children):c.push(y)}const f=a[a.length-1];f&&(o||f.type!=="element"||f.tagName!=="p")&&c.push({type:"text",value:`
17
+ `});const h={type:"element",tagName:"li",properties:s,children:c};return e.patch(t,h),e.applyData(t,h)}function ST(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=l_(i[a])}return t}function l_(e){const t=e.spread;return t??e.children.length>1}function ET(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 xT(e,t){const i={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function CT(e,t){const i={type:"root",children:e.wrap(e.all(t))};return e.patch(t,i),e.applyData(t,i)}function wT(e,t){const i={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function kT(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)},d=wh(t.children[1]),f=Bv(t.children[t.children.length-1]);d&&f&&(c.position={start:d,end:f}),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 TT(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,d=c?c.length:t.children.length;let f=-1;const h=[];for(;++f<d;){const m=t.children[f],b={},v=c?c[f]:void 0;v&&(b.align=v);let S={type:"element",tagName:s,properties:b,children:[]};m&&(S.children=e.all(m),e.patch(m,S),S=e.applyData(m,S)),h.push(S)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,y),e.applyData(t,y)}function AT(e,t){const i={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}const Dy=9,Ny=32;function LT(e){const t=String(e),i=/\r?\n|\r/g;let a=i.exec(t),o=0;const s=[];for(;a;)s.push(Oy(t.slice(o,a.index),o>0,!0),a[0]),o=a.index+a[0].length,a=i.exec(t);return s.push(Oy(t.slice(o),o>0,!1)),s.join("")}function Oy(e,t,i){let a=0,o=e.length;if(t){let s=e.codePointAt(a);for(;s===Dy||s===Ny;)a++,s=e.codePointAt(a)}if(i){let s=e.codePointAt(o-1);for(;s===Dy||s===Ny;)o--,s=e.codePointAt(o-1)}return o>a?e.slice(a,o):""}function RT(e,t){const i={type:"text",value:LT(String(t.value))};return e.patch(t,i),e.applyData(t,i)}function DT(e,t){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,i),e.applyData(t,i)}const NT={blockquote:oT,break:sT,code:uT,delete:cT,emphasis:fT,footnoteReference:dT,heading:hT,html:pT,imageReference:mT,image:gT,inlineCode:yT,linkReference:bT,link:vT,listItem:_T,list:ET,paragraph:xT,root:CT,strong:wT,table:kT,tableCell:AT,tableRow:TT,text:RT,thematicBreak:DT,toml:ks,yaml:ks,definition:ks,footnoteDefinition:ks};function ks(){}const o_=-1,gu=0,Xl=1,eu=2,Nh=3,Oh=4,Mh=5,Ih=6,s_=7,u_=8,OT=typeof self=="object"?self:globalThis,My=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new OT[e](t)},MT=(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 gu:case o_:return i(c,o);case Xl:{const d=i([],o);for(const f of c)d.push(a(f));return d}case eu:{const d=i({},o);for(const[f,h]of c)d[a(f)]=a(h);return d}case Nh:return i(new Date(c),o);case Oh:{const{source:d,flags:f}=c;return i(new RegExp(d,f),o)}case Mh:{const d=i(new Map,o);for(const[f,h]of c)d.set(a(f),a(h));return d}case Ih:{const d=i(new Set,o);for(const f of c)d.add(a(f));return d}case s_:{const{name:d,message:f}=c;return i(My(d,f),o)}case u_: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:d}=new Uint8Array(c);return i(new DataView(d),c)}}return i(My(s,c),o)};return a},Iy=e=>MT(new Map,e)(0),ba="",{toString:IT}={},{keys:zT}=Object,Hl=e=>{const t=typeof e;if(t!=="object"||!e)return[gu,t];const i=IT.call(e).slice(8,-1);switch(i){case"Array":return[Xl,ba];case"Object":return[eu,ba];case"Date":return[Nh,ba];case"RegExp":return[Oh,ba];case"Map":return[Mh,ba];case"Set":return[Ih,ba];case"DataView":return[Xl,i]}return i.includes("Array")?[Xl,i]:i.includes("Error")?[s_,i]:[eu,i]},Ts=([e,t])=>e===gu&&(t==="function"||t==="symbol"),HT=(e,t,i,a)=>{const o=(c,d)=>{const f=a.push(c)-1;return i.set(d,f),f},s=c=>{if(i.has(c))return i.get(c);let[d,f]=Hl(c);switch(d){case gu:{let y=c;switch(f){case"bigint":d=u_,y=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);y=null;break;case"undefined":return o([o_],c)}return o([d,y],c)}case Xl:{if(f){let b=c;return f==="DataView"?b=new Uint8Array(c.buffer):f==="ArrayBuffer"&&(b=new Uint8Array(c)),o([f,[...b]],c)}const y=[],m=o([d,y],c);for(const b of c)y.push(s(b));return m}case eu:{if(f)switch(f){case"BigInt":return o([f,c.toString()],c);case"Boolean":case"Number":case"String":return o([f,c.valueOf()],c)}if(t&&"toJSON"in c)return s(c.toJSON());const y=[],m=o([d,y],c);for(const b of zT(c))(e||!Ts(Hl(c[b])))&&y.push([s(b),s(c[b])]);return m}case Nh:return o([d,c.toISOString()],c);case Oh:{const{source:y,flags:m}=c;return o([d,{source:y,flags:m}],c)}case Mh:{const y=[],m=o([d,y],c);for(const[b,v]of c)(e||!(Ts(Hl(b))||Ts(Hl(v))))&&y.push([s(b),s(v)]);return m}case Ih:{const y=[],m=o([d,y],c);for(const b of c)(e||!Ts(Hl(b)))&&y.push(s(b));return m}}const{message:h}=c;return o([d,{name:f,message:h}],c)};return s},zy=(e,{json:t,lossy:i}={})=>{const a=[];return HT(!(t||i),!!t,new Map,a)(e),a},tu=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Iy(zy(e,t)):structuredClone(e):(e,t)=>Iy(zy(e,t));function PT(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 UT(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function BT(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||PT,a=e.options.footnoteBackLabel||UT,o=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let f=-1;for(;++f<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[f]);if(!h)continue;const y=e.all(h),m=String(h.identifier).toUpperCase(),b=Ha(m.toLowerCase());let v=0;const S=[],k=e.footnoteCounts.get(m);for(;k!==void 0&&++v<=k;){S.length>0&&S.push({type:"text",value:" "});let w=typeof i=="string"?i:i(f,v);typeof w=="string"&&(w={type:"text",value:w}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(f,v),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const D=y[y.length-1];if(D&&D.type==="element"&&D.tagName==="p"){const w=D.children[D.children.length-1];w&&w.type==="text"?w.value+=" ":D.children.push({type:"text",value:" "}),D.children.push(...S)}else y.push(...S);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(y,!0)};e.patch(h,C),d.push(C)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...tu(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
18
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
19
+ `}]}}const c_=(function(e){if(e==null)return $T;if(typeof e=="function")return yu(e);if(typeof e=="object")return Array.isArray(e)?VT(e):jT(e);if(typeof e=="string")return GT(e);throw new Error("Expected function, string, or object as test")});function VT(e){const t=[];let i=-1;for(;++i<e.length;)t[i]=c_(e[i]);return yu(a);function a(...o){let s=-1;for(;++s<t.length;)if(t[s].apply(this,o))return!0;return!1}}function jT(e){const t=e;return yu(i);function i(a){const o=a;let s;for(s in e)if(o[s]!==t[s])return!1;return!0}}function GT(e){return yu(t);function t(i){return i&&i.type===e}}function yu(e){return t;function t(i,a,o){return!!(FT(i)&&e.call(this,i,typeof a=="number"?a:void 0,o||void 0))}}function $T(){return!0}function FT(e){return e!==null&&typeof e=="object"&&"type"in e}const f_=[],qT=!0,Hy=!1,YT="skip";function XT(e,t,i,a){let o;typeof t=="function"&&typeof i!="function"?(a=i,i=t):o=t;const s=c_(o),c=a?-1:1;d(e,void 0,[])();function d(f,h,y){const m=f&&typeof f=="object"?f:{};if(typeof m.type=="string"){const v=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(f.type+(v?"<"+v+">":""))+")"})}return b;function b(){let v=f_,S,k,D;if((!t||s(f,h,y[y.length-1]||void 0))&&(v=QT(i(f,y)),v[0]===Hy))return v;if("children"in f&&f.children){const C=f;if(C.children&&v[0]!==YT)for(k=(a?C.children.length:-1)+c,D=y.concat(C);k>-1&&k<C.children.length;){const w=C.children[k];if(S=d(w,k,D)(),S[0]===Hy)return S;k=typeof S[1]=="number"?S[1]:k+c}}return v}}}function QT(e){return Array.isArray(e)?e:typeof e=="number"?[qT,e]:e==null?f_:[e]}function d_(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),XT(e,s,d,o);function d(f,h){const y=h[h.length-1],m=y?y.children.indexOf(f):void 0;return c(f,m,y)}}const qd={}.hasOwnProperty,ZT={};function KT(e,t){const i=t||ZT,a=new Map,o=new Map,s=new Map,c={...NT,...i.handlers},d={all:h,applyData:JT,definitionById:a,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:c,one:f,options:i,patch:WT,wrap:tA};return d_(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const m=y.type==="definition"?a:o,b=String(y.identifier).toUpperCase();m.has(b)||m.set(b,y)}}),d;function f(y,m){const b=y.type,v=d.handlers[b];if(qd.call(d.handlers,b)&&v)return v(d,y,m);if(d.options.passThrough&&d.options.passThrough.includes(b)){if("children"in y){const{children:k,...D}=y,C=tu(D);return C.children=d.all(y),C}return tu(y)}return(d.options.unknownHandler||eA)(d,y,m)}function h(y){const m=[];if("children"in y){const b=y.children;let v=-1;for(;++v<b.length;){const S=d.one(b[v],y);if(S){if(v&&b[v-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=Py(S.value)),!Array.isArray(S)&&S.type==="element")){const k=S.children[0];k&&k.type==="text"&&(k.value=Py(k.value))}Array.isArray(S)?m.push(...S):m.push(S)}}}return m}}function WT(e,t){e.position&&(t.position=MC(e))}function JT(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,tu(s)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function eA(e,t){const i=t.data||{},a="value"in t&&!(qd.call(i,"hProperties")||qd.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 tA(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 Py(e){let t=0,i=e.charCodeAt(t);for(;i===9||i===32;)t++,i=e.charCodeAt(t);return e.slice(t)}function Uy(e,t){const i=KT(e,t),a=i.one(e,void 0),o=BT(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 nA(e,t){return e&&"run"in e?async function(i,a){const o=Uy(i,{file:a,...t});await e.run(o,a)}:function(i,a){return Uy(i,{file:a,...e||t})}}function By(e){if(e)throw e}var td,Vy;function iA(){if(Vy)return td;Vy=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},s=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var y=e.call(h,"constructor"),m=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!y&&!m)return!1;var b;for(b in h);return typeof b>"u"||e.call(h,b)},c=function(h,y){i&&y.name==="__proto__"?i(h,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):h[y.name]=y.newValue},d=function(h,y){if(y==="__proto__")if(e.call(h,y)){if(a)return a(h,y).value}else return;return h[y]};return td=function f(){var h,y,m,b,v,S,k=arguments[0],D=1,C=arguments.length,w=!1;for(typeof k=="boolean"&&(w=k,k=arguments[1]||{},D=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});D<C;++D)if(h=arguments[D],h!=null)for(y in h)m=d(k,y),b=d(h,y),k!==b&&(w&&b&&(s(b)||(v=o(b)))?(v?(v=!1,S=m&&o(m)?m:[]):S=m&&s(m)?m:{},c(k,{name:y,newValue:f(w,S,b)})):typeof b<"u"&&c(k,{name:y,newValue:b}));return k},td}var rA=iA();const nd=_v(rA);function Yd(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 aA(){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);d(null,...o);function d(f,...h){const y=e[++s];let m=-1;if(f){c(f);return}for(;++m<o.length;)(h[m]===null||h[m]===void 0)&&(h[m]=o[m]);o=h,y?lA(y,d)(...h):c(null,...h)}}function a(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function lA(e,t){let i;return a;function a(...c){const d=e.length>c.length;let f;d&&c.push(o);try{f=e.apply(this,c)}catch(h){const y=h;if(d&&i)throw y;return o(y)}d||(f&&f.then&&typeof f.then=="function"?f.then(s,o):f instanceof Error?o(f):s(f))}function o(c,...d){i||(i=!0,t(c,...d))}function s(c){o(null,c)}}const qn={basename:oA,dirname:sA,extname:uA,join:cA,sep:"/"};function oA(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');co(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,d=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){i=o+1;break}}else c<0&&(s=!0,c=o+1),d>-1&&(e.codePointAt(o)===t.codePointAt(d--)?d<0&&(a=o):(d=-1,a=c));return i===a?a=c:a<0&&(a=e.length),e.slice(i,a)}function sA(e){if(co(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 uA(e){co(e);let t=e.length,i=-1,a=0,o=-1,s=0,c;for(;t--;){const d=e.codePointAt(t);if(d===47){if(c){a=t+1;break}continue}i<0&&(c=!0,i=t+1),d===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 cA(...e){let t=-1,i;for(;++t<e.length;)co(e[t]),e[t]&&(i=i===void 0?e[t]:i+"/"+e[t]);return i===void 0?".":fA(i)}function fA(e){co(e);const t=e.codePointAt(0)===47;let i=dA(e,!t);return i.length===0&&!t&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),t?"/"+i:i}function dA(e,t){let i="",a=0,o=-1,s=0,c=-1,d,f;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===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(f=i.lastIndexOf("/"),f!==i.length-1){f<0?(i="",a=0):(i=i.slice(0,f),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 d===46&&s>-1?s++:s=-1}return i}function co(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const hA={cwd:pA};function pA(){return"/"}function Xd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function mA(e){if(typeof e=="string")e=new URL(e);else if(!Xd(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 gA(e)}function gA(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 id=["history","path","basename","stem","extname","dirname"];class h_{constructor(t){let i;t?Xd(t)?i={path:t}:typeof t=="string"||yA(t)?i={value:t}:i=t:i={},this.cwd="cwd"in i?"":hA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<id.length;){const s=id[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)id.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?qn.basename(this.path):void 0}set basename(t){ad(t,"basename"),rd(t,"basename"),this.path=qn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?qn.dirname(this.path):void 0}set dirname(t){jy(this.basename,"dirname"),this.path=qn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?qn.extname(this.path):void 0}set extname(t){if(rd(t,"extname"),jy(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=qn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Xd(t)&&(t=mA(t)),ad(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?qn.basename(this.path,this.extname):void 0}set stem(t){ad(t,"stem"),rd(t,"stem"),this.path=qn.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 Ut(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 rd(e,t){if(e&&e.includes(qn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+qn.sep+"`")}function ad(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function jy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function yA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const bA=(function(e){const a=this.constructor.prototype,o=a[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,a),s}),vA={}.hasOwnProperty;class zh extends bA{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=aA()}copy(){const t=new zh;let i=-1;for(;++i<this.attachers.length;){const a=this.attachers[i];t.use(...a)}return t.data(nd(!0,{},this.namespace)),t}data(t,i){return typeof t=="string"?arguments.length===2?(sd("data",this.frozen),this.namespace[t]=i,this):vA.call(this.namespace,t)&&this.namespace[t]||void 0:t?(sd("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=As(t),a=this.parser||this.Parser;return ld("parse",a),a(String(i),i)}process(t,i){const a=this;return this.freeze(),ld("process",this.parser||this.Parser),od("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(s,c){const d=As(t),f=a.parse(d);a.run(f,d,function(y,m,b){if(y||!m||!b)return h(y);const v=m,S=a.stringify(v,b);EA(S)?b.value=S:b.result=S,h(y,b)});function h(y,m){y||!m?c(y):s?s(m):i(void 0,m)}}}processSync(t){let i=!1,a;return this.freeze(),ld("processSync",this.parser||this.Parser),od("processSync",this.compiler||this.Compiler),this.process(t,o),$y("processSync","process",i),a;function o(s,c){i=!0,By(s),a=c}}run(t,i,a){Gy(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,d){const f=As(i);o.run(t,f,h);function h(y,m,b){const v=m||t;y?d(y):c?c(v):a(void 0,v,b)}}}runSync(t,i){let a=!1,o;return this.run(t,i,s),$y("runSync","run",a),o;function s(c,d){By(c),o=d,a=!0}}stringify(t,i){this.freeze();const a=As(i),o=this.compiler||this.Compiler;return od("stringify",o),Gy(t),o(t,a)}use(t,...i){const a=this.attachers,o=this.namespace;if(sd("use",this.frozen),t!=null)if(typeof t=="function")f(t,i);else if(typeof t=="object")Array.isArray(t)?d(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[y,...m]=h;f(y,m)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(h.plugins),h.settings&&(o.settings=nd(!0,o.settings,h.settings))}function d(h){let y=-1;if(h!=null)if(Array.isArray(h))for(;++y<h.length;){const m=h[y];s(m)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,y){let m=-1,b=-1;for(;++m<a.length;)if(a[m][0]===h){b=m;break}if(b===-1)a.push([h,...y]);else if(y.length>0){let[v,...S]=y;const k=a[b][1];Yd(k)&&Yd(v)&&(v=nd(!0,k,v)),a[b]=[h,v,...S]}}}}const _A=new zh().freeze();function ld(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function od(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sd(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 Gy(e){if(!Yd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function $y(e,t,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function As(e){return SA(e)?e:new h_(e)}function SA(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function EA(e){return typeof e=="string"||xA(e)}function xA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const CA="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Fy=[],qy={allowDangerousHtml:!0},wA=/^(https?|ircs?|mailto|xmpp)$/i,kA=[{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 TA(e){const t=AA(e),i=LA(e);return RA(t.runSync(t.parse(i),i),e)}function AA(e){const t=e.rehypePlugins||Fy,i=e.remarkPlugins||Fy,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...qy}:qy;return _A().use(lT).use(i).use(nA,a).use(t)}function LA(e){const t=e.children||"",i=new h_;return typeof t=="string"&&(i.value=t),i}function RA(e,t){const i=t.allowedElements,a=t.allowElement,o=t.components,s=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,f=t.urlTransform||DA;for(const y of kA)Object.hasOwn(t,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+CA+y.id,void 0);return d_(e,h),UC(e,{Fragment:z.Fragment,components:o,ignoreInvalidStyle:!0,jsx:z.jsx,jsxs:z.jsxs,passKeys:!0,passNode:!0});function h(y,m,b){if(y.type==="raw"&&b&&typeof m=="number")return c?b.children.splice(m,1):b.children[m]={type:"text",value:y.value},m;if(y.type==="element"){let v;for(v in Wf)if(Object.hasOwn(Wf,v)&&Object.hasOwn(y.properties,v)){const S=y.properties[v],k=Wf[v];(k===null||k.includes(y.tagName))&&(y.properties[v]=f(String(S||""),v,y))}}if(y.type==="element"){let v=i?!i.includes(y.tagName):s?s.includes(y.tagName):!1;if(!v&&a&&typeof m=="number"&&(v=!a(y,m,b)),v&&b&&typeof m=="number")return d&&y.children?b.children.splice(m,1,...y.children):b.children.splice(m,1),m}}}function DA(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||wA.test(e.slice(0,t))?e:""}const NA="modulepreload",OA=function(e){return"/"+e},Yy={},E=function(t,i,a){let o=Promise.resolve();if(i&&i.length>0){let h=function(y){return Promise.all(y.map(m=>Promise.resolve(m).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};var c=h;document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),f=d?.nonce||d?.getAttribute("nonce");o=h(i.map(y=>{if(y=OA(y),y in Yy)return;Yy[y]=!0;const m=y.endsWith(".css"),b=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${y}"]${b}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":NA,m||(v.as="script"),v.crossOrigin="",v.href=y,f&&v.setAttribute("nonce",f),document.head.appendChild(v),m)return new Promise((S,k)=>{v.addEventListener("load",S),v.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${y}`)))})}))}function s(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return o.then(d=>{for(const f of d||[])f.status==="rejected"&&s(f.reason);return t().catch(s)})};let gt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function MA(e){return Hh(e)}function Hh(e){return Array.isArray(e)?IA(e):e instanceof RegExp?e:typeof e=="object"?zA(e):e}function IA(e){let t=[];for(let i=0,a=e.length;i<a;i++)t[i]=Hh(e[i]);return t}function zA(e){let t={};for(let i in e)t[i]=Hh(e[i]);return t}function p_(e,...t){return t.forEach(i=>{for(let a in i)e[a]=i[a]}),e}function m_(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?m_(e.substring(0,e.length-1)):e.substr(~t+1)}var ud=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Ls=class{static hasCaptures(e){return e===null?!1:(ud.lastIndex=0,ud.test(e))}static replaceCaptures(e,t,i){return e.replace(ud,(a,o,s,c)=>{let d=i[parseInt(o||s,10)];if(d){let f=t.substring(d.start,d.end);for(;f[0]===".";)f=f.substring(1);switch(c){case"downcase":return f.toLowerCase();case"upcase":return f.toUpperCase();default:return f}}else return a})}};function g_(e,t){return e<t?-1:e>t?1:0}function y_(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=g_(e[o],t[o]);if(s!==0)return s}return 0}return i-a}function Xy(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 b_(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var v_=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}},nu=class{constructor(e,t,i){this._colorMap=e,this._defaults=t,this._root=i}static createFromRawTheme(e,t){return this.createFromParsedTheme(UA(e),t)}static createFromParsedTheme(e,t){return VA(e,t)}_cachedMatchRoot=new v_(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=>HA(e.parent,o.parentScopes));return a?new __(a.fontStyle,a.foreground,a.background):null}},cd=class Qs{constructor(t,i){this.parent=t,this.scopeName=i}static push(t,i){for(const a of i)t=new Qs(t,a);return t}static from(...t){let i=null;for(let a=0;a<t.length;a++)i=new Qs(i,t[a]);return i}push(t){return new Qs(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 HA(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&&!PA(e.scopeName,a);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function PA(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var __=class{constructor(e,t,i){this.fontStyle=e,this.foregroundId=t,this.backgroundId=i}};function UA(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 d;if(typeof c.scope=="string"){let m=c.scope;m=m.replace(/^[,]+/,""),m=m.replace(/[,]+$/,""),d=m.split(",")}else Array.isArray(c.scope)?d=c.scope:d=[""];let f=-1;if(typeof c.settings.fontStyle=="string"){f=0;let m=c.settings.fontStyle.split(" ");for(let b=0,v=m.length;b<v;b++)switch(m[b]){case"italic":f=f|1;break;case"bold":f=f|2;break;case"underline":f=f|4;break;case"strikethrough":f=f|8;break}}let h=null;typeof c.settings.foreground=="string"&&Xy(c.settings.foreground)&&(h=c.settings.foreground);let y=null;typeof c.settings.background=="string"&&Xy(c.settings.background)&&(y=c.settings.background);for(let m=0,b=d.length;m<b;m++){let S=d[m].trim().split(" "),k=S[S.length-1],D=null;S.length>1&&(D=S.slice(0,S.length-1),D.reverse()),i[a++]=new BA(k,D,o,f,h,y)}}return i}var BA=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}},Pt=(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))(Pt||{});function VA(e,t){e.sort((f,h)=>{let y=g_(f.scope,h.scope);return y!==0||(y=y_(f.parentScopes,h.parentScopes),y!==0)?y:f.index-h.index});let i=0,a="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let f=e.shift();f.fontStyle!==-1&&(i=f.fontStyle),f.foreground!==null&&(a=f.foreground),f.background!==null&&(o=f.background)}let s=new jA(t),c=new __(i,s.getId(a),s.getId(o)),d=new $A(new Qd(0,null,-1,0,0),[]);for(let f=0,h=e.length;f<h;f++){let y=e[f];d.insert(0,y.scope,y.parentScopes,y.fontStyle,s.getId(y.foreground),s.getId(y.background))}return new nu(s,c,d)}var jA=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)}},GA=Object.freeze([]),Qd=class S_{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,i,a,o,s){this.scopeDepth=t,this.parentScopes=i||GA,this.fontStyle=a,this.foreground=o,this.background=s}clone(){return new S_(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)}},$A=class Zd{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(Zd._cmpBySpecificity),i}insert(t,i,a,o,s,c){if(i===""){this._doInsertHere(t,a,o,s,c);return}let d=i.indexOf("."),f,h;d===-1?(f=i,h=""):(f=i.substring(0,d),h=i.substring(d+1));let y;this._children.hasOwnProperty(f)?y=this._children[f]:(y=new Zd(this._mainRule.clone(),Qd.cloneArr(this._rulesWithParentScopes)),this._children[f]=y),y.insert(t+1,h,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,d=this._rulesWithParentScopes.length;c<d;c++){let f=this._rulesWithParentScopes[c];if(y_(f.parentScopes,i)===0){f.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 Qd(t,i,a,o,s))}},Oa=class Sn{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const i=Sn.getLanguageId(t),a=Sn.getTokenType(t),o=Sn.getFontStyle(t),s=Sn.getForeground(t),c=Sn.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,d){let f=Sn.getLanguageId(t),h=Sn.getTokenType(t),y=Sn.containsBalancedBrackets(t)?1:0,m=Sn.getFontStyle(t),b=Sn.getForeground(t),v=Sn.getBackground(t);return i!==0&&(f=i),a!==8&&(h=a),o!==null&&(y=o?1:0),s!==-1&&(m=s),c!==0&&(b=c),d!==0&&(v=d),(f<<0|h<<8|y<<10|m<<11|b<<15|v<<24)>>>0}};function iu(e,t){const i=[],a=FA(e);let o=a.next();for(;o!==null;){let f=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":f=1;break;case"L":f=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=a.next()}let h=c();if(i.push({matcher:h,priority:f}),o!==",")break;o=a.next()}return i;function s(){if(o==="-"){o=a.next();const f=s();return h=>!!f&&!f(h)}if(o==="("){o=a.next();const f=d();return o===")"&&(o=a.next()),f}if(Qy(o)){const f=[];do f.push(o),o=a.next();while(Qy(o));return h=>t(f,h)}return null}function c(){const f=[];let h=s();for(;h;)f.push(h),h=s();return y=>f.every(m=>m(y))}function d(){const f=[];let h=c();for(;h&&(f.push(h),o==="|"||o===",");){do o=a.next();while(o==="|"||o===",");h=c()}return y=>f.some(m=>m(y))}}function Qy(e){return!!e&&!!e.match(/[\w\.:]+/)}function FA(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 E_(e){typeof e.dispose=="function"&&e.dispose()}var Jl=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},qA=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},YA=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))}},XA=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Jl(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new YA;for(const i of e)QA(i,this.initialScopeName,this.repo,t);for(const i of t.references)if(i instanceof Jl){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 QA(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 Jl?Zs({baseGrammar:s,selfGrammar:o},a):Kd(e.ruleName,{baseGrammar:s,selfGrammar:o,repository:o.repository},a);const c=i.injections(e.scopeName);if(c)for(const d of c)a.add(new Jl(d))}function Kd(e,t,i){if(t.repository&&t.repository[e]){const a=t.repository[e];ru([a],t,i)}}function Zs(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&ru(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&ru(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function ru(e,t,i){for(const a of e){if(i.visitedRule.has(a))continue;i.visitedRule.add(a);const o=a.repository?p_({},t.repository,a.repository):t.repository;Array.isArray(a.patterns)&&ru(a.patterns,{...t,repository:o},i);const s=a.include;if(!s)continue;const c=x_(s);switch(c.kind){case 0:Zs({...t,selfGrammar:t.baseGrammar},i);break;case 1:Zs(t,i);break;case 2:Kd(c.ruleName,{...t,repository:o},i);break;case 3:case 4:const d=c.scopeName===t.selfGrammar.scopeName?t.selfGrammar:c.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(d){const f={baseGrammar:t.baseGrammar,selfGrammar:d,repository:o};c.kind===4?Kd(c.ruleName,f,i):Zs(f,i)}else c.kind===4?i.add(new qA(c.scopeName,c.ruleName)):i.add(new Jl(c.scopeName));break}}}var ZA=class{kind=0},KA=class{kind=1},WA=class{constructor(e){this.ruleName=e}kind=2},JA=class{constructor(e){this.scopeName=e}kind=3},eL=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function x_(e){if(e==="$base")return new ZA;if(e==="$self")return new KA;const t=e.indexOf("#");if(t===-1)return new JA(e);if(t===0)return new WA(e.substring(1));{const i=e.substring(0,t),a=e.substring(t+1);return new eL(i,a)}}var tL=/\\(\d+)/,Zy=/\\(\d+)/g,nL=-1,C_=-2;var fo=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,i,a){this.$location=e,this.id=t,this._name=i||null,this._nameIsCapturing=Ls.hasCaptures(this._name),this._contentName=a||null,this._contentNameIsCapturing=Ls.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${m_(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:Ls.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Ls.replaceCaptures(this._contentName,e,t)}},iL=class extends fo{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!")}},rL=class extends fo{_match;captures;_cachedCompiledPatterns;constructor(e,t,i,a,o){super(e,t,i,null),this._match=new eo(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 to,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ky=class extends fo{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 to,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Wd=class extends fo{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,i,a,o,s,c,d,f,h){super(e,t,i,a),this._begin=new eo(o,this.id),this.beginCaptures=s,this._end=new eo(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=d,this.applyEndPatternLast=f||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,i,a){return this._getCachedCompiledPatterns(e,t).compileAG(e,i,a)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new to;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}},au=class extends fo{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,i,a,o,s,c,d,f){super(e,t,i,a),this._begin=new eo(o,this.id),this.beginCaptures=s,this.whileCaptures=d,this._while=new eo(c,C_),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=f.patterns,this.hasMissingPatterns=f.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 to;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 to,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},w_=class Ht{static createCaptureRule(t,i,a,o,s){return t.registerRule(c=>new iL(i,c,a,o,s))}static getCompiledRuleId(t,i,a){return t.id||i.registerRule(o=>{if(t.id=o,t.match)return new rL(t.$vscodeTextmateLocation,t.id,t.name,t.match,Ht._compileCaptures(t.captures,i,a));if(typeof t.begin>"u"){t.repository&&(a=p_({},a,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new Ky(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Ht._compilePatterns(s,i,a))}return t.while?new au(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ht._compileCaptures(t.beginCaptures||t.captures,i,a),t.while,Ht._compileCaptures(t.whileCaptures||t.captures,i,a),Ht._compilePatterns(t.patterns,i,a)):new Wd(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ht._compileCaptures(t.beginCaptures||t.captures,i,a),t.end,Ht._compileCaptures(t.endCaptures||t.captures,i,a),t.applyEndPatternLast,Ht._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 d=parseInt(c,10);d>s&&(s=d)}for(let c=0;c<=s;c++)o[c]=null;for(const c in t){if(c==="$vscodeTextmateLocation")continue;const d=parseInt(c,10);let f=0;t[c].patterns&&(f=Ht.getCompiledRuleId(t[c],i,a)),o[d]=Ht.createCaptureRule(i,t[c].$vscodeTextmateLocation,t[c].name,t[c].contentName,f)}}return o}static _compilePatterns(t,i,a){let o=[];if(t)for(let s=0,c=t.length;s<c;s++){const d=t[s];let f=-1;if(d.include){const h=x_(d.include);switch(h.kind){case 0:case 1:f=Ht.getCompiledRuleId(a[d.include],i,a);break;case 2:let y=a[h.ruleName];y&&(f=Ht.getCompiledRuleId(y,i,a));break;case 3:case 4:const m=h.scopeName,b=h.kind===4?h.ruleName:null,v=i.getExternalGrammar(m,a);if(v)if(b){let S=v.repository[b];S&&(f=Ht.getCompiledRuleId(S,i,v.repository))}else f=Ht.getCompiledRuleId(v.repository.$self,i,v.repository);break}}else f=Ht.getCompiledRuleId(d,i,a);if(f!==-1){const h=i.getRule(f);let y=!1;if((h instanceof Ky||h instanceof Wd||h instanceof au)&&h.hasMissingPatterns&&h.patterns.length===0&&(y=!0),y)continue;o.push(f)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},eo=class k_{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 d=0;d<a;d++)if(t.charAt(d)==="\\"&&d+1<a){const h=t.charAt(d+1);h==="z"?(s.push(t.substring(o,d)),s.push("$(?!\\n)(?<!\\n)"),o=d+2):(h==="A"||h==="G")&&(c=!0),d++}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=tL.test(this.source):this.hasBackReferences=!1}clone(){return new k_(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 Zy.lastIndex=0,this.source.replace(Zy,(o,s)=>b_(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,d,f;for(s=0,c=this.source.length;s<c;s++)d=this.source.charAt(s),t[s]=d,i[s]=d,a[s]=d,o[s]=d,d==="\\"&&s+1<c&&(f=this.source.charAt(s+1),f==="A"?(t[s+1]="￿",i[s+1]="￿",a[s+1]="A",o[s+1]="A"):f==="G"?(t[s+1]="￿",i[s+1]="G",a[s+1]="￿",o[s+1]="G"):(t[s+1]=f,i[s+1]=f,a[s+1]=f,o[s+1]=f),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}},to=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 Wy(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 Wy(e,a,this._items.map(o=>o.ruleId))}},Wy=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}},fd=class{constructor(e,t){this.languageId=e,this.tokenType=t}},aL=class Jd{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,i){this._defaultAttributes=new fd(t,8),this._embeddedLanguagesMatcher=new lL(Object.entries(i||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Jd._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new fd(0,0);_getBasicScopeAttributes=new v_(t=>{const i=this._scopeToLanguage(t),a=this._toStandardTokenType(t);return new fd(i,a)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const i=t.match(Jd.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/},lL=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])=>b_(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])}},Jy=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function T_(e,t,i,a,o,s,c,d){const f=t.content.length;let h=!1,y=-1;if(c){const v=oL(e,t,i,a,o,s);o=v.stack,a=v.linePos,i=v.isFirstLine,y=v.anchorPosition}const m=Date.now();for(;!h;){if(d!==0&&Date.now()-m>d)return new Jy(o,!0);b()}return new Jy(o,!1);function b(){const v=sL(e,t,i,a,o,y);if(!v){s.produce(o,f),h=!0;return}const S=v.captureIndices,k=v.matchedRuleId,D=S&&S.length>0?S[0].end>a:!1;if(k===nL){const C=o.getRule(e);s.produce(o,S[0].start),o=o.withContentNameScopesList(o.nameScopesList),Vl(e,t,i,o,s,C.endCaptures,S),s.produce(o,S[0].end);const w=o;if(o=o.parent,y=w.getAnchorPos(),!D&&w.getEnterPos()===a){o=w,s.produce(o,f),h=!0;return}}else{const C=e.getRule(k);s.produce(o,S[0].start);const w=o,T=C.getName(t.content,S),I=o.contentNameScopesList.pushAttributed(T,e);if(o=o.push(k,a,y,S[0].end===f,null,I,I),C instanceof Wd){const B=C;Vl(e,t,i,o,s,B.beginCaptures,S),s.produce(o,S[0].end),y=S[0].end;const R=B.getContentName(t.content,S),U=I.pushAttributed(R,e);if(o=o.withContentNameScopesList(U),B.endHasBackReferences&&(o=o.withEndRule(B.getEndWithResolvedBackReferences(t.content,S))),!D&&w.hasSameRuleAs(o)){o=o.pop(),s.produce(o,f),h=!0;return}}else if(C instanceof au){const B=C;Vl(e,t,i,o,s,B.beginCaptures,S),s.produce(o,S[0].end),y=S[0].end;const R=B.getContentName(t.content,S),U=I.pushAttributed(R,e);if(o=o.withContentNameScopesList(U),B.whileHasBackReferences&&(o=o.withEndRule(B.getWhileWithResolvedBackReferences(t.content,S))),!D&&w.hasSameRuleAs(o)){o=o.pop(),s.produce(o,f),h=!0;return}}else if(Vl(e,t,i,o,s,C.captures,S),s.produce(o,S[0].end),o=o.pop(),!D){o=o.safePop(),s.produce(o,f),h=!0;return}}S[0].end>a&&(a=S[0].end,i=!1)}}function oL(e,t,i,a,o,s){let c=o.beginRuleCapturedEOL?0:-1;const d=[];for(let f=o;f;f=f.pop()){const h=f.getRule(e);h instanceof au&&d.push({rule:h,stack:f})}for(let f=d.pop();f;f=d.pop()){const{ruleScanner:h,findOptions:y}=fL(f.rule,e,f.stack.endRule,i,a===c),m=h.findNextMatchSync(t,a,y);if(m){if(m.ruleId!==C_){o=f.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(s.produce(f.stack,m.captureIndices[0].start),Vl(e,t,i,f.stack,s,f.rule.whileCaptures,m.captureIndices),s.produce(f.stack,m.captureIndices[0].end),c=m.captureIndices[0].end,m.captureIndices[0].end>a&&(a=m.captureIndices[0].end,i=!1))}else{o=f.stack.pop();break}}return{stack:o,linePos:a,anchorPosition:c,isFirstLine:i}}function sL(e,t,i,a,o,s){const c=uL(e,t,i,a,o,s),d=e.getInjections();if(d.length===0)return c;const f=cL(d,e,t,i,a,o,s);if(!f)return c;if(!c)return f;const h=c.captureIndices[0].start,y=f.captureIndices[0].start;return y<h||f.priorityMatch&&y===h?f:c}function uL(e,t,i,a,o,s){const c=o.getRule(e),{ruleScanner:d,findOptions:f}=A_(c,e,o.endRule,i,a===s),h=d.findNextMatchSync(t,a,f);return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}function cL(e,t,i,a,o,s,c){let d=Number.MAX_VALUE,f=null,h,y=0;const m=s.contentNameScopesList.getScopeNames();for(let b=0,v=e.length;b<v;b++){const S=e[b];if(!S.matcher(m))continue;const k=t.getRule(S.ruleId),{ruleScanner:D,findOptions:C}=A_(k,t,null,a,o===c),w=D.findNextMatchSync(i,o,C);if(!w)continue;const T=w.captureIndices[0].start;if(!(T>=d)&&(d=T,f=w.captureIndices,h=w.ruleId,y=S.priority,d===o))break}return f?{priorityMatch:y===-1,captureIndices:f,matchedRuleId:h}:null}function A_(e,t,i,a,o){return{ruleScanner:e.compileAG(t,i,a,o),findOptions:0}}function fL(e,t,i,a,o){return{ruleScanner:e.compileWhileAG(t,i,a,o),findOptions:0}}function Vl(e,t,i,a,o,s,c){if(s.length===0)return;const d=t.content,f=Math.min(s.length,c.length),h=[],y=c[0].end;for(let m=0;m<f;m++){const b=s[m];if(b===null)continue;const v=c[m];if(v.length===0)continue;if(v.start>y)break;for(;h.length>0&&h[h.length-1].endPos<=v.start;)o.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop();if(h.length>0?o.produceFromScopes(h[h.length-1].scopes,v.start):o.produce(a,v.start),b.retokenizeCapturedWithRuleId){const k=b.getName(d,c),D=a.contentNameScopesList.pushAttributed(k,e),C=b.getContentName(d,c),w=D.pushAttributed(C,e),T=a.push(b.retokenizeCapturedWithRuleId,v.start,-1,!1,null,D,w),I=e.createOnigString(d.substring(0,v.end));T_(e,I,i&&v.start===0,v.start,T,o,!1,0),E_(I);continue}const S=b.getName(d,c);if(S!==null){const D=(h.length>0?h[h.length-1].scopes:a.contentNameScopesList).pushAttributed(S,e);h.push(new dL(D,v.end))}}for(;h.length>0;)o.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}var dL=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function hL(e,t,i,a,o,s,c,d){return new mL(e,t,i,a,o,s,c,d)}function eb(e,t,i,a,o){const s=iu(t,lu),c=w_.getCompiledRuleId(i,a,o.repository);for(const d of s)e.push({debugSelector:t,matcher:d.matcher,ruleId:c,grammar:o,priority:d.priority})}function lu(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(pL(t[o],a))return i=o+1,!0;return!1})}function pL(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 mL=class{constructor(e,t,i,a,o,s,c,d){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=d,this._basicScopeAttributesProvider=new aL(i,a),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=c,this._grammar=tb(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const f of Object.keys(o)){const h=iu(f,lu);for(const y of h)this._tokenTypeMatchers.push({matcher:y.matcher,type:o[f]})}}_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)eb(t,c,o[c],this,a);const s=this._grammarRepository.injections(i);s&&s.forEach(c=>{const d=this.getExternalGrammar(c);if(d){const f=d.injectionSelector;f&&eb(t,f,d,this,d)}})}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]=tb(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=w_.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===eh.NULL){o=!0;const h=this._basicScopeAttributesProvider.getDefaultAttributes(),y=this.themeProvider.getDefaults(),m=Oa.set(0,h.languageId,h.tokenType,null,y.fontStyle,y.foregroundId,y.backgroundId),b=this.getRule(this._rootId).getName(null,null);let v;b?v=Ql.createRootAndLookUpScopeName(b,m,this):v=Ql.createRoot("unknown",m),t=new eh(null,this._rootId,-1,-1,!1,null,v,v)}else o=!1,t.reset();e=e+`
25
+ `;const s=this.createOnigString(e),c=s.content.length,d=new yL(i,e,this._tokenTypeMatchers,this.balancedBracketSelectors),f=T_(this,s,o,0,t,d,!0,a);return E_(s),{lineLength:c,lineTokens:d,ruleStack:f.stack,stoppedEarly:f.stoppedEarly}}};function tb(e,t){return e=MA(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 Ql=class $n{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=cd.push(o,s.scopeNames),a=new $n(a,o,s.encodedTokenAttributes);return a}static createRoot(t,i){return new $n(null,new cd(null,t),i)}static createRootAndLookUpScopeName(t,i,a){const o=a.getMetadataForScope(t),s=new cd(null,t),c=a.themeProvider.themeMatch(s),d=$n.mergeAttributes(i,o,c);return new $n(null,s,d)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return $n.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),Oa.set(t,i.languageId,i.tokenType,null,o,s,c)}pushAttributed(t,i){if(t===null)return this;if(t.indexOf(" ")===-1)return $n._pushAttributed(this,t,i);const a=t.split(/ /g);let o=this;for(const s of a)o=$n._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),d=$n.mergeAttributes(t.tokenAttributes,o,c);return new $n(t,s,d)}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}},eh=class xr{constructor(t,i,a,o,s,c,d,f){this.parent=t,this.ruleId=i,this.beginRuleCapturedEOL=s,this.endRule=c,this.nameScopesList=d,this.contentNameScopesList=f,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=a,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new xr(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:xr._equals(this,t)}static _equals(t,i){return t===i?!0:this._structuralEquals(t,i)?Ql.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(){xr._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,i,a,o,s,c,d){return new xr(this,t,i,a,o,s,c,d)}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 xr(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=Ql.fromExtension(t?.nameScopesList??null,i.nameScopesList);return new xr(t,i.ruleId,i.enterPos??-1,i.anchorPos??-1,i.beginRuleCapturedEOL,i.endRule,a,Ql.fromExtension(a,i.contentNameScopesList))}},gL=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(i=>i==="*"?(this.allowAny=!0,[]):iu(i,lu).map(a=>a.matcher)),this.unbalancedBracketScopes=t.flatMap(i=>iu(i,lu).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}},yL=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=Oa.set(a,0,c.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(a=Oa.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}},bL=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,hL(e,s,t,i,a,o,this,this._onigLib))}return this._grammars.get(e)}},vL=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new bL(nu.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,i){this._syncRegistry.setTheme(nu.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 gL(a.balancedBracketSelectors||[],a.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,i,a,o,s){const c=new XA(this._syncRegistry,t);for(;c.Q.length>0;)c.Q.map(d=>this._loadSingleGrammar(d.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)}},th=eh.NULL;const _L=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],nb={}.hasOwnProperty;function SL(e,t){const i=t||{};function a(o,...s){let c=a.invalid;const d=a.handlers;if(o&&nb.call(o,e)){const f=String(o[e]);c=nb.call(d,f)?d[f]: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 EL=/["&'<>`]/g,xL=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,CL=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,wL=/[|\\{}()[\]^$+*?.]/g,ib=new WeakMap;function kL(e,t){if(e=e.replace(t.subset?TL(t.subset):EL,a),t.subset||t.escapeOnly)return e;return e.replace(xL,i).replace(CL,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 TL(e){let t=ib.get(e);return t||(t=AL(e),ib.set(e,t)),t}function AL(e){const t=[];let i=-1;for(;++i<e.length;)t.push(e[i].replace(wL,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const LL=/[\dA-Fa-f]/;function RL(e,t,i){const a="&#x"+e.toString(16).toUpperCase();return i&&t&&!LL.test(String.fromCharCode(t))?a:a+";"}const DL=/\d/;function NL(e,t,i){const a="&#"+String(e);return i&&t&&!DL.test(String.fromCharCode(t))?a:a+";"}const OL=["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"],dd={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:"€"},ML=["cent","copy","divide","gt","lt","not","para","times"],L_={}.hasOwnProperty,nh={};let Rs;for(Rs in dd)L_.call(dd,Rs)&&(nh[dd[Rs]]=Rs);const IL=/[^\dA-Za-z]/;function zL(e,t,i,a){const o=String.fromCharCode(e);if(L_.call(nh,o)){const s=nh[o],c="&"+s;return i&&OL.includes(s)&&!ML.includes(s)&&(!a||t&&t!==61&&IL.test(String.fromCharCode(t)))?c:c+";"}return""}function HL(e,t,i){let a=RL(e,t,i.omitOptionalSemicolons),o;if((i.useNamedReferences||i.useShortestReferences)&&(o=zL(e,t,i.omitOptionalSemicolons,i.attribute)),(i.useShortestReferences||!o)&&i.useShortestReferences){const s=NL(e,t,i.omitOptionalSemicolons);s.length<a.length&&(a=s)}return o&&(!i.useShortestReferences||o.length<a.length)?o:a}function Da(e,t){return kL(e,Object.assign({format:HL},t))}const PL=/^>|^->|<!--|-->|--!>|<!-$/g,UL=[">"],BL=["<",">"];function VL(e,t,i,a){return a.settings.bogusComments?"<?"+Da(e.value,Object.assign({},a.settings.characterReferences,{subset:UL}))+">":"<!--"+e.value.replace(PL,o)+"-->";function o(s){return Da(s,Object.assign({},a.settings.characterReferences,{subset:BL}))}}function jL(e,t,i,a){return"<!"+(a.settings.upperDoctype?"DOCTYPE":"doctype")+(a.settings.tightDoctype?"":" ")+"html>"}function rb(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 St=D_(1),R_=D_(-1),GL=[];function D_(e){return t;function t(i,a,o){const s=i?i.children:GL;let c=(a||0)+e,d=s[c];if(!o)for(;d&&pu(d);)c+=e,d=s[c];return d}}const $L={}.hasOwnProperty;function N_(e){return t;function t(i,a,o){return $L.call(e,i.tagName)&&e[i.tagName](i,a,o)}}const Ph=N_({body:qL,caption:hd,colgroup:hd,dd:ZL,dt:QL,head:hd,html:FL,li:XL,optgroup:KL,option:WL,p:YL,rp:ab,rt:ab,tbody:eR,td:lb,tfoot:tR,th:lb,thead:JL,tr:nR});function hd(e,t,i){const a=St(i,t,!0);return!a||a.type!=="comment"&&!(a.type==="text"&&pu(a.value.charAt(0)))}function FL(e,t,i){const a=St(i,t);return!a||a.type!=="comment"}function qL(e,t,i){const a=St(i,t);return!a||a.type!=="comment"}function YL(e,t,i){const a=St(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 XL(e,t,i){const a=St(i,t);return!a||a.type==="element"&&a.tagName==="li"}function QL(e,t,i){const a=St(i,t);return!!(a&&a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd"))}function ZL(e,t,i){const a=St(i,t);return!a||a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd")}function ab(e,t,i){const a=St(i,t);return!a||a.type==="element"&&(a.tagName==="rp"||a.tagName==="rt")}function KL(e,t,i){const a=St(i,t);return!a||a.type==="element"&&a.tagName==="optgroup"}function WL(e,t,i){const a=St(i,t);return!a||a.type==="element"&&(a.tagName==="option"||a.tagName==="optgroup")}function JL(e,t,i){const a=St(i,t);return!!(a&&a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot"))}function eR(e,t,i){const a=St(i,t);return!a||a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot")}function tR(e,t,i){return!St(i,t)}function nR(e,t,i){const a=St(i,t);return!a||a.type==="element"&&a.tagName==="tr"}function lb(e,t,i){const a=St(i,t);return!a||a.type==="element"&&(a.tagName==="td"||a.tagName==="th")}const iR=N_({body:lR,colgroup:oR,head:aR,html:rR,tbody:sR});function rR(e){const t=St(e,-1);return!t||t.type!=="comment"}function aR(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 lR(e){const t=St(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&pu(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function oR(e,t,i){const a=R_(i,t),o=St(e,-1,!0);return i&&a&&a.type==="element"&&a.tagName==="colgroup"&&Ph(a,i.children.indexOf(a),i)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function sR(e,t,i){const a=R_(i,t),o=St(e,-1);return i&&a&&a.type==="element"&&(a.tagName==="thead"||a.tagName==="tbody")&&Ph(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 uR(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 d=[];let f;o.space==="html"&&e.tagName==="svg"&&(a.schema=uo);const h=cR(a,e.properties),y=a.all(o.space==="html"&&e.tagName==="template"?e.content:e);return a.schema=o,y&&(c=!1),(h||!s||!iR(e,t,i))&&(d.push("<",e.tagName,h?" "+h:""),c&&(o.space==="svg"||a.settings.closeSelfClosing)&&(f=h.charAt(h.length-1),(!a.settings.tightSelfClosing||f==="/"||f&&f!=='"'&&f!=="'")&&d.push(" "),d.push("/")),d.push(">")),d.push(y),!c&&(!s||!Ph(e,t,i))&&d.push("</"+e.tagName+">"),d.join("")}function cR(e,t){const i=[];let a=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const s=fR(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 fR(e,t,i){const a=Hv(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let c=e.quote,d;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 f=Da(a.attribute,Object.assign({},e.settings.characterReferences,{subset:Ds.name[o][s]}));return i===!0||(i=Array.isArray(i)?(a.commaSeparated?Lv:Uv)(i,{padLeft:!e.settings.tightCommaSeparatedLists}):String(i),e.settings.collapseEmptyAttributes&&!i)?f:(e.settings.preferUnquoted&&(d=Da(i,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Ds.unquoted[o][s]}))),d!==i&&(e.settings.quoteSmart&&rb(i,c)>rb(i,e.alternative)&&(c=e.alternative),d=c+Da(i,Object.assign({},e.settings.characterReferences,{subset:(c==="'"?Ds.single:Ds.double)[o][s],attribute:!0}))+c),f+(d&&"="+d))}const dR=["<","&"];function O_(e,t,i,a){return i&&i.type==="element"&&(i.tagName==="script"||i.tagName==="style")?e.value:Da(e.value,Object.assign({},a.settings.characterReferences,{subset:dR}))}function hR(e,t,i,a){return a.settings.allowDangerousHtml?e.value:O_(e,t,i,a)}function pR(e,t,i,a){return a.all(e)}const mR=SL("type",{invalid:gR,unknown:yR,handlers:{comment:VL,doctype:jL,element:uR,raw:hR,root:pR,text:O_}});function gR(e){throw new Error("Expected node, not `"+e+"`")}function yR(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const bR={},vR={},_R=[];function Na(e,t){const i=t||bR,a=i.quote||'"',o=a==='"'?"'":'"';if(a!=='"'&&a!=="'")throw new Error("Invalid quote `"+a+"`, expected `'` or `\"`");return{one:SR,all:ER,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||_L,characterReferences:i.characterReferences||vR,closeSelfClosing:i.closeSelfClosing||!1,closeEmptyElements:i.closeEmptyElements||!1},schema:i.space==="svg"?uo:Pv,quote:a,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function SR(e,t,i){return mR(e,t,i,this)}function ER(e){const t=[],i=e&&e.children||_R;let a=-1;for(;++a<i.length;)t[a]=this.one(i[a],a,e);return t.join("")}function ou(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 xR(e){return Array.isArray(e)?e:[e]}async function M_(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Uh(e){return!e||["plaintext","txt","text","plain"].includes(e)}function I_(e){return e==="ansi"||Uh(e)}function Bh(e){return e==="none"}function z_(e){return Bh(e)}function H_(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 bu(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 CR(e){const t=bu(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 d of t){if(s<d.length)break;s-=d.length,c++}return{line:c,character:s}}function a(o,s){let c=0;for(let d=0;d<o;d++)c+=t[d].length;return c+=s,c}return{lines:t,indexToPos:i,posToIndex:a}}function wR(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(),d=c.includes("/")?c.split("/").pop():c;d&&a.add(d)}if(!i)return Array.from(a);const o=i.getBundledLanguages();return Array.from(a).filter(s=>s&&o[s])}const Vh="light-dark()",kR=["color","background-color"];function TR(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 AR(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,d)=>c-d);return s.length?TR(o,s):o})):e}function LR(e,t,i,a,o="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},c=t.map(y=>su(e.variants[y])),d=new Set(c.flatMap(y=>Object.keys(y))),f={},h=(y,m)=>{const b=m==="color"?"":m==="background-color"?"-bg":`-${m}`;return i+t[y]+(m==="color"?"":b)};return c.forEach((y,m)=>{for(const b of d){const v=y[b]||"inherit";if(m===0&&a&&kR.includes(b))if(a===Vh&&c.length>1){const S=t.findIndex(w=>w==="light"),k=t.findIndex(w=>w==="dark");if(S===-1||k===-1)throw new gt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const D=c[S][b]||"inherit",C=c[k][b]||"inherit";f[b]=`light-dark(${D}, ${C})`,o==="css-vars"&&(f[h(m,b)]=v)}else f[b]=v;else o==="css-vars"&&(f[h(m,b)]=v)}}),s.htmlStyle=f,s}function su(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Pt.Italic&&(t["font-style"]="italic"),e.fontStyle&Pt.Bold&&(t["font-weight"]="bold");const i=[];e.fontStyle&Pt.Underline&&i.push("underline"),e.fontStyle&Pt.Strikethrough&&i.push("line-through"),i.length&&(t["text-decoration"]=i.join(" "))}return t}function ih(e){return typeof e=="string"?e:Object.entries(e).map(([t,i])=>`${t}:${i}`).join(";")}const P_=new WeakMap;function vu(e,t){P_.set(e,t)}function no(e){return P_.get(e)}class Pa{_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 Pa(Object.fromEntries(xR(i).map(a=>[a,th])),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 RR(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function RR(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 DR(e,t){if(!(e instanceof Pa))throw new gt("Invalid grammar state");return e.getInternalStack(t)}function NR(){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 gt(`Invalid decoration offset: ${c}. Code length: ${i.source.length}`);return{...o.indexToPos(c),offset:c}}else{const d=o.lines[c.line];if(d===void 0)throw new gt(`Invalid decoration position ${JSON.stringify(c)}. Lines length: ${o.lines.length}`);let f=c.character;if(f<0&&(f=d.length+f),f<0||f>d.length)throw new gt(`Invalid decoration position ${JSON.stringify(c)}. Line ${c.line} length: ${d.length}`);return{...c,character:f,offset:o.posToIndex(c.line,f)}}};const o=CR(i.source),s=(i.options.decorations||[]).map(c=>({...c,start:a(c.start),end:a(c.end)}));OR(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 AR(i,o)},code(i){if(!this.options.decorations?.length)return;const a=t(this),o=Array.from(i.children).filter(y=>y.type==="element"&&y.tagName==="span");if(o.length!==a.converter.lines.length)throw new gt(`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(y,m,b,v){const S=o[y];let k="",D=-1,C=-1;if(m===0&&(D=0),b===0&&(C=0),b===Number.POSITIVE_INFINITY&&(C=S.children.length),D===-1||C===-1)for(let T=0;T<S.children.length;T++)k+=U_(S.children[T]),D===-1&&k.length===m&&(D=T+1),C===-1&&k.length===b&&(C=T+1);if(D===-1)throw new gt(`Failed to find start index for decoration ${JSON.stringify(v.start)}`);if(C===-1)throw new gt(`Failed to find end index for decoration ${JSON.stringify(v.end)}`);const w=S.children.slice(D,C);if(!v.alwaysWrap&&w.length===S.children.length)d(S,v,"line");else if(!v.alwaysWrap&&w.length===1&&w[0].type==="element")d(w[0],v,"token");else{const T={type:"element",tagName:"span",properties:{},children:w};d(T,v,"wrapper"),S.children.splice(D,w.length,T)}}function c(y,m){o[y]=d(o[y],m,"line")}function d(y,m,b){const v=m.properties||{},S=m.transform||(k=>k);return y.tagName=m.tagName||"span",y.properties={...y.properties,...v,class:y.properties.class},m.properties?.class&&H_(y,m.properties.class),y=S(y,b)||y,y}const f=[],h=a.decorations.sort((y,m)=>m.start.offset-y.start.offset||y.end.offset-m.end.offset);for(const y of h){const{start:m,end:b}=y;if(m.line===b.line)s(m.line,m.character,b.character,y);else if(m.line<b.line){s(m.line,m.character,Number.POSITIVE_INFINITY,y);for(let v=m.line+1;v<b.line;v++)f.unshift(()=>c(v,y));s(b.line,0,b.character,y)}}f.forEach(y=>y())}}}function OR(e){for(let t=0;t<e.length;t++){const i=e[t];if(i.start.offset>i.end.offset)throw new gt(`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,d=o.start.offset<=i.start.offset&&i.start.offset<o.end.offset,f=o.start.offset<i.end.offset&&i.end.offset<=o.end.offset;if(s||c||d||f){if(s&&c||d&&f||d&&i.start.offset===i.end.offset||c&&o.start.offset===o.end.offset)continue;throw new gt(`Decorations ${JSON.stringify(i.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function U_(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(U_).join(""):""}const MR=[NR()];function uu(e){const t=IR(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...MR]}function IR(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 wr=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],pd={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function zR(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 ob(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 HR(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)pd[a]&&t.push({type:"setDecoration",value:pd[a]});else if(a<=29){const o=pd[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:wr[a-30]}});else if(a===38){const o=ob(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:wr[a-40]}});else if(a===48){const o=ob(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:wr[a-90+8]}}):a>=100&&a<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:wr[a-100+8]}})}return t}function PR(){let e=null,t=null,i=new Set;return{parse(a){const o=[];let s=0;do{const c=zR(a,s),d=c.sequence?a.substring(s,c.startPosition):a.substring(s);if(d.length>0&&o.push({value:d,foreground:e,background:t,decorations:new Set(i)}),c.sequence){const f=HR(c.sequence);for(const h of f)h.type==="resetAll"?(e=null,t=null,i.clear()):h.type==="resetForegroundColor"?e=null:h.type==="resetBackgroundColor"?t=null:h.type==="resetDecoration"&&i.delete(h.value);for(const h of f)h.type==="setForegroundColor"?e=h.value:h.type==="setBackgroundColor"?t=h.value:h.type==="setDecoration"&&i.add(h.value)}s=c.position}while(s<a.length);return o}}}var UR={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 BR(e=UR){function t(d){return e[d]}function i(d){return`#${d.map(f=>Math.max(0,Math.min(f,255)).toString(16).padStart(2,"0")).join("")}`}let a;function o(){if(a)return a;a=[];for(let h=0;h<wr.length;h++)a.push(t(wr[h]));let d=[0,95,135,175,215,255];for(let h=0;h<6;h++)for(let y=0;y<6;y++)for(let m=0;m<6;m++)a.push(i([d[h],d[y],d[m]]));let f=8;for(let h=0;h<24;h++,f+=10)a.push(i([f,f,f]));return a}function s(d){return o()[d]}function c(d){switch(d.type){case"named":return t(d.name);case"rgb":return i(d.rgb);case"table":return s(d.index)}}return{value:c}}const VR={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 jR(e,t,i){const a=ou(e,i),o=bu(t),s=Object.fromEntries(wr.map(f=>{const h=`terminal.ansi${f[0].toUpperCase()}${f.substring(1)}`,y=e.colors?.[h];return[f,y||VR[f]]})),c=BR(s),d=PR();return o.map(f=>d.parse(f[0]).map(h=>{let y,m;h.decorations.has("reverse")?(y=h.background?c.value(h.background):e.bg,m=h.foreground?c.value(h.foreground):e.fg):(y=h.foreground?c.value(h.foreground):e.fg,m=h.background?c.value(h.background):void 0),y=Ji(y,a),m=Ji(m,a),h.decorations.has("dim")&&(y=GR(y));let b=Pt.None;return h.decorations.has("bold")&&(b|=Pt.Bold),h.decorations.has("italic")&&(b|=Pt.Italic),h.decorations.has("underline")&&(b|=Pt.Underline),h.decorations.has("strikethrough")&&(b|=Pt.Strikethrough),{content:h.value,offset:f[1],color:y,bgColor:m,fontStyle:b}}))}function GR(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],d=a[3],f=Math.round(Number.parseInt(`${d}${d}`,16)/2).toString(16).padStart(2,"0");return`#${o}${o}${s}${s}${c}${c}${f}`}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 jh(e,t,i={}){const{theme:a=e.getLoadedThemes()[0]}=i,o=e.resolveLangAlias(i.lang||"text");if(Uh(o)||Bh(a))return bu(t).map(f=>[{content:f[0],offset:f[1]}]);const{theme:s,colorMap:c}=e.setTheme(a);if(o==="ansi")return jR(s,t,i);const d=e.getLanguage(i.lang||"text");if(i.grammarState){if(i.grammarState.lang!==d.name)throw new gt(`Grammar state language "${i.grammarState.lang}" does not match highlight language "${d.name}"`);if(!i.grammarState.themes.includes(s.name))throw new gt(`Grammar state themes "${i.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return FR(t,d,s,c,i)}function $R(...e){if(e.length===2)return no(e[1]);const[t,i,a={}]=e,{lang:o="text",theme:s=t.getLoadedThemes()[0]}=a;if(Uh(o)||Bh(s))throw new gt("Plain language does not have grammar state");if(o==="ansi")throw new gt("ANSI language does not have grammar state");const{theme:c,colorMap:d}=t.setTheme(s),f=t.getLanguage(o);return new Pa(Gh(i,f,c,d,a).stateStack,f.name,c.name)}function FR(e,t,i,a,o){const s=Gh(e,t,i,a,o),c=new Pa(s.stateStack,t.name,i.name);return vu(s.tokens,c),s.tokens}function Gh(e,t,i,a,o){const s=ou(i,o),{tokenizeMaxLineLength:c=0,tokenizeTimeLimit:d=500}=o,f=bu(e);let h=o.grammarState?DR(o.grammarState,i.name)??th:o.grammarContextCode!=null?Gh(o.grammarContextCode,t,i,a,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:th,y=[];const m=[];for(let b=0,v=f.length;b<v;b++){const[S,k]=f[b];if(S===""){y=[],m.push([]);continue}if(c>0&&S.length>=c){y=[],m.push([{content:S,offset:k,color:"",fontStyle:0}]);continue}let D,C,w;o.includeExplanation&&(D=t.tokenizeLine(S,h,d),C=D.tokens,w=0);const T=t.tokenizeLine2(S,h,d),I=T.tokens.length/2;for(let B=0;B<I;B++){const R=T.tokens[2*B],U=B+1<I?T.tokens[2*B+2]:S.length;if(R===U)continue;const ie=T.tokens[2*B+1],ne=Ji(a[Oa.getForeground(ie)],s),ae=Oa.getFontStyle(ie),W={content:S.substring(R,U),offset:k+R,color:ne,fontStyle:ae};if(o.includeExplanation){const F=[];if(o.includeExplanation!=="scopeName")for(const K of i.settings){let Y;switch(typeof K.scope){case"string":Y=K.scope.split(/,/).map(H=>H.trim());break;case"object":Y=K.scope;break;default:continue}F.push({settings:K,selectors:Y.map(H=>H.split(/ /))})}W.explanation=[];let J=0;for(;R+J<U;){const K=C[w],Y=S.substring(K.startIndex,K.endIndex);J+=Y.length,W.explanation.push({content:Y,scopes:o.includeExplanation==="scopeName"?qR(K.scopes):YR(F,K.scopes)}),w+=1}}y.push(W)}m.push(y),y=[],h=T.ruleStack}return{tokens:m,stateStack:h}}function qR(e){return e.map(t=>({scopeName:t}))}function YR(e,t){const i=[];for(let a=0,o=t.length;a<o;a++){const s=t[a];i[a]={scopeName:s,themeMatches:QR(e,s,t.slice(0,a))}}return i}function sb(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function XR(e,t,i){if(!sb(e[e.length-1],t))return!1;let a=e.length-2,o=i.length-1;for(;a>=0&&o>=0;)sb(e[a],i[o])&&(a-=1),o-=1;return a===-1}function QR(e,t,i){const a=[];for(const{selectors:o,settings:s}of e)for(const c of o)if(XR(c,t,i)){a.push(s);break}return a}function B_(e,t,i){const a=Object.entries(i.themes).filter(f=>f[1]).map(f=>({color:f[0],theme:f[1]})),o=a.map(f=>{const h=jh(e,t,{...i,theme:f.theme}),y=no(h),m=typeof f.theme=="string"?f.theme:f.theme.name;return{tokens:h,state:y,theme:m}}),s=ZR(...o.map(f=>f.tokens)),c=s[0].map((f,h)=>f.map((y,m)=>{const b={content:y.content,variants:{},offset:y.offset};return"includeExplanation"in i&&i.includeExplanation&&(b.explanation=y.explanation),s.forEach((v,S)=>{const{content:k,explanation:D,offset:C,...w}=v[h][m];b.variants[a[S].color]=w}),b})),d=o[0].state?new Pa(Object.fromEntries(o.map(f=>[f.theme,f.state?.getInternalStack(f.theme)])),o[0].state.lang):void 0;return d&&vu(c,d),c}function ZR(...e){const t=e.map(()=>[]),i=e.length;for(let a=0;a<e[0].length;a++){const o=e.map(f=>f[a]),s=t.map(()=>[]);t.forEach((f,h)=>f.push(s[h]));const c=o.map(()=>0),d=o.map(f=>f[0]);for(;d.every(f=>f);){const f=Math.min(...d.map(h=>h.content.length));for(let h=0;h<i;h++){const y=d[h];y.content.length===f?(s[h].push(y),c[h]+=1,d[h]=o[h][c[h]]):(s[h].push({...y,content:y.content.slice(0,f)}),d[h]={...y,content:y.content.slice(f),offset:y.offset+f})}}}return t}function cu(e,t,i){let a,o,s,c,d,f;if("themes"in i){const{defaultColor:h="light",cssVariablePrefix:y="--shiki-",colorsRendering:m="css-vars"}=i,b=Object.entries(i.themes).filter(C=>C[1]).map(C=>({color:C[0],theme:C[1]})).sort((C,w)=>C.color===h?-1:w.color===h?1:0);if(b.length===0)throw new gt("`themes` option must not be empty");const v=B_(e,t,i);if(f=no(v),h&&Vh!==h&&!b.find(C=>C.color===h))throw new gt(`\`themes\` option must contain the defaultColor key \`${h}\``);const S=b.map(C=>e.getTheme(C.theme)),k=b.map(C=>C.color);s=v.map(C=>C.map(w=>LR(w,k,y,h,m))),f&&vu(s,f);const D=b.map(C=>ou(C.theme,i));o=ub(b,S,D,y,h,"fg",m),a=ub(b,S,D,y,h,"bg",m),c=`shiki-themes ${S.map(C=>C.name).join(" ")}`,d=h?void 0:[o,a].join(";")}else if("theme"in i){const h=ou(i.theme,i);s=jh(e,t,i);const y=e.getTheme(i.theme);a=Ji(y.bg,h),o=Ji(y.fg,h),c=y.name,f=no(s)}else throw new gt("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:o,bg:a,themeName:c,rootStyle:d,grammarState:f}}function ub(e,t,i,a,o,s,c){return e.map((d,f)=>{const h=Ji(t[f][s],i[f])||"inherit",y=`${a+d.color}${s==="bg"?"-bg":""}:${h}`;if(f===0&&o){if(o===Vh&&e.length>1){const m=e.findIndex(k=>k.color==="light"),b=e.findIndex(k=>k.color==="dark");if(m===-1||b===-1)throw new gt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const v=Ji(t[m][s],i[m])||"inherit",S=Ji(t[b][s],i[b])||"inherit";return`light-dark(${v}, ${S});${y}`}return h}return c==="css-vars"?y:null}).filter(d=>!!d).join(";")}function fu(e,t,i,a={meta:{},options:i,codeToHast:(o,s)=>fu(e,o,s),codeToTokens:(o,s)=>cu(e,o,s)}){let o=t;for(const S of uu(i))o=S.preprocess?.call(a,o,i)||o;let{tokens:s,fg:c,bg:d,themeName:f,rootStyle:h,grammarState:y}=cu(e,o,i);const{mergeWhitespaces:m=!0,mergeSameStyleTokens:b=!1}=i;m===!0?s=WR(s):m==="never"&&(s=JR(s)),b&&(s=e2(s));const v={...a,get source(){return o}};for(const S of uu(i))s=S.tokens?.call(v,s)||s;return KR(s,{...i,fg:c,bg:d,themeName:f,rootStyle:i.rootStyle===!1?!1:i.rootStyle??h},v,y)}function KR(e,t,i,a=no(e)){const o=uu(t),s=[],c={type:"root",children:[]},{structure:d="classic",tabindex:f="0"}=t,h={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?h.style=t.rootStyle:h.style=`background-color:${t.bg};color:${t.fg}`),f!==!1&&f!=null&&(h.tabindex=f.toString());for(const[k,D]of Object.entries(t.meta||{}))k.startsWith("_")||(h[k]=D);let y={type:"element",tagName:"pre",properties:h,children:[],data:t.data},m={type:"element",tagName:"code",properties:{},children:s};const b=[],v={...i,structure:d,addClassToHast:H_,get source(){return i.source},get tokens(){return e},get options(){return t},get root(){return c},get pre(){return y},get code(){return m},get lines(){return b}};if(e.forEach((k,D)=>{D&&(d==="inline"?c.children.push({type:"element",tagName:"br",properties:{},children:[]}):d==="classic"&&s.push({type:"text",value:`
34
+ `}));let C={type:"element",tagName:"span",properties:{class:"line"},children:[]},w=0;for(const T of k){let I={type:"element",tagName:"span",properties:{...T.htmlAttrs},children:[{type:"text",value:T.content}]};const B=ih(T.htmlStyle||su(T));B&&(I.properties.style=B);for(const R of o)I=R?.span?.call(v,I,D+1,w,C,T)||I;d==="inline"?c.children.push(I):d==="classic"&&C.children.push(I),w+=T.content.length}if(d==="classic"){for(const T of o)C=T?.line?.call(v,C,D+1)||C;b.push(C),s.push(C)}else d==="inline"&&b.push(C)}),d==="classic"){for(const k of o)m=k?.code?.call(v,m)||m;y.children.push(m);for(const k of o)y=k?.pre?.call(v,y)||y;c.children.push(y)}else if(d==="inline"){const k=[];let D={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const T of c.children)T.type==="element"&&T.tagName==="br"?(k.push(D),D={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(T.type==="element"||T.type==="text")&&D.children.push(T);k.push(D);let w={type:"element",tagName:"code",properties:{},children:k};for(const T of o)w=T?.code?.call(v,w)||w;c.children=[];for(let T=0;T<w.children.length;T++){T>0&&c.children.push({type:"element",tagName:"br",properties:{},children:[]});const I=w.children[T];I.type==="element"&&c.children.push(...I.children)}}let S=c;for(const k of o)S=k?.root?.call(v,S)||S;return a&&vu(S,a),S}function WR(e){return e.map(t=>{const i=[];let a="",o;return t.forEach((s,c)=>{const f=!(s.fontStyle&&(s.fontStyle&Pt.Underline||s.fontStyle&Pt.Strikethrough));f&&s.content.match(/^\s+$/)&&t[c+1]?(o===void 0&&(o=s.offset),a+=s.content):a?(f?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 JR(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 d=[{...i,offset:i.offset+o.length,content:s}];return o&&d.unshift({content:o,offset:i.offset}),c&&d.push({content:c,offset:i.offset+o.length+s.length}),d}))}function e2(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=ih(o.htmlStyle||su(o)),c=ih(a.htmlStyle||su(a)),d=o.fontStyle&&(o.fontStyle&Pt.Underline||o.fontStyle&Pt.Strikethrough),f=a.fontStyle&&(a.fontStyle&Pt.Underline||a.fontStyle&Pt.Strikethrough);!d&&!f&&s===c?o.content+=a.content:i.push({...a})}return i})}const t2=Na;function n2(e,t,i){const a={meta:{},options:i,codeToHast:(s,c)=>fu(e,s,c),codeToTokens:(s,c)=>cu(e,s,c)};let o=t2(fu(e,t,i,a));for(const s of uu(i))o=s.postprocess?.call(a,o,i)||o;return o}const cb={light:"#333333",dark:"#bbbbbb"},fb={light:"#fffffe",dark:"#1e1e1e"},db="__shiki_resolved";function _u(e){if(e?.[db])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 d=t.settings?t.settings.find(f=>!f.name&&!f.scope):void 0;d?.settings?.foreground&&(a=d.settings.foreground),d?.settings?.background&&(i=d.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"?cb.light:cb.dark),i||(i=t.type==="light"?fb.light:fb.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(d){if(s.has(d))return s.get(d);o+=1;const f=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${f}`]?c(d):(s.set(d,f),f)}t.settings=t.settings.map(d=>{const f=d.settings?.foreground&&!d.settings.foreground.startsWith("#"),h=d.settings?.background&&!d.settings.background.startsWith("#");if(!f&&!h)return d;const y={...d,settings:{...d.settings}};if(f){const m=c(d.settings.foreground);t.colorReplacements[m]=d.settings.foreground,y.settings.foreground=m}if(h){const m=c(d.settings.background);t.colorReplacements[m]=d.settings.background,y.settings.background=m}return y});for(const d of Object.keys(t.colors||{}))if((d==="editor.foreground"||d==="editor.background"||d.startsWith("terminal.ansi"))&&!t.colors[d]?.startsWith("#")){const f=c(t.colors[d]);t.colorReplacements[f]=t.colors[d],t.colors[d]=f}return Object.defineProperty(t,db,{enumerable:!1,writable:!1,value:!0}),t}async function V_(e){return Array.from(new Set((await Promise.all(e.filter(t=>!I_(t)).map(async t=>await M_(t).then(i=>Array.isArray(i)?i:[i])))).flat()))}async function j_(e){return(await Promise.all(e.map(async i=>z_(i)?null:_u(await M_(i))))).filter(i=>!!i)}let i2=3;function r2(e,t=3){t>i2||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let Ta=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function G_(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 Ta(`Circular alias \`${Array.from(i).join(" -> ")} -> ${e}\``);i.add(e)}}return e}class a2 extends vL{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=_u(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=nu.createFromRawTheme(t),this._textmateThemeCache.set(t,i)),this._syncRegistry.setTheme(i)}getGrammar(t){return t=G_(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(f=>a.map(([h])=>h).includes(f)):!1).filter(s=>!a.includes(s));throw new Ta(`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 l2{_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 Pl=0;function o2(e){Pl+=1,e.warnings!==!1&&Pl>=10&&Pl%10===0&&console.warn(`[Shiki] ${Pl} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Ta("`engine` option is required for synchronous mode");const i=(e.langs||[]).flat(1),a=(e.themes||[]).flat(1).map(_u),o=new l2(e.engine,i),s=new a2(o,a,i,e.langAlias);let c;function d(T){return G_(T,e.langAlias)}function f(T){C();const I=s.getGrammar(typeof T=="string"?T:T.name);if(!I)throw new Ta(`Language \`${T}\` not found, you may need to load it first`);return I}function h(T){if(T==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};C();const I=s.getTheme(T);if(!I)throw new Ta(`Theme \`${T}\` not found, you may need to load it first`);return I}function y(T){C();const I=h(T);c!==T&&(s.setTheme(I),c=T);const B=s.getColorMap();return{theme:I,colorMap:B}}function m(){return C(),s.getLoadedThemes()}function b(){return C(),s.getLoadedLanguages()}function v(...T){C(),s.loadLanguages(T.flat(1))}async function S(...T){return v(await V_(T))}function k(...T){C();for(const I of T.flat(1))s.loadTheme(I)}async function D(...T){return C(),k(await j_(T))}function C(){if(t)throw new Ta("Shiki instance has been disposed")}function w(){t||(t=!0,s.dispose(),Pl-=1)}return{setTheme:y,getTheme:h,getLanguage:f,getLoadedThemes:m,getLoadedLanguages:b,resolveLangAlias:d,loadLanguage:S,loadLanguageSync:v,loadTheme:D,loadThemeSync:k,dispose:w,[Symbol.dispose]:w}}async function s2(e){e.engine||r2("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,i,a]=await Promise.all([j_(e.themes||[]),V_(e.langs||[]),e.engine]);return o2({...e,themes:t,langs:i,engine:a})}async function u2(e){const t=await s2(e);return{getLastGrammarState:(...i)=>$R(t,...i),codeToTokensBase:(i,a)=>jh(t,i,a),codeToTokensWithThemes:(i,a)=>B_(t,i,a),codeToTokens:(i,a)=>cu(t,i,a),codeToHast:(i,a)=>fu(t,i,a),codeToHtml:(i,a)=>n2(t,i,a),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function c2(e){const t=e.langs,i=e.themes,a=e.engine;async function o(s){function c(m){if(typeof m=="string"){if(m=s.langAlias?.[m]||m,I_(m))return[];const b=t[m];if(!b)throw new gt(`Language \`${m}\` is not included in this bundle. You may want to load it from external source.`);return b}return m}function d(m){if(z_(m))return"none";if(typeof m=="string"){const b=i[m];if(!b)throw new gt(`Theme \`${m}\` is not included in this bundle. You may want to load it from external source.`);return b}return m}const f=(s.themes??[]).map(m=>d(m)),h=(s.langs??[]).map(m=>c(m)),y=await u2({engine:s.engine??a(),...s,themes:f,langs:h});return{...y,loadLanguage(...m){return y.loadLanguage(...m.map(c))},loadTheme(...m){return y.loadTheme(...m.map(d))},getBundledLanguages(){return t},getBundledThemes(){return i}}}return o}function f2(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 d2(e,t){const i=f2(e);async function a(o,s){const c=await i({langs:[s.lang],themes:"theme"in s?[s.theme]:Object.values(s.themes)}),d=await t?.guessEmbeddedLanguages?.(o,s.lang,c);return d&&await c.loadLanguage(...d),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 $_=[{id:"abap",name:"ABAP",import:(()=>E(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>E(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>E(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>E(()=>import("./angular-html-DMxchsRu.js").then(e=>e.a),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>E(()=>import("./angular-ts-DzOHUlBM.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>E(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>E(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>E(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>E(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>E(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>E(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>E(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>E(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>E(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>E(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>E(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>E(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>E(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>E(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>E(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>E(()=>import("./bird2-DPOp833l.js"),[]))},{id:"blade",name:"Blade",import:(()=>E(()=>import("./blade-D4QpJJKB.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>E(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>E(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>E(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>E(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>E(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>E(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>E(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>E(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>E(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>E(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>E(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>E(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>E(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>E(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>E(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>E(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>E(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>E(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>E(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>E(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>E(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>E(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>E(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>E(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>E(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>E(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>E(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>E(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>E(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>E(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>E(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>E(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>E(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>E(()=>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:(()=>E(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>E(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>E(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>E(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>E(()=>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:(()=>E(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>E(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>E(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>E(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>E(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>E(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>E(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>E(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>E(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>E(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>E(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>E(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>E(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>E(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>E(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>E(()=>import("./go-CxLEBnE3.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>E(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>E(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>E(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>E(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>E(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>E(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>E(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>E(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>E(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>E(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>E(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>E(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>E(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>E(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>E(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>E(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>E(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>E(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>E(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>E(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>E(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>E(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>E(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>E(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>E(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>E(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>E(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>E(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>E(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>E(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>E(()=>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:(()=>E(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>E(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>E(()=>import("./kusto-DZf3V79B.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>E(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>E(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>E(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>E(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>E(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>E(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>E(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>E(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>E(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>E(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>E(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>E(()=>import("./marko-CnJfTvn9.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>E(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>E(()=>import("./mdc-BMNejdWA.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>E(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>E(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>E(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>E(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>E(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>E(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>E(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>E(()=>import("./nextflow-Zz6hmt5N.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>E(()=>import("./nextflow-groovy-BeH2EWoN.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>E(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>E(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>E(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>E(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>E(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>E(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>E(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>E(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>E(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>E(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>E(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>E(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>E(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>E(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>E(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>E(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>E(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>E(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>E(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>E(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>E(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>E(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>E(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>E(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>E(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>E(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>E(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>E(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>E(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>E(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>E(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>E(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>E(()=>import("./razor-Uh8Bk_45.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>E(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>E(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>E(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>E(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>E(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>E(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>E(()=>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:(()=>E(()=>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:(()=>E(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>E(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>E(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>E(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>E(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>E(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>E(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>E(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>E(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>E(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>E(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>E(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>E(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>E(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>E(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>E(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>E(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>E(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>E(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>E(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>E(()=>import("./svelte-C_ipcX3V.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>E(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>E(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>E(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>E(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>E(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>E(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>E(()=>import("./templ-P3uqSqPl.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>E(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>E(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>E(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>E(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>E(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>E(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>E(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>E(()=>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:(()=>E(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>E(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>E(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>E(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>E(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>E(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>E(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>E(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>E(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>E(()=>import("./vue-DN_0RTcg.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>E(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>E(()=>import("./vue-vine-CQOfvN7w.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>E(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>E(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>E(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>E(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>E(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>E(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>E(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>E(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>E(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>E(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>E(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>E(()=>import("./zig-VOosw3JB.js"),[]))}],h2=Object.fromEntries($_.map(e=>[e.id,e.import])),p2=Object.fromEntries($_.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),rh={...h2,...p2},m2=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>E(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>E(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>E(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>E(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>E(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>E(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>E(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>E(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>E(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>E(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>E(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>E(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>E(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>E(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>E(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>E(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>E(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>E(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>E(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>E(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>E(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>E(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>E(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>E(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>E(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>E(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>E(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>E(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>E(()=>import("./horizon-bright-Cn-bp-IR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>E(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>E(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>E(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>E(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>E(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>E(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>E(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>E(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>E(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>E(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>E(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>E(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>E(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>E(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>E(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>E(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>E(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>E(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>E(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>E(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>E(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>E(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>E(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>E(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>E(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>E(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>E(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>E(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>E(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>E(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>E(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>E(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>E(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>E(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>E(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>E(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],g2=Object.fromEntries(m2.map(e=>[e.id,e.import]));class $h extends Error{constructor(t){super(t),this.name="ShikiError"}}function y2(){return 2147483648}function b2(){return typeof performance<"u"?performance.now():Date.now()}const v2=(e,t)=>e+(t-e%t)%t;async function _2(e){let t,i;const a={};function o(v){i=v,a.HEAPU8=new Uint8Array(v),a.HEAPU32=new Uint32Array(v)}function s(v,S,k){a.HEAPU8.copyWithin(v,S,S+k)}function c(v){try{return t.grow(v-i.byteLength+65535>>>16),o(t.buffer),1}catch{}}function d(v){const S=a.HEAPU8.length;v=v>>>0;const k=y2();if(v>k)return!1;for(let D=1;D<=4;D*=2){let C=S*(1+.2/D);C=Math.min(C,v+100663296);const w=Math.min(k,v2(Math.max(v,C),65536));if(c(w))return!0}return!1}const f=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function h(v,S,k=1024){const D=S+k;let C=S;for(;v[C]&&!(C>=D);)++C;if(C-S>16&&v.buffer&&f)return f.decode(v.subarray(S,C));let w="";for(;S<C;){let T=v[S++];if(!(T&128)){w+=String.fromCharCode(T);continue}const I=v[S++]&63;if((T&224)===192){w+=String.fromCharCode((T&31)<<6|I);continue}const B=v[S++]&63;if((T&240)===224?T=(T&15)<<12|I<<6|B:T=(T&7)<<18|I<<12|B<<6|v[S++]&63,T<65536)w+=String.fromCharCode(T);else{const R=T-65536;w+=String.fromCharCode(55296|R>>10,56320|R&1023)}}return w}function y(v,S){return v?h(a.HEAPU8,v,S):""}const m={emscripten_get_now:b2,emscripten_memcpy_big:s,emscripten_resize_heap:d,fd_write:()=>0};async function b(){const S=await e({env:m,wasi_snapshot_preview1:m});t=S.memory,o(t.buffer),Object.assign(a,S),a.UTF8ToString=y}return await b(),a}var S2=Object.defineProperty,E2=(e,t,i)=>t in e?S2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,vt=(e,t,i)=>E2(e,typeof t!="symbol"?t+"":t,i);let kt=null;function x2(e){throw new $h(e.UTF8ToString(e.getLastOnigError()))}class Su{constructor(t){vt(this,"utf16Length"),vt(this,"utf8Length"),vt(this,"utf16Value"),vt(this,"utf8Value"),vt(this,"utf16OffsetToUtf8"),vt(this,"utf8OffsetToUtf16");const i=t.length,a=Su._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 d=new Uint8Array(a);let f=0;for(let h=0;h<i;h++){const y=t.charCodeAt(h);let m=y,b=!1;if(y>=55296&&y<=56319&&h+1<i){const v=t.charCodeAt(h+1);v>=56320&&v<=57343&&(m=(y-55296<<10)+65536|v-56320,b=!0)}o&&(s[h]=f,b&&(s[h+1]=f),m<=127?c[f+0]=h:m<=2047?(c[f+0]=h,c[f+1]=h):m<=65535?(c[f+0]=h,c[f+1]=h,c[f+2]=h):(c[f+0]=h,c[f+1]=h,c[f+2]=h,c[f+3]=h)),m<=127?d[f++]=m:m<=2047?(d[f++]=192|(m&1984)>>>6,d[f++]=128|(m&63)>>>0):m<=65535?(d[f++]=224|(m&61440)>>>12,d[f++]=128|(m&4032)>>>6,d[f++]=128|(m&63)>>>0):(d[f++]=240|(m&1835008)>>>18,d[f++]=128|(m&258048)>>>12,d[f++]=128|(m&4032)>>>6,d[f++]=128|(m&63)>>>0),b&&h++}this.utf16Length=i,this.utf8Length=a,this.utf16Value=t,this.utf8Value=d,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,d=!1;if(s>=55296&&s<=56319&&a+1<o){const f=t.charCodeAt(a+1);f>=56320&&f<=57343&&(c=(s-55296<<10)+65536|f-56320,d=!0)}c<=127?i+=1:c<=2047?i+=2:c<=65535?i+=3:i+=4,d&&a++}return i}createString(t){const i=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,i),i}}const Eu=class Fn{constructor(t){if(vt(this,"id",++Fn.LAST_ID),vt(this,"_onigBinding"),vt(this,"content"),vt(this,"utf16Length"),vt(this,"utf8Length"),vt(this,"utf16OffsetToUtf8"),vt(this,"utf8OffsetToUtf16"),vt(this,"ptr"),!kt)throw new $h("Must invoke loadWasm first.");this._onigBinding=kt,this.content=t;const i=new Su(t);this.utf16Length=i.utf16Length,this.utf8Length=i.utf8Length,this.utf16OffsetToUtf8=i.utf16OffsetToUtf8,this.utf8OffsetToUtf16=i.utf8OffsetToUtf16,this.utf8Length<1e4&&!Fn._sharedPtrInUse?(Fn._sharedPtr||(Fn._sharedPtr=kt.omalloc(1e4)),Fn._sharedPtrInUse=!0,kt.HEAPU8.set(i.utf8Value,Fn._sharedPtr),this.ptr=Fn._sharedPtr):this.ptr=i.createString(kt)}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===Fn._sharedPtr?Fn._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};vt(Eu,"LAST_ID",0);vt(Eu,"_sharedPtr",0);vt(Eu,"_sharedPtrInUse",!1);let F_=Eu;class C2{constructor(t){if(vt(this,"_onigBinding"),vt(this,"_ptr"),!kt)throw new $h("Must invoke loadWasm first.");const i=[],a=[];for(let d=0,f=t.length;d<f;d++){const h=new Su(t[d]);i[d]=h.createString(kt),a[d]=h.utf8Length}const o=kt.omalloc(4*t.length);kt.HEAPU32.set(i,o/4);const s=kt.omalloc(4*t.length);kt.HEAPU32.set(a,s/4);const c=kt.createOnigScanner(o,s,t.length);for(let d=0,f=t.length;d<f;d++)kt.ofree(i[d]);kt.ofree(s),kt.ofree(o),c===0&&x2(kt),this._onigBinding=kt,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 F_(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 d=s.HEAPU32;let f=c/4;const h=d[f++],y=d[f++],m=[];for(let b=0;b<y;b++){const v=t.convertUtf8OffsetToUtf16(d[f++]),S=t.convertUtf8OffsetToUtf16(d[f++]);m[b]={start:v,end:S,length:S-v}}return{index:h,captureIndices:m}}}function w2(e){return typeof e.instantiator=="function"}function k2(e){return typeof e.default=="function"}function T2(e){return typeof e.data<"u"}function A2(e){return typeof Response<"u"&&e instanceof Response}function L2(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 Ns;function R2(e){if(Ns)return Ns;async function t(){kt=await _2(async i=>{let a=e;return a=await a,typeof a=="function"&&(a=await a(i)),typeof a=="function"&&(a=await a(i)),w2(a)?a=await a.instantiator(i):k2(a)?a=await a.default(i):(T2(a)&&(a=a.data),A2(a)?typeof WebAssembly.instantiateStreaming=="function"?a=await D2(a)(i):a=await N2(a)(i):L2(a)?a=await md(a)(i):a instanceof WebAssembly.Module?a=await md(a)(i):"default"in a&&a.default instanceof WebAssembly.Module&&(a=await md(a.default)(i))),"instance"in a&&(a=a.instance),"exports"in a&&(a=a.exports),a})}return Ns=t(),Ns}function md(e){return t=>WebAssembly.instantiate(e,t)}function D2(e){return t=>WebAssembly.instantiateStreaming(e,t)}function N2(e){return async t=>{const i=await e.arrayBuffer();return WebAssembly.instantiate(i,t)}}async function q_(e){return e&&await R2(e),{createScanner(t){return new C2(t.map(i=>typeof i=="string"?i:i.source))},createString(t){return new F_(t)}}}const Y_=c2({langs:rh,themes:g2,engine:()=>q_(E(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:hb}=d2(Y_,{guessEmbeddedLanguages:wR});function Ua(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function O2(e,t,i){return e.has(t)||e.set(t,i),e.get(t)}const Fh=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Tt=String.raw;function Ba(e,t){if(e==null)throw new Error(t??"Value expected");return e}const X_=Tt`\[\^?`,Q_=`c.? | C(?:-.?)?|${Tt`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Tt`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Tt`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Tt`o\{[^\}]*\}?`}|${Tt`\d{1,3}`}`,qh=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Os=new RegExp(Tt`
35
+ \\ (?:
36
+ ${Q_}
37
+ | [gk]<[^>]*>?
38
+ | [gk]'[^']*'?
39
+ | .
40
+ )
41
+ | \( (?:
42
+ \? (?:
43
+ [:=!>({]
44
+ | <[=!]
45
+ | <[^>]*>
46
+ | '[^']*'
47
+ | ~\|?
48
+ | #(?:[^)\\]|\\.?)*
49
+ | [^:)]*[:)]
50
+ )?
51
+ | \*[^\)]*\)?
52
+ )?
53
+ | (?:${qh.source})+
54
+ | ${X_}
55
+ | .
56
+ `.replace(/\s+/g,""),"gsu"),gd=new RegExp(Tt`
57
+ \\ (?:
58
+ ${Q_}
59
+ | .
60
+ )
61
+ | \[:(?:\^?\p{Alpha}+|\^):\]
62
+ | ${X_}
63
+ | &&
64
+ | .
65
+ `.replace(/\s+/g,""),"gsu");function M2(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=J2(i.flags),o=[a.extended],s={captureGroup:i.rules.captureGroup,getCurrentModX(){return o.at(-1)},numOpenGroups:0,popModX(){o.pop()},pushModX(m){o.push(m)},replaceCurrentModX(m){o[o.length-1]=m},singleline:i.rules.singleline};let c=[],d;for(Os.lastIndex=0;d=Os.exec(e);){const m=I2(s,e,d[0],Os.lastIndex);m.tokens?c.push(...m.tokens):m.token&&c.push(m.token),m.lastIndex!==void 0&&(Os.lastIndex=m.lastIndex)}const f=[];let h=0;c.filter(m=>m.type==="GroupOpen").forEach(m=>{m.kind==="capturing"?m.number=++h:m.raw==="("&&f.push(m)}),h||f.forEach((m,b)=>{m.kind="capturing",m.number=b+1});const y=h||f.length;return{tokens:c.map(m=>m.type==="EscapedNumber"?tD(m,y):m).flat(),flags:a}}function I2(e,t,i,a){const[o,s]=i;if(i==="["||i==="[^"){const c=z2(t,i,a);return{tokens:c.tokens,lastIndex:c.lastIndex}}if(o==="\\"){if("AbBGyYzZ".includes(s))return{token:pb(i,i)};if(/^\\g[<']/.test(i)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(i))throw new Error(`Invalid group name "${i}"`);return{token:q2(i)}}if(/^\\k[<']/.test(i)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(i))throw new Error(`Invalid group name "${i}"`);return{token:K_(i)}}if(s==="K")return{token:W_("keep",i)};if(s==="N"||s==="R")return{token:kr("newline",i,{negate:s==="N"})};if(s==="O")return{token:kr("any",i)};if(s==="X")return{token:kr("text_segment",i)};const c=Z_(i,{inCharClass:!1});return Array.isArray(c)?{tokens:c}:{token:c}}if(o==="("){if(s==="*")return{token:Z2(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:Q2(i,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,i==="("&&!e.captureGroup||i==="(?:")return{token:Ca("group",i)};if(i==="(?>")return{token:Ca("atomic",i)};if(i==="(?="||i==="(?!"||i==="(?<="||i==="(?<!")return{token:Ca(i[2]==="<"?"lookbehind":"lookahead",i,{negate:i.endsWith("!")})};if(i==="("&&e.captureGroup||i.startsWith("(?<")&&i.endsWith(">")||i.startsWith("(?'")&&i.endsWith("'"))return{token:Ca("capturing",i,{...i!=="("&&{name:i.slice(3,-1)}})};if(i.startsWith("(?~")){if(i==="(?~|")throw new Error(`Unsupported absence function kind "${i}"`);return{token:Ca("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:G2(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:kr("dot",i)};if(i==="^"||i==="$"){const c=e.singleline?{"^":Tt`\A`,$:Tt`\Z`}[i]:i;return{token:pb(c,i)}}return i==="|"?{token:P2(i)}:qh.test(i)?{tokens:nD(i)}:{token:Ei(Ua(i),i)}}function z2(e,t,i){const a=[mb(t[1]==="^",t)];let o=1,s;for(gd.lastIndex=i;s=gd.exec(e);){const c=s[0];if(c[0]==="["&&c[1]!==":")o++,a.push(mb(c[1]==="^",c));else if(c==="]"){if(a.at(-1).type==="CharacterClassOpen")a.push(Ei(93,c));else if(o--,a.push(U2(c)),!o)break}else{const d=H2(c);Array.isArray(d)?a.push(...d):a.push(d)}}return{tokens:a,lastIndex:gd.lastIndex||e.length}}function H2(e){if(e[0]==="\\")return Z_(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Fh.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return kr("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?B2(e):e==="&&"?V2(e):Ei(Ua(e),e)}function Z_(e,{inCharClass:t}){const i=e[1];if(i==="c"||i==="C")return X2(e);if("dDhHsSwW".includes(i))return K2(e);if(e.startsWith(Tt`\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 W2(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 d=[...s.encode(c)].map(f=>`\\x${f.toString(16)}`).join("");return Ei(Ua(c),d)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(i==="u"||i==="x")return Ei(eD(e),e);if(gb.has(i))return Ei(gb.get(i),e);if(/\d/.test(i))return j2(t,e);if(e==="\\")throw new Error(Tt`Incomplete escape "\"`);if(i==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Ei(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function P2(e){return{type:"Alternator",raw:e}}function pb(e,t){return{type:"Assertion",kind:e,raw:t}}function K_(e){return{type:"Backreference",raw:e}}function Ei(e,t){return{type:"Character",value:e,raw:t}}function U2(e){return{type:"CharacterClassClose",raw:e}}function B2(e){return{type:"CharacterClassHyphen",raw:e}}function V2(e){return{type:"CharacterClassIntersector",raw:e}}function mb(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function kr(e,t,i={}){return{type:"CharacterSet",kind:e,...i,raw:t}}function W_(e,t,i={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Ba(i.flags),raw:t}}function j2(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function G2(e){return{type:"GroupClose",raw:e}}function Ca(e,t,i={}){return{type:"GroupOpen",kind:e,...i,raw:t}}function $2(e,t,i,a){return{type:"NamedCallout",kind:e,tag:t,arguments:i,raw:a}}function F2(e,t,i,a){return{type:"Quantifier",kind:e,min:t,max:i,raw:a}}function q2(e){return{type:"Subroutine",raw:e}}const Y2=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),gb=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function X2(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 Ei(Ua(t.toUpperCase())-64,e)}function Q2(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=bb(i),c=bb(a),d={};if(s&&(d.enable=s),c&&(d.disable=c),e.endsWith(")"))return t.replaceCurrentModX(o),W_("flags",e,{flags:d});if(e.endsWith(":"))return t.pushModX(o),t.numOpenGroups++,Ca("group",e,{...(s||c)&&{flags:d}});throw new Error(`Unexpected flag modifier "${e}"`)}function Z2(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(y=>y!=="").map(y=>/^[+-]?\d+$/.test(y)?+y:y):[],[c,d,f]=s,h=Y2.has(i)?i.toLowerCase():"custom";switch(h){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 d=="number"||!/^[<>X]$/.test(d)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${d}"`);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 d=="number"||!/^(?:[<>!=]=|[<>])$/.test(d))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${d}"`);if(typeof f=="string"&&!/^[A-Za-z_]\w*$/.test(f))throw new Error(`Named callout argument three must be a tag or number "${f}"`);break;case"custom":throw new Error(`Undefined callout name "${i}"`);default:throw new Error(`Unexpected named callout kind "${h}"`)}return $2(h,a??null,o?.split(",")??null,e)}function yb(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 F2(t,i,a,e)}function K2(e){const t=e[1].toLowerCase();return kr({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function W2(e){const{p:t,neg:i,value:a}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return kr("property",e,{value:a,negate:t==="P"&&!i||t==="p"&&!!i})}function bb(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 J2(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 eD(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 tD(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[K_(i)];const s=[],c=o.match(/^[0-7]+|\d/g);for(let d=0;d<c.length;d++){const f=c[d];let h;if(d===0&&f!=="8"&&f!=="9"){if(h=parseInt(f,8),h>127)throw new Error(Tt`Octal encoded byte above 177 unsupported "${i}"`)}else h=Ua(f);s.push(Ei(h,(d===0?"\\":"")+f))}return s}function nD(e){const t=[],i=new RegExp(qh,"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:d}=s.groups;if(+c>+d&&o.endsWith("?")){i.lastIndex--,t.push(yb(o.slice(0,-1)));continue}}}t.push(yb(o))}return t}function J_(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 iD(e){return rD.has(e.type)}const rD=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function e1(e,t={}){const i={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},a=M2(e,{flags:i.flags,rules:{captureGroup:i.rules.captureGroup,singleline:i.rules.singleline}}),o=(b,v)=>{const S=a.tokens[s.nextIndex];switch(s.parent=b,s.nextIndex++,S.type){case"Alternator":return Tr();case"Assertion":return aD(S);case"Backreference":return lD(S,s);case"Character":return xu(S.value,{useLastValid:!!v.isCheckingRangeEnd});case"CharacterClassHyphen":return oD(S,s,v);case"CharacterClassOpen":return sD(S,s,v);case"CharacterSet":return uD(S,s);case"Directive":return mD(S.kind,{flags:S.flags});case"GroupOpen":return cD(S,s,v);case"NamedCallout":return yD(S.kind,S.tag,S.arguments);case"Quantifier":return fD(S,s);case"Subroutine":return dD(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=vD(gD(a.flags));let d=c.body[0];for(;s.nextIndex<a.tokens.length;){const b=o(d,{});b.type==="Alternative"?(c.body.push(b),d=b):d.body.push(b)}const{capturingGroups:f,hasNumberedRef:h,namedGroupsByName:y,subroutines:m}=s;if(h&&y.size&&!i.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:b}of m)if(typeof b=="number"){if(b>f.length)throw new Error("Subroutine uses a group number that's not defined");b&&(f[b-1].isSubroutined=!0)}else if(y.has(b)){if(y.get(b).length>1)throw new Error(Tt`Subroutine uses a duplicate group name "\g<${b}>"`);y.get(b)[0].isSubroutined=!0}else throw new Error(Tt`Subroutine uses a group name that's not defined "\g<${b}>"`);return c}function aD({kind:e}){return ah(Ba({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===Tt`\B`||e===Tt`\Y`})}function lD({raw:e},t){const i=/^\\k[<']/.test(e),a=i?e.slice(3,-1):e.slice(1),o=(s,c=!1)=>{const d=t.capturingGroups.length;let f=!1;if(s>d)if(t.skipBackrefValidation)f=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,lh(c?d+1-s:s,{orphan:f})};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 lh(a)}return o(+a)}function oD(e,t,i){const{tokens:a,walk:o}=t,s=t.parent,c=s.body.at(-1),d=a[t.nextIndex];if(!i.isCheckingRangeEnd&&c&&c.type!=="CharacterClass"&&c.type!=="CharacterClassRange"&&d&&d.type!=="CharacterClassOpen"&&d.type!=="CharacterClassClose"&&d.type!=="CharacterClassIntersector"){const f=o(s,{...i,isCheckingRangeEnd:!0});if(c.type==="Character"&&f.type==="Character")return s.body.pop(),pD(c,f);throw new Error("Invalid character class range")}return xu(Ua("-"))}function sD({negate:e},t,i){const{tokens:a,walk:o}=t,s=[Ks()],c=a[t.nextIndex];let d=Sb(c);for(;d.type!=="CharacterClassClose";){if(d.type==="CharacterClassIntersector")s.push(Ks()),t.nextIndex++;else{const h=s.at(-1);h.body.push(o(h,i))}d=Sb(a[t.nextIndex],c)}const f=Ks({negate:e});return s.length===1?f.body=s[0].body:(f.kind="intersection",f.body=s.map(h=>h.body.length===1?h.body[0]:h)),t.nextIndex++,f}function uD({kind:e,negate:t,value:i},a){const{normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:c}=a;if(e==="property"){const d=Cu(i);if(Fh.has(d)&&!c?.has(d))e="posix",i=d;else return wa(i,{negate:t,normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:c})}return e==="posix"?bD(i,{negate:t}):oh(e,{negate:t})}function cD(e,t,i){const{tokens:a,capturingGroups:o,namedGroupsByName:s,skipLookbehindValidation:c,walk:d}=t,f=_D(e),h=f.type==="AbsenceFunction",y=_b(f),m=y&&f.negate;if(f.type==="CapturingGroup"&&(o.push(f),f.name&&O2(s,f.name,[]).push(f)),h&&i.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let b=Eb(a[t.nextIndex]);for(;b.type!=="GroupClose";){if(b.type==="Alternator")f.body.push(Tr()),t.nextIndex++;else{const v=f.body.at(-1),S=d(v,{...i,isInAbsenceFunction:i.isInAbsenceFunction||h,isInLookbehind:i.isInLookbehind||y,isInNegLookbehind:i.isInNegLookbehind||m});if(v.body.push(S),(y||i.isInLookbehind)&&!c){const k="Lookbehind includes a pattern not allowed by Oniguruma";if(m||i.isInNegLookbehind){if(vb(S)||S.type==="CapturingGroup")throw new Error(k)}else if(vb(S)||_b(S)&&S.negate)throw new Error(k)}}b=Eb(a[t.nextIndex])}return t.nextIndex++,f}function fD({kind:e,min:t,max:i},a){const o=a.parent,s=o.body.at(-1);if(!s||!iD(s))throw new Error("Quantifier requires a repeatable token");const c=n1(e,t,i,s);return o.body.pop(),c}function dD({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 d=+s.groups.num,f=i.length;if(t.hasNumberedRef=!0,o={"":d,"+":f+d,"-":f+1-d}[s.groups.sign],o<1)throw new Error("Invalid subroutine number")}else o==="0"&&(o=0);const c=i1(o);return a.push(c),c}function hD(e,t){return{type:"AbsenceFunction",kind:e,body:ho(t?.body)}}function Tr(e){return{type:"Alternative",body:r1(e?.body)}}function ah(e,t){const i={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(i.negate=!!t?.negate),i}function lh(e,t){const i=!!t?.orphan;return{type:"Backreference",ref:e,...i&&{orphan:i}}}function t1(e,t){const i={name:void 0,isSubroutined:!1,...t};if(i.name!==void 0&&!SD(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:ho(t?.body)}}function xu(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:r1(e?.body)}}function pD(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function oh(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 mD(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Ba(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function gD(e){return{type:"Flags",...e}}function On(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:ho(e?.body)}}function Cr(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:ho(e?.body)}}function yD(e,t,i){return{type:"NamedCallout",kind:e,tag:t,arguments:i}}function bD(e,t){const i=!!t?.negate;if(!Fh.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:i}}function n1(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 vD(e,t){return{type:"Regex",body:ho(t?.body),flags:e}}function i1(e){return{type:"Subroutine",ref:e}}function wa(e,t){const i={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let a=i.unicodePropertyMap?.get(Cu(e));if(!a){if(i.normalizeUnknownPropertyNames)a=ED(e);else if(i.unicodePropertyMap&&!i.skipPropertyNameValidation)throw new Error(Tt`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:a??e,negate:i.negate}}function _D({flags:e,kind:t,name:i,negate:a,number:o}){switch(t){case"absence_repeater":return hD("repeater");case"atomic":return On({atomic:!0});case"capturing":return t1(o,{name:i});case"group":return On({flags:e});case"lookahead":case"lookbehind":return Cr({behind:t==="lookbehind",negate:a});default:throw new Error(`Unexpected group kind "${t}"`)}}function ho(e){if(e===void 0)e=[Tr()];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 r1(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 vb(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function _b(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function SD(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function ED(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 Cu(e){return e.replace(/[- _]+/g,"").toLowerCase()}function Sb(e,t){const i=t;return Ba(e,`Unclosed character class${i?.type==="Character"&&i.value===93&&i.raw==="]"?' (started with "]")':""}`)}function Eb(e){return Ba(e,"Unclosed group")}function Zl(e,t,i=null){function a(s,c){for(let d=0;d<s.length;d++){const f=o(s[d],c,d,s);d=Math.max(-1,d+f)}}function o(s,c=null,d=null,f=null){let h=0,y=!1;const m={node:s,parent:c,key:d,container:f,root:e,remove(){Ms(f).splice(Math.max(0,va(d)+h),1),h--,y=!0},removeAllNextSiblings(){return Ms(f).splice(va(d)+1)},removeAllPrevSiblings(){const C=va(d)+h;return h-=C,Ms(f).splice(0,Math.max(0,C))},replaceWith(C,w={}){const T=!!w.traverse;f?f[Math.max(0,va(d)+h)]=C:Ba(c,"Can't replace root node")[d]=C,T&&o(C,c,d,f),y=!0},replaceWithMultiple(C,w={}){const T=!!w.traverse;if(Ms(f).splice(Math.max(0,va(d)+h),1,...C),h+=C.length-1,T){let I=0;for(let B=0;B<C.length;B++)I+=o(C[B],c,va(d)+B+I,f)}y=!0},skip(){y=!0}},{type:b}=s,v=t["*"],S=t[b],k=typeof v=="function"?v:v?.enter,D=typeof S=="function"?S:S?.enter;if(k?.(m,i),D?.(m,i),!y)switch(b){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":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"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 "${b}"`)}return S?.exit?.(m,i),v?.exit?.(m,i),h}return o(e),e}function Ms(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function va(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const xD=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function CD(e,t){for(let i=0;i<e.length;i++)e[i]>=t&&e[i]++}function wD(e,t,i,a){return e.slice(0,t)+a+e.slice(t+i.length)}const Cn=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Yh(e,t,i,a){const o=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let c=0,d="";for(const f of e.matchAll(o)){const{0:h,groups:{$skip:y}}=f;if(!y&&(!a||a===Cn.DEFAULT==!c)){i instanceof Function?d+=i(f,{context:c?Cn.CHAR_CLASS:Cn.DEFAULT,negated:s[s.length-1]}):d+=i;continue}h[0]==="["?(c++,s.push(h[1]==="^")):h==="]"&&c&&(c--,s.pop()),d+=h}return d}function a1(e,t,i,a){Yh(e,t,i,a)}function kD(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:d,groups:{$skip:f}}=c;if(!f&&(!a||a===Cn.DEFAULT==!s))return c;d==="["?s++:d==="]"&&s&&s--,o.lastIndex==c.index&&o.lastIndex++}return null}function Is(e,t,i){return!!kD(e,t,0,i)}function TD(e,t){const i=/\\?./gsu;i.lastIndex=t;let a=e.length,o=0,s=1,c;for(;c=i.exec(e);){const[d]=c;if(d==="[")o++;else if(o)d==="]"&&o--;else if(d==="(")s++;else if(d===")"&&(s--,!s)){a=c.index;break}}return e.slice(t,a)}const xb=new RegExp(String.raw`(?<noncapturingStart>${xD})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function AD(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],d=[];let f=0,h=0,y=NaN,m;do{m=!1;let b=0,v=0,S=!1,k;for(xb.lastIndex=Number.isNaN(y)?0:y+s.length;k=xb.exec(e);){const{0:D,index:C,groups:{capturingStart:w,noncapturingStart:T}}=k;if(D==="[")b++;else if(b)D==="]"&&b--;else if(D===o&&!S)y=C,S=!0;else if(S&&T)v++;else if(w)S?v++:(f++,c.push(f+h));else if(D===")"&&S){if(!v){h++;const I=f+h;if(e=`${e.slice(0,y)}${s}${e.slice(y+o.length,C)}))<$$${I}>)${e.slice(C+1)}`,m=!0,d.push(I),CD(i,I),a.size){const B=new Map;a.forEach((R,U)=>{B.set(U>=I?U+1:U,R.map(ie=>ie>=I?ie+1:ie))}),a=B}break}v--}}}while(m);return i.push(...d),e=Yh(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:b,groups:{backrefNum:v,wrappedBackrefNum:S}})=>{if(v){const k=+v;if(k>c.length-1)throw new Error(`Backref "${b}" greater than number of captures`);return`\\${c[k]}`}return`\\${S}`},Cn.DEFAULT),{pattern:e,captureTransfers:a,hiddenCaptures:i}}const l1=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,yd=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>${l1})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
80
+ | \\?.
81
+ `.replace(/\s+/g,""),"gsu");function LD(e){if(!new RegExp(`${l1}\\+`).test(e))return{pattern:e};const t=[];let i=null,a=null,o="",s=0,c;for(yd.lastIndex=0;c=yd.exec(e);){const{0:d,index:f,groups:{qBase:h,qMod:y,invalidQ:m}}=c;if(d==="[")s||(a=f),s++;else if(d==="]")s?s--:a=null;else if(!s)if(y==="+"&&o&&!o.startsWith("(")){if(m)throw new Error(`Invalid quantifier "${d}"`);let b=-1;if(/^\{\d+\}$/.test(h))e=wD(e,f+h.length,y,"");else{if(o===")"||o==="]"){const v=o===")"?i:a;if(v===null)throw new Error(`Invalid unmatched "${o}"`);e=`${e.slice(0,v)}(?>${e.slice(v,f)}${h})${e.slice(f+d.length)}`}else e=`${e.slice(0,f-o.length)}(?>${o}${h})${e.slice(f+d.length)}`;b+=4}yd.lastIndex+=b}else d[0]==="("?t.push(f):d===")"&&(i=t.length?t.pop():null);o=d}return{pattern:e}}const xn=String.raw,RD=xn`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,sh=xn`\(\?R=(?<rDepth>[^\)]+)\)|${RD}`,wu=xn`\(\?<(?![=!])(?<captureName>[^>]+)>`,o1=xn`${wu}|(?<unnamed>\()(?!\?)`,Er=new RegExp(xn`${wu}|${sh}|\(\?|\\?.`,"gsu"),bd="Cannot use multiple overlapping recursions";function DD(e,t){const{hiddenCaptures:i,mode:a}={hiddenCaptures:[],mode:"plugin",...t};let o=t?.captureTransfers??new Map;if(!new RegExp(sh,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:i};if(a==="plugin"&&Is(e,xn`\(\?\(DEFINE\)`,Cn.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],c=Is(e,xn`\\[1-9]`,Cn.DEFAULT),d=new Map,f=[];let h=!1,y=0,m=0,b;for(Er.lastIndex=0;b=Er.exec(e);){const{0:v,groups:{captureName:S,rDepth:k,gRNameOrNum:D,gRDepth:C}}=b;if(v==="[")y++;else if(y)v==="]"&&y--;else if(k){if(Cb(k),h)throw new Error(bd);if(c)throw new Error(`${a==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const w=e.slice(0,b.index),T=e.slice(Er.lastIndex);if(Is(T,sh,Cn.DEFAULT))throw new Error(bd);const I=+k-1;e=wb(w,T,I,!1,i,s,m),o=Tb(o,w,I,s.length,0,m);break}else if(D){Cb(C);let w=!1;for(const F of f)if(F.name===D||F.num===+D){if(w=!0,F.hasRecursedWithin)throw new Error(bd);break}if(!w)throw new Error(xn`Recursive \g cannot be used outside the referenced group "${a==="external"?D:xn`\g<${D}&R=${C}>`}"`);const T=d.get(D),I=TD(e,T);if(c&&Is(I,xn`${wu}|\((?!\?)`,Cn.DEFAULT))throw new Error(`${a==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const B=e.slice(T,b.index),R=I.slice(B.length+v.length),U=s.length,ie=+C-1,ne=wb(B,R,ie,!0,i,s,m);o=Tb(o,B,ie,s.length-U,U,m);const ae=e.slice(0,T),W=e.slice(T+I.length);e=`${ae}${ne}${W}`,Er.lastIndex+=ne.length-v.length-B.length-R.length,f.forEach(F=>F.hasRecursedWithin=!0),h=!0}else if(S)m++,d.set(String(m),Er.lastIndex),d.set(S,Er.lastIndex),f.push({num:m,name:S});else if(v[0]==="("){const w=v==="(";w&&(m++,d.set(String(m),Er.lastIndex)),f.push(w?{num:m}:{})}else v===")"&&f.pop()}return i.push(...s),{pattern:e,captureTransfers:o,hiddenCaptures:i}}function Cb(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 wb(e,t,i,a,o,s,c){const d=new Set;a&&a1(e+t,wu,({groups:{captureName:h}})=>{d.add(h)},Cn.DEFAULT);const f=[i,a?d:null,o,s,c];return`${e}${kb(`(?:${e}`,"forward",...f)}(?:)${kb(`${t})`,"backward",...f)}${t}`}function kb(e,t,i,a,o,s,c){const f=y=>t==="forward"?y+2:i-y+2-1;let h="";for(let y=0;y<i;y++){const m=f(y);h+=Yh(e,xn`${o1}|\\k<(?<backref>[^>]+)>`,({0:b,groups:{captureName:v,unnamed:S,backref:k}})=>{if(k&&a&&!a.has(k))return b;const D=`_$${m}`;if(S||v){const C=c+s.length+1;return s.push(C),ND(o,C),S?b:`(?<${v}${D}>`}return xn`\k<${k}${D}>`},Cn.DEFAULT)}return h}function ND(e,t){for(let i=0;i<e.length;i++)e[i]>=t&&e[i]++}function Tb(e,t,i,a,o,s){if(e.size&&a){let c=0;a1(t,o1,()=>c++,Cn.DEFAULT);const d=s-c+o,f=new Map;return e.forEach((h,y)=>{const m=(a-c*i)/i,b=c*i,v=y>d+c?y+a:y,S=[];for(const k of h)if(k<=d)S.push(k);else if(k>d+c+m)S.push(k+a);else if(k<=d+c)for(let D=0;D<=i;D++)S.push(k+c*D);else for(let D=0;D<=i;D++)S.push(k+b+m*D);f.set(v,S)}),f}return e}var _t=String.fromCodePoint,Ce=String.raw,Mn={},ku=globalThis.RegExp;Mn.flagGroups=(()=>{try{new ku("(?i:)")}catch{return!1}return!0})();Mn.unicodeSets=(()=>{try{new ku("[[]]","v")}catch{return!1}return!0})();Mn.bugFlagVLiteralHyphenIsRange=Mn.unicodeSets?(()=>{try{new ku(Ce`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Mn.bugNestedClassIgnoresNegation=Mn.unicodeSets&&new ku("[[^a]]","v").test("a");function du(e,{enable:t,disable:i}){return{dotAll:!i?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!i?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function io(e,t,i){return e.has(t)||e.set(t,i),e.get(t)}function uh(e,t){return Ab[e]>=Ab[t]}function OD(e,t){if(e==null)throw new Error(t??"Value expected");return e}var Ab={ES2025:2025,ES2024:2024,ES2018:2018},MD={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function s1(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!MD[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=Mn.flagGroups?"ES2025":Mn.unicodeSets?"ES2024":"ES2018"),t}var ID="[ -\r ]",zD=new Set([_t(304),_t(305)]),bi=Ce`[\p{L}\p{M}\p{N}\p{Pc}]`;function u1(e){if(zD.has(e))return[e];const t=new Set,i=e.toLowerCase(),a=i.toUpperCase(),o=UD.get(i),s=HD.get(i),c=PD.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 Xh=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=>[Cu(e),e])),HD=new Map([["s",_t(383)],[_t(383),"s"]]),PD=new Map([[_t(223),_t(7838)],[_t(107),_t(8490)],[_t(229),_t(8491)],[_t(969),_t(8486)]]),UD=new Map([Ki(453),Ki(456),Ki(459),Ki(498),...vd(8072,8079),...vd(8088,8095),...vd(8104,8111),Ki(8124),Ki(8140),Ki(8188)]),BD=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 VD(e,t){const i=[];for(let a=e;a<=t;a++)i.push(a);return i}function Ki(e){const t=_t(e);return[t.toLowerCase(),t]}function vd(e,t){return VD(e,t).map(i=>Ki(i))}var c1=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function jD(e,t){const i={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};f1(e);const a={accuracy:i.accuracy,asciiWordBoundaries:i.asciiWordBoundaries,avoidSubclass:i.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:uh(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};Zl(e,GD,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};Zl(e,$D,s);const c={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return Zl(e,FD,c),e._originMap=s.groupOriginByCopy,e._strategy=a.strategy,e}var GD={AbsenceFunction({node:e,parent:t,replaceWith:i}){const{body:a,kind:o}=e;if(o==="repeater"){const s=On();s.body[0].body.push(Cr({negate:!0,body:a}),wa("Any"));const c=On();c.body[0].body.push(n1("greedy",0,1/0,s)),i(ct(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];io(a,c,[]).push(...o)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const i=h1(t.get(e));if(i){const a=On({flags:i});a.body[0].body=e.body,e.body=[ct(a,e)]}}}},Assertion({node:e,parent:t,key:i,container:a,root:o,remove:s,replaceWith:c},d){const{kind:f,negate:h}=e,{asciiWordBoundaries:y,avoidSubclass:m,supportedGNodes:b,wordIsAscii:v}=d;if(f==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${h?"Y":"y"}"`);if(f==="line_end")c(ct(Cr({body:[Tr({body:[ah("string_end")]}),Tr({body:[xu(10)]})]}),t));else if(f==="line_start")c(ct(vi(Ce`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(f==="search_start")if(b.has(e))o.flags.sticky=!0,s();else{const S=a[i-1];if(S&&KD(S))c(ct(Cr({negate:!0}),t));else{if(m)throw new Error(Ce`Uses "\G" in a way that requires a subclass`);c(Wi(ah("string_start"),t)),d.strategy="clip_search"}}else if(!(f==="string_end"||f==="string_start"))if(f==="string_end_newline")c(ct(vi(Ce`(?=\n?\z)`),t));else if(f==="word_boundary"){if(!v&&!y){const S=`(?:(?<=${bi})(?!${bi})|(?<!${bi})(?=${bi}))`,k=`(?:(?<=${bi})(?=${bi})|(?<!${bi})(?!${bi}))`;c(ct(vi(h?k:S),t))}}else throw new Error(`Unexpected assertion kind "${f}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:i}=e;typeof i=="string"&&!Sd(i)&&(i=_d(i,t),e.ref=i)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:i}){let{name:a}=e;a&&!Sd(a)&&(a=_d(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(ct(a,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:i},{accuracy:a,minTargetEs2024:o,digitIsAscii:s,spaceIsAscii:c,wordIsAscii:d}){const{kind:f,negate:h,value:y}=e;if(s&&(f==="digit"||y==="digit")){i(Wi(oh("digit",{negate:h}),t));return}if(c&&(f==="space"||y==="space")){i(ct(Ed(vi(ID),h),t));return}if(d&&(f==="word"||y==="word")){i(Wi(oh("word",{negate:h}),t));return}if(f==="any")i(Wi(wa("Any"),t));else if(f==="digit")i(Wi(wa("Nd",{negate:h}),t));else if(f!=="dot")if(f==="text_segment"){if(a==="strict")throw new Error(Ce`Use of "\X" requires non-strict accuracy`);const m="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",b=Ce`\p{RI}{2}|${m}(?:\u200D${m})*`;i(ct(vi(Ce`(?>\r\n|${o?Ce`\p{RGI_Emoji}`:b}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(f==="hex")i(Wi(wa("AHex",{negate:h}),t));else if(f==="newline")i(ct(vi(h?`[^
172
+ ]`:`(?>\r
173
+ ?|[
174
+ \v\f…\u2028\u2029])`),t));else if(f==="posix")if(!o&&(y==="graph"||y==="print")){if(a==="strict")throw new Error(`POSIX class "${y}" requires min target ES2024 or non-strict accuracy`);let m={graph:"!-~",print:" -~"}[y];h&&(m=`\0-${_t(m.codePointAt(0)-1)}${_t(m.codePointAt(2)+1)}-􏿿`),i(ct(vi(`[${m}]`),t))}else i(ct(Ed(vi(BD.get(y)),h),t));else if(f==="property")Xh.has(Cu(y))||(e.key="sc");else if(f==="space")i(Wi(wa("space",{negate:h}),t));else if(f==="word")i(ct(Ed(vi(bi),h),t));else throw new Error(`Unexpected character set kind "${f}"`)},Directive({node:e,parent:t,root:i,remove:a,replaceWith:o,removeAllPrevSiblings:s,removeAllNextSiblings:c}){const{kind:d,flags:f}=e;if(d==="flags")if(!f.enable&&!f.disable)a();else{const h=On({flags:f});h.body[0].body=c(),o(ct(h,t),{traverse:!0})}else if(d==="keep"){const h=i.body[0],m=i.body.length===1&&J_(h,{type:"Group"})&&h.body[0].body.length===1?h.body[0]:i;if(t.parent!==m||m.body.length>1)throw new Error(Ce`Uses "\K" in a way that's unsupported`);const b=Cr({behind:!0});b.body[0].body=s(),o(ct(b,t))}else throw new Error(`Unexpected directive kind "${d}"`)},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(ct(Cr({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${a.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=On();t.body[0].body.push(e.body),e.body=ct(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=m1(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"&&!Sd(i)&&(i=_d(i,t),e.ref=i)}},$D={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:d,reffedNodesByReferencer:f}){const h=o.get(e);if(h&&d.has(e.number)){const m=Wi(Lb(e.number),t);f.set(m,d.get(e.number)),i(m);return}d.set(e.number,e),c.set(e.number,[]),e.name&&io(c,e.name,[]);const y=c.get(e.name??e.number);for(let m=0;m<y.length;m++){const b=y[m];if(h===b.node||h&&h===b.origin||e===b.origin){y.splice(m,1);break}}if(c.get(e.number).push({node:e,origin:h}),e.name&&c.get(e.name).push({node:e,origin:h}),e.name){const m=io(s,e.name,new Map);let b=!1;if(h)b=!0;else for(const v of m.values())if(!v.hasDuplicateNameToRemove){b=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:b})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=du(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 y=t;for(;(y=y.parent)&&!(y.type==="CapturingGroup"&&(y.name===s||y.number===s)););a.reffedNodesByReferencer.set(e,y);return}const c=a.subroutineRefMap.get(s),d=s===0,f=d?Lb(0):d1(c,a.groupOriginByCopy,null);let h=f;if(!d){const y=h1(XD(c,b=>b.type==="Group"&&!!b.flags)),m=y?du(a.globalFlags,y):a.globalFlags;qD(m,a.currentFlags)||(h=On({flags:QD(m)}),h.body[0].body.push(f))}i(ct(h,t),{traverse:!d})}},FD={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=>YD(c,e));if(!s.length)i(ct(Cr({negate:!0}),t));else if(s.length>1){const c=On({atomic:!0,body:s.reverse().map(d=>Tr({body:[lh(d.number)]}))});i(ct(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=t1();e.body.at(-1).body.push(o)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function f1(e){Zl(e,{"*"({node:t,parent:i}){t.parent=i}})}function qD(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function YD(e,t){let i=t;do{if(i.type==="Regex")return!1;if(i.type==="Alternative")continue;if(i===e)return!1;const a=p1(i.parent);for(const o of a){if(o===i)break;if(o===e||g1(o,e))return!0}}while(i=i.parent);throw new Error("Unexpected path")}function d1(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]=d1(c,t,o,i):(s==="type"&&c==="CapturingGroup"&&t.set(o,t.get(e)??e),o[s]=c);return o}function Lb(e){const t=i1(e);return t.isRecursive=!0,t}function XD(e,t){const i=[];for(;e=e.parent;)(!t||t(e))&&i.push(e);return i}function _d(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 h1(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 QD({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 p1(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function m1(e){const t=e.find(i=>i.kind==="search_start"||WD(i,{negate:!1})||!ZD(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=m1(a.body);if(!o)return null;Array.isArray(o)?i.push(...o):i.push(o)}return i}return null}function g1(e,t){const i=p1(e)??[];for(const a of i)if(a===t||g1(a,t))return!0;return!1}function ZD({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function KD(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function WD(e,t){const i={negate:null,...t};return e.type==="LookaroundAssertion"&&(i.negate===null||e.negate===i.negate)&&e.body.length===1&&J_(e.body[0],{type:"Assertion",kind:"search_start"})}function Sd(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function vi(e,t){const a=e1(e,{...t,unicodePropertyMap:Xh}).body;return a.length>1||a[0].body.length>1?On({body:a}):a[0].body[0]}function Ed(e,t){return e.negate=t,e}function Wi(e,t){return e.parent=t,e}function ct(e,t){return f1(e),e.parent=t,e}function JD(e,t){const i=s1(t),a=uh(i.target,"ES2024"),o=uh(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,d=null;if(!o){const v=[e.flags.ignoreCase];Zl(e,eN,{getCurrentModI:()=>v.at(-1),popModI(){v.pop()},pushModI(S){v.push(S)},setHasCasedChar(){v.at(-1)?c=!0:d=!0}})}const f={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||c)&&!d)};let h=e;const y={accuracy:i.accuracy,appliedGlobalFlags:f,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:h,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!o&&c&&d),useFlagMods:o,useFlagV:a,verbose:i.verbose};function m(v){return y.lastNode=h,h=v,OD(tN[v.type],`Unexpected node type "${v.type}"`)(v,y,m)}const b={pattern:e.body.map(m).join("|"),flags:m(e.flags),options:{...e.options}};return a||(delete b.options.force.v,b.options.disable.v=!0,b.options.unicodeSetsPlugin=null),b._captureTransfers=new Map,b._hiddenCaptures=[],y.captureMap.forEach((v,S)=>{v.hidden&&b._hiddenCaptures.push(S),v.transferTo&&io(b._captureTransfers,v.transferTo,[]).push(S)}),b}var eN={"*":{enter({node:e},t){if(Db(e)){const i=t.getCurrentModI();t.pushModI(e.flags?du({ignoreCase:i},e.flags).ignoreCase:i)}},exit({node:e},t){Db(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Qh(_t(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},i){t(),y1(e,{firstOnly:!0}).length&&i.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&c1.has(e.value)&&t.setHasCasedChar()}},tN={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},d=t.originMap.get(e);return d&&(c.hidden=!0,s>d.number&&(c.transferTo=d.number)),t.captureMap.set(s,c),`(${o?`?<${o}>`:""}${a.map(i).join("|")})`},Character({value:e},t){const i=_t(e),a=_a(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(a!==i)return a;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Qh(i)){const o=u1(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");Mn.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&c.some(Nb)&&(c=[xu(45),...c.filter(h=>!Nb(h))]);const d=()=>`[${o?"^":""}${c.map(i).join(a==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Mn.bugNestedClassIgnoresNegation)&&!o){const y=c.filter(m=>m.type==="CharacterClass"&&m.kind==="union"&&m.negate);if(y.length){const m=On(),b=m.body[0];return m.parent=s,b.parent=m,c=c.filter(v=>!y.includes(v)),e.body=c,c.length?(e.parent=b,b.body.push(e)):m.body.pop(),y.forEach(v=>{const S=Tr({body:[v]});v.parent=S,S.parent=m,m.body.push(S)}),i(m)}}t.inCharClass=!0;const h=d();return t.inCharClass=!1,h}const f=c[0];if(a==="union"&&!o&&f&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(Mn.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&c.length===1&&f.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 d()},CharacterClassRange(e,t){const i=e.min.value,a=e.max.value,o={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=_a(i,o),c=_a(a,o),d=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const f=y1(e);lN(f).forEach(y=>{d.add(Array.isArray(y)?`${_a(y[0],o)}-${_a(y[1],o)}`:_a(y,o))})}return`${s}-${c}${[...d].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&&c1.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=du(c,i));const d=t.map(s).join("|"),f=!o.verbose&&t.length===1&&a.type!=="Quantifier"&&!e&&(!o.useFlagMods||!i)?d:`(?${oN(e,i,o.useFlagMods)}${d})`;return o.currentFlags=c,f},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)+sN(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}>`}},nN=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),iN=new Set(["-","\\","]","^","["]),rN=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),Rb=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`]]),aN=new RegExp("^\\p{Cased}$","u");function Qh(e){return aN.test(e)}function y1(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 d=_t(c);if(!Qh(d))continue;const f=u1(d).filter(h=>{const y=h.codePointAt(0);return y<a||y>o});if(f.length&&(s.push(...f),i))break}return s}function _a(e,{escDigit:t,inCharClass:i,useFlagV:a}){if(Rb.has(e))return Rb.get(e);if(e<32||e>126&&e<160||e>262143||t&&uN(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const o=i?a?rN:iN:nN,s=_t(e);return(o.has(s)?"\\":"")+s}function lN(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 oN(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 sN({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 Db({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function uN(e){return e>47&&e<58}function Nb({type:e,value:t}){return e==="Character"&&t===45}var cN=class ch 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 ch&&(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=dN(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 ch(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&&(fN(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:d,transferTo:f}=this.#t.get(c)??{};if(d?s.push(null):(s.push(i.length),i.push(a[c]),this.hasIndices&&i.indices.push(o[c])),f&&a[c]!==void 0){const h=s[f];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(i[h]=a[c],this.hasIndices&&(i.indices[h]=o[c]),i.groups){this.#n||(this.#n=hN(this.source));const y=this.#n.get(f);y&&(i.groups[y]=a[c],this.hasIndices&&(i.indices.groups[y]=o[c]))}}}return i}};function fN(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 d=o[c];d&&(o[c]=[d[0]+t,d[1]+t])}const s=o.groups;s&&Object.keys(s).forEach(c=>{const d=s[c];d&&(s[c]=[d[0]+t,d[1]+t])})}}function dN(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)io(i,s,{}).transferTo=a;return i}function hN(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:d,name:f}}=s;c==="["?a++:a?c==="]"&&a--:d&&(o++,f&&i.set(o,f))}return i}function pN(e,t){const i=mN(e,t);return i.options?new cN(i.pattern,i.flags,i.options):new RegExp(i.pattern,i.flags)}function mN(e,t){const i=s1(t),a=e1(e,{flags:i.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:i.rules.captureGroup,singleline:i.rules.singleline},skipBackrefValidation:i.rules.allowOrphanBackrefs,unicodePropertyMap:Xh}),o=jD(a,{accuracy:i.accuracy,asciiWordBoundaries:i.rules.asciiWordBoundaries,avoidSubclass:i.avoidSubclass,bestEffortTarget:i.target}),s=JD(o,i),c=DD(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),d=LD(c.pattern),f=AD(d.pattern,{captureTransfers:c.captureTransfers,hiddenCaptures:c.hiddenCaptures}),h={pattern:f.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 y=f.hiddenCaptures.sort((S,k)=>S-k),m=Array.from(f.captureTransfers),b=o._strategy,v=h.pattern.length>=i.lazyCompileLength;(y.length||m.length||b||v)&&(h.options={...y.length&&{hiddenCaptures:y},...m.length&&{transfers:m},...b&&{strategy:b},...v&&{lazyCompile:v}})}return h}const Ob=4294967295;class gN{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 d=o?.get(c);if(d){if(d instanceof RegExp)return d;if(a)return null;throw d}try{const f=s(c);return o?.set(c,f),f}catch(f){if(o?.set(c,f),a)return null;throw f}})}regexps;findNextMatchSync(t,i,a){const o=typeof t=="string"?t:t.content,s=[];function c(d,f,h=0){return{index:d,captureIndices:f.indices.map(y=>y==null?{start:Ob,end:Ob,length:0}:{start:y[0]+h,end:y[1]+h,length:y[1]-y[0]})}}for(let d=0;d<this.regexps.length;d++){const f=this.regexps[d];if(f)try{f.lastIndex=i;const h=f.exec(o);if(!h)continue;if(h.index===i)return c(d,h,0);s.push([d,h,0])}catch(h){if(this.options.forgiving)continue;throw h}}if(s.length){const d=Math.min(...s.map(f=>f[1].index));for(const[f,h,y]of s)if(h.index===d)return c(f,h,y)}return null}}function yN(e,t){return pN(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function bN(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=i=>yN(i,{target:t.target}),{createScanner(i){return new gN(i,t)},createString(i){return{content:i}}}}const Mb=new Map;function vN({className:e,children:t}){const[i,a]=te.useState(null),o=e?.match(/language-([^\s]+)/)?.[1]??"text",s=String(t??"").replace(/\n$/,"");return te.useEffect(()=>{let c=!1;return a(null),_N(s,o).then(d=>{c||a(d)}),()=>{c=!0}},[s,o]),i===null?z.jsx("pre",{children:z.jsx("code",{children:t})}):z.jsx("div",{dangerouslySetInnerHTML:{__html:i}})}async function _N(e,t){const i=`${t}\0${e}`,a=Mb.get(i);if(a)return a;const o=SN(e,t).catch(()=>null);return Mb.set(i,o),o}async function SN(e,t){try{return await hb(e,{lang:t,theme:"github-dark-default"})}catch{return hb(e,{lang:"text",theme:"github-dark-default"})}}function Zh({content:e,className:t,variant:i}){const a=["markdown-content",i?`markdown-content-${i}`:null,t].filter(Boolean).join(" ");return z.jsx("div",{className:a,children:z.jsx(TA,{components:{pre({children:o}){if(te.isValidElement(o)){const{className:s,children:c}=o.props;return z.jsx(vN,{className:s,children:c})}return z.jsx("pre",{children:o})}},children:e})})}function EN({open:e,content:t,loading:i,onClose:a}){return z.jsx(Av,{open:e,title:"brief",ariaLabel:"Reviewer brief",closeLabel:"close brief",bodyClassName:"brief-dialog-body-wrap",onClose:a,children:i&&!t?z.jsx("div",{className:"brief-dialog-empty",children:"Generating brief…"}):z.jsx(Zh,{content:t,className:"brief-dialog-body",variant:"brief"})})}function Tu({checked:e,label:t,onChange:i,className:a}){return z.jsxs("label",{className:`checkbox-btn${a?` ${a}`:""}`,children:[z.jsx("input",{type:"checkbox",className:"checkbox-input",checked:e,onChange:o=>i(o.target.checked)}),z.jsx("span",{className:"checkbox-box","aria-hidden":"true",children:e&&z.jsx(Qx,{size:10,strokeWidth:3})}),z.jsx("span",{children:t})]})}function xN({open:e,thread:t,body:i,skipAgentResponse:a,onBodyChange:o,onSkipAgentResponseChange:s,onSubmit:c,onClose:d,onToggleResolved:f,onDeleteMessage:h}){const y=te.useRef(null),m=te.useRef(null),b=t?"conversation":"new conversation",v=t?.resolved?"reopen":"resolve",S=t?"comment":"start thread",k=i.trim().length>0,D=te.useMemo(()=>t?.messages??[],[t]);te.useEffect(()=>{e&&y.current?.focus()},[e,t?.id]),te.useLayoutEffect(()=>{if(!e)return;const w=m.current;w&&(w.scrollTop=w.scrollHeight)},[D.length,e,t?.id,t?.loading]);const C=w=>{w.key==="Enter"&&(w.metaKey||w.ctrlKey)&&(w.preventDefault(),k&&c()),w.key==="Escape"&&(w.preventDefault(),d())};return z.jsx(Av,{open:e,title:b,ariaLabel:b,closeLabel:"close conversation",bodyClassName:"detached-thread-dialog-body-wrap",onClose:d,children:z.jsxs("div",{className:"detached-thread-dialog-layout",children:[z.jsxs("div",{ref:m,className:"detached-thread-dialog-messages",children:[D.map((w,T)=>z.jsxs("div",{className:`detached-thread-dialog-message detached-thread-dialog-message-${w.role}`,children:[z.jsxs("div",{className:"detached-thread-dialog-message-header",children:[z.jsx("span",{className:"detached-thread-dialog-role",children:w.role==="user"?"you":"agent"}),z.jsx("button",{type:"button",className:"detached-thread-dialog-delete",onClick:()=>h(T),"aria-label":`Delete ${w.role==="user"?"your":"agent"} comment`,title:"delete comment",children:z.jsx(kv,{size:14})})]}),z.jsx(Zh,{content:w.text,className:"detached-thread-dialog-text",variant:"thread"})]},`${w.role}:${T}:${w.text}`)),t?.loading&&z.jsxs("div",{className:"detached-thread-dialog-message detached-thread-dialog-message-assistant",children:[z.jsx("span",{className:"detached-thread-dialog-role",children:"agent"}),z.jsx("span",{className:"detached-thread-dialog-thinking",children:"thinking…"})]})]}),z.jsxs("div",{className:"detached-thread-dialog-composer",style:{borderTop:D.length===0?"none":void 0},children:[z.jsx("textarea",{ref:y,className:"text-input-area detached-thread-dialog-input",value:i,onChange:w=>o(w.target.value),onKeyDown:C,placeholder:t?"Reply…":"Start a conversation…",rows:3}),z.jsxs("div",{className:"detached-thread-dialog-actions",children:[z.jsx(Tu,{checked:a,label:"skip agent reply",onChange:s}),t&&z.jsx("button",{type:"button",className:"btn detached-thread-dialog-secondary",onClick:()=>f(!t.resolved),children:v}),z.jsx("button",{type:"button",className:"btn primary",disabled:!k,onClick:c,children:S})]})]})]})})}const CN={position:"absolute",top:0,bottom:0,textAlign:"center",whiteSpace:"normal",touchAction:"none"},wN={display:"contents"};function Ib(){return null}const b1="diffs-container";(()=>{try{return!1}catch{return!1}})();const kN=/(?=^From [a-f0-9]+ .+$)/m,v1=/(?=^diff --git)/gm,TN=/^(---|\+\+\+)\s+([^\t\r\n]+)/,AN=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,LN=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,RN=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,_1="header-prefix",S1="header-metadata",Kh="header-custom",wn={dark:"pierre-dark",light:"pierre-light"},DN="data-theme-css",NN="data-unsafe-css",ON="data-diffs-scrollbar-measure",E1="--diffs-scrollbar-gutter-measured",MN=1e5,IN={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},zN=Object.freeze({fromStart:0,fromEnd:0}),zb={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},HN={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function Ma(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function PN({hunkIndex:e,lineIndex:t,conflictIndex:i}){return`merge-conflict-action-${e}-${t}-${i}`}function UN(e,t){const i=t.hunks[e.hunkIndex];if(i!=null)return{hunkIndex:e.hunkIndex,lineIndex:BN(i,e.startContentIndex)}}function BN(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 VN({fileDiff:e,actions:t,renderCustomHeader:i,renderHeaderPrefix:a,renderHeaderMetadata:o,renderAnnotation:s,renderGutterUtility:c,renderMergeConflictUtility:d,lineAnnotations:f,getHoveredLine:h,getInstance:y}){const m=i?.(e),b=a?.(e),v=o?.(e);return z.jsxs(z.Fragment,{children:[m!=null?z.jsx("div",{slot:Kh,children:m}):z.jsxs(z.Fragment,{children:[b!=null&&z.jsx("div",{slot:"header-prefix",children:b}),v!=null&&z.jsx("div",{slot:"header-metadata",children:v})]}),s!=null&&f?.map((S,k)=>z.jsx("div",{slot:Ma(S),children:s(S)},k)),t!=null&&d!=null&&y!=null&&t.map(S=>{if(S==null)return;const k=jN(S,e);return z.jsx("div",{slot:k,style:wN,children:d(S,y)},k)}),c!=null&&z.jsx("div",{slot:"gutter-utility-slot",style:CN,children:c(h)})]})}function jN(e,t){const i=UN(e,t);return i!=null?PN({hunkIndex:i.hunkIndex,lineIndex:i.lineIndex,conflictIndex:e.conflictIndex}):void 0}function GN(e){const t=te.useRef(e);return te.useInsertionEffect(()=>{t.current=e}),te.useCallback((...i)=>t.current(...i),[])}function Wh(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}const fh=new Set;function ro(e){const t=[],i=new Set;for(const m of $N(e.themes)){const b=x1(m)?m.getThemes():[m];for(const v of b){if(i.has(v.name))throw new Error(`Theme collection already contains theme "${v.name}"`);i.add(v.name),t.push(v)}}const a=Object.freeze([...t]),o=Object.freeze(a.filter(m=>m.colorScheme==="light")),s=Object.freeze(a.filter(m=>m.colorScheme==="dark")),c=new Map(a.map(m=>[m.name,m])),d=Object.freeze(a.map(m=>m.name)),f=Object.freeze(o.map(m=>m.name)),h=Object.freeze(s.map(m=>m.name));function y(m){if(m==null)return a;const{colorScheme:b,collection:v}=m;return v==null?b==="light"?o:b==="dark"?s:a:a.filter(S=>S.collection!==v?!1:b==null||S.colorScheme===b)}return{getTheme(m){return c.get(m)},getThemes(m){return y(m)},getThemeNames(m){return m?.collection==null?m?.colorScheme==="light"?f:m?.colorScheme==="dark"?h:d:y(m).map(b=>b.name)},hasTheme(m){return c.has(m)},orderBy(m){return ro({themes:a.map((b,v)=>({descriptor:b,index:v})).sort((b,v)=>{const S=m(b.descriptor,v.descriptor);return S!==0?S:b.index-v.index}).map(b=>b.descriptor)})},pick(m){const b=[],v=new Set;for(const S of m){if(v.has(S))throw new Error(`Theme collection pick already includes theme "${S}"`);v.add(S);const k=c.get(S);if(k==null)throw new Error(`Theme collection does not contain theme "${S}"`);b.push(k)}return ro({themes:b})},registerInto(m){for(const b of a)m.registerThemeIfAbsent(b.name,b.load)}}}function $N(e){return FN(e)?[e]:e}function FN(e){return x1(e)||qN(e)}function qN(e){return typeof e.name=="string"&&typeof e.load=="function"}function x1(e){return typeof e.getThemes=="function"}function C1(e){return e!==null&&typeof e=="object"&&"default"in e?e.default:e}var YN=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name="DuplicateThemeError"}},XN=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name="UnregisteredThemeError"}},QN=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name="UnresolvedThemeError"}};function ZN(){const e=new Map,t=new Map,i=new Map;let a=0;function o(C,w){if(e.has(C))throw new YN(C);e.set(C,w)}function s(C,w){return e.has(C)?!1:(e.set(C,w),!0)}function c(C){return e.has(C)}function d(C){const w=t.get(C);if(w!==void 0)return Promise.resolve(w);const T=i.get(C);if(T!==void 0)return T;const I=e.get(C);if(I===void 0)return Promise.reject(new XN(C));const B=a,R=I().then(U=>{const ie=C1(U);return B===a&&t.set(C,ie),i.get(C)===R&&i.delete(C),ie}).catch(U=>{throw i.get(C)===R&&i.delete(C),U});return i.set(C,R),R}function f(C){return Promise.all(C.map(w=>d(w)))}function h(C,w){t.set(C,w)}function y(C){for(const[w,T]of C)h(w,T)}function m(C){return t.get(C)}function b(C){const w=[];for(const T of C){const I=t.get(T);if(I===void 0)throw new QN(T);w.push(I)}return w}function v(C){return t.has(C)}function S(C){for(const w of C)if(!t.has(w))return!1;return!0}function k(C){const w=t.get(C);return w!==void 0?w:d(C)}function D(){a++,t.clear(),i.clear()}return{clearResolvedThemes:D,getResolvedOrResolveTheme:k,getResolvedTheme:m,getResolvedThemes:b,hasRegisteredTheme:c,hasResolvedTheme:v,hasResolvedThemes:S,registerTheme:o,registerThemeIfAbsent:s,resolveTheme:d,resolveThemes:f,seedResolvedTheme:h,seedResolvedThemes:y}}const er=ZN();function Hb(e,t){e=Array.isArray(e)?e:[e];for(let i of e){let a;if(typeof i=="string"){if(a=er.getResolvedTheme(i),a==null)throw new Error(`loadResolvedThemes: ${i} is not resolved, you must resolve it before calling loadResolvedThemes`)}else a=i,i=i.name,er.getResolvedTheme(i)==null&&er.seedResolvedTheme(i,a);fh.has(i)||(fh.add(i),t.loadThemeSync(a))}}const ao=new Map,xd=new Map,KN=new Map,dh=new Set;function Pb(e,t){e=Array.isArray(e)?e:[e];for(const i of e){if(dh.has(i.name))continue;let a=ao.get(i.name);a==null&&(a=i,ao.set(i.name,a)),dh.add(a.name),t.loadLanguageSync(a.data)}}function w1(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function WN(e){if(w1())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=xd.get(e);if(t!=null)return t;try{let i=KN.get(e);if(i==null&&Object.prototype.hasOwnProperty.call(rh,e)&&(i=rh[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 ao.has(e)||ao.set(e,s),s});return xd.set(e,a),await a}finally{xd.delete(e)}}function JN(e){return ao.get(e)??WN(e)}function k1({name:e,load:t,colorScheme:i,collection:a,displayName:o}){return{name:e,colorScheme:i,collection:a,displayName:o,load:eO(t)}}function eO(e){return async()=>_u(C1(await e()))}const tO="pierre",nO=["pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],T1=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],iO=[...T1,...nO],rO=new Set(T1);function aO(e){return rO.has(e)?"light":"dark"}const lO={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},oO={"pierre-dark":()=>E(()=>import("./pierre-dark-CyvmCCZW.js"),[]),"pierre-dark-soft":()=>E(()=>import("./pierre-dark-soft-BHGpRqa4.js"),[]),"pierre-dark-vibrant":()=>E(()=>import("./pierre-dark-vibrant-BWBVywrn.js"),[]),"pierre-dark-protanopia-deuteranopia":()=>E(()=>import("./pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js"),[]),"pierre-dark-tritanopia":()=>E(()=>import("./pierre-dark-tritanopia-Beq2gCRQ.js"),[]),"pierre-light":()=>E(()=>import("./pierre-light-480U9XYS.js"),[]),"pierre-light-soft":()=>E(()=>import("./pierre-light-soft-CVdyfjmI.js"),[]),"pierre-light-vibrant":()=>E(()=>import("./pierre-light-vibrant-DdTDNdfJ.js"),[]),"pierre-light-protanopia-deuteranopia":()=>E(()=>import("./pierre-light-protanopia-deuteranopia-CaVOBURG.js"),[]),"pierre-light-tritanopia":()=>E(()=>import("./pierre-light-tritanopia-B4_gpKOM.js"),[])};function sO(e){return k1({name:e,collection:tO,colorScheme:aO(e),displayName:lO[e],load:oO[e]})}const A1=ro({themes:iO.map(e=>sO(e))}),uO="shiki",L1=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],cO=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],fO=new Set(L1);function dO(e){return fO.has(e)?"light":"dark"}const hO={andromeeda:()=>E(()=>import("./andromeeda-C4gqWexZ.js"),[]),"aurora-x":()=>E(()=>import("./aurora-x-D-2ljcwZ.js"),[]),"ayu-dark":()=>E(()=>import("./ayu-dark-DYE7WIF3.js"),[]),"ayu-light":()=>E(()=>import("./ayu-light-BA47KaF1.js"),[]),"ayu-mirage":()=>E(()=>import("./ayu-mirage-32ctXXKs.js"),[]),"catppuccin-frappe":()=>E(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]),"catppuccin-latte":()=>E(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]),"catppuccin-macchiato":()=>E(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]),"catppuccin-mocha":()=>E(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]),"dark-plus":()=>E(()=>import("./dark-plus-C3mMm8J8.js"),[]),dracula:()=>E(()=>import("./dracula-BzJJZx-M.js"),[]),"dracula-soft":()=>E(()=>import("./dracula-soft-BXkSAIEj.js"),[]),"everforest-dark":()=>E(()=>import("./everforest-dark-BgDCqdQA.js"),[]),"everforest-light":()=>E(()=>import("./everforest-light-C8M2exoo.js"),[]),"github-dark":()=>E(()=>import("./github-dark-DHJKELXO.js"),[]),"github-dark-default":()=>E(()=>import("./github-dark-default-Cuk6v7N8.js"),[]),"github-dark-dimmed":()=>E(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]),"github-dark-high-contrast":()=>E(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]),"github-light":()=>E(()=>import("./github-light-DAi9KRSo.js"),[]),"github-light-default":()=>E(()=>import("./github-light-default-D7oLnXFd.js"),[]),"github-light-high-contrast":()=>E(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]),"gruvbox-dark-hard":()=>E(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]),"gruvbox-dark-medium":()=>E(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]),"gruvbox-dark-soft":()=>E(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]),"gruvbox-light-hard":()=>E(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]),"gruvbox-light-medium":()=>E(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]),"gruvbox-light-soft":()=>E(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]),horizon:()=>E(()=>import("./horizon-BUw7H-hv.js"),[]),"horizon-bright":()=>E(()=>import("./horizon-bright-Cn-bp-IR.js"),[]),houston:()=>E(()=>import("./houston-DnULxvSX.js"),[]),"kanagawa-dragon":()=>E(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]),"kanagawa-lotus":()=>E(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]),"kanagawa-wave":()=>E(()=>import("./kanagawa-wave-DWedfzmr.js"),[]),laserwave:()=>E(()=>import("./laserwave-DUszq2jm.js"),[]),"light-plus":()=>E(()=>import("./light-plus-B7mTdjB0.js"),[]),"material-theme":()=>E(()=>import("./material-theme-D5KoaKCx.js"),[]),"material-theme-darker":()=>E(()=>import("./material-theme-darker-BfHTSMKl.js"),[]),"material-theme-lighter":()=>E(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]),"material-theme-ocean":()=>E(()=>import("./material-theme-ocean-CyktbL80.js"),[]),"material-theme-palenight":()=>E(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]),"min-dark":()=>E(()=>import("./min-dark-CafNBF8u.js"),[]),"min-light":()=>E(()=>import("./min-light-CTRr51gU.js"),[]),monokai:()=>E(()=>import("./monokai-D4h5O-jR.js"),[]),"night-owl":()=>E(()=>import("./night-owl-C39BiMTA.js"),[]),"night-owl-light":()=>E(()=>import("./night-owl-light-CMTm3GFP.js"),[]),nord:()=>E(()=>import("./nord-Ddv68eIx.js"),[]),"one-dark-pro":()=>E(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]),"one-light":()=>E(()=>import("./one-light-C3Wv6jpd.js"),[]),plastic:()=>E(()=>import("./plastic-3e1v2bzS.js"),[]),poimandres:()=>E(()=>import("./poimandres-CS3Unz2-.js"),[]),red:()=>E(()=>import("./red-bN70gL4F.js"),[]),"rose-pine":()=>E(()=>import("./rose-pine-qdsjHGoJ.js"),[]),"rose-pine-dawn":()=>E(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]),"rose-pine-moon":()=>E(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]),"slack-dark":()=>E(()=>import("./slack-dark-BthQWCQV.js"),[]),"slack-ochin":()=>E(()=>import("./slack-ochin-DqwNpetd.js"),[]),"snazzy-light":()=>E(()=>import("./snazzy-light-Bw305WKR.js"),[]),"solarized-dark":()=>E(()=>import("./solarized-dark-DXbdFlpD.js"),[]),"solarized-light":()=>E(()=>import("./solarized-light-L9t79GZl.js"),[]),"synthwave-84":()=>E(()=>import("./synthwave-84-CbfX1IO0.js"),[]),"tokyo-night":()=>E(()=>import("./tokyo-night-hegEt444.js"),[]),vesper:()=>E(()=>import("./vesper-DU1UobuO.js"),[]),"vitesse-black":()=>E(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),"vitesse-dark":()=>E(()=>import("./vitesse-dark-D0r3Knsf.js"),[]),"vitesse-light":()=>E(()=>import("./vitesse-light-CVO1_9PV.js"),[])};function Ub(e){return k1({name:e,collection:uO,colorScheme:dO(e),load:hO[e]})}const R1=ro({themes:Object.freeze([...L1.map(e=>Ub(e)),...cO.map(e=>Ub(e))])});ro({themes:[A1,R1]});function pO(e){if(w1())throw new Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(er.hasRegisteredTheme(e))return;const t=R1.getTheme(e);if(t!=null){er.registerThemeIfAbsent(t.name,t.load);return}throw new Error(`No valid theme loader registered for "${e}"`)}function mO(e,t){if(t.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function gO(e){pO(e);const t=await er.resolveTheme(e);return mO(e,t),t}function yO(e){return er.getResolvedTheme(e)??gO(e)}let Yn;async function D1({themes:e,langs:t,preferredHighlighter:i="shiki-js"}){Yn??=Y_({themes:[],langs:["text"],engine:i==="shiki-wasm"?q_(E(()=>import("./wasm-CG6Dc4jp.js"),[])):bN()});const a=vO(Yn)?await Yn:Yn;Yn=a;const o=[];for(const c of t){if(c==="text"||c==="ansi")continue;const d=JN(c);"then"in d?o.push(d):Pb(d,a)}const s=[];for(const c of e){const d=yO(c);"then"in d?s.push(d):Hb(d,Yn)}return(o.length>0||s.length>0)&&await Promise.all([Promise.all(o).then(c=>{Pb(c,a)}),Promise.all(s).then(c=>{Hb(c,a)})]),a}function bO(){if(Yn!=null&&!("then"in Yn))return Yn}function vO(e=Yn){return e!=null&&"then"in e}async function _O(e){await D1(e)}for(const e of A1.getThemes())er.registerThemeIfAbsent(e.name,e.load);function N1(e=wn){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function Bb(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}const Sa=new Map,Ul={"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",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"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 tr(e){if(Sa.has(e))return Sa.get(e)??"text";if(Ul[e]!=null)return Ul[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(Sa.has(t[1]))return Sa.get(t[1])??"text";if(Ul[t[1]]!=null)return Ul[t[1]]??"text"}const i=e.match(/\.([^.]+)$/)?.[1]??"";return Sa.has(i)?Sa.get(i)??"text":Ul[i]??"text"}function Ia(e){return e.replace(/\n$|\r\n$/,"")}function Qn(e){return{type:"text",value:e}}function Re({tagName:e,children:t=[],properties:i={}}){return{type:"element",tagName:e,properties:i,children:t}}function hu({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 SO(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 zs(e){return Re({tagName:"div",properties:{"data-gutter":""},children:e})}function EO(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:[Qn(`${t}`)]})]:void 0})}function Dn(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 xO(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(Qn(`
175
+ `)),e}const Hs=Symbol("no-token"),Cd=Symbol("multiple-tokens");function O1(e){const t=CO(e);if(t!=null)return t;let i=Hs;const a=[];let o=[],s;const c=()=>{if(o.length===0||s==null){o=[],s=void 0;return}if(o.length===1){const f=o[0];if(f?.type==="element"){wO(f,s);for(const h of f.children)Ws(h)}else Ws(f);a.push(f),o=[],s=void 0;return}for(const f of o)Ws(f);a.push(Re({tagName:"span",properties:{"data-char":s},children:o})),o=[],s=void 0},d=f=>{if(f!==Hs){if(f===Cd){i=Cd;return}if(i===Hs){i=f;return}i!==f&&(i=Cd)}};for(const f of e.children){const h=f.type==="element"?O1(f):Hs;if(d(h),typeof h!="number"){c(),a.push(f);continue}s!=null&&s!==h&&c(),s??=h,o.push(f)}return c(),e.children=a,i}function CO(e){const t=e.properties["data-char"];if(typeof t=="number")return t}function Ws(e){if(e.type==="element"){e.properties["data-char"]=void 0;for(const t of e.children)Ws(t)}}function wO(e,t){e.properties["data-char"]=t}function kO(e={}){const{classPrefix:t="__shiki_",classSuffix:i="",classReplacer:a=d=>d}=e,o=new Map;function s(d){return Object.entries(d).map(([f,h])=>`${f}:${h}`).join(";")}function c(d){const f=typeof d=="string"?d:s(d);let h=t+TO(f)+i;return h=a(h),o.has(h)||o.set(h,typeof d=="string"?d:{...d}),h}return{name:"@shikijs/transformers:style-to-class",pre(d){if(!d.properties.style)return;const f=c(d.properties.style);delete d.properties.style,this.addClassToHast(d,f)},tokens(d){for(const f of d)for(const h of f){if(!h.htmlStyle)continue;const y=c(h.htmlStyle);h.htmlStyle={},h.htmlAttrs||={},h.htmlAttrs.class?h.htmlAttrs.class+=` ${y}`:h.htmlAttrs.class=y}},getClassRegistry(){return o},getCSS(){let d="";for(const[f,h]of o.entries())d+=`.${f}{${typeof h=="string"?h:s(h)}}`;return d},clearRegistry(){o.clear()}}}function TO(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 AO(e=!1,t=!1){const i={lineInfo:[]},a=[{line(o){return delete o.properties.class,o},pre(o){const s=SO(o),c=[];if(s!=null){let d=1;for(const f of s.children)f.type==="element"&&(e&&O1(f),c.push(xO(f,d,i)),d++);s.children=c}return o},...e?{tokens(o){for(const s of o){let c=0;for(const d of s){const f=d;f.__lineChar??=c,c+=d.content.length}}},preprocess(o,s){s.mergeWhitespaces="never"},span(o,s,c,d,f){if(f?.offset!=null&&f.content!=null){const h=f.__lineChar;return h!=null&&(o.properties["data-char"]=h),o}return o}}:null}];return t&&a.push(LO,Vb),{state:i,transformers:a,toClass:Vb}}const Vb=kO({classPrefix:"hl-"}),LO={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 Nn(e){return`--${e==="token"?"diffs-token":"diffs"}-`}const RO=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,DO=/^0(?:\.0+)?%?$/;function NO(e){const t=e.indexOf("(");if(t<=0||!e.endsWith(")"))return;const i=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(i))return;const a=e.slice(t+1,-1).trim();if(a.length===0)return;const o=a.lastIndexOf("/");if(o!==-1)return a.slice(o+1).trim();if(/^(?:rgba|hsla)$/i.test(i)){const s=a.split(",");if(s.length===4)return s[3]?.trim()}}function OO(e){const t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;const i=t[1];let a,o=1;return i.length===3?a=i.split("").map(s=>s+s).join(""):i.length===6?a=i:(a=i.slice(0,6),o=parseInt(i.slice(6,8),16)/255),[parseInt(a.slice(0,2),16),parseInt(a.slice(2,4),16),parseInt(a.slice(4,6),16),o]}function wd(e){if(e==null)return null;const t=OO(e);if(t==null)return null;const i=t[0]/255,a=t[1]/255,o=t[2]/255,s=c=>c<=.03928?c/12.92:((c+.055)/1.055)**2.4;return .2126*s(i)+.7152*s(a)+.0722*s(o)}function jb(e){if(e==null)return!1;const t=e.trim().toLowerCase();if(t==="transparent"||RO.test(t))return!0;const i=NO(t);return i!=null&&DO.test(i)}function MO(e,t,i){if(t==null||i==null)return!1;const a=wd(e),o=wd(t),s=wd(i);return a==null||o==null||s==null?!1:Math.abs(a-s)<Math.abs(a-o)}const Gb=new WeakMap;function kd(e){const t=Gb.get(e);if(t!=null)return t;const i=e.colors??{},a={...i},o=i["editor.background"]??e.bg,s=i["editor.foreground"]??e.fg,c=i["sideBar.background"]??o,d=i["sideBar.foreground"]??s;Gn(a,"editor.background",o),Gn(a,"editor.foreground",s),Gn(a,"sideBar.background",c),Gn(a,"sideBar.foreground",d),Gn(a,"input.background",i["input.background"]??c),Gn(a,"sideBarSectionHeader.foreground",i["sideBarSectionHeader.foreground"]??d),Gn(a,"list.activeSelectionForeground",i["list.activeSelectionForeground"]??d),Gn(a,"gitDecoration.addedResourceForeground",Td(i["gitDecoration.addedResourceForeground"],i["terminal.ansiGreen"],i["editorGutter.addedBackground"])),Gn(a,"gitDecoration.modifiedResourceForeground",Td(i["gitDecoration.modifiedResourceForeground"],i["terminal.ansiBlue"],i["editorGutter.modifiedBackground"])),Gn(a,"gitDecoration.deletedResourceForeground",Td(i["gitDecoration.deletedResourceForeground"],i["terminal.ansiRed"],i["editorGutter.deletedBackground"]));const f=(jb(i["list.focusOutline"])?void 0:i["list.focusOutline"])??(jb(i.focusBorder)?void 0:i.focusBorder);f!=null?a["list.focusOutline"]=f:delete a["list.focusOutline"];const h=i["list.hoverBackground"];h!=null&&(IO(h,c)||MO(h,c,d))&&delete a["list.hoverBackground"];const y=Object.freeze({...e,colors:Object.freeze(a)});return Gb.set(e,y),y}function Gn(e,t,i){i!=null&&i!==""&&(e[t]=i)}function Td(...e){for(const t of e)if(t!=null&&t!=="")return t}function IO(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function zO({theme:e=wn,highlighter:t,prefix:i}){let a="";if(typeof e=="string"){const o=t.getTheme(e),s=kd(o);a+=`color:${s.fg};`,a+=`background-color:${s.bg};`,a+=`${Nn("global")}fg:${s.fg};`,a+=`${Nn("global")}bg:${s.bg};`,a+=Ad(o,i)}else{let o=t.getTheme(e.dark),s=kd(o);a+=`${Nn("global")}dark:${s.fg};`,a+=`${Nn("global")}dark-bg:${s.bg};`,a+=Ad(o,"dark"),o=t.getTheme(e.light),s=kd(o),a+=`${Nn("global")}light:${s.fg};`,a+=`${Nn("global")}light-bg:${s.bg};`,a+=Ad(o,"light")}return a}function Ad(e,t){t=t!=null?`${t}-`:"";let i="";const a=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];a!=null&&(i+=`${Nn("global")}${t}addition-color:${a};`);const o=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];o!=null&&(i+=`${Nn("global")}${t}deletion-color:${o};`);const s=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return s!=null&&(i+=`${Nn("global")}${t}modified-color:${s};`),i}function $b(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 jl(e,t){return e===t||e?.cacheKey!=null&&e.cacheKey===t?.cacheKey}function Bl(e,t){return Wh(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function hh(e){const t=e.lang??tr(e.name),i=e.lang??(e.prevName!=null?tr(e.prevName):"text");return t==="text"&&i==="text"}function Ld(e){return{...IN,...e}}function ka(e,t){const i=HO(e,t);return t?i:e.diffHeaderHeight+i}function HO(e,t){return e.paddingTop??(t?e.spacing:0)}function M1(e){return e.paddingBottom??e.spacing}function PO(e){switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}function lo({isPartial:e,rangeSize:t,expandedHunks:i,hunkIndex:a,collapsedContextThreshold:o}){const s=Math.max(t,0);if(s===0||e)return{fromStart:0,fromEnd:0,rangeSize:s,collapsedLines:s,renderAll:!1};if(i===!0||s<=o)return{fromStart:s,fromEnd:0,rangeSize:s,collapsedLines:0,renderAll:!0};const c=i?.get(a),d=Math.min(Math.max(c?.fromStart??0,0),s),f=Math.min(Math.max(c?.fromEnd??0,0),s),h=d+f,y=h>=s;return{fromStart:y?s:d,fromEnd:y?0:f,rangeSize:s,collapsedLines:Math.max(s-h,0),renderAll:y}}function I1({fileDiff:e,errorPrefix:t}){const i=e.hunks[e.hunks.length-1];if(i==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;const a=e.additionLines.length-(i.additionLineIndex+i.additionCount),o=e.deletionLines.length-(i.deletionLineIndex+i.deletionCount);if(a<=0&&o<=0)return 0;if(a!==o)throw new Error(`${t}: trailing context mismatch (additions=${a}, deletions=${o}) for ${e.name}`);return Math.min(a,o)}function oo({fileDiff:e,hunkIndex:t,expandedHunks:i,collapsedContextThreshold:a,errorPrefix:o}){if(t!==e.hunks.length-1)return;const s=I1({fileDiff:e,errorPrefix:o});if(s<=0)return;if(i===!0||s<=a)return{fromStart:s,fromEnd:0,rangeSize:s,collapsedLines:0,renderAll:!0};const c=i?.get(e.hunks.length),d=Math.min(Math.max(c?.fromStart??0,0),s);return{fromStart:d,fromEnd:0,rangeSize:s,collapsedLines:s-d,renderAll:d>=s}}function z1({type:e,metrics:t}){return t.hunkSeparatorHeight??PO(e)}function H1({type:e,metrics:t}){return e==="simple"||e==="metadata"||e==="line-info-basic"?0:t.spacing}function UO({type:e,hunkIndex:t,hunkSpecs:i}){switch(e){case"simple":return t>0;case"metadata":return i!=null;case"line-info":case"line-info-basic":case"custom":return!0}}function BO(e){return e!=="simple"&&e!=="metadata"}function Gl({type:e,metrics:t,hunkIndex:i,hunkSpecs:a}){if(!UO({type:e,hunkIndex:i,hunkSpecs:a}))return;const o=z1({type:e,metrics:t}),s=H1({type:e,metrics:t}),c=i>0?s:0,d=s;return{height:o,gapBefore:c,gapAfter:d,totalHeight:c+o+d}}function $l({type:e,metrics:t}){if(!BO(e))return;const i=z1({type:e,metrics:t}),a=H1({type:e,metrics:t});return{height:i,gapBefore:a,gapAfter:0,totalHeight:a+i}}function Kl({diff:e,diffStyle:t,startingLine:i=0,totalLines:a=1/0,expandedHunks:o,collapsedContextThreshold:s=1,callback:c}){const d=VO({diff:e,diffStyle:t,startingLine:i,expandedHunks:o,collapsedContextThreshold:s}),f={viewportStart:i,viewportEnd:i+a,isWindowedHighlight:i>0||a<1/0,splitCount:d.splitCount,unifiedCount:d.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!f.isWindowedHighlight)return!1;const m=f.unifiedCount>=i+a,b=f.splitCount>=i+a;return t==="unified"?m:(t==="split"||m)&&b},shouldSkip(m,b){if(!f.isWindowedHighlight)return!1;const v=f.unifiedCount+m<i,S=f.splitCount+b<i;return t==="unified"?v:(t==="split"||v)&&S},incrementCounts(m,b){(t==="unified"||t==="both")&&(f.unifiedCount+=m),(t==="split"||t==="both")&&(f.splitCount+=b)},isInWindow(m,b){if(!f.isWindowedHighlight)return!0;const v=f.isInUnifiedWindow(m),S=f.isInSplitWindow(b);return t==="unified"?v:t==="split"?S:v||S},isInUnifiedWindow(m){return!f.isWindowedHighlight||f.unifiedCount>=i-m&&f.unifiedCount<i+a},isInSplitWindow(m){return!f.isWindowedHighlight||f.splitCount>=i-m&&f.splitCount<i+a},emit(m,b=!1){return b||(t==="unified"?f.incrementCounts(1,0):t==="split"?f.incrementCounts(0,1):f.incrementCounts(1,1)),c(m)??!1}};e:for(let m=d.hunkIndex;m<e.hunks.length;m++){let D=function(ae,W){return S==null||S.collapsedLines<=0||S.fromStart+S.fromEnd>0?0:t==="unified"?ae===b.unifiedLineStart+b.unifiedLineCount-1?S.collapsedLines:0:W===b.splitLineStart+b.splitLineCount-1?S.collapsedLines:0},w=function(){return C?0:(C=!0,v.collapsedLines)};var h=D,y=w;const b=e.hunks[m];if(b==null)throw new Error("iterateOverDiff: invalid hunk index");if(f.shouldBreak())break;const v=lo({isPartial:e.isPartial,rangeSize:b.collapsedBefore,expandedHunks:o,hunkIndex:m,collapsedContextThreshold:s}),S=m===f.finalHunkIndex?oo({fileDiff:e,hunkIndex:m,expandedHunks:o,collapsedContextThreshold:s,errorPrefix:"iterateOverDiff"}):void 0,k=v.fromStart+v.fromEnd;let C=v.collapsedLines===0;if(f.shouldSkip(k,k))f.incrementCounts(k,k),w();else{let ae=b.unifiedLineStart-v.rangeSize,W=b.splitLineStart-v.rangeSize,F=b.deletionLineIndex-v.rangeSize,J=b.additionLineIndex-v.rangeSize,K=b.deletionStart-v.rangeSize,Y=b.additionStart-v.rangeSize;if(Ps(f,v.fromStart,t,H=>f.emit({hunkIndex:m,hunk:b,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:K+H,lineIndex:F+H,noEOFCR:!1,unifiedLineIndex:ae+H,splitLineIndex:W+H},additionLine:{unifiedLineIndex:ae+H,splitLineIndex:W+H,lineIndex:J+H,lineNumber:Y+H,noEOFCR:!1}}))||(ae=b.unifiedLineStart-v.fromEnd,W=b.splitLineStart-v.fromEnd,F=b.deletionLineIndex-v.fromEnd,J=b.additionLineIndex-v.fromEnd,K=b.deletionStart-v.fromEnd,Y=b.additionStart-v.fromEnd,Ps(f,v.fromEnd,t,H=>f.emit({hunkIndex:m,hunk:b,collapsedBefore:w(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:K+H,lineIndex:F+H,noEOFCR:!1,unifiedLineIndex:ae+H,splitLineIndex:W+H},additionLine:{unifiedLineIndex:ae+H,splitLineIndex:W+H,lineIndex:J+H,lineNumber:Y+H,noEOFCR:!1}}),()=>{w()})))break e}let T=b.unifiedLineStart,I=b.splitLineStart,B=b.deletionLineIndex,R=b.additionLineIndex,U=b.deletionStart,ie=b.additionStart;const ne=b.hunkContent.at(-1);for(const ae of b.hunkContent){if(f.shouldBreak())break e;const W=ae===ne;if(ae.type==="context"){if(f.shouldSkip(ae.lines,ae.lines))f.incrementCounts(ae.lines,ae.lines),w();else if(Ps(f,ae.lines,t,F=>{const J=W&&F===ae.lines-1,K=T+F,Y=I+F;return f.emit({hunkIndex:m,hunk:b,collapsedBefore:w(),collapsedAfter:D(K,Y),type:"context",deletionLine:{lineNumber:U+F,lineIndex:B+F,noEOFCR:J&&b.noEOFCRDeletions,unifiedLineIndex:K,splitLineIndex:Y},additionLine:{unifiedLineIndex:K,splitLineIndex:Y,lineIndex:R+F,lineNumber:ie+F,noEOFCR:J&&b.noEOFCRAdditions}})},()=>{w()}))break e;T+=ae.lines,I+=ae.lines,B+=ae.lines,R+=ae.lines,U+=ae.lines,ie+=ae.lines}else{const F=Math.max(ae.deletions,ae.additions),J=ae.deletions+ae.additions;if(!f.shouldSkip(J,F)){const K=$O(f,ae,t);(K[0]?.[0]??0)>0&&w();for(const[Y,H]of K)for(let q=Y;q<H;q++){const oe=D(T+q,t==="unified"?I+(q<ae.deletions?q:q-ae.deletions):I+q);if(f.emit(FO({hunkIndex:m,hunk:b,collapsedBefore:w(),collapsedAfter:oe,diffStyle:t,index:q,unifiedLineIndex:T,splitLineIndex:I,additionLineIndex:R,deletionLineIndex:B,additionLineNumber:ie,deletionLineNumber:U,content:ae,isLastContent:W,unifiedCount:J,splitCount:F}),!0))break e}}w(),f.incrementCounts(J,F),T+=J,I+=F,B+=ae.deletions,R+=ae.additions,U+=ae.deletions,ie+=ae.additions}}if(S!=null){const{collapsedLines:ae,fromStart:W,fromEnd:F}=S,J=W+F;if(Ps(f,J,t,K=>{const Y=K===J-1;return f.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:Y?ae:0,type:"context-expanded",deletionLine:{lineNumber:U+K,lineIndex:B+K,noEOFCR:!1,unifiedLineIndex:T+K,splitLineIndex:I+K},additionLine:{unifiedLineIndex:T+K,splitLineIndex:I+K,lineIndex:R+K,lineNumber:ie+K,noEOFCR:!1}})},void 0,()=>f.shouldBreak()))break e}}}function VO({diff:e,diffStyle:t,startingLine:i,expandedHunks:a,collapsedContextThreshold:o}){if(i<=0||t==="both")return{hunkIndex:0,splitCount:0,unifiedCount:0};const s=jO({diff:e,expandedHunks:a,collapsedContextThreshold:o});let c=0,d=e.hunks.length-1,f=e.hunks.length;for(;c<=d;){const y=c+d>>1,m=s[y+1];if(m==null)throw new Error("iterateOverDiff: invalid hunk prefix index");(t==="unified"?m.unifiedCount:m.splitCount)>i?(f=y,d=y-1):c=y+1}if(f>=e.hunks.length){const y=s[e.hunks.length];if(y==null)throw new Error("iterateOverDiff: invalid terminal hunk prefix index");return{hunkIndex:e.hunks.length,splitCount:y.splitCount,unifiedCount:y.unifiedCount}}const h=s[f];if(h==null)throw new Error("iterateOverDiff: invalid selected hunk prefix index");return{hunkIndex:f,splitCount:h.splitCount,unifiedCount:h.unifiedCount}}function jO({diff:e,expandedHunks:t,collapsedContextThreshold:i}){let a=0,o=0;const s=e.hunks.length-1,c=[{splitCount:0,unifiedCount:0}];for(let d=0;d<e.hunks.length;d++){const f=e.hunks[d];if(f==null)throw new Error("iterateOverDiff: invalid hunk summary index");const h=lo({isPartial:e.isPartial,rangeSize:f.collapsedBefore,expandedHunks:t,hunkIndex:d,collapsedContextThreshold:i}),y=h.fromStart+h.fromEnd;a+=y+f.splitLineCount,o+=y+f.unifiedLineCount;const m=d===s?oo({fileDiff:e,hunkIndex:d,expandedHunks:t,collapsedContextThreshold:i,errorPrefix:"iterateOverDiff"}):void 0;if(m!=null){const b=m.fromStart+m.fromEnd;a+=b,o+=b}c.push({splitCount:a,unifiedCount:o})}return c}function GO(e,t,i){if(!e.isWindowedHighlight||t<=0)return[0,t];const a=[];function o(d){const f=Math.max(0,e.viewportStart-d),h=Math.min(t,e.viewportEnd-d);h>f&&a.push([f,h])}if(i!=="split"&&o(e.unifiedCount),i!=="unified"&&o(e.splitCount),a.length===0)return[0,0];let s=a[0][0],c=a[0][1];for(let d=1;d<a.length;d++){const f=a[d];s=Math.min(s,f[0]),c=Math.max(c,f[1])}return[s,c]}function Ps(e,t,i,a,o,s){const[c,d]=GO(e,t,i);c>0&&(e.incrementCounts(c,c),o?.());let f=c;for(;f<t;){if(s?.()===!0)return!0;if(f>=d){e.incrementCounts(t-f,t-f);break}if(e.isInWindow(0,0)){if(a(f)===!0)return!0}else e.incrementCounts(1,1);f++}return!1}function $O(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 d(m,b){if(m+b<=e.viewportStart||m>=e.viewportEnd)return;const v=Math.max(0,e.viewportStart-m),S=Math.min(b,e.viewportEnd-m);return S>v?[v,S]:void 0}function f(m,b){return s==="split"?m:b==="additions"?[m[0]+t.deletions,m[1]+t.deletions]:m}function h(m,b){if(m==null)return;const[v,S]=f(m,b);S>v&&c.push([v,S])}if(a&&(h(d(e.unifiedCount,t.deletions),"deletions"),h(d(e.unifiedCount+t.deletions,t.additions),"additions")),o&&(h(d(e.splitCount,t.deletions),"deletions"),h(d(e.splitCount,t.additions),"additions")),c.length===0)return c;c.sort((m,b)=>m[0]-b[0]);const y=[c[0]];for(const[m,b]of c.slice(1)){const v=y[y.length-1];m<=v[1]?v[1]=Math.max(v[1],b):y.push([m,b])}return y}function FO({hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,diffStyle:o,index:s,unifiedLineIndex:c,splitLineIndex:d,additionLineIndex:f,deletionLineIndex:h,additionLineNumber:y,deletionLineNumber:m,content:b,isLastContent:v,unifiedCount:S,splitCount:k}){const D=s<b.deletions?c+s:void 0,C=o==="unified"?s>=b.deletions?c+s:void 0:s<b.additions?c+b.deletions+s:void 0,w=o==="unified"?d+(s<b.deletions?s:s-b.deletions):d+s,T=s<b.deletions?h+s:void 0,I=s<b.deletions?m+s:void 0,B=o==="unified"?s>=b.deletions?f+(s-b.deletions):void 0:s<b.additions?f+s:void 0,R=o==="unified"?s>=b.deletions?y+(s-b.deletions):void 0:s<b.additions?y+s:void 0,U=o==="unified"?v&&s===b.deletions-1&&t.noEOFCRDeletions:v&&s===k-1&&t.noEOFCRDeletions,ie=o==="unified"?v&&s===S-1&&t.noEOFCRAdditions:v&&s===k-1&&t.noEOFCRAdditions,ne=T!=null&&I!=null&&D!=null?{lineNumber:I,lineIndex:T,noEOFCR:U,unifiedLineIndex:D,splitLineIndex:w}:void 0,ae=B!=null&&R!=null&&C!=null?{unifiedLineIndex:C,splitLineIndex:w,lineIndex:B,lineNumber:R,noEOFCR:ie}:void 0;if(ne==null&&ae!=null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:void 0,additionLine:ae};if(ne!=null&&ae==null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:ne,additionLine:void 0};if(ne==null||ae==null)throw new Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:ne,additionLine:ae}}class Jh{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),d=this.removeEmpty(this.tokenize(s,a)),f=this.removeEmpty(this.tokenize(c,a));return this.diffWithOptionsObj(d,f,a,o)}diffWithOptionsObj(t,i,a,o){var s;const c=w=>{if(w=this.postProcess(w,a),o){setTimeout(function(){o(w)},0);return}else return w},d=i.length,f=t.length;let h=1,y=d+f;a.maxEditLength!=null&&(y=Math.min(y,a.maxEditLength));const m=(s=a.timeout)!==null&&s!==void 0?s:1/0,b=Date.now()+m,v=[{oldPos:-1,lastComponent:void 0}];let S=this.extractCommon(v[0],i,t,0,a);if(v[0].oldPos+1>=f&&S+1>=d)return c(this.buildValues(v[0].lastComponent,i,t));let k=-1/0,D=1/0;const C=()=>{for(let w=Math.max(k,-h);w<=Math.min(D,h);w+=2){let T;const I=v[w-1],B=v[w+1];I&&(v[w-1]=void 0);let R=!1;if(B){const ie=B.oldPos-w;R=B&&0<=ie&&ie<d}const U=I&&I.oldPos+1<f;if(!R&&!U){v[w]=void 0;continue}if(!U||R&&I.oldPos<B.oldPos?T=this.addToPath(B,!0,!1,0,a):T=this.addToPath(I,!1,!0,1,a),S=this.extractCommon(T,i,t,w,a),T.oldPos+1>=f&&S+1>=d)return c(this.buildValues(T.lastComponent,i,t))||!0;v[w]=T,T.oldPos+1>=f&&(D=Math.min(D,w-1)),S+1>=d&&(k=Math.max(k,w+1))}h++};if(o)(function w(){setTimeout(function(){if(h>y||Date.now()>b)return o(void 0);C()||w()},0)})();else for(;h<=y&&Date.now()<=b;){const w=C();if(w)return w}}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,d=a.length;let f=t.oldPos,h=f-o,y=0;for(;h+1<c&&f+1<d&&this.equals(a[f+1],i[h+1],s);)h++,f++,y++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return y&&!s.oneChangePerToken&&(t.lastComponent={count:y,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=f,h}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 d=0,f=0,h=0;for(;d<c;d++){const y=o[d];if(y.removed)y.value=this.join(a.slice(h,h+y.count)),h+=y.count;else{if(!y.added&&this.useLongestToken){let m=i.slice(f,f+y.count);m=m.map(function(b,v){const S=a[h+v];return S.length>b.length?S:b}),y.value=this.join(m)}else y.value=this.join(i.slice(f,f+y.count));f+=y.count,y.added||(h+=y.count)}}return o}}class qO extends Jh{}const YO=new qO;function XO(e,t,i){return YO.diff(e,t,i)}const Fb="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 QO extends Jh{tokenize(t){const i=new RegExp(`(\\r?\\n)|[${Fb}]+|[^\\S\\n\\r]+|[^${Fb}]`,"ug");return t.match(i)||[]}}const ZO=new QO;function KO(e,t,i){return ZO.diff(e,t,i)}class WO extends Jh{constructor(){super(...arguments),this.tokenize=eM}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 JO=new WO;function qb(e,t,i){return JO.diff(e,t,i)}function eM(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}function tM(e){for(let t=0;t<e.length;t++)if(e[t]<" "||e[t]>"~"||e[t]==='"'||e[t]==="\\")return!0;return!1}function Zi(e){if(!tM(e))return e;let t='"';const i=new TextEncoder().encode(e);let a=0;for(;a<i.length;){const o=i[a];o===7?t+="\\a":o===8?t+="\\b":o===9?t+="\\t":o===10?t+="\\n":o===11?t+="\\v":o===12?t+="\\f":o===13?t+="\\r":o===34?t+='\\"':o===92?t+="\\\\":o>=32&&o<=126?t+=String.fromCharCode(o):t+="\\"+o.toString(8).padStart(3,"0"),a++}return t+='"',t}const Yb={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function Xb(e,t,i,a,o,s,c){let d;c?typeof c=="function"?d={callback:c}:d=c:d={},typeof d.context>"u"&&(d.context=4);const f=d.context;if(d.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(d.callback){const{callback:y}=d;qb(i,a,Object.assign(Object.assign({},d),{callback:m=>{const b=h(m);y(b)}}))}else return h(qb(i,a,d));function h(y){if(!y)return;y.push({value:"",lines:[]});function m(w){return w.map(function(T){return" "+T})}const b=[];let v=0,S=0,k=[],D=1,C=1;for(let w=0;w<y.length;w++){const T=y[w],I=T.lines||iM(T.value);if(T.lines=I,T.added||T.removed){if(!v){const B=y[w-1];v=D,S=C,B&&(k=f>0?m(B.lines.slice(-f)):[],v-=k.length,S-=k.length)}for(const B of I)k.push((T.added?"+":"-")+B);T.added?C+=I.length:D+=I.length}else{if(v)if(I.length<=f*2&&w<y.length-2)for(const B of m(I))k.push(B);else{const B=Math.min(I.length,f);for(const U of m(I.slice(0,B)))k.push(U);const R={oldStart:v,oldLines:D-v+B,newStart:S,newLines:C-S+B,lines:k};b.push(R),v=0,S=0,k=[]}D+=I.length,C+=I.length}}for(const w of b)for(let T=0;T<w.lines.length;T++)w.lines[T].endsWith(`
181
+ `)?w.lines[T]=w.lines[T].slice(0,-1):(w.lines.splice(T+1,0,"\"),T++);return{oldFileName:e,newFileName:t,oldHeader:o,newHeader:s,hunks:b}}}function ph(e,t){var i,a,o,s,c,d;if(t||(t=Yb),Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(y=>y.isGit))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(y=>ph(y,t)).join(`
182
+ `)}const f=[];if(e.isGit){if(t=Yb,!e.oldFileName)throw new Error("oldFileName must be specified for Git patches");if(!e.newFileName)throw new Error("newFileName must be specified for Git patches");let y=e.oldFileName,m=e.newFileName;e.isCreate&&y==="/dev/null"?y=m.replace(/^b\//,"a/"):e.isDelete&&m==="/dev/null"&&(m=y.replace(/^a\//,"b/")),f.push("diff --git "+Zi(y)+" "+Zi(m)),e.isDelete&&f.push("deleted file mode "+((i=e.oldMode)!==null&&i!==void 0?i:"100644")),e.isCreate&&f.push("new file mode "+((a=e.newMode)!==null&&a!==void 0?a:"100644")),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(f.push("old mode "+e.oldMode),f.push("new mode "+e.newMode)),e.isRename&&(f.push("rename from "+Zi(((o=e.oldFileName)!==null&&o!==void 0?o:"").replace(/^a\//,""))),f.push("rename to "+Zi(((s=e.newFileName)!==null&&s!==void 0?s:"").replace(/^b\//,"")))),e.isCopy&&(f.push("copy from "+Zi(((c=e.oldFileName)!==null&&c!==void 0?c:"").replace(/^a\//,""))),f.push("copy to "+Zi(((d=e.newFileName)!==null&&d!==void 0?d:"").replace(/^b\//,""))))}else t.includeIndex&&e.oldFileName==e.newFileName&&e.oldFileName!==void 0&&f.push("Index: "+e.oldFileName),t.includeUnderline&&f.push("===================================================================");const h=e.hunks.length>0;t.includeFileHeaders&&e.oldFileName!==void 0&&e.newFileName!==void 0&&(!e.isGit||h)&&(f.push("--- "+Zi(e.oldFileName)+(e.oldHeader?" "+e.oldHeader:"")),f.push("+++ "+Zi(e.newFileName)+(e.newHeader?" "+e.newHeader:"")));for(let y=0;y<e.hunks.length;y++){const m=e.hunks[y],b=m.oldLines===0?m.oldStart-1:m.oldStart,v=m.newLines===0?m.newStart-1:m.newStart;f.push("@@ -"+b+","+m.oldLines+" +"+v+","+m.newLines+" @@");for(const S of m.lines)f.push(S)}return f.join(`
183
+ `)+`
184
+ `}function nM(e,t,i,a,o,s,c){if(typeof c=="function"&&(c={callback:c}),c?.callback){const{callback:d}=c;Xb(e,t,i,a,o,s,Object.assign(Object.assign({},c),{callback:f=>{d(f?ph(f,c.headerOptions):void 0)}}))}else{const d=Xb(e,t,i,a,o,s,c);return d?ph(d,c?.headerOptions):void 0}}function iM(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 Qb({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 Us({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 rM={forcePlainText:!1};function aM(e,t,i,{forcePlainText:a,startingLine:o,totalLines:s,expandedHunks:c,collapsedContextThreshold:d=1}=rM){a?(o??=0,s??=1/0):(o=0,s=1/0);const f=o>0||s<1/0,h=typeof i.theme=="string"?t.getTheme(i.theme).type:void 0,y=zO({theme:i.theme,highlighter:t}),m=a&&!f&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":i.lineDiffType,b={deletionLines:[],additionLines:[]},{maxLineDiffLength:v}=i,S=!a&&!e.isPartial,k=a?c:void 0,D=new Map;function C(T){const I=S?0:T,B=D.get(I)??oM();return D.set(I,B),B}function w(T,I,B,R){if(f){let U=B.at(-1);(U==null||U.targetIndex+U.count!==I)&&(U={targetIndex:I,originalOffset:R.length,count:0},B.push(U)),U.count++}R.push(T)}Kl({diff:e,diffStyle:"both",startingLine:o,totalLines:s,expandedHunks:f?k:!0,collapsedContextThreshold:d,callback:({hunkIndex:T,additionLine:I,deletionLine:B,type:R})=>{const U=C(T),ie=I!=null?I.splitLineIndex:B.splitLineIndex;R==="change"&&I!=null&&B!=null&&lM({additionLine:e.additionLines[I.lineIndex],deletionLine:e.deletionLines[B.lineIndex],deletionLineIndex:U.deletionContent.length,additionLineIndex:U.additionContent.length,deletionDecorations:U.deletionDecorations,additionDecorations:U.additionDecorations,lineDiffType:m,maxLineDiffLength:v}),B!=null&&(w(e.deletionLines[B.lineIndex],B.lineIndex,U.deletionSegments,U.deletionContent),U.deletionInfo.push({type:R==="change"?"change-deletion":R,lineNumber:B.lineNumber,altLineNumber:R==="change"?void 0:I.lineNumber??void 0,lineIndex:`${B.unifiedLineIndex},${ie}`})),I!=null&&(w(e.additionLines[I.lineIndex],I.lineIndex,U.additionSegments,U.additionContent),U.additionInfo.push({type:R==="change"?"change-addition":R,lineNumber:I.lineNumber,altLineNumber:R==="change"?void 0:B.lineNumber??void 0,lineIndex:`${I.unifiedLineIndex},${ie}`}))}});for(const T of D.values()){if(T.deletionContent.length===0&&T.additionContent.length===0)continue;const I={name:e.prevName??e.name,contents:T.deletionContent.value},B={name:e.name,contents:T.additionContent.value},{deletionLines:R,additionLines:U}=sM({deletionFile:I,deletionInfo:T.deletionInfo,deletionDecorations:T.deletionDecorations,additionFile:B,additionInfo:T.additionInfo,additionDecorations:T.additionDecorations,highlighter:t,options:i,languageOverride:a?"text":e.lang});if(S){b.deletionLines=R,b.additionLines=U;continue}if(T.deletionSegments.length>0)for(const ie of T.deletionSegments)for(let ne=0;ne<ie.count;ne++)b.deletionLines[ie.targetIndex+ne]=R[ie.originalOffset+ne];else b.deletionLines.push(...R);if(T.additionSegments.length>0)for(const ie of T.additionSegments)for(let ne=0;ne<ie.count;ne++)b.additionLines[ie.targetIndex+ne]=U[ie.originalOffset+ne];else b.additionLines.push(...U)}return{code:b,themeStyles:y,baseThemeType:h}}function lM({deletionLine:e,additionLine:t,deletionLineIndex:i,additionLineIndex:a,deletionDecorations:o,additionDecorations:s,lineDiffType:c,maxLineDiffLength:d}){if(e==null||t==null||c==="none"||(e=Ia(e),t=Ia(t),e.length>d||t.length>d))return;const f=c==="char"?XO(e,t):KO(e,t),h=[],y=[],m=c==="word-alt",b=f.at(-1);for(const S of f){const k=S===b;!S.added&&!S.removed?(Us({item:S,arr:h,enableJoin:m,isNeutral:!0,isLastItem:k}),Us({item:S,arr:y,enableJoin:m,isNeutral:!0,isLastItem:k})):S.removed?Us({item:S,arr:h,enableJoin:m,isLastItem:k}):Us({item:S,arr:y,enableJoin:m,isLastItem:k})}let v=0;for(const S of h)S[0]===1&&o.push(Qb({line:i,spanStart:v,spanLength:S[1].length})),v+=S[1].length;v=0;for(const S of y)S[0]===1&&s.push(Qb({line:a,spanStart:v,spanLength:S[1].length})),v+=S[1].length}function oM(){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 sM({deletionFile:e,additionFile:t,deletionInfo:i,additionInfo:a,highlighter:o,deletionDecorations:s,additionDecorations:c,languageOverride:d,options:{theme:f=wn,...h}}){const y=d??tr(e.name),m=d??tr(t.name),{state:b,transformers:v}=AO(h.useTokenTransformer),S=typeof f=="string"?{...h,lang:"text",theme:f,transformers:v,decorations:void 0,defaultColor:!1,cssVariablePrefix:Nn("token"),tokenizeTimeLimit:0}:{...h,lang:"text",themes:f,transformers:v,decorations:void 0,defaultColor:!1,cssVariablePrefix:Nn("token"),tokenizeTimeLimit:0};return{deletionLines:e.contents===""?[]:(S.lang=y,b.lineInfo=i,S.decorations=s,$b(o.codeToHast(Ia(e.contents),S))),additionLines:t.contents===""?[]:(S.lang=m,S.decorations=c,b.lineInfo=a,$b(o.codeToHast(Ia(t.contents),S)))}}const uM=te.createContext(void 0);function mh(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 P1(e,t){const i=e?.theme??wn,a=t?.theme??wn,o=Zb(e),s=Zb(t);return Wh(i,a)&&mh(e,t,["theme","parseDiffOptions"])&&mh(o,s)}function Zb(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function Kb(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function Wb(e){if(typeof HTMLStyleElement<"u"&&e instanceof HTMLStyleElement)return!0;const t=e.tagName??e.nodeName;return typeof t=="string"&&t.toLowerCase()==="style"}const cM="-1,-1";function fM(e){return e?.some(t=>t.lineNumber===0)??!1}function Jb(e){const t=e[0];return t!=null&&t.length>0?t:void 0}function U1(e){return e.startingLine===0&&e.totalLines>0}function dM(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function hM(){return Re({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[hu({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}var pM=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;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.gutterUtilityLine=void 0,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.gutterUtilityLine=void 0,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(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){const i=!(e===this.selectedRange||Kb(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!i||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),i&&t?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.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&&Vs(e.composedPath())||(_i(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;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||(_i(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(_i(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){_i(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:i}=this.options,a=t.composedPath();_i(i,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:a});const o=this.resolvePointerTarget(a);_i(i,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",o);const{onLineClick:s,onLineNumberClick:c,onLineEnter:d,onLineLeave:f,onTokenClick:h,onTokenEnter:y,onTokenLeave:m,onHunkExpand:b,onMergeConflictActionClick:v}=this.options;switch(e){case"move":{const S=Rd(o)&&this.hoveredLine?.lineElement===o.lineElement;Js(o)&&this.hoveredToken?.tokenElement===o.tokenElement||(this.hoveredToken!=null&&(m?.(this.hoveredToken,t),this.clearHoveredToken()),Js(o)&&(this.setHoveredToken(this.toTokenEventBaseProps(o)),y?.(this.hoveredToken,t))),S||(this.hoveredLine!=null&&(f?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Rd(o)?(this.setHoveredLine(this.toEventBaseProps(o)),this.placeUtility(),d?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(o==null)break;if(yM(o)&&v!=null){v(o);break}if(gM(o)&&b!=null){b(o.hunkIndex,o.all||t.shiftKey?"both":o.direction,o.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!Rd(o))break;Js(o)&&h!=null&&h(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:d,onTokenEnter:f,onTokenLeave:h,onHunkExpand:y,onMergeConflictActionClick:m,enableGutterUtility:b=!1,enableLineSelection:v=!1,onGutterUtilityClick:S}=this.options,k=S!=null,D=i!=="disabled"||a!=null||o!=null||s!=null||c!=null||d!=null||f!=null||h!=null||y!=null||m!=null||b||v||k;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,_i(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const T=[];return(t==="both"||t==="click")&&(a!=null&&T.push("onLineClick"),o!=null&&T.push("onLineNumberClick"),y!=null&&T.push("expandable hunk separators"),m!=null&&T.push("merge conflict actions")),T})()),_i(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),_i(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 C=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",w=this.pointerSession.mode==="gutterSelecting";(!v&&C||!k&&w)&&(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();Vs(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:t=!1}=this.options;if(!t)return;const i=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(i==null)return;const{pre:a}=this;if(a==null)return;const{lineNumber:o,eventSide:s,lineIndex:c}=i;if(e.shiftKey&&this.selectedRange!=null){const d=this.getIndexesFromSelection(this.selectedRange,a.getAttribute("data-diff-type")==="split");if(d==null)return;const f=d.start<=d.end?c>=d.start:c<=d.end;this.selectionAnchor={lineNumber:f?this.selectedRange.start:this.selectedRange.end,side:f?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(o,s,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===o&&this.selectedRange?.end===o){const d={lineNumber:o,side:s};this.selectionAnchor=d,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:d,pending:d},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:o,side:s},this.updateSelection(o,s,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{enableLineSelection:t=!1,onGutterUtilityClick:i}=this.options;if(i==null)return;const a=this.currentSelectionEnds(),o=a?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),s=a?.top??o;o==null||s==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:s,current:o},t&&(this.selectionAnchor={lineNumber:s.lineNumber,side:s.side},this.updateSelection(o.lineNumber,o.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),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;e.preventDefault();const i=this.resolveSelectionPoint(e,{source:"coordinates-first"});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;e.preventDefault();const i=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(i==null||this.selectionAnchor==null)return;this.updateSelection(i.lineNumber,i.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const i=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(i==null||this.selectionAnchor==null)return;const a={lineNumber:i.lineNumber,side:i.eventSide};if(dM(this.pointerSession.pending,a))return;this.updateSelection(i.lineNumber,i.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),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;e.preventDefault();const a=this.resolveSelectionPoint(e,{source:"coordinates-first"});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.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};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.clearProposedSelection(),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=Na(hM());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)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);Fl(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const t={lineNumber:e.start,side:e.side},i={lineNumber:e.end,side:e.endSide??e.side},a=this.selectionPointRowIndex(t),o=this.selectionPointRowIndex(i);if(!(a==null||o==null))return a>o?{top:i,bottom:t}:{top:t,bottom:i}}selectionPointRowIndex(e){const t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;const t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;const i=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,a=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${i}"]`);for(const o of a){if(!(o instanceof HTMLElement))continue;const s=this.resolvePointerTarget(Bs(o));if(Fl(s)&&!(this.mode==="diff"&&e.side!=null&&s.side!==e.side))return s}}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"})}selectionInfoFromPath(e,t){const i=this.resolvePointerTarget(e);if(Fl(i)&&!(t&&!i.numberColumn)&&i.splitLineIndex!=null)return{lineIndex:i.splitLineIndex,lineNumber:i.lineNumber,eventSide:this.mode==="diff"?i.side:void 0}}resolveSelectionInfo(e,t){const i=this.resolveSelectionPath(e,t);return i!=null?this.selectionInfoFromPath(i,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(Fl(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const i=this.resolveSelectionPath(e,t);return i!=null?this.selectionPointFromPath(i):void 0}resolveSelectionPath(e,t){const i=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),i);case"coordinates-first":{const a=this.pathFromCoordinates(e,i);return a!==void 0?a??void 0:this.pathFromEventPath(e.composedPath(),i)}}}pathFromCoordinates(e,t){const i=this.hitTest(e);if(i!==void 0)return i===null?null:this.pathFromElement(i,t)??null}pathFromEventPath(e,t){if(!(t&&Vs(e))){for(const i of e)if(i instanceof Element)return this.pathFromElement(i,t)}}pathFromElement(e,t){const i=Bs(e);if(t&&Vs(i))return;const a=vM(e);return a!=null?Bs(a):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=SM(_M(e));if(t==null)return;const i=this.targetForSelectionPoint(t);return i!=null?Bs(i.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),i=nv(t)?t:nv(document)?document:void 0;if(i!=null)return i.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:i}=this.options;return i!=null?i(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,i=!0){const a=this.getCurrentSelectionRange();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)}Kb(a??void 0,o??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=o:(this.selectedRange=o,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),i&&this.notifySelectionChangeDelta())}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 d of e)d.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 d of t){const[f,h]=d.children,y=h.children.length;if(y!==f.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let m=0;m<y;m++){const b=h.children[m],v=f.children[m];if(!(b instanceof HTMLElement)||!(v instanceof HTMLElement))continue;const S=this.parseLineIndex(b,i);if((S??0)>c)break;if(S==null||S<s)continue;let k=o?"single":S===s?"first":S===c?"last":"";b.setAttribute("data-selected-line",k),v.setAttribute("data-selected-line",k),v.nextSibling instanceof HTMLElement&&b.nextSibling instanceof HTMLElement&&(b.nextSibling.hasAttribute("data-line-annotation")||b.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(o?(k="last",b.setAttribute("data-selected-line","first")):S===s?k="":S===c&&b.setAttribute("data-selected-line",""),b.nextSibling.setAttribute("data-selected-line",k),v.nextSibling.setAttribute("data-selected-line",k))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??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,d,f,h,y,m;for(const v of e){if(!(v instanceof HTMLElement))continue;if(m==null&&v.hasAttribute("data-merge-conflict-action")){const C=v.getAttribute("data-merge-conflict-action")??void 0,w=v.getAttribute("data-merge-conflict-conflict-index")??void 0,T=w!=null?Number.parseInt(w,10):NaN;bM(C)&&Number.isFinite(T)&&(m={kind:"merge-conflict-action",resolution:C,conflictIndex:T})}if(d==null&&v.hasAttribute("data-char")){d=v;const C=v.getAttribute("data-char");if(C!=null){const w=Number.parseInt(C,10);if(!Number.isNaN(w)){const T=v.textContent??"",I=w+T.length;(T.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(f={tokenElement:d,lineCharStart:w,lineCharEnd:I,tokenText:T});continue}}}const S=c==null?v.getAttribute("data-column-number")??void 0:void 0;if(S!=null){c=v,y=Number.parseInt(S,10),t=!0,i=rv(v),s=v.getAttribute("data-line-index")??void 0;continue}const k=o==null?v.getAttribute("data-line")??void 0:void 0;if(k!=null){o=v,y=Number.parseInt(k,10),i=rv(v),s=v.getAttribute("data-line-index")??void 0;continue}if(h==null&&(v.hasAttribute("data-expand-button")||v.hasAttribute("data-unmodified-lines"))){h={hunkIndex:void 0,direction:v.hasAttribute("data-expand-up")?"up":v.hasAttribute("data-expand-down")?"down":"both",all:v.hasAttribute("data-expand-all-button")};continue}const D=h!=null?v.getAttribute("data-expand-index")??void 0:void 0;if(h!=null&&D!=null){const C=Number.parseInt(D,10);Number.isNaN(C)||(h.hunkIndex=C);continue}if(a==null&&v.hasAttribute("data-code")){a=v;break}}if(m!=null)return m;if(h?.hunkIndex!=null)return{type:"line-info",hunkIndex:h.hunkIndex,direction:h.direction,all:h.all};if(o??=s!=null?tv(a,`[data-line][data-line-index="${s}"]`):void 0,c??=s!=null?tv(a,`[data-column-number][data-line-index="${s}"]`):void 0,a==null||o==null||c==null||i==null||y==null||Number.isNaN(y))return;const b=this.parseLineIndex(o,this.isSplitDiff());return f!=null?this.mode==="file"?{kind:"token",lineType:i,lineElement:o,lineNumber:y,numberColumn:t,numberElement:c,side:void 0,splitLineIndex:b,...f}:{kind:"token",lineType:i,lineElement:o,lineNumber:y,numberColumn:t,numberElement:c,side:iv(i,a),splitLineIndex:b,...f}:this.mode==="file"?{kind:"line",lineType:i,lineElement:o,lineNumber:y,numberColumn:t,numberElement:c,side:void 0,splitLineIndex:b}:{kind:"line",lineType:i,lineElement:o,lineNumber:y,numberColumn:t,numberElement:c,side:iv(i,a),splitLineIndex:b}}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 ev({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:i,onGutterUtilityClick:a,onLineClick:o,onLineEnter:s,onLineLeave:c,onLineNumberClick:d,onTokenClick:f,onTokenEnter:h,onTokenLeave:y,renderGutterUtility:m,__debugPointerEvents:b,enableLineSelection:v,controlledSelection:S,onLineSelected:k,onLineSelectionStart:D,onLineSelectionChange:C,onLineSelectionEnd:w},T,I,B){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:mM({enableGutterUtility:t,renderGutterUtility:m,onGutterUtilityClick:a}),usesCustomGutterUtility:m!=null,lineHoverHighlight:i,onGutterUtilityClick:a,onHunkExpand:T,onMergeConflictActionClick:B,onLineClick:o,onLineEnter:s,onLineLeave:c,onLineNumberClick:d,onTokenClick:f,onTokenEnter:h,onTokenLeave:y,__debugPointerEvents:b,enableLineSelection:v,controlledSelection:S,onLineSelected:k,onLineSelectionStart:D,onLineSelectionChange:C,onLineSelectionEnd:w,getLineIndex:I}}function mM({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:i}){if(i!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function Fl(e){return e!=null&&"kind"in e&&e.kind==="line"}function Js(e){return e!=null&&"kind"in e&&e.kind==="token"}function Rd(e){return Fl(e)||Js(e)}function gM(e){return"type"in e&&e.type==="line-info"}function yM(e){return"kind"in e&&e.kind==="merge-conflict-action"}function bM(e){return e==="current"||e==="incoming"||e==="both"}function tv(e,t){const i=e?.querySelector(t);return i instanceof HTMLElement?i:void 0}function Bs(e){const t=[];let i=e;for(;i!=null;)t.push(i),i=i.parentNode;return t}function vM(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const i=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(i instanceof HTMLElement))return;const a=i.previousElementSibling;return a instanceof HTMLElement&&(a.hasAttribute("data-line")||a.hasAttribute("data-column-number"))?a:void 0}function _M(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const i=e.getAttribute("name")??void 0;return i!=null&&i.startsWith("annotation-")?i:void 0}}function SM(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const i=Number.parseInt(t[2],10);if(!(!Number.isFinite(i)||i<=0))return{lineNumber:i,side:t[1]}}function nv(e){return e!=null&&typeof e.elementFromPoint=="function"}function iv(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function rv(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 Vs(e){for(const t of e)if(t instanceof HTMLElement&&(t.hasAttribute("data-utility-button")||t.hasAttribute("data-gutter-utility-slot")||t.getAttribute("slot")==="gutter-utility-slot"||t.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function _i(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 EM=class Si{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=Si.resizeObserver??new ResizeObserver(Si.handleSharedResizeEntries);return Si.resizeObserver=t,t}static handleSharedResizeEntries(t){const i=new Map;for(const a of t){const o=Si.managersByElement.get(a.target);if(o==null)continue;const s=i.get(o);s==null?i.set(o,[a]):s.push(a)}for(const[a,o]of i)a.handleResizeEntries(o)}observedNodes=new Map;setup(t,i){const a=new Set;let o=0;const s=new Map(this.observedNodes);this.observedNodes.clear();for(const c of t.children){if(o===2)break;const d=(()=>{if(c instanceof HTMLElement&&c.tagName==="CODE")return c})();if(d==null)continue;o++;let f=s.get(d);if(f!=null&&f.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let h=d.firstElementChild;h instanceof HTMLElement||(h=null),f!=null?(this.observedNodes.set(d,f),s.delete(d),f.numberElement!==h?(f.numberElement!=null&&(this.unobserve(f.numberElement),s.delete(f.numberElement)),h!=null&&(this.observe(h),s.delete(h),this.observedNodes.set(h,f)),f.numberElement=h,f.numberWidth=0):f.numberElement!=null?(s.delete(f.numberElement),this.observedNodes.set(f.numberElement,f)):f.numberWidth=0):(f={type:"code",codeElement:d,numberElement:h,codeWidth:"auto",numberWidth:0},this.observedNodes.set(d,f),this.observe(d),h!=null&&(this.observedNodes.set(h,f),this.observe(h)))}if(o>1&&!i){const c=t.querySelectorAll('[data-line-annotation*=","]'),d=new Map;for(const f of c){if(!(f instanceof HTMLElement))continue;const h=f.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(h)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:h,element:f});continue}let y=d.get(h);y==null&&(y=[],d.set(h,y)),y.push(f)}for(const[f,h]of d){if(h.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",f,h);continue}const[y,m]=h,b=y.firstElementChild,v=m.firstElementChild;if(!(y instanceof HTMLElement)||!(m instanceof HTMLElement)||!(b instanceof HTMLElement)||!(v instanceof HTMLElement))continue;let S=s.get(b);if(S!=null){this.observedNodes.set(b,S),this.observedNodes.set(v,S),s.delete(b),s.delete(v);continue}const k=b.getBoundingClientRect().height,D=v.getBoundingClientRect().height;S={type:"annotations",column1:{container:y,child:b,childHeight:k},column2:{container:m,child:v,childHeight:D},currentHeight:"auto"},a.add({child1:b,child2:v,item:S,newHeight:Math.max(k,D)})}for(const f of a)this.applyNewHeight(f.item,f.newHeight),this.observedNodes.set(f.child1,f.item),this.observedNodes.set(f.child2,f.item),this.observe(f.child1),this.observe(f.child2);a.clear()}for(const[c,d]of s)this.unobserve(c),d.type==="code"?wM(d):kM(d);s.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:i}=Si,a=i.get(t);if(a!==this){if(a!=null&&a!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");i.set(t,this),Si.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:i,resizeObserver:a}=Si,o=i.get(t);if(o!=null){if(o!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");i.delete(t),a?.unobserve(t),a!=null&&i.size===0&&(a.disconnect(),Si.resizeObserver=void 0)}}handleResizeEntries(t){const i=new Map,a=new Set;for(const o of t){const{target:s,borderBoxSize:c,contentBoxSize:d}=o;if(!(s instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",o);continue}const f=this.observedNodes.get(s);if(f==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",o);continue}if(f.type==="annotations"){const h=(()=>{if(s===f.column1.child)return f.column1;if(s===f.column2.child)return f.column2})();if(h==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:f,target:s});continue}h.childHeight=c[0].blockSize,a.add(f)}else if(f.type==="code"){const h=i.get(f)??{},y=d[0].inlineSize;s===f.codeElement?h.codeInlineSize=y:s===f.numberElement&&(h.numberInlineSize=y),i.set(f,h)}}this.applyAnnotationUpdates(a),a.clear(),this.applyColumnUpdates(i),i.clear()}applyAnnotationUpdates(t){for(const i of t)this.applyNewHeight(i,Math.max(i.column1.childHeight,i.column2.childHeight))}applyColumnUpdates=t=>{for(const[i,a]of t){const o=a.codeInlineSize!=null?xM(a.codeInlineSize):i.codeWidth,s=a.numberInlineSize!=null?CM(a.numberInlineSize):i.numberWidth,c=o!==i.codeWidth,d=s!==i.numberWidth;if(!(!c&&!d)&&(i.codeWidth=o,i.numberWidth=s,c&&i.codeElement.style.setProperty("--diffs-column-width",`${typeof o=="number"?`${o}px`:"auto"}`),d&&i.codeElement.style.setProperty("--diffs-column-number-width",`${s===0?"auto":`${s}px`}`),c||d&&o!=="auto")){const f=typeof o=="number"?Math.max(o-s,0):0;i.codeElement.style.setProperty("--diffs-column-content-width",`${f>0?`${f}px`:"auto"}`)}}};applyNewHeight(t,i){i!==t.currentHeight&&(t.currentHeight=Math.max(i,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};function xM(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function CM(e){return Math.max(Math.ceil(e),0)}function wM(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width"))}function kM(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}function B1(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 av(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!dh.has(t))return!1;return!0}function Dd(e){for(const t of N1(e))if(!fh.has(t))return!1;return!0}function TM(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 AM(e,t){return Re({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function LM(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 RM({fileOrDiff:e,mode:t,stickyHeader:i}){const a="type"in e?e:void 0,o={"data-diffs-header":t,"data-change-type":a?.type,"data-sticky":i?"":void 0};return Re({tagName:"div",children:[t==="custom"?Re({tagName:"slot",properties:{name:Kh}}):DM({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:a?.type??"file"}),...t==="custom"?[]:[NM(a)]],properties:o})}function DM({name:e,prevName:t,iconType:i}){const a=[Re({tagName:"slot",properties:{name:_1}}),hu({name:LM(i),properties:{"data-change-icon":i}})];return t!=null&&(a.push(Re({tagName:"div",children:[Re({tagName:"bdi",children:[Qn(t)]})],properties:{"data-prev-name":""}})),a.push(hu({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),a.push(Re({tagName:"div",children:[Re({tagName:"bdi",children:[Qn(e)]})],properties:{"data-title":""}})),Re({tagName:"div",children:a,properties:{"data-header-content":""}})}function NM(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:[Qn(`-${a}`)],properties:{"data-deletions-count":""}})),(i>0||a===0)&&t.push(Re({tagName:"span",children:[Qn(`+${i}`)],properties:{"data-additions-count":""}}))}return t.push(Re({tagName:"slot",properties:{name:S1}})),Re({tagName:"div",children:t,properties:{"data-metadata":""}})}function OM(e){return Re({tagName:"pre",properties:MM(e)})}function MM({diffIndicators:e,disableBackground:t,disableLineNumbers:i,overflow:a,split:o,totalLines:s,type:c,customProperties:d}){return{...d,"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,style:`--diffs-min-number-column-width-default:${`${s}`.length}ch;`}}function IM(e,{theme:t,preferredHighlighter:i="shiki-js"}){return{langs:[e??"text"],themes:N1(t),preferredHighlighter:i}}function zM(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}const HM=`<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 PM(e,t){return e==null||t==null?e===t:UM(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 lv={};function UM(e=lv,t=lv){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 BM(e){const t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}function VM(){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.style.touchAction="none",e}function jM(){const e=document.createElement("style");return e.setAttribute(NN,""),e}let js;function gh(e){if(js!=null)return js;const t=e.host;if(typeof HTMLElement<"u"&&t instanceof HTMLElement&&!t.isConnected)return;const i=document.createElement("div");i.setAttribute("data-code",""),i.setAttribute(ON,"true");const a=document.createElement("div");return a.style.position="relative",a.style.width="200%",a.style.height="200%",i.appendChild(a),e.appendChild(i),js=Math.max(i.offsetHeight-i.clientHeight,0),i.remove(),js}function V1(e){return`${E1}: ${e==null?"var(--diffs-scrollbar-gutter-fallback)":`${e}px`};`}var GM=`@layer base {
240
+ :host {
241
+ --diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",
242
+ "Courier New", monospace;
243
+ --diffs-header-font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
244
+ "Noto Sans", "Liberation Sans", Arial, sans-serif;
245
+ --diffs-mixer: light-dark(#000, #fff);
246
+ --diffs-gap-fallback: 8px;
247
+ --diffs-scrollbar-gutter-fallback: 6px;
248
+ --diffs-scrollbar-gutter: var(--diffs-scrollbar-gutter-override, var(--diffs-scrollbar-gutter-measured, var(--diffs-scrollbar-gutter-fallback)));
249
+ --diffs-added-light: #0dbe4e;
250
+ --diffs-added-dark: #5ecc71;
251
+ --diffs-modified-light: #009fff;
252
+ --diffs-modified-dark: #69b1ff;
253
+ --diffs-deleted-light: #ff2e3f;
254
+ --diffs-deleted-dark: #ff6762;
255
+ color-scheme: light dark;
256
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
257
+ font-size: var(--diffs-font-size, 13px);
258
+ line-height: var(--diffs-line-height, 20px);
259
+ font-feature-settings: var(--diffs-font-features);
260
+ --diffs-bg: light-dark(var(--diffs-light-bg, #fff), var(--diffs-dark-bg, #000));
261
+ --diffs-bg-buffer: var(--diffs-bg-buffer-override, light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));
262
+ --diffs-bg-context: var(--diffs-bg-context-override, light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));
263
+ --diffs-bg-context-gutter: var(--diffs-bg-context-gutter-override, light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)), color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));
264
+ --diffs-bg-separator: var(--diffs-bg-separator-override, light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));
265
+ --diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));
266
+ --diffs-fg-number: var(--diffs-fg-number-override, light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)), color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));
267
+ --diffs-fg-conflict-marker: var(--diffs-fg-conflict-marker-override, var(--diffs-fg-number));
268
+ --diffs-deletion-base: var(--diffs-deletion-color-override, light-dark(var(--diffs-light-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-light))), var(--diffs-dark-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-dark)))));
269
+ --diffs-addition-base: var(--diffs-addition-color-override, light-dark(var(--diffs-light-addition-color, var(--diffs-addition-color, var(--diffs-added-light))), var(--diffs-dark-addition-color, var(--diffs-addition-color, var(--diffs-added-dark)))));
270
+ --diffs-modified-base: var(--diffs-modified-color-override, light-dark(var(--diffs-light-modified-color, var(--diffs-modified-color, var(--diffs-modified-light))), var(--diffs-dark-modified-color, var(--diffs-modified-color, var(--diffs-modified-dark)))));
271
+ --diffs-bg-deletion: var(--diffs-bg-deletion-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));
272
+ --diffs-bg-deletion-emphasis: var(--diffs-bg-deletion-emphasis-override, light-dark(rgb(from var(--diffs-deletion-base) r g b / .15), rgb(from var(--diffs-deletion-base) r g b / .2)));
273
+ --diffs-bg-addition: var(--diffs-bg-addition-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));
274
+ --diffs-bg-addition-emphasis: var(--diffs-bg-addition-emphasis-override, light-dark(rgb(from var(--diffs-addition-base) r g b / .15), rgb(from var(--diffs-addition-base) r g b / .2)));
275
+ --diffs-selection-base: var(--diffs-modified-base);
276
+ --diffs-selection-number-fg: light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));
277
+ background-color: var(--diffs-bg);
278
+ color: var(--diffs-fg);
279
+ display: block;
280
+ }
281
+
282
+ pre, code, [data-error-wrapper] {
283
+ isolation: isolate;
284
+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));
285
+ outline: none;
286
+ margin: 0;
287
+ padding: 0;
288
+ display: block;
289
+ }
290
+
291
+ pre, code {
292
+ background-color: var(--diffs-bg);
293
+ }
294
+
295
+ code {
296
+ contain: content;
297
+ }
298
+
299
+ *, :before, :after {
300
+ box-sizing: border-box;
301
+ }
302
+
303
+ [data-icon-sprite] {
304
+ display: none;
305
+ }
306
+
307
+ [data-diffs-header], [data-separator] {
308
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
309
+ }
310
+
311
+ [data-diffs-header][data-sticky] {
312
+ z-index: 1;
313
+ background-color: var(--diffs-bg);
314
+ position: sticky;
315
+ top: 0;
316
+ }
317
+
318
+ [data-file-info] {
319
+ color: var(--fg);
320
+ background-color: color-mix(in lab, var(--bg) 98%, var(--fg));
321
+ border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));
322
+ padding: 10px;
323
+ font-weight: 700;
324
+ }
325
+
326
+ [data-diff], [data-file] {
327
+ --diffs-grid-number-column-width: minmax(min-content, max-content);
328
+ --diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;
329
+
330
+ &[data-dehydrated] {
331
+ --diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);
332
+ }
333
+
334
+ &:hover [data-code]::-webkit-scrollbar-thumb {
335
+ background-color: var(--diffs-bg-context);
336
+ }
337
+ }
338
+
339
+ @supports (-webkit-touch-callout: none) {
340
+ :host {
341
+ --diffs-scrollbar-gutter-fallback: 0px;
342
+ }
343
+ }
344
+
345
+ [data-line] span {
346
+ color: light-dark(var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark)));
347
+ background-color: light-dark(var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit));
348
+ font-weight: light-dark(var(--diffs-token-light-font-weight, inherit), var(--diffs-token-dark-font-weight, inherit));
349
+ font-style: light-dark(var(--diffs-token-light-font-style, inherit), var(--diffs-token-dark-font-style, inherit));
350
+ text-decoration: light-dark(var(--diffs-token-light-text-decoration, inherit), var(--diffs-token-dark-text-decoration, inherit));
351
+ }
352
+
353
+ [data-line], [data-gutter-buffer], [data-column-number], [data-line-annotation], [data-no-newline], [data-merge-conflict], [data-merge-conflict-actions] {
354
+ --diffs-computed-decoration-bg: var(--diffs-bg);
355
+ --diffs-computed-diff-line-bg: var(--diffs-bg);
356
+ --diffs-computed-selected-line-bg: var(--diffs-bg);
357
+ color: var(--diffs-fg);
358
+ background-color: var(--diffs-line-bg, var(--diffs-bg));
359
+
360
+ @media (pointer: fine) {
361
+ &:where([data-hovered]) {
362
+ --diffs-computed-hovered-line-bg: light-dark(color-mix(in lab,
363
+ var(--diffs-computed-selected-line-bg) 97%,
364
+ var(--diffs-bg-hover-override, var(--diffs-mixer))), color-mix(in lab,
365
+ var(--diffs-computed-selected-line-bg) 91%,
366
+ var(--diffs-bg-hover-override, var(--diffs-mixer))));
367
+ --diffs-line-bg: var(--diffs-computed-hovered-line-bg, inherit);
368
+ }
369
+ }
370
+ }
371
+
372
+ [data-line], [data-no-newline] {
373
+ &[data-decoration-bg] {
374
+ --mix-deco-light: 92%;
375
+ --mix-deco-dark: 85%;
376
+
377
+ &[data-decoration-bg-depth="2"] {
378
+ --mix-deco-light: 88%;
379
+ --mix-deco-dark: 80%;
380
+ }
381
+
382
+ &[data-decoration-bg-depth="3"] {
383
+ --mix-deco-light: 85%;
384
+ --mix-deco-dark: 78%;
385
+ }
386
+
387
+ @media (pointer: fine) {
388
+ &[data-hovered]:not([data-selected-line]) {
389
+ --mix-deco-light: 85%;
390
+ --mix-deco-dark: 85%;
391
+ }
392
+
393
+ &[data-hovered]:not([data-selected-line])[data-decoration-bg-depth="2"] {
394
+ --mix-deco-light: 83%;
395
+ --mix-deco-dark: 83%;
396
+ }
397
+
398
+ &[data-hovered]:not([data-selected-line])[data-decoration-bg-depth="3"] {
399
+ --mix-deco-light: 81%;
400
+ --mix-deco-dark: 81%;
401
+ }
402
+ }
403
+
404
+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
405
+ var(--diffs-bg) var(--mix-deco-light),
406
+ var(--diffs-decoration-bg)), color-mix(in lab,
407
+ var(--diffs-bg) var(--mix-deco-dark),
408
+ var(--diffs-decoration-bg)));
409
+ --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
410
+ --diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
411
+ --diffs-line-bg: var(--diffs-computed-decoration-bg);
412
+ }
413
+ }
414
+
415
+ [data-line-annotation], [data-gutter-buffer="annotation"] {
416
+ --diffs-annotation-bg: var(--diffs-bg-context);
417
+ --diffs-computed-decoration-bg: var(--diffs-annotation-bg);
418
+ --diffs-computed-diff-line-bg: var(--diffs-annotation-bg);
419
+ --diffs-computed-selected-line-bg: var(--diffs-annotation-bg);
420
+ --diffs-line-bg: var(--diffs-annotation-bg);
421
+ }
422
+
423
+ [data-merge-conflict-actions], [data-gutter-buffer="merge-conflict-action"], [data-gutter-buffer="merge-conflict-marker-base"], [data-gutter-buffer="merge-conflict-marker-separator"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"] {
424
+ --diffs-computed-decoration-bg: var(--diffs-bg-context);
425
+ --diffs-computed-diff-line-bg: var(--diffs-bg-context);
426
+ --diffs-computed-selected-line-bg: var(--diffs-bg-context);
427
+ --diffs-line-bg: var(--diffs-bg-context);
428
+ }
429
+
430
+ [data-gutter-buffer="merge-conflict-marker-start"], [data-merge-conflict="marker-start"] {
431
+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
432
+ var(--diffs-bg) 78%,
433
+ var(--conflict-bg-current-header-override, var(--diffs-addition-base))), color-mix(in lab,
434
+ var(--diffs-bg) 68%,
435
+ var(--conflict-bg-current-header-override, var(--diffs-addition-base))));
436
+ --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
437
+ --diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
438
+ --diffs-line-bg: var(--diffs-computed-decoration-bg);
439
+ }
440
+
441
+ [data-gutter-buffer="merge-conflict-marker-end"], [data-merge-conflict="marker-end"] {
442
+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
443
+ var(--diffs-bg) 78%,
444
+ var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))), color-mix(in lab,
445
+ var(--diffs-bg) 68%,
446
+ var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))));
447
+ --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
448
+ --diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
449
+ --diffs-line-bg: var(--diffs-computed-decoration-bg);
450
+ }
451
+
452
+ [data-has-merge-conflict] [data-line-annotation], [data-has-merge-conflict] [data-gutter-buffer="annotation"] {
453
+ --diffs-computed-decoration-bg: var(--diffs-bg);
454
+ --diffs-computed-diff-line-bg: var(--diffs-bg);
455
+ --diffs-computed-selected-line-bg: var(--diffs-bg);
456
+ --diffs-line-bg: var(--diffs-bg);
457
+ }
458
+
459
+ :where([data-background]) {
460
+ & [data-gutter-buffer], & [data-column-number] {
461
+ --mix-light: 91%;
462
+ --mix-dark: 85%;
463
+ }
464
+
465
+ & [data-line], & [data-no-newline] {
466
+ --mix-light: 88%;
467
+ --mix-dark: 80%;
468
+ }
469
+
470
+ & [data-gutter-buffer], & [data-column-number], & [data-line], & [data-no-newline] {
471
+ --diffs-diff-line-mix-target: var(--diffs-bg);
472
+
473
+ &[data-line-type="change-deletion"] {
474
+ --diffs-diff-line-mix-target: var(--diffs-bg-deletion-override, var(--diffs-deletion-base));
475
+
476
+ @media (pointer: fine) {
477
+ &[data-hovered] {
478
+ --mix-light: 80%;
479
+ --mix-dark: 75%;
480
+ }
481
+ }
482
+
483
+ &:where([data-gutter-buffer], [data-column-number]) {
484
+ color: var(--diffs-fg-number-deletion-override, var(--diffs-deletion-base));
485
+ --diffs-diff-line-mix-target: var(--diffs-bg-deletion-number-override, var(--diffs-deletion-base));
486
+ }
487
+
488
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
489
+ var(--diffs-computed-decoration-bg) var(--mix-light),
490
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
491
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
492
+ var(--diffs-diff-line-mix-target)));
493
+ --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
494
+ --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
495
+ }
496
+
497
+ &[data-line-type="change-addition"] {
498
+ --diffs-diff-line-mix-target: var(--diffs-bg-addition-override, var(--diffs-addition-base));
499
+
500
+ @media (pointer: fine) {
501
+ &[data-hovered] {
502
+ --mix-light: 80%;
503
+ --mix-dark: 70%;
504
+ }
505
+ }
506
+
507
+ &:where([data-gutter-buffer], [data-column-number]) {
508
+ color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
509
+ --diffs-diff-line-mix-target: var(--diffs-bg-addition-number-override, var(--diffs-addition-base));
510
+ }
511
+
512
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
513
+ var(--diffs-computed-decoration-bg) var(--mix-light),
514
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
515
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
516
+ var(--diffs-diff-line-mix-target)));
517
+ --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
518
+ --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
519
+ }
520
+
521
+ &[data-merge-conflict="current"] {
522
+ --diffs-diff-line-mix-target: var(--conflict-bg-current-override, var(--diffs-addition-base));
523
+
524
+ &:where([data-gutter-buffer], [data-column-number]) {
525
+ color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
526
+ --diffs-diff-line-mix-target: var(--conflict-bg-current-number-override, var(--diffs-addition-base));
527
+ }
528
+
529
+ @media (pointer: fine) {
530
+ &[data-hovered] {
531
+ --mix-light: 80%;
532
+ --mix-dark: 70%;
533
+ }
534
+ }
535
+
536
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
537
+ var(--diffs-computed-decoration-bg) var(--mix-light),
538
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
539
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
540
+ var(--diffs-diff-line-mix-target)));
541
+ --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
542
+ --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
543
+ }
544
+
545
+ &[data-merge-conflict="incoming"] {
546
+ --diffs-diff-line-mix-target: var(--conflict-bg-incoming-override, var(--diffs-modified-base));
547
+
548
+ &:where([data-gutter-buffer], [data-column-number]) {
549
+ color: var(--diffs-modified-base);
550
+ --diffs-diff-line-mix-target: var(--conflict-bg-incoming-number-override, var(--diffs-modified-base));
551
+ }
552
+
553
+ @media (pointer: fine) {
554
+ &[data-hovered] {
555
+ --mix-light: 80%;
556
+ --mix-dark: 70%;
557
+ }
558
+ }
559
+
560
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
561
+ var(--diffs-computed-decoration-bg) var(--mix-light),
562
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
563
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
564
+ var(--diffs-diff-line-mix-target)));
565
+ --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
566
+ --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
567
+ }
568
+ }
569
+ }
570
+
571
+ [data-gutter-buffer], [data-column-number], [data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline] {
572
+ --diffs-selection-mix-target: var(--diffs-bg-selection-override, var(--diffs-selection-base));
573
+
574
+ &:where([data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline])[data-selected-line] {
575
+ --mix-selection-light: 82%;
576
+ --mix-selection-dark: 75%;
577
+
578
+ @media (pointer: fine) {
579
+ &[data-hovered]:not([data-merge-conflict], [data-line-type="change-addition"], [data-line-type="change-deletion"]) {
580
+ --mix-selection-light: 75%;
581
+ --mix-selection-dark: 70%;
582
+ }
583
+ }
584
+ }
585
+
586
+ &:where([data-gutter-buffer], [data-column-number])[data-selected-line] {
587
+ --mix-selection-light: 75%;
588
+ --mix-selection-dark: 60%;
589
+ --diffs-selection-mix-target: var(--diffs-bg-selection-number-override, var(--diffs-selection-base));
590
+
591
+ @media (pointer: fine) {
592
+ &[data-hovered]:not([data-merge-conflict], [data-line-type="change-addition"], [data-line-type="change-deletion"]) {
593
+ --mix-selection-light: 70%;
594
+ --mix-selection-dark: 55%;
595
+ }
596
+ }
597
+ }
598
+
599
+ &[data-selected-line] {
600
+ --diffs-computed-selected-line-bg: light-dark(color-mix(in lab,
601
+ var(--diffs-computed-diff-line-bg) var(--mix-selection-light),
602
+ var(--diffs-selection-mix-target)), color-mix(in lab,
603
+ var(--diffs-computed-diff-line-bg) var(--mix-selection-dark),
604
+ var(--diffs-selection-mix-target)));
605
+ --diffs-line-bg: var(--diffs-computed-selected-line-bg, inherit);
606
+ }
607
+ }
608
+
609
+ [data-gutter-buffer], [data-column-number] {
610
+ &[data-selected-line] {
611
+ color: var(--diffs-selection-number-fg);
612
+ }
613
+ }
614
+
615
+ [data-no-newline] {
616
+ user-select: none;
617
+
618
+ & span {
619
+ opacity: .6;
620
+ }
621
+ }
622
+
623
+ [data-diff-type="split"][data-overflow="scroll"] {
624
+ grid-template-columns: 1fr 1fr;
625
+ display: grid;
626
+
627
+ & [data-additions] {
628
+ border-left: 1px solid var(--diffs-bg);
629
+ }
630
+
631
+ & [data-deletions] {
632
+ border-right: 1px solid var(--diffs-bg);
633
+ }
634
+ }
635
+
636
+ [data-code] {
637
+ grid-auto-flow: dense;
638
+ grid-template-columns: var(--diffs-code-grid);
639
+ overflow: var(--diffs-overflow-override, scroll) clip;
640
+ overscroll-behavior-x: none;
641
+ tab-size: var(--diffs-tab-size, 2);
642
+ padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));
643
+ padding-bottom: max(0px,
644
+ calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) -
645
+ var(--diffs-scrollbar-gutter)));
646
+ scrollbar-gutter: stable;
647
+ align-self: flex-start;
648
+ display: grid;
649
+ }
650
+
651
+ [data-diffs-scrollbar-measure] {
652
+ opacity: 0;
653
+ pointer-events: none;
654
+ scrollbar-gutter: auto;
655
+ grid-template-columns: none;
656
+ width: 100px;
657
+ height: 100px;
658
+ padding: 0;
659
+ position: absolute;
660
+ top: -200px;
661
+ left: -200px;
662
+ }
663
+
664
+ [data-container-size] {
665
+ container-type: inline-size;
666
+ }
667
+
668
+ [data-code]::-webkit-scrollbar {
669
+ width: 0;
670
+ height: var(--diffs-scrollbar-gutter);
671
+ }
672
+
673
+ [data-code]::-webkit-scrollbar-track {
674
+ background: none;
675
+ }
676
+
677
+ [data-code]::-webkit-scrollbar-thumb {
678
+ background-color: #0000;
679
+ background-clip: content-box;
680
+ border: 1px solid #0000;
681
+ border-radius: 3px;
682
+ }
683
+
684
+ [data-code]::-webkit-scrollbar-corner {
685
+ background-color: #0000;
686
+ }
687
+
688
+ @supports ((-moz-appearance: none)) {
689
+ [data-code] {
690
+ scrollbar-width: thin;
691
+ scrollbar-color: var(--diffs-bg-context) transparent;
692
+ padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));
693
+ }
694
+ }
695
+
696
+ [data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] {
697
+ & [data-code], &[data-overflow="wrap"] {
698
+ padding-top: 0;
699
+ }
700
+ }
701
+
702
+ [data-gutter] {
703
+ grid-template-rows: subgrid;
704
+ grid-template-columns: subgrid;
705
+ z-index: 3;
706
+ background-color: var(--diffs-bg);
707
+ grid-column: 1;
708
+ display: grid;
709
+ position: relative;
710
+
711
+ & [data-gutter-buffer], & [data-column-number] {
712
+ border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));
713
+ }
714
+ }
715
+
716
+ [data-content] {
717
+ grid-template-rows: subgrid;
718
+ grid-template-columns: subgrid;
719
+ background-color: var(--diffs-bg);
720
+ grid-column: 2;
721
+ min-width: 0;
722
+ display: grid;
723
+ }
724
+
725
+ [data-diff-type="split"][data-overflow="wrap"] {
726
+ grid-auto-flow: dense;
727
+ grid-template-columns: repeat(2, var(--diffs-code-grid));
728
+ padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
729
+ display: grid;
730
+
731
+ & [data-deletions] {
732
+ display: contents;
733
+
734
+ & [data-gutter] {
735
+ grid-column: 1;
736
+ }
737
+
738
+ & [data-content] {
739
+ border-right: 1px solid var(--diffs-bg);
740
+ grid-column: 2;
741
+ }
742
+ }
743
+
744
+ & [data-additions] {
745
+ display: contents;
746
+
747
+ & [data-gutter] {
748
+ border-left: 1px solid var(--diffs-bg);
749
+ grid-column: 3;
750
+ }
751
+
752
+ & [data-content] {
753
+ grid-column: 4;
754
+ }
755
+ }
756
+ }
757
+
758
+ [data-overflow="scroll"] [data-gutter] {
759
+ position: sticky;
760
+ left: 0;
761
+ }
762
+
763
+ [data-interactive-lines] [data-line] {
764
+ cursor: pointer;
765
+ }
766
+
767
+ [data-interactive-line-numbers] [data-column-number] {
768
+ cursor: pointer;
769
+ touch-action: none;
770
+ }
771
+
772
+ [data-content-buffer], [data-gutter-buffer] {
773
+ user-select: none;
774
+ min-height: 1lh;
775
+ position: relative;
776
+ }
777
+
778
+ [data-gutter-buffer] {
779
+ padding-left: 2ch;
780
+ padding-right: 1ch;
781
+
782
+ &:before {
783
+ content: "";
784
+ min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
785
+ display: block;
786
+ }
787
+ }
788
+
789
+ [data-gutter-buffer="annotation"] {
790
+ --diffs-annotation-bg: var(--diffs-bg-context-gutter);
791
+ min-height: 0;
792
+ }
793
+
794
+ [data-gutter-buffer="buffer"] {
795
+ --diffs-line-bg: var(--diffs-bg-context-gutter);
796
+ }
797
+
798
+ [data-content-buffer] {
799
+ background-position: 5px 0;
800
+ background-size: 8px 8px;
801
+ background-origin: border-box;
802
+ background-image: repeating-linear-gradient(-45deg,
803
+ transparent,
804
+ transparent calc(3px * 1.414),
805
+ var(--diffs-bg-buffer) calc(3px * 1.414),
806
+ var(--diffs-bg-buffer) calc(4px * 1.414));
807
+ grid-column: 1;
808
+ }
809
+
810
+ [data-separator] {
811
+ box-sizing: content-box;
812
+ background-color: var(--diffs-bg);
813
+ }
814
+
815
+ [data-separator="simple"] {
816
+ min-height: 4px;
817
+ }
818
+
819
+ [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"], [data-separator="simple"] {
820
+ background-color: var(--diffs-bg-separator);
821
+ }
822
+
823
+ [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"] {
824
+ height: 32px;
825
+ position: relative;
826
+ }
827
+
828
+ [data-separator-wrapper] {
829
+ user-select: none;
830
+ fill: currentColor;
831
+ background-color: var(--diffs-bg);
832
+ align-items: center;
833
+ height: 100%;
834
+ display: flex;
835
+ position: absolute;
836
+ inset-inline: 0;
837
+ }
838
+
839
+ [data-content] [data-separator-wrapper] {
840
+ display: none;
841
+ }
842
+
843
+ [data-separator="metadata"] [data-separator-wrapper] {
844
+ background-color: var(--diffs-bg-separator);
845
+ height: 100%;
846
+ color: var(--diffs-fg-number);
847
+ white-space: nowrap;
848
+ text-overflow: ellipsis;
849
+ min-width: min-content;
850
+ padding-inline: 1ch;
851
+ inset-inline: 100% auto;
852
+ overflow: hidden;
853
+ }
854
+
855
+ [data-separator="line-info"] {
856
+ margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
857
+
858
+ & [data-separator-wrapper] {
859
+ min-width: 16px;
860
+ }
861
+ }
862
+
863
+ [data-separator="line-info-basic"], [data-separator="metadata"] {
864
+ margin-block: 0;
865
+ }
866
+
867
+ [data-separator="line-info"][data-separator-first] {
868
+ margin-top: 0;
869
+ }
870
+
871
+ [data-separator="line-info"][data-separator-last] {
872
+ margin-bottom: 0;
873
+ }
874
+
875
+ [data-expand-index] [data-separator-wrapper] {
876
+ grid-template-columns: 32px auto;
877
+ display: grid;
878
+ }
879
+
880
+ [data-expand-index] [data-separator-wrapper][data-separator-multi-button] {
881
+ grid-template-columns: 32px 32px auto;
882
+ }
883
+
884
+ [data-expand-button], [data-separator-content] {
885
+ background-color: var(--diffs-bg-separator);
886
+ flex: none;
887
+ align-items: center;
888
+ display: flex;
889
+ }
890
+
891
+ [data-expand-index] [data-separator-content]:hover {
892
+ cursor: pointer;
893
+ text-decoration: underline;
894
+ }
895
+
896
+ [data-expand-button] {
897
+ cursor: pointer;
898
+ min-width: 32px;
899
+ color: var(--diffs-fg-number);
900
+ border-right: 2px solid var(--diffs-bg);
901
+ flex-shrink: 0;
902
+ justify-content: center;
903
+ align-self: stretch;
904
+
905
+ &:hover {
906
+ color: var(--diffs-fg);
907
+ }
908
+
909
+ &[data-expand-all-button] {
910
+ display: none;
911
+ }
912
+ }
913
+
914
+ [data-expand-down] [data-icon] {
915
+ transform: scaleY(-1);
916
+ }
917
+
918
+ [data-separator-content] {
919
+ height: 100%;
920
+ color: var(--diffs-fg-number);
921
+ flex: auto;
922
+ justify-content: flex-start;
923
+ padding: 0 1ch;
924
+ overflow: hidden;
925
+ }
926
+
927
+ [data-separator="line-info"], [data-separator="line-info-basic"] {
928
+ & [data-separator-content] {
929
+ user-select: none;
930
+ height: 100%;
931
+ overflow: clip;
932
+ }
933
+ }
934
+
935
+ [data-unmodified-lines] {
936
+ text-overflow: ellipsis;
937
+ white-space: nowrap;
938
+ flex: 0 auto;
939
+ min-width: 0;
940
+ display: block;
941
+ overflow: hidden;
942
+ }
943
+
944
+ @supports (width: 1cqi) {
945
+ [data-unified] {
946
+ & [data-separator="line-info"] [data-separator-wrapper] {
947
+ padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));
948
+ width: 100cqi;
949
+
950
+ & [data-separator-content] {
951
+ border-radius: 6px;
952
+ }
953
+ }
954
+
955
+ & [data-separator="line-info"][data-expand-index] [data-separator-wrapper] [data-separator-content] {
956
+ border-top-left-radius: unset;
957
+ border-bottom-left-radius: unset;
958
+ }
959
+ }
960
+
961
+ [data-gutter] {
962
+ & [data-separator="line-info"] [data-separator-wrapper] {
963
+ padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
964
+ }
965
+
966
+ & [data-separator="line-info"] [data-separator-content] {
967
+ border-top-left-radius: 6px;
968
+ border-bottom-left-radius: 6px;
969
+ }
970
+
971
+ & [data-separator="line-info"][data-expand-index] [data-separator-content] {
972
+ border-top-left-radius: unset;
973
+ border-bottom-left-radius: unset;
974
+ }
975
+ }
976
+
977
+ [data-additions] {
978
+ & [data-content] [data-separator="line-info"] {
979
+ background-color: var(--diffs-bg);
980
+
981
+ & [data-separator-wrapper] {
982
+ display: none;
983
+ }
984
+ }
985
+
986
+ & [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
987
+ background-color: var(--diffs-bg-separator);
988
+ border-top-right-radius: 6px;
989
+ border-bottom-right-radius: 6px;
990
+ height: 100%;
991
+ display: block;
992
+
993
+ & [data-separator-content], & [data-expand-button] {
994
+ display: none;
995
+ }
996
+ }
997
+ }
998
+
999
+ [data-overflow="scroll"] [data-additions] [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
1000
+ width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));
1001
+ }
1002
+
1003
+ [data-overflow="wrap"] [data-additions] [data-content] [data-separator="line-info"] [data-separator-wrapper] {
1004
+ background-color: var(--diffs-bg-separator);
1005
+ height: 100%;
1006
+ margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1007
+ border-top-right-radius: 6px;
1008
+ border-bottom-right-radius: 6px;
1009
+ display: block;
1010
+
1011
+ & [data-separator-content], & [data-expand-button] {
1012
+ display: none;
1013
+ }
1014
+ }
1015
+
1016
+ [data-separator="line-info"] [data-separator-wrapper] {
1017
+ & [data-expand-both], & [data-expand-down], & [data-expand-up] {
1018
+ border-top-left-radius: 6px;
1019
+ border-bottom-left-radius: 6px;
1020
+ }
1021
+ }
1022
+
1023
+ @media (pointer: fine) {
1024
+ [data-separator="line-info"] [data-separator-wrapper] {
1025
+ &[data-separator-multi-button] {
1026
+ & [data-expand-up] {
1027
+ border-top-left-radius: 6px;
1028
+ border-bottom-left-radius: unset;
1029
+ }
1030
+
1031
+ & [data-expand-down] {
1032
+ border-bottom-left-radius: 6px;
1033
+ border-top-left-radius: unset;
1034
+ }
1035
+ }
1036
+ }
1037
+ }
1038
+ }
1039
+
1040
+ @media (pointer: coarse) {
1041
+ [data-separator="line-info-basic"] [data-separator-wrapper][data-separator-multi-button] {
1042
+ grid-template-columns: 34px 34px auto;
1043
+
1044
+ & [data-separator-content] {
1045
+ grid-column: unset;
1046
+ grid-row: unset;
1047
+ }
1048
+ }
1049
+
1050
+ @supports (width: 1cqi) {
1051
+ [data-separator="line-info"] [data-separator-wrapper] {
1052
+ & [data-expand-both], & [data-expand-down], & [data-expand-up] {
1053
+ border-top-left-radius: 6px;
1054
+ border-bottom-left-radius: 6px;
1055
+ }
1056
+
1057
+ &[data-separator-multi-button] {
1058
+ & [data-expand-up] {
1059
+ border-top-left-radius: 6px;
1060
+ border-bottom-left-radius: 6px;
1061
+ }
1062
+
1063
+ & [data-expand-down] {
1064
+ border-bottom-left-radius: unset;
1065
+ border-top-left-radius: unset;
1066
+ }
1067
+ }
1068
+ }
1069
+ }
1070
+ }
1071
+
1072
+ @media (pointer: fine) {
1073
+ [data-separator-wrapper][data-separator-multi-button] {
1074
+ grid-template-rows: 50% 50%;
1075
+ display: grid;
1076
+
1077
+ & [data-separator-content] {
1078
+ grid-area: 1 / 2 / -1;
1079
+ min-width: min-content;
1080
+ }
1081
+
1082
+ & [data-expand-button] {
1083
+ grid-column: 1;
1084
+ }
1085
+ }
1086
+
1087
+ [data-separator="line-info"] [data-separator-wrapper], [data-separator="line-info"] [data-separator-wrapper][data-separator-multi-button] {
1088
+ grid-template-columns: 34px auto;
1089
+ }
1090
+
1091
+ [data-separator="line-info-basic"][data-expand-index] [data-separator-wrapper] {
1092
+ grid-template-columns: 100% auto;
1093
+ }
1094
+
1095
+ [data-separator="line-info"], [data-separator="line-info-basic"] {
1096
+ & [data-separator-multi-button] {
1097
+ & [data-expand-up] {
1098
+ border-bottom: 1px solid var(--diffs-bg);
1099
+ border-right: 2px solid var(--diffs-bg);
1100
+ }
1101
+
1102
+ & [data-expand-down] {
1103
+ border-top: 1px solid var(--diffs-bg);
1104
+ border-right: 2px solid var(--diffs-bg);
1105
+ }
1106
+ }
1107
+ }
1108
+ }
1109
+
1110
+ [data-additions] [data-gutter] [data-separator-wrapper], [data-additions] [data-separator="line-info-basic"] [data-separator-wrapper], [data-content] [data-separator-wrapper] {
1111
+ display: none;
1112
+ }
1113
+
1114
+ [data-line-annotation] {
1115
+ min-height: var(--diffs-annotation-min-height, 0);
1116
+ z-index: 2;
1117
+ }
1118
+
1119
+ [data-merge-conflict-actions] {
1120
+ z-index: 2;
1121
+ }
1122
+
1123
+ [data-separator="custom"] {
1124
+ grid-template-columns: subgrid;
1125
+ display: grid;
1126
+ }
1127
+
1128
+ [data-line], [data-column-number], [data-no-newline] {
1129
+ padding-inline: 1ch;
1130
+ position: relative;
1131
+ }
1132
+
1133
+ [data-indicators="classic"] [data-line] {
1134
+ padding-inline-start: 2ch;
1135
+ }
1136
+
1137
+ [data-indicators="classic"] {
1138
+ & [data-line-type="change-addition"], & [data-line-type="change-deletion"] {
1139
+ &[data-no-newline], &[data-line] {
1140
+ &:before {
1141
+ user-select: none;
1142
+ width: 1ch;
1143
+ height: 1lh;
1144
+ display: inline-block;
1145
+ position: absolute;
1146
+ top: 0;
1147
+ left: 0;
1148
+ }
1149
+ }
1150
+ }
1151
+
1152
+ & [data-line-type="change-addition"] {
1153
+ &[data-line], &[data-no-newline] {
1154
+ &:before {
1155
+ content: "+";
1156
+ color: var(--diffs-addition-base);
1157
+ }
1158
+ }
1159
+ }
1160
+
1161
+ & [data-line-type="change-deletion"] {
1162
+ &[data-line], &[data-no-newline] {
1163
+ &:before {
1164
+ content: "-";
1165
+ color: var(--diffs-deletion-base);
1166
+ }
1167
+ }
1168
+ }
1169
+ }
1170
+
1171
+ [data-indicators="bars"] {
1172
+ & [data-line-type="change-deletion"], & [data-line-type="change-addition"] {
1173
+ &[data-column-number] {
1174
+ &:before {
1175
+ content: "";
1176
+ user-select: none;
1177
+ contain: strict;
1178
+ width: 4px;
1179
+ height: 100%;
1180
+ display: block;
1181
+ position: absolute;
1182
+ top: 0;
1183
+ left: 0;
1184
+ }
1185
+ }
1186
+ }
1187
+
1188
+ & [data-line-type="change-deletion"] {
1189
+ &[data-column-number] {
1190
+ &:before {
1191
+ background-image: linear-gradient(0deg,
1192
+ var(--diffs-bg-deletion) 50%,
1193
+ var(--diffs-deletion-base) 50%);
1194
+ background-repeat: repeat;
1195
+ background-size: 2px 2px;
1196
+ background-size: calc(1lh / round(1lh / 2px))
1197
+ calc(1lh / round(1lh / 2px));
1198
+ }
1199
+ }
1200
+ }
1201
+
1202
+ & [data-line-type="change-addition"] {
1203
+ &[data-column-number] {
1204
+ &:before {
1205
+ background-color: var(--diffs-addition-base);
1206
+ }
1207
+ }
1208
+ }
1209
+ }
1210
+
1211
+ [data-overflow="wrap"] {
1212
+ & [data-line], & [data-annotation-content] {
1213
+ white-space: pre-wrap;
1214
+ word-break: break-word;
1215
+ }
1216
+ }
1217
+
1218
+ [data-overflow="scroll"] [data-line] {
1219
+ white-space: pre;
1220
+ min-height: 1lh;
1221
+ }
1222
+
1223
+ [data-column-number] {
1224
+ box-sizing: content-box;
1225
+ text-align: right;
1226
+ user-select: none;
1227
+ color: var(--diffs-fg-number);
1228
+ padding-left: 2ch;
1229
+ }
1230
+
1231
+ [data-line-number-content] {
1232
+ min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
1233
+ z-index: 1;
1234
+ display: inline-block;
1235
+ position: relative;
1236
+ }
1237
+
1238
+ [data-disable-line-numbers] {
1239
+ & [data-gutter-buffer], & [data-column-number] {
1240
+ min-width: 4px;
1241
+ padding: 0;
1242
+
1243
+ &:before {
1244
+ min-width: 0;
1245
+ }
1246
+ }
1247
+
1248
+ & [data-line-number-content] {
1249
+ display: none;
1250
+ }
1251
+
1252
+ & [data-gutter-utility-slot] {
1253
+ right: unset;
1254
+ justify-content: flex-start;
1255
+ left: 0;
1256
+ }
1257
+
1258
+ &[data-indicators="bars"] [data-gutter-utility-slot] {
1259
+ left: 6px;
1260
+ }
1261
+ }
1262
+
1263
+ [data-file][data-disable-line-numbers] {
1264
+ & [data-gutter-buffer], & [data-column-number] {
1265
+ border-right: 0;
1266
+ min-width: 0;
1267
+ }
1268
+ }
1269
+
1270
+ [data-diff-span] {
1271
+ box-decoration-break: clone;
1272
+ border-radius: 3px;
1273
+ }
1274
+
1275
+ [data-line-type="change-addition"] [data-diff-span] {
1276
+ background-color: var(--diffs-bg-addition-emphasis);
1277
+ }
1278
+
1279
+ [data-line-type="change-deletion"] [data-diff-span] {
1280
+ background-color: var(--diffs-bg-deletion-emphasis);
1281
+ }
1282
+
1283
+ [data-merge-conflict="marker-start"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"], [data-merge-conflict="marker-end"] {
1284
+ color: var(--diffs-fg);
1285
+ padding-left: 1ch;
1286
+ }
1287
+
1288
+ [data-merge-conflict="marker-start"], [data-merge-conflict="marker-end"] {
1289
+ align-items: center;
1290
+ display: flex;
1291
+
1292
+ &:after {
1293
+ color: var(--diffs-fg-conflict-marker);
1294
+ font-size: .75rem;
1295
+ font-style: normal;
1296
+ line-height: 1.25rem;
1297
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
1298
+ padding-left: 1ch;
1299
+ }
1300
+ }
1301
+
1302
+ [data-merge-conflict="marker-start"]:after {
1303
+ content: "(Current Change)";
1304
+ }
1305
+
1306
+ [data-merge-conflict="marker-end"]:after {
1307
+ content: "(Incoming Change)";
1308
+ }
1309
+
1310
+ [data-merge-conflict-actions-content] {
1311
+ min-height: 1.75rem;
1312
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
1313
+ color: var(--diffs-fg);
1314
+ align-items: center;
1315
+ gap: .25rem;
1316
+ padding-inline: .5rem;
1317
+ font-size: .75rem;
1318
+ line-height: 1.2;
1319
+ display: flex;
1320
+ }
1321
+
1322
+ [data-merge-conflict-action] {
1323
+ appearance: none;
1324
+ color: var(--diffs-fg-number);
1325
+ font: inherit;
1326
+ cursor: pointer;
1327
+ background: none;
1328
+ border: 0;
1329
+ padding: 0;
1330
+ font-style: normal;
1331
+ }
1332
+
1333
+ [data-merge-conflict-action]:hover {
1334
+ color: var(--diffs-fg);
1335
+ }
1336
+
1337
+ [data-merge-conflict-action="current"]:hover {
1338
+ color: var(--diffs-addition-base);
1339
+ }
1340
+
1341
+ [data-merge-conflict-action="incoming"]:hover {
1342
+ color: var(--diffs-modified-base);
1343
+ }
1344
+
1345
+ [data-merge-conflict-action-separator] {
1346
+ color: var(--diffs-fg-number);
1347
+ opacity: .6;
1348
+ user-select: none;
1349
+ }
1350
+
1351
+ [data-diffs-header="default"] {
1352
+ background-color: var(--diffs-bg);
1353
+ justify-content: space-between;
1354
+ align-items: center;
1355
+ gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1356
+ min-height: calc(1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3));
1357
+ z-index: 2;
1358
+ flex-direction: row;
1359
+ padding-inline: 16px;
1360
+ display: flex;
1361
+ position: relative;
1362
+ top: 0;
1363
+ }
1364
+
1365
+ [data-header-content] {
1366
+ align-items: center;
1367
+ gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1368
+ white-space: nowrap;
1369
+ flex-direction: row;
1370
+ min-width: 0;
1371
+ display: flex;
1372
+ }
1373
+
1374
+ [data-header-content] [data-prev-name], [data-header-content] [data-title] {
1375
+ text-overflow: ellipsis;
1376
+ white-space: nowrap;
1377
+ direction: rtl;
1378
+ min-width: 0;
1379
+ overflow: hidden;
1380
+ }
1381
+
1382
+ [data-prev-name] {
1383
+ opacity: .7;
1384
+ }
1385
+
1386
+ [data-rename-icon] {
1387
+ fill: currentColor;
1388
+ flex-grow: 0;
1389
+ flex-shrink: 0;
1390
+ }
1391
+
1392
+ [data-diffs-header="default"] [data-metadata] {
1393
+ white-space: nowrap;
1394
+ align-items: center;
1395
+ gap: 1ch;
1396
+ display: flex;
1397
+ }
1398
+
1399
+ [data-diffs-header="default"] [data-additions-count] {
1400
+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));
1401
+ color: var(--diffs-addition-base);
1402
+ }
1403
+
1404
+ [data-diffs-header="default"] [data-deletions-count] {
1405
+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));
1406
+ color: var(--diffs-deletion-base);
1407
+ }
1408
+
1409
+ [data-change-icon] {
1410
+ fill: currentColor;
1411
+ flex-shrink: 0;
1412
+ }
1413
+
1414
+ [data-change-icon="change"], [data-change-icon="rename-pure"], [data-change-icon="rename-changed"] {
1415
+ color: var(--diffs-modified-base);
1416
+ }
1417
+
1418
+ [data-change-icon="new"] {
1419
+ color: var(--diffs-addition-base);
1420
+ }
1421
+
1422
+ [data-change-icon="deleted"] {
1423
+ color: var(--diffs-deletion-base);
1424
+ }
1425
+
1426
+ [data-change-icon="file"] {
1427
+ opacity: .6;
1428
+ }
1429
+
1430
+ [data-annotation-content] {
1431
+ z-index: 2;
1432
+ isolation: isolate;
1433
+ align-self: flex-start;
1434
+ min-width: 0;
1435
+ display: flow-root;
1436
+ position: relative;
1437
+ }
1438
+
1439
+ [data-overflow="scroll"] [data-annotation-content], [data-overflow="scroll"] [data-merge-conflict-actions-content] {
1440
+ width: var(--diffs-column-content-width, auto);
1441
+ left: var(--diffs-column-number-width, 0);
1442
+ position: sticky;
1443
+ }
1444
+
1445
+ [data-annotation-slot] {
1446
+ text-wrap-mode: wrap;
1447
+ word-break: normal;
1448
+ white-space-collapse: collapse;
1449
+ }
1450
+
1451
+ [data-gutter-utility-slot] {
1452
+ touch-action: none;
1453
+ justify-content: flex-end;
1454
+ display: flex;
1455
+ position: absolute;
1456
+ top: 0;
1457
+ bottom: 0;
1458
+ right: 0;
1459
+ }
1460
+
1461
+ [data-utility-button] {
1462
+ appearance: none;
1463
+ cursor: pointer;
1464
+ width: 1lh;
1465
+ height: 1lh;
1466
+ font-size: var(--diffs-font-size, 13px);
1467
+ line-height: var(--diffs-line-height, 20px);
1468
+ background-color: var(--diffs-modified-base);
1469
+ color: var(--diffs-bg);
1470
+ fill: currentColor;
1471
+ z-index: 4;
1472
+ touch-action: none;
1473
+ border: none;
1474
+ border-radius: 4px;
1475
+ justify-content: center;
1476
+ align-items: center;
1477
+ margin-right: calc(-1lh + 1ch);
1478
+ padding: 0;
1479
+ display: flex;
1480
+ position: relative;
1481
+
1482
+ &:before {
1483
+ content: "";
1484
+ display: block;
1485
+ position: absolute;
1486
+ inset: 0 0 0 -4px;
1487
+ }
1488
+ }
1489
+
1490
+ [data-decoration-bar-stack] {
1491
+ pointer-events: none;
1492
+ isolation: isolate;
1493
+ z-index: 1;
1494
+ background-color: var(--diffs-decoration-bar-color, transparent);
1495
+ box-sizing: content-box;
1496
+ border-left: 2px solid var(--diffs-bg);
1497
+ border-right: 2px solid var(--diffs-bg);
1498
+ width: 6px;
1499
+ position: absolute;
1500
+ top: 0;
1501
+ bottom: 0;
1502
+ right: -2px;
1503
+
1504
+ [data-decoration-bar-depth="1"] & {
1505
+ background-color: color-mix(in lab,
1506
+ var(--diffs-bg) 20%,
1507
+ var(--diffs-decoration-bar-color, transparent));
1508
+ }
1509
+
1510
+ [data-decoration-bar-depth="2"] & {
1511
+ background-color: color-mix(in lab,
1512
+ var(--diffs-bg) 45%,
1513
+ var(--diffs-decoration-bar-color, transparent));
1514
+ }
1515
+
1516
+ [data-decoration-bar-depth="3"] & {
1517
+ background-color: color-mix(in lab,
1518
+ var(--diffs-bg) 65%,
1519
+ var(--diffs-decoration-bar-color, transparent));
1520
+ }
1521
+
1522
+ [data-decoration-bar-start] & {
1523
+ border-top-left-radius: 5px;
1524
+ border-top-right-radius: 5px;
1525
+ }
1526
+
1527
+ [data-decoration-bar-end] & {
1528
+ z-index: 3;
1529
+ border-bottom-right-radius: 5px;
1530
+ border-bottom-left-radius: 5px;
1531
+ }
1532
+ }
1533
+
1534
+ [data-placeholder] {
1535
+ contain: strict;
1536
+ }
1537
+
1538
+ [data-error-wrapper] {
1539
+ padding: var(--diffs-gap-block, var(--diffs-gap-fallback))
1540
+ var(--diffs-gap-inline, var(--diffs-gap-fallback));
1541
+ scrollbar-width: none;
1542
+ max-height: 400px;
1543
+ overflow: auto;
1544
+
1545
+ & [data-error-message] {
1546
+ color: var(--diffs-deletion-base);
1547
+ font-size: 18px;
1548
+ font-weight: bold;
1549
+ }
1550
+
1551
+ & [data-error-stack] {
1552
+ color: var(--diffs-fg-number);
1553
+ }
1554
+ }
1555
+ }
1556
+
1557
+ @layer theme, rendered, unsafe;
1558
+ `;const j1="@layer base, theme, rendered, unsafe;",$M=new RegExp(`${XM(E1)}\\s*:\\s*[^;]+;`);function FM(e){return`${j1}
1559
+ @layer unsafe {
1560
+ ${e}
1561
+ }`}function qM(e,t="system",i){return`${j1}
1562
+ @layer rendered {
1563
+ :host {${t==="system"?"":`
1564
+ color-scheme: ${t};`}
1565
+ ${V1(i)}
1566
+ ${e}
1567
+ }
1568
+ }`}function YM(e,t){const i=V1(t);return e.replace($M,i)}function XM(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Nd({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 QM({shadowRoot:e,currentNode:t,themeCSS:i}){if(i.trim()===""){t?.remove();return}return t??=ZM(),t.textContent=i,t.parentNode!==e&&e.appendChild(t),t}function ZM(){const e=document.createElement("style");return e.setAttribute(DN,""),e}function KM(e,t){if(t==null)return;const i=e.shadowRoot??e.attachShadow({mode:"open"});i.innerHTML===""&&(i.innerHTML=t)}function WM(e,{type:t,diffIndicators:i,disableBackground:a,disableLineNumbers:o,overflow:s,split:c,totalLines:d,customProperties:f}){if(f!=null)for(const h in f){const y=f[h];y!=null&&e.setAttribute(h,`${y}`)}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.style.setProperty("--diffs-min-number-column-width-default",`${`${d}`.length}ch`),e}if(typeof HTMLElement<"u"&&customElements.get("diffs-container")==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(GM)),a.adoptedStyleSheets=[e]}connectedCallback(){gh(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define(b1,t)}function JM({fileDiff:e,metrics:t,disableFileHeader:i,hunkSeparators:a,expandUnchanged:o,expandedHunks:s,collapsedContextThreshold:c}){let d=ka(t,i),f=d;const h=o?!0:s,y=e.hunks.length-1;for(let m=0;m<e.hunks.length;m++){const b=e.hunks[m];if(b==null)throw new Error("computeEstimatedDiffHeights: invalid hunk index");const v=lo({isPartial:e.isPartial,rangeSize:b.collapsedBefore,expandedHunks:h,hunkIndex:m,collapsedContextThreshold:c}),S=(v.fromStart+v.fromEnd)*t.lineHeight;if(d+=S,f+=S,v.collapsedLines>0){const C=Gl({type:a,metrics:t,hunkIndex:m,hunkSpecs:b.hunkSpecs})?.totalHeight??0;d+=C,f+=C}d+=b.splitLineCount*t.lineHeight,f+=b.unifiedLineCount*t.lineHeight;const k=e8(b);d+=k.split*t.lineHeight,f+=k.unified*t.lineHeight;const D=m===y?oo({fileDiff:e,hunkIndex:m,expandedHunks:h,collapsedContextThreshold:c,errorPrefix:"computeEstimatedDiffHeights"}):void 0;if(D!=null){const C=(D.fromStart+D.fromEnd)*t.lineHeight;if(d+=C,f+=C,D.collapsedLines>0){const w=$l({type:a,metrics:t})?.totalHeight??0;d+=w,f+=w}}}if(e.hunks.length>0){const m=M1(t);d+=m,f+=m}return{splitHeight:d,unifiedHeight:f}}function e8(e){if(!e.noEOFCRAdditions&&!e.noEOFCRDeletions)return{split:0,unified:0};const t=e.hunkContent.at(-1);if(t==null)return{split:0,unified:0};if(t.type==="context"){const i=t.lines>0?1:0;return{split:i,unified:i}}return t8(e,t)}function t8(e,t){const i=(t.deletions>0&&e.noEOFCRDeletions?1:0)+(t.additions>0&&e.noEOFCRAdditions?1:0),a=t.deletions>0&&e.noEOFCRDeletions,o=t.additions>0&&e.noEOFCRAdditions;return{split:a||o?1:0,unified:i}}const n8=new TextEncoder,i8=new TextDecoder("utf-8",{ignoreBOM:!0}),r8=/[\uD800-\uDFFF]/,yh=1024;let Aa=new Uint8Array(yh);function G1(){Aa.length!==yh&&(Aa=new Uint8Array(yh))}function bt(e){if(e.length===0)return e;if(r8.test(e))return JSON.parse(JSON.stringify(e));const t=e.length*3;Aa.length<t&&(Aa=new Uint8Array(t));const{written:i}=n8.encodeInto(e,Aa);return i8.decode(Aa.subarray(0,i))}function a8(e,t,i){try{return l8(e,t,i)}finally{G1()}}function l8(e,t,i=!1){const a=g8(e),o=a?c8(e):f8(e);let s;const c=[];for(const d of o){if(a&&!v1.test(d)){if(s==null)s=bt(d);else{if(i)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",d)}continue}else if(!a&&!d8(d)){if(s==null)s=bt(d);else{if(i)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",d)}continue}const f=$1(d,{cacheKey:t!=null?`${t}-${c.length}`:void 0,isGitDiff:a,throwOnError:i});f!=null&&c.push(f)}return{patchMetadata:s,files:c}}function o8(e,t){try{return $1(e,t)}finally{G1()}}function $1(e,{cacheKey:t,isGitDiff:i=v1.test(e),oldFile:a,newFile:o,throwOnError:s=!1}={}){let c=0;const d=X1(e,"@@ ");let f;const h=a==null||o==null;let y=0,m=0;for(const b of d){const v=F1(b),S=v[0];if(S==null){if(s)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",b);continue}const k=Y1(S);let D=0,C=0;if(k==null||f==null){if(f!=null){if(s)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",b);continue}f={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:h,additionLines:!h&&a!=null&&o!=null?ov(o.contents):[],deletionLines:!h&&a!=null&&o!=null?ov(a.contents):[],cacheKey:cv(t)},f.additionLines.length===1&&o?.contents===""&&(f.additionLines.length=0),f.deletionLines.length===1&&a?.contents===""&&(f.deletionLines.length=0);for(const ne of v){if(ne.startsWith("diff --git")){const W=ne.trim().match(LN),F=W?.[1]??W?.[2],J=W?.[3]??W?.[4];if(F==null||J==null){if(s)throw Error("parsePatchContent: invalid git diff header");console.error("parsePatchContent: invalid git diff header",ne);continue}f.name=bt(J.trim()),F!==J&&(f.prevName=bt(F.trim()));continue}const ae=ne.startsWith("---")||ne.startsWith("+++")?ne.match(i?AN:TN):null;if(ae!=null){const[,W,F]=ae;if(W==="---"&&F!=="/dev/null"){const J=bt(F.trim());f.prevName=J,f.name=J}else W==="+++"&&F!=="/dev/null"&&(f.name=bt(F.trim()))}else if(i){if(ne.startsWith("new mode ")&&(f.mode=bt(ne.slice(8).trim())),ne.startsWith("old mode ")&&(f.prevMode=bt(ne.slice(8).trim())),ne.startsWith("new file mode")&&(f.type="new",f.mode=bt(ne.slice(13).trim())),ne.startsWith("deleted file mode")&&(f.type="deleted",f.mode=bt(ne.slice(17).trim())),ne.startsWith("similarity index")&&(ne.startsWith("similarity index 100%")?f.type="rename-pure":f.type="rename-changed"),ne.startsWith("index ")){const[,W,F,J]=ne.trim().match(RN)??[];W!=null&&(f.prevObjectId=bt(W)),F!=null&&(f.newObjectId=bt(F)),J!=null&&(f.mode=bt(J))}ne.startsWith("rename from ")&&(f.prevName=bt(ne.slice(12).trim())),ne.startsWith("rename to ")&&(f.name=bt(ne.slice(10).trim()))}}continue}let w,T;for(;v.length>0&&(v[v.length-1]===`
1569
+ `||v[v.length-1]==="\r"||v[v.length-1]===`\r
1570
+ `||v[v.length-1]==="");)v.pop();const{additionStart:I,deletionStart:B}=k;y=h?y:B-1,m=h?m:I-1;const R={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:k.additionCount,additionStart:I,additionLines:D,deletionCount:k.deletionCount,deletionStart:B,deletionLines:C,deletionLineIndex:y,additionLineIndex:m,hunkContent:[],hunkContext:cv(k.hunkContext),hunkSpecs:bt(S),noEOFCRAdditions:!1,noEOFCRDeletions:!1};let U=0,ie=0;for(let ne=1;ne<v.length;ne++){const ae=v[ne];if(U>=R.additionCount&&ie>=R.deletionCount&&!ae.startsWith("\\")){if(s&&h8(ae)&&!p8(ae))throw Error("parsePatchContent: hunk has more lines than expected");break}const W=ae[0];if(W!=="+"&&W!=="-"&&W!==" "&&W!=="\\"){if(s)throw Error("parsePatchContent: invalid hunk line");console.error(`parseLineType: Invalid firstChar: "${W}", full line: "${ae}"`),console.error("processFile: invalid rawLine:",ae);continue}const F=y8(W);if(F==="addition"){if(s&&U>=R.additionCount)throw Error("parsePatchContent: hunk has too many addition lines");const J=Od(ae);(w==null||w.type!=="change")&&(w=Md("change",y,m),R.hunkContent.push(w)),m++,U++,h&&f.additionLines.push(J),w.additions++,D++,T="addition"}else if(F==="deletion"){if(s&&ie>=R.deletionCount)throw Error("parsePatchContent: hunk has too many deletion lines");const J=Od(ae);(w==null||w.type!=="change")&&(w=Md("change",y,m),R.hunkContent.push(w)),y++,ie++,h&&f.deletionLines.push(J),w.deletions++,C++,T="deletion"}else if(F==="context"){if(s&&(ie>=R.deletionCount||U>=R.additionCount))throw Error("parsePatchContent: hunk has too many context lines");const J=Od(ae);(w==null||w.type!=="context")&&(w=Md("context",y,m),R.hunkContent.push(w)),m++,y++,U++,ie++,h&&(f.deletionLines.push(J),f.additionLines.push(J)),w.lines++,T="context"}else if(F==="metadata"&&w!=null){if(w.type==="context"?(R.noEOFCRAdditions=!0,R.noEOFCRDeletions=!0):T==="deletion"?R.noEOFCRDeletions=!0:T==="addition"&&(R.noEOFCRAdditions=!0),h&&(T==="addition"||T==="context")){const J=f.additionLines.length-1;J>=0&&(f.additionLines[J]=Ia(f.additionLines[J]))}if(h&&(T==="deletion"||T==="context")){const J=f.deletionLines.length-1;J>=0&&(f.deletionLines[J]=Ia(f.deletionLines[J]))}}}if(s&&(U!==R.additionCount||ie!==R.deletionCount))throw Error("parsePatchContent: hunk line count mismatch");R.additionLines=D,R.deletionLines=C,R.collapsedBefore=Math.max(R.additionStart-1-c,0),f.hunks.push(R),c=R.additionStart+R.additionCount-1;for(const ne of R.hunkContent)ne.type==="context"?(R.splitLineCount+=ne.lines,R.unifiedLineCount+=ne.lines):(R.splitLineCount+=Math.max(ne.additions,ne.deletions),R.unifiedLineCount+=ne.deletions+ne.additions);R.splitLineStart=f.splitLineCount+R.collapsedBefore,R.unifiedLineStart=f.unifiedLineCount+R.collapsedBefore,f.splitLineCount+=R.collapsedBefore+R.splitLineCount,f.unifiedLineCount+=R.collapsedBefore+R.unifiedLineCount}if(f!=null){if(s&&h&&!i&&f.hunks.length===0)throw Error("parsePatchContent: unified file has no hunks");if(f.hunks.length>0&&!h&&f.additionLines.length>0&&f.deletionLines.length>0){const b=f.hunks[f.hunks.length-1],v=b.additionStart+b.additionCount-1,S=f.additionLines.length,k=Math.max(S-v,0);f.splitLineCount+=k,f.unifiedLineCount+=k}return i||(f.prevName!=null&&f.name!==f.prevName?f.hunks.length>0?f.type="rename-changed":f.type="rename-pure":(a==null||a.contents==="")&&o!=null&&o.contents!==""?f.type="new":a!=null&&a.contents!==""&&(o==null||o.contents==="")&&(f.type="deleted")),f.type!=="rename-pure"&&f.type!=="rename-changed"&&(f.prevName=void 0),f}}function s8(e,t,i=!1){const a=[],o=u8(e)?e.split(kN):[e];for(const s of o)try{a.push(a8(s,t!=null?`${t}-${a.length}`:void 0,i))}catch(c){if(i)throw c;console.error(c)}return a}function u8(e){return e.startsWith("From ")||e.includes(`
1571
+ From `)}function ov(e){const t=F1(e);for(let i=0;i<t.length;i++)t[i]=bt(t[i]);return t}function F1(e){if(e.length===0)return[""];const t=[];let i=0;for(;;){const a=e.indexOf(`
1572
+ `,i);if(a===-1)break;t.push(e.slice(i,a+1)),i=a+1}return i<e.length&&t.push(e.slice(i)),t}function c8(e){return X1(e,"diff --git")}function f8(e){if(e.length===0)return[""];const t=[];let i=0,a=0,o=0,s=0,c=!1;for(;a<e.length;){const d=bh(e,a);if(o<=0&&s<=0){if(q1(e,a)){a>i&&t.push(e.slice(i,a)),i=a,c=!0,a=bh(e,d);continue}if(c&&e.startsWith("@@ -",a)){const h=Y1(e.slice(a,d));h!=null&&(o=h.deletionCount,s=h.additionCount)}a=d;continue}const f=e[a];if(f==="\\"){a=d;continue}f===" "?(o=Math.max(o-1,0),s=Math.max(s-1,0)):f==="-"?o=Math.max(o-1,0):f==="+"&&(s=Math.max(s-1,0)),a=d}return t.push(e.slice(i)),t}function d8(e){return q1(e,0)}function q1(e,t){const i=bh(e,t);return sv(e,t,"---")&&sv(e,i,"+++")}function sv(e,t,i){if(!e.startsWith(i,t))return!1;const a=e[t+i.length];if(a!==" "&&a!==" ")return!1;for(let o=t+i.length+1;o<e.length;o++){const s=e[o];if(s===`
1573
+ `||s==="\r")break;if(s!==" "&&s!==" ")return!0}return!1}function bh(e,t){const i=e.indexOf(`
1574
+ `,t);return i===-1?e.length:i+1}function h8(e){const t=e[0];return t==="+"||t==="-"||t===" "}function p8(e){if(!e.startsWith("--"))return!1;for(let t=2;t<e.length;t++){const i=e[t];if(i!==" "&&i!==" "&&i!==`
1575
+ `&&i!=="\r")return!1}return!0}function Y1(e){if(!e.startsWith("@@ -"))return;let t=4;const i=Gs(e,t);if(i==null)return;const a=i.value;t=i.endIndex;let o=1;if(e[t]===","){const y=Gs(e,t+1);if(y==null)return;o=y.value,t=y.endIndex}if(e[t]!==" "||e[t+1]!=="+")return;t+=2;const s=Gs(e,t);if(s==null)return;const c=s.value;t=s.endIndex;let d=1;if(e[t]===","){const y=Gs(e,t+1);if(y==null)return;d=y.value,t=y.endIndex}if(e[t]!==" "||e[t+1]!=="@"||e[t+2]!=="@")return;let f;const h=t+3;return e[h]===" "&&(f=m8(e.slice(h+1))),{additionCount:d,additionStart:c,deletionCount:o,deletionStart:a,hunkContext:f}}function Gs(e,t){let i=t,a=0;for(;i<e.length;i++){const o=e.charCodeAt(i)-48;if(o<0||o>9)break;a=a*10+o}if(i!==t)return{value:a,endIndex:i}}function m8(e){return e.endsWith(`\r
1576
+ `)?e.slice(0,-2):e.endsWith(`
1577
+ `)?e.slice(0,-1):e}function g8(e){return e.startsWith("diff --git")||e.includes(`
1578
+ diff --git`)}function X1(e,t){if(e.length===0)return[""];const i=`
1579
+ ${t}`,a=e.startsWith(t)?0:uv(e,i,0);if(a===-1)return[e];const o=[];a>0&&o.push(e.slice(0,a));let s=a;for(;;){const c=uv(e,i,s+1);if(c===-1)break;o.push(e.slice(s,c)),s=c}return o.push(e.slice(s)),o}function uv(e,t,i){const a=e.indexOf(t,i);return a===-1?-1:a+1}function cv(e){return e==null?e:bt(e)}function y8(e){return e===" "?"context":e==="\\"?"metadata":e==="+"?"addition":"deletion"}function Od(e){const t=e.slice(1);return bt(t===""?`
1580
+ `:t)}function Md(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 vh(e,t,i,a=!1){const o=o8(nM(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}var b8=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 Fs(e){return Re({tagName:"div",children:[Re({tagName:"span",children:[Qn("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":e,"data-column-content":""}})}function Id(e){return Re({tagName:"div",children:[hu({name:e==="both"?"diffs-icon-expand-all":"diffs-icon-expand",properties:{"data-icon":""}})],properties:{role:"button","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 Ea({type:e,content:t,expandIndex:i,chunked:a=!1,slotName:o,isFirstHunk:s,isLastHunk:c}){let d=0;const f=[];if(e==="metadata"&&t!=null&&f.push(Re({tagName:"div",children:[Qn(t)],properties:{"data-separator-wrapper":""}})),(e==="line-info"||e==="line-info-basic")&&t!=null){const h=[];i!=null&&(a?(s||(h.push(Id("up")),d++),c||(h.push(Id("down")),d++)):(h.push(Id(!s&&!c?"both":s?"down":"up")),d++)),h.push(Re({tagName:"div",children:[Re({tagName:"span",children:[Qn(t)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),a&&i!=null&&h.push(Re({tagName:"div",children:[Qn("Expand all")],properties:{role:"button","data-expand-button":"","data-expand-all-button":""}})),f.push(Re({tagName:"div",children:h,properties:{"data-separator-wrapper":"","data-separator-multi-button":d>1?"":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 v8(e,t){return`hunk-separator-${e}-${t}`}function _8(e){const t=e.at(-1);return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}function S8(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}let E8=-1;var x8=class{options;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++E8}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;constructor(e={theme:wn},t,i){this.options=e,this.onRenderUpdate=t,this.workerManager=i,i?.isWorkingPool()!==!0&&(this.highlighter=Dd(e.theme??wn)?bO():void 0)}cleanUp(){this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this)}clearRenderCache(){this.renderCache=void 0}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.clearRenderCache(),this.expandedHunks.set(e,a)}getExpandedHunk(e){return this.expandedHunks.get(e)??zN}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=>TM(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:d=!1,collapsedContextThreshold:f=1,expansionLineCount:h=100,hunkSeparators:y="line-info",lineDiffType:m="word-alt",maxLineDiffLength:b=1e3,overflow:v="scroll",stickyHeader:S=!1,theme:k=wn,headerRenderMode:D="default",tokenizeMaxLineLength:C=1e3,tokenizeMaxLength:w=MN,useTokenTransformer:T=!1,useCSSClasses:I=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:i,disableFileHeader:a,disableLineNumbers:o,disableVirtualizationBuffers:s,collapsed:c,expandUnchanged:d,collapsedContextThreshold:f,expansionLineCount:h,hunkSeparators:y,lineDiffType:m,maxLineDiffLength:b,overflow:v,stickyHeader:S,theme:this.workerManager?.getDiffRenderOptions().theme??k,headerRenderMode:D,tokenizeMaxLineLength:C,tokenizeMaxLength:w,useTokenTransformer:T,useCSSClasses:I}}async initializeHighlighter(){return this.highlighter=await D1(IM(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;const{options:t}=this.getRenderOptions(e),i=Hd(e,this.getTokenizeMaxLength());let a=this.workerManager?.getDiffResultCache(e);a!=null&&!Bl(t,a.options)&&(a=void 0),this.renderCache??={diff:e,highlighted:!i&&!hh(e),options:t,result:i?void 0:a?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!i&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter==null&&(this.computedLang=e.lang??tr(e.name),this.initializeHighlighter())}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:zM(this.options),tokenizeMaxLineLength:o,lineDiffType:s,maxLineDiffLength:c}})();this.getOptionsWithDefaults();const{renderCache:i}=this;return i?.result==null?{options:t,forceHighlight:!0}:!jl(e,i.diff)||!Bl(t,i.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}renderDiff(e=this.renderCache?.diff,t=zb){if(e==null)return;const{expandUnchanged:i=!1,collapsedContextThreshold:a}=this.getOptionsWithDefaults();let{options:o,forceHighlight:s}=this.getRenderOptions(e);const c=this.getMatchingWorkerResultCache(e,o);c!=null&&!this.hasHighlightedRenderCache(e,o)&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...c},s=!1),this.renderCache??={diff:e,highlighted:!1,options:o,result:void 0,renderRange:void 0};const d=e.additionLines.length>0||e.deletionLines.length>0,f=!d||hh(e)||Hd(e,this.getTokenizeMaxLength()),h=!jl(e,this.renderCache.diff),y=!B1(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0)(f||this.renderCache.result==null||!this.renderCache.highlighted&&(h||y))&&(this.renderCache.diff=e,this.renderCache.options=o,this.renderCache.highlighted=!1,(this.renderCache.result==null||h||y||s)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,S8(t)||i?!0:this.expandedHunks,a)),this.renderCache.renderRange=t),!f&&d&&(!this.renderCache.highlighted||s)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??tr(e.name);const m=this.highlighter!=null&&Dd(o.theme),b=this.highlighter!=null&&av(this.computedLang),v=!f&&b;if(this.highlighter!=null&&m&&(s||f||!this.renderCache.highlighted&&v||this.renderCache.result==null)){const{result:S,options:k}=this.renderDiffWithHighlighter(e,this.highlighter,f||!b);this.renderCache={diff:e,options:k,highlighted:v,result:S,renderRange:void 0}}(!m||!f&&!b)&&this.asyncHighlight(e).then(({result:S,options:k})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,S,k,!f)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,t,this.renderCache.result):void 0}async asyncRender(e,t=zb){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 OM({type:"diff",diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:e,totalLines:t,customProperties:i})}async asyncHighlight(e){const t=Hd(e,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??tr(e.name);const i=this.highlighter!=null&&Dd(this.options.theme??wn),a=t||this.highlighter!=null&&av(this.computedLang);return(this.highlighter==null||!i||!a)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,i=!1){const{options:a}=this.getRenderOptions(e),{collapsedContextThreshold:o}=this.getOptionsWithDefaults();return{result:aM(e,t,a,{forcePlainText:i,expandedHunks:i?!0:void 0,collapsedContextThreshold:o}),options:a}}onHighlightSuccess(e,t,i,a=!0){if(this.renderCache==null)return;const o=!this.renderCache.highlighted||!Bl(this.renderCache.options,i)||!jl(this.renderCache.diff,e);this.renderCache={diff:e,options:i,highlighted:a,result:t,renderRange:void 0},o&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){const i=this.workerManager?.getDiffResultCache(e);if(!(i==null||!Bl(t,i.options)))return i}hasHighlightedRenderCache(e,t){const{renderCache:i}=this;return i?.result!=null&&i.highlighted&&jl(e,i.diff)&&Bl(t,i.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(e,t,{code:i,themeStyles:a,baseThemeType:o}){const{diffStyle:s,disableFileHeader:c,expandUnchanged:d,expansionLineCount:f,collapsedContextThreshold:h,hunkSeparators:y}=this.getOptionsWithDefaults();this.diff=e;const m=s==="unified";let b=[],v=[],S=[];const k=[],{additionLines:D,deletionLines:C}=i,w={rowCount:0,hunkSeparators:y,additionsContentAST:b,deletionsContentAST:v,unifiedContentAST:S,unifiedGutterAST:zs(),deletionsGutterAST:zs(),additionsGutterAST:zs(),expansionLineCount:f,hunkData:k,incrementRowCount(J=1){w.rowCount+=J},pushToGutter(J,K){switch(J){case"unified":w.unifiedGutterAST.children.push(K);break;case"deletions":w.deletionsGutterAST.children.push(K);break;case"additions":w.additionsGutterAST.children.push(K);break}}},T=I1({fileDiff:e,errorPrefix:"DiffHunksRenderer.processDiffResult"}),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"?(w.pushToGutter("additions",Dn(void 0,"buffer",this.size)),b?.push($s(this.size))):(w.pushToGutter("deletions",Dn(void 0,"buffer",this.size)),v?.push($s(this.size))),this.size=0,this.side=void 0}}},B=(J,K,Y,H,q)=>{w.pushToGutter(J,EO(K,Y,H,q))};function R(J){I.flush(),s==="unified"?zd("unified",J,w):(zd("deletions",J,w),zd("additions",J,w))}this.pushFileLevelAnnotations(e,s,t,w),Kl({diff:e,diffStyle:s,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:d?!0:this.expandedHunks,collapsedContextThreshold:h,callback:({hunkIndex:J,hunk:K,collapsedBefore:Y,collapsedAfter:H,additionLine:q,deletionLine:oe,type:de})=>{const L=oe!=null?oe.splitLineIndex:q.splitLineIndex,O=q!=null?q.unifiedLineIndex:oe.unifiedLineIndex;s==="split"&&de!=="change"&&I.flush(),Y>0&&R({hunkIndex:J,collapsedLines:Y,rangeSize:Math.max(K?.collapsedBefore??0,0),hunkSpecs:K?.hunkSpecs,isFirstHunk:J===0,isLastHunk:!1,isExpandable:!e.isPartial});const X=s==="unified"?O:L,A={type:de,hunkIndex:J,lineIndex:X,unifiedLineIndex:O,splitLineIndex:L,deletionLine:oe,additionLine:q};if(s==="unified"){const ge=this.getUnifiedInjectedRowsForLine?.(A);ge?.before!=null&&hv(ge.before,w);let He=oe!=null?C[oe.lineIndex]:void 0,$e=q!=null?D[q.lineIndex]:void 0;if(He==null&&$e==null){const We="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(We,{file:e.name}),new Error(We)}const At=de==="change"?q!=null?"change-addition":"change-deletion":de,Et=this.getUnifiedLineDecoration({type:de,lineType:At,additionLineIndex:q?.lineIndex,deletionLineIndex:oe?.lineIndex});B("unified",Et.gutterLineType,q!=null?q.lineNumber:oe.lineNumber,`${O},${L}`,Et.gutterProperties),$e!=null?$e=Ys($e,Et.contentProperties):He!=null&&(He=Ys(He,Et.contentProperties)),qs({diffStyle:"unified",type:de,deletionLine:He,additionLine:$e,unifiedSpan:this.getAnnotations("unified",oe?.lineNumber,q?.lineNumber,J,X),createAnnotationElement:We=>this.createAnnotationElement(We),context:w}),ge?.after!=null&&hv(ge.after,w)}else{const ge=this.getSplitInjectedRowsForLine?.(A);ge?.before!=null&&pv(ge.before,w,I);let He=oe!=null?C[oe.lineIndex]:void 0,$e=q!=null?D[q.lineIndex]:void 0;const At=this.getSplitLineDecoration({side:"deletions",type:de,lineIndex:oe?.lineIndex}),Et=this.getSplitLineDecoration({side:"additions",type:de,lineIndex:q?.lineIndex});if(He==null&&$e==null){const rt="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(rt,{file:e.name}),new Error(rt)}const We=(()=>{if(de==="change"){if($e==null)return"additions";if(He==null)return"deletions"}})();if(We!=null){if(I.side!=null&&I.side!==We)throw new Error("DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits");I.side=We,I.increment()}const jt=this.getAnnotations("split",oe?.lineNumber,q?.lineNumber,J,X);if(jt!=null&&I.size>0&&I.flush(),oe!=null){const rt=Ys(He,At.contentProperties);B("deletions",At.gutterLineType,oe.lineNumber,`${oe.unifiedLineIndex},${L}`,At.gutterProperties),rt!=null&&(He=rt)}if(q!=null){const rt=Ys($e,Et.contentProperties);B("additions",Et.gutterLineType,q.lineNumber,`${q.unifiedLineIndex},${L}`,Et.gutterProperties),rt!=null&&($e=rt)}qs({diffStyle:"split",type:de,additionLine:$e,deletionLine:He,...jt,createAnnotationElement:rt=>this.createAnnotationElement(rt),context:w}),ge?.after!=null&&pv(ge.after,w,I)}const ce=s==="split"&&K!=null&&L===K.splitLineStart+K.splitLineCount-1,me=ce?K.noEOFCRDeletions:!1,he=ce?K.noEOFCRAdditions:!1,Ee=(oe?.noEOFCR??!1)||me,ze=(q?.noEOFCR??!1)||he;if(ze||Ee){if(s==="split"&&I.flush(),Ee){const ge=de==="context"||de==="context-expanded"?de:"change-deletion";s==="unified"?(w.unifiedContentAST.push(Fs(ge)),w.pushToGutter("unified",Dn(ge,"metadata",1))):(w.deletionsContentAST.push(Fs(ge)),w.pushToGutter("deletions",Dn(ge,"metadata",1)),ze||(w.pushToGutter("additions",Dn(void 0,"buffer",1)),w.additionsContentAST.push($s(1))))}if(ze){const ge=de==="context"||de==="context-expanded"?de:"change-addition";s==="unified"?(w.unifiedContentAST.push(Fs(ge)),w.pushToGutter("unified",Dn(ge,"metadata",1))):(w.additionsContentAST.push(Fs(ge)),w.pushToGutter("additions",Dn(ge,"metadata",1)),Ee||(w.pushToGutter("deletions",Dn(void 0,"buffer",1)),w.deletionsContentAST.push($s(1))))}w.incrementRowCount(1)}H>0&&y!=="simple"&&R({hunkIndex:de==="context-expanded"?J:J+1,collapsedLines:H,rangeSize:T,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),w.incrementRowCount(1)}}),s==="split"&&I.flush();const U=Math.max(_8(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),ie=t.bufferBefore>0||t.bufferAfter>0,ne=!m&&e.type!=="deleted",ae=!m&&e.type!=="new",W=w.rowCount>0||ie;b=ne&&W?b:void 0,v=ae&&W?v:void 0,S=m&&W?S:void 0;const F=this.createPreElement(v!=null&&b!=null,U);return{unifiedGutterAST:m&&W?w.unifiedGutterAST.children:void 0,unifiedContentAST:S,deletionsGutterAST:ae&&W?w.deletionsGutterAST.children:void 0,deletionsContentAST:v,additionsGutterAST:ne&&W?w.additionsGutterAST.children:void 0,additionsContentAST:b,hunkData:k,preNode:F,themeStyles:a,baseThemeType:o,headerElement:c?void 0:this.renderHeader(this.diff),totalLines:U,rowCount:w.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=zs(i);return o.properties.style=`grid-row: span ${t.rowCount}`,[o,AM(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 Na(this.renderFullAST(e,t))}renderPartialHTML(e,t){return t==null?Na(e):Na(Re({tagName:"code",children:e,properties:{"data-code":"","data-container-size":this.getOptionsWithDefaults().hunkSeparators==="line-info"?"":void 0,[`data-${t}`]:""}}))}pushFileLevelAnnotations(e,t,i,a){if(!U1(i))return;const o=e.type!=="new"?fv(Jb(this.deletionAnnotations)):[],s=e.type!=="deleted"?fv(Jb(this.additionAnnotations)):[];if(o.length===0&&s.length===0)return;const c=-1,d=-1,{createAnnotationElement:f}=this;if(t==="unified"){qs({diffStyle:t,type:"context",unifiedSpan:{type:"annotation",hunkIndex:c,lineIndex:d,annotations:o.concat(s)},createAnnotationElement:f,context:a});return}qs({diffStyle:t,type:"context",deletionSpan:{type:"annotation",hunkIndex:c,lineIndex:d,annotations:o},additionSpan:{type:"annotation",hunkIndex:c,lineIndex:d,annotations:s},createAnnotationElement:f,context:a})}getAnnotations(e,t,i,a,o){const s={type:"annotation",hunkIndex:a,lineIndex:o,annotations:[]};if(t!=null)for(const d of this.deletionAnnotations[t]??[])s.annotations.push(Ma(d));const c={type:"annotation",hunkIndex:a,lineIndex:o,annotations:[]};if(i!=null)for(const d of this.additionAnnotations[i]??[])(e==="unified"?s:c).annotations.push(Ma(d));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,stickyHeader:i}=this.getOptionsWithDefaults();return RM({fileOrDiff:e,mode:t,stickyHeader:i})}};function fv(e){return e?.map(t=>Ma(t))??[]}const C8=new Intl.PluralRules("en-US");function dv(e){return`${e} unmodified line${C8.select(e)==="one"?"":"s"}`}function hv(e,t){for(const i of e)t.unifiedContentAST.push(i.content),t.pushToGutter("unified",i.gutter),t.incrementRowCount(1)}function pv(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 qs({diffStyle:e,type:t,deletionLine:i,additionLine:a,unifiedSpan:o,deletionSpan:s,additionSpan:c,createAnnotationElement:d,context:f}){let h=!1;if(e==="unified"){if(a!=null?f.unifiedContentAST.push(a):i!=null&&f.unifiedContentAST.push(i),o!=null){const y=t==="change"?i!=null?"change-deletion":"change-addition":t;f.unifiedContentAST.push(d(o)),f.pushToGutter("unified",Dn(y,"annotation",1)),h=!0}}else if(e==="split"){if(i!=null&&f.deletionsContentAST.push(i),a!=null&&f.additionsContentAST.push(a),s!=null){const y=t==="change"?i!=null?"change-deletion":"context":t;f.deletionsContentAST.push(d(s)),f.pushToGutter("deletions",Dn(y,"annotation",1)),h=!0}if(c!=null){const y=t==="change"?a!=null?"change-addition":"context":t;f.additionsContentAST.push(d(c)),f.pushToGutter("additions",Dn(y,"annotation",1)),h=!0}}h&&f.incrementRowCount(1)}function zd(e,{hunkIndex:t,collapsedLines:i,rangeSize:a,hunkSpecs:o,isFirstHunk:s,isLastHunk:c,isExpandable:d},f){if(i<=0)return;const h=e==="unified"?f.unifiedContentAST:e==="deletions"?f.deletionsContentAST:f.additionsContentAST;if(f.hunkSeparators==="metadata"){o!=null&&(f.pushToGutter(e,Ea({type:"metadata",content:o,isFirstHunk:s,isLastHunk:c})),h.push(Ea({type:"metadata",content:o,isFirstHunk:s,isLastHunk:c})),e!=="additions"&&f.incrementRowCount(1));return}if(f.hunkSeparators==="simple"){t>0&&(f.pushToGutter(e,Ea({type:"simple",isFirstHunk:s,isLastHunk:!1})),h.push(Ea({type:"simple",isFirstHunk:s,isLastHunk:!1})),e!=="additions"&&f.incrementRowCount(1));return}const y=v8(e,t),m=a>f.expansionLineCount,b=d?t:void 0;f.pushToGutter(e,Ea({type:f.hunkSeparators,content:dv(i),expandIndex:b,chunked:m,slotName:y,isFirstHunk:s,isLastHunk:c})),h.push(Ea({type:f.hunkSeparators,content:dv(i),expandIndex:b,chunked:m,slotName:y,isFirstHunk:s,isLastHunk:c})),e!=="additions"&&f.incrementRowCount(1),f.hunkData.push({slotName:y,hunkIndex:t,lines:i,type:e,expandable:d?{up:!s,down:!c,chunked:m}:void 0})}function Ys(e,t){return e==null||e.type!=="element"||t==null?e:{...e,properties:{...e.properties,...t}}}function Hd(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function w8(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function k8(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 T8(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:e?.useTokenTransformer,tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators=="function"?"custom":e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader!=null?"custom":"default"}}let A8=-1;var Q1=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++A8}`;type="file-diff";fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;constructor(t={theme:wn},i,a=!1){this.options=t,this.workerManager=i,this.isContainerManaged=a,this.hunksRenderer=this.createHunksRenderer(t),this.resizeManager=new EM,this.scrollSyncManager=new b8,this.interactionManager=new pM("diff",ev(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 T8(t)}createHunksRenderer(t){return new x8(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 d=i==="deletions"?c.deletionStart:c.additionStart;const f=i==="deletions"?c.deletionCount:c.additionCount;let h=c.splitLineStart,y=c.unifiedLineStart;if(t<d){const m=d-t;o=Math.max(y-m,0),s=Math.max(h-m,0);break e}if(t>=d+f){if(c===a){const m=t-(d+f);o=y+c.unifiedLineCount+m,s=h+c.splitLineCount+m;break e}continue}for(const m of c.hunkContent)if(m.type==="context")if(t<d+m.lines){const b=t-d;s=h+b,o=y+b;break e}else d+=m.lines,h+=m.lines,y+=m.lines;else{const b=i==="deletions"?m.deletions:m.additions;if(t<d+b){const v=t-d;o=y+(i==="additions"?m.deletions:0)+v,s=h+v;break e}else d+=b,h+=Math.max(m.deletions,m.additions),y+=m.deletions+m.additions}break e}if(!(o==null||s==null))return[o,s]};setOptions(t){t!=null&&(this.options=t,this.cachedHeaderHTML=void 0,this.hunksRenderer.setOptions(this.getHunksRendererOptions(t)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(ev(this.options,typeof this.options.hunkSeparators=="function"||(this.options.hunkSeparators??"line-info")==="line-info"||this.options.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}),this.applyCachedThemeState(t))}applyCachedThemeState(t){if(typeof this.options.theme=="string"||this.fileContainer==null||this.appliedThemeCSS==null)return!1;const i=this.appliedThemeCSS.baseThemeType??t;return this.appliedThemeCSS.themeType===i?!1:(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,t,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!Wh(this.appliedThemeCSS.theme,this.options.theme??wn)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}canPartiallyRender(t,i,a){return!(t||i||a||typeof this.options.hunkSeparators=="function")}setSelectedLines(t,i){this.interactionManager.setSelection(t,i)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}const{diffStyle:t="split",overflow:i="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,i==="wrap"),i==="scroll"&&t==="split"?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}cleanUp(t=!1){this.emitPostRender(!0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,t||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.annotationCache.clear(),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.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,t||(this.cachedHeaderHTML=void 0),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,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:d,fileDiff:f}=t;this.hydrateElements(i,a),D8(this.pre,L8({fileDiff:f,oldFile:c,newFile:d}),this.options.collapsed)||N8(this.headerElement,R8({fileDiff:f,oldFile:c,newFile:d}),this.options.disableFileHeader)?this.render({...t,preventEmit:!0}):this.hydrationSetup({fileDiff:f,oldFile:c,newFile:d,lineAnnotations:s}),o||this.emitPostRender()}hydrateElements(t,i){this.fileContainer!==t&&this.emitPostRender(!0),KM(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("data-theme-css")){this.themeCSSStyle=a;continue}if(a instanceof HTMLStyleElement&&a.hasAttribute("data-unsafe-css")){this.unsafeCSSStyle=a,this.appliedUnsafeCSS=a.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=t,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:t,oldFile:i,newFile:a,lineAnnotations:o}){this.lineAnnotations=o??this.lineAnnotations,this.additionFile=a,this.deletionFile=i,this.fileDiff=t??(i!=null&&a!=null?vh(i,a,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}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,deferManagers:o=!1,forceRender:s=!1,preventEmit:c=!1,lineAnnotations:d,fileContainer:f,containerWrapper:h,renderRange:y}){if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");const{collapsed:m=!1,themeType:b="system"}=this.options,v=m?void 0:y,S=this.hasThemeChanged(),k=t!=null&&i!=null&&(!Bb(t,this.deletionFile)||!Bb(i,this.additionFile));let D=a!=null&&a!==this.fileDiff;const C=d!=null&&(d.length>0||this.lineAnnotations.length>0)?d!==this.lineAnnotations:!1;if(!m&&B1(v,this.renderRange)&&!s&&!C&&!S&&(a!=null&&a===this.fileDiff||a==null&&!k))return this.applyCachedThemeState(b);const{renderRange:w}=this;if(this.renderRange=v,this.deletionFile=t,this.additionFile=i,a!=null?this.fileDiff=a:t!=null&&i!=null&&k&&(D=!0,this.fileDiff=vh(t,i,this.options.parseDiffOptions)),D&&(this.cachedHeaderHTML=void 0),d!=null&&this.setLineAnnotations(d),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:T=!1,disableFileHeader:I=!1}=this.options;if(I&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),f=this.getOrCreateFileContainer(f,h),this.applyCachedThemeState(b),m){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const B=this.hunksRenderer.renderDiff(this.fileDiff,HN);B!=null&&this.applyThemeState(f,B.themeStyles,b,B.baseThemeType),B?.headerElement!=null&&this.applyHeaderToDOM(B.headerElement,f),this.renderSeparators([]),this.injectUnsafeCSS()}catch(B){if(T)throw B;console.error(B),B instanceof Error&&this.applyErrorToDOM(B,f)}return c||this.emitPostRender(),!0}try{const B=this.getOrCreatePreNode(f);if(!(this.canPartiallyRender(s,C,k||D||S)&&this.applyPartialRender({previousRenderRange:w,renderRange:v}))){const R=this.hunksRenderer.renderDiff(this.fileDiff,v);if(R==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(f,R.themeStyles,b,R.baseThemeType),R.headerElement!=null&&this.applyHeaderToDOM(R.headerElement,f),R.additionsContentAST!=null||R.deletionsContentAST!=null||R.unifiedContentAST!=null?this.applyHunksToDOM(B,R):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(R.hunkData)}this.applyBuffers(B,v),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,o||this.flushManagers()}catch(B){if(T)throw B;console.error(B),B instanceof Error&&this.applyErrorToDOM(B,f)}return c||this.emitPostRender(),!0}emitPostRender(t=!1){const{fileContainer:i,options:{onPostRender:a}}=this;if(t){if(!this.mounted||(this.mounted=!1,i==null))return;this.options.onPostRender?.(i,this,"unmount");return}if(i==null)return;const o=this.mounted?"update":"mount";this.mounted=!0,a?.(i,this,o)}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.emitPostRender(!0),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}primeHighlightCache(){const{fileDiff:t,workerManager:i}=this;if(t==null||i==null||hh(t))return;const a=this.options.tokenizeMaxLength??1e5;Math.max(t.additionLines.length,t.deletionLines.length)>a||i.primeDiffHighlightCache(t)}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.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.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.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}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||!k8(o,c.hunkData)){c?.element.remove();const d=document.createElement("div");d.style.display="contents",d.slot=o.slotName;const f=i(o,this);f!=null&&d.appendChild(f),this.fileContainer.appendChild(d),c={element:d,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}-${Ma(o)}`;let c=this.annotationCache.get(s);if(c==null||!w8(o,c.annotation)){c?.element.remove();const d=i(o);if(d==null)continue;c={element:BM(Ma(o)),annotation:o},c.element.appendChild(d),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{renderGutterUtility:t}=this.options;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=VM();a.appendChild(i),this.fileContainer.appendChild(a),this.gutterUtilityContent=a}getOrCreateFileContainer(t,i){const{fileContainer:a}=this,o=t??a??document.createElement("diffs-container"),s=a!==o;return s&&this.emitPostRender(!0),this.fileContainer=o,a!=null&&s&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),i!=null&&this.fileContainer.parentNode!==i&&i.appendChild(this.fileContainer),s&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(t){const{shadowRoot:i}=t;if(i!=null)for(const a of i.children)a instanceof SVGElement?this.spriteSVG??=a:Wb(a)&&a.hasAttribute("data-theme-css")?(this.themeCSSStyle??=a,this.hasAdoptedThemeCSS=!0):Wb(a)&&a.hasAttribute("data-unsafe-css")&&(this.unsafeCSSStyle??=a,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(t){const i=t.shadowRoot??t.attachShadow({mode:"open"});if(this.spriteSVG==null){const a=document.createElement("div");a.innerHTML=HM;const o=a.firstChild;o instanceof SVGElement&&(this.spriteSVG=o)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==i&&i.appendChild(this.spriteSVG)}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=this.cachedHeaderHTML??Na(t);if(this.cachedHeaderHTML=o,o!==this.lastRenderedHeaderHTML){const y=document.createElement("div");y.innerHTML=o;const m=y.firstElementChild;if(!(m instanceof HTMLElement))return;this.headerElement!=null?i.shadowRoot?.replaceChild(m,this.headerElement):i.shadowRoot?.prepend(m),this.headerElement=m,this.lastRenderedHeaderHTML=o}if(this.isContainerManaged||a==null)return;const{renderCustomHeader:s,renderHeaderPrefix:c,renderHeaderMetadata:d}=this.options;if(s!=null){const y=s(a)??void 0;this.headerCustom=this.upsertHeaderSlotElement(i,this.headerCustom,Kh,y),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}const f=c?.(a)??void 0,h=d?.(a)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(i,this.headerPrefix,_1,f),this.headerMetadata=this.upsertHeaderSlotElement(i,this.headerMetadata,S1,h),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??=jM(),this.unsafeCSSStyle.parentNode!==i&&i.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=FM(t),this.appliedUnsafeCSS=t)}}applyThemeState(t,i,a,o){const s=t.shadowRoot??t.attachShadow({mode:"open"}),c=o??a,d=this.options.theme??wn,f=typeof d=="string"?d:{...d},h=gh(s);if(this.themeCSSStyle?.parentNode===s&&this.appliedThemeCSS?.themeStyles===i&&this.appliedThemeCSS.themeType===c&&this.appliedThemeCSS.scrollbarGutter===h){this.appliedThemeCSS.theme=f;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===s){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:f,themeStyles:i,themeType:c,baseThemeType:o,scrollbarGutter:h};return}this.themeCSSStyle=QM({shadowRoot:s,currentNode:this.themeCSSStyle,themeCSS:qM(i,c,h)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:f,themeStyles:i,themeType:c,baseThemeType:o,scrollbarGutter:h}:void 0}hydrateMeasuredScrollbar(){const t=this.fileContainer?.shadowRoot;t==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=YM(this.themeCSSStyle.textContent??"",gh(t)))}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 d=[],f=this.hunksRenderer.renderCodeAST("unified",i),h=this.hunksRenderer.renderCodeAST("deletions",i),y=this.hunksRenderer.renderCodeAST("additions",i);f!=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=Nd({code:this.codeUnified,columnType:"unified",rowSpan:s,containerSize:o}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(f),d.push(this.codeUnified)):h!=null||y!=null?(h!=null?(c=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=Nd({code:this.codeDeletions,columnType:"deletions",rowSpan:s,containerSize:o}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(h),d.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),y!=null?(c=c||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=Nd({code:this.codeAdditions,columnType:"additions",rowSpan:s,containerSize:o}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(y),d.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),d.length===0?t.textContent="":c&&t.replaceChildren(...d),this.lastRowCount=i.rowCount}applyPartialRender({previousRenderRange:t,renderRange:i}){const{pre:a,codeUnified:o,codeAdditions:s,codeDeletions:c,options:{diffStyle:d="split"}}=this;if(a==null||t==null||i==null||!Number.isFinite(t.totalLines)||!Number.isFinite(i.totalLines)||this.lastRowCount==null)return!1;const f=this.getCodeColumns(d,o,c,s);if(f==null)return!1;const h=t.startingLine,y=i.startingLine,m=h+t.totalLines,b=y+i.totalLines,v=Math.max(h,y),S=Math.min(m,b);if(S<=v)return!1;const k=Math.max(0,v-h),D=Math.max(0,m-S),C=this.trimColumns({columns:f,trimStart:k,trimEnd:D,previousStart:h,overlapStart:v,overlapEnd:S,diffStyle:d});if(C<0)throw new Error("applyPartialRender: failed to trim to overlap");if(this.lastRowCount<C)throw new Error("applyPartialRender: trimmed beyond DOM row count");let w=this.lastRowCount-C;const T=(U,ie)=>{if(!(ie<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:U,totalLines:ie,bufferBefore:0,bufferAfter:0})},I=T(y,Math.max(v-y,0));if(I==null&&y<v)return!1;const B=T(S,Math.max(b-S,0));if(B==null&&b>S)return!1;const R=(U,ie)=>{if(U!=null){if(d==="unified"&&!Array.isArray(f))this.insertPartialHTML(d,f,U,ie);else if(d==="split"&&Array.isArray(f))this.insertPartialHTML(d,f,U,ie);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");w+=U.rowCount}};return this.cleanupErrorWrapper(),R(I,"afterbegin"),R(B,"beforeend"),this.lastRowCount!==w&&(this.applyRowSpan(d,f,w),this.lastRowCount=w),!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=mv(i[0]),s=mv(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 d=s.at(-1);a==="afterbegin"&&d?.type==="element"&&typeof d.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(d.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 d=this.getBufferSize(i.dataset);d!=null&&(c?(o.shift(),s.shift()):(o.pop(),s.pop()),this.updateBufferSize(i,d+t),this.updateBufferSize(a,d+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,d=!1;const f=a>=0;if(t==null)return 0;const h=Array.from(t.content.children),y=Array.from(t.gutter.children);if(h.length!==y.length)throw new Error("FileDiff.trimColumnRows: columns do not match");for(;c<h.length&&!(i<=0&&!f&&!d);){const m=y[c],b=h[c];if(c++,!(m instanceof HTMLElement)||!(b instanceof HTMLElement))throw console.error({gutterElement:m,contentElement:b}),new Error("FileDiff.trimColumnRows: invalid row elements");if(d&&(d=!1,m.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in b.dataset||m.dataset.gutterBuffer==="metadata"&&"noNewline"in b.dataset)){m.remove(),b.remove(),s++;continue}if("lineIndex"in m.dataset&&"lineIndex"in b.dataset){(i>0||f&&o>=a)&&(m.remove(),b.remove(),i>0&&(i--,i===0&&(d=!0)),s++),o++;continue}if("separator"in m.dataset&&"separator"in b.dataset){(i>0||f&&o>=a)&&(m.remove(),b.remove(),s++);continue}if(m.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in b.dataset){(i>0||f&&o>=a)&&(m.remove(),b.remove(),s++);continue}if(m.dataset.gutterBuffer==="metadata"&&"noNewline"in b.dataset){(i>0||f&&o>=a)&&(m.remove(),b.remove(),s++);continue}if(m.dataset.gutterBuffer==="buffer"&&"contentBuffer"in b.dataset){const v=this.getBufferSize(b.dataset);if(v==null)throw new Error("FileDiff.trimColumnRows: invalid element");if(i>0){const S=Math.min(i,v),k=v-S;k>0?(this.updateBufferSize(m,k),this.updateBufferSize(b,k),s+=S):(m.remove(),b.remove(),s+=v),i-=S,i===0&&k===0&&(d=!0)}else if(f){const S=o,k=o+v-1;if(a<=S)m.remove(),b.remove(),s+=v;else if(a<=k){const D=k-a+1,C=v-D;this.updateBufferSize(m,C),this.updateBufferSize(b,C),s+=D}}o+=v;continue}throw console.error({gutterElement:m,contentElement:b}),new Error("FileDiff.trimColumnRows: unknown row elements")}return s}trimColumns({columns:t,diffStyle:i,overlapEnd:a,overlapStart:o,previousStart:s,trimEnd:c,trimStart:d}){const f=Math.max(0,o-s),h=a-s;if(h<0)throw new Error("FileDiff.trimColumns: overlap ends before previous");const y=d>0,m=c>0;if(!y&&!m)return 0;const b=y?f:0,v=m?h:-1;if(i==="unified"&&!Array.isArray(t))return this.trimColumnRows(t,b,v);if(i==="split"&&Array.isArray(t)){const S=this.trimColumnRows(t[0],b,v),k=this.trimColumnRows(t[1],b,v);if(t[0]!=null&&t[1]!=null&&S!==k)throw new Error("FileDiff.trimColumns: split columns out of sync");return t[0]!=null?S:k}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 d=c.children[0],f=c.children[1];if(!(!(d instanceof HTMLElement)||!(f instanceof HTMLElement)||d.dataset.gutter==null||f.dataset.content==null))return{gutter:d,content:f}}if(t==="unified")return s(i);{const c=s(a),d=s(o);return c!=null||d!=null?[c,d]:void 0}}applyBuffers(t,i){if(i==null||this.shouldDisableVirtualizationBuffers()){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)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(t,{additionsContentAST:i,deletionsContentAST:a,totalLines:o},s){const{diffIndicators:c="bars",disableBackground:d=!1,disableLineNumbers:f=!1,overflow:h="scroll",diffStyle:y="split"}=this.options,m={type:"diff",diffIndicators:c,disableBackground:d,disableLineNumbers:f,overflow:h,split:y==="unified"?!1:i!=null&&a!=null,totalLines:o,customProperties:s};PM(m,this.appliedPreAttributes)||(WM(t,m),this.appliedPreAttributes=m)}applyErrorToDOM(t,i){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const a=i.shadowRoot??i.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",a.appendChild(this.errorWrapper);const o=document.createElement("div");o.dataset.errorMessage="",o.innerText=t.message,this.errorWrapper.appendChild(o);const s=document.createElement("pre");s.dataset.errorStack="",s.innerText=t.stack??"No Error Stack",this.errorWrapper.appendChild(s)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function L8({fileDiff:e,oldFile:t,newFile:i}){return e!=null&&e.hunks.length>0||t!=null||i!=null}function R8({fileDiff:e,oldFile:t,newFile:i}){return e!=null||t!=null||i!=null}function D8(e,t,i=!1){return!i&&e==null&&t}function N8(e,t,i=!1){return e==null&&t&&!i}function mv(e){if(!(e==null||e.type!=="element"))return e.children??[]}const _h=5e3;let O8=-1;var M8=class extends Q1{__id=`little-virtualized-file-diff:${++O8}`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0,fileAnnotationHeight:0};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,t,i,a,o=!1){super(e,a,o),this.virtualizer=t,this.metrics=Ld(i)}setMetrics(e,t=!1){const i=Ld(e);!t&&mh(this.metrics,i)||(this.metrics=i,this.resetLayoutCache({includeEstimatedHeights:!0}))}setLineAnnotations(e){this.syncLineAnnotations(e)&&this.resetLayoutCache({includeEstimatedHeights:!1})}syncLineAnnotations(e){return e==null||e===this.lineAnnotations||e.length===0&&this.lineAnnotations.length===0?!1:(super.setLineAnnotations(e),!0)}setFileAnnotationHeight(e){const t=this.cache.fileAnnotationHeight;return e===t?!1:(this.cache.fileAnnotationHeight=e,this.cache.measuredHeightDeltaTotal+=e-t,!0)}hasFileAnnotations(e=this.fileDiff){return e==null||!fM(this.lineAnnotations)?!1:this.lineAnnotations.some(t=>t.lineNumber!==0?!1:e.type==="new"?t.side==="additions":e.type==="deleted"?t.side==="deletions":!0)}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){const t=e?2:1;return this.metrics.lineHeight*t}setOptions(e){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(e==null)return;const{options:t}=this,i=!P1(t,e),a=i&&B8(t,e);super.setOptions(e),a&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:V8(t,e)}),i&&(this.forceRenderOverride=!0),i&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,a)}setThemeType(e){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(e)}resetLayoutCache({forceSimpleRecompute:e=!1,includeEstimatedHeights:t=!1}={}){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heightDeltas.size>0&&this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal!==0&&(this.cache.measuredHeightDeltaTotal=0),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),t&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let e=!1;const{overflow:t="scroll"}=this.options;if(this.fileContainer==null||this.fileDiff==null)return this.height!==0&&(e=!0),this.height=0,e;if(this.top=this.getVirtualizedTop(),t==="scroll"&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled())return e;const i=this.getDiffStyle(),a=i==="split"?[this.codeDeletions,this.codeAdditions]:[this.codeUnified],o=this.hasFileAnnotations(this.fileDiff);if(this.renderRange!=null&&o&&U1(this.renderRange)){const s=I8(a)??0;this.setFileAnnotationHeight(s)&&(e=!0)}else!o&&this.setFileAnnotationHeight(0)&&(e=!0);for(const s of a){if(s==null)continue;const c=s.children[1];if(c instanceof HTMLElement)for(const d of c.children){if(!(d instanceof HTMLElement))continue;const f=d.dataset.lineIndex;if(f==null)continue;const h=G8(f,i);let y=d.getBoundingClientRect().height,m=!1;d.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in d.nextElementSibling.dataset||"noNewline"in d.nextElementSibling.dataset)&&("noNewline"in d.nextElementSibling.dataset&&(m=!0),y+=d.nextElementSibling.getBoundingClientRect().height);const b=this.getEstimatedLineHeight(m),v=this.cache.heightDeltas.get(h)??0,S=y-b;S!==v&&(e=!0,this.cache.measuredHeightDeltaTotal+=S-v,S===0?this.cache.heightDeltas.delete(h):this.cache.heightDeltas.set(h,S))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer==null?!1:(e&&(this.top=this.getVirtualizedTop()),this.render());prepareCodeViewItem(e,t,i,a){const o=!jl(this.fileDiff,e),s=this.syncLineAnnotations(a);let c=i?.resetDiffLayoutCache===!0||o||s,d=o||i?.resetDiffLayoutCache===!0&&i.includeEstimatedDiffHeights;i?.metrics!=null&&(this.metrics=Ld(i.metrics),c=!0,d=!0);const{collapsed:f=!1}=this.options;return this.currentCollapsed!==f&&(this.currentCollapsed=f,c=!0),c&&this.resetLayoutCache({includeEstimatedHeights:d}),this.fileDiff=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e,t="additions"){if(this.fileDiff==null||e<1)return;const i=this.getLineIndex(e,t);if(i==null)return;const{disableFileHeader:a=!1,expandUnchanged:o=!1,collapsed:s=!1,collapsedContextThreshold:c=1}=this.options,d=this.getDiffStyle(),f=this.getHunkSeparatorType(),h=d==="split"?i[1]:i[0];this.approximateLayoutCheckpoints();const y=ka(this.metrics,a),m=this.getLayoutCheckpointBeforeLineIndex(h);let b=m?.top??y+this.cache.fileAnnotationHeight;if(s)return{top:y,height:0};let v;return Kl({diff:this.fileDiff,diffStyle:d,startingLine:m?.renderedLineIndex??0,expandedHunks:o?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:c,callback:({hunkIndex:S,hunk:k,collapsedBefore:D,collapsedAfter:C,deletionLine:w,additionLine:T})=>{const I=d==="split"?T?.splitLineIndex??w?.splitLineIndex:T?.unifiedLineIndex??w?.unifiedLineIndex;if(I==null)throw new Error("VirtualizedFileDiff.getLinePosition: missing line index data");if(D>0){const R=Gl({type:f,metrics:this.metrics,hunkIndex:S,hunkSpecs:k?.hunkSpecs});if(R!=null){if(b+=R.gapBefore,h>=I-D&&h<I)return v={top:b,height:R.height},!0;b+=R.height+R.gapAfter}}const B=this.getLineHeight(I,(T?.noEOFCR??!1)||(w?.noEOFCR??!1));if(I===h)return v={top:b,height:B},!0;if(b+=B,C>0){const R=$l({type:f,metrics:this.metrics});if(R!=null){if(h>I&&h<=I+C)return v={top:b+R.gapBefore,height:R.height},!0;b+=R.totalHeight}}return!1}}),v}getNumericScrollAnchor(e){if(this.fileDiff==null)return;const{disableFileHeader:t=!1,expandUnchanged:i=!1,collapsed:a=!1,collapsedContextThreshold:o=1}=this.options;if(a)return;const s=this.getDiffStyle(),c=this.getHunkSeparatorType();this.approximateLayoutCheckpoints();const d=this.getLayoutCheckpointBeforeTop(e);let f=d?.top??ka(this.metrics,t)+this.cache.fileAnnotationHeight,h;return Kl({diff:this.fileDiff,diffStyle:s,startingLine:d?.renderedLineIndex??0,expandedHunks:i?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:y,hunk:m,collapsedBefore:b,collapsedAfter:v,deletionLine:S,additionLine:k})=>{const D=s==="split"?k?.splitLineIndex??S?.splitLineIndex:k?.unifiedLineIndex??S?.unifiedLineIndex;if(D==null)throw new Error("VirtualizedFileDiff.getNumericScrollAnchor: missing line index data");if(b>0){const w=Gl({type:c,metrics:this.metrics,hunkIndex:y,hunkSpecs:m?.hunkSpecs});w!=null&&(f+=w.totalHeight)}if(f>=e&&(S!=null?h={lineNumber:S.lineNumber,side:"deletions",top:f}:k!=null&&(h={lineNumber:k.lineNumber,side:"additions",top:f}),h!=null))return!0;const C=this.getLineHeight(D,(k?.noEOFCR??!1)||(S?.noEOFCR??!1));if(f+=C,v>0){const w=$l({type:c,metrics:this.metrics});w!=null&&(f+=w.totalHeight)}return!1}}),h}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(this.top==null||this.fileDiff==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};const t=e!=null?this.computeRenderRangeFromWindow(this.fileDiff,this.top,e):this.renderRange;if(t==null)return;const{bufferBefore:i,bufferAfter:a,totalLines:o}=t;let s=0;if(o===0){const c=e??this.virtualizer.getWindowSpecs();this.top<c.top&&(s=a)}return{topOffset:this.top+i+s,height:this.height-(i+a)}}cleanUp(e=!1){this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSetup=!1,super.cleanUp(e)}expandHunk=(e,t,i)=>{this.hunksRenderer.expandHunk(e,t,i),this.forceRenderOverride=!0,this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSimpleMode()&&this.computeApproximateSize(),this.virtualizer.instanceChanged(this,!0)};setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}computeApproximateSize(e=!1){const t=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!t)return;const i=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,this.fileDiff==null){this.layoutDirty=!1;return}const{disableFileHeader:a=!1,collapsed:o=!1}=this.options,s=ka(this.metrics,a);if(this.height+=s,o){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight()+this.cache.measuredHeightDeltaTotal,t&&!i&&this.validateComputedHeight(),this.layoutDirty=!1}getActiveEstimatedHeight(){this.ensureEstimatedDiffHeights();const e=this.getDiffStyle()==="split"?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(e==null)throw new Error("VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height");return e}ensureEstimatedDiffHeights(){if(this.fileDiff==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;const{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:i=1}=this.options,{splitHeight:a,unifiedHeight:o}=JM({fileDiff:this.fileDiff,metrics:this.metrics,disableFileHeader:e,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:t,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i});this.cache.estimatedSplitHeight=a,this.cache.estimatedUnifiedHeight=o}validateComputedHeight(){if(this.fileContainer==null||this.fileDiff==null)return;const e=this.fileContainer.getBoundingClientRect();e.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:this.fileDiff.name,elementHeight:e.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}render({fileContainer:e,oldFile:t,newFile:i,fileDiff:a,forceRender:o=!1,lineAnnotations:s,...c}={}){const{forceRenderOverride:d,isSetup:f}=this;this.forceRenderOverride=void 0;const h=this.syncLineAnnotations(s);if(h&&this.resetLayoutCache({includeEstimatedHeights:!1}),this.fileDiff??=a??(t!=null&&i!=null?vh(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(f)this.top??=this.getVirtualizedTop();else{this.computeApproximateSize();const v=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(v==null)throw new Error("VirtualizedFileDiff.render: simple virtualizer is not available");v.connect(e,this),this.isVisible=v.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode())return this.renderPlaceholder(this.height);const y=this.virtualizer.getWindowSpecs(),m=this.top??0,b=this.computeRenderRangeFromWindow(this.fileDiff,m,y);return super.render({fileDiff:this.fileDiff,fileContainer:e,renderRange:b,oldFile:t,newFile:i,lineAnnotations:s,forceRender:(d??o)||h,...c})}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}isSimpleMode(){return this.virtualizer.type==="simple"}isAdvancedMode(){return this.virtualizer.type==="advanced"}getVirtualizedTop(){return this.virtualizer.type==="advanced"?this.virtualizer.getLocalTopForInstance(this):this.fileContainer!=null?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return this.virtualizer.type==="simple"?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??"split"}getHunkSeparatorType(){return j8(this.options.hunkSeparators)}approximateLayoutCheckpoints(){if(this.cache.checkpoints.length>0||this.fileDiff==null||this.fileDiff.hunks.length===0||this.options.collapsed===!0)return;const{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:i=1}=this.options,a=this.fileDiff.hunks.length-1,o=this.getDiffStyle(),s=this.getHunkSeparatorType(),c=t?!0:this.hunksRenderer.getExpandedHunksMap(),d=z8(this.cache.heightDeltas);let f=ka(this.metrics,e)+this.cache.fileAnnotationHeight,h=0;const y=({rowCount:m,startLineIndex:b,preSeparatorHeight:v=0,postSeparatorHeight:S=0,metadataOffsets:k=[]})=>{if(m<=0)return;const D=h,C=h+m;let w=H8(D);for(;w<C;){const T=w-D,I=f+(T>0?v:0)+T*this.metrics.lineHeight+P8(k,T)*this.metrics.lineHeight+gv(d,b,b+T);this.cache.checkpoints.push({renderedLineIndex:w,lineIndex:b+T,top:I}),w+=_h}f+=v+m*this.metrics.lineHeight+k.length*this.metrics.lineHeight+gv(d,b,b+m)+S,h=C};for(let m=0;m<this.fileDiff.hunks.length;m++){const b=this.fileDiff.hunks[m];if(b==null)throw new Error("VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index");const v=lo({isPartial:this.fileDiff.isPartial,rangeSize:b.collapsedBefore,expandedHunks:c,hunkIndex:m,collapsedContextThreshold:i}),S=v.collapsedLines>0?Gl({type:s,metrics:this.metrics,hunkIndex:m,hunkSpecs:b.hunkSpecs})?.totalHeight??0:0;y({rowCount:v.fromStart,startLineIndex:(o==="split"?b.splitLineStart:b.unifiedLineStart)-v.rangeSize});let k=S;y({rowCount:v.fromEnd,startLineIndex:(o==="split"?b.splitLineStart:b.unifiedLineStart)-v.fromEnd,preSeparatorHeight:k}),v.fromEnd>0&&(k=0);const D=m===a?oo({fileDiff:this.fileDiff,hunkIndex:m,expandedHunks:c,collapsedContextThreshold:i,errorPrefix:"VirtualizedFileDiff"}):void 0,C=D!=null&&D.collapsedLines>0?$l({type:s,metrics:this.metrics})?.totalHeight??0:0,w=D!=null?D.fromStart+D.fromEnd:0,T=o==="split"?b.splitLineCount:b.unifiedLineCount,I=o==="split"?b.splitLineStart:b.unifiedLineStart;y({rowCount:T,startLineIndex:I,preSeparatorHeight:k,postSeparatorHeight:w===0?C:0,metadataOffsets:U8({diffStyle:o,hunk:b,rowCount:T})}),D!=null&&w>0&&y({rowCount:w,startLineIndex:I+T,postSeparatorHeight:C})}this.cache.totalLines=h}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,i=this.cache.checkpoints.length-1,a;for(;t<=i;){const o=t+i>>1,s=this.cache.checkpoints[o];if(s==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");s.lineIndex<=e?(a=s,t=o+1):i=o-1}return a}getLayoutCheckpointBeforeTop(e,t){let i=0,a=this.cache.checkpoints.length-1,o=-1;for(;i<=a;){const s=i+a>>1,c=this.cache.checkpoints[s];if(c==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");c.top<=e?(o=s,i=s+1):a=s-1}if(t==null)return o>=0?this.cache.checkpoints[o]:void 0;for(let s=o;s>=0;s--){const c=this.cache.checkpoints[s];if(c==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");if(c.renderedLineIndex%t===0)return c}}getExpandedLineCount(e,t){let i=0;if(e.isPartial){for(const d of e.hunks)i+=t==="split"?d.splitLineCount:d.unifiedLineCount;return i}const{expandUnchanged:a=!1,collapsedContextThreshold:o=1}=this.options,s=a?!0:this.hunksRenderer.getExpandedHunksMap();for(const[d,f]of e.hunks.entries()){const h=t==="split"?f.splitLineCount:f.unifiedLineCount;i+=h;const y=Math.max(f.collapsedBefore,0),{fromStart:m,fromEnd:b,renderAll:v}=lo({isPartial:e.isPartial,rangeSize:y,expandedHunks:s,hunkIndex:d,collapsedContextThreshold:o});y>0&&(i+=v?y:m+b)}const c=oo({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:s,collapsedContextThreshold:o,errorPrefix:"VirtualizedFileDiff"});return c!=null&&(i+=c.fromStart+c.fromEnd),i}computeRenderRangeFromWindow(e,t,{top:i,bottom:a}){const{disableFileHeader:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=1}=this.options,{hunkLineCount:d,lineHeight:f}=this.metrics,h=this.getDiffStyle(),y=this.getHunkSeparatorType(),m=this.height;let b=this.cache.totalLines>0?this.cache.totalLines:this.getExpandedLineCount(e,h);const v=ka(this.metrics,o),S=e.hunks.length>0?M1(this.metrics):0,{fileAnnotationHeight:k}=this.cache,D=v+k,C=Math.max(0,m-v-k-S),w=this.hasFileAnnotations(e),T=t+v,I=k>0&&w&&T<a&&T+k>i;if(t<i-m||t>a)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:m-v-S};if(b<=d||e.hunks.length===0)return{startingLine:0,totalLines:d,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(),b=this.cache.totalLines>0?this.cache.totalLines:b;const B=Math.ceil(Math.max(a-i,0)/f),R=Math.ceil(B/d)*d+d,U=R/d,ie=U,ne=[],ae=(i+a)/2,W=this.getLayoutCheckpointBeforeTop(Math.max(0,i-t-R*f*2),d);let F=t+(W?.top??D),J=W?.renderedLineIndex??0,K,Y,H;if(Kl({diff:e,diffStyle:h,startingLine:W?.renderedLineIndex??0,expandedHunks:s?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:c,callback:({hunkIndex:he,hunk:Ee,collapsedBefore:ze,collapsedAfter:ge,deletionLine:He,additionLine:$e})=>{const At=$e!=null?$e.splitLineIndex:He.splitLineIndex,Et=$e!=null?$e.unifiedLineIndex:He.unifiedLineIndex,We=($e?.noEOFCR??!1)||(He?.noEOFCR??!1),jt=(ze>0?Gl({type:y,metrics:this.metrics,hunkIndex:he,hunkSpecs:Ee?.hunkSpecs}):void 0)?.totalHeight??0;F+=jt;const rt=J%d===0,In=Math.floor(J/d);if(rt&&(ne[In]=F-(t+D+jt),H!=null)){if(H<=0)return!0;H--}const zn=this.getLineHeight(h==="split"?At:Et,We);return F>i-zn&&F<a&&(K??=In),Y==null&&F+zn>ae&&(Y=In),H==null&&F>=a&&rt&&(H=ie),J++,F+=zn,ge>0&&(F+=$l({type:y,metrics:this.metrics})?.totalHeight??0),!1}}),K==null)if(I)K=0,Y=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:m-v-S};Y??=K;const q=Math.round(Y-U/2),oe=Math.max(0,Math.ceil(b/d)-U),de=Math.max(0,Math.min(q,oe)),L=de*d,O=q<0?R+q*d:R,X=ne[de]??0,A=L===0?0:k+X,ce=de+O/d,me=ce<ne.length?C-ne[ce]:C-(F-t-D);return{startingLine:L,totalLines:O,bufferBefore:A,bufferAfter:Math.max(0,me)}}};function I8(e){let t;for(const i of e){if(i==null)continue;const a=i.children[1];if(a instanceof HTMLElement)for(const o of a.children)o instanceof HTMLElement&&o.dataset.lineAnnotation===cM&&(t=Math.max(t??0,o.getBoundingClientRect().height))}return t}function z8(e){const t=Array.from(e).sort((s,c)=>s[0]-c[0]),i=[],a=[0];let o=0;for(const[s,c]of t)i.push(s),o+=c,a.push(o);return{lineIndexes:i,prefixTotals:a}}function gv({lineIndexes:e,prefixTotals:t},i,a){if(i>=a||e.length===0)return 0;const o=yv(e,i);return(t[yv(e,a)]??0)-(t[o]??0)}function yv(e,t){let i=0,a=e.length;for(;i<a;){const o=i+a>>1,s=e[o];if(s==null)throw new Error("VirtualizedFileDiff: invalid prefix index");s<t?i=o+1:a=o}return i}function H8(e){return Math.ceil(e/_h)*_h}function P8(e,t){let i=0;for(const a of e)a<t&&i++;return i}function U8({diffStyle:e,hunk:t,rowCount:i}){if(i<=0||!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return[];const a=t.hunkContent.at(-1);if(a==null)return[];if(a.type==="context")return[i-1];const o=Math.max(a.deletions,a.additions),s=a.deletions+a.additions;if(e==="split")return o>0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[i-1]:[];const c=[],d=i-s;return a.deletions>0&&t.noEOFCRDeletions&&c.push(d+a.deletions-1),a.additions>0&&t.noEOFCRAdditions&&c.push(i-1),c}function B8(e,t){return(e.diffStyle??"split")!==(t.diffStyle??"split")||(e.overflow??"scroll")!==(t.overflow??"scroll")||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.diffIndicators??"bars")!==(t.diffIndicators??"bars")||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)||e.unsafeCSS!==t.unsafeCSS}function V8(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function j8(e){return typeof e=="function"?"custom":e??"line-info"}function G8(e,t){const[i,a]=e.split(",").map(Number);return t==="split"?a:i}function $8(e,t){return typeof window>"u"&&t!=null?z.jsxs(z.Fragment,{children:[z.jsx("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:t}}),e]}):z.jsx(z.Fragment,{children:e})}const F8=te.createContext(void 0);function q8(){return te.useContext(F8)}const Y8=typeof window>"u"?te.useEffect:te.useLayoutEffect;function X8({fileDiff:e,options:t,lineAnnotations:i,selectedLines:a,prerenderedHTML:o,metrics:s,hasGutterRenderUtility:c,hasCustomHeader:d,disableWorkerPool:f}){const h=q8(),y=a!==void 0,m=te.useContext(uM),b=te.useRef(null),v=GN(S=>{if(S!=null){if(b.current!=null)throw new Error("useFileDiffInstance: An instance should not already exist when a node is created");h!=null?b.current=new M8(Pd({controlledSelection:y,hasCustomHeader:d,hasGutterRenderUtility:c,options:t}),h,s,f?void 0:m,!0):b.current=new Q1(Pd({controlledSelection:y,hasCustomHeader:d,hasGutterRenderUtility:c,options:t}),f?void 0:m,!0),b.current.hydrate({fileDiff:e,fileContainer:S,lineAnnotations:i,prerenderedHTML:o})}else{if(b.current==null)throw new Error("useFileDiffInstance: A FileDiff instance should exist when unmounting");b.current.cleanUp(),b.current=null}});return Y8(()=>{const{current:S}=b;if(S==null)return;const k=Pd({controlledSelection:y,hasCustomHeader:d,hasGutterRenderUtility:c,options:t}),D=!P1(S.options,k);S.setOptions(k),S.render({forceRender:D,fileDiff:e,lineAnnotations:i}),a!==void 0&&S.setSelectedLines(a)}),{ref:v,getHoveredLine:te.useCallback(()=>b.current?.getHoveredLine(),[])}}function Pd({options:e,controlledSelection:t,hasCustomHeader:i,hasGutterRenderUtility:a}){return!t&&!a&&!i?e:{...e,controlledSelection:t,renderCustomHeader:i?Ib:e?.renderCustomHeader,renderGutterUtility:a?Ib:e?.renderGutterUtility}}function Q8({fileDiff:e,options:t,metrics:i,lineAnnotations:a,selectedLines:o,className:s,style:c,prerenderedHTML:d,renderAnnotation:f,renderCustomHeader:h,renderHeaderPrefix:y,renderHeaderMetadata:m,renderGutterUtility:b,disableWorkerPool:v=!1}){const{ref:S,getHoveredLine:k}=X8({fileDiff:e,options:t,metrics:i,lineAnnotations:a,selectedLines:o,prerenderedHTML:d,hasGutterRenderUtility:b!=null,hasCustomHeader:h!=null,disableWorkerPool:v});return z.jsx(b1,{ref:S,className:s,style:c,children:$8(VN({fileDiff:e,renderCustomHeader:h,renderHeaderPrefix:y,renderHeaderMetadata:m,renderAnnotation:f,renderGutterUtility:b,lineAnnotations:a,getHoveredLine:k}),d)})}const Z8=te.memo(function({onSave:t,onCancel:i}){const a=te.useRef(null),[o,s]=te.useState(!1);te.useEffect(()=>{a.current?.focus()},[]);const c=()=>{const f=a.current?.value??"";t(f,o)},d=f=>{f.key==="Enter"&&(f.metaKey||f.ctrlKey)&&(f.preventDefault(),c()),f.key==="Escape"&&(f.preventDefault(),i())};return z.jsxs("div",{className:"comment-editor",children:[z.jsx("textarea",{ref:a,className:"text-input-area comment-input",onKeyDown:d,placeholder:"Add a comment…",rows:2}),z.jsxs("div",{className:"comment-actions",children:[z.jsx(Tu,{checked:o,label:"ask agent",onChange:s}),z.jsx("button",{type:"button",className:"btn ghost",onClick:i,children:"cancel"}),z.jsx("button",{type:"button",className:"btn primary",onClick:c,children:"comment"})]})]})});function ep({additions:e,deletions:t,className:i}){const a=["diff-stats",i].filter(Boolean).join(" ");return z.jsxs("span",{className:a,children:[z.jsxs("span",{className:"stat-add",children:["+",e]}),z.jsxs("span",{className:"stat-del",children:["-",t]})]})}const K8=te.memo(function({thread:t,onAddReply:i,onRequestAgent:a,onToggleResolved:o,onToggleCollapsed:s,onDeleteMessage:c}){const[d,f]=te.useState(!1),[h,y]=te.useState(!1),[m,b]=te.useState(!1),v=te.useRef(null),k=t.messages[t.messages.length-1]?.role==="user"&&!t.loading&&!t.resolved,D=t.messages.length,C=`${t.resolved?"Resolved thread":"Thread"} with ${D} comment${D===1?"":"s"}`,w=t.resolved?"reopen":"resolve";te.useEffect(()=>{d&&v.current?.focus()},[d]);const T=te.useCallback(()=>{const U=v.current?.value.trim()??"";U&&(v.current&&(v.current.value=""),y(!1),f(!1),i(U,m),b(!1))},[i,m]),I=te.useCallback(U=>{U.key==="Enter"&&(U.metaKey||U.ctrlKey)&&(U.preventDefault(),T())},[T]),B=te.useCallback(()=>{o(!t.resolved)},[o,t.resolved]),R=te.useCallback(()=>{v.current&&(v.current.value=""),y(!1),b(!1),f(!1)},[]);return t.collapsed?z.jsx("div",{className:`thread-card collapsed${t.resolved?" resolved":""}`,children:z.jsx("div",{className:"thread-collapsed-row",children:z.jsxs("button",{type:"button",className:"thread-toggle",onClick:()=>s(!1),"aria-label":"Expand thread","aria-expanded":!1,children:[z.jsx(Cv,{size:14}),z.jsx("span",{className:"thread-summary",children:C})]})})}):z.jsxs("div",{className:`thread-card${t.resolved?" resolved":""}`,children:[z.jsx("div",{className:"thread-header-row",children:z.jsxs("button",{type:"button",className:"thread-toggle",onClick:()=>s(!0),"aria-label":"Collapse thread","aria-expanded":!0,children:[z.jsx(xv,{size:14}),z.jsx("span",{className:"thread-summary",children:C})]})}),z.jsxs("div",{className:"thread-messages",children:[t.messages.map((U,ie)=>z.jsxs("div",{className:`thread-msg thread-msg-${U.role}`,children:[z.jsxs("div",{className:"thread-msg-header",children:[z.jsx("span",{className:"thread-msg-role",children:U.role==="user"?"you":"agent"}),z.jsx("button",{type:"button",className:"thread-msg-delete",onClick:()=>c(ie),"aria-label":`Delete ${U.role==="user"?"your":"agent"} comment`,title:"delete comment",children:z.jsx(kv,{size:13})})]}),z.jsx(Zh,{content:U.text,className:"thread-msg-text",variant:"thread"})]},`${U.role}:${ie}:${U.text}`)),t.loading&&z.jsxs("div",{className:"thread-msg thread-msg-assistant",children:[z.jsx("span",{className:"thread-msg-role",children:"agent"}),z.jsx("span",{className:"thread-msg-thinking",children:"thinking…"})]})]}),z.jsx("div",{className:"thread-footer",children:d?z.jsxs(z.Fragment,{children:[z.jsx("textarea",{ref:v,className:"text-input-area thread-reply-input",onChange:U=>{const ie=U.target.value.trim().length>0;y(ne=>ne===ie?ne:ie)},onKeyDown:I,placeholder:"Reply…",rows:3}),z.jsxs("div",{className:"thread-actions",children:[z.jsx(Tu,{checked:m,label:"ask agent",onChange:b}),z.jsx("button",{type:"button",className:"btn ghost",onClick:R,children:"cancel"}),z.jsx("button",{type:"button",className:"btn primary",disabled:!h,onClick:T,children:"comment"})]})]}):z.jsxs("div",{className:"thread-actions",children:[z.jsx("button",{type:"button",className:"btn ghost",onClick:B,children:w}),z.jsx("button",{type:"button",className:"btn",onClick:()=>f(!0),children:"reply"}),k&&z.jsxs("button",{type:"button",className:"btn",onClick:a,children:[z.jsx(hC,{size:14}),"ask agent"]})]})})]})}),W8={theme:Eh,themeType:"dark",diffStyle:"unified",diffIndicators:"none",hunkSeparators:"line-info-basic",lineDiffType:"word-alt",disableFileHeader:!0,overflow:"wrap",unsafeCSS:[":host { --diffs-dark-bg: var(--bg); --diffs-bg: var(--bg); --diffs-annotation-bg-override: color-mix(in srgb, var(--bg) 96%, var(--text)); --diffs-bg-separator-override: color-mix(in srgb, var(--bg) 92%, var(--text)); --diffs-bg-context-override: var(--diffs-annotation-bg-override); --diffs-bg-context-gutter-override: var(--diffs-annotation-bg-override); font-weight: var(--font-weight-code); }","pre { background-color: var(--bg) !important; --diffs-bg: var(--bg) !important; }","[data-line-annotation], [data-gutter-buffer='annotation'] { --diffs-annotation-bg: var(--diffs-annotation-bg-override); }","[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(" ")},J8=te.memo(function({file:t,diffStyle:i,overflowMode:a,codeTheme:o,collapsed:s,viewed:c,annotations:d,unresolvedThreadCount:f,renderReady:h,onToggleCollapsed:y,onToggleViewed:m,onLineActivate:b,onSaveDraft:v,onCancelDraft:S,onAddReply:k,onRequestAgent:D,onToggleResolved:C,onToggleThreadCollapsed:w,onDeleteThreadMessage:T}){const I=te.useMemo(()=>({...W8,theme:o,diffStyle:i==="split"?"split":"unified",overflow:a,onLineNumberClick:({lineNumber:U,annotationSide:ie})=>{b(t.id,U,ie)}}),[o,i,t.id,b,a]),B=te.useCallback(R=>{if(R.metadata.type==="draft")return z.jsx(Z8,{onSave:v,onCancel:S});const{thread:U}=R.metadata;return z.jsx(K8,{thread:U,onAddReply:(ie,ne)=>k(U.id,ie,ne),onRequestAgent:()=>D(U.id),onToggleResolved:ie=>C(U.id,ie),onToggleCollapsed:ie=>w(U.id,ie),onDeleteMessage:ie=>T(U.id,ie)})},[k,S,D,v,T,C,w]);return z.jsxs("section",{className:`file-section${s?" collapsed":""}`,id:`file-${t.id}`,children:[z.jsxs("div",{className:"file-header",children:[z.jsxs("button",{type:"button",className:"file-toggle",onClick:()=>y(t.id),"aria-label":s?"Expand file":"Collapse file",children:[s?z.jsx(Wx,{size:14}):z.jsx(Ev,{size:14}),z.jsx("span",{className:"file-path",children:t.displayPath}),f>0&&z.jsxs("span",{className:"file-thread-count","aria-label":`${f} unresolved comment thread${f===1?"":"s"}`,title:`${f} unresolved comment thread${f===1?"":"s"}`,children:[z.jsx(wv,{size:12}),z.jsx("span",{children:f})]})]}),z.jsxs("div",{className:"file-meta",children:[z.jsx(ep,{additions:t.additions,deletions:t.deletions}),z.jsx(Tu,{checked:c,label:"viewed",className:"viewed-checkbox",onChange:()=>m(t.id)})]})]}),!s&&z.jsx("div",{className:"file-body",children:h?z.jsx(Q8,{className:"diff-view",fileDiff:t.file,options:I,lineAnnotations:d,renderAnnotation:B}):z.jsx("div",{className:"diff-placeholder",children:"preparing diff…"})})]})});function eI({open:e,files:t,viewed:i,threads:a,selectedThreadId:o,onJumpToFile:s,onCreateDetachedThread:c,onOpenThread:d}){const f=nI(t);return z.jsxs("aside",{className:`sidebar${e?" open":""}`,children:[z.jsxs("section",{className:"sidebar-section",children:[z.jsxs("div",{className:"sidebar-section-header",children:[z.jsx("h2",{className:"sidebar-section-title",children:"conversations"}),z.jsx("button",{type:"button",className:"btn sidebar-action",onClick:c,children:"new thread"})]}),z.jsx("div",{className:"sidebar-conversations",children:a.length===0?z.jsx("p",{className:"sidebar-empty",children:"no conversations yet"}):a.map(h=>{const y=fI(h),m=h.loading?"active":"idle",b=h.anchor.kind==="line"?rC:oC,v=h.anchor.kind==="line"?"diff comment":"thread";return z.jsx("button",{type:"button",className:`sidebar-thread-item${o===h.id?" selected":""}${h.resolved?" resolved":""}`,onClick:()=>d(h),title:y,children:z.jsxs("span",{className:"sidebar-thread-row",children:[z.jsx(b,{className:"sidebar-thread-kind",size:13,"aria-label":v}),z.jsx("span",{className:"sidebar-thread-name",children:y}),z.jsx("span",{className:`sidebar-thread-status-dot ${m}`,"aria-label":m,title:m})]})},h.id)})})]}),z.jsx("div",{className:"sidebar-divider"}),z.jsxs("section",{className:"sidebar-section",children:[z.jsx("div",{className:"sidebar-section-header",children:z.jsx("h2",{className:"sidebar-section-title",children:"files"})}),z.jsx("div",{className:"sidebar-file-list",children:f.map((h,y)=>z.jsxs("div",{className:"sidebar-file-group",children:[z.jsx(tI,{directory:h.directory}),h.files.map(m=>z.jsx("button",{type:"button",className:`sidebar-item${i[m.id]?" viewed":""}`,onClick:()=>s(m.id),title:m.displayPath,children:z.jsxs("span",{className:"sidebar-row",children:[z.jsx("span",{className:`sidebar-file-status ${m.status}`,"aria-label":m.status,children:cI(m.status)}),z.jsx("span",{className:"sidebar-file-name",children:sI(m)}),z.jsx(ep,{additions:m.additions,deletions:m.deletions,className:"sidebar-stats"})]})},m.id))]},`${h.directory}:${y}`))})]})]})}function tI({directory:e}){const t=te.useRef(null),[i,a]=te.useState(()=>aI(e)),o=te.useMemo(()=>rI(),[]);return te.useLayoutEffect(()=>{const s=t.current;if(!s)return;const c=()=>{const f=window.getComputedStyle(s);a(lI(e,s.clientWidth,f.font,o))};c();const d=new ResizeObserver(c);return d.observe(s),()=>{d.disconnect()}},[e,o]),z.jsx("div",{ref:t,className:"sidebar-file-directory",title:e,children:i})}function nI(e){const t=[];for(const i of e){const a=iI(i.newRepoPath),o=t[t.length-1];if(o?.directory===a){o.files.push(i);continue}t.push({directory:a,files:[i]})}return t}function iI(e){const t=e.lastIndexOf("/");return t<0?"./":`${e.slice(0,t)}/`}function rI(){const t=document.createElement("canvas").getContext("2d");return(i,a)=>t?(t.font=a,t.measureText(i).width):i.length*8}function aI(e){const t=Z1(e);return t.length<=2?e:`${t[0]}/…/${t[t.length-1]}/`}function lI(e,t,i,a){const o=oI(e);for(const s of o)if(a(s,i)<=t)return s;return o[o.length-1]??e}function oI(e){const t=Z1(e),i=[e];return t.length>2&&(i.push(`${t[0]}/…/${t.slice(1).join("/")}/`),i.push(`${t[0]}/…/${t.slice(-2).join("/")}/`),i.push(`${t[0]}/…/${t[t.length-1]}/`)),t.length>0&&i.push(`…/${t[t.length-1]}/`),[...new Set(i)]}function Z1(e){return e==="./"?[]:e.split("/").filter(Boolean)}function sI(e){return uI(e.newRepoPath)}function uI(e){const t=e.lastIndexOf("/");return t<0?e:e.slice(t+1)}function cI(e){switch(e){case"added":return"A";case"deleted":return"D";case"renamed":return"R";case"copied":return"C";case"type-changed":return"T";case"unmerged":return"U";case"modified":return"M";case"unknown":return"?"}}function fI(e){const t=e.messages.find(a=>a.role==="user"),i=dI(t?.text??"");return i?i.length<=128?i:`${i.slice(0,125).trimEnd()}…`:"new conversation"}function dI(e){return e.replace(/\s+/g," ").trim()}function hI({value:e,options:t,onChange:i}){return z.jsx("div",{className:"toggle-group",role:"radiogroup",children:t.map(a=>z.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))})}const pI=48;function mI(e,t){const i=e?.trim();if(!i)return;const a=t??[];if(a.length===0||i==="current working tree")return{label:"current working tree",title:i};if(i.length<=pI)return{label:i,title:i};const o=a.indexOf("--"),s=o>=0?a.slice(0,o):a,c=o>=0?a.slice(o+1):[],d=s.find(f=>f!=="--"&&!f.startsWith("-"));return d&&c.length>0?{label:`${d} · ${bv(c.length)}`,title:i}:d?{label:`git diff ${d}`,title:i}:c.length>0?{label:`working tree · ${bv(c.length)}`,title:i}:{label:"custom diff",title:i}}function bv(e){return`${e} path${e===1?"":"s"}`}function gI({fileCount:e,viewedCount:t,additions:i,deletions:a,commentCount:o,diffArgs:s,diffCommand:c,diffStyle:d,overflowMode:f,sidebarOpen:h,finished:y,status:m,briefLoading:b,hasBrief:v,hasUnresolvedFileThreads:S,onBriefClick:k,onToggleSidebar:D,onExpandAll:C,onExpandUnresolved:w,onCollapseViewed:T,onCollapseAll:I,onDiffStyleChange:B,onOverflowModeChange:R,onSubmit:U,onOpenSubmitPopover:ie,onCancel:ne}){const ae=d==="split"?"split":"stacked",W=f==="scroll"?"scroll":"wrap",F=e>0?Math.round(t/e*100):0,J=mI(c,s);return z.jsxs("header",{className:"top-bar",children:[z.jsxs("div",{className:"top-bar-left",children:[z.jsx(xa,{icon:uC,label:"Toggle sidebar",className:h?"active":"",onClick:D}),z.jsxs("button",{type:"button",className:"btn top-bar-action top-bar-brief-action",onClick:k,disabled:b,children:[z.jsx(fC,{size:14}),b?"generating brief…":v?"view brief":"brief"]}),z.jsxs("div",{className:"top-bar-diff-meta","aria-label":`${i} additions and ${a} deletions${J?`, ${J.title}`:""}`,children:[z.jsx(ep,{additions:i,deletions:a}),J&&z.jsx("span",{className:"top-bar-meta top-bar-meta-dim top-bar-diff-command",title:J.title,children:J.label})]})]}),z.jsxs("div",{className:"top-bar-right",children:[z.jsxs("div",{className:"top-bar-viewed","aria-label":`${t} of ${e} viewed, ${o} unresolved comments`,children:[z.jsx("span",{className:"top-bar-viewed-ring",style:{background:`conic-gradient(var(--accent-add) ${F}%, var(--border) ${F}% 100%)`},"aria-hidden":"true",children:z.jsx("span",{className:"top-bar-viewed-ring-inner"})}),z.jsxs("span",{className:"top-bar-viewed-text",children:[t," of ",e," viewed"]})]}),m&&z.jsx("span",{className:"top-bar-meta top-bar-status",children:m}),z.jsxs("div",{className:"btn-group",children:[z.jsx(xa,{icon:Cv,label:"Expand all files",onClick:C}),z.jsx(xa,{icon:wv,label:"Expand files with unresolved threads",onClick:w,disabled:!S}),z.jsx(xa,{icon:nC,label:"Collapse viewed files",onClick:T}),z.jsx(xa,{icon:xv,label:"Collapse all files",onClick:I})]}),z.jsxs("button",{type:"button",className:`top-bar-toggle${W==="wrap"?" active":""}`,onClick:()=>R(W==="wrap"?"scroll":"wrap"),"aria-pressed":W==="wrap","aria-label":"Toggle wrapped diff lines",children:[z.jsx("span",{className:"top-bar-toggle-switch","aria-hidden":"true",children:z.jsx("span",{className:"top-bar-toggle-thumb"})}),z.jsx("span",{className:"top-bar-toggle-label",children:"wrap"})]}),z.jsx(hI,{value:ae,options:[{value:"split",label:"split"},{value:"stacked",label:"stacked"}],onChange:B}),z.jsxs("div",{className:"top-bar-submit-group",children:[z.jsx("button",{type:"button",className:"btn top-bar-action top-bar-action-primary top-bar-submit-main",onClick:U,disabled:y,children:"submit"}),z.jsx("button",{type:"button",className:"btn top-bar-action top-bar-action-primary top-bar-submit-menu",onClick:K=>ie(K.currentTarget.getBoundingClientRect()),disabled:y,"aria-label":"submit with message",children:z.jsx(Ev,{size:14})})]}),z.jsx("button",{type:"button",className:"btn top-bar-action top-bar-action-cancel",onClick:ne,disabled:y,"aria-label":"cancel",children:z.jsx(Tv,{size:14,strokeWidth:2.25})})]})]})}function yI(e,t,i){if(!e.trim())return[];const a=s8(e,i),o=vI(t);let s=0;return a.flatMap(c=>c.files.map(d=>{const f=_I(d,o);return{id:d.cacheKey??`${d.name}::${s++}`,file:d,displayPath:f.displayPath,status:f.status,oldRepoPath:f.oldRepoPath,newRepoPath:f.newRepoPath,additions:vv(d,"additions"),deletions:vv(d,"deletions")}}))}function bI(e){return e.prevName&&e.prevName!==e.name?"renamed":"modified"}function vv(e,t){return e.hunks.reduce((i,a)=>i+a.hunkContent.reduce((o,s)=>o+(s.type==="change"?s[t]:0),0),0)}function vI(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,status:i.status,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 _I(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,status:bI(e),oldRepoPath:e.prevName,newRepoPath:e.name}}function SI(e,t){const[i,a]=te.useState(!1);return te.useEffect(()=>{if(e.length===0){a(!1);return}let o=!0;return a(!1),EI(e,t).then(()=>{o&&a(!0)}),()=>{o=!1}},[t,e]),i}async function EI(e,t){await Promise.all([document.fonts?.ready??Promise.resolve(),_O({themes:[t],langs:xI(e)}).catch(()=>{})])}function xI(e){const t=new Set;for(const i of e)t.add(i.file.lang??tr(i.file.name));return[...t]}const CI=[];function wI(){const[e,t]=te.useState(null),[i,a]=te.useState(null),[o,s]=te.useState(Rx),[c,d]=te.useState(null),[f,h]=te.useState(""),[y,m]=te.useState(!1),[b,v]=te.useState(null),[S,k]=te.useState(!1),[D,C]=te.useState(""),[w,T]=te.useState(!1),[I,B]=te.useState(!1),[R,U]=te.useState(null),[ie,ne]=te.useState(""),ae=te.useRef(null),W=te.useRef(null),F=te.useRef(0),J=te.useCallback(le=>{s(Nx(le))},[]),K=te.useCallback(async(le,ye={})=>{try{const we=await le;J(we.state)}catch(we){ye.onError?.(),C(we instanceof Error?we.message:String(we))}},[J]),Y=te.useCallback((le,ye)=>{K(Sx(le),ye)},[K]),H=te.useCallback((le,ye)=>{s(we=>Ux(we,le,ye))},[]),q=te.useCallback(le=>{s(ye=>Bx(ye,le))},[]),oe=te.useCallback(async le=>{H(le,!0);try{const ye=await Ex(le);J(ye.state)}catch(ye){H(le,!1),C(ye instanceof Error?ye.message:String(ye))}},[J,H]);te.useEffect(()=>{let le=!0;return(async()=>{try{const we=await vx();if(!we.state)throw new Error("diff tool bootstrap response did not include review state");if(!le)return;t(we),J(we.state);const Fe=await _x();le&&a(Fe)}catch(we){le&&C(we instanceof Error?we.message:String(we))}})(),()=>{le=!1}},[J]);const de=i&&"patch"in i?i.patch:"",L=te.useMemo(()=>yI(de,e?.files,e?.context.sessionId),[de,e]),O=D||(i?"no changes to review":"loading…"),X=SI(L,o.codeTheme),A=te.useMemo(()=>ly(o.collapsedFileIds),[o.collapsedFileIds]),ce=te.useMemo(()=>ly(o.viewedFileIds),[o.viewedFileIds]),me=te.useMemo(()=>o.threads.filter(le=>!le.resolved),[o.threads]),he=me.length,Ee=te.useMemo(()=>[...o.threads].reverse(),[o.threads]),ze=te.useMemo(()=>o.threads.filter(Ox),[o.threads]),ge=te.useMemo(()=>b?.mode!=="thread"?null:ze.find(le=>le.id===b.threadId)??null,[b,ze]),He=te.useMemo(()=>Xf(me.filter(xh).map(le=>le.anchor.fileId)),[me]),$e=te.useMemo(()=>Hx(me),[me]),At=o.brief.content.trim().length>0,Et=te.useMemo(()=>L.reduce(Mx,{additions:0,deletions:0}),[L]),We=te.useCallback((le,ye="smooth")=>{document.getElementById(`file-${le}`)?.scrollIntoView({behavior:ye,block:"start"})},[]),jt=te.useCallback(le=>{Y({collapsedFileIds:oy(o.collapsedFileIds,le)})},[Y,o.collapsedFileIds]),rt=te.useCallback(le=>{const ye=oy(o.viewedFileIds,le),we=ye.includes(le),Fe=we?Xf([...o.collapsedFileIds,le]):o.collapsedFileIds;W.current=we&&!o.collapsedFileIds.includes(le)?le:null,Y({viewedFileIds:ye,collapsedFileIds:Fe},{onError:()=>{W.current=null}})},[Y,o.collapsedFileIds,o.viewedFileIds]),In=te.useCallback(()=>{Y({collapsedFileIds:[]})},[Y]),zn=te.useCallback(()=>{Y({collapsedFileIds:L.map(le=>le.id)})},[Y,L]),xi=te.useCallback(()=>{if(He.length===0)return;const le=new Set(He);Y({collapsedFileIds:o.collapsedFileIds.filter(ye=>!le.has(ye))})},[Y,He,o.collapsedFileIds]),Ci=te.useCallback(()=>{Y({collapsedFileIds:Xf([...o.collapsedFileIds,...o.viewedFileIds])})},[Y,o.collapsedFileIds,o.viewedFileIds]);te.useLayoutEffect(()=>{const le=W.current;le&&(W.current=null,We(le,"auto"))},[o.collapsedFileIds,We]);const ir=te.useCallback((le,ye,we)=>{d(Fe=>Fe&&Fe.fileId===le&&Fe.lineNumber===ye&&Fe.side===we?Fe:{fileId:le,lineNumber:ye,side:we})},[]),Va=te.useCallback((le,ye)=>{if(!c)return;const we=le.trim();if(!we){d(null);return}const Fe={kind:"line",fileId:c.fileId,filePath:Vx(c,L),lineNumber:c.lineNumber,side:c.side};(async()=>{try{const Jn=await ay({body:we,anchor:Fe});if(J(Jn.state),d(null),!ye)return;await oe(Jn.threadId)}catch(Jn){C(Jn instanceof Error?Jn.message:String(Jn))}})()},[J,c,L,oe]),ja=te.useCallback(()=>d(null),[]),Lt=te.useCallback(()=>{F.current+=1,h(""),m(!1),v({mode:"new"})},[]),Lr=te.useCallback(le=>{F.current+=1,h(""),m(!1),v({mode:"thread",threadId:le})},[]),Q=te.useCallback(()=>{F.current+=1,h(""),m(!1),v(null)},[]);te.useEffect(()=>{b?.mode==="thread"&&!ge&&Q()},[Q,b,ge]);const ue=te.useCallback(le=>{if(le.anchor.kind==="detached"){Lr(le.id);return}Q();const ye=le.anchor.fileId;if(o.collapsedFileIds.includes(ye)){W.current=ye,Y({collapsedFileIds:o.collapsedFileIds.filter(we=>we!==ye)});return}We(ye)},[Y,Q,Lr,o.collapsedFileIds,We]),_e=te.useCallback(le=>{h(le)},[]),Te=te.useCallback(le=>F.current!==le?!1:(h(""),m(!1),!0),[]),Pe=te.useCallback(async()=>{const le=f.trim();if(!le)return;const ye=!y,we=F.current;C("");try{if(b?.mode==="thread"){const Pn=await Yf({id:b.threadId,text:le});if(J(Pn.state),!Te(we)||!ye)return;await oe(b.threadId);return}const Fe=await ay({body:le,anchor:{kind:"detached"}});if(J(Fe.state),!Te(we)||(v({mode:"thread",threadId:Fe.threadId}),!ye))return;await oe(Fe.threadId)}catch(Fe){C(Fe instanceof Error?Fe.message:String(Fe))}},[J,f,y,b,oe,Te]),Bt=te.useCallback((le,ye,we)=>{if(!we){K(Yf({id:le,text:ye}));return}(async()=>{try{const Pn=await Yf({id:le,text:ye});J(Pn.state),await oe(le)}catch(Pn){C(Pn instanceof Error?Pn.message:String(Pn))}})()},[J,oe,K]),Tn=te.useCallback(le=>{C(""),oe(le)},[oe]),xt=te.useCallback(()=>{C(""),q(!0),K(kx(),{onError:()=>{q(!1)}})},[q,K]),at=te.useCallback((le,ye)=>{K(Cx({id:le,resolved:ye}))},[K]),It=te.useCallback((le,ye)=>{K(wx({id:le,collapsed:ye}))},[K]),Ge=te.useCallback((le,ye)=>{K(xx({id:le,messageIndex:ye}))},[K]),Hn=te.useMemo(()=>zx(o.threads),[o.threads]),en=te.useMemo(()=>c?{lineNumber:c.lineNumber,side:c.side,metadata:{type:"draft",draft:c}}:null,[c]),Au=te.useCallback(le=>{U(le),B(!0)},[]),Rr=te.useCallback(()=>{B(!1)},[]),Kn=te.useCallback(async le=>{k(!0),B(!1),C("Returning review…");try{await Tx(le),C("Review returned. You can close this tab.")}catch(ye){k(!1),C(ye instanceof Error?ye.message:String(ye))}},[]),Dr=te.useCallback(()=>{Kn("")},[Kn]),Wn=te.useCallback(()=>{Kn(ie)},[ie,Kn]);te.useEffect(()=>{if(!I)return;const le=we=>{const Fe=we.target;Fe instanceof Node&&ae.current?.contains(Fe)||B(!1)},ye=we=>{we.key==="Escape"&&B(!1)};return window.addEventListener("pointerdown",le),window.addEventListener("keydown",ye),()=>{window.removeEventListener("pointerdown",le),window.removeEventListener("keydown",ye)}},[I]);const Nr=te.useCallback(async()=>{k(!0),C("Cancelling…");try{await Ax(),C("Cancelled. You can close this tab.")}catch(le){k(!1),C(le instanceof Error?le.message:String(le))}},[]),rr=te.useCallback(()=>{if(At){T(!0);return}xt()},[At,xt]);return z.jsxs(z.Fragment,{children:[z.jsxs("div",{className:`app${o.sidebarOpen?" sidebar-open":""}`,children:[z.jsx(gI,{fileCount:L.length,viewedCount:o.viewedFileIds.length,additions:Et.additions,deletions:Et.deletions,commentCount:he,diffArgs:e?.context.diffArgs,diffCommand:e?.context.diffCommand,diffStyle:o.diffStyle,overflowMode:o.overflowMode,sidebarOpen:o.sidebarOpen,finished:S,status:D,briefLoading:o.brief.loading,hasBrief:At,hasUnresolvedFileThreads:He.length>0,onBriefClick:rr,onToggleSidebar:()=>{Y({sidebarOpen:!o.sidebarOpen})},onExpandAll:In,onExpandUnresolved:xi,onCollapseViewed:Ci,onCollapseAll:zn,onDiffStyleChange:le=>{Y({diffStyle:le})},onOverflowModeChange:le=>{Y({overflowMode:le})},onSubmit:Dr,onOpenSubmitPopover:Au,onCancel:Nr}),z.jsx(eI,{open:o.sidebarOpen,files:L,viewed:ce,threads:Ee,selectedThreadId:b?.mode==="thread"?b.threadId:null,onJumpToFile:We,onCreateDetachedThread:Lt,onOpenThread:ue}),z.jsxs("main",{className:"content",children:[L.length===0&&z.jsx("div",{className:"empty",children:O}),L.map(le=>{const ye=Hn.get(le.id)??CI,we=Px(ye,le.id,c,en);return z.jsx(J8,{file:le,diffStyle:o.diffStyle,overflowMode:o.overflowMode,codeTheme:o.codeTheme,collapsed:A[le.id]??!1,viewed:ce[le.id]??!1,annotations:we,unresolvedThreadCount:$e.get(le.id)??0,renderReady:X,onToggleCollapsed:jt,onToggleViewed:rt,onLineActivate:ir,onSaveDraft:Va,onCancelDraft:ja,onAddReply:Bt,onRequestAgent:Tn,onToggleResolved:at,onToggleThreadCollapsed:It,onDeleteThreadMessage:Ge},le.id)})]})]}),z.jsx(EN,{open:w,content:o.brief.content,loading:o.brief.loading,onClose:()=>T(!1)}),I&&R?z.jsxs("div",{ref:ae,className:"submit-popover",style:{top:R.bottom+6,right:window.innerWidth-R.right},children:[z.jsx("textarea",{className:"text-input-area submit-popover-input",value:ie,onChange:le=>ne(le.target.value),placeholder:"Optional message…",rows:5}),z.jsxs("div",{className:"submit-popover-actions",children:[z.jsx("button",{type:"button",className:"btn ghost",onClick:Rr,children:"cancel"}),z.jsx("button",{type:"button",className:"btn primary",disabled:S,onClick:Wn,children:"submit"})]})]}):null,z.jsx(xN,{open:b!==null,thread:ge,body:f,skipAgentResponse:y,onBodyChange:_e,onSkipAgentResponseChange:m,onSubmit:Pe,onClose:Q,onToggleResolved:le=>{ge&&at(ge.id,le)},onDeleteMessage:le=>{ge&&Ge(ge.id,le)}}),null]})}yx.createRoot(document.getElementById("root")).render(z.jsx(te.StrictMode,{children:z.jsx(wI,{})}));