comprehende 0.5.4 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/api/agent-md.js +10 -9
- package/dist/api/live.js +16 -2
- package/dist/cli/args.js +1 -1
- package/dist/cli/commands.js +5 -2
- package/dist/cli/main.js +5 -6
- package/dist/git/exec.js +22 -0
- package/dist/git/lfs.js +2 -6
- package/dist/git/repo.js +9 -3
- package/dist/review/pins.js +30 -0
- package/dist/schema/parse.js +206 -20
- package/dist/schema/skill-sync.js +3 -1
- package/dist/schema/source.js +89 -0
- package/dist/schema/types.js +8 -0
- package/dist/ui/assets/bricolage-grotesque-latin-ext-opsz-normal-IcJDqblK.woff2 +0 -0
- package/dist/ui/assets/bricolage-grotesque-latin-opsz-normal-Cre6nC2_.woff2 +0 -0
- package/dist/ui/assets/bricolage-grotesque-vietnamese-opsz-normal-D9N6E8K1.woff2 +0 -0
- package/dist/ui/assets/index-C1EoRByu.css +1 -0
- package/dist/ui/assets/index-su33x8uU.js +1713 -0
- package/dist/ui/index.html +2 -2
- package/package.json +3 -3
- package/skills/comprehende/SKILL.md +33 -15
- package/skills/comprehende/references/example.md +10 -5
- package/skills/comprehende/references/review.schema.json +95 -27
- package/dist/ui/assets/index-BQTydqt9.css +0 -1
- package/dist/ui/assets/index-COQ0_ea8.js +0 -1713
- package/dist/ui/assets/source-serif-4-cyrillic-400-normal-B8Z6Jvzv.woff +0 -0
- package/dist/ui/assets/source-serif-4-cyrillic-400-normal-C44pakCn.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-cyrillic-600-normal-BDP5YDHD.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-cyrillic-600-normal-DFnC3vAY.woff +0 -0
- package/dist/ui/assets/source-serif-4-cyrillic-ext-400-normal-CWV284fw.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-cyrillic-ext-400-normal-DLkyKLvH.woff +0 -0
- package/dist/ui/assets/source-serif-4-cyrillic-ext-600-normal-D_E8FDgP.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-cyrillic-ext-600-normal-DiT2IGQm.woff +0 -0
- package/dist/ui/assets/source-serif-4-greek-400-normal-BccYJ-vZ.woff +0 -0
- package/dist/ui/assets/source-serif-4-greek-400-normal-Cw5-AHNN.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-greek-600-normal-DdRkKr-1.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-greek-600-normal-DhXQw1Kl.woff +0 -0
- package/dist/ui/assets/source-serif-4-latin-400-normal-DJ5YJwmz.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-latin-400-normal-Dn3IlU-Z.woff +0 -0
- package/dist/ui/assets/source-serif-4-latin-600-normal-DMD1h6_f.woff +0 -0
- package/dist/ui/assets/source-serif-4-latin-600-normal-DouSKlru.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-latin-ext-400-normal-CEpydyUl.woff +0 -0
- package/dist/ui/assets/source-serif-4-latin-ext-400-normal-Cp7z-ARB.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-latin-ext-600-normal-0sIUyHMO.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-latin-ext-600-normal-C6NNqpJh.woff +0 -0
- package/dist/ui/assets/source-serif-4-vietnamese-400-normal-BbG3LG1A.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-vietnamese-400-normal-DR1UuFon.woff +0 -0
- package/dist/ui/assets/source-serif-4-vietnamese-600-normal-B0WJbuqT.woff +0 -0
- package/dist/ui/assets/source-serif-4-vietnamese-600-normal-CznyfUKR.woff2 +0 -0
|
@@ -1,1713 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-DA-rfuFy.js","./html-pp8916En.js","./javascript-wDzz0qaB.js","./css-CLj8gQPS.js","./angular-ts-BrjP3tb8.js","./scss-D5BDwBP9.js","./apl-CORt7UWP.js","./xml-sdJ4AIDG.js","./java-CylS5w8V.js","./json-Cp-IABpG.js","./astro-HNnZUWAn.js","./typescript-BPQ3VLAy.js","./postcss-CXtECtnM.js","./tsx-COt5Ahok.js","./blade-2xfisSek.js","./html-derivative-DlHx6ybY.js","./sql-CRqJ_cUM.js","./bsl-DlhNcFeZ.js","./sdbl-DVxCFoDh.js","./cairo-KRGpt6FW.js","./python-B6aJPvgy.js","./chapel-DTp_pixX.js","./c-BIGW1oBm.js","./cobol-nBiQ_Alo.js","./coffee-Ch7k5sss.js","./cpp-BMRokrvK.js","./regexp-CDVJQ6XC.js","./glsl-DplSGwfg.js","./crystal-DGywbUpC.js","./shellscript-Yzrsuije.js","./edge-FbVlp4U3.js","./elixir-CkH2-t6x.js","./elm-DbKCFpqz.js","./erb-DXfck5VN.js","./ruby-C0TQ7zu5.js","./haml-D5jkg6IW.js","./graphql-ChdNCCLP.js","./jsx-g9-lgVsj.js","./lua-BaeVxFsk.js","./yaml-Buea-lGh.js","./erlang-DsQrWhSR.js","./markdown-Cvjx9yec.js","./fortran-fixed-form-CkoXwp7k.js","./fortran-free-form-BxgE0vQu.js","./fsharp-CXgrBDvD.js","./gdresource-TyuKm33G.js","./gdshader-DkwncUOv.js","./gdscript-DqcFQ5yU.js","./git-commit-F4YmCXRG.js","./diff-D97Zzqfu.js","./git-rebase-r7XF79zn.js","./glimmer-js-ByusRIyA.js","./glimmer-ts-BfAWNZQY.js","./hack-BWmVpMyf.js","./handlebars-BpdQsYii.js","./http-jrhK8wxY.js","./hurl-irOxFIW8.js","./csv-fuZLfV_i.js","./hxml-2-FPmUDs.js","./haxe-CfZj7gIn.js","./jinja-f2NsQr07.js","./jison-wvAkD_A8.js","./julia-5Bft2YPA.js","./r-Cf5RLm7j.js","./just-Cwhn7H3k.js","./perl-B9cMNwum.js","./latex-D5pSuvFb.js","./tex-D96PA37w.js","./liquid-C0sCDyMI.js","./marko-DjSrsDqO.js","./less-B1dDrJ26.js","./mdc-D1_yUvq7.js","./nextflow-C-mBbutL.js","./nextflow-groovy-vE_lwT2v.js","./nginx-BpAMiNFr.js","./nim-BIad80T-.js","./org-DM6o9KBp.js","./ini-BEwlwnbL.js","./make-CHLpvVh8.js","./php-Csjmro_R.js","./vb-Cu-pLBUe.js","./clojure-P80f7IUj.js","./objective-c-DXmwc3jG.js","./docker-BcOcwvcX.js","./go-C27-OAKa.js","./groovy-gcz8RCvz.js","./raku-DXvB9xmW.js","./rust-B1yitclQ.js","./scala-CqE71os6.js","./csharp-DSvCPggb.js","./dart-bE4Kk8sk.js","./ocaml-C0hk2d4L.js","./zig-VOosw3JB.js","./xsl-CtQFsRM5.js","./pug-DKIMFp6K.js","./qml-3beO22l8.js","./razor-BjBPvh-w.js","./rst-bs7f0vWN.js","./cmake-D1j8_8rp.js","./sas-DEy46yEz.js","./shaderlab-Dg9Lc6iA.js","./hlsl-D3lLCCz7.js","./shellsession-BADoaaVG.js","./soy-8wufbnw4.js","./sparql-rVzFXLq3.js","./turtle-BsS91CYL.js","./stata-DI20mbqo.js","./surrealql-Cjom0U5J.js","./svelte-Cy7k_4gC.js","./templ-DhtptRzy.js","./ts-tags-D351s5mN.js","./twig-27uCiNez.js","./typst-BUadGCkm.js","./bat-CickPsom.js","./bibtex-CHM0blh-.js","./jsonc-Des-eS-w.js","./log-2UxHyX5q.js","./powershell-BmBUJMz7.js","./swift-C2oV4EkX.js","./verilog-nZwndyjY.js","./system-verilog-0hqHdDBg.js","./vue-BqiEGhQt.js","./vue-html-AaS7Mt5G.js","./vue-vine-BoDAl6tE.js","./stylus-BEDo0Tqx.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
function dO(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(i,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>i[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function n(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 i(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();function Bd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rp={exports:{}},Xs={};var Kx;function fO(){if(Kx)return Xs;Kx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(i,o,s){var l=null;if(s!==void 0&&(l=""+s),o.key!==void 0&&(l=""+o.key),"key"in o){s={};for(var c in o)c!=="key"&&(s[c]=o[c])}else s=o;return o=s.ref,{$$typeof:e,type:i,key:l,ref:o!==void 0?o:null,props:s}}return Xs.Fragment=t,Xs.jsx=n,Xs.jsxs=n,Xs}var Qx;function hO(){return Qx||(Qx=1,Rp.exports=fO()),Rp.exports}var T=hO(),Op={exports:{}},Ee={};var Zx;function pO(){if(Zx)return Ee;Zx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function v(H){return H===null||typeof H!="object"?null:(H=g&&H[g]||H["@@iterator"],typeof H=="function"?H:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,w={};function _(H,Y,I){this.props=H,this.context=Y,this.refs=w,this.updater=I||x}_.prototype.isReactComponent={},_.prototype.setState=function(H,Y){if(typeof H!="object"&&typeof H!="function"&&H!=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,H,Y,"setState")},_.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function C(){}C.prototype=_.prototype;function k(H,Y,I){this.props=H,this.context=Y,this.refs=w,this.updater=I||x}var D=k.prototype=new C;D.constructor=k,S(D,_.prototype),D.isPureReactComponent=!0;var M=Array.isArray;function O(){}var z={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function F(H,Y,I){var le=I.ref;return{$$typeof:e,type:H,key:Y,ref:le!==void 0?le:null,props:I}}function ee(H,Y){return F(H.type,Y,H.props)}function q(H){return typeof H=="object"&&H!==null&&H.$$typeof===e}function U(H){var Y={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(I){return Y[I]})}var Z=/\/+/g;function X(H,Y){return typeof H=="object"&&H!==null&&H.key!=null?U(""+H.key):Y.toString(36)}function W(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(O,O):(H.status="pending",H.then(function(Y){H.status==="pending"&&(H.status="fulfilled",H.value=Y)},function(Y){H.status==="pending"&&(H.status="rejected",H.reason=Y)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function P(H,Y,I,le,fe){var re=typeof H;(re==="undefined"||re==="boolean")&&(H=null);var ce=!1;if(H===null)ce=!0;else switch(re){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(H.$$typeof){case e:case t:ce=!0;break;case p:return ce=H._init,P(ce(H._payload),Y,I,le,fe)}}if(ce)return fe=fe(H),ce=le===""?"."+X(H,0):le,M(fe)?(I="",ce!=null&&(I=ce.replace(Z,"$&/")+"/"),P(fe,Y,I,"",function(ze){return ze})):fe!=null&&(q(fe)&&(fe=ee(fe,I+(fe.key==null||H&&H.key===fe.key?"":(""+fe.key).replace(Z,"$&/")+"/")+ce)),Y.push(fe)),1;ce=0;var xe=le===""?".":le+":";if(M(H))for(var pe=0;pe<H.length;pe++)le=H[pe],re=xe+X(le,pe),ce+=P(le,Y,I,re,fe);else if(pe=v(H),typeof pe=="function")for(H=pe.call(H),pe=0;!(le=H.next()).done;)le=le.value,re=xe+X(le,pe++),ce+=P(le,Y,I,re,fe);else if(re==="object"){if(typeof H.then=="function")return P(W(H),Y,I,le,fe);throw Y=String(H),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return ce}function $(H,Y,I){if(H==null)return H;var le=[],fe=0;return P(H,le,"","",function(re){return Y.call(I,re,fe++)}),le}function ne(H){if(H._status===-1){var Y=H._result;Y=Y(),Y.then(function(I){(H._status===0||H._status===-1)&&(H._status=1,H._result=I)},function(I){(H._status===0||H._status===-1)&&(H._status=2,H._result=I)}),H._status===-1&&(H._status=0,H._result=Y)}if(H._status===1)return H._result.default;throw H._result}var ue=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},R={map:$,forEach:function(H,Y,I){$(H,function(){Y.apply(this,arguments)},I)},count:function(H){var Y=0;return $(H,function(){Y++}),Y},toArray:function(H){return $(H,function(Y){return Y})||[]},only:function(H){if(!q(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return Ee.Activity=m,Ee.Children=R,Ee.Component=_,Ee.Fragment=n,Ee.Profiler=o,Ee.PureComponent=k,Ee.StrictMode=i,Ee.Suspense=d,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,Ee.__COMPILER_RUNTIME={__proto__:null,c:function(H){return z.H.useMemoCache(H)}},Ee.cache=function(H){return function(){return H.apply(null,arguments)}},Ee.cacheSignal=function(){return null},Ee.cloneElement=function(H,Y,I){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var le=S({},H.props),fe=H.key;if(Y!=null)for(re in Y.key!==void 0&&(fe=""+Y.key),Y)!j.call(Y,re)||re==="key"||re==="__self"||re==="__source"||re==="ref"&&Y.ref===void 0||(le[re]=Y[re]);var re=arguments.length-2;if(re===1)le.children=I;else if(1<re){for(var ce=Array(re),xe=0;xe<re;xe++)ce[xe]=arguments[xe+2];le.children=ce}return F(H.type,fe,le)},Ee.createContext=function(H){return H={$$typeof:l,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:s,_context:H},H},Ee.createElement=function(H,Y,I){var le,fe={},re=null;if(Y!=null)for(le in Y.key!==void 0&&(re=""+Y.key),Y)j.call(Y,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(fe[le]=Y[le]);var ce=arguments.length-2;if(ce===1)fe.children=I;else if(1<ce){for(var xe=Array(ce),pe=0;pe<ce;pe++)xe[pe]=arguments[pe+2];fe.children=xe}if(H&&H.defaultProps)for(le in ce=H.defaultProps,ce)fe[le]===void 0&&(fe[le]=ce[le]);return F(H,re,fe)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(H){return{$$typeof:c,render:H}},Ee.isValidElement=q,Ee.lazy=function(H){return{$$typeof:p,_payload:{_status:-1,_result:H},_init:ne}},Ee.memo=function(H,Y){return{$$typeof:f,type:H,compare:Y===void 0?null:Y}},Ee.startTransition=function(H){var Y=z.T,I={};z.T=I;try{var le=H(),fe=z.S;fe!==null&&fe(I,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(O,ue)}catch(re){ue(re)}finally{Y!==null&&I.types!==null&&(Y.types=I.types),z.T=Y}},Ee.unstable_useCacheRefresh=function(){return z.H.useCacheRefresh()},Ee.use=function(H){return z.H.use(H)},Ee.useActionState=function(H,Y,I){return z.H.useActionState(H,Y,I)},Ee.useCallback=function(H,Y){return z.H.useCallback(H,Y)},Ee.useContext=function(H){return z.H.useContext(H)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(H,Y){return z.H.useDeferredValue(H,Y)},Ee.useEffect=function(H,Y){return z.H.useEffect(H,Y)},Ee.useEffectEvent=function(H){return z.H.useEffectEvent(H)},Ee.useId=function(){return z.H.useId()},Ee.useImperativeHandle=function(H,Y,I){return z.H.useImperativeHandle(H,Y,I)},Ee.useInsertionEffect=function(H,Y){return z.H.useInsertionEffect(H,Y)},Ee.useLayoutEffect=function(H,Y){return z.H.useLayoutEffect(H,Y)},Ee.useMemo=function(H,Y){return z.H.useMemo(H,Y)},Ee.useOptimistic=function(H,Y){return z.H.useOptimistic(H,Y)},Ee.useReducer=function(H,Y,I){return z.H.useReducer(H,Y,I)},Ee.useRef=function(H){return z.H.useRef(H)},Ee.useState=function(H){return z.H.useState(H)},Ee.useSyncExternalStore=function(H,Y,I){return z.H.useSyncExternalStore(H,Y,I)},Ee.useTransition=function(){return z.H.useTransition()},Ee.version="19.2.8",Ee}var Jx;function Xg(){return Jx||(Jx=1,Op.exports=pO()),Op.exports}var N=Xg();const mO=Bd(N),Il=dO({__proto__:null,default:mO},[N]);var Dp={exports:{}},Ks={},Mp={exports:{}},Ip={};var eS;function gO(){return eS||(eS=1,(function(e){function t(P,$){var ne=P.length;P.push($);e:for(;0<ne;){var ue=ne-1>>>1,R=P[ue];if(0<o(R,$))P[ue]=$,P[ne]=R,ne=ue;else break e}}function n(P){return P.length===0?null:P[0]}function i(P){if(P.length===0)return null;var $=P[0],ne=P.pop();if(ne!==$){P[0]=ne;e:for(var ue=0,R=P.length,H=R>>>1;ue<H;){var Y=2*(ue+1)-1,I=P[Y],le=Y+1,fe=P[le];if(0>o(I,ne))le<R&&0>o(fe,I)?(P[ue]=fe,P[le]=ne,ue=le):(P[ue]=I,P[Y]=ne,ue=Y);else if(le<R&&0>o(fe,ne))P[ue]=fe,P[le]=ne,ue=le;else break e}}return $}function o(P,$){var ne=P.sortIndex-$.sortIndex;return ne!==0?ne:P.id-$.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 l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],p=1,m=null,g=3,v=!1,x=!1,S=!1,w=!1,_=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function D(P){for(var $=n(f);$!==null;){if($.callback===null)i(f);else if($.startTime<=P)i(f),$.sortIndex=$.expirationTime,t(d,$);else break;$=n(f)}}function M(P){if(S=!1,D(P),!x)if(n(d)!==null)x=!0,O||(O=!0,U());else{var $=n(f);$!==null&&W(M,$.startTime-P)}}var O=!1,z=-1,j=5,F=-1;function ee(){return w?!0:!(e.unstable_now()-F<j)}function q(){if(w=!1,O){var P=e.unstable_now();F=P;var $=!0;try{e:{x=!1,S&&(S=!1,C(z),z=-1),v=!0;var ne=g;try{t:{for(D(P),m=n(d);m!==null&&!(m.expirationTime>P&&ee());){var ue=m.callback;if(typeof ue=="function"){m.callback=null,g=m.priorityLevel;var R=ue(m.expirationTime<=P);if(P=e.unstable_now(),typeof R=="function"){m.callback=R,D(P),$=!0;break t}m===n(d)&&i(d),D(P)}else i(d);m=n(d)}if(m!==null)$=!0;else{var H=n(f);H!==null&&W(M,H.startTime-P),$=!1}}break e}finally{m=null,g=ne,v=!1}$=void 0}}finally{$?U():O=!1}}}var U;if(typeof k=="function")U=function(){k(q)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,X=Z.port2;Z.port1.onmessage=q,U=function(){X.postMessage(null)}}else U=function(){_(q,0)};function W(P,$){z=_(function(){P(e.unstable_now())},$)}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(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(P){switch(g){case 1:case 2:case 3:var $=3;break;default:$=g}var ne=g;g=$;try{return P()}finally{g=ne}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(P,$){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var ne=g;g=P;try{return $()}finally{g=ne}},e.unstable_scheduleCallback=function(P,$,ne){var ue=e.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?ue+ne:ue):ne=ue,P){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=ne+R,P={id:p++,callback:$,priorityLevel:P,startTime:ne,expirationTime:R,sortIndex:-1},ne>ue?(P.sortIndex=ne,t(f,P),n(d)===null&&P===n(f)&&(S?(C(z),z=-1):S=!0,W(M,ne-ue))):(P.sortIndex=R,t(d,P),x||v||(x=!0,O||(O=!0,U()))),P},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(P){var $=g;return function(){var ne=g;g=$;try{return P.apply(this,arguments)}finally{g=ne}}}})(Ip)),Ip}var tS;function yO(){return tS||(tS=1,Mp.exports=gO()),Mp.exports}var Np={exports:{}},Vt={};var nS;function vO(){if(nS)return Vt;nS=1;var e=Xg();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(d,f,p){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:m==null?null:""+m,children:d,containerInfo:f,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Vt.createPortal=function(d,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return s(d,f,null,p)},Vt.flushSync=function(d){var f=l.T,p=i.p;try{if(l.T=null,i.p=2,d)return d()}finally{l.T=f,i.p=p,i.d.f()}},Vt.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,i.d.C(d,f))},Vt.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},Vt.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var p=f.as,m=c(p,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?i.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:v}):p==="script"&&i.d.X(d,{crossOrigin:m,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Vt.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=c(f.as,f.crossOrigin);i.d.M(d,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&i.d.M(d)},Vt.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,m=c(p,f.crossOrigin);i.d.L(d,p,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Vt.preloadModule=function(d,f){if(typeof d=="string")if(f){var p=c(f.as,f.crossOrigin);i.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else i.d.m(d)},Vt.requestFormReset=function(d){i.d.r(d)},Vt.unstable_batchedUpdates=function(d,f){return d(f)},Vt.useFormState=function(d,f,p){return l.H.useFormState(d,f,p)},Vt.useFormStatus=function(){return l.H.useHostTransitionStatus()},Vt.version="19.2.8",Vt}var iS;function Lw(){if(iS)return Np.exports;iS=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(),Np.exports=vO(),Np.exports}var rS;function bO(){if(rS)return Ks;rS=1;var e=yO(),t=Xg(),n=Lw();function i(r){var a="https://react.dev/errors/"+r;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+r+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function s(r){var a=r,u=r;if(r.alternate)for(;a.return;)a=a.return;else{r=a;do a=r,(a.flags&4098)!==0&&(u=a.return),r=a.return;while(r)}return a.tag===3?u:null}function l(r){if(r.tag===13){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function c(r){if(r.tag===31){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function d(r){if(s(r)!==r)throw Error(i(188))}function f(r){var a=r.alternate;if(!a){if(a=s(r),a===null)throw Error(i(188));return a!==r?null:r}for(var u=r,h=a;;){var y=u.return;if(y===null)break;var b=y.alternate;if(b===null){if(h=y.return,h!==null){u=h;continue}break}if(y.child===b.child){for(b=y.child;b;){if(b===u)return d(y),r;if(b===h)return d(y),a;b=b.sibling}throw Error(i(188))}if(u.return!==h.return)u=y,h=b;else{for(var E=!1,L=y.child;L;){if(L===u){E=!0,u=y,h=b;break}if(L===h){E=!0,h=y,u=b;break}L=L.sibling}if(!E){for(L=b.child;L;){if(L===u){E=!0,u=b,h=y;break}if(L===h){E=!0,h=b,u=y;break}L=L.sibling}if(!E)throw Error(i(189))}}if(u.alternate!==h)throw Error(i(190))}if(u.tag!==3)throw Error(i(188));return u.stateNode.current===u?r:a}function p(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r;for(r=r.child;r!==null;){if(a=p(r),a!==null)return a;r=r.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),k=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),ee=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function U(r){return r===null||typeof r!="object"?null:(r=q&&r[q]||r["@@iterator"],typeof r=="function"?r:null)}var Z=Symbol.for("react.client.reference");function X(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===Z?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case S:return"Fragment";case _:return"Profiler";case w:return"StrictMode";case M:return"Suspense";case O:return"SuspenseList";case F:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case x:return"Portal";case k:return r.displayName||"Context";case C:return(r._context.displayName||"Context")+".Consumer";case D:var a=r.render;return r=r.displayName,r||(r=a.displayName||a.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case z:return a=r.displayName||null,a!==null?a:X(r.type)||"Memo";case j:a=r._payload,r=r._init;try{return X(r(a))}catch{}}return null}var W=Array.isArray,P=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},ue=[],R=-1;function H(r){return{current:r}}function Y(r){0>R||(r.current=ue[R],ue[R]=null,R--)}function I(r,a){R++,ue[R]=r.current,r.current=a}var le=H(null),fe=H(null),re=H(null),ce=H(null);function xe(r,a){switch(I(re,a),I(fe,r),I(le,null),a.nodeType){case 9:case 11:r=(r=a.documentElement)&&(r=r.namespaceURI)?bx(r):0;break;default:if(r=a.tagName,a=a.namespaceURI)a=bx(a),r=xx(a,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Y(le),I(le,r)}function pe(){Y(le),Y(fe),Y(re)}function ze(r){r.memoizedState!==null&&I(ce,r);var a=le.current,u=xx(a,r.type);a!==u&&(I(fe,r),I(le,u))}function He(r){fe.current===r&&(Y(le),Y(fe)),ce.current===r&&(Y(ce),$s._currentValue=ne)}var st,je;function Ve(r){if(st===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);st=a&&a[1]||"",je=-1<u.stack.indexOf(`
|
|
3
|
-
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
-
`+st+r+je}var rt=!1;function en(r,a){if(!r||rt)return"";rt=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(a){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(te){var J=te}Reflect.construct(r,[],se)}else{try{se.call()}catch(te){J=te}r.call(se.prototype)}}else{try{throw Error()}catch(te){J=te}(se=r())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(te){if(te&&J&&typeof te.stack=="string")return[te.stack,J.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=h.DetermineComponentFrameRoot(),E=b[0],L=b[1];if(E&&L){var B=E.split(`
|
|
5
|
-
`),Q=L.split(`
|
|
6
|
-
`);for(y=h=0;h<B.length&&!B[h].includes("DetermineComponentFrameRoot");)h++;for(;y<Q.length&&!Q[y].includes("DetermineComponentFrameRoot");)y++;if(h===B.length||y===Q.length)for(h=B.length-1,y=Q.length-1;1<=h&&0<=y&&B[h]!==Q[y];)y--;for(;1<=h&&0<=y;h--,y--)if(B[h]!==Q[y]){if(h!==1||y!==1)do if(h--,y--,0>y||B[h]!==Q[y]){var ie=`
|
|
7
|
-
`+B[h].replace(" at new "," at ");return r.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",r.displayName)),ie}while(1<=h&&0<=y);break}}}finally{rt=!1,Error.prepareStackTrace=u}return(u=r?r.displayName||r.name:"")?Ve(u):""}function Bt(r,a){switch(r.tag){case 26:case 27:case 5:return Ve(r.type);case 16:return Ve("Lazy");case 13:return r.child!==a&&a!==null?Ve("Suspense Fallback"):Ve("Suspense");case 19:return Ve("SuspenseList");case 0:case 15:return en(r.type,!1);case 11:return en(r.type.render,!1);case 1:return en(r.type,!0);case 31:return Ve("Activity");default:return""}}function Ut(r){try{var a="",u=null;do a+=Bt(r,u),u=r,r=r.return;while(r);return a}catch(h){return`
|
|
8
|
-
Error generating stack: `+h.message+`
|
|
9
|
-
`+h.stack}}var Wt=Object.prototype.hasOwnProperty,dt=e.unstable_scheduleCallback,ni=e.unstable_cancelCallback,mf=e.unstable_shouldYield,gf=e.unstable_requestPaint,Yt=e.unstable_now,yf=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,he=e.unstable_UserBlockingPriority,_e=e.unstable_NormalPriority,Oe=e.unstable_LowPriority,$e=e.unstable_IdlePriority,mn=e.log,Ei=e.unstable_setDisableYieldValue,Xt=null,St=null;function tn(r){if(typeof mn=="function"&&Ei(r),St&&typeof St.setStrictMode=="function")try{St.setStrictMode(Xt,r)}catch{}}var Je=Math.clz32?Math.clz32:QA,ur=Math.log,$n=Math.LN2;function QA(r){return r>>>=0,r===0?32:31-(ur(r)/$n|0)|0}var ql=256,Wl=262144,Yl=4194304;function Xr(r){var a=r&42;if(a!==0)return a;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Xl(r,a,u){var h=r.pendingLanes;if(h===0)return 0;var y=0,b=r.suspendedLanes,E=r.pingedLanes;r=r.warmLanes;var L=h&134217727;return L!==0?(h=L&~b,h!==0?y=Xr(h):(E&=L,E!==0?y=Xr(E):u||(u=L&~r,u!==0&&(y=Xr(u))))):(L=h&~b,L!==0?y=Xr(L):E!==0?y=Xr(E):u||(u=h&~r,u!==0&&(y=Xr(u)))),y===0?0:a!==0&&a!==y&&(a&b)===0&&(b=y&-y,u=a&-a,b>=u||b===32&&(u&4194048)!==0)?a:y}function rs(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function ZA(r,a){switch(r){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 e0(){var r=Yl;return Yl<<=1,(Yl&62914560)===0&&(Yl=4194304),r}function vf(r){for(var a=[],u=0;31>u;u++)a.push(r);return a}function os(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function JA(r,a,u,h,y,b){var E=r.pendingLanes;r.pendingLanes=u,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=u,r.entangledLanes&=u,r.errorRecoveryDisabledLanes&=u,r.shellSuspendCounter=0;var L=r.entanglements,B=r.expirationTimes,Q=r.hiddenUpdates;for(u=E&~u;0<u;){var ie=31-Je(u),se=1<<ie;L[ie]=0,B[ie]=-1;var J=Q[ie];if(J!==null)for(Q[ie]=null,ie=0;ie<J.length;ie++){var te=J[ie];te!==null&&(te.lane&=-536870913)}u&=~se}h!==0&&t0(r,h,0),b!==0&&y===0&&r.tag!==0&&(r.suspendedLanes|=b&~(E&~a))}function t0(r,a,u){r.pendingLanes|=a,r.suspendedLanes&=~a;var h=31-Je(a);r.entangledLanes|=a,r.entanglements[h]=r.entanglements[h]|1073741824|u&261930}function n0(r,a){var u=r.entangledLanes|=a;for(r=r.entanglements;u;){var h=31-Je(u),y=1<<h;y&a|r[h]&a&&(r[h]|=a),u&=~y}}function i0(r,a){var u=a&-a;return u=(u&42)!==0?1:bf(u),(u&(r.suspendedLanes|a))!==0?0:u}function bf(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function xf(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function r0(){var r=$.p;return r!==0?r:(r=window.event,r===void 0?32:Fx(r.type))}function o0(r,a){var u=$.p;try{return $.p=r,a()}finally{$.p=u}}var cr=Math.random().toString(36).slice(2),Nt="__reactFiber$"+cr,nn="__reactProps$"+cr,qo="__reactContainer$"+cr,Sf="__reactEvents$"+cr,eL="__reactListeners$"+cr,tL="__reactHandles$"+cr,a0="__reactResources$"+cr,as="__reactMarker$"+cr;function _f(r){delete r[Nt],delete r[nn],delete r[Sf],delete r[eL],delete r[tL]}function Wo(r){var a=r[Nt];if(a)return a;for(var u=r.parentNode;u;){if(a=u[qo]||u[Nt]){if(u=a.alternate,a.child!==null||u!==null&&u.child!==null)for(r=Tx(r);r!==null;){if(u=r[Nt])return u;r=Tx(r)}return a}r=u,u=r.parentNode}return null}function Yo(r){if(r=r[Nt]||r[qo]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function ss(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(i(33))}function Xo(r){var a=r[a0];return a||(a=r[a0]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Lt(r){r[as]=!0}var s0=new Set,l0={};function Kr(r,a){Ko(r,a),Ko(r+"Capture",a)}function Ko(r,a){for(l0[r]=a,r=0;r<a.length;r++)s0.add(a[r])}var nL=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]*$"),u0={},c0={};function iL(r){return Wt.call(c0,r)?!0:Wt.call(u0,r)?!1:nL.test(r)?c0[r]=!0:(u0[r]=!0,!1)}function Kl(r,a,u){if(iL(a))if(u===null)r.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":r.removeAttribute(a);return;case"boolean":var h=a.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){r.removeAttribute(a);return}}r.setAttribute(a,""+u)}}function Ql(r,a,u){if(u===null)r.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttribute(a,""+u)}}function ki(r,a,u,h){if(h===null)r.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(u);return}r.setAttributeNS(a,u,""+h)}}function Tn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function d0(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function rL(r,a,u){var h=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);if(!r.hasOwnProperty(a)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var y=h.get,b=h.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return y.call(this)},set:function(E){u=""+E,b.call(this,E)}}),Object.defineProperty(r,a,{enumerable:h.enumerable}),{getValue:function(){return u},setValue:function(E){u=""+E},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function Cf(r){if(!r._valueTracker){var a=d0(r)?"checked":"value";r._valueTracker=rL(r,a,""+r[a])}}function f0(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var u=a.getValue(),h="";return r&&(h=d0(r)?r.checked?"true":"false":r.value),r=h,r!==u?(a.setValue(r),!0):!1}function Zl(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var oL=/[\n"\\]/g;function An(r){return r.replace(oL,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function wf(r,a,u,h,y,b,E,L){r.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?r.type=E:r.removeAttribute("type"),a!=null?E==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+Tn(a)):r.value!==""+Tn(a)&&(r.value=""+Tn(a)):E!=="submit"&&E!=="reset"||r.removeAttribute("value"),a!=null?Ef(r,E,Tn(a)):u!=null?Ef(r,E,Tn(u)):h!=null&&r.removeAttribute("value"),y==null&&b!=null&&(r.defaultChecked=!!b),y!=null&&(r.checked=y&&typeof y!="function"&&typeof y!="symbol"),L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?r.name=""+Tn(L):r.removeAttribute("name")}function h0(r,a,u,h,y,b,E,L){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(r.type=b),a!=null||u!=null){if(!(b!=="submit"&&b!=="reset"||a!=null)){Cf(r);return}u=u!=null?""+Tn(u):"",a=a!=null?""+Tn(a):u,L||a===r.value||(r.value=a),r.defaultValue=a}h=h??y,h=typeof h!="function"&&typeof h!="symbol"&&!!h,r.checked=L?r.checked:!!h,r.defaultChecked=!!h,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(r.name=E),Cf(r)}function Ef(r,a,u){a==="number"&&Zl(r.ownerDocument)===r||r.defaultValue===""+u||(r.defaultValue=""+u)}function Qo(r,a,u,h){if(r=r.options,a){a={};for(var y=0;y<u.length;y++)a["$"+u[y]]=!0;for(u=0;u<r.length;u++)y=a.hasOwnProperty("$"+r[u].value),r[u].selected!==y&&(r[u].selected=y),y&&h&&(r[u].defaultSelected=!0)}else{for(u=""+Tn(u),a=null,y=0;y<r.length;y++){if(r[y].value===u){r[y].selected=!0,h&&(r[y].defaultSelected=!0);return}a!==null||r[y].disabled||(a=r[y])}a!==null&&(a.selected=!0)}}function p0(r,a,u){if(a!=null&&(a=""+Tn(a),a!==r.value&&(r.value=a),u==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=u!=null?""+Tn(u):""}function m0(r,a,u,h){if(a==null){if(h!=null){if(u!=null)throw Error(i(92));if(W(h)){if(1<h.length)throw Error(i(93));h=h[0]}u=h}u==null&&(u=""),a=u}u=Tn(a),r.defaultValue=u,h=r.textContent,h===u&&h!==""&&h!==null&&(r.value=h),Cf(r)}function Zo(r,a){if(a){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=a;return}}r.textContent=a}var aL=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 g0(r,a,u){var h=a.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?h?r.setProperty(a,""):a==="float"?r.cssFloat="":r[a]="":h?r.setProperty(a,u):typeof u!="number"||u===0||aL.has(a)?a==="float"?r.cssFloat=u:r[a]=(""+u).trim():r[a]=u+"px"}function y0(r,a,u){if(a!=null&&typeof a!="object")throw Error(i(62));if(r=r.style,u!=null){for(var h in u)!u.hasOwnProperty(h)||a!=null&&a.hasOwnProperty(h)||(h.indexOf("--")===0?r.setProperty(h,""):h==="float"?r.cssFloat="":r[h]="");for(var y in a)h=a[y],a.hasOwnProperty(y)&&u[y]!==h&&g0(r,y,h)}else for(var b in a)a.hasOwnProperty(b)&&g0(r,b,a[b])}function kf(r){if(r.indexOf("-")===-1)return!1;switch(r){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 sL=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"]]),lL=/^[\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 Jl(r){return lL.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Ti(){}var Tf=null;function Af(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Jo=null,ea=null;function v0(r){var a=Yo(r);if(a&&(r=a.stateNode)){var u=r[nn]||null;e:switch(r=a.stateNode,a.type){case"input":if(wf(r,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),a=u.name,u.type==="radio"&&a!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+An(""+a)+'"][type="radio"]'),a=0;a<u.length;a++){var h=u[a];if(h!==r&&h.form===r.form){var y=h[nn]||null;if(!y)throw Error(i(90));wf(h,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(a=0;a<u.length;a++)h=u[a],h.form===r.form&&f0(h)}break e;case"textarea":p0(r,u.value,u.defaultValue);break e;case"select":a=u.value,a!=null&&Qo(r,!!u.multiple,a,!1)}}}var Lf=!1;function b0(r,a,u){if(Lf)return r(a,u);Lf=!0;try{var h=r(a);return h}finally{if(Lf=!1,(Jo!==null||ea!==null)&&(Bu(),Jo&&(a=Jo,r=ea,ea=Jo=null,v0(a),r)))for(a=0;a<r.length;a++)v0(r[a])}}function ls(r,a){var u=r.stateNode;if(u===null)return null;var h=u[nn]||null;if(h===null)return null;u=h[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(r=r.type,h=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!h;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(i(231,a,typeof u));return u}var Ai=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Rf=!1;if(Ai)try{var us={};Object.defineProperty(us,"passive",{get:function(){Rf=!0}}),window.addEventListener("test",us,us),window.removeEventListener("test",us,us)}catch{Rf=!1}var dr=null,Of=null,eu=null;function x0(){if(eu)return eu;var r,a=Of,u=a.length,h,y="value"in dr?dr.value:dr.textContent,b=y.length;for(r=0;r<u&&a[r]===y[r];r++);var E=u-r;for(h=1;h<=E&&a[u-h]===y[b-h];h++);return eu=y.slice(r,1<h?1-h:void 0)}function tu(r){var a=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function nu(){return!0}function S0(){return!1}function rn(r){function a(u,h,y,b,E){this._reactName=u,this._targetInst=y,this.type=h,this.nativeEvent=b,this.target=E,this.currentTarget=null;for(var L in r)r.hasOwnProperty(L)&&(u=r[L],this[L]=u?u(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?nu:S0,this.isPropagationStopped=S0,this}return m(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=nu)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=nu)},persist:function(){},isPersistent:nu}),a}var Qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},iu=rn(Qr),cs=m({},Qr,{view:0,detail:0}),uL=rn(cs),Df,Mf,ds,ru=m({},cs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nf,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==ds&&(ds&&r.type==="mousemove"?(Df=r.screenX-ds.screenX,Mf=r.screenY-ds.screenY):Mf=Df=0,ds=r),Df)},movementY:function(r){return"movementY"in r?r.movementY:Mf}}),_0=rn(ru),cL=m({},ru,{dataTransfer:0}),dL=rn(cL),fL=m({},cs,{relatedTarget:0}),If=rn(fL),hL=m({},Qr,{animationName:0,elapsedTime:0,pseudoElement:0}),pL=rn(hL),mL=m({},Qr,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),gL=rn(mL),yL=m({},Qr,{data:0}),C0=rn(yL),vL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bL={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"},xL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function SL(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=xL[r])?!!a[r]:!1}function Nf(){return SL}var _L=m({},cs,{key:function(r){if(r.key){var a=vL[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=tu(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?bL[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nf,charCode:function(r){return r.type==="keypress"?tu(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?tu(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),CL=rn(_L),wL=m({},ru,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),w0=rn(wL),EL=m({},cs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nf}),kL=rn(EL),TL=m({},Qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),AL=rn(TL),LL=m({},ru,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),RL=rn(LL),OL=m({},Qr,{newState:0,oldState:0}),DL=rn(OL),ML=[9,13,27,32],zf=Ai&&"CompositionEvent"in window,fs=null;Ai&&"documentMode"in document&&(fs=document.documentMode);var IL=Ai&&"TextEvent"in window&&!fs,E0=Ai&&(!zf||fs&&8<fs&&11>=fs),k0=" ",T0=!1;function A0(r,a){switch(r){case"keyup":return ML.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function L0(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var ta=!1;function NL(r,a){switch(r){case"compositionend":return L0(a);case"keypress":return a.which!==32?null:(T0=!0,k0);case"textInput":return r=a.data,r===k0&&T0?null:r;default:return null}}function zL(r,a){if(ta)return r==="compositionend"||!zf&&A0(r,a)?(r=x0(),eu=Of=dr=null,ta=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return E0&&a.locale!=="ko"?null:a.data;default:return null}}var PL={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 R0(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!PL[r.type]:a==="textarea"}function O0(r,a,u,h){Jo?ea?ea.push(h):ea=[h]:Jo=h,a=Wu(a,"onChange"),0<a.length&&(u=new iu("onChange","change",null,u,h),r.push({event:u,listeners:a}))}var hs=null,ps=null;function HL(r){hx(r,0)}function ou(r){var a=ss(r);if(f0(a))return r}function D0(r,a){if(r==="change")return a}var M0=!1;if(Ai){var Pf;if(Ai){var Hf="oninput"in document;if(!Hf){var I0=document.createElement("div");I0.setAttribute("oninput","return;"),Hf=typeof I0.oninput=="function"}Pf=Hf}else Pf=!1;M0=Pf&&(!document.documentMode||9<document.documentMode)}function N0(){hs&&(hs.detachEvent("onpropertychange",z0),ps=hs=null)}function z0(r){if(r.propertyName==="value"&&ou(ps)){var a=[];O0(a,ps,r,Af(r)),b0(HL,a)}}function jL(r,a,u){r==="focusin"?(N0(),hs=a,ps=u,hs.attachEvent("onpropertychange",z0)):r==="focusout"&&N0()}function BL(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return ou(ps)}function UL(r,a){if(r==="click")return ou(a)}function VL(r,a){if(r==="input"||r==="change")return ou(a)}function FL(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var gn=typeof Object.is=="function"?Object.is:FL;function ms(r,a){if(gn(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var u=Object.keys(r),h=Object.keys(a);if(u.length!==h.length)return!1;for(h=0;h<u.length;h++){var y=u[h];if(!Wt.call(a,y)||!gn(r[y],a[y]))return!1}return!0}function P0(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function H0(r,a){var u=P0(r);r=0;for(var h;u;){if(u.nodeType===3){if(h=r+u.textContent.length,r<=a&&h>=a)return{node:u,offset:a-r};r=h}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=P0(u)}}function j0(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?j0(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function B0(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=Zl(r.document);a instanceof r.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)r=a.contentWindow;else break;a=Zl(r.document)}return a}function jf(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}var GL=Ai&&"documentMode"in document&&11>=document.documentMode,na=null,Bf=null,gs=null,Uf=!1;function U0(r,a,u){var h=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Uf||na==null||na!==Zl(h)||(h=na,"selectionStart"in h&&jf(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),gs&&ms(gs,h)||(gs=h,h=Wu(Bf,"onSelect"),0<h.length&&(a=new iu("onSelect","select",null,a,u),r.push({event:a,listeners:h}),a.target=na)))}function Zr(r,a){var u={};return u[r.toLowerCase()]=a.toLowerCase(),u["Webkit"+r]="webkit"+a,u["Moz"+r]="moz"+a,u}var ia={animationend:Zr("Animation","AnimationEnd"),animationiteration:Zr("Animation","AnimationIteration"),animationstart:Zr("Animation","AnimationStart"),transitionrun:Zr("Transition","TransitionRun"),transitionstart:Zr("Transition","TransitionStart"),transitioncancel:Zr("Transition","TransitionCancel"),transitionend:Zr("Transition","TransitionEnd")},Vf={},V0={};Ai&&(V0=document.createElement("div").style,"AnimationEvent"in window||(delete ia.animationend.animation,delete ia.animationiteration.animation,delete ia.animationstart.animation),"TransitionEvent"in window||delete ia.transitionend.transition);function Jr(r){if(Vf[r])return Vf[r];if(!ia[r])return r;var a=ia[r],u;for(u in a)if(a.hasOwnProperty(u)&&u in V0)return Vf[r]=a[u];return r}var F0=Jr("animationend"),G0=Jr("animationiteration"),$0=Jr("animationstart"),$L=Jr("transitionrun"),qL=Jr("transitionstart"),WL=Jr("transitioncancel"),q0=Jr("transitionend"),W0=new Map,Ff="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(" ");Ff.push("scrollEnd");function qn(r,a){W0.set(r,a),Kr(a,[r])}var au=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Ln=[],ra=0,Gf=0;function su(){for(var r=ra,a=Gf=ra=0;a<r;){var u=Ln[a];Ln[a++]=null;var h=Ln[a];Ln[a++]=null;var y=Ln[a];Ln[a++]=null;var b=Ln[a];if(Ln[a++]=null,h!==null&&y!==null){var E=h.pending;E===null?y.next=y:(y.next=E.next,E.next=y),h.pending=y}b!==0&&Y0(u,y,b)}}function lu(r,a,u,h){Ln[ra++]=r,Ln[ra++]=a,Ln[ra++]=u,Ln[ra++]=h,Gf|=h,r.lanes|=h,r=r.alternate,r!==null&&(r.lanes|=h)}function $f(r,a,u,h){return lu(r,a,u,h),uu(r)}function eo(r,a){return lu(r,null,null,a),uu(r)}function Y0(r,a,u){r.lanes|=u;var h=r.alternate;h!==null&&(h.lanes|=u);for(var y=!1,b=r.return;b!==null;)b.childLanes|=u,h=b.alternate,h!==null&&(h.childLanes|=u),b.tag===22&&(r=b.stateNode,r===null||r._visibility&1||(y=!0)),r=b,b=b.return;return r.tag===3?(b=r.stateNode,y&&a!==null&&(y=31-Je(u),r=b.hiddenUpdates,h=r[y],h===null?r[y]=[a]:h.push(a),a.lane=u|536870912),b):null}function uu(r){if(50<Hs)throw Hs=0,ep=null,Error(i(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var oa={};function YL(r,a,u,h){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yn(r,a,u,h){return new YL(r,a,u,h)}function qf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Li(r,a){var u=r.alternate;return u===null?(u=yn(r.tag,a,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=a,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&65011712,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,a=r.dependencies,u.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u.refCleanup=r.refCleanup,u}function X0(r,a){r.flags&=65011714;var u=r.alternate;return u===null?(r.childLanes=0,r.lanes=a,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=u.childLanes,r.lanes=u.lanes,r.child=u.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=u.memoizedProps,r.memoizedState=u.memoizedState,r.updateQueue=u.updateQueue,r.type=u.type,a=u.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),r}function cu(r,a,u,h,y,b){var E=0;if(h=r,typeof r=="function")qf(r)&&(E=1);else if(typeof r=="string")E=JR(r,u,le.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case F:return r=yn(31,u,a,y),r.elementType=F,r.lanes=b,r;case S:return to(u.children,y,b,a);case w:E=8,y|=24;break;case _:return r=yn(12,u,a,y|2),r.elementType=_,r.lanes=b,r;case M:return r=yn(13,u,a,y),r.elementType=M,r.lanes=b,r;case O:return r=yn(19,u,a,y),r.elementType=O,r.lanes=b,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case k:E=10;break e;case C:E=9;break e;case D:E=11;break e;case z:E=14;break e;case j:E=16,h=null;break e}E=29,u=Error(i(130,r===null?"null":typeof r,"")),h=null}return a=yn(E,u,a,y),a.elementType=r,a.type=h,a.lanes=b,a}function to(r,a,u,h){return r=yn(7,r,h,a),r.lanes=u,r}function Wf(r,a,u){return r=yn(6,r,null,a),r.lanes=u,r}function K0(r){var a=yn(18,null,null,0);return a.stateNode=r,a}function Yf(r,a,u){return a=yn(4,r.children!==null?r.children:[],r.key,a),a.lanes=u,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var Q0=new WeakMap;function Rn(r,a){if(typeof r=="object"&&r!==null){var u=Q0.get(r);return u!==void 0?u:(a={value:r,source:a,stack:Ut(a)},Q0.set(r,a),a)}return{value:r,source:a,stack:Ut(a)}}var aa=[],sa=0,du=null,ys=0,On=[],Dn=0,fr=null,ii=1,ri="";function Ri(r,a){aa[sa++]=ys,aa[sa++]=du,du=r,ys=a}function Z0(r,a,u){On[Dn++]=ii,On[Dn++]=ri,On[Dn++]=fr,fr=r;var h=ii;r=ri;var y=32-Je(h)-1;h&=~(1<<y),u+=1;var b=32-Je(a)+y;if(30<b){var E=y-y%5;b=(h&(1<<E)-1).toString(32),h>>=E,y-=E,ii=1<<32-Je(a)+y|u<<y|h,ri=b+r}else ii=1<<b|u<<y|h,ri=r}function Xf(r){r.return!==null&&(Ri(r,1),Z0(r,1,0))}function Kf(r){for(;r===du;)du=aa[--sa],aa[sa]=null,ys=aa[--sa],aa[sa]=null;for(;r===fr;)fr=On[--Dn],On[Dn]=null,ri=On[--Dn],On[Dn]=null,ii=On[--Dn],On[Dn]=null}function J0(r,a){On[Dn++]=ii,On[Dn++]=ri,On[Dn++]=fr,ii=a.id,ri=a.overflow,fr=r}var zt=null,ot=null,Pe=!1,hr=null,Mn=!1,Qf=Error(i(519));function pr(r){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw vs(Rn(a,r)),Qf}function ev(r){var a=r.stateNode,u=r.type,h=r.memoizedProps;switch(a[Nt]=r,a[nn]=h,u){case"dialog":Me("cancel",a),Me("close",a);break;case"iframe":case"object":case"embed":Me("load",a);break;case"video":case"audio":for(u=0;u<Bs.length;u++)Me(Bs[u],a);break;case"source":Me("error",a);break;case"img":case"image":case"link":Me("error",a),Me("load",a);break;case"details":Me("toggle",a);break;case"input":Me("invalid",a),h0(a,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":Me("invalid",a);break;case"textarea":Me("invalid",a),m0(a,h.value,h.defaultValue,h.children)}u=h.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||a.textContent===""+u||h.suppressHydrationWarning===!0||yx(a.textContent,u)?(h.popover!=null&&(Me("beforetoggle",a),Me("toggle",a)),h.onScroll!=null&&Me("scroll",a),h.onScrollEnd!=null&&Me("scrollend",a),h.onClick!=null&&(a.onclick=Ti),a=!0):a=!1,a||pr(r,!0)}function tv(r){for(zt=r.return;zt;)switch(zt.tag){case 5:case 31:case 13:Mn=!1;return;case 27:case 3:Mn=!0;return;default:zt=zt.return}}function la(r){if(r!==zt)return!1;if(!Pe)return tv(r),Pe=!0,!1;var a=r.tag,u;if((u=a!==3&&a!==27)&&((u=a===5)&&(u=r.type,u=!(u!=="form"&&u!=="button")||mp(r.type,r.memoizedProps)),u=!u),u&&ot&&pr(r),tv(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ot=kx(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ot=kx(r)}else a===27?(a=ot,Ar(r.type)?(r=xp,xp=null,ot=r):ot=a):ot=zt?Nn(r.stateNode.nextSibling):null;return!0}function no(){ot=zt=null,Pe=!1}function Zf(){var r=hr;return r!==null&&(ln===null?ln=r:ln.push.apply(ln,r),hr=null),r}function vs(r){hr===null?hr=[r]:hr.push(r)}var Jf=H(null),io=null,Oi=null;function mr(r,a,u){I(Jf,a._currentValue),a._currentValue=u}function Di(r){r._currentValue=Jf.current,Y(Jf)}function eh(r,a,u){for(;r!==null;){var h=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,h!==null&&(h.childLanes|=a)):h!==null&&(h.childLanes&a)!==a&&(h.childLanes|=a),r===u)break;r=r.return}}function th(r,a,u,h){var y=r.child;for(y!==null&&(y.return=r);y!==null;){var b=y.dependencies;if(b!==null){var E=y.child;b=b.firstContext;e:for(;b!==null;){var L=b;b=y;for(var B=0;B<a.length;B++)if(L.context===a[B]){b.lanes|=u,L=b.alternate,L!==null&&(L.lanes|=u),eh(b.return,u,r),h||(E=null);break e}b=L.next}}else if(y.tag===18){if(E=y.return,E===null)throw Error(i(341));E.lanes|=u,b=E.alternate,b!==null&&(b.lanes|=u),eh(E,u,r),E=null}else E=y.child;if(E!==null)E.return=y;else for(E=y;E!==null;){if(E===r){E=null;break}if(y=E.sibling,y!==null){y.return=E.return,E=y;break}E=E.return}y=E}}function ua(r,a,u,h){r=null;for(var y=a,b=!1;y!==null;){if(!b){if((y.flags&524288)!==0)b=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var E=y.alternate;if(E===null)throw Error(i(387));if(E=E.memoizedProps,E!==null){var L=y.type;gn(y.pendingProps.value,E.value)||(r!==null?r.push(L):r=[L])}}else if(y===ce.current){if(E=y.alternate,E===null)throw Error(i(387));E.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(r!==null?r.push($s):r=[$s])}y=y.return}r!==null&&th(a,r,u,h),a.flags|=262144}function fu(r){for(r=r.firstContext;r!==null;){if(!gn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function ro(r){io=r,Oi=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Pt(r){return nv(io,r)}function hu(r,a){return io===null&&ro(r),nv(r,a)}function nv(r,a){var u=a._currentValue;if(a={context:a,memoizedValue:u,next:null},Oi===null){if(r===null)throw Error(i(308));Oi=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else Oi=Oi.next=a;return u}var XL=typeof AbortController<"u"?AbortController:function(){var r=[],a=this.signal={aborted:!1,addEventListener:function(u,h){r.push(h)}};this.abort=function(){a.aborted=!0,r.forEach(function(u){return u()})}},KL=e.unstable_scheduleCallback,QL=e.unstable_NormalPriority,gt={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function nh(){return{controller:new XL,data:new Map,refCount:0}}function bs(r){r.refCount--,r.refCount===0&&KL(QL,function(){r.controller.abort()})}var xs=null,ih=0,ca=0,da=null;function ZL(r,a){if(xs===null){var u=xs=[];ih=0,ca=ap(),da={status:"pending",value:void 0,then:function(h){u.push(h)}}}return ih++,a.then(iv,iv),a}function iv(){if(--ih===0&&xs!==null){da!==null&&(da.status="fulfilled");var r=xs;xs=null,ca=0,da=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function JL(r,a){var u=[],h={status:"pending",value:null,reason:null,then:function(y){u.push(y)}};return r.then(function(){h.status="fulfilled",h.value=a;for(var y=0;y<u.length;y++)(0,u[y])(a)},function(y){for(h.status="rejected",h.reason=y,y=0;y<u.length;y++)(0,u[y])(void 0)}),h}var rv=P.S;P.S=function(r,a){Ub=Yt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&ZL(r,a),rv!==null&&rv(r,a)};var oo=H(null);function rh(){var r=oo.current;return r!==null?r:et.pooledCache}function pu(r,a){a===null?I(oo,oo.current):I(oo,a.pool)}function ov(){var r=rh();return r===null?null:{parent:gt._currentValue,pool:r}}var fa=Error(i(460)),oh=Error(i(474)),mu=Error(i(542)),gu={then:function(){}};function av(r){return r=r.status,r==="fulfilled"||r==="rejected"}function sv(r,a,u){switch(u=r[u],u===void 0?r.push(a):u!==a&&(a.then(Ti,Ti),a=u),a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,uv(r),r;default:if(typeof a.status=="string")a.then(Ti,Ti);else{if(r=et,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=a,r.status="pending",r.then(function(h){if(a.status==="pending"){var y=a;y.status="fulfilled",y.value=h}},function(h){if(a.status==="pending"){var y=a;y.status="rejected",y.reason=h}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,uv(r),r}throw so=a,fa}}function ao(r){try{var a=r._init;return a(r._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(so=u,fa):u}}var so=null;function lv(){if(so===null)throw Error(i(459));var r=so;return so=null,r}function uv(r){if(r===fa||r===mu)throw Error(i(483))}var ha=null,Ss=0;function yu(r){var a=Ss;return Ss+=1,ha===null&&(ha=[]),sv(ha,r,a)}function _s(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function vu(r,a){throw a.$$typeof===g?Error(i(525)):(r=Object.prototype.toString.call(a),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function cv(r){function a(G,V){if(r){var K=G.deletions;K===null?(G.deletions=[V],G.flags|=16):K.push(V)}}function u(G,V){if(!r)return null;for(;V!==null;)a(G,V),V=V.sibling;return null}function h(G){for(var V=new Map;G!==null;)G.key!==null?V.set(G.key,G):V.set(G.index,G),G=G.sibling;return V}function y(G,V){return G=Li(G,V),G.index=0,G.sibling=null,G}function b(G,V,K){return G.index=K,r?(K=G.alternate,K!==null?(K=K.index,K<V?(G.flags|=67108866,V):K):(G.flags|=67108866,V)):(G.flags|=1048576,V)}function E(G){return r&&G.alternate===null&&(G.flags|=67108866),G}function L(G,V,K,ae){return V===null||V.tag!==6?(V=Wf(K,G.mode,ae),V.return=G,V):(V=y(V,K),V.return=G,V)}function B(G,V,K,ae){var be=K.type;return be===S?ie(G,V,K.props.children,ae,K.key):V!==null&&(V.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===j&&ao(be)===V.type)?(V=y(V,K.props),_s(V,K),V.return=G,V):(V=cu(K.type,K.key,K.props,null,G.mode,ae),_s(V,K),V.return=G,V)}function Q(G,V,K,ae){return V===null||V.tag!==4||V.stateNode.containerInfo!==K.containerInfo||V.stateNode.implementation!==K.implementation?(V=Yf(K,G.mode,ae),V.return=G,V):(V=y(V,K.children||[]),V.return=G,V)}function ie(G,V,K,ae,be){return V===null||V.tag!==7?(V=to(K,G.mode,ae,be),V.return=G,V):(V=y(V,K),V.return=G,V)}function se(G,V,K){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=Wf(""+V,G.mode,K),V.return=G,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case v:return K=cu(V.type,V.key,V.props,null,G.mode,K),_s(K,V),K.return=G,K;case x:return V=Yf(V,G.mode,K),V.return=G,V;case j:return V=ao(V),se(G,V,K)}if(W(V)||U(V))return V=to(V,G.mode,K,null),V.return=G,V;if(typeof V.then=="function")return se(G,yu(V),K);if(V.$$typeof===k)return se(G,hu(G,V),K);vu(G,V)}return null}function J(G,V,K,ae){var be=V!==null?V.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return be!==null?null:L(G,V,""+K,ae);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case v:return K.key===be?B(G,V,K,ae):null;case x:return K.key===be?Q(G,V,K,ae):null;case j:return K=ao(K),J(G,V,K,ae)}if(W(K)||U(K))return be!==null?null:ie(G,V,K,ae,null);if(typeof K.then=="function")return J(G,V,yu(K),ae);if(K.$$typeof===k)return J(G,V,hu(G,K),ae);vu(G,K)}return null}function te(G,V,K,ae,be){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return G=G.get(K)||null,L(V,G,""+ae,be);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case v:return G=G.get(ae.key===null?K:ae.key)||null,B(V,G,ae,be);case x:return G=G.get(ae.key===null?K:ae.key)||null,Q(V,G,ae,be);case j:return ae=ao(ae),te(G,V,K,ae,be)}if(W(ae)||U(ae))return G=G.get(K)||null,ie(V,G,ae,be,null);if(typeof ae.then=="function")return te(G,V,K,yu(ae),be);if(ae.$$typeof===k)return te(G,V,K,hu(V,ae),be);vu(V,ae)}return null}function ye(G,V,K,ae){for(var be=null,Be=null,ve=V,Le=V=0,Ne=null;ve!==null&&Le<K.length;Le++){ve.index>Le?(Ne=ve,ve=null):Ne=ve.sibling;var Ue=J(G,ve,K[Le],ae);if(Ue===null){ve===null&&(ve=Ne);break}r&&ve&&Ue.alternate===null&&a(G,ve),V=b(Ue,V,Le),Be===null?be=Ue:Be.sibling=Ue,Be=Ue,ve=Ne}if(Le===K.length)return u(G,ve),Pe&&Ri(G,Le),be;if(ve===null){for(;Le<K.length;Le++)ve=se(G,K[Le],ae),ve!==null&&(V=b(ve,V,Le),Be===null?be=ve:Be.sibling=ve,Be=ve);return Pe&&Ri(G,Le),be}for(ve=h(ve);Le<K.length;Le++)Ne=te(ve,G,Le,K[Le],ae),Ne!==null&&(r&&Ne.alternate!==null&&ve.delete(Ne.key===null?Le:Ne.key),V=b(Ne,V,Le),Be===null?be=Ne:Be.sibling=Ne,Be=Ne);return r&&ve.forEach(function(Mr){return a(G,Mr)}),Pe&&Ri(G,Le),be}function Se(G,V,K,ae){if(K==null)throw Error(i(151));for(var be=null,Be=null,ve=V,Le=V=0,Ne=null,Ue=K.next();ve!==null&&!Ue.done;Le++,Ue=K.next()){ve.index>Le?(Ne=ve,ve=null):Ne=ve.sibling;var Mr=J(G,ve,Ue.value,ae);if(Mr===null){ve===null&&(ve=Ne);break}r&&ve&&Mr.alternate===null&&a(G,ve),V=b(Mr,V,Le),Be===null?be=Mr:Be.sibling=Mr,Be=Mr,ve=Ne}if(Ue.done)return u(G,ve),Pe&&Ri(G,Le),be;if(ve===null){for(;!Ue.done;Le++,Ue=K.next())Ue=se(G,Ue.value,ae),Ue!==null&&(V=b(Ue,V,Le),Be===null?be=Ue:Be.sibling=Ue,Be=Ue);return Pe&&Ri(G,Le),be}for(ve=h(ve);!Ue.done;Le++,Ue=K.next())Ue=te(ve,G,Le,Ue.value,ae),Ue!==null&&(r&&Ue.alternate!==null&&ve.delete(Ue.key===null?Le:Ue.key),V=b(Ue,V,Le),Be===null?be=Ue:Be.sibling=Ue,Be=Ue);return r&&ve.forEach(function(cO){return a(G,cO)}),Pe&&Ri(G,Le),be}function Qe(G,V,K,ae){if(typeof K=="object"&&K!==null&&K.type===S&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case v:e:{for(var be=K.key;V!==null;){if(V.key===be){if(be=K.type,be===S){if(V.tag===7){u(G,V.sibling),ae=y(V,K.props.children),ae.return=G,G=ae;break e}}else if(V.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===j&&ao(be)===V.type){u(G,V.sibling),ae=y(V,K.props),_s(ae,K),ae.return=G,G=ae;break e}u(G,V);break}else a(G,V);V=V.sibling}K.type===S?(ae=to(K.props.children,G.mode,ae,K.key),ae.return=G,G=ae):(ae=cu(K.type,K.key,K.props,null,G.mode,ae),_s(ae,K),ae.return=G,G=ae)}return E(G);case x:e:{for(be=K.key;V!==null;){if(V.key===be)if(V.tag===4&&V.stateNode.containerInfo===K.containerInfo&&V.stateNode.implementation===K.implementation){u(G,V.sibling),ae=y(V,K.children||[]),ae.return=G,G=ae;break e}else{u(G,V);break}else a(G,V);V=V.sibling}ae=Yf(K,G.mode,ae),ae.return=G,G=ae}return E(G);case j:return K=ao(K),Qe(G,V,K,ae)}if(W(K))return ye(G,V,K,ae);if(U(K)){if(be=U(K),typeof be!="function")throw Error(i(150));return K=be.call(K),Se(G,V,K,ae)}if(typeof K.then=="function")return Qe(G,V,yu(K),ae);if(K.$$typeof===k)return Qe(G,V,hu(G,K),ae);vu(G,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,V!==null&&V.tag===6?(u(G,V.sibling),ae=y(V,K),ae.return=G,G=ae):(u(G,V),ae=Wf(K,G.mode,ae),ae.return=G,G=ae),E(G)):u(G,V)}return function(G,V,K,ae){try{Ss=0;var be=Qe(G,V,K,ae);return ha=null,be}catch(ve){if(ve===fa||ve===mu)throw ve;var Be=yn(29,ve,null,G.mode);return Be.lanes=ae,Be.return=G,Be}}}var lo=cv(!0),dv=cv(!1),gr=!1;function ah(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sh(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function yr(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function vr(r,a,u){var h=r.updateQueue;if(h===null)return null;if(h=h.shared,(Fe&2)!==0){var y=h.pending;return y===null?a.next=a:(a.next=y.next,y.next=a),h.pending=a,a=uu(r),Y0(r,null,u),a}return lu(r,h,a,u),uu(r)}function Cs(r,a,u){if(a=a.updateQueue,a!==null&&(a=a.shared,(u&4194048)!==0)){var h=a.lanes;h&=r.pendingLanes,u|=h,a.lanes=u,n0(r,u)}}function lh(r,a){var u=r.updateQueue,h=r.alternate;if(h!==null&&(h=h.updateQueue,u===h)){var y=null,b=null;if(u=u.firstBaseUpdate,u!==null){do{var E={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};b===null?y=b=E:b=b.next=E,u=u.next}while(u!==null);b===null?y=b=a:b=b.next=a}else y=b=a;u={baseState:h.baseState,firstBaseUpdate:y,lastBaseUpdate:b,shared:h.shared,callbacks:h.callbacks},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=a:r.next=a,u.lastBaseUpdate=a}var uh=!1;function ws(){if(uh){var r=da;if(r!==null)throw r}}function Es(r,a,u,h){uh=!1;var y=r.updateQueue;gr=!1;var b=y.firstBaseUpdate,E=y.lastBaseUpdate,L=y.shared.pending;if(L!==null){y.shared.pending=null;var B=L,Q=B.next;B.next=null,E===null?b=Q:E.next=Q,E=B;var ie=r.alternate;ie!==null&&(ie=ie.updateQueue,L=ie.lastBaseUpdate,L!==E&&(L===null?ie.firstBaseUpdate=Q:L.next=Q,ie.lastBaseUpdate=B))}if(b!==null){var se=y.baseState;E=0,ie=Q=B=null,L=b;do{var J=L.lane&-536870913,te=J!==L.lane;if(te?(Ie&J)===J:(h&J)===J){J!==0&&J===ca&&(uh=!0),ie!==null&&(ie=ie.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});e:{var ye=r,Se=L;J=a;var Qe=u;switch(Se.tag){case 1:if(ye=Se.payload,typeof ye=="function"){se=ye.call(Qe,se,J);break e}se=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Se.payload,J=typeof ye=="function"?ye.call(Qe,se,J):ye,J==null)break e;se=m({},se,J);break e;case 2:gr=!0}}J=L.callback,J!==null&&(r.flags|=64,te&&(r.flags|=8192),te=y.callbacks,te===null?y.callbacks=[J]:te.push(J))}else te={lane:J,tag:L.tag,payload:L.payload,callback:L.callback,next:null},ie===null?(Q=ie=te,B=se):ie=ie.next=te,E|=J;if(L=L.next,L===null){if(L=y.shared.pending,L===null)break;te=L,L=te.next,te.next=null,y.lastBaseUpdate=te,y.shared.pending=null}}while(!0);ie===null&&(B=se),y.baseState=B,y.firstBaseUpdate=Q,y.lastBaseUpdate=ie,b===null&&(y.shared.lanes=0),Cr|=E,r.lanes=E,r.memoizedState=se}}function fv(r,a){if(typeof r!="function")throw Error(i(191,r));r.call(a)}function hv(r,a){var u=r.callbacks;if(u!==null)for(r.callbacks=null,r=0;r<u.length;r++)fv(u[r],a)}var pa=H(null),bu=H(0);function pv(r,a){r=Ui,I(bu,r),I(pa,a),Ui=r|a.baseLanes}function ch(){I(bu,Ui),I(pa,pa.current)}function dh(){Ui=bu.current,Y(pa),Y(bu)}var vn=H(null),In=null;function br(r){var a=r.alternate;I(ft,ft.current&1),I(vn,r),In===null&&(a===null||pa.current!==null||a.memoizedState!==null)&&(In=r)}function fh(r){I(ft,ft.current),I(vn,r),In===null&&(In=r)}function mv(r){r.tag===22?(I(ft,ft.current),I(vn,r),In===null&&(In=r)):xr()}function xr(){I(ft,ft.current),I(vn,vn.current)}function bn(r){Y(vn),In===r&&(In=null),Y(ft)}var ft=H(0);function xu(r){for(var a=r;a!==null;){if(a.tag===13){var u=a.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||vp(u)||bp(u)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Mi=0,Ae=null,Xe=null,yt=null,Su=!1,ma=!1,uo=!1,_u=0,ks=0,ga=null,eR=0;function ut(){throw Error(i(321))}function hh(r,a){if(a===null)return!1;for(var u=0;u<a.length&&u<r.length;u++)if(!gn(r[u],a[u]))return!1;return!0}function ph(r,a,u,h,y,b){return Mi=b,Ae=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,P.H=r===null||r.memoizedState===null?Zv:Lh,uo=!1,b=u(h,y),uo=!1,ma&&(b=yv(a,u,h,y)),gv(r),b}function gv(r){P.H=Ls;var a=Xe!==null&&Xe.next!==null;if(Mi=0,yt=Xe=Ae=null,Su=!1,ks=0,ga=null,a)throw Error(i(300));r===null||vt||(r=r.dependencies,r!==null&&fu(r)&&(vt=!0))}function yv(r,a,u,h){Ae=r;var y=0;do{if(ma&&(ga=null),ks=0,ma=!1,25<=y)throw Error(i(301));if(y+=1,yt=Xe=null,r.updateQueue!=null){var b=r.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}P.H=Jv,b=a(u,h)}while(ma);return b}function tR(){var r=P.H,a=r.useState()[0];return a=typeof a.then=="function"?Ts(a):a,r=r.useState()[0],(Xe!==null?Xe.memoizedState:null)!==r&&(Ae.flags|=1024),a}function mh(){var r=_u!==0;return _u=0,r}function gh(r,a,u){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~u}function yh(r){if(Su){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}Su=!1}Mi=0,yt=Xe=Ae=null,ma=!1,ks=_u=0,ga=null}function Kt(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?Ae.memoizedState=yt=r:yt=yt.next=r,yt}function ht(){if(Xe===null){var r=Ae.alternate;r=r!==null?r.memoizedState:null}else r=Xe.next;var a=yt===null?Ae.memoizedState:yt.next;if(a!==null)yt=a,Xe=r;else{if(r===null)throw Ae.alternate===null?Error(i(467)):Error(i(310));Xe=r,r={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},yt===null?Ae.memoizedState=yt=r:yt=yt.next=r}return yt}function Cu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ts(r){var a=ks;return ks+=1,ga===null&&(ga=[]),r=sv(ga,r,a),a=Ae,(yt===null?a.memoizedState:yt.next)===null&&(a=a.alternate,P.H=a===null||a.memoizedState===null?Zv:Lh),r}function wu(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Ts(r);if(r.$$typeof===k)return Pt(r)}throw Error(i(438,String(r)))}function vh(r){var a=null,u=Ae.updateQueue;if(u!==null&&(a=u.memoCache),a==null){var h=Ae.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(a={data:h.data.map(function(y){return y.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),u===null&&(u=Cu(),Ae.updateQueue=u),u.memoCache=a,u=a.data[a.index],u===void 0)for(u=a.data[a.index]=Array(r),h=0;h<r;h++)u[h]=ee;return a.index++,u}function Ii(r,a){return typeof a=="function"?a(r):a}function Eu(r){var a=ht();return bh(a,Xe,r)}function bh(r,a,u){var h=r.queue;if(h===null)throw Error(i(311));h.lastRenderedReducer=u;var y=r.baseQueue,b=h.pending;if(b!==null){if(y!==null){var E=y.next;y.next=b.next,b.next=E}a.baseQueue=y=b,h.pending=null}if(b=r.baseState,y===null)r.memoizedState=b;else{a=y.next;var L=E=null,B=null,Q=a,ie=!1;do{var se=Q.lane&-536870913;if(se!==Q.lane?(Ie&se)===se:(Mi&se)===se){var J=Q.revertLane;if(J===0)B!==null&&(B=B.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),se===ca&&(ie=!0);else if((Mi&J)===J){Q=Q.next,J===ca&&(ie=!0);continue}else se={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},B===null?(L=B=se,E=b):B=B.next=se,Ae.lanes|=J,Cr|=J;se=Q.action,uo&&u(b,se),b=Q.hasEagerState?Q.eagerState:u(b,se)}else J={lane:se,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},B===null?(L=B=J,E=b):B=B.next=J,Ae.lanes|=se,Cr|=se;Q=Q.next}while(Q!==null&&Q!==a);if(B===null?E=b:B.next=L,!gn(b,r.memoizedState)&&(vt=!0,ie&&(u=da,u!==null)))throw u;r.memoizedState=b,r.baseState=E,r.baseQueue=B,h.lastRenderedState=b}return y===null&&(h.lanes=0),[r.memoizedState,h.dispatch]}function xh(r){var a=ht(),u=a.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=r;var h=u.dispatch,y=u.pending,b=a.memoizedState;if(y!==null){u.pending=null;var E=y=y.next;do b=r(b,E.action),E=E.next;while(E!==y);gn(b,a.memoizedState)||(vt=!0),a.memoizedState=b,a.baseQueue===null&&(a.baseState=b),u.lastRenderedState=b}return[b,h]}function vv(r,a,u){var h=Ae,y=ht(),b=Pe;if(b){if(u===void 0)throw Error(i(407));u=u()}else u=a();var E=!gn((Xe||y).memoizedState,u);if(E&&(y.memoizedState=u,vt=!0),y=y.queue,Ch(Sv.bind(null,h,y,r),[r]),y.getSnapshot!==a||E||yt!==null&&yt.memoizedState.tag&1){if(h.flags|=2048,ya(9,{destroy:void 0},xv.bind(null,h,y,u,a),null),et===null)throw Error(i(349));b||(Mi&127)!==0||bv(h,a,u)}return u}function bv(r,a,u){r.flags|=16384,r={getSnapshot:a,value:u},a=Ae.updateQueue,a===null?(a=Cu(),Ae.updateQueue=a,a.stores=[r]):(u=a.stores,u===null?a.stores=[r]:u.push(r))}function xv(r,a,u,h){a.value=u,a.getSnapshot=h,_v(a)&&Cv(r)}function Sv(r,a,u){return u(function(){_v(a)&&Cv(r)})}function _v(r){var a=r.getSnapshot;r=r.value;try{var u=a();return!gn(r,u)}catch{return!0}}function Cv(r){var a=eo(r,2);a!==null&&un(a,r,2)}function Sh(r){var a=Kt();if(typeof r=="function"){var u=r;if(r=u(),uo){tn(!0);try{u()}finally{tn(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:r},a}function wv(r,a,u,h){return r.baseState=u,bh(r,Xe,typeof h=="function"?h:Ii)}function nR(r,a,u,h,y){if(Au(r))throw Error(i(485));if(r=a.action,r!==null){var b={payload:y,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(E){b.listeners.push(E)}};P.T!==null?u(!0):b.isTransition=!1,h(b),u=a.pending,u===null?(b.next=a.pending=b,Ev(a,b)):(b.next=u.next,a.pending=u.next=b)}}function Ev(r,a){var u=a.action,h=a.payload,y=r.state;if(a.isTransition){var b=P.T,E={};P.T=E;try{var L=u(y,h),B=P.S;B!==null&&B(E,L),kv(r,a,L)}catch(Q){_h(r,a,Q)}finally{b!==null&&E.types!==null&&(b.types=E.types),P.T=b}}else try{b=u(y,h),kv(r,a,b)}catch(Q){_h(r,a,Q)}}function kv(r,a,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(h){Tv(r,a,h)},function(h){return _h(r,a,h)}):Tv(r,a,u)}function Tv(r,a,u){a.status="fulfilled",a.value=u,Av(a),r.state=u,a=r.pending,a!==null&&(u=a.next,u===a?r.pending=null:(u=u.next,a.next=u,Ev(r,u)))}function _h(r,a,u){var h=r.pending;if(r.pending=null,h!==null){h=h.next;do a.status="rejected",a.reason=u,Av(a),a=a.next;while(a!==h)}r.action=null}function Av(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function Lv(r,a){return a}function Rv(r,a){if(Pe){var u=et.formState;if(u!==null){e:{var h=Ae;if(Pe){if(ot){t:{for(var y=ot,b=Mn;y.nodeType!==8;){if(!b){y=null;break t}if(y=Nn(y.nextSibling),y===null){y=null;break t}}b=y.data,y=b==="F!"||b==="F"?y:null}if(y){ot=Nn(y.nextSibling),h=y.data==="F!";break e}}pr(h)}h=!1}h&&(a=u[0])}}return u=Kt(),u.memoizedState=u.baseState=a,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lv,lastRenderedState:a},u.queue=h,u=Xv.bind(null,Ae,h),h.dispatch=u,h=Sh(!1),b=Ah.bind(null,Ae,!1,h.queue),h=Kt(),y={state:a,dispatch:null,action:r,pending:null},h.queue=y,u=nR.bind(null,Ae,y,b,u),y.dispatch=u,h.memoizedState=r,[a,u,!1]}function Ov(r){var a=ht();return Dv(a,Xe,r)}function Dv(r,a,u){if(a=bh(r,a,Lv)[0],r=Eu(Ii)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var h=Ts(a)}catch(E){throw E===fa?mu:E}else h=a;a=ht();var y=a.queue,b=y.dispatch;return u!==a.memoizedState&&(Ae.flags|=2048,ya(9,{destroy:void 0},iR.bind(null,y,u),null)),[h,b,r]}function iR(r,a){r.action=a}function Mv(r){var a=ht(),u=Xe;if(u!==null)return Dv(a,u,r);ht(),a=a.memoizedState,u=ht();var h=u.queue.dispatch;return u.memoizedState=r,[a,h,!1]}function ya(r,a,u,h){return r={tag:r,create:u,deps:h,inst:a,next:null},a=Ae.updateQueue,a===null&&(a=Cu(),Ae.updateQueue=a),u=a.lastEffect,u===null?a.lastEffect=r.next=r:(h=u.next,u.next=r,r.next=h,a.lastEffect=r),r}function Iv(){return ht().memoizedState}function ku(r,a,u,h){var y=Kt();Ae.flags|=r,y.memoizedState=ya(1|a,{destroy:void 0},u,h===void 0?null:h)}function Tu(r,a,u,h){var y=ht();h=h===void 0?null:h;var b=y.memoizedState.inst;Xe!==null&&h!==null&&hh(h,Xe.memoizedState.deps)?y.memoizedState=ya(a,b,u,h):(Ae.flags|=r,y.memoizedState=ya(1|a,b,u,h))}function Nv(r,a){ku(8390656,8,r,a)}function Ch(r,a){Tu(2048,8,r,a)}function rR(r){Ae.flags|=4;var a=Ae.updateQueue;if(a===null)a=Cu(),Ae.updateQueue=a,a.events=[r];else{var u=a.events;u===null?a.events=[r]:u.push(r)}}function zv(r){var a=ht().memoizedState;return rR({ref:a,nextImpl:r}),function(){if((Fe&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function Pv(r,a){return Tu(4,2,r,a)}function Hv(r,a){return Tu(4,4,r,a)}function jv(r,a){if(typeof a=="function"){r=r();var u=a(r);return function(){typeof u=="function"?u():a(null)}}if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function Bv(r,a,u){u=u!=null?u.concat([r]):null,Tu(4,4,jv.bind(null,a,r),u)}function wh(){}function Uv(r,a){var u=ht();a=a===void 0?null:a;var h=u.memoizedState;return a!==null&&hh(a,h[1])?h[0]:(u.memoizedState=[r,a],r)}function Vv(r,a){var u=ht();a=a===void 0?null:a;var h=u.memoizedState;if(a!==null&&hh(a,h[1]))return h[0];if(h=r(),uo){tn(!0);try{r()}finally{tn(!1)}}return u.memoizedState=[h,a],h}function Eh(r,a,u){return u===void 0||(Mi&1073741824)!==0&&(Ie&261930)===0?r.memoizedState=a:(r.memoizedState=u,r=Fb(),Ae.lanes|=r,Cr|=r,u)}function Fv(r,a,u,h){return gn(u,a)?u:pa.current!==null?(r=Eh(r,u,h),gn(r,a)||(vt=!0),r):(Mi&42)===0||(Mi&1073741824)!==0&&(Ie&261930)===0?(vt=!0,r.memoizedState=u):(r=Fb(),Ae.lanes|=r,Cr|=r,a)}function Gv(r,a,u,h,y){var b=$.p;$.p=b!==0&&8>b?b:8;var E=P.T,L={};P.T=L,Ah(r,!1,a,u);try{var B=y(),Q=P.S;if(Q!==null&&Q(L,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){var ie=JL(B,h);As(r,a,ie,_n(r))}else As(r,a,h,_n(r))}catch(se){As(r,a,{then:function(){},status:"rejected",reason:se},_n())}finally{$.p=b,E!==null&&L.types!==null&&(E.types=L.types),P.T=E}}function oR(){}function kh(r,a,u,h){if(r.tag!==5)throw Error(i(476));var y=$v(r).queue;Gv(r,y,a,ne,u===null?oR:function(){return qv(r),u(h)})}function $v(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:ne},next:null};var u={};return a.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:u},next:null},r.memoizedState=a,r=r.alternate,r!==null&&(r.memoizedState=a),a}function qv(r){var a=$v(r);a.next===null&&(a=r.alternate.memoizedState),As(r,a.next.queue,{},_n())}function Th(){return Pt($s)}function Wv(){return ht().memoizedState}function Yv(){return ht().memoizedState}function aR(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var u=_n();r=yr(u);var h=vr(a,r,u);h!==null&&(un(h,a,u),Cs(h,a,u)),a={cache:nh()},r.payload=a;return}a=a.return}}function sR(r,a,u){var h=_n();u={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Au(r)?Kv(a,u):(u=$f(r,a,u,h),u!==null&&(un(u,r,h),Qv(u,a,h)))}function Xv(r,a,u){var h=_n();As(r,a,u,h)}function As(r,a,u,h){var y={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Au(r))Kv(a,y);else{var b=r.alternate;if(r.lanes===0&&(b===null||b.lanes===0)&&(b=a.lastRenderedReducer,b!==null))try{var E=a.lastRenderedState,L=b(E,u);if(y.hasEagerState=!0,y.eagerState=L,gn(L,E))return lu(r,a,y,0),et===null&&su(),!1}catch{}if(u=$f(r,a,y,h),u!==null)return un(u,r,h),Qv(u,a,h),!0}return!1}function Ah(r,a,u,h){if(h={lane:2,revertLane:ap(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Au(r)){if(a)throw Error(i(479))}else a=$f(r,u,h,2),a!==null&&un(a,r,2)}function Au(r){var a=r.alternate;return r===Ae||a!==null&&a===Ae}function Kv(r,a){ma=Su=!0;var u=r.pending;u===null?a.next=a:(a.next=u.next,u.next=a),r.pending=a}function Qv(r,a,u){if((u&4194048)!==0){var h=a.lanes;h&=r.pendingLanes,u|=h,a.lanes=u,n0(r,u)}}var Ls={readContext:Pt,use:wu,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut};Ls.useEffectEvent=ut;var Zv={readContext:Pt,use:wu,useCallback:function(r,a){return Kt().memoizedState=[r,a===void 0?null:a],r},useContext:Pt,useEffect:Nv,useImperativeHandle:function(r,a,u){u=u!=null?u.concat([r]):null,ku(4194308,4,jv.bind(null,a,r),u)},useLayoutEffect:function(r,a){return ku(4194308,4,r,a)},useInsertionEffect:function(r,a){ku(4,2,r,a)},useMemo:function(r,a){var u=Kt();a=a===void 0?null:a;var h=r();if(uo){tn(!0);try{r()}finally{tn(!1)}}return u.memoizedState=[h,a],h},useReducer:function(r,a,u){var h=Kt();if(u!==void 0){var y=u(a);if(uo){tn(!0);try{u(a)}finally{tn(!1)}}}else y=a;return h.memoizedState=h.baseState=y,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:y},h.queue=r,r=r.dispatch=sR.bind(null,Ae,r),[h.memoizedState,r]},useRef:function(r){var a=Kt();return r={current:r},a.memoizedState=r},useState:function(r){r=Sh(r);var a=r.queue,u=Xv.bind(null,Ae,a);return a.dispatch=u,[r.memoizedState,u]},useDebugValue:wh,useDeferredValue:function(r,a){var u=Kt();return Eh(u,r,a)},useTransition:function(){var r=Sh(!1);return r=Gv.bind(null,Ae,r.queue,!0,!1),Kt().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,u){var h=Ae,y=Kt();if(Pe){if(u===void 0)throw Error(i(407));u=u()}else{if(u=a(),et===null)throw Error(i(349));(Ie&127)!==0||bv(h,a,u)}y.memoizedState=u;var b={value:u,getSnapshot:a};return y.queue=b,Nv(Sv.bind(null,h,b,r),[r]),h.flags|=2048,ya(9,{destroy:void 0},xv.bind(null,h,b,u,a),null),u},useId:function(){var r=Kt(),a=et.identifierPrefix;if(Pe){var u=ri,h=ii;u=(h&~(1<<32-Je(h)-1)).toString(32)+u,a="_"+a+"R_"+u,u=_u++,0<u&&(a+="H"+u.toString(32)),a+="_"}else u=eR++,a="_"+a+"r_"+u.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:Th,useFormState:Rv,useActionState:Rv,useOptimistic:function(r){var a=Kt();a.memoizedState=a.baseState=r;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=u,a=Ah.bind(null,Ae,!0,u),u.dispatch=a,[r,a]},useMemoCache:vh,useCacheRefresh:function(){return Kt().memoizedState=aR.bind(null,Ae)},useEffectEvent:function(r){var a=Kt(),u={impl:r};return a.memoizedState=u,function(){if((Fe&2)!==0)throw Error(i(440));return u.impl.apply(void 0,arguments)}}},Lh={readContext:Pt,use:wu,useCallback:Uv,useContext:Pt,useEffect:Ch,useImperativeHandle:Bv,useInsertionEffect:Pv,useLayoutEffect:Hv,useMemo:Vv,useReducer:Eu,useRef:Iv,useState:function(){return Eu(Ii)},useDebugValue:wh,useDeferredValue:function(r,a){var u=ht();return Fv(u,Xe.memoizedState,r,a)},useTransition:function(){var r=Eu(Ii)[0],a=ht().memoizedState;return[typeof r=="boolean"?r:Ts(r),a]},useSyncExternalStore:vv,useId:Wv,useHostTransitionStatus:Th,useFormState:Ov,useActionState:Ov,useOptimistic:function(r,a){var u=ht();return wv(u,Xe,r,a)},useMemoCache:vh,useCacheRefresh:Yv};Lh.useEffectEvent=zv;var Jv={readContext:Pt,use:wu,useCallback:Uv,useContext:Pt,useEffect:Ch,useImperativeHandle:Bv,useInsertionEffect:Pv,useLayoutEffect:Hv,useMemo:Vv,useReducer:xh,useRef:Iv,useState:function(){return xh(Ii)},useDebugValue:wh,useDeferredValue:function(r,a){var u=ht();return Xe===null?Eh(u,r,a):Fv(u,Xe.memoizedState,r,a)},useTransition:function(){var r=xh(Ii)[0],a=ht().memoizedState;return[typeof r=="boolean"?r:Ts(r),a]},useSyncExternalStore:vv,useId:Wv,useHostTransitionStatus:Th,useFormState:Mv,useActionState:Mv,useOptimistic:function(r,a){var u=ht();return Xe!==null?wv(u,Xe,r,a):(u.baseState=r,[r,u.queue.dispatch])},useMemoCache:vh,useCacheRefresh:Yv};Jv.useEffectEvent=zv;function Rh(r,a,u,h){a=r.memoizedState,u=u(h,a),u=u==null?a:m({},a,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var Oh={enqueueSetState:function(r,a,u){r=r._reactInternals;var h=_n(),y=yr(h);y.payload=a,u!=null&&(y.callback=u),a=vr(r,y,h),a!==null&&(un(a,r,h),Cs(a,r,h))},enqueueReplaceState:function(r,a,u){r=r._reactInternals;var h=_n(),y=yr(h);y.tag=1,y.payload=a,u!=null&&(y.callback=u),a=vr(r,y,h),a!==null&&(un(a,r,h),Cs(a,r,h))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var u=_n(),h=yr(u);h.tag=2,a!=null&&(h.callback=a),a=vr(r,h,u),a!==null&&(un(a,r,u),Cs(a,r,u))}};function eb(r,a,u,h,y,b,E){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(h,b,E):a.prototype&&a.prototype.isPureReactComponent?!ms(u,h)||!ms(y,b):!0}function tb(r,a,u,h){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(u,h),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(u,h),a.state!==r&&Oh.enqueueReplaceState(a,a.state,null)}function co(r,a){var u=a;if("ref"in a){u={};for(var h in a)h!=="ref"&&(u[h]=a[h])}if(r=r.defaultProps){u===a&&(u=m({},u));for(var y in r)u[y]===void 0&&(u[y]=r[y])}return u}function nb(r){au(r)}function ib(r){console.error(r)}function rb(r){au(r)}function Lu(r,a){try{var u=r.onUncaughtError;u(a.value,{componentStack:a.stack})}catch(h){setTimeout(function(){throw h})}}function ob(r,a,u){try{var h=r.onCaughtError;h(u.value,{componentStack:u.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Dh(r,a,u){return u=yr(u),u.tag=3,u.payload={element:null},u.callback=function(){Lu(r,a)},u}function ab(r){return r=yr(r),r.tag=3,r}function sb(r,a,u,h){var y=u.type.getDerivedStateFromError;if(typeof y=="function"){var b=h.value;r.payload=function(){return y(b)},r.callback=function(){ob(a,u,h)}}var E=u.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(r.callback=function(){ob(a,u,h),typeof y!="function"&&(wr===null?wr=new Set([this]):wr.add(this));var L=h.stack;this.componentDidCatch(h.value,{componentStack:L!==null?L:""})})}function lR(r,a,u,h,y){if(u.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(a=u.alternate,a!==null&&ua(a,u,y,!0),u=vn.current,u!==null){switch(u.tag){case 31:case 13:return In===null?Uu():u.alternate===null&&ct===0&&(ct=3),u.flags&=-257,u.flags|=65536,u.lanes=y,h===gu?u.flags|=16384:(a=u.updateQueue,a===null?u.updateQueue=new Set([h]):a.add(h),ip(r,h,y)),!1;case 22:return u.flags|=65536,h===gu?u.flags|=16384:(a=u.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([h])},u.updateQueue=a):(u=a.retryQueue,u===null?a.retryQueue=new Set([h]):u.add(h)),ip(r,h,y)),!1}throw Error(i(435,u.tag))}return ip(r,h,y),Uu(),!1}if(Pe)return a=vn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=y,h!==Qf&&(r=Error(i(422),{cause:h}),vs(Rn(r,u)))):(h!==Qf&&(a=Error(i(423),{cause:h}),vs(Rn(a,u))),r=r.current.alternate,r.flags|=65536,y&=-y,r.lanes|=y,h=Rn(h,u),y=Dh(r.stateNode,h,y),lh(r,y),ct!==4&&(ct=2)),!1;var b=Error(i(520),{cause:h});if(b=Rn(b,u),Ps===null?Ps=[b]:Ps.push(b),ct!==4&&(ct=2),a===null)return!0;h=Rn(h,u),u=a;do{switch(u.tag){case 3:return u.flags|=65536,r=y&-y,u.lanes|=r,r=Dh(u.stateNode,h,r),lh(u,r),!1;case 1:if(a=u.type,b=u.stateNode,(u.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(wr===null||!wr.has(b))))return u.flags|=65536,y&=-y,u.lanes|=y,y=ab(y),sb(y,r,u,h),lh(u,y),!1}u=u.return}while(u!==null);return!1}var Mh=Error(i(461)),vt=!1;function Ht(r,a,u,h){a.child=r===null?dv(a,null,u,h):lo(a,r.child,u,h)}function lb(r,a,u,h,y){u=u.render;var b=a.ref;if("ref"in h){var E={};for(var L in h)L!=="ref"&&(E[L]=h[L])}else E=h;return ro(a),h=ph(r,a,u,E,b,y),L=mh(),r!==null&&!vt?(gh(r,a,y),Ni(r,a,y)):(Pe&&L&&Xf(a),a.flags|=1,Ht(r,a,h,y),a.child)}function ub(r,a,u,h,y){if(r===null){var b=u.type;return typeof b=="function"&&!qf(b)&&b.defaultProps===void 0&&u.compare===null?(a.tag=15,a.type=b,cb(r,a,b,h,y)):(r=cu(u.type,null,h,a,a.mode,y),r.ref=a.ref,r.return=a,a.child=r)}if(b=r.child,!Uh(r,y)){var E=b.memoizedProps;if(u=u.compare,u=u!==null?u:ms,u(E,h)&&r.ref===a.ref)return Ni(r,a,y)}return a.flags|=1,r=Li(b,h),r.ref=a.ref,r.return=a,a.child=r}function cb(r,a,u,h,y){if(r!==null){var b=r.memoizedProps;if(ms(b,h)&&r.ref===a.ref)if(vt=!1,a.pendingProps=h=b,Uh(r,y))(r.flags&131072)!==0&&(vt=!0);else return a.lanes=r.lanes,Ni(r,a,y)}return Ih(r,a,u,h,y)}function db(r,a,u,h){var y=h.children,b=r!==null?r.memoizedState:null;if(r===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((a.flags&128)!==0){if(b=b!==null?b.baseLanes|u:u,r!==null){for(h=a.child=r.child,y=0;h!==null;)y=y|h.lanes|h.childLanes,h=h.sibling;h=y&~b}else h=0,a.child=null;return fb(r,a,b,u,h)}if((u&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&pu(a,b!==null?b.cachePool:null),b!==null?pv(a,b):ch(),mv(a);else return h=a.lanes=536870912,fb(r,a,b!==null?b.baseLanes|u:u,u,h)}else b!==null?(pu(a,b.cachePool),pv(a,b),xr(),a.memoizedState=null):(r!==null&&pu(a,null),ch(),xr());return Ht(r,a,y,u),a.child}function Rs(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function fb(r,a,u,h,y){var b=rh();return b=b===null?null:{parent:gt._currentValue,pool:b},a.memoizedState={baseLanes:u,cachePool:b},r!==null&&pu(a,null),ch(),mv(a),r!==null&&ua(r,a,h,!0),a.childLanes=y,null}function Ru(r,a){return a=Du({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function hb(r,a,u){return lo(a,r.child,null,u),r=Ru(a,a.pendingProps),r.flags|=2,bn(a),a.memoizedState=null,r}function uR(r,a,u){var h=a.pendingProps,y=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(Pe){if(h.mode==="hidden")return r=Ru(a,h),a.lanes=536870912,Rs(null,r);if(fh(a),(r=ot)?(r=Ex(r,Mn),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:fr!==null?{id:ii,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},u=K0(r),u.return=a,a.child=u,zt=a,ot=null)):r=null,r===null)throw pr(a);return a.lanes=536870912,null}return Ru(a,h)}var b=r.memoizedState;if(b!==null){var E=b.dehydrated;if(fh(a),y)if(a.flags&256)a.flags&=-257,a=hb(r,a,u);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(i(558));else if(vt||ua(r,a,u,!1),y=(u&r.childLanes)!==0,vt||y){if(h=et,h!==null&&(E=i0(h,u),E!==0&&E!==b.retryLane))throw b.retryLane=E,eo(r,E),un(h,r,E),Mh;Uu(),a=hb(r,a,u)}else r=b.treeContext,ot=Nn(E.nextSibling),zt=a,Pe=!0,hr=null,Mn=!1,r!==null&&J0(a,r),a=Ru(a,h),a.flags|=4096;return a}return r=Li(r.child,{mode:h.mode,children:h.children}),r.ref=a.ref,a.child=r,r.return=a,r}function Ou(r,a){var u=a.ref;if(u===null)r!==null&&r.ref!==null&&(a.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(i(284));(r===null||r.ref!==u)&&(a.flags|=4194816)}}function Ih(r,a,u,h,y){return ro(a),u=ph(r,a,u,h,void 0,y),h=mh(),r!==null&&!vt?(gh(r,a,y),Ni(r,a,y)):(Pe&&h&&Xf(a),a.flags|=1,Ht(r,a,u,y),a.child)}function pb(r,a,u,h,y,b){return ro(a),a.updateQueue=null,u=yv(a,h,u,y),gv(r),h=mh(),r!==null&&!vt?(gh(r,a,b),Ni(r,a,b)):(Pe&&h&&Xf(a),a.flags|=1,Ht(r,a,u,b),a.child)}function mb(r,a,u,h,y){if(ro(a),a.stateNode===null){var b=oa,E=u.contextType;typeof E=="object"&&E!==null&&(b=Pt(E)),b=new u(h,b),a.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Oh,a.stateNode=b,b._reactInternals=a,b=a.stateNode,b.props=h,b.state=a.memoizedState,b.refs={},ah(a),E=u.contextType,b.context=typeof E=="object"&&E!==null?Pt(E):oa,b.state=a.memoizedState,E=u.getDerivedStateFromProps,typeof E=="function"&&(Rh(a,u,E,h),b.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(E=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),E!==b.state&&Oh.enqueueReplaceState(b,b.state,null),Es(a,h,b,y),ws(),b.state=a.memoizedState),typeof b.componentDidMount=="function"&&(a.flags|=4194308),h=!0}else if(r===null){b=a.stateNode;var L=a.memoizedProps,B=co(u,L);b.props=B;var Q=b.context,ie=u.contextType;E=oa,typeof ie=="object"&&ie!==null&&(E=Pt(ie));var se=u.getDerivedStateFromProps;ie=typeof se=="function"||typeof b.getSnapshotBeforeUpdate=="function",L=a.pendingProps!==L,ie||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(L||Q!==E)&&tb(a,b,h,E),gr=!1;var J=a.memoizedState;b.state=J,Es(a,h,b,y),ws(),Q=a.memoizedState,L||J!==Q||gr?(typeof se=="function"&&(Rh(a,u,se,h),Q=a.memoizedState),(B=gr||eb(a,u,B,h,J,Q,E))?(ie||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(a.flags|=4194308)):(typeof b.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=h,a.memoizedState=Q),b.props=h,b.state=Q,b.context=E,h=B):(typeof b.componentDidMount=="function"&&(a.flags|=4194308),h=!1)}else{b=a.stateNode,sh(r,a),E=a.memoizedProps,ie=co(u,E),b.props=ie,se=a.pendingProps,J=b.context,Q=u.contextType,B=oa,typeof Q=="object"&&Q!==null&&(B=Pt(Q)),L=u.getDerivedStateFromProps,(Q=typeof L=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(E!==se||J!==B)&&tb(a,b,h,B),gr=!1,J=a.memoizedState,b.state=J,Es(a,h,b,y),ws();var te=a.memoizedState;E!==se||J!==te||gr||r!==null&&r.dependencies!==null&&fu(r.dependencies)?(typeof L=="function"&&(Rh(a,u,L,h),te=a.memoizedState),(ie=gr||eb(a,u,ie,h,J,te,B)||r!==null&&r.dependencies!==null&&fu(r.dependencies))?(Q||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(h,te,B),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(h,te,B)),typeof b.componentDidUpdate=="function"&&(a.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof b.componentDidUpdate!="function"||E===r.memoizedProps&&J===r.memoizedState||(a.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===r.memoizedProps&&J===r.memoizedState||(a.flags|=1024),a.memoizedProps=h,a.memoizedState=te),b.props=h,b.state=te,b.context=B,h=ie):(typeof b.componentDidUpdate!="function"||E===r.memoizedProps&&J===r.memoizedState||(a.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===r.memoizedProps&&J===r.memoizedState||(a.flags|=1024),h=!1)}return b=h,Ou(r,a),h=(a.flags&128)!==0,b||h?(b=a.stateNode,u=h&&typeof u.getDerivedStateFromError!="function"?null:b.render(),a.flags|=1,r!==null&&h?(a.child=lo(a,r.child,null,y),a.child=lo(a,null,u,y)):Ht(r,a,u,y),a.memoizedState=b.state,r=a.child):r=Ni(r,a,y),r}function gb(r,a,u,h){return no(),a.flags|=256,Ht(r,a,u,h),a.child}var Nh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function zh(r){return{baseLanes:r,cachePool:ov()}}function Ph(r,a,u){return r=r!==null?r.childLanes&~u:0,a&&(r|=Sn),r}function yb(r,a,u){var h=a.pendingProps,y=!1,b=(a.flags&128)!==0,E;if((E=b)||(E=r!==null&&r.memoizedState===null?!1:(ft.current&2)!==0),E&&(y=!0,a.flags&=-129),E=(a.flags&32)!==0,a.flags&=-33,r===null){if(Pe){if(y?br(a):xr(),(r=ot)?(r=Ex(r,Mn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:fr!==null?{id:ii,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},u=K0(r),u.return=a,a.child=u,zt=a,ot=null)):r=null,r===null)throw pr(a);return bp(r)?a.lanes=32:a.lanes=536870912,null}var L=h.children;return h=h.fallback,y?(xr(),y=a.mode,L=Du({mode:"hidden",children:L},y),h=to(h,y,u,null),L.return=a,h.return=a,L.sibling=h,a.child=L,h=a.child,h.memoizedState=zh(u),h.childLanes=Ph(r,E,u),a.memoizedState=Nh,Rs(null,h)):(br(a),Hh(a,L))}var B=r.memoizedState;if(B!==null&&(L=B.dehydrated,L!==null)){if(b)a.flags&256?(br(a),a.flags&=-257,a=jh(r,a,u)):a.memoizedState!==null?(xr(),a.child=r.child,a.flags|=128,a=null):(xr(),L=h.fallback,y=a.mode,h=Du({mode:"visible",children:h.children},y),L=to(L,y,u,null),L.flags|=2,h.return=a,L.return=a,h.sibling=L,a.child=h,lo(a,r.child,null,u),h=a.child,h.memoizedState=zh(u),h.childLanes=Ph(r,E,u),a.memoizedState=Nh,a=Rs(null,h));else if(br(a),bp(L)){if(E=L.nextSibling&&L.nextSibling.dataset,E)var Q=E.dgst;E=Q,h=Error(i(419)),h.stack="",h.digest=E,vs({value:h,source:null,stack:null}),a=jh(r,a,u)}else if(vt||ua(r,a,u,!1),E=(u&r.childLanes)!==0,vt||E){if(E=et,E!==null&&(h=i0(E,u),h!==0&&h!==B.retryLane))throw B.retryLane=h,eo(r,h),un(E,r,h),Mh;vp(L)||Uu(),a=jh(r,a,u)}else vp(L)?(a.flags|=192,a.child=r.child,a=null):(r=B.treeContext,ot=Nn(L.nextSibling),zt=a,Pe=!0,hr=null,Mn=!1,r!==null&&J0(a,r),a=Hh(a,h.children),a.flags|=4096);return a}return y?(xr(),L=h.fallback,y=a.mode,B=r.child,Q=B.sibling,h=Li(B,{mode:"hidden",children:h.children}),h.subtreeFlags=B.subtreeFlags&65011712,Q!==null?L=Li(Q,L):(L=to(L,y,u,null),L.flags|=2),L.return=a,h.return=a,h.sibling=L,a.child=h,Rs(null,h),h=a.child,L=r.child.memoizedState,L===null?L=zh(u):(y=L.cachePool,y!==null?(B=gt._currentValue,y=y.parent!==B?{parent:B,pool:B}:y):y=ov(),L={baseLanes:L.baseLanes|u,cachePool:y}),h.memoizedState=L,h.childLanes=Ph(r,E,u),a.memoizedState=Nh,Rs(r.child,h)):(br(a),u=r.child,r=u.sibling,u=Li(u,{mode:"visible",children:h.children}),u.return=a,u.sibling=null,r!==null&&(E=a.deletions,E===null?(a.deletions=[r],a.flags|=16):E.push(r)),a.child=u,a.memoizedState=null,u)}function Hh(r,a){return a=Du({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function Du(r,a){return r=yn(22,r,null,a),r.lanes=0,r}function jh(r,a,u){return lo(a,r.child,null,u),r=Hh(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function vb(r,a,u){r.lanes|=a;var h=r.alternate;h!==null&&(h.lanes|=a),eh(r.return,a,u)}function Bh(r,a,u,h,y,b){var E=r.memoizedState;E===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:h,tail:u,tailMode:y,treeForkCount:b}:(E.isBackwards=a,E.rendering=null,E.renderingStartTime=0,E.last=h,E.tail=u,E.tailMode=y,E.treeForkCount=b)}function bb(r,a,u){var h=a.pendingProps,y=h.revealOrder,b=h.tail;h=h.children;var E=ft.current,L=(E&2)!==0;if(L?(E=E&1|2,a.flags|=128):E&=1,I(ft,E),Ht(r,a,h,u),h=Pe?ys:0,!L&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&vb(r,u,a);else if(r.tag===19)vb(r,u,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(y){case"forwards":for(u=a.child,y=null;u!==null;)r=u.alternate,r!==null&&xu(r)===null&&(y=u),u=u.sibling;u=y,u===null?(y=a.child,a.child=null):(y=u.sibling,u.sibling=null),Bh(a,!1,y,u,b,h);break;case"backwards":case"unstable_legacy-backwards":for(u=null,y=a.child,a.child=null;y!==null;){if(r=y.alternate,r!==null&&xu(r)===null){a.child=y;break}r=y.sibling,y.sibling=u,u=y,y=r}Bh(a,!0,u,null,b,h);break;case"together":Bh(a,!1,null,null,void 0,h);break;default:a.memoizedState=null}return a.child}function Ni(r,a,u){if(r!==null&&(a.dependencies=r.dependencies),Cr|=a.lanes,(u&a.childLanes)===0)if(r!==null){if(ua(r,a,u,!1),(u&a.childLanes)===0)return null}else return null;if(r!==null&&a.child!==r.child)throw Error(i(153));if(a.child!==null){for(r=a.child,u=Li(r,r.pendingProps),a.child=u,u.return=a;r.sibling!==null;)r=r.sibling,u=u.sibling=Li(r,r.pendingProps),u.return=a;u.sibling=null}return a.child}function Uh(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&fu(r)))}function cR(r,a,u){switch(a.tag){case 3:xe(a,a.stateNode.containerInfo),mr(a,gt,r.memoizedState.cache),no();break;case 27:case 5:ze(a);break;case 4:xe(a,a.stateNode.containerInfo);break;case 10:mr(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,fh(a),null;break;case 13:var h=a.memoizedState;if(h!==null)return h.dehydrated!==null?(br(a),a.flags|=128,null):(u&a.child.childLanes)!==0?yb(r,a,u):(br(a),r=Ni(r,a,u),r!==null?r.sibling:null);br(a);break;case 19:var y=(r.flags&128)!==0;if(h=(u&a.childLanes)!==0,h||(ua(r,a,u,!1),h=(u&a.childLanes)!==0),y){if(h)return bb(r,a,u);a.flags|=128}if(y=a.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),I(ft,ft.current),h)break;return null;case 22:return a.lanes=0,db(r,a,u,a.pendingProps);case 24:mr(a,gt,r.memoizedState.cache)}return Ni(r,a,u)}function xb(r,a,u){if(r!==null)if(r.memoizedProps!==a.pendingProps)vt=!0;else{if(!Uh(r,u)&&(a.flags&128)===0)return vt=!1,cR(r,a,u);vt=(r.flags&131072)!==0}else vt=!1,Pe&&(a.flags&1048576)!==0&&Z0(a,ys,a.index);switch(a.lanes=0,a.tag){case 16:e:{var h=a.pendingProps;if(r=ao(a.elementType),a.type=r,typeof r=="function")qf(r)?(h=co(r,h),a.tag=1,a=mb(null,a,r,h,u)):(a.tag=0,a=Ih(null,a,r,h,u));else{if(r!=null){var y=r.$$typeof;if(y===D){a.tag=11,a=lb(null,a,r,h,u);break e}else if(y===z){a.tag=14,a=ub(null,a,r,h,u);break e}}throw a=X(r)||r,Error(i(306,a,""))}}return a;case 0:return Ih(r,a,a.type,a.pendingProps,u);case 1:return h=a.type,y=co(h,a.pendingProps),mb(r,a,h,y,u);case 3:e:{if(xe(a,a.stateNode.containerInfo),r===null)throw Error(i(387));h=a.pendingProps;var b=a.memoizedState;y=b.element,sh(r,a),Es(a,h,null,u);var E=a.memoizedState;if(h=E.cache,mr(a,gt,h),h!==b.cache&&th(a,[gt],u,!0),ws(),h=E.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:E.cache},a.updateQueue.baseState=b,a.memoizedState=b,a.flags&256){a=gb(r,a,h,u);break e}else if(h!==y){y=Rn(Error(i(424)),a),vs(y),a=gb(r,a,h,u);break e}else for(r=a.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,ot=Nn(r.firstChild),zt=a,Pe=!0,hr=null,Mn=!0,u=dv(a,null,h,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(no(),h===y){a=Ni(r,a,u);break e}Ht(r,a,h,u)}a=a.child}return a;case 26:return Ou(r,a),r===null?(u=Ox(a.type,null,a.pendingProps,null))?a.memoizedState=u:Pe||(u=a.type,r=a.pendingProps,h=Yu(re.current).createElement(u),h[Nt]=a,h[nn]=r,jt(h,u,r),Lt(h),a.stateNode=h):a.memoizedState=Ox(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return ze(a),r===null&&Pe&&(h=a.stateNode=Ax(a.type,a.pendingProps,re.current),zt=a,Mn=!0,y=ot,Ar(a.type)?(xp=y,ot=Nn(h.firstChild)):ot=y),Ht(r,a,a.pendingProps.children,u),Ou(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&Pe&&((y=h=ot)&&(h=BR(h,a.type,a.pendingProps,Mn),h!==null?(a.stateNode=h,zt=a,ot=Nn(h.firstChild),Mn=!1,y=!0):y=!1),y||pr(a)),ze(a),y=a.type,b=a.pendingProps,E=r!==null?r.memoizedProps:null,h=b.children,mp(y,b)?h=null:E!==null&&mp(y,E)&&(a.flags|=32),a.memoizedState!==null&&(y=ph(r,a,tR,null,null,u),$s._currentValue=y),Ou(r,a),Ht(r,a,h,u),a.child;case 6:return r===null&&Pe&&((r=u=ot)&&(u=UR(u,a.pendingProps,Mn),u!==null?(a.stateNode=u,zt=a,ot=null,r=!0):r=!1),r||pr(a)),null;case 13:return yb(r,a,u);case 4:return xe(a,a.stateNode.containerInfo),h=a.pendingProps,r===null?a.child=lo(a,null,h,u):Ht(r,a,h,u),a.child;case 11:return lb(r,a,a.type,a.pendingProps,u);case 7:return Ht(r,a,a.pendingProps,u),a.child;case 8:return Ht(r,a,a.pendingProps.children,u),a.child;case 12:return Ht(r,a,a.pendingProps.children,u),a.child;case 10:return h=a.pendingProps,mr(a,a.type,h.value),Ht(r,a,h.children,u),a.child;case 9:return y=a.type._context,h=a.pendingProps.children,ro(a),y=Pt(y),h=h(y),a.flags|=1,Ht(r,a,h,u),a.child;case 14:return ub(r,a,a.type,a.pendingProps,u);case 15:return cb(r,a,a.type,a.pendingProps,u);case 19:return bb(r,a,u);case 31:return uR(r,a,u);case 22:return db(r,a,u,a.pendingProps);case 24:return ro(a),h=Pt(gt),r===null?(y=rh(),y===null&&(y=et,b=nh(),y.pooledCache=b,b.refCount++,b!==null&&(y.pooledCacheLanes|=u),y=b),a.memoizedState={parent:h,cache:y},ah(a),mr(a,gt,y)):((r.lanes&u)!==0&&(sh(r,a),Es(a,null,null,u),ws()),y=r.memoizedState,b=a.memoizedState,y.parent!==h?(y={parent:h,cache:h},a.memoizedState=y,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=y),mr(a,gt,h)):(h=b.cache,mr(a,gt,h),h!==y.cache&&th(a,[gt],u,!0))),Ht(r,a,a.pendingProps.children,u),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function zi(r){r.flags|=4}function Vh(r,a,u,h,y){if((a=(r.mode&32)!==0)&&(a=!1),a){if(r.flags|=16777216,(y&335544128)===y)if(r.stateNode.complete)r.flags|=8192;else if(Wb())r.flags|=8192;else throw so=gu,oh}else r.flags&=-16777217}function Sb(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!zx(a))if(Wb())r.flags|=8192;else throw so=gu,oh}function Mu(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?e0():536870912,r.lanes|=a,Sa|=a)}function Os(r,a){if(!Pe)switch(r.tailMode){case"hidden":a=r.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:h.sibling=null}}function at(r){var a=r.alternate!==null&&r.alternate.child===r.child,u=0,h=0;if(a)for(var y=r.child;y!==null;)u|=y.lanes|y.childLanes,h|=y.subtreeFlags&65011712,h|=y.flags&65011712,y.return=r,y=y.sibling;else for(y=r.child;y!==null;)u|=y.lanes|y.childLanes,h|=y.subtreeFlags,h|=y.flags,y.return=r,y=y.sibling;return r.subtreeFlags|=h,r.childLanes=u,a}function dR(r,a,u){var h=a.pendingProps;switch(Kf(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return at(a),null;case 1:return at(a),null;case 3:return u=a.stateNode,h=null,r!==null&&(h=r.memoizedState.cache),a.memoizedState.cache!==h&&(a.flags|=2048),Di(gt),pe(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(r===null||r.child===null)&&(la(a)?zi(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Zf())),at(a),null;case 26:var y=a.type,b=a.memoizedState;return r===null?(zi(a),b!==null?(at(a),Sb(a,b)):(at(a),Vh(a,y,null,h,u))):b?b!==r.memoizedState?(zi(a),at(a),Sb(a,b)):(at(a),a.flags&=-16777217):(r=r.memoizedProps,r!==h&&zi(a),at(a),Vh(a,y,r,h,u)),null;case 27:if(He(a),u=re.current,y=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==h&&zi(a);else{if(!h){if(a.stateNode===null)throw Error(i(166));return at(a),null}r=le.current,la(a)?ev(a):(r=Ax(y,h,u),a.stateNode=r,zi(a))}return at(a),null;case 5:if(He(a),y=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==h&&zi(a);else{if(!h){if(a.stateNode===null)throw Error(i(166));return at(a),null}if(b=le.current,la(a))ev(a);else{var E=Yu(re.current);switch(b){case 1:b=E.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:b=E.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":b=E.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":b=E.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":b=E.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof h.is=="string"?E.createElement("select",{is:h.is}):E.createElement("select"),h.multiple?b.multiple=!0:h.size&&(b.size=h.size);break;default:b=typeof h.is=="string"?E.createElement(y,{is:h.is}):E.createElement(y)}}b[Nt]=a,b[nn]=h;e:for(E=a.child;E!==null;){if(E.tag===5||E.tag===6)b.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===a)break e;for(;E.sibling===null;){if(E.return===null||E.return===a)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}a.stateNode=b;e:switch(jt(b,y,h),y){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&zi(a)}}return at(a),Vh(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,u),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==h&&zi(a);else{if(typeof h!="string"&&a.stateNode===null)throw Error(i(166));if(r=re.current,la(a)){if(r=a.stateNode,u=a.memoizedProps,h=null,y=zt,y!==null)switch(y.tag){case 27:case 5:h=y.memoizedProps}r[Nt]=a,r=!!(r.nodeValue===u||h!==null&&h.suppressHydrationWarning===!0||yx(r.nodeValue,u)),r||pr(a,!0)}else r=Yu(r).createTextNode(h),r[Nt]=a,a.stateNode=r}return at(a),null;case 31:if(u=a.memoizedState,r===null||r.memoizedState!==null){if(h=la(a),u!==null){if(r===null){if(!h)throw Error(i(318));if(r=a.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[Nt]=a}else no(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;at(a),r=!1}else u=Zf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=u),r=!0;if(!r)return a.flags&256?(bn(a),a):(bn(a),null);if((a.flags&128)!==0)throw Error(i(558))}return at(a),null;case 13:if(h=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(y=la(a),h!==null&&h.dehydrated!==null){if(r===null){if(!y)throw Error(i(318));if(y=a.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(i(317));y[Nt]=a}else no(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;at(a),y=!1}else y=Zf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=y),y=!0;if(!y)return a.flags&256?(bn(a),a):(bn(a),null)}return bn(a),(a.flags&128)!==0?(a.lanes=u,a):(u=h!==null,r=r!==null&&r.memoizedState!==null,u&&(h=a.child,y=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(y=h.alternate.memoizedState.cachePool.pool),b=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(b=h.memoizedState.cachePool.pool),b!==y&&(h.flags|=2048)),u!==r&&u&&(a.child.flags|=8192),Mu(a,a.updateQueue),at(a),null);case 4:return pe(),r===null&&cp(a.stateNode.containerInfo),at(a),null;case 10:return Di(a.type),at(a),null;case 19:if(Y(ft),h=a.memoizedState,h===null)return at(a),null;if(y=(a.flags&128)!==0,b=h.rendering,b===null)if(y)Os(h,!1);else{if(ct!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(b=xu(r),b!==null){for(a.flags|=128,Os(h,!1),r=b.updateQueue,a.updateQueue=r,Mu(a,r),a.subtreeFlags=0,r=u,u=a.child;u!==null;)X0(u,r),u=u.sibling;return I(ft,ft.current&1|2),Pe&&Ri(a,h.treeForkCount),a.child}r=r.sibling}h.tail!==null&&Yt()>Hu&&(a.flags|=128,y=!0,Os(h,!1),a.lanes=4194304)}else{if(!y)if(r=xu(b),r!==null){if(a.flags|=128,y=!0,r=r.updateQueue,a.updateQueue=r,Mu(a,r),Os(h,!0),h.tail===null&&h.tailMode==="hidden"&&!b.alternate&&!Pe)return at(a),null}else 2*Yt()-h.renderingStartTime>Hu&&u!==536870912&&(a.flags|=128,y=!0,Os(h,!1),a.lanes=4194304);h.isBackwards?(b.sibling=a.child,a.child=b):(r=h.last,r!==null?r.sibling=b:a.child=b,h.last=b)}return h.tail!==null?(r=h.tail,h.rendering=r,h.tail=r.sibling,h.renderingStartTime=Yt(),r.sibling=null,u=ft.current,I(ft,y?u&1|2:u&1),Pe&&Ri(a,h.treeForkCount),r):(at(a),null);case 22:case 23:return bn(a),dh(),h=a.memoizedState!==null,r!==null?r.memoizedState!==null!==h&&(a.flags|=8192):h&&(a.flags|=8192),h?(u&536870912)!==0&&(a.flags&128)===0&&(at(a),a.subtreeFlags&6&&(a.flags|=8192)):at(a),u=a.updateQueue,u!==null&&Mu(a,u.retryQueue),u=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),h=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(h=a.memoizedState.cachePool.pool),h!==u&&(a.flags|=2048),r!==null&&Y(oo),null;case 24:return u=null,r!==null&&(u=r.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),Di(gt),at(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function fR(r,a){switch(Kf(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return Di(gt),pe(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 26:case 27:case 5:return He(a),null;case 31:if(a.memoizedState!==null){if(bn(a),a.alternate===null)throw Error(i(340));no()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(bn(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(i(340));no()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return Y(ft),null;case 4:return pe(),null;case 10:return Di(a.type),null;case 22:case 23:return bn(a),dh(),r!==null&&Y(oo),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return Di(gt),null;case 25:return null;default:return null}}function _b(r,a){switch(Kf(a),a.tag){case 3:Di(gt),pe();break;case 26:case 27:case 5:He(a);break;case 4:pe();break;case 31:a.memoizedState!==null&&bn(a);break;case 13:bn(a);break;case 19:Y(ft);break;case 10:Di(a.type);break;case 22:case 23:bn(a),dh(),r!==null&&Y(oo);break;case 24:Di(gt)}}function Ds(r,a){try{var u=a.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var y=h.next;u=y;do{if((u.tag&r)===r){h=void 0;var b=u.create,E=u.inst;h=b(),E.destroy=h}u=u.next}while(u!==y)}}catch(L){We(a,a.return,L)}}function Sr(r,a,u){try{var h=a.updateQueue,y=h!==null?h.lastEffect:null;if(y!==null){var b=y.next;h=b;do{if((h.tag&r)===r){var E=h.inst,L=E.destroy;if(L!==void 0){E.destroy=void 0,y=a;var B=u,Q=L;try{Q()}catch(ie){We(y,B,ie)}}}h=h.next}while(h!==b)}}catch(ie){We(a,a.return,ie)}}function Cb(r){var a=r.updateQueue;if(a!==null){var u=r.stateNode;try{hv(a,u)}catch(h){We(r,r.return,h)}}}function wb(r,a,u){u.props=co(r.type,r.memoizedProps),u.state=r.memoizedState;try{u.componentWillUnmount()}catch(h){We(r,a,h)}}function Ms(r,a){try{var u=r.ref;if(u!==null){switch(r.tag){case 26:case 27:case 5:var h=r.stateNode;break;case 30:h=r.stateNode;break;default:h=r.stateNode}typeof u=="function"?r.refCleanup=u(h):u.current=h}}catch(y){We(r,a,y)}}function oi(r,a){var u=r.ref,h=r.refCleanup;if(u!==null)if(typeof h=="function")try{h()}catch(y){We(r,a,y)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(y){We(r,a,y)}else u.current=null}function Eb(r){var a=r.type,u=r.memoizedProps,h=r.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":u.autoFocus&&h.focus();break e;case"img":u.src?h.src=u.src:u.srcSet&&(h.srcset=u.srcSet)}}catch(y){We(r,r.return,y)}}function Fh(r,a,u){try{var h=r.stateNode;IR(h,r.type,u,a),h[nn]=a}catch(y){We(r,r.return,y)}}function kb(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Ar(r.type)||r.tag===4}function Gh(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||kb(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&Ar(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function $h(r,a,u){var h=r.tag;if(h===5||h===6)r=r.stateNode,a?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(r,a):(a=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,a.appendChild(r),u=u._reactRootContainer,u!=null||a.onclick!==null||(a.onclick=Ti));else if(h!==4&&(h===27&&Ar(r.type)&&(u=r.stateNode,a=null),r=r.child,r!==null))for($h(r,a,u),r=r.sibling;r!==null;)$h(r,a,u),r=r.sibling}function Iu(r,a,u){var h=r.tag;if(h===5||h===6)r=r.stateNode,a?u.insertBefore(r,a):u.appendChild(r);else if(h!==4&&(h===27&&Ar(r.type)&&(u=r.stateNode),r=r.child,r!==null))for(Iu(r,a,u),r=r.sibling;r!==null;)Iu(r,a,u),r=r.sibling}function Tb(r){var a=r.stateNode,u=r.memoizedProps;try{for(var h=r.type,y=a.attributes;y.length;)a.removeAttributeNode(y[0]);jt(a,h,u),a[Nt]=r,a[nn]=u}catch(b){We(r,r.return,b)}}var Pi=!1,bt=!1,qh=!1,Ab=typeof WeakSet=="function"?WeakSet:Set,Rt=null;function hR(r,a){if(r=r.containerInfo,hp=tc,r=B0(r),jf(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var h=u.getSelection&&u.getSelection();if(h&&h.rangeCount!==0){u=h.anchorNode;var y=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{u.nodeType,b.nodeType}catch{u=null;break e}var E=0,L=-1,B=-1,Q=0,ie=0,se=r,J=null;t:for(;;){for(var te;se!==u||y!==0&&se.nodeType!==3||(L=E+y),se!==b||h!==0&&se.nodeType!==3||(B=E+h),se.nodeType===3&&(E+=se.nodeValue.length),(te=se.firstChild)!==null;)J=se,se=te;for(;;){if(se===r)break t;if(J===u&&++Q===y&&(L=E),J===b&&++ie===h&&(B=E),(te=se.nextSibling)!==null)break;se=J,J=se.parentNode}se=te}u=L===-1||B===-1?null:{start:L,end:B}}else u=null}u=u||{start:0,end:0}}else u=null;for(pp={focusedElem:r,selectionRange:u},tc=!1,Rt=a;Rt!==null;)if(a=Rt,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,Rt=r;else for(;Rt!==null;){switch(a=Rt,b=a.alternate,r=a.flags,a.tag){case 0:if((r&4)!==0&&(r=a.updateQueue,r=r!==null?r.events:null,r!==null))for(u=0;u<r.length;u++)y=r[u],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&b!==null){r=void 0,u=a,y=b.memoizedProps,b=b.memoizedState,h=u.stateNode;try{var ye=co(u.type,y);r=h.getSnapshotBeforeUpdate(ye,b),h.__reactInternalSnapshotBeforeUpdate=r}catch(Se){We(u,u.return,Se)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,u=r.nodeType,u===9)yp(r);else if(u===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":yp(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=a.sibling,r!==null){r.return=a.return,Rt=r;break}Rt=a.return}}function Lb(r,a,u){var h=u.flags;switch(u.tag){case 0:case 11:case 15:ji(r,u),h&4&&Ds(5,u);break;case 1:if(ji(r,u),h&4)if(r=u.stateNode,a===null)try{r.componentDidMount()}catch(E){We(u,u.return,E)}else{var y=co(u.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(y,a,r.__reactInternalSnapshotBeforeUpdate)}catch(E){We(u,u.return,E)}}h&64&&Cb(u),h&512&&Ms(u,u.return);break;case 3:if(ji(r,u),h&64&&(r=u.updateQueue,r!==null)){if(a=null,u.child!==null)switch(u.child.tag){case 27:case 5:a=u.child.stateNode;break;case 1:a=u.child.stateNode}try{hv(r,a)}catch(E){We(u,u.return,E)}}break;case 27:a===null&&h&4&&Tb(u);case 26:case 5:ji(r,u),a===null&&h&4&&Eb(u),h&512&&Ms(u,u.return);break;case 12:ji(r,u);break;case 31:ji(r,u),h&4&&Db(r,u);break;case 13:ji(r,u),h&4&&Mb(r,u),h&64&&(r=u.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(u=_R.bind(null,u),VR(r,u))));break;case 22:if(h=u.memoizedState!==null||Pi,!h){a=a!==null&&a.memoizedState!==null||bt,y=Pi;var b=bt;Pi=h,(bt=a)&&!b?Bi(r,u,(u.subtreeFlags&8772)!==0):ji(r,u),Pi=y,bt=b}break;case 30:break;default:ji(r,u)}}function Rb(r){var a=r.alternate;a!==null&&(r.alternate=null,Rb(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&_f(a)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var lt=null,on=!1;function Hi(r,a,u){for(u=u.child;u!==null;)Ob(r,a,u),u=u.sibling}function Ob(r,a,u){if(St&&typeof St.onCommitFiberUnmount=="function")try{St.onCommitFiberUnmount(Xt,u)}catch{}switch(u.tag){case 26:bt||oi(u,a),Hi(r,a,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:bt||oi(u,a);var h=lt,y=on;Ar(u.type)&&(lt=u.stateNode,on=!1),Hi(r,a,u),Vs(u.stateNode),lt=h,on=y;break;case 5:bt||oi(u,a);case 6:if(h=lt,y=on,lt=null,Hi(r,a,u),lt=h,on=y,lt!==null)if(on)try{(lt.nodeType===9?lt.body:lt.nodeName==="HTML"?lt.ownerDocument.body:lt).removeChild(u.stateNode)}catch(b){We(u,a,b)}else try{lt.removeChild(u.stateNode)}catch(b){We(u,a,b)}break;case 18:lt!==null&&(on?(r=lt,Cx(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,u.stateNode),La(r)):Cx(lt,u.stateNode));break;case 4:h=lt,y=on,lt=u.stateNode.containerInfo,on=!0,Hi(r,a,u),lt=h,on=y;break;case 0:case 11:case 14:case 15:Sr(2,u,a),bt||Sr(4,u,a),Hi(r,a,u);break;case 1:bt||(oi(u,a),h=u.stateNode,typeof h.componentWillUnmount=="function"&&wb(u,a,h)),Hi(r,a,u);break;case 21:Hi(r,a,u);break;case 22:bt=(h=bt)||u.memoizedState!==null,Hi(r,a,u),bt=h;break;default:Hi(r,a,u)}}function Db(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{La(r)}catch(u){We(a,a.return,u)}}}function Mb(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{La(r)}catch(u){We(a,a.return,u)}}function pR(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new Ab),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new Ab),a;default:throw Error(i(435,r.tag))}}function Nu(r,a){var u=pR(r);a.forEach(function(h){if(!u.has(h)){u.add(h);var y=CR.bind(null,r,h);h.then(y,y)}})}function an(r,a){var u=a.deletions;if(u!==null)for(var h=0;h<u.length;h++){var y=u[h],b=r,E=a,L=E;e:for(;L!==null;){switch(L.tag){case 27:if(Ar(L.type)){lt=L.stateNode,on=!1;break e}break;case 5:lt=L.stateNode,on=!1;break e;case 3:case 4:lt=L.stateNode.containerInfo,on=!0;break e}L=L.return}if(lt===null)throw Error(i(160));Ob(b,E,y),lt=null,on=!1,b=y.alternate,b!==null&&(b.return=null),y.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Ib(a,r),a=a.sibling}var Wn=null;function Ib(r,a){var u=r.alternate,h=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:an(a,r),sn(r),h&4&&(Sr(3,r,r.return),Ds(3,r),Sr(5,r,r.return));break;case 1:an(a,r),sn(r),h&512&&(bt||u===null||oi(u,u.return)),h&64&&Pi&&(r=r.updateQueue,r!==null&&(h=r.callbacks,h!==null&&(u=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=u===null?h:u.concat(h))));break;case 26:var y=Wn;if(an(a,r),sn(r),h&512&&(bt||u===null||oi(u,u.return)),h&4){var b=u!==null?u.memoizedState:null;if(h=r.memoizedState,u===null)if(h===null)if(r.stateNode===null){e:{h=r.type,u=r.memoizedProps,y=y.ownerDocument||y;t:switch(h){case"title":b=y.getElementsByTagName("title")[0],(!b||b[as]||b[Nt]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=y.createElement(h),y.head.insertBefore(b,y.querySelector("head > title"))),jt(b,h,u),b[Nt]=r,Lt(b),h=b;break e;case"link":var E=Ix("link","href",y).get(h+(u.href||""));if(E){for(var L=0;L<E.length;L++)if(b=E[L],b.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&b.getAttribute("rel")===(u.rel==null?null:u.rel)&&b.getAttribute("title")===(u.title==null?null:u.title)&&b.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){E.splice(L,1);break t}}b=y.createElement(h),jt(b,h,u),y.head.appendChild(b);break;case"meta":if(E=Ix("meta","content",y).get(h+(u.content||""))){for(L=0;L<E.length;L++)if(b=E[L],b.getAttribute("content")===(u.content==null?null:""+u.content)&&b.getAttribute("name")===(u.name==null?null:u.name)&&b.getAttribute("property")===(u.property==null?null:u.property)&&b.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&b.getAttribute("charset")===(u.charSet==null?null:u.charSet)){E.splice(L,1);break t}}b=y.createElement(h),jt(b,h,u),y.head.appendChild(b);break;default:throw Error(i(468,h))}b[Nt]=r,Lt(b),h=b}r.stateNode=h}else Nx(y,r.type,r.stateNode);else r.stateNode=Mx(y,h,r.memoizedProps);else b!==h?(b===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):b.count--,h===null?Nx(y,r.type,r.stateNode):Mx(y,h,r.memoizedProps)):h===null&&r.stateNode!==null&&Fh(r,r.memoizedProps,u.memoizedProps)}break;case 27:an(a,r),sn(r),h&512&&(bt||u===null||oi(u,u.return)),u!==null&&h&4&&Fh(r,r.memoizedProps,u.memoizedProps);break;case 5:if(an(a,r),sn(r),h&512&&(bt||u===null||oi(u,u.return)),r.flags&32){y=r.stateNode;try{Zo(y,"")}catch(ye){We(r,r.return,ye)}}h&4&&r.stateNode!=null&&(y=r.memoizedProps,Fh(r,y,u!==null?u.memoizedProps:y)),h&1024&&(qh=!0);break;case 6:if(an(a,r),sn(r),h&4){if(r.stateNode===null)throw Error(i(162));h=r.memoizedProps,u=r.stateNode;try{u.nodeValue=h}catch(ye){We(r,r.return,ye)}}break;case 3:if(Qu=null,y=Wn,Wn=Xu(a.containerInfo),an(a,r),Wn=y,sn(r),h&4&&u!==null&&u.memoizedState.isDehydrated)try{La(a.containerInfo)}catch(ye){We(r,r.return,ye)}qh&&(qh=!1,Nb(r));break;case 4:h=Wn,Wn=Xu(r.stateNode.containerInfo),an(a,r),sn(r),Wn=h;break;case 12:an(a,r),sn(r);break;case 31:an(a,r),sn(r),h&4&&(h=r.updateQueue,h!==null&&(r.updateQueue=null,Nu(r,h)));break;case 13:an(a,r),sn(r),r.child.flags&8192&&r.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Pu=Yt()),h&4&&(h=r.updateQueue,h!==null&&(r.updateQueue=null,Nu(r,h)));break;case 22:y=r.memoizedState!==null;var B=u!==null&&u.memoizedState!==null,Q=Pi,ie=bt;if(Pi=Q||y,bt=ie||B,an(a,r),bt=ie,Pi=Q,sn(r),h&8192)e:for(a=r.stateNode,a._visibility=y?a._visibility&-2:a._visibility|1,y&&(u===null||B||Pi||bt||fo(r)),u=null,a=r;;){if(a.tag===5||a.tag===26){if(u===null){B=u=a;try{if(b=B.stateNode,y)E=b.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none";else{L=B.stateNode;var se=B.memoizedProps.style,J=se!=null&&se.hasOwnProperty("display")?se.display:null;L.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(ye){We(B,B.return,ye)}}}else if(a.tag===6){if(u===null){B=a;try{B.stateNode.nodeValue=y?"":B.memoizedProps}catch(ye){We(B,B.return,ye)}}}else if(a.tag===18){if(u===null){B=a;try{var te=B.stateNode;y?wx(te,!0):wx(B.stateNode,!1)}catch(ye){We(B,B.return,ye)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===r)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;u===a&&(u=null),a=a.return}u===a&&(u=null),a.sibling.return=a.return,a=a.sibling}h&4&&(h=r.updateQueue,h!==null&&(u=h.retryQueue,u!==null&&(h.retryQueue=null,Nu(r,u))));break;case 19:an(a,r),sn(r),h&4&&(h=r.updateQueue,h!==null&&(r.updateQueue=null,Nu(r,h)));break;case 30:break;case 21:break;default:an(a,r),sn(r)}}function sn(r){var a=r.flags;if(a&2){try{for(var u,h=r.return;h!==null;){if(kb(h)){u=h;break}h=h.return}if(u==null)throw Error(i(160));switch(u.tag){case 27:var y=u.stateNode,b=Gh(r);Iu(r,b,y);break;case 5:var E=u.stateNode;u.flags&32&&(Zo(E,""),u.flags&=-33);var L=Gh(r);Iu(r,L,E);break;case 3:case 4:var B=u.stateNode.containerInfo,Q=Gh(r);$h(r,Q,B);break;default:throw Error(i(161))}}catch(ie){We(r,r.return,ie)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function Nb(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;Nb(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function ji(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Lb(r,a.alternate,a),a=a.sibling}function fo(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:Sr(4,a,a.return),fo(a);break;case 1:oi(a,a.return);var u=a.stateNode;typeof u.componentWillUnmount=="function"&&wb(a,a.return,u),fo(a);break;case 27:Vs(a.stateNode);case 26:case 5:oi(a,a.return),fo(a);break;case 22:a.memoizedState===null&&fo(a);break;case 30:fo(a);break;default:fo(a)}r=r.sibling}}function Bi(r,a,u){for(u=u&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var h=a.alternate,y=r,b=a,E=b.flags;switch(b.tag){case 0:case 11:case 15:Bi(y,b,u),Ds(4,b);break;case 1:if(Bi(y,b,u),h=b,y=h.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(Q){We(h,h.return,Q)}if(h=b,y=h.updateQueue,y!==null){var L=h.stateNode;try{var B=y.shared.hiddenCallbacks;if(B!==null)for(y.shared.hiddenCallbacks=null,y=0;y<B.length;y++)fv(B[y],L)}catch(Q){We(h,h.return,Q)}}u&&E&64&&Cb(b),Ms(b,b.return);break;case 27:Tb(b);case 26:case 5:Bi(y,b,u),u&&h===null&&E&4&&Eb(b),Ms(b,b.return);break;case 12:Bi(y,b,u);break;case 31:Bi(y,b,u),u&&E&4&&Db(y,b);break;case 13:Bi(y,b,u),u&&E&4&&Mb(y,b);break;case 22:b.memoizedState===null&&Bi(y,b,u),Ms(b,b.return);break;case 30:break;default:Bi(y,b,u)}a=a.sibling}}function Wh(r,a){var u=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==u&&(r!=null&&r.refCount++,u!=null&&bs(u))}function Yh(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&bs(r))}function Yn(r,a,u,h){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)zb(r,a,u,h),a=a.sibling}function zb(r,a,u,h){var y=a.flags;switch(a.tag){case 0:case 11:case 15:Yn(r,a,u,h),y&2048&&Ds(9,a);break;case 1:Yn(r,a,u,h);break;case 3:Yn(r,a,u,h),y&2048&&(r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&bs(r)));break;case 12:if(y&2048){Yn(r,a,u,h),r=a.stateNode;try{var b=a.memoizedProps,E=b.id,L=b.onPostCommit;typeof L=="function"&&L(E,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(B){We(a,a.return,B)}}else Yn(r,a,u,h);break;case 31:Yn(r,a,u,h);break;case 13:Yn(r,a,u,h);break;case 23:break;case 22:b=a.stateNode,E=a.alternate,a.memoizedState!==null?b._visibility&2?Yn(r,a,u,h):Is(r,a):b._visibility&2?Yn(r,a,u,h):(b._visibility|=2,va(r,a,u,h,(a.subtreeFlags&10256)!==0||!1)),y&2048&&Wh(E,a);break;case 24:Yn(r,a,u,h),y&2048&&Yh(a.alternate,a);break;default:Yn(r,a,u,h)}}function va(r,a,u,h,y){for(y=y&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var b=r,E=a,L=u,B=h,Q=E.flags;switch(E.tag){case 0:case 11:case 15:va(b,E,L,B,y),Ds(8,E);break;case 23:break;case 22:var ie=E.stateNode;E.memoizedState!==null?ie._visibility&2?va(b,E,L,B,y):Is(b,E):(ie._visibility|=2,va(b,E,L,B,y)),y&&Q&2048&&Wh(E.alternate,E);break;case 24:va(b,E,L,B,y),y&&Q&2048&&Yh(E.alternate,E);break;default:va(b,E,L,B,y)}a=a.sibling}}function Is(r,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var u=r,h=a,y=h.flags;switch(h.tag){case 22:Is(u,h),y&2048&&Wh(h.alternate,h);break;case 24:Is(u,h),y&2048&&Yh(h.alternate,h);break;default:Is(u,h)}a=a.sibling}}var Ns=8192;function ba(r,a,u){if(r.subtreeFlags&Ns)for(r=r.child;r!==null;)Pb(r,a,u),r=r.sibling}function Pb(r,a,u){switch(r.tag){case 26:ba(r,a,u),r.flags&Ns&&r.memoizedState!==null&&eO(u,Wn,r.memoizedState,r.memoizedProps);break;case 5:ba(r,a,u);break;case 3:case 4:var h=Wn;Wn=Xu(r.stateNode.containerInfo),ba(r,a,u),Wn=h;break;case 22:r.memoizedState===null&&(h=r.alternate,h!==null&&h.memoizedState!==null?(h=Ns,Ns=16777216,ba(r,a,u),Ns=h):ba(r,a,u));break;default:ba(r,a,u)}}function Hb(r){var a=r.alternate;if(a!==null&&(r=a.child,r!==null)){a.child=null;do a=r.sibling,r.sibling=null,r=a;while(r!==null)}}function zs(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var h=a[u];Rt=h,Bb(h,r)}Hb(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)jb(r),r=r.sibling}function jb(r){switch(r.tag){case 0:case 11:case 15:zs(r),r.flags&2048&&Sr(9,r,r.return);break;case 3:zs(r);break;case 12:zs(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,zu(r)):zs(r);break;default:zs(r)}}function zu(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var h=a[u];Rt=h,Bb(h,r)}Hb(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:Sr(8,a,a.return),zu(a);break;case 22:u=a.stateNode,u._visibility&2&&(u._visibility&=-3,zu(a));break;default:zu(a)}r=r.sibling}}function Bb(r,a){for(;Rt!==null;){var u=Rt;switch(u.tag){case 0:case 11:case 15:Sr(8,u,a);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var h=u.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:bs(u.memoizedState.cache)}if(h=u.child,h!==null)h.return=u,Rt=h;else e:for(u=r;Rt!==null;){h=Rt;var y=h.sibling,b=h.return;if(Rb(h),h===u){Rt=null;break e}if(y!==null){y.return=b,Rt=y;break e}Rt=b}}}var mR={getCacheForType:function(r){var a=Pt(gt),u=a.data.get(r);return u===void 0&&(u=r(),a.data.set(r,u)),u},cacheSignal:function(){return Pt(gt).controller.signal}},gR=typeof WeakMap=="function"?WeakMap:Map,Fe=0,et=null,De=null,Ie=0,qe=0,xn=null,_r=!1,xa=!1,Xh=!1,Ui=0,ct=0,Cr=0,ho=0,Kh=0,Sn=0,Sa=0,Ps=null,ln=null,Qh=!1,Pu=0,Ub=0,Hu=1/0,ju=null,wr=null,_t=0,Er=null,_a=null,Vi=0,Zh=0,Jh=null,Vb=null,Hs=0,ep=null;function _n(){return(Fe&2)!==0&&Ie!==0?Ie&-Ie:P.T!==null?ap():r0()}function Fb(){if(Sn===0)if((Ie&536870912)===0||Pe){var r=Wl;Wl<<=1,(Wl&3932160)===0&&(Wl=262144),Sn=r}else Sn=536870912;return r=vn.current,r!==null&&(r.flags|=32),Sn}function un(r,a,u){(r===et&&(qe===2||qe===9)||r.cancelPendingCommit!==null)&&(Ca(r,0),kr(r,Ie,Sn,!1)),os(r,u),((Fe&2)===0||r!==et)&&(r===et&&((Fe&2)===0&&(ho|=u),ct===4&&kr(r,Ie,Sn,!1)),ai(r))}function Gb(r,a,u){if((Fe&6)!==0)throw Error(i(327));var h=!u&&(a&127)===0&&(a&r.expiredLanes)===0||rs(r,a),y=h?bR(r,a):np(r,a,!0),b=h;do{if(y===0){xa&&!h&&kr(r,a,0,!1);break}else{if(u=r.current.alternate,b&&!yR(u)){y=np(r,a,!1),b=!1;continue}if(y===2){if(b=a,r.errorRecoveryDisabledLanes&b)var E=0;else E=r.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){a=E;e:{var L=r;y=Ps;var B=L.current.memoizedState.isDehydrated;if(B&&(Ca(L,E).flags|=256),E=np(L,E,!1),E!==2){if(Xh&&!B){L.errorRecoveryDisabledLanes|=b,ho|=b,y=4;break e}b=ln,ln=y,b!==null&&(ln===null?ln=b:ln.push.apply(ln,b))}y=E}if(b=!1,y!==2)continue}}if(y===1){Ca(r,0),kr(r,a,0,!0);break}e:{switch(h=r,b=y,b){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:kr(h,a,Sn,!_r);break e;case 2:ln=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(y=Pu+300-Yt(),10<y)){if(kr(h,a,Sn,!_r),Xl(h,0,!0)!==0)break e;Vi=a,h.timeoutHandle=Sx($b.bind(null,h,u,ln,ju,Qh,a,Sn,ho,Sa,_r,b,"Throttled",-0,0),y);break e}$b(h,u,ln,ju,Qh,a,Sn,ho,Sa,_r,b,null,-0,0)}}break}while(!0);ai(r)}function $b(r,a,u,h,y,b,E,L,B,Q,ie,se,J,te){if(r.timeoutHandle=-1,se=a.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ti},Pb(a,b,se);var ye=(b&62914560)===b?Pu-Yt():(b&4194048)===b?Ub-Yt():0;if(ye=tO(se,ye),ye!==null){Vi=b,r.cancelPendingCommit=ye(Jb.bind(null,r,a,b,u,h,y,E,L,B,ie,se,null,J,te)),kr(r,b,E,!Q);return}}Jb(r,a,b,u,h,y,E,L,B)}function yR(r){for(var a=r;;){var u=a.tag;if((u===0||u===11||u===15)&&a.flags&16384&&(u=a.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var h=0;h<u.length;h++){var y=u[h],b=y.getSnapshot;y=y.value;try{if(!gn(b(),y))return!1}catch{return!1}}if(u=a.child,a.subtreeFlags&16384&&u!==null)u.return=a,a=u;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function kr(r,a,u,h){a&=~Kh,a&=~ho,r.suspendedLanes|=a,r.pingedLanes&=~a,h&&(r.warmLanes|=a),h=r.expirationTimes;for(var y=a;0<y;){var b=31-Je(y),E=1<<b;h[b]=-1,y&=~E}u!==0&&t0(r,u,a)}function Bu(){return(Fe&6)===0?(js(0),!1):!0}function tp(){if(De!==null){if(qe===0)var r=De.return;else r=De,Oi=io=null,yh(r),ha=null,Ss=0,r=De;for(;r!==null;)_b(r.alternate,r),r=r.return;De=null}}function Ca(r,a){var u=r.timeoutHandle;u!==-1&&(r.timeoutHandle=-1,PR(u)),u=r.cancelPendingCommit,u!==null&&(r.cancelPendingCommit=null,u()),Vi=0,tp(),et=r,De=u=Li(r.current,null),Ie=a,qe=0,xn=null,_r=!1,xa=rs(r,a),Xh=!1,Sa=Sn=Kh=ho=Cr=ct=0,ln=Ps=null,Qh=!1,(a&8)!==0&&(a|=a&32);var h=r.entangledLanes;if(h!==0)for(r=r.entanglements,h&=a;0<h;){var y=31-Je(h),b=1<<y;a|=r[y],h&=~b}return Ui=a,su(),u}function qb(r,a){Ae=null,P.H=Ls,a===fa||a===mu?(a=lv(),qe=3):a===oh?(a=lv(),qe=4):qe=a===Mh?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,xn=a,De===null&&(ct=1,Lu(r,Rn(a,r.current)))}function Wb(){var r=vn.current;return r===null?!0:(Ie&4194048)===Ie?In===null:(Ie&62914560)===Ie||(Ie&536870912)!==0?r===In:!1}function Yb(){var r=P.H;return P.H=Ls,r===null?Ls:r}function Xb(){var r=P.A;return P.A=mR,r}function Uu(){ct=4,_r||(Ie&4194048)!==Ie&&vn.current!==null||(xa=!0),(Cr&134217727)===0&&(ho&134217727)===0||et===null||kr(et,Ie,Sn,!1)}function np(r,a,u){var h=Fe;Fe|=2;var y=Yb(),b=Xb();(et!==r||Ie!==a)&&(ju=null,Ca(r,a)),a=!1;var E=ct;e:do try{if(qe!==0&&De!==null){var L=De,B=xn;switch(qe){case 8:tp(),E=6;break e;case 3:case 2:case 9:case 6:vn.current===null&&(a=!0);var Q=qe;if(qe=0,xn=null,wa(r,L,B,Q),u&&xa){E=0;break e}break;default:Q=qe,qe=0,xn=null,wa(r,L,B,Q)}}vR(),E=ct;break}catch(ie){qb(r,ie)}while(!0);return a&&r.shellSuspendCounter++,Oi=io=null,Fe=h,P.H=y,P.A=b,De===null&&(et=null,Ie=0,su()),E}function vR(){for(;De!==null;)Kb(De)}function bR(r,a){var u=Fe;Fe|=2;var h=Yb(),y=Xb();et!==r||Ie!==a?(ju=null,Hu=Yt()+500,Ca(r,a)):xa=rs(r,a);e:do try{if(qe!==0&&De!==null){a=De;var b=xn;t:switch(qe){case 1:qe=0,xn=null,wa(r,a,b,1);break;case 2:case 9:if(av(b)){qe=0,xn=null,Qb(a);break}a=function(){qe!==2&&qe!==9||et!==r||(qe=7),ai(r)},b.then(a,a);break e;case 3:qe=7;break e;case 4:qe=5;break e;case 7:av(b)?(qe=0,xn=null,Qb(a)):(qe=0,xn=null,wa(r,a,b,7));break;case 5:var E=null;switch(De.tag){case 26:E=De.memoizedState;case 5:case 27:var L=De;if(E?zx(E):L.stateNode.complete){qe=0,xn=null;var B=L.sibling;if(B!==null)De=B;else{var Q=L.return;Q!==null?(De=Q,Vu(Q)):De=null}break t}}qe=0,xn=null,wa(r,a,b,5);break;case 6:qe=0,xn=null,wa(r,a,b,6);break;case 8:tp(),ct=6;break e;default:throw Error(i(462))}}xR();break}catch(ie){qb(r,ie)}while(!0);return Oi=io=null,P.H=h,P.A=y,Fe=u,De!==null?0:(et=null,Ie=0,su(),ct)}function xR(){for(;De!==null&&!mf();)Kb(De)}function Kb(r){var a=xb(r.alternate,r,Ui);r.memoizedProps=r.pendingProps,a===null?Vu(r):De=a}function Qb(r){var a=r,u=a.alternate;switch(a.tag){case 15:case 0:a=pb(u,a,a.pendingProps,a.type,void 0,Ie);break;case 11:a=pb(u,a,a.pendingProps,a.type.render,a.ref,Ie);break;case 5:yh(a);default:_b(u,a),a=De=X0(a,Ui),a=xb(u,a,Ui)}r.memoizedProps=r.pendingProps,a===null?Vu(r):De=a}function wa(r,a,u,h){Oi=io=null,yh(a),ha=null,Ss=0;var y=a.return;try{if(lR(r,y,a,u,Ie)){ct=1,Lu(r,Rn(u,r.current)),De=null;return}}catch(b){if(y!==null)throw De=y,b;ct=1,Lu(r,Rn(u,r.current)),De=null;return}a.flags&32768?(Pe||h===1?r=!0:xa||(Ie&536870912)!==0?r=!1:(_r=r=!0,(h===2||h===9||h===3||h===6)&&(h=vn.current,h!==null&&h.tag===13&&(h.flags|=16384))),Zb(a,r)):Vu(a)}function Vu(r){var a=r;do{if((a.flags&32768)!==0){Zb(a,_r);return}r=a.return;var u=dR(a.alternate,a,Ui);if(u!==null){De=u;return}if(a=a.sibling,a!==null){De=a;return}De=a=r}while(a!==null);ct===0&&(ct=5)}function Zb(r,a){do{var u=fR(r.alternate,r);if(u!==null){u.flags&=32767,De=u;return}if(u=r.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!a&&(r=r.sibling,r!==null)){De=r;return}De=r=u}while(r!==null);ct=6,De=null}function Jb(r,a,u,h,y,b,E,L,B){r.cancelPendingCommit=null;do Fu();while(_t!==0);if((Fe&6)!==0)throw Error(i(327));if(a!==null){if(a===r.current)throw Error(i(177));if(b=a.lanes|a.childLanes,b|=Gf,JA(r,u,b,E,L,B),r===et&&(De=et=null,Ie=0),_a=a,Er=r,Vi=u,Zh=b,Jh=y,Vb=h,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,wR(_e,function(){return rx(),null})):(r.callbackNode=null,r.callbackPriority=0),h=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||h){h=P.T,P.T=null,y=$.p,$.p=2,E=Fe,Fe|=4;try{hR(r,a,u)}finally{Fe=E,$.p=y,P.T=h}}_t=1,ex(),tx(),nx()}}function ex(){if(_t===1){_t=0;var r=Er,a=_a,u=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||u){u=P.T,P.T=null;var h=$.p;$.p=2;var y=Fe;Fe|=4;try{Ib(a,r);var b=pp,E=B0(r.containerInfo),L=b.focusedElem,B=b.selectionRange;if(E!==L&&L&&L.ownerDocument&&j0(L.ownerDocument.documentElement,L)){if(B!==null&&jf(L)){var Q=B.start,ie=B.end;if(ie===void 0&&(ie=Q),"selectionStart"in L)L.selectionStart=Q,L.selectionEnd=Math.min(ie,L.value.length);else{var se=L.ownerDocument||document,J=se&&se.defaultView||window;if(J.getSelection){var te=J.getSelection(),ye=L.textContent.length,Se=Math.min(B.start,ye),Qe=B.end===void 0?Se:Math.min(B.end,ye);!te.extend&&Se>Qe&&(E=Qe,Qe=Se,Se=E);var G=H0(L,Se),V=H0(L,Qe);if(G&&V&&(te.rangeCount!==1||te.anchorNode!==G.node||te.anchorOffset!==G.offset||te.focusNode!==V.node||te.focusOffset!==V.offset)){var K=se.createRange();K.setStart(G.node,G.offset),te.removeAllRanges(),Se>Qe?(te.addRange(K),te.extend(V.node,V.offset)):(K.setEnd(V.node,V.offset),te.addRange(K))}}}}for(se=[],te=L;te=te.parentNode;)te.nodeType===1&&se.push({element:te,left:te.scrollLeft,top:te.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L<se.length;L++){var ae=se[L];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}tc=!!hp,pp=hp=null}finally{Fe=y,$.p=h,P.T=u}}r.current=a,_t=2}}function tx(){if(_t===2){_t=0;var r=Er,a=_a,u=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||u){u=P.T,P.T=null;var h=$.p;$.p=2;var y=Fe;Fe|=4;try{Lb(r,a.alternate,a)}finally{Fe=y,$.p=h,P.T=u}}_t=3}}function nx(){if(_t===4||_t===3){_t=0,gf();var r=Er,a=_a,u=Vi,h=Vb;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?_t=5:(_t=0,_a=Er=null,ix(r,r.pendingLanes));var y=r.pendingLanes;if(y===0&&(wr=null),xf(u),a=a.stateNode,St&&typeof St.onCommitFiberRoot=="function")try{St.onCommitFiberRoot(Xt,a,void 0,(a.current.flags&128)===128)}catch{}if(h!==null){a=P.T,y=$.p,$.p=2,P.T=null;try{for(var b=r.onRecoverableError,E=0;E<h.length;E++){var L=h[E];b(L.value,{componentStack:L.stack})}}finally{P.T=a,$.p=y}}(Vi&3)!==0&&Fu(),ai(r),y=r.pendingLanes,(u&261930)!==0&&(y&42)!==0?r===ep?Hs++:(Hs=0,ep=r):Hs=0,js(0)}}function ix(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,bs(a)))}function Fu(){return ex(),tx(),nx(),rx()}function rx(){if(_t!==5)return!1;var r=Er,a=Zh;Zh=0;var u=xf(Vi),h=P.T,y=$.p;try{$.p=32>u?32:u,P.T=null,u=Jh,Jh=null;var b=Er,E=Vi;if(_t=0,_a=Er=null,Vi=0,(Fe&6)!==0)throw Error(i(331));var L=Fe;if(Fe|=4,jb(b.current),zb(b,b.current,E,u),Fe=L,js(0,!1),St&&typeof St.onPostCommitFiberRoot=="function")try{St.onPostCommitFiberRoot(Xt,b)}catch{}return!0}finally{$.p=y,P.T=h,ix(r,a)}}function ox(r,a,u){a=Rn(u,a),a=Dh(r.stateNode,a,2),r=vr(r,a,2),r!==null&&(os(r,2),ai(r))}function We(r,a,u){if(r.tag===3)ox(r,r,u);else for(;a!==null;){if(a.tag===3){ox(a,r,u);break}else if(a.tag===1){var h=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(wr===null||!wr.has(h))){r=Rn(u,r),u=ab(2),h=vr(a,u,2),h!==null&&(sb(u,h,a,r),os(h,2),ai(h));break}}a=a.return}}function ip(r,a,u){var h=r.pingCache;if(h===null){h=r.pingCache=new gR;var y=new Set;h.set(a,y)}else y=h.get(a),y===void 0&&(y=new Set,h.set(a,y));y.has(u)||(Xh=!0,y.add(u),r=SR.bind(null,r,a,u),a.then(r,r))}function SR(r,a,u){var h=r.pingCache;h!==null&&h.delete(a),r.pingedLanes|=r.suspendedLanes&u,r.warmLanes&=~u,et===r&&(Ie&u)===u&&(ct===4||ct===3&&(Ie&62914560)===Ie&&300>Yt()-Pu?(Fe&2)===0&&Ca(r,0):Kh|=u,Sa===Ie&&(Sa=0)),ai(r)}function ax(r,a){a===0&&(a=e0()),r=eo(r,a),r!==null&&(os(r,a),ai(r))}function _R(r){var a=r.memoizedState,u=0;a!==null&&(u=a.retryLane),ax(r,u)}function CR(r,a){var u=0;switch(r.tag){case 31:case 13:var h=r.stateNode,y=r.memoizedState;y!==null&&(u=y.retryLane);break;case 19:h=r.stateNode;break;case 22:h=r.stateNode._retryCache;break;default:throw Error(i(314))}h!==null&&h.delete(a),ax(r,u)}function wR(r,a){return dt(r,a)}var Gu=null,Ea=null,rp=!1,$u=!1,op=!1,Tr=0;function ai(r){r!==Ea&&r.next===null&&(Ea===null?Gu=Ea=r:Ea=Ea.next=r),$u=!0,rp||(rp=!0,kR())}function js(r,a){if(!op&&$u){op=!0;do for(var u=!1,h=Gu;h!==null;){if(r!==0){var y=h.pendingLanes;if(y===0)var b=0;else{var E=h.suspendedLanes,L=h.pingedLanes;b=(1<<31-Je(42|r)+1)-1,b&=y&~(E&~L),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(u=!0,cx(h,b))}else b=Ie,b=Xl(h,h===et?b:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(b&3)===0||rs(h,b)||(u=!0,cx(h,b));h=h.next}while(u);op=!1}}function ER(){sx()}function sx(){$u=rp=!1;var r=0;Tr!==0&&zR()&&(r=Tr);for(var a=Yt(),u=null,h=Gu;h!==null;){var y=h.next,b=lx(h,a);b===0?(h.next=null,u===null?Gu=y:u.next=y,y===null&&(Ea=u)):(u=h,(r!==0||(b&3)!==0)&&($u=!0)),h=y}_t!==0&&_t!==5||js(r),Tr!==0&&(Tr=0)}function lx(r,a){for(var u=r.suspendedLanes,h=r.pingedLanes,y=r.expirationTimes,b=r.pendingLanes&-62914561;0<b;){var E=31-Je(b),L=1<<E,B=y[E];B===-1?((L&u)===0||(L&h)!==0)&&(y[E]=ZA(L,a)):B<=a&&(r.expiredLanes|=L),b&=~L}if(a=et,u=Ie,u=Xl(r,r===a?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),h=r.callbackNode,u===0||r===a&&(qe===2||qe===9)||r.cancelPendingCommit!==null)return h!==null&&h!==null&&ni(h),r.callbackNode=null,r.callbackPriority=0;if((u&3)===0||rs(r,u)){if(a=u&-u,a===r.callbackPriority)return a;switch(h!==null&&ni(h),xf(u)){case 2:case 8:u=he;break;case 32:u=_e;break;case 268435456:u=$e;break;default:u=_e}return h=ux.bind(null,r),u=dt(u,h),r.callbackPriority=a,r.callbackNode=u,a}return h!==null&&h!==null&&ni(h),r.callbackPriority=2,r.callbackNode=null,2}function ux(r,a){if(_t!==0&&_t!==5)return r.callbackNode=null,r.callbackPriority=0,null;var u=r.callbackNode;if(Fu()&&r.callbackNode!==u)return null;var h=Ie;return h=Xl(r,r===et?h:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),h===0?null:(Gb(r,h,a),lx(r,Yt()),r.callbackNode!=null&&r.callbackNode===u?ux.bind(null,r):null)}function cx(r,a){if(Fu())return null;Gb(r,a,!0)}function kR(){HR(function(){(Fe&6)!==0?dt(oe,ER):sx()})}function ap(){if(Tr===0){var r=ca;r===0&&(r=ql,ql<<=1,(ql&261888)===0&&(ql=256)),Tr=r}return Tr}function dx(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Jl(""+r)}function fx(r,a){var u=a.ownerDocument.createElement("input");return u.name=a.name,u.value=a.value,r.id&&u.setAttribute("form",r.id),a.parentNode.insertBefore(u,a),r=new FormData(r),u.parentNode.removeChild(u),r}function TR(r,a,u,h,y){if(a==="submit"&&u&&u.stateNode===y){var b=dx((y[nn]||null).action),E=h.submitter;E&&(a=(a=E[nn]||null)?dx(a.formAction):E.getAttribute("formAction"),a!==null&&(b=a,E=null));var L=new iu("action","action",null,h,y);r.push({event:L,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(Tr!==0){var B=E?fx(y,E):new FormData(y);kh(u,{pending:!0,data:B,method:y.method,action:b},null,B)}}else typeof b=="function"&&(L.preventDefault(),B=E?fx(y,E):new FormData(y),kh(u,{pending:!0,data:B,method:y.method,action:b},b,B))},currentTarget:y}]})}}for(var sp=0;sp<Ff.length;sp++){var lp=Ff[sp],AR=lp.toLowerCase(),LR=lp[0].toUpperCase()+lp.slice(1);qn(AR,"on"+LR)}qn(F0,"onAnimationEnd"),qn(G0,"onAnimationIteration"),qn($0,"onAnimationStart"),qn("dblclick","onDoubleClick"),qn("focusin","onFocus"),qn("focusout","onBlur"),qn($L,"onTransitionRun"),qn(qL,"onTransitionStart"),qn(WL,"onTransitionCancel"),qn(q0,"onTransitionEnd"),Ko("onMouseEnter",["mouseout","mouseover"]),Ko("onMouseLeave",["mouseout","mouseover"]),Ko("onPointerEnter",["pointerout","pointerover"]),Ko("onPointerLeave",["pointerout","pointerover"]),Kr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Kr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Kr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Kr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Kr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Kr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bs="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(" "),RR=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Bs));function hx(r,a){a=(a&4)!==0;for(var u=0;u<r.length;u++){var h=r[u],y=h.event;h=h.listeners;e:{var b=void 0;if(a)for(var E=h.length-1;0<=E;E--){var L=h[E],B=L.instance,Q=L.currentTarget;if(L=L.listener,B!==b&&y.isPropagationStopped())break e;b=L,y.currentTarget=Q;try{b(y)}catch(ie){au(ie)}y.currentTarget=null,b=B}else for(E=0;E<h.length;E++){if(L=h[E],B=L.instance,Q=L.currentTarget,L=L.listener,B!==b&&y.isPropagationStopped())break e;b=L,y.currentTarget=Q;try{b(y)}catch(ie){au(ie)}y.currentTarget=null,b=B}}}}function Me(r,a){var u=a[Sf];u===void 0&&(u=a[Sf]=new Set);var h=r+"__bubble";u.has(h)||(px(a,r,2,!1),u.add(h))}function up(r,a,u){var h=0;a&&(h|=4),px(u,r,h,a)}var qu="_reactListening"+Math.random().toString(36).slice(2);function cp(r){if(!r[qu]){r[qu]=!0,s0.forEach(function(u){u!=="selectionchange"&&(RR.has(u)||up(u,!1,r),up(u,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[qu]||(a[qu]=!0,up("selectionchange",!1,a))}}function px(r,a,u,h){switch(Fx(a)){case 2:var y=rO;break;case 8:y=oO;break;default:y=Ep}u=y.bind(null,a,u,r),y=void 0,!Rf||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(y=!0),h?y!==void 0?r.addEventListener(a,u,{capture:!0,passive:y}):r.addEventListener(a,u,!0):y!==void 0?r.addEventListener(a,u,{passive:y}):r.addEventListener(a,u,!1)}function dp(r,a,u,h,y){var b=h;if((a&1)===0&&(a&2)===0&&h!==null)e:for(;;){if(h===null)return;var E=h.tag;if(E===3||E===4){var L=h.stateNode.containerInfo;if(L===y)break;if(E===4)for(E=h.return;E!==null;){var B=E.tag;if((B===3||B===4)&&E.stateNode.containerInfo===y)return;E=E.return}for(;L!==null;){if(E=Wo(L),E===null)return;if(B=E.tag,B===5||B===6||B===26||B===27){h=b=E;continue e}L=L.parentNode}}h=h.return}b0(function(){var Q=b,ie=Af(u),se=[];e:{var J=W0.get(r);if(J!==void 0){var te=iu,ye=r;switch(r){case"keypress":if(tu(u)===0)break e;case"keydown":case"keyup":te=CL;break;case"focusin":ye="focus",te=If;break;case"focusout":ye="blur",te=If;break;case"beforeblur":case"afterblur":te=If;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=_0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=dL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=kL;break;case F0:case G0:case $0:te=pL;break;case q0:te=AL;break;case"scroll":case"scrollend":te=uL;break;case"wheel":te=RL;break;case"copy":case"cut":case"paste":te=gL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=w0;break;case"toggle":case"beforetoggle":te=DL}var Se=(a&4)!==0,Qe=!Se&&(r==="scroll"||r==="scrollend"),G=Se?J!==null?J+"Capture":null:J;Se=[];for(var V=Q,K;V!==null;){var ae=V;if(K=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||K===null||G===null||(ae=ls(V,G),ae!=null&&Se.push(Us(V,ae,K))),Qe)break;V=V.return}0<Se.length&&(J=new te(J,ye,null,u,ie),se.push({event:J,listeners:Se}))}}if((a&7)===0){e:{if(J=r==="mouseover"||r==="pointerover",te=r==="mouseout"||r==="pointerout",J&&u!==Tf&&(ye=u.relatedTarget||u.fromElement)&&(Wo(ye)||ye[qo]))break e;if((te||J)&&(J=ie.window===ie?ie:(J=ie.ownerDocument)?J.defaultView||J.parentWindow:window,te?(ye=u.relatedTarget||u.toElement,te=Q,ye=ye?Wo(ye):null,ye!==null&&(Qe=s(ye),Se=ye.tag,ye!==Qe||Se!==5&&Se!==27&&Se!==6)&&(ye=null)):(te=null,ye=Q),te!==ye)){if(Se=_0,ae="onMouseLeave",G="onMouseEnter",V="mouse",(r==="pointerout"||r==="pointerover")&&(Se=w0,ae="onPointerLeave",G="onPointerEnter",V="pointer"),Qe=te==null?J:ss(te),K=ye==null?J:ss(ye),J=new Se(ae,V+"leave",te,u,ie),J.target=Qe,J.relatedTarget=K,ae=null,Wo(ie)===Q&&(Se=new Se(G,V+"enter",ye,u,ie),Se.target=K,Se.relatedTarget=Qe,ae=Se),Qe=ae,te&&ye)t:{for(Se=OR,G=te,V=ye,K=0,ae=G;ae;ae=Se(ae))K++;ae=0;for(var be=V;be;be=Se(be))ae++;for(;0<K-ae;)G=Se(G),K--;for(;0<ae-K;)V=Se(V),ae--;for(;K--;){if(G===V||V!==null&&G===V.alternate){Se=G;break t}G=Se(G),V=Se(V)}Se=null}else Se=null;te!==null&&mx(se,J,te,Se,!1),ye!==null&&Qe!==null&&mx(se,Qe,ye,Se,!0)}}e:{if(J=Q?ss(Q):window,te=J.nodeName&&J.nodeName.toLowerCase(),te==="select"||te==="input"&&J.type==="file")var Be=D0;else if(R0(J))if(M0)Be=VL;else{Be=BL;var ve=jL}else te=J.nodeName,!te||te.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?Q&&kf(Q.elementType)&&(Be=D0):Be=UL;if(Be&&(Be=Be(r,Q))){O0(se,Be,u,ie);break e}ve&&ve(r,J,Q),r==="focusout"&&Q&&J.type==="number"&&Q.memoizedProps.value!=null&&Ef(J,"number",J.value)}switch(ve=Q?ss(Q):window,r){case"focusin":(R0(ve)||ve.contentEditable==="true")&&(na=ve,Bf=Q,gs=null);break;case"focusout":gs=Bf=na=null;break;case"mousedown":Uf=!0;break;case"contextmenu":case"mouseup":case"dragend":Uf=!1,U0(se,u,ie);break;case"selectionchange":if(GL)break;case"keydown":case"keyup":U0(se,u,ie)}var Le;if(zf)e:{switch(r){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else ta?A0(r,u)&&(Ne="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ne="onCompositionStart");Ne&&(E0&&u.locale!=="ko"&&(ta||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&ta&&(Le=x0()):(dr=ie,Of="value"in dr?dr.value:dr.textContent,ta=!0)),ve=Wu(Q,Ne),0<ve.length&&(Ne=new C0(Ne,r,null,u,ie),se.push({event:Ne,listeners:ve}),Le?Ne.data=Le:(Le=L0(u),Le!==null&&(Ne.data=Le)))),(Le=IL?NL(r,u):zL(r,u))&&(Ne=Wu(Q,"onBeforeInput"),0<Ne.length&&(ve=new C0("onBeforeInput","beforeinput",null,u,ie),se.push({event:ve,listeners:Ne}),ve.data=Le)),TR(se,r,Q,u,ie)}hx(se,a)})}function Us(r,a,u){return{instance:r,listener:a,currentTarget:u}}function Wu(r,a){for(var u=a+"Capture",h=[];r!==null;){var y=r,b=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||b===null||(y=ls(r,u),y!=null&&h.unshift(Us(r,y,b)),y=ls(r,a),y!=null&&h.push(Us(r,y,b))),r.tag===3)return h;r=r.return}return[]}function OR(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function mx(r,a,u,h,y){for(var b=a._reactName,E=[];u!==null&&u!==h;){var L=u,B=L.alternate,Q=L.stateNode;if(L=L.tag,B!==null&&B===h)break;L!==5&&L!==26&&L!==27||Q===null||(B=Q,y?(Q=ls(u,b),Q!=null&&E.unshift(Us(u,Q,B))):y||(Q=ls(u,b),Q!=null&&E.push(Us(u,Q,B)))),u=u.return}E.length!==0&&r.push({event:a,listeners:E})}var DR=/\r\n?/g,MR=/\u0000|\uFFFD/g;function gx(r){return(typeof r=="string"?r:""+r).replace(DR,`
|
|
10
|
-
`).replace(MR,"")}function yx(r,a){return a=gx(a),gx(r)===a}function Ke(r,a,u,h,y,b){switch(u){case"children":typeof h=="string"?a==="body"||a==="textarea"&&h===""||Zo(r,h):(typeof h=="number"||typeof h=="bigint")&&a!=="body"&&Zo(r,""+h);break;case"className":Ql(r,"class",h);break;case"tabIndex":Ql(r,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Ql(r,u,h);break;case"style":y0(r,h,b);break;case"data":if(a!=="object"){Ql(r,"data",h);break}case"src":case"href":if(h===""&&(a!=="a"||u!=="href")){r.removeAttribute(u);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){r.removeAttribute(u);break}h=Jl(""+h),r.setAttribute(u,h);break;case"action":case"formAction":if(typeof h=="function"){r.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(u==="formAction"?(a!=="input"&&Ke(r,a,"name",y.name,y,null),Ke(r,a,"formEncType",y.formEncType,y,null),Ke(r,a,"formMethod",y.formMethod,y,null),Ke(r,a,"formTarget",y.formTarget,y,null)):(Ke(r,a,"encType",y.encType,y,null),Ke(r,a,"method",y.method,y,null),Ke(r,a,"target",y.target,y,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){r.removeAttribute(u);break}h=Jl(""+h),r.setAttribute(u,h);break;case"onClick":h!=null&&(r.onclick=Ti);break;case"onScroll":h!=null&&Me("scroll",r);break;case"onScrollEnd":h!=null&&Me("scrollend",r);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(i(61));if(u=h.__html,u!=null){if(y.children!=null)throw Error(i(60));r.innerHTML=u}}break;case"multiple":r.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":r.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){r.removeAttribute("xlink:href");break}u=Jl(""+h),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?r.setAttribute(u,""+h):r.removeAttribute(u);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":h&&typeof h!="function"&&typeof h!="symbol"?r.setAttribute(u,""):r.removeAttribute(u);break;case"capture":case"download":h===!0?r.setAttribute(u,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?r.setAttribute(u,h):r.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?r.setAttribute(u,h):r.removeAttribute(u);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?r.removeAttribute(u):r.setAttribute(u,h);break;case"popover":Me("beforetoggle",r),Me("toggle",r),Kl(r,"popover",h);break;case"xlinkActuate":ki(r,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":ki(r,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":ki(r,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":ki(r,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":ki(r,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":ki(r,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":ki(r,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":ki(r,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":ki(r,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Kl(r,"is",h);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=sL.get(u)||u,Kl(r,u,h))}}function fp(r,a,u,h,y,b){switch(u){case"style":y0(r,h,b);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(i(61));if(u=h.__html,u!=null){if(y.children!=null)throw Error(i(60));r.innerHTML=u}}break;case"children":typeof h=="string"?Zo(r,h):(typeof h=="number"||typeof h=="bigint")&&Zo(r,""+h);break;case"onScroll":h!=null&&Me("scroll",r);break;case"onScrollEnd":h!=null&&Me("scrollend",r);break;case"onClick":h!=null&&(r.onclick=Ti);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!l0.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(y=u.endsWith("Capture"),a=u.slice(2,y?u.length-7:void 0),b=r[nn]||null,b=b!=null?b[u]:null,typeof b=="function"&&r.removeEventListener(a,b,y),typeof h=="function")){typeof b!="function"&&b!==null&&(u in r?r[u]=null:r.hasAttribute(u)&&r.removeAttribute(u)),r.addEventListener(a,h,y);break e}u in r?r[u]=h:h===!0?r.setAttribute(u,""):Kl(r,u,h)}}}function jt(r,a,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",r),Me("load",r);var h=!1,y=!1,b;for(b in u)if(u.hasOwnProperty(b)){var E=u[b];if(E!=null)switch(b){case"src":h=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Ke(r,a,b,E,u,null)}}y&&Ke(r,a,"srcSet",u.srcSet,u,null),h&&Ke(r,a,"src",u.src,u,null);return;case"input":Me("invalid",r);var L=b=E=y=null,B=null,Q=null;for(h in u)if(u.hasOwnProperty(h)){var ie=u[h];if(ie!=null)switch(h){case"name":y=ie;break;case"type":E=ie;break;case"checked":B=ie;break;case"defaultChecked":Q=ie;break;case"value":b=ie;break;case"defaultValue":L=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(i(137,a));break;default:Ke(r,a,h,ie,u,null)}}h0(r,b,L,B,Q,E,y,!1);return;case"select":Me("invalid",r),h=E=b=null;for(y in u)if(u.hasOwnProperty(y)&&(L=u[y],L!=null))switch(y){case"value":b=L;break;case"defaultValue":E=L;break;case"multiple":h=L;default:Ke(r,a,y,L,u,null)}a=b,u=E,r.multiple=!!h,a!=null?Qo(r,!!h,a,!1):u!=null&&Qo(r,!!h,u,!0);return;case"textarea":Me("invalid",r),b=y=h=null;for(E in u)if(u.hasOwnProperty(E)&&(L=u[E],L!=null))switch(E){case"value":h=L;break;case"defaultValue":y=L;break;case"children":b=L;break;case"dangerouslySetInnerHTML":if(L!=null)throw Error(i(91));break;default:Ke(r,a,E,L,u,null)}m0(r,h,y,b);return;case"option":for(B in u)u.hasOwnProperty(B)&&(h=u[B],h!=null)&&(B==="selected"?r.selected=h&&typeof h!="function"&&typeof h!="symbol":Ke(r,a,B,h,u,null));return;case"dialog":Me("beforetoggle",r),Me("toggle",r),Me("cancel",r),Me("close",r);break;case"iframe":case"object":Me("load",r);break;case"video":case"audio":for(h=0;h<Bs.length;h++)Me(Bs[h],r);break;case"image":Me("error",r),Me("load",r);break;case"details":Me("toggle",r);break;case"embed":case"source":case"link":Me("error",r),Me("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in u)if(u.hasOwnProperty(Q)&&(h=u[Q],h!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Ke(r,a,Q,h,u,null)}return;default:if(kf(a)){for(ie in u)u.hasOwnProperty(ie)&&(h=u[ie],h!==void 0&&fp(r,a,ie,h,u,void 0));return}}for(L in u)u.hasOwnProperty(L)&&(h=u[L],h!=null&&Ke(r,a,L,h,u,null))}function IR(r,a,u,h){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,b=null,E=null,L=null,B=null,Q=null,ie=null;for(te in u){var se=u[te];if(u.hasOwnProperty(te)&&se!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":B=se;default:h.hasOwnProperty(te)||Ke(r,a,te,null,h,se)}}for(var J in h){var te=h[J];if(se=u[J],h.hasOwnProperty(J)&&(te!=null||se!=null))switch(J){case"type":b=te;break;case"name":y=te;break;case"checked":Q=te;break;case"defaultChecked":ie=te;break;case"value":E=te;break;case"defaultValue":L=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(i(137,a));break;default:te!==se&&Ke(r,a,J,te,h,se)}}wf(r,E,L,B,Q,ie,b,y);return;case"select":te=E=L=J=null;for(b in u)if(B=u[b],u.hasOwnProperty(b)&&B!=null)switch(b){case"value":break;case"multiple":te=B;default:h.hasOwnProperty(b)||Ke(r,a,b,null,h,B)}for(y in h)if(b=h[y],B=u[y],h.hasOwnProperty(y)&&(b!=null||B!=null))switch(y){case"value":J=b;break;case"defaultValue":L=b;break;case"multiple":E=b;default:b!==B&&Ke(r,a,y,b,h,B)}a=L,u=E,h=te,J!=null?Qo(r,!!u,J,!1):!!h!=!!u&&(a!=null?Qo(r,!!u,a,!0):Qo(r,!!u,u?[]:"",!1));return;case"textarea":te=J=null;for(L in u)if(y=u[L],u.hasOwnProperty(L)&&y!=null&&!h.hasOwnProperty(L))switch(L){case"value":break;case"children":break;default:Ke(r,a,L,null,h,y)}for(E in h)if(y=h[E],b=u[E],h.hasOwnProperty(E)&&(y!=null||b!=null))switch(E){case"value":J=y;break;case"defaultValue":te=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(i(91));break;default:y!==b&&Ke(r,a,E,y,h,b)}p0(r,J,te);return;case"option":for(var ye in u)J=u[ye],u.hasOwnProperty(ye)&&J!=null&&!h.hasOwnProperty(ye)&&(ye==="selected"?r.selected=!1:Ke(r,a,ye,null,h,J));for(B in h)J=h[B],te=u[B],h.hasOwnProperty(B)&&J!==te&&(J!=null||te!=null)&&(B==="selected"?r.selected=J&&typeof J!="function"&&typeof J!="symbol":Ke(r,a,B,J,h,te));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 Se in u)J=u[Se],u.hasOwnProperty(Se)&&J!=null&&!h.hasOwnProperty(Se)&&Ke(r,a,Se,null,h,J);for(Q in h)if(J=h[Q],te=u[Q],h.hasOwnProperty(Q)&&J!==te&&(J!=null||te!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(i(137,a));break;default:Ke(r,a,Q,J,h,te)}return;default:if(kf(a)){for(var Qe in u)J=u[Qe],u.hasOwnProperty(Qe)&&J!==void 0&&!h.hasOwnProperty(Qe)&&fp(r,a,Qe,void 0,h,J);for(ie in h)J=h[ie],te=u[ie],!h.hasOwnProperty(ie)||J===te||J===void 0&&te===void 0||fp(r,a,ie,J,h,te);return}}for(var G in u)J=u[G],u.hasOwnProperty(G)&&J!=null&&!h.hasOwnProperty(G)&&Ke(r,a,G,null,h,J);for(se in h)J=h[se],te=u[se],!h.hasOwnProperty(se)||J===te||J==null&&te==null||Ke(r,a,se,J,h,te)}function vx(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function NR(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,u=performance.getEntriesByType("resource"),h=0;h<u.length;h++){var y=u[h],b=y.transferSize,E=y.initiatorType,L=y.duration;if(b&&L&&vx(E)){for(E=0,L=y.responseEnd,h+=1;h<u.length;h++){var B=u[h],Q=B.startTime;if(Q>L)break;var ie=B.transferSize,se=B.initiatorType;ie&&vx(se)&&(B=B.responseEnd,E+=ie*(B<L?1:(L-Q)/(B-Q)))}if(--h,a+=8*(b+E)/(y.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var hp=null,pp=null;function Yu(r){return r.nodeType===9?r:r.ownerDocument}function bx(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function xx(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function mp(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var gp=null;function zR(){var r=window.event;return r&&r.type==="popstate"?r===gp?!1:(gp=r,!0):(gp=null,!1)}var Sx=typeof setTimeout=="function"?setTimeout:void 0,PR=typeof clearTimeout=="function"?clearTimeout:void 0,_x=typeof Promise=="function"?Promise:void 0,HR=typeof queueMicrotask=="function"?queueMicrotask:typeof _x<"u"?function(r){return _x.resolve(null).then(r).catch(jR)}:Sx;function jR(r){setTimeout(function(){throw r})}function Ar(r){return r==="head"}function Cx(r,a){var u=a,h=0;do{var y=u.nextSibling;if(r.removeChild(u),y&&y.nodeType===8)if(u=y.data,u==="/$"||u==="/&"){if(h===0){r.removeChild(y),La(a);return}h--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")h++;else if(u==="html")Vs(r.ownerDocument.documentElement);else if(u==="head"){u=r.ownerDocument.head,Vs(u);for(var b=u.firstChild;b;){var E=b.nextSibling,L=b.nodeName;b[as]||L==="SCRIPT"||L==="STYLE"||L==="LINK"&&b.rel.toLowerCase()==="stylesheet"||u.removeChild(b),b=E}}else u==="body"&&Vs(r.ownerDocument.body);u=y}while(u);La(a)}function wx(r,a){var u=r;r=0;do{var h=u.nextSibling;if(u.nodeType===1?a?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(a?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),h&&h.nodeType===8)if(u=h.data,u==="/$"){if(r===0)break;r--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||r++;u=h}while(u)}function yp(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var u=a;switch(a=a.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":yp(u),_f(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}r.removeChild(u)}}function BR(r,a,u,h){for(;r.nodeType===1;){var y=u;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!h&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(h){if(!r[as])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(b=r.getAttribute("rel"),b==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(b!==y.rel||r.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||r.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||r.getAttribute("title")!==(y.title==null?null:y.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(b=r.getAttribute("src"),(b!==(y.src==null?null:y.src)||r.getAttribute("type")!==(y.type==null?null:y.type)||r.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&b&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var b=y.name==null?null:""+y.name;if(y.type==="hidden"&&r.getAttribute("name")===b)return r}else return r;if(r=Nn(r.nextSibling),r===null)break}return null}function UR(r,a,u){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!u||(r=Nn(r.nextSibling),r===null))return null;return r}function Ex(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=Nn(r.nextSibling),r===null))return null;return r}function vp(r){return r.data==="$?"||r.data==="$~"}function bp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function VR(r,a){var u=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||u.readyState!=="loading")a();else{var h=function(){a(),u.removeEventListener("DOMContentLoaded",h)};u.addEventListener("DOMContentLoaded",h),r._reactRetry=h}}function Nn(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var xp=null;function kx(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"||u==="/&"){if(a===0)return Nn(r.nextSibling);a--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||a++}r=r.nextSibling}return null}function Tx(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(a===0)return r;a--}else u!=="/$"&&u!=="/&"||a++}r=r.previousSibling}return null}function Ax(r,a,u){switch(a=Yu(u),r){case"html":if(r=a.documentElement,!r)throw Error(i(452));return r;case"head":if(r=a.head,!r)throw Error(i(453));return r;case"body":if(r=a.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function Vs(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);_f(r)}var zn=new Map,Lx=new Set;function Xu(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Fi=$.d;$.d={f:FR,r:GR,D:$R,C:qR,L:WR,m:YR,X:KR,S:XR,M:QR};function FR(){var r=Fi.f(),a=Bu();return r||a}function GR(r){var a=Yo(r);a!==null&&a.tag===5&&a.type==="form"?qv(a):Fi.r(r)}var ka=typeof document>"u"?null:document;function Rx(r,a,u){var h=ka;if(h&&typeof a=="string"&&a){var y=An(a);y='link[rel="'+r+'"][href="'+y+'"]',typeof u=="string"&&(y+='[crossorigin="'+u+'"]'),Lx.has(y)||(Lx.add(y),r={rel:r,crossOrigin:u,href:a},h.querySelector(y)===null&&(a=h.createElement("link"),jt(a,"link",r),Lt(a),h.head.appendChild(a)))}}function $R(r){Fi.D(r),Rx("dns-prefetch",r,null)}function qR(r,a){Fi.C(r,a),Rx("preconnect",r,a)}function WR(r,a,u){Fi.L(r,a,u);var h=ka;if(h&&r&&a){var y='link[rel="preload"][as="'+An(a)+'"]';a==="image"&&u&&u.imageSrcSet?(y+='[imagesrcset="'+An(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(y+='[imagesizes="'+An(u.imageSizes)+'"]')):y+='[href="'+An(r)+'"]';var b=y;switch(a){case"style":b=Ta(r);break;case"script":b=Aa(r)}zn.has(b)||(r=m({rel:"preload",href:a==="image"&&u&&u.imageSrcSet?void 0:r,as:a},u),zn.set(b,r),h.querySelector(y)!==null||a==="style"&&h.querySelector(Fs(b))||a==="script"&&h.querySelector(Gs(b))||(a=h.createElement("link"),jt(a,"link",r),Lt(a),h.head.appendChild(a)))}}function YR(r,a){Fi.m(r,a);var u=ka;if(u&&r){var h=a&&typeof a.as=="string"?a.as:"script",y='link[rel="modulepreload"][as="'+An(h)+'"][href="'+An(r)+'"]',b=y;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Aa(r)}if(!zn.has(b)&&(r=m({rel:"modulepreload",href:r},a),zn.set(b,r),u.querySelector(y)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Gs(b)))return}h=u.createElement("link"),jt(h,"link",r),Lt(h),u.head.appendChild(h)}}}function XR(r,a,u){Fi.S(r,a,u);var h=ka;if(h&&r){var y=Xo(h).hoistableStyles,b=Ta(r);a=a||"default";var E=y.get(b);if(!E){var L={loading:0,preload:null};if(E=h.querySelector(Fs(b)))L.loading=5;else{r=m({rel:"stylesheet",href:r,"data-precedence":a},u),(u=zn.get(b))&&Sp(r,u);var B=E=h.createElement("link");Lt(B),jt(B,"link",r),B._p=new Promise(function(Q,ie){B.onload=Q,B.onerror=ie}),B.addEventListener("load",function(){L.loading|=1}),B.addEventListener("error",function(){L.loading|=2}),L.loading|=4,Ku(E,a,h)}E={type:"stylesheet",instance:E,count:1,state:L},y.set(b,E)}}}function KR(r,a){Fi.X(r,a);var u=ka;if(u&&r){var h=Xo(u).hoistableScripts,y=Aa(r),b=h.get(y);b||(b=u.querySelector(Gs(y)),b||(r=m({src:r,async:!0},a),(a=zn.get(y))&&_p(r,a),b=u.createElement("script"),Lt(b),jt(b,"link",r),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(y,b))}}function QR(r,a){Fi.M(r,a);var u=ka;if(u&&r){var h=Xo(u).hoistableScripts,y=Aa(r),b=h.get(y);b||(b=u.querySelector(Gs(y)),b||(r=m({src:r,async:!0,type:"module"},a),(a=zn.get(y))&&_p(r,a),b=u.createElement("script"),Lt(b),jt(b,"link",r),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(y,b))}}function Ox(r,a,u,h){var y=(y=re.current)?Xu(y):null;if(!y)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(a=Ta(u.href),u=Xo(y).hoistableStyles,h=u.get(a),h||(h={type:"style",instance:null,count:0,state:null},u.set(a,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){r=Ta(u.href);var b=Xo(y).hoistableStyles,E=b.get(r);if(E||(y=y.ownerDocument||y,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(r,E),(b=y.querySelector(Fs(r)))&&!b._p&&(E.instance=b,E.state.loading=5),zn.has(r)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},zn.set(r,u),b||ZR(y,r,u,E.state))),a&&h===null)throw Error(i(528,""));return E}if(a&&h!==null)throw Error(i(529,""));return null;case"script":return a=u.async,u=u.src,typeof u=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Aa(u),u=Xo(y).hoistableScripts,h=u.get(a),h||(h={type:"script",instance:null,count:0,state:null},u.set(a,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function Ta(r){return'href="'+An(r)+'"'}function Fs(r){return'link[rel="stylesheet"]['+r+"]"}function Dx(r){return m({},r,{"data-precedence":r.precedence,precedence:null})}function ZR(r,a,u,h){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?h.loading=1:(a=r.createElement("link"),h.preload=a,a.addEventListener("load",function(){return h.loading|=1}),a.addEventListener("error",function(){return h.loading|=2}),jt(a,"link",u),Lt(a),r.head.appendChild(a))}function Aa(r){return'[src="'+An(r)+'"]'}function Gs(r){return"script[async]"+r}function Mx(r,a,u){if(a.count++,a.instance===null)switch(a.type){case"style":var h=r.querySelector('style[data-href~="'+An(u.href)+'"]');if(h)return a.instance=h,Lt(h),h;var y=m({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return h=(r.ownerDocument||r).createElement("style"),Lt(h),jt(h,"style",y),Ku(h,u.precedence,r),a.instance=h;case"stylesheet":y=Ta(u.href);var b=r.querySelector(Fs(y));if(b)return a.state.loading|=4,a.instance=b,Lt(b),b;h=Dx(u),(y=zn.get(y))&&Sp(h,y),b=(r.ownerDocument||r).createElement("link"),Lt(b);var E=b;return E._p=new Promise(function(L,B){E.onload=L,E.onerror=B}),jt(b,"link",h),a.state.loading|=4,Ku(b,u.precedence,r),a.instance=b;case"script":return b=Aa(u.src),(y=r.querySelector(Gs(b)))?(a.instance=y,Lt(y),y):(h=u,(y=zn.get(b))&&(h=m({},u),_p(h,y)),r=r.ownerDocument||r,y=r.createElement("script"),Lt(y),jt(y,"link",h),r.head.appendChild(y),a.instance=y);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(h=a.instance,a.state.loading|=4,Ku(h,u.precedence,r));return a.instance}function Ku(r,a,u){for(var h=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=h.length?h[h.length-1]:null,b=y,E=0;E<h.length;E++){var L=h[E];if(L.dataset.precedence===a)b=L;else if(b!==y)break}b?b.parentNode.insertBefore(r,b.nextSibling):(a=u.nodeType===9?u.head:u,a.insertBefore(r,a.firstChild))}function Sp(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function _p(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var Qu=null;function Ix(r,a,u){if(Qu===null){var h=new Map,y=Qu=new Map;y.set(u,h)}else y=Qu,h=y.get(u),h||(h=new Map,y.set(u,h));if(h.has(r))return h;for(h.set(r,null),u=u.getElementsByTagName(r),y=0;y<u.length;y++){var b=u[y];if(!(b[as]||b[Nt]||r==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var E=b.getAttribute(a)||"";E=r+E;var L=h.get(E);L?L.push(b):h.set(E,[b])}}return h}function Nx(r,a,u){r=r.ownerDocument||r,r.head.insertBefore(u,a==="title"?r.querySelector("head > title"):null)}function JR(r,a,u){if(u===1||a.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(r=a.disabled,typeof a.precedence=="string"&&r==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function zx(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function eO(r,a,u,h){if(u.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var y=Ta(h.href),b=a.querySelector(Fs(y));if(b){a=b._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=Zu.bind(r),a.then(r,r)),u.state.loading|=4,u.instance=b,Lt(b);return}b=a.ownerDocument||a,h=Dx(h),(y=zn.get(y))&&Sp(h,y),b=b.createElement("link"),Lt(b);var E=b;E._p=new Promise(function(L,B){E.onload=L,E.onerror=B}),jt(b,"link",h),u.instance=b}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(u,a),(a=u.state.preload)&&(u.state.loading&3)===0&&(r.count++,u=Zu.bind(r),a.addEventListener("load",u),a.addEventListener("error",u))}}var Cp=0;function tO(r,a){return r.stylesheets&&r.count===0&&ec(r,r.stylesheets),0<r.count||0<r.imgCount?function(u){var h=setTimeout(function(){if(r.stylesheets&&ec(r,r.stylesheets),r.unsuspend){var b=r.unsuspend;r.unsuspend=null,b()}},6e4+a);0<r.imgBytes&&Cp===0&&(Cp=62500*NR());var y=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&ec(r,r.stylesheets),r.unsuspend)){var b=r.unsuspend;r.unsuspend=null,b()}},(r.imgBytes>Cp?50:800)+a);return r.unsuspend=u,function(){r.unsuspend=null,clearTimeout(h),clearTimeout(y)}}:null}function Zu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ec(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Ju=null;function ec(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Ju=new Map,a.forEach(nO,r),Ju=null,Zu.call(r))}function nO(r,a){if(!(a.state.loading&4)){var u=Ju.get(r);if(u)var h=u.get(null);else{u=new Map,Ju.set(r,u);for(var y=r.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<y.length;b++){var E=y[b];(E.nodeName==="LINK"||E.getAttribute("media")!=="not all")&&(u.set(E.dataset.precedence,E),h=E)}h&&u.set(null,h)}y=a.instance,E=y.getAttribute("data-precedence"),b=u.get(E)||h,b===h&&u.set(null,y),u.set(E,y),this.count++,h=Zu.bind(this),y.addEventListener("load",h),y.addEventListener("error",h),b?b.parentNode.insertBefore(y,b.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(y,r.firstChild)),a.state.loading|=4}}var $s={$$typeof:k,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function iO(r,a,u,h,y,b,E,L,B){this.tag=1,this.containerInfo=r,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=vf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vf(0),this.hiddenUpdates=vf(null),this.identifierPrefix=h,this.onUncaughtError=y,this.onCaughtError=b,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function Px(r,a,u,h,y,b,E,L,B,Q,ie,se){return r=new iO(r,a,u,E,B,Q,ie,se,L),a=1,b===!0&&(a|=24),b=yn(3,null,null,a),r.current=b,b.stateNode=r,a=nh(),a.refCount++,r.pooledCache=a,a.refCount++,b.memoizedState={element:h,isDehydrated:u,cache:a},ah(b),r}function Hx(r){return r?(r=oa,r):oa}function jx(r,a,u,h,y,b){y=Hx(y),h.context===null?h.context=y:h.pendingContext=y,h=yr(a),h.payload={element:u},b=b===void 0?null:b,b!==null&&(h.callback=b),u=vr(r,h,a),u!==null&&(un(u,r,a),Cs(u,r,a))}function Bx(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<a?u:a}}function wp(r,a){Bx(r,a),(r=r.alternate)&&Bx(r,a)}function Ux(r){if(r.tag===13||r.tag===31){var a=eo(r,67108864);a!==null&&un(a,r,67108864),wp(r,67108864)}}function Vx(r){if(r.tag===13||r.tag===31){var a=_n();a=bf(a);var u=eo(r,a);u!==null&&un(u,r,a),wp(r,a)}}var tc=!0;function rO(r,a,u,h){var y=P.T;P.T=null;var b=$.p;try{$.p=2,Ep(r,a,u,h)}finally{$.p=b,P.T=y}}function oO(r,a,u,h){var y=P.T;P.T=null;var b=$.p;try{$.p=8,Ep(r,a,u,h)}finally{$.p=b,P.T=y}}function Ep(r,a,u,h){if(tc){var y=kp(h);if(y===null)dp(r,a,h,nc,u),Gx(r,h);else if(sO(y,r,a,u,h))h.stopPropagation();else if(Gx(r,h),a&4&&-1<aO.indexOf(r)){for(;y!==null;){var b=Yo(y);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var E=Xr(b.pendingLanes);if(E!==0){var L=b;for(L.pendingLanes|=2,L.entangledLanes|=2;E;){var B=1<<31-Je(E);L.entanglements[1]|=B,E&=~B}ai(b),(Fe&6)===0&&(Hu=Yt()+500,js(0))}}break;case 31:case 13:L=eo(b,2),L!==null&&un(L,b,2),Bu(),wp(b,2)}if(b=kp(h),b===null&&dp(r,a,h,nc,u),b===y)break;y=b}y!==null&&h.stopPropagation()}else dp(r,a,h,null,u)}}function kp(r){return r=Af(r),Tp(r)}var nc=null;function Tp(r){if(nc=null,r=Wo(r),r!==null){var a=s(r);if(a===null)r=null;else{var u=a.tag;if(u===13){if(r=l(a),r!==null)return r;r=null}else if(u===31){if(r=c(a),r!==null)return r;r=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return nc=r,null}function Fx(r){switch(r){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(yf()){case oe:return 2;case he:return 8;case _e:case Oe:return 32;case $e:return 268435456;default:return 32}default:return 32}}var Ap=!1,Lr=null,Rr=null,Or=null,qs=new Map,Ws=new Map,Dr=[],aO="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 Gx(r,a){switch(r){case"focusin":case"focusout":Lr=null;break;case"dragenter":case"dragleave":Rr=null;break;case"mouseover":case"mouseout":Or=null;break;case"pointerover":case"pointerout":qs.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ws.delete(a.pointerId)}}function Ys(r,a,u,h,y,b){return r===null||r.nativeEvent!==b?(r={blockedOn:a,domEventName:u,eventSystemFlags:h,nativeEvent:b,targetContainers:[y]},a!==null&&(a=Yo(a),a!==null&&Ux(a)),r):(r.eventSystemFlags|=h,a=r.targetContainers,y!==null&&a.indexOf(y)===-1&&a.push(y),r)}function sO(r,a,u,h,y){switch(a){case"focusin":return Lr=Ys(Lr,r,a,u,h,y),!0;case"dragenter":return Rr=Ys(Rr,r,a,u,h,y),!0;case"mouseover":return Or=Ys(Or,r,a,u,h,y),!0;case"pointerover":var b=y.pointerId;return qs.set(b,Ys(qs.get(b)||null,r,a,u,h,y)),!0;case"gotpointercapture":return b=y.pointerId,Ws.set(b,Ys(Ws.get(b)||null,r,a,u,h,y)),!0}return!1}function $x(r){var a=Wo(r.target);if(a!==null){var u=s(a);if(u!==null){if(a=u.tag,a===13){if(a=l(u),a!==null){r.blockedOn=a,o0(r.priority,function(){Vx(u)});return}}else if(a===31){if(a=c(u),a!==null){r.blockedOn=a,o0(r.priority,function(){Vx(u)});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function ic(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var u=kp(r.nativeEvent);if(u===null){u=r.nativeEvent;var h=new u.constructor(u.type,u);Tf=h,u.target.dispatchEvent(h),Tf=null}else return a=Yo(u),a!==null&&Ux(a),r.blockedOn=u,!1;a.shift()}return!0}function qx(r,a,u){ic(r)&&u.delete(a)}function lO(){Ap=!1,Lr!==null&&ic(Lr)&&(Lr=null),Rr!==null&&ic(Rr)&&(Rr=null),Or!==null&&ic(Or)&&(Or=null),qs.forEach(qx),Ws.forEach(qx)}function rc(r,a){r.blockedOn===a&&(r.blockedOn=null,Ap||(Ap=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,lO)))}var oc=null;function Wx(r){oc!==r&&(oc=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){oc===r&&(oc=null);for(var a=0;a<r.length;a+=3){var u=r[a],h=r[a+1],y=r[a+2];if(typeof h!="function"){if(Tp(h||u)===null)continue;break}var b=Yo(u);b!==null&&(r.splice(a,3),a-=3,kh(b,{pending:!0,data:y,method:u.method,action:h},h,y))}}))}function La(r){function a(B){return rc(B,r)}Lr!==null&&rc(Lr,r),Rr!==null&&rc(Rr,r),Or!==null&&rc(Or,r),qs.forEach(a),Ws.forEach(a);for(var u=0;u<Dr.length;u++){var h=Dr[u];h.blockedOn===r&&(h.blockedOn=null)}for(;0<Dr.length&&(u=Dr[0],u.blockedOn===null);)$x(u),u.blockedOn===null&&Dr.shift();if(u=(r.ownerDocument||r).$$reactFormReplay,u!=null)for(h=0;h<u.length;h+=3){var y=u[h],b=u[h+1],E=y[nn]||null;if(typeof b=="function")E||Wx(u);else if(E){var L=null;if(b&&b.hasAttribute("formAction")){if(y=b,E=b[nn]||null)L=E.formAction;else if(Tp(y)!==null)continue}else L=E.action;typeof L=="function"?u[h+1]=L:(u.splice(h,3),h-=3),Wx(u)}}}function Yx(){function r(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(E){return y=E})},focusReset:"manual",scroll:"manual"})}function a(){y!==null&&(y(),y=null),h||setTimeout(u,20)}function u(){if(!h&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,y=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(u,100),function(){h=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),y!==null&&(y(),y=null)}}}function Lp(r){this._internalRoot=r}ac.prototype.render=Lp.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(i(409));var u=a.current,h=_n();jx(u,h,r,a,null,null)},ac.prototype.unmount=Lp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;jx(r.current,2,null,r,null,null),Bu(),a[qo]=null}};function ac(r){this._internalRoot=r}ac.prototype.unstable_scheduleHydration=function(r){if(r){var a=r0();r={blockedOn:null,target:r,priority:a};for(var u=0;u<Dr.length&&a!==0&&a<Dr[u].priority;u++);Dr.splice(u,0,r),u===0&&$x(r)}};var Xx=t.version;if(Xx!=="19.2.8")throw Error(i(527,Xx,"19.2.8"));$.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=f(a),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var uO={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sc.isDisabled&&sc.supportsFiber)try{Xt=sc.inject(uO),St=sc}catch{}}return Ks.createRoot=function(r,a){if(!o(r))throw Error(i(299));var u=!1,h="",y=nb,b=ib,E=rb;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(y=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError)),a=Px(r,1,!1,null,null,u,h,null,y,b,E,Yx),r[qo]=a.current,cp(r),new Lp(a)},Ks.hydrateRoot=function(r,a,u){if(!o(r))throw Error(i(299));var h=!1,y="",b=nb,E=ib,L=rb,B=null;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onUncaughtError!==void 0&&(b=u.onUncaughtError),u.onCaughtError!==void 0&&(E=u.onCaughtError),u.onRecoverableError!==void 0&&(L=u.onRecoverableError),u.formState!==void 0&&(B=u.formState)),a=Px(r,1,!0,a,u??null,h,y,B,b,E,L,Yx),a.context=Hx(null),u=a.current,h=_n(),h=bf(h),y=yr(h),y.callback=null,vr(u,y,h),u=h,a.current.lanes=u,os(a,u),ai(a),r[qo]=a.current,cp(r),new ac(a)},Ks.version="19.2.8",Ks}var oS;function xO(){if(oS)return Dp.exports;oS=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(),Dp.exports=bO(),Dp.exports}var SO=xO();function _O(e,t){const n=getComputedStyle(e),i=parseFloat(n.fontSize);return t*i}function CO(e,t){const n=getComputedStyle(e.ownerDocument.documentElement),i=parseFloat(n.fontSize);return t*i}function wO(e){return e/100*window.innerHeight}function EO(e){return e/100*window.innerWidth}function kO(e){switch(typeof e){case"number":return[e,"px"];case"string":{const t=parseFloat(e);return e.endsWith("%")?[t,"%"]:e.endsWith("px")?[t,"px"]:e.endsWith("rem")?[t,"rem"]:e.endsWith("em")?[t,"em"]:e.endsWith("vh")?[t,"vh"]:e.endsWith("vw")?[t,"vw"]:[t,"%"]}}}function ol({groupSize:e,panelElement:t,styleProp:n}){let i;const[o,s]=kO(n);switch(s){case"%":{i=o/100*e;break}case"px":{i=o;break}case"rem":{i=CO(t,o);break}case"em":{i=_O(t,o);break}case"vh":{i=wO(o);break}case"vw":{i=EO(o);break}}return i}function Qt(e){return parseFloat(e.toFixed(3))}function Xa({group:e}){const{orientation:t,panels:n}=e;return n.reduce((i,o)=>(i+=t==="horizontal"?o.element.offsetWidth:o.element.offsetHeight,i),0)}function jm(e){const{panels:t}=e,n=Xa({group:e});return n===0?t.map(i=>({groupResizeBehavior:i.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:i.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:i.panelConstraints.disabled,minSize:0,maxSize:100,panelId:i.id})):t.map(i=>{const{element:o,panelConstraints:s}=i;let l=0;if(s.collapsedSize!==void 0){const p=ol({groupSize:n,panelElement:o,styleProp:s.collapsedSize});l=Qt(p/n*100)}let c;if(s.defaultSize!==void 0){const p=ol({groupSize:n,panelElement:o,styleProp:s.defaultSize});c=Qt(p/n*100)}let d=0;if(s.minSize!==void 0){const p=ol({groupSize:n,panelElement:o,styleProp:s.minSize});d=Qt(p/n*100)}let f=100;if(s.maxSize!==void 0){const p=ol({groupSize:n,panelElement:o,styleProp:s.maxSize});f=Qt(p/n*100)}return{groupResizeBehavior:s.groupResizeBehavior,collapsedSize:l,collapsible:s.collapsible===!0,defaultSize:c,disabled:s.disabled,minSize:d,maxSize:f,panelId:i.id}})}function Ze(e,t="Assertion error"){if(!e)throw Error(t)}function Bm(e,t){return Array.from(t).sort(e==="horizontal"?TO:AO)}function TO(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function AO(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function Rw(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Ow(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function LO({orientation:e,rects:t,targetRect:n}){const i={x:n.x+n.width/2,y:n.y+n.height/2};let o,s=Number.MAX_VALUE;for(const l of t){const{x:c,y:d}=Ow(i,l),f=e==="horizontal"?c:d;f<s&&(s=f,o=l)}return Ze(o,"No rect found"),o}let lc;function RO(){return lc===void 0&&(typeof matchMedia=="function"?lc=!!matchMedia("(pointer:coarse)").matches:lc=!1),lc}function Dw(e){const{element:t,orientation:n,panels:i,separators:o}=e,s=Bm(n,Array.from(t.children).filter(Rw).map(x=>({element:x}))).map(({element:x})=>x),l=[];let c=!1,d=!1,f=-1,p=-1,m=0,g,v=[];{let x=-1;for(const S of s)S.hasAttribute("data-panel")&&(x++,S.hasAttribute("data-disabled")||(m++,f===-1&&(f=x),p=x))}if(m>1){let x=-1;for(const S of s)if(S.hasAttribute("data-panel")){x++;const w=i.find(_=>_.element===S);if(w){if(g){const _=g.element.getBoundingClientRect(),C=S.getBoundingClientRect();let k;if(d){const D=n==="horizontal"?new DOMRect(_.right,_.top,0,_.height):new DOMRect(_.left,_.bottom,_.width,0),M=n==="horizontal"?new DOMRect(C.left,C.top,0,C.height):new DOMRect(C.left,C.top,C.width,0);switch(v.length){case 0:{k=[D,M];break}case 1:{const O=v[0],z=LO({orientation:n,rects:[_,C],targetRect:O.element.getBoundingClientRect()});k=[O,z===_?M:D];break}default:{k=v;break}}}else v.length?k=v:k=[n==="horizontal"?new DOMRect(_.right,C.top,C.left-_.right,C.height):new DOMRect(C.left,_.bottom,C.width,C.top-_.bottom)];for(const D of k){let M="width"in D?D:D.element.getBoundingClientRect();const O=RO()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(M.width<O){const j=O-M.width;M=new DOMRect(M.x-j/2,M.y,M.width+j,M.height)}if(M.height<O){const j=O-M.height;M=new DOMRect(M.x,M.y-j/2,M.width,M.height+j)}const z=x<=f||x>p;!c&&!z&&l.push({group:e,groupSize:Xa({group:e}),panels:[g,w],separator:"width"in D?void 0:D,rect:M}),c=!1}}d=!1,g=w,v=[]}}else if(S.hasAttribute("data-separator")){S.ariaDisabled!==null&&(c=!0);const w=o.find(_=>_.element===S);w?v.push(w):(g=void 0,v=[])}else d=!0}return l}class Mw{#e={};addListener(t,n){const i=this.#e[t];return i===void 0?this.#e[t]=[n]:i.includes(n)||i.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const i=this.#e[t];if(i!==void 0)if(i.length===1)i[0].call(null,n);else{let o=!1,s=null;const l=Array.from(i);for(let c=0;c<l.length;c++){const d=l[c];try{d.call(null,n)}catch(f){s===null&&(o=!0,s=f)}}if(o)throw s}}removeAllListeners(){this.#e={}}removeListener(t,n){const i=this.#e[t];if(i!==void 0){const o=i.indexOf(n);o>=0&&i.splice(o,1)}}}let Ua={cursorFlags:0,state:"inactive"};const Kg=new Mw;function Ro(){return Ua}function OO(e){return Kg.addListener("change",e)}function DO(e){const t=Ua,n={...Ua};n.cursorFlags=e,Ua=n,Kg.emit("change",{prev:t,next:n})}function Va(e){const t=Ua;Ua=e,Kg.emit("change",{prev:t,next:e})}const MO=e=>e,zp=()=>{},Iw=1,Nw=2,zw=4,Pw=8,aS=3,sS=12;let uc;function lS(){return uc===void 0&&(uc=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(uc=!0)),uc}function IO({cursorFlags:e,groups:t,state:n}){let i=0,o=0;switch(n){case"active":case"hover":t.forEach(s=>{if(!s.mutableState.disableCursor)switch(s.orientation){case"horizontal":{i++;break}case"vertical":{o++;break}}})}if(!(i===0&&o===0)){switch(n){case"active":{if(e&&lS()){const s=(e&Iw)!==0,l=(e&Nw)!==0,c=(e&zw)!==0,d=(e&Pw)!==0;if(s)return c?"se-resize":d?"ne-resize":"e-resize";if(l)return c?"sw-resize":d?"nw-resize":"w-resize";if(c)return"s-resize";if(d)return"n-resize"}break}}return lS()?i>0&&o>0?"move":i>0?"ew-resize":"ns-resize":i>0&&o>0?"grab":i>0?"col-resize":"row-resize"}}const uS=new WeakMap;function Qg(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=uS.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&(Object.isExtensible(e.adoptedStyleSheets)?e.adoptedStyleSheets.push(n):e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]));const i=Ro();switch(i.state){case"active":case"hover":{const o=IO({cursorFlags:i.cursorFlags,groups:i.hitRegions.map(l=>l.group),state:i.state}),s=`*, *:hover {cursor: ${o} !important; }`;if(t===s)return;t=s,o?n.cssRules.length===0?n.insertRule(s):n.replaceSync(s):n.cssRules.length===1&&n.deleteRule(0);break}case"inactive":{t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}}uS.set(e,{prevStyle:t,styleSheet:n})}let vi=new Map;const Hw=new Mw;function NO(e){vi=new Map(vi),vi.delete(e)}function cS(e,t){for(const[n]of vi)if(n.id===e)return n}function Ur(e,t){for(const[n,i]of vi)if(n.id===e)return i;if(t)throw Error(`Could not find data for Group with id ${e}`)}function Bo(){return vi}function Zg(e,t){return Hw.addListener("groupChange",n=>{n.group.id===e&&t(n)})}function tr(e,t,n){const i=vi.get(e);vi=new Map(vi),vi.set(e,t),Hw.emit("groupChange",{group:e,isUserInteraction:n?.isUserInteraction===!0,prev:i,next:t})}function jw(e){const t=Ro();let n=!1;return t.state==="active"&&(Va({cursorFlags:0,state:"inactive"}),t.hitRegions.length>0&&(Qg(e),n=!0,t.hitRegions.forEach(i=>{const o=Ur(i.group.id,!0);tr(i.group,o,{isUserInteraction:!0})}))),n}function dS(e){e.defaultPrevented||jw(e.currentTarget)}function zO(e,t,n){let i,o={x:1/0,y:1/0};for(const s of t){const l=Ow(n,s.rect);switch(e){case"horizontal":{l.x<=o.x&&(i=s,o=l);break}case"vertical":{l.y<=o.y&&(i=s,o=l);break}}}return i?{distance:o,hitRegion:i}:void 0}function PO(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function HO(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:pS(e),b:pS(t)};let i;for(;n.a.at(-1)===n.b.at(-1);)i=n.a.pop(),n.b.pop();Ze(i,"Stacking order can only be calculated for elements with a common ancestor");const o={a:hS(fS(n.a)),b:hS(fS(n.b))};if(o.a===o.b){const s=i.childNodes,l={a:n.a.at(-1),b:n.b.at(-1)};let c=s.length;for(;c--;){const d=s[c];if(d===l.a)return 1;if(d===l.b)return-1}}return Math.sign(o.a-o.b)}const jO=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function BO(e){const t=getComputedStyle(Bw(e)??e).display;return t==="flex"||t==="inline-flex"}function UO(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||BO(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||jO.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function fS(e){let t=e.length;for(;t--;){const n=e[t];if(Ze(n,"Missing node"),UO(n))return n}return null}function hS(e){return e&&Number(getComputedStyle(e).zIndex)||0}function pS(e){const t=[];for(;e;)t.push(e),e=Bw(e);return t}function Bw(e){const{parentNode:t}=e;return PO(t)?t.host:t}function VO(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function FO({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!Rw(n)||n.contains(e)||e.contains(n))return!0;if(HO(n,e)>0){let i=n;for(;i;){if(i.contains(e))return!0;if(VO(i.getBoundingClientRect(),t))return!1;i=i.parentElement}}return!0}function Jg(e,t){const n=[];return t.forEach((i,o)=>{if(o.disabled)return;const s=Dw(o),l=zO(o.orientation,s,{x:e.clientX,y:e.clientY});l&&l.distance.x<=0&&l.distance.y<=0&&FO({groupElement:o.element,hitRegion:l.hitRegion.rect,pointerEventTarget:e.target})&&n.push(l.hitRegion)}),n}function GO(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Gt(e,t,n=0){return Math.abs(Qt(e)-Qt(t))<=n}function fi(e,t){return Gt(e,t)?0:e>t?1:-1}function Ha({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:i}){const{collapsedSize:o=0,collapsible:s,disabled:l,maxSize:c=100,minSize:d=0}=t;if(l&&!e)return n;if(fi(i,d)<0)if(s){const f=(o+d)/2;fi(i,f)<0?i=o:i=d}else i=d;return i=Math.min(c,i),i=Qt(i),i}function bl({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:i,prevLayout:o,trigger:s}){if(Gt(e,0))return t;const l=s==="imperative-api",c=Object.values(t),d=Object.values(o),f=[...c],[p,m]=i;Ze(p!=null,"Invalid first pivot index"),Ze(m!=null,"Invalid second pivot index");let g=0;switch(s){case"keyboard":{{const S=e<0?m:p,w=n[S];Ze(w,`Panel constraints not found for index ${S}`);const{collapsedSize:_=0,collapsible:C,minSize:k=0}=w;if(C){const D=c[S];if(Ze(D!=null,`Previous layout not found for panel index ${S}`),Gt(D,_)){const M=k-D;fi(M,Math.abs(e))>0&&(e=e<0?0-M:M)}}}{const S=e<0?p:m,w=n[S];Ze(w,`No panel constraints found for index ${S}`);const{collapsedSize:_=0,collapsible:C,minSize:k=0}=w;if(C){const D=c[S];if(Ze(D!=null,`Previous layout not found for panel index ${S}`),Gt(D,k)){const M=D-_;fi(M,Math.abs(e))>0&&(e=e<0?0-M:M)}}}break}default:{const S=e<0?m:p,w=n[S];Ze(w,`Panel constraints not found for index ${S}`);const _=c[S],{collapsible:C,collapsedSize:k,minSize:D}=w;if(C&&fi(_,D)<0)if(e>0){const M=D-k,O=M/2,z=_+e;fi(z,D)<0&&(e=fi(e,O)<=0?0:M)}else{const M=D-k,O=100-M/2,z=_-e;fi(z,D)<0&&(e=fi(100+e,O)>0?0:-M)}break}}{const S=e<0?1:-1;let w=e<0?m:p,_=0;for(;;){const k=c[w];Ze(k!=null,`Previous layout not found for panel index ${w}`);const D=Ha({overrideDisabledPanels:l,panelConstraints:n[w],prevSize:k,size:100})-k;if(_+=D,w+=S,w<0||w>=n.length)break}const C=Math.min(Math.abs(e),Math.abs(_));e=e<0?0-C:C}{let S=e<0?p:m;for(;S>=0&&S<n.length;){const w=Math.abs(e)-Math.abs(g),_=c[S];Ze(_!=null,`Previous layout not found for panel index ${S}`);const C=_-w,k=Ha({overrideDisabledPanels:l,panelConstraints:n[S],prevSize:_,size:C});if(!Gt(_,k)&&(g+=_-k,f[S]=k,g.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?S--:S++}}if(GO(d,f))return o;{const S=e<0?m:p,w=c[S];Ze(w!=null,`Previous layout not found for panel index ${S}`);const _=w+g,C=Ha({overrideDisabledPanels:l,panelConstraints:n[S],prevSize:w,size:_});if(f[S]=C,!Gt(C,_)){let k=_-C,D=e<0?m:p;for(;D>=0&&D<n.length;){const M=f[D];Ze(M!=null,`Previous layout not found for panel index ${D}`);const O=M+k,z=Ha({overrideDisabledPanels:l,panelConstraints:n[D],prevSize:M,size:O});if(Gt(M,z)||(k-=z-M,f[D]=z),Gt(k,0))break;e>0?D--:D++}}}const v=Object.values(f).reduce((S,w)=>w+S,0);if(!Gt(v,100,.1))return o;const x=Object.keys(o);return f.reduce((S,w,_)=>(S[x[_]]=w,S),{})}function Oo(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||fi(e[n],t[n])!==0)return!1;return!0}function Do({layout:e,panelConstraints:t}){const n=Object.values(e),i=[...n],o=i.reduce((c,d)=>c+d,0);if(i.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${i.map(c=>`${c}%`).join(", ")}`);if(!Gt(o,100)&&i.length>0)for(let c=0;c<t.length;c++){const d=i[c];Ze(d!=null,`No layout data found for index ${c}`);const f=100/o*d;i[c]=f}let s=0;for(let c=0;c<t.length;c++){const d=n[c];Ze(d!=null,`No layout data found for index ${c}`);const f=i[c];Ze(f!=null,`No layout data found for index ${c}`);const p=Ha({overrideDisabledPanels:!0,panelConstraints:t[c],prevSize:d,size:f});f!=p&&(s+=f-p,i[c]=p)}if(!Gt(s,0))for(let c=0;c<t.length;c++){const d=i[c];Ze(d!=null,`No layout data found for index ${c}`);const f=d+s,p=Ha({overrideDisabledPanels:!0,panelConstraints:t[c],prevSize:d,size:f});if(d!==p&&(s-=p-d,i[c]=p,Gt(s,0)))break}const l=Object.keys(e);return i.reduce((c,d,f)=>(c[l[f]]=d,c),{})}function Uw({groupId:e,panelId:t}){const n=()=>{const d=Bo();for(const[f,{defaultLayoutDeferred:p,derivedPanelConstraints:m,layout:g,groupSize:v,separatorToPanels:x}]of d)if(f.id===e)return{defaultLayoutDeferred:p,derivedPanelConstraints:m,group:f,groupSize:v,layout:g,separatorToPanels:x};throw Error(`Group ${e} not found`)},i=()=>{const d=n().derivedPanelConstraints.find(f=>f.panelId===t);if(d!==void 0)return d;throw Error(`Panel constraints not found for Panel ${t}`)},o=()=>{const d=n().group.panels.find(f=>f.id===t);if(d!==void 0)return d;throw Error(`Layout not found for Panel ${t}`)},s=()=>{const d=n().layout[t];if(d!==void 0)return d;throw Error(`Layout not found for Panel ${t}`)},l=({nextSize:d,panels:f,prevLayout:p,derivedPanelConstraints:m})=>{const g=s(),v=f.findIndex(w=>w.id===t),x=v===0,S=v===f.length-1;if(S&&d<g&&(x||f.slice(0,v).every((w,_)=>{const C=m[_];return C?.collapsible&&Gt(C.collapsedSize,p[C.panelId])}))){const w=f.slice(0,v).reduce((_,C)=>_+p[C.id],0);return{...p,[t]:Qt(100-w)}}return bl({delta:S?g-d:d-g,initialLayout:p,panelConstraints:m,pivotIndices:S?[v-1,v]:[v,v+1],prevLayout:p,trigger:"imperative-api"})},c=d=>{const f=s();if(d===f)return;const{defaultLayoutDeferred:p,derivedPanelConstraints:m,group:g,groupSize:v,layout:x,separatorToPanels:S}=n(),w=l({nextSize:d,panels:g.panels,prevLayout:x,derivedPanelConstraints:m}),_=Do({layout:w,panelConstraints:m});Oo(x,_)||tr(g,{defaultLayoutDeferred:p,derivedPanelConstraints:m,groupSize:v,layout:_,separatorToPanels:S})};return{collapse:()=>{const{collapsible:d,collapsedSize:f}=i(),{mutableValues:p}=o(),m=s();d&&m!==f&&(p.expandToSize=m,c(f))},expand:()=>{const{collapsible:d,collapsedSize:f,minSize:p}=i(),{mutableValues:m}=o(),g=s();if(d&&g===f){let v=m.expandToSize??p;v===0&&(v=1),c(v)}},getSize:()=>{const{group:d}=n(),f=s(),{element:p}=o(),m=d.orientation==="horizontal"?p.offsetWidth:p.offsetHeight;return{asPercentage:f,inPixels:m}},isCollapsed:()=>{const{collapsible:d,collapsedSize:f}=i(),p=s();return d&&Gt(f,p)},resize:d=>{const{group:f}=n(),{element:p}=o(),m=Xa({group:f}),g=ol({groupSize:m,panelElement:p,styleProp:d}),v=Qt(g/m*100);c(v)}}}function mS(e){if(e.defaultPrevented)return;const t=Bo();Jg(e,t).forEach(n=>{if(n.separator&&!n.separator.disableDoubleClick){const i=n.panels.find(o=>o.panelConstraints.defaultSize!==void 0);if(i){const o=i.panelConstraints.defaultSize,s=Uw({groupId:n.group.id,panelId:i.id});s&&o!==void 0&&(s.resize(o),e.preventDefault())}}})}function Wc(e){const t=Bo();for(const[n]of t)if(n.separators.some(i=>i.element===e))return n;throw Error("Could not find parent Group for separator element")}function Vw({groupId:e}){const t=()=>{const n=Bo();for(const[i,o]of n)if(i.id===e)return{group:i,...o};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:n,layout:i}=t();return n?{}:i},setLayout(n){const{defaultLayoutDeferred:i,derivedPanelConstraints:o,group:s,groupSize:l,layout:c,separatorToPanels:d}=t(),f=Do({layout:n,panelConstraints:o});return i?c:(Oo(c,f)||tr(s,{defaultLayoutDeferred:i,derivedPanelConstraints:o,groupSize:l,layout:f,separatorToPanels:d}),f)}}}function po(e,t){const n=Wc(e),i=Ur(n.id,!0),o=n.separators.find(p=>p.element===e);Ze(o,"Matching separator not found");const s=i.separatorToPanels.get(o);Ze(s,"Matching panels not found");const l=s.map(p=>n.panels.indexOf(p)),c=Vw({groupId:n.id}).getLayout(),d=bl({delta:t,initialLayout:c,panelConstraints:i.derivedPanelConstraints,pivotIndices:l,prevLayout:c,trigger:"keyboard"}),f=Do({layout:d,panelConstraints:i.derivedPanelConstraints});Oo(c,f)||tr(n,{defaultLayoutDeferred:i.defaultLayoutDeferred,derivedPanelConstraints:i.derivedPanelConstraints,groupSize:i.groupSize,layout:f,separatorToPanels:i.separatorToPanels},{isUserInteraction:!0})}function gS(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=Wc(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&po(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&po(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&po(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&po(t,-5);break}case"End":{e.preventDefault(),po(t,100);break}case"Enter":{e.preventDefault();const i=Wc(t),o=Ur(i.id,!0),{derivedPanelConstraints:s,layout:l,separatorToPanels:c}=o,d=i.separators.find(g=>g.element===t);Ze(d,"Matching separator not found");const f=c.get(d);Ze(f,"Matching panels not found");const p=f[0],m=s.find(g=>g.panelId===p.id);if(Ze(m,"Panel metadata not found"),m.collapsible){const g=l[p.id],v=m.collapsedSize===g?i.mutableState.expandedPanelSizes[p.id]??m.minSize:m.collapsedSize;po(t,v-g)}break}case"F6":{e.preventDefault();const i=Wc(t).separators.map(l=>l.element),o=Array.from(i).findIndex(l=>l===e.currentTarget);Ze(o!==null,"Index not found");const s=e.shiftKey?o>0?o-1:i.length-1:o+1<i.length?o+1:0;i[s].focus({preventScroll:!0});break}case"Home":{e.preventDefault(),po(t,-100);break}}}function yS(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const t=Bo(),n=Jg(e,t),i=new Map;let o=!1;n.forEach(s=>{s.separator&&(o||(o=!0,s.separator.element.focus({focusVisible:!1,preventScroll:!0})));const l=t.get(s.group);l&&i.set(s.group,l.layout)}),Va({cursorFlags:0,hitRegions:n,initialLayoutMap:i,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}),n.length&&e.preventDefault()}function Fw({document:e,event:t,hitRegions:n,initialLayoutMap:i,mountedGroups:o,pointerDownAtPoint:s,prevCursorFlags:l}){let c=0;n.forEach(f=>{const{group:p,groupSize:m}=f,{orientation:g,panels:v}=p,{disableCursor:x}=p.mutableState;let S=0;s?g==="horizontal"?S=(t.clientX-s.x)/m*100:S=(t.clientY-s.y)/m*100:g==="horizontal"?S=t.clientX<0?-100:100:S=t.clientY<0?-100:100;const w=i.get(p),_=o.get(p);if(!w||!_)return;const{defaultLayoutDeferred:C,derivedPanelConstraints:k,groupSize:D,layout:M,separatorToPanels:O}=_;if(k&&M&&O){const z=bl({delta:S,initialLayout:w,panelConstraints:k,pivotIndices:f.panels.map(j=>v.indexOf(j)),prevLayout:M,trigger:"mouse-or-touch"});if(Oo(z,M)){if(S!==0&&!x)switch(g){case"horizontal":{c|=S<0?Iw:Nw;break}case"vertical":{c|=S<0?zw:Pw;break}}}else tr(f.group,{defaultLayoutDeferred:C,derivedPanelConstraints:k,groupSize:D,layout:z,separatorToPanels:O})}});let d=0;t.movementX===0?d|=l&aS:d|=c&aS,t.movementY===0?d|=l&sS:d|=c&sS,DO(d),Qg(e)}function vS(e){const t=Bo(),n=Ro();n.state==="active"&&Fw({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}function bS(e){if(e.defaultPrevented)return;const t=Ro(),n=Bo();switch(t.state){case"active":{if(e.buttons===0){Va({cursorFlags:0,state:"inactive"}),t.hitRegions.forEach(i=>{const o=Ur(i.group.id,!0);tr(i.group,o,{isUserInteraction:!0})});return}for(const i of t.hitRegions)if(i.separator){const{element:o}=i.separator;o.hasPointerCapture?.(e.pointerId)||o.setPointerCapture?.(e.pointerId)}Fw({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break}default:{const i=Jg(e,n);i.length===0?t.state!=="inactive"&&Va({cursorFlags:0,state:"inactive"}):Va({cursorFlags:0,hitRegions:i,state:"hover"}),Qg(e.currentTarget);break}}}function xS(e){e.relatedTarget instanceof HTMLIFrameElement&&Ro().state==="hover"&&Va({cursorFlags:0,state:"inactive"})}function SS(e){e.defaultPrevented||e.pointerType==="mouse"&&e.button>0||jw(e.currentTarget)&&e.preventDefault()}function _S(e){let t=0,n=0;const i={};for(const s of e)if(s.defaultSize!==void 0){t++;const l=Qt(s.defaultSize);n+=l,i[s.panelId]=l}else i[s.panelId]=void 0;const o=e.length-t;if(o!==0){const s=Qt((100-n)/o);for(const l of e)l.defaultSize===void 0&&(i[l.panelId]=s)}return i}function $O(e,t,n){if(!n[0])return;const i=e.panels.find(d=>d.element===t);if(!i||!i.onResize)return;const o=Xa({group:e}),s=e.orientation==="horizontal"?i.element.offsetWidth:i.element.offsetHeight,l=i.mutableValues.prevSize,c={asPercentage:Qt(s/o*100),inPixels:s};i.mutableValues.prevSize=c,i.onResize(c,i.id,l)}function qO(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function WO({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:i}){if(n<=0||t<=0||n===t)return i;let o=0,s=0,l=!1;const c=new Map,d=[];for(const m of e.panels){const g=i[m.id]??0;if(m.panelConstraints.groupResizeBehavior==="preserve-pixel-size"){l=!0;const v=g/100*n,x=Qt(v/t*100);c.set(m.id,x),o+=x}else d.push(m.id),s+=g}if(!l||d.length===0)return i;const f=100-o,p={...i};if(c.forEach((m,g)=>{p[g]=m}),s>0)for(const m of d){const g=i[m]??0;p[m]=Qt(g/s*f)}else{const m=Qt(f/d.length);for(const g of d)p[g]=m}return p}function YO(e,t){const n=e.map(o=>o.id),i=Object.keys(t);if(n.length!==i.length)return!1;for(const o of n)if(!i.includes(o))return!1;return!0}const Ra=new Map;function XO(e){let t=!0;Ze(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,i=new Set,o=new Set,s=new n(x=>{for(const S of x){const{borderBoxSize:w,target:_}=S;if(_===e.element){if(t){const C=Xa({group:e});if(C===0)return;const k=Ur(e.id);if(!k)return;const D=jm(e),M=k.defaultLayoutDeferred?_S(D):k.layout,O=WO({group:e,nextGroupSize:C,prevGroupSize:k.groupSize,prevLayout:M}),z=Do({layout:O,panelConstraints:D});if(!k.defaultLayoutDeferred&&Oo(k.layout,z)&&qO(k.derivedPanelConstraints,D)&&k.groupSize===C)return;tr(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:D,groupSize:C,layout:z,separatorToPanels:k.separatorToPanels})}}else $O(e,_,w)}});s.observe(e.element),e.panels.forEach(x=>{Ze(!i.has(x.id),`Panel ids must be unique; id "${x.id}" was used more than once`),i.add(x.id),x.onResize&&s.observe(x.element)});const l=Xa({group:e}),c=jm(e),d=e.panels.map(({id:x})=>x).join(",");let f=e.mutableState.defaultLayout;f&&(YO(e.panels,f)||(f=void 0));const p=e.mutableState.layouts[d]??f??_S(c),m=Do({layout:p,panelConstraints:c}),g=e.element.ownerDocument;Ra.set(g,(Ra.get(g)??0)+1);const v=new Map;return Dw(e).forEach(x=>{x.separator&&v.set(x.separator,x.panels)}),tr(e,{defaultLayoutDeferred:l===0,derivedPanelConstraints:c,groupSize:l,layout:m,separatorToPanels:v}),e.separators.forEach(x=>{Ze(!o.has(x.id),`Separator ids must be unique; id "${x.id}" was used more than once`),o.add(x.id),x.element.addEventListener("keydown",gS)}),Ra.get(g)===1&&(g.addEventListener("contextmenu",dS,!0),g.addEventListener("dblclick",mS,!0),g.addEventListener("pointerdown",yS,!0),g.addEventListener("pointerleave",vS),g.addEventListener("pointermove",bS),g.addEventListener("pointerout",xS),g.addEventListener("pointerup",SS,!0)),function(){t=!1,Ra.set(g,Math.max(0,(Ra.get(g)??0)-1)),NO(e),e.separators.forEach(x=>{x.element.removeEventListener("keydown",gS)}),Ra.get(g)||(g.removeEventListener("contextmenu",dS,!0),g.removeEventListener("dblclick",mS,!0),g.removeEventListener("pointerdown",yS,!0),g.removeEventListener("pointerleave",vS),g.removeEventListener("pointermove",bS),g.removeEventListener("pointerout",xS),g.removeEventListener("pointerup",SS,!0)),s.disconnect()}}function KO(){const[e,t]=N.useState({}),n=N.useCallback(()=>t({}),[]);return[e,n]}function ey(e){const t=N.useId();return`${e??t}`}const Uo=typeof window<"u"?N.useLayoutEffect:N.useEffect;function cl(e){const t=N.useRef(e);return Uo(()=>{t.current=e},[e]),N.useCallback((...n)=>t.current?.(...n),[t])}function ty(...e){return cl(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function ny(e){const t=N.useRef({...e});return Uo(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const Gw=N.createContext(null);function QO(e,t){const n=N.useRef({getLayout:()=>({}),setLayout:MO});N.useImperativeHandle(t,()=>n.current,[]),Uo(()=>{Object.assign(n.current,Vw({groupId:e}))})}function $w({children:e,className:t,defaultLayout:n,disableCursor:i,disabled:o,elementRef:s,groupRef:l,id:c,onLayoutChange:d,onLayoutChanged:f,orientation:p="horizontal",resizeTargetMinimumSize:m={coarse:20,fine:10},style:g,...v}){const x=N.useRef({onLayoutChange:{},onLayoutChanged:{}}),S=cl(q=>{Oo(x.current.onLayoutChange,q)||(x.current.onLayoutChange=q,d?.(q))}),w=cl((q,U)=>{Oo(x.current.onLayoutChanged,q)||(x.current.onLayoutChanged=q,f?.(q,{isUserInteraction:U}))}),_=ey(c),C=N.useRef(null),[k,D]=KO(),M=N.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:m,separators:[]}),O=ty(C,s);QO(_,l);const z=cl((q,U)=>{const Z=Ro(),X=cS(q),W=Ur(q);if(W){let P=!1;return Z.state==="active"&&(P=Z.hitRegions.some($=>$.group===X)),{flexGrow:W.layout[U]??1,pointerEvents:P?"none":void 0}}if(n?.[U])return{flexGrow:n?.[U]}}),j=ny({defaultLayout:n,disableCursor:i}),F=N.useMemo(()=>({get disableCursor(){return!!j.disableCursor},getPanelStyles:z,id:_,orientation:p,registerPanel:q=>{const U=M.current;return U.panels=Bm(p,[...U.panels,q]),D(),()=>{U.panels=U.panels.filter(Z=>Z!==q),D()}},registerSeparator:q=>{const U=M.current;return U.separators=Bm(p,[...U.separators,q]),D(),()=>{U.separators=U.separators.filter(Z=>Z!==q),D()}},updatePanelProps:(q,{disabled:U})=>{const Z=M.current.panels.find(P=>P.id===q);Z&&(Z.panelConstraints.disabled=U);const X=cS(_),W=Ur(_);X&&W&&tr(X,{...W,derivedPanelConstraints:jm(X)})},updateSeparatorProps:(q,{disabled:U,disableDoubleClick:Z})=>{const X=M.current.separators.find(W=>W.id===q);X&&(X.disabled=U,X.disableDoubleClick=Z)}}),[z,_,D,p,j]),ee=N.useRef(null);return Uo(()=>{const q=C.current;if(q===null)return;const U=M.current;let Z;if(j.defaultLayout!==void 0&&Object.keys(j.defaultLayout).length===U.panels.length){Z={};for(const R of U.panels){const H=j.defaultLayout[R.id];H!==void 0&&(Z[R.id]=H)}}const X={disabled:!!o,element:q,id:_,mutableState:{defaultLayout:Z,disableCursor:!!j.disableCursor,expandedPanelSizes:M.current.lastExpandedPanelSizes,layouts:M.current.layouts},orientation:p,panels:U.panels,resizeTargetMinimumSize:U.resizeTargetMinimumSize,separators:U.separators};ee.current=X;const W=XO(X),{defaultLayoutDeferred:P,derivedPanelConstraints:$,layout:ne}=Ur(X.id,!0);!P&&$.length>0&&(S(ne),w(ne,!1));const ue=Zg(_,R=>{const{defaultLayoutDeferred:H,derivedPanelConstraints:Y,layout:I}=R.next;if(H||Y.length===0)return;const le=X.panels.map(({id:re})=>re).join(",");X.mutableState.layouts[le]=I,Y.forEach(re=>{if(re.collapsible){const{layout:ce}=R.prev??{};if(ce){const xe=Gt(re.collapsedSize,I[re.panelId]),pe=Gt(re.collapsedSize,ce[re.panelId]);xe&&!pe&&(X.mutableState.expandedPanelSizes[re.panelId]=ce[re.panelId])}}});const fe=Ro().state!=="active";S(I),fe&&w(I,R.isUserInteraction)});return()=>{ee.current=null,W(),ue()}},[o,_,w,S,p,k,j]),N.useEffect(()=>{const q=ee.current;q&&(q.mutableState.defaultLayout=n,q.mutableState.disableCursor=!!i)}),T.jsx(Gw.Provider,{value:F,children:T.jsx("div",{...v,className:t,"data-group":!0,"data-testid":_,id:_,ref:O,style:{height:"100%",width:"100%",overflow:"hidden",...g,display:"flex",flexDirection:p==="horizontal"?"row":"column",flexWrap:"nowrap",touchAction:p==="horizontal"?"pan-y":"pan-x"},children:e})})}$w.displayName="Group";function Yc(e,t){return`react-resizable-panels:${[e,...t].join(":")}`}function ZO({id:e,panelIds:t,storage:n}){const i=Yc(e,[]),o=n.getItem(i);if(o)try{const s=JSON.parse(o);if(t){const l=t.join(","),c=s[l];if(c&&Array.isArray(c.layout)&&t.length===c.layout.length){const d={};for(let f=0;f<t.length;f++)d[t[f]]=c.layout[f];return d}}else{const l=Object.keys(s);if(l.length===1){const c=s[l[0]];if(c&&Array.isArray(c.layout)){const d=l[0].split(",");if(d.length===c.layout.length){const f={};for(let p=0;p<d.length;p++)f[d[p]]=c.layout[p];return f}}}}}catch{}}function JO({debounceSaveMs:e=100,onlySaveAfterUserInteractions:t,panelIds:n,storage:i=localStorage,...o}){const s=n!==void 0,l="id"in o?o.id:o.groupId,c=Yc(l,n??[]),d=N.useSyncExternalStore(eD,()=>i.getItem(c),()=>i.getItem(c)),f=N.useMemo(()=>{if(d){const w=JSON.parse(d),_=Object.values(w);if(Array.from(_).every(C=>typeof C=="number"))return w}},[d]),p=N.useMemo(()=>{if(!f)return ZO({id:l,panelIds:n,storage:i})},[f,l,n,i]),m=f??p,g=N.useRef(null),v=N.useCallback(()=>{const w=g.current;w&&(g.current=null,clearTimeout(w))},[]);N.useLayoutEffect(()=>()=>{v()},[v]);const x=N.useCallback((w,_)=>{if(!_.isUserInteraction)return;v();let C;s?C=Yc(l,Object.keys(w)):C=Yc(l,[]);try{i.setItem(C,JSON.stringify(w))}catch(k){console.error(k)}},[v,s,l,t,i]),S=N.useCallback(w=>{v(),e===0?x(w,{isUserInteraction:!1}):g.current=setTimeout(()=>{x(w,{isUserInteraction:!1})},e)},[v,e,x]);return{defaultLayout:m,onLayoutChange:S,onLayoutChanged:x}}function eD(){return function(){}}function iy(){const e=N.useContext(Gw);return Ze(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function tD(e,t){const{id:n}=iy(),i=N.useRef({collapse:zp,expand:zp,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:zp});N.useImperativeHandle(t,()=>i.current,[]),Uo(()=>{Object.assign(i.current,Uw({groupId:n,panelId:e}))})}function qw({children:e,className:t,collapsedSize:n="0%",collapsible:i=!1,defaultSize:o,disabled:s,elementRef:l,groupResizeBehavior:c="preserve-relative-size",id:d,maxSize:f="100%",minSize:p="0%",onResize:m,panelRef:g,style:v,...x}){const S=!!d,w=ey(d),_=ny({disabled:s}),C=N.useRef(null),k=ty(C,l),{getPanelStyles:D,id:M,orientation:O,registerPanel:z,updatePanelProps:j}=iy(),F=m!==null,ee=cl((X,W,P)=>{m?.(X,d,P)});Uo(()=>{const X=C.current;if(X!==null){const W={element:X,id:w,idIsStable:S,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:F?ee:void 0,panelConstraints:{groupResizeBehavior:c,collapsedSize:n,collapsible:i,defaultSize:o,disabled:_.disabled,maxSize:f,minSize:p}};return z(W)}},[c,n,i,o,F,w,S,f,p,ee,z,_]),N.useEffect(()=>{j(w,{disabled:s})},[s,w,j]),tD(w,g);const q=()=>{const X=D(M,w);if(X)return JSON.stringify(X)},U=N.useSyncExternalStore(X=>Zg(M,X),q,q);let Z;return U?Z=JSON.parse(U):o!==void 0?Z={flexGrow:void 0,flexShrink:void 0,flexBasis:o}:Z={flexGrow:1},T.jsx("div",{...x,"data-disabled":s||void 0,"data-panel":!0,"data-testid":w,id:w,ref:k,style:{...nD,display:"flex",flexBasis:0,flexShrink:1,overflow:"visible",...Z},children:T.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,overflow:"auto",...v,touchAction:O==="horizontal"?"pan-y":"pan-x"},children:e})})}qw.displayName="Panel";const nD={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function iD({layout:e,panelConstraints:t,panelId:n,panelIndex:i}){let o,s;const l=e[n],c=t.find(d=>d.panelId===n);if(c){const d=c.maxSize,f=c.collapsible?c.collapsedSize:c.minSize,p=[i,i+1];s=Do({layout:bl({delta:f-l,initialLayout:e,panelConstraints:t,pivotIndices:p,prevLayout:e}),panelConstraints:t})[n],o=Do({layout:bl({delta:d-l,initialLayout:e,panelConstraints:t,pivotIndices:p,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:o,valueMin:s,valueNow:l}}function Ww({children:e,className:t,disabled:n,disableDoubleClick:i,elementRef:o,id:s,style:l,...c}){const d=ey(s),f=ny({disabled:n,disableDoubleClick:i}),[p,m]=N.useState({}),[g,v]=N.useState("inactive"),[x,S]=N.useState(!1),w=N.useRef(null),_=ty(w,o),{disableCursor:C,id:k,orientation:D,registerSeparator:M,updateSeparatorProps:O}=iy(),z=D==="horizontal"?"vertical":"horizontal";Uo(()=>{const ee=w.current;if(ee!==null){const q={disabled:f.disabled,disableDoubleClick:f.disableDoubleClick,element:ee,id:d},U=M(q),Z=OO(W=>{v(W.next.state!=="inactive"&&W.next.hitRegions.some(P=>P.separator===q)?W.next.state:"inactive")}),X=Zg(k,W=>{const{derivedPanelConstraints:P,layout:$,separatorToPanels:ne}=W.next,ue=ne.get(q);if(ue){const R=ue[0],H=ue.indexOf(R);m(iD({layout:$,panelConstraints:P,panelId:R.id,panelIndex:H}))}});return()=>{Z(),X(),U()}}},[k,d,M,f]),N.useEffect(()=>{O(d,{disabled:n,disableDoubleClick:i})},[n,i,d,O]);let j;n&&!C&&(j="not-allowed");let F;return n?F="disabled":g==="active"?F="active":x?F="focus":F=g,T.jsx("div",{...c,"aria-controls":p.valueControls,"aria-disabled":n||void 0,"aria-orientation":z,"aria-valuemax":p.valueMax,"aria-valuemin":p.valueMin,"aria-valuenow":p.valueNow,children:e,className:t,"data-separator":F,"data-testid":d,id:d,onBlur:()=>S(!1),onFocus:()=>S(!0),ref:_,role:"separator",style:{flexBasis:"auto",cursor:j,...l,flexGrow:0,flexShrink:0,touchAction:"none"},tabIndex:n?void 0:0})}Ww.displayName="Separator";function Yw(e){switch(e.kind){case"review":return"api/review.json";case"agent-md":return rD(e);case"hunks":return`api/hunks/${encodeURIComponent(e.group)}.json`;case"file":return`api/files/${e.side}/${cc(e.path)}.json`;case"blame":return`api/blame/${e.side}/${cc(e.path)}.json`;case"image":return`api/images/${e.side}/${cc(e.path)}`;case"patch":return`api/patches/${cc(e.path)}.json`}}function cc(e){return e.split("/").map(encodeURIComponent).join("/")}function rD(e){return e.target==="overview"?"api/agent/overview.md":`api/agent/groups/${encodeURIComponent(e.group)}.md`}function ld(e){return new URL(Yw(e),new URL("./",document.baseURI)).href}async function Nl(e){const t=new URL(Yw(e),new URL("./",document.baseURI)).href,n=await fetch(t),i=await n.text();if(!n.ok){let o=i;try{const s=JSON.parse(i);s.error!==void 0&&(o=s.error)}catch{}throw new Error(o)}return JSON.parse(i)}function oD(){return Nl({kind:"review"})}function aD(e){return Nl({kind:"hunks",group:e})}function sD(e){return Nl({kind:"patch",path:e})}function Xw(e,t){return Nl({kind:"file",path:e,side:t})}function lD(e,t){return Nl({kind:"blame",path:e,side:t})}function uD(e){return e.slice(0,7)}function Kw(e,t){return e.findIndex(n=>n.id===t)+1}function dl(e){return String(e).padStart(2,"0")}function Qw(e){return e.replace("-"," ")}const Zw=180,Mo={review:"Reading the review.",group:"Reading git.",file:"Reading this file.",blame:"Reading blame.",lockfile:"Reading the lockfile."};function cD(e,t,n=Zw){return e&&t>=n}var dD=Object.defineProperty,ry=(e,t)=>dD(e,"name",{value:t,configurable:!0});function Um(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}ry(Um,"setRef");function Jw(...e){return t=>{let n=!1;const i=e.map(o=>{const s=Um(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<i.length;o++){const s=i[o];typeof s=="function"?s():Um(e[o],null)}}}}ry(Jw,"composeRefs");function Vo(...e){return N.useCallback(Jw(...e),e)}ry(Vo,"useComposedRefs");var fD=Object.defineProperty,ti=(e,t)=>fD(e,"name",{value:t,configurable:!0});function oy(e){const t=N.forwardRef((n,i)=>{let{children:o,...s}=n,l=null,c=!1;const d=[];Vm(o)&&typeof dc=="function"&&(o=dc(o._payload)),N.Children.forEach(o,g=>{if(o1(g)){c=!0;const v=g;let x="child"in v.props?v.props.child:v.props.children;Vm(x)&&typeof dc=="function"&&(x=dc(x._payload)),l=hD(v,x),d.push(l?.props?.children)}else d.push(g)}),l?l=N.cloneElement(l,void 0,d):!c&&N.Children.count(o)===1&&N.isValidElement(o)&&(l=o);const f=l?r1(l):void 0,p=Vo(i,f);if(!l){if(o||o===0)throw new Error(c?gD(e):mD(e));return o}const m=i1(s,l.props??{});return l.type!==N.Fragment&&(m.ref=i?p:f),N.cloneElement(l,m)});return t.displayName=`${e}.Slot`,t}ti(oy,"createSlot");var e1=oy("Slot"),t1=Symbol.for("radix.slottable");function n1(e){const t=ti(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=t1,t}ti(n1,"createSlottable");var hD=ti((e,t)=>{if("child"in e.props){const n=e.props.child;return N.isValidElement(n)?N.cloneElement(n,void 0,e.props.children(n.props.children)):null}return N.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function i1(e,t){const n={...t};for(const i in t){const o=e[i],s=t[i];/^on[A-Z]/.test(i)?o&&s?n[i]=(...c)=>{const d=s(...c);return o(...c),d}:o&&(n[i]=o):i==="style"?n[i]={...o,...s}:i==="className"&&(n[i]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}ti(i1,"mergeProps");function r1(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}ti(r1,"getElementRef");function o1(e){return N.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===t1}ti(o1,"isSlottable");var pD=Symbol.for("react.lazy");function Vm(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===pD&&"_payload"in e&&a1(e._payload)}ti(Vm,"isLazyComponent");function a1(e){return typeof e=="object"&&e!==null&&"then"in e}ti(a1,"isPromiseLike");var mD=ti(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),gD=ti(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),dc=Il[" use ".trim().toString()];function s1(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=s1(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function l1(){for(var e,t,n=0,i="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=s1(e))&&(i&&(i+=" "),i+=t);return i}const CS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,wS=l1,u1=(e,t)=>n=>{var i;if(t?.variants==null)return wS(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,l=Object.keys(o).map(f=>{const p=n?.[f],m=s?.[f];if(p===null)return null;const g=CS(p)||CS(m);return o[f][g]}),c=n&&Object.entries(n).reduce((f,p)=>{let[m,g]=p;return g===void 0||(f[m]=g),f},{}),d=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((f,p)=>{let{class:m,className:g,...v}=p;return Object.entries(v).every(x=>{let[S,w]=x;return Array.isArray(w)?w.includes({...s,...c}[S]):{...s,...c}[S]===w})?[...f,m,g]:f},[]);return wS(e,l,d,n?.class,n?.className)},yD=(e,t)=>{const n=new Array(e.length+t.length);for(let i=0;i<e.length;i++)n[i]=e[i];for(let i=0;i<t.length;i++)n[e.length+i]=t[i];return n},vD=(e,t)=>({classGroupId:e,validator:t}),c1=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ud="-",ES=[],bD="arbitrary..",xD=e=>{const t=_D(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return SD(l);const c=l.split(ud),d=c[0]===""&&c.length>1?1:0;return d1(c,d,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const d=i[l],f=n[l];return d?f?yD(f,d):d:f||ES}return n[l]||ES}}},d1=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const f=d1(e,t+1,s);if(f)return f}const l=n.validators;if(l===null)return;const c=t===0?e.join(ud):e.slice(t).join(ud),d=l.length;for(let f=0;f<d;f++){const p=l[f];if(p.validator(c))return p.classGroupId}},SD=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),i=t.slice(0,n);return i?bD+i:void 0})(),_D=e=>{const{theme:t,classGroups:n}=e;return CD(n,t)},CD=(e,t)=>{const n=c1();for(const i in e){const o=e[i];ay(o,n,i,t)}return n},ay=(e,t,n,i)=>{const o=e.length;for(let s=0;s<o;s++){const l=e[s];wD(l,t,n,i)}},wD=(e,t,n,i)=>{if(typeof e=="string"){ED(e,t,n);return}if(typeof e=="function"){kD(e,t,n,i);return}TD(e,t,n,i)},ED=(e,t,n)=>{const i=e===""?t:f1(t,e);i.classGroupId=n},kD=(e,t,n,i)=>{if(AD(e)){ay(e(i),t,n,i);return}t.validators===null&&(t.validators=[]),t.validators.push(vD(n,e))},TD=(e,t,n,i)=>{const o=Object.entries(e),s=o.length;for(let l=0;l<s;l++){const[c,d]=o[l];ay(d,f1(t,c),n,i)}},f1=(e,t)=>{let n=e;const i=t.split(ud),o=i.length;for(let s=0;s<o;s++){const l=i[s];let c=n.nextPart.get(l);c||(c=c1(),n.nextPart.set(l,c)),n=c}return n},AD=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,LD=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),i=Object.create(null);const o=(s,l)=>{n[s]=l,t++,t>e&&(t=0,i=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=i[s])!==void 0)return o(s,l),l},set(s,l){s in n?n[s]=l:o(s,l)}}},Fm="!",kS=":",RD=[],TS=(e,t,n,i,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:i,isExternal:o}),OD=e=>{const{prefix:t,experimentalParseClassName:n}=e;let i=o=>{const s=[];let l=0,c=0,d=0,f;const p=o.length;for(let S=0;S<p;S++){const w=o[S];if(l===0&&c===0){if(w===kS){s.push(o.slice(d,S)),d=S+1;continue}if(w==="/"){f=S;continue}}w==="["?l++:w==="]"?l--:w==="("?c++:w===")"&&c--}const m=s.length===0?o:o.slice(d);let g=m,v=!1;m.endsWith(Fm)?(g=m.slice(0,-1),v=!0):m.startsWith(Fm)&&(g=m.slice(1),v=!0);const x=f&&f>d?f-d:void 0;return TS(s,v,g,x)};if(t){const o=t+kS,s=i;i=l=>l.startsWith(o)?s(l.slice(o.length)):TS(RD,!1,l,void 0,!0)}if(n){const o=i;i=s=>n({className:s,parseClassName:o})}return i},DD=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,i)=>{t.set(n,1e6+i)}),n=>{const i=[];let o=[];for(let s=0;s<n.length;s++){const l=n[s],c=l[0]==="[",d=t.has(l);c||d?(o.length>0&&(o.sort(),i.push(...o),o=[]),i.push(l)):o.push(l)}return o.length>0&&(o.sort(),i.push(...o)),i}},MD=e=>({cache:LD(e.cacheSize),parseClassName:OD(e),sortModifiers:DD(e),postfixLookupClassGroupIds:ID(e),...xD(e)}),ID=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let i=0;i<n.length;i++)t[n[i]]=!0;return t},ND=/\s+/,zD=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:s,postfixLookupClassGroupIds:l}=t,c=[],d=e.trim().split(ND);let f="";for(let p=d.length-1;p>=0;p-=1){const m=d[p],{isExternal:g,modifiers:v,hasImportantModifier:x,baseClassName:S,maybePostfixModifierPosition:w}=n(m);if(g){f=m+(f.length>0?" "+f:f);continue}let _=!!w,C;if(_){const z=S.substring(0,w);C=i(z);const j=C&&l[C]?i(S):void 0;j&&j!==C&&(C=j,_=!1)}else C=i(S);if(!C){if(!_){f=m+(f.length>0?" "+f:f);continue}if(C=i(S),!C){f=m+(f.length>0?" "+f:f);continue}_=!1}const k=v.length===0?"":v.length===1?v[0]:s(v).join(":"),D=x?k+Fm:k,M=D+C;if(c.indexOf(M)>-1)continue;c.push(M);const O=o(C,_);for(let z=0;z<O.length;++z){const j=O[z];c.push(D+j)}f=m+(f.length>0?" "+f:f)}return f},PD=(...e)=>{let t=0,n,i,o="";for(;t<e.length;)(n=e[t++])&&(i=h1(n))&&(o&&(o+=" "),o+=i);return o},h1=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=h1(e[i]))&&(n&&(n+=" "),n+=t);return n},HD=(e,...t)=>{let n,i,o,s;const l=d=>{const f=t.reduce((p,m)=>m(p),e());return n=MD(f),i=n.cache.get,o=n.cache.set,s=c,c(d)},c=d=>{const f=i(d);if(f)return f;const p=zD(d,n);return o(d,p),p};return s=l,(...d)=>s(PD(...d))},jD=[],Ct=e=>{const t=n=>n[e]||jD;return t.isThemeGetter=!0,t},p1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,m1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,BD=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,UD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,VD=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,FD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,GD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$D=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ir=e=>BD.test(e),Re=e=>!!e&&!Number.isNaN(Number(e)),si=e=>!!e&&Number.isInteger(Number(e)),Pp=e=>e.endsWith("%")&&Re(e.slice(0,-1)),Gi=e=>UD.test(e),g1=()=>!0,qD=e=>VD.test(e)&&!FD.test(e),sy=()=>!1,WD=e=>GD.test(e),YD=e=>$D.test(e),XD=e=>!me(e)&&!ge(e),KD=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),QD=e=>qr(e,b1,sy),me=e=>p1.test(e),mo=e=>qr(e,x1,qD),AS=e=>qr(e,oM,Re),ZD=e=>qr(e,_1,g1),JD=e=>qr(e,S1,sy),LS=e=>qr(e,y1,sy),eM=e=>qr(e,v1,YD),fc=e=>qr(e,C1,WD),ge=e=>m1.test(e),Qs=e=>Fo(e,x1),tM=e=>Fo(e,S1),RS=e=>Fo(e,y1),nM=e=>Fo(e,b1),iM=e=>Fo(e,v1),hc=e=>Fo(e,C1,!0),rM=e=>Fo(e,_1,!0),qr=(e,t,n)=>{const i=p1.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},Fo=(e,t,n=!1)=>{const i=m1.exec(e);return i?i[1]?t(i[1]):n:!1},y1=e=>e==="position"||e==="percentage",v1=e=>e==="image"||e==="url",b1=e=>e==="length"||e==="size"||e==="bg-size",x1=e=>e==="length",oM=e=>e==="number",S1=e=>e==="family-name",_1=e=>e==="number"||e==="weight",C1=e=>e==="shadow",aM=()=>{const e=Ct("color"),t=Ct("font"),n=Ct("text"),i=Ct("font-weight"),o=Ct("tracking"),s=Ct("leading"),l=Ct("breakpoint"),c=Ct("container"),d=Ct("spacing"),f=Ct("radius"),p=Ct("shadow"),m=Ct("inset-shadow"),g=Ct("text-shadow"),v=Ct("drop-shadow"),x=Ct("blur"),S=Ct("perspective"),w=Ct("aspect"),_=Ct("ease"),C=Ct("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...D(),ge,me],O=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],j=()=>[ge,me,d],F=()=>[Ir,"full","auto",...j()],ee=()=>[si,"none","subgrid",ge,me],q=()=>["auto",{span:["full",si,ge,me]},si,ge,me],U=()=>[si,"auto",ge,me],Z=()=>["auto","min","max","fr",ge,me],X=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...j()],$=()=>[Ir,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],ne=()=>[Ir,"screen","full","dvw","lvw","svw","min","max","fit",...j()],ue=()=>[Ir,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],R=()=>[e,ge,me],H=()=>[...D(),RS,LS,{position:[ge,me]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],I=()=>["auto","cover","contain",nM,QD,{size:[ge,me]}],le=()=>[Pp,Qs,mo],fe=()=>["","none","full",f,ge,me],re=()=>["",Re,Qs,mo],ce=()=>["solid","dashed","dotted","double"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>[Re,Pp,RS,LS],ze=()=>["","none",x,ge,me],He=()=>["none",Re,ge,me],st=()=>["none",Re,ge,me],je=()=>[Re,ge,me],Ve=()=>[Ir,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gi],breakpoint:[Gi],color:[g1],container:[Gi],"drop-shadow":[Gi],ease:["in","out","in-out"],font:[XD],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gi],shadow:[Gi],spacing:["px",Re],text:[Gi],"text-shadow":[Gi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ir,me,ge,w]}],container:["container"],"container-type":[{"@container":["","normal","size",ge,me]}],"container-named":[KD],columns:[{columns:[Re,me,ge,c]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:M()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{"inset-s":F(),start:F()}],end:[{"inset-e":F(),end:F()}],"inset-bs":[{"inset-bs":F()}],"inset-be":[{"inset-be":F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[si,"auto",ge,me]}],basis:[{basis:[Ir,"full","auto",c,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Re,Ir,"auto","initial","none",me]}],grow:[{grow:["",Re,ge,me]}],shrink:[{shrink:["",Re,ge,me]}],order:[{order:[si,"first","last","none",ge,me]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:q()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:q()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Z()}],"auto-rows":[{"auto-rows":Z()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...X(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...X()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":X()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],"inline-size":[{inline:["auto",...ne()]}],"min-inline-size":[{"min-inline":["auto",...ne()]}],"max-inline-size":[{"max-inline":["none",...ne()]}],"block-size":[{block:["auto",...ue()]}],"min-block-size":[{"min-block":["auto",...ue()]}],"max-block-size":[{"max-block":["none",...ue()]}],w:[{w:[c,"screen",...$()]}],"min-w":[{"min-w":[c,"screen","none",...$()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",n,Qs,mo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,rM,ZD]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Pp,me]}],"font-family":[{font:[tM,JD,t]}],"font-features":[{"font-features":[me]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ge,me]}],"line-clamp":[{"line-clamp":[Re,"none",ge,AS]}],leading:[{leading:[s,...j()]}],"list-image":[{"list-image":["none",ge,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[Re,"from-font","auto",ge,mo]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[Re,"auto",ge,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"tab-size":[{tab:[si,ge,me]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:I()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},si,ge,me],radial:["",ge,me],conic:[si,ge,me]},iM,eM]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-bs":[{"border-bs":re()}],"border-w-be":[{"border-be":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ce(),"hidden","none"]}],"divide-style":[{divide:[...ce(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-bs":[{"border-bs":R()}],"border-color-be":[{"border-be":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Re,ge,me]}],"outline-w":[{outline:["",Re,Qs,mo]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",p,hc,fc]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",m,hc,fc]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[Re,mo]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",g,hc,fc]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[Re,ge,me]}],"mix-blend":[{"mix-blend":[...xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":xe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Re]}],"mask-image-linear-from-pos":[{"mask-linear-from":pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":pe()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":pe()}],"mask-image-t-to-pos":[{"mask-t-to":pe()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":pe()}],"mask-image-r-to-pos":[{"mask-r-to":pe()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":pe()}],"mask-image-b-to-pos":[{"mask-b-to":pe()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":pe()}],"mask-image-l-to-pos":[{"mask-l-to":pe()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":pe()}],"mask-image-x-to-pos":[{"mask-x-to":pe()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":pe()}],"mask-image-y-to-pos":[{"mask-y-to":pe()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[ge,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":pe()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[Re]}],"mask-image-conic-from-pos":[{"mask-conic-from":pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":pe()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:I()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,me]}],filter:[{filter:["","none",ge,me]}],blur:[{blur:ze()}],brightness:[{brightness:[Re,ge,me]}],contrast:[{contrast:[Re,ge,me]}],"drop-shadow":[{"drop-shadow":["","none",v,hc,fc]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",Re,ge,me]}],"hue-rotate":[{"hue-rotate":[Re,ge,me]}],invert:[{invert:["",Re,ge,me]}],saturate:[{saturate:[Re,ge,me]}],sepia:[{sepia:["",Re,ge,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,me]}],"backdrop-blur":[{"backdrop-blur":ze()}],"backdrop-brightness":[{"backdrop-brightness":[Re,ge,me]}],"backdrop-contrast":[{"backdrop-contrast":[Re,ge,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Re,ge,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Re,ge,me]}],"backdrop-invert":[{"backdrop-invert":["",Re,ge,me]}],"backdrop-opacity":[{"backdrop-opacity":[Re,ge,me]}],"backdrop-saturate":[{"backdrop-saturate":[Re,ge,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Re,ge,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Re,"initial",ge,me]}],ease:[{ease:["linear","initial",_,ge,me]}],delay:[{delay:[Re,ge,me]}],animate:[{animate:["none",C,ge,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,ge,me]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:He()}],"rotate-x":[{"rotate-x":He()}],"rotate-y":[{"rotate-y":He()}],"rotate-z":[{"rotate-z":He()}],scale:[{scale:st()}],"scale-x":[{"scale-x":st()}],"scale-y":[{"scale-y":st()}],"scale-z":[{"scale-z":st()}],"scale-3d":["scale-3d"],skew:[{skew:je()}],"skew-x":[{"skew-x":je()}],"skew-y":[{"skew-y":je()}],transform:[{transform:[ge,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ve()}],"translate-x":[{"translate-x":Ve()}],"translate-y":[{"translate-y":Ve()}],"translate-z":[{"translate-z":Ve()}],"translate-none":["translate-none"],zoom:[{zoom:[si,ge,me]}],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":R()}],"scrollbar-track-color":[{"scrollbar-track":R()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge,me]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[Re,Qs,mo,AS]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},sM=HD(aM);function Ye(...e){return sM(l1(e))}const lM=u1("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow,opacity] duration-[var(--motion)] ease-[var(--motion-ease)] outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90",outline:"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-md px-3 text-xs has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8"}},defaultVariants:{variant:"default",size:"default"}});function Tt({className:e,variant:t="default",size:n="default",asChild:i=!1,...o}){const s=i?e1:"button";return T.jsx(s,{"data-slot":"button",className:Ye(lM({variant:t,size:n}),e),...o})}function uM(e){return`Answer the following questions by using ${e}`}function w1(e){const t=e==="overview"?{kind:"agent-md",target:"overview"}:{kind:"agent-md",target:"group",group:e.group};return uM(ld(t))}const E1=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();const cM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const dM=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase());const OS=e=>{const t=dM(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Hp={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 fM=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},hM=N.createContext({}),pM=()=>N.useContext(hM),mM=N.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:i,className:o="",children:s,iconNode:l,...c},d)=>{const{size:f=24,strokeWidth:p=2,absoluteStrokeWidth:m=!1,color:g="currentColor",className:v=""}=pM()??{},x=i??m?Number(n??p)*24/Number(t??f):n??p;return N.createElement("svg",{ref:d,...Hp,width:t??f??Hp.width,height:t??f??Hp.height,stroke:e??g,strokeWidth:x,className:E1("lucide",v,o),...!s&&!fM(c)&&{"aria-hidden":"true"},...c},[...l.map(([S,w])=>N.createElement(S,w)),...Array.isArray(s)?s:[s]])});const sr=(e,t)=>{const n=N.forwardRef(({className:i,...o},s)=>N.createElement(mM,{ref:s,iconNode:t,className:E1(`lucide-${cM(OS(e))}`,`lucide-${e}`,i),...o}));return n.displayName=OS(e),n};const gM=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],yM=sr("check",gM);const vM=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],bM=sr("chevron-down",vM);const xM=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],DS=sr("chevron-right",xM);const SM=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],_M=sr("file",SM);const CM=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],k1=sr("grip-vertical",CM);const wM=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],EM=sr("monitor",wM);const kM=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],TM=sr("moon",kM);const AM=[["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"}]],LM=sr("sparkle",AM);const RM=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],OM=sr("sun",RM);var DM=Object.defineProperty,Ka=(e,t)=>DM(e,"name",{value:t,configurable:!0}),T1=!!(typeof window<"u"&&window.document&&window.document.createElement);function hi(e,t,{checkForDefaultPrevented:n=!0}={}){return Ka(function(o){if(e?.(o),n===!1||!o||!o.defaultPrevented)return t?.(o)},"handleEvent")}Ka(hi,"composeEventHandlers");function MM(e){if(!T1)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}Ka(MM,"getOwnerWindow");function Gm(e){if(!T1)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}Ka(Gm,"getOwnerDocument");function A1(e,t=!1){const{activeElement:n}=Gm(e);if(!n?.nodeName)return null;if(L1(n)&&n.contentDocument)return A1(n.contentDocument.body,t);if(t){const i=n.getAttribute("aria-activedescendant");if(i){const o=Gm(n).getElementById(i);if(o)return o}}return n}Ka(A1,"getActiveElement");function L1(e){return e.tagName==="IFRAME"}Ka(L1,"isFrame");var IM=Object.defineProperty,jn=(e,t)=>IM(e,"name",{value:t,configurable:!0});function NM(e,t){const n=N.createContext(t);n.displayName=e+"Context";const i=jn(s=>{const{children:l,...c}=s,d=N.useMemo(()=>c,Object.values(c));return T.jsx(n.Provider,{value:d,children:l})},"Provider");i.displayName=e+"Provider";function o(s,l={}){const{optional:c=!1}=l,d=N.useContext(n);if(d)return d;if(t!==void 0)return t;if(!c)throw new Error(`\`${s}\` must be used within \`${e}\``)}return jn(o,"useContext"),[i,o]}jn(NM,"createContext");function ly(e,t=[]){let n=[];function i(s,l){const c=N.createContext(l);c.displayName=s+"Context";const d=n.length;n=[...n,l];const f=jn(m=>{const{scope:g,children:v,...x}=m,S=g?.[e]?.[d]||c,w=N.useMemo(()=>x,Object.values(x));return T.jsx(S.Provider,{value:w,children:v})},"Provider");f.displayName=s+"Provider";function p(m,g,v={}){const{optional:x=!1}=v,S=g?.[e]?.[d]||c,w=N.useContext(S);if(w)return w;if(l!==void 0)return l;if(!x)throw new Error(`\`${m}\` must be used within \`${s}\``)}return jn(p,"useContext"),[f,p]}jn(i,"createContext");const o=jn(()=>{const s=n.map(l=>N.createContext(l));return jn(function(c){const d=c?.[e]||s;return N.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])},"useScope")},"createScope");return o.scopeName=e,[i,R1(o,...t)]}jn(ly,"createContextScope");function R1(...e){const t=e[0];if(e.length===1)return t;const n=jn(()=>{const i=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return jn(function(s){const l=i.reduce((c,{useScope:d,scopeName:f})=>{const m=d(s)[`__scope${f}`];return{...c,...m}},{});return N.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}jn(R1,"composeContextScopes");var Ud=Lw(),zM=Object.defineProperty,PM=(e,t)=>zM(e,"name",{value:t,configurable:!0}),HM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Go=HM.reduce((e,t)=>{const n=oy(`Primitive.${t}`),i=N.forwardRef((o,s)=>{const{asChild:l,...c}=o,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(d,{...c,ref:s})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function O1(e,t){e&&Ud.flushSync(()=>e.dispatchEvent(t))}PM(O1,"dispatchDiscreteCustomEvent");var jM=Object.defineProperty,BM=(e,t)=>jM(e,"name",{value:t,configurable:!0});function zl(e){const t=N.useRef(e);return N.useEffect(()=>{t.current=e}),N.useMemo(()=>((...n)=>t.current?.(...n)),[])}BM(zl,"useCallbackRef");var UM=Object.defineProperty,Dt=(e,t)=>UM(e,"name",{value:t,configurable:!0}),$m="dismissableLayer.update",VM="dismissableLayer.pointerDownOutside",FM="dismissableLayer.focusOutside",MS,D1=N.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),GM=N.forwardRef(Dt(function(t,n){const{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,onDismiss:f,...p}=t,m=N.useContext(D1),[g,v]=N.useState(null),x=g?.ownerDocument??globalThis?.document,[,S]=N.useState({}),w=Vo(n,v),_=Array.from(m.layers),[C]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),k=C?_.indexOf(C):-1,D=g?_.indexOf(g):-1,M=m.layersWithOutsidePointerEventsDisabled.size>0,O=D>=k,z=N.useRef(!1),j=M1(U=>{l?.(U),d?.(U),U.defaultPrevented||f?.()},{ownerDocument:x,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:z,dismissableSurfaces:m.dismissableSurfaces,shouldHandlePointerDownOutside:N.useCallback(U=>{if(!(U instanceof Node))return!1;const Z=[...m.branches].some(X=>X.contains(U));return O&&!Z},[m.branches,O])}),F=I1(U=>{if(o&&z.current)return;const Z=U.target;[...m.branches].some(W=>W.contains(Z))||(c?.(U),d?.(U),U.defaultPrevented||f?.())},x),ee=g?D===_.length-1:!1,q=zl(U=>{U.key==="Escape"&&(s?.(U),!U.defaultPrevented&&f&&(U.preventDefault(),f()))});return N.useEffect(()=>{if(ee)return x.addEventListener("keydown",q,{capture:!0}),()=>x.removeEventListener("keydown",q,{capture:!0})},[x,ee,q]),N.useEffect(()=>{if(g)return i&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(MS=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),qm(),()=>{i&&(m.layersWithOutsidePointerEventsDisabled.delete(g),m.layersWithOutsidePointerEventsDisabled.size===0&&(x.body.style.pointerEvents=MS))}},[g,x,i,m]),N.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),qm())},[g,m]),N.useEffect(()=>{const U=Dt(()=>S({}),"handleUpdate");return document.addEventListener($m,U),()=>document.removeEventListener($m,U)},[]),T.jsx(Go.div,{...p,ref:w,style:{pointerEvents:M?O?"auto":"none":void 0,...t.style},onFocusCapture:hi(t.onFocusCapture,F.onFocusCapture),onBlurCapture:hi(t.onBlurCapture,F.onBlurCapture),onPointerDownCapture:hi(t.onPointerDownCapture,j.onPointerDownCapture)})},"DismissableLayer"));function $M(){const e=N.useContext(D1),[t,n]=N.useState(null);return N.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Dt($M,"useDismissableLayerSurface");var qM=Dt(()=>!0,"IS_TRUE");function M1(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:s,shouldHandlePointerDownOutside:l=qM}=t,c=zl(e),d=N.useRef(!1),f=N.useRef(!1),p=N.useRef(new Map),m=N.useRef(()=>{});return N.useEffect(()=>{function g(){f.current=!1,o.current=!1,p.current.clear()}Dt(g,"resetOutsideInteraction");function v(){return Array.from(p.current.values()).some(Boolean)}Dt(v,"isOutsideInteractionIntercepted");function x(k){if(!f.current)return;const D=k.target;D instanceof Node&&[...s].some(O=>O.contains(D))||p.current.set(k.type,!0),k.type==="click"&&window.setTimeout(()=>{f.current&&m.current()},0)}Dt(x,"handleInteractionCapture");function S(k){f.current&&p.current.set(k.type,!1)}Dt(S,"handleInteractionBubble");const w=Dt(k=>{if(k.target&&!d.current){let D=function(){n.removeEventListener("click",m.current);const O=v();g(),O||uy(VM,c,M,{discrete:!0})};if(Dt(D,"handleAndDispatchPointerDownOutsideEvent"),!l(k.target)){n.removeEventListener("click",m.current),g(),d.current=!1;return}const M={originalEvent:k};f.current=!0,o.current=i&&k.button===0,p.current.clear(),!i||k.button!==0?D():(n.removeEventListener("click",m.current),m.current=D,n.addEventListener("click",m.current,{once:!0}))}else n.removeEventListener("click",m.current),g();d.current=!1},"handlePointerDown"),_=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const k of _)n.addEventListener(k,x,!0),n.addEventListener(k,S);const C=window.setTimeout(()=>{n.addEventListener("pointerdown",w)},0);return()=>{window.clearTimeout(C),n.removeEventListener("pointerdown",w),n.removeEventListener("click",m.current);for(const k of _)n.removeEventListener(k,x,!0),n.removeEventListener(k,S)}},[n,c,i,o,s,l]),{onPointerDownCapture:Dt(()=>d.current=!0,"onPointerDownCapture")}}Dt(M1,"usePointerDownOutside");function I1(e,t=globalThis?.document){const n=zl(e),i=N.useRef(!1);return N.useEffect(()=>{const o=Dt(s=>{s.target&&!i.current&&uy(FM,n,{originalEvent:s},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:Dt(()=>i.current=!0,"onFocusCapture"),onBlurCapture:Dt(()=>i.current=!1,"onBlurCapture")}}Dt(I1,"useFocusOutside");function qm(){const e=new CustomEvent($m);document.dispatchEvent(e)}Dt(qm,"dispatchUpdate");function uy(e,t,n,{discrete:i}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),i?O1(o,s):o.dispatchEvent(s)}Dt(uy,"handleAndDispatchCustomEvent");var Qn=globalThis?.document?N.useLayoutEffect:()=>{},WM=Object.defineProperty,YM=(e,t)=>WM(e,"name",{value:t,configurable:!0}),XM=Il[" useId ".trim().toString()]||(()=>{}),KM=0;function N1(e){const[t,n]=N.useState(XM());return Qn(()=>{e||n(i=>i??String(KM++))},[e]),e||(t?`radix-${t}`:"")}YM(N1,"useId");const QM=["top","right","bottom","left"],Gr=Math.min,Ji=Math.max,cd=Math.round,pc=Math.floor,er=e=>({x:e,y:e}),ZM={left:"right",right:"left",bottom:"top",top:"bottom"};function z1(e,t,n){return Ji(e,Gr(t,n))}function nr(e,t){return typeof e=="function"?e(t):e}function $r(e){return e.split("-")[0]}function Qa(e){return e.split("-")[1]}function cy(e){return e==="x"?"y":"x"}function dy(e){return e==="y"?"height":"width"}function bi(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function fy(e){return cy(bi(e))}function JM(e,t,n){n===void 0&&(n=!1);const i=Qa(e),o=fy(e),s=dy(o);let l=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=dd(l)),[l,dd(l)]}function e2(e){const t=dd(e);return[Wm(e),t,Wm(t)]}function Wm(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const IS=["left","right"],NS=["right","left"],t2=["top","bottom"],n2=["bottom","top"];function i2(e,t,n){switch(e){case"top":case"bottom":return n?t?NS:IS:t?IS:NS;case"left":case"right":return t?t2:n2;default:return[]}}function r2(e,t,n,i){const o=Qa(e);let s=i2($r(e),n==="start",i);return o&&(s=s.map(l=>l+"-"+o),t&&(s=s.concat(s.map(Wm)))),s}function dd(e){const t=$r(e);return ZM[t]+e.slice(t.length)}function o2(e){var t,n,i,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(i=e.bottom)!=null?i:0,left:(o=e.left)!=null?o:0}}function P1(e){return typeof e!="number"?o2(e):{top:e,right:e,bottom:e,left:e}}function fd(e){const{x:t,y:n,width:i,height:o}=e;return{width:i,height:o,top:n,left:t,right:t+i,bottom:n+o,x:t,y:n}}function zS(e,t,n){let{reference:i,floating:o}=e;const s=bi(t),l=fy(t),c=dy(l),d=$r(t),f=s==="y",p=i.x+i.width/2-o.width/2,m=i.y+i.height/2-o.height/2,g=i[c]/2-o[c]/2;let v;switch(d){case"top":v={x:p,y:i.y-o.height};break;case"bottom":v={x:p,y:i.y+i.height};break;case"right":v={x:i.x+i.width,y:m};break;case"left":v={x:i.x-o.width,y:m};break;default:v={x:i.x,y:i.y}}const x=Qa(t);return x&&(v[l]+=g*(x==="end"?1:-1)*(n&&f?-1:1)),v}async function a2(e,t){var n;t===void 0&&(t={});const{x:i,y:o,platform:s,rects:l,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:g=!1,padding:v=0}=nr(t,e),x=P1(v),w=c[g?m==="floating"?"reference":"floating":m],_=fd(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),C=m==="floating"?{x:i,y:o,width:l.floating.width,height:l.floating.height}:l.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),D=await(s.isElement==null?void 0:s.isElement(k))&&await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1},M=fd(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:C,offsetParent:k,strategy:d}):C);return{top:(_.top-M.top+x.top)/D.y,bottom:(M.bottom-_.bottom+x.bottom)/D.y,left:(_.left-M.left+x.left)/D.x,right:(M.right-_.right+x.right)/D.x}}const s2=50,l2=async(e,t,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:a2},d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:m}=zS(f,i,d),g=i,v=0;const x={};for(let S=0;S<s.length;S++){const w=s[S];if(!w)continue;const{name:_,fn:C}=w,{x:k,y:D,data:M,reset:O}=await C({x:p,y:m,initialPlacement:i,placement:g,strategy:o,middlewareData:x,rects:f,platform:c,elements:{reference:e,floating:t}});p=k??p,m=D??m,x[_]={...x[_],...M},O&&v<s2&&(v++,typeof O=="object"&&(O.placement&&(g=O.placement),O.rects&&(f=O.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):O.rects),{x:p,y:m}=zS(f,g,d)),S=-1)}return{x:p,y:m,placement:g,strategy:o,middlewareData:x}},u2=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:o,rects:s,platform:l,elements:c,middlewareData:d}=t,{element:f,padding:p=0}=nr(e,t)||{};if(f==null)return{};const m=P1(p),g={x:n,y:i},v=fy(o),x=dy(v),S=await l.getDimensions(f),w=v==="y",_=w?"top":"left",C=w?"bottom":"right",k=w?"clientHeight":"clientWidth",D=s.reference[x]+s.reference[v]-g[v]-s.floating[x],M=g[v]-s.reference[v],O=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let z=O?O[k]:0;(!z||!await(l.isElement==null?void 0:l.isElement(O)))&&(z=c.floating[k]||s.floating[x]);const j=D/2-M/2,F=z/2-S[x]/2-1,ee=Gr(m[_],F),q=Gr(m[C],F),U=z-S[x]-q,Z=z/2-S[x]/2+j,X=z1(ee,Z,U),W=!d.arrow&&Qa(o)!=null&&Z!==X&&s.reference[x]/2-(Z<ee?ee:q)-S[x]/2<0,P=W?Z<ee?Z-ee:Z-U:0;return{[v]:g[v]+P,data:{[v]:X,centerOffset:Z-X-P,...W&&{alignmentOffset:P}},reset:W}}}),c2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:o,middlewareData:s,rects:l,initialPlacement:c,platform:d,elements:f}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:S=!0,...w}=nr(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const _=$r(o),C=bi(c),k=$r(c)===c,D=await(d.isRTL==null?void 0:d.isRTL(f.floating)),M=g||(k||!S?[dd(c)]:e2(c)),O=x!=="none";!g&&O&&M.push(...r2(c,S,x,D));const z=[c,...M],j=await d.detectOverflow(t,w),F=[];let ee=((i=s.flip)==null?void 0:i.overflows)||[];if(p&&F.push(j[_]),m){const X=JM(o,l,D);F.push(j[X[0]],j[X[1]])}if(ee=[...ee,{placement:o,overflows:F}],!F.every(X=>X<=0)){var q,U;const X=(((q=s.flip)==null?void 0:q.index)||0)+1,W=z[X];if(W&&(!(m==="alignment"?C!==bi(W):!1)||ee.every(ne=>bi(ne.placement)===C?ne.overflows[0]>0:!0)))return{data:{index:X,overflows:ee},reset:{placement:W}};let P=(U=ee.filter($=>$.overflows[0]<=0).sort(($,ne)=>$.overflows[1]-ne.overflows[1])[0])==null?void 0:U.placement;if(!P)switch(v){case"bestFit":{var Z;const $=(Z=ee.filter(ne=>{if(O){const ue=bi(ne.placement);return ue===C||ue==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(ue=>ue>0).reduce((ue,R)=>ue+R,0)]).sort((ne,ue)=>ne[1]-ue[1])[0])==null?void 0:Z[0];$&&(P=$);break}case"initialPlacement":P=c;break}if(o!==P)return{reset:{placement:P}}}return{}}}};function PS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function HS(e){return QM.some(t=>e[t]>=0)}const d2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:i}=t,{strategy:o="referenceHidden",...s}=nr(e,t);switch(o){case"referenceHidden":{const l=await i.detectOverflow(t,{...s,elementContext:"reference"}),c=PS(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:HS(c)}}}case"escaped":{const l=await i.detectOverflow(t,{...s,altBoundary:!0}),c=PS(l,n.floating);return{data:{escapedOffsets:c,escaped:HS(c)}}}default:return{}}}}},H1=new Set(["left","top"]);async function f2(e,t){const{placement:n,platform:i,elements:o}=e,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),l=$r(n),c=Qa(n),d=bi(n)==="y",f=H1.has(l)?-1:1,p=s&&d?-1:1,m=nr(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:x}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof x=="number"&&(v=c==="end"?x*-1:x),d?{x:v*p,y:g*f}:{x:g*f,y:v*p}}const h2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:o,y:s,placement:l,middlewareData:c}=t,d=await f2(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(i=c.arrow)!=null&&i.alignmentOffset?{}:{x:o+d.x,y:s+d.y,data:{...d,placement:l}}}}},p2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:o,platform:s}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:d={fn:C=>{let{x:k,y:D}=C;return{x:k,y:D}}},...f}=nr(e,t),p={x:n,y:i},m=await s.detectOverflow(t,f),g=bi(o),v=cy(g);let x=p[v],S=p[g];const w=(C,k)=>z1(k+m[C==="y"?"top":"left"],k,k-m[C==="y"?"bottom":"right"]);l&&(x=w(v,x)),c&&(S=w(g,S));const _=d.fn({...t,[v]:x,[g]:S});return{..._,data:{x:_.x-n,y:_.y-i,enabled:{[v]:l,[g]:c}}}}}},m2=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,i;const{x:o,y:s,placement:l,rects:c,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=nr(e,t),g={x:o,y:s},v=bi(l),x=cy(v);let S=g[x],w=g[v];const _=nr(f,t),C=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:(n=_.mainAxis)!=null?n:0,crossAxis:(i=_.crossAxis)!=null?i:0};if(p){const M=x==="y"?"height":"width",O=c.reference[x]-c.floating[M]+C.mainAxis,z=c.reference[x]+c.reference[M]-C.mainAxis;S<O?S=O:S>z&&(S=z)}if(m){var k,D;const M=x==="y"?"width":"height",O=H1.has($r(l)),z=c.reference[v]-c.floating[M]+(O&&((k=d.offset)==null?void 0:k[v])||0)+(O?0:C.crossAxis),j=c.reference[v]+c.reference[M]+(O?0:((D=d.offset)==null?void 0:D[v])||0)-(O?C.crossAxis:0);w<z?w=z:w>j&&(w=j)}return{[x]:S,[v]:w}}}},g2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:i,platform:o,elements:s}=t,{apply:l=()=>{},...c}=nr(e,t),d=await o.detectOverflow(t,c),f=$r(n),p=Qa(n),m=bi(n)==="y",{width:g,height:v}=i.floating;let x,S;f==="top"||f==="bottom"?(x=f,S=p===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(S=f,x=p==="end"?"top":"bottom");const w=v-d.top-d.bottom,_=g-d.left-d.right,C=Gr(v-d[x],w),k=Gr(g-d[S],_),D=t.middlewareData.shift,M=!D;let O=C,z=k;D!=null&&D.enabled.x&&(z=_),D!=null&&D.enabled.y&&(O=w),M&&!p&&(m?z=g-2*Ji(d.left,d.right):O=v-2*Ji(d.top,d.bottom)),await l({...t,availableWidth:z,availableHeight:O});const j=await o.getDimensions(s.floating);return g!==j.width||v!==j.height?{reset:{rects:!0}}:{}}}};function Vd(){return typeof window<"u"}function Za(e){return j1(e)?(e.nodeName||"").toLowerCase():"#document"}function dn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function lr(e){var t;return(t=(j1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function j1(e){return Vd()?e instanceof Node||e instanceof dn(e).Node:!1}function Si(e){return Vd()?e instanceof Element||e instanceof dn(e).Element:!1}function Wr(e){return Vd()?e instanceof HTMLElement||e instanceof dn(e).HTMLElement:!1}function jS(e){return!Vd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof dn(e).ShadowRoot}function Fd(e){const{overflow:t,overflowX:n,overflowY:i,display:o}=_i(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&o!=="inline"&&o!=="contents"}function y2(e){return/^(table|td|th)$/.test(Za(e))}function Gd(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const v2=/transform|translate|scale|rotate|perspective|filter/,b2=/paint|layout|strict|content/,go=e=>!!e&&e!=="none";let jp;function hy(e){const t=Si(e)?_i(e):e;return go(t.transform)||go(t.translate)||go(t.scale)||go(t.rotate)||go(t.perspective)||!py()&&(go(t.backdropFilter)||go(t.filter))||v2.test(t.willChange||"")||b2.test(t.contain||"")}function x2(e){let t=Io(e);for(;Wr(t)&&!xl(t);){if(hy(t))return t;if(Gd(t))return null;t=Io(t)}return null}function py(){return jp==null&&(jp=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),jp}function xl(e){return/^(html|body|#document)$/.test(Za(e))}function _i(e){return dn(e).getComputedStyle(e)}function $d(e){return Si(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Io(e){if(Za(e)==="html")return e;const t=e.assignedSlot||e.parentNode||jS(e)&&e.host||lr(e);return jS(t)?t.host:t}function B1(e){const t=Io(e);return xl(t)?(e.ownerDocument||e).body:Wr(t)&&Fd(t)?t:B1(t)}function Sl(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=B1(e),s=o===((i=e.ownerDocument)==null?void 0:i.body),l=dn(o);if(s){const c=Ym(l);return t.concat(l,l.visualViewport||[],Fd(o)?o:[],c&&n?Sl(c):[])}else return t.concat(o,Sl(o,[],n))}function Ym(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function U1(e){const t=_i(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=Wr(e),s=o?e.offsetWidth:n,l=o?e.offsetHeight:i,c=cd(n)!==s||cd(i)!==l;return c&&(n=s,i=l),{width:n,height:i,$:c}}function my(e){return Si(e)?e:e.contextElement}function Fa(e){const t=my(e);if(!Wr(t))return er(1);const n=t.getBoundingClientRect(),{width:i,height:o,$:s}=U1(t);let l=(s?cd(n.width):n.width)/i,c=(s?cd(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const S2=er(0);function V1(e){const t=dn(e);return!py()||!t.visualViewport?S2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _2(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===dn(e)}function No(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=my(e);let l=er(1);t&&(i?Si(i)&&(l=Fa(i)):l=Fa(e));const c=_2(s,n,i)?V1(s):er(0);let d=(o.left+c.x)/l.x,f=(o.top+c.y)/l.y,p=o.width/l.x,m=o.height/l.y;if(s&&i){const g=dn(s),v=Si(i)?dn(i):i;let x=g,S=Ym(x);for(;S&&v!==x;){const w=Fa(S),_=S.getBoundingClientRect(),C=_i(S),k=_.left+(S.clientLeft+parseFloat(C.paddingLeft))*w.x,D=_.top+(S.clientTop+parseFloat(C.paddingTop))*w.y;d*=w.x,f*=w.y,p*=w.x,m*=w.y,d+=k,f+=D,x=dn(S),S=Ym(x)}}return fd({width:p,height:m,x:d,y:f})}function qd(e,t){const n=$d(e).scrollLeft;return t?t.left+n:No(lr(e)).left+n}function F1(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-qd(e,n),o=n.top+t.scrollTop;return{x:i,y:o}}function C2(e){let{elements:t,rect:n,offsetParent:i,strategy:o}=e;const s=o==="fixed",l=lr(i),c=t?Gd(t.floating):!1;if(i===l||c&&s)return n;let d={scrollLeft:0,scrollTop:0},f=er(1);const p=er(0),m=Wr(i);if((m||!s)&&((Za(i)!=="body"||Fd(l))&&(d=$d(i)),m)){const v=No(i);f=Fa(i),p.x=v.x+i.clientLeft,p.y=v.y+i.clientTop}const g=l&&!m&&!s?F1(l,d):er(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+g.x,y:n.y*f.y-d.scrollTop*f.y+p.y+g.y}}function w2(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function E2(e){const t=$d(e),n=e.ownerDocument.body,i=Ji(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=Ji(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+qd(e);const l=-t.scrollTop;return _i(n).direction==="rtl"&&(s+=Ji(e.clientWidth,n.clientWidth)-i),{width:i,height:o,x:s,y:l}}const k2=25;function T2(e,t,n){n===void 0&&(n="viewport");const i=n==="layoutViewport",o=dn(e),s=lr(e),l=o.visualViewport;let c=s.clientWidth,d=s.clientHeight,f=0,p=0;if(l){const g=!py()||t==="fixed";i?g||(f=-l.offsetLeft,p=-l.offsetTop):(c=l.width,d=l.height,g&&(f=l.offsetLeft,p=l.offsetTop))}if(qd(s)<=0){const g=s.ownerDocument,v=g.body,x=getComputedStyle(v),S=g.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,w=Math.abs(s.clientWidth-v.clientWidth-S),_=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;_<=k2&&(c-=_)}return{width:c,height:d,x:f,y:p}}function A2(e,t){const n=No(e,!0,t==="fixed"),i=n.top+e.clientTop,o=n.left+e.clientLeft,s=Fa(e),l=e.clientWidth*s.x,c=e.clientHeight*s.y,d=o*s.x,f=i*s.y;return{width:l,height:c,x:d,y:f}}function BS(e,t,n){let i;if(t==="viewport"||t==="layoutViewport")i=T2(e,n,t);else if(t==="document")i=E2(lr(e));else if(Si(t))i=A2(t,n);else{const o=V1(e);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return fd(i)}function L2(e,t){const n=t.get(e);if(n)return n;let i=Sl(e,[],!1).filter(c=>Si(c)&&Za(c)!=="body"),o=null;const s=_i(e).position==="fixed";let l=s?Io(e):e;for(;Si(l)&&!xl(l);){const c=_i(l),d=hy(l),f=o?o.position:s?"fixed":"";!d&&(f==="fixed"||f==="absolute"&&c.position==="static")?i=i.filter(m=>m!==l):o=c,l=Io(l)}return t.set(e,i),i}function R2(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e;const l=[...n==="clippingAncestors"?Gd(t)?[]:L2(t,this._c):[].concat(n),i],c=BS(t,l[0],o);let d=c.top,f=c.right,p=c.bottom,m=c.left;for(let g=1;g<l.length;g++){const v=BS(t,l[g],o);d=Ji(v.top,d),f=Gr(v.right,f),p=Gr(v.bottom,p),m=Ji(v.left,m)}return{width:f-m,height:p-d,x:m,y:d}}function O2(e){const{width:t,height:n}=U1(e);return{width:t,height:n}}function D2(e,t,n){const i=Wr(t),o=lr(t),s=n==="fixed",l=No(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const d=er(0);if((i||!s)&&((Za(t)!=="body"||Fd(o))&&(c=$d(t)),i)){const g=No(t,!0,s,t);d.x=g.x+t.clientLeft,d.y=g.y+t.clientTop}!i&&o&&(d.x=qd(o));const f=o&&!i&&!s?F1(o,c):er(0),p=l.left+c.scrollLeft-d.x-f.x,m=l.top+c.scrollTop-d.y-f.y;return{x:p,y:m,width:l.width,height:l.height}}function Bp(e){return _i(e).position==="static"}function US(e,t){if(!Wr(e)||_i(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return lr(e)===n&&(n=n.ownerDocument.body),n}function G1(e,t){const n=dn(e);if(Gd(e))return n;if(!Wr(e)){let o=Io(e);for(;o&&!xl(o);){if(Si(o)&&!Bp(o))return o;o=Io(o)}return n}let i=US(e,t);for(;i&&y2(i)&&Bp(i);)i=US(i,t);return i&&xl(i)&&Bp(i)&&!hy(i)?n:i||x2(e)||n}const M2=async function(e){const t=this.getOffsetParent||G1,n=this.getDimensions,i=await n(e.floating);return{reference:D2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function I2(e){return _i(e).direction==="rtl"}const N2={convertOffsetParentRelativeRectToViewportRelativeRect:C2,getDocumentElement:lr,getClippingRect:R2,getOffsetParent:G1,getElementRects:M2,getClientRects:w2,getDimensions:O2,getScale:Fa,isElement:Si,isRTL:I2};function $1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function z2(e,t,n){let i=null,o;const s=lr(e);function l(){var p;clearTimeout(o),(p=i)==null||p.disconnect(),i=null}function c(p,m){p===void 0&&(p=!1),m===void 0&&(m=1),l();const g=e.getBoundingClientRect(),{left:v,top:x,width:S,height:w}=g;if(p||t(),!S||!w)return;const _=pc(x),C=pc(s.clientWidth-(v+S)),k=pc(s.clientHeight-(x+w)),D=pc(v),O={rootMargin:-_+"px "+-C+"px "+-k+"px "+-D+"px",threshold:Ji(0,Gr(1,m))||1};let z=!0;function j(F){const ee=F[0].intersectionRatio;if(!$1(g,e.getBoundingClientRect()))return c();if(ee!==m){if(!z)return c();ee?c(!1,ee):o=setTimeout(()=>{c(!1,1e-7)},1e3)}z=!1}try{i=new IntersectionObserver(j,{...O,root:s.ownerDocument})}catch{i=new IntersectionObserver(j,O)}i.observe(e)}const d=dn(e),f=()=>c(n);return d.addEventListener("resize",f),c(!0),()=>{d.removeEventListener("resize",f),l()}}function P2(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,f=my(e),p=o||s?[...f?Sl(f):[],...t?Sl(t):[]]:[];p.forEach(_=>{o&&_.addEventListener("scroll",n),s&&_.addEventListener("resize",n)});const m=f&&c?z2(f,n,s):null;let g=-1,v=null;l&&(v=new ResizeObserver(_=>{let[C]=_;C&&C.target===f&&v&&t&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var k;(k=v)==null||k.observe(t)})),n()}),f&&!d&&v.observe(f),t&&v.observe(t));let x,S=d?No(e):null;d&&w();function w(){const _=No(e);S&&!$1(S,_)&&n(),S=_,x=requestAnimationFrame(w)}return n(),()=>{var _;p.forEach(C=>{o&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),m?.(),(_=v)==null||_.disconnect(),v=null,d&&cancelAnimationFrame(x)}}const H2=h2,j2=p2,B2=c2,U2=g2,V2=d2,VS=u2,F2=m2,G2=(e,t,n)=>{const i=new Map,o=n??{},s={...N2,...o.platform,_c:i};return l2(e,t,{...o,platform:s})};var $2=typeof document<"u",q2=function(){},Xc=$2?N.useLayoutEffect:q2;function hd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!hd(e[i],t[i]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,o[i]))return!1;for(i=n;i--!==0;){const s=o[i];if(!(s==="_owner"&&e.$$typeof)&&!hd(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function q1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function FS(e,t){const n=q1(e);return Math.round(t*n)/n}function Up(e){const t=N.useRef(e);return Xc(()=>{t.current=e}),t}function W2(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:o,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:d,open:f}=e,[p,m]=N.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=N.useState(i);hd(g,i)||v(i);const[x,S]=N.useState(null),[w,_]=N.useState(null),C=N.useCallback(ne=>{ne!==O.current&&(O.current=ne,S(ne))},[]),k=N.useCallback(ne=>{ne!==z.current&&(z.current=ne,_(ne))},[]),D=s||x,M=l||w,O=N.useRef(null),z=N.useRef(null),j=N.useRef(p),F=d!=null,ee=Up(d),q=Up(o),U=Up(f),Z=N.useCallback(()=>{if(!O.current||!z.current)return;const ne={placement:t,strategy:n,middleware:g};q.current&&(ne.platform=q.current),G2(O.current,z.current,ne).then(ue=>{const R={...ue,isPositioned:U.current!==!1};X.current&&!hd(j.current,R)&&(j.current=R,Ud.flushSync(()=>{m(R)}))})},[g,t,n,q,U]);Xc(()=>{f===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,m(ne=>({...ne,isPositioned:!1})))},[f]);const X=N.useRef(!1);Xc(()=>(X.current=!0,()=>{X.current=!1}),[]),Xc(()=>{if(D&&(O.current=D),M&&(z.current=M),D&&M){if(ee.current)return ee.current(D,M,Z);Z()}},[D,M,Z,ee,F]);const W=N.useMemo(()=>({reference:O,floating:z,setReference:C,setFloating:k}),[C,k]),P=N.useMemo(()=>({reference:D,floating:M}),[D,M]),$=N.useMemo(()=>{const ne={position:n,left:0,top:0};if(!P.floating)return ne;const ue=FS(P.floating,p.x),R=FS(P.floating,p.y);return c?{...ne,transform:"translate("+ue+"px, "+R+"px)",...q1(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ue,top:R}},[n,c,P.floating,p.x,p.y]);return N.useMemo(()=>({...p,update:Z,refs:W,elements:P,floatingStyles:$}),[p,Z,W,P,$])}const Y2=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:o}=typeof e=="function"?e(n):e;return i&&t(i)?i.current!=null?VS({element:i.current,padding:o}).fn(n):{}:i?VS({element:i,padding:o}).fn(n):{}}}},X2=(e,t)=>{const n=H2(e);return{name:n.name,fn:n.fn,options:[e,t]}},K2=(e,t)=>{const n=j2(e);return{name:n.name,fn:n.fn,options:[e,t]}},Q2=(e,t)=>({fn:F2(e).fn,options:[e,t]}),Z2=(e,t)=>{const n=B2(e);return{name:n.name,fn:n.fn,options:[e,t]}},J2=(e,t)=>{const n=U2(e);return{name:n.name,fn:n.fn,options:[e,t]}},eI=(e,t)=>{const n=V2(e);return{name:n.name,fn:n.fn,options:[e,t]}},tI=(e,t)=>{const n=Y2(e);return{name:n.name,fn:n.fn,options:[e,t]}};var nI=Object.defineProperty,iI=(e,t)=>nI(e,"name",{value:t,configurable:!0});function W1(e){const[t,n]=N.useState(void 0);return Qn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let l,c;if("borderBoxSize"in s){const d=s.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,c=f.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else n(void 0)},[e]),t}iI(W1,"useSize");var rI=Object.defineProperty,Vr=(e,t)=>rI(e,"name",{value:t,configurable:!0}),Y1="Popper",[X1,K1]=ly(Y1),[oI,Q1]=X1(Y1),aI=Vr(e=>{const{__scopePopper:t,children:n}=e,[i,o]=N.useState(null),[s,l]=N.useState(void 0);return T.jsx(oI,{scope:t,anchor:i,onAnchorChange:o,placementState:s,setPlacementState:l,children:n})},"Popper"),sI="PopperAnchor",lI=N.forwardRef(Vr(function(t,n){const{__scopePopper:i,virtualRef:o,...s}=t,l=Q1(sI,i),c=N.useRef(null),d=l.onAnchorChange,f=N.useCallback(S=>{c.current=S,S&&d(S)},[d]),p=Vo(n,f),m=N.useRef(null);N.useEffect(()=>{if(!o)return;const S=m.current;m.current=o.current,S!==m.current&&d(m.current)});const g=l.placementState&&Wd(l.placementState),v=g?.[0],x=g?.[1];return o?null:T.jsx(Go.div,{"data-radix-popper-side":v,"data-radix-popper-align":x,...s,ref:p})},"PopperAnchor")),Z1="PopperContent",[uI,LG]=X1(Z1),cI=N.forwardRef(Vr(function(t,n){const{__scopePopper:i,side:o="bottom",sideOffset:s=0,align:l="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:p=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:v=!1,updatePositionStrategy:x="optimized",onPlaced:S,...w}=t,_=Q1(Z1,i),[C,k]=N.useState(null),D=Vo(n,k),[M,O]=N.useState(null),z=W1(M),j=z?.width??0,F=z?.height??0,ee=o+(l!=="center"?"-"+l:""),q=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},U=Array.isArray(p)?p:[p],Z=U.length>0,X={padding:q,boundary:U.filter(J1),altBoundary:Z},{refs:W,floatingStyles:P,placement:$,isPositioned:ne,middlewareData:ue}=W2({strategy:"fixed",placement:ee,whileElementsMounted:Vr((...pe)=>P2(...pe,{animationFrame:x==="always"}),"whileElementsMounted"),elements:{reference:_.anchor},middleware:[X2({mainAxis:s+F,alignmentAxis:c}),f&&K2({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?Q2():void 0,...X}),f&&Z2({...X}),J2({...X,apply:Vr(({elements:pe,rects:ze,availableWidth:He,availableHeight:st})=>{const{width:je,height:Ve}=ze.reference,rt=pe.floating.style;rt.setProperty("--radix-popper-available-width",`${He}px`),rt.setProperty("--radix-popper-available-height",`${st}px`),rt.setProperty("--radix-popper-anchor-width",`${je}px`),rt.setProperty("--radix-popper-anchor-height",`${Ve}px`)},"apply")}),M&&tI({element:M,padding:d}),dI({arrowWidth:j,arrowHeight:F}),v&&eI({strategy:"referenceHidden",...X,boundary:Z?X.boundary:void 0})]}),R=_.setPlacementState;Qn(()=>(R($),()=>{R(void 0)}),[$,R]);const[H,Y]=Wd($),I=zl(S);Qn(()=>{ne&&I?.()},[ne,I]);const le=ue.arrow?.x,fe=ue.arrow?.y,re=ue.arrow?.centerOffset!==0,[ce,xe]=N.useState();return Qn(()=>{C&&xe(window.getComputedStyle(C).zIndex)},[C]),T.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...P,transform:ne?P.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[ue.transformOrigin?.x,ue.transformOrigin?.y].join(" "),...ue.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:T.jsx(uI,{scope:i,placedSide:H,placedAlign:Y,onArrowChange:O,arrowX:le,arrowY:fe,shouldHideArrow:re,children:T.jsx(Go.div,{"data-side":H,"data-align":Y,...w,ref:D,style:{...w.style,animation:ne?w.style?.animation:"none"}})})})},"PopperContent"));function J1(e){return e!==null}Vr(J1,"isNotNull");var dI=Vr(e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:i,middlewareData:o}=t,l=o.arrow?.centerOffset!==0,c=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,p]=Wd(n),m={start:"0%",center:"50%",end:"100%"}[p],g=(o.arrow?.x??0)+c/2,v=(o.arrow?.y??0)+d/2;let x="",S="";return f==="bottom"?(x=l?m:`${g}px`,S=`${-d}px`):f==="top"?(x=l?m:`${g}px`,S=`${i.floating.height+d}px`):f==="right"?(x=`${-d}px`,S=l?m:`${v}px`):f==="left"&&(x=`${i.floating.width+d}px`,S=l?m:`${v}px`),{data:{x,y:S}}}}),"transformOrigin");function Wd(e){const[t,n="center"]=e.split("-");return[t,n]}Vr(Wd,"getSideAndAlignFromPlacement");var fI=aI,hI=lI,pI=cI,mI=Object.defineProperty,gI=(e,t)=>mI(e,"name",{value:t,configurable:!0}),yI=N.forwardRef(gI(function(t,n){const{container:i,...o}=t,[s,l]=N.useState(!1);Qn(()=>l(!0),[]);const c=i||s&&globalThis?.document?.body;return c?Ud.createPortal(T.jsx(Go.div,{...o,ref:n}),c):null},"Portal")),vI=Object.defineProperty,ir=(e,t)=>vI(e,"name",{value:t,configurable:!0});function eE(e,t){return N.useReducer((n,i)=>t[n][i]??n,e)}ir(eE,"useStateMachine");var tE=ir(e=>{const{present:t,children:n}=e,i=nE(t),o=typeof n=="function"?n({present:i.isPresent}):N.Children.only(n),s=iE(i.ref,rE(o));return typeof n=="function"||i.isPresent?N.cloneElement(o,{ref:s}):null},"Presence");function nE(e){const[t,n]=N.useState(),i=N.useRef(null),o=N.useRef(e),s=N.useRef("none"),l=N.useRef(void 0),c=e?"mounted":"unmounted",[d,f]=eE(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return N.useEffect(()=>{d==="mounted"?(s.current=l.current??Na(i.current),l.current=void 0):s.current="none"},[d]),Qn(()=>{const p=i.current,m=o.current;if(m!==e){const v=s.current,x=Na(p);e?(l.current=x,f("MOUNT")):x==="none"||p?.display==="none"?f("UNMOUNT"):f(m&&v!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),Qn(()=>{if(t){let p;const m=t.ownerDocument.defaultView??window,g=ir(x=>{const w=Na(i.current).includes(CSS.escape(x.animationName));if(x.target===t&&w&&(f("ANIMATION_END"),!o.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",p=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},"handleAnimationEnd"),v=ir(x=>{x.target===t&&(s.current=Na(i.current))},"handleAnimationStart");return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{m.clearTimeout(p),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:N.useCallback(p=>{if(p){const m=getComputedStyle(p);i.current=m,l.current=Na(m)}else i.current=null;n(p)},[])}}ir(nE,"usePresence");function Xm(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}ir(Xm,"setRef");function iE(...e){const t=N.useRef(e);return t.current=e,N.useCallback(n=>{const i=t.current;let o=!1;const s=i.map(l=>{const c=Xm(l,n);return!o&&typeof c=="function"&&(o=!0),c});if(o)return()=>{for(let l=0;l<s.length;l++){const c=s[l];typeof c=="function"?c():Xm(i[l],null)}}},[])}ir(iE,"useStableComposedRefs");function Na(e){return e?.animationName||"none"}ir(Na,"getAnimationName");function rE(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}ir(rE,"getElementRef");var bI=Object.defineProperty,xI=(e,t)=>bI(e,"name",{value:t,configurable:!0}),GS=Il[" useEffectEvent ".trim().toString()],$S=Il[" useInsertionEffect ".trim().toString()];function oE(e){if(typeof GS=="function")return GS(e);const t=N.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof $S=="function"?$S(()=>{t.current=e}):Qn(()=>{t.current=e}),N.useMemo(()=>((...n)=>t.current?.(...n)),[])}xI(oE,"useEffectEvent");var SI=Object.defineProperty,Pl=(e,t)=>SI(e,"name",{value:t,configurable:!0}),_I=Il[" useInsertionEffect ".trim().toString()]||Qn;function aE({prop:e,defaultProp:t,onChange:n=Pl(()=>{},"onChange"),caller:i}){const[o,s,l]=sE({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:o,f=N.useCallback(p=>{if(c){const m=lE(p)?p(e):p;m!==e&&l.current?.(m)}else s(p)},[c,e,s,l]);return[d,f]}Pl(aE,"useControllableState");function sE({defaultProp:e,onChange:t}){const[n,i]=N.useState(e),o=N.useRef(n),s=N.useRef(t);return _I(()=>{s.current=t},[t]),N.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,i,s]}Pl(sE,"useUncontrolledState");function lE(e){return typeof e=="function"}Pl(lE,"isFunction");var qS=Symbol("RADIX:SYNC_STATE");function CI(e,t,n,i){const{prop:o,defaultProp:s,onChange:l,caller:c}=t,d=o!==void 0,f=oE(l),p=[{...n,state:s}];i&&p.push(i);const[m,g]=N.useReducer((w,_)=>{if(_.type===qS)return{...w,state:_.state};const C=e(w,_);return d&&!Object.is(C.state,w.state)&&f(C.state),C},...p),v=m.state,x=N.useRef(v);N.useEffect(()=>{x.current!==v&&(x.current=v,d||f(v))},[v,x,d]);const S=N.useMemo(()=>o!==void 0?{...m,state:o}:m,[m,o]);return N.useEffect(()=>{d&&!Object.is(o,m.state)&&g({type:qS,state:o})},[o,m.state,d]),[S,g]}Pl(CI,"useControllableStateReducer");var wI=Object.defineProperty,EI=(e,t)=>wI(e,"name",{value:t,configurable:!0}),kI=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),TI=N.forwardRef(EI(function(t,n){return T.jsx(Go.span,{...t,ref:n,style:{...kI,...t.style}})},"VisuallyHidden")),AI=TI,LI=Object.defineProperty,It=(e,t)=>LI(e,"name",{value:t,configurable:!0}),[gy,RG]=ly("Tooltip",[K1]),yy=K1(),RI="TooltipProvider",OI=700,Km="tooltip.open",[DI,vy]=gy(RI),MI=It(e=>{const{__scopeTooltip:t,delayDuration:n=OI,skipDelayDuration:i=300,disableHoverableContent:o=!1,children:s}=e,l=N.useRef(!0),c=N.useRef(!1),d=N.useRef(0);return N.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),T.jsx(DI,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:N.useCallback(()=>{i<=0||(window.clearTimeout(d.current),l.current=!1)},[i]),onClose:N.useCallback(()=>{i<=0||(window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,i))},[i]),isPointerInTransitRef:c,onPointerInTransitChange:N.useCallback(f=>{c.current=f},[]),disableHoverableContent:o,children:s})},"TooltipProvider"),Qm="Tooltip",[II,Hl]=gy(Qm),NI=It(e=>{const{__scopeTooltip:t,children:n,open:i,defaultOpen:o,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=e,d=vy(Qm,e.__scopeTooltip),f=yy(t),[p,m]=N.useState(null),[g,v]=N.useState(void 0),x=N1(),S=N.useRef(0),w=l??d.disableHoverableContent,_=c??d.delayDuration,C=N.useRef(!1),[k,D]=aE({prop:i,defaultProp:o??!1,onChange:It(ee=>{ee?(d.onOpen(),document.dispatchEvent(new CustomEvent(Km))):d.onClose(),s?.(ee)},"onChange"),caller:Qm}),M=N.useMemo(()=>k?C.current?"delayed-open":"instant-open":"closed",[k]),O=N.useCallback(()=>{window.clearTimeout(S.current),S.current=0,C.current=!1,D(!0)},[D]),z=N.useCallback(()=>{window.clearTimeout(S.current),S.current=0,D(!1)},[D]),j=N.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{C.current=!0,D(!0),S.current=0},_)},[_,D]);N.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]);const F=g??x;return T.jsx(fI,{...f,children:T.jsx(II,{scope:t,contentId:F,setContentId:v,open:k,stateAttribute:M,trigger:p,onTriggerChange:m,onTriggerEnter:N.useCallback(()=>{d.isOpenDelayedRef.current?j():O()},[d.isOpenDelayedRef,j,O]),onTriggerLeave:N.useCallback(()=>{w?z():(window.clearTimeout(S.current),S.current=0)},[z,w]),onOpen:O,onClose:z,disableHoverableContent:w,children:n})})},"Tooltip"),WS="TooltipTrigger",zI=N.forwardRef(It(function(t,n){const{__scopeTooltip:i,...o}=t,s=Hl(WS,i),l=vy(WS,i),c=yy(i),d=N.useRef(null),f=Vo(n,d,s.onTriggerChange),p=N.useRef(!1),m=N.useRef(!1),g=N.useCallback(()=>p.current=!1,[]);return N.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),T.jsx(hI,{asChild:!0,...c,children:T.jsx(Go.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...o,ref:f,onPointerMove:hi(t.onPointerMove,v=>{v.pointerType!=="touch"&&!m.current&&!l.isPointerInTransitRef.current&&(s.onTriggerEnter(),m.current=!0)}),onPointerLeave:hi(t.onPointerLeave,()=>{s.onTriggerLeave(),m.current=!1}),onPointerDown:hi(t.onPointerDown,()=>{s.open&&s.onClose(),p.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:hi(t.onFocus,()=>{p.current||s.onOpen()}),onBlur:hi(t.onBlur,s.onClose),onClick:hi(t.onClick,s.onClose)})})},"TooltipTrigger")),uE="TooltipPortal",[PI,HI]=gy(uE,{forceMount:void 0}),jI=It(e=>{const{__scopeTooltip:t,forceMount:n,children:i,container:o}=e,s=Hl(uE,t);return T.jsx(PI,{scope:t,forceMount:n,children:T.jsx(tE,{present:n||s.open,children:T.jsx(yI,{asChild:!0,container:o,children:i})})})},"TooltipPortal"),_l="TooltipContent",BI=N.forwardRef(It(function(t,n){const i=HI(_l,t.__scopeTooltip),{forceMount:o=i.forceMount,side:s="top",...l}=t,c=Hl(_l,t.__scopeTooltip);return T.jsx(tE,{present:o||c.open,children:c.disableHoverableContent?T.jsx(cE,{side:s,...l,ref:n}):T.jsx(UI,{side:s,...l,ref:n})})},"TooltipContent")),UI=N.forwardRef(It(function(t,n){const i=Hl(_l,t.__scopeTooltip),o=vy(_l,t.__scopeTooltip),s=N.useRef(null),l=Vo(n,s),[c,d]=N.useState(null),{trigger:f,onClose:p}=i,m=s.current,{onPointerInTransitChange:g}=o,v=N.useCallback(()=>{d(null),g(!1)},[g]),x=N.useCallback((S,w)=>{const _=S.currentTarget,C={x:S.clientX,y:S.clientY},k=dE(C,_.getBoundingClientRect()),D=fE(C,k),M=hE(w.getBoundingClientRect()),O=mE([...D,...M]);d(O),g(!0)},[g]);return N.useEffect(()=>()=>v(),[v]),N.useEffect(()=>{if(f&&m){const S=It(_=>x(_,m),"handleTriggerLeave"),w=It(_=>x(_,f),"handleContentLeave");return f.addEventListener("pointerleave",S),m.addEventListener("pointerleave",w),()=>{f.removeEventListener("pointerleave",S),m.removeEventListener("pointerleave",w)}}},[f,m,x,v]),N.useEffect(()=>{if(c){const S=It(w=>{const _=w.target,C={x:w.clientX,y:w.clientY},k=f?.contains(_)||m?.contains(_),D=!pE(C,c);k?v():D&&(v(),p())},"handleTrackPointerGrace");return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[f,m,c,p,v]),T.jsx(cE,{...t,ref:l})},"TooltipContentHoverable")),VI=n1("TooltipContent"),cE=N.forwardRef(It(function(t,n){const{__scopeTooltip:i,children:o,"aria-label":s,id:l,onEscapeKeyDown:c,onPointerDownOutside:d,...f}=t,p=Hl(_l,i),m=yy(i),{onClose:g}=p;N.useEffect(()=>(document.addEventListener(Km,g),()=>document.removeEventListener(Km,g)),[g]),N.useEffect(()=>{if(p.trigger){const x=It(S=>{S.target instanceof Node&&S.target.contains(p.trigger)&&g()},"handleScroll");return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[p.trigger,g]);const{setContentId:v}=p;return Qn(()=>(v(l),()=>{v(void 0)}),[l,v]),T.jsx(GM,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:x=>x.preventDefault(),onDismiss:g,children:T.jsxs(pI,{"data-state":p.stateAttribute,role:s?void 0:"tooltip",id:s?void 0:p.contentId,...m,...f,ref:n,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[T.jsx(VI,{children:o}),s?T.jsx(AI,{id:p.contentId,role:"tooltip",children:s}):null]})})},"TooltipContentImpl"));function dE(e,t){const n=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,i,o,s)){case s:return"left";case o:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}It(dE,"getExitSideFromRect");function fE(e,t,n=5){const i=[];switch(t){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}It(fE,"getPaddedExitPoints");function hE(e){const{top:t,right:n,bottom:i,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:i},{x:o,y:i}]}It(hE,"getPointsFromRect");function pE(e,t){const{x:n,y:i}=e;let o=!1;for(let s=0,l=t.length-1;s<t.length;l=s++){const c=t[s],d=t[l],f=c.x,p=c.y,m=d.x,g=d.y;p>i!=g>i&&n<(m-f)*(i-p)/(g-p)+f&&(o=!o)}return o}It(pE,"isPointInPolygon");function mE(e){const t=e.slice();return t.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),gE(t)}It(mE,"getHull");function gE(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i<e.length;i++){const o=e[i];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(o.y-l.y)>=(s.y-l.y)*(o.x-l.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const o=e[i];for(;n.length>=2;){const s=n[n.length-1],l=n[n.length-2];if((s.x-l.x)*(o.y-l.y)>=(s.y-l.y)*(o.x-l.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}It(gE,"getHullPresorted");var FI=MI,GI=NI,$I=zI,qI=jI,WI=BI;function YI({delayDuration:e=400,...t}){return T.jsx(FI,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Un({...e}){return T.jsx(GI,{"data-slot":"tooltip",...e})}function Vn({...e}){return T.jsx($I,{"data-slot":"tooltip-trigger",...e})}function Fn({className:e,sideOffset:t=6,children:n,...i}){return T.jsx(qI,{children:T.jsx(WI,{"data-slot":"tooltip-content",sideOffset:t,className:Ye("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md bg-foreground px-2.5 py-1.5 text-xs text-background duration-150 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=instant-open]:animate-in data-[state=instant-open]:fade-in-0",e),...i,children:n})})}async function XI(e){try{await navigator.clipboard.writeText(e)}catch{KI(e)}}function KI(e){const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.left="-9999px",document.body.append(t),t.select();const n=document.execCommand("copy");if(t.remove(),!n)throw new Error("copy failed")}const mc={label:"Ask AI about this",copied:"Copied",hint:"Copy a prompt for your coding agent"},QI=1600;function yE(e){const[t,n]=N.useState(!1),i=`${mc.hint}. ${e.scope==="group"?"This group.":"This review."}`;N.useEffect(()=>{n(!1)},[e.prompt]),N.useEffect(()=>{if(!t)return;const s=window.setTimeout(()=>n(!1),QI);return()=>window.clearTimeout(s)},[t]);const o=t?mc.copied:mc.label;return T.jsxs(Un,{children:[T.jsx(Vn,{asChild:!0,children:T.jsxs(Tt,{type:"button",size:"sm",variant:"outline",className:"shrink-0","aria-label":i,"aria-live":"polite","data-cta":"ask",onClick:()=>{n(!0),XI(e.prompt).catch(()=>n(!1))},children:[T.jsx(LM,{"aria-hidden":!0,className:"size-3.5"}),o]})}),T.jsx(Fn,{children:t?mc.copied:i})]})}function vE(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ZI=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,JI=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eN={};function YS(e,t){return(eN.jsx?JI:ZI).test(e)}const tN=/[ \t\n\f\r]/g;function Yd(e){return typeof e=="object"?e.type==="text"?XS(e.value):!1:XS(e)}function XS(e){return e.replace(tN,"")===""}class jl{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}jl.prototype.normal={};jl.prototype.property={};jl.prototype.space=void 0;function bE(e,t){const n={},i={};for(const o of e)Object.assign(n,o.property),Object.assign(i,o.normal);return new jl(n,i,t)}function Zm(e){return e.toLowerCase()}class pn{constructor(t,n){this.attribute=n,this.property=t}}pn.prototype.attribute="";pn.prototype.booleanish=!1;pn.prototype.boolean=!1;pn.prototype.commaOrSpaceSeparated=!1;pn.prototype.commaSeparated=!1;pn.prototype.defined=!1;pn.prototype.mustUseProperty=!1;pn.prototype.number=!1;pn.prototype.overloadedBoolean=!1;pn.prototype.property="";pn.prototype.spaceSeparated=!1;pn.prototype.space=void 0;let nN=0;const we=$o(),xt=$o(),Jm=$o(),de=$o(),tt=$o(),ko=$o(),Cn=$o();function $o(){return 2**++nN}const eg=Object.freeze(Object.defineProperty({__proto__:null,boolean:we,booleanish:xt,commaOrSpaceSeparated:Cn,commaSeparated:ko,number:de,overloadedBoolean:Jm,spaceSeparated:tt},Symbol.toStringTag,{value:"Module"})),Vp=Object.keys(eg);class by extends pn{constructor(t,n,i,o){let s=-1;if(super(t,n),KS(this,"space",o),typeof i=="number")for(;++s<Vp.length;){const l=Vp[s];KS(this,Vp[s],(i&eg[l])===eg[l])}}}by.prototype.defined=!0;function KS(e,t,n){n&&(e[t]=n)}function Ja(e){const t={},n={};for(const[i,o]of Object.entries(e.properties)){const s=new by(i,e.transform(e.attributes||{},i),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),t[i]=s,n[Zm(i)]=i,n[Zm(s.attribute)]=i}return new jl(t,n,e.space)}const xE=Ja({properties:{ariaActiveDescendant:null,ariaAtomic:xt,ariaAutoComplete:null,ariaBusy:xt,ariaChecked:xt,ariaColCount:de,ariaColIndex:de,ariaColSpan:de,ariaControls:tt,ariaCurrent:null,ariaDescribedBy:tt,ariaDetails:null,ariaDisabled:xt,ariaDropEffect:tt,ariaErrorMessage:null,ariaExpanded:xt,ariaFlowTo:tt,ariaGrabbed:xt,ariaHasPopup:null,ariaHidden:xt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:tt,ariaLevel:de,ariaLive:null,ariaModal:xt,ariaMultiLine:xt,ariaMultiSelectable:xt,ariaOrientation:null,ariaOwns:tt,ariaPlaceholder:null,ariaPosInSet:de,ariaPressed:xt,ariaReadOnly:xt,ariaRelevant:null,ariaRequired:xt,ariaRoleDescription:tt,ariaRowCount:de,ariaRowIndex:de,ariaRowSpan:de,ariaSelected:xt,ariaSetSize:de,ariaSort:null,ariaValueMax:de,ariaValueMin:de,ariaValueNow:de,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function SE(e,t){return t in e?e[t]:t}function _E(e,t){return SE(e,t.toLowerCase())}const iN=Ja({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ko,acceptCharset:tt,accessKey:tt,action:null,allow:null,allowFullScreen:we,allowPaymentRequest:we,allowUserMedia:we,alpha:we,alt:null,as:null,async:we,autoCapitalize:null,autoComplete:tt,autoFocus:we,autoPlay:we,blocking:tt,capture:null,charSet:null,checked:we,cite:null,className:tt,closedBy:null,colorSpace:null,cols:de,colSpan:de,command:null,commandFor:null,content:null,contentEditable:xt,controls:we,controlsList:tt,coords:de|ko,crossOrigin:null,data:null,dateTime:null,decoding:null,default:we,defer:we,dir:null,dirName:null,disabled:we,download:Jm,draggable:xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:we,formTarget:null,headers:tt,height:de,hidden:Jm,high:de,href:null,hrefLang:null,htmlFor:tt,httpEquiv:tt,id:null,imageSizes:null,imageSrcSet:null,inert:we,inputMode:null,integrity:null,is:null,isMap:we,itemId:null,itemProp:tt,itemRef:tt,itemScope:we,itemType:tt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:we,low:de,manifest:null,max:null,maxLength:de,media:null,method:null,min:null,minLength:de,multiple:we,muted:we,name:null,nonce:null,noModule:we,noValidate:we,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:we,optimum:de,pattern:null,ping:tt,placeholder:null,playsInline:we,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:we,referrerPolicy:null,rel:tt,required:we,reversed:we,rows:de,rowSpan:de,sandbox:tt,scope:null,scoped:we,seamless:we,selected:we,shadowRootClonable:we,shadowRootCustomElementRegistry:we,shadowRootDelegatesFocus:we,shadowRootMode:null,shadowRootSerializable:we,shape:null,size:de,sizes:null,slot:null,span:de,spellCheck:xt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:de,step:null,style:null,tabIndex:de,target:null,title:null,translate:null,type:null,typeMustMatch:we,useMap:null,value:xt,width:de,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:tt,axis:null,background:null,bgColor:null,border:de,borderColor:null,bottomMargin:de,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:we,declare:we,event:null,face:null,frame:null,frameBorder:null,hSpace:de,leftMargin:de,link:null,longDesc:null,lowSrc:null,marginHeight:de,marginWidth:de,noResize:we,noHref:we,noShade:we,noWrap:we,object:null,profile:null,prompt:null,rev:null,rightMargin:de,rules:null,scheme:null,scrolling:xt,standby:null,summary:null,text:null,topMargin:de,valueType:null,version:null,vAlign:null,vLink:null,vSpace:de,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:we,disablePictureInPicture:we,disableRemotePlayback:we,exportParts:ko,part:tt,prefix:null,property:null,results:de,security:null,unselectable:null},space:"html",transform:_E}),rN=Ja({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",maskType:"mask-type",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:Cn,accentHeight:de,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:de,amplitude:de,arabicForm:null,ascent:de,attributeName:null,attributeType:null,azimuth:de,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:de,by:null,calcMode:null,capHeight:de,className:tt,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:de,diffuseConstant:de,direction:null,display:null,dur:null,divisor:de,dominantBaseline:null,download:we,dx:null,dy:null,edgeMode:null,editable:null,elevation:de,enableBackground:null,end:null,event:null,exponent:de,externalResourcesRequired:null,fill:null,fillOpacity:de,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:ko,g2:ko,glyphName:ko,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:de,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:de,horizOriginX:de,horizOriginY:de,id:null,ideographic:de,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:de,k:de,k1:de,k2:de,k3:de,k4:de,kernelMatrix:Cn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:de,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:de,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:de,overlineThickness:de,paintOrder:null,panose1:null,path:null,pathLength:de,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:tt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:de,pointsAtY:de,pointsAtZ:de,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Cn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Cn,rev:Cn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Cn,requiredFeatures:Cn,requiredFonts:Cn,requiredFormats:Cn,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:de,specularExponent:de,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:de,strikethroughThickness:de,string:null,stroke:null,strokeDashArray:Cn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:de,strokeOpacity:de,strokeWidth:null,style:null,surfaceScale:de,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Cn,tabIndex:de,tableValues:null,target:null,targetX:de,targetY:de,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Cn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:de,underlineThickness:de,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:de,values:null,vAlphabetic:de,vMathematical:de,vectorEffect:null,vHanging:de,vIdeographic:de,version:null,vertAdvY:de,vertOriginX:de,vertOriginY:de,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:de,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:SE}),CE=Ja({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()}}),wE=Ja({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_E}),EE=Ja({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),oN={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"},aN=/[A-Z]/g,QS=/-[a-z]/g,sN=/^data[-\w.:]+$/i;function kE(e,t){const n=Zm(t);let i=t,o=pn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&sN.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(QS,uN);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!QS.test(s)){let l=s.replace(aN,lN);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=by}return new o(i,t)}function lN(e){return"-"+e.toLowerCase()}function uN(e){return e.charAt(1).toUpperCase()}const TE=bE([xE,iN,CE,wE,EE],"html"),Bl=bE([xE,rN,CE,wE,EE],"svg");function AE(e){return e.join(" ").trim()}var Oa={},Fp,ZS;function cN(){if(ZS)return Fp;ZS=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
11
|
-
`,f="/",p="*",m="",g="comment",v="declaration";function x(w,_){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];_=_||{};var C=1,k=1;function D(X){var W=X.match(t);W&&(C+=W.length);var P=X.lastIndexOf(d);k=~P?X.length-P:k+X.length}function M(){var X={line:C,column:k};return function(W){return W.position=new O(X),F(),W}}function O(X){this.start=X,this.end={line:C,column:k},this.source=_.source}O.prototype.content=w;function z(X){var W=new Error(_.source+":"+C+":"+k+": "+X);if(W.reason=X,W.filename=_.source,W.line=C,W.column=k,W.source=w,!_.silent)throw W}function j(X){var W=X.exec(w);if(W){var P=W[0];return D(P),w=w.slice(P.length),W}}function F(){j(n)}function ee(X){var W;for(X=X||[];W=q();)W!==!1&&X.push(W);return X}function q(){var X=M();if(!(f!=w.charAt(0)||p!=w.charAt(1))){for(var W=2;m!=w.charAt(W)&&(p!=w.charAt(W)||f!=w.charAt(W+1));)++W;if(W+=2,m===w.charAt(W-1))return z("End of comment missing");var P=w.slice(2,W-2);return k+=2,D(P),w=w.slice(W),k+=2,X({type:g,comment:P})}}function U(){var X=M(),W=j(i);if(W){if(q(),!j(o))return z("property missing ':'");var P=j(s),$=X({type:v,property:S(W[0].replace(e,m)),value:P?S(P[0].replace(e,m)):m});return j(l),$}}function Z(){var X=[];ee(X);for(var W;W=U();)W!==!1&&(X.push(W),ee(X));return X}return F(),Z()}function S(w){return w?w.replace(c,m):m}return Fp=x,Fp}var JS;function dN(){if(JS)return Oa;JS=1;var e=Oa&&Oa.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.default=n;const t=e(cN());function n(i,o){let s=null;if(!i||typeof i!="string")return s;const l=(0,t.default)(i),c=typeof o=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;c?o(f,p,d):p&&(s=s||{},s[f]=p)}),s}return Oa}var Zs={},e_;function fN(){if(e_)return Zs;e_=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(f){return!f||n.test(f)||e.test(f)},l=function(f,p){return p.toUpperCase()},c=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),s(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(o,c):f=f.replace(i,c),f.replace(t,l))};return Zs.camelCase=d,Zs}var Js,t_;function hN(){if(t_)return Js;t_=1;var e=Js&&Js.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(dN()),n=fN();function i(o,s){var l={};return!o||typeof o!="string"||(0,t.default)(o,function(c,d){c&&d&&(l[(0,n.camelCase)(c,s)]=d)}),l}return i.default=i,Js=i,Js}var pN=hN();const mN=Bd(pN),LE=RE("end"),xy=RE("start");function RE(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function gN(e){const t=xy(e),n=LE(e);if(t&&n)return{start:t,end:n}}function fl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?n_(e.position):"start"in e||"end"in e?n_(e):"line"in e||"column"in e?tg(e):""}function tg(e){return i_(e&&e.line)+":"+i_(e&&e.column)}function n_(e){return tg(e&&e.start)+"-"+tg(e&&e.end)}function i_(e){return e&&typeof e=="number"?e:1}class qt extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let o="",s={},l=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?o=t:!s.cause&&t&&(l=!0,o=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof i=="string"){const d=i.indexOf(":");d===-1?s.ruleId=i:(s.source=i.slice(0,d),s.ruleId=i.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const c=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=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=c?c.line:void 0,this.name=fl(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=l&&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}}qt.prototype.file="";qt.prototype.name="";qt.prototype.reason="";qt.prototype.message="";qt.prototype.stack="";qt.prototype.column=void 0;qt.prototype.line=void 0;qt.prototype.ancestors=void 0;qt.prototype.cause=void 0;qt.prototype.fatal=void 0;qt.prototype.place=void 0;qt.prototype.ruleId=void 0;qt.prototype.source=void 0;const Sy={}.hasOwnProperty,yN=new Map,vN=/[A-Z]/g,bN=new Set(["table","tbody","thead","tfoot","tr"]),xN=new Set(["td","th"]),OE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function SN(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=LN(n,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");i=AN(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Bl:TE,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=DE(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function DE(e,t,n){if(t.type==="element")return _N(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return CN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return EN(e,t,n);if(t.type==="mdxjsEsm")return wN(e,t);if(t.type==="root")return kN(e,t,n);if(t.type==="text")return TN(e,t)}function _N(e,t,n){const i=e.schema;let o=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=Bl,e.schema=o),e.ancestors.push(t);const s=IE(e,t.tagName,!1),l=RN(e,t);let c=Cy(e,t);return bN.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!Yd(d):!0})),ME(e,l,s,t),_y(l,c),e.ancestors.pop(),e.schema=i,e.create(t,s,l,n)}function CN(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Cl(e,t.position)}function wN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Cl(e,t.position)}function EN(e,t,n){const i=e.schema;let o=i;t.name==="svg"&&i.space==="html"&&(o=Bl,e.schema=o),e.ancestors.push(t);const s=t.name===null?e.Fragment:IE(e,t.name,!0),l=ON(e,t),c=Cy(e,t);return ME(e,l,s,t),_y(l,c),e.ancestors.pop(),e.schema=i,e.create(t,s,l,n)}function kN(e,t,n){const i={};return _y(i,Cy(e,t)),e.create(t,e.Fragment,i,n)}function TN(e,t){return t.value}function ME(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function _y(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function AN(e,t,n){return i;function i(o,s,l,c){const f=Array.isArray(l.children)?n:t;return c?f(s,l,c):f(s,l)}}function LN(e,t){return n;function n(i,o,s,l){const c=Array.isArray(s.children),d=xy(i);return t(o,s,l,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function RN(e,t){const n={};let i,o;for(o in t.properties)if(o!=="children"&&Sy.call(t.properties,o)){const s=DN(e,o,t.properties[o]);if(s){const[l,c]=s;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&xN.has(t.tagName)?i=c:n[l]=c}}if(i){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function ON(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const s=i.data.estree.body[0];s.type;const l=s.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Cl(e,t.position);else{const o=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const c=i.value.data.estree.body[0];c.type,s=e.evaluater.evaluateExpression(c.expression)}else Cl(e,t.position);else s=i.value===null?!0:i.value;n[o]=s}return n}function Cy(e,t){const n=[];let i=-1;const o=e.passKeys?new Map:yN;for(;++i<t.children.length;){const s=t.children[i];let l;if(e.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const f=o.get(d)||0;l=d+"-"+f,o.set(d,f+1)}}const c=DE(e,s,l);c!==void 0&&n.push(c)}return n}function DN(e,t,n){const i=kE(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?vE(n):AE(n)),i.property==="style"){let o=typeof n=="object"?n:MN(e,String(n));return e.stylePropertyNameCase==="css"&&(o=IN(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&i.space?oN[i.property]||i.property:i.attribute,n]}}function MN(e,t){try{return mN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,o=new qt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=OE+"#cannot-parse-style-attribute",o}}function IE(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let s=-1,l;for(;++s<o.length;){const c=YS(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(s&&c.type==="Literal"),optional:!1}:c}i=l}else i=YS(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const o=i.value;return Sy.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(i);Cl(e)}function Cl(e,t){const n=new qt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=OE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function IN(e){const t={};let n;for(n in e)Sy.call(e,n)&&(t[NN(n)]=e[n]);return t}function NN(e){let t=e.replace(vN,zN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function zN(e){return"-"+e.toLowerCase()}const Gp={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"]},PN={};function HN(e,t){const n=PN,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return NE(e,i,o)}function NE(e,t,n){if(jN(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return r_(e.children,t,n)}return Array.isArray(e)?r_(e,t,n):""}function r_(e,t,n){const i=[];let o=-1;for(;++o<e.length;)i[o]=NE(e[o],t,n);return i.join("")}function jN(e){return!!(e&&typeof e=="object")}const o_=document.createElement("i");function wy(e){const t="&"+e+";";o_.innerHTML=t;const n=o_.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ci(e,t,n,i){const o=e.length;let s=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,i.length<1e4)l=Array.from(i),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);s<i.length;)l=i.slice(s,s+1e4),l.unshift(t,0),e.splice(...l),s+=1e4,t+=1e4}function Hn(e,t){return e.length>0?(Ci(e,e.length,0,t),e):t}const a_={}.hasOwnProperty;function BN(e){const t={};let n=-1;for(;++n<e.length;)UN(t,e[n]);return t}function UN(e,t){let n;for(n in t){const o=(a_.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let l;if(s)for(l in s){a_.call(o,l)||(o[l]=[]);const c=s[l];VN(o[l],Array.isArray(c)?c:c?[c]:[])}}}function VN(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);Ci(e,0,0,i)}function zE(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ga(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const gi=Yr(/[A-Za-z]/),kn=Yr(/[\dA-Za-z]/),FN=Yr(/[#-'*+\--9=?A-Z^-~]/);function ng(e){return e!==null&&(e<32||e===127)}const ig=Yr(/\d/),GN=Yr(/[\dA-Fa-f]/),$N=Yr(/[!-/:-@[-`{-~]/);function Ce(e){return e!==null&&e<-2}function fn(e){return e!==null&&(e<0||e===32)}function Ge(e){return e===-2||e===-1||e===32}const qN=Yr(new RegExp("\\p{P}|\\p{S}","u")),WN=Yr(/\s/);function Yr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function es(e){const t=[];let n=-1,i=0,o=0;for(;++n<e.length;){const s=e.charCodeAt(n);let l="";if(s===37&&kn(e.charCodeAt(n+1))&&kn(e.charCodeAt(n+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(l=String.fromCharCode(s));else if(s>55295&&s<57344){const c=e.charCodeAt(n+1);s<56320&&c>56319&&c<57344?(l=String.fromCharCode(s,c),o=1):l="�"}else l=String.fromCharCode(s);l&&(t.push(e.slice(i,n),encodeURIComponent(l)),i=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(i)}function it(e,t,n,i){const o=i?i-1:Number.POSITIVE_INFINITY;let s=0;return l;function l(d){return Ge(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ge(d)&&s++<o?(e.consume(d),c):(e.exit(n),t(d))}}const YN={tokenize:XN};function XN(e){const t=e.attempt(this.parser.constructs.contentInitial,i,o);let n;return t;function i(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),it(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),s(c)}function s(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Ce(c)?(e.consume(c),e.exit("chunkText"),s):(e.consume(c),l)}}const KN={tokenize:QN},s_={tokenize:ZN};function QN(e){const t=this,n=[];let i=0,o,s,l;return c;function c(k){if(i<n.length){const D=n[i];return t.containerState=D[1],e.attempt(D[0].continuation,d,f)(k)}return f(k)}function d(k){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&C();const D=t.events.length;let M=D,O;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){O=t.events[M][1].end;break}_(i);let z=D;for(;z<t.events.length;)t.events[z][1].end={...O},z++;return Ci(t.events,M+1,0,t.events.slice(D)),t.events.length=z,f(k)}return c(k)}function f(k){if(i===n.length){if(!o)return g(k);if(o.currentConstruct&&o.currentConstruct.concrete)return x(k);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(s_,p,m)(k)}function p(k){return o&&C(),_(i),g(k)}function m(k){return t.parser.lazy[t.now().line]=i!==n.length,l=t.now().offset,x(k)}function g(k){return t.containerState={},e.attempt(s_,v,x)(k)}function v(k){return i++,n.push([t.currentConstruct,t.containerState]),g(k)}function x(k){if(k===null){o&&C(),_(0),e.consume(k);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),S(k)}function S(k){if(k===null){w(e.exit("chunkFlow"),!0),_(0),e.consume(k);return}return Ce(k)?(e.consume(k),w(e.exit("chunkFlow")),i=0,t.interrupt=void 0,c):(e.consume(k),S)}function w(k,D){const M=t.sliceStream(k);if(D&&M.push(null),k.previous=s,s&&(s.next=k),s=k,o.defineSkip(k.start),o.write(M),t.parser.lazy[k.start.line]){let O=o.events.length;for(;O--;)if(o.events[O][1].start.offset<l&&(!o.events[O][1].end||o.events[O][1].end.offset>l))return;const z=t.events.length;let j=z,F,ee;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if(F){ee=t.events[j][1].end;break}F=!0}for(_(i),O=z;O<t.events.length;)t.events[O][1].end={...ee},O++;Ci(t.events,j+1,0,t.events.slice(z)),t.events.length=O}}function _(k){let D=n.length;for(;D-- >k;){const M=n[D];t.containerState=M[1],M[0].exit.call(t,e)}n.length=k}function C(){o.write([null]),s=void 0,o=void 0,t.containerState._closeFlow=void 0}}function ZN(e,t,n){return it(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function l_(e){if(e===null||fn(e)||WN(e))return 1;if(qN(e))return 2}function Ey(e,t,n){const i=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!i.includes(s)&&(t=s(t,n),i.push(s))}return t}const rg={name:"attention",resolveAll:JN,tokenize:ez};function JN(e,t){let n=-1,i,o,s,l,c,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[i][1].end},g={...e[n][1].start};u_(m,-d),u_(g,d),l={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[i][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},s={type:d>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},o={type:d>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[i][1].end={...l.start},e[n][1].start={...c.end},f=[],e[i][1].end.offset-e[i][1].start.offset&&(f=Hn(f,[["enter",e[i][1],t],["exit",e[i][1],t]])),f=Hn(f,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",s,t]]),f=Hn(f,Ey(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),f=Hn(f,[["exit",s,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=Hn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Ci(e,i-1,n-i+3,f),n=i+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function ez(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,o=l_(i);let s;return l;function l(d){return s=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===s)return e.consume(d),c;const f=e.exit("attentionSequence"),p=l_(d),m=!p||p===2&&o||n.includes(d),g=!o||o===2&&p||n.includes(i);return f._open=!!(s===42?m:m&&(o||!g)),f._close=!!(s===42?g:g&&(p||!m)),t(d)}}function u_(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const tz={name:"autolink",tokenize:nz};function nz(e,t,n){let i=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 gi(v)?(e.consume(v),l):v===64?n(v):f(v)}function l(v){return v===43||v===45||v===46||kn(v)?(i=1,c(v)):f(v)}function c(v){return v===58?(e.consume(v),i=0,d):(v===43||v===45||v===46||kn(v))&&i++<32?(e.consume(v),c):(i=0,f(v))}function d(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||ng(v)?n(v):(e.consume(v),d)}function f(v){return v===64?(e.consume(v),p):FN(v)?(e.consume(v),f):n(v)}function p(v){return kn(v)?m(v):n(v)}function m(v){return v===46?(e.consume(v),i=0,p):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):g(v)}function g(v){if((v===45||kn(v))&&i++<63){const x=v===45?g:m;return e.consume(v),x}return n(v)}}const Xd={partial:!0,tokenize:iz};function iz(e,t,n){return i;function i(s){return Ge(s)?it(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||Ce(s)?t(s):n(s)}}const PE={continuation:{tokenize:oz},exit:az,name:"blockQuote",tokenize:rz};function rz(e,t,n){const i=this;return o;function o(l){if(l===62){const c=i.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),s}return n(l)}function s(l){return Ge(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function oz(e,t,n){const i=this;return o;function o(l){return Ge(l)?it(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):s(l)}function s(l){return e.attempt(PE,t,n)(l)}}function az(e){e.exit("blockQuote")}const HE={name:"characterEscape",tokenize:sz};function sz(e,t,n){return i;function i(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return $N(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const jE={name:"characterReference",tokenize:lz};function lz(e,t,n){const i=this;let o=0,s,l;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),s=31,l=kn,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,l=GN,p):(e.enter("characterReferenceValue"),s=7,l=ig,p(m))}function p(m){if(m===59&&o){const g=e.exit("characterReferenceValue");return l===kn&&!wy(i.sliceSerialize(g))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&o++<s?(e.consume(m),p):n(m)}}const c_={partial:!0,tokenize:cz},d_={concrete:!0,name:"codeFenced",tokenize:uz};function uz(e,t,n){const i=this,o={partial:!0,tokenize:M};let s=0,l=0,c;return d;function d(O){return f(O)}function f(O){const z=i.events[i.events.length-1];return s=z&&z[1].type==="linePrefix"?z[2].sliceSerialize(z[1],!0).length:0,c=O,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(O)}function p(O){return O===c?(l++,e.consume(O),p):l<3?n(O):(e.exit("codeFencedFenceSequence"),Ge(O)?it(e,m,"whitespace")(O):m(O))}function m(O){return O===null||Ce(O)?(e.exit("codeFencedFence"),i.interrupt?t(O):e.check(c_,S,D)(O)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(O))}function g(O){return O===null||Ce(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(O)):Ge(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),it(e,v,"whitespace")(O)):O===96&&O===c?n(O):(e.consume(O),g)}function v(O){return O===null||Ce(O)?m(O):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(O))}function x(O){return O===null||Ce(O)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(O)):O===96&&O===c?n(O):(e.consume(O),x)}function S(O){return e.attempt(o,D,w)(O)}function w(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),_}function _(O){return s>0&&Ge(O)?it(e,C,"linePrefix",s+1)(O):C(O)}function C(O){return O===null||Ce(O)?e.check(c_,S,D)(O):(e.enter("codeFlowValue"),k(O))}function k(O){return O===null||Ce(O)?(e.exit("codeFlowValue"),C(O)):(e.consume(O),k)}function D(O){return e.exit("codeFenced"),t(O)}function M(O,z,j){let F=0;return ee;function ee(W){return O.enter("lineEnding"),O.consume(W),O.exit("lineEnding"),q}function q(W){return O.enter("codeFencedFence"),Ge(W)?it(O,U,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):U(W)}function U(W){return W===c?(O.enter("codeFencedFenceSequence"),Z(W)):j(W)}function Z(W){return W===c?(F++,O.consume(W),Z):F>=l?(O.exit("codeFencedFenceSequence"),Ge(W)?it(O,X,"whitespace")(W):X(W)):j(W)}function X(W){return W===null||Ce(W)?(O.exit("codeFencedFence"),z(W)):j(W)}}}function cz(e,t,n){const i=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s)}function s(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}const $p={name:"codeIndented",tokenize:fz},dz={partial:!0,tokenize:hz};function fz(e,t,n){const i=this;return o;function o(f){return e.enter("codeIndented"),it(e,s,"linePrefix",5)(f)}function s(f){const p=i.events[i.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(f):n(f)}function l(f){return f===null?d(f):Ce(f)?e.attempt(dz,l,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||Ce(f)?(e.exit("codeFlowValue"),l(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function hz(e,t,n){const i=this;return o;function o(l){return i.parser.lazy[i.now().line]?n(l):Ce(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):it(e,s,"linePrefix",5)(l)}function s(l){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):Ce(l)?o(l):n(l)}}const pz={name:"codeText",previous:gz,resolve:mz,tokenize:yz};function mz(e){let t=e.length-4,n=3,i,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)o===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(o=i):(i===t||e[i][1].type==="lineEnding")&&(e[o][1].type="codeTextData",i!==o+2&&(e[o][1].end=e[i-1][1].end,e.splice(o+2,i-o-2),t-=i-o-2,i=o+2),o=void 0);return e}function gz(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function yz(e,t,n){let i=0,o,s;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),i++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(s=e.enter("codeTextSequence"),o=0,p(m)):Ce(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||Ce(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),o++,p):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(s.type="codeTextData",f(m))}}class vz{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,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const o=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&el(this.left,i),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),el(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),el(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 n=this.left.splice(t,Number.POSITIVE_INFINITY);el(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);el(this.left,n.reverse())}}}function el(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function BE(e){const t={};let n=-1,i,o,s,l,c,d,f;const p=new vz(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(i=p.get(n),n&&i[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=i[1]._tokenizer.events,s=0,s<d.length&&d[s][1].type==="lineEndingBlank"&&(s+=2),s<d.length&&d[s][1].type==="content"))for(;++s<d.length&&d[s][1].type!=="content";)d[s][1].type==="chunkText"&&(d[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,bz(p,n)),n=t[n],f=!0);else if(i[1]._container){for(s=n,o=void 0;s--;)if(l=p.get(s),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=s);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;o&&(i[1].end={...p.get(o)[1].start},c=p.slice(o,n),c.unshift(i),p.splice(o,n-o+1,c))}}return Ci(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function bz(e,t){const n=e.get(t)[1],i=e.get(t)[2];let o=t-1;const s=[];let l=n._tokenizer;l||(l=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,d=[],f={};let p,m,g=-1,v=n,x=0,S=0;const w=[S];for(;v;){for(;e.get(++o)[1]!==v;);s.push(o),v._tokenizer||(p=i.sliceStream(v),v.next||p.push(null),m&&l.defineSkip(v.start),v._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),v._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=v,v=v.next}for(v=n;++g<c.length;)c[g][0]==="exit"&&c[g-1][0]==="enter"&&c[g][1].type===c[g-1][1].type&&c[g][1].start.line!==c[g][1].end.line&&(S=g+1,w.push(S),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(l.events=[],v?(v._tokenizer=void 0,v.previous=void 0):w.pop(),g=w.length;g--;){const _=c.slice(w[g],w[g+1]),C=s.pop();d.push([C,C+_.length-1]),e.splice(C,2,_)}for(d.reverse(),g=-1;++g<d.length;)f[x+d[g][0]]=x+d[g][1],x+=d[g][1]-d[g][0]-1;return f}const xz={resolve:_z,tokenize:Cz},Sz={partial:!0,tokenize:wz};function _z(e){return BE(e),e}function Cz(e,t){let n;return i;function i(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?s(c):Ce(c)?e.check(Sz,l,s)(c):(e.consume(c),o)}function s(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function wz(e,t,n){const i=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),it(e,s,"linePrefix")}function s(l){if(l===null||Ce(l))return n(l);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(i.parser.constructs.flow,n,t)(l)}}function UE(e,t,n,i,o,s,l,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(_){return _===60?(e.enter(i),e.enter(o),e.enter(s),e.consume(_),e.exit(s),g):_===null||_===32||_===41||ng(_)?n(_):(e.enter(i),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(_))}function g(_){return _===62?(e.enter(s),e.consume(_),e.exit(s),e.exit(o),e.exit(i),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===62?(e.exit("chunkString"),e.exit(c),g(_)):_===null||_===60||Ce(_)?n(_):(e.consume(_),_===92?x:v)}function x(_){return _===60||_===62||_===92?(e.consume(_),v):v(_)}function S(_){return!p&&(_===null||_===41||fn(_))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(i),t(_)):p<f&&_===40?(e.consume(_),p++,S):_===41?(e.consume(_),p--,S):_===null||_===32||_===40||ng(_)?n(_):(e.consume(_),_===92?w:S)}function w(_){return _===40||_===41||_===92?(e.consume(_),S):S(_)}}function VE(e,t,n,i,o,s){const l=this;let c=0,d;return f;function f(v){return e.enter(i),e.enter(o),e.consume(v),e.exit(o),e.enter(s),p}function p(v){return c>999||v===null||v===91||v===93&&!d||v===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(v):v===93?(e.exit(s),e.enter(o),e.consume(v),e.exit(o),e.exit(i),t):Ce(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===null||v===91||v===93||Ce(v)||c++>999?(e.exit("chunkString"),p(v)):(e.consume(v),d||(d=!Ge(v)),v===92?g:m)}function g(v){return v===91||v===92||v===93?(e.consume(v),c++,m):m(v)}}function FE(e,t,n,i,o,s){let l;return c;function c(g){return g===34||g===39||g===40?(e.enter(i),e.enter(o),e.consume(g),e.exit(o),l=g===40?41:g,d):n(g)}function d(g){return g===l?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),t):(e.enter(s),f(g))}function f(g){return g===l?(e.exit(s),d(l)):g===null?n(g):Ce(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),it(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===l||g===null||Ce(g)?(e.exit("chunkString"),f(g)):(e.consume(g),g===92?m:p)}function m(g){return g===l||g===92?(e.consume(g),p):p(g)}}function hl(e,t){let n;return i;function i(o){return Ce(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,i):Ge(o)?it(e,i,n?"linePrefix":"lineSuffix")(o):t(o)}}const Ez={name:"definition",tokenize:Tz},kz={partial:!0,tokenize:Az};function Tz(e,t,n){const i=this;let o;return s;function s(v){return e.enter("definition"),l(v)}function l(v){return VE.call(i,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function c(v){return o=Ga(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),d):n(v)}function d(v){return fn(v)?hl(e,f)(v):f(v)}function f(v){return UE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function p(v){return e.attempt(kz,m,m)(v)}function m(v){return Ge(v)?it(e,g,"whitespace")(v):g(v)}function g(v){return v===null||Ce(v)?(e.exit("definition"),i.parser.defined.push(o),t(v)):n(v)}}function Az(e,t,n){return i;function i(c){return fn(c)?hl(e,o)(c):n(c)}function o(c){return FE(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function s(c){return Ge(c)?it(e,l,"whitespace")(c):l(c)}function l(c){return c===null||Ce(c)?t(c):n(c)}}const Lz={name:"hardBreakEscape",tokenize:Rz};function Rz(e,t,n){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return Ce(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const Oz={name:"headingAtx",resolve:Dz,tokenize:Mz};function Dz(e,t){let n=e.length-2,i=3,o,s;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},s={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},Ci(e,i,n-i+1,[["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t]])),e}function Mz(e,t,n){let i=0;return o;function o(p){return e.enter("atxHeading"),s(p)}function s(p){return e.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&i++<6?(e.consume(p),l):p===null||fn(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Ce(p)?(e.exit("atxHeading"),t(p)):Ge(p)?it(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||fn(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const Iz=["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"],f_=["pre","script","style","textarea"],Nz={concrete:!0,name:"htmlFlow",resolveTo:Hz,tokenize:jz},zz={partial:!0,tokenize:Uz},Pz={partial:!0,tokenize:Bz};function Hz(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 jz(e,t,n){const i=this;let o,s,l,c,d;return f;function f(I){return p(I)}function p(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),m}function m(I){return I===33?(e.consume(I),g):I===47?(e.consume(I),s=!0,S):I===63?(e.consume(I),o=3,i.interrupt?t:R):gi(I)?(e.consume(I),l=String.fromCharCode(I),w):n(I)}function g(I){return I===45?(e.consume(I),o=2,v):I===91?(e.consume(I),o=5,c=0,x):gi(I)?(e.consume(I),o=4,i.interrupt?t:R):n(I)}function v(I){return I===45?(e.consume(I),i.interrupt?t:R):n(I)}function x(I){const le="CDATA[";return I===le.charCodeAt(c++)?(e.consume(I),c===le.length?i.interrupt?t:U:x):n(I)}function S(I){return gi(I)?(e.consume(I),l=String.fromCharCode(I),w):n(I)}function w(I){if(I===null||I===47||I===62||fn(I)){const le=I===47,fe=l.toLowerCase();return!le&&!s&&f_.includes(fe)?(o=1,i.interrupt?t(I):U(I)):Iz.includes(l.toLowerCase())?(o=6,le?(e.consume(I),_):i.interrupt?t(I):U(I)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(I):s?C(I):k(I))}return I===45||kn(I)?(e.consume(I),l+=String.fromCharCode(I),w):n(I)}function _(I){return I===62?(e.consume(I),i.interrupt?t:U):n(I)}function C(I){return Ge(I)?(e.consume(I),C):ee(I)}function k(I){return I===47?(e.consume(I),ee):I===58||I===95||gi(I)?(e.consume(I),D):Ge(I)?(e.consume(I),k):ee(I)}function D(I){return I===45||I===46||I===58||I===95||kn(I)?(e.consume(I),D):M(I)}function M(I){return I===61?(e.consume(I),O):Ge(I)?(e.consume(I),M):k(I)}function O(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),d=I,z):Ge(I)?(e.consume(I),O):j(I)}function z(I){return I===d?(e.consume(I),d=null,F):I===null||Ce(I)?n(I):(e.consume(I),z)}function j(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||fn(I)?M(I):(e.consume(I),j)}function F(I){return I===47||I===62||Ge(I)?k(I):n(I)}function ee(I){return I===62?(e.consume(I),q):n(I)}function q(I){return I===null||Ce(I)?U(I):Ge(I)?(e.consume(I),q):n(I)}function U(I){return I===45&&o===2?(e.consume(I),P):I===60&&o===1?(e.consume(I),$):I===62&&o===4?(e.consume(I),H):I===63&&o===3?(e.consume(I),R):I===93&&o===5?(e.consume(I),ue):Ce(I)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(zz,Y,Z)(I)):I===null||Ce(I)?(e.exit("htmlFlowData"),Z(I)):(e.consume(I),U)}function Z(I){return e.check(Pz,X,Y)(I)}function X(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),W}function W(I){return I===null||Ce(I)?Z(I):(e.enter("htmlFlowData"),U(I))}function P(I){return I===45?(e.consume(I),R):U(I)}function $(I){return I===47?(e.consume(I),l="",ne):U(I)}function ne(I){if(I===62){const le=l.toLowerCase();return f_.includes(le)?(e.consume(I),H):U(I)}return gi(I)&&l.length<8?(e.consume(I),l+=String.fromCharCode(I),ne):U(I)}function ue(I){return I===93?(e.consume(I),R):U(I)}function R(I){return I===62?(e.consume(I),H):I===45&&o===2?(e.consume(I),R):U(I)}function H(I){return I===null||Ce(I)?(e.exit("htmlFlowData"),Y(I)):(e.consume(I),H)}function Y(I){return e.exit("htmlFlow"),t(I)}}function Bz(e,t,n){const i=this;return o;function o(l){return Ce(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):n(l)}function s(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}function Uz(e,t,n){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Xd,t,n)}}const Vz={name:"htmlText",tokenize:Fz};function Fz(e,t,n){const i=this;let o,s,l;return c;function c(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),d}function d(R){return R===33?(e.consume(R),f):R===47?(e.consume(R),M):R===63?(e.consume(R),k):gi(R)?(e.consume(R),j):n(R)}function f(R){return R===45?(e.consume(R),p):R===91?(e.consume(R),s=0,x):gi(R)?(e.consume(R),C):n(R)}function p(R){return R===45?(e.consume(R),v):n(R)}function m(R){return R===null?n(R):R===45?(e.consume(R),g):Ce(R)?(l=m,$(R)):(e.consume(R),m)}function g(R){return R===45?(e.consume(R),v):m(R)}function v(R){return R===62?P(R):R===45?g(R):m(R)}function x(R){const H="CDATA[";return R===H.charCodeAt(s++)?(e.consume(R),s===H.length?S:x):n(R)}function S(R){return R===null?n(R):R===93?(e.consume(R),w):Ce(R)?(l=S,$(R)):(e.consume(R),S)}function w(R){return R===93?(e.consume(R),_):S(R)}function _(R){return R===62?P(R):R===93?(e.consume(R),_):S(R)}function C(R){return R===null||R===62?P(R):Ce(R)?(l=C,$(R)):(e.consume(R),C)}function k(R){return R===null?n(R):R===63?(e.consume(R),D):Ce(R)?(l=k,$(R)):(e.consume(R),k)}function D(R){return R===62?P(R):k(R)}function M(R){return gi(R)?(e.consume(R),O):n(R)}function O(R){return R===45||kn(R)?(e.consume(R),O):z(R)}function z(R){return Ce(R)?(l=z,$(R)):Ge(R)?(e.consume(R),z):P(R)}function j(R){return R===45||kn(R)?(e.consume(R),j):R===47||R===62||fn(R)?F(R):n(R)}function F(R){return R===47?(e.consume(R),P):R===58||R===95||gi(R)?(e.consume(R),ee):Ce(R)?(l=F,$(R)):Ge(R)?(e.consume(R),F):P(R)}function ee(R){return R===45||R===46||R===58||R===95||kn(R)?(e.consume(R),ee):q(R)}function q(R){return R===61?(e.consume(R),U):Ce(R)?(l=q,$(R)):Ge(R)?(e.consume(R),q):F(R)}function U(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),o=R,Z):Ce(R)?(l=U,$(R)):Ge(R)?(e.consume(R),U):(e.consume(R),X)}function Z(R){return R===o?(e.consume(R),o=void 0,W):R===null?n(R):Ce(R)?(l=Z,$(R)):(e.consume(R),Z)}function X(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||fn(R)?F(R):(e.consume(R),X)}function W(R){return R===47||R===62||fn(R)?F(R):n(R)}function P(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function $(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),ne}function ne(R){return Ge(R)?it(e,ue,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):ue(R)}function ue(R){return e.enter("htmlTextData"),l(R)}}const ky={name:"labelEnd",resolveAll:Wz,resolveTo:Yz,tokenize:Xz},Gz={tokenize:Kz},$z={tokenize:Qz},qz={tokenize:Zz};function Wz(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const o=i.type==="labelImage"?4:2;i.type="data",t+=o}}return e.length!==n.length&&Ci(e,0,e.length,n),e}function Yz(e,t){let n=e.length,i=0,o,s,l,c;for(;n--;)if(o=e[n][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=n,o.type!=="labelLink")){i=2;break}}else o.type==="labelEnd"&&(l=n);const d={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[s][1].start},end:{...e[l][1].end}},p={type:"labelText",start:{...e[s+i+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",d,t],["enter",f,t]],c=Hn(c,e.slice(s+1,s+i+3)),c=Hn(c,[["enter",p,t]]),c=Hn(c,Ey(t.parser.constructs.insideSpan.null,e.slice(s+i+4,l-3),t)),c=Hn(c,[["exit",p,t],e[l-2],e[l-1],["exit",f,t]]),c=Hn(c,e.slice(l+1)),c=Hn(c,[["exit",d,t]]),Ci(e,s,e.length,c),e}function Xz(e,t,n){const i=this;let o=i.events.length,s,l;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){s=i.events[o][1];break}return c;function c(g){return s?s._inactive?m(g):(l=i.parser.defined.includes(Ga(i.sliceSerialize({start:s.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),d):n(g)}function d(g){return g===40?e.attempt(Gz,p,l?p:m)(g):g===91?e.attempt($z,p,l?f:m)(g):l?p(g):m(g)}function f(g){return e.attempt(qz,p,m)(g)}function p(g){return t(g)}function m(g){return s._balanced=!0,n(g)}}function Kz(e,t,n){return i;function i(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return fn(m)?hl(e,s)(m):s(m)}function s(m){return m===41?p(m):UE(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return fn(m)?hl(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?FE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return fn(m)?hl(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function Qz(e,t,n){const i=this;return o;function o(c){return VE.call(i,e,s,l,"reference","referenceMarker","referenceString")(c)}function s(c){return i.parser.defined.includes(Ga(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function Zz(e,t,n){return i;function i(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):n(s)}}const Jz={name:"labelStartImage",resolveAll:ky.resolveAll,tokenize:eP};function eP(e,t,n){const i=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),s}function s(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(c):t(c)}}const tP={name:"labelStartLink",resolveAll:ky.resolveAll,tokenize:nP};function nP(e,t,n){const i=this;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),s}function s(l){return l===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(l):t(l)}}const qp={name:"lineEnding",tokenize:iP};function iP(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),it(e,t,"linePrefix")}}const Kc={name:"thematicBreak",tokenize:rP};function rP(e,t,n){let i=0,o;return s;function s(f){return e.enter("thematicBreak"),l(f)}function l(f){return o=f,c(f)}function c(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):i>=3&&(f===null||Ce(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),i++,d):(e.exit("thematicBreakSequence"),Ge(f)?it(e,c,"whitespace")(f):c(f))}}const cn={continuation:{tokenize:lP},exit:cP,name:"list",tokenize:sP},oP={partial:!0,tokenize:dP},aP={partial:!0,tokenize:uP};function sP(e,t,n){const i=this,o=i.events[i.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return c;function c(v){const x=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:ig(v)){if(i.containerState.type||(i.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Kc,n,f)(v):f(v);if(!i.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(v)}return n(v)}function d(v){return ig(v)&&++l<10?(e.consume(v),d):(!i.interrupt||l<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),f(v)):n(v)}function f(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,e.check(Xd,i.interrupt?n:p,e.attempt(oP,g,m))}function p(v){return i.containerState.initialBlankLine=!0,s++,g(v)}function m(v){return Ge(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),g):n(v)}function g(v){return i.containerState.size=s+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function lP(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Xd,o,s);function o(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,it(e,t,"listItemIndent",i.containerState.size+1)(c)}function s(c){return i.containerState.furtherBlankLines||!Ge(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,l(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(aP,t,l)(c))}function l(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,it(e,e.attempt(cn,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function uP(e,t,n){const i=this;return it(e,o,"listItemIndent",i.containerState.size+1);function o(s){const l=i.events[i.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===i.containerState.size?t(s):n(s)}}function cP(e){e.exit(this.containerState.type)}function dP(e,t,n){const i=this;return it(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const l=i.events[i.events.length-1];return!Ge(s)&&l&&l[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const h_={name:"setextUnderline",resolveTo:fP,tokenize:hP};function fP(e,t){let n=e.length,i,o,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",l,t]),e.splice(s+1,0,["exit",e[i][1],t]),e[i][1].end={...e[s][1].end}):e[i][1]=l,e.push(["exit",l,t]),e}function hP(e,t,n){const i=this;let o;return s;function s(f){let p=i.events.length,m;for(;p--;)if(i.events[p][1].type!=="lineEnding"&&i.events[p][1].type!=="linePrefix"&&i.events[p][1].type!=="content"){m=i.events[p][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||m)?(e.enter("setextHeadingLine"),o=f,l(f)):n(f)}function l(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===o?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Ge(f)?it(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Ce(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const pP={tokenize:mP};function mP(e){const t=this,n=e.attempt(Xd,i,e.attempt(this.parser.constructs.flowInitial,o,it(e,e.attempt(this.parser.constructs.flow,o,e.attempt(xz,o)),"linePrefix")));return n;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const gP={resolveAll:$E()},yP=GE("string"),vP=GE("text");function GE(e){return{resolveAll:$E(e==="text"?bP:void 0),tokenize:t};function t(n){const i=this,o=this.parser.constructs[e],s=n.attempt(o,l,c);return l;function l(p){return f(p)?s(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),s(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=o[p];let g=-1;if(m)for(;++g<m.length;){const v=m[g];if(!v.previous||v.previous.call(i,i.previous))return!0}return!1}}}function $E(e){return t;function t(n,i){let o=-1,s;for(;++o<=n.length;)s===void 0?n[o]&&n[o][1].type==="data"&&(s=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==s+2&&(n[s][1].end=n[o-1][1].end,n.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(n,i):n}}function bP(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],o=t.sliceStream(i);let s=o.length,l=-1,c=0,d;for(;s--;){const f=o[s];if(typeof f=="string"){for(l=f.length;f.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(f===-2)d=!0,c++;else if(f!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:i.start._bufferIndex+l,_index:i.start._index+s,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...f.start},i.start.offset===i.end.offset?Object.assign(i,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const xP={42:cn,43:cn,45:cn,48:cn,49:cn,50:cn,51:cn,52:cn,53:cn,54:cn,55:cn,56:cn,57:cn,62:PE},SP={91:Ez},_P={[-2]:$p,[-1]:$p,32:$p},CP={35:Oz,42:Kc,45:[h_,Kc],60:Nz,61:h_,95:Kc,96:d_,126:d_},wP={38:jE,92:HE},EP={[-5]:qp,[-4]:qp,[-3]:qp,33:Jz,38:jE,42:rg,60:[tz,Vz],91:tP,92:[Lz,HE],93:ky,95:rg,96:pz},kP={null:[rg,gP]},TP={null:[42,95]},AP={null:[]},LP=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:TP,contentInitial:SP,disable:AP,document:xP,flow:CP,flowInitial:_P,insideSpan:kP,string:wP,text:EP},Symbol.toStringTag,{value:"Module"}));function RP(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},s=[];let l=[],c=[];const d={attempt:z(M),check:z(O),consume:C,enter:k,exit:D,interrupt:z(O,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:x,parser:e,previous:null,sliceSerialize:g,sliceStream:v,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&s.push(t),f;function m(q){return l=Hn(l,q),w(),l[l.length-1]!==null?[]:(j(t,0),f.events=Ey(s,f.events,f),f.events)}function g(q,U){return DP(v(q),U)}function v(q){return OP(l,q)}function x(){const{_bufferIndex:q,_index:U,line:Z,column:X,offset:W}=i;return{_bufferIndex:q,_index:U,line:Z,column:X,offset:W}}function S(q){o[q.line]=q.column,ee()}function w(){let q;for(;i._index<l.length;){const U=l[i._index];if(typeof U=="string")for(q=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===q&&i._bufferIndex<U.length;)_(U.charCodeAt(i._bufferIndex));else _(U)}}function _(q){p=p(q)}function C(q){Ce(q)?(i.line++,i.column=1,i.offset+=q===-3?2:1,ee()):q!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===l[i._index].length&&(i._bufferIndex=-1,i._index++)),f.previous=q}function k(q,U){const Z=U||{};return Z.type=q,Z.start=x(),f.events.push(["enter",Z,f]),c.push(Z),Z}function D(q){const U=c.pop();return U.end=x(),f.events.push(["exit",U,f]),U}function M(q,U){j(q,U.from)}function O(q,U){U.restore()}function z(q,U){return Z;function Z(X,W,P){let $,ne,ue,R;return Array.isArray(X)?Y(X):"tokenize"in X?Y([X]):H(X);function H(re){return ce;function ce(xe){const pe=xe!==null&&re[xe],ze=xe!==null&&re.null,He=[...Array.isArray(pe)?pe:pe?[pe]:[],...Array.isArray(ze)?ze:ze?[ze]:[]];return Y(He)(xe)}}function Y(re){return $=re,ne=0,re.length===0?P:I(re[ne])}function I(re){return ce;function ce(xe){return R=F(),ue=re,re.partial||(f.currentConstruct=re),re.name&&f.parser.constructs.disable.null.includes(re.name)?fe():re.tokenize.call(U?Object.assign(Object.create(f),U):f,d,le,fe)(xe)}}function le(re){return q(ue,R),W}function fe(re){return R.restore(),++ne<$.length?I($[ne]):P}}}function j(q,U){q.resolveAll&&!s.includes(q)&&s.push(q),q.resolve&&Ci(f.events,U,f.events.length-U,q.resolve(f.events.slice(U),f)),q.resolveTo&&(f.events=q.resolveTo(f.events,f))}function F(){const q=x(),U=f.previous,Z=f.currentConstruct,X=f.events.length,W=Array.from(c);return{from:X,restore:P};function P(){i=q,f.previous=U,f.currentConstruct=Z,f.events.length=X,c=W,ee()}}function ee(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function OP(e,t){const n=t.start._index,i=t.start._bufferIndex,o=t.end._index,s=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(i,s)];else{if(l=e.slice(n,o),i>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(i):l.shift()}s>0&&l.push(e[o].slice(0,s))}return l}function DP(e,t){let n=-1;const i=[];let o;for(;++n<e.length;){const s=e[n];let l;if(typeof s=="string")l=s;else switch(s){case-5:{l="\r";break}case-4:{l=`
|
|
12
|
-
`;break}case-3:{l=`\r
|
|
13
|
-
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&o)continue;l=" ";break}default:l=String.fromCharCode(s)}o=s===-2,i.push(l)}return i.join("")}function MP(e){const i={constructs:BN([LP,...(e||{}).extensions||[]]),content:o(YN),defined:[],document:o(KN),flow:o(pP),lazy:{},string:o(yP),text:o(vP)};return i;function o(s){return l;function l(c){return RP(i,s,c)}}}function IP(e){for(;!BE(e););return e}const p_=/[\0\t\n\r]/g;function NP(){let e=1,t="",n=!0,i;return o;function o(s,l,c){const d=[];let f,p,m,g,v;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(l||void 0).decode(s)),m=0,t="",n&&(s.charCodeAt(0)===65279&&m++,n=void 0);m<s.length;){if(p_.lastIndex=m,f=p_.exec(s),g=f&&f.index!==void 0?f.index:s.length,v=s.charCodeAt(g),!f){t=s.slice(m);break}if(v===10&&m===g&&i)d.push(-3),i=void 0;else switch(i&&(d.push(-5),i=void 0),m<g&&(d.push(s.slice(m,g)),e+=g-m),v){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:i=!0,e=1}m=g+1}return c&&(i&&d.push(-5),t&&d.push(t),d.push(null)),d}}const zP=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function PP(e){return e.replace(zP,HP)}function HP(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),s=o===120||o===88;return zE(n.slice(s?2:1),s?16:10)}return wy(n)||e}const qE={}.hasOwnProperty;function jP(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),BP(n)(IP(MP(n).document().write(NP()(e,t,!0))))}function BP(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Wt),autolinkProtocol:F,autolinkEmail:F,atxHeading:s(rt),blockQuote:s(ze),characterEscape:F,characterReference:F,codeFenced:s(He),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(He,l),codeText:s(st,l),codeTextData:F,data:F,codeFlowValue:F,definition:s(je),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(Ve),hardBreakEscape:s(en),hardBreakTrailing:s(en),htmlFlow:s(Bt,l),htmlFlowData:F,htmlText:s(Bt,l),htmlTextData:F,image:s(Ut),label:l,link:s(Wt),listItem:s(ni),listItemValue:g,listOrdered:s(dt,m),listUnordered:s(dt),paragraph:s(mf),reference:I,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(rt),strong:s(gf),thematicBreak:s(yf)},exit:{atxHeading:d(),atxHeadingSequence:M,autolink:d(),autolinkEmail:pe,autolinkProtocol:xe,blockQuote:d(),characterEscapeValue:ee,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:re,characterReference:ce,codeFenced:d(w),codeFencedFence:S,codeFencedFenceInfo:v,codeFencedFenceMeta:x,codeFlowValue:ee,codeIndented:d(_),codeText:d(W),codeTextData:ee,data:ee,definition:d(),definitionDestinationString:D,definitionLabelString:C,definitionTitleString:k,emphasis:d(),hardBreakEscape:d(U),hardBreakTrailing:d(U),htmlFlow:d(Z),htmlFlowData:ee,htmlText:d(X),htmlTextData:ee,image:d($),label:ue,labelText:ne,lineEnding:q,link:d(P),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:le,resourceDestinationString:R,resourceTitleString:H,resource:Y,setextHeading:d(j),setextHeadingLineSequence:z,setextHeadingText:O,strong:d(),thematicBreak:d()}};WE(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(oe){let he={type:"root",children:[]};const _e={stack:[he],tokenStack:[],config:t,enter:c,exit:f,buffer:l,resume:p,data:n},Oe=[];let $e=-1;for(;++$e<oe.length;)if(oe[$e][1].type==="listOrdered"||oe[$e][1].type==="listUnordered")if(oe[$e][0]==="enter")Oe.push($e);else{const mn=Oe.pop();$e=o(oe,mn,$e)}for($e=-1;++$e<oe.length;){const mn=t[oe[$e][0]];qE.call(mn,oe[$e][1].type)&&mn[oe[$e][1].type].call(Object.assign({sliceSerialize:oe[$e][2].sliceSerialize},_e),oe[$e][1])}if(_e.tokenStack.length>0){const mn=_e.tokenStack[_e.tokenStack.length-1];(mn[1]||m_).call(_e,void 0,mn[0])}for(he.position={start:Nr(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:Nr(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e<t.transforms.length;)he=t.transforms[$e](he)||he;return he}function o(oe,he,_e){let Oe=he-1,$e=-1,mn=!1,Ei,Xt,St,tn;for(;++Oe<=_e;){const Je=oe[Oe];switch(Je[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Je[0]==="enter"?$e++:$e--,tn=void 0;break}case"lineEndingBlank":{Je[0]==="enter"&&(Ei&&!tn&&!$e&&!St&&(St=Oe),tn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:tn=void 0}if(!$e&&Je[0]==="enter"&&Je[1].type==="listItemPrefix"||$e===-1&&Je[0]==="exit"&&(Je[1].type==="listUnordered"||Je[1].type==="listOrdered")){if(Ei){let ur=Oe;for(Xt=void 0;ur--;){const $n=oe[ur];if($n[1].type==="lineEnding"||$n[1].type==="lineEndingBlank"){if($n[0]==="exit")continue;Xt&&(oe[Xt][1].type="lineEndingBlank",mn=!0),$n[1].type="lineEnding",Xt=ur}else if(!($n[1].type==="linePrefix"||$n[1].type==="blockQuotePrefix"||$n[1].type==="blockQuotePrefixWhitespace"||$n[1].type==="blockQuoteMarker"||$n[1].type==="listItemIndent"))break}St&&(!Xt||St<Xt)&&(Ei._spread=!0),Ei.end=Object.assign({},Xt?oe[Xt][1].start:Je[1].end),oe.splice(Xt||Oe,0,["exit",Ei,Je[2]]),Oe++,_e++}if(Je[1].type==="listItemPrefix"){const ur={type:"listItem",_spread:!1,start:Object.assign({},Je[1].start),end:void 0};Ei=ur,oe.splice(Oe,0,["enter",ur,Je[2]]),Oe++,_e++,St=void 0,tn=!0}}}return oe[he][1]._spread=mn,_e}function s(oe,he){return _e;function _e(Oe){c.call(this,oe(Oe),Oe),he&&he.call(this,Oe)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(oe,he,_e){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([he,_e||void 0]),oe.position={start:Nr(he.start),end:void 0}}function d(oe){return he;function he(_e){oe&&oe.call(this,_e),f.call(this,_e)}}function f(oe,he){const _e=this.stack.pop(),Oe=this.tokenStack.pop();if(Oe)Oe[0].type!==oe.type&&(he?he.call(this,oe,Oe[0]):(Oe[1]||m_).call(this,oe,Oe[0]));else throw new Error("Cannot close `"+oe.type+"` ("+fl({start:oe.start,end:oe.end})+"): it’s not open");_e.position.end=Nr(oe.end)}function p(){return HN(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function g(oe){if(this.data.expectingFirstListItemValue){const he=this.stack[this.stack.length-2];he.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function v(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.lang=oe}function x(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.meta=oe}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.value=oe.replace(/(\r?\n|\r)$/g,"")}function C(oe){const he=this.resume(),_e=this.stack[this.stack.length-1];_e.label=he,_e.identifier=Ga(this.sliceSerialize(oe)).toLowerCase()}function k(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.title=oe}function D(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.url=oe}function M(oe){const he=this.stack[this.stack.length-1];if(!he.depth){const _e=this.sliceSerialize(oe).length;he.depth=_e}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function z(oe){const he=this.stack[this.stack.length-1];he.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function F(oe){const _e=this.stack[this.stack.length-1].children;let Oe=_e[_e.length-1];(!Oe||Oe.type!=="text")&&(Oe=Yt(),Oe.position={start:Nr(oe.start),end:void 0},_e.push(Oe)),this.stack.push(Oe)}function ee(oe){const he=this.stack.pop();he.value+=this.sliceSerialize(oe),he.position.end=Nr(oe.end)}function q(oe){const he=this.stack[this.stack.length-1];if(this.data.atHardBreak){const _e=he.children[he.children.length-1];_e.position.end=Nr(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(he.type)&&(F.call(this,oe),ee.call(this,oe))}function U(){this.data.atHardBreak=!0}function Z(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.value=oe}function X(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.value=oe}function W(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.value=oe}function P(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=he,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function $(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=he,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function ne(oe){const he=this.sliceSerialize(oe),_e=this.stack[this.stack.length-2];_e.label=PP(he),_e.identifier=Ga(he).toLowerCase()}function ue(){const oe=this.stack[this.stack.length-1],he=this.resume(),_e=this.stack[this.stack.length-1];if(this.data.inReference=!0,_e.type==="link"){const Oe=oe.children;_e.children=Oe}else _e.alt=he}function R(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.url=oe}function H(){const oe=this.resume(),he=this.stack[this.stack.length-1];he.title=oe}function Y(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function le(oe){const he=this.resume(),_e=this.stack[this.stack.length-1];_e.label=he,_e.identifier=Ga(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function fe(oe){this.data.characterReferenceType=oe.type}function re(oe){const he=this.sliceSerialize(oe),_e=this.data.characterReferenceType;let Oe;_e?(Oe=zE(he,_e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Oe=wy(he);const $e=this.stack[this.stack.length-1];$e.value+=Oe}function ce(oe){const he=this.stack.pop();he.position.end=Nr(oe.end)}function xe(oe){ee.call(this,oe);const he=this.stack[this.stack.length-1];he.url=this.sliceSerialize(oe)}function pe(oe){ee.call(this,oe);const he=this.stack[this.stack.length-1];he.url="mailto:"+this.sliceSerialize(oe)}function ze(){return{type:"blockquote",children:[]}}function He(){return{type:"code",lang:null,meta:null,value:""}}function st(){return{type:"inlineCode",value:""}}function je(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ve(){return{type:"emphasis",children:[]}}function rt(){return{type:"heading",depth:0,children:[]}}function en(){return{type:"break"}}function Bt(){return{type:"html",value:""}}function Ut(){return{type:"image",title:null,url:"",alt:null}}function Wt(){return{type:"link",title:null,url:"",children:[]}}function dt(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function ni(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function mf(){return{type:"paragraph",children:[]}}function gf(){return{type:"strong",children:[]}}function Yt(){return{type:"text",value:""}}function yf(){return{type:"thematicBreak"}}}function Nr(e){return{line:e.line,column:e.column,offset:e.offset}}function WE(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?WE(e,i):UP(e,i)}}function UP(e,t){let n;for(n in t)if(qE.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function m_(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+fl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+fl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+fl({start:t.start,end:t.end})+") is still open")}function VP(e){const t=this;t.parser=n;function n(i){return jP(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function FP(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function GP(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
14
|
-
`}]}function $P(e,t){const n=t.value?t.value+`
|
|
15
|
-
`:"",i={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(i.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};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 qP(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function WP(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function YP(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=es(i.toLowerCase()),s=e.footnoteOrder.indexOf(i);let l,c=e.footnoteCounts.get(i);c===void 0?(c=0,e.footnoteOrder.push(i),l=e.footnoteOrder.length):l=s+1,c+=1,e.footnoteCounts.set(i,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function XP(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KP(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function YE(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const o=e.all(t),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=i:o.push({type:"text",value:i}),o}function QP(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return YE(e,t);const o={src:es(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(o.title=i.title);const s={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,s),e.applyData(t,s)}function ZP(e,t){const n={src:es(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function JP(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function eH(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return YE(e,t);const o={href:es(i.url||"")};i.title!==null&&i.title!==void 0&&(o.title=i.title);const s={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function tH(e,t){const n={href:es(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function nH(e,t,n){const i=e.all(t),o=n?iH(n):XE(t),s={},l=[];if(typeof t.checked=="boolean"){const p=i[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},i.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 c=-1;for(;++c<i.length;){const p=i[c];(o||c!==0||p.type!=="element"||p.tagName!=="p")&&l.push({type:"text",value:`
|
|
16
|
-
`}),p.type==="element"&&p.tagName==="p"&&!o?l.push(...p.children):l.push(p)}const d=i[i.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
|
|
17
|
-
`});const f={type:"element",tagName:"li",properties:s,children:l};return e.patch(t,f),e.applyData(t,f)}function iH(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=XE(n[i])}return t}function XE(e){const t=e.spread;return t??e.children.length>1}function rH(e,t){const n={},i=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<i.length;){const l=i[o];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function oH(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aH(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function sH(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lH(e,t){const n=e.all(t),i=n.shift(),o=[];if(i){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],l),o.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=xy(t.children[1]),d=LE(t.children[t.children.length-1]);c&&d&&(l.position={start:c,end:d}),o.push(l)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,s),e.applyData(t,s)}function uH(e,t,n){const i=n?n.children:void 0,s=(i?i.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const m=t.children[d],g={},v=l?l[d]:void 0;v&&(g.align=v);let x={type:"element",tagName:s,properties:g,children:[]};m&&(x.children=e.all(m),e.patch(m,x),x=e.applyData(m,x)),f.push(x)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function cH(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const g_=9,y_=32;function dH(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),o=0;const s=[];for(;i;)s.push(v_(t.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=n.exec(t);return s.push(v_(t.slice(o),o>0,!1)),s.join("")}function v_(e,t,n){let i=0,o=e.length;if(t){let s=e.codePointAt(i);for(;s===g_||s===y_;)i++,s=e.codePointAt(i)}if(n){let s=e.codePointAt(o-1);for(;s===g_||s===y_;)o--,s=e.codePointAt(o-1)}return o>i?e.slice(i,o):""}function fH(e,t){const n={type:"text",value:dH(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function hH(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const pH={blockquote:FP,break:GP,code:$P,delete:qP,emphasis:WP,footnoteReference:YP,heading:XP,html:KP,imageReference:QP,image:ZP,inlineCode:JP,linkReference:eH,link:tH,listItem:nH,list:rH,paragraph:oH,root:aH,strong:sH,table:lH,tableCell:cH,tableRow:uH,text:fH,thematicBreak:hH,toml:gc,yaml:gc,definition:gc,footnoteDefinition:gc};function gc(){}const KE=-1,Kd=0,pl=1,pd=2,Ty=3,Ay=4,Ly=5,Ry=6,QE=7,ZE=8,JE=typeof self=="object"?self:globalThis,b_=(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 JE[e](t)},mH=(e,t)=>{const n=(o,s)=>(e.set(s,o),o),i=o=>{if(e.has(o))return e.get(o);const[s,l]=t[o];switch(s){case Kd:case KE:return n(l,o);case pl:{const c=n([],o);for(const d of l)c.push(i(d));return c}case pd:{const c=n({},o);for(const[d,f]of l)c[i(d)]=i(f);return c}case Ty:return n(new Date(l),o);case Ay:{const{source:c,flags:d}=l;return n(new RegExp(c,d),o)}case Ly:{const c=n(new Map,o);for(const[d,f]of l)c.set(i(d),i(f));return c}case Ry:{const c=n(new Set,o);for(const d of l)c.add(i(d));return c}case QE:{const{name:c,message:d}=l;return n(typeof JE[c]=="function"?b_(c,d):new Error(d),o)}case ZE:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(b_(s,l),o)};return i},x_=e=>mH(new Map,e)(0),vo="",{toString:gH}={},{keys:yH}=Object,tl=e=>{const t=typeof e;if(t!=="object"||!e)return[Kd,t];const n=gH.call(e).slice(8,-1);switch(n){case"Array":return[pl,vo];case"Object":return[pd,vo];case"Date":return[Ty,vo];case"RegExp":return[Ay,vo];case"Map":return[Ly,vo];case"Set":return[Ry,vo];case"DataView":return[pl,n]}return n.includes("Array")?[pl,n]:e instanceof Error?[QE,e.name||"Error"]:[pd,n]},yc=([e,t])=>e===Kd&&(t==="function"||t==="symbol"),vH=(e,t,n,i)=>{const o=(l,c)=>{const d=i.push(l)-1;return n.set(c,d),d},s=l=>{if(n.has(l))return n.get(l);let[c,d]=tl(l);switch(c){case Kd:{let p=l;switch(d){case"bigint":c=ZE,p=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([KE],l)}return o([c,p],l)}case pl:{if(d){let g=l;return d==="DataView"?g=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(g=new Uint8Array(l)),o([d,[...g]],l)}const p=[],m=o([c,p],l);for(const g of l)p.push(s(g));return m}case pd:{if(d)switch(d){case"BigInt":return o([d,l.toString()],l);case"Boolean":case"Number":case"String":return o([d,l.valueOf()],l)}if(t&&"toJSON"in l)return s(l.toJSON());const p=[],m=o([c,p],l);for(const g of yH(l))(e||!yc(tl(l[g])))&&p.push([s(g),s(l[g])]);return m}case Ty:return o([c,isNaN(l.getTime())?vo:l.toISOString()],l);case Ay:{const{source:p,flags:m}=l;return o([c,{source:p,flags:m}],l)}case Ly:{const p=[],m=o([c,p],l);for(const[g,v]of l)(e||!(yc(tl(g))||yc(tl(v))))&&p.push([s(g),s(v)]);return m}case Ry:{const p=[],m=o([c,p],l);for(const g of l)(e||!yc(tl(g)))&&p.push(s(g));return m}}const{message:f}=l;return o([c,{name:d,message:f}],l)};return s},S_=(e,{json:t,lossy:n}={})=>{const i=[];return vH(!(t||n),!!t,new Map,i)(e),i},md=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?x_(S_(e,t)):structuredClone(e):(e,t)=>x_(S_(e,t));function bH(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function xH(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function SH(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||bH,i=e.options.footnoteBackLabel||xH,o=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),g=es(m.toLowerCase());let v=0;const x=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++v<=S;){x.length>0&&x.push({type:"text",value:" "});let C=typeof n=="string"?n:n(d,v);typeof C=="string"&&(C={type:"text",value:C}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(d,v),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const w=p[p.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const C=w.children[w.children.length-1];C&&C.type==="text"?C.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...x)}else p.push(...x);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(p,!0)};e.patch(f,_),c.push(_)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...md(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
18
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
19
|
-
`}]}}const ek=(function(e){if(e==null)return EH;if(typeof e=="function")return Qd(e);if(typeof e=="object")return Array.isArray(e)?_H(e):CH(e);if(typeof e=="string")return wH(e);throw new Error("Expected function, string, or object as test")});function _H(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ek(e[n]);return Qd(i);function i(...o){let s=-1;for(;++s<t.length;)if(t[s].apply(this,o))return!0;return!1}}function CH(e){const t=e;return Qd(n);function n(i){const o=i;let s;for(s in e)if(o[s]!==t[s])return!1;return!0}}function wH(e){return Qd(t);function t(n){return n&&n.type===e}}function Qd(e){return t;function t(n,i,o){return!!(kH(n)&&e.call(this,n,typeof i=="number"?i:void 0,o||void 0))}}function EH(){return!0}function kH(e){return e!==null&&typeof e=="object"&&"type"in e}const tk=[],TH=!0,__=!1,AH="skip";function LH(e,t,n,i){let o;typeof t=="function"&&typeof n!="function"?(i=n,n=t):o=t;const s=ek(o),l=i?-1:1;c(e,void 0,[])();function c(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const v=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(d.type+(v?"<"+v+">":""))+")"})}return g;function g(){let v=tk,x,S,w;if((!t||s(d,f,p[p.length-1]||void 0))&&(v=RH(n(d,p)),v[0]===__))return v;if("children"in d&&d.children){const _=d;if(_.children&&v[0]!==AH)for(S=(i?_.children.length:-1)+l,w=p.concat(_);S>-1&&S<_.children.length;){const C=_.children[S];if(x=c(C,S,w)(),x[0]===__)return x;S=typeof x[1]=="number"?x[1]:S+l}}return v}}}function RH(e){return Array.isArray(e)?e:typeof e=="number"?[TH,e]:e==null?tk:[e]}function nk(e,t,n,i){let o,s,l;typeof t=="function"&&typeof n!="function"?(s=void 0,l=t,o=n):(s=t,l=n,o=i),LH(e,s,c,o);function c(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return l(d,m,p)}}const og={}.hasOwnProperty,OH={};function DH(e,t){const n=t||OH,i=new Map,o=new Map,s=new Map,l={...pH,...n.handlers},c={all:f,applyData:IH,definitionById:i,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:l,one:d,options:n,patch:MH,wrap:zH};return nk(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?i:o,g=String(p.identifier).toUpperCase();m.has(g)||m.set(g,p)}}),c;function d(p,m){const g=p.type,v=c.handlers[g];if(og.call(c.handlers,g)&&v)return v(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(g)){if("children"in p){const{children:S,...w}=p,_=md(w);return _.children=c.all(p),_}return md(p)}return(c.options.unknownHandler||NH)(c,p,m)}function f(p){const m=[];if("children"in p){const g=p.children;let v=-1;for(;++v<g.length;){const x=c.one(g[v],p);if(x){if(v&&g[v-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=C_(x.value)),!Array.isArray(x)&&x.type==="element")){const S=x.children[0];S&&S.type==="text"&&(S.value=C_(S.value))}Array.isArray(x)?m.push(...x):m.push(x)}}}return m}}function MH(e,t){e.position&&(t.position=gN(e))}function IH(e,t){let n=t;if(e&&e.data){const i=e.data.hName,o=e.data.hChildren,s=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const l="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:l}}n.type==="element"&&s&&Object.assign(n.properties,md(s)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function NH(e,t){const n=t.data||{},i="value"in t&&!(og.call(n,"hProperties")||og.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function zH(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
|
|
20
|
-
`});++i<e.length;)i&&n.push({type:"text",value:`
|
|
21
|
-
`}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
22
|
-
`}),n}function C_(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function w_(e,t){const n=DH(e,t),i=n.one(e,void 0),o=SH(n),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
|
|
23
|
-
`},o),s}function PH(e,t){return e&&"run"in e?async function(n,i){const o=w_(n,{file:i,...t});await e.run(o,i)}:function(n,i){return w_(n,{file:i,...e||t})}}function E_(e){if(e)throw e}var Wp,k_;function HH(){if(k_)return Wp;k_=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},s=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var g;for(g in f);return typeof g>"u"||e.call(f,g)},l=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},c=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(i)return i(f,p).value}else return;return f[p]};return Wp=function d(){var f,p,m,g,v,x,S=arguments[0],w=1,_=arguments.length,C=!1;for(typeof S=="boolean"&&(C=S,S=arguments[1]||{},w=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});w<_;++w)if(f=arguments[w],f!=null)for(p in f)m=c(S,p),g=c(f,p),S!==g&&(C&&g&&(s(g)||(v=o(g)))?(v?(v=!1,x=m&&o(m)?m:[]):x=m&&s(m)?m:{},l(S,{name:p,newValue:d(C,x,g)})):typeof g<"u"&&l(S,{name:p,newValue:g}));return S},Wp}var jH=HH();const Yp=Bd(jH);function ag(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 BH(){const e=[],t={run:n,use:i};return t;function n(...o){let s=-1;const l=o.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...o);function c(d,...f){const p=e[++s];let m=-1;if(d){l(d);return}for(;++m<o.length;)(f[m]===null||f[m]===void 0)&&(f[m]=o[m]);o=f,p?UH(p,c)(...f):l(null,...f)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function UH(e,t){let n;return i;function i(...l){const c=e.length>l.length;let d;c&&l.push(o);try{d=e.apply(this,l)}catch(f){const p=f;if(c&&n)throw p;return o(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(s,o):d instanceof Error?o(d):s(d))}function o(l,...c){n||(n=!0,t(l,...c))}function s(l){o(null,l)}}const di={basename:VH,dirname:FH,extname:GH,join:$H,sep:"/"};function VH(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ul(e);let n=0,i=-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){n=o+1;break}}else i<0&&(s=!0,i=o+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let l=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){n=o+1;break}}else l<0&&(s=!0,l=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(i=o):(c=-1,i=l));return n===i?i=l:i<0&&(i=e.length),e.slice(n,i)}function FH(e){if(Ul(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function GH(e){Ul(e);let t=e.length,n=-1,i=0,o=-1,s=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){i=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?o<0?o=t:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||n<0||s===0||s===1&&o===n-1&&o===i+1?"":e.slice(o,n)}function $H(...e){let t=-1,n;for(;++t<e.length;)Ul(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":qH(n)}function qH(e){Ul(e);const t=e.codePointAt(0)===47;let n=WH(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function WH(e,t){let n="",i=0,o=-1,s=0,l=-1,c,d;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(o===l-1||s===1))if(o!==l-1&&s===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",i=0):(n=n.slice(0,d),i=n.length-1-n.lastIndexOf("/")),o=l,s=0;continue}}else if(n.length>0){n="",i=0,o=l,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),i=l-o-1;o=l,s=0}else c===46&&s>-1?s++:s=-1}return n}function Ul(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const YH={cwd:XH};function XH(){return"/"}function sg(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function KH(e){if(typeof e=="string")e=new URL(e);else if(!sg(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 QH(e)}function QH(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===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 Xp=["history","path","basename","stem","extname","dirname"];class ik{constructor(t){let n;t?sg(t)?n={path:t}:typeof t=="string"||ZH(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":YH.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Xp.length;){const s=Xp[i];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let o;for(o in n)Xp.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?di.basename(this.path):void 0}set basename(t){Qp(t,"basename"),Kp(t,"basename"),this.path=di.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?di.dirname(this.path):void 0}set dirname(t){T_(this.basename,"dirname"),this.path=di.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?di.extname(this.path):void 0}set extname(t){if(Kp(t,"extname"),T_(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=di.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){sg(t)&&(t=KH(t)),Qp(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?di.basename(this.path,this.extname):void 0}set stem(t){Qp(t,"stem"),Kp(t,"stem"),this.path=di.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const o=this.message(t,n,i);throw o.fatal=!0,o}info(t,n,i){const o=this.message(t,n,i);return o.fatal=void 0,o}message(t,n,i){const o=new qt(t,n,i);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 Kp(e,t){if(e&&e.includes(di.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+di.sep+"`")}function Qp(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function T_(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function ZH(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const JH=(function(e){const i=this.constructor.prototype,o=i[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,i),s}),e8={}.hasOwnProperty;class Oy extends JH{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=BH()}copy(){const t=new Oy;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(Yp(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(em("data",this.frozen),this.namespace[t]=n,this):e8.call(this.namespace,t)&&this.namespace[t]||void 0:t?(em("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[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const o=n.call(t,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=vc(t),i=this.parser||this.Parser;return Zp("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),Zp("process",this.parser||this.Parser),Jp("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(s,l){const c=vc(t),d=i.parse(c);i.run(d,c,function(p,m,g){if(p||!m||!g)return f(p);const v=m,x=i.stringify(v,g);i8(x)?g.value=x:g.result=x,f(p,g)});function f(p,m){p||!m?l(p):s?s(m):n(void 0,m)}}}processSync(t){let n=!1,i;return this.freeze(),Zp("processSync",this.parser||this.Parser),Jp("processSync",this.compiler||this.Compiler),this.process(t,o),L_("processSync","process",n),i;function o(s,l){n=!0,E_(s),i=l}}run(t,n,i){A_(t),this.freeze();const o=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?s(void 0,i):new Promise(s);function s(l,c){const d=vc(n);o.run(t,d,f);function f(p,m,g){const v=m||t;p?c(p):l?l(v):i(void 0,v,g)}}}runSync(t,n){let i=!1,o;return this.run(t,n,s),L_("runSync","run",i),o;function s(l,c){E_(l),o=c,i=!0}}stringify(t,n){this.freeze();const i=vc(n),o=this.compiler||this.Compiler;return Jp("stringify",o),A_(t),o(t,i)}use(t,...n){const i=this.attachers,o=this.namespace;if(em("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else l(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function l(f){if(!("plugins"in f)&&!("settings"in f))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");c(f.plugins),f.settings&&(o.settings=Yp(!0,o.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];s(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,g=-1;for(;++m<i.length;)if(i[m][0]===f){g=m;break}if(g===-1)i.push([f,...p]);else if(p.length>0){let[v,...x]=p;const S=i[g][1];ag(S)&&ag(v)&&(v=Yp(!0,S,v)),i[g]=[f,v,...x]}}}}const t8=new Oy().freeze();function Zp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Jp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function em(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 A_(e){if(!ag(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function L_(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function vc(e){return n8(e)?e:new ik(e)}function n8(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function i8(e){return typeof e=="string"||r8(e)}function r8(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const o8="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",R_=[],O_={allowDangerousHtml:!0},a8=/^(https?|ircs?|mailto|xmpp)$/i,s8=[{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 l8(e){const t=u8(e),n=c8(e);return d8(t.runSync(t.parse(n),n),e)}function u8(e){const t=e.rehypePlugins||R_,n=e.remarkPlugins||R_,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...O_}:O_;return t8().use(VP).use(n).use(PH,i).use(t)}function c8(e){const t=e.children||"",n=new ik;return typeof t=="string"&&(n.value=t),n}function d8(e,t){const n=t.allowedElements,i=t.allowElement,o=t.components,s=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||f8;for(const p of s8)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+o8+p.id,void 0);return nk(e,f),SN(e,{Fragment:T.Fragment,components:o,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0});function f(p,m,g){if(p.type==="raw"&&g&&typeof m=="number")return l?g.children.splice(m,1):g.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let v;for(v in Gp)if(Object.hasOwn(Gp,v)&&Object.hasOwn(p.properties,v)){const x=p.properties[v],S=Gp[v];(S===null||S.includes(p.tagName))&&(p.properties[v]=d(String(x||""),v,p))}}if(p.type==="element"){let v=n?!n.includes(p.tagName):s?s.includes(p.tagName):!1;if(!v&&i&&typeof m=="number"&&(v=!i(p,m,g)),v&&g&&typeof m=="number")return c&&p.children?g.children.splice(m,1,...p.children):g.children.splice(m,1),m}}}function f8(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||i!==-1&&t>i||a8.test(e.slice(0,t))?e:""}const h8=["code","em","strong"];function p8(e){return e.replace(/\s+/g," ").trim()}const m8="mx-[0.08em] box-decoration-clone rounded-[0.22em] bg-[color-mix(in_srgb,var(--foreground)_8%,transparent)] px-[0.32em] py-[0.12em] font-mono text-[0.86em] font-medium not-italic",g8={code:({children:e})=>N.createElement("code",{className:m8},e),strong:({children:e})=>N.createElement("strong",{className:"font-semibold"},e)};function To(e){const t=p8(e.text);return t===""?null:N.createElement(l8,{skipHtml:!0,unwrapDisallowed:!0,allowedElements:[...h8],components:g8,children:t})}function lg(e){return T.jsxs("div",{className:e.className,children:[e.kicker!==void 0?e.kickerExtra!==void 0?T.jsxs("div",{className:"mb-2 flex items-center justify-between gap-3",children:[T.jsx("p",{className:"font-mono text-[11px] tracking-wide text-muted-foreground",children:e.kicker}),e.kickerExtra]}):T.jsx("p",{className:"mb-2 font-mono text-[11px] tracking-wide text-muted-foreground",children:e.kicker}):null,T.jsx("h1",{className:"mb-3 font-serif text-[1.75rem] leading-snug text-foreground",children:e.title}),e.children]})}function y8(e){const{group:t,index:n,groups:i,partTitle:o,onOpenGroup:s}=e;return T.jsxs(lg,{kicker:o!==void 0?`${o} · ${dl(n)}`:dl(n),title:t.title,kickerExtra:T.jsx(yE,{prompt:w1({group:t.id}),scope:"group"}),children:[T.jsx("p",{className:"mb-2 font-mono text-[11px] tracking-wide text-muted-foreground",children:"Why"}),T.jsx("p",{className:"mb-6 font-serif text-lg leading-relaxed text-foreground",children:T.jsx(To,{text:t.why})}),T.jsx("p",{className:"mb-2 font-mono text-[11px] tracking-wide text-muted-foreground",children:"What"}),T.jsx("p",{className:"mb-5 leading-relaxed text-foreground",children:T.jsx(To,{text:t.summary})}),t.dependsOn.length>0?T.jsxs("p",{className:"mb-5 text-muted-foreground",children:["Depends on"," ",t.dependsOn.map((l,c)=>{const d=i.find(p=>p.id===l),f=d!==void 0?`${dl(Kw(i,l))} ${d.title}`:l;return T.jsxs("span",{children:[c>0?", ":"",T.jsx(Tt,{type:"button",variant:"link",className:"h-auto p-0",onClick:()=>s(l),children:f})]},l)})]}):null,t.lookFor.length>0?T.jsx("ul",{className:"mb-2 list-disc space-y-2 pl-5 leading-relaxed",children:t.lookFor.map((l,c)=>T.jsx("li",{children:T.jsx(To,{text:l})},c))}):null,t.staleCount>0?T.jsxs("p",{className:"mt-4 text-warn",children:[t.staleCount," hunk ref",t.staleCount===1?"":"s"," no longer match live git. Git wins; the pointer is flagged, not replaced."]}):null]})}const rk="comprehende:rail-collapsed";function v8(){try{return localStorage.getItem(rk)==="1"}catch{return!1}}function b8(e){try{localStorage.setItem(rk,e?"1":"0")}catch{}}function x8(e){const t=e.lastIndexOf("/");return t===-1?e:e.slice(t+1)}function D_(e){const t=e.lastIndexOf("/");return t===-1?"":e.slice(0,t)}function S8(e){return/^(@@ -\d+(?:,\d+)? \+\d+(?:,\d+)? @@)/.exec(e)?.[1]??e}function _8(e){const t=[],n=/^(?:export\s+)?(?:async\s+)?(?:function|class|type|interface|enum)\s+([A-Za-z_][\w]*)/;for(const i of e){const s=n.exec(i.trim())?.[1];s!==void 0&&!t.includes(s)&&t.push(s)}return t}function C8(e){let t=0,n=0;for(const i of e)i.kind==="add"?t+=1:i.kind==="del"&&(n+=1);return{added:t,removed:n}}function bc(e){let t=0;return e.map(n=>{const i=C8(n.hunks.flatMap(s=>s.lines)),o={path:n.path,kind:n.kind??"text",status:n.status??"modified",patch:n.patch,added:n.added??i.added,removed:n.removed??i.removed,hunkCount:Math.max(n.hunks.length,1),firstIndex:t,complete:n.complete!==!1,hunks:n.hunks};return n.oldPath!==void 0&&(o.oldPath=n.oldPath),t+=o.hunkCount,o})}function Qc(e,t){return e.findIndex(n=>t>=n.firstIndex&&t<n.firstIndex+n.hunkCount)}function w8(e){const{file:t}=e;return t.kind==="image"?T.jsx("span",{className:"font-mono text-[11px] text-muted-foreground",children:t.status}):T.jsxs("span",{className:"font-mono text-[11px] tabular-nums",children:[T.jsxs("span",{className:"text-del",children:["−",t.removed]})," ",T.jsxs("span",{className:"text-add",children:["+",t.added]})]})}function E8(e){const{files:t,activeHunk:n,viewedPaths:i}=e,o=Math.max(0,Qc(t,n)),s=N.useRef(null),[l,c]=N.useState(()=>{try{const f=new URLSearchParams(window.location.search).get("rail");if(f==="collapsed")return!0;if(f==="open")return!1}catch{}try{return v8()}catch{return!1}}),d=()=>{const f=!l;c(f);try{b8(f)}catch{}try{const p=new URL(window.location.href);f?p.searchParams.set("rail","collapsed"):p.searchParams.delete("rail"),window.history.replaceState(null,"",p)}catch{}};return N.useEffect(()=>{s.current?.querySelector(`[data-rail="${o}"]`)?.scrollIntoView({block:"nearest",behavior:"instant"})},[o]),l?T.jsxs("div",{className:"mt-4 flex min-h-0 gap-0 max-sm:flex-col",children:[T.jsx("div",{className:"min-w-0 flex-1 space-y-8",children:e.children}),T.jsxs("div",{className:"sticky top-4 flex h-[calc(100vh-8rem)] shrink-0 self-start flex-col items-center gap-3 border-l border-border bg-card py-3",style:{width:"44px"},children:[T.jsx(Tt,{size:"icon-sm",variant:"ghost",className:"size-7","aria-label":"Expand file list",onClick:d,children:T.jsx(DS,{className:"size-4 rotate-180"})}),T.jsxs("div",{className:"font-mono text-[10px] leading-none text-muted-foreground [writing-mode:vertical-lr]",children:[t.length," files"]})]})]}):T.jsxs("div",{className:"mt-4 flex min-h-0 gap-6 max-sm:flex-col",children:[T.jsx("div",{className:"min-w-0 flex-1 space-y-8",children:e.children}),T.jsxs("nav",{ref:s,"aria-label":"Files in group",className:"flex h-[calc(100vh-7rem)] w-[300px] shrink-0 flex-col overflow-hidden rounded-lg border border-border bg-card sticky top-4 self-start max-lg:w-[240px] max-sm:w-full max-sm:h-auto max-sm:max-h-[40vh]",children:[T.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3 py-2",children:[T.jsxs("p",{className:"flex-1 font-mono text-[11px] tabular-nums text-muted-foreground",children:[t.filter(f=>i.has(f.path)).length," of ",t.length," viewed"]}),T.jsx(Tt,{size:"icon-sm",variant:"ghost",className:"size-7 shrink-0","aria-label":"Collapse file list",onClick:d,children:T.jsx(DS,{className:"size-4"})})]}),T.jsx("div",{className:"flex-1 overflow-auto py-2",children:T.jsx("ul",{className:"space-y-0.5 px-2",children:t.map((f,p)=>{const m=i.has(f.path),g=p===o;return T.jsx("li",{children:T.jsxs("button",{"data-rail":p,onClick:()=>e.onSelect(f.firstIndex),className:Ye("flex w-full items-start gap-2.5 rounded-md px-2.5 py-2 text-left transition-colors",g?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:[T.jsx(_M,{className:"mt-0.5 size-3.5 shrink-0"}),T.jsxs("span",{className:"min-w-0 flex-1",children:[T.jsx("span",{className:Ye("block truncate font-mono text-xs leading-tight",m&&"opacity-60"),children:x8(f.path)}),D_(f.path)?T.jsx("span",{className:"block truncate font-mono text-[10px] leading-tight opacity-50",children:D_(f.path)}):null,T.jsxs("span",{className:"mt-0.5 flex items-center gap-1.5",children:[T.jsx(w8,{file:f}),f.hunkCount>1?T.jsxs("span",{className:"font-mono text-[10px] text-muted-foreground",children:[f.hunkCount," hunks"]}):null]})]}),T.jsx("span",{role:"checkbox","aria-checked":m,tabIndex:0,onClick:v=>{v.stopPropagation(),e.onViewed(f.path,!m)},onKeyDown:v=>{(v.key===" "||v.key==="Enter")&&(v.preventDefault(),v.stopPropagation(),e.onViewed(f.path,!m))},className:Ye("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded border transition-colors",m?"border-primary bg-primary text-primary-foreground":"border-input bg-background"),"aria-label":m?"Mark as not viewed":"Mark as viewed",children:m?T.jsx(yM,{className:"size-2.5"}):null})]})},f.path)})})})]})]})}const Dy="diffs-container";(()=>{try{return!1}catch{return!1}})();const k8=/(?=^From [a-f0-9]+ .+$)/m,ok=/(?=^diff --git)/gm,T8=new RegExp("(?<=\\n)"),A8=/^(---|\+\+\+)\s+([^\t\r\n]+)/,L8=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,R8=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,O8=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,My="header-prefix",Iy="header-filename-suffix",Ny="header-metadata",Vl="header-custom",mt={dark:"pierre-dark",light:"pierre-light"},D8="data-theme-css",M8="data-unsafe-css",I8="data-diffs-scrollbar-measure",ak="--diffs-scrollbar-gutter-measured",N8=1e5,zy={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...zy});const z8=Object.freeze({fromStart:0,fromEnd:0}),gd={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},sk={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},$a=new Set;let qa=null;function lk(e){$a.add(e),qa??=requestAnimationFrame(uk)}function ug(e){$a.delete(e)&&$a.size===0&&qa!=null&&(cancelAnimationFrame(qa),qa=null)}function uk(e){const t=new Set($a);$a.clear();for(const n of t)try{n(e)}catch(i){console.error(i)}$a.size>0?qa=requestAnimationFrame(uk):qa=null}function yd(e,t,n){if(e===t||e==null||t==null)return e===t;const i=new Set(n),o=Object.keys(e),s=new Set(Object.keys(t));for(const l of o)if(s.delete(l),!i.has(l)&&(!(l in t)||e[l]!==t[l]))return!1;for(const l of Array.from(s))if(!i.has(l))return!1;return!0}function ts(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function Zd(e,t){const n=e?.theme??mt,i=t?.theme??mt,o=M_(e),s=M_(t);return ts(n,i)&&yd(e,t,["theme","parseDiffOptions"])&&yd(o,s)}function M_(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function cg(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function rr(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}const P8=new TextEncoder,H8=new TextDecoder("utf-8",{ignoreBOM:!0}),j8=/[\uD800-\uDFFF]/,dg=1024;let ja=new Uint8Array(dg);function ck(){ja.length!==dg&&(ja=new Uint8Array(dg))}function wt(e){if(e.length===0)return e;if(j8.test(e))return JSON.parse(JSON.stringify(e));const t=e.length*3;ja.length<t&&(ja=new Uint8Array(t));const{written:n}=P8.encodeInto(e,ja);return H8.decode(ja.subarray(0,n))}function wi(e,t){return e-(t===0?0:1)}function hn(e,t){return wi(e,t)+t}const B8=4096,U8=.5;function V8(e){for(const t of e.hunks){for(let n=0;n<t.hunkContent.length;n++){const i=t.hunkContent[n];if(i.type!=="change")continue;const o=G8(e,i);o!=null&&(t.hunkContent.splice(n,1,...o),n+=o.length-1)}F8(t,e)}}function F8(e,t){const{hunkContent:n}=e;for(let i=1;i<n.length;i++){const o=n[i],s=n[i-1];if(o.type!=="change"||o.additions>0&&o.deletions>0||s.type!=="context")continue;const l=o.additions>0,c=l?t.additionLines:t.deletionLines,d=l?o.additionLineIndex:o.deletionLineIndex,f=l?o.additions:o.deletions,p=c[d]??"";if(p.trim()!=="")continue;let m=!0;for(let w=1;w<f;w++)if(c[d+w]!==p){m=!1;break}if(!m)continue;let g=0;for(;g<s.lines&&t.additionLines[s.additionLineIndex+s.lines-1-g]===p;)g++;if(g===0||i===1&&g===s.lines)continue;o.additionLineIndex-=g,o.deletionLineIndex-=g;const v=o.additionLineIndex+o.additions,x=o.deletionLineIndex+o.deletions,S=n[i+1];S?.type==="context"?(S.lines+=g,S.additionLineIndex=v,S.deletionLineIndex=x):n.splice(i+1,0,{type:"context",lines:g,additionLineIndex:v,deletionLineIndex:x}),s.lines-=g,s.lines===0&&(n.splice(i-1,1),i--)}}function G8(e,t){const{deletions:n,additions:i,deletionLineIndex:o,additionLineIndex:s}=t,l=Math.min(n,i),c=Math.abs(i-n);if(l===0||c===0||l*(c+1)>B8)return null;const d=[];for(let S=0;S<n;S++)d.push(I_(e.deletionLines[o+S]??""));const f=[];for(let S=0;S<i;S++)f.push(I_(e.additionLines[s+S]??""));const p=i>n;let m=0,g=-1;for(let S=0;S<=c;S++){let w=0;for(let _=0;_<l;_++)w+=q8(d[_+(p?0:S)],f[_+(p?S:0)]);S===0?g=w+l*U8:w>g&&(g=w,m=S)}if(m===0)return null;const v=[],x=(S,w,_,C)=>{(S>0||w>0)&&v.push({type:"change",deletions:S,additions:w,deletionLineIndex:_,additionLineIndex:C})};return p?(x(0,m,o,s),x(l,l,o,s+m),x(0,i-l-m,o+l,s+m+l)):(x(m,0,o,s),x(l,l,o+m,s),x(n-l-m,0,o+m+l,s+l)),v}const $8=/\s+/g;function I_(e){return e.replace($8,"")}function q8(e,t){if(e===t)return 1;const n=Math.max(e.length,t.length),i=Math.min(e.length,t.length);if(i===0)return 0;let o=0;for(;o<i&&e[o]===t[o];)o++;let s=0;for(;s<i-o&&e[e.length-1-s]===t[t.length-1-s];)s++;return(o+s)/n}function W8(e,t,n){try{return Y8(e,t,n)}finally{ck()}}function Y8(e,t,n=!1){const i=r5(e),o=i?Z8(e):J8(e);let s;const l=[];for(const c of o){if(i&&!ok.test(c)){if(s==null)s=wt(c);else{if(n)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",c)}continue}else if(!i&&!e5(c)){if(s==null)s=wt(c);else{if(n)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",c)}continue}const d=dk(c,{cacheKey:t!=null?`${t}-${l.length}`:void 0,isGitDiff:i,throwOnError:n});d!=null&&l.push(d)}return{patchMetadata:s,files:l}}function X8(e,t){try{return dk(e,t)}finally{ck()}}function dk(e,{cacheKey:t,isGitDiff:n=ok.test(e),oldFile:i,newFile:o,throwOnError:s=!1}={}){let l=0;const c=mk(e,"@@ ");let d;const f=i==null||o==null;let p=0,m=0;for(const g of c){const v=fk(g),x=v[0];if(x==null){if(s)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",g);continue}const S=pk(x);let w=0,_=0;if(S==null||d==null){if(d!=null){if(s)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",g);continue}d={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:f,additionLines:!f&&i!=null&&o!=null?N_(o.contents):[],deletionLines:!f&&i!=null&&o!=null?N_(i.contents):[],cacheKey:H_(t)},d.additionLines.length===1&&o?.contents===""&&(d.additionLines.length=0),d.deletionLines.length===1&&i?.contents===""&&(d.deletionLines.length=0);for(const F of v){if(F.startsWith("diff --git")){const q=F.trim().match(R8),U=q?.[1]??q?.[2],Z=q?.[3]??q?.[4];if(U==null||Z==null){if(s)throw Error("parsePatchContent: invalid git diff header");console.error("parsePatchContent: invalid git diff header",F);continue}d.name=wt(Z.trim()),U!==Z&&(d.prevName=wt(U.trim()));continue}const ee=F.startsWith("---")||F.startsWith("+++")?F.match(n?L8:A8):null;if(ee!=null){const[,q,U]=ee;if(q==="---"&&U!=="/dev/null"){const Z=wt(U.trim());d.prevName=Z,d.name=Z}else q==="+++"&&U!=="/dev/null"&&(d.name=wt(U.trim()))}else if(n){if(F.startsWith("new mode ")&&(d.mode=wt(F.slice(8).trim())),F.startsWith("old mode ")&&(d.prevMode=wt(F.slice(8).trim())),F.startsWith("new file mode")&&(d.type="new",d.mode=wt(F.slice(13).trim())),F.startsWith("deleted file mode")&&(d.type="deleted",d.mode=wt(F.slice(17).trim())),F.startsWith("similarity index")&&(F.startsWith("similarity index 100%")?d.type="rename-pure":d.type="rename-changed"),F.startsWith("index ")){const[,q,U,Z]=F.trim().match(O8)??[];q!=null&&(d.prevObjectId=wt(q)),U!=null&&(d.newObjectId=wt(U)),Z!=null&&(d.mode=wt(Z))}F.startsWith("rename from ")&&(d.prevName=wt(F.slice(12).trim())),F.startsWith("rename to ")&&(d.name=wt(F.slice(10).trim()))}}continue}let C,k;for(;v.length>0&&(v[v.length-1]===`
|
|
24
|
-
`||v[v.length-1]==="\r"||v[v.length-1]===`\r
|
|
25
|
-
`||v[v.length-1]==="");)v.pop();const{additionStart:D,deletionStart:M}=S;p=f?p:M-1,m=f?m:D-1;const O={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:S.additionCount,additionStart:D,additionLines:w,deletionCount:S.deletionCount,deletionStart:M,deletionLines:_,deletionLineIndex:p,additionLineIndex:m,hunkContent:[],hunkContext:H_(S.hunkContext),hunkSpecs:wt(x),noEOFCRAdditions:!1,noEOFCRDeletions:!1};let z=0,j=0;for(let F=1;F<v.length;F++){const ee=v[F];if(z>=O.additionCount&&j>=O.deletionCount&&!ee.startsWith("\\")){if(s&&t5(ee)&&!n5(ee))throw Error("parsePatchContent: hunk has more lines than expected");break}const q=ee[0];if(q!=="+"&&q!=="-"&&q!==" "&&q!=="\\"){if(s)throw Error("parsePatchContent: invalid hunk line");console.error(`parseLineType: Invalid firstChar: "${q}", full line: "${ee}"`),console.error("processFile: invalid rawLine:",ee);continue}const U=o5(q);if(U==="addition"){if(s&&z>=O.additionCount)throw Error("parsePatchContent: hunk has too many addition lines");const Z=tm(ee);(C==null||C.type!=="change")&&(C=nm("change",p,m),O.hunkContent.push(C)),m++,z++,f&&d.additionLines.push(Z),C.additions++,w++,k="addition"}else if(U==="deletion"){if(s&&j>=O.deletionCount)throw Error("parsePatchContent: hunk has too many deletion lines");const Z=tm(ee);(C==null||C.type!=="change")&&(C=nm("change",p,m),O.hunkContent.push(C)),p++,j++,f&&d.deletionLines.push(Z),C.deletions++,_++,k="deletion"}else if(U==="context"){if(s&&(j>=O.deletionCount||z>=O.additionCount))throw Error("parsePatchContent: hunk has too many context lines");const Z=tm(ee);(C==null||C.type!=="context")&&(C=nm("context",p,m),O.hunkContent.push(C)),m++,p++,z++,j++,f&&(d.deletionLines.push(Z),d.additionLines.push(Z)),C.lines++,k="context"}else if(U==="metadata"&&C!=null){if(C.type==="context"?(O.noEOFCRAdditions=!0,O.noEOFCRDeletions=!0):k==="deletion"?O.noEOFCRDeletions=!0:k==="addition"&&(O.noEOFCRAdditions=!0),f&&(k==="addition"||k==="context")){const Z=d.additionLines.length-1;Z>=0&&(d.additionLines[Z]=rr(d.additionLines[Z]))}if(f&&(k==="deletion"||k==="context")){const Z=d.deletionLines.length-1;Z>=0&&(d.deletionLines[Z]=rr(d.deletionLines[Z]))}}}if(s&&(z!==O.additionCount||j!==O.deletionCount))throw Error("parsePatchContent: hunk line count mismatch");O.additionLines=w,O.deletionLines=_,O.collapsedBefore=Math.max(wi(O.additionStart,O.additionCount)-l,0),d.hunks.push(O),l=hn(O.additionStart,O.additionCount);for(const F of O.hunkContent)F.type==="context"?(O.splitLineCount+=F.lines,O.unifiedLineCount+=F.lines):(O.splitLineCount+=Math.max(F.additions,F.deletions),O.unifiedLineCount+=F.deletions+F.additions);O.splitLineStart=d.splitLineCount+O.collapsedBefore,O.unifiedLineStart=d.unifiedLineCount+O.collapsedBefore,d.splitLineCount+=O.collapsedBefore+O.splitLineCount,d.unifiedLineCount+=O.collapsedBefore+O.unifiedLineCount}if(d!=null){if(s&&f&&!n&&d.hunks.length===0)throw Error("parsePatchContent: unified file has no hunks");if(d.hunks.length>0&&!f&&d.additionLines.length>0&&d.deletionLines.length>0){const g=d.hunks[d.hunks.length-1],v=hn(g.additionStart,g.additionCount),x=d.additionLines.length,S=Math.max(x-v,0);d.splitLineCount+=S,d.unifiedLineCount+=S}return n||(d.prevName!=null&&d.name!==d.prevName?d.hunks.length>0?d.type="rename-changed":d.type="rename-pure":(i==null||i.contents==="")&&o!=null&&o.contents!==""?d.type="new":i!=null&&i.contents!==""&&(o==null||o.contents==="")&&(d.type="deleted")),d.type!=="rename-pure"&&d.type!=="rename-changed"&&(d.prevName=void 0),V8(d),d}}function K8(e,t,n=!1){const i=[],o=Q8(e)?e.split(k8):[e];for(const s of o)try{i.push(W8(s,t!=null?`${t}-${i.length}`:void 0,n))}catch(l){if(n)throw l;console.error(l)}return i}function Q8(e){return e.startsWith("From ")||e.includes(`
|
|
26
|
-
From `)}function N_(e){const t=fk(e);for(let n=0;n<t.length;n++)t[n]=wt(t[n]);return t}function fk(e){if(e.length===0)return[""];const t=[];let n=0;for(;;){const i=e.indexOf(`
|
|
27
|
-
`,n);if(i===-1)break;t.push(e.slice(n,i+1)),n=i+1}return n<e.length&&t.push(e.slice(n)),t}function Z8(e){return mk(e,"diff --git")}function J8(e){if(e.length===0)return[""];const t=[];let n=0,i=0,o=0,s=0,l=!1;for(;i<e.length;){const c=fg(e,i);if(o<=0&&s<=0){if(hk(e,i)){i>n&&t.push(e.slice(n,i)),n=i,l=!0,i=fg(e,c);continue}if(l&&e.startsWith("@@ -",i)){const f=pk(e.slice(i,c));f!=null&&(o=f.deletionCount,s=f.additionCount)}i=c;continue}const d=e[i];if(d==="\\"){i=c;continue}d===" "?(o=Math.max(o-1,0),s=Math.max(s-1,0)):d==="-"?o=Math.max(o-1,0):d==="+"&&(s=Math.max(s-1,0)),i=c}return t.push(e.slice(n)),t}function e5(e){return hk(e,0)}function hk(e,t){const n=fg(e,t);return z_(e,t,"---")&&z_(e,n,"+++")}function z_(e,t,n){if(!e.startsWith(n,t))return!1;const i=e[t+n.length];if(i!==" "&&i!==" ")return!1;for(let o=t+n.length+1;o<e.length;o++){const s=e[o];if(s===`
|
|
28
|
-
`||s==="\r")break;if(s!==" "&&s!==" ")return!0}return!1}function fg(e,t){const n=e.indexOf(`
|
|
29
|
-
`,t);return n===-1?e.length:n+1}function t5(e){const t=e[0];return t==="+"||t==="-"||t===" "}function n5(e){if(!e.startsWith("--"))return!1;for(let t=2;t<e.length;t++){const n=e[t];if(n!==" "&&n!==" "&&n!==`
|
|
30
|
-
`&&n!=="\r")return!1}return!0}function pk(e){if(!e.startsWith("@@ -"))return;let t=4;const n=xc(e,t);if(n==null)return;const i=n.value;t=n.endIndex;let o=1;if(e[t]===","){const p=xc(e,t+1);if(p==null)return;o=p.value,t=p.endIndex}if(e[t]!==" "||e[t+1]!=="+")return;t+=2;const s=xc(e,t);if(s==null)return;const l=s.value;t=s.endIndex;let c=1;if(e[t]===","){const p=xc(e,t+1);if(p==null)return;c=p.value,t=p.endIndex}if(e[t]!==" "||e[t+1]!=="@"||e[t+2]!=="@")return;let d;const f=t+3;return e[f]===" "&&(d=i5(e.slice(f+1))),{additionCount:c,additionStart:l,deletionCount:o,deletionStart:i,hunkContext:d}}function xc(e,t){let n=t,i=0;for(;n<e.length;n++){const o=e.charCodeAt(n)-48;if(o<0||o>9)break;i=i*10+o}if(n!==t)return{value:i,endIndex:n}}function i5(e){return e.endsWith(`\r
|
|
31
|
-
`)?e.slice(0,-2):e.endsWith(`
|
|
32
|
-
`)?e.slice(0,-1):e}function r5(e){return e.startsWith("diff --git")||e.includes(`
|
|
33
|
-
diff --git`)}function mk(e,t){if(e.length===0)return[""];const n=`
|
|
34
|
-
${t}`,i=e.startsWith(t)?0:P_(e,n,0);if(i===-1)return[e];const o=[];i>0&&o.push(e.slice(0,i));let s=i;for(;;){const l=P_(e,n,s+1);if(l===-1)break;o.push(e.slice(s,l)),s=l}return o.push(e.slice(s)),o}function P_(e,t,n){const i=e.indexOf(t,n);return i===-1?-1:i+1}function H_(e){return e==null?e:wt(e)}function o5(e){return e===" "?"context":e==="\\"?"metadata":e==="+"?"addition":"deletion"}function tm(e){const t=e.slice(1);return wt(t===""?`
|
|
35
|
-
`:t)}function nm(e,t,n){return e==="change"?{type:"change",additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:"context",lines:0,additionLineIndex:n,deletionLineIndex:t}}class Py{diff(t,n,i={}){let o;typeof i=="function"?(o=i,i={}):"callback"in i&&(o=i.callback);const s=this.castInput(t,i),l=this.castInput(n,i),c=this.removeEmpty(this.tokenize(s,i)),d=this.removeEmpty(this.tokenize(l,i));return this.diffWithOptionsObj(c,d,i,o)}diffWithOptionsObj(t,n,i,o){var s;const l=C=>{if(C=this.postProcess(C,i),o){setTimeout(function(){o(C)},0);return}else return C},c=n.length,d=t.length;let f=1,p=c+d;i.maxEditLength!=null&&(p=Math.min(p,i.maxEditLength));const m=(s=i.timeout)!==null&&s!==void 0?s:1/0,g=Date.now()+m,v=[{oldPos:-1,lastComponent:void 0}];let x=this.extractCommon(v[0],n,t,0,i);if(v[0].oldPos+1>=d&&x+1>=c)return l(this.buildValues(v[0].lastComponent,n,t));let S=-1/0,w=1/0;const _=()=>{for(let C=Math.max(S,-f);C<=Math.min(w,f);C+=2){let k;const D=v[C-1],M=v[C+1];D&&(v[C-1]=void 0);let O=!1;if(M){const j=M.oldPos-C;O=M&&0<=j&&j<c}const z=D&&D.oldPos+1<d;if(!O&&!z){v[C]=void 0;continue}if(!z||O&&D.oldPos<M.oldPos?k=this.addToPath(M,!0,!1,0,i):k=this.addToPath(D,!1,!0,1,i),x=this.extractCommon(k,n,t,C,i),k.oldPos+1>=d&&x+1>=c)return l(this.buildValues(k.lastComponent,n,t))||!0;v[C]=k,k.oldPos+1>=d&&(w=Math.min(w,C-1)),x+1>=c&&(S=Math.max(S,C+1))}f++};if(o)(function C(){setTimeout(function(){if(f>p||Date.now()>g)return o(void 0);_()||C()},0)})();else for(;f<=p&&Date.now()<=g;){const C=_();if(C)return C}}addToPath(t,n,i,o,s){const l=t.lastComponent;return l&&!s.oneChangePerToken&&l.added===n&&l.removed===i?{oldPos:t.oldPos+o,lastComponent:{count:l.count+1,added:n,removed:i,previousComponent:l.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:i,previousComponent:l}}}extractCommon(t,n,i,o,s){const l=n.length,c=i.length;let d=t.oldPos,f=d-o,p=0;for(;f+1<l&&d+1<c&&this.equals(i[d+1],n[f+1],s);)f++,d++,p++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return p&&!s.oneChangePerToken&&(t.lastComponent={count:p,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=d,f}equals(t,n,i){return i.comparator?i.comparator(t,n):t===n||!!i.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let i=0;i<t.length;i++)t[i]&&n.push(t[i]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,i){const o=[];let s;for(;t;)o.push(t),s=t.previousComponent,delete t.previousComponent,t=s;o.reverse();const l=o.length;let c=0,d=0,f=0;for(;c<l;c++){const p=o[c];if(p.removed)p.value=this.join(i.slice(f,f+p.count)),f+=p.count;else{if(!p.added&&this.useLongestToken){let m=n.slice(d,d+p.count);m=m.map(function(g,v){const x=i[f+v];return x.length>g.length?x:g}),p.value=this.join(m)}else p.value=this.join(n.slice(d,d+p.count));d+=p.count,p.added||(f+=p.count)}}return o}}class a5 extends Py{}const s5=new a5;function l5(e,t,n){return s5.diff(e,t,n)}const j_="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 u5 extends Py{tokenize(t){const n=new RegExp(`(\\r?\\n)|[${j_}]+|[^\\S\\n\\r]+|[^${j_}]`,"ug");return t.match(n)||[]}}const c5=new u5;function d5(e,t,n){return c5.diff(e,t,n)}class f5 extends Py{constructor(){super(...arguments),this.tokenize=p5}equals(t,n,i){return i.ignoreWhitespace?((!i.newlineIsToken||!t.includes(`
|
|
36
|
-
`))&&(t=t.trim()),(!i.newlineIsToken||!n.includes(`
|
|
37
|
-
`))&&(n=n.trim())):i.ignoreNewlineAtEof&&!i.newlineIsToken&&(t.endsWith(`
|
|
38
|
-
`)&&(t=t.slice(0,-1)),n.endsWith(`
|
|
39
|
-
`)&&(n=n.slice(0,-1))),super.equals(t,n,i)}}const h5=new f5;function B_(e,t,n){return h5.diff(e,t,n)}function p5(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
40
|
-
`));const n=[],i=e.split(/(\n|\r\n)/);i[i.length-1]||i.pop();for(let o=0;o<i.length;o++){const s=i[o];o%2&&!t.newlineIsToken?n[n.length-1]+=s:n.push(s)}return n}function m5(e){for(let t=0;t<e.length;t++)if(e[t]<" "||e[t]>"~"||e[t]==='"'||e[t]==="\\")return!0;return!1}function zr(e){if(!m5(e))return e;let t='"';const n=new TextEncoder().encode(e);let i=0;for(;i<n.length;){const o=n[i];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"),i++}return t+='"',t}const U_={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function V_(e,t,n,i,o,s,l){let c;l?typeof l=="function"?c={callback:l}:c=l:c={},typeof c.context>"u"&&(c.context=4);const d=c.context;if(c.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(c.callback){const{callback:p}=c;B_(n,i,Object.assign(Object.assign({},c),{callback:m=>{const g=f(m);p(g)}}))}else return f(B_(n,i,c));function f(p){if(!p)return;p.push({value:"",lines:[]});function m(C){return C.map(function(k){return" "+k})}const g=[];let v=0,x=0,S=[],w=1,_=1;for(let C=0;C<p.length;C++){const k=p[C],D=k.lines||y5(k.value);if(k.lines=D,k.added||k.removed){if(!v){const M=p[C-1];v=w,x=_,M&&(S=d>0?m(M.lines.slice(-d)):[],v-=S.length,x-=S.length)}for(const M of D)S.push((k.added?"+":"-")+M);k.added?_+=D.length:w+=D.length}else{if(v)if(D.length<=d*2&&C<p.length-2)for(const M of m(D))S.push(M);else{const M=Math.min(D.length,d);for(const z of m(D.slice(0,M)))S.push(z);const O={oldStart:v,oldLines:w-v+M,newStart:x,newLines:_-x+M,lines:S};g.push(O),v=0,x=0,S=[]}w+=D.length,_+=D.length}}for(const C of g)for(let k=0;k<C.lines.length;k++)C.lines[k].endsWith(`
|
|
41
|
-
`)?C.lines[k]=C.lines[k].slice(0,-1):(C.lines.splice(k+1,0,"\"),k++);return{oldFileName:e,newFileName:t,oldHeader:o,newHeader:s,hunks:g}}}function hg(e,t){var n,i,o,s,l,c;if(t||(t=U_),Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(p=>p.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(p=>hg(p,t)).join(`
|
|
42
|
-
`)}const d=[];if(e.isGit){if(t=U_,!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 p=e.oldFileName,m=e.newFileName;e.isCreate&&p==="/dev/null"?p=m.replace(/^b\//,"a/"):e.isDelete&&m==="/dev/null"&&(m=p.replace(/^a\//,"b/")),d.push("diff --git "+zr(p)+" "+zr(m)),e.isDelete&&d.push("deleted file mode "+((n=e.oldMode)!==null&&n!==void 0?n:"100644")),e.isCreate&&d.push("new file mode "+((i=e.newMode)!==null&&i!==void 0?i:"100644")),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(d.push("old mode "+e.oldMode),d.push("new mode "+e.newMode)),e.isRename&&(d.push("rename from "+zr(((o=e.oldFileName)!==null&&o!==void 0?o:"").replace(/^a\//,""))),d.push("rename to "+zr(((s=e.newFileName)!==null&&s!==void 0?s:"").replace(/^b\//,"")))),e.isCopy&&(d.push("copy from "+zr(((l=e.oldFileName)!==null&&l!==void 0?l:"").replace(/^a\//,""))),d.push("copy to "+zr(((c=e.newFileName)!==null&&c!==void 0?c:"").replace(/^b\//,""))))}else t.includeIndex&&e.oldFileName==e.newFileName&&e.oldFileName!==void 0&&d.push("Index: "+e.oldFileName),t.includeUnderline&&d.push("===================================================================");const f=e.hunks.length>0;t.includeFileHeaders&&e.oldFileName!==void 0&&e.newFileName!==void 0&&(!e.isGit||f)&&(d.push("--- "+zr(e.oldFileName)+(e.oldHeader?" "+e.oldHeader:"")),d.push("+++ "+zr(e.newFileName)+(e.newHeader?" "+e.newHeader:"")));for(let p=0;p<e.hunks.length;p++){const m=e.hunks[p],g=m.oldLines===0?m.oldStart-1:m.oldStart,v=m.newLines===0?m.newStart-1:m.newStart;d.push("@@ -"+g+","+m.oldLines+" +"+v+","+m.newLines+" @@");for(const x of m.lines)d.push(x)}return d.join(`
|
|
43
|
-
`)+`
|
|
44
|
-
`}function g5(e,t,n,i,o,s,l){if(typeof l=="function"&&(l={callback:l}),l?.callback){const{callback:c}=l;V_(e,t,n,i,o,s,Object.assign(Object.assign({},l),{callback:d=>{c(d?hg(d,l.headerOptions):void 0)}}))}else{const c=V_(e,t,n,i,o,s,l);return c?hg(c,l?.headerOptions):void 0}}function y5(e){const t=e.endsWith(`
|
|
45
|
-
`),n=e.split(`
|
|
46
|
-
`).map(i=>i+`
|
|
47
|
-
`);return t?n.pop():n.push(n.pop().slice(0,-1)),n}const v5="/dev/null";function zo(e,t,n,i=!1){if(e===null&&t===null)throw new Error("parseDiffFromFile: You must pass oldFile, newFile, or both");const o=e??F_(),s=t??F_(),l=X8(g5(o.name,s.name,o.contents,s.contents,o.header,s.header,n),{cacheKey:(()=>{const d=e?.cacheKey??e?.name,f=t?.cacheKey??t?.name;return d!=null&&f!=null?d+":"+f:d??f})(),oldFile:o,newFile:s,throwOnError:i});if(l==null)throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");e===null?(l.type="new",l.prevName=void 0):t===null&&(l.type="deleted",l.prevName=void 0);const c=t?.lang??(t===null?e?.lang:void 0);return c!=null&&(l.lang=c),l}function F_(){return{name:v5,contents:""}}function Xn(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function xi(e){return{type:"text",value:e}}function Te({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function vd({name:e,width:t=16,height:n=16,properties:i}){return Te({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...i},children:[Te({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function b5(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 Ba(e){return Te({tagName:"div",properties:{"data-gutter":""},children:e})}function gk(e,t,n,i={}){return Te({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...i},children:t!=null?[Te({tagName:"span",properties:{"data-line-number-content":""},children:[xi(`${t}`)]})]:void 0})}function wn(e,t,n){return Te({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function x5(){return Te({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[vd({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function S5(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function Sc(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}const _5=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],G_={}.hasOwnProperty;function C5(e,t){const n=t||{};function i(o,...s){let l=i.invalid;const c=i.handlers;if(o&&G_.call(o,e)){const d=String(o[e]);l=G_.call(c,d)?c[d]:i.unknown}if(l)return l.call(this,o,...s)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}const w5=/["&'<>`]/g,E5=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,k5=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,T5=/[|\\{}()[\]^$+*?.]/g,$_=new WeakMap;function A5(e,t){if(e=e.replace(t.subset?L5(t.subset):w5,i),t.subset||t.escapeOnly)return e;return e.replace(E5,n).replace(k5,i);function n(o,s,l){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,l.charCodeAt(s+2),t)}function i(o,s,l){return t.format(o.charCodeAt(0),l.charCodeAt(s+1),t)}}function L5(e){let t=$_.get(e);return t||(t=R5(e),$_.set(e,t)),t}function R5(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(T5,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const O5=/[\dA-Fa-f]/;function D5(e,t,n){const i="&#x"+e.toString(16).toUpperCase();return n&&t&&!O5.test(String.fromCharCode(t))?i:i+";"}const M5=/\d/;function I5(e,t,n){const i="&#"+String(e);return n&&t&&!M5.test(String.fromCharCode(t))?i:i+";"}const N5=["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"],im={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:"€"},z5=["cent","copy","divide","gt","lt","not","para","times"],yk={}.hasOwnProperty,pg={};let _c;for(_c in im)yk.call(im,_c)&&(pg[im[_c]]=_c);const P5=/[^\dA-Za-z]/;function H5(e,t,n,i){const o=String.fromCharCode(e);if(yk.call(pg,o)){const s=pg[o],l="&"+s;return n&&N5.includes(s)&&!z5.includes(s)&&(!i||t&&t!==61&&P5.test(String.fromCharCode(t)))?l:l+";"}return""}function j5(e,t,n){let i=D5(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=H5(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){const s=I5(e,t,n.omitOptionalSemicolons);s.length<i.length&&(i=s)}return o&&(!n.useShortestReferences||o.length<i.length)?o:i}function Wa(e,t){return A5(e,Object.assign({format:j5},t))}const B5=/^>|^->|<!--|-->|--!>|<!-$/g,U5=[">"],V5=["<",">"];function F5(e,t,n,i){return i.settings.bogusComments?"<?"+Wa(e.value,Object.assign({},i.settings.characterReferences,{subset:U5}))+">":"<!--"+e.value.replace(B5,o)+"-->";function o(s){return Wa(s,Object.assign({},i.settings.characterReferences,{subset:V5}))}}function G5(e,t,n,i){return"<!"+(i.settings.upperDoctype?"DOCTYPE":"doctype")+(i.settings.tightDoctype?"":" ")+"html>"}function q_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,o=n.indexOf(t);for(;o!==-1;)i++,o=n.indexOf(t,o+t.length);return i}const At=bk(1),vk=bk(-1),$5=[];function bk(e){return t;function t(n,i,o){const s=n?n.children:$5;let l=(i||0)+e,c=s[l];if(!o)for(;c&&Yd(c);)l+=e,c=s[l];return c}}const q5={}.hasOwnProperty;function xk(e){return t;function t(n,i,o){return q5.call(e,n.tagName)&&e[n.tagName](n,i,o)}}const Hy=xk({body:Y5,caption:rm,colgroup:rm,dd:Z5,dt:Q5,head:rm,html:W5,li:K5,optgroup:J5,option:e6,p:X5,rp:W_,rt:W_,tbody:n6,td:Y_,tfoot:i6,th:Y_,thead:t6,tr:r6});function rm(e,t,n){const i=At(n,t,!0);return!i||i.type!=="comment"&&!(i.type==="text"&&Yd(i.value.charAt(0)))}function W5(e,t,n){const i=At(n,t);return!i||i.type!=="comment"}function Y5(e,t,n){const i=At(n,t);return!i||i.type!=="comment"}function X5(e,t,n){const i=At(n,t);return i?i.type==="element"&&(i.tagName==="address"||i.tagName==="article"||i.tagName==="aside"||i.tagName==="blockquote"||i.tagName==="details"||i.tagName==="div"||i.tagName==="dl"||i.tagName==="fieldset"||i.tagName==="figcaption"||i.tagName==="figure"||i.tagName==="footer"||i.tagName==="form"||i.tagName==="h1"||i.tagName==="h2"||i.tagName==="h3"||i.tagName==="h4"||i.tagName==="h5"||i.tagName==="h6"||i.tagName==="header"||i.tagName==="hgroup"||i.tagName==="hr"||i.tagName==="main"||i.tagName==="menu"||i.tagName==="nav"||i.tagName==="ol"||i.tagName==="p"||i.tagName==="pre"||i.tagName==="section"||i.tagName==="table"||i.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function K5(e,t,n){const i=At(n,t);return!i||i.type==="element"&&i.tagName==="li"}function Q5(e,t,n){const i=At(n,t);return!!(i&&i.type==="element"&&(i.tagName==="dt"||i.tagName==="dd"))}function Z5(e,t,n){const i=At(n,t);return!i||i.type==="element"&&(i.tagName==="dt"||i.tagName==="dd")}function W_(e,t,n){const i=At(n,t);return!i||i.type==="element"&&(i.tagName==="rp"||i.tagName==="rt")}function J5(e,t,n){const i=At(n,t);return!i||i.type==="element"&&i.tagName==="optgroup"}function e6(e,t,n){const i=At(n,t);return!i||i.type==="element"&&(i.tagName==="option"||i.tagName==="optgroup")}function t6(e,t,n){const i=At(n,t);return!!(i&&i.type==="element"&&(i.tagName==="tbody"||i.tagName==="tfoot"))}function n6(e,t,n){const i=At(n,t);return!i||i.type==="element"&&(i.tagName==="tbody"||i.tagName==="tfoot")}function i6(e,t,n){return!At(n,t)}function r6(e,t,n){const i=At(n,t);return!i||i.type==="element"&&i.tagName==="tr"}function Y_(e,t,n){const i=At(n,t);return!i||i.type==="element"&&(i.tagName==="td"||i.tagName==="th")}const o6=xk({body:l6,colgroup:u6,head:s6,html:a6,tbody:c6});function a6(e){const t=At(e,-1);return!t||t.type!=="comment"}function s6(e){const t=new Set;for(const i of e.children)if(i.type==="element"&&(i.tagName==="base"||i.tagName==="title")){if(t.has(i.tagName))return!1;t.add(i.tagName)}const n=e.children[0];return!n||n.type==="element"}function l6(e){const t=At(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Yd(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function u6(e,t,n){const i=vk(n,t),o=At(e,-1,!0);return n&&i&&i.type==="element"&&i.tagName==="colgroup"&&Hy(i,n.children.indexOf(i),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function c6(e,t,n){const i=vk(n,t),o=At(e,-1);return n&&i&&i.type==="element"&&(i.tagName==="thead"||i.tagName==="tbody")&&Hy(i,n.children.indexOf(i),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const Cc={name:[[`
|
|
48
|
-
\f\r &/=>`.split(""),`
|
|
49
|
-
\f\r "&'/=>\``.split("")],[`\0
|
|
50
|
-
\f\r "&'/<=>`.split(""),`\0
|
|
51
|
-
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
52
|
-
\f\r &>`.split(""),`\0
|
|
53
|
-
\f\r "&'<=>\``.split("")],[`\0
|
|
54
|
-
\f\r "&'<=>\``.split(""),`\0
|
|
55
|
-
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function d6(e,t,n,i){const o=i.schema,s=o.space==="svg"?!1:i.settings.omitOptionalTags;let l=o.space==="svg"?i.settings.closeEmptyElements:i.settings.voids.includes(e.tagName.toLowerCase());const c=[];let d;o.space==="html"&&e.tagName==="svg"&&(i.schema=Bl);const f=f6(i,e.properties),p=i.all(o.space==="html"&&e.tagName==="template"?e.content:e);return i.schema=o,p&&(l=!1),(f||!s||!o6(e,t,n))&&(c.push("<",e.tagName,f?" "+f:""),l&&(o.space==="svg"||i.settings.closeSelfClosing)&&(d=f.charAt(f.length-1),(!i.settings.tightSelfClosing||d==="/"||d&&d!=='"'&&d!=="'")&&c.push(" "),c.push("/")),c.push(">")),c.push(p),!l&&(!s||!Hy(e,t,n))&&c.push("</"+e.tagName+">"),c.join("")}function f6(e,t){const n=[];let i=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const s=h6(e,o,t[o]);s&&n.push(s)}}for(;++i<n.length;){const s=e.settings.tightAttributes?n[i].charAt(n[i].length-1):void 0;i!==n.length-1&&s!=='"'&&s!=="'"&&(n[i]+=" ")}return n.join("")}function h6(e,t,n){const i=kE(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let l=e.quote,c;if(i.overloadedBoolean&&(n===i.attribute||n==="")?n=!0:(i.boolean||i.overloadedBoolean)&&(typeof n!="string"||n===i.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const d=Wa(i.attribute,Object.assign({},e.settings.characterReferences,{subset:Cc.name[o][s]}));return n===!0||(n=Array.isArray(n)?(i.commaSeparated?vE:AE)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?d:(e.settings.preferUnquoted&&(c=Wa(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Cc.unquoted[o][s]}))),c!==n&&(e.settings.quoteSmart&&q_(n,l)>q_(n,e.alternative)&&(l=e.alternative),c=l+Wa(n,Object.assign({},e.settings.characterReferences,{subset:(l==="'"?Cc.single:Cc.double)[o][s],attribute:!0}))+l),d+(c&&"="+c))}const p6=["<","&"];function Sk(e,t,n,i){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Wa(e.value,Object.assign({},i.settings.characterReferences,{subset:p6}))}function m6(e,t,n,i){return i.settings.allowDangerousHtml?e.value:Sk(e,t,n,i)}function g6(e,t,n,i){return i.all(e)}const y6=C5("type",{invalid:v6,unknown:b6,handlers:{comment:F5,doctype:G5,element:d6,raw:m6,root:g6,text:Sk}});function v6(e){throw new Error("Expected node, not `"+e+"`")}function b6(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const x6={},S6={},_6=[];function Zt(e,t){const n=t||x6,i=n.quote||'"',o=i==='"'?"'":'"';if(i!=='"'&&i!=="'")throw new Error("Invalid quote `"+i+"`, expected `'` or `\"`");return{one:C6,all:w6,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||_5,characterReferences:n.characterReferences||S6,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Bl:TE,quote:i,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function C6(e,t,n){return y6(e,t,n,this)}function w6(e){const t=[],n=e&&e.children||_6;let i=-1;for(;++i<n.length;)t[i]=this.one(n[i],i,e);return t.join("")}var _k=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;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(),ug(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?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.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return this.renderedSelectedLinesState===void 0||this.renderedEditorActiveLineState===void 0}setSelection(e,t){const n=!(e===this.selectedRange||cg(e??void 0,this.selectedRange??void 0)),i=t?.lineNumberOnly??!1,o=t?.activeLineSide!==this.selectedRangeHighlightSide||i!==this.selectedRangeLineNumberOnly;!this.isSelectionDirty()&&!n&&!o||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=i,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:n}={}){const i=e!==this.editorActiveLine,o=n!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;!this.isSelectionDirty()&&!i&&!o||(this.editorActiveLine=e,this.editorActiveLineSide=n,this.editorLineNumberOnly=t,this.renderSelection())}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:n,onLineNumberClick:i,onTokenClick:o,onMergeConflictActionClick:s}=this.options;t==null&&n==null&&i==null&&s==null&&o==null||this.options.onGutterUtilityClick!=null&&Sc(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:n,onLineLeave:i,onTokenEnter:o,onTokenLeave:s,enableGutterUtility:l=!1}=this.options;t==="disabled"&&!l&&n==null&&i==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:n}=this.options,i=t.composedPath();$i(n,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:i});const o=this.resolvePointerTarget(i);$i(n,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",o);const{onLineClick:s,onLineNumberClick:l,onLineEnter:c,onLineLeave:d,onTokenClick:f,onTokenEnter:p,onTokenLeave:m,onHunkExpand:g,onMergeConflictActionClick:v}=this.options;switch(e){case"move":{const x=om(o)&&this.hoveredLine?.lineElement===o.lineElement;Zc(o)&&this.hoveredToken?.tokenElement===o.tokenElement||(this.hoveredToken!=null&&(m?.(this.hoveredToken,t),this.clearHoveredToken()),Zc(o)&&(this.setHoveredToken(this.toTokenEventBaseProps(o)),p?.(this.hoveredToken,t))),x||(this.hoveredLine!=null&&(d?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),om(o)?(this.setHoveredLine(this.toEventBaseProps(o)),this.placeUtility(),c?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(o==null)break;if(T6(o)&&v!=null){v(o);break}if(k6(o)&&g!=null){g(o.hunkIndex,o.all||t.shiftKey?"both":o.direction,o.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!om(o))break;Zc(o)&&f!=null&&f(this.toTokenEventBaseProps(o),t);const x=this.toEventBaseProps(o);l!=null&&o.numberColumn?l({...x,event:t}):s?.({...x,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:n="disabled",onLineClick:i,onLineNumberClick:o,onLineEnter:s,onLineLeave:l,onTokenClick:c,onTokenEnter:d,onTokenLeave:f,onHunkExpand:p,onMergeConflictActionClick:m,enableGutterUtility:g=!1,enableLineSelection:v=!1,onGutterUtilityClick:x}=this.options,S=x!=null,w=n!=="disabled"||i!=null||o!=null||s!=null||l!=null||c!=null||d!=null||f!=null||p!=null||m!=null||g||v||S;w&&!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 k=[];return(t==="both"||t==="click")&&(i!=null&&k.push("onLineClick"),o!=null&&k.push("onLineNumberClick"),p!=null&&k.push("expandable hunk separators"),m!=null&&k.push("merge conflict actions")),k})()),$i(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),$i(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!w&&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 _=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",C=this.pointerSession.mode==="gutterSelecting";(!v&&_||!S&&C)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,i=e!=null,o=t!=null||n;i&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!i&&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();Sc(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 n=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(n==null)return;const{pre:i}=this;if(i==null)return;const{lineNumber:o,eventSide:s,lineIndex:l}=n;if(e.shiftKey&&this.selectedRange!=null){const c=this.getIndexesFromSelection(this.selectedRange,i.getAttribute("data-diff-type")==="split");if(c==null)return;const d=c.start<=c.end?l>=c.start:l<=c.end;this.selectionAnchor={lineNumber:d?this.selectedRange.start:this.selectedRange.end,side:d?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 c={lineNumber:o,side:s};this.selectionAnchor=c,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:c,pending:c},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{onGutterUtilityClick:t}=this.options;if(t==null)return;const n=this.currentSelectionEnds(),i=n?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),o=n?.top??i;i==null||o==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:o,current:i},this.selectionAnchor={lineNumber:o.lineNumber,side:o.side},this.updateSelection(i.lineNumber,i.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(t==null)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;const n={lineNumber:t.lineNumber,side:t.eventSide};if(S5(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{const{pointerSession:n}=this;if(e.pointerId!==n.pointerId)return;e.preventDefault();const i=this.resolveSelectionPoint(e,{source:"coordinates-first"});i!=null&&(n.current=i,this.updateSelection(i.lineNumber,i.side));const o=this.buildSelectedLineRange(n.anchor,n.current);t?.({...o}),this.selectionAnchor=void 0,this.notifySelectionEnd(o),this.notifySelectionCommitted(o),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.getCurrentSelectionRange()),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.getCurrentSelectionRange()),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=Zt(x5());const n=t.firstElementChild;if(!(n instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");n.remove(),this.gutterUtilityButton=n}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);al(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},n={lineNumber:e.end,side:e.endSide??e.side},i=this.selectionPointRowIndex(t),o=this.selectionPointRowIndex(n);if(!(i==null||o==null))return i>o?{top:n,bottom:t}:{top:t,bottom:n}}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 n=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,i=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(const o of i){if(!(o instanceof HTMLElement))continue;const s=this.resolvePointerTarget(wc(o));if(al(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 n=this.resolvePointerTarget(e);if(al(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode==="diff"?n.side:void 0}}resolveSelectionInfo(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionInfoFromPath(n,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(al(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionPointFromPath(n):void 0}resolveSelectionPath(e,t){const n=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),n);case"coordinates-first":{const i=this.pathFromCoordinates(e,n);return i!==void 0?i??void 0:this.pathFromEventPath(e.composedPath(),n)}}}pathFromCoordinates(e,t){const n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&Sc(e))){for(const n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){const n=wc(e);if(t&&Sc(n))return;const i=L6(e);return i!=null?wc(i):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=O6(R6(e));if(t==null)return;const n=this.targetForSelectionPoint(t);return n!=null?wc(n.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),n=K_(t)?t:K_(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:n}=this.options;return n!=null?n(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){const i=this.getCurrentSelectionRange();let o;if(e==null)o=null;else{const s=this.selectionAnchor?.side??t,l=this.selectionAnchor?.lineNumber??e;o=this.buildSelectionRange(l,e,s,t)}cg(i??void 0,o??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=o:(this.selectedRange=o,lk(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;const n=this.getLineIndex(e.start,e.side),i=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&i!=null?{start:t?n[1]:n[0],end:t?i[1]:i[0]}:void 0}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:this.editorActiveLine==null?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,n){if(e.range==null)return;const i=this.getIndexesFromSelection(e.range,t);if(i==null)throw console.error({rowRange:i,range:e.range}),new Error(`InteractionManager.renderSelection: No valid ${n} rowRange`);return i}getLineRenderColumns(e,t,n,i){if(this.pre==null||t==null&&i==null)return[];const{children:o}=this.pre;if(o.length>2)throw console.error(o),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const s=[];for(const l of o){const c=l.hasAttribute("data-deletions")?"deletions":l.hasAttribute("data-additions")?"additions":void 0,d=e!=null&&t!=null&&(e.highlightSide==null||c==null||e.highlightSide===c),f=n!=null&&i!=null&&(n.highlightSide==null||c==null||n.highlightSide===c);if(!d&&!f)continue;const[p,m]=l.children;if(!(p instanceof HTMLElement)||!(m instanceof HTMLElement))throw new Error("InteractionManager.renderSelection: missing gutter or content element");if(m.children.length!==p.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");s.push({content:m,gutter:p,renderEditorActiveLine:f,renderSelectedLines:d})}return s}renderSelection=()=>{ug(this.renderSelection);const e=this.getSelectionRenderState();if(this.pre==null)return;const{editorActiveLine:t,selectedLines:n}=e,i=!Q_(this.renderedSelectedLinesState,n),o=!Q_(this.renderedEditorActiveLineState,t);if(!i&&!o)return;i&&(this.renderedSelectedLinesState=void 0),o&&(this.renderedEditorActiveLineState=void 0);const s=this.pre.getAttribute("data-diff-type")==="split",l=i?this.resolveLineRenderRange(n,s,"selected-lines"):void 0,c=o?this.resolveLineRenderRange(t,s,"editor-active-line"):void 0,d=this.getLineRenderColumns(i?n:void 0,l,o?t:void 0,c),f=n.range==null||d.some(S=>S.renderSelectedLines),p=t.range==null||d.some(S=>S.renderEditorActiveLine);if(i)for(const S of this.pre.querySelectorAll("[data-selected-line]"))S.removeAttribute("data-selected-line");if(o)for(const S of this.pre.querySelectorAll("[data-editor-active-line]"))S.removeAttribute("data-editor-active-line");const m=l==null?void 0:Math.min(l.start,l.end),g=l==null?void 0:Math.max(l.start,l.end),v=m===g,x=c?.start;for(const S of d){const{content:w,gutter:_,renderEditorActiveLine:C,renderSelectedLines:k}=S,D=Math.max(k?g??-1/0:-1/0,C?x??-1/0:-1/0),M=w.children.length;for(let O=0;O<M;O++){const z=w.children[O],j=_.children[O];if(!(z instanceof HTMLElement)||!(j instanceof HTMLElement))continue;const F=this.parseLineIndex(z,s);if((F??0)>D)break;if(F!=null){if(k&&m!=null&&g!=null&&F>=m&&F<=g){let ee=v?"single":F===m?"first":F===g?"last":"";j.setAttribute("data-selected-line",ee),n.lineNumberOnly||(z.setAttribute("data-selected-line",ee),j.nextSibling instanceof HTMLElement&&z.nextSibling instanceof HTMLElement&&(z.nextSibling.hasAttribute("data-line-annotation")||z.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(v?(ee="last",z.setAttribute("data-selected-line","first")):F===m?ee="":F===g&&z.setAttribute("data-selected-line",""),z.nextSibling.setAttribute("data-selected-line",ee),j.nextSibling.setAttribute("data-selected-line",ee)))}C&&F===x&&(j.setAttribute("data-editor-active-line",""),t.lineNumberOnly||z.setAttribute("data-editor-active-line",""))}}}i&&f&&(this.renderedSelectedLinesState=n),o&&p&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}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:n,side:i,tokenElement:o,tokenText:s}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:o,tokenText:s}:{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,side:i,tokenElement:o,tokenText:s}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,i){return{start:e,end:t,...n!=null?{side:n}:{},...n!==i&&i!=null?{endSide:i}:{}}}resolvePointerTarget(e){let t=!1,n,i,o,s,l,c,d,f,p,m;for(const v of e){if(!(v instanceof HTMLElement))continue;if(m==null&&v.hasAttribute("data-merge-conflict-action")){const _=v.getAttribute("data-merge-conflict-action")??void 0,C=v.getAttribute("data-merge-conflict-conflict-index")??void 0,k=C!=null?Number.parseInt(C,10):NaN;A6(_)&&Number.isFinite(k)&&(m={kind:"merge-conflict-action",resolution:_,conflictIndex:k})}if(c==null&&v.hasAttribute("data-char")){c=v;const _=v.getAttribute("data-char");if(_!=null){const C=Number.parseInt(_,10);if(!Number.isNaN(C)){const k=v.textContent??"",D=C+k.length;(k.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(d={tokenElement:c,lineCharStart:C,lineCharEnd:D,tokenText:k});continue}}}const x=l==null?v.getAttribute("data-column-number")??void 0:void 0;if(x!=null){l=v,p=Number.parseInt(x,10),t=!0,n=J_(v),s=v.getAttribute("data-line-index")??void 0;continue}const S=o==null?v.getAttribute("data-line")??void 0:void 0;if(S!=null){o=v,p=Number.parseInt(S,10),n=J_(v),s=v.getAttribute("data-line-index")??void 0;continue}if(f==null&&(v.hasAttribute("data-expand-button")||v.hasAttribute("data-unmodified-lines"))){f={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 w=f!=null?v.getAttribute("data-expand-index")??void 0:void 0;if(f!=null&&w!=null){const _=Number.parseInt(w,10);Number.isNaN(_)||(f.hunkIndex=_);continue}if(i==null&&v.hasAttribute("data-code")){i=v;break}}if(m!=null)return m;if(f?.hunkIndex!=null)return{type:"line-info",hunkIndex:f.hunkIndex,direction:f.direction,all:f.all};if(o??=s!=null?X_(i,`[data-line][data-line-index="${s}"]`):void 0,l??=s!=null?X_(i,`[data-column-number][data-line-index="${s}"]`):void 0,i==null||o==null||l==null||n==null||p==null||Number.isNaN(p))return;const g=this.parseLineIndex(o,this.isSplitDiff());return d!=null?this.mode==="file"?{kind:"token",lineType:n,lineElement:o,lineNumber:p,numberColumn:t,numberElement:l,side:void 0,splitLineIndex:g,...d}:{kind:"token",lineType:n,lineElement:o,lineNumber:p,numberColumn:t,numberElement:l,side:Z_(n,i),splitLineIndex:g,...d}:this.mode==="file"?{kind:"line",lineType:n,lineElement:o,lineNumber:p,numberColumn:t,numberElement:l,side:void 0,splitLineIndex:g}:{kind:"line",lineType:n,lineElement:o,lineNumber:p,numberColumn:t,numberElement:l,side:Z_(n,i),splitLineIndex:g}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){const n=(e.getAttribute("data-line-index")??"").split(",").map(i=>Number.parseInt(i,10)).filter(i=>!Number.isNaN(i));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function bd({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:i,onLineClick:o,onLineEnter:s,onLineLeave:l,onLineNumberClick:c,onTokenClick:d,onTokenEnter:f,onTokenLeave:p,renderGutterUtility:m,__debugPointerEvents:g,enableLineSelection:v,controlledSelection:x,onLineSelected:S,onLineSelectionStart:w,onLineSelectionChange:_,onLineSelectionEnd:C},k,D,M){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:E6({enableGutterUtility:t,renderGutterUtility:m,onGutterUtilityClick:i}),usesCustomGutterUtility:m!=null,lineHoverHighlight:n,onGutterUtilityClick:i,onHunkExpand:k,onMergeConflictActionClick:M,onLineClick:o,onLineEnter:s,onLineLeave:l,onLineNumberClick:c,onTokenClick:d,onTokenEnter:f,onTokenLeave:p,__debugPointerEvents:g,enableLineSelection:v,controlledSelection:x,onLineSelected:S,onLineSelectionStart:w,onLineSelectionChange:_,onLineSelectionEnd:C,getLineIndex:D}}function E6({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function al(e){return e!=null&&"kind"in e&&e.kind==="line"}function Zc(e){return e!=null&&"kind"in e&&e.kind==="token"}function om(e){return al(e)||Zc(e)}function k6(e){return"type"in e&&e.type==="line-info"}function T6(e){return"kind"in e&&e.kind==="merge-conflict-action"}function A6(e){return e==="current"||e==="incoming"||e==="both"}function X_(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function wc(e){const t=[];let n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function L6(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const n=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(n instanceof HTMLElement))return;const i=n.previousElementSibling;return i instanceof HTMLElement&&(i.hasAttribute("data-line")||i.hasAttribute("data-column-number"))?i:void 0}function R6(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const n=e.getAttribute("name")??void 0;return n!=null&&n.startsWith("annotation-")?n:void 0}}function O6(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function K_(e){return e!=null&&typeof e.elementFromPoint=="function"}function D6(e,t){return e===t||cg(e??void 0,t??void 0)}function Q_(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&D6(e?.range??null,t.range)}function Z_(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function J_(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 $i(e="none",t,...n){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...n)}var Ck=class Xi{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=Xi.resizeObserver??new ResizeObserver(Xi.handleSharedResizeEntries);return Xi.resizeObserver=t,t}static handleSharedResizeEntries(t){const n=new Map;for(const i of t){const o=Xi.managersByElement.get(i.target);if(o==null)continue;const s=n.get(o);s==null?n.set(o,[i]):s.push(i)}for(const[i,o]of n)i.handleResizeEntries(o)}observedNodes=new Map;setup(t,{disableAnnotations:n,columnVariables:i="apply"}){const o=new Set,s=i==="apply";let l=0;const c=new Map(this.observedNodes);this.observedNodes.clear();for(const d of t.children){if(l===2)break;const f=(()=>{if(d instanceof HTMLElement&&d.tagName==="CODE")return d})();if(f==null)continue;l++;let p=c.get(f);if(p!=null&&p.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let m=f.firstElementChild;m instanceof HTMLElement||(m=null),p!=null?(this.observedNodes.set(f,p),c.delete(f),p.numberElement!==m?(p.numberElement!=null&&(this.unobserve(p.numberElement),c.delete(p.numberElement)),m!=null&&(this.observe(m),c.delete(m),this.observedNodes.set(m,p)),p.numberElement=m,p.numberWidth=0):p.numberElement!=null?(c.delete(p.numberElement),this.observedNodes.set(p.numberElement,p)):p.numberWidth=0,N6(p,s)):(p={type:"code",codeElement:f,numberElement:m,codeWidth:"auto",numberWidth:0,applyColumnVariables:s},this.observedNodes.set(f,p),this.observe(f),m!=null&&(this.observedNodes.set(m,p),this.observe(m)))}if(l>1&&!n){const d=t.querySelectorAll('[data-line-annotation*=","]'),f=new Map;for(const p of d){if(!(p instanceof HTMLElement))continue;const m=p.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(m)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:m,element:p});continue}let g=f.get(m);g==null&&(g=[],f.set(m,g)),g.push(p)}for(const[p,m]of f){if(m.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",p,m);continue}const[g,v]=m,x=g.firstElementChild,S=v.firstElementChild;if(!(g instanceof HTMLElement)||!(v instanceof HTMLElement)||!(x instanceof HTMLElement)||!(S instanceof HTMLElement))continue;let w=c.get(x);if(w!=null){this.observedNodes.set(x,w),this.observedNodes.set(S,w),c.delete(x),c.delete(S);continue}const _=x.getBoundingClientRect().height,C=S.getBoundingClientRect().height;w={type:"annotations",column1:{container:g,child:x,childHeight:_},column2:{container:v,child:S,childHeight:C},currentHeight:"auto"},o.add({child1:x,child2:S,item:w,newHeight:Math.max(_,C)})}for(const p of o)this.applyNewHeight(p.item,p.newHeight),this.observedNodes.set(p.child1,p.item),this.observedNodes.set(p.child2,p.item),this.observe(p.child1),this.observe(p.child2);o.clear()}for(const[d,f]of c)this.unobserve(d),f.type==="code"?z6(f):P6(f);c.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:n}=Xi,i=n.get(t);if(i!==this){if(i!=null&&i!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");n.set(t,this),Xi.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:n,resizeObserver:i}=Xi,o=n.get(t);if(o!=null){if(o!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");n.delete(t),i?.unobserve(t),i!=null&&n.size===0&&(i.disconnect(),Xi.resizeObserver=void 0)}}handleResizeEntries(t){const n=new Map,i=new Set;for(const o of t){const{target:s,borderBoxSize:l,contentBoxSize:c}=o;if(!(s instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",o);continue}const d=this.observedNodes.get(s);if(d==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",o);continue}if(d.type==="annotations"){const f=(()=>{if(s===d.column1.child)return d.column1;if(s===d.column2.child)return d.column2})();if(f==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:d,target:s});continue}f.childHeight=l[0].blockSize,i.add(d)}else if(d.type==="code"){const f=n.get(d)??{},p=c[0].inlineSize;s===d.codeElement?f.codeInlineSize=p:s===d.numberElement&&(f.numberInlineSize=p),n.set(d,f)}}this.applyAnnotationUpdates(i),i.clear(),this.applyColumnUpdates(n),n.clear()}applyAnnotationUpdates(t){for(const n of t)this.applyNewHeight(n,Math.max(n.column1.childHeight,n.column2.childHeight))}applyColumnUpdates=t=>{for(const[n,i]of t){const o=i.codeInlineSize!=null?M6(i.codeInlineSize):n.codeWidth,s=i.numberInlineSize!=null?I6(i.numberInlineSize):n.numberWidth,l=o!==n.codeWidth,c=s!==n.numberWidth;!l&&!c||(n.codeWidth=o,n.numberWidth=s,n.applyColumnVariables&&wk(n,{codeWidthChanged:l,numberWidthChanged:c}))}};applyNewHeight(t,n){n!==t.currentHeight&&(t.currentHeight=Math.max(n,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 M6(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function I6(e){return Math.max(Math.ceil(e),0)}function N6(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?wk(e,{codeWidthChanged:!0,numberWidthChanged:!0}):Ek(e))}function wk(e,{codeWidthChanged:t,numberWidthChanged:n}){const{codeElement:i,codeWidth:o,numberWidth:s}=e;if(t&&i.style.setProperty("--diffs-column-width",`${typeof o=="number"?`${o}px`:"auto"}`),n&&i.style.setProperty("--diffs-column-number-width",`${s===0?"auto":`${s}px`}`),t||n&&o!=="auto"){const l=typeof o=="number"?Math.max(o-s,0):0;i.style.setProperty("--diffs-column-content-width",`${l>0?`${l}px`:"auto"}`)}}function Ek(e){e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width")}function z6(e){e.codeElement.isConnected&&Ek(e)}function P6(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")}const Po=new Map,am=new Map,H6=new Map,mg=new Set;function xd(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!mg.has(t))return!1;return!0}function eC(e,t){e=Array.isArray(e)?e:[e];for(const n of e){if(mg.has(n.name))continue;let i=Po.get(n.name);i==null&&(i=n,Po.set(n.name,i)),mg.add(i.name),t.loadLanguageSync(i.data)}}function kk(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}var gg=Object.defineProperty,j6=Object.getOwnPropertyDescriptor,B6=Object.getOwnPropertyNames,U6=Object.prototype.hasOwnProperty,V6=(e,t)=>{let n={};for(var i in e)gg(n,i,{get:e[i],enumerable:!0});return gg(n,Symbol.toStringTag,{value:"Module"}),n},F6=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=B6(t),s=0,l=o.length,c;s<l;s++)c=o[s],!U6.call(e,c)&&c!==n&&gg(e,c,{get:(d=>t[d]).bind(null,c),enumerable:!(i=j6(t,c))||i.enumerable});return e},G6=(e,t,n)=>(F6(e,t,"default"),n);const $6="modulepreload",q6=function(e,t){return new URL(e,t).href},tC={},A=function(t,n,i){let o=Promise.resolve();if(n&&n.length>0){let f=function(p){return Promise.all(p.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};const l=document.getElementsByTagName("link"),c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");o=f(n.map(p=>{if(p=q6(p,i),p in tC)return;tC[p]=!0;const m=p.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(i)for(let x=l.length-1;x>=0;x--){const S=l[x];if(S.href===p&&(!m||S.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${p}"]${g}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":$6,m||(v.as="script"),v.crossOrigin="",v.href=p,d&&v.setAttribute("nonce",d),document.head.appendChild(v),m)return new Promise((x,S)=>{v.addEventListener("load",x),v.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${p}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return o.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})},Tk=[{id:"abap",name:"ABAP",import:(()=>A(()=>import("./abap-BdImnpbu.js"),[],import.meta.url))},{id:"actionscript-3",name:"ActionScript",aliases:["actionscript","as3"],import:(()=>A(()=>import("./actionscript-3-B3316cI-.js"),[],import.meta.url))},{id:"ada",name:"Ada",import:(()=>A(()=>import("./ada-bCR0ucgS.js"),[],import.meta.url))},{id:"ahk",name:"AutoHotkey",aliases:["ahk1"],import:(()=>A(()=>import("./ahk-CsyLZFj1.js"),[],import.meta.url))},{id:"ahk2",name:"AutoHotkey2",import:(()=>A(()=>import("./ahk2-8Zs4aa1G.js"),[],import.meta.url))},{id:"angular-html",name:"Angular HTML",import:(()=>A(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3]),import.meta.url))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>A(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5]),import.meta.url))},{id:"apache",name:"Apache Conf",import:(()=>A(()=>import("./apache-Pmp26Uib.js"),[],import.meta.url))},{id:"apex",name:"Apex",import:(()=>A(()=>import("./apex-DhZFqWV2.js"),[],import.meta.url))},{id:"apl",name:"APL",import:(()=>A(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9]),import.meta.url))},{id:"applescript",name:"AppleScript",import:(()=>A(()=>import("./applescript-Co6uUVPk.js"),[],import.meta.url))},{id:"ara",name:"Ara",import:(()=>A(()=>import("./ara-BRHolxvo.js"),[],import.meta.url))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>A(()=>import("./asciidoc-CSVQ5wI8.js"),[],import.meta.url))},{id:"asm",name:"Assembly",import:(()=>A(()=>import("./asm-D_Q5rh1f.js"),[],import.meta.url))},{id:"astro",name:"Astro",import:(()=>A(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13]),import.meta.url))},{id:"awk",name:"AWK",import:(()=>A(()=>import("./awk-DMzUqQB5.js"),[],import.meta.url))},{id:"ballerina",name:"Ballerina",import:(()=>A(()=>import("./ballerina-BFfxhgS-.js"),[],import.meta.url))},{id:"bat",name:"Batch File",aliases:["batch","cmd"],import:(()=>A(()=>import("./bat-CickPsom.js"),[],import.meta.url))},{id:"beancount",name:"Beancount",import:(()=>A(()=>import("./beancount-k_qm7-4y.js"),[],import.meta.url))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>A(()=>import("./berry-uYugtg8r.js"),[],import.meta.url))},{id:"bibtex",name:"BibTeX",import:(()=>A(()=>import("./bibtex-CHM0blh-.js"),[],import.meta.url))},{id:"bicep",name:"Bicep",import:(()=>A(()=>import("./bicep-Bmn6On1c.js"),[],import.meta.url))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>A(()=>import("./bird2-Bx8U0n9b.js"),[],import.meta.url))},{id:"blade",name:"Blade",import:(()=>A(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9]),import.meta.url))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>A(()=>import("./bsl-DlhNcFeZ.js"),__vite__mapDeps([17,18]),import.meta.url))},{id:"c",name:"C",import:(()=>A(()=>import("./c-BIGW1oBm.js"),[],import.meta.url))},{id:"c3",name:"C3",import:(()=>A(()=>import("./c3-Dp5svz6Z.js"),[],import.meta.url))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>A(()=>import("./cadence-Bv_4Rxtq.js"),[],import.meta.url))},{id:"cairo",name:"Cairo",import:(()=>A(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20]),import.meta.url))},{id:"chapel",name:"Chapel",aliases:["chpl"],import:(()=>A(()=>import("./chapel-DTp_pixX.js"),__vite__mapDeps([21,22]),import.meta.url))},{id:"clarity",name:"Clarity",import:(()=>A(()=>import("./clarity-Dn5IMItf.js"),[],import.meta.url))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>A(()=>import("./clojure-P80f7IUj.js"),[],import.meta.url))},{id:"cmake",name:"CMake",import:(()=>A(()=>import("./cmake-D1j8_8rp.js"),[],import.meta.url))},{id:"cobol",name:"COBOL",import:(()=>A(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([23,1,2,3,8]),import.meta.url))},{id:"codeowners",name:"CODEOWNERS",import:(()=>A(()=>import("./codeowners-Bp6g37R7.js"),[],import.meta.url))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>A(()=>import("./codeql-DsOJ9woJ.js"),[],import.meta.url))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>A(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([24,2]),import.meta.url))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>A(()=>import("./common-lisp-Cg-RD9OK.js"),[],import.meta.url))},{id:"coq",name:"Rocq",import:(()=>A(()=>import("./coq-C7JzOVbR.js"),[],import.meta.url))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>A(()=>import("./cpp-BMRokrvK.js"),__vite__mapDeps([25,26,27,22]),import.meta.url))},{id:"crystal",name:"Crystal",import:(()=>A(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([28,1,2,3,16,22,29]),import.meta.url))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>A(()=>import("./csharp-DSvCPggb.js"),[],import.meta.url))},{id:"css",name:"CSS",import:(()=>A(()=>import("./css-CLj8gQPS.js"),[],import.meta.url))},{id:"csv",name:"CSV",import:(()=>A(()=>import("./csv-fuZLfV_i.js"),[],import.meta.url))},{id:"cue",name:"CUE",import:(()=>A(()=>import("./cue-D82EKSYY.js"),[],import.meta.url))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>A(()=>import("./cypher-COkxafJQ.js"),[],import.meta.url))},{id:"d",name:"D",import:(()=>A(()=>import("./d-85-TOEBH.js"),[],import.meta.url))},{id:"dart",name:"Dart",import:(()=>A(()=>import("./dart-bE4Kk8sk.js"),[],import.meta.url))},{id:"dax",name:"DAX",import:(()=>A(()=>import("./dax-CEL-wOlO.js"),[],import.meta.url))},{id:"desktop",name:"Desktop",import:(()=>A(()=>import("./desktop-BmXAJ9_W.js"),[],import.meta.url))},{id:"diff",name:"Diff",import:(()=>A(()=>import("./diff-D97Zzqfu.js"),[],import.meta.url))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>A(()=>import("./docker-BcOcwvcX.js"),[],import.meta.url))},{id:"dotenv",name:"dotEnv",import:(()=>A(()=>import("./dotenv-Da5cRb03.js"),[],import.meta.url))},{id:"dream-maker",name:"Dream Maker",import:(()=>A(()=>import("./dream-maker-BtqSS_iP.js"),[],import.meta.url))},{id:"edge",name:"Edge",import:(()=>A(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([30,11,1,2,3,15]),import.meta.url))},{id:"elixir",name:"Elixir",import:(()=>A(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([31,1,2,3]),import.meta.url))},{id:"elm",name:"Elm",import:(()=>A(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([32,27,22]),import.meta.url))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>A(()=>import("./emacs-lisp-C_m_b--Z.js"),[],import.meta.url))},{id:"erb",name:"ERB",import:(()=>A(()=>import("./erb-DXfck5VN.js"),__vite__mapDeps([33,1,2,3,34,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39]),import.meta.url))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>A(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([40,41]),import.meta.url))},{id:"fennel",name:"Fennel",import:(()=>A(()=>import("./fennel-BYunw83y.js"),[],import.meta.url))},{id:"fish",name:"Fish",import:(()=>A(()=>import("./fish-BvzEVeQv.js"),[],import.meta.url))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>A(()=>import("./fluent-C4IJs8-o.js"),[],import.meta.url))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>A(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([42,43]),import.meta.url))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>A(()=>import("./fortran-free-form-BxgE0vQu.js"),[],import.meta.url))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>A(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([44,41]),import.meta.url))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>A(()=>import("./gdresource-TyuKm33G.js"),__vite__mapDeps([45,46,47]),import.meta.url))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>A(()=>import("./gdscript-DqcFQ5yU.js"),[],import.meta.url))},{id:"gdshader",name:"GDShader",import:(()=>A(()=>import("./gdshader-DkwncUOv.js"),[],import.meta.url))},{id:"genie",name:"Genie",import:(()=>A(()=>import("./genie-D0YGMca9.js"),[],import.meta.url))},{id:"gherkin",name:"Gherkin",import:(()=>A(()=>import("./gherkin-DyxjwDmM.js"),[],import.meta.url))},{id:"git-commit",name:"Git Commit Message",import:(()=>A(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([48,49]),import.meta.url))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>A(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([50,29]),import.meta.url))},{id:"gleam",name:"Gleam",import:(()=>A(()=>import("./gleam-BspZqrRM.js"),[],import.meta.url))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>A(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([51,2,11,3,1]),import.meta.url))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>A(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([52,11,3,2,1]),import.meta.url))},{id:"glsl",name:"GLSL",import:(()=>A(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([27,22]),import.meta.url))},{id:"gn",name:"GN",import:(()=>A(()=>import("./gn-n2N0HUVH.js"),[],import.meta.url))},{id:"gnuplot",name:"Gnuplot",import:(()=>A(()=>import("./gnuplot-DdkO51Og.js"),[],import.meta.url))},{id:"go",name:"Go",import:(()=>A(()=>import("./go-C27-OAKa.js"),[],import.meta.url))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>A(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([36,2,11,37,13]),import.meta.url))},{id:"groovy",name:"Groovy",import:(()=>A(()=>import("./groovy-gcz8RCvz.js"),[],import.meta.url))},{id:"hack",name:"Hack",import:(()=>A(()=>import("./hack-BWmVpMyf.js"),__vite__mapDeps([53,1,2,3,16]),import.meta.url))},{id:"haml",name:"Ruby Haml",import:(()=>A(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([35,2,3]),import.meta.url))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>A(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([54,1,2,3,39]),import.meta.url))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>A(()=>import("./haskell-Df6bDoY_.js"),[],import.meta.url))},{id:"haxe",name:"Haxe",import:(()=>A(()=>import("./haxe-CfZj7gIn.js"),[],import.meta.url))},{id:"hcl",name:"HashiCorp HCL",import:(()=>A(()=>import("./hcl-BWvSN4gD.js"),[],import.meta.url))},{id:"hjson",name:"Hjson",import:(()=>A(()=>import("./hjson-D5-asLiD.js"),[],import.meta.url))},{id:"hlsl",name:"HLSL",import:(()=>A(()=>import("./hlsl-D3lLCCz7.js"),[],import.meta.url))},{id:"html",name:"HTML",import:(()=>A(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3]),import.meta.url))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>A(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3]),import.meta.url))},{id:"http",name:"HTTP",import:(()=>A(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([55,29,9,7,8,36,2,11,37,13]),import.meta.url))},{id:"hurl",name:"Hurl",import:(()=>A(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([56,36,2,11,37,13,7,8,57]),import.meta.url))},{id:"hxml",name:"HXML",import:(()=>A(()=>import("./hxml-2-FPmUDs.js"),__vite__mapDeps([58,59]),import.meta.url))},{id:"hy",name:"Hy",import:(()=>A(()=>import("./hy-DFXneXwc.js"),[],import.meta.url))},{id:"imba",name:"Imba",import:(()=>A(()=>import("./imba-DGztddWO.js"),[],import.meta.url))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>A(()=>import("./ini-BEwlwnbL.js"),[],import.meta.url))},{id:"java",name:"Java",import:(()=>A(()=>import("./java-CylS5w8V.js"),[],import.meta.url))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>A(()=>import("./javascript-wDzz0qaB.js"),[],import.meta.url))},{id:"jinja",name:"Jinja",import:(()=>A(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([60,1,2,3]),import.meta.url))},{id:"jison",name:"Jison",import:(()=>A(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([61,2]),import.meta.url))},{id:"json",name:"JSON",import:(()=>A(()=>import("./json-Cp-IABpG.js"),[],import.meta.url))},{id:"json5",name:"JSON5",import:(()=>A(()=>import("./json5-C9tS-k6U.js"),[],import.meta.url))},{id:"jsonc",name:"JSON with Comments",import:(()=>A(()=>import("./jsonc-Des-eS-w.js"),[],import.meta.url))},{id:"jsonl",name:"JSON Lines",import:(()=>A(()=>import("./jsonl-DcaNXYhu.js"),[],import.meta.url))},{id:"jsonnet",name:"Jsonnet",import:(()=>A(()=>import("./jsonnet-DFQXde-d.js"),[],import.meta.url))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>A(()=>import("./jssm-C2t-YnRu.js"),[],import.meta.url))},{id:"jsx",name:"JSX",import:(()=>A(()=>import("./jsx-g9-lgVsj.js"),[],import.meta.url))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>A(()=>import("./julia-5Bft2YPA.js"),__vite__mapDeps([62,25,26,27,22,20,2,63,16]),import.meta.url))},{id:"just",name:"Just",aliases:["justfile"],import:(()=>A(()=>import("./just-Cwhn7H3k.js"),__vite__mapDeps([64,29,2,11,65,1,3,7,8,16,20,34,35,36,37,13,25,26,27,22,38,39]),import.meta.url))},{id:"kdl",name:"KDL",import:(()=>A(()=>import("./kdl-DV7GczEv.js"),[],import.meta.url))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>A(()=>import("./kotlin-BdnUsdx6.js"),[],import.meta.url))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>A(()=>import("./kusto-wEQ09or8.js"),[],import.meta.url))},{id:"latex",name:"LaTeX",import:(()=>A(()=>import("./latex-D5pSuvFb.js"),__vite__mapDeps([66,67,63]),import.meta.url))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>A(()=>import("./lean-BZvkOJ9d.js"),[],import.meta.url))},{id:"less",name:"Less",import:(()=>A(()=>import("./less-B1dDrJ26.js"),[],import.meta.url))},{id:"liquid",name:"Liquid",import:(()=>A(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([68,1,2,3,9]),import.meta.url))},{id:"llvm",name:"LLVM IR",import:(()=>A(()=>import("./llvm-BZoOZj88.js"),[],import.meta.url))},{id:"log",name:"Log file",import:(()=>A(()=>import("./log-2UxHyX5q.js"),[],import.meta.url))},{id:"logo",name:"Logo",import:(()=>A(()=>import("./logo-BtOb2qkB.js"),[],import.meta.url))},{id:"lua",name:"Lua",import:(()=>A(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([38,22]),import.meta.url))},{id:"luau",name:"Luau",import:(()=>A(()=>import("./luau-BnpPk5vE.js"),[],import.meta.url))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>A(()=>import("./make-CHLpvVh8.js"),[],import.meta.url))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>A(()=>import("./markdown-Cvjx9yec.js"),[],import.meta.url))},{id:"marko",name:"Marko",import:(()=>A(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([69,3,70,5,11]),import.meta.url))},{id:"matlab",name:"MATLAB",import:(()=>A(()=>import("./matlab-D7o27uSR.js"),[],import.meta.url))},{id:"mdc",name:"MDC",import:(()=>A(()=>import("./mdc-D1_yUvq7.js"),__vite__mapDeps([71,41,39,15,1,2,3]),import.meta.url))},{id:"mdx",name:"MDX",import:(()=>A(()=>import("./mdx-Cmh6b_Ma.js"),[],import.meta.url))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>A(()=>import("./mermaid-CQcHuHx7.js"),[],import.meta.url))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>A(()=>import("./mipsasm-CKIfxQSi.js"),[],import.meta.url))},{id:"mojo",name:"Mojo",import:(()=>A(()=>import("./mojo-DJz3ZmWd.js"),[],import.meta.url))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>A(()=>import("./moonbit-CHtswR0a.js"),[],import.meta.url))},{id:"move",name:"Move",import:(()=>A(()=>import("./move-el3G9tDJ.js"),[],import.meta.url))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>A(()=>import("./narrat-DRg8JJMk.js"),[],import.meta.url))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>A(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([72,73]),import.meta.url))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>A(()=>import("./nextflow-groovy-vE_lwT2v.js"),[],import.meta.url))},{id:"nginx",name:"Nginx",import:(()=>A(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([74,38,22]),import.meta.url))},{id:"nim",name:"Nim",import:(()=>A(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([75,22,1,2,3,7,8,27,41]),import.meta.url))},{id:"nix",name:"Nix",import:(()=>A(()=>import("./nix-CwoSXNpI.js"),[],import.meta.url))},{id:"nsis",name:"NSIS",import:(()=>A(()=>import("./nsis-BlV79W_Q.js"),[],import.meta.url))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>A(()=>import("./nushell-D3jzshHO.js"),[],import.meta.url))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>A(()=>import("./objective-c-DXmwc3jG.js"),[],import.meta.url))},{id:"objective-cpp",name:"Objective-C++",import:(()=>A(()=>import("./objective-cpp-CLxacb5B.js"),[],import.meta.url))},{id:"ocaml",name:"OCaml",import:(()=>A(()=>import("./ocaml-C0hk2d4L.js"),[],import.meta.url))},{id:"odin",name:"Odin",import:(()=>A(()=>import("./odin-BBf5iR-q.js"),[],import.meta.url))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>A(()=>import("./openscad-C4EeE6gA.js"),[],import.meta.url))},{id:"org",name:"Org Markup",import:(()=>A(()=>import("./org-DM6o9KBp.js"),__vite__mapDeps([76,2,11,13,8,20,26,3,38,22,77,78,65,1,7,16,63,34,35,36,37,25,27,29,39,79,9,80,81,24,82,49,83,84,85,70,5,86,87,88,89,90,75,41,31,40,91,92,93,48,50,66,67]),import.meta.url))},{id:"pascal",name:"Pascal",import:(()=>A(()=>import("./pascal-D93ZcfNL.js"),[],import.meta.url))},{id:"perl",name:"Perl",import:(()=>A(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([65,1,2,3,7,8,16]),import.meta.url))},{id:"php",name:"PHP",import:(()=>A(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([79,1,2,3,7,8,16,9]),import.meta.url))},{id:"pkl",name:"Pkl",import:(()=>A(()=>import("./pkl-u5AG7uiY.js"),[],import.meta.url))},{id:"plsql",name:"PL/SQL",import:(()=>A(()=>import("./plsql-ChMvpjG-.js"),[],import.meta.url))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>A(()=>import("./po-BTJTHyun.js"),[],import.meta.url))},{id:"polar",name:"Polar",import:(()=>A(()=>import("./polar-C0HS_06l.js"),[],import.meta.url))},{id:"postcss",name:"PostCSS",import:(()=>A(()=>import("./postcss-CXtECtnM.js"),[],import.meta.url))},{id:"powerquery",name:"PowerQuery",import:(()=>A(()=>import("./powerquery-CEu0bR-o.js"),[],import.meta.url))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1","pwsh"],import:(()=>A(()=>import("./powershell-BmBUJMz7.js"),[],import.meta.url))},{id:"prisma",name:"Prisma",import:(()=>A(()=>import("./prisma-Vru482bI.js"),[],import.meta.url))},{id:"prolog",name:"Prolog",import:(()=>A(()=>import("./prolog-CbFg5uaA.js"),[],import.meta.url))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>A(()=>import("./proto-C7zT0LnQ.js"),[],import.meta.url))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>A(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([94,2,3,1]),import.meta.url))},{id:"puppet",name:"Puppet",import:(()=>A(()=>import("./puppet-BMWR74SV.js"),[],import.meta.url))},{id:"purescript",name:"PureScript",import:(()=>A(()=>import("./purescript-CklMAg4u.js"),[],import.meta.url))},{id:"python",name:"Python",aliases:["py"],import:(()=>A(()=>import("./python-B6aJPvgy.js"),[],import.meta.url))},{id:"qml",name:"QML",import:(()=>A(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([95,2]),import.meta.url))},{id:"qmldir",name:"QML Directory",import:(()=>A(()=>import("./qmldir-C8lEn-DE.js"),[],import.meta.url))},{id:"qss",name:"Qt Style Sheets",import:(()=>A(()=>import("./qss-IeuSbFQv.js"),[],import.meta.url))},{id:"r",name:"R",import:(()=>A(()=>import("./r-Cf5RLm7j.js"),[],import.meta.url))},{id:"racket",name:"Racket",import:(()=>A(()=>import("./racket-BqYA7rlc.js"),[],import.meta.url))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>A(()=>import("./raku-DXvB9xmW.js"),[],import.meta.url))},{id:"razor",name:"ASP.NET Razor",import:(()=>A(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([96,1,2,3,89]),import.meta.url))},{id:"rbs",name:"RBS",aliases:["ruby-signature"],import:(()=>A(()=>import("./rbs-CpoqiR4B.js"),[],import.meta.url))},{id:"reg",name:"Windows Registry Script",import:(()=>A(()=>import("./reg-C-SQnVFl.js"),[],import.meta.url))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>A(()=>import("./regexp-CDVJQ6XC.js"),[],import.meta.url))},{id:"rel",name:"Rel",import:(()=>A(()=>import("./rel-C3B-1QV4.js"),[],import.meta.url))},{id:"riscv",name:"RISC-V",import:(()=>A(()=>import("./riscv-BM1_JUlF.js"),[],import.meta.url))},{id:"ron",name:"RON",import:(()=>A(()=>import("./ron-D8l8udqQ.js"),[],import.meta.url))},{id:"rosmsg",name:"ROS Interface",import:(()=>A(()=>import("./rosmsg-BJDFO7_C.js"),[],import.meta.url))},{id:"rst",name:"reStructuredText",import:(()=>A(()=>import("./rst-bs7f0vWN.js"),__vite__mapDeps([97,15,1,2,3,25,26,27,22,20,29,39,98,34,35,7,8,16,36,11,37,13,38]),import.meta.url))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>A(()=>import("./ruby-C0TQ7zu5.js"),__vite__mapDeps([34,1,2,3,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39]),import.meta.url))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>A(()=>import("./rust-B1yitclQ.js"),[],import.meta.url))},{id:"sas",name:"SAS",import:(()=>A(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([99,16]),import.meta.url))},{id:"sass",name:"Sass",import:(()=>A(()=>import("./sass-Cj5Yp3dK.js"),[],import.meta.url))},{id:"scala",name:"Scala",import:(()=>A(()=>import("./scala-CqE71os6.js"),[],import.meta.url))},{id:"scheme",name:"Scheme",import:(()=>A(()=>import("./scheme-C98Dy4si.js"),[],import.meta.url))},{id:"scss",name:"SCSS",import:(()=>A(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3]),import.meta.url))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>A(()=>import("./sdbl-DVxCFoDh.js"),[],import.meta.url))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>A(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([100,101]),import.meta.url))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>A(()=>import("./shellscript-Yzrsuije.js"),[],import.meta.url))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>A(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([102,29]),import.meta.url))},{id:"smalltalk",name:"GNU Smalltalk",import:(()=>A(()=>import("./smalltalk-BOQMe2GC.js"),[],import.meta.url))},{id:"smithy",name:"Smithy",import:(()=>A(()=>import("./smithy-cds9vsN8.js"),[],import.meta.url))},{id:"solidity",name:"Solidity",import:(()=>A(()=>import("./solidity-DijEV5ha.js"),[],import.meta.url))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>A(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([103,1,2,3]),import.meta.url))},{id:"sparql",name:"SPARQL",import:(()=>A(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([104,105]),import.meta.url))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>A(()=>import("./splunk-BtCnVYZw.js"),[],import.meta.url))},{id:"sql",name:"SQL",import:(()=>A(()=>import("./sql-CRqJ_cUM.js"),[],import.meta.url))},{id:"ssh-config",name:"SSH Config",import:(()=>A(()=>import("./ssh-config-_ykCGR6B.js"),[],import.meta.url))},{id:"stata",name:"Stata",import:(()=>A(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([106,16]),import.meta.url))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>A(()=>import("./stylus-BEDo0Tqx.js"),[],import.meta.url))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>A(()=>import("./surrealql-Cjom0U5J.js"),__vite__mapDeps([107,2]),import.meta.url))},{id:"svelte",name:"Svelte",import:(()=>A(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([108,2,11,3,12]),import.meta.url))},{id:"swift",name:"Swift",import:(()=>A(()=>import("./swift-C2oV4EkX.js"),[],import.meta.url))},{id:"system-verilog",name:"SystemVerilog",import:(()=>A(()=>import("./system-verilog-0hqHdDBg.js"),[],import.meta.url))},{id:"systemd",name:"Systemd Units",import:(()=>A(()=>import("./systemd-4A_iFExJ.js"),[],import.meta.url))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>A(()=>import("./talonscript-CkByrt1z.js"),[],import.meta.url))},{id:"tasl",name:"Tasl",import:(()=>A(()=>import("./tasl-QIJgUcNo.js"),[],import.meta.url))},{id:"tcl",name:"Tcl",import:(()=>A(()=>import("./tcl-dwOrl1Do.js"),[],import.meta.url))},{id:"templ",name:"Templ",import:(()=>A(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([109,84,2,3]),import.meta.url))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>A(()=>import("./terraform-BETggiCN.js"),[],import.meta.url))},{id:"tex",name:"TeX",import:(()=>A(()=>import("./tex-D96PA37w.js"),__vite__mapDeps([67,63]),import.meta.url))},{id:"toml",name:"TOML",import:(()=>A(()=>import("./toml-vGWfd6FD.js"),[],import.meta.url))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>A(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([110,11,3,2,27,22,1,16,7,8]),import.meta.url))},{id:"tsv",name:"TSV",import:(()=>A(()=>import("./tsv-B_m7g4N7.js"),[],import.meta.url))},{id:"tsx",name:"TSX",import:(()=>A(()=>import("./tsx-COt5Ahok.js"),[],import.meta.url))},{id:"turtle",name:"Turtle",import:(()=>A(()=>import("./turtle-BsS91CYL.js"),[],import.meta.url))},{id:"twig",name:"Twig",import:(()=>A(()=>import("./twig-27uCiNez.js"),__vite__mapDeps([111,3,2,5,79,1,7,8,16,9,20,34,35,36,11,37,13,25,26,27,22,29,38,39]),import.meta.url))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>A(()=>import("./typescript-BPQ3VLAy.js"),[],import.meta.url))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>A(()=>import("./typespec-CAFt9gP4.js"),[],import.meta.url))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>A(()=>import("./typst-BUadGCkm.js"),__vite__mapDeps([112,113,114,22,81,24,2,25,26,27,3,89,90,49,83,31,1,40,41,44,48,50,29,84,85,54,39,77,8,115,9,62,20,63,16,66,67,70,116,38,78,82,65,7,86,79,117,94,34,35,36,11,37,13,5,118,93,87,88,111,119,120,80]),import.meta.url))},{id:"v",name:"V",import:(()=>A(()=>import("./v-BGw2Nkan.js"),[],import.meta.url))},{id:"vala",name:"Vala",import:(()=>A(()=>import("./vala-CsfeWuGM.js"),[],import.meta.url))},{id:"vb",name:"Visual Basic",import:(()=>A(()=>import("./vb-Cu-pLBUe.js"),[],import.meta.url))},{id:"verilog",name:"Verilog",import:(()=>A(()=>import("./verilog-nZwndyjY.js"),[],import.meta.url))},{id:"vhdl",name:"VHDL",import:(()=>A(()=>import("./vhdl-CeAyd5Ju.js"),[],import.meta.url))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>A(()=>import("./viml-CJc9bBzg.js"),[],import.meta.url))},{id:"vue",name:"Vue",import:(()=>A(()=>import("./vue-BqiEGhQt.js"),__vite__mapDeps([121,3,2,11,9,1,15]),import.meta.url))},{id:"vue-html",name:"Vue HTML",import:(()=>A(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([122,2]),import.meta.url))},{id:"vue-vine",name:"Vue Vine",import:(()=>A(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([123,3,5,70,124,12,2]),import.meta.url))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>A(()=>import("./vyper-CDx5xZoG.js"),[],import.meta.url))},{id:"wasm",name:"WebAssembly",import:(()=>A(()=>import("./wasm-MzD3tlZU.js"),[],import.meta.url))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>A(()=>import("./wenyan-BV7otONQ.js"),[],import.meta.url))},{id:"wgsl",name:"WGSL",import:(()=>A(()=>import("./wgsl-Dx-B1_4e.js"),[],import.meta.url))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>A(()=>import("./wikitext-BhOHFoWU.js"),[],import.meta.url))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>A(()=>import("./wit-5i3qLPDT.js"),[],import.meta.url))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>A(()=>import("./wolfram-lXgVvXCa.js"),[],import.meta.url))},{id:"xml",name:"XML",import:(()=>A(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8]),import.meta.url))},{id:"xsl",name:"XSL",import:(()=>A(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([93,7,8]),import.meta.url))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>A(()=>import("./yaml-Buea-lGh.js"),[],import.meta.url))},{id:"zenscript",name:"ZenScript",import:(()=>A(()=>import("./zenscript-DVFEvuxE.js"),[],import.meta.url))},{id:"zig",name:"Zig",import:(()=>A(()=>import("./zig-VOosw3JB.js"),[],import.meta.url))}],W6=Object.fromEntries(Tk.map(e=>[e.id,e.import])),Y6=Object.fromEntries(Tk.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),yg={...W6,...Y6},X6=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>A(()=>import("./andromeeda-C4gqWexZ.js"),[],import.meta.url))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>A(()=>import("./aurora-x-D-2ljcwZ.js"),[],import.meta.url))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>A(()=>import("./ayu-dark-DYE7WIF3.js"),[],import.meta.url))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>A(()=>import("./ayu-light-BA47KaF1.js"),[],import.meta.url))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>A(()=>import("./ayu-mirage-32ctXXKs.js"),[],import.meta.url))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>A(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[],import.meta.url))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>A(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[],import.meta.url))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>A(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[],import.meta.url))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>A(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[],import.meta.url))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>A(()=>import("./dark-plus-C3mMm8J8.js"),[],import.meta.url))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>A(()=>import("./dracula-BzJJZx-M.js"),[],import.meta.url))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>A(()=>import("./dracula-soft-BXkSAIEj.js"),[],import.meta.url))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>A(()=>import("./everforest-dark-BgDCqdQA.js"),[],import.meta.url))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>A(()=>import("./everforest-light-C8M2exoo.js"),[],import.meta.url))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>A(()=>import("./github-dark-DHJKELXO.js"),[],import.meta.url))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>A(()=>import("./github-dark-default-Cuk6v7N8.js"),[],import.meta.url))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>A(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[],import.meta.url))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>A(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[],import.meta.url))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>A(()=>import("./github-light-DAi9KRSo.js"),[],import.meta.url))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>A(()=>import("./github-light-default-D7oLnXFd.js"),[],import.meta.url))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>A(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[],import.meta.url))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>A(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[],import.meta.url))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>A(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[],import.meta.url))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>A(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[],import.meta.url))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>A(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[],import.meta.url))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>A(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[],import.meta.url))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>A(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[],import.meta.url))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>A(()=>import("./horizon-BUw7H-hv.js"),[],import.meta.url))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>A(()=>import("./horizon-bright-CUuTKBJd.js"),[],import.meta.url))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>A(()=>import("./houston-DnULxvSX.js"),[],import.meta.url))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>A(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[],import.meta.url))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>A(()=>import("./kanagawa-lotus-C3DzagqV.js"),[],import.meta.url))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>A(()=>import("./kanagawa-wave-DFGoQZhC.js"),[],import.meta.url))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>A(()=>import("./laserwave-DUszq2jm.js"),[],import.meta.url))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>A(()=>import("./light-plus-B7mTdjB0.js"),[],import.meta.url))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>A(()=>import("./material-theme-D5KoaKCx.js"),[],import.meta.url))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>A(()=>import("./material-theme-darker-BfHTSMKl.js"),[],import.meta.url))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>A(()=>import("./material-theme-lighter-B0m2ddpp.js"),[],import.meta.url))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>A(()=>import("./material-theme-ocean-CyktbL80.js"),[],import.meta.url))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>A(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[],import.meta.url))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>A(()=>import("./min-dark-CafNBF8u.js"),[],import.meta.url))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>A(()=>import("./min-light-CTRr51gU.js"),[],import.meta.url))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>A(()=>import("./monokai-BRVnQi9A.js"),[],import.meta.url))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>A(()=>import("./night-owl-C39BiMTA.js"),[],import.meta.url))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>A(()=>import("./night-owl-light-CMTm3GFP.js"),[],import.meta.url))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>A(()=>import("./nord-Ddv68eIx.js"),[],import.meta.url))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>A(()=>import("./one-dark-pro-DVMEJ2y_.js"),[],import.meta.url))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>A(()=>import("./one-light-C3Wv6jpd.js"),[],import.meta.url))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>A(()=>import("./plastic-3e1v2bzS.js"),[],import.meta.url))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>A(()=>import("./poimandres-CS3Unz2-.js"),[],import.meta.url))},{id:"red",displayName:"Red",type:"dark",import:(()=>A(()=>import("./red-hvxz__6c.js"),[],import.meta.url))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>A(()=>import("./rose-pine-5qJOZa0Y.js"),[],import.meta.url))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>A(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[],import.meta.url))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>A(()=>import("./rose-pine-moon-C9pEdX9L.js"),[],import.meta.url))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>A(()=>import("./slack-dark-BthQWCQV.js"),[],import.meta.url))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>A(()=>import("./slack-ochin-DqwNpetd.js"),[],import.meta.url))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>A(()=>import("./snazzy-light-Bw305WKR.js"),[],import.meta.url))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>A(()=>import("./solarized-dark-CpvCGNkr.js"),[],import.meta.url))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>A(()=>import("./solarized-light-Dlz6yCKv.js"),[],import.meta.url))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>A(()=>import("./synthwave-84-CbfX1IO0.js"),[],import.meta.url))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>A(()=>import("./tokyo-night-hegEt444.js"),[],import.meta.url))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>A(()=>import("./vesper-DRje8inN.js"),[],import.meta.url))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>A(()=>import("./vitesse-black-Bkuqu6BP.js"),[],import.meta.url))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>A(()=>import("./vitesse-dark-D0r3Knsf.js"),[],import.meta.url))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>A(()=>import("./vitesse-light-CVO1_9PV.js"),[],import.meta.url))}],K6=Object.fromEntries(X6.map(e=>[e.id,e.import]));var jy=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Q6(){return 2147483648}function Z6(){return typeof performance<"u"?performance.now():Date.now()}const J6=(e,t)=>e+(t-e%t)%t;async function ej(e){let t,n;const i={};function o(v){n=v,i.HEAPU8=new Uint8Array(v),i.HEAPU32=new Uint32Array(v)}function s(v,x,S){i.HEAPU8.copyWithin(v,x,x+S)}function l(v){try{return t.grow(v-n.byteLength+65535>>>16),o(t.buffer),1}catch{}}function c(v){const x=i.HEAPU8.length;v=v>>>0;const S=Q6();if(v>S)return!1;for(let w=1;w<=4;w*=2){let _=x*(1+.2/w);_=Math.min(_,v+100663296);const C=Math.min(S,J6(Math.max(v,_),65536));if(l(C))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function f(v,x,S=1024){const w=x+S;let _=x;for(;v[_]&&!(_>=w);)++_;if(_-x>16&&v.buffer&&d)return d.decode(v.subarray(x,_));let C="";for(;x<_;){let k=v[x++];if(!(k&128)){C+=String.fromCharCode(k);continue}const D=v[x++]&63;if((k&224)===192){C+=String.fromCharCode((k&31)<<6|D);continue}const M=v[x++]&63;if((k&240)===224?k=(k&15)<<12|D<<6|M:k=(k&7)<<18|D<<12|M<<6|v[x++]&63,k<65536)C+=String.fromCharCode(k);else{const O=k-65536;C+=String.fromCharCode(55296|O>>10,56320|O&1023)}}return C}function p(v,x){return v?f(i.HEAPU8,v,x):""}const m={emscripten_get_now:Z6,emscripten_memcpy_big:s,emscripten_resize_heap:c,fd_write:()=>0};async function g(){const x=await e({env:m,wasi_snapshot_preview1:m});t=x.memory,o(t.buffer),Object.assign(i,x),i.UTF8ToString=p}return await g(),i}var tj=Object.defineProperty,nj=(e,t,n)=>t in e?tj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Et=(e,t,n)=>nj(e,typeof t!="symbol"?t+"":t,n);let Ot=null;function ij(e){throw new jy(e.UTF8ToString(e.getLastOnigError()))}class Jd{constructor(t){Et(this,"utf16Length"),Et(this,"utf8Length"),Et(this,"utf16Value"),Et(this,"utf8Value"),Et(this,"utf16OffsetToUtf8"),Et(this,"utf8OffsetToUtf16");const n=t.length,i=Jd._utf8ByteLength(t),o=i!==n,s=o?new Uint32Array(n+1):null;o&&(s[n]=i);const l=o?new Uint32Array(i+1):null;o&&(l[i]=n);const c=new Uint8Array(i);let d=0;for(let f=0;f<n;f++){const p=t.charCodeAt(f);let m=p,g=!1;if(p>=55296&&p<=56319&&f+1<n){const v=t.charCodeAt(f+1);v>=56320&&v<=57343&&(m=(p-55296<<10)+65536|v-56320,g=!0)}o&&(s[f]=d,g&&(s[f+1]=d),m<=127?l[d+0]=f:m<=2047?(l[d+0]=f,l[d+1]=f):m<=65535?(l[d+0]=f,l[d+1]=f,l[d+2]=f):(l[d+0]=f,l[d+1]=f,l[d+2]=f,l[d+3]=f)),m<=127?c[d++]=m:m<=2047?(c[d++]=192|(m&1984)>>>6,c[d++]=128|(m&63)>>>0):m<=65535?(c[d++]=224|(m&61440)>>>12,c[d++]=128|(m&4032)>>>6,c[d++]=128|(m&63)>>>0):(c[d++]=240|(m&1835008)>>>18,c[d++]=128|(m&258048)>>>12,c[d++]=128|(m&4032)>>>6,c[d++]=128|(m&63)>>>0),g&&f++}this.utf16Length=n,this.utf8Length=i,this.utf16Value=t,this.utf8Value=c,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=l}static _utf8ByteLength(t){let n=0;for(let i=0,o=t.length;i<o;i++){const s=t.charCodeAt(i);let l=s,c=!1;if(s>=55296&&s<=56319&&i+1<o){const d=t.charCodeAt(i+1);d>=56320&&d<=57343&&(l=(s-55296<<10)+65536|d-56320,c=!0)}l<=127?n+=1:l<=2047?n+=2:l<=65535?n+=3:n+=4,c&&i++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const ef=class ui{constructor(t){if(Et(this,"id",++ui.LAST_ID),Et(this,"_onigBinding"),Et(this,"content"),Et(this,"utf16Length"),Et(this,"utf8Length"),Et(this,"utf16OffsetToUtf8"),Et(this,"utf8OffsetToUtf16"),Et(this,"ptr"),!Ot)throw new jy("Must invoke loadWasm first.");this._onigBinding=Ot,this.content=t;const n=new Jd(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!ui._sharedPtrInUse?(ui._sharedPtr||(ui._sharedPtr=Ot.omalloc(1e4)),ui._sharedPtrInUse=!0,Ot.HEAPU8.set(n.utf8Value,ui._sharedPtr),this.ptr=ui._sharedPtr):this.ptr=n.createString(Ot)}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===ui._sharedPtr?ui._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Et(ef,"LAST_ID",0);Et(ef,"_sharedPtr",0);Et(ef,"_sharedPtrInUse",!1);let Ak=ef;class rj{constructor(t){if(Et(this,"_onigBinding"),Et(this,"_ptr"),!Ot)throw new jy("Must invoke loadWasm first.");const n=[],i=[];for(let c=0,d=t.length;c<d;c++){const f=new Jd(t[c]);n[c]=f.createString(Ot),i[c]=f.utf8Length}const o=Ot.omalloc(4*t.length);Ot.HEAPU32.set(n,o/4);const s=Ot.omalloc(4*t.length);Ot.HEAPU32.set(i,s/4);const l=Ot.createOnigScanner(o,s,t.length);for(let c=0,d=t.length;c<d;c++)Ot.ofree(n[c]);Ot.ofree(s),Ot.ofree(o),l===0&&ij(Ot),this._onigBinding=Ot,this._ptr=l}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,i){let o=0;if(typeof i=="number"&&(o=i),typeof t=="string"){t=new Ak(t);const s=this._findNextMatchSync(t,n,!1,o);return t.dispose(),s}return this._findNextMatchSync(t,n,!1,o)}_findNextMatchSync(t,n,i,o){const s=this._onigBinding,l=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),o);if(l===0)return null;const c=s.HEAPU32;let d=l/4;const f=c[d++],p=c[d++],m=[];for(let g=0;g<p;g++){const v=t.convertUtf8OffsetToUtf16(c[d++]),x=t.convertUtf8OffsetToUtf16(c[d++]);m[g]={start:v,end:x,length:x-v}}return{index:f,captureIndices:m}}}function oj(e){return typeof e.instantiator=="function"}function aj(e){return typeof e.default=="function"}function sj(e){return typeof e.data<"u"}function lj(e){return typeof Response<"u"&&e instanceof Response}function uj(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 Ec;function Lk(e){if(Ec)return Ec;async function t(){Ot=await ej(async n=>{let i=e;return i=await i,typeof i=="function"&&(i=await i(n)),typeof i=="function"&&(i=await i(n)),oj(i)?i=await i.instantiator(n):aj(i)?i=await i.default(n):(sj(i)&&(i=i.data),lj(i)?typeof WebAssembly.instantiateStreaming=="function"?i=await cj(i)(n):i=await dj(i)(n):uj(i)?i=await sm(i)(n):i instanceof WebAssembly.Module?i=await sm(i)(n):"default"in i&&i.default instanceof WebAssembly.Module&&(i=await sm(i.default)(n))),"instance"in i&&(i=i.instance),"exports"in i&&(i=i.exports),i})}return Ec=t(),Ec}function sm(e){return t=>WebAssembly.instantiate(e,t)}function cj(e){return t=>WebAssembly.instantiateStreaming(e,t)}function dj(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let Rk;function fj(e){Rk=e}function hj(){return Rk}async function Ok(e){return e&&await Lk(e),{createScanner(t){return new rj(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new Ak(t)}}}const pj=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:Ok,getDefaultWasmLoader:hj,loadWasm:Lk,setDefaultWasmLoader:fj},Symbol.toStringTag,{value:"Module"}));var Dk=V6({});G6(Dk,pj);var nt=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function mj(e){return By(e)}function By(e){return Array.isArray(e)?gj(e):e instanceof RegExp?e:typeof e=="object"?yj(e):e}function gj(e){let t=[];for(let n=0,i=e.length;n<i;n++)t[n]=By(e[n]);return t}function yj(e){let t={};for(let n in e)t[n]=By(e[n]);return t}function Mk(e,...t){return t.forEach(n=>{for(let i in n)e[i]=n[i]}),e}function Ik(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Ik(e.substring(0,e.length-1)):e.substr(~t+1)}var lm=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,kc=class{static hasCaptures(e){return e===null?!1:(lm.lastIndex=0,lm.test(e))}static replaceCaptures(e,t,n){return e.replace(lm,(i,o,s,l)=>{let c=n[parseInt(o||s,10)];if(c){let d=t.substring(c.start,c.end);for(;d[0]===".";)d=d.substring(1);switch(l){case"downcase":return d.toLowerCase();case"upcase":return d.toUpperCase();default:return d}}else return i})}};function Nk(e,t){return e<t?-1:e>t?1:0}function zk(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,i=t.length;if(n===i){for(let o=0;o<n;o++){let s=Nk(e[o],t[o]);if(s!==0)return s}return 0}return n-i}function nC(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 Pk(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Hk=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}},Sd=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(xj(e),t)}static createFromParsedTheme(e,t){return _j(e,t)}_cachedMatchRoot=new Hk(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,i=this._cachedMatchRoot.get(t).find(o=>vj(e.parent,o.parentScopes));return i?new jk(i.fontStyle,i.foreground,i.background):null}},um=class Jc{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const i of n)t=new Jc(t,i);return t}static from(...t){let n=null;for(let i=0;i<t.length;i++)n=new Jc(n,t[i]);return n}push(t){return new Jc(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let i=this;for(;i&&i!==t;)n.push(i.scopeName),i=i.parent;return i===t?n.reverse():void 0}};function vj(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let i=t[n],o=!1;if(i===">"){if(n===t.length-1)return!1;i=t[++n],o=!0}for(;e&&!bj(e.scopeName,i);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function bj(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var jk=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function xj(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],i=0;for(let o=0,s=t.length;o<s;o++){let l=t[o];if(!l.settings)continue;let c;if(typeof l.scope=="string"){let m=l.scope;m=m.replace(/^[,]+/,""),m=m.replace(/[,]+$/,""),c=m.split(",")}else Array.isArray(l.scope)?c=l.scope:c=[""];let d=-1;if(typeof l.settings.fontStyle=="string"){d=0;let m=l.settings.fontStyle.split(" ");for(let g=0,v=m.length;g<v;g++)switch(m[g]){case"italic":d=d|1;break;case"bold":d=d|2;break;case"underline":d=d|4;break;case"strikethrough":d=d|8;break}}let f=null;typeof l.settings.foreground=="string"&&nC(l.settings.foreground)&&(f=l.settings.foreground);let p=null;typeof l.settings.background=="string"&&nC(l.settings.background)&&(p=l.settings.background);for(let m=0,g=c.length;m<g;m++){let x=c[m].trim().split(" "),S=x[x.length-1],w=null;x.length>1&&(w=x.slice(0,x.length-1),w.reverse()),n[i++]=new Sj(S,w,o,d,f,p)}}return n}var Sj=class{constructor(e,t,n,i,o,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=i,this.foreground=o,this.background=s}},$t=(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))($t||{});function _j(e,t){e.sort((d,f)=>{let p=Nk(d.scope,f.scope);return p!==0||(p=zk(d.parentScopes,f.parentScopes),p!==0)?p:d.index-f.index});let n=0,i="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let d=e.shift();d.fontStyle!==-1&&(n=d.fontStyle),d.foreground!==null&&(i=d.foreground),d.background!==null&&(o=d.background)}let s=new Cj(t),l=new jk(n,s.getId(i),s.getId(o)),c=new Ej(new vg(0,null,-1,0,0),[]);for(let d=0,f=e.length;d<f;d++){let p=e[d];c.insert(0,p.scope,p.parentScopes,p.fontStyle,s.getId(p.foreground),s.getId(p.background))}return new Sd(s,l,c)}var Cj=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,n=e.length;t<n;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)}},wj=Object.freeze([]),vg=class Bk{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,i,o,s){this.scopeDepth=t,this.parentScopes=n||wj,this.fontStyle=i,this.foreground=o,this.background=s}clone(){return new Bk(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let i=0,o=t.length;i<o;i++)n[i]=t[i].clone();return n}acceptOverwrite(t,n,i,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),i!==0&&(this.foreground=i),o!==0&&(this.background=o)}},Ej=class bg{constructor(t,n=[],i={}){this._mainRule=t,this._children=i,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let i=0,o=0;for(;t.parentScopes[i]===">"&&i++,n.parentScopes[o]===">"&&o++,!(i>=t.parentScopes.length||o>=n.parentScopes.length);){const s=n.parentScopes[o].length-t.parentScopes[i].length;if(s!==0)return s;i++,o++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let i=t.indexOf("."),o,s;if(i===-1?(o=t,s=""):(o=t.substring(0,i),s=t.substring(i+1)),this._children.hasOwnProperty(o))return this._children[o].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(bg._cmpBySpecificity),n}insert(t,n,i,o,s,l){if(n===""){this._doInsertHere(t,i,o,s,l);return}let c=n.indexOf("."),d,f;c===-1?(d=n,f=""):(d=n.substring(0,c),f=n.substring(c+1));let p;this._children.hasOwnProperty(d)?p=this._children[d]:(p=new bg(this._mainRule.clone(),vg.cloneArr(this._rulesWithParentScopes)),this._children[d]=p),p.insert(t+1,f,i,o,s,l)}_doInsertHere(t,n,i,o,s){if(n===null){this._mainRule.acceptOverwrite(t,i,o,s);return}for(let l=0,c=this._rulesWithParentScopes.length;l<c;l++){let d=this._rulesWithParentScopes[l];if(zk(d.parentScopes,n)===0){d.acceptOverwrite(t,i,o,s);return}}i===-1&&(i=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new vg(t,n,i,o,s))}},Ao=class Pn{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=Pn.getLanguageId(t),i=Pn.getTokenType(t),o=Pn.getFontStyle(t),s=Pn.getForeground(t),l=Pn.getBackground(t);console.log({languageId:n,tokenType:i,fontStyle:o,foreground:s,background:l})}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,n,i,o,s,l,c){let d=Pn.getLanguageId(t),f=Pn.getTokenType(t),p=Pn.containsBalancedBrackets(t)?1:0,m=Pn.getFontStyle(t),g=Pn.getForeground(t),v=Pn.getBackground(t);return n!==0&&(d=n),i!==8&&(f=i),o!==null&&(p=o?1:0),s!==-1&&(m=s),l!==0&&(g=l),c!==0&&(v=c),(d<<0|f<<8|p<<10|m<<11|g<<15|v<<24)>>>0}};function _d(e,t){const n=[],i=kj(e);let o=i.next();for(;o!==null;){let d=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":d=1;break;case"L":d=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=i.next()}let f=l();if(n.push({matcher:f,priority:d}),o!==",")break;o=i.next()}return n;function s(){if(o==="-"){o=i.next();const d=s();return f=>!!d&&!d(f)}if(o==="("){o=i.next();const d=c();return o===")"&&(o=i.next()),d}if(iC(o)){const d=[];do d.push(o),o=i.next();while(iC(o));return f=>t(d,f)}return null}function l(){const d=[];let f=s();for(;f;)d.push(f),f=s();return p=>d.every(m=>m(p))}function c(){const d=[];let f=l();for(;f&&(d.push(f),o==="|"||o===",");){do o=i.next();while(o==="|"||o===",");f=l()}return p=>d.some(m=>m(p))}}function iC(e){return!!e&&!!e.match(/[\w\.:]+/)}function kj(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const i=n[0];return n=t.exec(e),i}}}function Uk(e){typeof e.dispose=="function"&&e.dispose()}var wl=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Tj=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Aj=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))}},Lj=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new wl(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Aj;for(const n of e)Rj(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof wl){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Rj(e,t,n,i){const o=n.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=n.lookup(t);e instanceof wl?ed({baseGrammar:s,selfGrammar:o},i):xg(e.ruleName,{baseGrammar:s,selfGrammar:o,repository:o.repository},i);const l=n.injections(e.scopeName);if(l)for(const c of l)i.add(new wl(c))}function xg(e,t,n){if(t.repository&&t.repository[e]){const i=t.repository[e];Cd([i],t,n)}}function ed(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Cd(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Cd(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Cd(e,t,n){for(const i of e){if(n.visitedRule.has(i))continue;n.visitedRule.add(i);const o=i.repository?Mk({},t.repository,i.repository):t.repository;Array.isArray(i.patterns)&&Cd(i.patterns,{...t,repository:o},n);const s=i.include;if(!s)continue;const l=Vk(s);switch(l.kind){case 0:ed({...t,selfGrammar:t.baseGrammar},n);break;case 1:ed(t,n);break;case 2:xg(l.ruleName,{...t,repository:o},n);break;case 3:case 4:const c=l.scopeName===t.selfGrammar.scopeName?t.selfGrammar:l.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(c){const d={baseGrammar:t.baseGrammar,selfGrammar:c,repository:o};l.kind===4?xg(l.ruleName,d,n):ed(d,n)}else l.kind===4?n.add(new Tj(l.scopeName,l.ruleName)):n.add(new wl(l.scopeName));break}}}var Oj=class{kind=0},Dj=class{kind=1},Mj=class{constructor(e){this.ruleName=e}kind=2},Ij=class{constructor(e){this.scopeName=e}kind=3},Nj=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Vk(e){if(e==="$base")return new Oj;if(e==="$self")return new Dj;const t=e.indexOf("#");if(t===-1)return new Ij(e);if(t===0)return new Mj(e.substring(1));{const n=e.substring(0,t),i=e.substring(t+1);return new Nj(n,i)}}var zj=/\\(\d+)/,rC=/\\(\d+)/g,Pj=-1,Fk=-2;var Fl=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,i){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=kc.hasCaptures(this._name),this._contentName=i||null,this._contentNameIsCapturing=kc.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Ik(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:kc.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:kc.replaceCaptures(this._contentName,e,t)}},Hj=class extends Fl{retokenizeCapturedWithRuleId;constructor(e,t,n,i,o){super(e,t,n,i),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,i){throw new Error("Not supported!")}},jj=class extends Fl{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,i,o){super(e,t,n,null),this._match=new El(i,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,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new kl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},oC=class extends Fl{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,i,o){super(e,t,n,i),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 n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new kl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Sg=class extends Fl{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,i,o,s,l,c,d,f){super(e,t,n,i),this._begin=new El(o,this.id),this.beginCaptures=s,this._end=new El(l||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=d||!1,this.patterns=f.patterns,this.hasMissingPatterns=f.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,n,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new kl;for(const n of this.patterns)e.getRule(n).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}},wd=class extends Fl{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,i,o,s,l,c,d){super(e,t,n,i),this._begin=new El(o,this.id),this.beginCaptures=s,this.whileCaptures=c,this._while=new El(l,Fk),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=d.patterns,this.hasMissingPatterns=d.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new kl;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,n,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new kl,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},Gk=class Ft{static createCaptureRule(t,n,i,o,s){return t.registerRule(l=>new Hj(n,l,i,o,s))}static getCompiledRuleId(t,n,i){return t.id||n.registerRule(o=>{if(t.id=o,t.match)return new jj(t.$vscodeTextmateLocation,t.id,t.name,t.match,Ft._compileCaptures(t.captures,n,i));if(typeof t.begin>"u"){t.repository&&(i=Mk({},i,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new oC(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Ft._compilePatterns(s,n,i))}return t.while?new wd(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ft._compileCaptures(t.beginCaptures||t.captures,n,i),t.while,Ft._compileCaptures(t.whileCaptures||t.captures,n,i),Ft._compilePatterns(t.patterns,n,i)):new Sg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ft._compileCaptures(t.beginCaptures||t.captures,n,i),t.end,Ft._compileCaptures(t.endCaptures||t.captures,n,i),t.applyEndPatternLast,Ft._compilePatterns(t.patterns,n,i))}),t.id}static _compileCaptures(t,n,i){let o=[];if(t){let s=0;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const c=parseInt(l,10);c>s&&(s=c)}for(let l=0;l<=s;l++)o[l]=null;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const c=parseInt(l,10);let d=0;t[l].patterns&&(d=Ft.getCompiledRuleId(t[l],n,i)),o[c]=Ft.createCaptureRule(n,t[l].$vscodeTextmateLocation,t[l].name,t[l].contentName,d)}}return o}static _compilePatterns(t,n,i){let o=[];if(t)for(let s=0,l=t.length;s<l;s++){const c=t[s];let d=-1;if(c.include){const f=Vk(c.include);switch(f.kind){case 0:case 1:d=Ft.getCompiledRuleId(i[c.include],n,i);break;case 2:let p=i[f.ruleName];p&&(d=Ft.getCompiledRuleId(p,n,i));break;case 3:case 4:const m=f.scopeName,g=f.kind===4?f.ruleName:null,v=n.getExternalGrammar(m,i);if(v)if(g){let x=v.repository[g];x&&(d=Ft.getCompiledRuleId(x,n,v.repository))}else d=Ft.getCompiledRuleId(v.repository.$self,n,v.repository);break}}else d=Ft.getCompiledRuleId(c,n,i);if(d!==-1){const f=n.getRule(d);let p=!1;if((f instanceof oC||f instanceof Sg||f instanceof wd)&&f.hasMissingPatterns&&f.patterns.length===0&&(p=!0),p)continue;o.push(d)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},El=class $k{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const i=t.length;let o=0,s=[],l=!1;for(let c=0;c<i;c++)if(t.charAt(c)==="\\"&&c+1<i){const f=t.charAt(c+1);f==="z"?(s.push(t.substring(o,c)),s.push("$(?!\\n)(?<!\\n)"),o=c+2):(f==="A"||f==="G")&&(l=!0),c++}this.hasAnchor=l,o===0?this.source=t:(s.push(t.substring(o,i)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=zj.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,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let i=n.map(o=>t.substring(o.start,o.end));return rC.lastIndex=0,this.source.replace(rC,(o,s)=>Pk(i[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=[],n=[],i=[],o=[],s,l,c,d;for(s=0,l=this.source.length;s<l;s++)c=this.source.charAt(s),t[s]=c,n[s]=c,i[s]=c,o[s]=c,c==="\\"&&s+1<l&&(d=this.source.charAt(s+1),d==="A"?(t[s+1]="",n[s+1]="",i[s+1]="A",o[s+1]="A"):d==="G"?(t[s+1]="",n[s+1]="G",i[s+1]="",o[s+1]="G"):(t[s+1]=d,n[s+1]=d,i[s+1]=d,o[s+1]=d),s++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:i.join(""),A1_G1:o.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},kl=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(n=>n.source);this._cached=new aC(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let i=this._items.map(o=>o.resolveAnchors(t,n));return new aC(e,i,this._items.map(o=>o.ruleId))}},aC=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
56
|
-
`)}findNextMatchSync(e,t,n){const i=this.scanner.findNextMatchSync(e,t,n);return i?{ruleId:this.rules[i.index],captureIndices:i.captureIndices}:null}},cm=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Bj=class _g{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new cm(t,8),this._embeddedLanguagesMatcher=new Uj(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?_g._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new cm(0,0);_getBasicScopeAttributes=new Hk(t=>{const n=this._scopeToLanguage(t),i=this._toStandardTokenType(t);return new cm(n,i)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(_g.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[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/},Uj=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(([n,i])=>Pk(n));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])}},sC=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function qk(e,t,n,i,o,s,l,c){const d=t.content.length;let f=!1,p=-1;if(l){const v=Vj(e,t,n,i,o,s);o=v.stack,i=v.linePos,n=v.isFirstLine,p=v.anchorPosition}const m=Date.now();for(;!f;){if(c!==0&&Date.now()-m>c)return new sC(o,!0);g()}return new sC(o,!1);function g(){const v=Fj(e,t,n,i,o,p);if(!v){s.produce(o,d),f=!0;return}const x=v.captureIndices,S=v.matchedRuleId,w=x&&x.length>0?x[0].end>i:!1;if(S===Pj){const _=o.getRule(e);s.produce(o,x[0].start),o=o.withContentNameScopesList(o.nameScopesList),sl(e,t,n,o,s,_.endCaptures,x),s.produce(o,x[0].end);const C=o;if(o=o.parent,p=C.getAnchorPos(),!w&&C.getEnterPos()===i){o=C,s.produce(o,d),f=!0;return}}else{const _=e.getRule(S);s.produce(o,x[0].start);const C=o,k=_.getName(t.content,x),D=o.contentNameScopesList.pushAttributed(k,e);if(o=o.push(S,i,p,x[0].end===d,null,D,D),_ instanceof Sg){const M=_;sl(e,t,n,o,s,M.beginCaptures,x),s.produce(o,x[0].end),p=x[0].end;const O=M.getContentName(t.content,x),z=D.pushAttributed(O,e);if(o=o.withContentNameScopesList(z),M.endHasBackReferences&&(o=o.withEndRule(M.getEndWithResolvedBackReferences(t.content,x))),!w&&C.hasSameRuleAs(o)){o=o.pop(),s.produce(o,d),f=!0;return}}else if(_ instanceof wd){const M=_;sl(e,t,n,o,s,M.beginCaptures,x),s.produce(o,x[0].end),p=x[0].end;const O=M.getContentName(t.content,x),z=D.pushAttributed(O,e);if(o=o.withContentNameScopesList(z),M.whileHasBackReferences&&(o=o.withEndRule(M.getWhileWithResolvedBackReferences(t.content,x))),!w&&C.hasSameRuleAs(o)){o=o.pop(),s.produce(o,d),f=!0;return}}else if(sl(e,t,n,o,s,_.captures,x),s.produce(o,x[0].end),o=o.pop(),!w){o=o.safePop(),s.produce(o,d),f=!0;return}}x[0].end>i&&(i=x[0].end,n=!1)}}function Vj(e,t,n,i,o,s){let l=o.beginRuleCapturedEOL?0:-1;const c=[];for(let d=o;d;d=d.pop()){const f=d.getRule(e);f instanceof wd&&c.push({rule:f,stack:d})}for(let d=c.pop();d;d=c.pop()){const{ruleScanner:f,findOptions:p}=qj(d.rule,e,d.stack.endRule,n,i===l),m=f.findNextMatchSync(t,i,p);if(m){if(m.ruleId!==Fk){o=d.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(s.produce(d.stack,m.captureIndices[0].start),sl(e,t,n,d.stack,s,d.rule.whileCaptures,m.captureIndices),s.produce(d.stack,m.captureIndices[0].end),l=m.captureIndices[0].end,m.captureIndices[0].end>i&&(i=m.captureIndices[0].end,n=!1))}else{o=d.stack.pop();break}}return{stack:o,linePos:i,anchorPosition:l,isFirstLine:n}}function Fj(e,t,n,i,o,s){const l=Gj(e,t,n,i,o,s),c=e.getInjections();if(c.length===0)return l;const d=$j(c,e,t,n,i,o,s);if(!d)return l;if(!l)return d;const f=l.captureIndices[0].start,p=d.captureIndices[0].start;return p<f||d.priorityMatch&&p===f?d:l}function Gj(e,t,n,i,o,s){const l=o.getRule(e),{ruleScanner:c,findOptions:d}=Wk(l,e,o.endRule,n,i===s),f=c.findNextMatchSync(t,i,d);return f?{captureIndices:f.captureIndices,matchedRuleId:f.ruleId}:null}function $j(e,t,n,i,o,s,l){let c=Number.MAX_VALUE,d=null,f,p=0;const m=s.contentNameScopesList.getScopeNames();for(let g=0,v=e.length;g<v;g++){const x=e[g];if(!x.matcher(m))continue;const S=t.getRule(x.ruleId),{ruleScanner:w,findOptions:_}=Wk(S,t,null,i,o===l),C=w.findNextMatchSync(n,o,_);if(!C)continue;const k=C.captureIndices[0].start;if(!(k>=c)&&(c=k,d=C.captureIndices,f=C.ruleId,p=x.priority,c===o))break}return d?{priorityMatch:p===-1,captureIndices:d,matchedRuleId:f}:null}function Wk(e,t,n,i,o){return{ruleScanner:e.compileAG(t,n,i,o),findOptions:0}}function qj(e,t,n,i,o){return{ruleScanner:e.compileWhileAG(t,n,i,o),findOptions:0}}function sl(e,t,n,i,o,s,l){if(s.length===0)return;const c=t.content,d=Math.min(s.length,l.length),f=[],p=l[0].end;for(let m=0;m<d;m++){const g=s[m];if(g===null)continue;const v=l[m];if(v.length===0)continue;if(v.start>p)break;for(;f.length>0&&f[f.length-1].endPos<=v.start;)o.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop();if(f.length>0?o.produceFromScopes(f[f.length-1].scopes,v.start):o.produce(i,v.start),g.retokenizeCapturedWithRuleId){const S=g.getName(c,l),w=i.contentNameScopesList.pushAttributed(S,e),_=g.getContentName(c,l),C=w.pushAttributed(_,e),k=i.push(g.retokenizeCapturedWithRuleId,v.start,-1,!1,null,w,C),D=e.createOnigString(c.substring(0,v.end));qk(e,D,n&&v.start===0,v.start,k,o,!1,0),Uk(D);continue}const x=g.getName(c,l);if(x!==null){const w=(f.length>0?f[f.length-1].scopes:i.contentNameScopesList).pushAttributed(x,e);f.push(new Wj(w,v.end))}}for(;f.length>0;)o.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop()}var Wj=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Yj(e,t,n,i,o,s,l,c){return new Kj(e,t,n,i,o,s,l,c)}function lC(e,t,n,i,o){const s=_d(t,Ed),l=Gk.getCompiledRuleId(n,i,o.repository);for(const c of s)e.push({debugSelector:t,matcher:c.matcher,ruleId:l,grammar:o,priority:c.priority})}function Ed(e,t){if(t.length<e.length)return!1;let n=0;return e.every(i=>{for(let o=n;o<t.length;o++)if(Xj(t[o],i))return n=o+1,!0;return!1})}function Xj(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var Kj=class{constructor(e,t,n,i,o,s,l,c){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=c,this._basicScopeAttributesProvider=new Bj(n,i),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=l,this._grammar=uC(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const d of Object.keys(o)){const f=_d(d,Ed);for(const p of f)this._tokenTypeMatchers.push({matcher:p.matcher,type:o[d]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},t=[],n=this._rootScopeName,i=e.lookup(n);if(i){const o=i.injections;if(o)for(let l in o)lC(t,l,o[l],this,i);const s=this._grammarRepository.injections(n);s&&s.forEach(l=>{const c=this.getExternalGrammar(l);if(c){const d=c.injectionSelector;d&&lC(t,d,c,this,c)}})}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,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=uC(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const i=this._tokenize(e,t,!1,n);return{tokens:i.lineTokens.getResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}tokenizeLine2(e,t,n=0){const i=this._tokenize(e,t,!0,n);return{tokens:i.lineTokens.getBinaryResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}_tokenize(e,t,n,i){this._rootId===-1&&(this._rootId=Gk.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===Cg.NULL){o=!0;const f=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),m=Ao.set(0,f.languageId,f.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),g=this.getRule(this._rootId).getName(null,null);let v;g?v=ml.createRootAndLookUpScopeName(g,m,this):v=ml.createRoot("unknown",m),t=new Cg(null,this._rootId,-1,-1,!1,null,v,v)}else o=!1,t.reset();e=e+`
|
|
57
|
-
`;const s=this.createOnigString(e),l=s.content.length,c=new Zj(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=qk(this,s,o,0,t,c,!0,i);return Uk(s),{lineLength:l,lineTokens:c,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function uC(e,t){return e=mj(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 ml=class ci{constructor(t,n,i){this.parent=t,this.scopePath=n,this.tokenAttributes=i}static fromExtension(t,n){let i=t,o=t?.scopePath??null;for(const s of n)o=um.push(o,s.scopeNames),i=new ci(i,o,s.encodedTokenAttributes);return i}static createRoot(t,n){return new ci(null,new um(null,t),n)}static createRootAndLookUpScopeName(t,n,i){const o=i.getMetadataForScope(t),s=new um(null,t),l=i.themeProvider.themeMatch(s),c=ci.mergeAttributes(n,o,l);return new ci(null,s,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return ci.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,i){let o=-1,s=0,l=0;return i!==null&&(o=i.fontStyle,s=i.foregroundId,l=i.backgroundId),Ao.set(t,n.languageId,n.tokenType,null,o,s,l)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return ci._pushAttributed(this,t,n);const i=t.split(/ /g);let o=this;for(const s of i)o=ci._pushAttributed(o,s,n);return o}static _pushAttributed(t,n,i){const o=i.getMetadataForScope(n),s=t.scopePath.push(n),l=i.themeProvider.themeMatch(s),c=ci.mergeAttributes(t.tokenAttributes,o,l);return new ci(t,s,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let i=this;for(;i&&i!==t;)n.push({encodedTokenAttributes:i.tokenAttributes,scopeNames:i.scopePath.getExtensionIfDefined(i.parent?.scopePath??null)}),i=i.parent;return i===t?n.reverse():void 0}},Cg=class bo{constructor(t,n,i,o,s,l,c,d){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=l,this.nameScopesList=c,this.contentNameScopesList=d,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=i,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new bo(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:bo._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?ml.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){bo._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,i,o,s,l,c){return new bo(this,t,n,i,o,s,l,c)}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,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}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 bo(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.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,n){const i=ml.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new bo(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,i,ml.fromExtension(i,n.contentNameScopesList))}},Qj=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):_d(n,Ed).map(i=>i.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>_d(n,Ed).map(i=>i.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}},Zj=class{constructor(e,t,n,i){this.balancedBracketSelectors=i,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,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 i=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 l of this._tokenTypeOverrides)l.matcher(s)&&(i=Ao.set(i,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(i=Ao.set(i,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),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 n=new Uint32Array(this._binaryTokens.length);for(let i=0,o=this._binaryTokens.length;i<o;i++)n[i]=this._binaryTokens[i];return n}},Jj=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,n,i,o){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,Yj(e,s,t,n,i,o,this,this._onigLib))}return this._grammars.get(e)}},e3=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new Jj(Sd.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Sd.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,i){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:i})}loadGrammarWithConfiguration(t,n,i){return this._loadGrammar(t,n,i.embeddedLanguages,i.tokenTypes,new Qj(i.balancedBracketSelectors||[],i.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,i,o,s){const l=new Lj(this._syncRegistry,t);for(;l.Q.length>0;)l.Q.map(c=>this._loadSingleGrammar(c.scopeName)),l.processQueue();return this._grammarForScopeName(t,n,i,o,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const i=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,i)}}addGrammar(t,n=[],i=0,o=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,i,o)}_grammarForScopeName(t,n=0,i=null,o=null,s=null){return this._syncRegistry.grammarForScopeName(t,n,i,o,s)}},wg=Cg.NULL;function kd(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},i=typeof e=="string"?e:e.name;for(const[o,s]of Object.entries(t?.colorReplacements||{}))typeof s=="string"?n[o]=s:o===i&&Object.assign(n,s);return n}function Fr(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function t3(e){return Array.isArray(e)?e:[e]}async function Yk(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function tf(e){return!e||["plaintext","txt","text","plain"].includes(e)}function Xk(e){return e==="ansi"||tf(e)}function nf(e){return e==="none"}function Kk(e){return nf(e)}const n3=/(\r?\n)/g;function rf(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(n3);let i=0;const o=[];for(let s=0;s<n.length;s+=2){const l=t?n[s]+(n[s+1]||""):n[s];o.push([l,i]),i+=n[s].length,i+=n[s+1]?.length||0}return o}const cC={light:"#333333",dark:"#bbbbbb"},dC={light:"#fffffe",dark:"#1e1e1e"},fC="__shiki_resolved";function of(e){if(e?.[fC])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:n,fg:i}=t;if(!n||!i){const c=t.settings?t.settings.find(d=>!d.name&&!d.scope):void 0;c?.settings?.foreground&&(i=c.settings.foreground),c?.settings?.background&&(n=c.settings.background),!i&&t?.colors?.["editor.foreground"]&&(i=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),i||(i=t.type==="light"?cC.light:cC.dark),n||(n=t.type==="light"?dC.light:dC.dark),t.fg=i,t.bg=n}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 l(c){if(s.has(c))return s.get(c);o+=1;const d=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${d}`]?l(c):(s.set(c,d),d)}t.settings=t.settings.map(c=>{const d=c.settings?.foreground&&!c.settings.foreground.startsWith("#"),f=c.settings?.background&&!c.settings.background.startsWith("#");if(!d&&!f)return c;const p={...c,settings:{...c.settings}};if(d){const m=l(c.settings.foreground);t.colorReplacements[m]=c.settings.foreground,p.settings.foreground=m}if(f){const m=l(c.settings.background);t.colorReplacements[m]=c.settings.background,p.settings.background=m}return p});for(const c of Object.keys(t.colors||{}))if((c==="editor.foreground"||c==="editor.background"||c.startsWith("terminal.ansi"))&&!t.colors[c]?.startsWith("#")){const d=l(t.colors[c]);t.colorReplacements[d]=t.colors[c],t.colors[c]=d}return Object.defineProperty(t,fC,{enumerable:!1,writable:!1,value:!0}),t}async function Qk(e){return[...new Set((await Promise.all(e.filter(t=>!Xk(t)).map(async t=>await Yk(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function Zk(e){return(await Promise.all(e.map(async t=>Kk(t)?null:of(await Yk(t))))).filter(t=>!!t)}function Jk(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new nt(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var i3=class extends e3{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,i={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=i,this._themes.map(o=>this.loadTheme(o)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=of(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Sd.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Jk(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(o=>o.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const i=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(i.name=e.name,this._resolvedGrammars.set(e.name,i),e.aliases&&e.aliases.forEach(o=>{this._alias[o]=e.name}),this._loadedLanguagesCache=null,t.size)for(const o of t)this._resolvedGrammars.delete(o.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(o.scopeName),this._syncRegistry?._grammars?.delete(o.scopeName),this.loadLanguage(this._langMap.get(o.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const i of e)this.resolveEmbeddedLanguages(i);const t=[...this._langGraph.entries()],n=t.filter(([i,o])=>!o);if(n.length){const i=t.filter(([o,s])=>s?(s.embeddedLanguages||s.embeddedLangs)?.some(l=>n.map(([c])=>c).includes(l)):!1).filter(o=>!n.includes(o));throw new nt(`Missing languages ${n.map(([o])=>`\`${o}\``).join(", ")}, required by ${i.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[i,o]of t)this._resolver.addLanguage(o);for(const[i,o]of t)this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const n of t)this._langGraph.set(n,this._langMap.get(n))}},r3=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let i=1;i<=t.length;i++){const o=t.slice(0,i).join(".");n=[...n,...this._injections.get(o)||[]]}return n}};let nl=0;function o3(e){nl+=1,e.warnings!==!1&&nl>=10&&nl%10===0&&console.warn(`[Shiki] ${nl} 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 nt("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),i=(e.themes||[]).flat(1).map(of),o=new i3(new r3(e.engine,n),i,n,e.langAlias);let s;function l(C){return Jk(C,e.langAlias)}function c(C){w();const k=o.getGrammar(typeof C=="string"?C:C.name);if(!k)throw new nt(`Language \`${C}\` not found, you may need to load it first`);return k}function d(C){if(C==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};w();const k=o.getTheme(C);if(!k)throw new nt(`Theme \`${C}\` not found, you may need to load it first`);return k}function f(C){w();const k=d(C);return s!==C&&(o.setTheme(k),s=C),{theme:k,colorMap:o.getColorMap()}}function p(){return w(),o.getLoadedThemes()}function m(){return w(),o.getLoadedLanguages()}function g(...C){w(),o.loadLanguages(C.flat(1))}async function v(...C){return g(await Qk(C))}function x(...C){w();for(const k of C.flat(1))o.loadTheme(k)}async function S(...C){return w(),x(await Zk(C))}function w(){if(t)throw new nt("Shiki instance has been disposed")}function _(){t||(t=!0,o.dispose(),nl-=1)}return{setTheme:f,getTheme:d,getLanguage:c,getLoadedThemes:p,getLoadedLanguages:m,resolveLangAlias:l,loadLanguage:v,loadLanguageSync:g,loadTheme:S,loadThemeSync:x,dispose:_,[Symbol.dispose]:_}}async function a3(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,i]=await Promise.all([Zk(e.themes||[]),Qk(e.langs||[]),e.engine]);return o3({...e,themes:t,langs:n,engine:i})}const eT=new WeakMap;function af(e,t){eT.set(e,t)}function Tl(e){return eT.get(e)}var sf=class tT{_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,n){return new tT(Object.fromEntries(t3(n).map(i=>[i,wg])),t)}constructor(...t){if(t.length===2){const[n,i]=t;this.lang=i,this._stacks=n}else{const[n,i,o]=t;this.lang=i,this._stacks={[o]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return s3(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function s3(e){const t=[],n=new Set;function i(o){if(n.has(o))return;n.add(o);const s=o?.nameScopesList?.scopeName;s&&t.push(s),o.parent&&i(o.parent)}return i(e),t}function l3(e,t){if(!(e instanceof sf))throw new nt("Invalid grammar state");return e.getInternalStack(t)}const u3=/,/,c3=/ /;function nT(e,t,n={}){const{theme:i=e.getLoadedThemes()[0]}=n;if(tf(e.resolveLangAlias(n.lang||"text"))||nf(i))return rf(t).map(c=>[{content:c[0],offset:c[1]}]);const{theme:o,colorMap:s}=e.setTheme(i),l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new nt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(o.name))throw new nt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return f3(t,l,o,s,n)}function d3(...e){if(e.length===2)return Tl(e[1]);const[t,n,i={}]=e,{lang:o="text",theme:s=t.getLoadedThemes()[0]}=i;if(tf(o)||nf(s))throw new nt("Plain language does not have grammar state");if(o==="ansi")throw new nt("ANSI language does not have grammar state");const{theme:l,colorMap:c}=t.setTheme(s),d=t.getLanguage(o);return new sf(Uy(n,d,l,c,i).stateStack,d.name,l.name)}function f3(e,t,n,i,o){const s=Uy(e,t,n,i,o),l=new sf(s.stateStack,t.name,n.name);return af(s.tokens,l),s.tokens}function Uy(e,t,n,i,o){const s=kd(n,o),{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:c=500,includeExplanation:d=!1}=o,f=rf(e);let p=o.grammarState?l3(o.grammarState,n.name)??wg:o.grammarContextCode!=null?Uy(o.grammarContextCode,t,n,i,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:wg,m=[];const g=[];for(let v=0,x=f.length;v<x;v++){const[S,w]=f[v];if(S===""){m=[],g.push([]);continue}if(l>0&&S.length>=l){m=[],g.push([{content:S,offset:w,color:"",fontStyle:0}]);continue}let _,C,k;d&&d!=="tokenType"&&(_=t.tokenizeLine(S,p,c),C=_.tokens,k=0);const D=t.tokenizeLine2(S,p,c),M=D.tokens.length/2;for(let O=0;O<M;O++){const z=D.tokens[2*O],j=O+1<M?D.tokens[2*O+2]:S.length;if(z===j)continue;const F=D.tokens[2*O+1],ee=Fr(i[Ao.getForeground(F)],s),q=Ao.getFontStyle(F),U={content:S.substring(z,j),offset:w+z,color:ee,fontStyle:q};if(d==="tokenType")U.type=Ao.getTokenType(F);else if(d){const Z=[];if(d!=="scopeName")for(const W of n.settings){let P;switch(typeof W.scope){case"string":P=W.scope.split(u3).map($=>$.trim());break;case"object":P=W.scope;break;default:continue}Z.push({settings:W,selectors:P.map($=>$.split(c3))})}U.explanation=[];let X=0;for(;z+X<j;){const W=C[k],P=S.substring(W.startIndex,W.endIndex);X+=P.length,U.explanation.push({content:P,scopes:d==="scopeName"?h3(W.scopes):p3(Z,W.scopes)}),k+=1}}m.push(U)}g.push(m),m=[],p=D.ruleStack}return{tokens:g,stateStack:p}}function h3(e){return e.map(t=>({scopeName:t}))}function p3(e,t){const n=[];for(let i=0,o=t.length;i<o;i++){const s=t[i];n[i]={scopeName:s,themeMatches:g3(e,s,t.slice(0,i))}}return n}function hC(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function m3(e,t,n){if(!hC(e.at(-1),t))return!1;let i=e.length-2,o=n.length-1;for(;i>=0&&o>=0;)hC(e[i],n[o])&&(i-=1),o-=1;return i===-1}function g3(e,t,n){const i=[];for(const{selectors:o,settings:s}of e)for(const l of o)if(m3(l,t,n)){i.push(s);break}return i}function iT(e,t,n,i=nT){const o=Object.entries(n.themes).filter(f=>f[1]).map(f=>({color:f[0],theme:f[1]})),s=o.map(f=>{const p=i(e,t,{...n,theme:f.theme});return{tokens:p,state:Tl(p),theme:typeof f.theme=="string"?f.theme:f.theme.name}}),l=y3(...s.map(f=>f.tokens)),c=l[0].map((f,p)=>f.map((m,g)=>{const v={content:m.content,variants:{},offset:m.offset};return"includeExplanation"in n&&n.includeExplanation&&(v.explanation=m.explanation),l.forEach((x,S)=>{const{content:w,explanation:_,offset:C,...k}=x[p][g];v.variants[o[S].color]=k}),v})),d=s[0].state?new sf(Object.fromEntries(s.map(f=>[f.theme,f.state?.getInternalStack(f.theme)])),s[0].state.lang):void 0;return d&&af(c,d),c}function y3(...e){const t=e.map(()=>[]),n=e.length;for(let i=0;i<e[0].length;i++){const o=e.map(d=>d[i]),s=t.map(()=>[]);t.forEach((d,f)=>d.push(s[f]));const l=o.map(()=>0),c=o.map(d=>d[0]);for(;c.every(d=>d);){const d=Math.min(...c.map(f=>f.content.length));for(let f=0;f<n;f++){const p=c[f];p.content.length===d?(s[f].push(p),l[f]+=1,c[f]=o[f][l[f]]):(s[f].push({...p,content:p.content.slice(0,d)}),c[f]={...p,content:p.content.slice(d),offset:p.offset+d})}}}return t}const pC=/\s+/g;function rT(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(pC)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(pC);for(const i of n)i&&!e.properties.class.includes(i)&&e.properties.class.push(i);return e}function v3(e){const t=rf(e,!0).map(([o])=>o);function n(o){if(o===e.length)return{line:t.length-1,character:t.at(-1).length};let s=o,l=0;for(const c of t){if(s<c.length)break;s-=c.length,l++}return{line:l,character:s}}function i(o,s){let l=0;for(let c=0;c<o;c++)l+=t[c].length;return l+=s,l}return{lines:t,indexToPos:n,posToIndex:i}}const b3=["color","background-color"];function x3(e,t){let n=0;const i=[];for(const o of t)o>n&&i.push({...e,content:e.content.slice(n,o),offset:e.offset+n}),n=o;return n<e.content.length&&i.push({...e,content:e.content.slice(n),offset:e.offset+n}),i}function S3(e,t){let n=0,i=e.length;for(;n<i;){const o=n+(i-n>>1);e[o]<=t?n=o+1:i=o}return n}function _3(e,t){const n=[...t instanceof Set?t:new Set(t)].sort((i,o)=>i-o);return n.length?e.map(i=>i.flatMap(o=>{const s=o.offset+o.content.length,l=S3(n,o.offset);let c=l;for(;c<n.length&&n[c]<s;)c++;if(l===c)return o;const d=n.slice(l,c);for(let f=0;f<d.length;f++)d[f]-=o.offset;return x3(o,d)})):e}function C3(e,t,n,i,o="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},l=t.map(p=>Td(e.variants[p])),c=new Set(l.flatMap(p=>Object.keys(p))),d={},f=(p,m)=>{const g=m==="color"?"":m==="background-color"?"-bg":`-${m}`;return n+t[p]+(m==="color"?"":g)};return l.forEach((p,m)=>{for(const g of c){const v=p[g]||"inherit";if(m===0&&i&&b3.includes(g))if(i==="light-dark()"&&l.length>1){const x=t.findIndex(C=>C==="light"),S=t.findIndex(C=>C==="dark");if(x===-1||S===-1)throw new nt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const w=l[x][g]||"inherit",_=l[S][g]||"inherit";d[g]=`light-dark(${w}, ${_})`,o==="css-vars"&&(d[f(m,g)]=v)}else d[g]=v;else o==="css-vars"&&(d[f(m,g)]=v)}}),s.htmlStyle=d,s}function Td(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&$t.Italic&&(t["font-style"]="italic"),e.fontStyle&$t.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&$t.Underline&&n.push("underline"),e.fontStyle&$t.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Eg(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function w3(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let o=function(l){if(typeof l=="number"){if(l<0||l>n.source.length)throw new nt(`Invalid decoration offset: ${l}. Code length: ${n.source.length}`);return{...i.indexToPos(l),offset:l}}else{const c=i.lines[l.line];if(c===void 0)throw new nt(`Invalid decoration position ${JSON.stringify(l)}. Lines length: ${i.lines.length}`);let d=l.character;if(d<0&&(d=c.length+d),d<0||d>c.length)throw new nt(`Invalid decoration position ${JSON.stringify(l)}. Line ${l.line} length: ${c.length}`);return{...l,character:d,offset:i.posToIndex(l.line,d)}}};const i=v3(n.source),s=(n.options.decorations||[]).map(l=>({...l,start:o(l.start),end:o(l.end)}));E3(s),e.set(n.meta,{decorations:s,converter:i,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return _3(n,t(this).decorations.flatMap(i=>[i.start.offset,i.end.offset]))},code(n){if(!this.options.decorations?.length)return;const i=t(this),o=[...n.children].filter(p=>p.type==="element"&&p.tagName==="span");if(o.length!==i.converter.lines.length)throw new nt(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${i.converter.lines.length}). Failed to apply decorations.`);function s(p,m,g,v){const x=o[p];let S="",w=-1,_=-1;if(m===0&&(w=0),g===0&&(_=0),g===Number.POSITIVE_INFINITY&&(_=x.children.length),w===-1||_===-1)for(let k=0;k<x.children.length;k++)S+=oT(x.children[k]),w===-1&&S.length===m&&(w=k+1),_===-1&&S.length===g&&(_=k+1);if(w===-1)throw new nt(`Failed to find start index for decoration ${JSON.stringify(v.start)}`);if(_===-1)throw new nt(`Failed to find end index for decoration ${JSON.stringify(v.end)}`);const C=x.children.slice(w,_);if(!v.alwaysWrap&&C.length===x.children.length)c(x,v,"line");else if(!v.alwaysWrap&&C.length===1&&C[0].type==="element")c(C[0],v,"token");else{const k={type:"element",tagName:"span",properties:{},children:C};c(k,v,"wrapper"),x.children.splice(w,C.length,k)}}function l(p,m){o[p]=c(o[p],m,"line")}function c(p,m,g){const v=m.properties||{},x=m.transform||(S=>S);return p.tagName=m.tagName||"span",p.properties={...p.properties,...v,class:p.properties.class},m.properties?.class&&rT(p,m.properties.class),p=x(p,g)||p,p}const d=[],f=i.decorations.sort((p,m)=>m.start.offset-p.start.offset||p.end.offset-m.end.offset);for(const p of f){const{start:m,end:g}=p;if(m.line===g.line)s(m.line,m.character,g.character,p);else if(m.line<g.line){s(m.line,m.character,Number.POSITIVE_INFINITY,p);for(let v=m.line+1;v<g.line;v++)d.unshift(()=>l(v,p));s(g.line,0,g.character,p)}}d.forEach(p=>p())}}}function E3(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new nt(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let i=t+1;i<e.length;i++){const o=e[i],s=n.start.offset<=o.start.offset&&o.start.offset<n.end.offset,l=n.start.offset<o.end.offset&&o.end.offset<=n.end.offset,c=o.start.offset<=n.start.offset&&n.start.offset<o.end.offset,d=o.start.offset<n.end.offset&&n.end.offset<=o.end.offset;if(s||l||c||d){if(s&&l||c&&d||c&&n.start.offset===n.end.offset||l&&o.start.offset===o.end.offset)continue;throw new nt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function oT(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(oT).join(""):""}const k3=[w3()];function Ad(e){const t=T3(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...k3]}function T3(e){const t=[],n=[],i=[];for(const o of e)switch(o.enforce){case"pre":t.push(o);break;case"post":n.push(o);break;default:i.push(o)}return{pre:t,post:n,normal:i}}var Co=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],dm={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function A3(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const i=e.indexOf("m",n);if(i!==-1)return{sequence:e.substring(n+2,i).split(";"),startPosition:n,position:i+1}}return{position:e.length}}function mC(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(i=>Number.parseInt(i));return n.length!==3||n.some(i=>Number.isNaN(i))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function L3(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const i=Number.parseInt(n);if(!Number.isNaN(i))if(i===0)t.push({type:"resetAll"});else if(i<=9)dm[i]&&t.push({type:"setDecoration",value:dm[i]});else if(i<=29){const o=dm[i-20];o&&(t.push({type:"resetDecoration",value:o}),o==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(i<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Co[i-30]}});else if(i===38){const o=mC(e);o&&t.push({type:"setForegroundColor",value:o})}else if(i===39)t.push({type:"resetForegroundColor"});else if(i<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Co[i-40]}});else if(i===48){const o=mC(e);o&&t.push({type:"setBackgroundColor",value:o})}else i===49?t.push({type:"resetBackgroundColor"}):i===53?t.push({type:"setDecoration",value:"overline"}):i===55?t.push({type:"resetDecoration",value:"overline"}):i>=90&&i<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Co[i-90+8]}}):i>=100&&i<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Co[i-100+8]}})}return t}function R3(){let e=null,t=null,n=new Set;return{parse(i){const o=[];let s=0;do{const l=A3(i,s),c=l.sequence?i.substring(s,l.startPosition):i.substring(s);if(c.length>0&&o.push({value:c,foreground:e,background:t,decorations:new Set(n)}),l.sequence){const d=L3(l.sequence);for(const f of d)f.type==="resetAll"?(e=null,t=null,n.clear()):f.type==="resetForegroundColor"?e=null:f.type==="resetBackgroundColor"?t=null:f.type==="resetDecoration"&&n.delete(f.value);for(const f of d)f.type==="setForegroundColor"?e=f.value:f.type==="setBackgroundColor"?t=f.value:f.type==="setDecoration"&&n.add(f.value)}s=l.position}while(s<i.length);return o}}}var O3={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 D3(e=O3){function t(c){return e[c]}function n(c){return`#${c.map(d=>Math.max(0,Math.min(d,255)).toString(16).padStart(2,"0")).join("")}`}let i;function o(){if(i)return i;i=[];for(let f=0;f<Co.length;f++)i.push(t(Co[f]));let c=[0,95,135,175,215,255];for(let f=0;f<6;f++)for(let p=0;p<6;p++)for(let m=0;m<6;m++)i.push(n([c[f],c[p],c[m]]));let d=8;for(let f=0;f<24;f++,d+=10)i.push(n([d,d,d]));return i}function s(c){return o()[c]}function l(c){switch(c.type){case"named":return t(c.name);case"rgb":return n(c.rgb);case"table":return s(c.index)}}return{value:l}}const M3=/#([0-9a-f]{3,8})/i,I3=/var\((--[\w-]+-ansi-[\w-]+)\)/,N3={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 z3(e,t,n){const i=kd(e,n),o=rf(t),s=D3(Object.fromEntries(Co.map(c=>{const d=`terminal.ansi${c[0].toUpperCase()}${c.substring(1)}`;return[c,e.colors?.[d]||N3[c]]}))),l=R3();return o.map(c=>l.parse(c[0]).map(d=>{let f,p;d.decorations.has("reverse")?(f=d.background?s.value(d.background):e.bg,p=d.foreground?s.value(d.foreground):e.fg):(f=d.foreground?s.value(d.foreground):e.fg,p=d.background?s.value(d.background):void 0),f=Fr(f,i),p=Fr(p,i),d.decorations.has("dim")&&(f=P3(f));let m=$t.None;return d.decorations.has("bold")&&(m|=$t.Bold),d.decorations.has("italic")&&(m|=$t.Italic),d.decorations.has("underline")&&(m|=$t.Underline),d.decorations.has("strikethrough")&&(m|=$t.Strikethrough),{content:d.value,offset:c[1],color:f,bgColor:p,fontStyle:m}}))}function P3(e){const t=e.match(M3);if(t){const i=t[1];if(i.length===8){const o=Math.round(Number.parseInt(i.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${i.slice(0,6)}${o}`}else{if(i.length===6)return`#${i}80`;if(i.length===4){const o=i[0],s=i[1],l=i[2],c=i[3];return`#${o}${o}${s}${s}${l}${l}${Math.round(Number.parseInt(`${c}${c}`,16)/2).toString(16).padStart(2,"0")}`}else if(i.length===3){const o=i[0],s=i[1],l=i[2];return`#${o}${o}${s}${s}${l}${l}80`}}}const n=e.match(I3);return n?`var(${n[1]}-dim)`:e}function kg(e,t,n={}){const i=e.resolveLangAlias(n.lang||"text"),{theme:o=e.getLoadedThemes()[0]}=n;if(!tf(i)&&!nf(o)&&i==="ansi"){const{theme:s}=e.setTheme(o);return z3(s,t,n)}return nT(e,t,n)}function Ld(e,t,n){let i,o,s,l,c,d;if("themes"in n){const{defaultColor:f="light",cssVariablePrefix:p="--shiki-",colorsRendering:m="css-vars"}=n,g=Object.entries(n.themes).filter(_=>_[1]).map(_=>({color:_[0],theme:_[1]})).sort((_,C)=>_.color===f?-1:C.color===f?1:0);if(g.length===0)throw new nt("`themes` option must not be empty");const v=iT(e,t,n,kg);if(d=Tl(v),f&&f!=="light-dark()"&&!g.some(_=>_.color===f))throw new nt(`\`themes\` option must contain the defaultColor key \`${f}\``);const x=g.map(_=>e.getTheme(_.theme)),S=g.map(_=>_.color);s=v.map(_=>_.map(C=>C3(C,S,p,f,m))),d&&af(s,d);const w=g.map(_=>kd(_.theme,n));o=gC(g,x,w,p,f,"fg",m),i=gC(g,x,w,p,f,"bg",m),l=`shiki-themes ${x.map(_=>_.name).join(" ")}`,c=f?void 0:[o,i].join(";")}else if("theme"in n){const f=kd(n.theme,n);s=kg(e,t,n);const p=e.getTheme(n.theme);i=Fr(p.bg,f),o=Fr(p.fg,f),l=p.name,d=Tl(s)}else throw new nt("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:o,bg:i,themeName:l,rootStyle:c,grammarState:d}}function gC(e,t,n,i,o,s,l){return e.map((c,d)=>{const f=Fr(t[d][s],n[d])||"inherit",p=`${i+c.color}${s==="bg"?"-bg":""}:${f}`;if(d===0&&o){if(o==="light-dark()"&&e.length>1){const m=e.findIndex(v=>v.color==="light"),g=e.findIndex(v=>v.color==="dark");if(m===-1||g===-1)throw new nt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Fr(t[m][s],n[m])||"inherit"}, ${Fr(t[g][s],n[g])||"inherit"});${p}`}return f}return l==="css-vars"?p:null}).filter(c=>!!c).join(";")}const aT=/^\s+$/,H3=/^(\s*)(.*?)(\s*)$/;function Rd(e,t,n,i={meta:{},options:n,codeToHast:(o,s)=>Rd(e,o,s),codeToTokens:(o,s)=>Ld(e,o,s)}){let o=t;for(const x of Ad(n))o=x.preprocess?.call(i,o,n)||o;let{tokens:s,fg:l,bg:c,themeName:d,rootStyle:f,grammarState:p}=Ld(e,o,n);const{mergeWhitespaces:m=!0,mergeSameStyleTokens:g=!1}=n;m===!0?s=B3(s):m==="never"&&(s=U3(s)),g&&(s=V3(s));const v={...i,get source(){return o}};for(const x of Ad(n))s=x.tokens?.call(v,s)||s;return j3(s,{...n,fg:l,bg:c,themeName:d,rootStyle:n.rootStyle===!1?!1:n.rootStyle??f},v,p)}function j3(e,t,n,i=Tl(e)){const o=Ad(t),s=[],l={type:"root",children:[]},{structure:c="classic",tabindex:d="0"}=t,f={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?f.style=t.rootStyle:f.style=`background-color:${t.bg};color:${t.fg}`),d!==!1&&d!=null&&(f.tabindex=d.toString());for(const[S,w]of Object.entries(t.meta||{}))S.startsWith("_")||(f[S]=w);let p={type:"element",tagName:"pre",properties:f,children:[],data:t.data},m={type:"element",tagName:"code",properties:{},children:s};const g=[],v={...n,structure:c,addClassToHast:rT,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return l},get pre(){return p},get code(){return m},get lines(){return g}};if(e.forEach((S,w)=>{w&&(c==="inline"?l.children.push({type:"element",tagName:"br",properties:{},children:[]}):c==="classic"&&s.push({type:"text",value:`
|
|
58
|
-
`}));let _={type:"element",tagName:"span",properties:{class:"line"},children:[]},C=0;for(const k of S){let D={type:"element",tagName:"span",properties:{...k.htmlAttrs},children:[{type:"text",value:k.content}]};const M=Eg(k.htmlStyle||Td(k));M&&(D.properties.style=M);for(const O of o)D=O?.span?.call(v,D,w+1,C,_,k)||D;c==="inline"?l.children.push(D):c==="classic"&&_.children.push(D),C+=k.content.length}if(c==="classic"){for(const k of o)_=k?.line?.call(v,_,w+1)||_;g.push(_),s.push(_)}else c==="inline"&&g.push(_)}),c==="classic"){for(const S of o)m=S?.code?.call(v,m)||m;p.children.push(m);for(const S of o)p=S?.pre?.call(v,p)||p;l.children.push(p)}else if(c==="inline"){const S=[];let w={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const C of l.children)C.type==="element"&&C.tagName==="br"?(S.push(w),w={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(C.type==="element"||C.type==="text")&&w.children.push(C);S.push(w);let _={type:"element",tagName:"code",properties:{},children:S};for(const C of o)_=C?.code?.call(v,_)||_;l.children=[];for(let C=0;C<_.children.length;C++){C>0&&l.children.push({type:"element",tagName:"br",properties:{},children:[]});const k=_.children[C];k.type==="element"&&l.children.push(...k.children)}}let x=l;for(const S of o)x=S?.root?.call(v,x)||x;return i&&af(x,i),x}function B3(e){return e.map(t=>{const n=[];let i="",o;return t.forEach((s,l)=>{const c=!(s.fontStyle&&(s.fontStyle&$t.Underline||s.fontStyle&$t.Strikethrough));c&&aT.test(s.content)&&t[l+1]?(o===void 0&&(o=s.offset),i+=s.content):i?(c?n.push({...s,offset:o,content:i+s.content}):n.push({content:i,offset:o},s),o=void 0,i=""):n.push(s)}),n})}function U3(e){return e.map(t=>t.flatMap(n=>{if(aT.test(n.content))return n;const i=n.content.match(H3);if(!i)return n;const[,o,s,l]=i;if(!o&&!l)return n;const c=[{...n,offset:n.offset+o.length,content:s}];return o&&c.unshift({content:o,offset:n.offset}),l&&c.push({content:l,offset:n.offset+o.length+s.length}),c}))}function V3(e){return e.map(t=>{const n=[];for(const i of t){if(n.length===0){n.push({...i});continue}const o=n.at(-1),s=Eg(o.htmlStyle||Td(o)),l=Eg(i.htmlStyle||Td(i)),c=o.fontStyle&&(o.fontStyle&$t.Underline||o.fontStyle&$t.Strikethrough),d=i.fontStyle&&(i.fontStyle&$t.Underline||i.fontStyle&$t.Strikethrough);!c&&!d&&s===l?o.content+=i.content:n.push({...i})}return n})}const F3=Zt;function G3(e,t,n){const i={meta:{},options:n,codeToHast:(s,l)=>Rd(e,s,l),codeToTokens:(s,l)=>Ld(e,s,l)};let o=F3(Rd(e,t,n,i));for(const s of Ad(n))o=s.postprocess?.call(i,o,n)||o;return o}async function $3(e){const t=await a3(e);return{getLastGrammarState:(...n)=>d3(t,...n),codeToTokensBase:(n,i)=>kg(t,n,i),codeToTokensWithThemes:(n,i)=>iT(t,n,i),codeToTokens:(n,i)=>Ld(t,n,i),codeToHast:(n,i)=>Rd(t,n,i),codeToHtml:(n,i)=>G3(t,n,i),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function q3(e){const t=e.langs,n=e.themes,i=e.engine;async function o(s){function l(m){if(typeof m=="string"){if(m=s.langAlias?.[m]||m,Xk(m))return[];const g=t[m];if(!g)throw new nt(`Language \`${m}\` is not included in this bundle. You may want to load it from external source.`);return g}return m}function c(m){if(Kk(m))return"none";if(typeof m=="string"){const g=n[m];if(!g)throw new nt(`Theme \`${m}\` is not included in this bundle. You may want to load it from external source.`);return g}return m}const d=(s.themes??[]).map(m=>c(m)),f=(s.langs??[]).map(m=>l(m)),p=await $3({engine:s.engine??i(),...s,themes:d,langs:f});return{...p,loadLanguage(...m){return p.loadLanguage(...m.map(l))},loadTheme(...m){return p.loadTheme(...m.map(c))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return o}const W3=q3({langs:yg,themes:K6,engine:()=>(0,Dk.createOnigurumaEngine)(A(()=>import("./wasm-CG6Dc4jp.js"),[],import.meta.url))}),yC=4294967295;var Y3=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;const{forgiving:n=!1,cache:i,regexConstructor:o}=t;if(!o)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(s=>{if(typeof s!="string")return s;const l=i?.get(s);if(l){if(l instanceof RegExp)return l;if(n)return null;throw l}try{const c=o(s);return i?.set(s,c),c}catch(c){if(i?.set(s,c),n)return null;throw c}})}findNextMatchSync(e,t,n){const i=typeof e=="string"?e:e.content,o=[];function s(l,c,d=0){return{index:l,captureIndices:c.indices.map(f=>f==null?{start:yC,end:yC,length:0}:{start:f[0]+d,end:f[1]+d,length:f[1]-f[0]})}}for(let l=0;l<this.regexps.length;l++){const c=this.regexps[l];if(c)try{c.lastIndex=t;const d=c.exec(i);if(!d)continue;if(d.index===t)return s(l,d,0);o.push([l,d,0])}catch(d){if(this.options.forgiving)continue;throw d}}if(o.length){const l=Math.min(...o.map(c=>c[1].index));for(const[c,d,f]of o)if(d.index===l)return s(c,d,f)}return null}};function ns(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function X3(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const Vy=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Mt=String.raw;function is(e,t){if(e==null)throw new Error(t??"Value expected");return e}const sT=Mt`\[\^?`,lT=`c.? | C(?:-.?)?|${Mt`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Mt`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Mt`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Mt`o\{[^\}]*\}?`}|${Mt`\d{1,3}`}`,Fy=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Tc=new RegExp(Mt`
|
|
59
|
-
\\ (?:
|
|
60
|
-
${lT}
|
|
61
|
-
| [gk]<[^>]*>?
|
|
62
|
-
| [gk]'[^']*'?
|
|
63
|
-
| .
|
|
64
|
-
)
|
|
65
|
-
| \( (?:
|
|
66
|
-
\? (?:
|
|
67
|
-
[:=!>({]
|
|
68
|
-
| <[=!]
|
|
69
|
-
| <[^>]*>
|
|
70
|
-
| '[^']*'
|
|
71
|
-
| ~\|?
|
|
72
|
-
| #(?:[^)\\]|\\.?)*
|
|
73
|
-
| [^:)]*[:)]
|
|
74
|
-
)?
|
|
75
|
-
| \*[^\)]*\)?
|
|
76
|
-
)?
|
|
77
|
-
| (?:${Fy.source})+
|
|
78
|
-
| ${sT}
|
|
79
|
-
| .
|
|
80
|
-
`.replace(/\s+/g,""),"gsu"),fm=new RegExp(Mt`
|
|
81
|
-
\\ (?:
|
|
82
|
-
${lT}
|
|
83
|
-
| .
|
|
84
|
-
)
|
|
85
|
-
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
86
|
-
| ${sT}
|
|
87
|
-
| &&
|
|
88
|
-
| .
|
|
89
|
-
`.replace(/\s+/g,""),"gsu");function K3(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const i=m4(n.flags),o=[i.extended],s={captureGroup:n.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:n.rules.singleline};let l=[],c;for(Tc.lastIndex=0;c=Tc.exec(e);){const m=Q3(s,e,c[0],Tc.lastIndex);m.tokens?l.push(...m.tokens):m.token&&l.push(m.token),m.lastIndex!==void 0&&(Tc.lastIndex=m.lastIndex)}const d=[];let f=0;l.filter(m=>m.type==="GroupOpen").forEach(m=>{m.kind==="capturing"?m.number=++f:m.raw==="("&&d.push(m)}),f||d.forEach((m,g)=>{m.kind="capturing",m.number=g+1});const p=f||d.length;return{tokens:l.map(m=>m.type==="EscapedNumber"?y4(m,p):m).flat(),flags:i}}function Q3(e,t,n,i){const[o,s]=n;if(n==="["||n==="[^"){const l=Z3(t,n,i);return{tokens:l.tokens,lastIndex:l.lastIndex}}if(o==="\\"){if("AbBGyYzZ".includes(s))return{token:vC(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:l4(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:cT(n)}}if(s==="K")return{token:dT("keep",n)};if(s==="N"||s==="R")return{token:wo("newline",n,{negate:s==="N"})};if(s==="O")return{token:wo("any",n)};if(s==="X")return{token:wo("text_segment",n)};const l=uT(n,{inCharClass:!1});return Array.isArray(l)?{tokens:l}:{token:l}}if(o==="("){if(s==="*")return{token:f4(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[i]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:i+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:d4(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:za("group",n)};if(n==="(?>")return{token:za("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:za(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:za("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:za("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:o4(n)}}if(e.getCurrentModX()){if(n==="#"){const l=t.indexOf(`
|
|
90
|
-
`,i);return{lastIndex:l===-1?t.length:l}}if(/^\s$/.test(n)){const l=/\s+/y;return l.lastIndex=i,{lastIndex:l.exec(t)?l.lastIndex:i}}}if(n===".")return{token:wo("dot",n)};if(n==="^"||n==="$"){const l=e.singleline?{"^":Mt`\A`,$:Mt`\Z`}[n]:n;return{token:vC(l,n)}}return n==="|"?{token:e4(n)}:Fy.test(n)?{tokens:v4(n)}:{token:Zi(ns(n),n)}}function Z3(e,t,n){const i=[bC(t[1]==="^",t)];let o=1,s;for(fm.lastIndex=n;s=fm.exec(e);){const l=s[0];if(l[0]==="["&&l[1]!==":")o++,i.push(bC(l[1]==="^",l));else if(l==="]"){if(i.at(-1).type==="CharacterClassOpen")i.push(Zi(93,l));else if(o--,i.push(t4(l)),!o)break}else{const c=J3(l);Array.isArray(c)?i.push(...c):i.push(c)}}return{tokens:i,lastIndex:fm.lastIndex||e.length}}function J3(e){if(e[0]==="\\")return uT(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Vy.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return wo("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?n4(e):e==="&&"?i4(e):Zi(ns(e),e)}function uT(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return c4(e);if("dDhHsSwW".includes(n))return h4(e);if(e.startsWith(Mt`\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 p4(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const i=e.split(/\\x/).slice(1).map(l=>parseInt(l,16)),o=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(i)),s=new TextEncoder;return[...o].map(l=>{const c=[...s.encode(l)].map(d=>`\\x${d.toString(16)}`).join("");return Zi(ns(l),c)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Zi(g4(e),e);if(xC.has(n))return Zi(xC.get(n),e);if(/\d/.test(n))return r4(t,e);if(e==="\\")throw new Error(Mt`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Zi(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function e4(e){return{type:"Alternator",raw:e}}function vC(e,t){return{type:"Assertion",kind:e,raw:t}}function cT(e){return{type:"Backreference",raw:e}}function Zi(e,t){return{type:"Character",value:e,raw:t}}function t4(e){return{type:"CharacterClassClose",raw:e}}function n4(e){return{type:"CharacterClassHyphen",raw:e}}function i4(e){return{type:"CharacterClassIntersector",raw:e}}function bC(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function wo(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function dT(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:is(n.flags),raw:t}}function r4(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function o4(e){return{type:"GroupClose",raw:e}}function za(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function a4(e,t,n,i){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:i}}function s4(e,t,n,i){return{type:"Quantifier",kind:e,min:t,max:n,raw:i}}function l4(e){return{type:"Subroutine",raw:e}}const u4=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),xC=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function c4(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 Zi(ns(t.toUpperCase())-64,e)}function d4(e,t){let{on:n,off:i}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;i??="";const o=(t.getCurrentModX()||n.includes("x"))&&!i.includes("x"),s=_C(n),l=_C(i),c={};if(s&&(c.enable=s),l&&(c.disable=l),e.endsWith(")"))return t.replaceCurrentModX(o),dT("flags",e,{flags:c});if(e.endsWith(":"))return t.pushModX(o),t.numOpenGroups++,za("group",e,{...(s||l)&&{flags:c}});throw new Error(`Unexpected flag modifier "${e}"`)}function f4(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:n,tag:i,args:o}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(i==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const s=o?o.split(",").filter(p=>p!=="").map(p=>/^[+-]?\d+$/.test(p)?+p:p):[],[l,c,d]=s,f=u4.has(n)?n.toLowerCase():"custom";switch(f){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 l=="string")throw new Error(`Named callout argument must be a number "${l}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument one must be a tag or number "${l}"`);if(s.length===2&&(typeof c=="number"||!/^[<>X]$/.test(c)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${c}"`);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 l=="number"||!/^[<>X]$/.test(l)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${l}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument one must be a tag or number "${l}"`);if(typeof c=="number"||!/^(?:[<>!=]=|[<>])$/.test(c))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${c}"`);if(typeof d=="string"&&!/^[A-Za-z_]\w*$/.test(d))throw new Error(`Named callout argument three must be a tag or number "${d}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${f}"`)}return a4(f,i??null,o?.split(",")??null,e)}function SC(e){let t=null,n,i;if(e[0]==="{"){const{minStr:o,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,l=1e5;if(+o>l||s&&+s>l)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+o,i=s===void 0?+o:s===""?1/0:+s,n>i&&(t="possessive",[n,i]=[i,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,i=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return s4(t,n,i,e)}function h4(e){const t=e[1].toLowerCase();return wo({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function p4(e){const{p:t,neg:n,value:i}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return wo("property",e,{value:i,negate:t==="P"&&!n||t==="p"&&!!n})}function _C(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 m4(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const i=e[n];if(!"imxDPSWy".includes(i))throw new Error(`Invalid flag "${i}"`);if(i==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[i]]=!0}return t}function g4(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 y4(e,t){const{raw:n,inCharClass:i}=e,o=n.slice(1);if(!i&&(o!=="0"&&o.length===1||o[0]!=="0"&&+o<=t))return[cT(n)];const s=[],l=o.match(/^[0-7]+|\d/g);for(let c=0;c<l.length;c++){const d=l[c];let f;if(c===0&&d!=="8"&&d!=="9"){if(f=parseInt(d,8),f>127)throw new Error(Mt`Octal encoded byte above 177 unsupported "${n}"`)}else f=ns(d);s.push(Zi(f,(c===0?"\\":"")+d))}return s}function v4(e){const t=[],n=new RegExp(Fy,"gy");let i;for(;i=n.exec(e);){const o=i[0];if(o[0]==="{"){const s=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(o);if(s){const{min:l,max:c}=s.groups;if(+l>+c&&o.endsWith("?")){n.lastIndex--,t.push(SC(o.slice(0,-1)));continue}}}t.push(SC(o))}return t}function fT(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(i=>t[i]===n[i])}function b4(e){return x4.has(e.type)}const x4=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function hT(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},i=K3(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),o=(g,v)=>{const x=i.tokens[s.nextIndex];switch(s.parent=g,s.nextIndex++,x.type){case"Alternator":return Ho();case"Assertion":return S4(x);case"Backreference":return _4(x,s);case"Character":return lf(x.value,{useLastValid:!!v.isCheckingRangeEnd});case"CharacterClassHyphen":return C4(x,s,v);case"CharacterClassOpen":return w4(x,s,v);case"CharacterSet":return E4(x,s);case"Directive":return O4(x.kind,{flags:x.flags});case"GroupOpen":return k4(x,s,v);case"NamedCallout":return M4(x.kind,x.tag,x.arguments);case"Quantifier":return T4(x,s);case"Subroutine":return A4(x,s);default:throw new Error(`Unexpected token type "${x.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:i.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:o},l=N4(D4(i.flags));let c=l.body[0];for(;s.nextIndex<i.tokens.length;){const g=o(c,{});g.type==="Alternative"?(l.body.push(g),c=g):c.body.push(g)}const{capturingGroups:d,hasNumberedRef:f,namedGroupsByName:p,subroutines:m}=s;if(f&&p.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:g}of m)if(typeof g=="number"){if(g>d.length)throw new Error("Subroutine uses a group number that's not defined");g&&(d[g-1].isSubroutined=!0)}else if(p.has(g)){if(p.get(g).length>1)throw new Error(Mt`Subroutine uses a duplicate group name "\g<${g}>"`);p.get(g)[0].isSubroutined=!0}else throw new Error(Mt`Subroutine uses a group name that's not defined "\g<${g}>"`);return l}function S4({kind:e}){return Tg(is({"^":"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===Mt`\B`||e===Mt`\Y`})}function _4({raw:e},t){const n=/^\\k[<']/.test(e),i=n?e.slice(3,-1):e.slice(1),o=(s,l=!1)=>{const c=t.capturingGroups.length;let d=!1;if(s>c)if(t.skipBackrefValidation)d=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,Ag(l?c+1-s:s,{orphan:d})};if(n){const s=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(i);if(s)return o(+s.groups.num,!!s.groups.sign);if(/[-+]/.test(i))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(i))throw new Error(`Group name not defined to the left "${e}"`);return Ag(i)}return o(+i)}function C4(e,t,n){const{tokens:i,walk:o}=t,s=t.parent,l=s.body.at(-1),c=i[t.nextIndex];if(!n.isCheckingRangeEnd&&l&&l.type!=="CharacterClass"&&l.type!=="CharacterClassRange"&&c&&c.type!=="CharacterClassOpen"&&c.type!=="CharacterClassClose"&&c.type!=="CharacterClassIntersector"){const d=o(s,{...n,isCheckingRangeEnd:!0});if(l.type==="Character"&&d.type==="Character")return s.body.pop(),R4(l,d);throw new Error("Invalid character class range")}return lf(ns("-"))}function w4({negate:e},t,n){const{tokens:i,walk:o}=t,s=[td()],l=i[t.nextIndex];let c=EC(l);for(;c.type!=="CharacterClassClose";){if(c.type==="CharacterClassIntersector")s.push(td()),t.nextIndex++;else{const f=s.at(-1);f.body.push(o(f,n))}c=EC(i[t.nextIndex],l)}const d=td({negate:e});return s.length===1?d.body=s[0].body:(d.kind="intersection",d.body=s.map(f=>f.body.length===1?f.body[0]:f)),t.nextIndex++,d}function E4({kind:e,negate:t,value:n},i){const{normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:l}=i;if(e==="property"){const c=uf(n);if(Vy.has(c)&&!l?.has(c))e="posix",n=c;else return Pa(n,{negate:t,normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:l})}return e==="posix"?I4(n,{negate:t}):Lg(e,{negate:t})}function k4(e,t,n){const{tokens:i,capturingGroups:o,namedGroupsByName:s,skipLookbehindValidation:l,walk:c}=t,d=z4(e),f=d.type==="AbsenceFunction",p=wC(d),m=p&&d.negate;if(d.type==="CapturingGroup"&&(o.push(d),d.name&&X3(s,d.name,[]).push(d)),f&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let g=kC(i[t.nextIndex]);for(;g.type!=="GroupClose";){if(g.type==="Alternator")d.body.push(Ho()),t.nextIndex++;else{const v=d.body.at(-1),x=c(v,{...n,isInAbsenceFunction:n.isInAbsenceFunction||f,isInLookbehind:n.isInLookbehind||p,isInNegLookbehind:n.isInNegLookbehind||m});if(v.body.push(x),(p||n.isInLookbehind)&&!l){const S="Lookbehind includes a pattern not allowed by Oniguruma";if(m||n.isInNegLookbehind){if(CC(x)||x.type==="CapturingGroup")throw new Error(S)}else if(CC(x)||wC(x)&&x.negate)throw new Error(S)}}g=kC(i[t.nextIndex])}return t.nextIndex++,d}function T4({kind:e,min:t,max:n},i){const o=i.parent,s=o.body.at(-1);if(!s||!b4(s))throw new Error("Quantifier requires a repeatable token");const l=mT(e,t,n,s);return o.body.pop(),l}function A4({raw:e},t){const{capturingGroups:n,subroutines:i}=t;let o=e.slice(3,-1);const s=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);if(s){const c=+s.groups.num,d=n.length;if(t.hasNumberedRef=!0,o={"":c,"+":d+c,"-":d+1-c}[s.groups.sign],o<1)throw new Error("Invalid subroutine number")}else o==="0"&&(o=0);const l=gT(o);return i.push(l),l}function L4(e,t){return{type:"AbsenceFunction",kind:e,body:Gl(t?.body)}}function Ho(e){return{type:"Alternative",body:yT(e?.body)}}function Tg(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!t?.negate),n}function Ag(e,t){const n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function pT(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!P4(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Gl(t?.body)}}function lf(e,t){const n={useLastValid:!1,...t};if(e>1114111){const i=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${i}}"`):new Error(`Invalid code point out of range in JS "\\x{${i}}"`)}return{type:"Character",value:e}}function td(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:yT(e?.body)}}function R4(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function Lg(e,t){const n=!!t?.negate,i={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(i.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(i.variableLength=!0),i}function O4(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:is(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function D4(e){return{type:"Flags",...e}}function Kn(e){const t=e?.atomic,n=e?.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:Gl(e?.body)}}function So(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Gl(e?.body)}}function M4(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function I4(e,t){const n=!!t?.negate;if(!Vy.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function mT(e,t,n,i){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:i}}function N4(e,t){return{type:"Regex",body:Gl(t?.body),flags:e}}function gT(e){return{type:"Subroutine",ref:e}}function Pa(e,t){const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let i=n.unicodePropertyMap?.get(uf(e));if(!i){if(n.normalizeUnknownPropertyNames)i=H4(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(Mt`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:i??e,negate:n.negate}}function z4({flags:e,kind:t,name:n,negate:i,number:o}){switch(t){case"absence_repeater":return L4("repeater");case"atomic":return Kn({atomic:!0});case"capturing":return pT(o,{name:n});case"group":return Kn({flags:e});case"lookahead":case"lookbehind":return So({behind:t==="lookbehind",negate:i});default:throw new Error(`Unexpected group kind "${t}"`)}}function Gl(e){if(e===void 0)e=[Ho()];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 yT(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 CC(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function wC(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function P4(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function H4(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 uf(e){return e.replace(/[- _]+/g,"").toLowerCase()}function EC(e,t){const n=t;return is(e,`Unclosed character class${n?.type==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function kC(e){return is(e,"Unclosed group")}function gl(e,t,n=null){function i(s,l){for(let c=0;c<s.length;c++){const d=o(s[c],l,c,s);c=Math.max(-1,c+d)}}function o(s,l=null,c=null,d=null){let f=0,p=!1;const m={node:s,parent:l,key:c,container:d,root:e,remove(){Ac(d).splice(Math.max(0,Da(c)+f),1),f--,p=!0},removeAllNextSiblings(){return Ac(d).splice(Da(c)+1)},removeAllPrevSiblings(){const _=Da(c)+f;return f-=_,Ac(d).splice(0,Math.max(0,_))},replaceWith(_,C={}){const k=!!C.traverse;d?d[Math.max(0,Da(c)+f)]=_:is(l,"Can't replace root node")[c]=_,k&&o(_,l,c,d),p=!0},replaceWithMultiple(_,C={}){const k=!!C.traverse;if(Ac(d).splice(Math.max(0,Da(c)+f),1,..._),f+=_.length-1,k){let D=0;for(let M=0;M<_.length;M++)D+=o(_[M],l,Da(c)+M+D,d)}p=!0},skip(){p=!0}},{type:g}=s,v=t["*"],x=t[g],S=typeof v=="function"?v:v?.enter,w=typeof x=="function"?x:x?.enter;if(S?.(m,n),w?.(m,n),!p)switch(g){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":i(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":i(s.body,s),o(s.flags,s,"flags");break;default:throw new Error(`Unexpected node type "${g}"`)}return x?.exit?.(m,n),v?.exit?.(m,n),f}return o(e),e}function Ac(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Da(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const j4=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function B4(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function U4(e,t,n,i){return e.slice(0,t)+i+e.slice(t+n.length)}const Gn=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Gy(e,t,n,i){const o=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let l=0,c="";for(const d of e.matchAll(o)){const{0:f,groups:{$skip:p}}=d;if(!p&&(!i||i===Gn.DEFAULT==!l)){n instanceof Function?c+=n(d,{context:l?Gn.CHAR_CLASS:Gn.DEFAULT,negated:s[s.length-1]}):c+=n;continue}f[0]==="["?(l++,s.push(f[1]==="^")):f==="]"&&l&&(l--,s.pop()),c+=f}return c}function vT(e,t,n,i){Gy(e,t,n,i)}function V4(e,t,n=0,i){if(!new RegExp(t,"su").test(e))return null;const o=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");o.lastIndex=n;let s=0,l;for(;l=o.exec(e);){const{0:c,groups:{$skip:d}}=l;if(!d&&(!i||i===Gn.DEFAULT==!s))return l;c==="["?s++:c==="]"&&s&&s--,o.lastIndex==l.index&&o.lastIndex++}return null}function Lc(e,t,n){return!!V4(e,t,0,n)}function F4(e,t){const n=/\\?./gsu;n.lastIndex=t;let i=e.length,o=0,s=1,l;for(;l=n.exec(e);){const[c]=l;if(c==="[")o++;else if(o)c==="]"&&o--;else if(c==="(")s++;else if(c===")"&&(s--,!s)){i=l.index;break}}return e.slice(t,i)}const TC=new RegExp(String.raw`(?<noncapturingStart>${j4})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function G4(e,t){const n=t?.hiddenCaptures??[];let i=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};const o="(?>",s="(?:(?=(",l=[0],c=[];let d=0,f=0,p=NaN,m;do{m=!1;let g=0,v=0,x=!1,S;for(TC.lastIndex=Number.isNaN(p)?0:p+s.length;S=TC.exec(e);){const{0:w,index:_,groups:{capturingStart:C,noncapturingStart:k}}=S;if(w==="[")g++;else if(g)w==="]"&&g--;else if(w===o&&!x)p=_,x=!0;else if(x&&k)v++;else if(C)x?v++:(d++,l.push(d+f));else if(w===")"&&x){if(!v){f++;const D=d+f;if(e=`${e.slice(0,p)}${s}${e.slice(p+o.length,_)}))<$$${D}>)${e.slice(_+1)}`,m=!0,c.push(D),B4(n,D),i.size){const M=new Map;i.forEach((O,z)=>{M.set(z>=D?z+1:z,O.map(j=>j>=D?j+1:j))}),i=M}break}v--}}}while(m);return n.push(...c),e=Gy(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:g,groups:{backrefNum:v,wrappedBackrefNum:x}})=>{if(v){const S=+v;if(S>l.length-1)throw new Error(`Backref "${g}" greater than number of captures`);return`\\${l[S]}`}return`\\${x}`},Gn.DEFAULT),{pattern:e,captureTransfers:i,hiddenCaptures:n}}const bT=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,hm=new RegExp(String.raw`
|
|
91
|
-
\\(?: \d+
|
|
92
|
-
| c[A-Za-z]
|
|
93
|
-
| [gk]<[^>]+>
|
|
94
|
-
| [pPu]\{[^\}]+\}
|
|
95
|
-
| u[A-Fa-f\d]{4}
|
|
96
|
-
| x[A-Fa-f\d]{2}
|
|
97
|
-
)
|
|
98
|
-
| \((?: \? (?: [:=!>]
|
|
99
|
-
| <(?:[=!]|[^>]+>)
|
|
100
|
-
| [A-Za-z\-]+:
|
|
101
|
-
| \(DEFINE\)
|
|
102
|
-
))?
|
|
103
|
-
| (?<qBase>${bT})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
104
|
-
| \\?.
|
|
105
|
-
`.replace(/\s+/g,""),"gsu");function $4(e){if(!new RegExp(`${bT}\\+`).test(e))return{pattern:e};const t=[];let n=null,i=null,o="",s=0,l;for(hm.lastIndex=0;l=hm.exec(e);){const{0:c,index:d,groups:{qBase:f,qMod:p,invalidQ:m}}=l;if(c==="[")s||(i=d),s++;else if(c==="]")s?s--:i=null;else if(!s)if(p==="+"&&o&&!o.startsWith("(")){if(m)throw new Error(`Invalid quantifier "${c}"`);let g=-1;if(/^\{\d+\}$/.test(f))e=U4(e,d+f.length,p,"");else{if(o===")"||o==="]"){const v=o===")"?n:i;if(v===null)throw new Error(`Invalid unmatched "${o}"`);e=`${e.slice(0,v)}(?>${e.slice(v,d)}${f})${e.slice(d+c.length)}`}else e=`${e.slice(0,d-o.length)}(?>${o}${f})${e.slice(d+c.length)}`;g+=4}hm.lastIndex+=g}else c[0]==="("?t.push(d):c===")"&&(n=t.length?t.pop():null);o=c}return{pattern:e}}const Bn=String.raw,q4=Bn`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Rg=Bn`\(\?R=(?<rDepth>[^\)]+)\)|${q4}`,cf=Bn`\(\?<(?![=!])(?<captureName>[^>]+)>`,xT=Bn`${cf}|(?<unnamed>\()(?!\?)`,yo=new RegExp(Bn`${cf}|${Rg}|\(\?|\\?.`,"gsu"),pm="Cannot use multiple overlapping recursions";function W4(e,t){const{hiddenCaptures:n,mode:i}={hiddenCaptures:[],mode:"plugin",...t};let o=t?.captureTransfers??new Map;if(!new RegExp(Rg,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:n};if(i==="plugin"&&Lc(e,Bn`\(\?\(DEFINE\)`,Gn.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],l=Lc(e,Bn`\\[1-9]`,Gn.DEFAULT),c=new Map,d=[];let f=!1,p=0,m=0,g;for(yo.lastIndex=0;g=yo.exec(e);){const{0:v,groups:{captureName:x,rDepth:S,gRNameOrNum:w,gRDepth:_}}=g;if(v==="[")p++;else if(p)v==="]"&&p--;else if(S){if(AC(S),f)throw new Error(pm);if(l)throw new Error(`${i==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const C=e.slice(0,g.index),k=e.slice(yo.lastIndex);if(Lc(k,Rg,Gn.DEFAULT))throw new Error(pm);const D=+S-1;e=LC(C,k,D,!1,n,s,m),o=OC(o,C,D,s.length,0,m);break}else if(w){AC(_);let C=!1;for(const U of d)if(U.name===w||U.num===+w){if(C=!0,U.hasRecursedWithin)throw new Error(pm);break}if(!C)throw new Error(Bn`Recursive \g cannot be used outside the referenced group "${i==="external"?w:Bn`\g<${w}&R=${_}>`}"`);const k=c.get(w),D=F4(e,k);if(l&&Lc(D,Bn`${cf}|\((?!\?)`,Gn.DEFAULT))throw new Error(`${i==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const M=e.slice(k,g.index),O=D.slice(M.length+v.length),z=s.length,j=+_-1,F=LC(M,O,j,!0,n,s,m);o=OC(o,M,j,s.length-z,z,m);const ee=e.slice(0,k),q=e.slice(k+D.length);e=`${ee}${F}${q}`,yo.lastIndex+=F.length-v.length-M.length-O.length,d.forEach(U=>U.hasRecursedWithin=!0),f=!0}else if(x)m++,c.set(String(m),yo.lastIndex),c.set(x,yo.lastIndex),d.push({num:m,name:x});else if(v[0]==="("){const C=v==="(";C&&(m++,c.set(String(m),yo.lastIndex)),d.push(C?{num:m}:{})}else v===")"&&d.pop()}return n.push(...s),{pattern:e,captureTransfers:o,hiddenCaptures:n}}function AC(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 LC(e,t,n,i,o,s,l){const c=new Set;i&&vT(e+t,cf,({groups:{captureName:f}})=>{c.add(f)},Gn.DEFAULT);const d=[n,i?c:null,o,s,l];return`${e}${RC(`(?:${e}`,"forward",...d)}(?:)${RC(`${t})`,"backward",...d)}${t}`}function RC(e,t,n,i,o,s,l){const d=p=>t==="forward"?p+2:n-p+2-1;let f="";for(let p=0;p<n;p++){const m=d(p);f+=Gy(e,Bn`${xT}|\\k<(?<backref>[^>]+)>`,({0:g,groups:{captureName:v,unnamed:x,backref:S}})=>{if(S&&i&&!i.has(S))return g;const w=`_$${m}`;if(x||v){const _=l+s.length+1;return s.push(_),Y4(o,_),x?g:`(?<${v}${w}>`}return Bn`\k<${S}${w}>`},Gn.DEFAULT)}return f}function Y4(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function OC(e,t,n,i,o,s){if(e.size&&i){let l=0;vT(t,xT,()=>l++,Gn.DEFAULT);const c=s-l+o,d=new Map;return e.forEach((f,p)=>{const m=(i-l*n)/n,g=l*n,v=p>c+l?p+i:p,x=[];for(const S of f)if(S<=c)x.push(S);else if(S>c+l+m)x.push(S+i);else if(S<=c+l)for(let w=0;w<=n;w++)x.push(S+l*w);else for(let w=0;w<=n;w++)x.push(S+g+m*w);d.set(v,x)}),d}return e}var kt=String.fromCodePoint,ke=String.raw,Zn={},df=globalThis.RegExp;Zn.flagGroups=(()=>{try{new df("(?i:)")}catch{return!1}return!0})();Zn.unicodeSets=(()=>{try{new df("[[]]","v")}catch{return!1}return!0})();Zn.bugFlagVLiteralHyphenIsRange=Zn.unicodeSets?(()=>{try{new df(ke`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Zn.bugNestedClassIgnoresNegation=Zn.unicodeSets&&new df("[[^a]]","v").test("a");function Od(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function Al(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function Og(e,t){return DC[e]>=DC[t]}function X4(e,t){if(e==null)throw new Error(t??"Value expected");return e}var DC={ES2025:2025,ES2024:2024,ES2018:2018},K4={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function ST(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!K4[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=Zn.flagGroups?"ES2025":Zn.unicodeSets?"ES2024":"ES2018"),t}var Q4="[ -\r ]",Z4=new Set([kt(304),kt(305)]),qi=ke`[\p{L}\p{M}\p{N}\p{Pc}]`;function _T(e){if(Z4.has(e))return[e];const t=new Set,n=e.toLowerCase(),i=n.toUpperCase(),o=tB.get(n),s=J4.get(n),l=eB.get(n);return[...i].length===1&&t.add(i),l&&t.add(l),o&&t.add(o),t.add(n),s&&t.add(s),[...t]}var $y=new Map(`C Other
|
|
106
|
-
Cc Control cntrl
|
|
107
|
-
Cf Format
|
|
108
|
-
Cn Unassigned
|
|
109
|
-
Co Private_Use
|
|
110
|
-
Cs Surrogate
|
|
111
|
-
L Letter
|
|
112
|
-
LC Cased_Letter
|
|
113
|
-
Ll Lowercase_Letter
|
|
114
|
-
Lm Modifier_Letter
|
|
115
|
-
Lo Other_Letter
|
|
116
|
-
Lt Titlecase_Letter
|
|
117
|
-
Lu Uppercase_Letter
|
|
118
|
-
M Mark Combining_Mark
|
|
119
|
-
Mc Spacing_Mark
|
|
120
|
-
Me Enclosing_Mark
|
|
121
|
-
Mn Nonspacing_Mark
|
|
122
|
-
N Number
|
|
123
|
-
Nd Decimal_Number digit
|
|
124
|
-
Nl Letter_Number
|
|
125
|
-
No Other_Number
|
|
126
|
-
P Punctuation punct
|
|
127
|
-
Pc Connector_Punctuation
|
|
128
|
-
Pd Dash_Punctuation
|
|
129
|
-
Pe Close_Punctuation
|
|
130
|
-
Pf Final_Punctuation
|
|
131
|
-
Pi Initial_Punctuation
|
|
132
|
-
Po Other_Punctuation
|
|
133
|
-
Ps Open_Punctuation
|
|
134
|
-
S Symbol
|
|
135
|
-
Sc Currency_Symbol
|
|
136
|
-
Sk Modifier_Symbol
|
|
137
|
-
Sm Math_Symbol
|
|
138
|
-
So Other_Symbol
|
|
139
|
-
Z Separator
|
|
140
|
-
Zl Line_Separator
|
|
141
|
-
Zp Paragraph_Separator
|
|
142
|
-
Zs Space_Separator
|
|
143
|
-
ASCII
|
|
144
|
-
ASCII_Hex_Digit AHex
|
|
145
|
-
Alphabetic Alpha
|
|
146
|
-
Any
|
|
147
|
-
Assigned
|
|
148
|
-
Bidi_Control Bidi_C
|
|
149
|
-
Bidi_Mirrored Bidi_M
|
|
150
|
-
Case_Ignorable CI
|
|
151
|
-
Cased
|
|
152
|
-
Changes_When_Casefolded CWCF
|
|
153
|
-
Changes_When_Casemapped CWCM
|
|
154
|
-
Changes_When_Lowercased CWL
|
|
155
|
-
Changes_When_NFKC_Casefolded CWKCF
|
|
156
|
-
Changes_When_Titlecased CWT
|
|
157
|
-
Changes_When_Uppercased CWU
|
|
158
|
-
Dash
|
|
159
|
-
Default_Ignorable_Code_Point DI
|
|
160
|
-
Deprecated Dep
|
|
161
|
-
Diacritic Dia
|
|
162
|
-
Emoji
|
|
163
|
-
Emoji_Component EComp
|
|
164
|
-
Emoji_Modifier EMod
|
|
165
|
-
Emoji_Modifier_Base EBase
|
|
166
|
-
Emoji_Presentation EPres
|
|
167
|
-
Extended_Pictographic ExtPict
|
|
168
|
-
Extender Ext
|
|
169
|
-
Grapheme_Base Gr_Base
|
|
170
|
-
Grapheme_Extend Gr_Ext
|
|
171
|
-
Hex_Digit Hex
|
|
172
|
-
IDS_Binary_Operator IDSB
|
|
173
|
-
IDS_Trinary_Operator IDST
|
|
174
|
-
ID_Continue IDC
|
|
175
|
-
ID_Start IDS
|
|
176
|
-
Ideographic Ideo
|
|
177
|
-
Join_Control Join_C
|
|
178
|
-
Logical_Order_Exception LOE
|
|
179
|
-
Lowercase Lower
|
|
180
|
-
Math
|
|
181
|
-
Noncharacter_Code_Point NChar
|
|
182
|
-
Pattern_Syntax Pat_Syn
|
|
183
|
-
Pattern_White_Space Pat_WS
|
|
184
|
-
Quotation_Mark QMark
|
|
185
|
-
Radical
|
|
186
|
-
Regional_Indicator RI
|
|
187
|
-
Sentence_Terminal STerm
|
|
188
|
-
Soft_Dotted SD
|
|
189
|
-
Terminal_Punctuation Term
|
|
190
|
-
Unified_Ideograph UIdeo
|
|
191
|
-
Uppercase Upper
|
|
192
|
-
Variation_Selector VS
|
|
193
|
-
White_Space space
|
|
194
|
-
XID_Continue XIDC
|
|
195
|
-
XID_Start XIDS`.split(/\s/).map(e=>[uf(e),e])),J4=new Map([["s",kt(383)],[kt(383),"s"]]),eB=new Map([[kt(223),kt(7838)],[kt(107),kt(8490)],[kt(229),kt(8491)],[kt(969),kt(8486)]]),tB=new Map([jr(453),jr(456),jr(459),jr(498),...mm(8072,8079),...mm(8088,8095),...mm(8104,8111),jr(8124),jr(8140),jr(8188)]),nB=new Map([["alnum",ke`[\p{Alpha}\p{Nd}]`],["alpha",ke`\p{Alpha}`],["ascii",ke`\p{ASCII}`],["blank",ke`[\p{Zs}\t]`],["cntrl",ke`\p{Cc}`],["digit",ke`\p{Nd}`],["graph",ke`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",ke`\p{Lower}`],["print",ke`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",ke`[\p{P}\p{S}]`],["space",ke`\p{space}`],["upper",ke`\p{Upper}`],["word",ke`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",ke`\p{AHex}`]]);function iB(e,t){const n=[];for(let i=e;i<=t;i++)n.push(i);return n}function jr(e){const t=kt(e);return[t.toLowerCase(),t]}function mm(e,t){return iB(e,t).map(n=>jr(n))}var CT=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function rB(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};wT(e);const i={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Og(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};gl(e,oB,i);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:i.subroutineRefMap};gl(e,aB,s);const l={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return gl(e,sB,l),e._originMap=s.groupOriginByCopy,e._strategy=i.strategy,e}var oB={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:i,kind:o}=e;if(o==="repeater"){const s=Kn();s.body[0].body.push(So({negate:!0,body:i}),Pa("Any"));const l=Kn();l.body[0].body.push(mT("greedy",0,1/0,s)),n(pt(l,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:i}){const o=e.body.filter(s=>s.kind==="flags");for(let s=n+1;s<t.body.length;s++){const l=t.body[s];Al(i,l,[]).push(...o)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const n=kT(t.get(e));if(n){const i=Kn({flags:n});i.body[0].body=e.body,e.body=[pt(i,e)]}}}},Assertion({node:e,parent:t,key:n,container:i,root:o,remove:s,replaceWith:l},c){const{kind:d,negate:f}=e,{asciiWordBoundaries:p,avoidSubclass:m,supportedGNodes:g,wordIsAscii:v}=c;if(d==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${f?"Y":"y"}"`);if(d==="line_end")l(pt(So({body:[Ho({body:[Tg("string_end")]}),Ho({body:[lf(10)]})]}),t));else if(d==="line_start")l(pt(Wi(ke`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(d==="search_start")if(g.has(e))o.flags.sticky=!0,s();else{const x=i[n-1];if(x&&hB(x))l(pt(So({negate:!0}),t));else{if(m)throw new Error(ke`Uses "\G" in a way that requires a subclass`);l(Br(Tg("string_start"),t)),c.strategy="clip_search"}}else if(!(d==="string_end"||d==="string_start"))if(d==="string_end_newline")l(pt(Wi(ke`(?=\n?\z)`),t));else if(d==="word_boundary"){if(!v&&!p){const x=`(?:(?<=${qi})(?!${qi})|(?<!${qi})(?=${qi}))`,S=`(?:(?<=${qi})(?=${qi})|(?<!${qi})(?!${qi}))`;l(pt(Wi(f?S:x),t))}}else throw new Error(`Unexpected assertion kind "${d}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!ym(n)&&(n=gm(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:i}=e;i&&!ym(i)&&(i=gm(i,t),e.name=i),n.set(e.number,e),i&&n.set(i,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const i=td({body:[e]});n(pt(i,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:i,minTargetEs2024:o,digitIsAscii:s,spaceIsAscii:l,wordIsAscii:c}){const{kind:d,negate:f,value:p}=e;if(s&&(d==="digit"||p==="digit")){n(Br(Lg("digit",{negate:f}),t));return}if(l&&(d==="space"||p==="space")){n(pt(vm(Wi(Q4),f),t));return}if(c&&(d==="word"||p==="word")){n(Br(Lg("word",{negate:f}),t));return}if(d==="any")n(Br(Pa("Any"),t));else if(d==="digit")n(Br(Pa("Nd",{negate:f}),t));else if(d!=="dot")if(d==="text_segment"){if(i==="strict")throw new Error(ke`Use of "\X" requires non-strict accuracy`);const m="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",g=ke`\p{RI}{2}|${m}(?:\u200D${m})*`;n(pt(Wi(ke`(?>\r\n|${o?ke`\p{RGI_Emoji}`:g}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(d==="hex")n(Br(Pa("AHex",{negate:f}),t));else if(d==="newline")n(pt(Wi(f?`[^
|
|
196
|
-
]`:`(?>\r
|
|
197
|
-
?|[
|
|
198
|
-
\v\f
\u2028\u2029])`),t));else if(d==="posix")if(!o&&(p==="graph"||p==="print")){if(i==="strict")throw new Error(`POSIX class "${p}" requires min target ES2024 or non-strict accuracy`);let m={graph:"!-~",print:" -~"}[p];f&&(m=`\0-${kt(m.codePointAt(0)-1)}${kt(m.codePointAt(2)+1)}-`),n(pt(Wi(`[${m}]`),t))}else n(pt(vm(Wi(nB.get(p)),f),t));else if(d==="property")$y.has(uf(p))||(e.key="sc");else if(d==="space")n(Br(Pa("space",{negate:f}),t));else if(d==="word")n(pt(vm(Wi(qi),f),t));else throw new Error(`Unexpected character set kind "${d}"`)},Directive({node:e,parent:t,root:n,remove:i,replaceWith:o,removeAllPrevSiblings:s,removeAllNextSiblings:l}){const{kind:c,flags:d}=e;if(c==="flags")if(!d.enable&&!d.disable)i();else{const f=Kn({flags:d});f.body[0].body=l(),o(pt(f,t),{traverse:!0})}else if(c==="keep"){const f=n.body[0],m=n.body.length===1&&fT(f,{type:"Group"})&&f.body[0].body.length===1?f.body[0]:n;if(t.parent!==m||m.body.length>1)throw new Error(ke`Uses "\K" in a way that's unsupported`);const g=So({behind:!0});g.body[0].body=s(),o(pt(g,t))}else throw new Error(`Unexpected directive kind "${c}"`)},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(n=>delete e[n]),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:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:i}=e;if(i==="fail")n(pt(So({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${i.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=Kn();t.body[0].body.push(e.body),e.body=pt(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let i=!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 l=AT(s.body);l?(i=!0,Array.isArray(l)?n.push(...l):n.push(l)):o=!0}i&&!o&&n.forEach(s=>t.add(s))},exit(e,{accuracy:t,passedLookbehind:n,strategy:i}){if(t==="strict"&&n&&i)throw new Error(ke`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!ym(n)&&(n=gm(n,t),e.ref=n)}},aB={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:i,ref:o}=e;i||n.set(e,[...t.get(o).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:i},{groupOriginByCopy:o,groupsByName:s,multiplexCapturesToLeftByRef:l,openRefs:c,reffedNodesByReferencer:d}){const f=o.get(e);if(f&&c.has(e.number)){const m=Br(MC(e.number),t);d.set(m,c.get(e.number)),n(m);return}c.set(e.number,e),l.set(e.number,[]),e.name&&Al(l,e.name,[]);const p=l.get(e.name??e.number);for(let m=0;m<p.length;m++){const g=p[m];if(f===g.node||f&&f===g.origin||e===g.origin){p.splice(m,1);break}}if(l.get(e.number).push({node:e,origin:f}),e.name&&l.get(e.name).push({node:e,origin:f}),e.name){const m=Al(s,e.name,new Map);let g=!1;if(f)g=!0;else for(const v of m.values())if(!v.hasDuplicateNameToRemove){g=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:g})}},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=Od(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},i){const{isRecursive:o,ref:s}=e;if(o){let p=t;for(;(p=p.parent)&&!(p.type==="CapturingGroup"&&(p.name===s||p.number===s)););i.reffedNodesByReferencer.set(e,p);return}const l=i.subroutineRefMap.get(s),c=s===0,d=c?MC(0):ET(l,i.groupOriginByCopy,null);let f=d;if(!c){const p=kT(cB(l,g=>g.type==="Group"&&!!g.flags)),m=p?Od(i.globalFlags,p):i.globalFlags;lB(m,i.currentFlags)||(f=Kn({flags:dB(m)}),f.body[0].body.push(d))}n(pt(f,t),{traverse:!c})}},sB={Backreference({node:e,parent:t,replaceWith:n},i){if(e.orphan){i.highestOrphanBackref=Math.max(i.highestOrphanBackref,e.ref);return}const s=i.reffedNodesByReferencer.get(e).filter(l=>uB(l,e));if(!s.length)n(pt(So({negate:!0}),t));else if(s.length>1){const l=Kn({atomic:!0,body:s.reverse().map(c=>Ho({body:[Ag(c.number)]}))});n(pt(l,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 n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let i=0;i<n;i++){const o=pT();e.body.at(-1).body.push(o)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function wT(e){gl(e,{"*"({node:t,parent:n}){t.parent=n}})}function lB(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function uB(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const i=TT(n.parent);for(const o of i){if(o===n)break;if(o===e||LT(o,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function ET(e,t,n,i){const o=Array.isArray(e)?[]:{};for(const[s,l]of Object.entries(e))s==="parent"?o.parent=Array.isArray(n)?i:n:l&&typeof l=="object"?o[s]=ET(l,t,o,n):(s==="type"&&l==="CapturingGroup"&&t.set(o,t.get(e)??e),o[s]=l);return o}function MC(e){const t=gT(e);return t.isRecursive=!0,t}function cB(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function gm(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function kT(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:i})=>{t.forEach(o=>{i.enable?.[o]&&(delete n.disable[o],n.enable[o]=!0),i.disable?.[o]&&(n.disable[o]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function dB({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function TT(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function AT(e){const t=e.find(n=>n.kind==="search_start"||pB(n,{negate:!1})||!fB(n));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 n=[];for(const i of t.body){const o=AT(i.body);if(!o)return null;Array.isArray(o)?n.push(...o):n.push(o)}return n}return null}function LT(e,t){const n=TT(e)??[];for(const i of n)if(i===t||LT(i,t))return!0;return!1}function fB({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function hB(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function pB(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&fT(e.body[0],{type:"Assertion",kind:"search_start"})}function ym(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Wi(e,t){const i=hT(e,{...t,unicodePropertyMap:$y}).body;return i.length>1||i[0].body.length>1?Kn({body:i}):i[0].body[0]}function vm(e,t){return e.negate=t,e}function Br(e,t){return e.parent=t,e}function pt(e,t){return wT(e),e.parent=t,e}function mB(e,t){const n=ST(t),i=Og(n.target,"ES2024"),o=Og(n.target,"ES2025"),s=n.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let l=null,c=null;if(!o){const v=[e.flags.ignoreCase];gl(e,gB,{getCurrentModI:()=>v.at(-1),popModI(){v.pop()},pushModI(x){v.push(x)},setHasCasedChar(){v.at(-1)?l=!0:c=!0}})}const d={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||l)&&!c)};let f=e;const p={accuracy:n.accuracy,appliedGlobalFlags:d,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:f,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!o&&l&&c),useFlagMods:o,useFlagV:i,verbose:n.verbose};function m(v){return p.lastNode=f,f=v,X4(yB[v.type],`Unexpected node type "${v.type}"`)(v,p,m)}const g={pattern:e.body.map(m).join("|"),flags:m(e.flags),options:{...e.options}};return i||(delete g.options.force.v,g.options.disable.v=!0,g.options.unicodeSetsPlugin=null),g._captureTransfers=new Map,g._hiddenCaptures=[],p.captureMap.forEach((v,x)=>{v.hidden&&g._hiddenCaptures.push(x),v.transferTo&&Al(g._captureTransfers,v.transferTo,[]).push(x)}),g}var gB={"*":{enter({node:e},t){if(NC(e)){const n=t.getCurrentModI();t.pushModI(e.flags?Od({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){NC(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){qy(kt(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),RT(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&CT.has(e.value)&&t.setHasCasedChar()}},yB={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?ke`\B`:ke`\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,n){const{body:i,name:o,number:s}=e,l={ignoreCase:t.currentFlags.ignoreCase},c=t.originMap.get(e);return c&&(l.hidden=!0,s>c.number&&(l.transferTo=c.number)),t.captureMap.set(s,l),`(${o?`?<${o}>`:""}${i.map(n).join("|")})`},Character({value:e},t){const n=kt(e),i=Ma(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(i!==n)return i;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&qy(n)){const o=_T(n);return t.inCharClass?o.join(""):o.length>1?`[${o.join("")}]`:o[0]}return n},CharacterClass(e,t,n){const{kind:i,negate:o,parent:s}=e;let{body:l}=e;if(i==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Zn.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&l.some(zC)&&(l=[lf(45),...l.filter(f=>!zC(f))]);const c=()=>`[${o?"^":""}${l.map(n).join(i==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Zn.bugNestedClassIgnoresNegation)&&!o){const p=l.filter(m=>m.type==="CharacterClass"&&m.kind==="union"&&m.negate);if(p.length){const m=Kn(),g=m.body[0];return m.parent=s,g.parent=m,l=l.filter(v=>!p.includes(v)),e.body=l,l.length?(e.parent=g,g.body.push(e)):m.body.pop(),p.forEach(v=>{const x=Ho({body:[v]});v.parent=x,x.parent=m,m.body.push(x)}),n(m)}}t.inCharClass=!0;const f=c();return t.inCharClass=!1,f}const d=l[0];if(i==="union"&&!o&&d&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(Zn.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&l.length===1&&d.type!=="CharacterClassRange"))return l.map(n).join("");if(!t.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return c()},CharacterClassRange(e,t){const n=e.min.value,i=e.max.value,o={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=Ma(n,o),l=Ma(i,o),c=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const d=RT(e);_B(d).forEach(p=>{c.add(Array.isArray(p)?`${Ma(p[0],o)}-${Ma(p[1],o)}`:Ma(p,o))})}return`${s}-${l}${[...c].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:i},o){if(e==="dot")return o.currentFlags.dotAll?o.appliedGlobalFlags.dotAll||o.useFlagMods?".":"[^]":ke`[^\n]`;if(e==="digit")return t?ke`\D`:ke`\d`;if(e==="property"){if(o.useAppliedIgnoreCase&&o.currentFlags.ignoreCase&&CT.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?ke`\P`:ke`\p`}{${i?`${i}=`:""}${n}}`}if(e==="word")return t?ke`\W`:ke`\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:n,parent:i},o,s){const l=o.currentFlags;n&&(o.currentFlags=Od(l,n));const c=t.map(s).join("|"),d=!o.verbose&&t.length===1&&i.type!=="Quantifier"&&!e&&(!o.useFlagMods||!n)?c:`(?${CB(e,n,o.useFlagMods)}${c})`;return o.currentFlags=l,d},LookaroundAssertion({body:e,kind:t,negate:n},i,o){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(o).join("|")})`},Quantifier(e,t,n){return n(e.body)+wB(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const i=n.recursionLimit;return t===0?`(?R=${i})`:ke`\g<${t}&R=${i}>`}},vB=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),bB=new Set(["-","\\","]","^","["]),xB=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),IC=new Map([[9,ke`\t`],[10,ke`\n`],[11,ke`\v`],[12,ke`\f`],[13,ke`\r`],[8232,ke`\u2028`],[8233,ke`\u2029`],[65279,ke`\uFEFF`]]),SB=new RegExp("^\\p{Cased}$","u");function qy(e){return SB.test(e)}function RT(e,t){const n=!!t?.firstOnly,i=e.min.value,o=e.max.value,s=[];if(i<65&&(o===65535||o>=131071)||i===65536&&o>=131071)return s;for(let l=i;l<=o;l++){const c=kt(l);if(!qy(c))continue;const d=_T(c).filter(f=>{const p=f.codePointAt(0);return p<i||p>o});if(d.length&&(s.push(...d),n))break}return s}function Ma(e,{escDigit:t,inCharClass:n,useFlagV:i}){if(IC.has(e))return IC.get(e);if(e<32||e>126&&e<160||e>262143||t&&EB(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const o=n?i?xB:bB:vB,s=kt(e);return(o.has(s)?"\\":"")+s}function _B(e){const t=e.map(o=>o.codePointAt(0)).sort((o,s)=>o-s),n=[];let i=null;for(let o=0;o<t.length;o++)t[o+1]===t[o]+1?i??=t[o]:i===null?n.push(t[o]):(n.push([i,t[o]]),i=null);return n}function CB(e,t,n){if(e)return">";let i="";if(t&&n){const{enable:o,disable:s}=t;i=(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")+(s?"-":"")+(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")}return`${i}:`}function wB({kind:e,max:t,min:n}){let i;return!n&&t===1?i="?":!n&&t===1/0?i="*":n===1&&t===1/0?i="+":n===t?i=`{${n}}`:i=`{${n},${t===1/0?"":t}}`,i+{greedy:"",lazy:"?",possessive:"+"}[e]}function NC({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function EB(e){return e>47&&e<58}function zC({type:e,value:t}){return e==="Character"&&t===45}var kB=class Dg extends RegExp{#e=new Map;#t=null;#i;#n=null;#r=null;rawOptions={};get source(){return this.#i||"(?:)"}constructor(t,n,i){const o=!!i?.lazyCompile;if(t instanceof RegExp){if(i)throw new Error("Cannot provide options when copying a regexp");const s=t;super(s,n),this.#i=s.source,s instanceof Dg&&(this.#e=s.#e,this.#n=s.#n,this.#r=s.#r,this.rawOptions=s.rawOptions)}else{const s={hiddenCaptures:[],strategy:null,transfers:[],...i};super(o?"":t,n),this.#i=t,this.#e=AB(s.hiddenCaptures,s.transfers),this.#r=s.strategy,this.rawOptions=i??{}}o||(this.#t=this)}exec(t){if(!this.#t){const{lazyCompile:o,...s}=this.rawOptions;this.#t=new Dg(this.#i,this.flags,s)}const n=this.global||this.sticky,i=this.lastIndex;if(this.#r==="clip_search"&&n&&i){this.lastIndex=0;const o=this.#o(t.slice(i));return o&&(TB(o,i,t,this.hasIndices),this.lastIndex+=i),o}return this.#o(t)}#o(t){this.#t.lastIndex=this.lastIndex;const n=super.exec.call(this.#t,t);if(this.lastIndex=this.#t.lastIndex,!n||!this.#e.size)return n;const i=[...n];n.length=1;let o;this.hasIndices&&(o=[...n.indices],n.indices.length=1);const s=[0];for(let l=1;l<i.length;l++){const{hidden:c,transferTo:d}=this.#e.get(l)??{};if(c?s.push(null):(s.push(n.length),n.push(i[l]),this.hasIndices&&n.indices.push(o[l])),d&&i[l]!==void 0){const f=s[d];if(!f)throw new Error(`Invalid capture transfer to "${f}"`);if(n[f]=i[l],this.hasIndices&&(n.indices[f]=o[l]),n.groups){this.#n||(this.#n=LB(this.source));const p=this.#n.get(d);p&&(n.groups[p]=i[l],this.hasIndices&&(n.indices.groups[p]=o[l]))}}}return n}};function TB(e,t,n,i){if(e.index+=t,e.input=n,i){const o=e.indices;for(let l=0;l<o.length;l++){const c=o[l];c&&(o[l]=[c[0]+t,c[1]+t])}const s=o.groups;s&&Object.keys(s).forEach(l=>{const c=s[l];c&&(s[l]=[c[0]+t,c[1]+t])})}}function AB(e,t){const n=new Map;for(const i of e)n.set(i,{hidden:!0});for(const[i,o]of t)for(const s of o)Al(n,s,{}).transferTo=i;return n}function LB(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let i=0,o=0,s;for(;s=t.exec(e);){const{0:l,groups:{capture:c,name:d}}=s;l==="["?i++:i?l==="]"&&i--:c&&(o++,d&&n.set(o,d))}return n}function RB(e,t){const n=OB(e,t);return n.options?new kB(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function OB(e,t){const n=ST(t),i=hT(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:$y}),o=rB(i,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),s=mB(o,n),l=W4(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),c=$4(l.pattern),d=G4(c.pattern,{captureTransfers:l.captureTransfers,hiddenCaptures:l.hiddenCaptures}),f={pattern:d.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const p=d.hiddenCaptures.sort((x,S)=>x-S),m=Array.from(d.captureTransfers),g=o._strategy,v=f.pattern.length>=n.lazyCompileLength;(p.length||m.length||g||v)&&(f.options={...p.length&&{hiddenCaptures:p},...m.length&&{transfers:m},...g&&{strategy:g},...v&&{lazyCompile:v}})}return f}function DB(e,t){return RB(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function MB(e={}){const t={target:"auto",cache:new Map,...e};return t.regexConstructor||=n=>DB(n,{target:t.target}),{createScanner(n){return new Y3(n,t)},createString(n){return{content:n}}}}async function OT(e){if(kk())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=am.get(e);if(t!=null)return t;try{let n=H6.get(e);if(n==null&&Object.prototype.hasOwnProperty.call(yg,e)&&(n=yg[e]),n==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const i=n().then(({default:o})=>{const s={name:e,data:o};return Po.has(e)||Po.set(e,s),s});return am.set(e,i),await i}finally{am.delete(e)}}function DT(e){return Po.get(e)??OT(e)}const Mg=new Set;function Ll(e){const t=[],n=new Set;for(const m of IB(e.themes)){const g=MT(m)?m.getThemes():[m];for(const v of g){if(n.has(v.name))throw new Error(`Theme collection already contains theme "${v.name}"`);n.add(v.name),t.push(v)}}const i=Object.freeze([...t]),o=Object.freeze(i.filter(m=>m.colorScheme==="light")),s=Object.freeze(i.filter(m=>m.colorScheme==="dark")),l=new Map(i.map(m=>[m.name,m])),c=Object.freeze(i.map(m=>m.name)),d=Object.freeze(o.map(m=>m.name)),f=Object.freeze(s.map(m=>m.name));function p(m){if(m==null)return i;const{colorScheme:g,collection:v}=m;return v==null?g==="light"?o:g==="dark"?s:i:i.filter(x=>x.collection!==v?!1:g==null||x.colorScheme===g)}return{getTheme(m){return l.get(m)},getThemes(m){return p(m)},getThemeNames(m){return m?.collection==null?m?.colorScheme==="light"?d:m?.colorScheme==="dark"?f:c:p(m).map(g=>g.name)},hasTheme(m){return l.has(m)},orderBy(m){return Ll({themes:i.map((g,v)=>({descriptor:g,index:v})).sort((g,v)=>{const x=m(g.descriptor,v.descriptor);return x!==0?x:g.index-v.index}).map(g=>g.descriptor)})},pick(m){const g=[],v=new Set;for(const x of m){if(v.has(x))throw new Error(`Theme collection pick already includes theme "${x}"`);v.add(x);const S=l.get(x);if(S==null)throw new Error(`Theme collection does not contain theme "${x}"`);g.push(S)}return Ll({themes:g})},registerInto(m){for(const g of i)m.registerThemeIfAbsent(g.name,g.load)}}}function IB(e){return NB(e)?[e]:e}function NB(e){return MT(e)||zB(e)}function zB(e){return typeof e.name=="string"&&typeof e.load=="function"}function MT(e){return typeof e.getThemes=="function"}function IT(e){return e!==null&&typeof e=="object"&&"default"in e?e.default:e}var PB=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name="DuplicateThemeError"}},HB=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name="UnregisteredThemeError"}},jB=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name="UnresolvedThemeError"}};function BB(){const e=new Map,t=new Map,n=new Map;let i=0;function o(_,C){if(e.has(_))throw new PB(_);e.set(_,C)}function s(_,C){return e.has(_)?!1:(e.set(_,C),!0)}function l(_){return e.has(_)}function c(_){const C=t.get(_);if(C!==void 0)return Promise.resolve(C);const k=n.get(_);if(k!==void 0)return k;const D=e.get(_);if(D===void 0)return Promise.reject(new HB(_));const M=i,O=D().then(z=>{const j=IT(z);return M===i&&t.set(_,j),n.get(_)===O&&n.delete(_),j}).catch(z=>{throw n.get(_)===O&&n.delete(_),z});return n.set(_,O),O}function d(_){return Promise.all(_.map(C=>c(C)))}function f(_,C){t.set(_,C)}function p(_){for(const[C,k]of _)f(C,k)}function m(_){return t.get(_)}function g(_){const C=[];for(const k of _){const D=t.get(k);if(D===void 0)throw new jB(k);C.push(D)}return C}function v(_){return t.has(_)}function x(_){for(const C of _)if(!t.has(C))return!1;return!0}function S(_){const C=t.get(_);return C!==void 0?C:c(_)}function w(){i++,t.clear(),n.clear()}return{clearResolvedThemes:w,getResolvedOrResolveTheme:S,getResolvedTheme:m,getResolvedThemes:g,hasRegisteredTheme:l,hasResolvedTheme:v,hasResolvedThemes:x,registerTheme:o,registerThemeIfAbsent:s,resolveTheme:c,resolveThemes:d,seedResolvedTheme:f,seedResolvedThemes:p}}const Jn=BB();function Ig(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let i;if(typeof n=="string"){if(i=Jn.getResolvedTheme(n),i==null)throw new Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else i=n,n=n.name,Jn.getResolvedTheme(n)==null&&Jn.seedResolvedTheme(n,i);Mg.has(n)||(Mg.add(n),t.loadThemeSync(i))}}function NT({name:e,load:t,colorScheme:n,collection:i,displayName:o}){return{name:e,colorScheme:n,collection:i,displayName:o,load:UB(t)}}function UB(e){return async()=>of(IT(await e()))}const VB="pierre",FB=["pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],zT=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],GB=[...zT,...FB],$B=new Set(zT);function qB(e){return $B.has(e)?"light":"dark"}const WB={"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"},YB={"pierre-dark":()=>A(()=>import("./pierre-dark-CyvmCCZW.js"),[],import.meta.url),"pierre-dark-soft":()=>A(()=>import("./pierre-dark-soft-BHGpRqa4.js"),[],import.meta.url),"pierre-dark-vibrant":()=>A(()=>import("./pierre-dark-vibrant-BWBVywrn.js"),[],import.meta.url),"pierre-dark-protanopia-deuteranopia":()=>A(()=>import("./pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js"),[],import.meta.url),"pierre-dark-tritanopia":()=>A(()=>import("./pierre-dark-tritanopia-Beq2gCRQ.js"),[],import.meta.url),"pierre-light":()=>A(()=>import("./pierre-light-480U9XYS.js"),[],import.meta.url),"pierre-light-soft":()=>A(()=>import("./pierre-light-soft-CVdyfjmI.js"),[],import.meta.url),"pierre-light-vibrant":()=>A(()=>import("./pierre-light-vibrant-DdTDNdfJ.js"),[],import.meta.url),"pierre-light-protanopia-deuteranopia":()=>A(()=>import("./pierre-light-protanopia-deuteranopia-CaVOBURG.js"),[],import.meta.url),"pierre-light-tritanopia":()=>A(()=>import("./pierre-light-tritanopia-B4_gpKOM.js"),[],import.meta.url)};function XB(e){return NT({name:e,collection:VB,colorScheme:qB(e),displayName:WB[e],load:YB[e]})}const PT=Ll({themes:GB.map(e=>XB(e))}),KB="shiki",HT=["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"],QB=["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"],ZB=new Set(HT);function JB(e){return ZB.has(e)?"light":"dark"}const eU={andromeeda:()=>A(()=>import("./andromeeda-C4gqWexZ.js"),[],import.meta.url),"aurora-x":()=>A(()=>import("./aurora-x-D-2ljcwZ.js"),[],import.meta.url),"ayu-dark":()=>A(()=>import("./ayu-dark-DYE7WIF3.js"),[],import.meta.url),"ayu-light":()=>A(()=>import("./ayu-light-BA47KaF1.js"),[],import.meta.url),"ayu-mirage":()=>A(()=>import("./ayu-mirage-32ctXXKs.js"),[],import.meta.url),"catppuccin-frappe":()=>A(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[],import.meta.url),"catppuccin-latte":()=>A(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[],import.meta.url),"catppuccin-macchiato":()=>A(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[],import.meta.url),"catppuccin-mocha":()=>A(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[],import.meta.url),"dark-plus":()=>A(()=>import("./dark-plus-C3mMm8J8.js"),[],import.meta.url),dracula:()=>A(()=>import("./dracula-BzJJZx-M.js"),[],import.meta.url),"dracula-soft":()=>A(()=>import("./dracula-soft-BXkSAIEj.js"),[],import.meta.url),"everforest-dark":()=>A(()=>import("./everforest-dark-BgDCqdQA.js"),[],import.meta.url),"everforest-light":()=>A(()=>import("./everforest-light-C8M2exoo.js"),[],import.meta.url),"github-dark":()=>A(()=>import("./github-dark-DHJKELXO.js"),[],import.meta.url),"github-dark-default":()=>A(()=>import("./github-dark-default-Cuk6v7N8.js"),[],import.meta.url),"github-dark-dimmed":()=>A(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[],import.meta.url),"github-dark-high-contrast":()=>A(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[],import.meta.url),"github-light":()=>A(()=>import("./github-light-DAi9KRSo.js"),[],import.meta.url),"github-light-default":()=>A(()=>import("./github-light-default-D7oLnXFd.js"),[],import.meta.url),"github-light-high-contrast":()=>A(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[],import.meta.url),"gruvbox-dark-hard":()=>A(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[],import.meta.url),"gruvbox-dark-medium":()=>A(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[],import.meta.url),"gruvbox-dark-soft":()=>A(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[],import.meta.url),"gruvbox-light-hard":()=>A(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[],import.meta.url),"gruvbox-light-medium":()=>A(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[],import.meta.url),"gruvbox-light-soft":()=>A(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[],import.meta.url),horizon:()=>A(()=>import("./horizon-BUw7H-hv.js"),[],import.meta.url),"horizon-bright":()=>A(()=>import("./horizon-bright-CUuTKBJd.js"),[],import.meta.url),houston:()=>A(()=>import("./houston-DnULxvSX.js"),[],import.meta.url),"kanagawa-dragon":()=>A(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[],import.meta.url),"kanagawa-lotus":()=>A(()=>import("./kanagawa-lotus-C3DzagqV.js"),[],import.meta.url),"kanagawa-wave":()=>A(()=>import("./kanagawa-wave-DFGoQZhC.js"),[],import.meta.url),laserwave:()=>A(()=>import("./laserwave-DUszq2jm.js"),[],import.meta.url),"light-plus":()=>A(()=>import("./light-plus-B7mTdjB0.js"),[],import.meta.url),"material-theme":()=>A(()=>import("./material-theme-D5KoaKCx.js"),[],import.meta.url),"material-theme-darker":()=>A(()=>import("./material-theme-darker-BfHTSMKl.js"),[],import.meta.url),"material-theme-lighter":()=>A(()=>import("./material-theme-lighter-B0m2ddpp.js"),[],import.meta.url),"material-theme-ocean":()=>A(()=>import("./material-theme-ocean-CyktbL80.js"),[],import.meta.url),"material-theme-palenight":()=>A(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[],import.meta.url),"min-dark":()=>A(()=>import("./min-dark-CafNBF8u.js"),[],import.meta.url),"min-light":()=>A(()=>import("./min-light-CTRr51gU.js"),[],import.meta.url),monokai:()=>A(()=>import("./monokai-BRVnQi9A.js"),[],import.meta.url),"night-owl":()=>A(()=>import("./night-owl-C39BiMTA.js"),[],import.meta.url),"night-owl-light":()=>A(()=>import("./night-owl-light-CMTm3GFP.js"),[],import.meta.url),nord:()=>A(()=>import("./nord-Ddv68eIx.js"),[],import.meta.url),"one-dark-pro":()=>A(()=>import("./one-dark-pro-DVMEJ2y_.js"),[],import.meta.url),"one-light":()=>A(()=>import("./one-light-C3Wv6jpd.js"),[],import.meta.url),plastic:()=>A(()=>import("./plastic-3e1v2bzS.js"),[],import.meta.url),poimandres:()=>A(()=>import("./poimandres-CS3Unz2-.js"),[],import.meta.url),red:()=>A(()=>import("./red-hvxz__6c.js"),[],import.meta.url),"rose-pine":()=>A(()=>import("./rose-pine-5qJOZa0Y.js"),[],import.meta.url),"rose-pine-dawn":()=>A(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[],import.meta.url),"rose-pine-moon":()=>A(()=>import("./rose-pine-moon-C9pEdX9L.js"),[],import.meta.url),"slack-dark":()=>A(()=>import("./slack-dark-BthQWCQV.js"),[],import.meta.url),"slack-ochin":()=>A(()=>import("./slack-ochin-DqwNpetd.js"),[],import.meta.url),"snazzy-light":()=>A(()=>import("./snazzy-light-Bw305WKR.js"),[],import.meta.url),"solarized-dark":()=>A(()=>import("./solarized-dark-CpvCGNkr.js"),[],import.meta.url),"solarized-light":()=>A(()=>import("./solarized-light-Dlz6yCKv.js"),[],import.meta.url),"synthwave-84":()=>A(()=>import("./synthwave-84-CbfX1IO0.js"),[],import.meta.url),"tokyo-night":()=>A(()=>import("./tokyo-night-hegEt444.js"),[],import.meta.url),vesper:()=>A(()=>import("./vesper-DRje8inN.js"),[],import.meta.url),"vitesse-black":()=>A(()=>import("./vitesse-black-Bkuqu6BP.js"),[],import.meta.url),"vitesse-dark":()=>A(()=>import("./vitesse-dark-D0r3Knsf.js"),[],import.meta.url),"vitesse-light":()=>A(()=>import("./vitesse-light-CVO1_9PV.js"),[],import.meta.url)};function PC(e){return NT({name:e,collection:KB,colorScheme:JB(e),load:eU[e]})}const jT=Ll({themes:Object.freeze([...HT.map(e=>PC(e)),...QB.map(e=>PC(e))])});Ll({themes:[PT,jT]});function BT(e){if(kk())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(Jn.hasRegisteredTheme(e))return;const t=jT.getTheme(e);if(t!=null){Jn.registerThemeIfAbsent(t.name,t.load);return}throw new Error(`No valid theme loader registered for "${e}"`)}function UT(e,t){if(t.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function tU(e){BT(e);const t=await Jn.resolveTheme(e);return UT(e,t),t}function nU(e){return Jn.getResolvedTheme(e)??tU(e)}let pi;async function Dd({themes:e,langs:t,preferredHighlighter:n="shiki-js"}){pi??=W3({themes:[],langs:["text"],engine:n==="shiki-wasm"?Ok(A(()=>import("./wasm-CG6Dc4jp.js"),[],import.meta.url)):MB()});const i=iU(pi)?await pi:pi;pi=i;const o=[];for(const l of t){if(l==="text"||l==="ansi")continue;const c=DT(l);"then"in c?o.push(c):eC(c,i)}const s=[];for(const l of e){const c=nU(l);"then"in c?s.push(c):Ig(c,pi)}return(o.length>0||s.length>0)&&await Promise.all([Promise.all(o).then(l=>{eC(l,i)}),Promise.all(s).then(l=>{Ig(l,i)})]),i}function VT(){if(pi!=null&&!("then"in pi))return pi}function iU(e=pi){return e!=null&&"then"in e}for(const e of PT.getThemes())Jn.registerThemeIfAbsent(e.name,e.load);function Rl(e=mt){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function yl(e){for(const t of Rl(e))if(!Mg.has(t))return!1;return!0}function Ng(e){return Jn.hasResolvedThemes(e)}function Qi(e,t){return ts(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function ff(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 zg(e){return Te({tagName:"div",children:[Te({tagName:"div",children:e.annotations?.map(t=>Te({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function rU(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 FT({fileOrDiff:e,mode:t,stickyHeader:n}){const i="type"in e?e:void 0,o={"data-diffs-header":t,"data-change-type":i?.type,"data-sticky":n?"":void 0};return Te({tagName:"div",children:[t==="custom"?Te({tagName:"slot",properties:{name:Vl}}):oU({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...t==="custom"?[]:[aU(i)]],properties:o})}function oU({name:e,prevName:t,iconType:n}){const i=[Te({tagName:"slot",properties:{name:My}}),vd({name:rU(n),properties:{"data-change-icon":n}})];return t!=null&&(i.push(Te({tagName:"div",children:[Te({tagName:"bdi",children:[xi(t)]})],properties:{"data-prev-name":""}})),i.push(vd({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),i.push(Te({tagName:"div",children:[Te({tagName:"bdi",children:[xi(e)]})],properties:{"data-title":""}})),i.push(Te({tagName:"slot",properties:{name:Iy}})),Te({tagName:"div",children:i,properties:{"data-header-content":""}})}function aU(e){const t=[];if(e!=null){let n=0,i=0;for(const o of e.hunks)n+=o.additionLines,i+=o.deletionLines;(i>0||n===0)&&t.push(Te({tagName:"span",children:[xi(`-${i}`)],properties:{"data-deletions-count":""}})),(n>0||i===0)&&t.push(Te({tagName:"span",children:[xi(`+${n}`)],properties:{"data-additions-count":""}}))}return t.push(Te({tagName:"slot",properties:{name:Ny}})),Te({tagName:"div",children:t,properties:{"data-metadata":""}})}function GT(e){return Te({tagName:"pre",properties:sU(e)})}function sU({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:i,split:o,totalLines:s,type:l,customProperties:c}){return{...c,"data-diff":l==="diff"?"":void 0,"data-file":l==="file"?"":void 0,"data-diff-type":l==="diff"?o?"split":"single":void 0,"data-overflow":i,"data-disable-line-numbers":n?"":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;`}}const xo=new Map;let lU=0;const il={"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",mts:"typescript",cts:"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 Jt(e){if(xo.has(e))return xo.get(e)??"text";if(il[e]!=null)return il[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(xo.has(t[1]))return xo.get(t[1])??"text";if(il[t[1]]!=null)return il[t[1]]??"text"}const n=e.match(/\.([^.]+)$/)?.[1]??"";return xo.has(n)?xo.get(n)??"text":il[n]??"text"}function uU(){return lU}function cU(){return Object.fromEntries(xo)}function $T(e,{theme:t,preferredHighlighter:n="shiki-js"}){return{langs:[e??"text"],themes:Rl(t),preferredHighlighter:n}}function ei(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function dU(e,t,n){const i=typeof n.lineInfo=="function"?n.lineInfo(t):n.lineInfo[t-1];if(i==null){const o=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(o,{node:e,line:t,state:n}),new Error(o)}return e.tagName="div",e.properties["data-line"]=i.lineNumber,e.properties["data-alt-line"]=i.altLineNumber,e.properties["data-line-type"]=i.type,e.properties["data-line-index"]=i.lineIndex,e.children.length===0&&e.children.push(xi(`
|
|
199
|
-
`)),e}const Rc=Symbol("no-token"),bm=Symbol("multiple-tokens");function qT(e){const t=fU(e);if(t!=null)return t;let n=Rc;const i=[];let o=[],s;const l=()=>{if(o.length===0||s==null){o=[],s=void 0;return}if(o.length===1){const d=o[0];if(d?.type==="element"){hU(d,s);for(const f of d.children)nd(f)}else nd(d);i.push(d),o=[],s=void 0;return}for(const d of o)nd(d);i.push(Te({tagName:"span",properties:{"data-char":s},children:o})),o=[],s=void 0},c=d=>{if(d!==Rc){if(d===bm){n=bm;return}if(n===Rc){n=d;return}n!==d&&(n=bm)}};for(const d of e.children){const f=d.type==="element"?qT(d):Rc;if(c(f),typeof f!="number"){l(),i.push(d);continue}s!=null&&s!==f&&l(),s??=f,o.push(d)}return l(),e.children=i,n}function fU(e){const t=e.properties["data-char"];if(typeof t=="number")return t}function nd(e){if(e.type==="element"){e.properties["data-char"]=void 0;for(const t of e.children)nd(t)}}function hU(e,t){e.properties["data-char"]=t}function pU(e={}){const{classPrefix:t="__shiki_",classSuffix:n="",classReplacer:i=c=>c}=e,o=new Map;function s(c){return Object.entries(c).map(([d,f])=>`${d}:${f}`).join(";")}function l(c){const d=typeof c=="string"?c:s(c);let f=t+mU(d)+n;return f=i(f),o.has(f)||o.set(f,typeof c=="string"?c:{...c}),f}return{name:"@shikijs/transformers:style-to-class",pre(c){if(!c.properties.style)return;const d=l(c.properties.style);delete c.properties.style,this.addClassToHast(c,d)},tokens(c){for(const d of c)for(const f of d){if(!f.htmlStyle)continue;const p=l(f.htmlStyle);f.htmlStyle={},f.htmlAttrs||={},f.htmlAttrs.class?f.htmlAttrs.class+=` ${p}`:f.htmlAttrs.class=p}},getClassRegistry(){return o},getCSS(){let c="";for(const[d,f]of o.entries())c+=`.${d}{${typeof f=="string"?f:s(f)}}`;return c},clearRegistry(){o.clear()}}}function mU(e,t=0){let n=3735928559^t,i=1103547991^t;for(let o=0,s;o<e.length;o++)s=e.charCodeAt(o),n=Math.imul(n^s,2654435761),i=Math.imul(i^s,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(i^i>>>13,3266489909),i=Math.imul(i^i>>>16,2246822507),i^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&i)+(n>>>0)).toString(36).slice(0,6)}function WT(e=!1,t=!1){const n={lineInfo:[]},i=[{line(o){return delete o.properties.class,o},pre(o){const s=b5(o),l=[];if(s!=null){let c=1;for(const d of s.children)d.type==="element"&&(e&&qT(d),l.push(dU(d,c,n)),c++);s.children=l}return o},...e?{tokens(o){for(const s of o){let l=0;for(const c of s){const d=c;d.__lineChar??=l,l+=c.content.length}}},preprocess(o,s){s.mergeWhitespaces="never"},span(o,s,l,c,d){if(d?.offset!=null&&d.content!=null){const f=d.__lineChar;return f!=null&&(o.properties["data-char"]=f),o}return o}}:null}];return t&&i.push(gU,HC),e&&i.push({line:o=>(o.type==="element"&&o.children.length===0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]}),o)}),{state:n,transformers:i,toClass:HC}}const HC=pU({classPrefix:"hl-"}),gU={name:"token-style-normalizer",tokens(e){for(const t of e)for(const n of t){if(n.htmlStyle!=null)continue;const i={};n.color!=null&&(i.color=n.color),n.bgColor!=null&&(i["background-color"]=n.bgColor),n.fontStyle!=null&&n.fontStyle!==0&&((n.fontStyle&1)!==0&&(i["font-style"]="italic"),(n.fontStyle&2)!==0&&(i["font-weight"]="bold"),(n.fontStyle&4)!==0&&(i["text-decoration"]="underline")),Object.keys(i).length>0&&(n.htmlStyle=i)}}};function En(e){return`--${e==="token"?"diffs-token":"diffs"}-`}const yU=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,vU=/^0(?:\.0+)?%?$/;function bU(e){const t=e.indexOf("(");if(t<=0||!e.endsWith(")"))return;const n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;const i=e.slice(t+1,-1).trim();if(i.length===0)return;const o=i.lastIndexOf("/");if(o!==-1)return i.slice(o+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){const s=i.split(",");if(s.length===4)return s[3]?.trim()}}function xU(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 n=t[1];let i,o=1;return n.length===3?i=n.split("").map(s=>s+s).join(""):n.length===6?i=n:(i=n.slice(0,6),o=parseInt(n.slice(6,8),16)/255),[parseInt(i.slice(0,2),16),parseInt(i.slice(2,4),16),parseInt(i.slice(4,6),16),o]}function xm(e){if(e==null)return null;const t=xU(e);if(t==null)return null;const n=t[0]/255,i=t[1]/255,o=t[2]/255,s=l=>l<=.03928?l/12.92:((l+.055)/1.055)**2.4;return .2126*s(n)+.7152*s(i)+.0722*s(o)}function jC(e){if(e==null)return!1;const t=e.trim().toLowerCase();if(t==="transparent"||yU.test(t))return!0;const n=bU(t);return n!=null&&vU.test(n)}function SU(e,t,n){if(t==null||n==null)return!1;const i=xm(e),o=xm(t),s=xm(n);return i==null||o==null||s==null?!1:Math.abs(i-s)<Math.abs(i-o)}const BC=new WeakMap;function Sm(e){const t=BC.get(e);if(t!=null)return t;const n=e.colors??{},i={...n},o=n["editor.background"]??e.bg,s=n["editor.foreground"]??e.fg,l=n["sideBar.background"]??o,c=n["sideBar.foreground"]??s;li(i,"editor.background",o),li(i,"editor.foreground",s),li(i,"sideBar.background",l),li(i,"sideBar.foreground",c),li(i,"input.background",n["input.background"]??l),li(i,"sideBarSectionHeader.foreground",n["sideBarSectionHeader.foreground"]??c),li(i,"list.activeSelectionForeground",n["list.activeSelectionForeground"]??c),li(i,"gitDecoration.addedResourceForeground",_m(n["gitDecoration.addedResourceForeground"],n["terminal.ansiGreen"],n["editorGutter.addedBackground"])),li(i,"gitDecoration.modifiedResourceForeground",_m(n["gitDecoration.modifiedResourceForeground"],n["terminal.ansiBlue"],n["editorGutter.modifiedBackground"])),li(i,"gitDecoration.deletedResourceForeground",_m(n["gitDecoration.deletedResourceForeground"],n["terminal.ansiRed"],n["editorGutter.deletedBackground"]));const d=(jC(n["list.focusOutline"])?void 0:n["list.focusOutline"])??(jC(n.focusBorder)?void 0:n.focusBorder);d!=null?i["list.focusOutline"]=d:delete i["list.focusOutline"];const f=n["list.hoverBackground"];f!=null&&(_U(f,l)||SU(f,l,c))&&delete i["list.hoverBackground"];const p=Object.freeze({...e,colors:Object.freeze(i)});return BC.set(e,p),p}function li(e,t,n){n!=null&&n!==""&&(e[t]=n)}function _m(...e){for(const t of e)if(t!=null&&t!=="")return t}function _U(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function YT({theme:e=mt,highlighter:t,prefix:n}){let i="";if(typeof e=="string"){const o=t.getTheme(e),s=Sm(o);i+=`color:${s.fg};`,i+=`background-color:${s.bg};`,i+=`${En("global")}fg:${s.fg};`,i+=`${En("global")}bg:${s.bg};`,i+=Cm(o,n)}else{let o=t.getTheme(e.dark),s=Sm(o);i+=`${En("global")}dark:${s.fg};`,i+=`${En("global")}dark-bg:${s.bg};`,i+=Cm(o,"dark"),o=t.getTheme(e.light),s=Sm(o),i+=`${En("global")}light:${s.fg};`,i+=`${En("global")}light-bg:${s.bg};`,i+=Cm(o,"light")}return i}function Cm(e,t){t=t!=null?`${t}-`:"";let n="";const i=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];i!=null&&(n+=`${En("global")}${t}addition-color:${i};`);const o=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];o!=null&&(n+=`${En("global")}${t}deletion-color:${o};`);const s=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return s!=null&&(n+=`${En("global")}${t}modified-color:${s};`),n}function Pg(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")}const UC=10,VC=13,CU=4,wU=40;function EU(e){const t=[0];let n=e.indexOf("\r"),i=e.indexOf(`
|
|
200
|
-
`),o=0,s=0;for(;n!==-1||i!==-1;){let l;if(n!==-1&&(i===-1||n<i)?i===n+1?(l=i+1,n=e.indexOf("\r",l),i=e.indexOf(`
|
|
201
|
-
`,l)):(l=n+1,n=e.indexOf("\r",l)):(l=i+1,i=e.indexOf(`
|
|
202
|
-
`,l)),t.push(l),++s===CU){if(l-o<=wU){for(let c=l;c<e.length;c++){const d=e.charCodeAt(c);(d===UC||d===VC)&&(d===VC&&c+1<e.length&&e.charCodeAt(c+1)===UC&&c++,t.push(c+1))}return t}o=l,s=0}}return t}function id(e){const t=EU(e);return Array.from({length:t.length},(n,i)=>{const o=t[i],s=t[i+1]??e.length;return e.slice(o,s)})}const kU={forcePlainText:!1};function XT(e,t,{theme:n=mt,tokenizeMaxLineLength:i,useTokenTransformer:o},{forcePlainText:s,startingLine:l,totalLines:c,lines:d}=kU){s?(l??=0,c??=1/0):(l=0,c=1/0);const f=l>0||c<1/0,{state:p,transformers:m}=WT(o),g=s?"text":e.lang??Jt(e.name),v=typeof n=="string"?t.getTheme(n).type:void 0,x=YT({theme:n,highlighter:t});p.lineInfo=C=>({type:"context",lineIndex:C-1+l,lineNumber:C+l});const S=typeof n=="string"?{lang:g,theme:n,transformers:m,defaultColor:!1,cssVariablePrefix:En("token"),tokenizeMaxLineLength:i,tokenizeTimeLimit:0}:{lang:g,themes:n,transformers:m,defaultColor:!1,cssVariablePrefix:En("token"),tokenizeMaxLineLength:i,tokenizeTimeLimit:0},w=Pg(t.codeToHast(f?TU(d??id(e.contents),l,c):e.contents,S)),_=f?new Array(l):w;return f&&_.push(...w),{code:_,themeStyles:x,baseThemeType:v}}function TU(e,t,n){if(e.length===0)return"";const i=Math.min(t+n,e.length);return e.slice(t,i).join("")}const KT="-1,-1";function Hg(e){return e?.some(t=>t.lineNumber===0)??!1}function jg(e){const t=e[0];return t!=null&&t.length>0?t:void 0}function hf(e){return e.startingLine===0&&e.totalLines>0}function QT(e,t){return e.endsWith(`\r
|
|
203
|
-
`)?t+`\r
|
|
204
|
-
`:e.endsWith("\r")?t+"\r":e.endsWith(`
|
|
205
|
-
`)?t+`
|
|
206
|
-
`:t}function ZT(e,t){return Te({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function Ol(e){return(e.lang??Jt(e.name))==="text"}function Oc(e,t){return t.cacheKey==null?e.file===t&&e.sourceContents===t.contents:e.cacheKey===t.cacheKey}let AU=-1;var LU=class{options;onRenderUpdate;workerManager;__id=`file-renderer:${++AU}`;highlighter;renderCache;computedLang="text";lineAnnotations={};lineCache;pendingStructuralRows;textDocumentCache=new WeakMap;editSessionActive=!1;constructor(e={theme:mt},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=yl(e.theme??mt)?VT():void 0)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}setLineAnnotations(e){this.lineAnnotations={};for(const t of e){const n=this.lineAnnotations[t.lineNumber]??[];this.lineAnnotations[t.lineNumber]=n,n.push(t)}}cleanUp(){this.recycle(),this.workerManager=void 0,this.onRenderUpdate=void 0}beginEditSession(){this.editSessionActive=!0}endEditSession(){this.editSessionActive=!1}editorRenderReady(){return this.renderCache?.options.useTokenTransformer===!0&&this.renderCache.highlighted&&this.renderCache.result!=null}recycle(){this.clearRenderCache(),this.highlighter=void 0,this.workerManager?.cleanUpTasks(this),this.lineCache=void 0,this.endEditSession(),this.textDocumentCache=new WeakMap}syncEditedContentsToFile(){const{renderCache:e,lineCache:t}=this;e?.isDirty!==!0||t==null||!Oc(t,e.file)||(e.file.contents=t.lines.join(""))}hasUnkeyedFileContentsChanged(e){const{lineCache:t}=this;return e.cacheKey==null&&t!=null&&t.file===e&&t.sourceContents!==e.contents}invalidateChangedUnkeyedFile(e){this.hasUnkeyedFileContentsChanged(e)&&(this.workerManager?.cleanUpTasks(this),this.clearRenderCache(),this.lineCache=void 0,this.textDocumentCache=new WeakMap)}clearRenderCache(){this.syncEditedContentsToFile(),this.pendingStructuralRows=void 0;const e=this.renderCache;this.renderCache=void 0,e!=null&&e.isDirty===!0&&e.file.cacheKey!=null&&this.workerManager?.evictFileFromCache(e.file.cacheKey)}hydrate(e){const{options:t}=this.getRenderOptions(e),n=wm(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());let i=this.workerManager?.getFileResultCache(e);i!=null&&!Qi(t,i.options)&&(i=void 0),this.renderCache??={file:e,options:t,highlighted:!n&&!Ol(e),result:n?void 0:i?.result,renderRange:void 0},!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightFileAST(this,e):this.highlighter==null&&(this.computedLang=e.lang??Jt(e.name),this.initializeHighlighter())}getLocalHighlightTheme(){return this.workerManager?.getFileRenderOptions().theme??this.options.theme??mt}getEffectiveCodeOptions(){const e=this.workerManager?.isWorkingPool()===!0?this.workerManager.getFileRenderOptions():void 0;return{theme:this.getLocalHighlightTheme(),tokenizeMaxLineLength:e?.tokenizeMaxLineLength??this.options.tokenizeMaxLineLength}}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0){const o=this.workerManager.getFileRenderOptions();return this.editSessionActive&&o.useTokenTransformer!==!0?{...o,useTokenTransformer:!0}:o}const{tokenizeMaxLineLength:i=1e3}=this.options;return{theme:this.getLocalHighlightTheme(),useTokenTransformer:this.editSessionActive||this.options.useTokenTransformer===!0,tokenizeMaxLineLength:i}})(),{renderCache:n}=this;return n?.result==null?{options:t,forceHighlight:!0}:!Xn(e,n.file)||!Qi(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getOrCreateLineCache(e){this.invalidateChangedUnkeyedFile(e);let{lineCache:t}=this;return(t==null||!Oc(t,e))&&(t={cacheKey:e.cacheKey,file:e,sourceContents:e.contents,lines:id(e.contents)}),this.lineCache=t,t.lines}getLineCount(e){const t=this.getOrCreateLineCache(e);return this.textDocumentCache.get(e)?.lineCount??t.length}updateRenderCache(e,t,n=!1){if(this.pendingStructuralRows=void 0,this.renderCache==null)return;const{file:i,result:o}=this.renderCache;if(o==null)return;const s=n?new Map:void 0;this.pendingStructuralRows=s;const l=this.lineCache!=null&&Oc(this.lineCache,i)?this.lineCache:void 0;for(const[c,d]of e){if(s===void 0&&l!=null&&c<l.lines.length){const p=d.map(m=>m[2]).join("");l.lines[c]=QT(l.lines[c]??"",p)}const f={type:"element",tagName:"div",properties:{"data-line":c+1,"data-line-type":"context","data-line-index":c},children:d.map(([p,m,g])=>p===0&&m===""?g===""?{type:"element",tagName:"br",properties:{},children:[]}:{type:"text",value:g}:{type:"element",tagName:"span",properties:{"data-char":p,style:`color:${m};`},children:[{type:"text",value:g}]})};s!==void 0?s.set(c,f):o.code[c]=f}o.baseThemeType=t,this.renderCache.isDirty=!0}applyDocumentChange(e){const t=this.pendingStructuralRows;if(this.pendingStructuralRows=void 0,this.renderCache==null)return;const{file:n,result:i}=this.renderCache;if(i==null)return;const o=this.lineCache!=null&&Oc(this.lineCache,n)?this.lineCache.lines:id(n.contents),s=id(e.getText());if(o.length!==s.length){const l=Math.min(o.length,s.length);let c=0;for(;c<l&&o[c]===s[c];)c++;let d=0;for(;d<l-c&&o[o.length-1-d]===s[s.length-1-d];)d++;const f=i.code;i.code=new Array(s.length);for(let p=0;p<c;p++)i.code[p]=f[p];for(let p=0;p<d;p++)i.code[s.length-1-p]=f[o.length-1-p];if(t!==void 0)for(const[p,m]of t)p<s.length&&(i.code[p]=m);for(let p=c;p<s.length-d;p++)i.code[p]??={type:"element",tagName:"div",properties:{"data-line":p+1,"data-line-type":"context","data-line-index":p},children:[{type:"element",tagName:"span",properties:{"data-char":0},children:[{type:"text",value:e.getLineText(p)}]}]};for(let p=0;p<i.code.length;p++){const m=i.code[p];m?.type==="element"&&(m.properties["data-line"]=p+1,m.properties["data-line-index"]=p)}this.renderCache.isDirty=!0}this.lineCache={cacheKey:n.cacheKey,file:n,sourceContents:n.contents,lines:s},this.textDocumentCache.set(n,e)}renderFile(e=this.renderCache?.file,t=gd){if(e==null)return;this.invalidateChangedUnkeyedFile(e),this.renderCache?.isDirty===!0&&!Xn(e,this.renderCache.file)&&(this.clearRenderCache(),this.lineCache=void 0,this.textDocumentCache=new WeakMap);let{options:n,forceHighlight:i}=this.getRenderOptions(e);this.renderCache?.isDirty===!0&&!Qi(n,this.renderCache.options)&&this.clearRenderCache();const o=this.getMatchingWorkerResultCache(e,n);o!=null&&!this.hasHighlightedRenderCache(e,n)&&(this.renderCache={file:e,highlighted:!0,renderRange:void 0,...o},i=!1),this.renderCache??={file:e,highlighted:!1,options:n,result:void 0,renderRange:void 0};const s=this.getOrCreateLineCache(e),l=e.contents.length>0,c=!l||Ol(e)||wm(s.length,this.getTokenizeMaxLength()),d=!Xn(e,this.renderCache.file),f=!ff(this.renderCache.renderRange,t);if(!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0)(c||this.renderCache.result==null||!this.renderCache.highlighted&&(d||f))&&(this.renderCache.file=e,this.renderCache.options=n,this.renderCache.highlighted=!1,(this.renderCache.result==null||d||f||i)&&(this.renderCache.result=this.workerManager.getPlainFileAST(e,t.startingLine,t.totalLines,s)),this.renderCache.renderRange=t),!c&&l&&(!this.renderCache.highlighted||i)&&this.workerManager.highlightFileAST(this,e);else{this.computedLang=e.lang??Jt(e.name);const p=this.highlighter!=null&&yl(n.theme),m=this.highlighter!=null&&xd(this.computedLang),g=!c&&m;if(this.highlighter!=null&&p&&(i||c||!this.renderCache.highlighted&&g||this.renderCache.result==null)){const{result:v,options:x}=this.renderFileWithHighlighter(e,this.highlighter,c||!m);this.renderCache={file:e,options:x,highlighted:g,result:v,renderRange:void 0}}(!p||!c&&!m)&&this.asyncHighlight(e).then(({result:v,options:x})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.applyHighlightResult(e,v,x,!c)})}return this.renderCache.result!=null?this.processFileResult(this.renderCache.file,t,this.renderCache.result):void 0}async asyncRender(e,t=gd){const{result:n}=await this.asyncHighlight(e);return this.processFileResult(e,t,n)}async asyncHighlight(e){const t=wm(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??Jt(e.name);const n=this.highlighter!=null&&Ng(Rl(this.getLocalHighlightTheme())),i=t||this.highlighter!=null&&xd(this.computedLang);return(this.highlighter==null||!n||!i)&&(this.highlighter=await this.initializeHighlighter()),this.renderFileWithHighlighter(e,this.highlighter,t)}renderFileWithHighlighter(e,t,n=!1){const{options:i}=this.getRenderOptions(e);return{result:XT(e,t,i,{forcePlainText:n}),options:i}}processFileResult(e,t,{code:n,themeStyles:i,baseThemeType:o}){const s=this.getLineCount(e),{disableFileHeader:l=!1}=this.options,c=[],d=Ba(),f=Math.min(t.startingLine+t.totalLines,s);let p=0;const m=hf(t)?jg(this.lineAnnotations):void 0;m!=null&&(d.children.push(wn("context","annotation",1)),c.push(zg({hunkIndex:-1,lineIndex:-1,annotations:m.map(g=>ei(g))})),p++);for(let g=t.startingLine;g<f;g++){const v=g+1,x=n[g];if(x==null){const w="FileRenderer.processFileResult: Line doesnt exist";throw console.error(w,{name:e.name,lineIndex:g,lineNumber:v}),new Error(w)}d.children.push(gk("context",v,`${g}`)),c.push(x),p++;const S=this.lineAnnotations[v];S!=null&&(d.children.push(wn("context","annotation",1)),c.push(zg({hunkIndex:0,lineIndex:v,annotations:S.map(w=>ei(w))})),p++)}return d.properties.style=`grid-row: span ${p}`,{gutterAST:d.children??[],contentAST:c,preAST:this.createPreElement(s),headerAST:l?void 0:this.renderHeader(e),totalLines:s,rowCount:p,themeStyles:i,baseThemeType:o,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderHeader(e){const{headerRenderMode:t="default",stickyHeader:n=!1}=this.options;return FT({fileOrDiff:e,mode:t,stickyHeader:n})}renderFullHTML(e){return Zt(this.renderFullAST(e))}renderFullAST(e,t=[]){return t.push(Te({tagName:"code",children:this.renderCodeAST(e),properties:{"data-code":""}})),{...e.preAST,children:t}}renderCodeAST(e){const t=Ba();return t.children=e.gutterAST,t.properties.style=`grid-row: span ${e.rowCount}`,[t,ZT(e.contentAST,e.rowCount)]}renderPartialHTML(e,t=!1){return Zt(t?Te({tagName:"code",children:e,properties:{"data-code":""}}):e)}async initializeHighlighter(){return this.highlighter=await Dd($T(this.computedLang,{theme:this.getLocalHighlightTheme(),preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter})),this.highlighter}onHighlightSuccess(e,t,n,i=!0){this.editSessionActive||this.applyHighlightResult(e,t,n,i)}applyHighlightResult(e,t,n,i=!0){if(this.renderCache==null)return;const o=!Xn(e,this.renderCache.file)||!this.renderCache.highlighted||!Qi(n,this.renderCache.options);this.renderCache={file:e,options:n,highlighted:i,result:t,renderRange:void 0},o&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){if(this.editSessionActive)return;const n=this.workerManager?.getFileResultCache(e);if(!(n==null||!Qi(t,n.options)))return n}hasHighlightedRenderCache(e,t){const{renderCache:n}=this;return n?.result!=null&&n.highlighted&&Xn(e,n.file)&&Qi(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}createPreElement(e){const{disableLineNumbers:t=!1,overflow:n="scroll"}=this.options;return GT({type:"file",diffIndicators:"none",disableBackground:!0,disableLineNumbers:t,overflow:n,split:!1,totalLines:e})}};function wm(e,t){return e>t}const JT=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
207
|
-
<symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
|
|
208
|
-
<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"/>
|
|
209
|
-
</symbol>
|
|
210
|
-
<symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
|
|
211
|
-
<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"/>
|
|
212
|
-
</symbol>
|
|
213
|
-
<symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
|
|
214
|
-
<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"/>
|
|
215
|
-
</symbol>
|
|
216
|
-
<symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
|
|
217
|
-
<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"/>
|
|
218
|
-
</symbol>
|
|
219
|
-
<symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
|
|
220
|
-
<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"/>
|
|
221
|
-
</symbol>
|
|
222
|
-
<symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
|
|
223
|
-
<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"/>
|
|
224
|
-
</symbol>
|
|
225
|
-
<symbol id="diffs-icon-expand" viewBox="0 0 16 16">
|
|
226
|
-
<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"/>
|
|
227
|
-
</symbol>
|
|
228
|
-
<symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
|
|
229
|
-
<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"/>
|
|
230
|
-
</symbol>
|
|
231
|
-
<symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
|
|
232
|
-
<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"/>
|
|
233
|
-
</symbol>
|
|
234
|
-
<symbol id="diffs-icon-plus" viewBox="0 0 16 16">
|
|
235
|
-
<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"/>
|
|
236
|
-
</symbol>
|
|
237
|
-
<symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
|
|
238
|
-
<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"/>
|
|
239
|
-
</symbol>
|
|
240
|
-
<symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
|
|
241
|
-
<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"/>
|
|
242
|
-
</symbol>
|
|
243
|
-
<symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
|
|
244
|
-
<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"/>
|
|
245
|
-
</symbol>
|
|
246
|
-
<symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
|
|
247
|
-
<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"/>
|
|
248
|
-
</symbol>
|
|
249
|
-
<symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
|
|
250
|
-
<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"/>
|
|
251
|
-
</symbol>
|
|
252
|
-
<symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
|
|
253
|
-
<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"/>
|
|
254
|
-
</symbol>
|
|
255
|
-
<symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
|
|
256
|
-
<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"/>
|
|
257
|
-
</symbol>
|
|
258
|
-
</svg>`;function RU(e,t){return e.lineNumber===t.lineNumber&&e.metadata===t.metadata}function eA(e,t){return e==null||t==null?e===t:OU(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 FC={};function OU(e=FC,t=FC){if(e===t)return!0;const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const o of n)if(e[o]!==t[o])return!1;return!0}function tA(e){const t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}function nA(){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 iA(){const e=document.createElement("style");return e.setAttribute(M8,""),e}var DU=`@layer base {
|
|
259
|
-
:host {
|
|
260
|
-
--diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",
|
|
261
|
-
"Courier New", monospace;
|
|
262
|
-
--diffs-header-font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
|
|
263
|
-
"Noto Sans", "Liberation Sans", Arial, sans-serif;
|
|
264
|
-
--diffs-mixer: light-dark(#000, #fff);
|
|
265
|
-
--diffs-gap-fallback: 8px;
|
|
266
|
-
--diffs-scrollbar-gutter-fallback: 6px;
|
|
267
|
-
--diffs-scrollbar-gutter: var(--diffs-scrollbar-gutter-override, var(--diffs-scrollbar-gutter-measured, var(--diffs-scrollbar-gutter-fallback)));
|
|
268
|
-
--diffs-added-light: #0dbe4e;
|
|
269
|
-
--diffs-added-dark: #5ecc71;
|
|
270
|
-
--diffs-modified-light: #009fff;
|
|
271
|
-
--diffs-modified-dark: #69b1ff;
|
|
272
|
-
--diffs-deleted-light: #ff2e3f;
|
|
273
|
-
--diffs-deleted-dark: #ff6762;
|
|
274
|
-
--diffs-warning-light: #d5a910;
|
|
275
|
-
--diffs-warning-dark: #ffd452;
|
|
276
|
-
color-scheme: light dark;
|
|
277
|
-
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
278
|
-
font-size: var(--diffs-font-size, 13px);
|
|
279
|
-
line-height: var(--diffs-line-height, 20px);
|
|
280
|
-
font-feature-settings: var(--diffs-font-features);
|
|
281
|
-
--diffs-bg: light-dark(var(--diffs-light-bg, #fff), var(--diffs-dark-bg, #000));
|
|
282
|
-
--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))));
|
|
283
|
-
--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))));
|
|
284
|
-
--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))));
|
|
285
|
-
--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))));
|
|
286
|
-
--diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));
|
|
287
|
-
--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))));
|
|
288
|
-
--diffs-fg-conflict-marker: var(--diffs-fg-conflict-marker-override, var(--diffs-fg-number));
|
|
289
|
-
--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)))));
|
|
290
|
-
--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)))));
|
|
291
|
-
--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)))));
|
|
292
|
-
--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))));
|
|
293
|
-
--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)));
|
|
294
|
-
--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))));
|
|
295
|
-
--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)));
|
|
296
|
-
--diffs-selection-base: var(--diffs-modified-base);
|
|
297
|
-
--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)));
|
|
298
|
-
background-color: var(--diffs-bg);
|
|
299
|
-
color: var(--diffs-fg);
|
|
300
|
-
display: block;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
pre, code, [data-error-wrapper] {
|
|
304
|
-
isolation: isolate;
|
|
305
|
-
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
306
|
-
outline: none;
|
|
307
|
-
margin: 0;
|
|
308
|
-
padding: 0;
|
|
309
|
-
display: block;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
pre, code {
|
|
313
|
-
background-color: var(--diffs-bg);
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
code {
|
|
317
|
-
contain: content;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
input, button {
|
|
321
|
-
font-family: inherit;
|
|
322
|
-
font-size: inherit;
|
|
323
|
-
line-height: inherit;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
*, :before, :after {
|
|
327
|
-
box-sizing: border-box;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
[data-icon-sprite] {
|
|
331
|
-
display: none;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
[data-diffs-header], [data-separator] {
|
|
335
|
-
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
[data-diffs-header][data-sticky] {
|
|
339
|
-
z-index: 1;
|
|
340
|
-
background-color: var(--diffs-bg);
|
|
341
|
-
position: sticky;
|
|
342
|
-
top: 0;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
[data-file-info] {
|
|
346
|
-
color: var(--fg);
|
|
347
|
-
background-color: color-mix(in lab, var(--bg) 98%, var(--fg));
|
|
348
|
-
border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));
|
|
349
|
-
padding: 10px;
|
|
350
|
-
font-weight: 700;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
[data-diff], [data-file] {
|
|
354
|
-
--diffs-grid-number-column-width: minmax(min-content, max-content);
|
|
355
|
-
--diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;
|
|
356
|
-
|
|
357
|
-
&[data-dehydrated] {
|
|
358
|
-
--diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
&:hover [data-code]::-webkit-scrollbar-thumb {
|
|
362
|
-
background-color: var(--diffs-bg-context);
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
@supports (-webkit-touch-callout: none) {
|
|
367
|
-
:host {
|
|
368
|
-
--diffs-scrollbar-gutter-fallback: 0px;
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
[data-line] span {
|
|
373
|
-
color: light-dark(var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark)));
|
|
374
|
-
background-color: light-dark(var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit));
|
|
375
|
-
font-weight: light-dark(var(--diffs-token-light-font-weight, inherit), var(--diffs-token-dark-font-weight, inherit));
|
|
376
|
-
font-style: light-dark(var(--diffs-token-light-font-style, inherit), var(--diffs-token-dark-font-style, inherit));
|
|
377
|
-
text-decoration: light-dark(var(--diffs-token-light-text-decoration, inherit), var(--diffs-token-dark-text-decoration, inherit));
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
[data-line], [data-gutter-buffer], [data-column-number], [data-line-annotation], [data-no-newline], [data-merge-conflict], [data-merge-conflict-actions], [data-editor-overlay] {
|
|
381
|
-
--diffs-computed-decoration-bg: var(--diffs-bg);
|
|
382
|
-
--diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
|
|
383
|
-
--diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
|
|
384
|
-
--diffs-computed-editor-active-line-bg: var(--diffs-computed-selected-line-bg);
|
|
385
|
-
--diffs-computed-hovered-line-bg: var(--diffs-computed-editor-active-line-bg);
|
|
386
|
-
--diffs-hover-mix-target: var(--diffs-bg-hover-override, var(--diffs-mixer));
|
|
387
|
-
--diffs-line-bg: var(--diffs-computed-hovered-line-bg);
|
|
388
|
-
color: var(--diffs-fg);
|
|
389
|
-
background-color: var(--diffs-line-bg, var(--diffs-bg));
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
[data-line], [data-no-newline] {
|
|
393
|
-
&[data-decoration-bg] {
|
|
394
|
-
--mix-deco-light: 92%;
|
|
395
|
-
--mix-deco-dark: 85%;
|
|
396
|
-
|
|
397
|
-
&[data-decoration-bg-depth="2"] {
|
|
398
|
-
--mix-deco-light: 88%;
|
|
399
|
-
--mix-deco-dark: 80%;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
&[data-decoration-bg-depth="3"] {
|
|
403
|
-
--mix-deco-light: 85%;
|
|
404
|
-
--mix-deco-dark: 78%;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
--diffs-hover-mix-target: var(--diffs-decoration-bg);
|
|
408
|
-
--diffs-computed-decoration-bg: light-dark(color-mix(in lab,
|
|
409
|
-
var(--diffs-bg) var(--mix-deco-light),
|
|
410
|
-
var(--diffs-decoration-bg)), color-mix(in lab,
|
|
411
|
-
var(--diffs-bg) var(--mix-deco-dark),
|
|
412
|
-
var(--diffs-decoration-bg)));
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
[data-line-annotation], [data-gutter-buffer="annotation"] {
|
|
417
|
-
--diffs-annotation-bg: var(--diffs-bg-context);
|
|
418
|
-
--diffs-computed-decoration-bg: var(--diffs-annotation-bg);
|
|
419
|
-
--diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
[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"] {
|
|
423
|
-
--diffs-computed-decoration-bg: var(--diffs-bg-context);
|
|
424
|
-
--diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
[data-gutter-buffer="merge-conflict-marker-start"], [data-merge-conflict="marker-start"] {
|
|
428
|
-
--diffs-computed-decoration-bg: light-dark(color-mix(in lab,
|
|
429
|
-
var(--diffs-bg) 78%,
|
|
430
|
-
var(--conflict-bg-current-header-override, var(--diffs-addition-base))), color-mix(in lab,
|
|
431
|
-
var(--diffs-bg) 68%,
|
|
432
|
-
var(--conflict-bg-current-header-override, var(--diffs-addition-base))));
|
|
433
|
-
--diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
[data-gutter-buffer="merge-conflict-marker-end"], [data-merge-conflict="marker-end"] {
|
|
437
|
-
--diffs-computed-decoration-bg: light-dark(color-mix(in lab,
|
|
438
|
-
var(--diffs-bg) 78%,
|
|
439
|
-
var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))), color-mix(in lab,
|
|
440
|
-
var(--diffs-bg) 68%,
|
|
441
|
-
var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))));
|
|
442
|
-
--diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
[data-has-merge-conflict] [data-line-annotation], [data-has-merge-conflict] [data-gutter-buffer="annotation"] {
|
|
446
|
-
--diffs-computed-decoration-bg: var(--diffs-bg);
|
|
447
|
-
--diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
:where([data-background]) {
|
|
451
|
-
& [data-gutter-buffer], & [data-column-number] {
|
|
452
|
-
--mix-light: 91%;
|
|
453
|
-
--mix-dark: 85%;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
& [data-line], & [data-no-newline] {
|
|
457
|
-
--mix-light: 88%;
|
|
458
|
-
--mix-dark: 80%;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
& [data-gutter-buffer], & [data-column-number], & [data-line], & [data-no-newline] {
|
|
462
|
-
--diffs-diff-line-mix-target: var(--diffs-bg);
|
|
463
|
-
|
|
464
|
-
&[data-line-type="change-deletion"] {
|
|
465
|
-
--diffs-diff-line-mix-target: var(--diffs-bg-deletion-override, var(--diffs-deletion-base));
|
|
466
|
-
--diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
|
|
467
|
-
|
|
468
|
-
&:where([data-gutter-buffer], [data-column-number]) {
|
|
469
|
-
color: var(--diffs-fg-number-deletion-override, var(--diffs-deletion-base));
|
|
470
|
-
--diffs-diff-line-mix-target: var(--diffs-bg-deletion-number-override, var(--diffs-deletion-base));
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
474
|
-
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
475
|
-
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
476
|
-
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
477
|
-
var(--diffs-diff-line-mix-target)));
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
&[data-line-type="change-addition"] {
|
|
481
|
-
--diffs-diff-line-mix-target: var(--diffs-bg-addition-override, var(--diffs-addition-base));
|
|
482
|
-
--diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
|
|
483
|
-
|
|
484
|
-
&:where([data-gutter-buffer], [data-column-number]) {
|
|
485
|
-
color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
|
|
486
|
-
--diffs-diff-line-mix-target: var(--diffs-bg-addition-number-override, var(--diffs-addition-base));
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
490
|
-
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
491
|
-
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
492
|
-
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
493
|
-
var(--diffs-diff-line-mix-target)));
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
&[data-merge-conflict="current"] {
|
|
497
|
-
--diffs-diff-line-mix-target: var(--conflict-bg-current-override, var(--diffs-addition-base));
|
|
498
|
-
--diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
|
|
499
|
-
|
|
500
|
-
&:where([data-gutter-buffer], [data-column-number]) {
|
|
501
|
-
color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
|
|
502
|
-
--diffs-diff-line-mix-target: var(--conflict-bg-current-number-override, var(--diffs-addition-base));
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
506
|
-
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
507
|
-
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
508
|
-
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
509
|
-
var(--diffs-diff-line-mix-target)));
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
&[data-merge-conflict="incoming"] {
|
|
513
|
-
--diffs-diff-line-mix-target: var(--conflict-bg-incoming-override, var(--diffs-modified-base));
|
|
514
|
-
--diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
|
|
515
|
-
|
|
516
|
-
&:where([data-gutter-buffer], [data-column-number]) {
|
|
517
|
-
color: var(--diffs-modified-base);
|
|
518
|
-
--diffs-diff-line-mix-target: var(--conflict-bg-incoming-number-override, var(--diffs-modified-base));
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
522
|
-
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
523
|
-
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
524
|
-
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
525
|
-
var(--diffs-diff-line-mix-target)));
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
[data-gutter-buffer], [data-column-number], [data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline], [data-editor-overlay] {
|
|
531
|
-
--diffs-selection-mix-target: var(--diffs-bg-selection-override, var(--diffs-selection-base));
|
|
532
|
-
--diffs-selection-emphasis-mix-target: var(--diffs-selection-mix-target);
|
|
533
|
-
|
|
534
|
-
&:where([data-editor-overlay]), &:where([data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline])[data-selected-line] {
|
|
535
|
-
--mix-selection-light: 82%;
|
|
536
|
-
--mix-selection-dark: 75%;
|
|
537
|
-
--diffs-hover-mix-target: var(--diffs-selection-mix-target);
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
&:where([data-gutter-buffer][data-selected-line], [data-column-number]:is([data-selected-line], [data-editor-active-line])) {
|
|
541
|
-
--mix-selection-light: 75%;
|
|
542
|
-
--mix-selection-dark: 60%;
|
|
543
|
-
--diffs-selection-mix-target: var(--diffs-bg-selection-number-override, var(--diffs-selection-base));
|
|
544
|
-
--diffs-hover-mix-target: var(--diffs-selection-mix-target);
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
&:where([data-line][data-selected-line]):is([data-line-type="change-addition"], [data-line-type="change-deletion"]) {
|
|
548
|
-
--diffs-selection-emphasis-mix-target: light-dark(color-mix(in lab,
|
|
549
|
-
var(--diffs-diff-line-mix-target, var(--diffs-selection-mix-target))
|
|
550
|
-
var(--mix-selection-light),
|
|
551
|
-
var(--diffs-selection-mix-target)), var(--diffs-selection-mix-target));
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
&:where([data-editor-overlay]), &[data-selected-line] {
|
|
555
|
-
--diffs-computed-selected-line-bg: light-dark(color-mix(in lab,
|
|
556
|
-
var(--diffs-computed-diff-line-bg) var(--mix-selection-light),
|
|
557
|
-
var(--diffs-selection-mix-target)), color-mix(in lab,
|
|
558
|
-
var(--diffs-computed-diff-line-bg) var(--mix-selection-dark),
|
|
559
|
-
var(--diffs-selection-mix-target)));
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
[data-line][data-editor-active-line], [data-column-number][data-editor-active-line] {
|
|
564
|
-
--diffs-computed-editor-active-line-bg: color-mix(in lab,
|
|
565
|
-
var(--diffs-computed-selected-line-bg)
|
|
566
|
-
var(--diffs-editor-active-line-source-mix, 100%),
|
|
567
|
-
var(--diffs-selection-emphasis-mix-target));
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
@media (pointer: fine) {
|
|
571
|
-
[data-line][data-hovered], [data-gutter-buffer][data-hovered], [data-column-number][data-hovered], [data-line-annotation][data-hovered], [data-no-newline][data-hovered], [data-merge-conflict][data-hovered], [data-merge-conflict-actions][data-hovered], [data-editor-overlay][data-hovered] {
|
|
572
|
-
--diffs-computed-hovered-line-bg: light-dark(color-mix(in lab,
|
|
573
|
-
var(--diffs-computed-editor-active-line-bg) 97%,
|
|
574
|
-
var(--diffs-hover-mix-target)), color-mix(in lab,
|
|
575
|
-
var(--diffs-computed-editor-active-line-bg) 91%,
|
|
576
|
-
var(--diffs-hover-mix-target)));
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
[data-gutter-buffer][data-selected-line], [data-column-number]:is([data-selected-line], [data-editor-active-line]) {
|
|
581
|
-
color: var(--diffs-selection-number-fg);
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
[data-no-newline] {
|
|
585
|
-
user-select: none;
|
|
586
|
-
|
|
587
|
-
& span {
|
|
588
|
-
opacity: .6;
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
[data-diff-type="split"][data-overflow="scroll"] {
|
|
593
|
-
grid-template-columns: 1fr 1fr;
|
|
594
|
-
display: grid;
|
|
595
|
-
|
|
596
|
-
& [data-additions] {
|
|
597
|
-
border-left: 1px solid var(--diffs-bg);
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
& [data-deletions] {
|
|
601
|
-
border-right: 1px solid var(--diffs-bg);
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
[data-code] {
|
|
606
|
-
grid-auto-flow: dense;
|
|
607
|
-
grid-template-columns: var(--diffs-code-grid);
|
|
608
|
-
overflow: var(--diffs-overflow-override, scroll) clip;
|
|
609
|
-
overscroll-behavior-x: none;
|
|
610
|
-
tab-size: var(--diffs-tab-size, 2);
|
|
611
|
-
padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
612
|
-
padding-bottom: max(0px,
|
|
613
|
-
calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) -
|
|
614
|
-
var(--diffs-scrollbar-gutter)));
|
|
615
|
-
scrollbar-gutter: stable;
|
|
616
|
-
align-self: flex-start;
|
|
617
|
-
display: grid;
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
[data-diffs-scrollbar-measure] {
|
|
621
|
-
opacity: 0;
|
|
622
|
-
pointer-events: none;
|
|
623
|
-
scrollbar-gutter: auto;
|
|
624
|
-
grid-template-columns: none;
|
|
625
|
-
width: 100px;
|
|
626
|
-
height: 100px;
|
|
627
|
-
padding: 0;
|
|
628
|
-
position: absolute;
|
|
629
|
-
top: -200px;
|
|
630
|
-
left: -200px;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
[data-container-size] {
|
|
634
|
-
container-type: inline-size;
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
[data-code]::-webkit-scrollbar {
|
|
638
|
-
width: 0;
|
|
639
|
-
height: var(--diffs-scrollbar-gutter);
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
[data-code]::-webkit-scrollbar-track {
|
|
643
|
-
background: none;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
[data-code]::-webkit-scrollbar-thumb {
|
|
647
|
-
background-color: #0000;
|
|
648
|
-
background-clip: content-box;
|
|
649
|
-
border: 1px solid #0000;
|
|
650
|
-
border-radius: 3px;
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
[data-code]::-webkit-scrollbar-corner {
|
|
654
|
-
background-color: #0000;
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
@supports ((-moz-appearance: none)) {
|
|
658
|
-
[data-code] {
|
|
659
|
-
scrollbar-width: thin;
|
|
660
|
-
scrollbar-color: var(--diffs-bg-context) transparent;
|
|
661
|
-
padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
[data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] {
|
|
666
|
-
& [data-code], &[data-overflow="wrap"], &[data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {
|
|
667
|
-
padding-top: 0;
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
[data-gutter] {
|
|
672
|
-
grid-template-rows: subgrid;
|
|
673
|
-
grid-template-columns: subgrid;
|
|
674
|
-
z-index: 3;
|
|
675
|
-
background-color: var(--diffs-bg);
|
|
676
|
-
grid-column: 1;
|
|
677
|
-
display: grid;
|
|
678
|
-
position: relative;
|
|
679
|
-
|
|
680
|
-
& [data-gutter-buffer], & [data-column-number] {
|
|
681
|
-
border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
[data-content] {
|
|
686
|
-
grid-template-rows: subgrid;
|
|
687
|
-
grid-template-columns: subgrid;
|
|
688
|
-
background-color: var(--diffs-bg);
|
|
689
|
-
grid-column: 2;
|
|
690
|
-
min-width: 0;
|
|
691
|
-
display: grid;
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
[data-diff-type="split"][data-overflow="wrap"], [data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {
|
|
695
|
-
grid-auto-flow: dense;
|
|
696
|
-
grid-template-columns: repeat(2, var(--diffs-code-grid));
|
|
697
|
-
padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
698
|
-
display: grid;
|
|
699
|
-
|
|
700
|
-
& [data-code] {
|
|
701
|
-
display: contents;
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
& [data-deletions] {
|
|
705
|
-
& [data-gutter] {
|
|
706
|
-
grid-column: 1;
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
& [data-content] {
|
|
710
|
-
border-right: 1px solid var(--diffs-bg);
|
|
711
|
-
grid-column: 2;
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
& [data-additions] {
|
|
716
|
-
& [data-gutter] {
|
|
717
|
-
border-left: 1px solid var(--diffs-bg);
|
|
718
|
-
grid-column: 3;
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
& [data-content] {
|
|
722
|
-
grid-column: 4;
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
[data-dehydrated][data-diff-type="split"][data-overflow="scroll"] [data-content] {
|
|
728
|
-
overflow: clip;
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
[data-overflow="scroll"] [data-gutter] {
|
|
732
|
-
position: sticky;
|
|
733
|
-
left: 0;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
[data-interactive-lines] [data-line] {
|
|
737
|
-
cursor: pointer;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
[data-interactive-line-numbers] [data-column-number] {
|
|
741
|
-
cursor: pointer;
|
|
742
|
-
touch-action: none;
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
[data-content-buffer], [data-gutter-buffer] {
|
|
746
|
-
user-select: none;
|
|
747
|
-
min-height: 1lh;
|
|
748
|
-
position: relative;
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
[data-gutter-buffer] {
|
|
752
|
-
padding-left: 2ch;
|
|
753
|
-
padding-right: 1ch;
|
|
754
|
-
|
|
755
|
-
&:before {
|
|
756
|
-
content: "";
|
|
757
|
-
min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
|
|
758
|
-
display: block;
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
[data-gutter-buffer="annotation"] {
|
|
763
|
-
--diffs-annotation-bg: var(--diffs-bg-context-gutter);
|
|
764
|
-
min-height: 0;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
[data-gutter-buffer="buffer"] {
|
|
768
|
-
--diffs-line-bg: var(--diffs-bg-context-gutter);
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
[data-content-buffer] {
|
|
772
|
-
background-position: 5px 0;
|
|
773
|
-
background-size: 8px 8px;
|
|
774
|
-
background-origin: border-box;
|
|
775
|
-
background-image: repeating-linear-gradient(-45deg,
|
|
776
|
-
transparent,
|
|
777
|
-
transparent calc(3px * 1.414),
|
|
778
|
-
var(--diffs-bg-buffer) calc(3px * 1.414),
|
|
779
|
-
var(--diffs-bg-buffer) calc(4px * 1.414));
|
|
780
|
-
grid-column: 1;
|
|
781
|
-
}
|
|
782
|
-
|
|
783
|
-
[data-separator] {
|
|
784
|
-
box-sizing: content-box;
|
|
785
|
-
background-color: var(--diffs-bg);
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
[data-separator="simple"] {
|
|
789
|
-
min-height: 4px;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
[data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"], [data-separator="simple"] {
|
|
793
|
-
background-color: var(--diffs-bg-separator);
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
[data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"] {
|
|
797
|
-
height: 32px;
|
|
798
|
-
position: relative;
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
[data-separator-wrapper] {
|
|
802
|
-
user-select: none;
|
|
803
|
-
fill: currentColor;
|
|
804
|
-
background-color: var(--diffs-bg);
|
|
805
|
-
align-items: center;
|
|
806
|
-
height: 100%;
|
|
807
|
-
display: flex;
|
|
808
|
-
position: absolute;
|
|
809
|
-
inset-inline: 0;
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
[data-content] [data-separator-wrapper] {
|
|
813
|
-
display: none;
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
[data-separator="metadata"] [data-separator-wrapper] {
|
|
817
|
-
background-color: var(--diffs-bg-separator);
|
|
818
|
-
height: 100%;
|
|
819
|
-
color: var(--diffs-fg-number);
|
|
820
|
-
white-space: nowrap;
|
|
821
|
-
text-overflow: ellipsis;
|
|
822
|
-
min-width: min-content;
|
|
823
|
-
padding-inline: 1ch;
|
|
824
|
-
inset-inline: 100% auto;
|
|
825
|
-
overflow: hidden;
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
[data-separator="line-info"] {
|
|
829
|
-
margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
830
|
-
|
|
831
|
-
& [data-separator-wrapper] {
|
|
832
|
-
min-width: 16px;
|
|
833
|
-
}
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
[data-separator="line-info-basic"], [data-separator="metadata"] {
|
|
837
|
-
margin-block: 0;
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
[data-separator="line-info"][data-separator-first] {
|
|
841
|
-
margin-top: 0;
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
[data-separator="line-info"][data-separator-last] {
|
|
845
|
-
margin-bottom: 0;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
[data-expand-index] [data-separator-wrapper] {
|
|
849
|
-
grid-template-columns: 32px auto;
|
|
850
|
-
display: grid;
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
[data-expand-index] [data-separator-wrapper][data-separator-multi-button] {
|
|
854
|
-
grid-template-columns: 32px 32px auto;
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
[data-expand-button], [data-separator-content] {
|
|
858
|
-
background-color: var(--diffs-bg-separator);
|
|
859
|
-
flex: none;
|
|
860
|
-
align-items: center;
|
|
861
|
-
display: flex;
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
[data-expand-index] [data-separator-content]:hover {
|
|
865
|
-
cursor: pointer;
|
|
866
|
-
text-decoration: underline;
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
[data-expand-button] {
|
|
870
|
-
cursor: pointer;
|
|
871
|
-
min-width: 32px;
|
|
872
|
-
color: var(--diffs-fg-number);
|
|
873
|
-
border-right: 2px solid var(--diffs-bg);
|
|
874
|
-
flex-shrink: 0;
|
|
875
|
-
justify-content: center;
|
|
876
|
-
align-self: stretch;
|
|
877
|
-
|
|
878
|
-
&:hover {
|
|
879
|
-
color: var(--diffs-fg);
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
&[data-expand-all-button] {
|
|
883
|
-
display: none;
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
[data-expand-down] [data-icon] {
|
|
888
|
-
transform: scaleY(-1);
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
[data-separator-content] {
|
|
892
|
-
height: 100%;
|
|
893
|
-
color: var(--diffs-fg-number);
|
|
894
|
-
flex: auto;
|
|
895
|
-
justify-content: flex-start;
|
|
896
|
-
padding: 0 1ch;
|
|
897
|
-
overflow: hidden;
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
[data-separator="line-info"], [data-separator="line-info-basic"] {
|
|
901
|
-
& [data-separator-content] {
|
|
902
|
-
user-select: none;
|
|
903
|
-
height: 100%;
|
|
904
|
-
overflow: clip;
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
[data-unmodified-lines] {
|
|
909
|
-
text-overflow: ellipsis;
|
|
910
|
-
white-space: nowrap;
|
|
911
|
-
flex: 0 auto;
|
|
912
|
-
min-width: 0;
|
|
913
|
-
display: block;
|
|
914
|
-
overflow: hidden;
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
@supports (width: 1cqi) {
|
|
918
|
-
[data-unified] {
|
|
919
|
-
& [data-separator="line-info"] [data-separator-wrapper] {
|
|
920
|
-
padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
921
|
-
width: 100cqi;
|
|
922
|
-
|
|
923
|
-
& [data-separator-content] {
|
|
924
|
-
border-radius: 6px;
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
& [data-separator="line-info"][data-expand-index] [data-separator-wrapper] [data-separator-content] {
|
|
929
|
-
border-top-left-radius: unset;
|
|
930
|
-
border-bottom-left-radius: unset;
|
|
931
|
-
}
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
[data-gutter] {
|
|
935
|
-
& [data-separator="line-info"] [data-separator-wrapper] {
|
|
936
|
-
padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
& [data-separator="line-info"] [data-separator-content] {
|
|
940
|
-
border-top-left-radius: 6px;
|
|
941
|
-
border-bottom-left-radius: 6px;
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
& [data-separator="line-info"][data-expand-index] [data-separator-content] {
|
|
945
|
-
border-top-left-radius: unset;
|
|
946
|
-
border-bottom-left-radius: unset;
|
|
947
|
-
}
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
[data-additions] {
|
|
951
|
-
& [data-content] [data-separator="line-info"] {
|
|
952
|
-
background-color: var(--diffs-bg);
|
|
953
|
-
|
|
954
|
-
& [data-separator-wrapper] {
|
|
955
|
-
display: none;
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
& [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
|
|
960
|
-
background-color: var(--diffs-bg-separator);
|
|
961
|
-
border-top-right-radius: 6px;
|
|
962
|
-
border-bottom-right-radius: 6px;
|
|
963
|
-
height: 100%;
|
|
964
|
-
display: block;
|
|
965
|
-
|
|
966
|
-
& [data-separator-content], & [data-expand-button] {
|
|
967
|
-
display: none;
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
[data-overflow="scroll"] [data-additions] [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
|
|
973
|
-
width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));
|
|
974
|
-
}
|
|
975
|
-
|
|
976
|
-
[data-overflow="wrap"] [data-additions] [data-content] [data-separator="line-info"] [data-separator-wrapper] {
|
|
977
|
-
background-color: var(--diffs-bg-separator);
|
|
978
|
-
height: 100%;
|
|
979
|
-
margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
980
|
-
border-top-right-radius: 6px;
|
|
981
|
-
border-bottom-right-radius: 6px;
|
|
982
|
-
display: block;
|
|
983
|
-
|
|
984
|
-
& [data-separator-content], & [data-expand-button] {
|
|
985
|
-
display: none;
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
[data-separator="line-info"] [data-separator-wrapper] {
|
|
990
|
-
& [data-expand-both], & [data-expand-down], & [data-expand-up] {
|
|
991
|
-
border-top-left-radius: 6px;
|
|
992
|
-
border-bottom-left-radius: 6px;
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
@media (pointer: fine) {
|
|
997
|
-
[data-separator="line-info"] [data-separator-wrapper] {
|
|
998
|
-
&[data-separator-multi-button] {
|
|
999
|
-
& [data-expand-up] {
|
|
1000
|
-
border-top-left-radius: 6px;
|
|
1001
|
-
border-bottom-left-radius: unset;
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
& [data-expand-down] {
|
|
1005
|
-
border-bottom-left-radius: 6px;
|
|
1006
|
-
border-top-left-radius: unset;
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
@media (pointer: coarse) {
|
|
1014
|
-
[data-separator="line-info-basic"] [data-separator-wrapper][data-separator-multi-button] {
|
|
1015
|
-
grid-template-columns: 34px 34px auto;
|
|
1016
|
-
|
|
1017
|
-
& [data-separator-content] {
|
|
1018
|
-
grid-column: unset;
|
|
1019
|
-
grid-row: unset;
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
|
-
@supports (width: 1cqi) {
|
|
1024
|
-
[data-separator="line-info"] [data-separator-wrapper] {
|
|
1025
|
-
& [data-expand-both], & [data-expand-down], & [data-expand-up] {
|
|
1026
|
-
border-top-left-radius: 6px;
|
|
1027
|
-
border-bottom-left-radius: 6px;
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
&[data-separator-multi-button] {
|
|
1031
|
-
& [data-expand-up] {
|
|
1032
|
-
border-top-left-radius: 6px;
|
|
1033
|
-
border-bottom-left-radius: 6px;
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
& [data-expand-down] {
|
|
1037
|
-
border-bottom-left-radius: unset;
|
|
1038
|
-
border-top-left-radius: unset;
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
}
|
|
1042
|
-
}
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
@media (pointer: fine) {
|
|
1046
|
-
[data-separator-wrapper][data-separator-multi-button] {
|
|
1047
|
-
grid-template-rows: 50% 50%;
|
|
1048
|
-
display: grid;
|
|
1049
|
-
|
|
1050
|
-
& [data-separator-content] {
|
|
1051
|
-
grid-area: 1 / 2 / -1;
|
|
1052
|
-
min-width: min-content;
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
& [data-expand-button] {
|
|
1056
|
-
grid-column: 1;
|
|
1057
|
-
}
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
|
-
[data-separator="line-info"] [data-separator-wrapper], [data-separator="line-info"] [data-separator-wrapper][data-separator-multi-button] {
|
|
1061
|
-
grid-template-columns: 34px auto;
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
[data-separator="line-info-basic"][data-expand-index] [data-separator-wrapper] {
|
|
1065
|
-
grid-template-columns: 100% auto;
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
[data-separator="line-info"], [data-separator="line-info-basic"] {
|
|
1069
|
-
& [data-separator-multi-button] {
|
|
1070
|
-
& [data-expand-up] {
|
|
1071
|
-
border-bottom: 1px solid var(--diffs-bg);
|
|
1072
|
-
border-right: 2px solid var(--diffs-bg);
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
& [data-expand-down] {
|
|
1076
|
-
border-top: 1px solid var(--diffs-bg);
|
|
1077
|
-
border-right: 2px solid var(--diffs-bg);
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
}
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
[data-additions] [data-gutter] [data-separator-wrapper], [data-additions] [data-separator="line-info-basic"] [data-separator-wrapper], [data-content] [data-separator-wrapper] {
|
|
1084
|
-
display: none;
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
[data-line-annotation] {
|
|
1088
|
-
min-height: var(--diffs-annotation-min-height, 0);
|
|
1089
|
-
z-index: 2;
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
[data-merge-conflict-actions] {
|
|
1093
|
-
z-index: 2;
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
[data-separator="custom"] {
|
|
1097
|
-
grid-template-columns: subgrid;
|
|
1098
|
-
display: grid;
|
|
1099
|
-
}
|
|
1100
|
-
|
|
1101
|
-
[data-line], [data-column-number], [data-no-newline] {
|
|
1102
|
-
padding-inline: 1ch;
|
|
1103
|
-
position: relative;
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
[data-indicators="classic"] [data-line] {
|
|
1107
|
-
padding-inline-start: 2ch;
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
[data-indicators="classic"] {
|
|
1111
|
-
& [data-line-type="change-addition"], & [data-line-type="change-deletion"] {
|
|
1112
|
-
&[data-no-newline], &[data-line] {
|
|
1113
|
-
&:before {
|
|
1114
|
-
user-select: none;
|
|
1115
|
-
width: 1ch;
|
|
1116
|
-
height: 1lh;
|
|
1117
|
-
display: inline-block;
|
|
1118
|
-
position: absolute;
|
|
1119
|
-
top: 0;
|
|
1120
|
-
left: 0;
|
|
1121
|
-
}
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
& [data-line-type="change-addition"] {
|
|
1126
|
-
&[data-line], &[data-no-newline] {
|
|
1127
|
-
&:before {
|
|
1128
|
-
content: "+";
|
|
1129
|
-
color: var(--diffs-addition-base);
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
& [data-line-type="change-deletion"] {
|
|
1135
|
-
&[data-line], &[data-no-newline] {
|
|
1136
|
-
&:before {
|
|
1137
|
-
content: "-";
|
|
1138
|
-
color: var(--diffs-deletion-base);
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
[data-indicators="bars"] {
|
|
1145
|
-
& [data-line-type="change-deletion"], & [data-line-type="change-addition"] {
|
|
1146
|
-
&[data-column-number] {
|
|
1147
|
-
&:before {
|
|
1148
|
-
content: "";
|
|
1149
|
-
user-select: none;
|
|
1150
|
-
contain: strict;
|
|
1151
|
-
width: 4px;
|
|
1152
|
-
height: 100%;
|
|
1153
|
-
display: block;
|
|
1154
|
-
position: absolute;
|
|
1155
|
-
top: 0;
|
|
1156
|
-
left: 0;
|
|
1157
|
-
}
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
& [data-line-type="change-deletion"] {
|
|
1162
|
-
&[data-column-number] {
|
|
1163
|
-
&:before {
|
|
1164
|
-
background-image: linear-gradient(0deg,
|
|
1165
|
-
var(--diffs-bg-deletion) 50%,
|
|
1166
|
-
var(--diffs-deletion-base) 50%);
|
|
1167
|
-
background-repeat: repeat;
|
|
1168
|
-
background-size: 2px 2px;
|
|
1169
|
-
background-size: calc(1lh / round(1lh / 2px))
|
|
1170
|
-
calc(1lh / round(1lh / 2px));
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
& [data-line-type="change-addition"] {
|
|
1176
|
-
&[data-column-number] {
|
|
1177
|
-
&:before {
|
|
1178
|
-
background-color: var(--diffs-addition-base);
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
[data-overflow="wrap"] {
|
|
1185
|
-
& [data-line] {
|
|
1186
|
-
white-space: pre-wrap;
|
|
1187
|
-
word-break: break-word;
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
& [data-annotation-content] {
|
|
1191
|
-
word-break: break-word;
|
|
1192
|
-
}
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
[data-overflow="scroll"] [data-line] {
|
|
1196
|
-
white-space: pre;
|
|
1197
|
-
min-height: 1lh;
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
[data-column-number] {
|
|
1201
|
-
box-sizing: content-box;
|
|
1202
|
-
text-align: right;
|
|
1203
|
-
user-select: none;
|
|
1204
|
-
color: var(--diffs-fg-number);
|
|
1205
|
-
padding-left: 2ch;
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
[data-line-number-content] {
|
|
1209
|
-
min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
|
|
1210
|
-
z-index: 1;
|
|
1211
|
-
display: inline-block;
|
|
1212
|
-
position: relative;
|
|
1213
|
-
}
|
|
1214
|
-
|
|
1215
|
-
[data-disable-line-numbers] {
|
|
1216
|
-
& [data-gutter-buffer], & [data-column-number] {
|
|
1217
|
-
min-width: 4px;
|
|
1218
|
-
padding: 0;
|
|
1219
|
-
|
|
1220
|
-
&:before {
|
|
1221
|
-
min-width: 0;
|
|
1222
|
-
}
|
|
1223
|
-
}
|
|
1224
|
-
|
|
1225
|
-
& [data-line-number-content] {
|
|
1226
|
-
display: none;
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
& [data-gutter-utility-slot] {
|
|
1230
|
-
right: unset;
|
|
1231
|
-
justify-content: flex-start;
|
|
1232
|
-
left: 0;
|
|
1233
|
-
}
|
|
1234
|
-
|
|
1235
|
-
&[data-indicators="bars"] [data-gutter-utility-slot] {
|
|
1236
|
-
left: 6px;
|
|
1237
|
-
}
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1240
|
-
[data-file][data-disable-line-numbers] {
|
|
1241
|
-
& [data-gutter-buffer], & [data-column-number] {
|
|
1242
|
-
border-right: 0;
|
|
1243
|
-
min-width: 0;
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
[data-diff-span] {
|
|
1248
|
-
box-decoration-break: clone;
|
|
1249
|
-
border-radius: 3px;
|
|
1250
|
-
}
|
|
1251
|
-
|
|
1252
|
-
[data-line-type="change-addition"] [data-diff-span] {
|
|
1253
|
-
background-color: var(--diffs-bg-addition-emphasis);
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
[data-line-type="change-deletion"] [data-diff-span] {
|
|
1257
|
-
background-color: var(--diffs-bg-deletion-emphasis);
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
[data-merge-conflict="marker-start"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"], [data-merge-conflict="marker-end"] {
|
|
1261
|
-
color: var(--diffs-fg);
|
|
1262
|
-
padding-left: 1ch;
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
[data-merge-conflict="marker-start"], [data-merge-conflict="marker-end"] {
|
|
1266
|
-
align-items: center;
|
|
1267
|
-
display: flex;
|
|
1268
|
-
|
|
1269
|
-
&:after {
|
|
1270
|
-
color: var(--diffs-fg-conflict-marker);
|
|
1271
|
-
font-size: .75rem;
|
|
1272
|
-
font-style: normal;
|
|
1273
|
-
line-height: 1.25rem;
|
|
1274
|
-
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
1275
|
-
padding-left: 1ch;
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
|
|
1279
|
-
[data-merge-conflict="marker-start"]:after {
|
|
1280
|
-
content: "(Current Change)";
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
|
-
[data-merge-conflict="marker-end"]:after {
|
|
1284
|
-
content: "(Incoming Change)";
|
|
1285
|
-
}
|
|
1286
|
-
|
|
1287
|
-
[data-merge-conflict-actions-content] {
|
|
1288
|
-
min-height: 1.75rem;
|
|
1289
|
-
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
1290
|
-
color: var(--diffs-fg);
|
|
1291
|
-
align-items: center;
|
|
1292
|
-
gap: .25rem;
|
|
1293
|
-
padding-inline: .5rem;
|
|
1294
|
-
font-size: .75rem;
|
|
1295
|
-
line-height: 1.2;
|
|
1296
|
-
display: flex;
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
|
-
[data-merge-conflict-action] {
|
|
1300
|
-
appearance: none;
|
|
1301
|
-
color: var(--diffs-fg-number);
|
|
1302
|
-
font: inherit;
|
|
1303
|
-
cursor: pointer;
|
|
1304
|
-
background: none;
|
|
1305
|
-
border: 0;
|
|
1306
|
-
padding: 0;
|
|
1307
|
-
font-style: normal;
|
|
1308
|
-
}
|
|
1309
|
-
|
|
1310
|
-
[data-merge-conflict-action]:hover {
|
|
1311
|
-
color: var(--diffs-fg);
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
[data-merge-conflict-action="current"]:hover {
|
|
1315
|
-
color: var(--diffs-addition-base);
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
[data-merge-conflict-action="incoming"]:hover {
|
|
1319
|
-
color: var(--diffs-modified-base);
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
[data-merge-conflict-action-separator] {
|
|
1323
|
-
color: var(--diffs-fg-number);
|
|
1324
|
-
opacity: .6;
|
|
1325
|
-
user-select: none;
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
[data-diffs-header="default"] {
|
|
1329
|
-
background-color: var(--diffs-bg);
|
|
1330
|
-
justify-content: space-between;
|
|
1331
|
-
align-items: center;
|
|
1332
|
-
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1333
|
-
min-height: calc(1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3));
|
|
1334
|
-
z-index: 2;
|
|
1335
|
-
flex-direction: row;
|
|
1336
|
-
padding-inline: 16px;
|
|
1337
|
-
display: flex;
|
|
1338
|
-
position: relative;
|
|
1339
|
-
top: 0;
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
[data-header-content] {
|
|
1343
|
-
align-items: center;
|
|
1344
|
-
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1345
|
-
white-space: nowrap;
|
|
1346
|
-
flex-direction: row;
|
|
1347
|
-
min-width: 0;
|
|
1348
|
-
display: flex;
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
[data-header-content] [data-prev-name], [data-header-content] [data-title] {
|
|
1352
|
-
text-overflow: ellipsis;
|
|
1353
|
-
white-space: nowrap;
|
|
1354
|
-
direction: rtl;
|
|
1355
|
-
min-width: 0;
|
|
1356
|
-
overflow: hidden;
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
[data-prev-name] {
|
|
1360
|
-
opacity: .7;
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
[data-rename-icon] {
|
|
1364
|
-
fill: currentColor;
|
|
1365
|
-
flex-grow: 0;
|
|
1366
|
-
flex-shrink: 0;
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
[data-diffs-header="default"] [data-metadata] {
|
|
1370
|
-
white-space: nowrap;
|
|
1371
|
-
align-items: center;
|
|
1372
|
-
gap: 1ch;
|
|
1373
|
-
display: flex;
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
[data-diffs-header="default"] [data-additions-count] {
|
|
1377
|
-
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1378
|
-
color: var(--diffs-addition-base);
|
|
1379
|
-
}
|
|
1380
|
-
|
|
1381
|
-
[data-diffs-header="default"] [data-deletions-count] {
|
|
1382
|
-
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1383
|
-
color: var(--diffs-deletion-base);
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
[data-change-icon] {
|
|
1387
|
-
fill: currentColor;
|
|
1388
|
-
flex-shrink: 0;
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1391
|
-
[data-change-icon="change"], [data-change-icon="rename-pure"], [data-change-icon="rename-changed"] {
|
|
1392
|
-
color: var(--diffs-modified-base);
|
|
1393
|
-
}
|
|
1394
|
-
|
|
1395
|
-
[data-change-icon="new"] {
|
|
1396
|
-
color: var(--diffs-addition-base);
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
[data-change-icon="deleted"] {
|
|
1400
|
-
color: var(--diffs-deletion-base);
|
|
1401
|
-
}
|
|
1402
|
-
|
|
1403
|
-
[data-change-icon="file"] {
|
|
1404
|
-
opacity: .6;
|
|
1405
|
-
}
|
|
1406
|
-
|
|
1407
|
-
[data-annotation-content] {
|
|
1408
|
-
z-index: 2;
|
|
1409
|
-
isolation: isolate;
|
|
1410
|
-
white-space: normal;
|
|
1411
|
-
align-self: flex-start;
|
|
1412
|
-
min-width: 0;
|
|
1413
|
-
display: flow-root;
|
|
1414
|
-
position: relative;
|
|
1415
|
-
}
|
|
1416
|
-
|
|
1417
|
-
[data-overflow="scroll"] [data-annotation-content], [data-overflow="scroll"] [data-merge-conflict-actions-content] {
|
|
1418
|
-
width: var(--diffs-column-content-width, auto);
|
|
1419
|
-
left: var(--diffs-column-number-width, 0);
|
|
1420
|
-
position: sticky;
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
[data-annotation-slot] {
|
|
1424
|
-
text-wrap-mode: wrap;
|
|
1425
|
-
word-break: normal;
|
|
1426
|
-
white-space-collapse: collapse;
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
[data-gutter-utility-slot] {
|
|
1430
|
-
touch-action: none;
|
|
1431
|
-
justify-content: flex-end;
|
|
1432
|
-
display: flex;
|
|
1433
|
-
position: absolute;
|
|
1434
|
-
top: 0;
|
|
1435
|
-
bottom: 0;
|
|
1436
|
-
right: 0;
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
|
-
[data-utility-button] {
|
|
1440
|
-
appearance: none;
|
|
1441
|
-
cursor: pointer;
|
|
1442
|
-
width: 1lh;
|
|
1443
|
-
height: 1lh;
|
|
1444
|
-
font-size: var(--diffs-font-size, 13px);
|
|
1445
|
-
line-height: var(--diffs-line-height, 20px);
|
|
1446
|
-
background-color: var(--diffs-modified-base);
|
|
1447
|
-
color: var(--diffs-bg);
|
|
1448
|
-
fill: currentColor;
|
|
1449
|
-
z-index: 4;
|
|
1450
|
-
touch-action: none;
|
|
1451
|
-
border: none;
|
|
1452
|
-
border-radius: 4px;
|
|
1453
|
-
justify-content: center;
|
|
1454
|
-
align-items: center;
|
|
1455
|
-
margin-right: calc(-1lh + 1ch);
|
|
1456
|
-
padding: 0;
|
|
1457
|
-
display: flex;
|
|
1458
|
-
position: relative;
|
|
1459
|
-
|
|
1460
|
-
&:before {
|
|
1461
|
-
content: "";
|
|
1462
|
-
display: block;
|
|
1463
|
-
position: absolute;
|
|
1464
|
-
inset: 0 0 0 -4px;
|
|
1465
|
-
}
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
[data-decoration-bar-stack] {
|
|
1469
|
-
pointer-events: none;
|
|
1470
|
-
isolation: isolate;
|
|
1471
|
-
z-index: 1;
|
|
1472
|
-
background-color: var(--diffs-decoration-bar-color, transparent);
|
|
1473
|
-
box-sizing: content-box;
|
|
1474
|
-
border-left: 2px solid var(--diffs-bg);
|
|
1475
|
-
border-right: 2px solid var(--diffs-bg);
|
|
1476
|
-
width: 6px;
|
|
1477
|
-
position: absolute;
|
|
1478
|
-
top: 0;
|
|
1479
|
-
bottom: 0;
|
|
1480
|
-
right: -2px;
|
|
1481
|
-
|
|
1482
|
-
[data-decoration-bar-depth="1"] & {
|
|
1483
|
-
background-color: color-mix(in lab,
|
|
1484
|
-
var(--diffs-bg) 20%,
|
|
1485
|
-
var(--diffs-decoration-bar-color, transparent));
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
[data-decoration-bar-depth="2"] & {
|
|
1489
|
-
background-color: color-mix(in lab,
|
|
1490
|
-
var(--diffs-bg) 45%,
|
|
1491
|
-
var(--diffs-decoration-bar-color, transparent));
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
|
-
[data-decoration-bar-depth="3"] & {
|
|
1495
|
-
background-color: color-mix(in lab,
|
|
1496
|
-
var(--diffs-bg) 65%,
|
|
1497
|
-
var(--diffs-decoration-bar-color, transparent));
|
|
1498
|
-
}
|
|
1499
|
-
|
|
1500
|
-
[data-decoration-bar-start] & {
|
|
1501
|
-
border-top-left-radius: 5px;
|
|
1502
|
-
border-top-right-radius: 5px;
|
|
1503
|
-
}
|
|
1504
|
-
|
|
1505
|
-
[data-decoration-bar-end] & {
|
|
1506
|
-
z-index: 3;
|
|
1507
|
-
border-bottom-right-radius: 5px;
|
|
1508
|
-
border-bottom-left-radius: 5px;
|
|
1509
|
-
}
|
|
1510
|
-
}
|
|
1511
|
-
|
|
1512
|
-
[data-placeholder] {
|
|
1513
|
-
contain: strict;
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
[data-error-wrapper] {
|
|
1517
|
-
padding: var(--diffs-gap-block, var(--diffs-gap-fallback))
|
|
1518
|
-
var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1519
|
-
scrollbar-width: none;
|
|
1520
|
-
max-height: 400px;
|
|
1521
|
-
overflow: auto;
|
|
1522
|
-
|
|
1523
|
-
& [data-error-message] {
|
|
1524
|
-
color: var(--diffs-deletion-base);
|
|
1525
|
-
font-size: 18px;
|
|
1526
|
-
font-weight: bold;
|
|
1527
|
-
}
|
|
1528
|
-
|
|
1529
|
-
& [data-error-stack] {
|
|
1530
|
-
color: var(--diffs-fg-number);
|
|
1531
|
-
}
|
|
1532
|
-
}
|
|
1533
|
-
}
|
|
1534
|
-
|
|
1535
|
-
@layer theme, rendered, unsafe;
|
|
1536
|
-
`;let Dc;function Dl(e){if(Dc!=null)return Dc;const t=e.host;if(typeof HTMLElement<"u"&&t instanceof HTMLElement&&!t.isConnected)return;const n=document.createElement("div");n.setAttribute("data-code",""),n.setAttribute(I8,"true");const i=document.createElement("div");return i.style.position="relative",i.style.width="200%",i.style.height="200%",n.appendChild(i),e.appendChild(n),Dc=Math.max(n.offsetHeight-n.clientHeight,0),n.remove(),Dc}function rA(e){return`${ak}: ${e==null?"var(--diffs-scrollbar-gutter-fallback)":`${e}px`};`}const oA="@layer base, theme, rendered, unsafe;",MU=new RegExp(`${IU(ak)}\\s*:\\s*[^;]+;`);function aA(e){return`${oA}
|
|
1537
|
-
@layer unsafe {
|
|
1538
|
-
${e}
|
|
1539
|
-
}`}function sA(e,t="system",n){return`${oA}
|
|
1540
|
-
@layer rendered {
|
|
1541
|
-
:host {${t==="system"?"":`
|
|
1542
|
-
color-scheme: ${t};`}
|
|
1543
|
-
${rA(n)}
|
|
1544
|
-
${e}
|
|
1545
|
-
}
|
|
1546
|
-
}`}function lA(e,t){const n=rA(t);return e.replace(MU,n)}function IU(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function rd({code:e,pre:t,columnType:n,rowSpan:i,containerSize:o=!1}={}){return e==null&&(e=document.createElement("code"),e.setAttribute("data-code",""),n!=null&&e.setAttribute(`data-${n}`,""),t?.appendChild(e)),i!=null?e.style.setProperty("grid-row",`span ${i}`):e.style.removeProperty("grid-row"),o?e.setAttribute("data-container-size",""):e.removeAttribute("data-container-size"),e}function uA(e,t){if(t==null)return;const n=e.shadowRoot??e.attachShadow({mode:"open"});n.innerHTML===""&&(n.innerHTML=t)}function cA(e,{type:t,diffIndicators:n,disableBackground:i,disableLineNumbers:o,overflow:s,split:l,totalLines:c,customProperties:d}){if(d!=null)for(const f in d){const p=d[f];p!=null&&e.setAttribute(f,`${p}`)}switch(t==="diff"?(e.setAttribute("data-diff",""),e.removeAttribute("data-file")):(e.setAttribute("data-file",""),e.removeAttribute("data-diff")),n){case"bars":case"classic":e.setAttribute("data-indicators",n);break;case"none":e.removeAttribute("data-indicators");break}return o?e.setAttribute("data-disable-line-numbers",""):e.removeAttribute("data-disable-line-numbers"),i?e.removeAttribute("data-background"):e.setAttribute("data-background",""),t==="diff"?e.setAttribute("data-diff-type",l?"split":"single"):e.removeAttribute("data-diff-type"),e.setAttribute("data-overflow",s),e.style.setProperty("--diffs-min-number-column-width-default",`${`${c}`.length}ch`),e}function Md(e){if(typeof HTMLStyleElement<"u"&&e instanceof HTMLStyleElement)return!0;const t=e.tagName??e.nodeName;return typeof t=="string"&&t.toLowerCase()==="style"}function dA(e){return e?.useTokenTransformer===!0||e?.onTokenClick!=null||e?.onTokenEnter!=null||e?.onTokenLeave!=null}function GC(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,themeType:e?.themeType,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:dA(e),tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,unsafeCSS:e?.unsafeCSS,headerRenderMode:e?.renderCustomHeader!=null?"custom":"default"}}function Bg(e,t){const n=e?.offsetHeight??0;if(e==null||n===0){t();return}e.style.minHeight=`${n}px`;try{t(),e.offsetHeight}finally{e.style.minHeight=""}}function fA({shadowRoot:e,currentNode:t,themeCSS:n}){if(n.trim()===""){t?.remove();return}return t??=NU(),t.textContent=n,t.parentNode!==e&&e.appendChild(t),t}function NU(){const e=document.createElement("style");return e.setAttribute(D8,""),e}let zU;function hA(){return zU??="safari"in window&&"pushNotification"in window.safari||/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}if(typeof HTMLElement<"u"&&customElements.get("diffs-container")==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const i=this.attachShadow({mode:"open"});e==null&&(e=new CSSStyleSheet,e.replaceSync(DU)),i.adoptedStyleSheets=[e]}connectedCallback(){Dl(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define(Dy,t)}const PU=[""];let HU=-1;var pA=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file:${++HU}`;type="file";fileContainer;spriteSVG;pre;code;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;errorWrapper;placeHolder;lastRenderedHeaderHTML;cachedHeaderHTML;appliedPreAttributes;lastRowCount;mounted=!1;headerElement;headerCustom;headerPrefix;headerFilenameSuffix;headerMetadata;fileRenderer;resizeManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;file;renderRange;enabled=!0;editor;constructor(t={theme:mt},n,i=!1){this.options=t,this.workerManager=n,this.isContainerManaged=i,this.fileRenderer=new LU(t,this.handleHighlightRender,this.workerManager),this.resizeManager=new Ck,this.interactionManager=new _k("file",bd(t)),this.workerManager?.subscribeToThemeChanges(this)}handleHighlightRender=()=>{this.rerender()};rerender(){!this.enabled||this.file==null||this.render({file:this.file,forceRender:!0,renderRange:this.renderRange})}__getCurrentFile(){return this.file}onThemeChange(){this.fileRenderer.clearRenderCache(),this.rerender()}setOptions(t){t!=null&&(this.options=t,this.cachedHeaderHTML=void 0,this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(bd(this.options))}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 n=this.appliedThemeCSS.baseThemeType??t;return this.appliedThemeCSS.themeType===n?!1:(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,t,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!ts(this.appliedThemeCSS.theme,this.options.theme??mt)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}setSelectedLines(t,n){this.interactionManager.setSelection(t,n)}setEditorActiveLine(t,n){this.interactionManager.setEditorActiveLine(t,{lineNumberOnly:n?.lineNumberOnly,side:n?.side??"additions"})}getCodeScrollLeft(){return this.code?.scrollLeft??0}setCodeScrollLeft(t){this.code!=null&&(this.code.scrollLeft=t)}__getEffectiveCodeOptions(){return{...this.options,...this.fileRenderer.getEffectiveCodeOptions()}}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}const{overflow:t="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:t==="wrap",columnVariables:this.shouldApplyColumnVariables(t)?"apply":"measure"}),this.managersDirty=!1}shouldApplyColumnVariables(t){return t==="scroll"&&this.lineAnnotations.length>0}cleanUp(t=!1){this.emitPostRender(!0),this.editor?.cleanUp(t),this.editor=void 0,this.resizeManager.cleanUp(),this.interactionManager.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.pre=void 0,this.code=void 0,this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.lastRenderedHeaderHTML=void 0,t||(this.cachedHeaderHTML=void 0),this.errorWrapper?.remove(),this.errorWrapper=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.placeHolder?.remove(),this.placeHolder=void 0,t?this.fileRenderer.recycle():(this.fileRenderer.cleanUp(),this.workerManager=void 0,this.file=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(t){const{fileContainer:n,prerenderedHTML:i,preventEmit:o=!1,file:s,lineAnnotations:l}=t;if(!this.enabled)throw new Error("File.hydrate: attempting to call hydrate after cleaned up");if(this.fileContainer!=null)throw new Error("File.hydrate: hydrate can only be called before the instance has rendered or hydrated");this.hydrateElements(n,i),jU(this.pre,s,this.options.collapsed)||BU(this.headerElement,s,this.options.disableFileHeader)?this.render({...t,preventEmit:!0}):this.hydrationSetup({file:s,lineAnnotations:l}),o||this.emitPostRender()}hydrateElements(t,n){this.fileContainer!==t&&this.emitPostRender(!0),uA(t,n);for(const i of Array.from(t.shadowRoot?.children??[])){if(i instanceof SVGElement){this.spriteSVG=i;continue}if(i instanceof HTMLElement){if(i instanceof HTMLPreElement){this.pre=i,this.appliedPreAttributes=void 0;continue}if(i instanceof HTMLStyleElement&&i.hasAttribute("data-theme-css")){this.themeCSSStyle=i;continue}if(i instanceof HTMLStyleElement&&i.hasAttribute("data-unsafe-css")){this.unsafeCSSStyle=i,this.appliedUnsafeCSS=i.textContent;continue}if("diffsHeader"in i.dataset){this.headerElement=i,this.lastRenderedHeaderHTML=void 0;continue}}}this.pre!=null&&(this.syncCodeNodeFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=t,this.hydrateMeasuredScrollbar()}hydrationSetup({file:t,lineAnnotations:n}){this.lineAnnotations=n??this.lineAnnotations,this.file=t,this.fileRenderer.setOptions(GC(this.options)),this.syncInteractionOptions(),this.pre!=null&&(this.fileRenderer.hydrate(t),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}getOrCreateLineCache(t=this.file){return t!=null?this.fileRenderer.getOrCreateLineCache(t):PU}updateBuffers(t){this.pre!=null&&this.applyBuffers(this.pre,t)}syncRenderViewToEditor(){const t=this.editor,n=this.fileContainer,i=this.file,o=this.lineAnnotations,s=this.renderRange;t!=null&&n!=null&&i!=null&&this.fileRenderer.initializeHighlighter().then(l=>{!this.enabled||this.editor!==t||this.fileContainer!==n||this.file!==i||t.__syncRenderView(l,n,i,o,s)})}attachEditor(t){this.editor?.cleanUp(),this.editor=t,this.fileRenderer.beginEditSession();const n=this.file==null?void 0:t.__prepareFile?.(this.file);return n!==void 0&&n!==this.file?this.renderPreparedFile({file:n,forceRender:!0,preventEmit:!0,renderRange:this.renderRange}):this.fileRenderer.editorRenderReady()?this.syncRenderViewToEditor():this.rerender(),()=>{this.editor=void 0,this.fileRenderer.endEditSession()}}applyDocumentChange(t,n){this.fileRenderer.applyDocumentChange(t),n!=null&&n!==this.lineAnnotations&&this.file!=null&&(this.setLineAnnotations(n),this.fileRenderer.setLineAnnotations(this.lineAnnotations),this.renderAnnotations())}updateRenderCache(t,n,i){this.fileRenderer.updateRenderCache(t,n,i?.lineCountChangeInFlight)}render(t){if(!this.enabled)throw new Error("File.render: attempting to call render after cleaned up");const n=this.editor?.__prepareFile?.(t.file)??t.file;return this.renderPreparedFile(n===t.file?t:{...t,file:n})}renderPreparedFile({file:t,fileContainer:n,forceRender:i=!1,preventEmit:o=!1,containerWrapper:s,deferManagers:l=!1,lineAnnotations:c,renderRange:d}){this.editor?.__postponeBgTokenizeToNextFrame();const{collapsed:f=!1,themeType:p="system"}=this.options,m=f?void 0:d,g=this.renderRange,v=this.hasThemeChanged(),x=c!=null&&(c.length>0||this.lineAnnotations.length>0)?c!==this.lineAnnotations:!1,S=!Xn(this.file,t)||this.fileRenderer.hasUnkeyedFileContentsChanged(t);if(!f&&!i&&ff(m,this.renderRange)&&!S&&!x&&!v)return this.applyCachedThemeState(p);this.renderRange=m,S&&(this.cachedHeaderHTML=void 0),this.file=t,this.fileRenderer.setOptions(GC(this.options)),this.syncInteractionOptions(),c!=null&&this.setLineAnnotations(c),this.fileRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:w=!1,disableFileHeader:_=!1}=this.options;if(_&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),n=this.getOrCreateFileContainerNode(n,s),this.applyCachedThemeState(p),f){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const C=this.fileRenderer.renderFile(t,sk);C!=null&&this.applyThemeState(n,C.themeStyles,p,C.baseThemeType),C?.headerAST!=null&&this.applyHeaderToDOM(C.headerAST,n),this.injectUnsafeCSS()}catch(C){if(w)throw C;console.error(C),C instanceof Error&&this.applyErrorToDOM(C,n)}return o||this.emitPostRender(),!0}try{const C=this.getOrCreatePreNode(n);if(!this.canPartiallyRender(i,x,S||v)||!this.applyPartialRender(g,m)){const k=this.fileRenderer.renderFile(t,m);if(k==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(n,k.themeStyles,p,k.baseThemeType),k.headerAST!=null&&this.applyHeaderToDOM(k.headerAST,n),this.applyFullRender(k,C)}this.applyBuffers(C,m),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,l||this.flushManagers(),this.editor!=null&&this.syncRenderViewToEditor()}catch(C){if(w)throw C;console.error(C),C instanceof Error&&this.applyErrorToDOM(C,n)}return o||this.emitPostRender(),!0}emitPostRender(t=!1){const{fileContainer:n,options:{onPostRender:i}}=this;if(t){if(!this.mounted||(this.mounted=!1,n==null))return;i?.(n,this,"unmount");return}if(n==null)return;const o=this.mounted?"update":"mount";this.mounted=!0,i?.(n,this,o)}removeRenderedCode(){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.code?.remove(),this.code=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:t}of this.annotationCache.values())t.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}canPartiallyRender(t,n,i){return!(t||n||i)}renderPlaceholder(t){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){const n=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",n.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${t}px`),!0}async primeHighlightCache(t=this.file){const{workerManager:n}=this;if(t==null||n==null||!n.isWorkingPool()||t.cacheKey==null||Ol(t))return;const i=this.options.tokenizeMaxLength??1e5;this.fileRenderer.getOrCreateLineCache(t).length>i||await n.primeFileHighlightCache(t).catch(o=>{console.error(o)})}cleanChildNodes(){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.code?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerFilenameSuffix?.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.code=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=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}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:i}of this.annotationCache.values())i.remove();this.annotationCache.clear();return}const t=new Map(this.annotationCache),{renderAnnotation:n}=this.options;if(n!=null&&this.lineAnnotations.length>0)for(const[i,o]of this.lineAnnotations.entries()){const s=`${i}-${ei(o)}`;let l=this.annotationCache.get(s);if(l==null||!RU(o,l.annotation)){l?.element.remove();const c=n(o);if(c==null)continue;l={element:tA(ei(o)),annotation:o},l.element.appendChild(c),this.fileContainer.appendChild(l.element),this.annotationCache.set(s,l)}t.delete(s)}for(const[i,{element:o}]of t.entries())this.annotationCache.delete(i),o.remove()}renderGutterUtility(){const{renderGutterUtility:t}=this.options;if(this.fileContainer==null||t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const n=t(this.interactionManager.getHoveredLine);if(n!=null&&this.gutterUtilityContent!=null)return;if(n==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const i=nA();i.appendChild(n),this.fileContainer.appendChild(i),this.gutterUtilityContent=i}injectUnsafeCSS(){const{unsafeCSS:t}=this.options,n=this.fileContainer?.shadowRoot;if(n!=null){if(t==null||t===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===n&&this.appliedUnsafeCSS===t||(this.unsafeCSSStyle??=iA(),this.unsafeCSSStyle.parentNode!==n&&n.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=aA(t),this.appliedUnsafeCSS=t)}}applyThemeState(t,n,i,o){const s=t.shadowRoot??t.attachShadow({mode:"open"}),l=o??i,c=this.options.theme??mt,d=typeof c=="string"?c:{...c},f=Dl(s);if(this.themeCSSStyle?.parentNode===s&&this.appliedThemeCSS?.themeStyles===n&&this.appliedThemeCSS.themeType===l&&this.appliedThemeCSS.scrollbarGutter===f){this.appliedThemeCSS.theme=d;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===s){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:d,themeStyles:n,themeType:l,baseThemeType:o,scrollbarGutter:f};return}this.themeCSSStyle=fA({shadowRoot:s,currentNode:this.themeCSSStyle,themeCSS:sA(n,l,f)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:d,themeStyles:n,themeType:l,baseThemeType:o,scrollbarGutter:f}:void 0}hydrateMeasuredScrollbar(){const t=this.fileContainer?.shadowRoot;t==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=lA(this.themeCSSStyle.textContent??"",Dl(t)))}shouldGuardRebuildScroll(){return this.editor!=null&&hA()}applyFullRender(t,n){this.cleanupErrorWrapper(),this.applyPreNodeAttributes(n,t);const i=this.code=rd({code:this.code}),o=this.fileRenderer.renderCodeAST(t);this.editor?.__captureFocusForDOMReplacement();const s=()=>{if(i.childElementCount>=2)for(let l=0;l<2;l++){const c=i.children[l],d=o[l];c.innerHTML=Zt(d.children),c.style.cssText=d.properties.style}else i.innerHTML=Zt(o);n.contains(i)||n.replaceChildren(i)};this.shouldGuardRebuildScroll()?Bg(n,s):s(),this.lastRowCount=t.rowCount}applyPartialRender(t,n){if(t==null||n==null)return!1;const{file:i,code:o}=this,s=o!=null?this.getColumns(o):void 0;if(i==null||o==null||s==null)return!1;const l=t.startingLine,c=n.startingLine,d=t.totalLines===1/0?Number.POSITIVE_INFINITY:l+t.totalLines,f=n.totalLines===1/0?Number.POSITIVE_INFINITY:c+n.totalLines,p=Math.max(l,c),m=Math.min(d,f);if(m<=p)return!1;if(!this.trimDOMToOverlap(s.gutter,p,m)||!this.trimDOMToOverlap(s.content,p,m))throw new Error("File.applyPartialRender: failed to trim to overlap");let{length:g}=s.content.children;const v=(_,C)=>{if(!(C<=0))return this.fileRenderer.renderFile(i,{startingLine:_,totalLines:C,bufferBefore:0,bufferAfter:0})},x=c<p?v(c,p-c):void 0;if(x===void 0&&c<p)return!1;const S=f===Number.POSITIVE_INFINITY?Number.POSITIVE_INFINITY:Math.max(0,f-m),w=f>m?v(m,S):void 0;return w===void 0&&f>m?!1:(this.cleanupErrorWrapper(),x!=null&&(s.gutter.insertAdjacentHTML("afterbegin",this.fileRenderer.renderPartialHTML(x.gutterAST)),s.content.insertAdjacentHTML("afterbegin",this.fileRenderer.renderPartialHTML(x.contentAST)),g+=x.rowCount),w!=null&&(s.gutter.insertAdjacentHTML("beforeend",this.fileRenderer.renderPartialHTML(w.gutterAST)),s.content.insertAdjacentHTML("beforeend",this.fileRenderer.renderPartialHTML(w.contentAST)),g+=w.rowCount),this.lastRowCount!==g&&(s.gutter.style.setProperty("grid-row",`span ${g}`),s.content.style.setProperty("grid-row",`span ${g}`),this.lastRowCount=g),!0)}getColumns(t){const n=t.children[0],i=t.children[1];if(!(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||n.dataset.gutter==null||i.dataset.content==null))return{gutter:n,content:i}}trimDOMToOverlap(t,n,i){const o=this.getDOMBoundaryIndices(t,[n,i]),s=o.get(n)??t.children.length,l=o.get(i)??t.children.length;if(s>l)return!1;for(let c=t.children.length-1;c>=l;c-=1)t.children[c]?.remove();for(let c=s-1;c>=0;c-=1)t.children[c]?.remove();return!0}getDOMBoundaryIndices(t,n){const i=[...new Set(n)].sort((d,f)=>d-f),o=new Map;if(i.length===0)return o;let s=0,l=i[s];const{children:c}=t;l===0&&(o.set(0,0),s+=1,l=i[s]);for(let d=0;d<c.length;d+=1){const f=c[d];if(!(f instanceof HTMLElement))continue;const p=this.getLineIndexFromDOMNode(f);if(p!=null){for(;l!=null&&p>=l;)o.set(l,d),s+=1,l=i[s];if(s>=i.length)break}}for(const d of i)o.has(d)||o.set(d,c.length);return o}getLineIndexFromDOMNode(t){const n=t.dataset.lineIndex;if(n==null)return;const i=Number(n);return Number.isNaN(i)?void 0:i}applyBuffers(t,n){if(n==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}n.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",t.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${n.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),n.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",t.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${n.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyHeaderToDOM(t,n){const{file:i}=this;if(i==null)return;this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const o=this.cachedHeaderHTML??Zt(t);if(this.cachedHeaderHTML=o,o!==this.lastRenderedHeaderHTML){const f=document.createElement("div");f.innerHTML=o;const p=f.firstElementChild;if(!(p instanceof HTMLElement))return;this.headerElement!=null?n.shadowRoot?.replaceChild(p,this.headerElement):n.shadowRoot?.prepend(p),this.headerElement=p,this.lastRenderedHeaderHTML=o}if(this.isContainerManaged)return;const{renderHeaderPrefix:s,renderHeaderFilenameSuffix:l,renderCustomHeader:c,renderHeaderMetadata:d}=this.options;if(c!=null){const f=c(i)??void 0;this.headerCustom=this.upsertHeaderSlotElement(n,this.headerCustom,Vl,f),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0}else{const f=s?.(i)??void 0,p=l?.(i)??void 0,m=d?.(i)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(n,this.headerPrefix,My,f),this.headerFilenameSuffix=this.upsertHeaderSlotElement(n,this.headerFilenameSuffix,Iy,p),this.headerMetadata=this.upsertHeaderSlotElement(n,this.headerMetadata,Ny,m),this.headerCustom?.remove(),this.headerCustom=void 0}}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(t,n,i,o){if(o==null){n?.remove();return}const s=n??this.createHeaderSlotElement(i);return n==null&&t.appendChild(s),this.replaceHeaderSlotContent(s,o),s}replaceHeaderSlotContent(t,n){t.replaceChildren(),n instanceof Element?t.appendChild(n):t.innerText=`${n}`}createHeaderSlotElement(t){const n=document.createElement("div");return n.slot=t,n}getOrCreateFileContainerNode(t,n){const{fileContainer:i}=this,o=t??i??document.createElement("diffs-container"),s=i!==o;return i!=null&&s&&this.editor?.__captureFocusForDOMReplacement(),s&&this.emitPostRender(!0),this.fileContainer=o,i!=null&&s&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),n!=null&&this.fileContainer.parentNode!==n&&n.appendChild(this.fileContainer),s&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(t){const{shadowRoot:n}=t;if(n!=null)for(const i of n.children)i instanceof SVGElement?this.spriteSVG??=i:Md(i)&&i.hasAttribute("data-theme-css")?(this.themeCSSStyle??=i,this.hasAdoptedThemeCSS=!0):Md(i)&&i.hasAttribute("data-unsafe-css")&&(this.unsafeCSSStyle??=i,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(t){const n=t.shadowRoot??t.attachShadow({mode:"open"});if(this.spriteSVG==null){const i=document.createElement("div");i.innerHTML=JT;const o=i.firstChild;o instanceof SVGElement&&(this.spriteSVG=o)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==n&&n.appendChild(this.spriteSVG)}getOrCreatePreNode(t){const n=t.shadowRoot??t.attachShadow({mode:"open"});return this.pre==null?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.code=void 0,n.appendChild(this.pre)):this.pre.parentNode!==n&&(this.editor?.__captureFocusForDOMReplacement(),t.shadowRoot?.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodeFromPre(t){this.code=void 0;for(const n of Array.from(t.children))if(n instanceof HTMLElement&&n.hasAttribute("data-code")){this.code=n;return}}applyPreNodeAttributes(t,{totalLines:n}){const{overflow:i="scroll",disableLineNumbers:o=!1}=this.options,s={type:"file",split:!1,overflow:i,disableLineNumbers:o,diffIndicators:"none",disableBackground:!0,totalLines:n};eA(s,this.appliedPreAttributes)||(cA(t,s),this.appliedPreAttributes=s)}applyErrorToDOM(t,n){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const i=n.shadowRoot??n.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",i.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 jU(e,t,n=!1){return!n&&e==null&&t!=null}function BU(e,t,n=!1){return e==null&&t!=null&&!n}function od(e){return{...zy,...e}}function yi(e,t){const n=UU(e,t);return t?n:e.diffHeaderHeight+n}function UU(e,t){return e.paddingTop??(t?e.spacing:0)}function Id(e){return e.paddingBottom??e.spacing}function VU(e){switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}const FU=5e3;let GU=-1;function $U(e,t){return(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.unsafeCSS!==t.unsafeCSS}var qU=class extends pA{virtualizer;metrics;__id=`virtualized-file:${++GU}`;top;height=0;cache={heights:new Map,checkpoints:[],fileAnnotationHeight:0};isVisible=!1;isSetup=!1;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,t,n=zy,i,o=!1){super(e,i,o),this.virtualizer=t,this.metrics=n}setMetrics(e,t=!1){const n=od(e);!t&&yd(this.metrics,n)||(this.metrics=n,this.resetLayoutCache())}setLineAnnotations(e){this.syncLineAnnotations(e)&&this.resetLayoutCache()}syncLineAnnotations(e){return e==null||e===this.lineAnnotations||e.length===0&&this.lineAnnotations.length===0?!1:(super.setLineAnnotations(e),!0)}hasLineAnnotations(){return this.lineAnnotations.some(e=>e.lineNumber>0)}getLineHeight(e,t=!1){const n=this.cache.heights.get(e);if(n!=null)return n;const i=t?2:1;return this.metrics.lineHeight*i}setOptions(e){if(this.isAdvancedMode())throw new Error("VirtualizedFile.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(e==null)return;const{options:t}=this,n=!Zd(t,e),i=$U(t,e);super.setOptions(e),i&&this.resetLayoutCache(!0),n&&(this.forceRenderOverride=!0),n&&this.virtualizer.instanceChanged(this,i)}setThemeType(e){if(this.isAdvancedMode())throw new Error("VirtualizedFile.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(e)}resetLayoutCache(e=!1,t=!0){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heights.size>0&&this.cache.heights.clear(),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.renderRange!=null&&t&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let e=!1;if(this.fileContainer==null||this.file==null)return this.height!==0&&(e=!0),this.height=0,e;const{overflow:t="scroll"}=this.options;if(this.top=this.getVirtualizedTop(),t==="scroll"&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled()||this.code==null)return e;const n=this.code.children[1];if(!(n instanceof HTMLElement))return e;const i=Hg(this.lineAnnotations);if(this.renderRange!=null&&i&&hf(this.renderRange)){const o=WU(n)??0;o!==this.cache.fileAnnotationHeight&&(this.cache.fileAnnotationHeight=o,e=!0)}else!i&&this.cache.fileAnnotationHeight!==0&&(this.cache.fileAnnotationHeight=0,e=!0);for(const o of n.children){if(!(o instanceof HTMLElement))continue;const s=o.dataset.lineIndex;if(s==null)continue;const l=Number(s);let c=o.getBoundingClientRect().height,d=!1;o.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in o.nextElementSibling.dataset||"noNewline"in o.nextElementSibling.dataset)&&("noNewline"in o.nextElementSibling.dataset&&(d=!0),c+=o.nextElementSibling.getBoundingClientRect().height);const f=this.getLineHeight(l,d);c!==f&&(e=!0,c===this.metrics.lineHeight*(d?2:1)?this.cache.heights.delete(l):this.cache.heights.set(l,c))}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer==null||this.file==null?!1:(e&&(this.top=this.getVirtualizedTop()),this.render({file:this.file}));prepareCodeViewItem(e,t,n,i){const o=this.syncLineAnnotations(i),s=!Xn(this.file,e)||this.fileRenderer.hasUnkeyedFileContentsChanged(e);let l=n?.resetFileLayoutCache===!0||s||o;n?.metrics!=null&&(this.metrics=n.metrics,l=!0);const{collapsed:c=!1}=this.options;return this.currentCollapsed!==c&&(this.currentCollapsed=c,l=!0),l&&this.resetLayoutCache(),this.file!==e&&(this.layoutDirty=!0),this.file=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e){if(this.file==null||e<1)return;const{disableFileHeader:t=!1,collapsed:n=!1}=this.options,i=this.fileRenderer.getLineCount(this.file)-1;let o=yi(this.metrics,t);if(n||i<0)return{top:o,height:0};const s=Math.min(Math.max(e-1,0),i),{overflow:l="scroll"}=this.options,{lineHeight:c}=this.metrics;if(o+=this.cache.fileAnnotationHeight,l==="scroll"&&!this.hasLineAnnotations())return{top:o+s*c,height:c};const d=this.getLayoutCheckpointBeforeLineIndex(s);o=d?.top??o;for(let f=d?.lineIndex??0;f<s;f++)o+=this.getLineHeight(f,!1);return{top:o,height:this.getLineHeight(s,!1)}}getEditorViewport(){return this.virtualizer.type==="simple"?this.virtualizer.getRoot():this.virtualizer.getContainerElement()}getNumericScrollAnchor(e){if(this.file==null||this.renderRange==null)return;const{disableFileHeader:t=!1,collapsed:n=!1,overflow:i="scroll"}=this.options;if(n||this.renderRange.totalLines<=0)return;const o=this.fileRenderer.getLineCount(this.file)-1;if(o<0)return;const s=yi(this.metrics,t),l=Math.min(this.renderRange.startingLine,o),c=Math.min(l+this.renderRange.totalLines-1,o);if(c<l)return;const{fileAnnotationHeight:d}=this.cache;if(i==="scroll"&&!this.hasLineAnnotations()){const{lineHeight:p}=this.metrics,m=s+(l===0?d:this.renderRange.bufferBefore),g=l+Math.max(Math.ceil((e-m)/p),0);return g>c?void 0:{lineNumber:g+1,top:s+d+g*p}}let f=s+(l===0?d:this.renderRange.bufferBefore);for(let p=l;p<=c;p++){if(f>=e)return{lineNumber:p+1,top:f};f+=this.getLineHeight(p)}}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(this.top==null||this.file==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};const t=e!=null?this.computeRenderRangeFromWindow(this.file,this.top,e):this.renderRange;if(t==null)return;const{bufferBefore:n,bufferAfter:i,totalLines:o}=t;let s=0;if(o===0){const l=e??this.virtualizer.getWindowSpecs();this.top<l.top&&(s=i)}return{topOffset:this.top+n+s,height:this.height-(n+i)}}cleanUp(e=!1){this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||this.resetLayoutCache(),this.isSetup=!1,super.cleanUp(e)}computeApproximateSize(e=!1,t=this.file){const n=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!n)return;const i=this.height===0;if(this.height=0,this.cache.checkpoints=[],t==null){this.layoutDirty=!1;return}const{disableFileHeader:o=!1,collapsed:s=!1,overflow:l="scroll"}=this.options,{lineHeight:c}=this.metrics,d=this.fileRenderer.getLineCount(t),f=yi(this.metrics,o),p=Id(this.metrics);if(this.height+=f,s){this.layoutDirty=!1;return}if(this.height+=this.cache.fileAnnotationHeight,l==="scroll"&&!this.hasLineAnnotations())this.height+=d*c;else for(let m=0;m<d;m++)this.addLayoutCheckpoint(m,this.height),this.height+=this.getLineHeight(m,!1);if(d>0&&(this.height+=p),this.fileContainer!=null&&n&&!i){const m=this.fileContainer.getBoundingClientRect();m.height!==this.height?console.log("VirtualizedFile.computeApproximateSize: computed height doesnt match",{name:t.name,elementHeight:m.height,computedHeight:this.height}):console.log("VirtualizedFile.computeApproximateSize: computed height IS CORRECT")}this.layoutDirty=!1}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.file==null||(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}applyDocumentChange(e,t,n=!1){const{renderRange:i}=this;if(this.getAdvancedVirtualizer()?.capturePendingLayoutAnchor(),super.applyDocumentChange(e,t),this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache(this.isSimpleMode(),!1),!this.isSimpleMode())this.computeApproximateSize(!0);else if(n&&i!==void 0&&this.file!==void 0){const o=this.virtualizer.getWindowSpecs(),s=this.computeRenderRangeFromWindow(this.file,this.top??0,o);s.bufferAfter!==i.bufferAfter&&this.updateBuffers(s)}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}renderPreparedFile({fileContainer:e,file:t,forceRender:n=!1,lineAnnotations:i,...o}){const s=this.file==null||!Xn(this.file,t)||this.fileRenderer.hasUnkeyedFileContentsChanged(t),{forceRenderOverride:l,isSetup:c}=this;this.forceRenderOverride=void 0;const d=this.syncLineAnnotations(i);if(d&&this.resetLayoutCache(),e=this.getOrCreateFileContainerNode(e),t==null)return console.error("VirtualizedFile.render: attempting to virtually render when we dont have file"),!1;if(c)this.top??=this.getVirtualizedTop(),s&&this.isSimpleMode()&&(this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache(!1),this.computeApproximateSize(!1,t));else{this.computeApproximateSize(!1,t);const v=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(v==null)throw new Error("VirtualizedFile.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()&&(!s||!c))return this.file=t,s&&(this.cachedHeaderHTML=void 0),this.renderPlaceholder(this.height);const f=this.virtualizer.getWindowSpecs(),p=this.top??0,m=this.computeRenderRangeFromWindow(t,p,f),g=super.renderPreparedFile({file:t,fileContainer:e,renderRange:m,lineAnnotations:i,forceRender:(l??n)||d||s,...o});return this.isSimpleMode()&&g&&this.getSimpleVirtualizer()?.requestHeightReconcile(this),g}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}shouldGuardRebuildScroll(){return!1}isSimpleMode(){return this.virtualizer.type==="simple"}isAdvancedMode(){return this.virtualizer.type==="advanced"}addLayoutCheckpoint(e,t){e%FU===0&&this.cache.checkpoints.push({lineIndex:e,top:t})}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,i;for(;t<=n;){const o=t+n>>1,s=this.cache.checkpoints[o];if(s==null)throw new Error("VirtualizedFile: invalid checkpoint index");s.lineIndex<=e?(i=s,t=o+1):n=o-1}return i}getLayoutCheckpointBeforeTop(e,t){let n=0,i=this.cache.checkpoints.length-1,o=-1;for(;n<=i;){const s=n+i>>1,l=this.cache.checkpoints[s];if(l==null)throw new Error("VirtualizedFile: invalid checkpoint index");l.top<=e?(o=s,n=s+1):i=s-1}if(t==null)return o>=0?this.cache.checkpoints[o]:void 0;for(let s=o;s>=0;s--){const l=this.cache.checkpoints[s];if(l==null)throw new Error("VirtualizedFile: invalid checkpoint index");if(l.lineIndex%t===0)return l}}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}getAdvancedVirtualizer(){return this.virtualizer.type==="advanced"?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}computeRenderRangeFromWindow(e,t,{top:n,bottom:i}){const{disableFileHeader:o=!1,overflow:s="scroll"}=this.options,{hunkLineCount:l,lineHeight:c}=this.metrics,d=this.fileRenderer.getLineCount(e),f=this.height,p=yi(this.metrics,o),m=d>0?Id(this.metrics):0,{fileAnnotationHeight:g}=this.cache,v=p+g,x=Math.max(0,f-p-g-m),S=Hg(this.lineAnnotations),w=t+p,_=g>0&&S&&w<i&&w+g>n;if(t<n-f||t>i)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-p-m};if(d<=l)return{startingLine:0,totalLines:l,bufferBefore:0,bufferAfter:0};const C=Math.ceil(Math.max(i-n,0)/c),k=Math.ceil(C/l)*l+l,D=k/l,M=(n+i)/2;if(s==="scroll"&&!this.hasLineAnnotations()){const le=t+v,fe=le+x;if(!_&&!(le<i&&fe>n))return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-p-m};const re=Math.floor(_&&M<t+v?0:(M-(t+v))/c),ce=Math.floor(re/l)-Math.floor(D/2),xe=Math.ceil(d/l),pe=Math.max(0,Math.min(ce,xe))*l,ze=ce<0?k+ce*l:k,He=pe===0?0:g+pe*c,st=Math.min(ze,d-pe);return{startingLine:pe,totalLines:ze,bufferBefore:He,bufferAfter:Math.max(0,(d-pe-st)*c)}}const O=D,z=[],j=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-k*c*2),l);let F=t+(j?.top??v),ee=j?.lineIndex??0,q,U,Z;const X=j?.lineIndex??0;for(let le=X;le<d;le++){const fe=ee%l===0,re=Math.floor(ee/l);if(fe&&(z[re]=F-(t+v),Z!=null)){if(Z<=0)break;Z--}const ce=this.getLineHeight(le,!1);F>n-ce&&F<i&&(q??=re),F+ce>M&&(U??=re),Z==null&&F>=i&&fe&&(Z=O),ee++,F+=ce}if(q==null)if(_)q=0,U=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-p-m};U??=q;const W=Math.round(U-D/2),P=Math.max(0,Math.ceil(d/l)-D),$=Math.max(0,Math.min(W,P)),ne=$*l,ue=W<0?k+W*l:k,R=z[$]??0,H=ne===0?0:g+R,Y=$+ue/l,I=Y<z.length?x-z[Y]:x-(F-t-v);return{startingLine:ne,totalLines:ue,bufferBefore:H,bufferAfter:Math.max(0,I)}}};function WU(e){let t;for(const n of e.children)n instanceof HTMLElement&&n.dataset.lineAnnotation===KT&&(t=Math.max(t??0,n.getBoundingClientRect().height));return t}function Eo(e,t){return e===t||e?.cacheKey!=null&&e.cacheKey===t?.cacheKey}function YU(e){return{...e,hunks:e.hunks.map(t=>({...t,hunkContent:t.hunkContent.map(n=>({...n}))})),deletionLines:[...e.deletionLines],additionLines:[...e.additionLines]}}function Ug(e){return e!==""?e.split(T8):[]}function Nd(e,t,n){const i=e==="clone"?YU(t):t;if(!i.isPartial)throw new Error("hydratePartialDiff: fileDiff must be partial");switch(i.type){case"change":case"rename-changed":return XU(i,QU(i,n),$C(i,n));case"rename-pure":{const o=$C(i,n);ZU(i,n);const s=Ug(o.contents);return i.isPartial=!1,i.deletionLines=s,i.additionLines=s,mA(i,null,o),i}}throw new Error(`hydratePartialDiff: ${i.type} diffs cannot be hydrated from loaded files`)}function XU(e,t,n){const i=Ug(t.contents),o=Ug(n.contents),{hunks:s,splitLineCount:l,unifiedLineCount:c}=KU(e.hunks,o.length);return e.hunks=s,e.splitLineCount=l,e.unifiedLineCount=c,e.isPartial=!1,e.deletionLines=i,e.additionLines=o,mA(e,t,n),e}function KU(e,t){let n=0,i=0,o=0;const s=[];for(const l of e){const c=Math.max(l.additionStart-1,0),d=Math.max(l.deletionStart-1,0);let f=c,p=d,m=0,g=0,v=0,x=0;const S=[];for(const _ of l.hunkContent){if(_.type==="context"){S.push({..._,additionLineIndex:f,deletionLineIndex:p}),f+=_.lines,p+=_.lines,v+=_.lines,x+=_.lines;continue}S.push({..._,additionLineIndex:f,deletionLineIndex:p}),f+=_.additions,p+=_.deletions,m+=_.additions,g+=_.deletions,v+=Math.max(_.additions,_.deletions),x+=_.additions+_.deletions}const w=Math.max(wi(l.additionStart,l.additionCount)-o,0);s.push({...l,collapsedBefore:w,additionLineIndex:c,deletionLineIndex:d,additionLines:m,deletionLines:g,hunkContent:S,splitLineStart:n+w,unifiedLineStart:i+w,splitLineCount:v,unifiedLineCount:x}),n+=w+v,i+=w+x,o=hn(l.additionStart,l.additionCount)}if(s.length>0){const l=s[s.length-1],c=hn(l.additionStart,l.additionCount),d=Math.max(t-c,0);n+=d,i+=d}return{hunks:s,splitLineCount:n,unifiedLineCount:i}}function QU(e,t){if(t.oldFile==null)throw new Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires oldFile`);return t.oldFile}function $C(e,t){if(t.newFile==null)throw new Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires newFile`);return t.newFile}function ZU(e,t){if(t.oldFile!==null)throw new Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires oldFile to be null`)}function JU(e,t,n){return e.cacheKey!=null?`${e.cacheKey}:hydrated`:eV(t,n)}function mA(e,t,n){const i=JU(e,t,n);if(i==null){delete e.cacheKey;return}e.cacheKey=i}function eV(e,t){return e!=null&&t!=null?e.cacheKey!=null&&t.cacheKey!=null?`${e.cacheKey}:${t.cacheKey}`:void 0:e?.cacheKey??t?.cacheKey}var tV=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,n){if(t==null||n==null)for(const i of e.children??[])i instanceof HTMLElement&&("deletions"in i.dataset?t=i:"additions"in i.dataset&&(n=i));if(n==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!==n&&(this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),this.codeAdditions=n,n.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 mi(e,t){return ts(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function Mc(e){return Te({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function Ic(e){return Te({tagName:"div",children:[Te({tagName:"span",children:[xi("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":e,"data-column-content":""}})}function Em(e){return Te({tagName:"div",children:[vd({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 Ia({type:e,content:t,expandIndex:n,chunked:i=!1,slotName:o,isFirstHunk:s,isLastHunk:l}){let c=0;const d=[];if(e==="metadata"&&t!=null&&d.push(Te({tagName:"div",children:[xi(t)],properties:{"data-separator-wrapper":""}})),(e==="line-info"||e==="line-info-basic")&&t!=null){const f=[];n!=null&&(i?(s||(f.push(Em("up")),c++),l||(f.push(Em("down")),c++)):(f.push(Em(!s&&!l?"both":s?"down":"up")),c++)),f.push(Te({tagName:"div",children:[Te({tagName:"span",children:[xi(t)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),i&&n!=null&&f.push(Te({tagName:"div",children:[xi("Expand all")],properties:{role:"button","data-expand-button":"","data-expand-all-button":""}})),d.push(Te({tagName:"div",children:f,properties:{"data-separator-wrapper":"","data-separator-multi-button":c>1?"":void 0}}))}return e==="custom"&&o!=null&&d.push(Te({tagName:"slot",properties:{name:o}})),Te({tagName:"div",children:d,properties:{"data-separator":d.length===0?"simple":e,"data-expand-index":n,"data-separator-first":s?"":void 0,"data-separator-last":l?"":void 0}})}function nV(e,t){return`hunk-separator-${e}-${t}`}function iV(e){const t=e.at(-1);return t==null?0:Math.max(hn(t.additionStart,t.additionCount),hn(t.deletionStart,t.deletionCount))}function Vg(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}function qC({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":""},alwaysWrap:!0}}function Nc({item:e,arr:t,enableJoin:n,isNeutral:i=!1,isLastItem:o=!1}){const s=t[t.length-1];if(s==null||o||!n){t.push([i?0:1,e.value]);return}const l=s[0]===0;if(i===l||i&&e.value.length===1&&!l){s[1]+=e.value;return}t.push([i?0:1,e.value])}function Ml(e){return[wi(e.additionStart,e.additionCount)+1,hn(e.additionStart,e.additionCount)+1]}function or({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:i,collapsedContextThreshold:o}){const s=Math.max(t,0);if(s===0||e)return{fromStart:0,fromEnd:0,rangeSize:s,collapsedLines:s,renderAll:!1};if(n===!0||s<=o)return{fromStart:s,fromEnd:0,rangeSize:s,collapsedLines:0,renderAll:!0};const l=n?.get(i),c=Math.min(Math.max(l?.fromStart??0,0),s),d=Math.min(Math.max(l?.fromEnd??0,0),s),f=c+d,p=f>=s;return{fromStart:p?s:c,fromEnd:p?0:d,rangeSize:s,collapsedLines:Math.max(s-f,0),renderAll:p}}function rV(e){const t=e.hunks[e.hunks.length-1];if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return!1;const n=e.additionLines.length-hn(t.additionStart,t.additionCount),i=e.deletionLines.length-hn(t.deletionStart,t.deletionCount);return n<=0&&i<=0?!1:n!==i}function gA({fileDiff:e,errorPrefix:t}){const n=e.hunks[e.hunks.length-1];if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;const i=e.additionLines.length-hn(n.additionStart,n.additionCount),o=e.deletionLines.length-hn(n.deletionStart,n.deletionCount);if(i<=0&&o<=0)return 0;if(i!==o)throw new Error(`${t}: trailing context mismatch (additions=${i}, deletions=${o}) for ${e.name}`);return Math.min(i,o)}function ar({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:i,errorPrefix:o}){if(t!==e.hunks.length-1)return;const s=gA({fileDiff:e,errorPrefix:o});if(s<=0)return;if(n===!0||s<=i)return{fromStart:s,fromEnd:0,rangeSize:s,collapsedLines:0,renderAll:!0};const l=n?.get(e.hunks.length),c=Math.min(Math.max(l?.fromStart??0,0),s);return{fromStart:c,fromEnd:0,rangeSize:s,collapsedLines:s-c,renderAll:c>=s}}function yA({fileDiff:e,lineNumber:t,expandedHunks:n,collapsedContextThreshold:i}){if(n===!0||e.isPartial)return!0;for(const[c,d]of e.hunks.entries()){const[f,p]=Ml(d);if(t<f){const m=or({isPartial:e.isPartial,rangeSize:d.collapsedBefore,expandedHunks:n,hunkIndex:c,collapsedContextThreshold:i}),g=f-m.rangeSize;return m.renderAll||t<g+m.fromStart||t>=f-m.fromEnd}if(t<p)return!0}const o=ar({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:n,collapsedContextThreshold:i,errorPrefix:"isAdditionLineRenderable"});if(o==null||o.renderAll)return!0;const s=e.hunks[e.hunks.length-1],[,l]=Ml(s);return t<l+o.fromStart||t>=l+o.rangeSize}function oV({fileDiff:e,lineNumber:t,direction:n,expandedHunks:i,collapsedContextThreshold:o}){if(i===!0||e.isPartial)return t;const s=[];let l=1;for(const[d,f]of e.hunks.entries()){const[p,m]=Ml(f),g=or({isPartial:e.isPartial,rangeSize:f.collapsedBefore,expandedHunks:i,hunkIndex:d,collapsedContextThreshold:o}),v=p-g.rangeSize;g.renderAll?s.push([v,p]):(g.fromStart>0&&s.push([v,v+g.fromStart]),g.fromEnd>0&&s.push([p-g.fromEnd,p])),s.push([p,m]),l=m}const c=ar({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:i,collapsedContextThreshold:o,errorPrefix:"getNearestRenderableAdditionLine"});if(c!=null){const d=l;l=d+c.rangeSize,c.renderAll?s.push([d,l]):c.fromStart>0&&s.push([d,d+c.fromStart])}if(t>=l)return t;if(n==="down"){for(const[d,f]of s)if(f>t)return Math.max(d,t);return}for(let d=s.length-1;d>=0;d--){const[f,p]=s[d];if(f<=t)return Math.min(p-1,t)}}function vA({type:e,metrics:t}){return t.hunkSeparatorHeight??VU(e)}function bA({type:e,metrics:t}){return e==="simple"||e==="metadata"||e==="line-info-basic"?0:t.spacing}function aV({type:e,hunkIndex:t,hunkSpecs:n}){switch(e){case"simple":return t>0;case"metadata":return n!=null;case"line-info":case"line-info-basic":case"custom":return!0}}function sV(e){return e!=="simple"&&e!=="metadata"}function ll({type:e,metrics:t,hunkIndex:n,hunkSpecs:i}){if(!aV({type:e,hunkIndex:n,hunkSpecs:i}))return;const o=vA({type:e,metrics:t}),s=bA({type:e,metrics:t}),l=n>0?s:0,c=s;return{height:o,gapBefore:l,gapAfter:c,totalHeight:l+o+c}}function _o({type:e,metrics:t}){if(!sV(e))return;const n=vA({type:e,metrics:t}),i=bA({type:e,metrics:t});return{height:n,gapBefore:i,gapAfter:0,totalHeight:i+n}}function Lo({diff:e,diffStyle:t,startingLine:n=0,totalLines:i=1/0,expandedHunks:o,collapsedContextThreshold:s=1,callback:l}){const c=lV({diff:e,diffStyle:t,startingLine:n,expandedHunks:o,collapsedContextThreshold:s}),d={viewportStart:n,viewportEnd:n+i,isWindowedHighlight:n>0||i<1/0,splitCount:c.splitCount,unifiedCount:c.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!d.isWindowedHighlight)return!1;const f=d.unifiedCount>=n+i,p=d.splitCount>=n+i;return t==="unified"?f:(t==="split"||f)&&p},shouldSkip(f,p){if(!d.isWindowedHighlight)return!1;const m=f>0&&d.unifiedCount+f<=n,g=p>0&&d.splitCount+p<=n;return t==="unified"?m:(t==="split"||m)&&g},incrementCounts(f,p){(t==="unified"||t==="both")&&(d.unifiedCount+=f),(t==="split"||t==="both")&&(d.splitCount+=p)},isInWindow(f,p){if(!d.isWindowedHighlight)return!0;const m=d.isInUnifiedWindow(f),g=d.isInSplitWindow(p);return t==="unified"?m:t==="split"?g:m||g},isInUnifiedWindow(f){return!d.isWindowedHighlight||d.unifiedCount>=n-f&&d.unifiedCount<n+i},isInSplitWindow(f){return!d.isWindowedHighlight||d.splitCount>=n-f&&d.splitCount<n+i},emit(f,p=!1){return p||(t==="unified"?d.incrementCounts(1,0):t==="split"?d.incrementCounts(0,1):d.incrementCounts(1,1)),l(f)??!1}};e:for(let f=c.hunkIndex;f<e.hunks.length;f++){let C=function(U,Z){return w==null||w.collapsedLines<=0||w.fromStart+w.fromEnd>0?0:t==="unified"?U===p.unifiedLineStart+p.unifiedLineCount-1?w.collapsedLines:0:Z===p.splitLineStart+p.splitLineCount-1?w.collapsedLines:0},D=function(){return k?0:(k=!0,S.collapsedLines)};const p=e.hunks[f];if(p==null)throw new Error("iterateOverDiff: invalid hunk index");if(d.shouldBreak())break;const m=wi(p.deletionStart,p.deletionCount),g=wi(p.additionStart,p.additionCount),v=!e.isPartial&&p.deletionCount===0?m:p.deletionLineIndex,x=!e.isPartial&&p.additionCount===0?g:p.additionLineIndex,S=or({isPartial:e.isPartial,rangeSize:p.collapsedBefore,expandedHunks:o,hunkIndex:f,collapsedContextThreshold:s}),w=f===d.finalHunkIndex?ar({fileDiff:e,hunkIndex:f,expandedHunks:o,collapsedContextThreshold:s,errorPrefix:"iterateOverDiff"}):void 0,_=S.fromStart+S.fromEnd;let k=S.collapsedLines===0;if(d.shouldSkip(_,_))d.incrementCounts(_,_),D();else{let U=p.unifiedLineStart-S.rangeSize,Z=p.splitLineStart-S.rangeSize,X=v-S.rangeSize,W=x-S.rangeSize,P=m+1-S.rangeSize,$=g+1-S.rangeSize;if(zc(d,S.fromStart,t,ne=>d.emit({hunkIndex:f,hunk:p,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:P+ne,lineIndex:X+ne,noEOFCR:!1,unifiedLineIndex:U+ne,splitLineIndex:Z+ne},additionLine:{unifiedLineIndex:U+ne,splitLineIndex:Z+ne,lineIndex:W+ne,lineNumber:$+ne,noEOFCR:!1}}))||(U=p.unifiedLineStart-S.fromEnd,Z=p.splitLineStart-S.fromEnd,X=v-S.fromEnd,W=x-S.fromEnd,P=m+1-S.fromEnd,$=g+1-S.fromEnd,zc(d,S.fromEnd,t,ne=>d.emit({hunkIndex:f,hunk:p,collapsedBefore:D(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:P+ne,lineIndex:X+ne,noEOFCR:!1,unifiedLineIndex:U+ne,splitLineIndex:Z+ne},additionLine:{unifiedLineIndex:U+ne,splitLineIndex:Z+ne,lineIndex:W+ne,lineNumber:$+ne,noEOFCR:!1}}),()=>{D()})))break e}let M=p.unifiedLineStart,O=p.splitLineStart,z=v,j=x,F=m+1,ee=g+1;const q=p.hunkContent.at(-1);for(const U of p.hunkContent){if(d.shouldBreak())break e;const Z=U===q;if(U.type==="context"){if(d.shouldSkip(U.lines,U.lines))d.incrementCounts(U.lines,U.lines),D();else if(zc(d,U.lines,t,X=>{const W=Z&&X===U.lines-1,P=M+X,$=O+X;return d.emit({hunkIndex:f,hunk:p,collapsedBefore:D(),collapsedAfter:C(P,$),type:"context",deletionLine:{lineNumber:F+X,lineIndex:z+X,noEOFCR:W&&p.noEOFCRDeletions,unifiedLineIndex:P,splitLineIndex:$},additionLine:{unifiedLineIndex:P,splitLineIndex:$,lineIndex:j+X,lineNumber:ee+X,noEOFCR:W&&p.noEOFCRAdditions}})},()=>{D()}))break e;M+=U.lines,O+=U.lines,z+=U.lines,j+=U.lines,F+=U.lines,ee+=U.lines}else{const X=Math.max(U.deletions,U.additions),W=U.deletions+U.additions;if(!d.shouldSkip(W,X)){const P=dV(d,U,t);(P[0]?.[0]??0)>0&&D();for(const[$,ne]of P)for(let ue=$;ue<ne;ue++){const R=C(M+ue,t==="unified"?O+(ue<U.deletions?ue:ue-U.deletions):O+ue);if(d.emit(fV({hunkIndex:f,hunk:p,collapsedBefore:D(),collapsedAfter:R,diffStyle:t,index:ue,unifiedLineIndex:M,splitLineIndex:O,additionLineIndex:j,deletionLineIndex:z,additionLineNumber:ee,deletionLineNumber:F,content:U,isLastContent:Z,unifiedCount:W,splitCount:X}),!0))break e}}D(),d.incrementCounts(W,X),M+=W,O+=X,z+=U.deletions,j+=U.additions,F+=U.deletions,ee+=U.additions}}if(w!=null){const{collapsedLines:U,fromStart:Z,fromEnd:X}=w,W=Z+X;if(zc(d,W,t,P=>{const $=P===W-1;return d.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:$?U:0,type:"context-expanded",deletionLine:{lineNumber:F+P,lineIndex:z+P,noEOFCR:!1,unifiedLineIndex:M+P,splitLineIndex:O+P},additionLine:{unifiedLineIndex:M+P,splitLineIndex:O+P,lineIndex:j+P,lineNumber:ee+P,noEOFCR:!1}})},void 0,()=>d.shouldBreak()))break e}}}function lV({diff:e,diffStyle:t,startingLine:n,expandedHunks:i,collapsedContextThreshold:o}){if(n<=0||t==="both")return{hunkIndex:0,splitCount:0,unifiedCount:0};const s=uV({diff:e,expandedHunks:i,collapsedContextThreshold:o});let l=0,c=e.hunks.length-1,d=e.hunks.length;for(;l<=c;){const p=l+c>>1,m=s[p+1];if(m==null)throw new Error("iterateOverDiff: invalid hunk prefix index");(t==="unified"?m.unifiedCount:m.splitCount)>n?(d=p,c=p-1):l=p+1}if(d>=e.hunks.length){const p=s[e.hunks.length];if(p==null)throw new Error("iterateOverDiff: invalid terminal hunk prefix index");return{hunkIndex:e.hunks.length,splitCount:p.splitCount,unifiedCount:p.unifiedCount}}const f=s[d];if(f==null)throw new Error("iterateOverDiff: invalid selected hunk prefix index");return{hunkIndex:d,splitCount:f.splitCount,unifiedCount:f.unifiedCount}}function uV({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let i=0,o=0;const s=e.hunks.length-1,l=[{splitCount:0,unifiedCount:0}];for(let c=0;c<e.hunks.length;c++){const d=e.hunks[c];if(d==null)throw new Error("iterateOverDiff: invalid hunk summary index");const f=or({isPartial:e.isPartial,rangeSize:d.collapsedBefore,expandedHunks:t,hunkIndex:c,collapsedContextThreshold:n}),p=f.fromStart+f.fromEnd;i+=p+d.splitLineCount,o+=p+d.unifiedLineCount;const m=c===s?ar({fileDiff:e,hunkIndex:c,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:"iterateOverDiff"}):void 0;if(m!=null){const g=m.fromStart+m.fromEnd;i+=g,o+=g}l.push({splitCount:i,unifiedCount:o})}return l}function cV(e,t,n){if(!e.isWindowedHighlight||t<=0)return[0,t];const i=[];function o(c){const d=Math.max(0,e.viewportStart-c),f=Math.min(t,e.viewportEnd-c);f>d&&i.push([d,f])}if(n!=="split"&&o(e.unifiedCount),n!=="unified"&&o(e.splitCount),i.length===0)return[0,0];let s=i[0][0],l=i[0][1];for(let c=1;c<i.length;c++){const d=i[c];s=Math.min(s,d[0]),l=Math.max(l,d[1])}return[s,l]}function zc(e,t,n,i,o,s){const[l,c]=cV(e,t,n);l>0&&(e.incrementCounts(l,l),o?.());let d=l;for(;d<t;){if(s?.()===!0)return!0;if(d>=c){e.incrementCounts(t-d,t-d);break}if(e.isInWindow(0,0)){if(i(d)===!0)return!0}else e.incrementCounts(1,1);d++}return!1}function dV(e,t,n){if(!e.isWindowedHighlight)return[[0,n==="unified"?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];const i=n!=="split",o=n!=="unified",s=n==="unified"?"unified":"split",l=[];function c(m,g){if(m+g<=e.viewportStart||m>=e.viewportEnd)return;const v=Math.max(0,e.viewportStart-m),x=Math.min(g,e.viewportEnd-m);return x>v?[v,x]:void 0}function d(m,g){return s==="split"?m:g==="additions"?[m[0]+t.deletions,m[1]+t.deletions]:m}function f(m,g){if(m==null)return;const[v,x]=d(m,g);x>v&&l.push([v,x])}if(i&&(f(c(e.unifiedCount,t.deletions),"deletions"),f(c(e.unifiedCount+t.deletions,t.additions),"additions")),o&&(f(c(e.splitCount,t.deletions),"deletions"),f(c(e.splitCount,t.additions),"additions")),l.length===0)return l;l.sort((m,g)=>m[0]-g[0]);const p=[l[0]];for(const[m,g]of l.slice(1)){const v=p[p.length-1];m<=v[1]?v[1]=Math.max(v[1],g):p.push([m,g])}return p}function fV({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:i,diffStyle:o,index:s,unifiedLineIndex:l,splitLineIndex:c,additionLineIndex:d,deletionLineIndex:f,additionLineNumber:p,deletionLineNumber:m,content:g,isLastContent:v,unifiedCount:x,splitCount:S}){const w=s<g.deletions?l+s:void 0,_=o==="unified"?s>=g.deletions?l+s:void 0:s<g.additions?l+g.deletions+s:void 0,C=o==="unified"?c+(s<g.deletions?s:s-g.deletions):c+s,k=s<g.deletions?f+s:void 0,D=s<g.deletions?m+s:void 0,M=o==="unified"?s>=g.deletions?d+(s-g.deletions):void 0:s<g.additions?d+s:void 0,O=o==="unified"?s>=g.deletions?p+(s-g.deletions):void 0:s<g.additions?p+s:void 0,z=o==="unified"?v&&s===g.deletions-1&&t.noEOFCRDeletions:v&&s===S-1&&t.noEOFCRDeletions,j=o==="unified"?v&&s===x-1&&t.noEOFCRAdditions:v&&s===S-1&&t.noEOFCRAdditions,F=k!=null&&D!=null&&w!=null?{lineNumber:D,lineIndex:k,noEOFCR:z,unifiedLineIndex:w,splitLineIndex:C}:void 0,ee=M!=null&&O!=null&&_!=null?{unifiedLineIndex:_,splitLineIndex:C,lineIndex:M,lineNumber:O,noEOFCR:j}:void 0;if(F==null&&ee!=null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:i,deletionLine:void 0,additionLine:ee};if(F!=null&&ee==null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:i,deletionLine:F,additionLine:void 0};if(F==null||ee==null)throw new Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:i,deletionLine:F,additionLine:ee}}const hV={forcePlainText:!1};function xA(e,t,n,{forcePlainText:i,startingLine:o,totalLines:s,expandedHunks:l,collapsedContextThreshold:c=1}=hV){i?(o??=0,s??=1/0):(o=0,s=1/0);const d=o>0||s<1/0,f=typeof n.theme=="string"?t.getTheme(n.theme).type:void 0,p=YT({theme:n.theme,highlighter:t}),m=i&&!d&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":n.lineDiffType,g={deletionLines:[],additionLines:[]},{maxLineDiffLength:v}=n,x=!i&&!e.isPartial,S=i?l:void 0,w=new Map;function _(k){const D=x?0:k,M=w.get(D)??mV();return w.set(D,M),M}function C(k,D,M,O){if(d){let z=M.at(-1);(z==null||z.targetIndex+z.count!==D)&&(z={targetIndex:D,originalOffset:O.length,count:0},M.push(z)),z.count++}O.push(k)}Lo({diff:e,diffStyle:"both",startingLine:o,totalLines:s,expandedHunks:d?S:!0,collapsedContextThreshold:c,callback:({hunkIndex:k,additionLine:D,deletionLine:M,type:O})=>{const z=_(k),j=D!=null?D.splitLineIndex:M.splitLineIndex;O==="change"&&D!=null&&M!=null&&pV({additionLine:e.additionLines[D.lineIndex],deletionLine:e.deletionLines[M.lineIndex],deletionLineIndex:z.deletionContent.length,additionLineIndex:z.additionContent.length,deletionDecorations:z.deletionDecorations,additionDecorations:z.additionDecorations,lineDiffType:m,maxLineDiffLength:v}),M!=null&&(C(e.deletionLines[M.lineIndex],M.lineIndex,z.deletionSegments,z.deletionContent),z.deletionInfo.push({type:O==="change"?"change-deletion":O,lineNumber:M.lineNumber,altLineNumber:O==="change"?void 0:D.lineNumber??void 0,lineIndex:`${M.unifiedLineIndex},${j}`})),D!=null&&(C(e.additionLines[D.lineIndex],D.lineIndex,z.additionSegments,z.additionContent),z.additionInfo.push({type:O==="change"?"change-addition":O,lineNumber:D.lineNumber,altLineNumber:O==="change"?void 0:M.lineNumber??void 0,lineIndex:`${D.unifiedLineIndex},${j}`}))}});for(const k of w.values()){if(k.deletionContent.length===0&&k.additionContent.length===0)continue;const D={name:e.prevName??e.name,contents:k.deletionContent.value},M={name:e.name,contents:k.additionContent.value},{deletionLines:O,additionLines:z}=gV({deletionFile:D,deletionInfo:k.deletionInfo,deletionDecorations:k.deletionDecorations,additionFile:M,additionInfo:k.additionInfo,additionDecorations:k.additionDecorations,highlighter:t,options:n,languageOverride:i?"text":e.lang});if(x){g.deletionLines=O,g.additionLines=z;continue}if(k.deletionSegments.length>0)for(const j of k.deletionSegments)for(let F=0;F<j.count;F++)g.deletionLines[j.targetIndex+F]=O[j.originalOffset+F];else g.deletionLines.push(...O);if(k.additionSegments.length>0)for(const j of k.additionSegments)for(let F=0;F<j.count;F++)g.additionLines[j.targetIndex+F]=z[j.originalOffset+F];else g.additionLines.push(...z)}return{code:g,themeStyles:p,baseThemeType:f}}function pV({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:i,deletionDecorations:o,additionDecorations:s,lineDiffType:l,maxLineDiffLength:c}){if(e==null||t==null||l==="none"||(e=rr(e),t=rr(t),e.length>c||t.length>c))return;const d=l==="char"?l5(e,t):d5(e,t),f=[],p=[],m=l==="word-alt",g=d.at(-1);for(const x of d){const S=x===g;!x.added&&!x.removed?(Nc({item:x,arr:f,enableJoin:m,isNeutral:!0,isLastItem:S}),Nc({item:x,arr:p,enableJoin:m,isNeutral:!0,isLastItem:S})):x.removed?Nc({item:x,arr:f,enableJoin:m,isLastItem:S}):Nc({item:x,arr:p,enableJoin:m,isLastItem:S})}let v=0;for(const x of f)x[0]===1&&o.push(qC({line:n,spanStart:v,spanLength:x[1].length})),v+=x[1].length;v=0;for(const x of p)x[0]===1&&s.push(qC({line:i,spanStart:v,spanLength:x[1].length})),v+=x[1].length}function mV(){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 gV({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:i,highlighter:o,deletionDecorations:s,additionDecorations:l,languageOverride:c,options:{theme:d=mt,...f}}){const p=c??Jt(e.name),m=c??Jt(t.name),{state:g,transformers:v}=WT(f.useTokenTransformer),x=typeof d=="string"?{...f,lang:"text",theme:d,transformers:v,decorations:void 0,defaultColor:!1,cssVariablePrefix:En("token"),tokenizeTimeLimit:0}:{...f,lang:"text",themes:d,transformers:v,decorations:void 0,defaultColor:!1,cssVariablePrefix:En("token"),tokenizeTimeLimit:0};return{deletionLines:e.contents===""?[]:(x.lang=p,g.lineInfo=n,x.decorations=s,Pg(o.codeToHast(rr(e.contents),x))),additionLines:t.contents===""?[]:(x.lang=m,x.decorations=l,g.lineInfo=i,Pg(o.codeToHast(rr(t.contents),x)))}}function Ki(e,t){const n=zo({name:e.prevName??e.name,contents:e.deletionLines.join("")},{name:e.name,contents:e.additionLines.join(""),lang:e.lang},t);return{hunks:n.hunks,splitLineCount:n.splitLineCount,unifiedLineCount:n.unifiedLineCount,additionLines:n.additionLines,deletionLines:n.deletionLines,type:n.type}}function yV(e,t){const n=Math.max(e,1);let i=Array.from({length:n},(o,s)=>`${" ".repeat(s+1)}
|
|
1547
|
-
`).join("");return i===t&&(i=Array.from({length:n},(o,s)=>`\0${" ".repeat(s)}
|
|
1548
|
-
`).join("")),i}function vV(e){for(const t of e)if(t.trim().length>0)return!1;return!0}function Fg(e,t){return t.length>0&&t.length<e.deletionLines.length&&vV(t)}function zd(e,t,n){const i=e.deletionLines.join(""),o=yV(t.length,i),s=zo({name:e.prevName??e.name,contents:i},{name:e.name,contents:o,lang:e.lang},n);return{hunks:s.hunks,splitLineCount:s.splitLineCount,unifiedLineCount:s.unifiedLineCount,additionLines:t,deletionLines:s.deletionLines,type:s.type}}function ad(e,t){return zd(e,[""],t)}function SA(e,t){if(e.additionLines.length===0)return ad(e,t);if(Fg(e,e.additionLines))return zd(e,e.additionLines,t);const n=e.additionLines,i=Ki(e,t);return _A(i,n),i}function bV(e){return e.length>1&&e.at(-1)===""}function _A(e,t){if(!bV(t))return;const n=t.length-e.additionLines.length;if(n<=0)return;const i=e.additionLines.length,o=e.hunks.at(-1);if(o!=null&&hn(o.additionStart,o.additionCount)===i){for(const s of o.hunkContent)if(s.type==="change"&&s.additions<s.deletions&&s.additionLineIndex+s.additions===i){e.additionLines=t,s.additions+=n,o.additionCount+=n,o.additionLines+=n,Yy(e);return}}}function xV(e,t,n){if(e.isPartial||e.deletionLines.length!==e.additionLines.length)return Yi(e,Ki(e,n));const i=Array.from(t);if(i.length===0)return Yi(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type});for(const s of i){const l=e.additionLines[s],c=e.deletionLines[s];if(l==null||c==null||rr(l)===rr(c))return Yi(e,Ki(e,n))}const o=SV(e,i);if(o.size===0)return Yi(e,Ki(e,n));for(const s of o)if(!CV(e,s,n))return Yi(e,Ki(e,n));return Yy(e),rV(e)?Yi(e,Ki(e,n)):Yi(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type})}function Yi(e,t){return Object.assign(e,t),t}function SV(e,t){const n=new Set;for(const i of t){const o=_V(e,i);if(o==null)return new Set;n.add(o)}return n}function _V(e,t){for(const[n,i]of e.hunks.entries()){const o=i.additionLineIndex+i.additionCount;if(t>=i.additionLineIndex&&t<o)return n}}function CV(e,t,n){const i=e.hunks[t];if(i==null)return!1;const o=e.deletionLines.slice(i.deletionLineIndex,i.deletionLineIndex+i.deletionCount),s=e.additionLines.slice(i.additionLineIndex,i.additionLineIndex+i.additionCount),l=zo({name:e.prevName??e.name,contents:o.join("")},{name:e.name,contents:s.join(""),lang:e.lang},{...n,context:0}),c=l.hunks[0];return c==null||l.hunks.length!==1?!1:(wV(i,c),CA(e,t),!0)}function CA(e,t){const n=e.hunks[t];if(n==null)return;if(t!==e.hunks.length-1){n.noEOFCRAdditions=!1,n.noEOFCRDeletions=!1;return}const i=e.additionLines.at(-1),o=e.deletionLines.at(-1);n.noEOFCRAdditions=i!=null&&i!==""&&!i.endsWith(`
|
|
1549
|
-
`),n.noEOFCRDeletions=o!=null&&o!==""&&!o.endsWith(`
|
|
1550
|
-
`)}function wV(e,t){const n=e.additionLineIndex,i=e.deletionLineIndex;e.hunkContent=t.hunkContent.map(o=>wA(o,n,i)),e.additionLineIndex=n+t.additionLineIndex,e.additionStart=e.additionStart+t.additionLineIndex,e.additionCount=t.additionCount,e.additionLines=t.additionLines,t.deletionLineIndex>=0&&(e.deletionLineIndex=i+t.deletionLineIndex,e.deletionStart=e.deletionStart+t.deletionLineIndex),e.deletionCount=t.deletionCount,e.deletionLines=t.deletionLines,e.noEOFCRAdditions=t.noEOFCRAdditions,e.noEOFCRDeletions=t.noEOFCRDeletions,Wy(e)}function wA(e,t,n){return{...e,additionLineIndex:e.additionLineIndex+t,deletionLineIndex:e.deletionLineIndex+n}}function Wy(e){let t=0,n=0;for(const i of e.hunkContent)i.type==="context"?(t+=i.lines,n+=i.lines):(t+=Math.max(i.additions,i.deletions),n+=i.additions+i.deletions);e.splitLineCount=t,e.unifiedLineCount=n}function Yy(e){let t=0,n=0,i=0;for(const o of e.hunks)o.collapsedBefore=Math.max(wi(o.additionStart,o.additionCount)-i,0),o.splitLineStart=t+o.collapsedBefore,o.unifiedLineStart=n+o.collapsedBefore,Wy(o),t+=o.collapsedBefore+o.splitLineCount,n+=o.collapsedBefore+o.unifiedLineCount,i=hn(o.additionStart,o.additionCount);if(e.hunks.length>0){const o=e.hunks[e.hunks.length-1],s=Math.max(e.additionLines.length-hn(o.additionStart,o.additionCount),0);t+=s,n+=s}e.splitLineCount=t,e.unifiedLineCount=n}const WC=new WeakMap;function EV(e){return e.length>1&&e[e.length-1]===""?e.slice(0,-1):e}function kV(e,t){const n=Math.min(e.length,t.length);let i=0;for(;i<n&&e[i]===t[i];)i++;let o=e.length,s=t.length;for(;o>i&&s>i&&e[o-1]===t[s-1];)o--,s--;if(!(i===o&&i===s))return{start:i,deletionEnd:o,additionEnd:s}}function Gg(e,t){const n=e.hunks,i=e.additionLines,o=EV(i),s=o===i?e:{...e,additionLines:o},l=NV(n,IV(s,t),e.deletionLines.length),c=HV(s,l);if(e.additionLines=o,e.hunks=c,e.editSessionDirty=!0,VV(e),_A(e,i),!!BV(n,e.hunks))return{regions:l.map(d=>d.previousSpan)}}function TV(e,t,n,i){const o=Array.from(new Set(t)).filter(d=>d>=0&&d<e.additionLines.length).sort((d,f)=>d-f);if(o.length===0)return;const{hunks:s}=e;let l,c=0;for(const d of o){for(;c<s.length;){const m=s[c];if(d<Pd(m)+m.additionCount)break;c++}const f=s[c],p=f==null?void 0:Pd(f);if(p==null||d<p||l!=null&&l!==c)return Gg(e,n);l=c}if(l!=null){if(AV(e,o,l,i,n)){e.editSessionDirty=!0;return}return Gg(e,n)}}function AV(e,t,n,i,o){if(i==null||o?.ignoreWhitespace===!0||o?.stripTrailingCr===!0)return!1;const s=LV(e),l=e.hunks[n];if(l.hunkContent.some(RV))return!1;for(const c of t){const d=i.get(c),f=e.additionLines[c];if(d==null||f==null||s.has(d)||s.has(f))return!1;let p=!1;for(const m of l.hunkContent)if(m.type==="change"&&m.additions===m.deletions&&c>=m.additionLineIndex&&c<m.additionLineIndex+m.additions){p=!0;break}if(!p)return!1}return!0}function LV(e){const t=WC.get(e);if(t?.lines===e.deletionLines)return t.set;const n=new Set(e.deletionLines);return WC.set(e,{lines:e.deletionLines,set:n}),n}function RV(e){return e?.type==="change"&&(e.additions===0||e.deletions===0)}function OV(e,t){const n=new Map,{regions:i}=t;for(let o=0;o<=i.length;o++){const s=i[o-1],l=i[o],c=o===0?e.get(0):s==null?void 0:e.get(s.lastIndex+1),d=l==null?void 0:e.get(l.firstIndex),f=c?.fromStart??0,p=d?.fromEnd??0;(f>0||p>0)&&n.set(o,{fromStart:f,fromEnd:p})}return n}function DV(e,t,n){const i=[];if(e.isPartial)return i;for(const[s,l]of e.hunks.entries()){const c=or({isPartial:e.isPartial,rangeSize:l.collapsedBefore,expandedHunks:t,hunkIndex:s,collapsedContextThreshold:n});if(c.rangeSize<=n)continue;const d=jo(l),f=d-c.rangeSize;c.fromStart>0&&i.push([f,f+c.fromStart]),c.fromEnd>0&&i.push([d-c.fromEnd,d])}const o=ar({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:"captureExpansionAnchors"});if(o!=null&&o.fromStart>0&&o.rangeSize>n){const s=e.hunks[e.hunks.length-1],l=jo(s)+s.deletionCount;i.push([l,l+o.fromStart])}return i}function MV(e,t){const n=new Map;if(t.length===0)return n;const i=(s,l,c)=>{if(c<=l)return;let d=0,f=0;for(const[p,m]of t)m<=l||p>=c||(p<=l&&(d=Math.max(d,Math.min(m,c)-l)),m>=c&&(f=Math.max(f,c-Math.max(p,l))));(d>0||f>0)&&n.set(s,{fromStart:d,fromEnd:f})};for(const[s,l]of e.hunks.entries()){const c=jo(l);i(s,c-Math.max(l.collapsedBefore,0),c)}const o=e.hunks[e.hunks.length-1];return o!=null&&!e.isPartial&&e.deletionLines.length>0&&i(e.hunks.length,jo(o)+o.deletionCount,e.deletionLines.length),n}function YC(e,t){return e.editSessionDirty!==!0?!1:(e.editSessionDirty=void 0,Object.assign(e,e.additionLines.length<=1&&e.additionLines.join("")===""?Ki(e,t):SA(e,t)),!0)}function IV(e,t){if(kV(e.deletionLines,e.additionLines)==null)return[];const n=zo({name:e.prevName??e.name,contents:e.deletionLines.join("")},{name:e.name,contents:e.additionLines.join(""),lang:e.lang},t),i=[];let o=0,s=0;for(const l of n.hunks){const c=l.additionCount>0?l.additionLineIndex-o:l.deletionLineIndex-s;o+=c,s+=c;for(const d of l.hunkContent){if(d.type==="context"){o+=d.lines,s+=d.lines;continue}const f=wA(d,0,0);f.additions===0&&(f.additionLineIndex=o),f.deletions===0&&(f.deletionLineIndex=s),i.push(f),o+=f.additions,s+=f.deletions}}return i}function NV(e,t,n){const i=e.map((l,c)=>{const d=jo(l);return{deletionStart:d,deletionEnd:d+l.deletionCount,blocks:[],previousSpan:{firstIndex:c,lastIndex:c}}}),o=[];let s=0;for(const l of t){const c=l.deletionLineIndex,d=c+l.deletions;for(;s<i.length&&i[s].deletionEnd<c;)o.push(i[s]),s++;let f=o.length>0&&zV(c,d,o[o.length-1])?o.pop():void 0;for(;s<i.length&&i[s].deletionStart<=d;)f=PV(f,i[s]),s++;if(f==null){let p=c,m=d;if((l.deletions===0||l.additions===0)&&n>l.deletions){const g=o[o.length-1]?.deletionEnd??0,v=i[s]?.deletionStart??n;c>g?p--:d<v&&m++}f={deletionStart:p,deletionEnd:m,blocks:[],previousSpan:void 0}}f.deletionStart=Math.min(f.deletionStart,c),f.deletionEnd=Math.max(f.deletionEnd,d),f.blocks.push(l),o.push(f)}for(;s<i.length;)o.push(i[s]),s++;return o}function zV(e,t,n){return e<=n.deletionEnd&&t>=n.deletionStart}function PV(e,t){return e==null?t:(e.deletionStart=Math.min(e.deletionStart,t.deletionStart),e.deletionEnd=Math.max(e.deletionEnd,t.deletionEnd),e.blocks.push(...t.blocks),t.previousSpan!=null&&(e.previousSpan??={...t.previousSpan},e.previousSpan.firstIndex=Math.min(e.previousSpan.firstIndex,t.previousSpan.firstIndex),e.previousSpan.lastIndex=Math.max(e.previousSpan.lastIndex,t.previousSpan.lastIndex)),e)}function HV(e,t){const n=[];let i=0,o=0;for(const s of t){const l=s.deletionStart-i;if(l<0)throw new Error("buildRegionHunks: overlapping old-side regions");i+=l,o+=l;const c=o,d=[];for(const p of s.blocks){const m=p.deletionLineIndex-i,g=p.additionLineIndex-o;if(m<0||m!==g)throw new Error("buildRegionHunks: canonical block context mismatch");XC(d,m,o,i),i+=m,o+=g,d.push({...p}),i+=p.deletions,o+=p.additions}const f=s.deletionEnd-i;if(f<0)throw new Error("buildRegionHunks: block exceeds its old-side region");XC(d,f,o,i),i+=f,o+=f,n.push(jV(e,{additionStart:c,additionEnd:o,deletionStart:s.deletionStart,deletionEnd:s.deletionEnd},d))}if(e.deletionLines.length-i!==e.additionLines.length-o)throw new Error("buildRegionHunks: trailing context mismatch");return n}function jV(e,t,n){const i=t.additionEnd-t.additionStart,o=t.deletionEnd-t.deletionStart;let s=0,l=0;for(const d of n)d.type==="change"&&(s+=d.additions,l+=d.deletions);const c={collapsedBefore:0,additionStart:Pc(t.additionStart,i),additionCount:i,additionLines:s,additionLineIndex:QC(t.additionStart,i),deletionStart:Pc(t.deletionStart,o),deletionCount:o,deletionLines:l,deletionLineIndex:QC(t.deletionStart,o),hunkContent:n,hunkSpecs:`@@ -${Pc(t.deletionStart,o)},${o} +${Pc(t.additionStart,i)},${i} @@`,splitLineStart:0,splitLineCount:0,unifiedLineStart:0,unifiedLineCount:0,noEOFCRAdditions:!1,noEOFCRDeletions:!1};return Wy(c),c}function XC(e,t,n,i){t>0&&e.push({type:"context",lines:t,additionLineIndex:n,deletionLineIndex:i})}function BV(e,t){if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++){const i=e[n],o=t[n];if(jo(i)!==jo(o)||i.deletionCount!==o.deletionCount||Pd(i)!==Pd(o)||i.additionCount!==o.additionCount||i.splitLineCount!==o.splitLineCount||!UV(i,o))return!0}return!1}function UV(e,t){const n=KC(e),i=KC(t);for(;;){const o=n.next(),s=i.next();if(o.done===!0||s.done===!0)return o.done===s.done;if(o.value[0]!==s.value[0]||o.value[1]!==s.value[1])return!1}}function*KC(e){for(const t of e.hunkContent){if(t.type==="context"){for(let i=0;i<t.lines;i++)yield[t.deletionLineIndex+i,t.additionLineIndex+i];continue}const n=Math.max(t.deletions,t.additions);for(let i=0;i<n;i++)yield[i<t.deletions?t.deletionLineIndex+i:void 0,i<t.additions?t.additionLineIndex+i:void 0]}}function Pd(e){return wi(e.additionStart,e.additionCount)}function jo(e){return wi(e.deletionStart,e.deletionCount)}function Pc(e,t){return t===0?e:e+1}function QC(e,t){return t===0?e-1:e}function VV(e){Yy(e);for(let t=0;t<e.hunks.length;t++)CA(e,t)}function Ya(e){const t=e.lang??Jt(e.name),n=e.lang??(e.prevName!=null?Jt(e.prevName):"text");return t==="text"&&n==="text"}let FV=-1;var GV=class{options;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++FV}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;editSessionActive=!1;constructor(e={theme:mt},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=yl(e.theme??mt)?VT():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),this.endEditSession()}beginEditSession(){this.editSessionActive=!0;const e=this.diffCache;e!=null&&!e.isPartial&&e.additionLines.length===0&&(Object.assign(e,ad(e,this.options.parseDiffOptions)),this.markEditSessionPass(e),this.clearRenderCache())}endEditSession(){this.editSessionActive=!1}editorRenderReady(){return this.renderCache?.options.useTokenTransformer===!0&&this.renderCache.highlighted&&this.renderCache.result!=null}refreshHighlightedResult(){const{renderCache:e}=this;if(e==null||Ya(e.diff)||Bc(e.diff,this.getTokenizeMaxLength()))return Promise.resolve();const{diff:t}=e,{workerManager:n}=this;return!this.editSessionActive&&n?.isWorkingPool()===!0&&t.cacheKey!=null?(n.evictDiffFromCache(t.cacheKey),n.primeDiffHighlightCache(t).then(()=>{this.applyRefreshedResult(t,n.getDiffResultCache(t))}).catch(i=>this.onHighlightError(i))):this.asyncHighlight(t).then(i=>this.applyRefreshedResult(t,i)).catch(i=>this.onHighlightError(i))}applyRefreshedResult(e,t){if(t==null||this.renderCache==null||this.renderCache.diff!==e||this.editSessionActive)return;const{options:n}=this.getRenderOptions(e);mi(n,t.options)&&(this.renderCache={diff:e,options:t.options,highlighted:!0,result:t.result,renderRange:void 0},this.onRenderUpdate?.())}get diffCache(){return this.renderCache?.diff??this.diff}clearRenderCache(){const e=this.renderCache;this.renderCache=void 0,e!=null&&e.isDirty===!0&&e.diff.cacheKey!=null&&this.workerManager?.evictDiffFromCache(e.diff.cacheKey)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){const i={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t==="up"||t==="both")&&(i.fromStart+=n),(t==="down"||t==="both")&&(i.fromEnd+=n),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,i)}getExpandedHunk(e){return this.expandedHunks.get(e)??z8}getExpandedHunksMap(){return this.expandedHunks}setExpandedHunksMap(e){this.expandedHunks=e}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(const t of e){const n=(()=>{switch(t.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),i=n[t.lineNumber]??[];n[t.lineNumber]=i,i.push(t)}}updateRenderCache(e,t,n=!1){if(this.renderCache==null)return!1;const{result:i,diff:o}=this.renderCache;if(i==null)return!1;if(o.isPartial)throw new Error("Could not update render cache for partial diff");const s=i.code.additionLines,l=[],c=new Map;for(const[f,p]of e){const m=s[f]?.properties??{},g=p.map(w=>w[2]).join(""),v=f<o.additionLines.length,x=v?o.additionLines[f]??"":"",S=rr(x);v&&(o.additionLines[f]=QT(x,g),S!==g&&(l.push(f),c.set(f,x))),s[f]={type:"element",tagName:"div",properties:{"data-line":m["data-line"]??f+1,"data-line-index":m["data-line-index"]??f,"data-line-type":m["data-line-type"]??"context"},children:p.map(([w,_,C])=>w===0&&_===""?C===""?{type:"element",tagName:"br",properties:{},children:[]}:{type:"text",value:C}:{type:"element",tagName:"span",properties:{"data-char":w,style:`color:${_};`},children:[{type:"text",value:C}]})}}let d=!1;if(l.length>0)if(this.editSessionActive&&!o.isPartial){if(!n)if(o.additionLines.length<=1&&o.additionLines.join("")==="")Object.assign(o,ad(o,this.options.parseDiffOptions)),this.markEditSessionPass(o),d=!0;else if(Fg(o,o.additionLines))Object.assign(o,zd(o,o.additionLines,this.options.parseDiffOptions)),this.markEditSessionPass(o),d=!0;else{const f=TV(o,l,this.options.parseDiffOptions,c);this.applyExpansionRemap(f),d=f!=null}}else Object.assign(o,xV(o,l,this.options.parseDiffOptions));return i.baseThemeType=t,this.renderCache.isDirty=!0,d}applyExpansionRemap(e){e!=null&&(this.expandedHunks=OV(this.expandedHunks,e))}applyDocumentChange(e){if(this.renderCache==null)return;const{diff:t,result:n}=this.renderCache;if(n==null)return;if(t.isPartial)throw new Error("Could not apply document change for partial diff");const{additionLines:i}=t;t.additionLines=YV(e,i),n.code.additionLines=WV(i,t.additionLines,n.code.additionLines,e),t.additionLines.length<=1&&t.additionLines.join("")===""?(Object.assign(t,ad(t,this.options.parseDiffOptions)),n.code.additionLines[0]=$g(0,e.getLineText(0)),this.markEditSessionPass(t)):this.editSessionActive?this.applySessionDocumentChange(t):Object.assign(t,SA(t,this.options.parseDiffOptions)),this.renderCache.isDirty=!0}applySessionDocumentChange(e){const{parseDiffOptions:t}=this.options,n=e.additionLines;if(Fg(e,n)){Object.assign(e,zd(e,n,t)),this.markEditSessionPass(e);return}this.applyExpansionRemap(Gg(e,t))}markEditSessionPass(e){this.editSessionActive&&(e.editSessionDirty=!0)}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e,contentProperties:{"data-line-type":e}}}getSplitLineDecoration({side:e,type:t}){const n=t==="change"?e==="deletions"?"change-deletion":"change-addition":t;return{gutterLineType:n,contentProperties:{"data-line-type":n}}}createAnnotationElement=e=>zg(e);getOptionsWithDefaults(){const{diffIndicators:e="bars",diffStyle:t="split",disableBackground:n=!1,disableFileHeader:i=!1,disableLineNumbers:o=!1,disableVirtualizationBuffers:s=!1,collapsed:l=!1,expandUnchanged:c=!1,collapsedContextThreshold:d=1,expansionLineCount:f=100,hunkSeparators:p="line-info",lineDiffType:m="word-alt",maxLineDiffLength:g=1e3,overflow:v="scroll",stickyHeader:x=!1,theme:S=mt,headerRenderMode:w="default",tokenizeMaxLineLength:_=1e3,tokenizeMaxLength:C=N8,useTokenTransformer:k=!1,useCSSClasses:D=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:i,disableLineNumbers:o,disableVirtualizationBuffers:s,collapsed:l,expandUnchanged:c,collapsedContextThreshold:d,expansionLineCount:f,hunkSeparators:p,lineDiffType:m,maxLineDiffLength:g,overflow:v,stickyHeader:x,theme:this.workerManager?.getDiffRenderOptions().theme??S,headerRenderMode:w,tokenizeMaxLineLength:_,tokenizeMaxLength:C,useTokenTransformer:k,useCSSClasses:D}}async initializeHighlighter(){return this.highlighter=await Dd($T(this.computedLang,{theme:this.getLocalHighlightTheme(),preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter})),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;const{options:t}=this.getRenderOptions(e),n=Bc(e,this.getTokenizeMaxLength());let i=this.workerManager?.getDiffResultCache(e);i!=null&&!mi(t,i.options)&&(i=void 0),this.renderCache??={diff:e,highlighted:!n&&!Ya(e),options:t,result:n?void 0:i?.result,renderRange:void 0},!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter==null&&(this.computedLang=e.lang??Jt(e.name),this.initializeHighlighter())}getLocalHighlightTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??mt}getEffectiveCodeOptions(){const e=this.workerManager?.isWorkingPool()===!0?this.workerManager.getDiffRenderOptions():void 0;return{theme:this.getLocalHighlightTheme(),tokenizeMaxLineLength:e?.tokenizeMaxLineLength??this.options.tokenizeMaxLineLength}}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0){const c=this.workerManager.getDiffRenderOptions();return this.editSessionActive&&c.useTokenTransformer!==!0?{...c,useTokenTransformer:!0}:c}const{theme:i,tokenizeMaxLineLength:o,lineDiffType:s,maxLineDiffLength:l}=this.getOptionsWithDefaults();return{theme:i,useTokenTransformer:this.editSessionActive||this.options.useTokenTransformer===!0,tokenizeMaxLineLength:o,lineDiffType:s,maxLineDiffLength:l}})();this.getOptionsWithDefaults();const{renderCache:n}=this;return n?.result==null?{options:t,forceHighlight:!0}:!Eo(e,n.diff)||!mi(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}renderDiff(e=this.renderCache?.diff,t=gd){if(e==null)return;const{expandUnchanged:n,collapsedContextThreshold:i}=this.getOptionsWithDefaults();let{options:o,forceHighlight:s}=this.getRenderOptions(e);const l=this.getMatchingWorkerResultCache(e,o);l!=null&&!this.hasHighlightedRenderCache(e,o)&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...l},s=!1),this.renderCache??={diff:e,highlighted:!1,options:o,result:void 0,renderRange:void 0};const c=e.additionLines.length>0||e.deletionLines.length>0,d=!c||Ya(e)||Bc(e,this.getTokenizeMaxLength()),f=!Eo(e,this.renderCache.diff),p=!ff(this.renderCache.renderRange,t);if(!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0){const m=this.renderCache.result==null&&this.renderCache.highlighted&&!d&&!f&&Vg(t);m&&(this.renderCache.highlightPending=!0),!m&&(d||this.renderCache.result==null||!this.renderCache.highlighted&&(f||p))&&(this.renderCache.diff=e,this.renderCache.options=o,this.renderCache.highlighted=!1,(this.renderCache.result==null||f||p||s)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,Vg(t)||n?!0:this.expandedHunks,i)),this.renderCache.renderRange=t),!d&&c&&(!this.renderCache.highlighted||s)&&this.workerManager.highlightDiffAST(this,e)}else{this.computedLang=e.lang??Jt(e.name);const m=this.highlighter!=null&&yl(o.theme),g=this.highlighter!=null&&xd(this.computedLang),v=!d&&g;if(this.highlighter!=null&&m&&(s||d||!this.renderCache.highlighted&&v||this.renderCache.result==null)){const{result:x,options:S}=this.renderDiffWithHighlighter(e,this.highlighter,d||!g);this.renderCache={diff:e,options:S,highlighted:v,result:x,renderRange:void 0}}(!m||!d&&!g)&&this.asyncHighlight(e).then(({result:x,options:S})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.applyHighlightResult(e,x,S,!d)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,t,this.renderCache.result):void 0}async asyncRender(e,t=gd){const{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){const{diffIndicators:i,disableBackground:o,disableLineNumbers:s,overflow:l}=this.getOptionsWithDefaults();return GT({type:"diff",diffIndicators:i,disableBackground:o,disableLineNumbers:s,overflow:l,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e){const t=Bc(e,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??Jt(e.name);const n=this.highlighter!=null&&yl(this.getLocalHighlightTheme()),i=t||this.highlighter!=null&&xd(this.computedLang);return(this.highlighter==null||!n||!i)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,n=!1){const{options:i}=this.getRenderOptions(e),{collapsedContextThreshold:o}=this.getOptionsWithDefaults(),s=xA(e,t,i,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:o});if(this.editSessionActive&&e.additionLines.length===1&&e.additionLines[0]===""&&s.code.additionLines[0]==null){let l;if(Lo({diff:e,diffStyle:"both",expandedHunks:n?!0:void 0,collapsedContextThreshold:o,callback:({additionLine:c})=>{if(c?.lineIndex===0)return l=c,!0}}),l==null)throw new Error("DiffHunksRenderer: missing empty addition line");s.code.additionLines[0]=$g(0,"",l.unifiedLineIndex,l.splitLineIndex)}return{result:s,options:i}}onHighlightSuccess(e,t,n,i=!0){this.editSessionActive||this.applyHighlightResult(e,t,n,i)}applyHighlightResult(e,t,n,i=!0){if(this.renderCache==null)return;const o=this.renderCache.highlightPending===!0||!this.renderCache.highlighted||!mi(this.renderCache.options,n)||!Eo(this.renderCache.diff,e);this.renderCache={diff:e,options:n,highlighted:i,result:t,renderRange:void 0},o&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){if(this.editSessionActive)return;const n=this.workerManager?.getDiffResultCache(e);if(!(n==null||!mi(t,n.options)))return n}hasHighlightedRenderCache(e,t){const{renderCache:n}=this;return n?.result!=null&&n.highlighted&&Eo(e,n.diff)&&mi(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(e,t,{code:n,themeStyles:i,baseThemeType:o}){const{diffStyle:s,disableFileHeader:l,expandUnchanged:c,expansionLineCount:d,collapsedContextThreshold:f,hunkSeparators:p}=this.getOptionsWithDefaults(),m=this.renderCache?.isDirty??!1;this.diff=e;const g=s==="unified",v=QV(e,this.options.loadDiffFiles!=null),x=!e.isPartial||v;let S=[],w=[],_=[];const C=[],{additionLines:k,deletionLines:D}=n,M={rowCount:0,hunkSeparators:p,additionsContentAST:S,deletionsContentAST:w,unifiedContentAST:_,unifiedGutterAST:Ba(),deletionsGutterAST:Ba(),additionsGutterAST:Ba(),expansionLineCount:d,hunkData:C,incrementRowCount(P=1){M.rowCount+=P},pushToGutter(P,$){switch(P){case"unified":M.unifiedGutterAST.children.push($);break;case"deletions":M.deletionsGutterAST.children.push($);break;case"additions":M.additionsGutterAST.children.push($);break}}},O=gA({fileDiff:e,errorPrefix:"DiffHunksRenderer.processDiffResult"}),z={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"?(M.pushToGutter("additions",wn(void 0,"buffer",this.size)),S?.push(Mc(this.size))):(M.pushToGutter("deletions",wn(void 0,"buffer",this.size)),w?.push(Mc(this.size))),this.size=0,this.side=void 0}}},j=(P,$,ne,ue,R)=>{M.pushToGutter(P,gk($,ne,ue,R))};function F(P){z.flush(),s==="unified"?km("unified",P,M):(km("deletions",P,M),km("additions",P,M))}this.pushFileLevelAnnotations(e,s,t,M),Lo({diff:e,diffStyle:s,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:c?!0:this.expandedHunks,collapsedContextThreshold:f,callback:({hunkIndex:P,hunk:$,collapsedBefore:ne,collapsedAfter:ue,additionLine:R,deletionLine:H,type:Y})=>{const I=H!=null?H.splitLineIndex:R.splitLineIndex,le=R!=null?R.unifiedLineIndex:H.unifiedLineIndex;s==="split"&&Y!=="change"&&z.flush(),ne>0&&F({hunkIndex:P,collapsedLines:ne,rangeSize:Math.max($?.collapsedBefore??0,0),hunkSpecs:$?.hunkSpecs,isFirstHunk:P===0,isLastHunk:!1,isExpandable:x});const fe=s==="unified"?le:I,re={type:Y,hunkIndex:P,lineIndex:fe,unifiedLineIndex:le,splitLineIndex:I,deletionLine:H,additionLine:R};if(s==="unified"){const je=this.getUnifiedInjectedRowsForLine?.(re);je?.before!=null&&JC(je.before,M);let Ve=H!=null?D[H.lineIndex]:void 0,rt=R!=null?k[R.lineIndex]:void 0;if(Ve==null&&rt==null){const Ut="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(Ut,{file:e.name}),new Error(Ut)}const en=Y==="change"?R!=null?"change-addition":"change-deletion":Y,Bt=this.getUnifiedLineDecoration({type:Y,lineType:en,additionLineIndex:R?.lineIndex,deletionLineIndex:H?.lineIndex});j("unified",Bt.gutterLineType,R!=null?R.lineNumber:H.lineNumber,`${le},${I}`,Bt.gutterProperties),rt!=null?rt=jc(rt,Bt.contentProperties,m&&R!=null?{"data-line":R.lineNumber,"data-line-index":`${le},${I}`}:void 0):Ve!=null&&(Ve=jc(Ve,Bt.contentProperties,m&&H!=null?{"data-line":H.lineNumber,"data-line-index":`${le},${I}`}:void 0)),Hc({diffStyle:"unified",type:Y,deletionLine:Ve,additionLine:rt,unifiedSpan:this.getAnnotations("unified",H?.lineNumber,R?.lineNumber,P,fe),createAnnotationElement:Ut=>this.createAnnotationElement(Ut),context:M}),je?.after!=null&&JC(je.after,M)}else{const je=this.getSplitInjectedRowsForLine?.(re);je?.before!=null&&ew(je.before,M,z);let Ve=H!=null?D[H.lineIndex]:void 0,rt=R!=null?k[R.lineIndex]:void 0;const en=this.getSplitLineDecoration({side:"deletions",type:Y,lineIndex:H?.lineIndex}),Bt=this.getSplitLineDecoration({side:"additions",type:Y,lineIndex:R?.lineIndex});if(Ve==null&&rt==null){const dt="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(dt,{file:e.name}),new Error(dt)}const Ut=(()=>{if(Y==="change"){if(rt==null)return"additions";if(Ve==null)return"deletions"}})();Ut!=null?(z.side!=null&&z.side!==Ut&&z.flush(),z.side=Ut,z.increment()):Y==="change"&&z.flush();const Wt=this.getAnnotations("split",H?.lineNumber,R?.lineNumber,P,fe);if(Wt!=null&&z.size>0&&z.flush(),H!=null){const dt=jc(Ve,en.contentProperties,m?{"data-line":H.lineNumber,"data-line-index":`${H.unifiedLineIndex},${I}`}:void 0);j("deletions",en.gutterLineType,H.lineNumber,`${H.unifiedLineIndex},${I}`,en.gutterProperties),dt!=null&&(Ve=dt)}if(R!=null){const dt=jc(rt,Bt.contentProperties,m?{"data-line":R.lineNumber,"data-line-index":`${R.unifiedLineIndex},${I}`}:void 0);j("additions",Bt.gutterLineType,R.lineNumber,`${R.unifiedLineIndex},${I}`,Bt.gutterProperties),dt!=null&&(rt=dt)}Hc({diffStyle:"split",type:Y,additionLine:rt,deletionLine:Ve,...Wt,createAnnotationElement:dt=>this.createAnnotationElement(dt),context:M}),je?.after!=null&&ew(je.after,M,z)}const ce=s==="split"&&$!=null&&I===$.splitLineStart+$.splitLineCount-1,xe=P===e.hunks.length-1&&$!=null&&(s==="split"?I===$.splitLineStart+$.splitLineCount-1:le===$.unifiedLineStart+$.unifiedLineCount-1),pe=ce?$.noEOFCRDeletions:!1,ze=ce?$.noEOFCRAdditions:!1,He=(H?.noEOFCR??!1)||pe,st=(R?.noEOFCR??!1)||ze;if(st||He){if(s==="split"&&z.flush(),He){const je=Y==="context"||Y==="context-expanded"?Y:"change-deletion";s==="unified"?(M.unifiedContentAST.push(Ic(je)),M.pushToGutter("unified",wn(je,"metadata",1))):(M.deletionsContentAST.push(Ic(je)),M.pushToGutter("deletions",wn(je,"metadata",1)),st||(M.pushToGutter("additions",wn(void 0,"buffer",1)),M.additionsContentAST.push(Mc(1))))}if(st){const je=Y==="context"||Y==="context-expanded"?Y:"change-addition";s==="unified"?(M.unifiedContentAST.push(Ic(je)),M.pushToGutter("unified",wn(je,"metadata",1))):(M.additionsContentAST.push(Ic(je)),M.pushToGutter("additions",wn(je,"metadata",1)),He||(M.pushToGutter("deletions",wn(void 0,"buffer",1)),M.deletionsContentAST.push(Mc(1))))}M.incrementRowCount(1)}p!=="simple"&&p!=="metadata"&&(ue>0||xe&&v)&&F({hunkIndex:Y==="context-expanded"?P:P+1,collapsedLines:xe&&v?"unknown":ue,rangeSize:O,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:x}),M.incrementRowCount(1)}}),s==="split"&&z.flush();const ee=Math.max(iV(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),q=t.bufferBefore>0||t.bufferAfter>0,U=!g&&e.type!=="deleted",Z=!g&&e.type!=="new",X=M.rowCount>0||q;S=U&&X?S:void 0,w=Z&&X?w:void 0,_=g&&X?_:void 0;const W=this.createPreElement(w!=null&&S!=null,ee);return{unifiedGutterAST:g&&X?M.unifiedGutterAST.children:void 0,unifiedContentAST:_,deletionsGutterAST:Z&&X?M.deletionsGutterAST.children:void 0,deletionsContentAST:w,additionsGutterAST:U&&X?M.additionsGutterAST.children:void 0,additionsContentAST:S,hunkData:C,preNode:W,themeStyles:i,baseThemeType:o,headerElement:l?void 0:this.renderHeader(this.diff),totalLines:ee,rowCount:M.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderCodeAST(e,t){const n=e==="unified"?t.unifiedGutterAST:e==="deletions"?t.deletionsGutterAST:t.additionsGutterAST,i=e==="unified"?t.unifiedContentAST:e==="deletions"?t.deletionsContentAST:t.additionsContentAST;if(n==null||i==null)return;const o=Ba(n);return o.properties.style=`grid-row: span ${t.rowCount}`,[o,ZT(i,t.rowCount)]}renderFullAST(e,t=[]){const n=this.getOptionsWithDefaults().hunkSeparators==="line-info",i=this.renderCodeAST("unified",e);if(i!=null)return t.push(Te({tagName:"code",children:i,properties:{"data-code":"","data-container-size":n?"":void 0,"data-unified":""}})),{...e.preNode,children:t};const o=this.renderCodeAST("deletions",e);o!=null&&t.push(Te({tagName:"code",children:o,properties:{"data-code":"","data-container-size":n?"":void 0,"data-deletions":""}}));const s=this.renderCodeAST("additions",e);return s!=null&&t.push(Te({tagName:"code",children:s,properties:{"data-code":"","data-container-size":n?"":void 0,"data-additions":""}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return Zt(this.renderFullAST(e,t))}renderPartialHTML(e,t){return t==null?Zt(e):Zt(Te({tagName:"code",children:e,properties:{"data-code":"","data-container-size":this.getOptionsWithDefaults().hunkSeparators==="line-info"?"":void 0,[`data-${t}`]:""}}))}pushFileLevelAnnotations(e,t,n,i){if(!hf(n))return;const o=e.type!=="new"?ZC(jg(this.deletionAnnotations)):[],s=e.type!=="deleted"?ZC(jg(this.additionAnnotations)):[];if(o.length===0&&s.length===0)return;const l=-1,c=-1,{createAnnotationElement:d}=this;if(t==="unified"){Hc({diffStyle:t,type:"context",unifiedSpan:{type:"annotation",hunkIndex:l,lineIndex:c,annotations:o.concat(s)},createAnnotationElement:d,context:i});return}Hc({diffStyle:t,type:"context",deletionSpan:{type:"annotation",hunkIndex:l,lineIndex:c,annotations:o},additionSpan:{type:"annotation",hunkIndex:l,lineIndex:c,annotations:s},createAnnotationElement:d,context:i})}getAnnotations(e,t,n,i,o){const s={type:"annotation",hunkIndex:i,lineIndex:o,annotations:[]};if(t!=null)for(const c of this.deletionAnnotations[t]??[])s.annotations.push(ei(c));const l={type:"annotation",hunkIndex:i,lineIndex:o,annotations:[]};if(n!=null)for(const c of this.additionAnnotations[n]??[])(e==="unified"?s:l).annotations.push(ei(c));if(e==="unified")return s.annotations.length>0?s:void 0;if(!(l.annotations.length===0&&s.annotations.length===0))return{deletionSpan:s,additionSpan:l}}renderHeader(e){const{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return FT({fileOrDiff:e,mode:t,stickyHeader:n})}};function ZC(e){return e?.map(t=>ei(t))??[]}const $V=new Intl.PluralRules("en-US");function qV(e){return`${e} unmodified line${$V.select(e)==="one"?"":"s"}`}function JC(e,t){for(const n of e)t.unifiedContentAST.push(n.content),t.pushToGutter("unified",n.gutter),t.incrementRowCount(1)}function ew(e,t,n){for(const{deletion:i,addition:o}of e){if(i==null&&o==null)continue;const s=i!=null&&o!=null?void 0:i==null?"deletions":"additions";(s==null||n.side!==s)&&n.flush(),i!=null&&(t.deletionsContentAST.push(i.content),t.pushToGutter("deletions",i.gutter)),o!=null&&(t.additionsContentAST.push(o.content),t.pushToGutter("additions",o.gutter)),s!=null&&(n.side=s,n.increment()),t.incrementRowCount(1)}}function Hc({diffStyle:e,type:t,deletionLine:n,additionLine:i,unifiedSpan:o,deletionSpan:s,additionSpan:l,createAnnotationElement:c,context:d}){let f=!1;if(e==="unified"){if(i!=null?d.unifiedContentAST.push(i):n!=null&&d.unifiedContentAST.push(n),o!=null){const p=t==="change"?n!=null?"change-deletion":"change-addition":t;d.unifiedContentAST.push(c(o)),d.pushToGutter("unified",wn(p,"annotation",1)),f=!0}}else if(e==="split"){if(n!=null&&d.deletionsContentAST.push(n),i!=null&&d.additionsContentAST.push(i),s!=null){const p=t==="change"?n!=null?"change-deletion":"context":t;d.deletionsContentAST.push(c(s)),d.pushToGutter("deletions",wn(p,"annotation",1)),f=!0}if(l!=null){const p=t==="change"?i!=null?"change-addition":"context":t;d.additionsContentAST.push(c(l)),d.pushToGutter("additions",wn(p,"annotation",1)),f=!0}}f&&d.incrementRowCount(1)}function km(e,{hunkIndex:t,collapsedLines:n,rangeSize:i,hunkSpecs:o,isFirstHunk:s,isLastHunk:l,isExpandable:c},d){if(typeof n=="number"&&n<=0)return;const f=e==="unified"?d.unifiedContentAST:e==="deletions"?d.deletionsContentAST:d.additionsContentAST;if(d.hunkSeparators==="metadata"){o!=null&&(d.pushToGutter(e,Ia({type:"metadata",content:o,isFirstHunk:s,isLastHunk:l})),f.push(Ia({type:"metadata",content:o,isFirstHunk:s,isLastHunk:l})),e!=="additions"&&d.incrementRowCount(1));return}if(d.hunkSeparators==="simple"){t>0&&(d.pushToGutter(e,Ia({type:"simple",isFirstHunk:s,isLastHunk:!1})),f.push(Ia({type:"simple",isFirstHunk:s,isLastHunk:!1})),e!=="additions"&&d.incrementRowCount(1));return}const p=nV(e,t),m=i>d.expansionLineCount,g=c?t:void 0,v=typeof n=="number"?qV(n):"More unchanged context may be available";d.pushToGutter(e,Ia({type:d.hunkSeparators,content:v,expandIndex:g,chunked:m,slotName:p,isFirstHunk:s,isLastHunk:l})),f.push(Ia({type:d.hunkSeparators,content:v,expandIndex:g,chunked:m,slotName:p,isFirstHunk:s,isLastHunk:l})),e!=="additions"&&d.incrementRowCount(1),d.hunkData.push({slotName:p,hunkIndex:t,lines:typeof n=="number"?n:0,lineCountKnown:typeof n=="number",type:e,expandable:c?{up:!s,down:!l,chunked:m}:void 0})}function jc(e,t,n){return e==null||e.type!=="element"||t==null&&n==null?e:{...e,properties:{...e.properties,...t,...n}}}function tw(e){return e.length>0&&e[e.length-1]===""?e.length-1:e.length}function WV(e,t,n,i){const o=tw(e),s=tw(t),l=Math.min(o,s);let c=0;for(;c<l&&e[c]===t[c];)c++;let d=0;for(;d<l-c&&e[o-1-d]===t[s-1-d];)d++;const f=new Array(t.length);for(let p=0;p<c;p++)f[p]=n[p];for(let p=0;p<d;p++)f[s-1-p]=n[o-1-p];o<e.length&&s<t.length&&(f[t.length-1]=n[e.length-1]);for(let p=e.length;p<t.length;p++)f[p]??=n[p];for(let p=c;p<t.length;p++)f[p]??=$g(p,i.getLineText(p));return f}function $g(e,t,n=e,i=e){return{type:"element",tagName:"div",properties:{"data-line":e+1,"data-line-index":`${n},${i}`,"data-line-type":"context"},children:[{type:"element",tagName:"span",properties:{"data-char":0},children:[{type:"text",value:t}]}]}}function YV(e,t){const n=[],i=KV(t);for(let o=0;o<e.lineCount;o++){const s=e.getLineText(o,!0);n.push(o<e.lineCount-1&&!XV(s)?s+i:s)}return n}function XV(e){return e.endsWith(`
|
|
1551
|
-
`)||e.endsWith("\r")}function KV(e){for(const t of e){if(t.endsWith(`\r
|
|
1552
|
-
`))return`\r
|
|
1553
|
-
`;if(t.endsWith(`
|
|
1554
|
-
`))return`
|
|
1555
|
-
`;if(t.endsWith("\r"))return"\r"}return`
|
|
1556
|
-
`}function Bc(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function QV(e,t){return e.isPartial&&t&&(e.type==="change"||e.type==="rename-changed")}function ZV(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function JV(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.lineCountKnown===t.lineCountKnown&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}async function qg(e,t=300){let n;try{await Promise.race([e(),new Promise(i=>{n=setTimeout(i,t)})])}finally{n!=null&&clearTimeout(n)}}function Wg({oldFile:e,newFile:t},n){if(!(e===void 0&&t===void 0)){if(e===void 0||t===void 0)throw new Error(`${n}: Pass null for an intentionally missing oldFile or newFile side`);if(e===null){if(t===null)throw new Error(`${n}: You must pass oldFile, newFile, or both`);return{oldFile:e,newFile:t}}return t===null?{oldFile:e,newFile:t}:{oldFile:e,newFile:t}}}function eF(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:dA(e),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,loadDiffFiles:e?.loadDiffFiles,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader!=null?"custom":"default"}}function tF(e){return e.isPartial&&(e.type==="change"||e.type==="rename-changed"||e.type==="rename-pure")}let nF=-1;var EA=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++nF}`;type="file-diff";fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerFilenameSuffix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;pendingFiles;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;editor;refreshViewTimeout;lineStateRefreshPending=!1;deferredSelectedLines;deferredEditorActiveLine;constructor(t={theme:mt},n,i=!1){this.options=t,this.workerManager=n,this.isContainerManaged=i,this.hunksRenderer=this.createHunksRenderer(t),this.resizeManager=new Ck,this.scrollSyncManager=new tV,this.interactionManager=new _k("diff",bd(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 eF(t)}createHunksRenderer(t){return new GV(this.getHunksRendererOptions(t),this.handleHighlightRender,this.workerManager)}getLineIndex=(t,n="additions")=>{const i=this.fileDiffCache;if(i==null)return;const o=i.hunks.at(-1);let s,l;e:for(const c of i.hunks){const d=n==="deletions"?c.deletionStart:c.additionStart,f=n==="deletions"?c.deletionCount:c.additionCount;let p=wi(d,f)+1,m=c.splitLineStart,g=c.unifiedLineStart;if(t<p){const v=p-t;s=Math.max(g-v,0),l=Math.max(m-v,0);break e}if(t>=p+f){if(c===o){const v=t-(p+f);s=g+c.unifiedLineCount+v,l=m+c.splitLineCount+v;break e}continue}for(const v of c.hunkContent)if(v.type==="context")if(t<p+v.lines){const x=t-p;l=m+x,s=g+x;break e}else p+=v.lines,m+=v.lines,g+=v.lines;else{const x=n==="deletions"?v.deletions:v.additions;if(t<p+x){const S=t-p;s=g+(n==="additions"?v.deletions:0)+S,l=m+S;break e}else p+=x,m+=Math.max(v.deletions,v.additions),g+=v.deletions+v.additions}break e}if(!(s==null||l==null))return[s,l]};setOptions(t){t!=null&&(this.options=t,this.cachedHeaderHTML=void 0,this.hunksRenderer.setOptions(this.getHunksRendererOptions(t)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(bd(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 n=this.appliedThemeCSS.baseThemeType??t;return this.appliedThemeCSS.themeType===n?!1:(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,t,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!ts(this.appliedThemeCSS.theme,this.options.theme??mt)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}canPartiallyRender(t,n,i){return!(t||n||i||typeof this.options.hunkSeparators=="function")}setSelectedLines(t,n){this.lineStateRefreshPending?this.deferredSelectedLines=[t,n]:this.interactionManager.setSelection(t,n)}setEditorActiveLine(t,n){this.lineStateRefreshPending?this.deferredEditorActiveLine=[t,n]:this.interactionManager.setEditorActiveLine(t,{lineNumberOnly:n?.lineNumberOnly,side:n?.side??"additions"})}flushDeferredLineState(){const{deferredEditorActiveLine:t,deferredSelectedLines:n}=this;this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,t!=null&&this.setEditorActiveLine(...t),n!=null&&this.interactionManager.setSelection(...n)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}const{diffStyle:t="split",overflow:n="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:n==="wrap",columnVariables:this.shouldApplyColumnVariables(n)?"apply":"measure"}),n==="scroll"&&t==="split"?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}shouldApplyColumnVariables(t){return typeof this.options.hunkSeparators=="function"?!0:t==="scroll"&&(this.lineAnnotations.length>0||this.pre?.hasAttribute("data-has-merge-conflict")===!0)}getCodeScrollLeft(){return Math.max(this.codeUnified?.scrollLeft??0,this.codeDeletions?.scrollLeft??0,this.codeAdditions?.scrollLeft??0)}setCodeScrollLeft(t){this.codeUnified!=null&&(this.codeUnified.scrollLeft=t),this.codeAdditions!=null&&(this.codeAdditions.scrollLeft=t),this.codeDeletions!=null&&(this.codeDeletions.scrollLeft=t)}__getEffectiveCodeOptions(){return{...this.options,...this.hunksRenderer.getEffectiveCodeOptions()}}cleanUp(t=!1){ug(this.handleEditSessionRender),this.emitPostRender(!0),this.editor?.cleanUp(t),this.editor=void 0,this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.pendingFiles=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?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder?.remove(),this.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,t||(this.cachedHeaderHTML=void 0),this.errorWrapper?.remove(),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.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate({fileContainer:t,prerenderedHTML:n,preventEmit:i=!1,lineAnnotations:o,fileDiff:s,...l}){if(!this.enabled)throw new Error("FileDiff.hydrate: attempting to call hydrate after cleaned up");if(this.fileContainer!=null)throw new Error("FileDiff.hydrate: hydrate can only be called before the instance has rendered or hydrated");const c=Wg(l,"FileDiff.hydrate"),d=c?.oldFile,f=c?.newFile;this.hydrateElements(t,n),oF(this.pre,iF({fileDiff:s,oldFile:d,newFile:f}),this.options.collapsed)||aF(this.headerElement,rF({fileDiff:s,oldFile:d,newFile:f}),this.options.disableFileHeader)?this.render({...l,fileContainer:t,lineAnnotations:o,fileDiff:s,preventEmit:!0}):this.hydrationSetup({fileDiff:s,lineAnnotations:o,...c}),i||this.emitPostRender()}hydrateElements(t,n){this.fileContainer!==t&&this.emitPostRender(!0),uA(t,n);for(const i of t.shadowRoot?.children??[]){if(i instanceof SVGElement){this.spriteSVG=i;continue}if(i instanceof HTMLElement){if(i instanceof HTMLPreElement){this.pre=i;for(const o of i.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 i.dataset){this.headerElement=i;continue}if(i instanceof HTMLStyleElement&&i.hasAttribute("data-theme-css")){this.themeCSSStyle=i;continue}if(i instanceof HTMLStyleElement&&i.hasAttribute("data-unsafe-css")){this.unsafeCSSStyle=i,this.appliedUnsafeCSS=i.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=t,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:t,oldFile:n,newFile:i,lineAnnotations:o}){this.lineAnnotations=o??this.lineAnnotations,this.additionFile=i,this.deletionFile=n,this.fileDiff=t??(n!==void 0&&i!==void 0?zo(n,i,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,n,i)=>{this.expandHunk(t,n,i)};expandHunk=(t,n,i)=>{this.hunksRenderer.expandHunk(t,n,i),this.loadFilesIfNecessary(),this.rerender()};loadFilesIfNecessary(){const{fileDiff:t,options:{loadDiffFiles:n}}=this;t==null||n==null||!tF(t)||this.pendingFiles?.fileDiff===t||(this.pendingFiles={fileDiff:t,promise:this.loadFilesForDiff(t,n)})}async loadFilesForDiff(t,n){try{const i=await n(t);if(!this.enabled||this.fileDiff!==t)return;await this.handleFilesLoaded(t,i)}catch(i){if(this.options.disableErrorHandling===!0)throw i;console.error(i)}finally{this.pendingFiles?.fileDiff===t&&(this.pendingFiles=void 0)}}async handleFilesLoaded(t,n){this.fileDiff!==t||!t.isPartial||(Nd("merge",t,n),this.setHydratedState(n),await qg(()=>this.primeHighlightCache(t)),!(!this.enabled||this.fileDiff!==t)&&this.rerender())}setHydratedState(t){this.deletionFile=t.oldFile,this.additionFile=t.newFile,this.workerManager?.cleanUpTasks(this.hunksRenderer),this.hunksRenderer.clearRenderCache()}render({fileDiff:t,deferManagers:n=!1,forceRender:i=!1,preventEmit:o=!1,lineAnnotations:s,fileContainer:l,containerWrapper:c,renderRange:d,...f}){const p=Wg(f,"FileDiff.render"),m=p?.oldFile,g=p?.newFile;if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");t!=null&&t.cacheKey===void 0&&(t.cacheKey=t.prevName!=null?t.prevName+":"+t.name:t.name),this.editor?.__postponeBgTokenizeToNextFrame();const{collapsed:v=!1,themeType:x="system",expandUnchanged:S=!1}=this.options,w=v?void 0:d,_=this.hasThemeChanged(),C=p!=null,k=C&&(!nw(m,this.deletionFile)||!nw(g,this.additionFile));let D=t!=null&&t!==this.fileDiff;const M=s!=null&&(s.length>0||this.lineAnnotations.length>0)?s!==this.lineAnnotations:!1;if(!v&&ff(w,this.renderRange)&&!i&&!M&&!_&&(t!=null&&t===this.fileDiff||t==null&&!k))return this.applyCachedThemeState(x);let O;t==null&&C&&(k||this.fileDiff==null)&&(O=zo(p.oldFile,p.newFile,this.options.parseDiffOptions));const{renderRange:z}=this;if(this.renderRange=w,C?(this.deletionFile=m,this.additionFile=g):t!=null&&(this.deletionFile=void 0,this.additionFile=void 0),t!=null?this.fileDiff=t:O!=null&&(D=!0,this.fileDiff=O),D&&(this.cachedHeaderHTML=void 0),s!=null&&this.setLineAnnotations(s),this.fileDiff==null)return!1;this.fileDiff.editSessionDirty===!0&&this.shouldSelfHealEditSession()&&(YC(this.fileDiff,this.options.parseDiffOptions),this.hunksRenderer.refreshHighlightedResult()),S&&this.loadFilesIfNecessary(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:j=!1,disableFileHeader:F=!1}=this.options;if(F&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),l=this.getOrCreateFileContainer(l,c),this.applyCachedThemeState(x),v){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const ee=this.hunksRenderer.renderDiff(this.fileDiff,sk);ee!=null&&this.applyThemeState(l,ee.themeStyles,x,ee.baseThemeType),ee?.headerElement!=null&&this.applyHeaderToDOM(ee.headerElement,l),this.renderSeparators([]),this.injectUnsafeCSS()}catch(ee){if(j)throw ee;console.error(ee),ee instanceof Error&&this.applyErrorToDOM(ee,l)}return o||this.emitPostRender(),!0}try{const ee=this.getOrCreatePreNode(l);if(!(this.canPartiallyRender(i,M,k||D||_)&&this.applyPartialRender({previousRenderRange:z,renderRange:w}))){const q=this.hunksRenderer.renderDiff(this.fileDiff,w);if(q==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(l,q.themeStyles,x,q.baseThemeType),q.headerElement!=null&&this.applyHeaderToDOM(q.headerElement,l),q.additionsContentAST!=null||q.deletionsContentAST!=null||q.unifiedContentAST!=null?this.applyHunksToDOM(ee,q):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(q.hunkData)}this.applyBuffers(ee,w),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,n||this.flushManagers(),this.editor!=null&&this.syncRenderViewToEditor()}catch(ee){if(j)throw ee;console.error(ee),ee instanceof Error&&this.applyErrorToDOM(ee,l)}return o||this.emitPostRender(),!0}emitPostRender(t=!1){const{fileContainer:n,options:{onPostRender:i}}=this;if(t){if(!this.mounted||(this.mounted=!1,n==null))return;this.options.onPostRender?.(n,this,"unmount");return}if(n==null)return;const o=this.mounted?"update":"mount";this.mounted=!0,i?.(n,this,o)}get fileDiffCache(){return this.hunksRenderer.diffCache??this.fileDiff}syncRenderViewToEditor(){const t=this.editor,n=this.fileContainer,i=this.fileDiffCache,o=this.lineAnnotations,s=this.computeEditorRenderRange(this.renderRange);t!=null&&n!=null&&i!=null&&!i.isPartial&&this.hunksRenderer.initializeHighlighter().then(l=>{!this.enabled||this.editor!==t||this.fileContainer!==n||this.fileDiffCache!==i||t.__syncRenderView(l,n,i,o,s)})}computeEditorRenderRange(t){const n=this.fileDiffCache;if(t==null||n==null||Vg(t))return t;const{diffStyle:i="split",expandUnchanged:o=!1,collapsedContextThreshold:s=1}=this.options;let l,c;return Lo({diff:n,diffStyle:i,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:o?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s,callback:({additionLine:d})=>{d!=null&&(l??=d.lineNumber,c=d.lineNumber)}}),l==null||c==null?{...t,startingLine:0,totalLines:0}:{...t,startingLine:l-1,totalLines:c-l+1}}attachEditor(t){if(this.type!=="file-diff")throw new Error(`FileDiff.attachEditor: cannot attach an editor to a "${this.type}" diff`);return this.editor?.cleanUp(),this.editor=t,this.hunksRenderer.beginEditSession(),this.fileDiff?.isPartial===!0&&this.loadFilesIfNecessary(),this.hunksRenderer.editorRenderReady()?this.syncRenderViewToEditor():this.rerender(),n=>{this.editor=void 0,n!==!0&&this.finishEditSession()}}finishEditSession(){this.hunksRenderer.endEditSession(),this.completeEditSession()}completeEditSession(){const t=this.fileDiffCache;if(t==null||t.editSessionDirty!==!0)return!1;const{collapsedContextThreshold:n=1}=this.options,i=DV(t,this.hunksRenderer.getExpandedHunksMap(),n);return YC(t,this.options.parseDiffOptions),this.hunksRenderer.setExpandedHunksMap(MV(t,i)),this.hunksRenderer.refreshHighlightedResult(),this.escalateEditSessionRender(),!0}applyDocumentChange(t,n){this.hunksRenderer.applyDocumentChange(t);const i=this.hunksRenderer.diffCache;if(i!=null){const o=this.fileDiff?.cacheKey;o!=null&&i.cacheKey==null&&(i.cacheKey=o),this.fileDiff=i}n!==void 0&&n!==this.lineAnnotations&&(this.setLineAnnotations(n),this.hunksRenderer.setLineAnnotations(this.lineAnnotations),this.renderAnnotations()),this.rerender(),this.interactionManager.setSelectionDirty()}updateRenderCache(t,n,i={}){const{shouldRefreshDiffsView:o,lineCountChangeInFlight:s}=i;if(this.hunksRenderer.updateRenderCache(t,n,s)){this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!0,this.escalateEditSessionRender();return}o===!0&&(this.refreshViewTimeout!=null&&clearTimeout(this.refreshViewTimeout),this.lineStateRefreshPending=!0,this.refreshViewTimeout=setTimeout(()=>{this.refreshViewTimeout=void 0,this.options.diffStyle==="split"?this.refreshSplitDiffView():this.refreshUnifiedDiffView(),this.flushDeferredLineState()},150))}isLineRenderable(t){const n=this.fileDiffCache;if(n==null)return!0;const{expandUnchanged:i=!1,collapsedContextThreshold:o=1}=this.options;return yA({fileDiff:n,lineNumber:t,expandedHunks:i?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o})}getNearestRenderableLine(t,n){const i=this.fileDiffCache;if(i==null)return t;const{expandUnchanged:o=!1,collapsedContextThreshold:s=1}=this.options;return oV({fileDiff:i,lineNumber:t,direction:n,expandedHunks:o?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s})}revealLine(t){const n=this.fileDiffCache,{expandUnchanged:i=!1,collapsedContextThreshold:o=1,expansionLineCount:s=100}=this.options;if(n==null||n.isPartial||i)return!1;const l=this.hunksRenderer.getExpandedHunksMap();for(const[p,m]of n.hunks.entries()){const[g,v]=Ml(m);if(t<g){const x=or({isPartial:n.isPartial,rangeSize:m.collapsedBefore,expandedHunks:l,hunkIndex:p,collapsedContextThreshold:o}),S=g-x.rangeSize;if(x.renderAll||t<S+x.fromStart||t>=g-x.fromEnd)return!1;const w=t-(S+x.fromStart)+1,_=g-x.fromEnd-t;return w<=_?this.expandHunk(p,"up",w+s):this.expandHunk(p,"down",_+s),!0}if(t<v)return!1}const c=ar({fileDiff:n,hunkIndex:n.hunks.length-1,expandedHunks:l,collapsedContextThreshold:o,errorPrefix:"FileDiff.revealLine"});if(c==null||c.renderAll)return!1;const d=n.hunks[n.hunks.length-1],[,f]=Ml(d);return t<f+c.fromStart||t>=f+c.rangeSize?!1:(this.expandHunk(n.hunks.length,"up",t-(f+c.fromStart)+1+s),!0)}shouldSelfHealEditSession(){return this.editor==null}escalateEditSessionRender(){lk(this.handleEditSessionRender)}handleEditSessionRender=()=>{this.rerender(),this.flushDeferredLineState()};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 n=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",n.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${t}px`),!0}async primeHighlightCache(t=this.fileDiff){const{workerManager:n}=this;if(t==null||n==null||!n.isWorkingPool()||t.cacheKey==null||Ya(t))return;const i=this.options.tokenizeMaxLength??1e5;Math.max(t.additionLines.length,t.deletionLines.length)>i||await n.primeDiffHighlightCache(t).catch(o=>{console.error(o)})}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.headerFilenameSuffix?.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.headerFilenameSuffix=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:n}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof n!="function"){for(const{element:o}of this.separatorCache.values())o.remove();this.separatorCache.clear();return}const i=new Map(this.separatorCache);for(const o of t){const s=o.slotName;let l=this.separatorCache.get(s);if(l==null||!JV(o,l.hunkData)){l?.element.remove();const c=document.createElement("div");c.style.display="contents",c.slot=o.slotName;const d=n(o,this);d!=null&&c.appendChild(d),this.fileContainer.appendChild(c),l={element:c,hunkData:o},this.separatorCache.set(s,l)}i.delete(s)}for(const[o,{element:s}]of i.entries())this.separatorCache.delete(o),s.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:i}of this.annotationCache.values())i.remove();this.annotationCache.clear();return}const t=new Map(this.annotationCache),{renderAnnotation:n}=this.options;if(n!=null&&this.lineAnnotations.length>0)for(const[i,o]of this.lineAnnotations.entries()){const s=`${i}-${ei(o)}`;let l=this.annotationCache.get(s);if(l==null||!ZV(o,l.annotation)){l?.element.remove();const c=n(o);if(c==null)continue;l={element:tA(ei(o)),annotation:o},l.element.appendChild(c),this.fileContainer.appendChild(l.element),this.annotationCache.set(s,l)}t.delete(s)}for(const[i,{element:o}]of t.entries())this.annotationCache.delete(i),o.remove()}renderGutterUtility(){const{renderGutterUtility:t}=this.options;if(this.fileContainer==null||t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const n=t(this.interactionManager.getHoveredLine);if(n!=null&&this.gutterUtilityContent!=null)return;if(n==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const i=nA();i.appendChild(n),this.fileContainer.appendChild(i),this.gutterUtilityContent=i}getOrCreateFileContainer(t,n){const{fileContainer:i}=this,o=t??i??document.createElement("diffs-container"),s=i!==o;return i!=null&&s&&this.editor?.__captureFocusForDOMReplacement(),s&&this.emitPostRender(!0),this.fileContainer=o,i!=null&&s&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),n!=null&&this.fileContainer.parentNode!==n&&n.appendChild(this.fileContainer),s&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(t){const{shadowRoot:n}=t;if(n!=null)for(const i of n.children)i instanceof SVGElement?this.spriteSVG??=i:Md(i)&&i.hasAttribute("data-theme-css")?(this.themeCSSStyle??=i,this.hasAdoptedThemeCSS=!0):Md(i)&&i.hasAttribute("data-unsafe-css")&&(this.unsafeCSSStyle??=i,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(t){const n=t.shadowRoot??t.attachShadow({mode:"open"});if(this.spriteSVG==null){const i=document.createElement("div");i.innerHTML=JT;const o=i.firstChild;o instanceof SVGElement&&(this.spriteSVG=o)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==n&&n.appendChild(this.spriteSVG)}getOrCreatePreNode(t){const n=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,n.appendChild(this.pre)):this.pre.parentNode!==n&&(this.editor?.__captureFocusForDOMReplacement(),n.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 n of Array.from(t.children))n instanceof HTMLElement&&(n.hasAttribute("data-unified")?this.codeUnified=n:n.hasAttribute("data-deletions")?this.codeDeletions=n:n.hasAttribute("data-additions")&&(this.codeAdditions=n))}applyHeaderToDOM(t,n){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const{fileDiff:i}=this,o=this.cachedHeaderHTML??Zt(t);if(this.cachedHeaderHTML=o,o!==this.lastRenderedHeaderHTML){const g=document.createElement("div");g.innerHTML=o;const v=g.firstElementChild;if(!(v instanceof HTMLElement))return;this.headerElement!=null?n.shadowRoot?.replaceChild(v,this.headerElement):n.shadowRoot?.prepend(v),this.headerElement=v,this.lastRenderedHeaderHTML=o}if(this.isContainerManaged||i==null)return;const{renderCustomHeader:s,renderHeaderPrefix:l,renderHeaderFilenameSuffix:c,renderHeaderMetadata:d}=this.options;if(s!=null){const g=s(i)??void 0;this.headerCustom=this.upsertHeaderSlotElement(n,this.headerCustom,Vl,g),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0;return}const f=l?.(i)??void 0,p=c?.(i)??void 0,m=d?.(i)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(n,this.headerPrefix,My,f),this.headerFilenameSuffix=this.upsertHeaderSlotElement(n,this.headerFilenameSuffix,Iy,p),this.headerMetadata=this.upsertHeaderSlotElement(n,this.headerMetadata,Ny,m),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(t,n,i,o){if(o==null){n?.remove();return}const s=n??this.createHeaderSlotElement(i);return n==null&&t.appendChild(s),this.replaceHeaderSlotContent(s,o),s}replaceHeaderSlotContent(t,n){t.replaceChildren(),n instanceof Element?t.appendChild(n):t.innerText=`${n}`}createHeaderSlotElement(t){const n=document.createElement("div");return n.slot=t,n}injectUnsafeCSS(){const{unsafeCSS:t}=this.options,n=this.fileContainer?.shadowRoot;if(n!=null){if(t==null||t===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===n&&this.appliedUnsafeCSS===t||(this.unsafeCSSStyle??=iA(),this.unsafeCSSStyle.parentNode!==n&&n.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=aA(t),this.appliedUnsafeCSS=t)}}applyThemeState(t,n,i,o){const s=t.shadowRoot??t.attachShadow({mode:"open"}),l=o??i,c=this.options.theme??mt,d=typeof c=="string"?c:{...c},f=Dl(s);if(this.themeCSSStyle?.parentNode===s&&this.appliedThemeCSS?.themeStyles===n&&this.appliedThemeCSS.themeType===l&&this.appliedThemeCSS.scrollbarGutter===f){this.appliedThemeCSS.theme=d;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===s){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:d,themeStyles:n,themeType:l,baseThemeType:o,scrollbarGutter:f};return}this.themeCSSStyle=fA({shadowRoot:s,currentNode:this.themeCSSStyle,themeCSS:sA(n,l,f)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:d,themeStyles:n,themeType:l,baseThemeType:o,scrollbarGutter:f}:void 0}hydrateMeasuredScrollbar(){const t=this.fileContainer?.shadowRoot;t==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=lA(this.themeCSSStyle.textContent??"",Dl(t)))}shouldGuardRebuildScroll(){return this.editor!=null&&hA()}applyHunksToDOM(t,n){this.shouldGuardRebuildScroll()?Bg(t,()=>this.replaceCodeColumns(t,n)):this.replaceCodeColumns(t,n)}applyCodeColumnsInPlace(t,n,i){const o=this.getColumnPair(t);if(o==null)return!1;const s=Pr(n[0]),l=Pr(n[1]);return s==null||l==null?!1:(o.gutter.innerHTML=Zt(s),o.content.innerHTML=Zt(l),i!==this.lastRowCount&&(o.gutter.style.setProperty("grid-row",`span ${i}`),o.content.style.setProperty("grid-row",`span ${i}`)),!0)}replaceCodeColumns(t,n){const{overflow:i="scroll"}=this.options,o=(this.options.hunkSeparators??"line-info")==="line-info",s=i==="wrap"?n.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(t,n);let l=!1;const c=[],d=this.hunksRenderer.renderCodeAST("unified",n),f=this.hunksRenderer.renderCodeAST("deletions",n),p=this.hunksRenderer.renderCodeAST("additions",n);this.editor?.__captureFocusForDOMReplacement(),d!=null?(l=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=rd({code:this.codeUnified,columnType:"unified",rowSpan:s,containerSize:o}),this.applyCodeColumnsInPlace(this.codeUnified,d,n.rowCount)||(this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(d)),c.push(this.codeUnified)):f!=null||p!=null?(f!=null?(l=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=rd({code:this.codeDeletions,columnType:"deletions",rowSpan:s,containerSize:o}),this.applyCodeColumnsInPlace(this.codeDeletions,f,n.rowCount)||(this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(f)),c.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),p!=null?(l=l||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=rd({code:this.codeAdditions,columnType:"additions",rowSpan:s,containerSize:o}),this.applyCodeColumnsInPlace(this.codeAdditions,p,n.rowCount)||(this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(p)),c.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),c.length===0?t.textContent="":l&&t.replaceChildren(...c),this.lastRowCount=n.rowCount}applyPartialRender({previousRenderRange:t,renderRange:n}){const{pre:i,codeUnified:o,codeAdditions:s,codeDeletions:l,options:{diffStyle:c="split"}}=this;if(i==null||t==null||n==null||!Number.isFinite(t.totalLines)||!Number.isFinite(n.totalLines)||this.lastRowCount==null)return!1;const d=this.getCodeColumns(c,o,l,s);if(d==null)return!1;const f=t.startingLine,p=n.startingLine,m=f+t.totalLines,g=p+n.totalLines,v=Math.max(f,p),x=Math.min(m,g);if(x<=v)return!1;const S=Math.max(0,v-f),w=Math.max(0,m-x),_=this.trimColumns({columns:d,trimStart:S,trimEnd:w,previousStart:f,overlapStart:v,overlapEnd:x,diffStyle:c});if(_<0)throw new Error("FileDiff.applyPartialRender: failed to trim to overlap");if(this.lastRowCount<_)throw new Error("FileDiff.applyPartialRender: trimmed beyond DOM row count");let C=this.lastRowCount-_;const k=(z,j)=>{if(!(j<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:z,totalLines:j,bufferBefore:0,bufferAfter:0})},D=k(p,Math.max(v-p,0));if(D==null&&p<v)return!1;const M=k(x,Math.max(g-x,0));if(M==null&&g>x)return!1;const O=(z,j)=>{if(z!=null){if(c==="unified"&&!Array.isArray(d))this.insertPartialHTML(c,d,z,j);else if(c==="split"&&Array.isArray(d))this.insertPartialHTML(c,d,z,j);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");C+=z.rowCount}};return this.cleanupErrorWrapper(),O(D,"afterbegin"),O(M,"beforeend"),this.lastRowCount!==C&&(this.applyRowSpan(c,d,C),this.lastRowCount=C),!0}insertPartialHTML(t,n,i,o){if(t==="unified"&&!Array.isArray(n)){const s=this.hunksRenderer.renderCodeAST("unified",i);this.renderPartialColumn(n,s,o)}else if(t==="split"&&Array.isArray(n)){const s=this.hunksRenderer.renderCodeAST("deletions",i),l=this.hunksRenderer.renderCodeAST("additions",i);this.renderPartialColumn(n[0],s,o),this.renderPartialColumn(n[1],l,o)}else throw new Error("FileDiff.insertPartialHTML: Invalid argument composition")}refreshSplitDiffView(){if(this.options.diffStyle!=="split")return;const t=this.hunksRenderer.renderDiff(this.fileDiff,this.renderRange);if(t==null)return;const n=this.getCodeColumns("split",this.codeUnified,this.codeDeletions,this.codeAdditions);if(!Array.isArray(n))return;const i=(o,s)=>{if(s==null)return;const l=this.hunksRenderer.renderCodeAST(o,t),c=Pr(l?.[0]),d=Pr(l?.[1]);for(const[f,p]of[[s.gutter,c],[s.content,d]])if(p!=null&&f.childElementCount===p.length)for(let m=0;m<p.length;m++){const g=f.children[m],v=p[m].properties["data-line-type"];v!=null&&g.dataset.lineType!==v&&(g.dataset.lineType=v)}};i("deletions",n[0]),i("additions",n[1])}refreshUnifiedDiffView(){if(this.options.diffStyle!=="unified")return;const t=this.hunksRenderer.renderDiff(this.fileDiff,this.renderRange);if(t==null)return;const n=this.getCodeColumns("unified",this.codeUnified,this.codeDeletions,this.codeAdditions);if(n==null||Array.isArray(n))return;const i=this.hunksRenderer.renderCodeAST("unified",t),o=Pr(i?.[0]),s=Pr(i?.[1]),l=()=>{for(const[c,d]of[[n.gutter,o],[n.content,s]])d!=null&&(c.innerHTML=Zt(d));t.rowCount!==this.lastRowCount&&(this.applyRowSpan("unified",n,t.rowCount),this.lastRowCount=t.rowCount)};this.shouldGuardRebuildScroll()?Bg(this.pre,l):l(),this.renderSeparators(t.hunkData),this.managersDirty=!0,this.flushManagers(),this.syncRenderViewToEditor()}renderPartialColumn(t,n,i){if(t==null||n==null)return;const o=Pr(n[0]),s=Pr(n[1]);if(o==null||s==null)throw new Error("FileDiff.insertPartialHTML: Unexpected AST structure");const l=s.at(0);i==="beforeend"&&l?.type==="element"&&typeof l.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(l.properties["data-buffer-size"],t.content.children[t.content.children.length-1],t.gutter.children[t.gutter.children.length-1],o,s,!0);const c=s.at(-1);i==="afterbegin"&&c?.type==="element"&&typeof c.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(c.properties["data-buffer-size"],t.content.children[0],t.gutter.children[0],o,s,!1),t.gutter.insertAdjacentHTML(i,this.hunksRenderer.renderPartialHTML(o)),t.content.insertAdjacentHTML(i,this.hunksRenderer.renderPartialHTML(s))}mergeBuffersIfNecessary(t,n,i,o,s,l){if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement))return;const c=this.getBufferSize(n.dataset);c!=null&&(l?(o.shift(),s.shift()):(o.pop(),s.pop()),this.updateBufferSize(n,c+t),this.updateBufferSize(i,c+t))}applyRowSpan(t,n,i){const o=s=>{s!=null&&(s.gutter.style.setProperty("grid-row",`span ${i}`),s.content.style.setProperty("grid-row",`span ${i}`))};if(t==="unified"&&!Array.isArray(n))o(n);else if(t==="split"&&Array.isArray(n))o(n[0]),o(n[1]);else throw new Error("dun fuuuuked up")}trimColumnRows(t,n,i){let o=0,s=0,l=0,c=!1;const d=i>=0;if(t==null)return 0;const f=Array.from(t.content.children),p=Array.from(t.gutter.children);if(f.length!==p.length)throw new Error("FileDiff.trimColumnRows: columns do not match");for(;l<f.length&&!(n<=0&&!d&&!c);){const m=p[l],g=f[l];if(l++,!(m instanceof HTMLElement)||!(g instanceof HTMLElement))throw console.error({gutterElement:m,contentElement:g}),new Error("FileDiff.trimColumnRows: invalid row elements");if(c&&(c=!1,m.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in g.dataset||m.dataset.gutterBuffer==="metadata"&&"noNewline"in g.dataset)){m.remove(),g.remove(),s++;continue}if("lineIndex"in m.dataset&&"lineIndex"in g.dataset){(n>0||d&&o>=i)&&(m.remove(),g.remove(),n>0&&(n--,n===0&&(c=!0)),s++),o++;continue}if("separator"in m.dataset&&"separator"in g.dataset){(n>0||d&&o>=i)&&(m.remove(),g.remove(),s++);continue}if(m.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in g.dataset){(n>0||d&&o>=i)&&(m.remove(),g.remove(),s++);continue}if(m.dataset.gutterBuffer==="metadata"&&"noNewline"in g.dataset){(n>0||d&&o>=i)&&(m.remove(),g.remove(),s++);continue}if(m.dataset.gutterBuffer==="buffer"&&"contentBuffer"in g.dataset){const v=this.getBufferSize(g.dataset);if(v==null)throw new Error("FileDiff.trimColumnRows: invalid element");if(n>0){const x=Math.min(n,v),S=v-x;S>0?(this.updateBufferSize(m,S),this.updateBufferSize(g,S),s+=x):(m.remove(),g.remove(),s+=v),n-=x,n===0&&S===0&&(c=!0)}else if(d){const x=o,S=o+v-1;if(i<=x)m.remove(),g.remove(),s+=v;else if(i<=S){const w=S-i+1,_=v-w;this.updateBufferSize(m,_),this.updateBufferSize(g,_),s+=w}}o+=v;continue}throw console.error({gutterElement:m,contentElement:g}),new Error("FileDiff.trimColumnRows: unknown row elements")}return s}trimColumns({columns:t,diffStyle:n,overlapEnd:i,overlapStart:o,previousStart:s,trimEnd:l,trimStart:c}){const d=Math.max(0,o-s),f=i-s;if(f<0)throw new Error("FileDiff.trimColumns: overlap ends before previous");const p=c>0,m=l>0;if(!p&&!m)return 0;const g=p?d:0,v=m?f:-1;if(n==="unified"&&!Array.isArray(t))return this.trimColumnRows(t,g,v);if(n==="split"&&Array.isArray(t)){const x=this.trimColumnRows(t[0],g,v),S=this.trimColumnRows(t[1],g,v);if(t[0]!=null&&t[1]!=null&&x!==S)throw new Error("FileDiff.trimColumns: split columns out of sync");return t[0]!=null?x:S}else throw console.error({diffStyle:n,columns:t}),new Error("FileDiff.trimColumns: Invalid columns for diffType")}getBufferSize(t){const n=Number.parseInt(t?.bufferSize??"",10);return Number.isNaN(n)?void 0:n}updateBufferSize(t,n){t.dataset.bufferSize=`${n}`,t.style.setProperty("grid-row",`span ${n}`),t.style.setProperty("min-height",`calc(${n} * 1lh)`)}getColumnPair(t){if(t==null)return;const n=t.children[0],i=t.children[1];if(!(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||n.dataset.gutter==null||i.dataset.content==null))return{gutter:n,content:i}}getCodeColumns(t,n,i,o){if(t==="unified")return this.getColumnPair(n);{const s=this.getColumnPair(i),l=this.getColumnPair(o);return s!=null||l!=null?[s,l]:void 0}}updateBuffers(t){this.pre!=null&&this.applyBuffers(this.pre,t)}applyBuffers(t,n){if(n==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}n.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",t.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${n.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),n.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",t.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${n.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:n,deletionsContentAST:i,totalLines:o},s){const{diffIndicators:l="bars",disableBackground:c=!1,disableLineNumbers:d=!1,overflow:f="scroll",diffStyle:p="split"}=this.options,m={type:"diff",diffIndicators:l,disableBackground:c,disableLineNumbers:d,overflow:f,split:p==="unified"?!1:n!=null&&i!=null,totalLines:o,customProperties:s};eA(m,this.appliedPreAttributes)||(cA(t,m),this.appliedPreAttributes=m)}applyErrorToDOM(t,n){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const i=n.shadowRoot??n.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",i.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 nw(e,t){return e==null||t==null?e==null&&t==null:Xn(e,t)}function iF({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function rF({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function oF(e,t,n=!1){return!n&&e==null&&t}function aF(e,t,n=!1){return e==null&&t&&!n}function Pr(e){if(!(e==null||e.type!=="element"))return e.children??[]}function sF({fileDiff:e,metrics:t,disableFileHeader:n,hunkSeparators:i,expandUnchanged:o,expandedHunks:s,collapsedContextThreshold:l,canHydratePartialDiff:c}){let d=yi(t,n),f=d;const p=o?!0:s,m=e.hunks.length-1;for(let g=0;g<e.hunks.length;g++){const v=e.hunks[g];if(v==null)throw new Error("computeEstimatedDiffHeights: invalid hunk index");const x=or({isPartial:e.isPartial,rangeSize:v.collapsedBefore,expandedHunks:p,hunkIndex:g,collapsedContextThreshold:l}),S=(x.fromStart+x.fromEnd)*t.lineHeight;if(d+=S,f+=S,x.collapsedLines>0){const C=ll({type:i,metrics:t,hunkIndex:g,hunkSpecs:v.hunkSpecs})?.totalHeight??0;d+=C,f+=C}d+=v.splitLineCount*t.lineHeight,f+=v.unifiedLineCount*t.lineHeight;const w=lF(v);d+=w.split*t.lineHeight,f+=w.unified*t.lineHeight;const _=g===m?ar({fileDiff:e,hunkIndex:g,expandedHunks:p,collapsedContextThreshold:l,errorPrefix:"computeEstimatedDiffHeights"}):void 0;if(_!=null){const C=(_.fromStart+_.fromEnd)*t.lineHeight;if(d+=C,f+=C,_.collapsedLines>0){const k=_o({type:i,metrics:t})?.totalHeight??0;d+=k,f+=k}}else if(g===m&&e.isPartial&&c){const C=_o({type:i,metrics:t})?.totalHeight??0;d+=C,f+=C}}if(e.hunks.length>0){const g=Id(t);d+=g,f+=g}return{splitHeight:d,unifiedHeight:f}}function lF(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 n=t.lines>0?1:0;return{split:n,unified:n}}return uF(e,t)}function uF(e,t){const n=(t.deletions>0&&e.noEOFCRDeletions?1:0)+(t.additions>0&&e.noEOFCRAdditions?1:0),i=t.deletions>0&&e.noEOFCRDeletions,o=t.additions>0&&e.noEOFCRAdditions;return{split:i||o?1:0,unified:n}}const Yg=3e3;let cF=-1;var dF=class extends EA{__id=`little-virtualized-file-diff:${++cF}`;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;currentExpandUnchanged;pendingHydratedDiff;pendingExpansions;constructor(e,t,n,i,o=!1){super(e,i,o),this.virtualizer=t,this.metrics=od(n)}setMetrics(e,t=!1){const n=od(e);!t&&yd(this.metrics,n)||(this.metrics=n,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||!Hg(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,n=!Zd(t,e),i=n&&yF(t,e);super.setOptions(e),i&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:vF(t,e)}),n&&(this.forceRenderOverride=!0),n&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,i)}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,resetRenderRange:n=!0}={}){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.invalidateDerivedLayoutCache(t,n),e&&this.isSimpleMode()&&this.computeApproximateSize()}invalidateDerivedLayoutCache(e,t=!0){this.layoutDirty=!0,this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),e&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&t&&(this.renderRange=void 0)}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 n=this.getDiffStyle(),i=n==="split"?[this.codeDeletions,this.codeAdditions]:[this.codeUnified],o=this.hasFileAnnotations(this.fileDiff);if(this.renderRange!=null&&o&&hf(this.renderRange)){const s=fF(i)??0;this.setFileAnnotationHeight(s)&&(e=!0)}else!o&&this.setFileAnnotationHeight(0)&&(e=!0);for(const s of i){if(s==null)continue;const l=s.children[1];if(l instanceof HTMLElement)for(const c of l.children){if(!(c instanceof HTMLElement))continue;const d=c.dataset.lineIndex;if(d==null)continue;const f=xF(d,n);let p=c.getBoundingClientRect().height,m=!1;c.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in c.nextElementSibling.dataset||"noNewline"in c.nextElementSibling.dataset)&&("noNewline"in c.nextElementSibling.dataset&&(m=!0),p+=c.nextElementSibling.getBoundingClientRect().height);const g=this.getEstimatedLineHeight(m),v=this.cache.heightDeltas.get(f)??0,x=p-g;x!==v&&(e=!0,this.cache.measuredHeightDeltaTotal+=x-v,x===0?this.cache.heightDeltas.delete(f):this.cache.heightDeltas.set(f,x))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer==null?!1:(e&&(this.top=this.getVirtualizedTop()),this.render());flushManagers(){super.flushManagers(),this.lineStateRefreshPending&&this.flushDeferredLineState()}prepareCodeViewItem(e,t,n,i){const o=!Eo(this.fileDiff,e),s=this.syncLineAnnotations(i);let l=n?.resetDiffLayoutCache===!0||o||s,c=o||n?.resetDiffLayoutCache===!0&&n.includeEstimatedDiffHeights;n?.metrics!=null&&(this.metrics=od(n.metrics),l=!0,c=!0);const{collapsed:d=!1,expandUnchanged:f=!1}=this.options;return this.currentCollapsed!==d&&(this.currentCollapsed=d,l=!0),this.currentExpandUnchanged!==f&&(this.currentExpandUnchanged=f,l=!0,c=!0),l&&this.resetLayoutCache({includeEstimatedHeights:c}),this.fileDiff=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e,t="additions"){if(this.fileDiff==null||e<1)return;const n=this.getLineIndex(e,t);if(n==null)return;const{disableFileHeader:i=!1,expandUnchanged:o=!1,collapsed:s=!1,collapsedContextThreshold:l=1}=this.options,c=this.getDiffStyle(),d=this.getHunkSeparatorType(),f=c==="split"?n[1]:n[0];this.approximateLayoutCheckpoints();const p=yi(this.metrics,i),m=this.getLayoutCheckpointBeforeLineIndex(f);let g=m?.top??p+this.cache.fileAnnotationHeight;if(s)return{top:p,height:0};let v;return Lo({diff:this.fileDiff,diffStyle:c,startingLine:m?.renderedLineIndex??0,expandedHunks:o?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:l,callback:({hunkIndex:x,hunk:S,collapsedBefore:w,collapsedAfter:_,deletionLine:C,additionLine:k})=>{const D=c==="split"?k?.splitLineIndex??C?.splitLineIndex:k?.unifiedLineIndex??C?.unifiedLineIndex;if(D==null)throw new Error("VirtualizedFileDiff.getLinePosition: missing line index data");if(w>0){const O=ll({type:d,metrics:this.metrics,hunkIndex:x,hunkSpecs:S?.hunkSpecs});if(O!=null){if(g+=O.gapBefore,f>=D-w&&f<D)return v={top:g,height:O.height},!0;g+=O.height+O.gapAfter}}const M=this.getLineHeight(D,(k?.noEOFCR??!1)||(C?.noEOFCR??!1));if(D===f)return v={top:g,height:M},!0;if(g+=M,_>0){const O=_o({type:d,metrics:this.metrics});if(O!=null){if(f>D&&f<=D+_)return v={top:g+O.gapBefore,height:O.height},!0;g+=O.totalHeight}}return!1}}),v}getEditorViewport(){return this.virtualizer.type==="simple"?this.virtualizer.getRoot():this.virtualizer.getContainerElement()}getNumericScrollAnchor(e){if(this.fileDiff==null)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsed:i=!1,collapsedContextThreshold:o=1}=this.options;if(i)return;const s=this.getDiffStyle(),l=this.getHunkSeparatorType();this.approximateLayoutCheckpoints();const c=this.getLayoutCheckpointBeforeTop(e);let d=c?.top??yi(this.metrics,t)+this.cache.fileAnnotationHeight,f;return Lo({diff:this.fileDiff,diffStyle:s,startingLine:c?.renderedLineIndex??0,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:p,hunk:m,collapsedBefore:g,collapsedAfter:v,deletionLine:x,additionLine:S})=>{const w=s==="split"?S?.splitLineIndex??x?.splitLineIndex:S?.unifiedLineIndex??x?.unifiedLineIndex;if(w==null)throw new Error("VirtualizedFileDiff.getNumericScrollAnchor: missing line index data");if(g>0){const C=ll({type:l,metrics:this.metrics,hunkIndex:p,hunkSpecs:m?.hunkSpecs});C!=null&&(d+=C.totalHeight)}if(d>=e&&(x!=null?f={lineNumber:x.lineNumber,side:"deletions",top:d}:S!=null&&(f={lineNumber:S.lineNumber,side:"additions",top:d}),f!=null))return!0;const _=this.getLineHeight(w,(S?.noEOFCR??!1)||(x?.noEOFCR??!1));if(d+=_,v>0){const C=_o({type:l,metrics:this.metrics});C!=null&&(d+=C.totalHeight)}return!1}}),f}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:n,bufferAfter:i,totalLines:o}=t;let s=0;if(o===0){const l=e??this.virtualizer.getWindowSpecs();this.top<l.top&&(s=i)}return{topOffset:this.top+n+s,height:this.height-(n+i)}}cleanUp(e=!1){this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||(this.resetLayoutCache({includeEstimatedHeights:!0}),this.pendingExpansions=void 0,this.pendingHydratedDiff=void 0),this.isSetup=!1,super.cleanUp(e)}expandHunk=(e,t,n)=>{this.fileDiff!=null&&(this.isAdvancedMode()?(this.pendingExpansions??=[],this.pendingExpansions.push({hunkIndex:e,direction:t,expansionLineCountOverride:n})):(this.hunksRenderer.expandHunk(e,t,n),this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()),this.loadFilesIfNecessary(),this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))};async handleFilesLoaded(e,t){if(!(this.fileDiff!==e||!e.isPartial)){if(this.isAdvancedMode()){const n=Nd("clone",e,t);if(await qg(()=>this.primeHighlightCache(n)),!this.enabled||this.fileDiff!==e)return;this.pendingHydratedDiff={expectedDiff:e,nextDiff:n,files:t}}else{if(Nd("merge",e,t),this.setHydratedState(t),await qg(()=>this.primeHighlightCache(e)),!this.enabled||this.fileDiff!==e)return;this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}}consumeCodeViewLayoutChanges(e){let t=!1,n;const{pendingExpansions:i,pendingHydratedDiff:o}=this;if(i!=null){this.pendingExpansions=void 0;for(const s of i)this.hunksRenderer.expandHunk(s.hunkIndex,s.direction,s.expansionLineCountOverride),t=!0}return o!=null&&(this.pendingHydratedDiff=void 0,o.expectedDiff===e&&(this.setHydratedState(o.files),n=o.nextDiff)),n!=null?(this.forceRenderOverride=!0,this.resetLayoutCache({includeEstimatedHeights:!0})):t&&(this.forceRenderOverride=!0,this.invalidateDerivedLayoutCache(!0)),n}loadFilesIfNecessary(){if(this.pendingHydratedDiff!=null){if(this.pendingHydratedDiff.expectedDiff===this.fileDiff)return;this.pendingHydratedDiff=void 0}super.loadFilesIfNecessary()}isLineRenderable(e){if(super.isLineRenderable(e))return!0;const{pendingExpansions:t}=this,n=this.fileDiffCache;if(t==null||t.length===0||n==null)return!1;const{expansionLineCount:i=100,collapsedContextThreshold:o=1}=this.options,s=new Map(this.hunksRenderer.getExpandedHunksMap());for(const l of t){const c={...s.get(l.hunkIndex)??{fromStart:0,fromEnd:0}},d=l.expansionLineCountOverride??i;(l.direction==="up"||l.direction==="both")&&(c.fromStart+=d),(l.direction==="down"||l.direction==="both")&&(c.fromEnd+=d),s.set(l.hunkIndex,c)}return yA({fileDiff:n,lineNumber:e,expandedHunks:s,collapsedContextThreshold:o})}invalidateEditSessionLayout(){this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1}),this.isSimpleMode()||this.computeApproximateSize(!0),this.getSimpleVirtualizer()?.requestHeightReconcile(this)}escalateEditSessionRender(){this.invalidateEditSessionLayout(),!(!this.enabled||this.fileDiff==null)&&(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))}shouldSelfHealEditSession(){return!this.isAdvancedMode()&&super.shouldSelfHealEditSession()}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))}applyDocumentChange(e,t,n=!1){const{renderRange:i}=this;if(this.getAdvancedVirtualizer()?.capturePendingLayoutAnchor(),super.applyDocumentChange(e,t),this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1}),!this.isSimpleMode())this.computeApproximateSize(!0);else if(n&&i!==void 0&&this.fileDiff!==void 0){const o=this.virtualizer.getWindowSpecs(),s=this.computeRenderRangeFromWindow(this.fileDiff,this.top??0,o);s.bufferAfter!==i.bufferAfter&&this.updateBuffers(s)}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}computeApproximateSize(e=!1,t=this.fileDiff){const n=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!n)return;const i=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,t==null){this.layoutDirty=!1;return}const{disableFileHeader:o=!1,collapsed:s=!1}=this.options,l=yi(this.metrics,o);if(this.height+=l,s){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight(t)+this.cache.measuredHeightDeltaTotal,n&&!i&&this.validateComputedHeight(t),this.layoutDirty=!1}getActiveEstimatedHeight(e=this.fileDiff){this.ensureEstimatedDiffHeights(e);const t=this.getDiffStyle()==="split"?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(t==null)throw new Error("VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height");return t}ensureEstimatedDiffHeights(e=this.fileDiff){if(e==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:i=1}=this.options,{splitHeight:o,unifiedHeight:s}=sF({fileDiff:e,metrics:this.metrics,disableFileHeader:t,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:n,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,canHydratePartialDiff:Tm(e,this.options.loadDiffFiles!=null)});this.cache.estimatedSplitHeight=o,this.cache.estimatedUnifiedHeight=s}validateComputedHeight(e=this.fileDiff){if(this.fileContainer==null||e==null)return;const t=this.fileContainer.getBoundingClientRect();t.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:e.name,elementHeight:t.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}render({fileContainer:e,fileDiff:t,forceRender:n=!1,lineAnnotations:i,...o}={}){const s=Wg(o,"VirtualizedFileDiff.render"),l=s!=null,c=s?.oldFile,d=s?.newFile,f=l&&(!ow(c,this.deletionFile)||!ow(d,this.additionFile));let p=t??this.fileDiff;t==null&&l&&(f||this.fileDiff==null)&&(p=zo(s.oldFile,s.newFile,this.options.parseDiffOptions));const{forceRenderOverride:m,isSetup:g}=this;this.forceRenderOverride=void 0;const v=this.syncLineAnnotations(i);v&&this.resetLayoutCache({includeEstimatedHeights:!1});const x=t!=null&&t!==this.fileDiff,S=p!=null&&!Eo(this.fileDiff,p),w=x||f;if(S&&this.resetLayoutCache({includeEstimatedHeights:!0}),e=this.getOrCreateFileContainer(e),p==null)return console.error("VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data"),!1;if(g)this.top??=this.getVirtualizedTop(),S&&(this.getSimpleVirtualizer()?.markDOMDirty(),this.computeApproximateSize(!1,p));else{this.computeApproximateSize(!1,p);const M=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(M==null)throw new Error("VirtualizedFileDiff.render: simple virtualizer is not available");M.connect(e,this),this.isVisible=M.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode()&&(!w||!g))return this.fileDiff=p,s!=null&&(this.deletionFile=c,this.additionFile=d),S&&(this.cachedHeaderHTML=void 0),this.renderPlaceholder(this.height);const _=this.virtualizer.getWindowSpecs(),C=this.top??0,k=this.computeRenderRangeFromWindow(p,C,_),D=super.render({fileDiff:p,fileContainer:e,renderRange:k,lineAnnotations:i,forceRender:(m??n)||v||S,...s,...o});return this.isSimpleMode()&&D&&this.getSimpleVirtualizer()?.requestHeightReconcile(this),D}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}shouldGuardRebuildScroll(){return!1}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}getAdvancedVirtualizer(){return this.virtualizer.type==="advanced"?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??"split"}getHunkSeparatorType(){return bF(this.options.hunkSeparators)}approximateLayoutCheckpoints(e=this.fileDiff){if(!this.layoutDirty&&this.cache.checkpoints.length>0||e==null||e.hunks.length===0||this.options.collapsed===!0)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:i=1}=this.options,o=e.hunks.length-1,s=Tm(e,this.options.loadDiffFiles!=null),l=this.getDiffStyle(),c=this.getHunkSeparatorType(),d=n?!0:this.hunksRenderer.getExpandedHunksMap(),f=hF(this.cache.heightDeltas);let p=yi(this.metrics,t)+this.cache.fileAnnotationHeight,m=0;const g=({rowCount:v,startLineIndex:x,preSeparatorHeight:S=0,postSeparatorHeight:w=0,metadataOffsets:_=[]})=>{if(v<=0)return;const C=m,k=m+v;let D=pF(C);for(;D<k;){const M=D-C,O=p+(M>0?S:0)+M*this.metrics.lineHeight+mF(_,M)*this.metrics.lineHeight+iw(f,x,x+M);this.cache.checkpoints.push({renderedLineIndex:D,lineIndex:x+M,top:O}),D+=Yg}p+=S+v*this.metrics.lineHeight+_.length*this.metrics.lineHeight+iw(f,x,x+v)+w,m=k};for(let v=0;v<e.hunks.length;v++){const x=e.hunks[v];if(x==null)throw new Error("VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index");const S=or({isPartial:e.isPartial,rangeSize:x.collapsedBefore,expandedHunks:d,hunkIndex:v,collapsedContextThreshold:i}),w=S.collapsedLines>0?ll({type:c,metrics:this.metrics,hunkIndex:v,hunkSpecs:x.hunkSpecs})?.totalHeight??0:0;g({rowCount:S.fromStart,startLineIndex:(l==="split"?x.splitLineStart:x.unifiedLineStart)-S.rangeSize});let _=w;g({rowCount:S.fromEnd,startLineIndex:(l==="split"?x.splitLineStart:x.unifiedLineStart)-S.fromEnd,preSeparatorHeight:_}),S.fromEnd>0&&(_=0);const C=v===o?ar({fileDiff:e,hunkIndex:v,expandedHunks:d,collapsedContextThreshold:i,errorPrefix:"VirtualizedFileDiff"}):void 0,k=C!=null&&C.collapsedLines>0?_o({type:c,metrics:this.metrics})?.totalHeight??0:v===o&&s?_o({type:c,metrics:this.metrics})?.totalHeight??0:0,D=C!=null?C.fromStart+C.fromEnd:0,M=l==="split"?x.splitLineCount:x.unifiedLineCount,O=l==="split"?x.splitLineStart:x.unifiedLineStart;g({rowCount:M,startLineIndex:O,preSeparatorHeight:_,postSeparatorHeight:D===0?k:0,metadataOffsets:gF({diffStyle:l,hunk:x,rowCount:M})}),C!=null&&D>0&&g({rowCount:D,startLineIndex:O+M,postSeparatorHeight:k})}this.cache.totalLines=m}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,i;for(;t<=n;){const o=t+n>>1,s=this.cache.checkpoints[o];if(s==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");s.lineIndex<=e?(i=s,t=o+1):n=o-1}return i}getLayoutCheckpointBeforeTop(e,t){let n=0,i=this.cache.checkpoints.length-1,o=-1;for(;n<=i;){const s=n+i>>1,l=this.cache.checkpoints[s];if(l==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");l.top<=e?(o=s,n=s+1):i=s-1}if(t==null)return o>=0?this.cache.checkpoints[o]:void 0;for(let s=o;s>=0;s--){const l=this.cache.checkpoints[s];if(l==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");if(l.renderedLineIndex%t===0)return l}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(const c of e.hunks)n+=t==="split"?c.splitLineCount:c.unifiedLineCount;return n}const{expandUnchanged:i=!1,collapsedContextThreshold:o=1}=this.options,s=i?!0:this.hunksRenderer.getExpandedHunksMap();for(const[c,d]of e.hunks.entries()){const f=t==="split"?d.splitLineCount:d.unifiedLineCount;n+=f;const p=Math.max(d.collapsedBefore,0),{fromStart:m,fromEnd:g,renderAll:v}=or({isPartial:e.isPartial,rangeSize:p,expandedHunks:s,hunkIndex:c,collapsedContextThreshold:o});p>0&&(n+=v?p:m+g)}const l=ar({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:s,collapsedContextThreshold:o,errorPrefix:"VirtualizedFileDiff"});return l!=null&&(n+=l.fromStart+l.fromEnd),n}getLayoutLineCount(e,t){const n=this.getExpandedLineCount(e,t),i=t==="split"?e.splitLineCount:e.unifiedLineCount;return Math.max(n,i,e.additionLines.length,e.deletionLines.length,this.cache.totalLines)}computeRenderRangeFromWindow(e,t,{top:n,bottom:i}){const{disableFileHeader:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:l=1}=this.options,{hunkLineCount:c,lineHeight:d}=this.metrics,f=this.getDiffStyle(),p=this.getHunkSeparatorType(),m=Tm(e,this.options.loadDiffFiles!=null),g=this.height;let v=this.getLayoutLineCount(e,f);const x=yi(this.metrics,o),S=e.hunks.length>0?Id(this.metrics):0,{fileAnnotationHeight:w}=this.cache,_=x+w,C=Math.max(0,g-x-w-S),k=this.hasFileAnnotations(e),D=t+x,M=w>0&&k&&D<i&&D+w>n;if(t<n-g||t>i)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:g-x-S};if(v<=c||e.hunks.length===0)return{startingLine:0,totalLines:c,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(e),v=this.getLayoutLineCount(e,f);const O=Math.ceil(Math.max(i-n,0)/d),z=Math.ceil(O/c)*c+c,j=z/c,F=j,ee=[],q=(n+i)/2,U=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-z*d*2),c);let Z=t+(U?.top??_),X=U?.renderedLineIndex??0,W,P,$;if(Lo({diff:e,diffStyle:f,startingLine:U?.renderedLineIndex??0,expandedHunks:s?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:l,callback:({hunkIndex:ce,hunk:xe,collapsedBefore:pe,collapsedAfter:ze,deletionLine:He,additionLine:st})=>{const je=st!=null?st.splitLineIndex:He.splitLineIndex,Ve=st!=null?st.unifiedLineIndex:He.unifiedLineIndex,rt=(st?.noEOFCR??!1)||(He?.noEOFCR??!1),en=ce===e.hunks.length-1&&xe!=null&&(f==="split"?je===xe.splitLineStart+xe.splitLineCount-1:Ve===xe.unifiedLineStart+xe.unifiedLineCount-1),Bt=(pe>0?ll({type:p,metrics:this.metrics,hunkIndex:ce,hunkSpecs:xe?.hunkSpecs}):void 0)?.totalHeight??0;Z+=Bt;const Ut=X%c===0,Wt=Math.floor(X/c);if(Ut&&(ee[Wt]=Z-(t+_+Bt),$!=null)){if($<=0)return!0;$--}const dt=this.getLineHeight(f==="split"?je:Ve,rt);if(Z>n-dt&&Z<i&&(W??=Wt),P==null&&Z+dt>q&&(P=Wt),$==null&&Z>=i&&Ut&&($=F),X++,Z+=dt,ze>0||en&&m){const ni=_o({type:p,metrics:this.metrics});ni!=null&&(Z<i&&Z+ni.totalHeight>n&&(W??=Wt),P==null&&Z+ni.totalHeight>q&&(P=Wt),Z+=ni.totalHeight)}return!1}}),W==null)if(M)W=0,P=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:g-x-S};P??=W;const ne=Math.round(P-j/2),ue=Math.max(0,Math.ceil(v/c)-j),R=Math.max(0,Math.min(ne,ue)),H=R*c,Y=ne<0?z+ne*c:z,I=ee[R]??0,le=H===0?0:w+I,fe=R+Y/c,re=fe<ee.length?C-ee[fe]:C-(Z-t-_);return{startingLine:H,totalLines:Y,bufferBefore:le,bufferAfter:Math.max(0,re)}}};function fF(e){let t;for(const n of e){if(n==null)continue;const i=n.children[1];if(i instanceof HTMLElement)for(const o of i.children)o instanceof HTMLElement&&o.dataset.lineAnnotation===KT&&(t=Math.max(t??0,o.getBoundingClientRect().height))}return t}function hF(e){const t=Array.from(e).sort((s,l)=>s[0]-l[0]),n=[],i=[0];let o=0;for(const[s,l]of t)n.push(s),o+=l,i.push(o);return{lineIndexes:n,prefixTotals:i}}function iw({lineIndexes:e,prefixTotals:t},n,i){if(n>=i||e.length===0)return 0;const o=rw(e,n);return(t[rw(e,i)]??0)-(t[o]??0)}function rw(e,t){let n=0,i=e.length;for(;n<i;){const o=n+i>>1,s=e[o];if(s==null)throw new Error("VirtualizedFileDiff: invalid prefix index");s<t?n=o+1:i=o}return n}function pF(e){return Math.ceil(e/Yg)*Yg}function mF(e,t){let n=0;for(const i of e)i<t&&n++;return n}function gF({diffStyle:e,hunk:t,rowCount:n}){if(n<=0||!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return[];const i=t.hunkContent.at(-1);if(i==null)return[];if(i.type==="context")return[n-1];const o=Math.max(i.deletions,i.additions),s=i.deletions+i.additions;if(e==="split")return o>0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[n-1]:[];const l=[],c=n-s;return i.deletions>0&&t.noEOFCRDeletions&&l.push(c+i.deletions-1),i.additions>0&&t.noEOFCRAdditions&&l.push(n-1),l}function yF(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.loadDiffFiles!=!!t.loadDiffFiles||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)||e.unsafeCSS!==t.unsafeCSS}function vF(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||!!e.loadDiffFiles!=!!t.loadDiffFiles||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function Tm(e,t){return e.isPartial&&t&&(e.type==="change"||e.type==="rename-changed")}function bF(e){return typeof e=="function"?"custom":e??"line-info"}function ow(e,t){return e==null||t==null?e==null&&t==null:Xn(e,t)}function xF(e,t){const[n,i]=e.split(",").map(Number);return t==="split"?i:n}function SF({hunkIndex:e,lineIndex:t,conflictIndex:n}){return`merge-conflict-action-${e}-${t}-${n}`}function _F(e,t){const n=t.hunks[e.hunkIndex];if(n!=null)return{hunkIndex:e.hunkIndex,lineIndex:CF(n,e.startContentIndex)}}function CF(e,t){let n=e.unifiedLineStart;for(let i=0;i<t;i++){const o=e.hunkContent[i];n+=o.type==="context"?o.lines:o.deletions+o.additions}return n}function aw(e){const t=[];for(const n of e){const i=Po.get(n);if(i==null)throw new Error(`getResolvedLanguages: ${n} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(i)}return t}function sw(e){for(const t of Array.isArray(e)?e:[e])if(!Po.has(t))return!1;return!0}async function lw(e){const t=[],n=[];for(const i of e){if(i==="text"||i==="ansi")continue;const o=DT(i)??OT(i);"then"in o?n.push(o):t.push(o)}return n.length>0&&await Promise.all(n).then(i=>{for(const o of i){if(o==null)throw new Error("resolvedLanguages: unable to resolve language");t.push(o)}}),t}function uw(e){return Jn.getResolvedThemes(e)}async function cw(e){for(const n of e)BT(n);const t=await Jn.resolveThemes(e);for(let n=0;n<e.length;n++)UT(e[n],t[n]);return t}function kA(e){const t=N.useRef(e);return N.useInsertionEffect(()=>{t.current=e}),N.useCallback((...n)=>t.current(...n),[])}const wF=N.createContext(void 0);function TA(){return N.useContext(wF)}const AA={position:"absolute",top:0,bottom:0,textAlign:"center",whiteSpace:"normal",touchAction:"none"},EF={display:"contents"};function Hd(){return null}function kF({fileDiff:e,actions:t,renderCustomHeader:n,renderHeaderPrefix:i,renderHeaderFilenameSuffix:o,renderHeaderMetadata:s,renderAnnotation:l,renderGutterUtility:c,renderMergeConflictUtility:d,lineAnnotations:f,getHoveredLine:p,getInstance:m}){const g=n?.(e),v=i?.(e),x=o?.(e),S=s?.(e);return T.jsxs(T.Fragment,{children:[g!=null?T.jsx("div",{slot:Vl,children:g}):T.jsxs(T.Fragment,{children:[v!=null&&T.jsx("div",{slot:"header-prefix",children:v}),x!=null&&T.jsx("div",{slot:"header-filename-suffix",children:x}),S!=null&&T.jsx("div",{slot:"header-metadata",children:S})]}),l!=null&&f?.map((w,_)=>T.jsx("div",{slot:ei(w),children:l(w)},_)),t!=null&&d!=null&&m!=null&&t.map(w=>{if(w==null)return;const _=TF(w,e);return T.jsx("div",{slot:_,style:EF,children:d(w,m)},_)}),c!=null&&T.jsx("div",{slot:"gutter-utility-slot",style:AA,children:c(p)})]})}function TF(e,t){const n=_F(e,t);return n!=null?SF({hunkIndex:n.hunkIndex,lineIndex:n.lineIndex,conflictIndex:e.conflictIndex}):void 0}function AF({file:e,renderCustomHeader:t,renderHeaderPrefix:n,renderHeaderFilenameSuffix:i,renderHeaderMetadata:o,renderAnnotation:s,lineAnnotations:l,renderGutterUtility:c,getHoveredLine:d}){const f=t?.(e),p=n?.(e),m=i?.(e),g=o?.(e);return T.jsxs(T.Fragment,{children:[f!=null?T.jsx("div",{slot:Vl,children:f}):T.jsxs(T.Fragment,{children:[p!=null&&T.jsx("div",{slot:"header-prefix",children:p}),m!=null&&T.jsx("div",{slot:"header-filename-suffix",children:m}),g!=null&&T.jsx("div",{slot:"header-metadata",children:g})]}),s!=null&&l?.map((v,x)=>T.jsx("div",{slot:ei(v),children:s(v)},x)),c!=null&&T.jsx("div",{slot:"gutter-utility-slot",style:AA,children:c(d)})]})}var ul={exports:{}},LF=ul.exports,dw;function RF(){return dw||(dw=1,(function(e,t){(function(n,i){i(t)})(LF,function(n){const i=Symbol("newer"),o=Symbol("older");class s{constructor(m,g){typeof m!="number"&&(g=m,m=0),this.size=0,this.limit=m,this.oldest=this.newest=void 0,this._keymap=new Map,g&&(this.assign(g),m<1&&(this.limit=this.size))}_markEntryAsUsed(m){m!==this.newest&&(m[i]&&(m===this.oldest&&(this.oldest=m[i]),m[i][o]=m[o]),m[o]&&(m[o][i]=m[i]),m[i]=void 0,m[o]=this.newest,this.newest&&(this.newest[i]=m),this.newest=m)}assign(m){let g,v=this.limit||Number.MAX_VALUE;this._keymap.clear();let x=m[Symbol.iterator]();for(let S=x.next();!S.done;S=x.next()){let w=new l(S.value[0],S.value[1]);if(this._keymap.set(w.key,w),g?(g[i]=w,w[o]=g):this.oldest=w,g=w,v--==0)throw new Error("overflow")}this.newest=g,this.size=this._keymap.size}get(m){var g=this._keymap.get(m);return g?(this._markEntryAsUsed(g),g.value):void 0}set(m,g){var v=this._keymap.get(m);return v?(v.value=g,this._markEntryAsUsed(v),this):(this._keymap.set(m,v=new l(m,g)),this.newest?(this.newest[i]=v,v[o]=this.newest):this.oldest=v,this.newest=v,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var m=this.oldest;if(m)return this.oldest[i]?(this.oldest=this.oldest[i],this.oldest[o]=void 0):(this.oldest=void 0,this.newest=void 0),m[i]=m[o]=void 0,this._keymap.delete(m.key),--this.size,[m.key,m.value]}find(m){let g=this._keymap.get(m);return g?g.value:void 0}has(m){return this._keymap.has(m)}delete(m){var g=this._keymap.get(m);return g?(this._keymap.delete(g.key),g[i]&&g[o]?(g[o][i]=g[i],g[i][o]=g[o]):g[i]?(g[i][o]=void 0,this.oldest=g[i]):g[o]?(g[o][i]=void 0,this.newest=g[o]):this.oldest=this.newest=void 0,this.size--,g.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new d(this.oldest)}values(){return new f(this.oldest)}entries(){return this}[Symbol.iterator](){return new c(this.oldest)}forEach(m,g){typeof g!="object"&&(g=this);let v=this.oldest;for(;v;)m.call(g,v.value,v.key,this),v=v[i]}toJSON(){for(var m=new Array(this.size),g=0,v=this.oldest;v;)m[g++]={key:v.key,value:v.value},v=v[i];return m}toString(){for(var m="",g=this.oldest;g;)m+=String(g.key)+":"+g.value,g=g[i],g&&(m+=" < ");return m}}n.LRUMap=s;function l(p,m){this.key=p,this.value=m,this[i]=void 0,this[o]=void 0}function c(p){this.entry=p}c.prototype[Symbol.iterator]=function(){return this},c.prototype.next=function(){let p=this.entry;return p?(this.entry=p[i],{done:!1,value:[p.key,p.value]}):{done:!0,value:void 0}};function d(p){this.entry=p}d.prototype[Symbol.iterator]=function(){return this},d.prototype.next=function(){let p=this.entry;return p?(this.entry=p[i],{done:!1,value:p.key}):{done:!0,value:void 0}};function f(p){this.entry=p}f.prototype[Symbol.iterator]=function(){return this},f.prototype.next=function(){let p=this.entry;return p?(this.entry=p[i],{done:!1,value:p.value}):{done:!0,value:void 0}}})})(ul,ul.exports)),ul.exports}var OF=RF();const fw=Bd(OF),Uc=Symbol("IGNORE_RESPONSE");var Vc=class extends Error{constructor(){super("WorkerPoolManager: operation canceled because the pool terminated")}},Am=class extends Error{constructor(){super("WorkerPoolManager: operation canceled before the task completed")}},DF=class{options;highlighter;preferredHighlighter;renderOptions;renderOptionsRequestVersion=0;renderOptionsVersion=0;initialized=!1;workers=[];queuedTasks=[];queuedTaskByInstance=new Map;taskByHighlightKey=new Map;activeTaskById=new Map;activeRequestByInstance=new Map;nextRequestId=0;themeSubscribers=new Set;workersFailed=!1;statSubscribers=new Set;fileCache;diffCache;_queuedBroadcast;lifecycleGeneration=0;constructor(e,{langs:t,theme:n=mt,useTokenTransformer:i=!1,lineDiffType:o="word-alt",maxLineDiffLength:s=1e3,tokenizeMaxLineLength:l=1e3,preferredHighlighter:c="shiki-js"}){this.options=e,this.preferredHighlighter=c,this.renderOptions={theme:n,useTokenTransformer:i,lineDiffType:o,maxLineDiffLength:s,tokenizeMaxLineLength:l},this.fileCache=new fw.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new fw.LRUMap(e.totalASTLRUCacheSize??100),this.queueInitialization(t)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return e.cacheKey!=null?this.fileCache.get(e.cacheKey):void 0}getDiffResultCache(e){return e.cacheKey!=null?this.diffCache.get(e.cacheKey):void 0}inspectCaches(){const{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){try{return this.fileCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}evictDiffFromCache(e){try{return this.diffCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}async setRenderOptions({theme:e=this.renderOptions.theme??mt,useTokenTransformer:t=this.renderOptions.useTokenTransformer??!1,lineDiffType:n=this.renderOptions.lineDiffType??"word-alt",maxLineDiffLength:i=this.renderOptions.maxLineDiffLength??1e3,tokenizeMaxLineLength:o=this.renderOptions.tokenizeMaxLineLength??1e3}){const{lifecycleGeneration:s}=this,l=++this.renderOptionsRequestVersion,c=()=>this.isCurrentLifecycle(s)&&this.renderOptionsRequestVersion===l;try{const d={theme:e,useTokenTransformer:t,lineDiffType:n,maxLineDiffLength:i,tokenizeMaxLineLength:o};if(this.isInitialized()||await this.initialize(),!c()||mi(d,this.renderOptions))return;const f=Rl(e);let p=[];if(ts(d.theme,this.renderOptions.theme)||(Ng(f)?p=uw(f):p=await cw(f)),!c())return;if(this.highlighter!=null)Ig(p,this.highlighter);else{const g=await Dd({themes:f,langs:["text"],preferredHighlighter:this.preferredHighlighter});if(!c())return;this.highlighter=g}const m=this.setRenderOptionsOnWorkers(d,p);this.renderOptions=d,this.renderOptionsVersion++,this.diffCache.clear(),this.fileCache.clear(),this.invalidateRenderTasks();for(const g of this.themeSubscribers)g.onThemeChange();await m}catch(d){if(d instanceof Vc||!c())return;throw d}}getPreferredHighlighter(){return this.preferredHighlighter}getFileRenderOptions(){const{tokenizeMaxLineLength:e,theme:t,useTokenTransformer:n}=this.renderOptions;return{theme:t,useTokenTransformer:n,tokenizeMaxLineLength:e}}getDiffRenderOptions(){return{...this.renderOptions}}async setRenderOptionsOnWorkers(e,t){if(this.workersFailed)return;this.isInitialized()||await this.initialize();const n=[];for(const i of this.workers){if(!i.initialized)throw console.log({managedWorker:i}),new Error("setRenderOptionsOnWorkers: Somehow we have an uninitialized worker");n.push(new Promise((o,s)=>{const l=this.generateRequestId(),c={type:"set-render-options",id:l,request:{type:"set-render-options",id:l,renderOptions:e,resolvedThemes:t},resolve:o,reject:s,requestStart:Date.now()};this.activeTaskById.set(l,c),i.pendingSetupRequestId=l,i.worker.postMessage(c.request)}))}await Promise.all(n)}subscribeToThemeChanges(e){return this.themeSubscribers.add(e),this.queueBroadcastStateChanges(),()=>{this.unsubscribeToThemeChanges(e),this.queueBroadcastStateChanges()}}unsubscribeToThemeChanges(e){this.themeSubscribers.delete(e),this.queueBroadcastStateChanges()}subscribeToStatChanges(e){return this.statSubscribers.add(e),e(this.getStats()),()=>{this.statSubscribers.delete(e)}}queueBroadcastStateChanges(){this._queuedBroadcast==null&&(this._queuedBroadcast=requestAnimationFrame(this._broadcastStateChanges))}_broadcastStateChanges=()=>{this._queuedBroadcast!=null&&(cancelAnimationFrame(this._queuedBroadcast),this._queuedBroadcast=void 0);const e=this.getStats();for(const t of this.statSubscribers)t(e)};cleanUpTasks(e){this.detachInstanceFromQueuedTasks(e);const t=this.activeRequestByInstance.get(e);if(t!=null){const n=this.activeTaskById.get(t);Hr(n)?(this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeActiveTask(n)):this.activeTaskById.delete(t)}this.activeRequestByInstance.delete(e),this.queueBroadcastStateChanges()}isInitialized(){return this.initialized===!0}async initialize(e=[]){if(this.initialized!==!0)if(this.initialized===!1){const{lifecycleGeneration:t}=this;this.initialized=new Promise((n,i)=>{(async()=>{try{const o=Rl(this.renderOptions.theme);let s=[];if(Ng(o)?s=uw(o):s=await cw(o),!this.isCurrentLifecycle(t)){n();return}let l=[];if(sw(e)?l=aw(e):l=await lw(e),!this.isCurrentLifecycle(t)){n();return}const[c]=await Promise.all([Dd({themes:o,langs:["text",...e],preferredHighlighter:this.preferredHighlighter}),this.initializeWorkers(s,l)]);if(!this.isCurrentLifecycle(t)){this.terminateWorkers(),n();return}this.highlighter=c,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),this.queueBroadcastStateChanges(),n()}catch(o){if(o instanceof Vc||!this.isCurrentLifecycle(t)){n();return}this.initialized=!1,this.workersFailed=!0;for(const s of this.queuedTasks)this.rejectRenderTaskCallbacks(s,Lm(o));this.queueBroadcastStateChanges(),i(o)}})()}),this.queueBroadcastStateChanges()}else return this.initialized}async initializeWorkers(e,t){this.workersFailed=!1;const n=[],i=void 0;this.workers.length>0&&this.terminateWorkers();for(let o=0;o<(this.options.poolSize??8);o++){const s=this.options.workerFactory(),l={worker:s,requestId:void 0,pendingSetupRequestId:void 0,initialized:!1,langs:new Set(["text",...t.map(({name:c})=>c)]),customExtensionsVersion:0};s.addEventListener("message",c=>{this.handleWorkerMessage(l,c.data)}),s.addEventListener("error",c=>console.error("Worker error:",c,l)),this.workers.push(l),n.push(new Promise((c,d)=>{const f=this.generateRequestId(),p={type:"initialize",id:f,request:{type:"initialize",id:f,renderOptions:this.renderOptions,preferredHighlighter:this.preferredHighlighter,resolvedThemes:e,resolvedLanguages:t,customExtensionsVersion:void 0,customExtensionMap:i},resolve(){l.initialized=!0,c()},reject:d,requestStart:Date.now()};this.activeTaskById.set(f,p),this.executeTask(l,p)}))}await Promise.all(n)}drainQueue=()=>{if(this._queuedDrain=void 0,!(this.initialized!==!0||this.queuedTasks.length===0)){for(let e=0;e<this.queuedTasks.length;){const t=this.queuedTasks[e];if(this.hasActiveRequest(t)){e++;continue}const n=hw(t),i=this.getAvailableWorker(n);if(i==null)break;this.queuedTasks.splice(e,1),this.assignWorkerToTask(t,i),this.resolveLanguagesAndExecuteTask(i,t,n)}this.queueBroadcastStateChanges()}};highlightFileAST(e,t){const n=this.getFileResultCache(t);Ol(t)||n!=null&&Qi(n.options,this.getFileRenderOptions())||this.hasMatchingFileInstanceTask(e,t)||this.submitTask(e,{type:"file",file:t})}primeFileHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(new Error("WorkerPoolManager.primeFileHighlightCache: worker pool is not working"));const t=this.getOrCreateFileHighlightCacheTask(e);return t!=null?this.createRenderTaskCallbacks(t):Promise.resolve()}getOrCreateFileHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeFileHighlightCache: priming highlight cache requires file.cacheKey; skipping "${e.name}".`);return}const t=this.getFileResultCache(e),n=this.getFileHighlightKey(e);if(n==null||Ol(e)||t!=null&&Qi(t.options,this.getFileRenderOptions()))return;const i=this.getTaskByHighlightKey(n);if(i!=null)return i.primeCache=!0,i.type==="file"?i:void 0;{const o=this.submitCacheTask({type:"file",file:e},n);return o.type==="file"?o:void 0}}getPlainFileAST(e,t,n,i){if(this.highlighter==null){this.queueInitialization();return}return XT(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,lines:i})}highlightDiffAST(e,t){const n=this.getDiffResultCache(t);Ya(t)||n!=null&&mi(n.options,this.getDiffRenderOptions())||this.hasMatchingDiffInstanceTask(e,t)||this.submitTask(e,{type:"diff",diff:t})}primeDiffHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(new Error("WorkerPoolManager.primeDiffHighlightCache: worker pool is not working"));const t=this.getOrCreateDiffHighlightCacheTask(e);return t!=null?this.createRenderTaskCallbacks(t):Promise.resolve()}getOrCreateDiffHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeDiffHighlightCache: priming highlight cache requires diff.cacheKey; skipping "${e.prevName??e.name}" -> "${e.name}".`);return}const t=this.getDiffResultCache(e),n=this.getDiffHighlightKey(e);if(n==null||Ya(e)||t!=null&&mi(t.options,this.getDiffRenderOptions()))return;const i=this.getTaskByHighlightKey(n);if(i!=null)return i.primeCache=!0,i.type==="diff"?i:void 0;{const o=this.submitCacheTask({type:"diff",diff:e},n);return o.type==="diff"?o:void 0}}getPlainDiffAST(e,t,n,i,o){return this.highlighter!=null?xA(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,expandedHunks:i,collapsedContextThreshold:o}):void 0}terminate(){this.lifecycleGeneration++,this.cancelActiveWorkerTasks(),this.terminateWorkers();const e=new Vc;for(const t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,e);this.fileCache.clear(),this.diffCache.clear(),this.activeRequestByInstance.clear(),this.queuedTasks.length=0,this.queuedTaskByInstance.clear(),this.taskByHighlightKey.clear(),this.activeTaskById.clear(),this.highlighter=void 0,this.initialized=!1,this.workersFailed=!1,this.queueBroadcastStateChanges()}isCurrentLifecycle(e){return this.lifecycleGeneration===e}queueInitialization(e){this.initialize(e).catch(t=>{console.error(t)})}cancelActiveWorkerTasks(){const e=new Vc;for(const t of this.activeTaskById.values())"reject"in t?t.reject(e):Hr(t)&&this.rejectRenderTaskCallbacks(t,e)}terminateWorkers(){for(const e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{managerState:this.initialized===!1?"waiting":this.initialized!==!0?"initializing":"initialized",totalWorkers:this.workers.length,workersFailed:this.workersFailed,busyWorkers:this.workers.filter(e=>e.requestId!=null||e.pendingSetupRequestId!=null).length,queuedTasks:this.queuedTasks.length,activeTasks:this.activeTaskById.size,themeSubscribers:this.themeSubscribers.size,fileCacheSize:this.fileCache.size,diffCacheSize:this.diffCache.size}}submitTask(e,t){this.initialized===!1&&this.queueInitialization();const n=this.getHighlightKeyForRequest(t),i=n!=null?this.getTaskByHighlightKey(n):void 0;if(i!=null){this.detachInstanceFromQueuedTasks(e,i),this.addInstanceToTask(i,e),this.queueBroadcastStateChanges();return}this.detachInstanceFromQueuedTasks(e);const o=this.generateRequestId(),s=Date.now(),{renderOptionsVersion:l}=this,c=(()=>{switch(t.type){case"file":return{type:"file",id:o,request:{...t,id:o},instances:new Set([e]),primeCache:!1,highlightKey:n,callbacks:new Set,renderOptionsVersion:l,requestStart:s};case"diff":return{type:"diff",id:o,request:{...t,id:o},instances:new Set([e]),primeCache:!1,highlightKey:n,callbacks:new Set,renderOptionsVersion:l,requestStart:s}}})();this.enqueueRenderTask(c,e)}submitCacheTask(e,t){this.initialized===!1&&this.queueInitialization();const n=this.generateRequestId(),i=Date.now(),{renderOptionsVersion:o}=this,s=(()=>{switch(e.type){case"file":return{type:"file",id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:o,requestStart:i};case"diff":return{type:"diff",id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:o,requestStart:i}}})();return this.enqueueRenderTask(s),s}enqueueRenderTask(e,t){this.queuedTasks.push(e),t!=null&&this.queuedTaskByInstance.set(t,e),e.highlightKey!=null&&this.taskByHighlightKey.set(e.highlightKey,e),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,n){try{const i=n.filter(o=>!e.langs.has(o));if(i.length>0&&(sw(i)?t.request.resolvedLanguages=aw(i):t.request.resolvedLanguages=await lw(i)),!this.activeTaskById.has(t.id)){e.requestId===t.id&&(this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain());return}this.executeTask(e,t)}catch(i){this.rejectRenderTaskCallbacks(t,Lm(i)),this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}}handleWorkerMessage(e,t){const n=this.activeTaskById.get(t.id);try{if(n==null)throw Uc;if(t.type==="error"){const i=new Error(t.error);if(t.stack&&(i.stack=t.stack),"reject"in n)n.reject(i);else if(Hr(n))this.notifyHighlightError(n,i),this.rejectRenderTaskCallbacks(n,i);else throw new Error("handleWorkerMessage: unknown task type");throw i}else switch(t.requestType){case"initialize":if(n.type!=="initialize")throw new Error("handleWorkerMessage: task/response dont match");this.syncCustomExtensionVersion(e,n.request),n.resolve();break;case"set-render-options":if(n.type!=="set-render-options")throw new Error("handleWorkerMessage: task/response dont match");n.resolve();break;case"file":{if(n.type!=="file")throw new Error("handleWorkerMessage: task/response dont match");const{result:i,options:o}=t;if(!this.isCurrentRenderTask(n)||!Qi(o,this.getFileRenderOptions()))throw Uc;const{request:s}=n;this.syncCustomExtensionVersion(e,s),n.cacheKeyAtDispatch!=null&&this.fileCache.set(n.cacheKeyAtDispatch,{result:i,options:o}),this.resolveRenderTaskCallbacks(n),this.notifyFileInstances(n,i,o);break}case"diff":{if(n.type!=="diff")throw new Error("handleWorkerMessage: task/response dont match");const{result:i,options:o}=t;if(!this.isCurrentRenderTask(n)||!mi(o,this.getDiffRenderOptions()))throw Uc;const{request:s}=n;this.syncCustomExtensionVersion(e,s),n.cacheKeyAtDispatch!=null&&this.diffCache.set(n.cacheKeyAtDispatch,{result:i,options:o}),this.resolveRenderTaskCallbacks(n),this.notifyDiffInstances(n,i,o);break}}}catch(i){i!==Uc&&console.error(i,n,t)}this.cleanWorkerAndTask(e,n,t.id),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}_queuedDrain;queueDrain(){this._queuedDrain==null&&(this._queuedDrain=Promise.resolve().then(this.drainQueue),this.queueBroadcastStateChanges())}assignWorkerToTask(e,t){t.requestId=e.id,Hr(e)&&(this.clearQueuedInstanceRequests(e),this.trackInstanceRequests(e)),this.activeTaskById.set(e.id,e)}cleanWorkerAndTask(e,t,n=t?.id){e.requestId===n&&(e.requestId=void 0),e.pendingSetupRequestId===n&&(e.pendingSetupRequestId=void 0),t!=null&&(Hr(t)&&(this.rejectRenderTaskCallbacks(t,new Am),this.clearInstanceRequests(t),this.clearHighlightKey(t)),this.activeTaskById.delete(t.id))}executeTask(e,t){MF(t.request)&&this.maybeAttachCustomExtensions(e,t.request),this.activeTaskById.has(t.id)||this.assignWorkerToTask(t,e);for(const n of hw(t))e.langs.add(n);try{t.type==="file"?t.cacheKeyAtDispatch=t.request.file.cacheKey:t.type==="diff"&&(t.cacheKeyAtDispatch=t.request.diff.cacheKey),e.worker.postMessage(t.request)}catch(n){console.error("Failed to post message to worker:",n),Hr(t)?(this.notifyHighlightError(t,n),this.rejectRenderTaskCallbacks(t,Lm(n))):"reject"in t&&t.reject(n),this.cleanWorkerAndTask(e,t),this.queuedTasks.length>0&&this.queueDrain()}this.queueBroadcastStateChanges()}maybeAttachCustomExtensions(e,t){if(t.customExtensionsVersion!=null)return;const n=uU();e.customExtensionsVersion>=n||(t.customExtensionsVersion=n,t.customExtensionMap=cU())}syncCustomExtensionVersion(e,t){t.customExtensionsVersion!=null&&(e.customExtensionsVersion=t.customExtensionsVersion)}getAvailableWorker(e){let t;for(const n of this.workers){if(n.requestId!=null||n.pendingSetupRequestId!=null||!n.initialized)continue;if(t=n,e.length===0)break;let i=!0;for(const o of e)if(!n.langs.has(o)){i=!1;break}if(i)break}return t}getFileHighlightKey(e){if(e.cacheKey!=null)return`file:${e.cacheKey}:${this.renderOptionsVersion}`}getDiffHighlightKey(e){if(e.cacheKey!=null)return`diff:${e.cacheKey}:${this.renderOptionsVersion}`}getHighlightKeyForRequest(e){switch(e.type){case"file":return this.getFileHighlightKey(e.file);case"diff":return this.getDiffHighlightKey(e.diff)}}hasActiveRequest(e){for(const t of rl(e))if(this.activeRequestByInstance.has(t))return!0;return!1}addInstanceToTask(e,t){e.type,e.instances.add(t),this.activeTaskById.has(e.id)?this.activeRequestByInstance.set(t,e.id):this.queuedTaskByInstance.set(t,e)}detachInstanceFromQueuedTasks(e,t){const n=this.queuedTaskByInstance.get(e);n==null||n===t||(this.queuedTaskByInstance.delete(e),this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeQueuedTask(n))}detachInstanceFromRenderTask(e,t){e.type,e.instances.delete(t)}removeQueuedTask(e){const t=this.queuedTasks.indexOf(e);t!==-1&&this.queuedTasks.splice(t,1),this.rejectRenderTaskCallbacks(e,new Am),this.clearQueuedInstanceRequests(e),this.clearHighlightKey(e)}removeActiveTask(e){this.rejectRenderTaskCallbacks(e,new Am),this.clearInstanceRequests(e),this.clearHighlightKey(e),this.activeTaskById.delete(e.id)}createRenderTaskCallbacks(e){return new Promise((t,n)=>{e.callbacks.add({resolve:t,reject:n})})}resolveRenderTaskCallbacks(e){for(const t of e.callbacks)t.resolve();e.callbacks.clear()}rejectRenderTaskCallbacks(e,t){for(const n of e.callbacks)n.reject(t);e.callbacks.clear()}invalidateRenderTasks(){for(let e=this.queuedTasks.length-1;e>=0;e--){const t=this.queuedTasks[e];t.renderOptionsVersion!==this.renderOptionsVersion&&this.removeQueuedTask(t)}for(const e of Array.from(this.activeTaskById.values()))Hr(e)&&e.renderOptionsVersion!==this.renderOptionsVersion&&this.removeActiveTask(e)}clearQueuedInstanceRequests(e){for(const t of rl(e))this.queuedTaskByInstance.get(t)===e&&this.queuedTaskByInstance.delete(t)}clearHighlightKey(e){e.highlightKey!=null&&this.taskByHighlightKey.get(e.highlightKey)===e&&this.taskByHighlightKey.delete(e.highlightKey)}trackInstanceRequests(e){for(const t of rl(e))this.activeRequestByInstance.set(t,e.id)}clearInstanceRequests(e){for(const t of rl(e))this.activeRequestByInstance.get(t)===e.id&&this.activeRequestByInstance.delete(t)}notifyFileInstances(e,t,n){for(const i of e.instances)this.activeRequestByInstance.get(i)===e.id&&i.onHighlightSuccess(e.request.file,t,n)}notifyDiffInstances(e,t,n){for(const i of e.instances)this.activeRequestByInstance.get(i)===e.id&&i.onHighlightSuccess(e.request.diff,t,n)}notifyHighlightError(e,t){for(const n of rl(e))this.activeRequestByInstance.get(n)===e.id&&n.onHighlightError(t)}hasMatchingFileInstanceTask(e,t){for(const n of this.iterateRenderTasks())if(n.type==="file"&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&Xn(t,n.request.file))return!0;return!1}hasMatchingDiffInstanceTask(e,t){for(const n of this.iterateRenderTasks())if(n.type==="diff"&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&Eo(n.request.diff,t))return!0;return!1}getTaskByHighlightKey(e){const t=this.taskByHighlightKey.get(e);return t!=null&&this.isCurrentRenderTask(t)?t:void 0}isCurrentRenderTask(e){return e.renderOptionsVersion===this.renderOptionsVersion}*iterateRenderTasks(){for(const e of this.queuedTasks)yield e;for(const e of this.activeTaskById.values())Hr(e)&&(yield e)}generateRequestId(){return`req_${++this.nextRequestId}`}};function MF(e){return e.type==="initialize"||e.type==="file"||e.type==="diff"}function hw(e){const t=new Set;if(e.type==="initialize"||e.type==="set-render-options")return[];switch(e.type){case"file":t.add(e.request.file.lang??Jt(e.request.file.name));break;case"diff":t.add(e.request.diff.lang??Jt(e.request.diff.name)),t.add(e.request.diff.lang??Jt(e.request.diff.prevName??"-"));break}return t.delete("text"),Array.from(t)}function Hr(e){return e?.type==="file"||e?.type==="diff"}function rl(e){return e.instances}function Lm(e){return e instanceof Error?e:new Error(String(e))}let vl;function IF({poolOptions:e,highlighterOptions:t}){return vl??=new DF(e,t),vl}function NF(){vl!=null&&(vl.terminate(),vl=void 0)}const Xy=N.createContext(void 0);let Rm=0;function zF({children:e,poolOptions:t,highlighterOptions:n}){const[i]=N.useState(()=>{if(!(typeof window>"u"))return IF({poolOptions:t,highlighterOptions:n})});return N.useInsertionEffect(()=>{if(i!=null)return Rm++,()=>{Rm--}},[i]),N.useEffect(()=>()=>{Rm===0&&NF()},[]),T.jsx(Xy.Provider,{value:i,children:e})}function LA(e,t){return typeof window>"u"&&t!=null?T.jsxs(T.Fragment,{children:[T.jsx("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:t}}),e]}):T.jsx(T.Fragment,{children:e})}const PF=N.createContext(void 0);function RA(){return N.useContext(PF)}const pw=typeof window>"u"?N.useEffect:N.useLayoutEffect;function HF({file:e,options:t,editorOptions:n,lineAnnotations:i,selectedLines:o,prerenderedHTML:s,metrics:l,hasGutterRenderUtility:c,hasCustomHeader:d,disableWorkerPool:f,edit:p}){const m=RA(),g=o!==void 0,v=N.useContext(Xy),x=TA(),S=N.useRef(null),w=kA(_=>{if(_!=null){if(S.current!=null)throw new Error("File: An instance should not already exist when a node is created");m!=null?S.current=new qU(Om({controlledSelection:g,hasCustomHeader:d,hasGutterRenderUtility:c,options:t}),m,l,f?void 0:v,!0):S.current=new pA(Om({controlledSelection:g,hasCustomHeader:d,hasGutterRenderUtility:c,options:t}),f?void 0:v,!0),S.current.hydrate({file:e,fileContainer:_,lineAnnotations:i,prerenderedHTML:s})}else{if(S.current==null)throw new Error("File: A File instance should exist when unmounting");S.current.cleanUp(),S.current=null}});return pw(()=>{if(S.current==null)return;const _=Om({controlledSelection:g,hasCustomHeader:d,hasGutterRenderUtility:c,options:t}),C=_!==void 0&&!Zd(S.current.options,_);S.current.setOptions(_),S.current.render({file:e,lineAnnotations:i,forceRender:C}),o!==void 0&&S.current.setSelectedLines(o)}),pw(()=>{if(p&&S.current!=null){if(x===void 0)throw new Error("File: EditContext is not attached");const _=x(n??{});if(_==null)throw new Error("File: EditProvider.createEditor must return an editor instance");try{return _.edit(S.current)}catch(C){throw _.cleanUp(),C}}},[p]),{ref:w,getHoveredLine:N.useCallback(()=>S.current?.getHoveredLine(),[])}}function Om({options:e,controlledSelection:t,hasCustomHeader:n,hasGutterRenderUtility:i}){return t||i||n?{...e,controlledSelection:t,renderCustomHeader:n?Hd:e?.renderCustomHeader,renderGutterUtility:i?Hd:e?.renderGutterUtility}:e}function jF({file:e,lineAnnotations:t,selectedLines:n,options:i,editorOptions:o,metrics:s,className:l,style:c,renderAnnotation:d,renderCustomHeader:f,renderHeaderPrefix:p,renderHeaderFilenameSuffix:m,renderHeaderMetadata:g,prerenderedHTML:v,renderGutterUtility:x,disableWorkerPool:S=!1,edit:w=!1}){const{ref:_,getHoveredLine:C}=HF({file:e,options:i,editorOptions:o,metrics:s,lineAnnotations:t,selectedLines:n,prerenderedHTML:v,hasGutterRenderUtility:x!=null,hasCustomHeader:f!=null,disableWorkerPool:S,edit:w});return T.jsx(Dy,{ref:_,className:l,style:c,children:LA(AF({file:e,renderAnnotation:d,renderCustomHeader:f,renderHeaderPrefix:p,renderHeaderFilenameSuffix:m,renderHeaderMetadata:g,renderGutterUtility:x,lineAnnotations:t,getHoveredLine:C}),v)})}const mw=typeof window>"u"?N.useEffect:N.useLayoutEffect;function BF({fileDiff:e,options:t,editorOptions:n,lineAnnotations:i,selectedLines:o,prerenderedHTML:s,metrics:l,hasGutterRenderUtility:c,hasCustomHeader:d,disableWorkerPool:f,edit:p}){const m=RA(),g=o!==void 0,v=N.useContext(Xy),x=TA(),S=N.useRef(null),w=kA(_=>{if(_!=null){if(S.current!=null)throw new Error("useFileDiffInstance: An instance should not already exist when a node is created");m!=null?S.current=new dF(Dm({controlledSelection:g,hasCustomHeader:d,hasGutterRenderUtility:c,options:t}),m,l,f?void 0:v,!0):S.current=new EA(Dm({controlledSelection:g,hasCustomHeader:d,hasGutterRenderUtility:c,options:t}),f?void 0:v,!0),S.current.hydrate({fileDiff:e,fileContainer:_,lineAnnotations:i,prerenderedHTML:s})}else{if(S.current==null)throw new Error("useFileDiffInstance: A FileDiff instance should exist when unmounting");S.current.cleanUp(),S.current=null}});return mw(()=>{const{current:_}=S;if(_==null)return;const C=Dm({controlledSelection:g,hasCustomHeader:d,hasGutterRenderUtility:c,options:t}),k=C!==void 0&&!Zd(_.options,C);_.setOptions(C),_.render({forceRender:k,fileDiff:e,lineAnnotations:i}),o!==void 0&&_.setSelectedLines(o)}),mw(()=>{if(p&&S.current!=null){if(x===void 0)throw new Error("FileDiff: EditContext is not attached");const _=x(n??{});if(_==null)throw new Error("FileDiff: EditProvider.createEditor must return an editor instance");try{return _.edit(S.current)}catch(C){throw _.cleanUp(),C}}},[p]),{ref:w,getHoveredLine:N.useCallback(()=>S.current?.getHoveredLine(),[])}}function Dm({options:e,controlledSelection:t,hasCustomHeader:n,hasGutterRenderUtility:i}){return t||i||n?{...e,controlledSelection:t,renderCustomHeader:n?Hd:e?.renderCustomHeader,renderGutterUtility:i?Hd:e?.renderGutterUtility}:e}function UF({fileDiff:e,options:t,editorOptions:n,metrics:i,lineAnnotations:o,selectedLines:s,className:l,style:c,prerenderedHTML:d,renderAnnotation:f,renderCustomHeader:p,renderHeaderPrefix:m,renderHeaderFilenameSuffix:g,renderHeaderMetadata:v,renderGutterUtility:x,disableWorkerPool:S=!1,edit:w=!1}){const{ref:_,getHoveredLine:C}=BF({fileDiff:e,options:t,editorOptions:n,metrics:i,lineAnnotations:o,selectedLines:s,prerenderedHTML:d,hasGutterRenderUtility:x!=null,hasCustomHeader:p!=null,disableWorkerPool:S,edit:w});return T.jsx(Dy,{ref:_,className:l,style:c,children:LA(kF({fileDiff:e,renderCustomHeader:p,renderHeaderPrefix:m,renderHeaderFilenameSuffix:g,renderHeaderMetadata:v,renderAnnotation:f,renderGutterUtility:x,lineAnnotations:o,getHoveredLine:C}),d)})}function VF(e){return new Worker(""+new URL("worker-DsKBD11i.js",import.meta.url).href,{type:"module",name:e?.name})}const FF=10,GF="line-info-basic",$F=`
|
|
1557
|
-
[data-expand-button]:focus-visible {
|
|
1558
|
-
outline: 2px solid var(--diffs-modified-base);
|
|
1559
|
-
outline-offset: -2px;
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
[data-separator="line-info-basic"] {
|
|
1563
|
-
height: 24px;
|
|
1564
|
-
background: var(--diffs-bg-separator);
|
|
1565
|
-
position: relative;
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
[data-diff-type="single"] [data-gutter],
|
|
1569
|
-
[data-diff-type="split"] [data-deletions] [data-gutter] {
|
|
1570
|
-
[data-separator-wrapper] {
|
|
1571
|
-
position: absolute;
|
|
1572
|
-
left: 100%;
|
|
1573
|
-
display: flex;
|
|
1574
|
-
align-items: center;
|
|
1575
|
-
gap: 0;
|
|
1576
|
-
width: max-content;
|
|
1577
|
-
background: transparent;
|
|
1578
|
-
color: var(--diffs-fg-number);
|
|
1579
|
-
font-size: 0.75rem;
|
|
1580
|
-
margin-left: calc(-2ch - 2px);
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
[data-separator-wrapper][data-separator-multi-button] {
|
|
1584
|
-
margin-left: calc(-3ch - 2px);
|
|
1585
|
-
}
|
|
1586
|
-
|
|
1587
|
-
[data-expand-button],
|
|
1588
|
-
[data-separator-content] {
|
|
1589
|
-
display: flex;
|
|
1590
|
-
align-items: center;
|
|
1591
|
-
min-width: unset;
|
|
1592
|
-
min-height: unset;
|
|
1593
|
-
padding: 0;
|
|
1594
|
-
flex-shrink: 0;
|
|
1595
|
-
border: none;
|
|
1596
|
-
width: auto;
|
|
1597
|
-
height: 100%;
|
|
1598
|
-
background-color: transparent;
|
|
1599
|
-
color: inherit;
|
|
1600
|
-
font: inherit;
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
[data-expand-button]:not([data-expand-all-button]) {
|
|
1604
|
-
min-width: 1.4rem;
|
|
1605
|
-
justify-content: center;
|
|
1606
|
-
|
|
1607
|
-
&[data-expand-down]::before {
|
|
1608
|
-
content: "↓";
|
|
1609
|
-
}
|
|
1610
|
-
&[data-expand-up]::before {
|
|
1611
|
-
content: "↑";
|
|
1612
|
-
}
|
|
1613
|
-
&[data-expand-both]::before {
|
|
1614
|
-
content: "↕";
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
svg {
|
|
1618
|
-
display: none;
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
|
-
|
|
1622
|
-
[data-separator-content] {
|
|
1623
|
-
margin-left: 0.4ch;
|
|
1624
|
-
}
|
|
1625
|
-
|
|
1626
|
-
[data-expand-all-button] {
|
|
1627
|
-
display: flex;
|
|
1628
|
-
position: relative;
|
|
1629
|
-
margin-left: 0.9rem;
|
|
1630
|
-
text-transform: lowercase;
|
|
1631
|
-
|
|
1632
|
-
&:hover {
|
|
1633
|
-
color: var(--diffs-fg);
|
|
1634
|
-
text-decoration: underline;
|
|
1635
|
-
}
|
|
1636
|
-
}
|
|
1637
|
-
|
|
1638
|
-
[data-expand-all-button]::before {
|
|
1639
|
-
content: "";
|
|
1640
|
-
display: block;
|
|
1641
|
-
position: absolute;
|
|
1642
|
-
top: 50%;
|
|
1643
|
-
left: -0.55rem;
|
|
1644
|
-
width: 3px;
|
|
1645
|
-
height: 3px;
|
|
1646
|
-
margin-top: -1px;
|
|
1647
|
-
border-radius: 2px;
|
|
1648
|
-
background-color: var(--diffs-fg-number);
|
|
1649
|
-
pointer-events: none;
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
[data-separator-content]:hover,
|
|
1653
|
-
[data-expand-button]:hover {
|
|
1654
|
-
color: var(--diffs-fg);
|
|
1655
|
-
}
|
|
1656
|
-
}
|
|
1657
|
-
`;function qF(e){return e.isPartial&&(e.type==="change"||e.type==="rename-changed"||e.type==="rename-pure")}function WF(e){return e!=="new"&&e!=="deleted"}function Mm(e){return{name:e.path,contents:e.content,cacheKey:`${e.side}:${e.ref}:${e.path}`}}async function YF(e,t){if(e.type==="rename-pure"){const o=await t(e.name,"new");return{oldFile:null,newFile:Mm(o)}}const[n,i]=await Promise.all([t(e.name,"old"),t(e.name,"new")]);return{oldFile:Mm(n),newFile:Mm(i)}}const OA=2e3,XF=2,KF=2;function QF(e){for(const t of e){if(!DA(t))continue;const n=t.closest("[data-expand-index]");if(MA(n))return n}}function ZF(e,t){if(t)return!1;for(const n of e)if(DA(n)){if(n.closest("[data-expand-all-button]"))return!1;if(n.closest("[data-expand-down]"))return!0}return!1}function JF(e){const t=e.closest("main");return t instanceof HTMLElement?t:void 0}function gw(e,t){if(t===0)return;const{style:n}=e,i=n.scrollBehavior;n.scrollBehavior="auto",e.scrollTop+=t,n.scrollBehavior=i}function e7(e,t){if(Date.now()-e.createdAt>OA)return"done";const n=t.shadowRoot;if(n==null)return"wait";const i=n7(n,e.index);if(i===void 0)return gw(e.scroller,e.scroller.scrollHeight-e.scrollHeight),"done";const o=i.getBoundingClientRect().top-e.top;return Math.abs(o)<XF?"ok":(gw(e.scroller,o),"wait")}function t7(e,t,n,i,o=requestAnimationFrame){let s=0,l=!1;const c=()=>{if(!n()||Date.now()-e.createdAt>OA)return;const d=e7(e,t);if(d!=="done"){if(d==="wait")l=!0,s=0;else if(s+=1,l&&s>=KF)return;o(c)}};o(c)}function n7(e,t){if(!/^\d+$/.test(t))return;const n=e.querySelector(`[data-expand-index="${t}"]`);return MA(n)?n:void 0}function DA(e){return typeof e.closest=="function"}function MA(e){return e!=null&&typeof e.getBoundingClientRect=="function"}const IA="comprehende.theme",Ky={dark:"github-dark",light:"github-light"};function i7(e){return e==="light"||e==="dark"||e==="auto"?e:"auto"}function r7(e,t){return e==="auto"?t?"dark":"light":e}function o7(e){document.documentElement.classList.toggle("dark",e==="dark"),document.documentElement.style.colorScheme=e}function a7(){try{return i7(localStorage.getItem(IA))}catch{return"auto"}}function s7(e){try{localStorage.setItem(IA,e)}catch{}}function l7(){return window.matchMedia("(prefers-color-scheme: dark)").matches}const NA=N.createContext(null);function u7(e){const[t,n]=N.useState(a7),[i,o]=N.useState(l7),s=r7(t,i),l=N.useCallback(f=>{s7(f),n(f)},[]),c=N.useCallback(()=>{l(t==="auto"?"light":t==="light"?"dark":"auto")},[t,l]);N.useEffect(()=>{o7(s)},[s]),N.useEffect(()=>{const f=window.matchMedia("(prefers-color-scheme: dark)"),p=()=>o(f.matches);return f.addEventListener("change",p),()=>f.removeEventListener("change",p)},[]);const d=N.useMemo(()=>({preference:t,resolved:s,setPreference:l,toggleTheme:c}),[t,s,l,c]);return T.jsx(NA.Provider,{value:d,children:e.children})}function Qy(){const e=N.useContext(NA);if(e===null)throw new Error("useTheme must be used within ThemeProvider");return e}const zA=`
|
|
1658
|
-
[data-diffs-header],
|
|
1659
|
-
[data-diff],
|
|
1660
|
-
[data-file],
|
|
1661
|
-
[data-error-wrapper],
|
|
1662
|
-
[data-virtualizer-buffer] {
|
|
1663
|
-
--diffs-header-font-family: var(--font-sans) !important;
|
|
1664
|
-
--diffs-font-family: var(--font-mono) !important;
|
|
1665
|
-
--diffs-bg: var(--diff-canvas) !important;
|
|
1666
|
-
--diffs-light-bg: var(--diff-canvas) !important;
|
|
1667
|
-
--diffs-dark-bg: var(--diff-canvas) !important;
|
|
1668
|
-
--diffs-token-light-bg: transparent;
|
|
1669
|
-
--diffs-token-dark-bg: transparent;
|
|
1670
|
-
--diffs-bg-context-override: var(--diff-canvas);
|
|
1671
|
-
--diffs-bg-hover-override: var(--diff-hover);
|
|
1672
|
-
--diffs-bg-separator-override: var(--diff-hunk);
|
|
1673
|
-
--diffs-bg-buffer-override: var(--diff-hunk);
|
|
1674
|
-
--diffs-bg-addition-override: var(--diff-add-line);
|
|
1675
|
-
--diffs-bg-addition-number-override: var(--diff-add-num);
|
|
1676
|
-
--diffs-bg-addition-hover-override: var(--diff-add-line);
|
|
1677
|
-
--diffs-bg-addition-emphasis-override: var(--diff-add-word);
|
|
1678
|
-
--diffs-bg-deletion-override: var(--diff-del-line);
|
|
1679
|
-
--diffs-bg-deletion-number-override: var(--diff-del-num);
|
|
1680
|
-
--diffs-bg-deletion-hover-override: var(--diff-del-line);
|
|
1681
|
-
--diffs-bg-deletion-emphasis-override: var(--diff-del-word);
|
|
1682
|
-
background-color: var(--diff-canvas) !important;
|
|
1683
|
-
color: var(--diff-fg) !important;
|
|
1684
|
-
}
|
|
1685
|
-
|
|
1686
|
-
[data-line-type="change-addition"] {
|
|
1687
|
-
background-color: var(--diff-add-line) !important;
|
|
1688
|
-
}
|
|
1689
|
-
[data-line-type="change-addition"][data-column-number] {
|
|
1690
|
-
background-color: var(--diff-add-num) !important;
|
|
1691
|
-
}
|
|
1692
|
-
[data-line-type="change-deletion"] {
|
|
1693
|
-
background-color: var(--diff-del-line) !important;
|
|
1694
|
-
}
|
|
1695
|
-
[data-line-type="change-deletion"][data-column-number] {
|
|
1696
|
-
background-color: var(--diff-del-num) !important;
|
|
1697
|
-
}
|
|
1698
|
-
|
|
1699
|
-
[data-diff-type="split"][data-overflow="scroll"] {
|
|
1700
|
-
grid-template-columns: minmax(0, var(--comprehende-split-left, 1fr)) minmax(0, var(--comprehende-split-right, 1fr)) !important;
|
|
1701
|
-
}
|
|
1702
|
-
|
|
1703
|
-
[data-diff-type="split"][data-overflow="wrap"],
|
|
1704
|
-
[data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {
|
|
1705
|
-
grid-template-columns:
|
|
1706
|
-
var(--diffs-grid-number-column-width)
|
|
1707
|
-
minmax(0, var(--comprehende-split-left, 1fr))
|
|
1708
|
-
var(--diffs-grid-number-column-width)
|
|
1709
|
-
minmax(0, var(--comprehende-split-right, 1fr)) !important;
|
|
1710
|
-
}
|
|
1711
|
-
`,PA=.2,HA=.8;function Im(e){return Math.min(HA,Math.max(PA,e))}function c7(e){const t=N.useMemo(()=>{const i=typeof navigator>"u"?4:Math.max(1,navigator.hardwareConcurrency||4);return{workerFactory:()=>new VF,poolSize:Math.max(2,Math.min(6,Math.floor(i/2)))}},[]),n=N.useMemo(()=>({theme:Ky,tokenizeMaxLineLength:1e3,useTokenTransformer:!0,lineDiffType:"none"}),[]);return T.jsx(zF,{poolOptions:t,highlighterOptions:n,children:e.children})}function d7(e,t){if(e.trim()!=="")try{return K8(e,`comprehende:${t}:${f7(e)}`)[0]?.files[0]}catch{return}}function f7(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return`${e.length.toString(16)}:${(t>>>0).toString(16)}`}function jA(e){return YF(e,Xw)}const h7=N.memo(function(t){const n=N.useRef(t.onPostRender);n.current=t.onPostRender;const i=N.useMemo(()=>({theme:Ky,themeType:t.themeType,diffStyle:t.split?"split":"unified",overflow:t.wrap?"wrap":"scroll",disableFileHeader:!0,stickyHeader:!1,lineDiffType:"none",expansionLineCount:FF,hunkSeparators:GF,...t.loadFiles?{loadDiffFiles:jA}:{},unsafeCSS:`${zA}
|
|
1712
|
-
${$F}`,onPostRender:(o,s,l)=>{l!=="unmount"&&n.current?.(o)}}),[t.loadFiles,t.split,t.themeType,t.wrap]);return T.jsx(UF,{className:"block w-full",fileDiff:t.fileDiff,options:i})}),p7=N.memo(function(t){const n=N.useMemo(()=>({name:t.path,contents:t.contents,cacheKey:`${t.path}:${t.contents.length}:${t.contents.slice(0,32)}:${t.annotations?.length??0}`}),[t.annotations?.length,t.contents,t.path]),i=N.useMemo(()=>({theme:Ky,themeType:t.themeType,overflow:t.wrap?"wrap":"scroll",disableFileHeader:!0,stickyHeader:!1,unsafeCSS:zA}),[t.themeType,t.wrap]);return T.jsx(jF,{className:"block w-full",file:n,options:i,lineAnnotations:t.annotations,renderAnnotation:t.annotations===void 0?void 0:m7})});function m7(e){const t=e.metadata,n=new Date(t.timestamp*1e3).toISOString().slice(0,10);return T.jsxs("div",{className:"flex min-w-0 items-baseline gap-2 px-2 py-1 font-sans text-[11px] text-muted-foreground",children:[T.jsx("code",{className:"text-primary",children:t.sha.slice(0,7)}),T.jsx("span",{className:"min-w-0 truncate",children:t.author}),T.jsx("span",{className:"shrink-0 tabular-nums",children:n}),t.lines>1?T.jsxs("span",{className:"shrink-0 tabular-nums",children:[t.lines," lines"]}):null]})}function yw(e){const{resolved:t}=Qy();return T.jsx("div",{className:"min-h-0 min-w-0",children:T.jsx(p7,{path:e.path,contents:e.contents,wrap:e.wrap,themeType:t,annotations:e.annotations})})}function g7(e){const{path:t,patch:n,split:i,wrap:o,splitRatio:s,onSplitRatio:l,hydrate:c=!0}=e,{resolved:d}=Qy(),f=N.useMemo(()=>d7(n,t),[n,t]),[p,m]=N.useState(f),g=N.useRef(null),v=N.useRef(null),x=N.useRef(0);N.useEffect(()=>{m(f)},[f]),N.useEffect(()=>{if(f===void 0||!c||!qF(f))return;let _=!1;return jA(f).then(C=>{if(!(_||!f.isPartial))try{m(Nd("clone",f,C))}catch{}}).catch(()=>{}),()=>{_=!0}},[f,c]),N.useEffect(()=>{const _=g.current;if(_===null)return;const C=k=>{const D=k.composedPath();if(ZF(D,k.shiftKey))return;const M=QF(D),O=M?.getAttribute("data-expand-index"),z=JF(_);M===void 0||O==null||z===void 0||(x.current+=1,v.current={scroller:z,top:M.getBoundingClientRect().top,index:O,scrollHeight:z.scrollHeight,createdAt:Date.now()})};return _.addEventListener("click",C,!0),()=>_.removeEventListener("click",C,!0)},[p!==void 0]);const S=_=>{const C=v.current;if(C===null)return;const k=x.current;v.current=null,t7(C,_,()=>x.current===k)};if(p===void 0)return T.jsx("p",{className:"px-3 py-2 text-xs text-warn",children:"Could not render this git patch."});const w=i&&WF(p.type);return T.jsxs("div",{ref:g,className:"relative min-w-0",style:{"--comprehende-split-left":`${s}fr`,"--comprehende-split-right":`${1-s}fr`},children:[T.jsx(h7,{fileDiff:p,split:w,wrap:o,themeType:d,loadFiles:c,onPostRender:S}),w?T.jsx(y7,{ratio:s,onRatio:l}):null]})}function y7(e){const t=N.useRef(null),n=s=>{const l=s.currentTarget.parentElement;l!==null&&(s.preventDefault(),s.currentTarget.setPointerCapture(s.pointerId),t.current={startX:s.clientX,start:e.ratio,width:l.getBoundingClientRect().width})},i=s=>{const l=t.current;l===null||l.width===0||e.onRatio(Im(l.start+(s.clientX-l.startX)/l.width))},o=()=>{t.current=null};return T.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize split diff","aria-valuemin":Math.round(PA*100),"aria-valuemax":Math.round(HA*100),"aria-valuenow":Math.round(e.ratio*100),tabIndex:0,className:Ye("absolute inset-y-0 z-10 flex w-3 -translate-x-1/2 cursor-col-resize touch-none items-center justify-center select-none","after:absolute after:inset-y-0 after:w-px after:bg-border hover:after:bg-primary/70 motion-safe:after:transition-colors"),style:{left:`${e.ratio*100}%`},onPointerDown:n,onPointerMove:i,onPointerUp:o,onPointerCancel:o,onDoubleClick:()=>e.onRatio(.5),onKeyDown:s=>{s.key==="ArrowLeft"?(s.preventDefault(),e.onRatio(Im(e.ratio-.05))):s.key==="ArrowRight"?(s.preventDefault(),e.onRatio(Im(e.ratio+.05))):(s.key==="Home"||s.key==="Enter")&&(s.preventDefault(),e.onRatio(.5))},children:T.jsx("div",{className:"z-10 flex h-8 w-3 items-center justify-center rounded-sm border border-border bg-card",children:T.jsx(k1,{className:"size-2.5 text-muted-foreground"})})})}const v7=.35,b7=8;function x7(e,t,n,i,o=b7){const s=n*i,l=new Uint8ClampedArray(s*4);let c=0;for(let d=0;d<s;d+=1){const f=d*4,p=e[f+3]??0,m=t[f+3]??0,g=p===0&&m===0,v=Math.abs((e[f]??0)-(t[f]??0)),x=Math.abs((e[f+1]??0)-(t[f+1]??0)),S=Math.abs((e[f+2]??0)-(t[f+2]??0)),w=Math.abs(p-m),_=Math.max(v,x,S,w);if(g||_<=o){const C=S7(t[f]??0,t[f+1]??0,t[f+2]??0),k=Math.round(C*v7);l[f]=k,l[f+1]=k,l[f+2]=k,l[f+3]=255;continue}if(c+=1,p===0&&m>0){l[f]=26,l[f+1]=127,l[f+2]=55,l[f+3]=255;continue}if(m===0&&p>0){l[f]=207,l[f+1]=34,l[f+2]=46,l[f+3]=255;continue}l[f]=200,l[f+1]=40,l[f+2]=160,l[f+3]=255}return{pixels:l,changed:c,total:s}}function S7(e,t,n){return Math.round(.2126*e+.7152*t+.0722*n)}function BA(e,t,n,i){if(e<=0||t<=0||n<=0||i<=0)return{width:0,height:0,scale:1};const o=Math.min(1,n/e,i/t);return{width:Math.max(1,Math.round(e*o)),height:Math.max(1,Math.round(t*o)),scale:o}}function _7(e,t,n,i){return BA(e,t,Math.floor(Math.max(0,n-1)/2),i)}function C7(e,t,n){const i=`${e} × ${t}`;return n>=.995?i:`${i} at ${Math.round(n*100)}%`}function w7(e){return`${e}%`}const E7="_stage_2307v_2",k7={stage:E7};function T7(e){const{path:t,status:n}=e,i=n!=="added",o=n!=="deleted",s=i?ld({kind:"image",path:t,side:"old"}):void 0,l=o?ld({kind:"image",path:t,side:"new"}):void 0,c=s!==void 0&&l!==void 0,d=vw(s),f=vw(l),p=R7(),[m,g]=N.useState("side-by-side"),[v,x]=N.useState(50),S=Math.max(d.naturalWidth,f.naturalWidth),w=Math.max(d.naturalHeight,f.naturalHeight),C=m==="side-by-side"||!c?_7(S,w,p.width,p.maxHeight):BA(S,w,p.width,p.maxHeight),k=C.width>0&&(d.ok||f.ok),D=d.error&&f.error?"These images are not in this clone. Fetch Git LFS objects, then refresh.":d.error?"The old image is not in this clone. Fetch Git LFS objects, then refresh.":f.error?"The new image is not in this clone. Fetch Git LFS objects, then refresh.":null;return T.jsxs("div",{ref:p.ref,className:"min-w-0",children:[T.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 border-b border-border px-3 py-2",children:[c?T.jsxs("div",{className:"flex overflow-hidden rounded-md border border-input",children:[T.jsx(Nm,{active:m==="side-by-side",onClick:()=>g("side-by-side"),hint:"Old and new at the same size",children:"Side by side"}),T.jsx(Nm,{active:m==="slider",onClick:()=>g("slider"),hint:"Drag to reveal new over old",children:"Slider"}),T.jsx(Nm,{active:m==="diff",onClick:()=>g("diff"),hint:"Pixels that differ",children:"Diff"})]}):T.jsx("span",{className:"font-mono text-[11px] text-muted-foreground",children:n==="added"?"Added":"Deleted"}),k?T.jsx("span",{className:"ml-auto font-mono text-[11px] tabular-nums text-muted-foreground",children:C7(S,w,C.scale)}):null]}),D!==null?T.jsx("p",{className:"px-3 py-2 text-sm text-warn",children:D}):null,!k&&D===null?T.jsx("p",{className:"px-3 py-2 text-sm text-muted-foreground",children:"Reading image…"}):null,T.jsxs("div",{className:"flex w-full justify-center",children:[k&&(m==="side-by-side"||!c)?T.jsxs("div",{className:"flex",children:[i?T.jsx(Fc,{label:"Old",width:C.width,height:C.height,rule:o,children:s!==void 0&&!d.error?T.jsx(jd,{src:s,alt:"Old",width:C.width,height:C.height}):T.jsx(Gc,{})}):T.jsx(Fc,{label:"Old",width:C.width,height:C.height,children:T.jsx(Gc,{text:"Added — no old image"})}),o?T.jsx(Fc,{label:"New",width:C.width,height:C.height,children:l!==void 0&&!f.error?T.jsx(jd,{src:l,alt:"New",width:C.width,height:C.height}):T.jsx(Gc,{})}):T.jsx(Fc,{label:"New",width:C.width,height:C.height,children:T.jsx(Gc,{text:"Deleted — no new image"})})]}):null,k&&m==="slider"&&c&&s!==void 0&&l!==void 0?T.jsx(A7,{oldUrl:s,newUrl:l,width:C.width,height:C.height,wipe:v,onWipe:x}):null,k&&m==="diff"&&c&&d.element!==null&&f.element!==null?T.jsx(L7,{oldImage:d.element,newImage:f.element,naturalWidth:S,naturalHeight:w,width:C.width,height:C.height}):null]})]})}function Nm(e){return T.jsxs(Un,{children:[T.jsx(Vn,{asChild:!0,children:T.jsx(Tt,{type:"button",size:"sm",variant:e.active?"secondary":"ghost",className:"rounded-none border-0","aria-pressed":e.active,onClick:e.onClick,children:e.children})}),T.jsx(Fn,{children:e.hint})]})}function Fc(e){return T.jsxs("figure",{className:Ye("w-fit shrink-0",e.rule===!0&&"border-r border-border"),children:[T.jsx("figcaption",{className:"border-b border-border px-3 py-1 font-mono text-[11px] text-muted-foreground",children:e.label}),T.jsx(Zy,{width:e.width,height:e.height,children:e.children})]})}function Zy(e){return T.jsx("div",{ref:e.ref,className:Ye(k7.stage,"relative shrink-0 overflow-hidden",e.className),style:{width:e.width,height:e.height},onPointerDown:e.onPointerDown,onPointerMove:e.onPointerMove,children:e.children})}function jd(e){return T.jsx("img",{src:e.src,alt:e.alt,width:e.width,height:e.height,className:"absolute top-0 left-0 max-w-none",style:{width:e.width,height:e.height,objectFit:"contain",objectPosition:"left top"}})}function Gc(e){return T.jsx("p",{className:"flex h-full items-center px-3 text-sm text-muted-foreground",children:e.text??"Image missing"})}function A7(e){const{oldUrl:t,newUrl:n,width:i,height:o,wipe:s,onWipe:l}=e,c=N.useId(),d=N.useRef(null),f=g=>{const v=d.current;if(v===null)return;const x=v.getBoundingClientRect();x.width!==0&&l(Math.min(100,Math.max(0,(g-x.left)/x.width*100)))},p=g=>{g.preventDefault(),g.currentTarget.setPointerCapture(g.pointerId),f(g.clientX)},m=g=>{g.buttons!==0&&f(g.clientX)};return T.jsxs("figure",{className:"mx-auto w-fit shrink-0",children:[T.jsxs(Zy,{ref:d,width:i,height:o,className:"cursor-col-resize touch-none",onPointerDown:p,onPointerMove:m,children:[T.jsx(jd,{src:t,alt:"Old",width:i,height:o}),T.jsx("div",{className:"absolute inset-y-0 left-0 overflow-hidden",style:{width:w7(s)},children:T.jsx(jd,{src:n,alt:"New",width:i,height:o})}),T.jsxs("div",{className:"pointer-events-none absolute inset-y-0",style:{left:`${s}%`},"aria-hidden":!0,children:[T.jsx("span",{className:"absolute inset-y-0 left-0 w-px -translate-x-1/2 bg-primary"}),T.jsx("span",{className:"absolute top-1/2 left-0 size-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full border border-primary bg-card"})]})]}),T.jsxs("label",{className:"flex w-full items-center gap-3 px-3 py-2 font-mono text-[11px] text-muted-foreground",htmlFor:c,children:["Old",T.jsx("input",{id:c,type:"range",min:0,max:100,value:s,"aria-label":"Wipe between old and new",className:"min-w-0 flex-1 accent-primary",onChange:g=>l(Number(g.target.value))}),"New"]})]})}function L7(e){const t=N.useRef(null),[n,i]=N.useState(null);return N.useEffect(()=>{const o=t.current;if(o===null)return;const s=e.naturalWidth,l=e.naturalHeight;o.width=s,o.height=l;const c=o.getContext("2d");if(c===null)return;const d=bw(e.oldImage,s,l),f=bw(e.newImage,s,l),p=x7(d,f,s,l),m=c.createImageData(s,l);m.data.set(p.pixels),c.putImageData(m,0,0),i({changed:p.changed,total:p.total})},[e.naturalHeight,e.naturalWidth,e.newImage,e.oldImage]),T.jsxs("figure",{className:"mx-auto w-fit shrink-0",children:[T.jsx(Zy,{width:e.width,height:e.height,children:T.jsx("canvas",{ref:t,className:"block size-full"})}),n!==null?T.jsxs("figcaption",{className:"px-3 py-2 font-mono text-[11px] tabular-nums text-muted-foreground",children:[n.changed.toLocaleString()," of ",n.total.toLocaleString()," pixels differ"]}):null]})}function vw(e){const[t,n]=N.useState({ok:!1,error:!1,element:null,naturalWidth:0,naturalHeight:0});return N.useEffect(()=>{if(e===void 0){n({ok:!1,error:!1,element:null,naturalWidth:0,naturalHeight:0});return}let i=!1;return n({ok:!1,error:!1,element:null,naturalWidth:0,naturalHeight:0}),O7(e).then(o=>{i||n({ok:!0,error:!1,element:o,naturalWidth:o.naturalWidth,naturalHeight:o.naturalHeight})}).catch(()=>{i||n({ok:!1,error:!0,element:null,naturalWidth:0,naturalHeight:0})}),()=>{i=!0}},[e]),t}function R7(){const e=N.useRef(null),[t,n]=N.useState({width:0,maxHeight:0});return N.useLayoutEffect(()=>{const i=e.current;if(i===null)return;const o=()=>{const l=Math.floor(i.clientWidth),c=Math.max(120,Math.round(window.innerHeight*.7));n(d=>d.width===l&&d.maxHeight===c?d:{width:l,maxHeight:c})};o();const s=new ResizeObserver(o);return s.observe(i),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),{ref:e,width:t.width,maxHeight:t.maxHeight}}function O7(e){return new Promise((t,n)=>{const i=new Image;i.onload=()=>t(i),i.onerror=()=>n(new Error("image load failed")),i.src=e})}function bw(e,t,n){const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");return o===null?new Uint8ClampedArray(t*n*4):(o.clearRect(0,0,t,n),o.drawImage(e,0,0),o.getImageData(0,0,t,n).data)}function D7(e,t){const[n,i]=N.useState(t<=0?t:0);return N.useEffect(()=>{if(t<=0){i(0);return}i(0);const o=window.setTimeout(()=>i(t),t);return()=>window.clearTimeout(o)},[e,t]),cD(e,n,t)}const M7="_walker_1s58a_11",I7={walker:M7};function $l(e){const t=e.layout??"well",n=e.delayMs??(t==="page"?0:Zw);if(!D7(!0,n))return null;const o=t==="inline"?"span":"div",s=t==="inline";return T.jsxs(o,{className:Ye("flex items-center gap-3",t==="well"&&"px-3 py-5",s&&"shrink-0 gap-0",e.className),role:s?void 0:"status","aria-live":s?void 0:"polite",children:[T.jsxs("span",{className:Ye("flex shrink-0 gap-[0.28rem]",s?"h-[1.1rem]":"h-7"),"aria-hidden":!0,children:[T.jsx(xw,{kind:"del",inline:s}),T.jsx(xw,{kind:"add",inline:s})]}),s?T.jsx("span",{className:"sr-only",children:e.label}):T.jsx("p",{className:"m-0 font-mono text-[11px] tracking-wide text-muted-foreground",children:e.label})]})}function xw(e){return T.jsx("span",{className:Ye("relative h-full overflow-hidden rounded-[1px]",e.inline?"w-0.5":"w-[3px]",e.kind==="del"?"bg-del/38":"bg-add/38"),children:T.jsx("span",{className:Ye("absolute inset-x-0 top-[28%] h-[44%] rounded-[inherit]",I7.walker,e.kind==="del"?"bg-del":"bg-add")})})}const N7=u1("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-md border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow,opacity] duration-[var(--motion)] ease-[var(--motion-ease)] focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",destructive:"bg-destructive/20 text-destructive",outline:"border-border text-foreground",ghost:"text-muted-foreground"}},defaultVariants:{variant:"default"}});function z7({className:e,variant:t="default",asChild:n=!1,...i}){const o=n?e1:"span";return T.jsx(o,{"data-slot":"badge",className:Ye(N7({variant:t}),e),...i})}const zm="duration-[var(--motion)] ease-[var(--motion-ease)]";function P7(e){const{file:t,active:n,index:i,split:o,splitRatio:s,wrap:l,viewed:c,onSplitRatio:d,onOpen:f,onViewed:p}=e,m=t.kind==="lockfile",[g,v]=N.useState(c||m),[x,S]=N.useState(t.patch),[w,_]=N.useState(null),C=t.hunks[0],k=_8(t.hunks.flatMap(z=>z.lines.filter(j=>j.kind==="add").map(j=>j.text))),D=t.oldPath!==void 0?`${t.oldPath} → ${t.path}`:t.path,M=N.useId();N.useEffect(()=>{v(c||m)},[m,c]),N.useEffect(()=>{if(g||!m||x!==""||w!==null)return;let z=!1;return sD(t.path).then(j=>{z||S(j.patch)}).catch(j=>{z||_(j instanceof Error?j.message:String(j))}),()=>{z=!0}},[g,m,t.path,x,w]);const O=z=>{z.target instanceof Element&&z.target.closest("button, input, label, a")!==null||v(j=>!j)};return T.jsxs("article",{className:Ye("overflow-hidden rounded-lg border bg-card transition-[border-color]",zm,n?"border-primary":"border-border"),"data-hunk":i,children:[T.jsxs("header",{className:Ye("sticky top-0 z-10 flex cursor-pointer flex-wrap items-center gap-x-3 gap-y-1 bg-card px-3 py-2",g?null:"border-b border-border"),onClick:O,children:[T.jsx(Tt,{type:"button",variant:"ghost",size:"icon-sm",className:"size-6","aria-expanded":!g,"aria-controls":M,"aria-label":g?"Expand file":"Collapse file",onClick:()=>v(z=>!z),children:T.jsx(bM,{className:Ye("size-4 transition-transform",zm,g&&"-rotate-90")})}),T.jsxs(Un,{children:[T.jsx(Vn,{asChild:!0,children:T.jsx(Tt,{type:"button",variant:"link",className:Ye("h-auto p-0 font-mono text-sm transition-colors",zm,c&&"text-muted-foreground"),onClick:()=>f(t.path),children:D})}),T.jsx(Fn,{children:"Open file"})]}),T.jsx("code",{className:"font-mono text-xs text-muted-foreground",children:t.kind==="image"?"image":t.kind==="lockfile"?"lockfile":t.hunkCount===1&&C!==void 0?S8(C.header):`${t.hunkCount} hunks`}),t.kind==="image"?T.jsx("span",{className:"font-mono text-[11px] text-muted-foreground",children:t.status}):T.jsxs("span",{className:"font-mono text-[11px] tabular-nums",children:[T.jsxs("span",{className:"text-del",children:["−",t.removed]})," ",T.jsxs("span",{className:"text-add",children:["+",t.added]})]}),k.length>0?k.map(z=>T.jsx(z7,{variant:"outline",className:"font-mono font-normal",children:z},z)):null,T.jsxs(Un,{children:[T.jsx(Vn,{asChild:!0,children:T.jsxs("label",{className:"ml-auto flex shrink-0 cursor-pointer items-center gap-1.5 text-xs text-muted-foreground select-none",children:[T.jsx("input",{type:"checkbox",className:"size-3.5 accent-primary",checked:c,onChange:z=>p(t.path,z.target.checked)}),"Viewed"]})}),T.jsxs(Fn,{children:[c?"Mark as not viewed":"Mark as viewed"," (v)"]})]})]}),T.jsx("div",{id:M,hidden:g,children:g?null:t.kind==="image"?T.jsx(T7,{path:t.path,status:t.status}):w!==null?T.jsx("p",{className:"px-3 py-2 text-sm text-warn",children:w}):m&&x===""?T.jsx($l,{label:Mo.lockfile}):T.jsx(g7,{path:t.path,patch:x,split:o,wrap:l,splitRatio:s,onSplitRatio:d,hydrate:t.complete})})]})}function H7(e){const{group:t,bucket:n,groups:i,mixed:o,strandColor:s,loading:l,hunkError:c,files:d,activeHunk:f,split:p,splitRatio:m,wrap:g,viewedPaths:v}=e,x=n==="lockfiles",S=s!==void 0||x,w=d.filter(C=>v.has(C.path)).length,_=(C,k,D)=>T.jsx(P7,{file:C,active:D,index:C.firstIndex,split:p,splitRatio:m,wrap:g,viewed:v.has(C.path),onSplitRatio:e.onSplitRatio,onOpen:e.onOpenFile,onViewed:e.onViewed},C.path);return T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"mb-8 flex items-stretch gap-4",children:[S?T.jsx("span",{className:"w-[3px] flex-none rounded-px bg-muted-foreground [[data-motion=group]_&]:[view-transition-name:review-strand]",style:s!==void 0?{backgroundColor:s}:void 0,"aria-hidden":!0}):null,T.jsx("div",{className:"min-w-0 flex-1 [[data-motion=group]_&]:[view-transition-name:review-copy]",children:t!==null?T.jsx(y8,{group:t,index:Kw(i,t.id),groups:i,partTitle:o?t.part:void 0,onOpenGroup:e.onOpenGroup}):x?T.jsx(lg,{kicker:"Lockfiles",title:"Generated lockfiles"}):T.jsx(lg,{kicker:"Unassigned",title:"Not in any group",children:T.jsx("p",{className:"font-serif text-lg leading-relaxed text-foreground",children:"These hunks are in git and in no group. Fix the review document. Never the diff."})})})]}),c!==null?T.jsx("p",{className:"mt-4 text-warn",children:c}):null,l?T.jsx("article",{className:"mt-8 overflow-hidden rounded-lg border border-border bg-card",children:T.jsx($l,{label:Mo.group})}):null,!l&&d.length===0&&c===null?T.jsx("p",{className:"mt-8 text-muted-foreground",children:"No hunks in this group."}):null,!l&&d.length>0?T.jsxs("p",{className:"mt-8 font-mono text-xs tabular-nums text-muted-foreground",children:[w," of ",d.length," files viewed",T.jsx("span",{className:"hidden sm:inline",children:" · j/k to move, v to toggle"})]}):null,!l&&d.length>0?T.jsx(E8,{files:d,activeHunk:f,viewedPaths:v,onSelect:e.onScrollToHunk,onViewed:e.onViewed,children:d.map(C=>_(C,C.firstIndex,f>=C.firstIndex&&f<C.firstIndex+C.hunkCount))}):null]})}const j7=/^[0-9a-f]{7,40}$/i;function B7(e){return j7.test(e)}function Sw(e,t){const n=!B7(e)&&e!==t;return{display:n?e:uD(t),copy:t,tooltip:n?`${e} · ${t}`:t}}function sd(e){return T.jsx("kbd",{className:Ye("font-mono text-[10px] font-normal text-muted-foreground",e.className),children:e.children})}function UA(e){return T.jsxs("span",{className:Ye("shrink-0 font-serif text-lg leading-none text-foreground",e.className),children:["Comprehende",T.jsx("span",{className:"text-primary","aria-hidden":"true",children:"?"})]})}function U7(e){const{meta:t,wrap:n,split:i,onWrap:o,onUnified:s,onSplit:l,onRefresh:c,busy:d=!1}=e;return T.jsxs("header",{className:"flex flex-col gap-2 border-b border-border px-5 py-3 min-[800px]:flex-row min-[800px]:flex-wrap min-[800px]:items-center min-[800px]:justify-between",children:[T.jsxs("div",{className:"flex min-w-0 items-center gap-4",children:[T.jsx(UA,{}),T.jsx(V7,{resolved:t.resolved}),T.jsx(G7,{meta:t})]}),T.jsxs("div",{className:"flex flex-wrap items-center gap-2 min-[800px]:justify-end",children:[T.jsxs(Un,{children:[T.jsx(Vn,{asChild:!0,children:T.jsxs(Tt,{size:"sm",variant:n?"secondary":"outline","aria-pressed":n,"aria-label":"Wrap lines",onClick:o,children:["Wrap",T.jsx(sd,{className:"max-sm:hidden",children:"w"})]})}),T.jsx(Fn,{children:"Wrap long lines"})]}),T.jsxs("div",{className:"flex items-center gap-1.5",children:[T.jsxs("div",{className:"flex overflow-hidden rounded-md border border-input",children:[T.jsxs(Un,{children:[T.jsx(Vn,{asChild:!0,children:T.jsx(Tt,{size:"sm",variant:i?"ghost":"secondary",className:"rounded-none border-0",onClick:s,"aria-pressed":!i,children:"Unified"})}),T.jsx(Fn,{children:"Unified diff"})]}),T.jsxs(Un,{children:[T.jsx(Vn,{asChild:!0,children:T.jsx(Tt,{size:"sm",variant:i?"secondary":"ghost",className:"rounded-none border-0",onClick:l,"aria-pressed":i,children:"Split"})}),T.jsx(Fn,{children:"Side-by-side diff"})]})]}),T.jsx(sd,{className:"max-sm:hidden",children:"s"})]}),T.jsx(F7,{}),d?T.jsx($l,{layout:"inline",label:Mo.review}):null,T.jsxs(Un,{children:[T.jsx(Vn,{asChild:!0,children:T.jsxs(Tt,{size:"sm",variant:"outline",onClick:c,"aria-busy":d,children:["Refresh",T.jsx(sd,{className:"max-sm:hidden",children:"r"})]})}),T.jsx(Fn,{children:d?Mo.review:"Reload review"})]})]})]})}function V7(e){const t=Sw(e.resolved.baseRef,e.resolved.baseSha),n=Sw(e.resolved.headRef,e.resolved.headSha);return T.jsxs("div",{className:"flex min-w-0 items-baseline gap-1.5 text-sm",children:[T.jsx(_w,{...t}),T.jsx("span",{className:"shrink-0 text-muted-foreground",children:"..."}),T.jsx(_w,{...n})]})}function _w(e){const[t,n]=N.useState(!1);return N.useEffect(()=>{if(!t)return;const i=window.setTimeout(()=>n(!1),1600);return()=>window.clearTimeout(i)},[t]),T.jsxs(Un,{children:[T.jsx(Vn,{asChild:!0,children:T.jsx("button",{type:"button",className:"max-w-[10rem] cursor-pointer truncate rounded-sm px-0.5 font-mono text-primary hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:outline-none","aria-label":`Copy ${e.copy}`,"aria-live":"polite",onClick:()=>{n(!0),navigator.clipboard.writeText(e.copy).catch(()=>{n(!1)})},children:t?"Copied":e.display})}),T.jsx(Fn,{className:"max-w-[min(24rem,calc(100vw-2rem))] font-mono",children:e.tooltip})]})}function F7(){const{preference:e,toggleTheme:t}=Qy(),n=e==="auto"?"light":e==="light"?"dark":"auto",i=n==="auto"?"Use auto theme":`Use ${n} theme`,o=n==="auto"?"Follow system":`Use ${n} theme`;return T.jsxs(Un,{children:[T.jsx(Vn,{asChild:!0,children:T.jsx(Tt,{size:"icon-sm",variant:"outline","aria-label":i,onClick:t,children:e==="light"?T.jsx(OM,{}):e==="dark"?T.jsx(TM,{}):T.jsx(EM,{})})}),T.jsx(Fn,{children:o})]})}function G7(e){const{meta:t}=e,n=t.coverage.unassignedCount>0||t.coverage.staleCount>0,i=[`${t.coverage.assignedHunks} of ${t.coverage.totalHunks} hunks grouped`,t.coverage.unassignedCount>0?`${t.coverage.unassignedCount} unassigned`:null,t.coverage.staleCount>0?`${t.coverage.staleCount} stale`:null].filter(o=>o!==null).join(" · ");return T.jsxs(Un,{children:[T.jsx(Vn,{asChild:!0,children:T.jsxs("span",{className:Ye("shrink-0 font-mono text-xs tabular-nums",n?"text-warn":"text-muted-foreground"),children:[t.coverage.assignedHunks,"/",t.coverage.totalHunks]})}),T.jsx(Fn,{children:i})]})}const $7=["png","jpg","jpeg","gif","webp","bmp","avif","ico"],q7=new Set($7);function W7(e){const t=e.split("/").pop()??e,n=t.lastIndexOf(".");if(n<=0)return;const i=t.slice(n+1).toLowerCase();return q7.has(i)?i:void 0}function Y7(e){return W7(e)!==void 0}function X7(e){const t=[];for(const n of e){const i=t[t.length-1];if(i!==void 0&&i.sha===n.sha&&i.author===n.author){i.lines+=1;continue}t.push({lineNumber:n.line,sha:n.sha,author:n.author,timestamp:n.timestamp,lines:1})}return t}var K7=Object.defineProperty,VA=(e,t)=>K7(e,"name",{value:t,configurable:!0}),Cw="horizontal",Q7=["horizontal","vertical"],Z7=N.forwardRef(VA(function(t,n){const{decorative:i,orientation:o=Cw,...s}=t,l=FA(o)?o:Cw,d=i?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return T.jsx(Go.div,{"data-orientation":l,...d,...s,ref:n})},"Separator"));function FA(e){return Q7.includes(e)}VA(FA,"isValidOrientation");var J7=Z7;function eG({className:e,orientation:t="horizontal",decorative:n=!0,...i}){return T.jsx(J7,{"data-slot":"separator",decorative:n,orientation:t,className:Ye("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...i})}function tG(e){const{inspector:t,wrap:n,setInspector:i,onClose:o}=e,s=Y7(t.path),[l,c]=N.useState(""),[d,f]=N.useState(null),[p,m]=N.useState(null),[g,v]=N.useState(!0),x=N.useMemo(()=>d===null?"":d.map(w=>w.text).join(`
|
|
1713
|
-
`),[d]),S=N.useMemo(()=>{if(d!==null)return X7(d).map(w=>({lineNumber:w.lineNumber,metadata:{sha:w.sha,author:w.author,timestamp:w.timestamp,lines:w.lines}}))},[d]);return N.useEffect(()=>{let w=!1;if(m(null),v(!0),c(""),f(null),s){v(!1);return}return t.mode==="file"?Xw(t.path,t.side).then(_=>{w||(c(_.content),v(!1))}).catch(_=>{w||(m(_ instanceof Error?_.message:String(_)),v(!1))}):lD(t.path,t.side).then(_=>{w||(f(_.lines),v(!1))}).catch(_=>{w||(m(_ instanceof Error?_.message:String(_)),v(!1))}),()=>{w=!0}},[s,t]),T.jsxs("div",{className:"review-inspector flex h-full min-h-0 flex-col","aria-busy":g,children:[T.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-8 pt-6 pb-4",children:[T.jsxs(Un,{children:[T.jsx(Vn,{asChild:!0,children:T.jsxs(Tt,{type:"button",size:"sm",variant:"outline",onClick:o,children:["Back",T.jsx(sd,{children:"esc"})]})}),T.jsx(Fn,{children:"Back to the diff"})]}),T.jsx("strong",{className:"min-w-0 truncate font-mono text-sm font-medium",children:t.path}),T.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[T.jsx(Tt,{type:"button",size:"sm",variant:t.mode==="file"?"secondary":"ghost",onClick:()=>i({...t,mode:"file"}),children:"File"}),s?null:T.jsx(Tt,{type:"button",size:"sm",variant:t.mode==="blame"?"secondary":"ghost",onClick:()=>i({...t,mode:"blame"}),children:"Blame"}),T.jsx(eG,{orientation:"vertical",className:"mx-1 h-6"}),T.jsx(Tt,{type:"button",size:"sm",variant:t.side==="old"?"secondary":"ghost",onClick:()=>i({...t,side:"old"}),children:"Old"}),T.jsx(Tt,{type:"button",size:"sm",variant:t.side==="new"?"secondary":"ghost",onClick:()=>i({...t,side:"new"}),children:"New"})]})]}),p!==null?T.jsx("p",{className:"px-8 text-warn",children:p}):null,g&&p===null&&!s?T.jsx("div",{className:"px-8 pt-2",children:T.jsx($l,{label:t.mode==="file"?Mo.file:Mo.blame})}):null,s?T.jsx("div",{className:"min-h-0 flex-1 overflow-auto px-8 pb-8",children:T.jsx("img",{src:ld({kind:"image",path:t.path,side:t.side}),alt:`${t.side} ${t.path}`,className:"h-auto max-w-full bg-[var(--diff-canvas)]"})}):null,!s&&t.mode==="file"&&p===null&&!g?T.jsx("div",{className:"min-h-0 flex-1 overflow-auto px-4 pb-8",children:T.jsx(yw,{path:t.path,contents:l,wrap:n})}):null,!s&&t.mode==="blame"&&p===null&&!g&&d!==null?T.jsx("div",{className:"min-h-0 flex-1 overflow-auto px-4 pb-8",children:T.jsx(yw,{path:t.path,contents:x,wrap:n,annotations:S})}):null]})}const GA=6;function nG(e){const t=new Map(e.map(s=>[s.id,s.suggestedOrder]));if(!e.some(s=>s.part!==void 0))return[{colorIndex:0,groupIds:ww(e.map(s=>s.id),t)}];const i=new Map;for(const s of e){const l=s.part??`\0${s.id}`,c=i.get(l)??[];c.push(s.id),i.set(l,c)}const o=[...i.entries()].map(([s,l])=>{const c=ww(l,t);return{title:s.startsWith("\0")?void 0:s,groupIds:c,minOrder:t.get(c[0]??"")??0,sortKey:c[0]??""}});return o.sort((s,l)=>s.minOrder-l.minOrder||(s.title??s.sortKey).localeCompare(l.title??l.sortKey)),o.map((s,l)=>({colorIndex:l%GA,groupIds:s.groupIds,...s.title!==void 0?{title:s.title}:{}}))}function $A(e){const t=new Map;for(const n of e)for(const i of n.groupIds)t.set(i,n.colorIndex);return t}function pf(e){return`var(--strand-${e%GA})`}function Jy(e){return e.length>1}function ww(e,t){return[...e].sort((n,i)=>(t.get(n)??0)-(t.get(i)??0)||n.localeCompare(i))}function iG(e){const{meta:t,parts:n,onOpenGroup:i}=e,o=Jy(n),s=new Map(t.groups.map(m=>[m.id,m])),l=t.document.tickets??[],c=t.document.why,d=l.length>0?T.jsx(rG,{tickets:l,mixed:o,parts:n}):null,f=w1("overview"),p=T.jsx(yE,{prompt:f,scope:"overview"});return T.jsxs("div",{className:"mb-8 [[data-motion=group]_&]:[view-transition-name:review-overview]",children:[c!==void 0?T.jsxs("section",{className:"mb-12","aria-labelledby":"review-why",children:[T.jsxs("div",{className:"mb-2 flex items-center justify-between gap-3",children:[T.jsx("p",{id:"review-why",className:"font-mono text-[11px] tracking-wide text-muted-foreground",children:"Why"}),p]}),T.jsx("h1",{className:"mb-4 font-serif text-[1.75rem] leading-snug text-foreground",children:T.jsx(To,{text:c})}),d]}):d!==null?T.jsx("div",{className:"mb-8",children:d}):null,T.jsxs("section",{"aria-labelledby":"review-what",children:[T.jsxs("div",{className:"mb-2 flex items-center justify-between gap-3",children:[T.jsxs("p",{id:"review-what",className:"font-mono text-[11px] tracking-wide text-muted-foreground",children:["What · ",Qw(t.document.size)," · ",t.files.length," files"]}),c===void 0?p:null]}),c!==void 0?T.jsx("p",{className:"mb-4 font-serif text-lg leading-relaxed text-foreground",children:T.jsx(To,{text:t.document.summary})}):T.jsx("h1",{className:"mb-4 font-serif text-[1.75rem] leading-snug text-foreground",children:T.jsx(To,{text:t.document.summary})}),T.jsx("div",{className:o?"grid grid-flow-col auto-cols-[minmax(16rem,1fr)] items-start gap-4 overflow-x-auto pb-1":void 0,children:n.map(m=>T.jsx(oG,{part:m,mixed:o,groups:t.groups,byId:s,onOpenGroup:i},m.groupIds.join("\0")))})]})]})}function rG(e){const{tickets:t,mixed:n,parts:i}=e;return T.jsx("ul",{className:"space-y-1 font-mono text-[11px] tracking-wide text-muted-foreground",children:t.map(o=>{const s=n?i.find(l=>l.title===o.part):void 0;return T.jsxs("li",{className:"flex items-center gap-2",children:[s!==void 0?T.jsx("span",{"aria-hidden":!0,className:"size-2 shrink-0 rounded-full",style:{backgroundColor:pf(s.colorIndex)}}):null,o.url!==void 0?T.jsx("a",{className:"text-primary hover:underline",href:o.url,target:"_blank",rel:"noreferrer",children:o.id}):T.jsx("span",{children:o.id}),o.title!==void 0?T.jsx("span",{children:o.title}):null,o.part!==void 0?T.jsxs("span",{children:["· ",o.part]}):null]},o.id)})})}function oG(e){const{part:t,mixed:n,groups:i,byId:o,onOpenGroup:s}=e,l=pf(t.colorIndex);return T.jsxs("section",{className:Ye("min-w-0",n&&"rounded-md border border-border py-2"),style:n?aG(l):void 0,"aria-label":t.title,children:[n&&t.title!==void 0?T.jsxs("p",{className:"mb-1 flex items-center gap-2 px-4 pt-2 font-mono text-[11px] tracking-wide text-muted-foreground",children:[T.jsx("span",{"aria-hidden":!0,className:"size-2 shrink-0 rounded-full",style:{backgroundColor:l}}),t.title]}):null,T.jsx("ol",{className:"m-0 list-none p-0",children:t.groupIds.map(c=>{const d=o.get(c);if(d===void 0)return null;const f=i.findIndex(p=>p.id===c)+1;return T.jsx("li",{className:"mb-2 last:mb-0",children:T.jsxs(Tt,{type:"button",variant:"ghost",className:"h-auto w-full min-w-0 items-start justify-start gap-4 rounded-md px-4 py-4 text-left font-normal whitespace-normal",onClick:()=>s(d.id),children:[T.jsx("span",{className:"mt-0.5 shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:dl(f)}),T.jsxs("span",{className:"min-w-0 flex-1",children:[T.jsx("strong",{className:"block font-medium text-foreground",children:d.title}),T.jsx("span",{className:"mt-1 block leading-relaxed text-muted-foreground",children:T.jsx(To,{text:d.summary})})]})]})},d.id)})})]})}function aG(e){return{"--strand":e,borderLeftWidth:3,borderLeftColor:e,backgroundColor:`color-mix(in srgb, ${e} 8%, var(--card))`}}const sG="_itemActive_xc7sz_1",lG="_selection_xc7sz_5",qA={itemActive:sG,selection:lG};function uG(e){const{meta:t,selection:n,parts:i,onSelect:o}=e,l=Jy(i)?$A(i):new Map;return T.jsx("nav",{className:"h-full overflow-auto py-6",children:T.jsxs("div",{className:"relative",children:[T.jsx("span",{className:qA.selection,"aria-hidden":!0}),T.jsx("ul",{className:"mb-6 list-none p-0",children:T.jsx("li",{children:T.jsx($c,{active:n?.kind==="overview",onClick:()=>o({kind:"overview"}),title:"Overview",count:Qw(t.document.size)})})}),T.jsxs("ul",{className:"mb-6 list-none p-0",children:[t.groups.map((c,d)=>T.jsx("li",{children:T.jsx($c,{active:n?.kind==="group"&&n.id===c.id,onClick:()=>o({kind:"group",id:c.id}),index:dl(d+1),title:c.title,count:c.staleCount>0?`${c.staleCount} stale`:void 0,colorIndex:l.get(c.id)})},c.id)),t.unassigned.hunkCount>0?T.jsx("li",{children:T.jsx($c,{active:n?.kind==="unassigned",onClick:()=>o({kind:"unassigned"}),title:"Unassigned",count:String(t.unassigned.hunkCount),warn:!0})}):null,t.lockfiles.fileCount>0?T.jsx("li",{children:T.jsx($c,{active:n?.kind==="lockfiles",onClick:()=>o({kind:"lockfiles"}),title:"Lockfiles",count:String(t.lockfiles.fileCount),muted:!0})}):null]})]})})}function $c(e){const t=e.colorIndex,n=t!==void 0||e.active,i=t!==void 0?pf(t):e.muted?"var(--muted-foreground)":void 0;return T.jsxs(Tt,{type:"button",variant:"ghost",onClick:e.onClick,style:i!==void 0?{"--strand":i}:void 0,className:Ye("relative z-1 mx-3 mb-1 h-auto w-[calc(100%-24px)] min-w-0 items-start justify-start gap-2.5 rounded-md px-3 py-2 text-left font-normal whitespace-normal hover:bg-transparent",!e.active&&"hover:bg-accent",e.active&&Ye(qA.itemActive,"text-foreground"),e.warn&&"text-warn hover:text-warn"),children:[n?T.jsx("span",{className:Ye("pointer-events-none absolute inset-y-1.5 left-0 z-1 w-0.5 rounded-full bg-[var(--strand,var(--primary))] transition-opacity duration-[var(--motion)] ease-[var(--motion-ease)]",t!==void 0&&!e.active&&"opacity-45"),"aria-hidden":!0}):null,e.index!==void 0?T.jsx("span",{className:"mt-px w-5 shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:e.index}):null,T.jsx("span",{className:"min-w-0 flex-1 text-left leading-snug",children:e.title}),e.count!==void 0?T.jsx("span",{className:Ye("shrink-0 text-[11px] tabular-nums text-muted-foreground",e.warn&&"text-warn"),children:e.count}):null]})}let Pm=0;function cG(){return typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches}function dG(e){const t=cG(),n=typeof document>"u"?void 0:document.startViewTransition;return!t&&typeof n=="function"}function Hm(e,t){if(!dG()){e();return}const n=document.startViewTransition;if(typeof n!="function"){e();return}const i=document.documentElement,o=++Pm;i.dataset.motion=t;try{n.call(document,()=>{Ud.flushSync(e)}).finished.finally(()=>{o===Pm&&delete i.dataset.motion})}catch{o===Pm&&delete i.dataset.motion,e()}}function qc(e){return e.groups.length>0?{kind:"overview"}:{kind:"unassigned"}}function WA(e,t){return`comprehende.group.${e}.${t}`}function fG(e){if(e===null||e==="")return null;try{const t=JSON.parse(e);return typeof t!="object"||t===null||!("kind"in t)?null:t.kind==="overview"?{kind:"overview"}:t.kind==="unassigned"?{kind:"unassigned"}:t.kind==="lockfiles"?{kind:"lockfiles"}:t.kind==="group"&&"id"in t&&typeof t.id=="string"&&t.id!==""?{kind:"group",id:t.id}:null}catch{return null}}function hG(e){return JSON.stringify(e)}function pG(e,t){return t===null||t.kind==="group"&&!e.groups.some(n=>n.id===t.id)||t.kind==="unassigned"&&e.unassigned.hunkCount===0&&e.groups.length>0||t.kind==="lockfiles"&&(e.lockfiles?.fileCount??0)===0?qc(e):t}function mG(e){return pG(e,yG(e.resolved.baseSha,e.resolved.headSha))}function gG(e,t){vG(e.resolved.baseSha,e.resolved.headSha,t)}function yG(e,t){try{return fG(sessionStorage.getItem(WA(e,t)))}catch{return null}}function vG(e,t,n){try{sessionStorage.setItem(WA(e,t),hG(n))}catch{}}function bG(e){const t=[{kind:"overview"},...e.groups.map(n=>({kind:"group",id:n.id}))];return e.unassigned.hunkCount>0&&t.push({kind:"unassigned"}),(e.lockfiles?.fileCount??0)>0&&t.push({kind:"lockfiles"}),t}function Ew(e,t,n,i){if(e===null)return;const o=bG(e),s=o.findIndex(c=>YA(c,t)),l=o[(s+i+o.length)%o.length];l!==void 0&&n(l)}function YA(e,t){return t===null?!1:e.kind==="overview"?t.kind==="overview":e.kind==="unassigned"?t.kind==="unassigned":e.kind==="lockfiles"?t.kind==="lockfiles":t.kind==="group"&&t.id===e.id}function xG(e,t){return`comprehende.viewed.${e}.${t}`}function SG(e){if(e===null||e==="")return new Set;try{const t=JSON.parse(e);return!Array.isArray(t)||t.some(n=>typeof n!="string")?new Set:new Set(t)}catch{return new Set}}function _G(e){return JSON.stringify([...e].sort())}function CG(e,t,n){const i=new Set(e);return n?i.add(t):i.delete(t),i}function kw(e){try{return XA(e),SG(sessionStorage.getItem(e))}catch{return new Set}}function wG(e,t){try{XA(e),sessionStorage.setItem(e,_G(t))}catch{}}function XA(e){try{localStorage.removeItem(e)}catch{}}function EG(e,t){const n=e!==void 0&&t!==void 0?xG(e,t):null,[i,o]=N.useState(()=>n===null?new Set:kw(n));N.useEffect(()=>{o(n===null?new Set:kw(n))},[n]);const s=N.useCallback((l,c)=>{n!==null&&o(d=>{const f=CG(d,l,c);return wG(n,f),f})},[n]);return{viewedPaths:i,setFileViewed:s}}function kG({className:e,...t}){return T.jsx($w,{"data-slot":"resizable-panel-group",className:Ye("flex h-full w-full aria-[orientation=vertical]:flex-col",e),...t})}function Tw({...e}){return T.jsx(qw,{"data-slot":"resizable-panel",...e})}function TG({withHandle:e=!1,className:t,...n}){return T.jsx(Ww,{"data-slot":"resizable-handle",className:Ye("relative flex w-2 items-center justify-center bg-transparent after:absolute after:inset-y-0 after:left-1/2 after:w-px after:-translate-x-1/2 after:bg-border after:transition-[background-color] after:duration-[var(--motion)] after:ease-[var(--motion-ease)] hover:after:bg-primary/60 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-2 aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-px aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2",t),...n,children:e?T.jsx("div",{className:"bg-border z-10 flex h-8 w-3 items-center justify-center rounded-sm border border-border",children:T.jsx(k1,{className:"size-2.5 text-muted-foreground"})}):null})}function AG(){const[e,t]=N.useState(null),[n,i]=N.useState(null),[o,s]=N.useState(null),[l,c]=N.useState([]),[d,f]=N.useState(null),[p,m]=N.useState(null),[g,v]=N.useState(!1),[x,S]=N.useState(!1),[w,_]=N.useState(.5),[C,k]=N.useState(0),[D,M]=N.useState(null),[O,z]=N.useState(!0),j=N.useRef(null),{defaultLayout:F,onLayoutChanged:ee}=JO({id:"comprehende-shell-overlay",panelIds:["stack","main"],onlySaveAfterUserInteractions:!0}),q=N.useCallback(async()=>{z(!0),i(null);try{const re=await oD();t(re),s(ce=>ce??mG(re))}catch(re){i(re instanceof Error?re.message:String(re))}finally{z(!1)}},[]);N.useEffect(()=>{q()},[q]),N.useEffect(()=>{e===null||o===null||gG(e,o)},[e,o]);const U=o?.kind==="group"?o.id:o?.kind==="unassigned"?"unassigned":o?.kind==="lockfiles"?"lockfiles":null;N.useEffect(()=>{if(U===null){c([]),f(null);return}let re=!1;return m(null),aD(U).then(ce=>{re||(c(ce.files),f(U),k(0))}).catch(ce=>{re||(c([]),f(U),m(ce instanceof Error?ce.message:String(ce)))}),()=>{re=!0}},[U]);const Z=U!==null&&U!==d,X=N.useCallback(re=>{if(YA(re,o)&&D===null)return;Hm(()=>{s(re),M(null)},D!==null?"scene":"group")},[D,o]),W=N.useCallback(re=>{Hm(()=>{M({path:re,mode:"file",side:"new"})},"scene")},[]),P=N.useCallback(()=>{D!==null&&Hm(()=>M(null),"scene")},[D]),{viewedPaths:$,setFileViewed:ne}=EG(e?.resolved.baseSha,e?.resolved.headSha),ue=N.useCallback(re=>{k(re),requestAnimationFrame(()=>{requestAnimationFrame(()=>{const ce=j.current,xe=(ce??document).querySelector(`[data-hunk="${re}"]`);if(xe===null||ce===null){xe?.scrollIntoView({block:"start",behavior:"instant"});return}const pe=ce.getBoundingClientRect(),He=xe.getBoundingClientRect().top-pe.top+ce.scrollTop-8;ce.scrollTo({top:He,behavior:"instant"})})})},[]);N.useEffect(()=>{const re=ce=>{if(ce.metaKey||ce.ctrlKey||ce.altKey)return;const xe=ce.target;if(!(xe instanceof HTMLElement&&(xe.isContentEditable||xe.closest("input, textarea, select")!==null)))if(ce.key==="w")v(pe=>!pe);else if(ce.key==="s")S(pe=>(pe||_(.5),!pe));else if(ce.key==="r")q();else if(ce.key==="o")X({kind:"overview"});else if(ce.key==="u")X({kind:"unassigned"});else if(ce.key==="Escape")P();else if(ce.key==="[")Ew(e,o,X,-1);else if(ce.key==="]")Ew(e,o,X,1);else{if(D!==null)return;if(ce.key==="j"){const pe=bc(l),ze=Qc(pe,C),He=pe[Math.min(pe.length-1,Math.max(ze,0)+1)];He!==void 0&&ue(He.firstIndex)}else if(ce.key==="k"){const pe=bc(l),ze=Qc(pe,C),He=pe[Math.max(0,(ze===-1?0:ze)-1)];He!==void 0&&ue(He.firstIndex)}else if(ce.key==="v"){const pe=bc(l),ze=pe[Math.max(0,Qc(pe,C))];ze!==void 0&&ne(ze.path,!$.has(ze.path))}}};return window.addEventListener("keydown",re),()=>window.removeEventListener("keydown",re)},[C,P,D,l,q,e,ue,X,o,ne,$]),N.useEffect(()=>{j.current?.scrollTo({top:0})},[o]);const R=N.useMemo(()=>e===null||o?.kind!=="group"?null:e.groups.find(re=>re.id===o.id)??null,[e,o]),H=N.useMemo(()=>bc(l),[l]),Y=N.useMemo(()=>nG(e?.groups??[]),[e]),I=N.useMemo(()=>$A(Y),[Y]),le=Jy(Y),fe=le&&R!==null?I.get(R.id):void 0;return O&&e===null?T.jsxs(Aw,{children:[T.jsx("p",{className:"mb-5",children:T.jsx(UA,{})}),T.jsx($l,{layout:"page",label:Mo.review})]}):n!==null&&e===null?T.jsx(Aw,{className:"text-warn",children:n}):e===null?null:T.jsx(YI,{children:T.jsxs("div",{className:"flex h-full min-h-0 flex-col","aria-busy":O||Z,children:[T.jsx(U7,{meta:e,wrap:g,split:x,onWrap:()=>v(re=>!re),onUnified:()=>S(!1),onSplit:()=>{S(!0),x||_(.5)},onRefresh:()=>{q()},busy:O}),T.jsxs(kG,{className:"min-h-0 flex-1",defaultLayout:F,onLayoutChanged:ee,children:[T.jsx(Tw,{id:"stack",defaultSize:"20",minSize:"14%",className:"min-h-0 min-w-0",children:T.jsx(uG,{meta:e,selection:o,parts:Y,onSelect:X})}),T.jsx(TG,{withHandle:!0}),T.jsx(Tw,{id:"main",defaultSize:"80",minSize:"40%",className:"min-h-0 min-w-0",children:T.jsx("div",{className:"h-full min-h-0 [[data-motion=scene]_&]:[view-transition-name:review-scene]",children:D!==null?T.jsx(tG,{inspector:D,wrap:g,setInspector:M,onClose:P}):T.jsx("main",{ref:j,className:"h-full overflow-auto px-10 py-8","aria-busy":Z,children:o?.kind==="overview"?T.jsx(iG,{meta:e,parts:Y,onOpenGroup:re=>X({kind:"group",id:re})}):T.jsx(H7,{group:R,bucket:o?.kind==="lockfiles"?"lockfiles":o?.kind==="unassigned"?"unassigned":void 0,groups:e.groups,mixed:le,strandColor:fe!==void 0?pf(fe):void 0,loading:Z,hunkError:p,files:Z?[]:H,activeHunk:C,split:x,splitRatio:w,wrap:g,viewedPaths:$,onScrollToHunk:ue,onOpenGroup:re=>X({kind:"group",id:re}),onOpenFile:W,onSplitRatio:_,onViewed:ne})})})})]})]})})}function Aw(e){return T.jsx("div",{className:Ye("px-10 py-8 text-muted-foreground",e.className),children:e.children})}const KA=document.getElementById("root");if(KA===null)throw new Error("missing #root");SO.createRoot(KA).render(T.jsx(N.StrictMode,{children:T.jsx(u7,{children:T.jsx(c7,{children:T.jsx(AG,{})})})}));
|