@moritzwilksch/diffle 0.2.0 → 0.2.1
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 -0
- package/dist/client/assets/{angular-html-NJfvXMBu.js → angular-html-ulrXXC4T.js} +1 -1
- package/dist/client/assets/{angular-ts-3VmQ16GC.js → angular-ts-cWUkbqrc.js} +1 -1
- package/dist/client/assets/{apl-CaYQRkUE.js → apl-CYwKvDlF.js} +1 -1
- package/dist/client/assets/{astro-CGsy8jQJ.js → astro-BleB-Dvw.js} +1 -1
- package/dist/client/assets/{blade-CbyPPxmo.js → blade-UxS1gLIJ.js} +1 -1
- package/dist/client/assets/{c-BaJwvHpK.js → c-Dy61fyeR.js} +1 -1
- package/dist/client/assets/{chapel-BokLUCVc.js → chapel-DA_5Jb29.js} +1 -1
- package/dist/client/assets/{cobol-I7_VFdfF.js → cobol-DF_09Fay.js} +1 -1
- package/dist/client/assets/{coffee-BJ7WLX7y.js → coffee-Cv1DVgPp.js} +1 -1
- package/dist/client/assets/{cpp-DSFvuOlH.js → cpp-BlnMjTh9.js} +1 -1
- package/dist/client/assets/{crystal-DLLJ7kug.js → crystal-B8onZGWh.js} +1 -1
- package/dist/client/assets/{css-CW7SLGV7.js → css-D-x-Ue0G.js} +1 -1
- package/dist/client/assets/{edge-DQEyTxuu.js → edge-Fqle09cH.js} +1 -1
- package/dist/client/assets/{elixir-Dwvydtjv.js → elixir-CL3sU1gy.js} +1 -1
- package/dist/client/assets/{elm-DPrZsI-D.js → elm-Blr9Ia2N.js} +1 -1
- package/dist/client/assets/{erb-By39__m0.js → erb-Ck5t-jn2.js} +1 -1
- package/dist/client/assets/{git-rebase-CBF3buEb.js → git-rebase-Dt2TndDV.js} +1 -1
- package/dist/client/assets/{glimmer-js-C4TvHlaw.js → glimmer-js-Cwn-aFNH.js} +1 -1
- package/dist/client/assets/{glimmer-ts-BPhq137Q.js → glimmer-ts-CKev0hwM.js} +1 -1
- package/dist/client/assets/{glsl-BlwDtIwk.js → glsl-ClWhfdlL.js} +1 -1
- package/dist/client/assets/{graphql-BgMqs-o1.js → graphql-C8TyhWXe.js} +1 -1
- package/dist/client/assets/{hack-DrMUHl8k.js → hack-C9oIcSTK.js} +1 -1
- package/dist/client/assets/{haml-BWbuOop2.js → haml-BP7tD858.js} +1 -1
- package/dist/client/assets/{handlebars-D-TP7YFr.js → handlebars-D7ZldTVB.js} +1 -1
- package/dist/client/assets/{html-RkKdupbJ.js → html-BxXjaAye.js} +1 -1
- package/dist/client/assets/{html-derivative-BiXkRfVa.js → html-derivative-CEoRM3ro.js} +1 -1
- package/dist/client/assets/{http-CF05Tv0R.js → http-DVWDINjr.js} +1 -1
- package/dist/client/assets/{hurl-p-K5zx-F.js → hurl-BjNoiLI6.js} +1 -1
- package/dist/client/assets/{index-Dw_tHgT2.js → index-DrpXuuVn.js} +95 -95
- package/dist/client/assets/{java-DZgPGAdX.js → java-Cbx3IDuw.js} +1 -1
- package/dist/client/assets/{javascript-UpC6uRwd.js → javascript-C1JF7iBX.js} +1 -1
- package/dist/client/assets/{jinja-BwlD6UdE.js → jinja-BMe2GcVb.js} +1 -1
- package/dist/client/assets/{jison-CXzrtNYv.js → jison-BVbXCft7.js} +1 -1
- package/dist/client/assets/{json-CvzeYtbd.js → json-CRqSOZnD.js} +1 -1
- package/dist/client/assets/{jsx-CRRNRy_v.js → jsx-DcDmlRfr.js} +1 -1
- package/dist/client/assets/{julia-n9zQTAkT.js → julia-CPcuPmIV.js} +1 -1
- package/dist/client/assets/{just-Cqgx3k16.js → just-B1zV9CiR.js} +1 -1
- package/dist/client/assets/{latex-CtWS0r44.js → latex-Cuj3EXmX.js} +1 -1
- package/dist/client/assets/{liquid-DYOfxp51.js → liquid-C1T4UF1w.js} +1 -1
- package/dist/client/assets/{lua-BH2jjxbT.js → lua-46-qG00m.js} +1 -1
- package/dist/client/assets/{marko-yGXqh8Mu.js → marko-Cc6TCGIc.js} +1 -1
- package/dist/client/assets/{mdc-DBTGzC9c.js → mdc-qnFt69dC.js} +1 -1
- package/dist/client/assets/{nginx-C6OOwetR.js → nginx-7n4L4W73.js} +1 -1
- package/dist/client/assets/{nim-B-51OZwP.js → nim-BLvMDnWX.js} +1 -1
- package/dist/client/assets/{org-rdh6JnaZ.js → org-C8fiTt0a.js} +1 -1
- package/dist/client/assets/{perl-BEpLn7O_.js → perl-x9VdolYn.js} +1 -1
- package/dist/client/assets/{php-uM1K2nIh.js → php-mFFqmEsM.js} +1 -1
- package/dist/client/assets/{pug-CX5jxSmg.js → pug-H1OMV43P.js} +1 -1
- package/dist/client/assets/{qml-BjaL9kT9.js → qml-B8D1BoQx.js} +1 -1
- package/dist/client/assets/{r-CbP_oADb.js → r-DAih_iaQ.js} +1 -1
- package/dist/client/assets/{razor-ClgwHmG8.js → razor-BeJgOpe8.js} +1 -1
- package/dist/client/assets/{regexp-DkGv1hXs.js → regexp-CAppT72h.js} +1 -1
- package/dist/client/assets/{rst-KbuceK-d.js → rst-RMbVAAkg.js} +1 -1
- package/dist/client/assets/{ruby-IyWK5TqJ.js → ruby-DLm1ZwEN.js} +1 -1
- package/dist/client/assets/{sas-CGY91YIG.js → sas-B7ihlrSP.js} +1 -1
- package/dist/client/assets/{scss-C5azgOdY.js → scss-3DF1Is0M.js} +1 -1
- package/dist/client/assets/{shellscript-Do9KSXv1.js → shellscript-Bq08mUIc.js} +1 -1
- package/dist/client/assets/{shellsession-DG2DOiiH.js → shellsession-DJY5846a.js} +1 -1
- package/dist/client/assets/{soy-BLO2pcf_.js → soy-Bkld_lfE.js} +1 -1
- package/dist/client/assets/{sql-NhQC2aCy.js → sql-B35yhKok.js} +1 -1
- package/dist/client/assets/{stata-BT8bwSiP.js → stata-BgW5egxh.js} +1 -1
- package/dist/client/assets/{surrealql-DeFUr0Sz.js → surrealql-B-aUVDek.js} +1 -1
- package/dist/client/assets/{svelte-TRjcWU3h.js → svelte-C7MrEpG_.js} +1 -1
- package/dist/client/assets/{templ-C1Ef7mnt.js → templ-CUYQL3Op.js} +1 -1
- package/dist/client/assets/{tex-DWZKUBNC.js → tex-Dbrd9bB3.js} +1 -1
- package/dist/client/assets/{ts-tags-BPGHRwAa.js → ts-tags-wpbSYL5U.js} +1 -1
- package/dist/client/assets/{tsx-DFPjrnBq.js → tsx-B8rF--RV.js} +1 -1
- package/dist/client/assets/{twig-BnaDylmD.js → twig-CpaRBIem.js} +1 -1
- package/dist/client/assets/{typescript-CtjU5LIe.js → typescript-cqbK9R71.js} +1 -1
- package/dist/client/assets/{typst-CKVv919t.js → typst-BUVX7J-L.js} +1 -1
- package/dist/client/assets/{vue-DQGhQ-pk.js → vue-B3rM_CiH.js} +1 -1
- package/dist/client/assets/{vue-html-BtU_VFsU.js → vue-html-uBxsJ3nV.js} +1 -1
- package/dist/client/assets/{vue-vine-Bg_4C7Q_.js → vue-vine-CH44uMD8.js} +1 -1
- package/dist/client/assets/{xml-DupdE_s3.js → xml-BnoqKVtb.js} +1 -1
- package/dist/client/assets/{xsl-BkEIn0qW.js → xsl-r6Si1Xjc.js} +1 -1
- package/dist/client/assets/{yaml-BuH0PmqQ.js → yaml-tinlnfn7.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/main.js +237 -74
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-
|
|
2
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function u(e){return new Worker(``+new URL(`worker-DZo603XT.js`,import.meta.url).href,{type:`module`,name:e?.name})}var d=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function ee(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function j(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function M(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ee(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ee(a,u),c+=M(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ee(a,u++),c+=M(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return M(j(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function N(e,t,n){if(e==null)return e;var r=[],i=0;return M(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function P(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var F=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},I={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=I,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:P}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),f=o(((e,t)=>{t.exports=d()})),p=l(f(),1);function m(e){let t=(0,p.useRef)(e);return(0,p.useInsertionEffect)(()=>void(t.current=e)),(0,p.useCallback)((...e)=>t.current(...e),[])}var h=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),g=o(((e,t)=>{t.exports=h()}))(),_=(0,p.createContext)(void 0);function v(){return(0,p.useContext)(_)}var y={position:`absolute`,top:0,bottom:0,textAlign:`center`,whiteSpace:`normal`,touchAction:`none`},b={display:`contents`};function x(){return null}var S=`diffs-container`,C=(()=>{try{return!1}catch{return!1}})(),w=/(?=^From [a-f0-9]+ .+$)/m,T=/(?=^diff --git)/gm,E=/(?<=\n)/,D=/^(---|\+\+\+)\s+([^\t\r\n]+)/,O=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,k=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,A=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,ee=`header-prefix`,j=`header-filename-suffix`,M=`header-metadata`,N=`header-custom`,P={dark:`pierre-dark`,light:`pierre-light`},F=`data-theme-css`,I=`data-unsafe-css`,te=`data-diffs-scrollbar-measure`,ne=`data-diffs-code-view-header`,re=`data-diffs-code-view-footer`,L=`--diffs-scrollbar-gutter-measured`,R=1e5,z={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},B={...z,hunkLineCount:1},ie={paddingTop:8,paddingBottom:8,gap:8},ae={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},oe=Object.freeze({fromStart:0,fromEnd:0}),se={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},ce={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function le(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}function ue({hunkIndex:e,lineIndex:t,conflictIndex:n}){return`merge-conflict-action-${e}-${t}-${n}`}function V(e,t){return e-(t===0?0:1)}function de(e,t){return V(e,t)+t}function fe(e,t){let n=t.hunks[e.hunkIndex];if(n!=null)return{hunkIndex:e.hunkIndex,lineIndex:pe(n,e.startContentIndex)}}function pe(e,t){let n=e.unifiedLineStart;for(let r=0;r<t;r++){let t=e.hunkContent[r];n+=t.type===`context`?t.lines:t.deletions+t.additions}return n}function me({fileDiff:e,actions:t,renderCustomHeader:n,renderHeaderPrefix:r,renderHeaderFilenameSuffix:i,renderHeaderMetadata:a,renderAnnotation:o,renderGutterUtility:s,renderMergeConflictUtility:c,lineAnnotations:l,getHoveredLine:u,getInstance:d}){let f=n?.(e),p=r?.(e),m=i?.(e),h=a?.(e);return(0,g.jsxs)(g.Fragment,{children:[f==null?(0,g.jsxs)(g.Fragment,{children:[p!=null&&(0,g.jsx)(`div`,{slot:`header-prefix`,children:p}),m!=null&&(0,g.jsx)(`div`,{slot:`header-filename-suffix`,children:m}),h!=null&&(0,g.jsx)(`div`,{slot:`header-metadata`,children:h})]}):(0,g.jsx)(`div`,{slot:N,children:f}),o!=null&&l?.map((e,t)=>(0,g.jsx)(`div`,{slot:le(e),children:o(e)},t)),t!=null&&c!=null&&d!=null&&t.map(t=>{if(t==null)return;let n=he(t,e);return(0,g.jsx)(`div`,{slot:n,style:b,children:c(t,d)},n)}),s!=null&&(0,g.jsx)(`div`,{slot:`gutter-utility-slot`,style:y,children:s(u)})]})}function he(e,t){let n=fe(e,t);return n==null?void 0:ue({hunkIndex:n.hunkIndex,lineIndex:n.lineIndex,conflictIndex:e.conflictIndex})}function ge({file:e,renderCustomHeader:t,renderHeaderPrefix:n,renderHeaderFilenameSuffix:r,renderHeaderMetadata:i,renderAnnotation:a,lineAnnotations:o,renderGutterUtility:s,getHoveredLine:c}){let l=t?.(e),u=n?.(e),d=r?.(e),f=i?.(e);return(0,g.jsxs)(g.Fragment,{children:[l==null?(0,g.jsxs)(g.Fragment,{children:[u!=null&&(0,g.jsx)(`div`,{slot:`header-prefix`,children:u}),d!=null&&(0,g.jsx)(`div`,{slot:`header-filename-suffix`,children:d}),f!=null&&(0,g.jsx)(`div`,{slot:`header-metadata`,children:f})]}):(0,g.jsx)(`div`,{slot:N,children:l}),a!=null&&o?.map((e,t)=>(0,g.jsx)(`div`,{slot:le(e),children:a(e)},t)),s!=null&&(0,g.jsx)(`div`,{slot:`gutter-utility-slot`,style:y,children:s(c)})]})}function _e(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function ve(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}var ye=new Set;function be(e){let t=[],n=new Set;for(let r of xe(e.themes)){let e=we(r)?r.getThemes():[r];for(let r of e){if(n.has(r.name))throw Error(`Theme collection already contains theme "${r.name}"`);n.add(r.name),t.push(r)}}let r=Object.freeze([...t]),i=Object.freeze(r.filter(e=>e.colorScheme===`light`)),a=Object.freeze(r.filter(e=>e.colorScheme===`dark`)),o=new Map(r.map(e=>[e.name,e])),s=Object.freeze(r.map(e=>e.name)),c=Object.freeze(i.map(e=>e.name)),l=Object.freeze(a.map(e=>e.name));function u(e){if(e==null)return r;let{colorScheme:t,collection:n}=e;return n==null?t===`light`?i:t===`dark`?a:r:r.filter(e=>e.collection===n?t==null||e.colorScheme===t:!1)}return{getTheme(e){return o.get(e)},getThemes(e){return u(e)},getThemeNames(e){return e?.collection==null?e?.colorScheme===`light`?c:e?.colorScheme===`dark`?l:s:u(e).map(e=>e.name)},hasTheme(e){return o.has(e)},orderBy(e){return be({themes:r.map((e,t)=>({descriptor:e,index:t})).sort((t,n)=>{let r=e(t.descriptor,n.descriptor);return r===0?t.index-n.index:r}).map(e=>e.descriptor)})},pick(e){let t=[],n=new Set;for(let r of e){if(n.has(r))throw Error(`Theme collection pick already includes theme "${r}"`);n.add(r);let e=o.get(r);if(e==null)throw Error(`Theme collection does not contain theme "${r}"`);t.push(e)}return be({themes:t})},registerInto(e){for(let t of r)e.registerThemeIfAbsent(t.name,t.load)}}}function xe(e){return Se(e)?[e]:e}function Se(e){return we(e)||Ce(e)}function Ce(e){return typeof e.name==`string`&&typeof e.load==`function`}function we(e){return typeof e.getThemes==`function`}function Te(e){return typeof e==`object`&&e&&`default`in e?e.default:e}var Ee=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name=`DuplicateThemeError`}},De=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name=`UnregisteredThemeError`}},Oe=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name=`UnresolvedThemeError`}};function ke(){let e=new Map,t=new Map,n=new Map,r=0;function i(t,n){if(e.has(t))throw new Ee(t);e.set(t,n)}function a(t,n){return!e.has(t)&&(e.set(t,n),!0)}function o(t){return e.has(t)}function s(i){let a=t.get(i);if(a!==void 0)return Promise.resolve(a);let o=n.get(i);if(o!==void 0)return o;let s=e.get(i);if(s===void 0)return Promise.reject(new De(i));let c=r,l=s().then(e=>{let a=Te(e);return c===r&&t.set(i,a),n.get(i)===l&&n.delete(i),a}).catch(e=>{throw n.get(i)===l&&n.delete(i),e});return n.set(i,l),l}function c(e){return Promise.all(e.map(e=>s(e)))}function l(e,n){t.set(e,n)}function u(e){for(let[t,n]of e)l(t,n)}function d(e){return t.get(e)}function f(e){let n=[];for(let r of e){let e=t.get(r);if(e===void 0)throw new Oe(r);n.push(e)}return n}function p(e){return t.has(e)}function m(e){for(let n of e)if(!t.has(n))return!1;return!0}function h(e){let n=t.get(e);return n===void 0?s(e):n}function g(){r++,t.clear(),n.clear()}return{clearResolvedThemes:g,getResolvedOrResolveTheme:h,getResolvedTheme:d,getResolvedThemes:f,hasRegisteredTheme:o,hasResolvedTheme:p,hasResolvedThemes:m,registerTheme:i,registerThemeIfAbsent:a,resolveTheme:s,resolveThemes:c,seedResolvedTheme:l,seedResolvedThemes:u}}var Ae=ke();function je(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let e;if(typeof n==`string`){if(e=Ae.getResolvedTheme(n),e==null)throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,Ae.getResolvedTheme(n)??Ae.seedResolvedTheme(n,e);ye.has(n)||(ye.add(n),t.loadThemeSync(e))}}var Me=new Map,Ne=new Map,Pe=new Map,Fe=new Set;function Ie(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(Fe.has(n.name))continue;let e=Me.get(n.name);e??(e=n,Me.set(n.name,e)),Fe.add(e.name),t.loadLanguageSync(e.data)}}function Le(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var Re=Object.defineProperty,ze=Object.getOwnPropertyDescriptor,Be=Object.getOwnPropertyNames,Ve=Object.prototype.hasOwnProperty,He=(e,t)=>{let n={};for(var r in e)Re(n,r,{get:e[r],enumerable:!0});return t||Re(n,Symbol.toStringTag,{value:`Module`}),n},Ue=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Be(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Ve.call(e,s)&&s!==n&&Re(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=ze(t,s))||r.enumerable});return e},We=(e,t,n)=>(Ue(e,t,`default`),n&&Ue(n,t,`default`)),Ge=`modulepreload`,Ke=function(e,t){return new URL(e,t).href},qe={},H=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Ke(t,n),t=s(t),t in qe)return;qe[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Ge,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Je=[{id:`abap`,name:`ABAP`,import:(()=>H(()=>import(`./abap-CLvhMVsD.js`),[],import.meta.url))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>H(()=>import(`./actionscript-3-Cs6JJXT5.js`),[],import.meta.url))},{id:`ada`,name:`Ada`,import:(()=>H(()=>import(`./ada-C5qYipkI.js`),[],import.meta.url))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>H(()=>import(`./ahk-CA9gdOdF.js`),[],import.meta.url))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>H(()=>import(`./ahk2-_6rzW9BS.js`),[],import.meta.url))},{id:`angular-html`,name:`Angular HTML`,import:(()=>H(()=>import(`./angular-html-NJfvXMBu.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3]),import.meta.url))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>H(()=>import(`./angular-ts-3VmQ16GC.js`),__vite__mapDeps([4,0,1,2,3,5]),import.meta.url))},{id:`apache`,name:`Apache Conf`,import:(()=>H(()=>import(`./apache-U0d_L8uA.js`),[],import.meta.url))},{id:`apex`,name:`Apex`,import:(()=>H(()=>import(`./apex-KFGFyKwG.js`),[],import.meta.url))},{id:`apl`,name:`APL`,import:(()=>H(()=>import(`./apl-CaYQRkUE.js`),__vite__mapDeps([6,2,3,1,7,8,9]),import.meta.url))},{id:`applescript`,name:`AppleScript`,import:(()=>H(()=>import(`./applescript-CCn79oCD.js`),[],import.meta.url))},{id:`ara`,name:`Ara`,import:(()=>H(()=>import(`./ara-4CJ0cIlV.js`),[],import.meta.url))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>H(()=>import(`./asciidoc-SCjQUq34.js`),[],import.meta.url))},{id:`asm`,name:`Assembly`,import:(()=>H(()=>import(`./asm-Cmm7eHzH.js`),[],import.meta.url))},{id:`astro`,name:`Astro`,import:(()=>H(()=>import(`./astro-CGsy8jQJ.js`),__vite__mapDeps([10,2,3,9,11,12,13]),import.meta.url))},{id:`awk`,name:`AWK`,import:(()=>H(()=>import(`./awk-BWXHIvNe.js`),[],import.meta.url))},{id:`ballerina`,name:`Ballerina`,import:(()=>H(()=>import(`./ballerina-B7ZEbQpA.js`),[],import.meta.url))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>H(()=>import(`./bat-qdxAdBWQ.js`),[],import.meta.url))},{id:`beancount`,name:`Beancount`,import:(()=>H(()=>import(`./beancount-D-usSTwE.js`),[],import.meta.url))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>H(()=>import(`./berry-DKpUyyne.js`),[],import.meta.url))},{id:`bibtex`,name:`BibTeX`,import:(()=>H(()=>import(`./bibtex-Ci_nEsc7.js`),[],import.meta.url))},{id:`bicep`,name:`Bicep`,import:(()=>H(()=>import(`./bicep-CUHmPFLl.js`),[],import.meta.url))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>H(()=>import(`./bird2-CYIUgYqB.js`),[],import.meta.url))},{id:`blade`,name:`Blade`,import:(()=>H(()=>import(`./blade-CbyPPxmo.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16]),import.meta.url))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>H(()=>import(`./bsl-_VjlB9mv.js`),__vite__mapDeps([17,18]),import.meta.url))},{id:`c`,name:`C`,import:(()=>H(()=>import(`./c-BaJwvHpK.js`).then(e=>e.n),[],import.meta.url))},{id:`c3`,name:`C3`,import:(()=>H(()=>import(`./c3-D0apG41V.js`),[],import.meta.url))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>H(()=>import(`./cadence-CQ2zXKGN.js`),[],import.meta.url))},{id:`cairo`,name:`Cairo`,import:(()=>H(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([19,20]),import.meta.url))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>H(()=>import(`./chapel-BokLUCVc.js`),__vite__mapDeps([21,22]),import.meta.url))},{id:`clarity`,name:`Clarity`,import:(()=>H(()=>import(`./clarity-CtfBBspg.js`),[],import.meta.url))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>H(()=>import(`./clojure-DqKBuwfJ.js`),[],import.meta.url))},{id:`cmake`,name:`CMake`,import:(()=>H(()=>import(`./cmake-Bj61d0ZC.js`),[],import.meta.url))},{id:`cobol`,name:`COBOL`,import:(()=>H(()=>import(`./cobol-I7_VFdfF.js`),__vite__mapDeps([23,1,2,3,8]),import.meta.url))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>H(()=>import(`./codeowners-C8r90Shi.js`),[],import.meta.url))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>H(()=>import(`./codeql-oeQT6MSM.js`),[],import.meta.url))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>H(()=>import(`./coffee-BJ7WLX7y.js`),__vite__mapDeps([24,2]),import.meta.url))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>H(()=>import(`./common-lisp-Cv5bFMCO.js`),[],import.meta.url))},{id:`coq`,name:`Rocq`,import:(()=>H(()=>import(`./coq-DuBRPxYg.js`),[],import.meta.url))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>H(()=>import(`./cpp-DSFvuOlH.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22]),import.meta.url))},{id:`crystal`,name:`Crystal`,import:(()=>H(()=>import(`./crystal-DLLJ7kug.js`),__vite__mapDeps([28,2,3,1,16,22,29]),import.meta.url))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>H(()=>import(`./csharp-oqKa8noW.js`),[],import.meta.url))},{id:`css`,name:`CSS`,import:(()=>H(()=>import(`./css-CW7SLGV7.js`).then(e=>e.n),[],import.meta.url))},{id:`csv`,name:`CSV`,import:(()=>H(()=>import(`./csv-Dx-8-gkx.js`),[],import.meta.url))},{id:`cue`,name:`CUE`,import:(()=>H(()=>import(`./cue-CE9AQfxI.js`),[],import.meta.url))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>H(()=>import(`./cypher-ClKdZ_lG.js`),[],import.meta.url))},{id:`d`,name:`D`,import:(()=>H(()=>import(`./d-qD-0Kul2.js`),[],import.meta.url))},{id:`dart`,name:`Dart`,import:(()=>H(()=>import(`./dart-CnvKMtbv.js`),[],import.meta.url))},{id:`dax`,name:`DAX`,import:(()=>H(()=>import(`./dax-BkyTk9wS.js`),[],import.meta.url))},{id:`desktop`,name:`Desktop`,import:(()=>H(()=>import(`./desktop-Dlh5hvp9.js`),[],import.meta.url))},{id:`diff`,name:`Diff`,import:(()=>H(()=>import(`./diff-woXpYk--.js`),[],import.meta.url))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>H(()=>import(`./docker-IyjqRm3v.js`),[],import.meta.url))},{id:`dotenv`,name:`dotEnv`,import:(()=>H(()=>import(`./dotenv-_5a1GRtc.js`),[],import.meta.url))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>H(()=>import(`./dream-maker-DW3nJb8Q.js`),[],import.meta.url))},{id:`edge`,name:`Edge`,import:(()=>H(()=>import(`./edge-DQEyTxuu.js`),__vite__mapDeps([30,1,2,3,11,15]),import.meta.url))},{id:`elixir`,name:`Elixir`,import:(()=>H(()=>import(`./elixir-Dwvydtjv.js`),__vite__mapDeps([31,1,2,3]),import.meta.url))},{id:`elm`,name:`Elm`,import:(()=>H(()=>import(`./elm-DPrZsI-D.js`),__vite__mapDeps([32,27,22]),import.meta.url))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>H(()=>import(`./emacs-lisp-c_oH4hRZ.js`),[],import.meta.url))},{id:`erb`,name:`ERB`,import:(()=>H(()=>import(`./erb-By39__m0.js`),__vite__mapDeps([33,1,2,3,34,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39]),import.meta.url))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>H(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([40,41]),import.meta.url))},{id:`fennel`,name:`Fennel`,import:(()=>H(()=>import(`./fennel-DQxkIbk2.js`),[],import.meta.url))},{id:`fish`,name:`Fish`,import:(()=>H(()=>import(`./fish-BJitypiv.js`),[],import.meta.url))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>H(()=>import(`./fluent-C03EYrpw.js`),[],import.meta.url))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>H(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([42,43]),import.meta.url))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>H(()=>import(`./fortran-free-form-CYNrtFtB.js`),[],import.meta.url))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>H(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([44,41]),import.meta.url))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>H(()=>import(`./gdresource-xMC7jr7x.js`),__vite__mapDeps([45,46,47]),import.meta.url))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>H(()=>import(`./gdscript-DYvRD3hg.js`),[],import.meta.url))},{id:`gdshader`,name:`GDShader`,import:(()=>H(()=>import(`./gdshader-CBce3t8t.js`),[],import.meta.url))},{id:`genie`,name:`Genie`,import:(()=>H(()=>import(`./genie-CV2tkWYe.js`),[],import.meta.url))},{id:`gherkin`,name:`Gherkin`,import:(()=>H(()=>import(`./gherkin-DExj1W_8.js`),[],import.meta.url))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>H(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([48,49]),import.meta.url))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>H(()=>import(`./git-rebase-CBF3buEb.js`),__vite__mapDeps([50,29]),import.meta.url))},{id:`gleam`,name:`Gleam`,import:(()=>H(()=>import(`./gleam-CSRkHgEL.js`),[],import.meta.url))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>H(()=>import(`./glimmer-js-C4TvHlaw.js`),__vite__mapDeps([51,2,3,1,11]),import.meta.url))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>H(()=>import(`./glimmer-ts-BPhq137Q.js`),__vite__mapDeps([52,2,3,1,11]),import.meta.url))},{id:`glsl`,name:`GLSL`,import:(()=>H(()=>import(`./glsl-BlwDtIwk.js`).then(e=>e.n),__vite__mapDeps([27,22]),import.meta.url))},{id:`gn`,name:`GN`,import:(()=>H(()=>import(`./gn-ilITqXS6.js`),[],import.meta.url))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>H(()=>import(`./gnuplot-7GGW24-e.js`),[],import.meta.url))},{id:`go`,name:`Go`,import:(()=>H(()=>import(`./go-rLFTqkRN.js`),[],import.meta.url))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>H(()=>import(`./graphql-BgMqs-o1.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37]),import.meta.url))},{id:`groovy`,name:`Groovy`,import:(()=>H(()=>import(`./groovy-CacY0gHj.js`),[],import.meta.url))},{id:`hack`,name:`Hack`,import:(()=>H(()=>import(`./hack-DrMUHl8k.js`),__vite__mapDeps([53,1,2,3,16]),import.meta.url))},{id:`haml`,name:`Ruby Haml`,import:(()=>H(()=>import(`./haml-BWbuOop2.js`).then(e=>e.n),__vite__mapDeps([35,2,3]),import.meta.url))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>H(()=>import(`./handlebars-D-TP7YFr.js`),__vite__mapDeps([54,2,3,1,39]),import.meta.url))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>H(()=>import(`./haskell-D8IpX4py.js`),[],import.meta.url))},{id:`haxe`,name:`Haxe`,import:(()=>H(()=>import(`./haxe-C8oCnwJJ.js`),[],import.meta.url))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>H(()=>import(`./hcl-Dh228itO.js`),[],import.meta.url))},{id:`hjson`,name:`Hjson`,import:(()=>H(()=>import(`./hjson-CxZEssPk.js`),[],import.meta.url))},{id:`hlsl`,name:`HLSL`,import:(()=>H(()=>import(`./hlsl-Cvrh5tZx.js`),[],import.meta.url))},{id:`html`,name:`HTML`,import:(()=>H(()=>import(`./html-RkKdupbJ.js`).then(e=>e.n),__vite__mapDeps([1,2,3]),import.meta.url))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>H(()=>import(`./html-derivative-BiXkRfVa.js`),__vite__mapDeps([15,1,2,3]),import.meta.url))},{id:`http`,name:`HTTP`,import:(()=>H(()=>import(`./http-CF05Tv0R.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37]),import.meta.url))},{id:`hurl`,name:`Hurl`,import:(()=>H(()=>import(`./hurl-p-K5zx-F.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37]),import.meta.url))},{id:`hxml`,name:`HXML`,import:(()=>H(()=>import(`./hxml-Dcm88srW.js`),__vite__mapDeps([58,59]),import.meta.url))},{id:`hy`,name:`Hy`,import:(()=>H(()=>import(`./hy-CZbG8q4J.js`),[],import.meta.url))},{id:`imba`,name:`Imba`,import:(()=>H(()=>import(`./imba-DsUTQ-LC.js`),[],import.meta.url))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>H(()=>import(`./ini-B5eOa1yu.js`),[],import.meta.url))},{id:`java`,name:`Java`,import:(()=>H(()=>import(`./java-DZgPGAdX.js`).then(e=>e.n),[],import.meta.url))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>H(()=>import(`./javascript-UpC6uRwd.js`).then(e=>e.n),[],import.meta.url))},{id:`jinja`,name:`Jinja`,import:(()=>H(()=>import(`./jinja-BwlD6UdE.js`),__vite__mapDeps([60,1,2,3]),import.meta.url))},{id:`jison`,name:`Jison`,import:(()=>H(()=>import(`./jison-CXzrtNYv.js`),__vite__mapDeps([61,2]),import.meta.url))},{id:`json`,name:`JSON`,import:(()=>H(()=>import(`./json-CvzeYtbd.js`).then(e=>e.n),[],import.meta.url))},{id:`json5`,name:`JSON5`,import:(()=>H(()=>import(`./json5-BR5RXkoi.js`),[],import.meta.url))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>H(()=>import(`./jsonc-CYpm1nAK.js`),[],import.meta.url))},{id:`jsonl`,name:`JSON Lines`,import:(()=>H(()=>import(`./jsonl-CmCQp5Yx.js`),[],import.meta.url))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>H(()=>import(`./jsonnet-CJTPZ8u_.js`),[],import.meta.url))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>H(()=>import(`./jssm-DXw9l8Rf.js`),[],import.meta.url))},{id:`jsx`,name:`JSX`,import:(()=>H(()=>import(`./jsx-CRRNRy_v.js`).then(e=>e.n),[],import.meta.url))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>H(()=>import(`./julia-n9zQTAkT.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63]),import.meta.url))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>H(()=>import(`./just-Cqgx3k16.js`),__vite__mapDeps([64,2,11,20,29,34,3,1,7,8,16,22,25,26,27,35,36,13,37,38,39,65]),import.meta.url))},{id:`kdl`,name:`KDL`,import:(()=>H(()=>import(`./kdl-CsD5j6eV.js`),[],import.meta.url))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>H(()=>import(`./kotlin-DhhofPvG.js`),[],import.meta.url))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>H(()=>import(`./kusto-C7mF5XQf.js`),[],import.meta.url))},{id:`latex`,name:`LaTeX`,import:(()=>H(()=>import(`./latex-CtWS0r44.js`),__vite__mapDeps([66,67,63]),import.meta.url))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>H(()=>import(`./lean-CewbzKMR.js`),[],import.meta.url))},{id:`less`,name:`Less`,import:(()=>H(()=>import(`./less-DVTAwKKz.js`),[],import.meta.url))},{id:`liquid`,name:`Liquid`,import:(()=>H(()=>import(`./liquid-DYOfxp51.js`),__vite__mapDeps([68,2,3,1,9]),import.meta.url))},{id:`llvm`,name:`LLVM IR`,import:(()=>H(()=>import(`./llvm-DqHOMS-s.js`),[],import.meta.url))},{id:`log`,name:`Log file`,import:(()=>H(()=>import(`./log-BNLmms1o.js`),[],import.meta.url))},{id:`logo`,name:`Logo`,import:(()=>H(()=>import(`./logo-Cluzi2Zq.js`),[],import.meta.url))},{id:`lua`,name:`Lua`,import:(()=>H(()=>import(`./lua-BH2jjxbT.js`).then(e=>e.n),__vite__mapDeps([38,22]),import.meta.url))},{id:`luau`,name:`Luau`,import:(()=>H(()=>import(`./luau-C2pBCSgt.js`),[],import.meta.url))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>H(()=>import(`./make-Dixweg8N.js`),[],import.meta.url))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>H(()=>import(`./markdown-BYOwaDjH.js`),[],import.meta.url))},{id:`marko`,name:`Marko`,import:(()=>H(()=>import(`./marko-yGXqh8Mu.js`),__vite__mapDeps([69,3,5,11,70]),import.meta.url))},{id:`matlab`,name:`MATLAB`,import:(()=>H(()=>import(`./matlab-D7qyCx1q.js`),[],import.meta.url))},{id:`mdc`,name:`MDC`,import:(()=>H(()=>import(`./mdc-DBTGzC9c.js`),__vite__mapDeps([71,15,1,2,3,39,41]),import.meta.url))},{id:`mdx`,name:`MDX`,import:(()=>H(()=>import(`./mdx-DQZ5AkYe.js`),[],import.meta.url))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>H(()=>import(`./mermaid-BxpfTIzt.js`),[],import.meta.url))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>H(()=>import(`./mipsasm-BMqwQI7S.js`),[],import.meta.url))},{id:`mojo`,name:`Mojo`,import:(()=>H(()=>import(`./mojo-fg40_ntQ.js`),[],import.meta.url))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>H(()=>import(`./moonbit-DgjMoLWr.js`),[],import.meta.url))},{id:`move`,name:`Move`,import:(()=>H(()=>import(`./move-BYnGhZoM.js`),[],import.meta.url))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>H(()=>import(`./narrat-_X_XdTYD.js`),[],import.meta.url))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>H(()=>import(`./nextflow-BJtWHP5T.js`),__vite__mapDeps([72,73]),import.meta.url))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>H(()=>import(`./nextflow-groovy-DJMQeKeT.js`),[],import.meta.url))},{id:`nginx`,name:`Nginx`,import:(()=>H(()=>import(`./nginx-C6OOwetR.js`),__vite__mapDeps([74,38,22]),import.meta.url))},{id:`nim`,name:`Nim`,import:(()=>H(()=>import(`./nim-B-51OZwP.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41]),import.meta.url))},{id:`nix`,name:`Nix`,import:(()=>H(()=>import(`./nix-IvuFDN5E.js`),[],import.meta.url))},{id:`nsis`,name:`NSIS`,import:(()=>H(()=>import(`./nsis-CjNLYCLg.js`),[],import.meta.url))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>H(()=>import(`./nushell-DHYfO66s.js`),[],import.meta.url))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>H(()=>import(`./objective-c-D1A_Heim.js`),[],import.meta.url))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>H(()=>import(`./objective-cpp-BsSzOQcm.js`),[],import.meta.url))},{id:`ocaml`,name:`OCaml`,import:(()=>H(()=>import(`./ocaml-O90oeIOV.js`),[],import.meta.url))},{id:`odin`,name:`Odin`,import:(()=>H(()=>import(`./odin-B1RWQWA5.js`),[],import.meta.url))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>H(()=>import(`./openscad-BUDT5pXO.js`),[],import.meta.url))},{id:`org`,name:`Org Markup`,import:(()=>H(()=>import(`./org-rdh6JnaZ.js`),__vite__mapDeps([76,2,3,1,5,8,7,9,11,13,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,48,50,81,82,83,63,65,66,67,70,84,75,85,86,87,88,89,90,91,92,93]),import.meta.url))},{id:`pascal`,name:`Pascal`,import:(()=>H(()=>import(`./pascal-4ZHwLPI5.js`),[],import.meta.url))},{id:`perl`,name:`Perl`,import:(()=>H(()=>import(`./perl-BEpLn7O_.js`),__vite__mapDeps([65,2,3,1,7,8,16]),import.meta.url))},{id:`php`,name:`PHP`,import:(()=>H(()=>import(`./php-uM1K2nIh.js`),__vite__mapDeps([87,2,3,1,7,8,9,16]),import.meta.url))},{id:`pkl`,name:`Pkl`,import:(()=>H(()=>import(`./pkl-ot-7Btpt.js`),[],import.meta.url))},{id:`plsql`,name:`PL/SQL`,import:(()=>H(()=>import(`./plsql-DGHpHOYJ.js`),[],import.meta.url))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>H(()=>import(`./po-BiJDBrnU.js`),[],import.meta.url))},{id:`polar`,name:`Polar`,import:(()=>H(()=>import(`./polar-C7UOKdEL.js`),[],import.meta.url))},{id:`postcss`,name:`PostCSS`,import:(()=>H(()=>import(`./postcss-BXeXVLqQ.js`),[],import.meta.url))},{id:`powerquery`,name:`PowerQuery`,import:(()=>H(()=>import(`./powerquery-DNMTfnFr.js`),[],import.meta.url))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>H(()=>import(`./powershell-CCSX75yM.js`),[],import.meta.url))},{id:`prisma`,name:`Prisma`,import:(()=>H(()=>import(`./prisma-DMgNhnYS.js`),[],import.meta.url))},{id:`prolog`,name:`Prolog`,import:(()=>H(()=>import(`./prolog-iXnhIJG7.js`),[],import.meta.url))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>H(()=>import(`./proto-DB4EqR-F.js`),[],import.meta.url))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>H(()=>import(`./pug-CX5jxSmg.js`),__vite__mapDeps([94,2,3,1]),import.meta.url))},{id:`puppet`,name:`Puppet`,import:(()=>H(()=>import(`./puppet-CDv2pdJW.js`),[],import.meta.url))},{id:`purescript`,name:`PureScript`,import:(()=>H(()=>import(`./purescript-9MfHhQsQ.js`),[],import.meta.url))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>H(()=>import(`./python-gzcpVVnB.js`),[],import.meta.url))},{id:`qml`,name:`QML`,import:(()=>H(()=>import(`./qml-BjaL9kT9.js`),__vite__mapDeps([95,2]),import.meta.url))},{id:`qmldir`,name:`QML Directory`,import:(()=>H(()=>import(`./qmldir-DCQb3MpD.js`),[],import.meta.url))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>H(()=>import(`./qss-Fe1Jh2GI.js`),[],import.meta.url))},{id:`r`,name:`R`,import:(()=>H(()=>import(`./r-CbP_oADb.js`).then(e=>e.n),[],import.meta.url))},{id:`racket`,name:`Racket`,import:(()=>H(()=>import(`./racket-DcIDlBhZ.js`),[],import.meta.url))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>H(()=>import(`./raku-B3gFvitq.js`),[],import.meta.url))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>H(()=>import(`./razor-ClgwHmG8.js`),__vite__mapDeps([96,1,2,3,78]),import.meta.url))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>H(()=>import(`./rbs-C0MpOrj4.js`),[],import.meta.url))},{id:`reg`,name:`Windows Registry Script`,import:(()=>H(()=>import(`./reg-CRGYupPL.js`),[],import.meta.url))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>H(()=>import(`./regexp-DkGv1hXs.js`).then(e=>e.n),[],import.meta.url))},{id:`rel`,name:`Rel`,import:(()=>H(()=>import(`./rel-BtDbiS_P.js`),[],import.meta.url))},{id:`riscv`,name:`RISC-V`,import:(()=>H(()=>import(`./riscv-Ckw8ddFX.js`),[],import.meta.url))},{id:`ron`,name:`RON`,import:(()=>H(()=>import(`./ron-VUp2lXgN.js`),[],import.meta.url))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>H(()=>import(`./rosmsg-CAekHB0j.js`),[],import.meta.url))},{id:`rst`,name:`reStructuredText`,import:(()=>H(()=>import(`./rst-KbuceK-d.js`),__vite__mapDeps([97,2,15,1,3,20,98,25,26,27,22,29,39,34,7,8,16,35,36,11,13,37,38]),import.meta.url))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>H(()=>import(`./ruby-IyWK5TqJ.js`),__vite__mapDeps([34,2,3,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39]),import.meta.url))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>H(()=>import(`./rust-Cfkwpbl8.js`),[],import.meta.url))},{id:`sas`,name:`SAS`,import:(()=>H(()=>import(`./sas-CGY91YIG.js`),__vite__mapDeps([99,16]),import.meta.url))},{id:`sass`,name:`Sass`,import:(()=>H(()=>import(`./sass-DXrisJhu.js`),[],import.meta.url))},{id:`scala`,name:`Scala`,import:(()=>H(()=>import(`./scala-BiFt_7mu.js`),[],import.meta.url))},{id:`scheme`,name:`Scheme`,import:(()=>H(()=>import(`./scheme-DQCgrYNe.js`),[],import.meta.url))},{id:`scss`,name:`SCSS`,import:(()=>H(()=>import(`./scss-C5azgOdY.js`).then(e=>e.n),__vite__mapDeps([5,3]),import.meta.url))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>H(()=>import(`./sdbl-bTVj8UrX.js`),[],import.meta.url))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>H(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([100,101]),import.meta.url))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>H(()=>import(`./shellscript-Do9KSXv1.js`).then(e=>e.n),[],import.meta.url))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>H(()=>import(`./shellsession-DG2DOiiH.js`),__vite__mapDeps([102,29]),import.meta.url))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>H(()=>import(`./smalltalk-BHpQb5nM.js`),[],import.meta.url))},{id:`smithy`,name:`Smithy`,import:(()=>H(()=>import(`./smithy-Dgaz7aur.js`),[],import.meta.url))},{id:`solidity`,name:`Solidity`,import:(()=>H(()=>import(`./solidity-Bj7E1mRn.js`),[],import.meta.url))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>H(()=>import(`./soy-BLO2pcf_.js`),__vite__mapDeps([103,1,2,3]),import.meta.url))},{id:`sparql`,name:`SPARQL`,import:(()=>H(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([104,105]),import.meta.url))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>H(()=>import(`./splunk-BC2Px7Mm.js`),[],import.meta.url))},{id:`sql`,name:`SQL`,import:(()=>H(()=>import(`./sql-NhQC2aCy.js`).then(e=>e.n),[],import.meta.url))},{id:`ssh-config`,name:`SSH Config`,import:(()=>H(()=>import(`./ssh-config-BgfXC-Er.js`),[],import.meta.url))},{id:`stata`,name:`Stata`,import:(()=>H(()=>import(`./stata-BT8bwSiP.js`),__vite__mapDeps([106,16]),import.meta.url))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>H(()=>import(`./stylus-B6D30XZt.js`),[],import.meta.url))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>H(()=>import(`./surrealql-DeFUr0Sz.js`),__vite__mapDeps([107,2]),import.meta.url))},{id:`svelte`,name:`Svelte`,import:(()=>H(()=>import(`./svelte-TRjcWU3h.js`),__vite__mapDeps([108,2,3,11,12]),import.meta.url))},{id:`swift`,name:`Swift`,import:(()=>H(()=>import(`./swift-CyEgAFGc.js`),[],import.meta.url))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>H(()=>import(`./system-verilog-Dh5ihWbf.js`),[],import.meta.url))},{id:`systemd`,name:`Systemd Units`,import:(()=>H(()=>import(`./systemd-BxMlprV5.js`),[],import.meta.url))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>H(()=>import(`./talonscript-CohzipZa.js`),[],import.meta.url))},{id:`tasl`,name:`Tasl`,import:(()=>H(()=>import(`./tasl-DMoTqEGO.js`),[],import.meta.url))},{id:`tcl`,name:`Tcl`,import:(()=>H(()=>import(`./tcl-CZd0xW_V.js`),[],import.meta.url))},{id:`templ`,name:`Templ`,import:(()=>H(()=>import(`./templ-C1Ef7mnt.js`),__vite__mapDeps([109,2,3,81]),import.meta.url))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>H(()=>import(`./terraform-DswuEJGm.js`),[],import.meta.url))},{id:`tex`,name:`TeX`,import:(()=>H(()=>import(`./tex-DWZKUBNC.js`).then(e=>e.n),__vite__mapDeps([67,63]),import.meta.url))},{id:`toml`,name:`TOML`,import:(()=>H(()=>import(`./toml-CcmNWLt0.js`),[],import.meta.url))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>H(()=>import(`./ts-tags-BPGHRwAa.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22]),import.meta.url))},{id:`tsv`,name:`TSV`,import:(()=>H(()=>import(`./tsv-sltzmVWM.js`),[],import.meta.url))},{id:`tsx`,name:`TSX`,import:(()=>H(()=>import(`./tsx-DFPjrnBq.js`).then(e=>e.n),[],import.meta.url))},{id:`turtle`,name:`Turtle`,import:(()=>H(()=>import(`./turtle-ByJddavk.js`),[],import.meta.url))},{id:`twig`,name:`Twig`,import:(()=>H(()=>import(`./twig-BnaDylmD.js`),__vite__mapDeps([111,2,3,5,20,34,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39,87,9]),import.meta.url))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>H(()=>import(`./typescript-CtjU5LIe.js`).then(e=>e.n),[],import.meta.url))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>H(()=>import(`./typespec-BRdr0IET.js`),[],import.meta.url))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>H(()=>import(`./typst-CKVv919t.js`),__vite__mapDeps([112,2,3,1,5,8,7,9,11,13,113,114,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,44,48,50,81,82,54,83,115,63,62,65,66,67,70,116,84,85,87,88,89,90,91,93,117,94,118,119,111,120]),import.meta.url))},{id:`v`,name:`V`,import:(()=>H(()=>import(`./v-DBj4K9d_.js`),[],import.meta.url))},{id:`vala`,name:`Vala`,import:(()=>H(()=>import(`./vala-zf12oZj6.js`),[],import.meta.url))},{id:`vb`,name:`Visual Basic`,import:(()=>H(()=>import(`./vb-DOwzaHZ0.js`),[],import.meta.url))},{id:`verilog`,name:`Verilog`,import:(()=>H(()=>import(`./verilog-B2gwz-sJ.js`),[],import.meta.url))},{id:`vhdl`,name:`VHDL`,import:(()=>H(()=>import(`./vhdl-BroJfC0k.js`),[],import.meta.url))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>H(()=>import(`./viml-DvXPmvsu.js`),[],import.meta.url))},{id:`vue`,name:`Vue`,import:(()=>H(()=>import(`./vue-DQGhQ-pk.js`),__vite__mapDeps([121,2,3,1,9,11,15]),import.meta.url))},{id:`vue-html`,name:`Vue HTML`,import:(()=>H(()=>import(`./vue-html-BtU_VFsU.js`),__vite__mapDeps([122,2]),import.meta.url))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>H(()=>import(`./vue-vine-Bg_4C7Q_.js`),__vite__mapDeps([123,2,3,5,12,70,124]),import.meta.url))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>H(()=>import(`./vyper-CgoNMtux.js`),[],import.meta.url))},{id:`wasm`,name:`WebAssembly`,import:(()=>H(()=>import(`./wasm-ByWQv1Qj.js`),[],import.meta.url))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>H(()=>import(`./wenyan-C8pVoKbM.js`),[],import.meta.url))},{id:`wgsl`,name:`WGSL`,import:(()=>H(()=>import(`./wgsl-BsKzXJz4.js`),[],import.meta.url))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>H(()=>import(`./wikitext-ClFFjSW2.js`),[],import.meta.url))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>H(()=>import(`./wit-DdvCle-K.js`),[],import.meta.url))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>H(()=>import(`./wolfram-DLL8P-h_.js`),[],import.meta.url))},{id:`xml`,name:`XML`,import:(()=>H(()=>import(`./xml-DupdE_s3.js`).then(e=>e.n),__vite__mapDeps([7,8]),import.meta.url))},{id:`xsl`,name:`XSL`,import:(()=>H(()=>import(`./xsl-BkEIn0qW.js`),__vite__mapDeps([93,7,8]),import.meta.url))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>H(()=>import(`./yaml-BuH0PmqQ.js`).then(e=>e.n),[],import.meta.url))},{id:`zenscript`,name:`ZenScript`,import:(()=>H(()=>import(`./zenscript-BnlCZFoB.js`),[],import.meta.url))},{id:`zig`,name:`Zig`,import:(()=>H(()=>import(`./zig-CMLA9XwU.js`),[],import.meta.url))}],Ye=Object.fromEntries(Je.map(e=>[e.id,e.import])),Xe=Object.fromEntries(Je.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Ze={...Ye,...Xe},Qe=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>H(()=>import(`./andromeeda-vGVdxbeo.js`),[],import.meta.url))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>H(()=>import(`./aurora-x-CDeNXAV0.js`),[],import.meta.url))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>H(()=>import(`./ayu-dark-DluEY0Gj.js`),[],import.meta.url))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>H(()=>import(`./ayu-light-C3h-C4tm.js`),[],import.meta.url))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>H(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[],import.meta.url))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>H(()=>import(`./catppuccin-frappe-C9Q5zVZY.js`),[],import.meta.url))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>H(()=>import(`./catppuccin-latte-CtsyrtPq.js`),[],import.meta.url))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>H(()=>import(`./catppuccin-macchiato-R8nAf1vR.js`),[],import.meta.url))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>H(()=>import(`./catppuccin-mocha-DjuaAJKi.js`),[],import.meta.url))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>H(()=>import(`./dark-plus-Cs2F2srj.js`),[],import.meta.url))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>H(()=>import(`./dracula-BHWKrbxM.js`),[],import.meta.url))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>H(()=>import(`./dracula-soft-5eyTD99u.js`),[],import.meta.url))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>H(()=>import(`./everforest-dark-sB-x3p7T.js`),[],import.meta.url))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>H(()=>import(`./everforest-light-Df2xbC6M.js`),[],import.meta.url))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>H(()=>import(`./github-dark-C-LZuMrd.js`),[],import.meta.url))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>H(()=>import(`./github-dark-default-DXG-b-1a.js`),[],import.meta.url))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>H(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[],import.meta.url))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>H(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[],import.meta.url))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>H(()=>import(`./github-light-EUqPIrTm.js`),[],import.meta.url))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>H(()=>import(`./github-light-default-BXViO-2h.js`),[],import.meta.url))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>H(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[],import.meta.url))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>H(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[],import.meta.url))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>H(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[],import.meta.url))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>H(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[],import.meta.url))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>H(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[],import.meta.url))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>H(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[],import.meta.url))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>H(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[],import.meta.url))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>H(()=>import(`./horizon-CE9ld1lL.js`),[],import.meta.url))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>H(()=>import(`./horizon-bright-DSNQnXHK.js`),[],import.meta.url))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>H(()=>import(`./houston-CsvMBhTu.js`),[],import.meta.url))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>H(()=>import(`./kanagawa-dragon-Bozd7klA.js`),[],import.meta.url))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>H(()=>import(`./kanagawa-lotus-BmuOG9ZW.js`),[],import.meta.url))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>H(()=>import(`./kanagawa-wave-BML5mF2J.js`),[],import.meta.url))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>H(()=>import(`./laserwave-C_8bwKvT.js`),[],import.meta.url))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>H(()=>import(`./light-plus-DVQuIRkW.js`),[],import.meta.url))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>H(()=>import(`./material-theme-Bm3Qr25_.js`),[],import.meta.url))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>H(()=>import(`./material-theme-darker-2IIEA8gg.js`),[],import.meta.url))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>H(()=>import(`./material-theme-lighter-uhdI0v04.js`),[],import.meta.url))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>H(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[],import.meta.url))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>H(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[],import.meta.url))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>H(()=>import(`./min-dark-BSWPekZh.js`),[],import.meta.url))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>H(()=>import(`./min-light-DDpmG2fV.js`),[],import.meta.url))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>H(()=>import(`./monokai-B_bV9PQ9.js`),[],import.meta.url))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>H(()=>import(`./night-owl-DhmEMT88.js`),[],import.meta.url))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>H(()=>import(`./night-owl-light-eJ-hLW7d.js`),[],import.meta.url))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>H(()=>import(`./nord-Cb4Vim4T.js`),[],import.meta.url))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>H(()=>import(`./one-dark-pro-CLwyXe_n.js`),[],import.meta.url))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>H(()=>import(`./one-light-D7Lr4KcI.js`),[],import.meta.url))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>H(()=>import(`./plastic-DQwYfKfQ.js`),[],import.meta.url))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>H(()=>import(`./poimandres-DRFjx7u4.js`),[],import.meta.url))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>H(()=>import(`./red-DX1BQOs8.js`),[],import.meta.url))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>H(()=>import(`./rose-pine-aMsaMD1D.js`),[],import.meta.url))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>H(()=>import(`./rose-pine-dawn-8PwUyIlP.js`),[],import.meta.url))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>H(()=>import(`./rose-pine-moon-DO-qXg-I.js`),[],import.meta.url))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>H(()=>import(`./slack-dark-DnToyrRv.js`),[],import.meta.url))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>H(()=>import(`./slack-ochin-B2OO5cIa.js`),[],import.meta.url))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>H(()=>import(`./snazzy-light-4G7pJPwS.js`),[],import.meta.url))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>H(()=>import(`./solarized-dark-UdsmMDCL.js`),[],import.meta.url))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>H(()=>import(`./solarized-light-C1IUL_tW.js`),[],import.meta.url))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>H(()=>import(`./synthwave-84-nFMaYfgc.js`),[],import.meta.url))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>H(()=>import(`./tokyo-night-oM2G3aXe.js`),[],import.meta.url))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>H(()=>import(`./vesper-DdrHHSXu.js`),[],import.meta.url))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>H(()=>import(`./vitesse-black-fwtXNY1n.js`),[],import.meta.url))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>H(()=>import(`./vitesse-dark-BZCL-v6S.js`),[],import.meta.url))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>H(()=>import(`./vitesse-light-VbXTXTou.js`),[],import.meta.url))}].map(e=>[e.id,e.import])),$e=s({createOnigurumaEngine:()=>Dt,getDefaultWasmLoader:()=>Et,loadWasm:()=>bt,setDefaultWasmLoader:()=>Tt}),et=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function tt(){return 2147483648}function nt(){return typeof performance<`u`?performance.now():Date.now()}var rt=(e,t)=>e+(t-e%t)%t;async function it(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=tt();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,rt(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:nt,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var at=Object.defineProperty,ot=(e,t,n)=>t in e?at(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,st=(e,t,n)=>ot(e,typeof t==`symbol`?t:t+``,n),ct=null;function lt(e){throw new et(e.UTF8ToString(e.getLastOnigError()))}var ut=class e{constructor(t){st(this,`utf16Length`),st(this,`utf8Length`),st(this,`utf16Value`),st(this,`utf8Value`),st(this,`utf16OffsetToUtf8`),st(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},dt=class e{constructor(t){if(st(this,`id`,++e.LAST_ID),st(this,`_onigBinding`),st(this,`content`),st(this,`utf16Length`),st(this,`utf8Length`),st(this,`utf16OffsetToUtf8`),st(this,`utf8OffsetToUtf16`),st(this,`ptr`),!ct)throw new et(`Must invoke loadWasm first.`);this._onigBinding=ct,this.content=t;let n=new ut(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=ct.omalloc(1e4),e._sharedPtrInUse=!0,ct.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(ct)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};st(dt,`LAST_ID`,0),st(dt,`_sharedPtr`,0),st(dt,`_sharedPtrInUse`,!1);var ft=dt,pt=class{constructor(e){if(st(this,`_onigBinding`),st(this,`_ptr`),!ct)throw new et(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new ut(e[r]);t[r]=i.createString(ct),n[r]=i.utf8Length}let r=ct.omalloc(4*e.length);ct.HEAPU32.set(t,r/4);let i=ct.omalloc(4*e.length);ct.HEAPU32.set(n,i/4);let a=ct.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)ct.ofree(t[n]);ct.ofree(i),ct.ofree(r),a===0&<(ct),this._onigBinding=ct,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new ft(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function mt(e){return typeof e.instantiator==`function`}function ht(e){return typeof e.default==`function`}function gt(e){return e.data!==void 0}function _t(e){return typeof Response<`u`&&e instanceof Response}function vt(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}var yt;function bt(e){if(yt)return yt;async function t(){ct=await it(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),mt(n)?n=await n.instantiator(t):ht(n)?n=await n.default(t):(gt(n)&&(n=n.data),_t(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await St(n)(t):await Ct(n)(t):vt(n)||n instanceof WebAssembly.Module?n=await xt(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await xt(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return yt=t(),yt}function xt(e){return t=>WebAssembly.instantiate(e,t)}function St(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Ct(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var wt;function Tt(e){wt=e}function Et(){return wt}async function Dt(e){return e&&await bt(e),{createScanner(e){return new pt(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new ft(e)}}}var Ot=He({});We(Ot,$e);var kt=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function At(e){return jt(e)}function jt(e){return Array.isArray(e)?Mt(e):e instanceof RegExp?e:typeof e==`object`?Nt(e):e}function Mt(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=jt(e[n]);return t}function Nt(e){let t={};for(let n in e)t[n]=jt(e[n]);return t}function Pt(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Ft(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Ft(e.substring(0,e.length-1)):e.substr(~t+1)}var It=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Lt=class{static hasCaptures(e){return e!==null&&(It.lastIndex=0,It.test(e))}static replaceCaptures(e,t,n){return e.replace(It,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Rt(e,t){return e<t?-1:+(e>t)}function zt(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Rt(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Bt(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 Vt(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Ht=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Ut=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Jt(e),t)}static createFromParsedTheme(e,t){return Zt(e,t)}_cachedMatchRoot=new Ht(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>Gt(e.parent,t.parentScopes));return n?new qt(n.fontStyle,n.foreground,n.background):null}},Wt=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function Gt(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Kt(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Kt(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var qt=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Jt(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&Bt(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Bt(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new Yt(l,u,e,o,s,c)}}return n}var Yt=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},Xt=(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))(Xt||{});function Zt(e,t){e.sort((e,t)=>{let n=Rt(e.scope,t.scope);return n!==0||(n=zt(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new Qt(t),o=new qt(n,a.getId(r),a.getId(i)),s=new tn(new en(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Ut(a,o,s)}var Qt=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 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)}},$t=Object.freeze([]),en=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||$t,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},tn=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),en.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(zt(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new en(e,t,n,r,i))}},nn=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=an(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function rn(e){return e}function an(e){return e}function on(e,t){let n=[],r=cn(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(sn(i)){let e=[];do e.push(i),i=r.next();while(sn(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function sn(e){return!!e&&!!e.match(/[\w\.:]+/)}function cn(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function ln(e){typeof e.dispose==`function`&&e.dispose()}var un=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},dn=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},fn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},pn=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new un(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new fn;for(let n of e)mn(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof un){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function mn(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof un?gn({baseGrammar:a,selfGrammar:i},r):hn(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new un(e))}function hn(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];_n([r],t,n)}}function gn(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&_n(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&_n(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function _n(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Pt({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&_n(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Cn(i);switch(a.kind){case 0:gn({...t,selfGrammar:t.baseGrammar},n);break;case 1:gn(t,n);break;case 2:hn(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?hn(a.ruleName,i,n):gn(i,n)}else a.kind===4?n.add(new dn(a.scopeName,a.ruleName)):n.add(new un(a.scopeName))}}}var vn=class{kind=0},yn=class{kind=1},bn=class{constructor(e){this.ruleName=e}kind=2},xn=class{constructor(e){this.scopeName=e}kind=3},Sn=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Cn(e){if(e===`$base`)return new vn;if(e===`$self`)return new yn;let t=e.indexOf(`#`);return t===-1?new xn(e):t===0?new bn(e.substring(1)):new Sn(e.substring(0,t),e.substring(t+1))}var wn=/\\(\d+)/,Tn=/\\(\d+)/g,En=-1,Dn=-2;function On(e){return e}function kn(e){return e}var An=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Lt.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Lt.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Ft(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:Lt.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Lt.replaceCaptures(this._contentName,e,t)}},jn=class extends An{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},Mn=class extends An{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Ln(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),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,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Rn,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Nn=class extends An{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Rn,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Pn=class extends An{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Ln(i,this.id),this.beginCaptures=a,this._end=new Ln(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),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,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Rn;for(let t of this.patterns)e.getRule(t).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}},Fn=class extends An{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Ln(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Ln(o,Dn),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),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,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Rn;for(let 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,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Rn,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},In=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new jn(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Mn(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Pt({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Nn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Fn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Pn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Cn(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Nn||e instanceof Pn||e instanceof Fn)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Ln=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&wn.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return Tn.lastIndex=0,this.source.replace(Tn,(e,t)=>Vt(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Rn=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(),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(e=>e.source);this._cached=new zn(e,t,this._items.map(e=>e.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){return new zn(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},zn=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(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-ulrXXC4T.js","./html-BxXjaAye.js","./javascript-C1JF7iBX.js","./css-D-x-Ue0G.js","./angular-ts-cWUkbqrc.js","./scss-3DF1Is0M.js","./apl-CYwKvDlF.js","./xml-BnoqKVtb.js","./java-Cbx3IDuw.js","./json-CRqSOZnD.js","./astro-BleB-Dvw.js","./typescript-cqbK9R71.js","./postcss-BXeXVLqQ.js","./tsx-B8rF--RV.js","./blade-UxS1gLIJ.js","./html-derivative-CEoRM3ro.js","./sql-B35yhKok.js","./bsl-_VjlB9mv.js","./sdbl-bTVj8UrX.js","./cairo-DLTphjLi.js","./python-gzcpVVnB.js","./chapel-DA_5Jb29.js","./c-Dy61fyeR.js","./cobol-DF_09Fay.js","./coffee-Cv1DVgPp.js","./cpp-BlnMjTh9.js","./regexp-CAppT72h.js","./glsl-ClWhfdlL.js","./crystal-B8onZGWh.js","./shellscript-Bq08mUIc.js","./edge-Fqle09cH.js","./elixir-CL3sU1gy.js","./elm-Blr9Ia2N.js","./erb-Ck5t-jn2.js","./ruby-DLm1ZwEN.js","./haml-BP7tD858.js","./graphql-C8TyhWXe.js","./jsx-DcDmlRfr.js","./lua-46-qG00m.js","./yaml-tinlnfn7.js","./erlang-Cphh6RMH.js","./markdown-BYOwaDjH.js","./fortran-fixed-form-DEKoE2YW.js","./fortran-free-form-CYNrtFtB.js","./fsharp-D13ZGOAj.js","./gdresource-xMC7jr7x.js","./gdshader-CBce3t8t.js","./gdscript-DYvRD3hg.js","./git-commit-BSykSTBG.js","./diff-woXpYk--.js","./git-rebase-Dt2TndDV.js","./glimmer-js-Cwn-aFNH.js","./glimmer-ts-CKev0hwM.js","./hack-C9oIcSTK.js","./handlebars-D7ZldTVB.js","./http-DVWDINjr.js","./hurl-BjNoiLI6.js","./csv-Dx-8-gkx.js","./hxml-Dcm88srW.js","./haxe-C8oCnwJJ.js","./jinja-BMe2GcVb.js","./jison-BVbXCft7.js","./julia-CPcuPmIV.js","./r-DAih_iaQ.js","./just-B1zV9CiR.js","./perl-x9VdolYn.js","./latex-Cuj3EXmX.js","./tex-Dbrd9bB3.js","./liquid-C1T4UF1w.js","./marko-Cc6TCGIc.js","./less-DVTAwKKz.js","./mdc-qnFt69dC.js","./nextflow-BJtWHP5T.js","./nextflow-groovy-DJMQeKeT.js","./nginx-7n4L4W73.js","./nim-BLvMDnWX.js","./org-C8fiTt0a.js","./clojure-DqKBuwfJ.js","./csharp-oqKa8noW.js","./dart-CnvKMtbv.js","./docker-IyjqRm3v.js","./go-rLFTqkRN.js","./groovy-CacY0gHj.js","./ini-B5eOa1yu.js","./make-Dixweg8N.js","./objective-c-D1A_Heim.js","./ocaml-O90oeIOV.js","./php-mFFqmEsM.js","./vb-DOwzaHZ0.js","./raku-B3gFvitq.js","./rust-Cfkwpbl8.js","./scala-BiFt_7mu.js","./zig-CMLA9XwU.js","./xsl-r6Si1Xjc.js","./pug-H1OMV43P.js","./qml-B8D1BoQx.js","./razor-BeJgOpe8.js","./rst-RMbVAAkg.js","./cmake-Bj61d0ZC.js","./sas-B7ihlrSP.js","./shaderlab-TOUzSsQk.js","./hlsl-Cvrh5tZx.js","./shellsession-DJY5846a.js","./soy-Bkld_lfE.js","./sparql-D_iOobhT.js","./turtle-ByJddavk.js","./stata-BgW5egxh.js","./surrealql-B-aUVDek.js","./svelte-C7MrEpG_.js","./templ-CUYQL3Op.js","./ts-tags-wpbSYL5U.js","./twig-CpaRBIem.js","./typst-BUVX7J-L.js","./bat-qdxAdBWQ.js","./bibtex-Ci_nEsc7.js","./jsonc-CYpm1nAK.js","./log-BNLmms1o.js","./powershell-CCSX75yM.js","./swift-CyEgAFGc.js","./system-verilog-Dh5ihWbf.js","./verilog-B2gwz-sJ.js","./vue-B3rM_CiH.js","./vue-html-uBxsJ3nV.js","./vue-vine-CH44uMD8.js","./stylus-B6D30XZt.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function u(e){return new Worker(``+new URL(`worker-DZo603XT.js`,import.meta.url).href,{type:`module`,name:e?.name})}var d=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function ee(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function j(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function M(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ee(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ee(a,u),c+=M(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ee(a,u++),c+=M(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return M(j(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function N(e,t,n){if(e==null)return e;var r=[],i=0;return M(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function P(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var F=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},I={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=I,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:P}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),f=o(((e,t)=>{t.exports=d()})),p=l(f(),1);function m(e){let t=(0,p.useRef)(e);return(0,p.useInsertionEffect)(()=>void(t.current=e)),(0,p.useCallback)((...e)=>t.current(...e),[])}var h=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),g=o(((e,t)=>{t.exports=h()}))(),_=(0,p.createContext)(void 0);function v(){return(0,p.useContext)(_)}var y={position:`absolute`,top:0,bottom:0,textAlign:`center`,whiteSpace:`normal`,touchAction:`none`},b={display:`contents`};function x(){return null}var S=`diffs-container`,C=(()=>{try{return!1}catch{return!1}})(),w=/(?=^From [a-f0-9]+ .+$)/m,T=/(?=^diff --git)/gm,E=/(?<=\n)/,D=/^(---|\+\+\+)\s+([^\t\r\n]+)/,O=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,k=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,A=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,ee=`header-prefix`,j=`header-filename-suffix`,M=`header-metadata`,N=`header-custom`,P={dark:`pierre-dark`,light:`pierre-light`},F=`data-theme-css`,I=`data-unsafe-css`,te=`data-diffs-scrollbar-measure`,ne=`data-diffs-code-view-header`,re=`data-diffs-code-view-footer`,L=`--diffs-scrollbar-gutter-measured`,R=1e5,z={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},B={...z,hunkLineCount:1},ie={paddingTop:8,paddingBottom:8,gap:8},ae={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},oe=Object.freeze({fromStart:0,fromEnd:0}),se={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},ce={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function le(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}function ue({hunkIndex:e,lineIndex:t,conflictIndex:n}){return`merge-conflict-action-${e}-${t}-${n}`}function V(e,t){return e-(t===0?0:1)}function de(e,t){return V(e,t)+t}function fe(e,t){let n=t.hunks[e.hunkIndex];if(n!=null)return{hunkIndex:e.hunkIndex,lineIndex:pe(n,e.startContentIndex)}}function pe(e,t){let n=e.unifiedLineStart;for(let r=0;r<t;r++){let t=e.hunkContent[r];n+=t.type===`context`?t.lines:t.deletions+t.additions}return n}function me({fileDiff:e,actions:t,renderCustomHeader:n,renderHeaderPrefix:r,renderHeaderFilenameSuffix:i,renderHeaderMetadata:a,renderAnnotation:o,renderGutterUtility:s,renderMergeConflictUtility:c,lineAnnotations:l,getHoveredLine:u,getInstance:d}){let f=n?.(e),p=r?.(e),m=i?.(e),h=a?.(e);return(0,g.jsxs)(g.Fragment,{children:[f==null?(0,g.jsxs)(g.Fragment,{children:[p!=null&&(0,g.jsx)(`div`,{slot:`header-prefix`,children:p}),m!=null&&(0,g.jsx)(`div`,{slot:`header-filename-suffix`,children:m}),h!=null&&(0,g.jsx)(`div`,{slot:`header-metadata`,children:h})]}):(0,g.jsx)(`div`,{slot:N,children:f}),o!=null&&l?.map((e,t)=>(0,g.jsx)(`div`,{slot:le(e),children:o(e)},t)),t!=null&&c!=null&&d!=null&&t.map(t=>{if(t==null)return;let n=he(t,e);return(0,g.jsx)(`div`,{slot:n,style:b,children:c(t,d)},n)}),s!=null&&(0,g.jsx)(`div`,{slot:`gutter-utility-slot`,style:y,children:s(u)})]})}function he(e,t){let n=fe(e,t);return n==null?void 0:ue({hunkIndex:n.hunkIndex,lineIndex:n.lineIndex,conflictIndex:e.conflictIndex})}function ge({file:e,renderCustomHeader:t,renderHeaderPrefix:n,renderHeaderFilenameSuffix:r,renderHeaderMetadata:i,renderAnnotation:a,lineAnnotations:o,renderGutterUtility:s,getHoveredLine:c}){let l=t?.(e),u=n?.(e),d=r?.(e),f=i?.(e);return(0,g.jsxs)(g.Fragment,{children:[l==null?(0,g.jsxs)(g.Fragment,{children:[u!=null&&(0,g.jsx)(`div`,{slot:`header-prefix`,children:u}),d!=null&&(0,g.jsx)(`div`,{slot:`header-filename-suffix`,children:d}),f!=null&&(0,g.jsx)(`div`,{slot:`header-metadata`,children:f})]}):(0,g.jsx)(`div`,{slot:N,children:l}),a!=null&&o?.map((e,t)=>(0,g.jsx)(`div`,{slot:le(e),children:a(e)},t)),s!=null&&(0,g.jsx)(`div`,{slot:`gutter-utility-slot`,style:y,children:s(c)})]})}function _e(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function ve(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}var ye=new Set;function be(e){let t=[],n=new Set;for(let r of xe(e.themes)){let e=we(r)?r.getThemes():[r];for(let r of e){if(n.has(r.name))throw Error(`Theme collection already contains theme "${r.name}"`);n.add(r.name),t.push(r)}}let r=Object.freeze([...t]),i=Object.freeze(r.filter(e=>e.colorScheme===`light`)),a=Object.freeze(r.filter(e=>e.colorScheme===`dark`)),o=new Map(r.map(e=>[e.name,e])),s=Object.freeze(r.map(e=>e.name)),c=Object.freeze(i.map(e=>e.name)),l=Object.freeze(a.map(e=>e.name));function u(e){if(e==null)return r;let{colorScheme:t,collection:n}=e;return n==null?t===`light`?i:t===`dark`?a:r:r.filter(e=>e.collection===n?t==null||e.colorScheme===t:!1)}return{getTheme(e){return o.get(e)},getThemes(e){return u(e)},getThemeNames(e){return e?.collection==null?e?.colorScheme===`light`?c:e?.colorScheme===`dark`?l:s:u(e).map(e=>e.name)},hasTheme(e){return o.has(e)},orderBy(e){return be({themes:r.map((e,t)=>({descriptor:e,index:t})).sort((t,n)=>{let r=e(t.descriptor,n.descriptor);return r===0?t.index-n.index:r}).map(e=>e.descriptor)})},pick(e){let t=[],n=new Set;for(let r of e){if(n.has(r))throw Error(`Theme collection pick already includes theme "${r}"`);n.add(r);let e=o.get(r);if(e==null)throw Error(`Theme collection does not contain theme "${r}"`);t.push(e)}return be({themes:t})},registerInto(e){for(let t of r)e.registerThemeIfAbsent(t.name,t.load)}}}function xe(e){return Se(e)?[e]:e}function Se(e){return we(e)||Ce(e)}function Ce(e){return typeof e.name==`string`&&typeof e.load==`function`}function we(e){return typeof e.getThemes==`function`}function Te(e){return typeof e==`object`&&e&&`default`in e?e.default:e}var Ee=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name=`DuplicateThemeError`}},De=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name=`UnregisteredThemeError`}},Oe=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name=`UnresolvedThemeError`}};function ke(){let e=new Map,t=new Map,n=new Map,r=0;function i(t,n){if(e.has(t))throw new Ee(t);e.set(t,n)}function a(t,n){return!e.has(t)&&(e.set(t,n),!0)}function o(t){return e.has(t)}function s(i){let a=t.get(i);if(a!==void 0)return Promise.resolve(a);let o=n.get(i);if(o!==void 0)return o;let s=e.get(i);if(s===void 0)return Promise.reject(new De(i));let c=r,l=s().then(e=>{let a=Te(e);return c===r&&t.set(i,a),n.get(i)===l&&n.delete(i),a}).catch(e=>{throw n.get(i)===l&&n.delete(i),e});return n.set(i,l),l}function c(e){return Promise.all(e.map(e=>s(e)))}function l(e,n){t.set(e,n)}function u(e){for(let[t,n]of e)l(t,n)}function d(e){return t.get(e)}function f(e){let n=[];for(let r of e){let e=t.get(r);if(e===void 0)throw new Oe(r);n.push(e)}return n}function p(e){return t.has(e)}function m(e){for(let n of e)if(!t.has(n))return!1;return!0}function h(e){let n=t.get(e);return n===void 0?s(e):n}function g(){r++,t.clear(),n.clear()}return{clearResolvedThemes:g,getResolvedOrResolveTheme:h,getResolvedTheme:d,getResolvedThemes:f,hasRegisteredTheme:o,hasResolvedTheme:p,hasResolvedThemes:m,registerTheme:i,registerThemeIfAbsent:a,resolveTheme:s,resolveThemes:c,seedResolvedTheme:l,seedResolvedThemes:u}}var Ae=ke();function je(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let e;if(typeof n==`string`){if(e=Ae.getResolvedTheme(n),e==null)throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,Ae.getResolvedTheme(n)??Ae.seedResolvedTheme(n,e);ye.has(n)||(ye.add(n),t.loadThemeSync(e))}}var Me=new Map,Ne=new Map,Pe=new Map,Fe=new Set;function Ie(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(Fe.has(n.name))continue;let e=Me.get(n.name);e??(e=n,Me.set(n.name,e)),Fe.add(e.name),t.loadLanguageSync(e.data)}}function Le(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var Re=Object.defineProperty,ze=Object.getOwnPropertyDescriptor,Be=Object.getOwnPropertyNames,Ve=Object.prototype.hasOwnProperty,He=(e,t)=>{let n={};for(var r in e)Re(n,r,{get:e[r],enumerable:!0});return t||Re(n,Symbol.toStringTag,{value:`Module`}),n},Ue=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Be(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Ve.call(e,s)&&s!==n&&Re(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=ze(t,s))||r.enumerable});return e},We=(e,t,n)=>(Ue(e,t,`default`),n&&Ue(n,t,`default`)),Ge=`modulepreload`,Ke=function(e,t){return new URL(e,t).href},qe={},H=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Ke(t,n),t=s(t),t in qe)return;qe[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Ge,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Je=[{id:`abap`,name:`ABAP`,import:(()=>H(()=>import(`./abap-CLvhMVsD.js`),[],import.meta.url))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>H(()=>import(`./actionscript-3-Cs6JJXT5.js`),[],import.meta.url))},{id:`ada`,name:`Ada`,import:(()=>H(()=>import(`./ada-C5qYipkI.js`),[],import.meta.url))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>H(()=>import(`./ahk-CA9gdOdF.js`),[],import.meta.url))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>H(()=>import(`./ahk2-_6rzW9BS.js`),[],import.meta.url))},{id:`angular-html`,name:`Angular HTML`,import:(()=>H(()=>import(`./angular-html-ulrXXC4T.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3]),import.meta.url))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>H(()=>import(`./angular-ts-cWUkbqrc.js`),__vite__mapDeps([4,0,1,2,3,5]),import.meta.url))},{id:`apache`,name:`Apache Conf`,import:(()=>H(()=>import(`./apache-U0d_L8uA.js`),[],import.meta.url))},{id:`apex`,name:`Apex`,import:(()=>H(()=>import(`./apex-KFGFyKwG.js`),[],import.meta.url))},{id:`apl`,name:`APL`,import:(()=>H(()=>import(`./apl-CYwKvDlF.js`),__vite__mapDeps([6,2,3,1,7,8,9]),import.meta.url))},{id:`applescript`,name:`AppleScript`,import:(()=>H(()=>import(`./applescript-CCn79oCD.js`),[],import.meta.url))},{id:`ara`,name:`Ara`,import:(()=>H(()=>import(`./ara-4CJ0cIlV.js`),[],import.meta.url))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>H(()=>import(`./asciidoc-SCjQUq34.js`),[],import.meta.url))},{id:`asm`,name:`Assembly`,import:(()=>H(()=>import(`./asm-Cmm7eHzH.js`),[],import.meta.url))},{id:`astro`,name:`Astro`,import:(()=>H(()=>import(`./astro-BleB-Dvw.js`),__vite__mapDeps([10,2,3,9,11,12,13]),import.meta.url))},{id:`awk`,name:`AWK`,import:(()=>H(()=>import(`./awk-BWXHIvNe.js`),[],import.meta.url))},{id:`ballerina`,name:`Ballerina`,import:(()=>H(()=>import(`./ballerina-B7ZEbQpA.js`),[],import.meta.url))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>H(()=>import(`./bat-qdxAdBWQ.js`),[],import.meta.url))},{id:`beancount`,name:`Beancount`,import:(()=>H(()=>import(`./beancount-D-usSTwE.js`),[],import.meta.url))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>H(()=>import(`./berry-DKpUyyne.js`),[],import.meta.url))},{id:`bibtex`,name:`BibTeX`,import:(()=>H(()=>import(`./bibtex-Ci_nEsc7.js`),[],import.meta.url))},{id:`bicep`,name:`Bicep`,import:(()=>H(()=>import(`./bicep-CUHmPFLl.js`),[],import.meta.url))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>H(()=>import(`./bird2-CYIUgYqB.js`),[],import.meta.url))},{id:`blade`,name:`Blade`,import:(()=>H(()=>import(`./blade-UxS1gLIJ.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16]),import.meta.url))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>H(()=>import(`./bsl-_VjlB9mv.js`),__vite__mapDeps([17,18]),import.meta.url))},{id:`c`,name:`C`,import:(()=>H(()=>import(`./c-Dy61fyeR.js`).then(e=>e.n),[],import.meta.url))},{id:`c3`,name:`C3`,import:(()=>H(()=>import(`./c3-D0apG41V.js`),[],import.meta.url))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>H(()=>import(`./cadence-CQ2zXKGN.js`),[],import.meta.url))},{id:`cairo`,name:`Cairo`,import:(()=>H(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([19,20]),import.meta.url))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>H(()=>import(`./chapel-DA_5Jb29.js`),__vite__mapDeps([21,22]),import.meta.url))},{id:`clarity`,name:`Clarity`,import:(()=>H(()=>import(`./clarity-CtfBBspg.js`),[],import.meta.url))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>H(()=>import(`./clojure-DqKBuwfJ.js`),[],import.meta.url))},{id:`cmake`,name:`CMake`,import:(()=>H(()=>import(`./cmake-Bj61d0ZC.js`),[],import.meta.url))},{id:`cobol`,name:`COBOL`,import:(()=>H(()=>import(`./cobol-DF_09Fay.js`),__vite__mapDeps([23,1,2,3,8]),import.meta.url))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>H(()=>import(`./codeowners-C8r90Shi.js`),[],import.meta.url))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>H(()=>import(`./codeql-oeQT6MSM.js`),[],import.meta.url))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>H(()=>import(`./coffee-Cv1DVgPp.js`),__vite__mapDeps([24,2]),import.meta.url))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>H(()=>import(`./common-lisp-Cv5bFMCO.js`),[],import.meta.url))},{id:`coq`,name:`Rocq`,import:(()=>H(()=>import(`./coq-DuBRPxYg.js`),[],import.meta.url))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>H(()=>import(`./cpp-BlnMjTh9.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22]),import.meta.url))},{id:`crystal`,name:`Crystal`,import:(()=>H(()=>import(`./crystal-B8onZGWh.js`),__vite__mapDeps([28,2,3,1,16,22,29]),import.meta.url))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>H(()=>import(`./csharp-oqKa8noW.js`),[],import.meta.url))},{id:`css`,name:`CSS`,import:(()=>H(()=>import(`./css-D-x-Ue0G.js`).then(e=>e.n),[],import.meta.url))},{id:`csv`,name:`CSV`,import:(()=>H(()=>import(`./csv-Dx-8-gkx.js`),[],import.meta.url))},{id:`cue`,name:`CUE`,import:(()=>H(()=>import(`./cue-CE9AQfxI.js`),[],import.meta.url))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>H(()=>import(`./cypher-ClKdZ_lG.js`),[],import.meta.url))},{id:`d`,name:`D`,import:(()=>H(()=>import(`./d-qD-0Kul2.js`),[],import.meta.url))},{id:`dart`,name:`Dart`,import:(()=>H(()=>import(`./dart-CnvKMtbv.js`),[],import.meta.url))},{id:`dax`,name:`DAX`,import:(()=>H(()=>import(`./dax-BkyTk9wS.js`),[],import.meta.url))},{id:`desktop`,name:`Desktop`,import:(()=>H(()=>import(`./desktop-Dlh5hvp9.js`),[],import.meta.url))},{id:`diff`,name:`Diff`,import:(()=>H(()=>import(`./diff-woXpYk--.js`),[],import.meta.url))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>H(()=>import(`./docker-IyjqRm3v.js`),[],import.meta.url))},{id:`dotenv`,name:`dotEnv`,import:(()=>H(()=>import(`./dotenv-_5a1GRtc.js`),[],import.meta.url))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>H(()=>import(`./dream-maker-DW3nJb8Q.js`),[],import.meta.url))},{id:`edge`,name:`Edge`,import:(()=>H(()=>import(`./edge-Fqle09cH.js`),__vite__mapDeps([30,1,2,3,11,15]),import.meta.url))},{id:`elixir`,name:`Elixir`,import:(()=>H(()=>import(`./elixir-CL3sU1gy.js`),__vite__mapDeps([31,1,2,3]),import.meta.url))},{id:`elm`,name:`Elm`,import:(()=>H(()=>import(`./elm-Blr9Ia2N.js`),__vite__mapDeps([32,27,22]),import.meta.url))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>H(()=>import(`./emacs-lisp-c_oH4hRZ.js`),[],import.meta.url))},{id:`erb`,name:`ERB`,import:(()=>H(()=>import(`./erb-Ck5t-jn2.js`),__vite__mapDeps([33,1,2,3,34,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39]),import.meta.url))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>H(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([40,41]),import.meta.url))},{id:`fennel`,name:`Fennel`,import:(()=>H(()=>import(`./fennel-DQxkIbk2.js`),[],import.meta.url))},{id:`fish`,name:`Fish`,import:(()=>H(()=>import(`./fish-BJitypiv.js`),[],import.meta.url))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>H(()=>import(`./fluent-C03EYrpw.js`),[],import.meta.url))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>H(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([42,43]),import.meta.url))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>H(()=>import(`./fortran-free-form-CYNrtFtB.js`),[],import.meta.url))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>H(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([44,41]),import.meta.url))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>H(()=>import(`./gdresource-xMC7jr7x.js`),__vite__mapDeps([45,46,47]),import.meta.url))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>H(()=>import(`./gdscript-DYvRD3hg.js`),[],import.meta.url))},{id:`gdshader`,name:`GDShader`,import:(()=>H(()=>import(`./gdshader-CBce3t8t.js`),[],import.meta.url))},{id:`genie`,name:`Genie`,import:(()=>H(()=>import(`./genie-CV2tkWYe.js`),[],import.meta.url))},{id:`gherkin`,name:`Gherkin`,import:(()=>H(()=>import(`./gherkin-DExj1W_8.js`),[],import.meta.url))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>H(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([48,49]),import.meta.url))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>H(()=>import(`./git-rebase-Dt2TndDV.js`),__vite__mapDeps([50,29]),import.meta.url))},{id:`gleam`,name:`Gleam`,import:(()=>H(()=>import(`./gleam-CSRkHgEL.js`),[],import.meta.url))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>H(()=>import(`./glimmer-js-Cwn-aFNH.js`),__vite__mapDeps([51,2,3,1,11]),import.meta.url))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>H(()=>import(`./glimmer-ts-CKev0hwM.js`),__vite__mapDeps([52,2,3,1,11]),import.meta.url))},{id:`glsl`,name:`GLSL`,import:(()=>H(()=>import(`./glsl-ClWhfdlL.js`).then(e=>e.n),__vite__mapDeps([27,22]),import.meta.url))},{id:`gn`,name:`GN`,import:(()=>H(()=>import(`./gn-ilITqXS6.js`),[],import.meta.url))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>H(()=>import(`./gnuplot-7GGW24-e.js`),[],import.meta.url))},{id:`go`,name:`Go`,import:(()=>H(()=>import(`./go-rLFTqkRN.js`),[],import.meta.url))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>H(()=>import(`./graphql-C8TyhWXe.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37]),import.meta.url))},{id:`groovy`,name:`Groovy`,import:(()=>H(()=>import(`./groovy-CacY0gHj.js`),[],import.meta.url))},{id:`hack`,name:`Hack`,import:(()=>H(()=>import(`./hack-C9oIcSTK.js`),__vite__mapDeps([53,1,2,3,16]),import.meta.url))},{id:`haml`,name:`Ruby Haml`,import:(()=>H(()=>import(`./haml-BP7tD858.js`).then(e=>e.n),__vite__mapDeps([35,2,3]),import.meta.url))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>H(()=>import(`./handlebars-D7ZldTVB.js`),__vite__mapDeps([54,2,3,1,39]),import.meta.url))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>H(()=>import(`./haskell-D8IpX4py.js`),[],import.meta.url))},{id:`haxe`,name:`Haxe`,import:(()=>H(()=>import(`./haxe-C8oCnwJJ.js`),[],import.meta.url))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>H(()=>import(`./hcl-Dh228itO.js`),[],import.meta.url))},{id:`hjson`,name:`Hjson`,import:(()=>H(()=>import(`./hjson-CxZEssPk.js`),[],import.meta.url))},{id:`hlsl`,name:`HLSL`,import:(()=>H(()=>import(`./hlsl-Cvrh5tZx.js`),[],import.meta.url))},{id:`html`,name:`HTML`,import:(()=>H(()=>import(`./html-BxXjaAye.js`).then(e=>e.n),__vite__mapDeps([1,2,3]),import.meta.url))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>H(()=>import(`./html-derivative-CEoRM3ro.js`),__vite__mapDeps([15,1,2,3]),import.meta.url))},{id:`http`,name:`HTTP`,import:(()=>H(()=>import(`./http-DVWDINjr.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37]),import.meta.url))},{id:`hurl`,name:`Hurl`,import:(()=>H(()=>import(`./hurl-BjNoiLI6.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37]),import.meta.url))},{id:`hxml`,name:`HXML`,import:(()=>H(()=>import(`./hxml-Dcm88srW.js`),__vite__mapDeps([58,59]),import.meta.url))},{id:`hy`,name:`Hy`,import:(()=>H(()=>import(`./hy-CZbG8q4J.js`),[],import.meta.url))},{id:`imba`,name:`Imba`,import:(()=>H(()=>import(`./imba-DsUTQ-LC.js`),[],import.meta.url))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>H(()=>import(`./ini-B5eOa1yu.js`),[],import.meta.url))},{id:`java`,name:`Java`,import:(()=>H(()=>import(`./java-Cbx3IDuw.js`).then(e=>e.n),[],import.meta.url))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>H(()=>import(`./javascript-C1JF7iBX.js`).then(e=>e.n),[],import.meta.url))},{id:`jinja`,name:`Jinja`,import:(()=>H(()=>import(`./jinja-BMe2GcVb.js`),__vite__mapDeps([60,1,2,3]),import.meta.url))},{id:`jison`,name:`Jison`,import:(()=>H(()=>import(`./jison-BVbXCft7.js`),__vite__mapDeps([61,2]),import.meta.url))},{id:`json`,name:`JSON`,import:(()=>H(()=>import(`./json-CRqSOZnD.js`).then(e=>e.n),[],import.meta.url))},{id:`json5`,name:`JSON5`,import:(()=>H(()=>import(`./json5-BR5RXkoi.js`),[],import.meta.url))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>H(()=>import(`./jsonc-CYpm1nAK.js`),[],import.meta.url))},{id:`jsonl`,name:`JSON Lines`,import:(()=>H(()=>import(`./jsonl-CmCQp5Yx.js`),[],import.meta.url))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>H(()=>import(`./jsonnet-CJTPZ8u_.js`),[],import.meta.url))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>H(()=>import(`./jssm-DXw9l8Rf.js`),[],import.meta.url))},{id:`jsx`,name:`JSX`,import:(()=>H(()=>import(`./jsx-DcDmlRfr.js`).then(e=>e.n),[],import.meta.url))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>H(()=>import(`./julia-CPcuPmIV.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63]),import.meta.url))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>H(()=>import(`./just-B1zV9CiR.js`),__vite__mapDeps([64,2,11,20,29,34,3,1,7,8,16,22,25,26,27,35,36,13,37,38,39,65]),import.meta.url))},{id:`kdl`,name:`KDL`,import:(()=>H(()=>import(`./kdl-CsD5j6eV.js`),[],import.meta.url))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>H(()=>import(`./kotlin-DhhofPvG.js`),[],import.meta.url))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>H(()=>import(`./kusto-C7mF5XQf.js`),[],import.meta.url))},{id:`latex`,name:`LaTeX`,import:(()=>H(()=>import(`./latex-Cuj3EXmX.js`),__vite__mapDeps([66,67,63]),import.meta.url))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>H(()=>import(`./lean-CewbzKMR.js`),[],import.meta.url))},{id:`less`,name:`Less`,import:(()=>H(()=>import(`./less-DVTAwKKz.js`),[],import.meta.url))},{id:`liquid`,name:`Liquid`,import:(()=>H(()=>import(`./liquid-C1T4UF1w.js`),__vite__mapDeps([68,2,3,1,9]),import.meta.url))},{id:`llvm`,name:`LLVM IR`,import:(()=>H(()=>import(`./llvm-DqHOMS-s.js`),[],import.meta.url))},{id:`log`,name:`Log file`,import:(()=>H(()=>import(`./log-BNLmms1o.js`),[],import.meta.url))},{id:`logo`,name:`Logo`,import:(()=>H(()=>import(`./logo-Cluzi2Zq.js`),[],import.meta.url))},{id:`lua`,name:`Lua`,import:(()=>H(()=>import(`./lua-46-qG00m.js`).then(e=>e.n),__vite__mapDeps([38,22]),import.meta.url))},{id:`luau`,name:`Luau`,import:(()=>H(()=>import(`./luau-C2pBCSgt.js`),[],import.meta.url))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>H(()=>import(`./make-Dixweg8N.js`),[],import.meta.url))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>H(()=>import(`./markdown-BYOwaDjH.js`),[],import.meta.url))},{id:`marko`,name:`Marko`,import:(()=>H(()=>import(`./marko-Cc6TCGIc.js`),__vite__mapDeps([69,3,5,11,70]),import.meta.url))},{id:`matlab`,name:`MATLAB`,import:(()=>H(()=>import(`./matlab-D7qyCx1q.js`),[],import.meta.url))},{id:`mdc`,name:`MDC`,import:(()=>H(()=>import(`./mdc-qnFt69dC.js`),__vite__mapDeps([71,15,1,2,3,39,41]),import.meta.url))},{id:`mdx`,name:`MDX`,import:(()=>H(()=>import(`./mdx-DQZ5AkYe.js`),[],import.meta.url))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>H(()=>import(`./mermaid-BxpfTIzt.js`),[],import.meta.url))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>H(()=>import(`./mipsasm-BMqwQI7S.js`),[],import.meta.url))},{id:`mojo`,name:`Mojo`,import:(()=>H(()=>import(`./mojo-fg40_ntQ.js`),[],import.meta.url))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>H(()=>import(`./moonbit-DgjMoLWr.js`),[],import.meta.url))},{id:`move`,name:`Move`,import:(()=>H(()=>import(`./move-BYnGhZoM.js`),[],import.meta.url))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>H(()=>import(`./narrat-_X_XdTYD.js`),[],import.meta.url))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>H(()=>import(`./nextflow-BJtWHP5T.js`),__vite__mapDeps([72,73]),import.meta.url))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>H(()=>import(`./nextflow-groovy-DJMQeKeT.js`),[],import.meta.url))},{id:`nginx`,name:`Nginx`,import:(()=>H(()=>import(`./nginx-7n4L4W73.js`),__vite__mapDeps([74,38,22]),import.meta.url))},{id:`nim`,name:`Nim`,import:(()=>H(()=>import(`./nim-BLvMDnWX.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41]),import.meta.url))},{id:`nix`,name:`Nix`,import:(()=>H(()=>import(`./nix-IvuFDN5E.js`),[],import.meta.url))},{id:`nsis`,name:`NSIS`,import:(()=>H(()=>import(`./nsis-CjNLYCLg.js`),[],import.meta.url))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>H(()=>import(`./nushell-DHYfO66s.js`),[],import.meta.url))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>H(()=>import(`./objective-c-D1A_Heim.js`),[],import.meta.url))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>H(()=>import(`./objective-cpp-BsSzOQcm.js`),[],import.meta.url))},{id:`ocaml`,name:`OCaml`,import:(()=>H(()=>import(`./ocaml-O90oeIOV.js`),[],import.meta.url))},{id:`odin`,name:`Odin`,import:(()=>H(()=>import(`./odin-B1RWQWA5.js`),[],import.meta.url))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>H(()=>import(`./openscad-BUDT5pXO.js`),[],import.meta.url))},{id:`org`,name:`Org Markup`,import:(()=>H(()=>import(`./org-C8fiTt0a.js`),__vite__mapDeps([76,2,3,1,5,8,7,9,11,13,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,48,50,81,82,83,63,65,66,67,70,84,75,85,86,87,88,89,90,91,92,93]),import.meta.url))},{id:`pascal`,name:`Pascal`,import:(()=>H(()=>import(`./pascal-4ZHwLPI5.js`),[],import.meta.url))},{id:`perl`,name:`Perl`,import:(()=>H(()=>import(`./perl-x9VdolYn.js`),__vite__mapDeps([65,2,3,1,7,8,16]),import.meta.url))},{id:`php`,name:`PHP`,import:(()=>H(()=>import(`./php-mFFqmEsM.js`),__vite__mapDeps([87,2,3,1,7,8,9,16]),import.meta.url))},{id:`pkl`,name:`Pkl`,import:(()=>H(()=>import(`./pkl-ot-7Btpt.js`),[],import.meta.url))},{id:`plsql`,name:`PL/SQL`,import:(()=>H(()=>import(`./plsql-DGHpHOYJ.js`),[],import.meta.url))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>H(()=>import(`./po-BiJDBrnU.js`),[],import.meta.url))},{id:`polar`,name:`Polar`,import:(()=>H(()=>import(`./polar-C7UOKdEL.js`),[],import.meta.url))},{id:`postcss`,name:`PostCSS`,import:(()=>H(()=>import(`./postcss-BXeXVLqQ.js`),[],import.meta.url))},{id:`powerquery`,name:`PowerQuery`,import:(()=>H(()=>import(`./powerquery-DNMTfnFr.js`),[],import.meta.url))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>H(()=>import(`./powershell-CCSX75yM.js`),[],import.meta.url))},{id:`prisma`,name:`Prisma`,import:(()=>H(()=>import(`./prisma-DMgNhnYS.js`),[],import.meta.url))},{id:`prolog`,name:`Prolog`,import:(()=>H(()=>import(`./prolog-iXnhIJG7.js`),[],import.meta.url))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>H(()=>import(`./proto-DB4EqR-F.js`),[],import.meta.url))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>H(()=>import(`./pug-H1OMV43P.js`),__vite__mapDeps([94,2,3,1]),import.meta.url))},{id:`puppet`,name:`Puppet`,import:(()=>H(()=>import(`./puppet-CDv2pdJW.js`),[],import.meta.url))},{id:`purescript`,name:`PureScript`,import:(()=>H(()=>import(`./purescript-9MfHhQsQ.js`),[],import.meta.url))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>H(()=>import(`./python-gzcpVVnB.js`),[],import.meta.url))},{id:`qml`,name:`QML`,import:(()=>H(()=>import(`./qml-B8D1BoQx.js`),__vite__mapDeps([95,2]),import.meta.url))},{id:`qmldir`,name:`QML Directory`,import:(()=>H(()=>import(`./qmldir-DCQb3MpD.js`),[],import.meta.url))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>H(()=>import(`./qss-Fe1Jh2GI.js`),[],import.meta.url))},{id:`r`,name:`R`,import:(()=>H(()=>import(`./r-DAih_iaQ.js`).then(e=>e.n),[],import.meta.url))},{id:`racket`,name:`Racket`,import:(()=>H(()=>import(`./racket-DcIDlBhZ.js`),[],import.meta.url))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>H(()=>import(`./raku-B3gFvitq.js`),[],import.meta.url))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>H(()=>import(`./razor-BeJgOpe8.js`),__vite__mapDeps([96,1,2,3,78]),import.meta.url))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>H(()=>import(`./rbs-C0MpOrj4.js`),[],import.meta.url))},{id:`reg`,name:`Windows Registry Script`,import:(()=>H(()=>import(`./reg-CRGYupPL.js`),[],import.meta.url))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>H(()=>import(`./regexp-CAppT72h.js`).then(e=>e.n),[],import.meta.url))},{id:`rel`,name:`Rel`,import:(()=>H(()=>import(`./rel-BtDbiS_P.js`),[],import.meta.url))},{id:`riscv`,name:`RISC-V`,import:(()=>H(()=>import(`./riscv-Ckw8ddFX.js`),[],import.meta.url))},{id:`ron`,name:`RON`,import:(()=>H(()=>import(`./ron-VUp2lXgN.js`),[],import.meta.url))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>H(()=>import(`./rosmsg-CAekHB0j.js`),[],import.meta.url))},{id:`rst`,name:`reStructuredText`,import:(()=>H(()=>import(`./rst-RMbVAAkg.js`),__vite__mapDeps([97,2,15,1,3,20,98,25,26,27,22,29,39,34,7,8,16,35,36,11,13,37,38]),import.meta.url))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>H(()=>import(`./ruby-DLm1ZwEN.js`),__vite__mapDeps([34,2,3,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39]),import.meta.url))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>H(()=>import(`./rust-Cfkwpbl8.js`),[],import.meta.url))},{id:`sas`,name:`SAS`,import:(()=>H(()=>import(`./sas-B7ihlrSP.js`),__vite__mapDeps([99,16]),import.meta.url))},{id:`sass`,name:`Sass`,import:(()=>H(()=>import(`./sass-DXrisJhu.js`),[],import.meta.url))},{id:`scala`,name:`Scala`,import:(()=>H(()=>import(`./scala-BiFt_7mu.js`),[],import.meta.url))},{id:`scheme`,name:`Scheme`,import:(()=>H(()=>import(`./scheme-DQCgrYNe.js`),[],import.meta.url))},{id:`scss`,name:`SCSS`,import:(()=>H(()=>import(`./scss-3DF1Is0M.js`).then(e=>e.n),__vite__mapDeps([5,3]),import.meta.url))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>H(()=>import(`./sdbl-bTVj8UrX.js`),[],import.meta.url))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>H(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([100,101]),import.meta.url))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>H(()=>import(`./shellscript-Bq08mUIc.js`).then(e=>e.n),[],import.meta.url))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>H(()=>import(`./shellsession-DJY5846a.js`),__vite__mapDeps([102,29]),import.meta.url))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>H(()=>import(`./smalltalk-BHpQb5nM.js`),[],import.meta.url))},{id:`smithy`,name:`Smithy`,import:(()=>H(()=>import(`./smithy-Dgaz7aur.js`),[],import.meta.url))},{id:`solidity`,name:`Solidity`,import:(()=>H(()=>import(`./solidity-Bj7E1mRn.js`),[],import.meta.url))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>H(()=>import(`./soy-Bkld_lfE.js`),__vite__mapDeps([103,1,2,3]),import.meta.url))},{id:`sparql`,name:`SPARQL`,import:(()=>H(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([104,105]),import.meta.url))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>H(()=>import(`./splunk-BC2Px7Mm.js`),[],import.meta.url))},{id:`sql`,name:`SQL`,import:(()=>H(()=>import(`./sql-B35yhKok.js`).then(e=>e.n),[],import.meta.url))},{id:`ssh-config`,name:`SSH Config`,import:(()=>H(()=>import(`./ssh-config-BgfXC-Er.js`),[],import.meta.url))},{id:`stata`,name:`Stata`,import:(()=>H(()=>import(`./stata-BgW5egxh.js`),__vite__mapDeps([106,16]),import.meta.url))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>H(()=>import(`./stylus-B6D30XZt.js`),[],import.meta.url))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>H(()=>import(`./surrealql-B-aUVDek.js`),__vite__mapDeps([107,2]),import.meta.url))},{id:`svelte`,name:`Svelte`,import:(()=>H(()=>import(`./svelte-C7MrEpG_.js`),__vite__mapDeps([108,2,3,11,12]),import.meta.url))},{id:`swift`,name:`Swift`,import:(()=>H(()=>import(`./swift-CyEgAFGc.js`),[],import.meta.url))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>H(()=>import(`./system-verilog-Dh5ihWbf.js`),[],import.meta.url))},{id:`systemd`,name:`Systemd Units`,import:(()=>H(()=>import(`./systemd-BxMlprV5.js`),[],import.meta.url))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>H(()=>import(`./talonscript-CohzipZa.js`),[],import.meta.url))},{id:`tasl`,name:`Tasl`,import:(()=>H(()=>import(`./tasl-DMoTqEGO.js`),[],import.meta.url))},{id:`tcl`,name:`Tcl`,import:(()=>H(()=>import(`./tcl-CZd0xW_V.js`),[],import.meta.url))},{id:`templ`,name:`Templ`,import:(()=>H(()=>import(`./templ-CUYQL3Op.js`),__vite__mapDeps([109,2,3,81]),import.meta.url))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>H(()=>import(`./terraform-DswuEJGm.js`),[],import.meta.url))},{id:`tex`,name:`TeX`,import:(()=>H(()=>import(`./tex-Dbrd9bB3.js`).then(e=>e.n),__vite__mapDeps([67,63]),import.meta.url))},{id:`toml`,name:`TOML`,import:(()=>H(()=>import(`./toml-CcmNWLt0.js`),[],import.meta.url))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>H(()=>import(`./ts-tags-wpbSYL5U.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22]),import.meta.url))},{id:`tsv`,name:`TSV`,import:(()=>H(()=>import(`./tsv-sltzmVWM.js`),[],import.meta.url))},{id:`tsx`,name:`TSX`,import:(()=>H(()=>import(`./tsx-B8rF--RV.js`).then(e=>e.n),[],import.meta.url))},{id:`turtle`,name:`Turtle`,import:(()=>H(()=>import(`./turtle-ByJddavk.js`),[],import.meta.url))},{id:`twig`,name:`Twig`,import:(()=>H(()=>import(`./twig-CpaRBIem.js`),__vite__mapDeps([111,2,3,5,20,34,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39,87,9]),import.meta.url))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>H(()=>import(`./typescript-cqbK9R71.js`).then(e=>e.n),[],import.meta.url))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>H(()=>import(`./typespec-BRdr0IET.js`),[],import.meta.url))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>H(()=>import(`./typst-BUVX7J-L.js`),__vite__mapDeps([112,2,3,1,5,8,7,9,11,13,113,114,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,44,48,50,81,82,54,83,115,63,62,65,66,67,70,116,84,85,87,88,89,90,91,93,117,94,118,119,111,120]),import.meta.url))},{id:`v`,name:`V`,import:(()=>H(()=>import(`./v-DBj4K9d_.js`),[],import.meta.url))},{id:`vala`,name:`Vala`,import:(()=>H(()=>import(`./vala-zf12oZj6.js`),[],import.meta.url))},{id:`vb`,name:`Visual Basic`,import:(()=>H(()=>import(`./vb-DOwzaHZ0.js`),[],import.meta.url))},{id:`verilog`,name:`Verilog`,import:(()=>H(()=>import(`./verilog-B2gwz-sJ.js`),[],import.meta.url))},{id:`vhdl`,name:`VHDL`,import:(()=>H(()=>import(`./vhdl-BroJfC0k.js`),[],import.meta.url))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>H(()=>import(`./viml-DvXPmvsu.js`),[],import.meta.url))},{id:`vue`,name:`Vue`,import:(()=>H(()=>import(`./vue-B3rM_CiH.js`),__vite__mapDeps([121,2,3,1,9,11,15]),import.meta.url))},{id:`vue-html`,name:`Vue HTML`,import:(()=>H(()=>import(`./vue-html-uBxsJ3nV.js`),__vite__mapDeps([122,2]),import.meta.url))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>H(()=>import(`./vue-vine-CH44uMD8.js`),__vite__mapDeps([123,2,3,5,12,70,124]),import.meta.url))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>H(()=>import(`./vyper-CgoNMtux.js`),[],import.meta.url))},{id:`wasm`,name:`WebAssembly`,import:(()=>H(()=>import(`./wasm-ByWQv1Qj.js`),[],import.meta.url))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>H(()=>import(`./wenyan-C8pVoKbM.js`),[],import.meta.url))},{id:`wgsl`,name:`WGSL`,import:(()=>H(()=>import(`./wgsl-BsKzXJz4.js`),[],import.meta.url))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>H(()=>import(`./wikitext-ClFFjSW2.js`),[],import.meta.url))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>H(()=>import(`./wit-DdvCle-K.js`),[],import.meta.url))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>H(()=>import(`./wolfram-DLL8P-h_.js`),[],import.meta.url))},{id:`xml`,name:`XML`,import:(()=>H(()=>import(`./xml-BnoqKVtb.js`).then(e=>e.n),__vite__mapDeps([7,8]),import.meta.url))},{id:`xsl`,name:`XSL`,import:(()=>H(()=>import(`./xsl-r6Si1Xjc.js`),__vite__mapDeps([93,7,8]),import.meta.url))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>H(()=>import(`./yaml-tinlnfn7.js`).then(e=>e.n),[],import.meta.url))},{id:`zenscript`,name:`ZenScript`,import:(()=>H(()=>import(`./zenscript-BnlCZFoB.js`),[],import.meta.url))},{id:`zig`,name:`Zig`,import:(()=>H(()=>import(`./zig-CMLA9XwU.js`),[],import.meta.url))}],Ye=Object.fromEntries(Je.map(e=>[e.id,e.import])),Xe=Object.fromEntries(Je.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Ze={...Ye,...Xe},Qe=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>H(()=>import(`./andromeeda-vGVdxbeo.js`),[],import.meta.url))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>H(()=>import(`./aurora-x-CDeNXAV0.js`),[],import.meta.url))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>H(()=>import(`./ayu-dark-DluEY0Gj.js`),[],import.meta.url))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>H(()=>import(`./ayu-light-C3h-C4tm.js`),[],import.meta.url))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>H(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[],import.meta.url))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>H(()=>import(`./catppuccin-frappe-C9Q5zVZY.js`),[],import.meta.url))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>H(()=>import(`./catppuccin-latte-CtsyrtPq.js`),[],import.meta.url))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>H(()=>import(`./catppuccin-macchiato-R8nAf1vR.js`),[],import.meta.url))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>H(()=>import(`./catppuccin-mocha-DjuaAJKi.js`),[],import.meta.url))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>H(()=>import(`./dark-plus-Cs2F2srj.js`),[],import.meta.url))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>H(()=>import(`./dracula-BHWKrbxM.js`),[],import.meta.url))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>H(()=>import(`./dracula-soft-5eyTD99u.js`),[],import.meta.url))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>H(()=>import(`./everforest-dark-sB-x3p7T.js`),[],import.meta.url))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>H(()=>import(`./everforest-light-Df2xbC6M.js`),[],import.meta.url))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>H(()=>import(`./github-dark-C-LZuMrd.js`),[],import.meta.url))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>H(()=>import(`./github-dark-default-DXG-b-1a.js`),[],import.meta.url))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>H(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[],import.meta.url))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>H(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[],import.meta.url))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>H(()=>import(`./github-light-EUqPIrTm.js`),[],import.meta.url))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>H(()=>import(`./github-light-default-BXViO-2h.js`),[],import.meta.url))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>H(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[],import.meta.url))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>H(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[],import.meta.url))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>H(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[],import.meta.url))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>H(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[],import.meta.url))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>H(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[],import.meta.url))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>H(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[],import.meta.url))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>H(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[],import.meta.url))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>H(()=>import(`./horizon-CE9ld1lL.js`),[],import.meta.url))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>H(()=>import(`./horizon-bright-DSNQnXHK.js`),[],import.meta.url))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>H(()=>import(`./houston-CsvMBhTu.js`),[],import.meta.url))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>H(()=>import(`./kanagawa-dragon-Bozd7klA.js`),[],import.meta.url))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>H(()=>import(`./kanagawa-lotus-BmuOG9ZW.js`),[],import.meta.url))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>H(()=>import(`./kanagawa-wave-BML5mF2J.js`),[],import.meta.url))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>H(()=>import(`./laserwave-C_8bwKvT.js`),[],import.meta.url))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>H(()=>import(`./light-plus-DVQuIRkW.js`),[],import.meta.url))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>H(()=>import(`./material-theme-Bm3Qr25_.js`),[],import.meta.url))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>H(()=>import(`./material-theme-darker-2IIEA8gg.js`),[],import.meta.url))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>H(()=>import(`./material-theme-lighter-uhdI0v04.js`),[],import.meta.url))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>H(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[],import.meta.url))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>H(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[],import.meta.url))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>H(()=>import(`./min-dark-BSWPekZh.js`),[],import.meta.url))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>H(()=>import(`./min-light-DDpmG2fV.js`),[],import.meta.url))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>H(()=>import(`./monokai-B_bV9PQ9.js`),[],import.meta.url))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>H(()=>import(`./night-owl-DhmEMT88.js`),[],import.meta.url))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>H(()=>import(`./night-owl-light-eJ-hLW7d.js`),[],import.meta.url))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>H(()=>import(`./nord-Cb4Vim4T.js`),[],import.meta.url))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>H(()=>import(`./one-dark-pro-CLwyXe_n.js`),[],import.meta.url))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>H(()=>import(`./one-light-D7Lr4KcI.js`),[],import.meta.url))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>H(()=>import(`./plastic-DQwYfKfQ.js`),[],import.meta.url))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>H(()=>import(`./poimandres-DRFjx7u4.js`),[],import.meta.url))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>H(()=>import(`./red-DX1BQOs8.js`),[],import.meta.url))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>H(()=>import(`./rose-pine-aMsaMD1D.js`),[],import.meta.url))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>H(()=>import(`./rose-pine-dawn-8PwUyIlP.js`),[],import.meta.url))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>H(()=>import(`./rose-pine-moon-DO-qXg-I.js`),[],import.meta.url))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>H(()=>import(`./slack-dark-DnToyrRv.js`),[],import.meta.url))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>H(()=>import(`./slack-ochin-B2OO5cIa.js`),[],import.meta.url))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>H(()=>import(`./snazzy-light-4G7pJPwS.js`),[],import.meta.url))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>H(()=>import(`./solarized-dark-UdsmMDCL.js`),[],import.meta.url))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>H(()=>import(`./solarized-light-C1IUL_tW.js`),[],import.meta.url))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>H(()=>import(`./synthwave-84-nFMaYfgc.js`),[],import.meta.url))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>H(()=>import(`./tokyo-night-oM2G3aXe.js`),[],import.meta.url))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>H(()=>import(`./vesper-DdrHHSXu.js`),[],import.meta.url))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>H(()=>import(`./vitesse-black-fwtXNY1n.js`),[],import.meta.url))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>H(()=>import(`./vitesse-dark-BZCL-v6S.js`),[],import.meta.url))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>H(()=>import(`./vitesse-light-VbXTXTou.js`),[],import.meta.url))}].map(e=>[e.id,e.import])),$e=s({createOnigurumaEngine:()=>Dt,getDefaultWasmLoader:()=>Et,loadWasm:()=>bt,setDefaultWasmLoader:()=>Tt}),et=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function tt(){return 2147483648}function nt(){return typeof performance<`u`?performance.now():Date.now()}var rt=(e,t)=>e+(t-e%t)%t;async function it(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=tt();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,rt(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:nt,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var at=Object.defineProperty,ot=(e,t,n)=>t in e?at(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,st=(e,t,n)=>ot(e,typeof t==`symbol`?t:t+``,n),ct=null;function lt(e){throw new et(e.UTF8ToString(e.getLastOnigError()))}var ut=class e{constructor(t){st(this,`utf16Length`),st(this,`utf8Length`),st(this,`utf16Value`),st(this,`utf8Value`),st(this,`utf16OffsetToUtf8`),st(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},dt=class e{constructor(t){if(st(this,`id`,++e.LAST_ID),st(this,`_onigBinding`),st(this,`content`),st(this,`utf16Length`),st(this,`utf8Length`),st(this,`utf16OffsetToUtf8`),st(this,`utf8OffsetToUtf16`),st(this,`ptr`),!ct)throw new et(`Must invoke loadWasm first.`);this._onigBinding=ct,this.content=t;let n=new ut(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=ct.omalloc(1e4),e._sharedPtrInUse=!0,ct.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(ct)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};st(dt,`LAST_ID`,0),st(dt,`_sharedPtr`,0),st(dt,`_sharedPtrInUse`,!1);var ft=dt,pt=class{constructor(e){if(st(this,`_onigBinding`),st(this,`_ptr`),!ct)throw new et(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new ut(e[r]);t[r]=i.createString(ct),n[r]=i.utf8Length}let r=ct.omalloc(4*e.length);ct.HEAPU32.set(t,r/4);let i=ct.omalloc(4*e.length);ct.HEAPU32.set(n,i/4);let a=ct.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)ct.ofree(t[n]);ct.ofree(i),ct.ofree(r),a===0&<(ct),this._onigBinding=ct,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new ft(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function mt(e){return typeof e.instantiator==`function`}function ht(e){return typeof e.default==`function`}function gt(e){return e.data!==void 0}function _t(e){return typeof Response<`u`&&e instanceof Response}function vt(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}var yt;function bt(e){if(yt)return yt;async function t(){ct=await it(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),mt(n)?n=await n.instantiator(t):ht(n)?n=await n.default(t):(gt(n)&&(n=n.data),_t(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await St(n)(t):await Ct(n)(t):vt(n)||n instanceof WebAssembly.Module?n=await xt(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await xt(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return yt=t(),yt}function xt(e){return t=>WebAssembly.instantiate(e,t)}function St(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Ct(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var wt;function Tt(e){wt=e}function Et(){return wt}async function Dt(e){return e&&await bt(e),{createScanner(e){return new pt(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new ft(e)}}}var Ot=He({});We(Ot,$e);var kt=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function At(e){return jt(e)}function jt(e){return Array.isArray(e)?Mt(e):e instanceof RegExp?e:typeof e==`object`?Nt(e):e}function Mt(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=jt(e[n]);return t}function Nt(e){let t={};for(let n in e)t[n]=jt(e[n]);return t}function Pt(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Ft(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Ft(e.substring(0,e.length-1)):e.substr(~t+1)}var It=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Lt=class{static hasCaptures(e){return e!==null&&(It.lastIndex=0,It.test(e))}static replaceCaptures(e,t,n){return e.replace(It,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Rt(e,t){return e<t?-1:+(e>t)}function zt(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Rt(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Bt(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 Vt(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Ht=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Ut=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Jt(e),t)}static createFromParsedTheme(e,t){return Zt(e,t)}_cachedMatchRoot=new Ht(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>Gt(e.parent,t.parentScopes));return n?new qt(n.fontStyle,n.foreground,n.background):null}},Wt=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function Gt(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Kt(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Kt(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var qt=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Jt(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&Bt(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Bt(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new Yt(l,u,e,o,s,c)}}return n}var Yt=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},Xt=(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))(Xt||{});function Zt(e,t){e.sort((e,t)=>{let n=Rt(e.scope,t.scope);return n!==0||(n=zt(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new Qt(t),o=new qt(n,a.getId(r),a.getId(i)),s=new tn(new en(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Ut(a,o,s)}var Qt=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 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)}},$t=Object.freeze([]),en=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||$t,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},tn=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),en.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(zt(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new en(e,t,n,r,i))}},nn=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=an(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function rn(e){return e}function an(e){return e}function on(e,t){let n=[],r=cn(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(sn(i)){let e=[];do e.push(i),i=r.next();while(sn(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function sn(e){return!!e&&!!e.match(/[\w\.:]+/)}function cn(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function ln(e){typeof e.dispose==`function`&&e.dispose()}var un=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},dn=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},fn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},pn=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new un(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new fn;for(let n of e)mn(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof un){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function mn(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof un?gn({baseGrammar:a,selfGrammar:i},r):hn(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new un(e))}function hn(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];_n([r],t,n)}}function gn(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&_n(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&_n(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function _n(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Pt({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&_n(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Cn(i);switch(a.kind){case 0:gn({...t,selfGrammar:t.baseGrammar},n);break;case 1:gn(t,n);break;case 2:hn(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?hn(a.ruleName,i,n):gn(i,n)}else a.kind===4?n.add(new dn(a.scopeName,a.ruleName)):n.add(new un(a.scopeName))}}}var vn=class{kind=0},yn=class{kind=1},bn=class{constructor(e){this.ruleName=e}kind=2},xn=class{constructor(e){this.scopeName=e}kind=3},Sn=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Cn(e){if(e===`$base`)return new vn;if(e===`$self`)return new yn;let t=e.indexOf(`#`);return t===-1?new xn(e):t===0?new bn(e.substring(1)):new Sn(e.substring(0,t),e.substring(t+1))}var wn=/\\(\d+)/,Tn=/\\(\d+)/g,En=-1,Dn=-2;function On(e){return e}function kn(e){return e}var An=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Lt.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Lt.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Ft(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:Lt.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Lt.replaceCaptures(this._contentName,e,t)}},jn=class extends An{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},Mn=class extends An{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Ln(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),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,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Rn,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Nn=class extends An{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Rn,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Pn=class extends An{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Ln(i,this.id),this.beginCaptures=a,this._end=new Ln(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),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,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Rn;for(let t of this.patterns)e.getRule(t).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}},Fn=class extends An{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Ln(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Ln(o,Dn),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),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,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Rn;for(let 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,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Rn,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},In=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new jn(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Mn(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Pt({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Nn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Fn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Pn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Cn(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Nn||e instanceof Pn||e instanceof Fn)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Ln=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&wn.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return Tn.lastIndex=0,this.source.replace(Tn,(e,t)=>Vt(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Rn=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(),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(e=>e.source);this._cached=new zn(e,t,this._items.map(e=>e.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){return new zn(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},zn=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(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
3
3
|
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Bn=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Vn=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Bn(e,8),this._embeddedLanguagesMatcher=new Hn(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Bn(0,0);_getBasicScopeAttributes=new Ht(e=>new Bn(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.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 Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Hn=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>Vt(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var Un=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Wn(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Gn(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new Un(i,!0);f()}return new Un(i,!1);function f(){let o=Kn(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===En){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),Zn(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof Pn){let r=o;Zn(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof Fn){let r=o;Zn(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(Zn(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function Gn(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof Fn&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=Xn(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==Dn){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),Zn(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function Kn(e,t,n,r,i,a){let o=qn(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=Jn(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function qn(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Yn(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Jn(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=Yn(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function Yn(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function Xn(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Zn(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));Wn(e,p,n&&d.start===0,d.start,f,i,!1,0),ln(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new Qn(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Qn=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function $n(e,t,n,r,i,a,o,s){return new rr(e,t,n,r,i,a,o,s)}function er(e,t,n,r,i){let a=on(t,tr),o=In.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function tr(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(nr(t[r],e))return n=r+1,!0;return!1})}function nr(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var rr=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new Vn(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=ir(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=on(e,tr);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let 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(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)er(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&er(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(On(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[kn(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=ir(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=In.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===or.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=nn.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?ar.createRootAndLookUpScopeName(a,r,this):ar.createRoot(`unknown`,r),t=new or(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
4
4
|
`;let a=this.createOnigString(e),o=a.content.length,s=new cr(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Wn(this,a,i,0,t,s,!0,r);return ln(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function ir(e,t){return e=At(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 ar=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=Wt.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Wt(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Wt(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),nn.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},or=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?ar.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:kn(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){let r=ar.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,On(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,ar.fromExtension(r,n.contentNameScopesList))}},sr=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):on(e,tr).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>on(e,tr).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},cr=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,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 n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=nn.set(n,0,rn(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=nn.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let 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);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},lr=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let 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,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,$n(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},ur=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new lr(Ut.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Ut.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new sr(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new pn(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},dr=or.NULL;function fr(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function pr(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function mr(e){return Array.isArray(e)?e:[e]}async function hr(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function gr(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function _r(e){return e===`ansi`||gr(e)}function vr(e){return e===`none`}function yr(e){return vr(e)}var br=/(\r?\n)/g;function xr(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(br),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var Sr={light:`#333333`,dark:`#bbbbbb`},Cr={light:`#fffffe`,dark:`#1e1e1e`},wr=`__shiki_resolved`;function Tr(e){if(e?.[wr])return e;let 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:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?Sr.light:Sr.dark,n||=t.type===`light`?Cr.light:Cr.dark,t.fg=r,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 i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,wr,{enumerable:!1,writable:!1,value:!0}),t}async function Er(e){return[...new Set((await Promise.all(e.filter(e=>!_r(e)).map(async e=>await hr(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function Dr(e){return(await Promise.all(e.map(async e=>yr(e)?null:Tr(await hr(e))))).filter(e=>!!e)}function Or(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new kt(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var kr=class extends ur{_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,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=Tr(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Ut.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Or(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new kt(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return 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);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},Ar=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}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){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},jr=0;function Mr(e){jr+=1,e.warnings!==!1&&jr>=10&&jr%10==0&&console.warn(`[Shiki] ${jr} 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 kt("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Tr),i=new kr(new Ar(e.engine,n),r,n,e.langAlias),a;function o(t){return Or(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new kt(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new kt(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await Er(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await Dr(e))}function g(){if(t)throw new kt(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--jr)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function Nr(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Dr(e.themes||[]),Er(e.langs||[]),e.engine]);return Mr({...e,themes:t,langs:n,engine:r})}var Pr=new WeakMap;function Fr(e,t){Pr.set(e,t)}function Ir(e){return Pr.get(e)}var Lr=class e{_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 e(Object.fromEntries(mr(n).map(e=>[e,dr])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Rr(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Rr(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function zr(e,t){if(!(e instanceof Lr))throw new kt(`Invalid grammar state`);return e.getInternalStack(t)}var Br=/,/,Vr=/ /;function Hr(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(gr(e.resolveLangAlias(n.lang||`text`))||vr(r))return xr(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new kt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new kt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Wr(t,o,i,a,n)}function Ur(...e){if(e.length===2)return Ir(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(gr(i)||vr(a))throw new kt(`Plain language does not have grammar state`);if(i===`ansi`)throw new kt(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new Lr(Gr(n,c,o,s,r).stateStack,c.name,o.name)}function Wr(e,t,n,r,i){let a=Gr(e,t,n,r,i),o=new Lr(a.stateStack,t.name,n.name);return Fr(a.tokens,o),a.tokens}function Gr(e,t,n,r,i){let a=fr(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=xr(e),u=i.grammarState?zr(i.grammarState,n.name)??dr:i.grammarContextCode==null?dr:Gr(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=pr(r[nn.getForeground(s)],a),u=nn.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=nn.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(Br).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(Vr))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?Kr(t.scopes):qr(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function Kr(e){return e.map(e=>({scopeName:e}))}function qr(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:Xr(e,i,t.slice(0,r))}}return n}function Jr(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function Yr(e,t,n){if(!Jr(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Jr(e[r],n[i])&&--r,--i;return r===-1}function Xr(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(Yr(e,t,n)){r.push(a);break}return r}function Zr(e,t,n,r=Hr){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:Ir(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=Qr(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new Lr(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&Fr(s,c),s}function Qr(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var $r=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],ei=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};ei.prototype.normal={},ei.prototype.property={},ei.prototype.space=void 0;function ti(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new ei(n,r,t)}function ni(e){return e.toLowerCase()}var ri=class{constructor(e,t){this.attribute=t,this.property=e}};ri.prototype.attribute=``,ri.prototype.booleanish=!1,ri.prototype.boolean=!1,ri.prototype.commaOrSpaceSeparated=!1,ri.prototype.commaSeparated=!1,ri.prototype.defined=!1,ri.prototype.mustUseProperty=!1,ri.prototype.number=!1,ri.prototype.overloadedBoolean=!1,ri.prototype.property=``,ri.prototype.spaceSeparated=!1,ri.prototype.space=void 0;var ii=s({boolean:()=>oi,booleanish:()=>si,commaOrSpaceSeparated:()=>di,commaSeparated:()=>ui,number:()=>U,overloadedBoolean:()=>ci,spaceSeparated:()=>li}),ai=0,oi=fi(),si=fi(),ci=fi(),U=fi(),li=fi(),ui=fi(),di=fi();function fi(){return 2**++ai}var pi=Object.keys(ii),mi=class extends ri{constructor(e,t,n,r){let i=-1;if(super(e,t),hi(this,`space`,r),typeof n==`number`)for(;++i<pi.length;){let e=pi[i];hi(this,pi[i],(n&ii[e])===ii[e])}}};mi.prototype.defined=!0;function hi(e,t,n){n&&(e[t]=n)}function gi(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new mi(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ni(r)]=r,n[ni(a.attribute)]=r}return new ei(t,n,e.space)}var _i=gi({properties:{ariaActiveDescendant:null,ariaAtomic:si,ariaAutoComplete:null,ariaBusy:si,ariaChecked:si,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:li,ariaCurrent:null,ariaDescribedBy:li,ariaDetails:null,ariaDisabled:si,ariaDropEffect:li,ariaErrorMessage:null,ariaExpanded:si,ariaFlowTo:li,ariaGrabbed:si,ariaHasPopup:null,ariaHidden:si,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:li,ariaLevel:U,ariaLive:null,ariaModal:si,ariaMultiLine:si,ariaMultiSelectable:si,ariaOrientation:null,ariaOwns:li,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:si,ariaReadOnly:si,ariaRelevant:null,ariaRequired:si,ariaRoleDescription:li,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:si,ariaSetSize:U,ariaSort:null,ariaValueMax:U,ariaValueMin:U,ariaValueNow:U,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function vi(e,t){return t in e?e[t]:t}function yi(e,t){return vi(e,t.toLowerCase())}var bi=gi({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:ui,acceptCharset:li,accessKey:li,action:null,allow:null,allowFullScreen:oi,allowPaymentRequest:oi,allowUserMedia:oi,alpha:oi,alt:null,as:null,async:oi,autoCapitalize:null,autoComplete:li,autoFocus:oi,autoPlay:oi,blocking:li,capture:null,charSet:null,checked:oi,cite:null,className:li,closedBy:null,colorSpace:null,cols:U,colSpan:U,command:null,commandFor:null,content:null,contentEditable:si,controls:oi,controlsList:li,coords:U|ui,crossOrigin:null,data:null,dateTime:null,decoding:null,default:oi,defer:oi,dir:null,dirName:null,disabled:oi,download:ci,draggable:si,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:oi,formTarget:null,headers:li,height:U,hidden:ci,high:U,href:null,hrefLang:null,htmlFor:li,httpEquiv:li,id:null,imageSizes:null,imageSrcSet:null,inert:oi,inputMode:null,integrity:null,is:null,isMap:oi,itemId:null,itemProp:li,itemRef:li,itemScope:oi,itemType:li,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:oi,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:oi,muted:oi,name:null,nonce:null,noModule:oi,noValidate:oi,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:oi,optimum:U,pattern:null,ping:li,placeholder:null,playsInline:oi,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:oi,referrerPolicy:null,rel:li,required:oi,reversed:oi,rows:U,rowSpan:U,sandbox:li,scope:null,scoped:oi,seamless:oi,selected:oi,shadowRootClonable:oi,shadowRootCustomElementRegistry:oi,shadowRootDelegatesFocus:oi,shadowRootMode:null,shadowRootSerializable:oi,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:si,src:null,srcDoc:null,srcLang:null,srcSet:null,start:U,step:null,style:null,tabIndex:U,target:null,title:null,translate:null,type:null,typeMustMatch:oi,useMap:null,value:si,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:li,axis:null,background:null,bgColor:null,border:U,borderColor:null,bottomMargin:U,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:oi,declare:oi,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:oi,noHref:oi,noShade:oi,noWrap:oi,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:si,standby:null,summary:null,text:null,topMargin:U,valueType:null,version:null,vAlign:null,vLink:null,vSpace:U,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:oi,disablePictureInPicture:oi,disableRemotePlayback:oi,exportParts:ui,part:li,prefix:null,property:null,results:U,security:null,unselectable:null},space:`html`,transform:yi}),xi=gi({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:di,accentHeight:U,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:U,amplitude:U,arabicForm:null,ascent:U,attributeName:null,attributeType:null,azimuth:U,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:U,by:null,calcMode:null,capHeight:U,className:li,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:U,diffuseConstant:U,direction:null,display:null,dur:null,divisor:U,dominantBaseline:null,download:oi,dx:null,dy:null,edgeMode:null,editable:null,elevation:U,enableBackground:null,end:null,event:null,exponent:U,externalResourcesRequired:null,fill:null,fillOpacity:U,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:ui,g2:ui,glyphName:ui,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:U,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:U,horizOriginX:U,horizOriginY:U,id:null,ideographic:U,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:U,k:U,k1:U,k2:U,k3:U,k4:U,kernelMatrix:di,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:U,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:U,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:U,overlineThickness:U,paintOrder:null,panose1:null,path:null,pathLength:U,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:li,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:di,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:di,rev:di,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:di,requiredFeatures:di,requiredFonts:di,requiredFormats:di,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:U,specularExponent:U,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:U,strikethroughThickness:U,string:null,stroke:null,strokeDashArray:di,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:U,strokeOpacity:U,strokeWidth:null,style:null,surfaceScale:U,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:di,tabIndex:U,tableValues:null,target:null,targetX:U,targetY:U,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:di,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:U,underlineThickness:U,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:U,values:null,vAlphabetic:U,vMathematical:U,vectorEffect:null,vHanging:U,vIdeographic:U,version:null,vertAdvY:U,vertOriginX:U,vertOriginY:U,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:U,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:vi}),Si=gi({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()}}),Ci=gi({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:yi}),wi=gi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Ti={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`},Ei=/[A-Z]/g,Di=/-[a-z]/g,Oi=/^data[-\w.:]+$/i;function ki(e,t){let n=ni(t),r=t,i=ri;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Oi.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Di,ji);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Di.test(e)){let n=e.replace(Ei,Ai);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=mi}return new i(r,t)}function Ai(e){return`-`+e.toLowerCase()}function ji(e){return e.charAt(1).toUpperCase()}var Mi=ti([_i,bi,Si,Ci,wi],`html`),Ni=ti([_i,xi,Si,Ci,wi],`svg`),Pi={}.hasOwnProperty;function Fi(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Pi.call(t,e)){let n=String(t[e]);i=Pi.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Ii=/["&'<>`]/g,Li=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ri=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,zi=/[|\\{}()[\]^$+*?.]/g,Bi=new WeakMap;function Vi(e,t){if(e=e.replace(t.subset?Hi(t.subset):Ii,r),t.subset||t.escapeOnly)return e;return e.replace(Li,n).replace(Ri,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Hi(e){let t=Bi.get(e);return t||(t=Ui(e),Bi.set(e,t)),t}function Ui(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(zi,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Wi=/[\dA-Fa-f]/;function Gi(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Wi.test(String.fromCharCode(t))?r:r+`;`}var Ki=/\d/;function qi(e,t,n){let r=`&#`+String(e);return n&&t&&!Ki.test(String.fromCharCode(t))?r:r+`;`}var Ji=`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`.split(`.`),Yi={nbsp:`\xA0`,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:`€`},Xi=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],Zi={}.hasOwnProperty,Qi={},$i;for($i in Yi)Zi.call(Yi,$i)&&(Qi[Yi[$i]]=$i);var ea=/[^\dA-Za-z]/;function ta(e,t,n,r){let i=String.fromCharCode(e);if(Zi.call(Qi,i)){let e=Qi[i],a=`&`+e;return n&&Ji.includes(e)&&!Xi.includes(e)&&(!r||t&&t!==61&&ea.test(String.fromCharCode(t)))?a:a+`;`}return``}function na(e,t,n){let r=Gi(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=ta(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=qi(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function ra(e,t){return Vi(e,Object.assign({format:na},t))}var ia=/^>|^->|<!--|-->|--!>|<!-$/g,aa=[`>`],oa=[`<`,`>`];function sa(e,t,n,r){return r.settings.bogusComments?`<?`+ra(e.value,Object.assign({},r.settings.characterReferences,{subset:aa}))+`>`:`<!--`+e.value.replace(ia,i)+`-->`;function i(e){return ra(e,Object.assign({},r.settings.characterReferences,{subset:oa}))}}function ca(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function la(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function ua(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function da(e){return e.join(` `).trim()}var fa=/[ \t\n\f\r]/g;function pa(e){return typeof e==`object`?e.type===`text`&&ma(e.value):ma(e)}function ma(e){return e.replace(fa,``)===``}var ha=va(1),ga=va(-1),_a=[];function va(e){return t;function t(t,n,r){let i=t?t.children:_a,a=(n||0)+e,o=i[a];if(!r)for(;o&&pa(o);)a+=e,o=i[a];return o}}var ya={}.hasOwnProperty;function ba(e){return t;function t(t,n,r){return ya.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var xa=ba({body:wa,caption:Sa,colgroup:Sa,dd:Oa,dt:Da,head:Sa,html:Ca,li:Ea,optgroup:Aa,option:ja,p:Ta,rp:ka,rt:ka,tbody:Na,td:Ia,tfoot:Pa,th:Ia,thead:Ma,tr:Fa});function Sa(e,t,n){let r=ha(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&pa(r.value.charAt(0)))}function Ca(e,t,n){let r=ha(n,t);return!r||r.type!==`comment`}function wa(e,t,n){let r=ha(n,t);return!r||r.type!==`comment`}function Ta(e,t,n){let r=ha(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.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 Ea(e,t,n){let r=ha(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Da(e,t,n){let r=ha(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function Oa(e,t,n){let r=ha(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function ka(e,t,n){let r=ha(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Aa(e,t,n){let r=ha(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function ja(e,t,n){let r=ha(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Ma(e,t,n){let r=ha(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function Na(e,t,n){let r=ha(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function Pa(e,t,n){return!ha(n,t)}function Fa(e,t,n){let r=ha(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Ia(e,t,n){let r=ha(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var La=ba({body:Ba,colgroup:Va,head:za,html:Ra,tbody:Ha});function Ra(e){let t=ha(e,-1);return!t||t.type!==`comment`}function za(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function Ba(e){let t=ha(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&pa(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function Va(e,t,n){let r=ga(n,t),i=ha(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&xa(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Ha(e,t,n){let r=ga(n,t),i=ha(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&xa(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Ua={name:[[`
|
|
5
5
|
\f\r &/=>`.split(``),`
|
|
@@ -1591,50 +1591,50 @@ Error generating stack: `+e.message+`
|
|
|
1591
1591
|
|
|
1592
1592
|
`)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=yb,c=!hx.jitless,l=c&&bb.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?GC([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function JC(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!zb(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Wb(e,r,gx())))}),t)}var YC=G(`$ZodUnion`,(e,t)=>{KS.init(e,t),ax(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),ax(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),ax(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),ax(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>ob(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>JC(t,r,e,i)):JC(o,r,e,i)}});function XC(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var ZC=G(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,YC.init(e,t);let n=e._zod.parse;ax(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||cb(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=lb(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=ib(()=>XC(t));e._zod.parse=(i,a)=>{let o=i.value;if(!yb(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),QC=G(`$ZodIntersection`,(e,t)=>{KS.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>ew(e,t,n)):ew(e,i,a)}});function $C(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(xb(e)&&xb(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=$C(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=$C(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ew(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=$C(t.value,n.value);if(!c.valid){if(zb(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var tw=G(`$ZodRecord`,(e,t)=>{KS.init(e,t);let n=hx.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!xb(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Wb(e,i,gx())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...Vb(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...Vb(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&xS.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>Wb(e,i,gx())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...Vb(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...Vb(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),nw=G(`$ZodEnum`,(e,t)=>{KS.init(e,t);let n=eb(t.entries),r=new Set(n);e._zod.values=r,ax(e,`pattern`,e=>{let t=eb(e.def.entries).filter(e=>Cb.has(typeof e));return RegExp(t.length?`^(${t.map(e=>wb(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),rw=G(`$ZodLiteral`,(e,t)=>{KS.init(e,t);let n=new Set(t.values);e._zod.values=n,ax(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?wb(e):e?wb(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),iw=G(`$ZodTransform`,(e,t)=>{KS.init(e,t),e._zod.optin=`optional`,hx.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new mx(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new px;return n.value=i,n}});function aw(e,t){return e.value=t.issues.length?void 0:t.value,e}var ow=G(`$ZodOptional`,(e,t)=>{KS.init(e,t),ax(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,ax(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),ax(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ob(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>aw(e,t)):aw(e,r)}return t.innerType._zod.run(e,n)}}),sw=G(`$ZodExactOptional`,(e,t)=>{ow.init(e,t),ax(e,`values`,e=>e.def.innerType._zod.values),ax(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),cw=G(`$ZodNullable`,(e,t)=>{KS.init(e,t),ax(e,`optin`,e=>e.def.innerType._zod.optin),ax(e,`optout`,e=>e.def.innerType._zod.optout),ax(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ob(t.source)}|null)$`):void 0}),ax(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),lw=G(`$ZodDefault`,(e,t)=>{KS.init(e,t),e._zod.optin=`defaulted`,ax(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>uw(e,t)):uw(r,t)}});function uw(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var dw=G(`$ZodPrefault`,(e,t)=>{KS.init(e,t),e._zod.optin=`defaulted`,ax(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),fw=G(`$ZodNonOptional`,(e,t)=>{KS.init(e,t),ax(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>pw(t,e)):pw(i,e)}});function pw(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function mw(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Wb(e,r,gx()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var hw=G(`$ZodCatch`,(e,t)=>{KS.init(e,t),ax(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),ax(e,`optout`,e=>e.def.innerType._zod.optout),ax(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>mw(e,r,t,n)):mw(e,r,t,n)}}),gw=G(`$ZodPipe`,(e,t)=>{KS.init(e,t),ax(e,`values`,e=>e.def.in._zod.values),ax(e,`optin`,e=>e.def.in._zod.optin),ax(e,`optout`,e=>e.def.out._zod.optout),ax(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>_w(e,t.in,n)):_w(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>_w(e,t.out,n)):_w(r,t.out,n)}});function _w(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var vw=G(`$ZodReadonly`,(e,t)=>{KS.init(e,t),ax(e,`propValues`,e=>e.def.innerType._zod.propValues),ax(e,`values`,e=>e.def.innerType._zod.values),ax(e,`optin`,e=>e.def.innerType?._zod?.optin),ax(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(yw):yw(r)}});function yw(e){return e.memo||(e.value=Object.freeze(e.value)),e}var bw=G(`$ZodCustom`,(e,t)=>{ES.init(e,t),KS.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>xw(t,n,r,e));xw(i,n,r,e)}});function xw(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Yb(e))}}var Sw=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Cw=`~memo`,ww=[];function Tw(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function Ew(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Dw=new WeakMap,Ow=0,kw=1,Aw=2;function jw(e,t,n){let r=Dw.get(e);if(r!==void 0)return r?Aw:Ow;if(t.has(e))return Aw;t.add(e);let i=Ow,a=e=>{if(i!==Aw&&e?._zod){let r=jw(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Ow;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?kw:o.value?._zod?jw(o.value,t,n):Ow;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=lb(c);s(e?o(e,!0):kw),a(c.catchall);break}case`properties`:s(o(c.shape,!1));break;case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?jw(r,t,!1):kw);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(!(!n||typeof n!=`object`)){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Mw(e,i)}function Mw(e,t){return t!==kw&&Dw.set(e,t===Aw),t}function Nw(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var Pw,Fw=[],Iw={alloc(e,t,n){let r=Pw;if(!r)return n;Pw=void 0;let i={value:n,issues:null};return r.set(t.value,i),Fw.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Rw(n,e.value))throw new Sw;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=jw(e,new Set,!1);if(i===Ow)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Aw||r?n=!0:r=!0}let l=s.value;if(!Tw(l))return t(s,c);let u=c[Cw];u||(u={buckets:new WeakMap,backEdges:void 0},c[Cw]=u);let d;i===c?d=a:(d=Nw(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...Ew(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;Pw=d;let p=Fw.length,m=t(s,c);Pw=void 0;let h=Fw.length>p?Fw.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?Ew(e.issues):ww),e)):(h&&(h.issues=m.issues.length?Ew(m.issues):ww),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Lw(){return Iw}function Rw(e,t){let n=e[Cw]?.backEdges;return n!==void 0&&Tw(t)&&n.has(t)}var zw=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Jb(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Eb(e.values[0])}`:`Invalid option: expected one of ${tb(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${tb(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function Bw(){return{localeError:zw()}}var Vw,Hw=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Uw(){return new Hw}(Vw=globalThis).__zod_globalRegistry??(Vw.__zod_globalRegistry=Uw());var Ww=globalThis.__zod_globalRegistry;function Gw(e,t){return new e({type:`string`,...W(t)})}function Kw(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...W(t)})}function qw(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...W(t)})}function Jw(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...W(t)})}function Yw(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...W(t)})}function Xw(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...W(t)})}function Zw(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...W(t)})}function Qw(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...W(t)})}function $w(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...W(t)})}function eT(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...W(t)})}function tT(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...W(t)})}function nT(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...W(t)})}function rT(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...W(t)})}function iT(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...W(t)})}function aT(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...W(t)})}function oT(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...W(t)})}function sT(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...W(t)})}function cT(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...W(t)})}function lT(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...W(t)})}function uT(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...W(t)})}function dT(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...W(t)})}function fT(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...W(t)})}function pT(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...W(t)})}function mT(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...W(t)})}function hT(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...W(t)})}function gT(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...W(t)})}function _T(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...W(t)})}function vT(e,t){return new e({type:`number`,checks:[],...W(t)})}function yT(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...W(t)})}function bT(e,t){return new e({type:`boolean`,...W(t)})}function xT(e,t){return new e({type:`undefined`,...W(t)})}function ST(e){return new e({type:`unknown`})}function CT(e,t){return new e({type:`never`,...W(t)})}function wT(e,t){return new kS({check:`less_than`,...W(t),value:e,inclusive:!1})}function TT(e,t){return new kS({check:`less_than`,...W(t),value:e,inclusive:!0})}function ET(e,t){return new AS({check:`greater_than`,...W(t),value:e,inclusive:!1})}function DT(e,t){return new AS({check:`greater_than`,...W(t),value:e,inclusive:!0})}function OT(e,t){return new jS({check:`multiple_of`,...W(t),value:e})}function kT(e,t){return new NS({check:`max_length`,...W(t),maximum:e})}function AT(e,t){return new PS({check:`min_length`,...W(t),minimum:e})}function jT(e,t){return new FS({check:`length_equals`,...W(t),length:e})}function MT(e,t){return new LS({check:`string_format`,format:`regex`,...W(t),pattern:e})}function NT(e){return new RS({check:`string_format`,format:`lowercase`,...W(e)})}function PT(e){return new zS({check:`string_format`,format:`uppercase`,...W(e)})}function FT(e,t){return new BS({check:`string_format`,format:`includes`,...W(t),includes:e})}function IT(e,t){return new VS({check:`string_format`,format:`starts_with`,...W(t),prefix:e})}function LT(e,t){return new HS({check:`string_format`,format:`ends_with`,...W(t),suffix:e})}function RT(e){return new US({check:`overwrite`,tx:e})}function zT(e){return RT(t=>t.normalize(e))}function BT(){return RT(e=>e.trim())}function VT(){return RT(e=>e.toLowerCase())}function HT(){return RT(e=>e.toUpperCase())}function UT(){return RT(e=>_b(e))}function WT(e,t,n){return new e({type:`array`,element:t,...W(n)})}function GT(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...W(n)})}function KT(e,t){let n=qT(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Yb(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Yb(r))}},e(t.value,t)),t);return n}function qT(e,t){let n=new ES({check:`custom`,...W(t)});return n._zod.check=e,n}function JT(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&cb(e,t,n[t]);return e}function YT(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Ww,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function XT(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function ZT(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,ZT(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&JT(o.schema,c),t.io===`input`&&sE(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function QT(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function $T(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${QT(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+QT(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
1593
1593
|
|
|
1594
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function eE(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;eE(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var tE=new Set([`type`,`properties`,`required`,`additionalProperties`]),nE=[`oneOf`,`anyOf`];function rE(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function iE(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!tE.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??rE(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}cb(n,r,e.length===1?e[0]:iE(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=rE(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function aE(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of tE)if(t in e)return;let n=t.filter(e=>nE.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=iE(t);else{let e=n[0],i=nE.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>iE([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,JT(e,r))}function oE(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):JT(i,s),JT(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())eE(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])aE(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}JT(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,cb(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:lE(t,`input`,e.processors),output:lE(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function sE(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return sE(r.element,n);if(r.type===`set`)return sE(r.valueType,n);if(r.type===`lazy`)return sE(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return sE(r.innerType,n);if(r.type===`intersection`)return sE(r.left,n)||sE(r.right,n);if(r.type===`record`||r.type===`map`)return sE(r.keyType,n)||sE(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:sE(r.in,n)||sE(r.out,n);if(r.type===`object`){for(let e in r.shape)if(sE(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(sE(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(sE(e,n))return!0;return!!(r.rest&&sE(r.rest,n))}return!1}var cE=(e,t={})=>n=>{let r=YT({...n,processors:t});return ZT(e,r),$T(r,e),oE(r,e)},lE=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=YT({...i??{},target:a,io:t,processors:n});return ZT(e,o),$T(o,e),oE(o,e)},uE=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},dE=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},fE=(e,t)=>{uE(e,`minimum`,t),dE(e,`maximum`,t)},pE=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},mE=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},hE=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},gE=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},_E=(e,t)=>uE(e,`minimum`,t.minimum),vE=(e,t)=>dE(e,`maximum`,t.maximum),yE=e=>(t,n)=>{gE(t,n.format);let[r,i]=e[n.format];uE(t,`minimum`,r),dE(t,`maximum`,i)},bE={greater_than:(e,t)=>uE(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>dE(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>pE(e,t.value),number_format:yE(Ob),bigint_format:yE(kb),min_length:_E,max_length:vE,length_equals:(e,t)=>fE(e,t.length),min_size:_E,max_size:vE,size_equals:(e,t)=>fE(e,t.size),string_format:(e,t)=>{gE(e,t.format),t.pattern&&mE(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>hE(e,t.mime)};function xE(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)bE[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&uE(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&uE(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&dE(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&dE(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&pE(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&hE(t,i.mime);for(let e of i.patterns??[])mE(t,e);return t}var SE={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},CE=new Map([[EC,lS],[OC,uS]]),wE=e=>CE.get(e)??e,TE=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=xE(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=SE[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(wE);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},EE=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=xE(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):XT(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},DE=(e,t,n,r)=>{n.type=`boolean`},OE=(e,t,n,r)=>{XT(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},kE=(e,t,n,r)=>{n.not={}},AE=(e,t,n,r)=>{let i=e._zod.def,a=eb(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},jE=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(XT(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(XT(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},ME=(e,t,n,r)=>{XT(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},NE=(e,t,n,r)=>{XT(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},PE=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=xE(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=ZT(a.element,t,{...r,path:[...r.path,`items`]})};function FE(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?FE(t.out):t.type===`catch`?FE(t.innerType):e._zod.optin}var IE=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&XT(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)cb(i.properties,e,ZT(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e];return t.io===`input`?FE(n)===void 0:n._zod.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=ZT(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},LE=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>ZT(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},RE=(e,t,n,r)=>{let i=e._zod.def,a=ZT(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=ZT(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)};function zE(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=zE(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>zE(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?xS:bS).source),p):p}var BE=new WeakMap;function VE(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of BE.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=zE(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var HE=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=xE(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=ZT(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)cb(i.patternProperties,wE(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=ZT(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=BE.get(t);n||(n=[],BE.set(t,n),t.deferred.push(()=>VE(t))),n.push(e)}i.additionalProperties=ZT(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&FE(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},UE=(e,t,n,r)=>{let i=e._zod.def,a=ZT(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},WE=(e,t,n,r)=>{let i=e._zod.def;ZT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},GE=Symbol();function KE(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(XT(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),GE):JSON.parse(o)}var qE=(e,t,n,r)=>{let i=e._zod.def;ZT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=KE(i.defaultValue,e,t,n,r);o!==GE&&(n.default=o)},JE=(e,t,n,r)=>{let i=e._zod.def;ZT(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=KE(i.defaultValue,e,t,n,r);o!==GE&&(n._prefault=o)},YE=(e,t,n,r)=>{let i=e._zod.def;ZT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{XT(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},XE=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;ZT(o,t,r);let s=t.seen.get(e);s.ref=o},ZE=(e,t,n,r)=>{let i=e._zod.def;ZT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},QE=(e,t,n,r)=>{let i=e._zod.def;ZT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},$E=new WeakSet([Object.prototype,Error.prototype]);function eD(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var tD=G(`ZodError`,(e,t)=>{Cx.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);$E.has(n)||($E.add(n),eD(n,`format`,e=>t=>Ex(e,t)),eD(n,`flatten`,e=>t=>Tx(e,t)),eD(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,nb,2)}),eD(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,nb,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),nD=Ox(tD),rD=kx(tD),iD=Ax(tD),aD=Mx(tD),oD=Rx(tD),sD=zx(tD),cD=Bx(tD),lD=Vx(tD),uD=Hx(tD),dD=Ux(tD),fD=Wx(tD),pD=Gx(tD);function mD(){hx.localeError||gx(Bw())}function hD(){hx.memoizer||gx({memoizer:Lw()})}var gD=G(`ZodType`,(e,t)=>(mD(),KS.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(hb(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Tb(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(LO(e,t))},superRefine(e,t){return this.check(RO(e,t))},overwrite(e){return this.check(RT(e))},optional(){return yO(this)},exactOptional(){return xO(this)},nullable(){return CO(this)},nullish(){return yO(CO(this))},nonoptional(e){return kO(this,e)},array(){return nO(this)},or(e){return aO([this,e])},and(e){return lO(this,e)},transform(e){return NO(this,_O(e))},default(e){return TO(this,e)},prefault(e){return DO(this,e)},catch(e){return jO(this,e)},pipe(e){return NO(this,e)},readonly(){return FO(this)},describe(e){let t=this.clone();return Ww.add(t,{description:e}),t},meta(...e){if(e.length===0)return Ww.get(this);let t=this.clone();return Ww.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Qb(this,`~standard`,{...YS(this),jsonSchema:{input:lE(this,`input`),output:lE(this,`output`)}})},set"~standard"(e){Zb(this,`~standard`,e)},parse:function e(t,n){return nD(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await rD(this,t,n,{callee:e})},safeParse(e,t){return iD(this,e,t)},async safeParseAsync(e,t){return aD(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Zb(this,`spa`,e)},validate(e,t){return Fx(this,e,t)},validateAsync(e,t){return Lx(this,e,t)},encode:function e(t,n){return oD(this,t,n,{callee:e})},decode:function e(t,n){return sD(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await cD(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await lD(this,t,n,{callee:e})},safeEncode(e,t){return uD(this,e,t)},safeDecode(e,t){return dD(this,e,t)},async safeEncodeAsync(e,t){return fD(this,e,t)},async safeDecodeAsync(e,t){return pD(this,e,t)},toJSONSchema(e){return cE(this,{})(e)},get description(){return Ww.get(this)?.description},get _def(){return this._zod.def}}),_D=G(`_ZodString`,(e,t)=>{XS.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TE(e,t,n,r)},$b({format:e=>xE(e).format??null,minLength:e=>xE(e).minimum??null,maxLength:e=>xE(e).maximum??null},{regex(...e){return this.check(MT(...e))},includes(...e){return this.check(FT(...e))},startsWith(...e){return this.check(IT(...e))},endsWith(...e){return this.check(LT(...e))},min(...e){return this.check(AT(...e))},max(...e){return this.check(kT(...e))},length(...e){return this.check(jT(...e))},nonempty(...e){return this.check(AT(1,...e))},lowercase(e){return this.check(NT(e))},uppercase(e){return this.check(PT(e))},trim(){return this.check(BT())},normalize(...e){return this.check(zT(...e))},toLowerCase(){return this.check(VT())},toUpperCase(){return this.check(HT())},slugify(){return this.check(UT())}})),vD=G(`ZodString`,(e,t)=>{XS.init(e,t),_D.init(e,t)},{email(e){return this.check(Kw(wD,e))},url(e){return this.check(Qw(DD,e))},jwt(e){return this.check(pT(HD,e))},emoji(e){return this.check($w(OD,e))},guid(e){return this.check(qw(TD,e))},uuid(e){return this.check(Jw(ED,e))},uuidv4(e){return this.check(Yw(ED,e))},uuidv6(e){return this.check(Xw(ED,e))},uuidv7(e){return this.check(Zw(ED,e))},nanoid(e){return this.check(eT(kD,e))},cuid(e){return this.check(tT(AD,e))},cuid2(e){return this.check(nT(jD,e))},ulid(e){return this.check(rT(MD,e))},base64(e){return this.check(uT(zD,e))},base64url(e){return this.check(dT(BD,e))},xid(e){return this.check(iT(ND,e))},ksuid(e){return this.check(aT(PD,e))},ipv4(e){return this.check(oT(FD,e))},ipv6(e){return this.check(sT(ID,e))},cidrv4(e){return this.check(cT(LD,e))},cidrv6(e){return this.check(lT(RD,e))},e164(e){return this.check(fT(VD,e))},datetime(e){return this.check(mT(bD,e))},date(e){return this.check(hT(xD,e))},time(e){return this.check(gT(SD,e))},duration(e){return this.check(_T(CD,e))}});function K(e){return Gw(vD,e)}var yD=G(`ZodStringFormat`,(e,t)=>{ZS.init(e,t),_D.init(e,t)}),bD=G(`ZodISODateTime`,(e,t)=>{mC.init(e,t),yD.init(e,t)}),xD=G(`ZodISODate`,(e,t)=>{hC.init(e,t),yD.init(e,t)}),SD=G(`ZodISOTime`,(e,t)=>{gC.init(e,t),yD.init(e,t)}),CD=G(`ZodISODuration`,(e,t)=>{_C.init(e,t),yD.init(e,t)}),wD=G(`ZodEmail`,(e,t)=>{eC.init(e,t),yD.init(e,t)}),TD=G(`ZodGUID`,(e,t)=>{QS.init(e,t),yD.init(e,t)}),ED=G(`ZodUUID`,(e,t)=>{$S.init(e,t),yD.init(e,t)}),DD=G(`ZodURL`,(e,t)=>{oC.init(e,t),yD.init(e,t)}),OD=G(`ZodEmoji`,(e,t)=>{sC.init(e,t),yD.init(e,t)}),kD=G(`ZodNanoID`,(e,t)=>{cC.init(e,t),yD.init(e,t)}),AD=G(`ZodCUID`,(e,t)=>{lC.init(e,t),yD.init(e,t)}),jD=G(`ZodCUID2`,(e,t)=>{uC.init(e,t),yD.init(e,t)}),MD=G(`ZodULID`,(e,t)=>{dC.init(e,t),yD.init(e,t)}),ND=G(`ZodXID`,(e,t)=>{fC.init(e,t),yD.init(e,t)}),PD=G(`ZodKSUID`,(e,t)=>{pC.init(e,t),yD.init(e,t)}),FD=G(`ZodIPv4`,(e,t)=>{vC.init(e,t),yD.init(e,t)}),ID=G(`ZodIPv6`,(e,t)=>{xC.init(e,t),yD.init(e,t)}),LD=G(`ZodCIDRv4`,(e,t)=>{SC.init(e,t),yD.init(e,t)}),RD=G(`ZodCIDRv6`,(e,t)=>{wC.init(e,t),yD.init(e,t)}),zD=G(`ZodBase64`,(e,t)=>{DC.init(e,t),yD.init(e,t)}),BD=G(`ZodBase64URL`,(e,t)=>{AC.init(e,t),yD.init(e,t)}),VD=G(`ZodE164`,(e,t)=>{jC.init(e,t),yD.init(e,t)}),HD=G(`ZodJWT`,(e,t)=>{NC.init(e,t),yD.init(e,t)}),UD=G(`ZodNumber`,(e,t)=>{PC.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>EE(e,t,n,r),e.isFinite=!0},$b({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=xE(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=xE(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=xE(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>xE(e).format??null},{gt(e,t){return this.check(ET(e,t))},gte(e,t){return this.check(DT(e,t))},min(e,t){return this.check(DT(e,t))},lt(e,t){return this.check(wT(e,t))},lte(e,t){return this.check(TT(e,t))},max(e,t){return this.check(TT(e,t))},int(e){return this.check(KD(e))},safe(e){return this.check(KD(e))},positive(e){return this.check(ET(0,e))},nonnegative(e){return this.check(DT(0,e))},negative(e){return this.check(wT(0,e))},nonpositive(e){return this.check(TT(0,e))},multipleOf(e,t){return this.check(OT(e,t))},step(e,t){return this.check(OT(e,t))},finite(){return this}}));function WD(e){return vT(UD,e)}var GD=G(`ZodNumberFormat`,(e,t)=>{FC.init(e,t),UD.init(e,t)});function KD(e){return yT(GD,e)}var qD=G(`ZodBoolean`,(e,t)=>{IC.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DE(e,t,n,r)});function JD(e){return bT(qD,e)}var YD=G(`ZodUndefined`,(e,t)=>{LC.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OE(e,t,n,r)});function XD(e){return xT(YD,e)}var ZD=G(`ZodUnknown`,(e,t)=>{RC.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function QD(){return ST(ZD)}var $D=G(`ZodNever`,(e,t)=>{zC.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kE(e,t,n,r)});function eO(e){return CT($D,e)}var tO=G(`ZodArray`,(e,t)=>{hD(),VC.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PE(e,t,n,r),e.element=t.element},{min(e,t){return this.check(AT(e,t))},nonempty(e){return this.check(AT(1,e))},max(e,t){return this.check(kT(e,t))},length(e,t){return this.check(jT(e,t))},unwrap(){return this.element}});function nO(e,t){return WT(tO,e,t)}var rO=G(`ZodObject`,(e,t)=>{hD(),qC.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>IE(e,t,n,r),ox(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return pO(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(hb(this._zod.def,{catchall:e}))},passthrough(){return this.clone(hb(this._zod.def,{catchall:QD()}))},loose(){return this.clone(hb(this._zod.def,{catchall:QD()}))},strict(){return this.clone(hb(this._zod.def,{catchall:eO()}))},strip(){return this.clone(hb(this._zod.def,{catchall:void 0}))},extend(e){return Nb(this,e)},safeExtend(e){return Fb(this,e)},merge(e){return Ib(this,e)},pick(e){return Ab(this,e)},omit(e){return Mb(this,e)},partial(...e){return Lb(vO,this,e[0])},exactPartial(...e){return Lb(bO,this,e[0],`exactPartial`)},required(...e){return Rb(OO,this,e[0])}});function q(e,t){return new rO({type:`object`,shape:e??{},...W(t)})}var iO=G(`ZodUnion`,(e,t)=>{YC.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LE(e,t,n,r),e.options=t.options});function aO(e,t){return new iO({type:`union`,options:e,...W(t)})}var oO=G(`ZodDiscriminatedUnion`,(e,t)=>{iO.init(e,t),ZC.init(e,t)});function sO(e,t,n){return new oO({type:`union`,options:t,discriminator:e,...W(n)})}var cO=G(`ZodIntersection`,(e,t)=>{QC.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RE(e,t,n,r)});function lO(e,t){return new cO({type:`intersection`,left:e,right:t})}var uO=G(`ZodRecord`,(e,t)=>{hD(),tw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>HE(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function dO(e,t,n){return new uO({type:`record`,keyType:e,valueType:t,...W(n),partial:!0})}var fO=G(`ZodEnum`,(e,t)=>{nw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>AE(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new fO({...t,checks:[],...W(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new fO({...t,checks:[],...W(r),entries:i})}});function pO(e,t){return new fO({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...W(t)})}var mO=G(`ZodLiteral`,(e,t)=>{rw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jE(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function hO(e,t){return new mO({type:`literal`,values:Array.isArray(e)?e:[e],...W(t)})}var gO=G(`ZodTransform`,(e,t)=>{hD(),iw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>NE(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new mx(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Yb(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Yb(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function _O(e){return new gO({type:`transform`,transform:e})}var vO=G(`ZodOptional`,(e,t)=>{ow.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function yO(e){return new vO({type:`optional`,innerType:e})}var bO=G(`ZodExactOptional`,(e,t)=>{sw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function xO(e){return new bO({type:`optional`,innerType:e})}var SO=G(`ZodNullable`,(e,t)=>{cw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>UE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function CO(e){return new SO({type:`nullable`,innerType:e})}var wO=G(`ZodDefault`,(e,t)=>{lw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function TO(e,t){return new wO({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Sb(t)}})}var EO=G(`ZodPrefault`,(e,t)=>{dw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>JE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function DO(e,t){return new EO({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Sb(t)}})}var OO=G(`ZodNonOptional`,(e,t)=>{fw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>WE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function kO(e,t){return new OO({type:`nonoptional`,innerType:e,...W(t)})}var AO=G(`ZodCatch`,(e,t)=>{hw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>YE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function jO(e,t){return new AO({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:cx(t)})}var MO=G(`ZodPipe`,(e,t)=>{gw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>XE(e,t,n,r),e.in=t.in,e.out=t.out});function NO(e,t){return new MO({type:`pipe`,in:e,out:t})}var PO=G(`ZodReadonly`,(e,t)=>{vw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function FO(e){return new PO({type:`readonly`,innerType:e})}var IO=G(`ZodCustom`,(e,t)=>{bw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ME(e,t,n,r)});function LO(e,t={}){return GT(IO,e,t)}function RO(e,t){return KT(e,t)}var zO=$y(),BO=pO([`c`,`cpp`,`go`,`haskell`,`java`,`javascript`,`javascriptreact`,`json`,`jsonc`,`lua`,`nix`,`ocaml`,`php`,`python`,`ruby`,`rust`,`shellscript`,`swift`,`terraform`,`toml`,`typescript`,`typescriptreact`,`yaml`,`zig`]),VO=pO([`old`,`new`]),HO=sO(`kind`,[q({kind:hO(`working`)}),q({kind:hO(`pr`),pr:K().optional()}),q({kind:hO(`revspec`),args:K().array()}),q({kind:hO(`focus`),commit:K().nullable()}),q({kind:hO(`interdiff`),from:WD().int().positive(),to:WD().int().positive()}),q({kind:hO(`pair`),commit:K().nullable()})]),UO=q({n:WD(),oldSha:K(),newSha:K(),recordedAt:WD()}),WO=pO([`direct`,`merge-base`,`parent`]),GO=q({old:K(),new:K(),base:WO,live:pO([`worktree`,`refs`,`none`]),commentKey:K()}),KO=q({sha:K(),short:K(),message:K()}),qO=KO.extend({parent:K().nullable(),child:K().nullable()}),JO=KO.extend({author:K(),email:K(),date:WD()}),YO=pO([`identical`,`changed`,`message`,`added`,`dropped`]),XO=q({old:JO.nullable(),new:JO.nullable(),status:YO}),ZO=q({from:UO,to:UO,conflicts:K().array(),pairs:XO.array()}),QO=q({old:K().nullable(),new:K(),conflicts:K().array()}),$O=GO.extend({within:GO.optional(),interdiff:ZO.optional(),pair:QO.optional()});function ek(e){if(e.within&&e.interdiff){let t=`${ek(e.within)} #${e.interdiff.from.n}→#${e.interdiff.to.n}`;return e.pair?`${t} @ ${e.pair.new.slice(0,7)}`:t}return e.within?`${ek(e.within)} @ ${e.new.slice(0,7)}`:e.base===`parent`?`${e.new.slice(0,7)}^!`:`${tk(e.old)}${e.base===`merge-base`?`...`:`..`}${tk(e.new)}`}function tk(e){return e.replace(/^refs\/diffle\/[^/]+\/\d+\/(?:base|head)\//,``).replace(/^refs\/(?:heads|remotes)\//,``)}var nk=q({repository:K(),number:WD(),url:K(),title:K(),state:pO([`OPEN`,`CLOSED`,`MERGED`]),isDraft:JD()}),rk=q({version:WD(),repository:K().nullable(),pullRequest:nk.nullable(),reason:K().nullable()}),ik=pO([`A`,`M`,`D`,`R`,`C`,`T`,`U`]),ak=q({path:K(),oldPath:K().optional(),status:ik,additions:WD(),deletions:WD(),binary:JD(),blob:K(),oldBlob:K(),generated:JD(),submodule:hO(!0).optional()}),ok=q({list:JO.array(),total:WD(),oldSha:K(),newSha:K()}),sk=q({root:K(),mode:$O,version:WD(),oldSha:K(),newSha:K(),headSha:K(),context:WD(),changed:ak.array(),tree:K().array(),commit:qO.nullable(),commits:ok,iterations:UO.array()}),ck=q({version:WD(),oldSha:K(),newSha:K()}),lk=q({paths:K().array().max(200)}),uk=q({path:K(),contents:K(),binary:JD()}),dk=sO(`kind`,[q({kind:hO(`line`),path:K(),side:VO,startLine:WD(),endLine:WD(),quoted:K()}),q({kind:hO(`file`),path:K()})]),fk=q({id:K(),body:K(),createdAt:WD(),updatedAt:WD()}),pk=q({id:K(),anchor:dk,messages:fk.array().min(1),resolved:JD(),resolvedAt:WD().optional(),stale:JD(),staleFromLine:WD().optional()}),mk=q({path:K().min(1),side:VO.optional(),startLine:WD().int().positive().optional(),endLine:WD().int().positive().optional(),body:K().refine(e=>e.trim().length>0,`body required`),quoted:K().optional()}).refine(e=>e.startLine==null||e.endLine==null||e.endLine>=e.startLine,{path:[`endLine`],message:`endLine must be ≥ startLine`}).refine(e=>e.startLine!=null||e.side==null&&e.endLine==null&&e.quoted==null,{path:[`startLine`],message:`side, endLine and quoted need a startLine; leave all four out for a comment on the whole file`}),hk=q({body:K().refine(e=>e.trim().length>0,`body required`)}),gk=pO([`open`,`resolved`,`all`]),_k=q({threadIds:K().array().optional()}),vk=q({url:K(),posted:WD(),updated:WD(),review:pO([`created`,`existing`]),skipped:q({id:K(),reason:K()}).array()});q({state:gk.optional(),path:K().optional()});var yk=q({body:K()}),bk=q({path:K(),blob:K(),viewed:JD()}),xk=q({old:KO.nullable(),new:KO.nullable()}),Sk=q({defaultBranch:K().nullable(),current:K().nullable(),branches:K().array(),remoteBranches:K().array(),tags:K().array(),recent:q({sha:K(),short:K(),subject:K()}).array()}),Ck=q({path:K(),line:WD(),text:K()}),wk=pO([`file`,`diff`,`repo`]),Tk=pO([`diff`,`full`]),Ek=q({query:K(),matches:Ck.array(),truncated:JD()}),Dk=pO([`on`,`auto`,`off`]),Ok=q({autoViewed:K().array(),contextLines:WD(),followRefs:Dk,lspCommands:dO(BO,K())}),kk={autoViewed:[],contextLines:5,followRefs:`auto`,lspCommands:{}},Ak=q({path:K().min(1),line:WD().int().positive(),col:WD().int().nonnegative()}),jk=Ak.extend({text:K(),external:hO(!0).optional()}),Mk=q({name:K(),command:K(),state:pO([`starting`,`ready`,`unavailable`]),message:K().optional(),activity:K().array().optional(),notice:q({severity:pO([`warning`,`error`]),message:K()}).optional(),stderr:K().optional()}).extend({languages:BO.array()}),Nk=q({language:BO,tried:K().array()}),Pk=q({enabled:JD(),servers:Mk.array(),missing:Nk.array()}),Fk=q({locations:jk.array()}),Ik=q({contents:K().nullable(),range:q({line:WD(),col:WD(),endLine:WD(),endCol:WD()}).optional()}),Lk=q({kind:K().nullable()}),Rk=q({occurrences:q({line:WD().int().positive(),col:WD().int().nonnegative(),endLine:WD().int().positive(),endCol:WD().int().nonnegative(),kind:pO([`text`,`read`,`write`])}).array()}),zk=q({name:K(),kind:WD(),container:K().optional(),path:K(),line:WD(),endLine:WD(),col:WD()});pO([`unviewed`,`viewed`,`restale`]);var Bk=sO(`type`,[q({type:hO(`snapshot`),version:WD()}),q({type:hO(`moved`),moved:ck.nullable()}),q({type:hO(`threads`)}),q({type:hO(`viewed`)}),q({type:hO(`config`)}),q({type:hO(`lsp`),payload:Pk})]);function Vk(e){return e.newSha===`worktree`||e.headSha!==``&&e.newSha===e.headSha}var Hk={bash:`shellscript`,c:`c`,cc:`cpp`,cjs:`javascript`,cpp:`cpp`,cts:`typescript`,cxx:`cpp`,go:`go`,h:`c`,hh:`cpp`,hpp:`cpp`,hs:`haskell`,hxx:`cpp`,java:`java`,js:`javascript`,jsx:`javascriptreact`,json:`json`,jsonc:`jsonc`,lua:`lua`,mjs:`javascript`,ml:`ocaml`,mli:`ocaml`,mts:`typescript`,nix:`nix`,php:`php`,py:`python`,pyi:`python`,rb:`ruby`,rs:`rust`,sh:`shellscript`,swift:`swift`,tf:`terraform`,tfvars:`terraform`,toml:`toml`,ts:`typescript`,tsx:`typescriptreact`,yaml:`yaml`,yml:`yaml`,zig:`zig`};[...new Set(Object.values(Hk))].sort();function Uk(e){let t=/\.([^./\\]+)$/.exec(e)?.[1]?.toLowerCase();return t&&Hk[t]||null}function Wk(e,t){if(!e.enabled)return`Language servers are off for this run (--no-lsp)`;if(t==null)return e.servers.length?e.servers.some(e=>e.state===`ready`)?null:Gk(e.servers[0]):Kk(e);let n=Uk(t);if(!n)return`No language server for ${/(\.[^./\\]+)$/.exec(t)?.[1]??`these`} files`;let r=e.servers.find(e=>e.languages.includes(n));return r?r.state===`ready`?null:Gk(r):Kk(e,n)}function Gk(e){return e.state===`starting`?`${e.name} is starting…`:`${e.name} is unavailable: ${e.message??`unknown error`}`}function Kk(e,t){let n=t==null?e.missing:e.missing.filter(e=>e.language===t),r=n.filter(e=>e.tried.length>0),i=n.filter(e=>e.tried.length===0).map(e=>e.language);return r.length?`No language server for ${[...new Set(r.map(e=>e.language))].join(`, `)} on PATH: install one of ${[...new Set(r.flatMap(e=>e.tried))].join(`, `)}`:i.length?`The language server for ${i.join(`, `)} is off in your diffle config`:t==null?`No language server runs for this diff`:`No language server runs for ${t}`}var qk=q({autoViewed:K().array().optional(),contextLines:WD().int().min(0).max(1e4).optional(),followRefs:Dk.optional()}),Jk=q({resolved:JD()}),Yk=q({entries:bk.array()});q({path:K().min(1),rev:VO}).extend({key:K().min(1)});function Xk(e,t,n){let r=e.changed.find(e=>e.path===t);return r?(n===`new`?r.blob:r.oldBlob)||null:[e.newSha,e.oldSha].find(e=>e!==`worktree`)??null}var Zk=K().regex(/^[0-9]+$/).transform(Number).pipe(WD().int().nonnegative());q({oldOffset:Zk,newOffset:Zk});var Qk=pO([`0`,`1`]).optional().transform(e=>e===`1`);q({q:K().default(``),scope:wk.default(`diff`),content:Tk.default(`diff`),path:K().optional(),word:Qk,i:Qk,re:Qk}),q({path:K().min(1).optional(),q:K().optional()}).refine(e=>e.path!=null||e.q!=null,`path or q required`),q({stale:hO(`1`).optional()}),q({path:K().optional()});var $k=q({error:K()});function eA(e,t){return JSON.stringify(e.parse(t))}async function tA(e,t,n){let r=await fetch(new URL(t,location.href).href,{...n,headers:{"content-type":`application/json`,...n?.headers}});if(!r.ok)throw new iA(r.status,await rA(r));return e.parse(r.status===204?void 0:await r.json())}async function nA(e,t){let n=await fetch(new URL(e,location.href).href,t);if(!n.ok)throw new iA(n.status,await rA(n));return n.text()}async function rA(e){try{let t=$k.safeParse(await e.json());return t.success?t.data.error:e.statusText}catch{return e.statusText}}var iA=class extends Error{status;constructor(e,t){super(t),this.status=e}},aA=e=>new URLSearchParams(Object.entries(e).filter(e=>e[1]!=null)).toString(),oA={github:()=>tA(rk,`api/github`),snapshot:()=>tA(sk,`api/snapshot`),moved:()=>tA(ck.nullable(),`api/moved`),reload:()=>tA(sk,`api/reload`,{method:`POST`}),clearIterations:()=>tA(sk,`api/iterations`,{method:`DELETE`}),deleteIteration:e=>tA(sk,`api/iterations/${e}`,{method:`DELETE`}),switchMode:e=>tA(sk,`api/mode`,{method:`POST`,body:eA(HO,e)}),refs:()=>tA(Sk,`api/refs`),lastCommitsPreview:(e,t,n)=>tA(xk,`api/last-commits-preview?${aA({oldOffset:String(e),newOffset:String(t)})}`,{signal:n}),patch:e=>nA(`api/patch?${aA({path:e})}`),patches:e=>nA(`api/patch`,{method:`POST`,headers:{"content-type":`application/json`},body:eA(lk,{paths:e})}),file:(e,t,n)=>tA(uk,`api/file?${aA({path:e,rev:t})}`,{signal:n}),imageUrl:(e,t,n)=>new URL(`api/image?${aA({path:e,rev:t,key:n})}`,location.href).href,search:(e,t={})=>tA(Ek,`api/search?${aA({q:e,word:t.word?`1`:void 0,i:t.ignoreCase?`1`:void 0,re:t.regex?`1`:void 0,scope:t.scope,content:t.content,path:t.path})}`),threads:(e={})=>tA(pk.array(),`api/threads?${aA({state:e.state,path:e.path})}`),exportComments:()=>nA(`api/threads/export?${aA({state:`open`})}`),exportComment:(e,t)=>nA(`api/threads/${encodeURIComponent(e)}/messages/${encodeURIComponent(t)}/export`),exportToGithub:e=>tA(vk,`api/github/export`,{method:`POST`,body:eA(_k,e)}),addThread:e=>tA(pk.array(),`api/threads`,{method:`POST`,body:eA(mk,e)}),reply:(e,t)=>tA(pk,`api/threads/${encodeURIComponent(e)}/replies`,{method:`POST`,body:eA(hk,t)}),editMessage:(e,t,n)=>tA(pk,`api/threads/${encodeURIComponent(e)}/messages/${encodeURIComponent(t)}`,{method:`PATCH`,body:eA(yk,{body:n})}),deleteMessage:(e,t)=>tA(pk.or(XD()),`api/threads/${encodeURIComponent(e)}/messages/${encodeURIComponent(t)}`,{method:`DELETE`}),setResolved:(e,t)=>tA(pk,`api/threads/${encodeURIComponent(e)}/resolved`,{method:`PUT`,body:eA(Jk,{resolved:t})}),deleteThread:e=>tA(XD(),`api/threads/${encodeURIComponent(e)}`,{method:`DELETE`}),clearThreads:()=>tA(XD(),`api/threads`,{method:`DELETE`}),deleteStaleThreads:()=>tA(XD(),`api/threads?stale=1`,{method:`DELETE`}),viewed:()=>tA(bk.array(),`api/viewed`),setViewedBulk:e=>tA(bk.array(),`api/viewed/bulk`,{method:`PUT`,body:eA(Yk,{entries:e})}),setViewed:(e,t,n)=>tA(bk.array(),`api/viewed`,{method:`PUT`,body:eA(bk,{path:e,blob:t,viewed:n})}),lspStatus:()=>tA(Pk,`api/lsp/status`),lspDefinition:e=>tA(Fk,`api/lsp/definition`,{method:`POST`,body:eA(Ak,e)}),lspTypeDefinition:e=>tA(Fk,`api/lsp/type-definition`,{method:`POST`,body:eA(Ak,e)}),lspHover:e=>tA(Ik,`api/lsp/hover`,{method:`POST`,body:eA(Ak,e)}),lspTokenKind:e=>tA(Lk,`api/lsp/token-kind`,{method:`POST`,body:eA(Ak,e)}),lspReferences:e=>tA(Fk,`api/lsp/references`,{method:`POST`,body:eA(Ak,e)}),lspOccurrences:e=>tA(Rk,`api/lsp/occurrences`,{method:`POST`,body:eA(Ak,e)}),lspSymbols:e=>tA(zk.array(),`api/lsp/symbols?${aA(e)}`),config:()=>tA(Ok,`api/config`),saveConfig:e=>tA(Ok,`api/config`,{method:`PUT`,body:eA(qk,e)})};function sA(e,t){let n=null,r=!1,i=500,a=()=>{if(r)return;let o=new URL(`ws`,location.href);o.protocol=o.protocol===`https:`?`wss:`:`ws:`,n=new WebSocket(o.href),n.onopen=()=>{i=500,t()},n.onmessage=t=>{try{e(Bk.parse(JSON.parse(String(t.data))))}catch{}},n.onclose=()=>{r||(setTimeout(a,i),i=Math.min(i*2,1e4))}};return a(),()=>{r=!0,n?.close()}}var cA=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},lA=(e,t)=>({classGroupId:e,validator:t}),uA=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),dA=`-`,fA=[],pA=`arbitrary..`,mA=e=>{let t=_A(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return gA(e);let n=e.split(dA);return hA(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?cA(i,t):t:i||fA}return n[e]||fA}}},hA=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=hA(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(dA):e.slice(t).join(dA),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},gA=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?pA+r:void 0})(),_A=e=>{let{theme:t,classGroups:n}=e;return vA(n,t)},vA=(e,t)=>{let n=uA();for(let r in e){let i=e[r];yA(i,n,r,t)}return n},yA=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];bA(i,t,n,r)}},bA=(e,t,n,r)=>{if(typeof e==`string`){xA(e,t,n);return}if(typeof e==`function`){SA(e,t,n,r);return}CA(e,t,n,r)},xA=(e,t,n)=>{let r=e===``?t:wA(t,e);r.classGroupId=n},SA=(e,t,n,r)=>{if(TA(e)){yA(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(lA(n,e))},CA=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];yA(o,wA(t,a),n,r)}},wA=(e,t)=>{let n=e,r=t.split(dA),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=uA(),n.nextPart.set(t,i)),n=i}return n},TA=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,EA=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},DA=`!`,OA=`:`,kA=[],AA=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),jA=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===OA){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(DA)?(c=s.slice(0,-1),l=!0):s.startsWith(DA)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return AA(t,l,c,u)};if(t){let e=t+OA,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):AA(kA,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},MA=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},NA=e=>({cache:EA(e.cacheSize),parseClassName:jA(e),sortModifiers:MA(e),postfixLookupClassGroupIds:PA(e),...mA(e)}),PA=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},FA=/\s+/,IA=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(FA),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+DA:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},LA=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=RA(n))&&(i&&(i+=` `),i+=r);return i},RA=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=RA(e[r]))&&(n&&(n+=` `),n+=t);return n},zA=(e,...t)=>{let n,r,i,a,o=o=>(n=NA(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=IA(e,n);return i(e,a),a};return a=o,(...e)=>a(LA(...e))},BA=[],VA=e=>{let t=t=>t[e]||BA;return t.isThemeGetter=!0,t},HA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,UA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,WA=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,GA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,KA=/\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$/,qA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,JA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,YA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,XA=e=>WA.test(e),ZA=e=>!!e&&!Number.isNaN(Number(e)),QA=e=>!!e&&Number.isInteger(Number(e)),$A=e=>e.endsWith(`%`)&&ZA(e.slice(0,-1)),ej=e=>GA.test(e),tj=()=>!0,nj=e=>KA.test(e)&&!qA.test(e),rj=()=>!1,ij=e=>JA.test(e),aj=e=>YA.test(e),oj=e=>!J(e)&&!Y(e),sj=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)),cj=e=>Cj(e,Dj,rj),J=e=>HA.test(e),lj=e=>Cj(e,Oj,nj),uj=e=>Cj(e,kj,ZA),dj=e=>Cj(e,jj,tj),fj=e=>Cj(e,Aj,rj),pj=e=>Cj(e,Tj,rj),mj=e=>Cj(e,Ej,aj),hj=e=>Cj(e,Mj,ij),Y=e=>UA.test(e),gj=e=>wj(e,Oj),_j=e=>wj(e,Aj),vj=e=>wj(e,Tj),yj=e=>wj(e,Dj),bj=e=>wj(e,Ej),xj=e=>wj(e,Mj,!0),Sj=e=>wj(e,jj,!0),Cj=(e,t,n)=>{let r=HA.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},wj=(e,t,n=!1)=>{let r=UA.exec(e);return r?r[1]?t(r[1]):n:!1},Tj=e=>e===`position`||e===`percentage`,Ej=e=>e===`image`||e===`url`,Dj=e=>e===`length`||e===`size`||e===`bg-size`,Oj=e=>e===`length`,kj=e=>e===`number`,Aj=e=>e===`family-name`,jj=e=>e===`number`||e===`weight`,Mj=e=>e===`shadow`,Nj=zA(()=>{let e=VA(`color`),t=VA(`font`),n=VA(`text`),r=VA(`font-weight`),i=VA(`tracking`),a=VA(`leading`),o=VA(`breakpoint`),s=VA(`container`),c=VA(`spacing`),l=VA(`radius`),u=VA(`shadow`),d=VA(`inset-shadow`),f=VA(`text-shadow`),p=VA(`drop-shadow`),m=VA(`blur`),h=VA(`perspective`),g=VA(`aspect`),_=VA(`ease`),v=VA(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Y,J],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Y,J,c],T=()=>[XA,`full`,`auto`,...w()],E=()=>[QA,`none`,`subgrid`,Y,J],D=()=>[`auto`,{span:[`full`,QA,Y,J]},QA,Y,J],O=()=>[QA,`auto`,Y,J],k=()=>[`auto`,`min`,`max`,`fr`,Y,J],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ee=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],j=()=>[`auto`,...w()],M=()=>[XA,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[XA,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],P=()=>[XA,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,Y,J],I=()=>[...b(),vj,pj,{position:[Y,J]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,yj,cj,{size:[Y,J]}],re=()=>[$A,gj,lj],L=()=>[``,`none`,`full`,l,Y,J],R=()=>[``,ZA,gj,lj],z=()=>[`solid`,`dashed`,`dotted`,`double`],B=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ie=()=>[ZA,$A,vj,pj],ae=()=>[``,`none`,m,Y,J],oe=()=>[`none`,ZA,Y,J],se=()=>[`none`,ZA,Y,J],ce=()=>[ZA,Y,J],le=()=>[XA,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[ej],breakpoint:[ej],color:[tj],container:[ej],"drop-shadow":[ej],ease:[`in`,`out`,`in-out`],font:[oj],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[ej],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[ej],shadow:[ej],spacing:[`px`,ZA],text:[ej],"text-shadow":[ej],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,XA,J,Y,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Y,J]}],"container-named":[sj],columns:[{columns:[ZA,J,Y,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[QA,`auto`,Y,J]}],basis:[{basis:[XA,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[ZA,XA,`auto`,`initial`,`none`,J]}],grow:[{grow:[``,ZA,Y,J]}],shrink:[{shrink:[``,ZA,Y,J]}],order:[{order:[QA,`first`,`last`,`none`,Y,J]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...ee(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ee()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...ee(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ee(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...ee(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ee()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:M()}],"inline-size":[{inline:[`auto`,...N()]}],"min-inline-size":[{"min-inline":[`auto`,...N()]}],"max-inline-size":[{"max-inline":[`none`,...N()]}],"block-size":[{block:[`auto`,...P()]}],"min-block-size":[{"min-block":[`auto`,...P()]}],"max-block-size":[{"max-block":[`none`,...P()]}],w:[{w:[s,`screen`,...M()]}],"min-w":[{"min-w":[s,`screen`,`none`,...M()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...M()]}],h:[{h:[`screen`,`lh`,...M()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...M()]}],"max-h":[{"max-h":[`screen`,`lh`,...M()]}],"font-size":[{text:[`base`,n,gj,lj]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Sj,dj]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,$A,J]}],"font-family":[{font:[_j,fj,t]}],"font-features":[{"font-features":[J]}],"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:[i,Y,J]}],"line-clamp":[{"line-clamp":[ZA,`none`,Y,uj]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Y,J]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Y,J]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...z(),`wavy`]}],"text-decoration-thickness":[{decoration:[ZA,`from-font`,`auto`,Y,lj]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[ZA,`auto`,Y,J]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[QA,Y,J]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Y,J]}],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`,Y,J]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},QA,Y,J],radial:[``,Y,J],conic:[QA,Y,J]},bj,mj]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":R()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...z(),`hidden`,`none`]}],"divide-style":[{divide:[...z(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...z(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[ZA,Y,J]}],"outline-w":[{outline:[``,ZA,gj,lj]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`none`,u,xj,hj]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,xj,hj]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:R()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[ZA,lj]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,xj,hj]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[ZA,Y,J]}],"mix-blend":[{"mix-blend":[...B(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":B()}],"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":[ZA]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[Y,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[ZA]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Y,J]}],filter:[{filter:[``,`none`,Y,J]}],blur:[{blur:ae()}],brightness:[{brightness:[ZA,Y,J]}],contrast:[{contrast:[ZA,Y,J]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,xj,hj]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,ZA,Y,J]}],"hue-rotate":[{"hue-rotate":[ZA,Y,J]}],invert:[{invert:[``,ZA,Y,J]}],saturate:[{saturate:[ZA,Y,J]}],sepia:[{sepia:[``,ZA,Y,J]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Y,J]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[ZA,Y,J]}],"backdrop-contrast":[{"backdrop-contrast":[ZA,Y,J]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,ZA,Y,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ZA,Y,J]}],"backdrop-invert":[{"backdrop-invert":[``,ZA,Y,J]}],"backdrop-opacity":[{"backdrop-opacity":[ZA,Y,J]}],"backdrop-saturate":[{"backdrop-saturate":[ZA,Y,J]}],"backdrop-sepia":[{"backdrop-sepia":[``,ZA,Y,J]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Y,J]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[ZA,`initial`,Y,J]}],ease:[{ease:[`linear`,`initial`,_,Y,J]}],delay:[{delay:[ZA,Y,J]}],animate:[{animate:[`none`,v,Y,J]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Y,J]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":[`scale-3d`],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[Y,J,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":[`translate-none`],zoom:[{zoom:[QA,Y,J]}],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"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`,Y,J]}],"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":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,Y,J]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[ZA,gj,lj,uj]}],stroke:[{stroke:[`none`,...F()]}],"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`]}});function Pj({label:e,onClose:t,className:n,children:r}){return(0,g.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/35`,onMouseDown:e=>e.target===e.currentTarget&&t(),children:(0,g.jsx)(`div`,{role:`dialog`,"aria-label":e,className:Nj(`w-140 max-w-[95vw] rounded-[0.625rem] border border-border bg-canvas p-4 shadow-[0_1rem_3rem_rgba(0,0,0,0.3)]`,n),children:r})})}var Fj=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Ij=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Lj=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Rj=e=>{let t=Lj(e);return t.charAt(0).toUpperCase()+t.slice(1)},zj={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`},Bj=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Vj=(0,p.createContext)({}),Hj=()=>(0,p.useContext)(Vj),Uj=(0,p.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:m=``}=Hj()??{},h=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,p.createElement)(`svg`,{ref:c,...zj,width:t??l??zj.width,height:t??l??zj.height,stroke:e??f,strokeWidth:h,className:Fj(`lucide`,m,i),...!a&&!Bj(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,p.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Wj=(e,t)=>{let n=(0,p.forwardRef)(({className:n,...r},i)=>(0,p.createElement)(Uj,{ref:i,iconNode:t,className:Fj(`lucide-${Ij(Rj(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Rj(e),n},Gj=Wj(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),Kj=Wj(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),qj=Wj(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Jj=Wj(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Yj=Wj(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Xj=Wj(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Zj=Wj(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Qj=Wj(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),$j=Wj(`chevrons-down-up`,[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]),eM=Wj(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),tM=Wj(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),nM=Wj(`clipboard-copy`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2`,key:`4jdomd`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v4`,key:`3hqy98`}],[`path`,{d:`M21 14H11`,key:`1bme5i`}],[`path`,{d:`m15 10-4 4 4 4`,key:`5dvupr`}]]),rM=Wj(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),iM=Wj(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),aM=Wj(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),oM=Wj(`crosshair`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]),sM=Wj(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),cM=Wj(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),lM=Wj(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),uM=Wj(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),dM=Wj(`file-code-corner`,[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]]),fM=Wj(`file-diff`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]),pM=Wj(`file-exclamation-point`,[[`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:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),mM=Wj(`file-search`,[[`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`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]),hM=Wj(`file-text`,[[`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`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),gM=Wj(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),_M=Wj(`git-commit-vertical`,[[`path`,{d:`M12 3v6`,key:`1holv5`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M12 15v6`,key:`a9ows0`}]]),vM=Wj(`git-compare-arrows`,[[`circle`,{cx:`5`,cy:`6`,r:`3`,key:`1qnov2`}],[`path`,{d:`M12 6h5a2 2 0 0 1 2 2v7`,key:`1yj91y`}],[`path`,{d:`m15 9-3-3 3-3`,key:`1lwv8l`}],[`circle`,{cx:`19`,cy:`18`,r:`3`,key:`1qljk2`}],[`path`,{d:`M12 18H7a2 2 0 0 1-2-2V9`,key:`16sdep`}],[`path`,{d:`m9 15 3 3-3 3`,key:`1m3kbl`}]]),yM=Wj(`git-pull-request-arrow`,[[`circle`,{cx:`5`,cy:`6`,r:`3`,key:`1qnov2`}],[`path`,{d:`M5 9v12`,key:`ih889a`}],[`circle`,{cx:`19`,cy:`18`,r:`3`,key:`1qljk2`}],[`path`,{d:`m15 9-3-3 3-3`,key:`1lwv8l`}],[`path`,{d:`M12 6h5a2 2 0 0 1 2 2v7`,key:`1yj91y`}]]),bM=Wj(`git-pull-request`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]),xM=Wj(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),SM=Wj(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),CM=Wj(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),wM=Wj(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),TM=Wj(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),EM=Wj(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),DM=Wj(`message-square-plus`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),OM=Wj(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),kM=Wj(`monitor`,[[`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`}]]),AM=Wj(`moon`,[[`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`}]]),jM=Wj(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),MM=Wj(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),NM=Wj(`pencil-ruler`,[[`path`,{d:`M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13`,key:`orapub`}],[`path`,{d:`m8 6 2-2`,key:`115y1s`}],[`path`,{d:`m18 16 2-2`,key:`ee94s4`}],[`path`,{d:`m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17`,key:`cfq27r`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),PM=Wj(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),FM=Wj(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),IM=Wj(`reply`,[[`path`,{d:`M20 18v-2a4 4 0 0 0-4-4H4`,key:`5vmcpk`}],[`path`,{d:`m9 17-5-5 5-5`,key:`nvlc11`}]]),LM=Wj(`rotate-ccw-clock`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),RM=Wj(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),zM=Wj(`rows-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]]),BM=Wj(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),VM=Wj(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),HM=Wj(`shapes`,[[`path`,{d:`M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z`,key:`1bo67w`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}],[`circle`,{cx:`17.5`,cy:`17.5`,r:`3.5`,key:`w3z12y`}]]),UM=Wj(`sun`,[[`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`}]]),WM=Wj(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),GM=Wj(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),KM=Wj(`whole-word`,[[`circle`,{cx:`7`,cy:`12`,r:`3`,key:`12clwm`}],[`path`,{d:`M10 9v6`,key:`17i7lo`}],[`circle`,{cx:`17`,cy:`12`,r:`3`,key:`gl7c2s`}],[`path`,{d:`M14 7v8`,key:`dl84cr`}],[`path`,{d:`M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1`,key:`lt2kga`}]]),qM=Wj(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function JM({done:e,children:t,size:n=`0.875rem`}){let r=`absolute inset-0 inline-flex items-center justify-center [transition:opacity_160ms_ease,transform_200ms_cubic-bezier(0.2,0.8,0.2,1)]`;return(0,g.jsxs)(`span`,{className:`relative inline-block size-3.5`,"aria-hidden":`true`,children:[(0,g.jsx)(`span`,{className:Nj(r,e&&`[transform:scale(0.4)] opacity-0`),children:t}),(0,g.jsx)(`span`,{className:Nj(r,e?`[transform:scale(1)_rotate(0)] opacity-100`:`[transform:scale(0.4)_rotate(-30deg)] opacity-0`),children:(0,g.jsx)(Jj,{size:n})})]})}function X({variant:e=`default`,danger:t,icon:n,feedback:r,className:i,...a}){return(0,g.jsx)(`button`,{...a,"data-feedback":r,className:Nj(`inline-flex cursor-pointer items-center gap-1.25 rounded-md border border-border bg-surface px-2.25 py-0.75 leading-[1.2] whitespace-nowrap [transition:background-color_160ms_ease,color_160ms_ease,border-color_160ms_ease,padding_180ms_cubic-bezier(0.2,0.8,0.2,1),opacity_120ms_ease] hover:bg-hover disabled:cursor-default disabled:opacity-50 motion-reduce:transition-none [&_svg]:flex-none`,e===`primary`&&`border-transparent bg-accent text-accent-fg hover:bg-accent`,e===`ghost`&&`border-transparent bg-transparent hover:bg-hover`,t&&`text-danger`,n&&`px-1.25`,r===`confirm`&&(t?`border-transparent bg-danger text-white hover:bg-danger`:`border-transparent bg-accent text-accent-fg hover:bg-accent`),r===`posted`&&`border-transparent bg-add text-canvas hover:bg-add`,r===`copied`&&`border-transparent bg-add text-white hover:bg-add`,i)})}async function YM(e){if(navigator.clipboard&&window.isSecureContext)try{return await navigator.clipboard.writeText(e),!0}catch{}let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.top=`0`,t.style.left=`0`,t.style.opacity=`0`,document.body.appendChild(t),t.focus(),t.select(),t.setSelectionRange(0,e.length);let n=!1;try{n=document.execCommand(`copy`)}catch{n=!1}return document.body.removeChild(t),n}var XM=o(((e,t)=>{var n=`\\\\/`,r=`[^${n}]`,i=0,a=`\\.`,o=`\\+`,s=`\\?`,c=`\\/`,l=`(?=.)`,u=`[^/]`,d=`(?:${c}|$)`,f=`(?:^|${c})`,p=`${a}{1,2}${d}`,m={DOT_LITERAL:a,PLUS_LITERAL:o,QMARK_LITERAL:s,SLASH_LITERAL:c,ONE_CHAR:l,QMARK:u,END_ANCHOR:d,DOTS_SLASH:p,NO_DOT:`(?!${a})`,NO_DOTS:`(?!${f}${p})`,NO_DOT_SLASH:`(?!${a}{0,1}${d})`,NO_DOTS_SLASH:`(?!${p})`,QMARK_NO_DOT:`[^.${c}]`,STAR:`${u}*?`,START_ANCHOR:f,SEP:`/`},h={...m,SLASH_LITERAL:`[${n}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${a}{1,2}(?:[${n}]|$)`,NO_DOT:`(?!${a})`,NO_DOTS:`(?!(?:^|[${n}])${a}{1,2}(?:[${n}]|$))`,NO_DOT_SLASH:`(?!${a}{0,1}(?:[${n}]|$))`,NO_DOTS_SLASH:`(?!${a}{1,2}(?:[${n}]|$))`,QMARK_NO_DOT:`[^.${n}]`,START_ANCHOR:`(?:^|[${n}])`,END_ANCHOR:`(?:[${n}]|$)`,SEP:`\\`};t.exports={DEFAULT_MAX_EXTGLOB_RECURSION:i,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{__proto__:null,alnum:`a-zA-Z0-9`,alpha:`a-zA-Z`,ascii:`\\x00-\\x7F`,blank:` \\t`,cntrl:`\\x00-\\x1F\\x7F`,digit:`0-9`,graph:`\\x21-\\x7E`,lower:`a-z`,print:`\\x20-\\x7E `,punct:`\\-!"#$%&'()\\*+,./:;<=>?@[\\]^_\`{|}~`,space:` \\t\\r\\n\\v\\f`,upper:`A-Z`,word:`A-Za-z0-9_`,xdigit:`A-Fa-f0-9`},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":`*`,"**/**":`**`,"**/**/**":`**`},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:`negate`,open:`(?:(?!(?:`,close:`))${e.STAR})`},"?":{type:`qmark`,open:`(?:`,close:`)?`},"+":{type:`plus`,open:`(?:`,close:`)+`},"*":{type:`star`,open:`(?:`,close:`)*`},"@":{type:`at`,open:`(?:`,close:`)`}}},globChars(e){return e===!0?h:m}}})),ZM=o((e=>{var{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=XM();e.isObject=e=>typeof e==`object`&&!!e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,`\\$1`),e.toPosixSlashes=e=>e.replace(t,`/`),e.isWindows=()=>{if(typeof navigator<`u`&&navigator.platform){let e=navigator.platform.toLowerCase();return e===`win32`||e===`windows`}return typeof process<`u`&&process.platform?process.platform===`win32`:!1},e.removeBackslashes=e=>e.replace(n,e=>e===`\\`?``:e),e.escapeLast=(t,n,r)=>{let i=t.lastIndexOf(n,r);return i===-1?t:t[i-1]===`\\`?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith(`./`)&&(n=n.slice(2),t.prefix=`./`),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?``:`^`}(?:${e})${n.contains?``:`$`}`;return t.negated===!0&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:`/`),r=n[n.length-1];return r===``?n[n.length-2]:r}})),QM=o(((e,t)=>{var n=ZM(),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:h,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:_}=XM(),v=e=>e===l||e===a,y=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let b=t||{},x=e.length-1,S=b.parts===!0||b.tokens===!0||b.scanToEnd===!0,C=[],w=[],T=[],E=e,D=-1,O=0,k=0,A=!1,ee=!1,j=!1,M=!1,N=!1,P=!1,F=!1,I=!1,te=!1,ne=!1,re=0,L,R,z={value:``,depth:0,isGlob:!1},B=()=>D>=x,ie=()=>E.charCodeAt(D+1),ae=()=>(L=R,E.charCodeAt(++D));for(;D<x;){R=ae();let e;if(R===a){F=z.backslashes=!0,R=ae(),R===u&&(P=!0);continue}if(P===!0||R===u){for(re++;B()!==!0&&(R=ae());){if(R===a){F=z.backslashes=!0,ae();continue}if(R===u){re++;continue}if(P!==!0&&R===s&&(R=ae())===s){if(A=z.isBrace=!0,j=z.isGlob=!0,ne=!0,S===!0)continue;break}if(P!==!0&&R===o){if(A=z.isBrace=!0,j=z.isGlob=!0,ne=!0,S===!0)continue;break}if(R===h&&(re--,re===0)){P=!1,A=z.isBrace=!0,ne=!0;break}}if(S===!0)continue;break}if(R===l){if(C.push(D),w.push(z),z={value:``,depth:0,isGlob:!1},ne===!0)continue;if(L===s&&D===O+1){O+=2;continue}k=D+1;continue}if(b.noext!==!0&&(R===p||R===i||R===r||R===m||R===c)&&ie()===d){if(j=z.isGlob=!0,M=z.isExtglob=!0,ne=!0,R===c&&D===O&&(te=!0),S===!0){let e=0;for(;B()!==!0&&(R=ae());){if(R===a){F=z.backslashes=!0,ae();continue}if(R===d){e++;continue}if(R===g&&--e===0){ne=!0;break}}continue}break}if(R===r){if(L===r&&(N=z.isGlobstar=!0),j=z.isGlob=!0,ne=!0,S===!0)continue;break}if(R===m){if(j=z.isGlob=!0,ne=!0,S===!0)continue;break}if(R===f){for(;B()!==!0&&(e=ae());){if(e===a){F=z.backslashes=!0,ae();continue}if(e===_){ee=z.isBracket=!0,j=z.isGlob=!0,ne=!0;break}}if(S===!0)continue;break}if(b.nonegate!==!0&&R===c&&D===O){I=z.negated=!0,O++;continue}if(b.noparen!==!0&&R===d){if(j=z.isGlob=!0,S===!0){let e=1;for(;B()!==!0&&(R=ae());){if(R===a){F=z.backslashes=!0,ae();continue}if(R===d){e++;continue}if(R===g&&--e===0){ne=!0;break}}continue}break}if(j===!0){if(ne=!0,S===!0)continue;break}}b.noext===!0&&(M=!1,j=!1);let oe=E,se=``,ce=``;O>0&&(se=E.slice(0,O),E=E.slice(O),k-=O),oe&&j===!0&&k>0?(oe=E.slice(0,k),ce=E.slice(k)):j===!0?(oe=``,ce=E):oe=E,oe&&oe!==``&&oe!==`/`&&oe!==E&&v(oe.charCodeAt(oe.length-1))&&(oe=oe.slice(0,-1)),b.unescape===!0&&(ce&&=n.removeBackslashes(ce),oe&&F===!0&&(oe=n.removeBackslashes(oe)));let le={prefix:se,input:e,start:O,base:oe,glob:ce,isBrace:A,isBracket:ee,isGlob:j,isExtglob:M,isGlobstar:N,negated:I,negatedExtglob:te};if(b.tokens===!0&&(le.maxDepth=0,v(R)||w.push(z),le.tokens=w),b.parts===!0||b.tokens===!0){let t;for(let n=0;n<C.length;n++){let r=t===void 0?O:t+1,i=C[n],a=e.slice(r,i);b.tokens&&(n===0&&O!==0?(w[n].isPrefix=!0,w[n].value=se):w[n].value=a,y(w[n]),le.maxDepth+=w[n].depth),i>=O&&(T.push(a),t=i)}let n=t===void 0?O:t+1,r=e.slice(n);T.push(r),b.tokens&&t&&t+1<e.length&&(w[w.length-1].value=r,y(w[w.length-1]),le.maxDepth+=w[w.length-1].depth),le.slashes=C,le.parts=T}return le}})),$M=o(((e,t)=>{var n=XM(),r=ZM(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:c}=n,l=(e,t)=>{if(typeof t.expandRange==`function`)return t.expandRange(...e,t);e.sort();let n=`[${e.join(`-`)}]`;try{new RegExp(n)}catch{return e.map(e=>r.escapeRegex(e)).join(`..`)}return n},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,d=e=>{let t=[],n=0,r=0,i=0,a=``,o=!1;for(let s of e){if(o===!0){a+=s,o=!1;continue}if(s===`\\`){a+=s,o=!0;continue}if(s===`"`){i=i===1?0:1,a+=s;continue}if(i===0){if(s===`[`)n++;else if(s===`]`&&n>0)n--;else if(n===0){if(s===`(`)r++;else if(s===`)`&&r>0)r--;else if(s===`|`&&r===0){t.push(a),a=``;continue}}}a+=s}return t.push(a),t},f=e=>{let t=!1;for(let n of e){if(t===!0){t=!1;continue}if(n===`\\`){t=!0;continue}if(/[?*+@!()[\]{}]/.test(n))return!1}return!0},p=e=>{let t=e.trim(),n=!0;for(;n===!0;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),n=!0);if(f(t))return t.replace(/\\(.)/g,`$1`)},m=e=>{let t=e.map(p).filter(Boolean);for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){let r=t[e],i=t[n],a=r[0];if(!(!a||r!==a.repeat(r.length)||i!==a.repeat(i.length))&&(r===i||r.startsWith(i)||i.startsWith(r)))return!0}return!1},h=(e,t=!0)=>{if(e[0]!==`+`&&e[0]!==`*`||e[1]!==`(`)return;let n=0,r=0,i=0,a=!1;for(let o=1;o<e.length;o++){let s=e[o];if(a===!0){a=!1;continue}if(s===`\\`){a=!0;continue}if(s===`"`){i=i===1?0:1;continue}if(i!==1){if(s===`[`){n++;continue}if(s===`]`&&n>0){n--;continue}if(!(n>0)){if(s===`(`){r++;continue}if(s===`)`&&(r--,r===0))return t===!0&&o!==e.length-1?void 0:{type:e[0],body:e.slice(2,o),end:o}}}}},g=e=>`${e.length===1?r.escapeRegex(e[0]):`[${e.map(e=>r.escapeRegex(e)).join(``)}]`}*`,_=e=>{let t=0,n=[];for(;t<e.length;){let r=h(e.slice(t),!1);if(!r||r.type!==`*`)return;let i=d(r.body).map(e=>e.trim());if(i.length!==1)return;let a=p(i[0]);if(!a||a.length!==1)return;n.push(a),t+=r.end+1}if(!(n.length<1))return n},v=e=>{let t=0,n=e.trim(),r=h(n);for(;r;)t++,n=r.body.trim(),r=h(n);return t},y=(e,t)=>{if(t.maxExtglobRecursion===!1)return{risky:!1};let r=typeof t.maxExtglobRecursion==`number`?t.maxExtglobRecursion:n.DEFAULT_MAX_EXTGLOB_RECURSION,i=d(e).map(e=>e.trim());if(i.length>1&&(i.some(e=>e===``)||i.some(e=>/^[*?]+$/.test(e))||m(i)))return{risky:!0};let a=[],o=!1,s=!0;for(let e of i){let t=_(e);if(t){o=!0,a.push(...t);continue}let n=p(e);if(n&&n.length===1){a.push(n);continue}if(s=!1,v(e)>r)return{risky:!0}}return o?s?{risky:!0,safeOutput:g([...new Set(a)])}:{risky:!0}:{risky:!1}},b=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);e=c[e]||e;let d={...t},f=typeof d.maxLength==`number`?Math.min(i,d.maxLength):i,p=e.length;if(p>f)throw SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${f}`);let m={type:`bos`,value:``,output:d.prepend||``},h=[m],g=d.capture?``:`?:`,_=n.globChars(d.windows),v=n.extglobChars(_),{DOT_LITERAL:x,PLUS_LITERAL:S,SLASH_LITERAL:C,ONE_CHAR:w,DOTS_SLASH:T,NO_DOT:E,NO_DOT_SLASH:D,NO_DOTS_SLASH:O,QMARK:k,QMARK_NO_DOT:A,STAR:ee,START_ANCHOR:j}=_,M=e=>`(${g}(?:(?!${j}${e.dot?T:x}).)*?)`,N=d.dot?``:E,P=d.dot?k:A,F=d.bash===!0?M(d):ee;d.capture&&(F=`(${F})`),typeof d.noext==`boolean`&&(d.noextglob=d.noext);let I={input:e,index:-1,start:0,dot:d.dot===!0,consumed:``,output:``,prefix:``,backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:h};e=r.removePrefix(e,I),p=e.length;let te=[],ne=[],re=[],L=m,R,z=()=>I.index===p-1,B=I.peek=(t=1)=>e[I.index+t],ie=I.advance=()=>e[++I.index]||``,ae=()=>e.slice(I.index+1),oe=(e=``,t=0)=>{I.consumed+=e,I.index+=t},se=e=>{I.output+=e.output==null?e.value:e.output,oe(e.value)},ce=()=>{let e=1;for(;B()===`!`&&(B(2)!==`(`||B(3)===`?`);)ie(),I.start++,e++;return e%2!=0&&(I.negated=!0,I.start++,!0)},le=e=>{I[e]++,re.push(e)},ue=e=>{I[e]--,re.pop()},V=e=>{if(L.type===`globstar`){let t=I.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||te.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(I.output=I.output.slice(0,-L.output.length),L.type=`star`,L.value=`*`,L.output=F,I.output+=L.output)}if(te.length&&e.type!==`paren`&&(te[te.length-1].inner+=e.value),(e.value||e.output)&&se(e),L&&L.type===`text`&&e.type===`text`){L.output=(L.output||L.value)+e.value,L.value+=e.value;return}e.prev=L,h.push(e),L=e},de=(e,t)=>{let n={...v[t],conditions:1,inner:``};n.prev=L,n.parens=I.parens,n.output=I.output,n.startIndex=I.index,n.tokensIndex=h.length;let r=(d.capture?`(`:``)+n.open;le(`parens`),V({type:e,value:t,output:I.output?``:w}),V({type:`paren`,extglob:!0,value:ie(),output:r}),te.push(n)},fe=n=>{let i=e.slice(n.startIndex,I.index+1),a=y(e.slice(n.startIndex+2,I.index),d);if((n.type===`plus`||n.type===`star`)&&a.risky){let e=a.safeOutput?(n.output?``:w)+(d.capture?`(${a.safeOutput})`:a.safeOutput):void 0,t=h[n.tokensIndex];t.type=`text`,t.value=i,t.output=e||r.escapeRegex(i);for(let e=n.tokensIndex+1;e<h.length;e++)h[e].value=``,h[e].output=``,delete h[e].suffix;I.output=n.output+t.output,I.backtrack=!0,V({type:`paren`,extglob:!0,value:R,output:``}),ue(`parens`);return}let o=n.close+(d.capture?`)`:``),s;if(n.type===`negate`){let e=F;n.inner&&n.inner.length>1&&n.inner.includes(`/`)&&(e=M(d)),(e!==F||z()||/^\)+$/.test(ae()))&&(o=n.close=`)$))${e}`),n.inner.includes(`*`)&&(s=ae())&&/^\.[^\\/.]+$/.test(s)&&(o=n.close=`)${b(s,{...t,fastpaths:!1}).output})${e})`),n.prev.type===`bos`&&(I.negatedExtglob=!0)}V({type:`paren`,extglob:!0,value:R,output:o}),ue(`parens`)};if(d.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(s,(e,t,r,i,a,o)=>i===`\\`?(n=!0,e):i===`?`?t?t+i+(a?k.repeat(a.length):``):o===0?P+(a?k.repeat(a.length):``):k.repeat(r.length):i===`.`?x.repeat(r.length):i===`*`?t?t+i+(a?F:``):F:t?e:`\\${e}`);return n===!0&&(i=d.unescape===!0?i.replace(/\\/g,``):i.replace(/\\+/g,e=>e.length%2==0?`\\\\`:e?`\\`:``)),i===e&&d.contains===!0?(I.output=e,I):(I.output=r.wrapOutput(i,I,t),I)}for(;!z();){if(R=ie(),R===`\0`)continue;if(R===`\\`){let e=B();if(e===`/`&&d.bash!==!0||e===`.`||e===`;`)continue;if(!e){R+=`\\`,V({type:`text`,value:R});continue}let t=/^\\+/.exec(ae()),n=0;if(t&&t[0].length>2&&(n=t[0].length,I.index+=n,n%2!=0&&(R+=`\\`)),d.unescape===!0?R=ie():R+=ie(),I.brackets===0){V({type:`text`,value:R});continue}}if(I.brackets>0&&(R!==`]`||L.value===`[`||L.value===`[^`)){if(d.posix!==!1&&R===`:`){let e=L.value.slice(1);if(e.includes(`[`)&&(L.posix=!0,e.includes(`:`))){let e=L.value.lastIndexOf(`[`),t=L.value.slice(0,e),n=a[L.value.slice(e+2)];if(n){L.value=t+n,I.backtrack=!0,ie(),!m.output&&h.indexOf(L)===1&&(m.output=w);continue}}}(R===`[`&&B()!==`:`||R===`-`&&B()===`]`)&&(R=`\\${R}`),R===`]`&&(L.value===`[`||L.value===`[^`)&&(R=`\\${R}`),d.posix===!0&&R===`!`&&L.value===`[`&&(R=`^`),L.value+=R,se({value:R});continue}if(I.quotes===1&&R!==`"`){R=r.escapeRegex(R),L.value+=R,se({value:R});continue}if(R===`"`){I.quotes=I.quotes===1?0:1,d.keepQuotes===!0&&V({type:`text`,value:R});continue}if(R===`(`){le(`parens`),V({type:`paren`,value:R});continue}if(R===`)`){if(I.parens===0&&d.strictBrackets===!0)throw SyntaxError(u(`opening`,`(`));let e=te[te.length-1];if(e&&I.parens===e.parens+1){fe(te.pop());continue}V({type:`paren`,value:R,output:I.parens?`)`:`\\)`}),ue(`parens`);continue}if(R===`[`){if(d.nobracket===!0||!ae().includes(`]`)){if(d.nobracket!==!0&&d.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));R=`\\${R}`}else le(`brackets`);V({type:`bracket`,value:R});continue}if(R===`]`){if(d.nobracket===!0||L&&L.type===`bracket`&&L.value.length===1){V({type:`text`,value:R,output:`\\${R}`});continue}if(I.brackets===0){if(d.strictBrackets===!0)throw SyntaxError(u(`opening`,`[`));V({type:`text`,value:R,output:`\\${R}`});continue}ue(`brackets`);let e=L.value.slice(1);if(L.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(R=`/${R}`),L.value+=R,se({value:R}),d.literalBrackets===!1||r.hasRegexChars(e))continue;let t=r.escapeRegex(L.value);if(I.output=I.output.slice(0,-L.value.length),d.literalBrackets===!0){I.output+=t,L.value=t;continue}L.value=`(${g}${t}|${L.value})`,I.output+=L.value;continue}if(R===`{`&&d.nobrace!==!0){le(`braces`);let e={type:`brace`,value:R,output:`(`,outputIndex:I.output.length,tokensIndex:I.tokens.length};ne.push(e),V(e);continue}if(R===`}`){let e=ne[ne.length-1];if(d.nobrace===!0||!e){V({type:`text`,value:R,output:R});continue}let t=`)`;if(e.dots===!0){let e=h.slice(),n=[];for(let t=e.length-1;t>=0&&(h.pop(),e[t].type!==`brace`);t--)e[t].type!==`dots`&&n.unshift(e[t].value);t=l(n,d),I.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=I.output.slice(0,e.outputIndex),r=I.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,R=t=`\\}`,I.output=n;for(let e of r)I.output+=e.output||e.value}V({type:`brace`,value:R,output:t}),ue(`braces`),ne.pop();continue}if(R===`|`){te.length>0&&te[te.length-1].conditions++,V({type:`text`,value:R});continue}if(R===`,`){let e=R,t=ne[ne.length-1];t&&re[re.length-1]===`braces`&&(t.comma=!0,e=`|`),V({type:`comma`,value:R,output:e});continue}if(R===`/`){if(L.type===`dot`&&I.index===I.start+1){I.start=I.index+1,I.consumed=``,I.output=``,h.pop(),L=m;continue}V({type:`slash`,value:R,output:C});continue}if(R===`.`){if(I.braces>0&&L.type===`dot`){L.value===`.`&&(L.output=x);let e=ne[ne.length-1];L.type=`dots`,L.output+=R,L.value+=R,e.dots=!0;continue}if(I.braces+I.parens===0&&L.type!==`bos`&&L.type!==`slash`){V({type:`text`,value:R,output:x});continue}V({type:`dot`,value:R,output:x});continue}if(R===`?`){if(!(L&&L.value===`(`)&&d.noextglob!==!0&&B()===`(`&&B(2)!==`?`){de(`qmark`,R);continue}if(L&&L.type===`paren`){let e=B(),t=R;(L.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(ae()))&&(t=`\\${R}`),V({type:`text`,value:R,output:t});continue}if(d.dot!==!0&&(L.type===`slash`||L.type===`bos`)){V({type:`qmark`,value:R,output:A});continue}V({type:`qmark`,value:R,output:k});continue}if(R===`!`){if(d.noextglob!==!0&&B()===`(`&&(B(2)!==`?`||!/[!=<:]/.test(B(3)))){de(`negate`,R);continue}if(d.nonegate!==!0&&I.index===0){ce();continue}}if(R===`+`){if(d.noextglob!==!0&&B()===`(`&&B(2)!==`?`){de(`plus`,R);continue}if(L&&L.value===`(`||d.regex===!1){V({type:`plus`,value:R,output:S});continue}if(L&&(L.type===`bracket`||L.type===`paren`||L.type===`brace`)||I.parens>0){V({type:`plus`,value:R});continue}V({type:`plus`,value:S});continue}if(R===`@`){if(d.noextglob!==!0&&B()===`(`&&B(2)!==`?`){V({type:`at`,extglob:!0,value:R,output:``});continue}V({type:`text`,value:R});continue}if(R!==`*`){(R===`$`||R===`^`)&&(R=`\\${R}`);let e=o.exec(ae());e&&(R+=e[0],I.index+=e[0].length),V({type:`text`,value:R});continue}if(L&&(L.type===`globstar`||L.star===!0)){L.type=`star`,L.star=!0,L.value+=R,L.output=F,I.backtrack=!0,I.globstar=!0,oe(R);continue}let t=ae();if(d.noextglob!==!0&&/^\([^?]/.test(t)){de(`star`,R);continue}if(L.type===`star`){if(d.noglobstar===!0){oe(R);continue}let n=L.prev,r=n.prev,i=n.type===`slash`||n.type===`bos`,a=r&&(r.type===`star`||r.type===`globstar`);if(d.bash===!0&&(!i||t[0]&&t[0]!==`/`)){V({type:`star`,value:R,output:``});continue}let o=I.braces>0&&(n.type===`comma`||n.type===`brace`),s=te.length&&(n.type===`pipe`||n.type===`paren`);if(!i&&n.type!==`paren`&&!o&&!s){V({type:`star`,value:R,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[I.index+4];if(n&&n!==`/`)break;t=t.slice(3),oe(`/**`,3)}let c=z()||I.parens>0&&t===`)`.repeat(I.parens)&&!te.some(e=>e.type===`negate`);if(n.type===`bos`&&z()){L.type=`globstar`,L.value+=R,L.output=M(d),I.output=L.output,I.globstar=!0,oe(R);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&c){I.output=I.output.slice(0,-(n.output+L.output).length),n.output=`(?:${n.output}`,L.type=`globstar`,L.output=M(d)+(d.strictSlashes?`)`:`|$)`),L.value+=R,I.globstar=!0,I.output+=n.output+L.output,oe(R);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;I.output=I.output.slice(0,-(n.output+L.output).length),n.output=`(?:${n.output}`,L.type=`globstar`,L.output=`${M(d)}${C}|${C}${e})`,L.value+=R,I.output+=n.output+L.output,I.globstar=!0,oe(R+ie()),V({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){L.type=`globstar`,L.value+=R,L.output=`(?:^|${C}|${M(d)}${C})`,I.output=L.output,I.globstar=!0,oe(R+ie()),V({type:`slash`,value:`/`,output:``});continue}I.output=I.output.slice(0,-L.output.length),L.type=`globstar`,L.output=M(d),L.value+=R,I.output+=L.output,I.globstar=!0,oe(R);continue}let n={type:`star`,value:R,output:F};if(d.bash===!0){n.output=`.*?`,(L.type===`bos`||L.type===`slash`)&&(n.output=N+n.output),V(n);continue}if(L&&(L.type===`bracket`||L.type===`paren`)&&d.regex===!0){n.output=R,V(n);continue}(I.index===I.start||L.type===`slash`||L.type===`dot`)&&(L.type===`dot`?(I.output+=D,L.output+=D):d.dot===!0?(I.output+=O,L.output+=O):(I.output+=N,L.output+=N),B()!==`*`&&(I.output+=w,L.output+=w)),V(n)}for(;I.brackets>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));I.output=r.escapeLast(I.output,`[`),ue(`brackets`)}for(;I.parens>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`)`));I.output=r.escapeLast(I.output,`(`),ue(`parens`)}for(;I.braces>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`}`));I.output=r.escapeLast(I.output,`{`),ue(`braces`)}if(d.strictSlashes!==!0&&(L.type===`star`||L.type===`bracket`)&&V({type:`maybe_slash`,value:``,output:`${C}?`}),I.backtrack===!0){I.output=``;for(let e of I.tokens)I.output+=e.output==null?e.value:e.output,e.suffix&&(I.output+=e.suffix)}return I};b.fastpaths=(e,t)=>{let a={...t},o=typeof a.maxLength==`number`?Math.min(i,a.maxLength):i,s=e.length;if(s>o)throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${o}`);e=c[e]||e;let{DOT_LITERAL:l,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:_}=n.globChars(a.windows),v=a.dot?m:p,y=a.dot?h:p,b=a.capture?``:`?:`,x={negated:!1,prefix:``},S=a.bash===!0?`.*?`:g;a.capture&&(S=`(${S})`);let C=e=>e.noglobstar===!0?S:`(${b}(?:(?!${_}${e.dot?f:l}).)*?)`,w=e=>{switch(e){case`*`:return`${v}${d}${S}`;case`.*`:return`${l}${d}${S}`;case`*.*`:return`${v}${S}${l}${d}${S}`;case`*/*`:return`${v}${S}${u}${d}${y}${S}`;case`**`:return v+C(a);case`**/*`:return`(?:${v}${C(a)}${u})?${y}${d}${S}`;case`**/*.*`:return`(?:${v}${C(a)}${u})?${y}${S}${l}${d}${S}`;case`**/.*`:return`(?:${v}${C(a)}${u})?${l}${d}${S}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=w(t[1]);return n?n+l+t[2]:void 0}}},T=w(r.removePrefix(e,x));return T&&a.strictSlashes!==!0&&(T+=`${u}?`),T},t.exports=b})),eN=o(((e,t)=>{var n=QM(),r=$M(),i=ZM(),a=XM(),o=e=>e&&typeof e==`object`&&!Array.isArray(e),s=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>s(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=o(e)&&e.tokens&&e.input;if(e===``||typeof e!=`string`&&!r)throw TypeError(`Expected pattern to be a non-empty string`);let i=t||{},a=i.windows,c=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),l=c.state;delete c.state;let u=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};u=s(i.ignore,e,n)}let d=(n,r=!1)=>{let{isMatch:o,match:d,output:f}=s.test(n,c,t,{glob:e,posix:a}),p={glob:e,state:l,regex:c,posix:a,input:n,output:f,match:d,isMatch:o};return typeof i.onResult==`function`&&i.onResult(p),o===!1?(p.isMatch=!1,r?p:!1):u(n)?(typeof i.onIgnore==`function`&&i.onIgnore(p),p.isMatch=!1,r?p:!1):(typeof i.onMatch==`function`&&i.onMatch(p),!r||p)};return n&&(d.state=l),d};s.test=(e,t,n,{glob:r,posix:a}={})=>{if(typeof e!=`string`)throw TypeError(`Expected input to be a string`);if(e===``)return{isMatch:!1,output:``};let o=n||{},c=o.format||(a?i.toPosixSlashes:null),l=e===r,u=l&&c?c(e):e;return l===!1&&(u=c?c(e):e,l=u===r),(l===!1||o.capture===!0)&&(l=o.matchBase===!0||o.basename===!0?s.matchBase(e,t,n,a):t.exec(u)),{isMatch:!!l,match:l,output:u}},s.matchBase=(e,t,n,r=n&&n.windows)=>(t instanceof RegExp?t:s.makeRe(t,n)).test(i.basename(e,{windows:r})),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,t)=>Array.isArray(e)?e.map(e=>s.parse(e,t)):r(e,{...t,fastpaths:!1}),s.scan=(e,t)=>n(e,t),s.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,c=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(c=`^(?!${c}).*$`);let l=s.toRegex(c,t);return r===!0&&(l.state=e),l},s.makeRe=(e,t={},n=!1,i=!1)=>{if(!e||typeof e!=`string`)throw TypeError(`Expected a non-empty string`);let a={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]===`.`||e[0]===`*`)&&(a.output=r.fastpaths(e,t)),a.output||(a=r(e,t)),s.compileRe(a,t,n,i)},s.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?`i`:``))}catch(e){if(t&&t.debug===!0)throw e;return/$^/}},s.constants=a,t.exports=s})),tN=l(o(((e,t)=>{t.exports=eN()}))(),1),nN=1,rN=8,iN=4,aN=1;function oN(e,t){let n=Array.from(e.toLowerCase()),r=Array.from(t),i=n.length,a=r.length;if(i===0)return 0;if(i>a)return null;let o=r.map(e=>e.toLowerCase()),s=r.map((e,t)=>nN+sN(r[t-1],e)),c=new Float64Array(a).fill(-1/0);for(let e=0;e<i;e++){let t=new Float64Array(a).fill(-1/0),r=-1/0;for(let i=e;i<a;i++)e>0&&(r=Math.max(r-aN,c[i-1])),o[i]===n[e]&&(t[i]=(e===0?0:Math.max(r,c[i-1]+iN))+s[i]);c=t}let l=Math.max(...c);return l===-1/0?null:l}function sN(e,t){return e===void 0?10:!cN.test(e)||lN.test(t)&&!lN.test(e)||uN.test(t)&&!uN.test(e)?rN:0}var cN=/[\p{L}\p{N}]/u,lN=/\p{Lu}/u,uN=/\p{N}/u;function dN(e,t,n){let r=t.trim();if(!r)return[...e];let i=[];for(let t of e){let e=n(t),a=oN(r,e);a!==null&&i.push({item:t,score:a,length:e.length})}return i.sort((e,t)=>t.score-e.score||e.length-t.length).map(e=>e.item)}function fN(e,t){let n=mN(e),{startLine:r,endLine:i}=hN(e);if(n===`new`||!t)return{side:n,startLine:r,endLine:i};let a=[];for(let e=r;e<=i;e++){let n=pN(t,e);if(n==null)return{side:`old`,startLine:r,endLine:i};a.push(n)}return{side:`new`,startLine:a[0],endLine:a[a.length-1]}}function pN(e,t){for(let n of e.hunks){let e=n.deletionStart,r=n.additionStart;for(let i of n.hunkContent)if(i.type===`context`){if(t>=e&&t<e+i.lines)return r+(t-e);e+=i.lines,r+=i.lines}else{if(t>=e&&t<e+i.deletions)return null;e+=i.deletions,r+=i.additions}}return null}function mN(e){return(e.range.endSide??e.range.side)===`deletions`?`old`:`new`}function hN(e){let t=e.range.start,n=e.range.end;return{startLine:Math.min(t,n),endLine:Math.max(t,n)}}function gN(e,t,n){let r=e.split(`
|
|
1594
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function eE(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;eE(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var tE=new Set([`type`,`properties`,`required`,`additionalProperties`]),nE=[`oneOf`,`anyOf`];function rE(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function iE(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!tE.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??rE(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}cb(n,r,e.length===1?e[0]:iE(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=rE(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function aE(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of tE)if(t in e)return;let n=t.filter(e=>nE.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=iE(t);else{let e=n[0],i=nE.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>iE([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,JT(e,r))}function oE(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):JT(i,s),JT(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())eE(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])aE(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}JT(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,cb(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:lE(t,`input`,e.processors),output:lE(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function sE(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return sE(r.element,n);if(r.type===`set`)return sE(r.valueType,n);if(r.type===`lazy`)return sE(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return sE(r.innerType,n);if(r.type===`intersection`)return sE(r.left,n)||sE(r.right,n);if(r.type===`record`||r.type===`map`)return sE(r.keyType,n)||sE(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:sE(r.in,n)||sE(r.out,n);if(r.type===`object`){for(let e in r.shape)if(sE(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(sE(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(sE(e,n))return!0;return!!(r.rest&&sE(r.rest,n))}return!1}var cE=(e,t={})=>n=>{let r=YT({...n,processors:t});return ZT(e,r),$T(r,e),oE(r,e)},lE=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=YT({...i??{},target:a,io:t,processors:n});return ZT(e,o),$T(o,e),oE(o,e)},uE=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},dE=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},fE=(e,t)=>{uE(e,`minimum`,t),dE(e,`maximum`,t)},pE=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},mE=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},hE=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},gE=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},_E=(e,t)=>uE(e,`minimum`,t.minimum),vE=(e,t)=>dE(e,`maximum`,t.maximum),yE=e=>(t,n)=>{gE(t,n.format);let[r,i]=e[n.format];uE(t,`minimum`,r),dE(t,`maximum`,i)},bE={greater_than:(e,t)=>uE(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>dE(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>pE(e,t.value),number_format:yE(Ob),bigint_format:yE(kb),min_length:_E,max_length:vE,length_equals:(e,t)=>fE(e,t.length),min_size:_E,max_size:vE,size_equals:(e,t)=>fE(e,t.size),string_format:(e,t)=>{gE(e,t.format),t.pattern&&mE(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>hE(e,t.mime)};function xE(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)bE[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&uE(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&uE(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&dE(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&dE(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&pE(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&hE(t,i.mime);for(let e of i.patterns??[])mE(t,e);return t}var SE={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},CE=new Map([[EC,lS],[OC,uS]]),wE=e=>CE.get(e)??e,TE=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=xE(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=SE[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(wE);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},EE=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=xE(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):XT(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},DE=(e,t,n,r)=>{n.type=`boolean`},OE=(e,t,n,r)=>{XT(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},kE=(e,t,n,r)=>{n.not={}},AE=(e,t,n,r)=>{let i=e._zod.def,a=eb(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},jE=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(XT(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(XT(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},ME=(e,t,n,r)=>{XT(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},NE=(e,t,n,r)=>{XT(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},PE=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=xE(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=ZT(a.element,t,{...r,path:[...r.path,`items`]})};function FE(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?FE(t.out):t.type===`catch`?FE(t.innerType):e._zod.optin}var IE=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&XT(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)cb(i.properties,e,ZT(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e];return t.io===`input`?FE(n)===void 0:n._zod.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=ZT(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},LE=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>ZT(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},RE=(e,t,n,r)=>{let i=e._zod.def,a=ZT(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=ZT(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)};function zE(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=zE(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>zE(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?xS:bS).source),p):p}var BE=new WeakMap;function VE(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of BE.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=zE(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var HE=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=xE(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=ZT(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)cb(i.patternProperties,wE(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=ZT(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=BE.get(t);n||(n=[],BE.set(t,n),t.deferred.push(()=>VE(t))),n.push(e)}i.additionalProperties=ZT(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&FE(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},UE=(e,t,n,r)=>{let i=e._zod.def,a=ZT(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},WE=(e,t,n,r)=>{let i=e._zod.def;ZT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},GE=Symbol();function KE(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(XT(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),GE):JSON.parse(o)}var qE=(e,t,n,r)=>{let i=e._zod.def;ZT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=KE(i.defaultValue,e,t,n,r);o!==GE&&(n.default=o)},JE=(e,t,n,r)=>{let i=e._zod.def;ZT(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=KE(i.defaultValue,e,t,n,r);o!==GE&&(n._prefault=o)},YE=(e,t,n,r)=>{let i=e._zod.def;ZT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{XT(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},XE=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;ZT(o,t,r);let s=t.seen.get(e);s.ref=o},ZE=(e,t,n,r)=>{let i=e._zod.def;ZT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},QE=(e,t,n,r)=>{let i=e._zod.def;ZT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},$E=new WeakSet([Object.prototype,Error.prototype]);function eD(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var tD=G(`ZodError`,(e,t)=>{Cx.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);$E.has(n)||($E.add(n),eD(n,`format`,e=>t=>Ex(e,t)),eD(n,`flatten`,e=>t=>Tx(e,t)),eD(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,nb,2)}),eD(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,nb,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),nD=Ox(tD),rD=kx(tD),iD=Ax(tD),aD=Mx(tD),oD=Rx(tD),sD=zx(tD),cD=Bx(tD),lD=Vx(tD),uD=Hx(tD),dD=Ux(tD),fD=Wx(tD),pD=Gx(tD);function mD(){hx.localeError||gx(Bw())}function hD(){hx.memoizer||gx({memoizer:Lw()})}var gD=G(`ZodType`,(e,t)=>(mD(),KS.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(hb(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Tb(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(LO(e,t))},superRefine(e,t){return this.check(RO(e,t))},overwrite(e){return this.check(RT(e))},optional(){return yO(this)},exactOptional(){return xO(this)},nullable(){return CO(this)},nullish(){return yO(CO(this))},nonoptional(e){return kO(this,e)},array(){return nO(this)},or(e){return aO([this,e])},and(e){return lO(this,e)},transform(e){return NO(this,_O(e))},default(e){return TO(this,e)},prefault(e){return DO(this,e)},catch(e){return jO(this,e)},pipe(e){return NO(this,e)},readonly(){return FO(this)},describe(e){let t=this.clone();return Ww.add(t,{description:e}),t},meta(...e){if(e.length===0)return Ww.get(this);let t=this.clone();return Ww.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Qb(this,`~standard`,{...YS(this),jsonSchema:{input:lE(this,`input`),output:lE(this,`output`)}})},set"~standard"(e){Zb(this,`~standard`,e)},parse:function e(t,n){return nD(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await rD(this,t,n,{callee:e})},safeParse(e,t){return iD(this,e,t)},async safeParseAsync(e,t){return aD(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Zb(this,`spa`,e)},validate(e,t){return Fx(this,e,t)},validateAsync(e,t){return Lx(this,e,t)},encode:function e(t,n){return oD(this,t,n,{callee:e})},decode:function e(t,n){return sD(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await cD(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await lD(this,t,n,{callee:e})},safeEncode(e,t){return uD(this,e,t)},safeDecode(e,t){return dD(this,e,t)},async safeEncodeAsync(e,t){return fD(this,e,t)},async safeDecodeAsync(e,t){return pD(this,e,t)},toJSONSchema(e){return cE(this,{})(e)},get description(){return Ww.get(this)?.description},get _def(){return this._zod.def}}),_D=G(`_ZodString`,(e,t)=>{XS.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TE(e,t,n,r)},$b({format:e=>xE(e).format??null,minLength:e=>xE(e).minimum??null,maxLength:e=>xE(e).maximum??null},{regex(...e){return this.check(MT(...e))},includes(...e){return this.check(FT(...e))},startsWith(...e){return this.check(IT(...e))},endsWith(...e){return this.check(LT(...e))},min(...e){return this.check(AT(...e))},max(...e){return this.check(kT(...e))},length(...e){return this.check(jT(...e))},nonempty(...e){return this.check(AT(1,...e))},lowercase(e){return this.check(NT(e))},uppercase(e){return this.check(PT(e))},trim(){return this.check(BT())},normalize(...e){return this.check(zT(...e))},toLowerCase(){return this.check(VT())},toUpperCase(){return this.check(HT())},slugify(){return this.check(UT())}})),vD=G(`ZodString`,(e,t)=>{XS.init(e,t),_D.init(e,t)},{email(e){return this.check(Kw(wD,e))},url(e){return this.check(Qw(DD,e))},jwt(e){return this.check(pT(HD,e))},emoji(e){return this.check($w(OD,e))},guid(e){return this.check(qw(TD,e))},uuid(e){return this.check(Jw(ED,e))},uuidv4(e){return this.check(Yw(ED,e))},uuidv6(e){return this.check(Xw(ED,e))},uuidv7(e){return this.check(Zw(ED,e))},nanoid(e){return this.check(eT(kD,e))},cuid(e){return this.check(tT(AD,e))},cuid2(e){return this.check(nT(jD,e))},ulid(e){return this.check(rT(MD,e))},base64(e){return this.check(uT(zD,e))},base64url(e){return this.check(dT(BD,e))},xid(e){return this.check(iT(ND,e))},ksuid(e){return this.check(aT(PD,e))},ipv4(e){return this.check(oT(FD,e))},ipv6(e){return this.check(sT(ID,e))},cidrv4(e){return this.check(cT(LD,e))},cidrv6(e){return this.check(lT(RD,e))},e164(e){return this.check(fT(VD,e))},datetime(e){return this.check(mT(bD,e))},date(e){return this.check(hT(xD,e))},time(e){return this.check(gT(SD,e))},duration(e){return this.check(_T(CD,e))}});function K(e){return Gw(vD,e)}var yD=G(`ZodStringFormat`,(e,t)=>{ZS.init(e,t),_D.init(e,t)}),bD=G(`ZodISODateTime`,(e,t)=>{mC.init(e,t),yD.init(e,t)}),xD=G(`ZodISODate`,(e,t)=>{hC.init(e,t),yD.init(e,t)}),SD=G(`ZodISOTime`,(e,t)=>{gC.init(e,t),yD.init(e,t)}),CD=G(`ZodISODuration`,(e,t)=>{_C.init(e,t),yD.init(e,t)}),wD=G(`ZodEmail`,(e,t)=>{eC.init(e,t),yD.init(e,t)}),TD=G(`ZodGUID`,(e,t)=>{QS.init(e,t),yD.init(e,t)}),ED=G(`ZodUUID`,(e,t)=>{$S.init(e,t),yD.init(e,t)}),DD=G(`ZodURL`,(e,t)=>{oC.init(e,t),yD.init(e,t)}),OD=G(`ZodEmoji`,(e,t)=>{sC.init(e,t),yD.init(e,t)}),kD=G(`ZodNanoID`,(e,t)=>{cC.init(e,t),yD.init(e,t)}),AD=G(`ZodCUID`,(e,t)=>{lC.init(e,t),yD.init(e,t)}),jD=G(`ZodCUID2`,(e,t)=>{uC.init(e,t),yD.init(e,t)}),MD=G(`ZodULID`,(e,t)=>{dC.init(e,t),yD.init(e,t)}),ND=G(`ZodXID`,(e,t)=>{fC.init(e,t),yD.init(e,t)}),PD=G(`ZodKSUID`,(e,t)=>{pC.init(e,t),yD.init(e,t)}),FD=G(`ZodIPv4`,(e,t)=>{vC.init(e,t),yD.init(e,t)}),ID=G(`ZodIPv6`,(e,t)=>{xC.init(e,t),yD.init(e,t)}),LD=G(`ZodCIDRv4`,(e,t)=>{SC.init(e,t),yD.init(e,t)}),RD=G(`ZodCIDRv6`,(e,t)=>{wC.init(e,t),yD.init(e,t)}),zD=G(`ZodBase64`,(e,t)=>{DC.init(e,t),yD.init(e,t)}),BD=G(`ZodBase64URL`,(e,t)=>{AC.init(e,t),yD.init(e,t)}),VD=G(`ZodE164`,(e,t)=>{jC.init(e,t),yD.init(e,t)}),HD=G(`ZodJWT`,(e,t)=>{NC.init(e,t),yD.init(e,t)}),UD=G(`ZodNumber`,(e,t)=>{PC.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>EE(e,t,n,r),e.isFinite=!0},$b({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=xE(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=xE(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=xE(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>xE(e).format??null},{gt(e,t){return this.check(ET(e,t))},gte(e,t){return this.check(DT(e,t))},min(e,t){return this.check(DT(e,t))},lt(e,t){return this.check(wT(e,t))},lte(e,t){return this.check(TT(e,t))},max(e,t){return this.check(TT(e,t))},int(e){return this.check(KD(e))},safe(e){return this.check(KD(e))},positive(e){return this.check(ET(0,e))},nonnegative(e){return this.check(DT(0,e))},negative(e){return this.check(wT(0,e))},nonpositive(e){return this.check(TT(0,e))},multipleOf(e,t){return this.check(OT(e,t))},step(e,t){return this.check(OT(e,t))},finite(){return this}}));function WD(e){return vT(UD,e)}var GD=G(`ZodNumberFormat`,(e,t)=>{FC.init(e,t),UD.init(e,t)});function KD(e){return yT(GD,e)}var qD=G(`ZodBoolean`,(e,t)=>{IC.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DE(e,t,n,r)});function JD(e){return bT(qD,e)}var YD=G(`ZodUndefined`,(e,t)=>{LC.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OE(e,t,n,r)});function XD(e){return xT(YD,e)}var ZD=G(`ZodUnknown`,(e,t)=>{RC.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function QD(){return ST(ZD)}var $D=G(`ZodNever`,(e,t)=>{zC.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kE(e,t,n,r)});function eO(e){return CT($D,e)}var tO=G(`ZodArray`,(e,t)=>{hD(),VC.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PE(e,t,n,r),e.element=t.element},{min(e,t){return this.check(AT(e,t))},nonempty(e){return this.check(AT(1,e))},max(e,t){return this.check(kT(e,t))},length(e,t){return this.check(jT(e,t))},unwrap(){return this.element}});function nO(e,t){return WT(tO,e,t)}var rO=G(`ZodObject`,(e,t)=>{hD(),qC.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>IE(e,t,n,r),ox(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return pO(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(hb(this._zod.def,{catchall:e}))},passthrough(){return this.clone(hb(this._zod.def,{catchall:QD()}))},loose(){return this.clone(hb(this._zod.def,{catchall:QD()}))},strict(){return this.clone(hb(this._zod.def,{catchall:eO()}))},strip(){return this.clone(hb(this._zod.def,{catchall:void 0}))},extend(e){return Nb(this,e)},safeExtend(e){return Fb(this,e)},merge(e){return Ib(this,e)},pick(e){return Ab(this,e)},omit(e){return Mb(this,e)},partial(...e){return Lb(vO,this,e[0])},exactPartial(...e){return Lb(bO,this,e[0],`exactPartial`)},required(...e){return Rb(OO,this,e[0])}});function q(e,t){return new rO({type:`object`,shape:e??{},...W(t)})}var iO=G(`ZodUnion`,(e,t)=>{YC.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LE(e,t,n,r),e.options=t.options});function aO(e,t){return new iO({type:`union`,options:e,...W(t)})}var oO=G(`ZodDiscriminatedUnion`,(e,t)=>{iO.init(e,t),ZC.init(e,t)});function sO(e,t,n){return new oO({type:`union`,options:t,discriminator:e,...W(n)})}var cO=G(`ZodIntersection`,(e,t)=>{QC.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RE(e,t,n,r)});function lO(e,t){return new cO({type:`intersection`,left:e,right:t})}var uO=G(`ZodRecord`,(e,t)=>{hD(),tw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>HE(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function dO(e,t,n){return new uO({type:`record`,keyType:e,valueType:t,...W(n),partial:!0})}var fO=G(`ZodEnum`,(e,t)=>{nw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>AE(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new fO({...t,checks:[],...W(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new fO({...t,checks:[],...W(r),entries:i})}});function pO(e,t){return new fO({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...W(t)})}var mO=G(`ZodLiteral`,(e,t)=>{rw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jE(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function hO(e,t){return new mO({type:`literal`,values:Array.isArray(e)?e:[e],...W(t)})}var gO=G(`ZodTransform`,(e,t)=>{hD(),iw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>NE(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new mx(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Yb(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Yb(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function _O(e){return new gO({type:`transform`,transform:e})}var vO=G(`ZodOptional`,(e,t)=>{ow.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function yO(e){return new vO({type:`optional`,innerType:e})}var bO=G(`ZodExactOptional`,(e,t)=>{sw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function xO(e){return new bO({type:`optional`,innerType:e})}var SO=G(`ZodNullable`,(e,t)=>{cw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>UE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function CO(e){return new SO({type:`nullable`,innerType:e})}var wO=G(`ZodDefault`,(e,t)=>{lw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function TO(e,t){return new wO({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Sb(t)}})}var EO=G(`ZodPrefault`,(e,t)=>{dw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>JE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function DO(e,t){return new EO({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Sb(t)}})}var OO=G(`ZodNonOptional`,(e,t)=>{fw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>WE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function kO(e,t){return new OO({type:`nonoptional`,innerType:e,...W(t)})}var AO=G(`ZodCatch`,(e,t)=>{hw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>YE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function jO(e,t){return new AO({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:cx(t)})}var MO=G(`ZodPipe`,(e,t)=>{gw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>XE(e,t,n,r),e.in=t.in,e.out=t.out});function NO(e,t){return new MO({type:`pipe`,in:e,out:t})}var PO=G(`ZodReadonly`,(e,t)=>{vw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function FO(e){return new PO({type:`readonly`,innerType:e})}var IO=G(`ZodCustom`,(e,t)=>{bw.init(e,t),gD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ME(e,t,n,r)});function LO(e,t={}){return GT(IO,e,t)}function RO(e,t){return KT(e,t)}var zO=$y(),BO=pO([`c`,`cpp`,`go`,`haskell`,`java`,`javascript`,`javascriptreact`,`json`,`jsonc`,`lua`,`nix`,`ocaml`,`php`,`python`,`ruby`,`rust`,`shellscript`,`swift`,`terraform`,`toml`,`typescript`,`typescriptreact`,`yaml`,`zig`]),VO=pO([`old`,`new`]),HO=sO(`kind`,[q({kind:hO(`working`)}),q({kind:hO(`pr`),pr:K().optional()}),q({kind:hO(`revspec`),args:K().array()}),q({kind:hO(`focus`),commit:K().nullable()}),q({kind:hO(`interdiff`),from:WD().int().positive(),to:WD().int().positive()}),q({kind:hO(`range-diff`),args:K().array()}),q({kind:hO(`pair`),commit:K().nullable()})]),UO=q({n:WD(),oldSha:K(),newSha:K(),recordedAt:WD()}),WO=pO([`direct`,`merge-base`,`parent`]),GO=q({old:K(),new:K(),base:WO,live:pO([`worktree`,`refs`,`none`]),commentKey:K()}),KO=q({sha:K(),short:K(),message:K()}),qO=KO.extend({parent:K().nullable(),child:K().nullable()}),JO=KO.extend({author:K(),email:K(),date:WD()}),YO=pO([`identical`,`changed`,`message`,`added`,`dropped`]),XO=q({old:JO.nullable(),new:JO.nullable(),status:YO}),ZO=q({old:K(),new:K(),oldSha:K(),newSha:K(),iteration:WD().nullable()}),QO=q({from:ZO,to:ZO,conflicts:K().array(),pairs:XO.array()}),$O=q({old:K().nullable(),new:K(),conflicts:K().array()}),ek=GO.extend({within:GO.optional(),interdiff:QO.optional(),pair:$O.optional()});function tk(e){if(e.within&&e.interdiff){let{from:t,to:n}=e.interdiff,r=rk(e),i=r?`${tk(e.within)} #${r.from}→#${r.to}`:`${nk(t)} → ${nk(n)}`;return e.pair?`${i} @ ${e.pair.new.slice(0,7)}`:i}return e.within?`${tk(e.within)} @ ${e.new.slice(0,7)}`:e.base===`parent`?`${e.new.slice(0,7)}^!`:`${ik(e.old)}${e.base===`merge-base`?`...`:`..`}${ik(e.new)}`}function nk(e){let t=e=>/^[0-9a-f]{40}$/.test(e)?e.slice(0,7):ik(e);return`${t(e.old)}..${t(e.new)}`}function rk(e){let t=e.interdiff;return t&&t.from.iteration!=null&&t.to.iteration!=null?{from:t.from.iteration,to:t.to.iteration}:null}function ik(e){return e.replace(/^refs\/diffle\/[^/]+\/\d+\/(?:base|head)\//,``).replace(/^refs\/(?:heads|remotes)\//,``)}var ak=q({repository:K(),number:WD(),url:K(),title:K(),state:pO([`OPEN`,`CLOSED`,`MERGED`]),isDraft:JD()}),ok=q({version:WD(),repository:K().nullable(),pullRequest:ak.nullable(),reason:K().nullable()}),sk=pO([`A`,`M`,`D`,`R`,`C`,`T`,`U`]),ck=q({path:K(),oldPath:K().optional(),status:sk,additions:WD(),deletions:WD(),binary:JD(),blob:K(),oldBlob:K(),generated:JD(),submodule:hO(!0).optional()}),lk=q({list:JO.array(),total:WD(),oldSha:K(),newSha:K()}),uk=q({root:K(),mode:ek,version:WD(),oldSha:K(),newSha:K(),headSha:K(),context:WD(),changed:ck.array(),tree:K().array(),commit:qO.nullable(),commits:lk,iterations:UO.array()}),dk=q({version:WD(),oldSha:K(),newSha:K()}),fk=q({paths:K().array().max(200)}),pk=q({path:K(),contents:K(),binary:JD()}),mk=sO(`kind`,[q({kind:hO(`line`),path:K(),side:VO,startLine:WD(),endLine:WD(),quoted:K()}),q({kind:hO(`file`),path:K()})]),hk=q({id:K(),body:K(),createdAt:WD(),updatedAt:WD()}),gk=q({id:K(),anchor:mk,messages:hk.array().min(1),resolved:JD(),resolvedAt:WD().optional(),stale:JD(),staleFromLine:WD().optional()}),_k=q({path:K().min(1),side:VO.optional(),startLine:WD().int().positive().optional(),endLine:WD().int().positive().optional(),body:K().refine(e=>e.trim().length>0,`body required`),quoted:K().optional()}).refine(e=>e.startLine==null||e.endLine==null||e.endLine>=e.startLine,{path:[`endLine`],message:`endLine must be ≥ startLine`}).refine(e=>e.startLine!=null||e.side==null&&e.endLine==null&&e.quoted==null,{path:[`startLine`],message:`side, endLine and quoted need a startLine; leave all four out for a comment on the whole file`}),vk=q({body:K().refine(e=>e.trim().length>0,`body required`)}),yk=pO([`open`,`resolved`,`all`]),bk=q({threadIds:K().array().optional()}),xk=q({url:K(),posted:WD(),updated:WD(),review:pO([`created`,`existing`]),skipped:q({id:K(),reason:K()}).array()});q({state:yk.optional(),path:K().optional()});var Sk=q({body:K()}),Ck=q({path:K(),blob:K(),viewed:JD()}),wk=q({old:KO.nullable(),new:KO.nullable()}),Tk=q({defaultBranch:K().nullable(),current:K().nullable(),branches:K().array(),remoteBranches:K().array(),tags:K().array(),recent:q({sha:K(),short:K(),subject:K()}).array()}),Ek=q({path:K(),line:WD(),text:K()}),Dk=pO([`file`,`diff`,`repo`]),Ok=pO([`diff`,`full`]),kk=q({query:K(),matches:Ek.array(),truncated:JD()}),Ak=pO([`on`,`auto`,`off`]),jk=q({autoViewed:K().array(),contextLines:WD(),followRefs:Ak,lspCommands:dO(BO,K())}),Mk={autoViewed:[],contextLines:5,followRefs:`auto`,lspCommands:{}},Nk=q({path:K().min(1),line:WD().int().positive(),col:WD().int().nonnegative()}),Pk=Nk.extend({text:K(),external:hO(!0).optional()}),Fk=q({name:K(),command:K(),state:pO([`starting`,`ready`,`unavailable`]),message:K().optional(),activity:K().array().optional(),notice:q({severity:pO([`warning`,`error`]),message:K()}).optional(),stderr:K().optional()}).extend({languages:BO.array()}),Ik=q({language:BO,tried:K().array()}),Lk=q({enabled:JD(),servers:Fk.array(),missing:Ik.array()}),Rk=q({locations:Pk.array()}),zk=q({contents:K().nullable(),range:q({line:WD(),col:WD(),endLine:WD(),endCol:WD()}).optional()}),Bk=q({kind:K().nullable()}),Vk=q({occurrences:q({line:WD().int().positive(),col:WD().int().nonnegative(),endLine:WD().int().positive(),endCol:WD().int().nonnegative(),kind:pO([`text`,`read`,`write`])}).array()}),Hk=q({name:K(),kind:WD(),container:K().optional(),path:K(),line:WD(),endLine:WD(),col:WD()});pO([`unviewed`,`viewed`,`restale`]);var Uk=sO(`type`,[q({type:hO(`snapshot`),version:WD()}),q({type:hO(`moved`),moved:dk.nullable()}),q({type:hO(`threads`)}),q({type:hO(`viewed`)}),q({type:hO(`config`)}),q({type:hO(`lsp`),payload:Lk})]);function Wk(e){return e.newSha===`worktree`||e.headSha!==``&&e.newSha===e.headSha}var Gk={bash:`shellscript`,c:`c`,cc:`cpp`,cjs:`javascript`,cpp:`cpp`,cts:`typescript`,cxx:`cpp`,go:`go`,h:`c`,hh:`cpp`,hpp:`cpp`,hs:`haskell`,hxx:`cpp`,java:`java`,js:`javascript`,jsx:`javascriptreact`,json:`json`,jsonc:`jsonc`,lua:`lua`,mjs:`javascript`,ml:`ocaml`,mli:`ocaml`,mts:`typescript`,nix:`nix`,php:`php`,py:`python`,pyi:`python`,rb:`ruby`,rs:`rust`,sh:`shellscript`,swift:`swift`,tf:`terraform`,tfvars:`terraform`,toml:`toml`,ts:`typescript`,tsx:`typescriptreact`,yaml:`yaml`,yml:`yaml`,zig:`zig`};[...new Set(Object.values(Gk))].sort();function Kk(e){let t=/\.([^./\\]+)$/.exec(e)?.[1]?.toLowerCase();return t&&Gk[t]||null}function qk(e,t){if(!e.enabled)return`Language servers are off for this run (--no-lsp)`;if(t==null)return e.servers.length?e.servers.some(e=>e.state===`ready`)?null:Jk(e.servers[0]):Yk(e);let n=Kk(t);if(!n)return`No language server for ${/(\.[^./\\]+)$/.exec(t)?.[1]??`these`} files`;let r=e.servers.find(e=>e.languages.includes(n));return r?r.state===`ready`?null:Jk(r):Yk(e,n)}function Jk(e){return e.state===`starting`?`${e.name} is starting…`:`${e.name} is unavailable: ${e.message??`unknown error`}`}function Yk(e,t){let n=t==null?e.missing:e.missing.filter(e=>e.language===t),r=n.filter(e=>e.tried.length>0),i=n.filter(e=>e.tried.length===0).map(e=>e.language);return r.length?`No language server for ${[...new Set(r.map(e=>e.language))].join(`, `)} on PATH: install one of ${[...new Set(r.flatMap(e=>e.tried))].join(`, `)}`:i.length?`The language server for ${i.join(`, `)} is off in your diffle config`:t==null?`No language server runs for this diff`:`No language server runs for ${t}`}var Xk=q({autoViewed:K().array().optional(),contextLines:WD().int().min(0).max(1e4).optional(),followRefs:Ak.optional()}),Zk=q({resolved:JD()}),Qk=q({entries:Ck.array()});q({path:K().min(1),rev:VO}).extend({key:K().min(1)});function $k(e,t,n){let r=e.changed.find(e=>e.path===t);return r?(n===`new`?r.blob:r.oldBlob)||null:[e.newSha,e.oldSha].find(e=>e!==`worktree`)??null}var eA=K().regex(/^[0-9]+$/).transform(Number).pipe(WD().int().nonnegative());q({oldOffset:eA,newOffset:eA});var tA=pO([`0`,`1`]).optional().transform(e=>e===`1`);q({q:K().default(``),scope:Dk.default(`diff`),content:Ok.default(`diff`),path:K().optional(),word:tA,i:tA,re:tA}),q({path:K().min(1).optional(),q:K().optional()}).refine(e=>e.path!=null||e.q!=null,`path or q required`),q({stale:hO(`1`).optional()}),q({path:K().optional()});var nA=q({error:K()});function rA(e,t){return JSON.stringify(e.parse(t))}async function iA(e,t,n){let r=await fetch(new URL(t,location.href).href,{...n,headers:{"content-type":`application/json`,...n?.headers}});if(!r.ok)throw new sA(r.status,await oA(r));return e.parse(r.status===204?void 0:await r.json())}async function aA(e,t){let n=await fetch(new URL(e,location.href).href,t);if(!n.ok)throw new sA(n.status,await oA(n));return n.text()}async function oA(e){try{let t=nA.safeParse(await e.json());return t.success?t.data.error:e.statusText}catch{return e.statusText}}var sA=class extends Error{status;constructor(e,t){super(t),this.status=e}},cA=e=>new URLSearchParams(Object.entries(e).filter(e=>e[1]!=null)).toString(),lA={github:()=>iA(ok,`api/github`),snapshot:()=>iA(uk,`api/snapshot`),moved:()=>iA(dk.nullable(),`api/moved`),reload:()=>iA(uk,`api/reload`,{method:`POST`}),clearIterations:()=>iA(uk,`api/iterations`,{method:`DELETE`}),deleteIteration:e=>iA(uk,`api/iterations/${e}`,{method:`DELETE`}),switchMode:e=>iA(uk,`api/mode`,{method:`POST`,body:rA(HO,e)}),refs:()=>iA(Tk,`api/refs`),lastCommitsPreview:(e,t,n)=>iA(wk,`api/last-commits-preview?${cA({oldOffset:String(e),newOffset:String(t)})}`,{signal:n}),patch:e=>aA(`api/patch?${cA({path:e})}`),patches:e=>aA(`api/patch`,{method:`POST`,headers:{"content-type":`application/json`},body:rA(fk,{paths:e})}),file:(e,t,n)=>iA(pk,`api/file?${cA({path:e,rev:t})}`,{signal:n}),imageUrl:(e,t,n)=>new URL(`api/image?${cA({path:e,rev:t,key:n})}`,location.href).href,search:(e,t={})=>iA(kk,`api/search?${cA({q:e,word:t.word?`1`:void 0,i:t.ignoreCase?`1`:void 0,re:t.regex?`1`:void 0,scope:t.scope,content:t.content,path:t.path})}`),threads:(e={})=>iA(gk.array(),`api/threads?${cA({state:e.state,path:e.path})}`),exportComments:()=>aA(`api/threads/export?${cA({state:`open`})}`),exportComment:(e,t)=>aA(`api/threads/${encodeURIComponent(e)}/messages/${encodeURIComponent(t)}/export`),exportToGithub:e=>iA(xk,`api/github/export`,{method:`POST`,body:rA(bk,e)}),addThread:e=>iA(gk.array(),`api/threads`,{method:`POST`,body:rA(_k,e)}),reply:(e,t)=>iA(gk,`api/threads/${encodeURIComponent(e)}/replies`,{method:`POST`,body:rA(vk,t)}),editMessage:(e,t,n)=>iA(gk,`api/threads/${encodeURIComponent(e)}/messages/${encodeURIComponent(t)}`,{method:`PATCH`,body:rA(Sk,{body:n})}),deleteMessage:(e,t)=>iA(gk.or(XD()),`api/threads/${encodeURIComponent(e)}/messages/${encodeURIComponent(t)}`,{method:`DELETE`}),setResolved:(e,t)=>iA(gk,`api/threads/${encodeURIComponent(e)}/resolved`,{method:`PUT`,body:rA(Zk,{resolved:t})}),deleteThread:e=>iA(XD(),`api/threads/${encodeURIComponent(e)}`,{method:`DELETE`}),clearThreads:()=>iA(XD(),`api/threads`,{method:`DELETE`}),deleteStaleThreads:()=>iA(XD(),`api/threads?stale=1`,{method:`DELETE`}),viewed:()=>iA(Ck.array(),`api/viewed`),setViewedBulk:e=>iA(Ck.array(),`api/viewed/bulk`,{method:`PUT`,body:rA(Qk,{entries:e})}),setViewed:(e,t,n)=>iA(Ck.array(),`api/viewed`,{method:`PUT`,body:rA(Ck,{path:e,blob:t,viewed:n})}),lspStatus:()=>iA(Lk,`api/lsp/status`),lspDefinition:e=>iA(Rk,`api/lsp/definition`,{method:`POST`,body:rA(Nk,e)}),lspTypeDefinition:e=>iA(Rk,`api/lsp/type-definition`,{method:`POST`,body:rA(Nk,e)}),lspHover:e=>iA(zk,`api/lsp/hover`,{method:`POST`,body:rA(Nk,e)}),lspTokenKind:e=>iA(Bk,`api/lsp/token-kind`,{method:`POST`,body:rA(Nk,e)}),lspReferences:e=>iA(Rk,`api/lsp/references`,{method:`POST`,body:rA(Nk,e)}),lspOccurrences:e=>iA(Vk,`api/lsp/occurrences`,{method:`POST`,body:rA(Nk,e)}),lspSymbols:e=>iA(Hk.array(),`api/lsp/symbols?${cA(e)}`),config:()=>iA(jk,`api/config`),saveConfig:e=>iA(jk,`api/config`,{method:`PUT`,body:rA(Xk,e)})};function uA(e,t){let n=null,r=!1,i=500,a=()=>{if(r)return;let o=new URL(`ws`,location.href);o.protocol=o.protocol===`https:`?`wss:`:`ws:`,n=new WebSocket(o.href),n.onopen=()=>{i=500,t()},n.onmessage=t=>{try{e(Uk.parse(JSON.parse(String(t.data))))}catch{}},n.onclose=()=>{r||(setTimeout(a,i),i=Math.min(i*2,1e4))}};return a(),()=>{r=!0,n?.close()}}var dA=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},fA=(e,t)=>({classGroupId:e,validator:t}),pA=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),mA=`-`,hA=[],gA=`arbitrary..`,_A=e=>{let t=bA(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return yA(e);let n=e.split(mA);return vA(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?dA(i,t):t:i||hA}return n[e]||hA}}},vA=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=vA(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(mA):e.slice(t).join(mA),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},yA=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?gA+r:void 0})(),bA=e=>{let{theme:t,classGroups:n}=e;return xA(n,t)},xA=(e,t)=>{let n=pA();for(let r in e){let i=e[r];SA(i,n,r,t)}return n},SA=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];CA(i,t,n,r)}},CA=(e,t,n,r)=>{if(typeof e==`string`){wA(e,t,n);return}if(typeof e==`function`){TA(e,t,n,r);return}EA(e,t,n,r)},wA=(e,t,n)=>{let r=e===``?t:DA(t,e);r.classGroupId=n},TA=(e,t,n,r)=>{if(OA(e)){SA(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(fA(n,e))},EA=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];SA(o,DA(t,a),n,r)}},DA=(e,t)=>{let n=e,r=t.split(mA),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=pA(),n.nextPart.set(t,i)),n=i}return n},OA=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,kA=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},AA=`!`,jA=`:`,MA=[],NA=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),PA=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===jA){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(AA)?(c=s.slice(0,-1),l=!0):s.startsWith(AA)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return NA(t,l,c,u)};if(t){let e=t+jA,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):NA(MA,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},FA=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},IA=e=>({cache:kA(e.cacheSize),parseClassName:PA(e),sortModifiers:FA(e),postfixLookupClassGroupIds:LA(e),..._A(e)}),LA=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},RA=/\s+/,zA=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(RA),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+AA:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},BA=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=VA(n))&&(i&&(i+=` `),i+=r);return i},VA=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=VA(e[r]))&&(n&&(n+=` `),n+=t);return n},HA=(e,...t)=>{let n,r,i,a,o=o=>(n=IA(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=zA(e,n);return i(e,a),a};return a=o,(...e)=>a(BA(...e))},UA=[],WA=e=>{let t=t=>t[e]||UA;return t.isThemeGetter=!0,t},GA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,KA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qA=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,JA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,YA=/\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$/,XA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ZA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,QA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$A=e=>qA.test(e),ej=e=>!!e&&!Number.isNaN(Number(e)),tj=e=>!!e&&Number.isInteger(Number(e)),nj=e=>e.endsWith(`%`)&&ej(e.slice(0,-1)),rj=e=>JA.test(e),ij=()=>!0,aj=e=>YA.test(e)&&!XA.test(e),oj=()=>!1,sj=e=>ZA.test(e),cj=e=>QA.test(e),lj=e=>!J(e)&&!Y(e),uj=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)),dj=e=>Ej(e,Aj,oj),J=e=>GA.test(e),fj=e=>Ej(e,jj,aj),pj=e=>Ej(e,Mj,ej),mj=e=>Ej(e,Pj,ij),hj=e=>Ej(e,Nj,oj),gj=e=>Ej(e,Oj,oj),_j=e=>Ej(e,kj,cj),vj=e=>Ej(e,Fj,sj),Y=e=>KA.test(e),yj=e=>Dj(e,jj),bj=e=>Dj(e,Nj),xj=e=>Dj(e,Oj),Sj=e=>Dj(e,Aj),Cj=e=>Dj(e,kj),wj=e=>Dj(e,Fj,!0),Tj=e=>Dj(e,Pj,!0),Ej=(e,t,n)=>{let r=GA.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Dj=(e,t,n=!1)=>{let r=KA.exec(e);return r?r[1]?t(r[1]):n:!1},Oj=e=>e===`position`||e===`percentage`,kj=e=>e===`image`||e===`url`,Aj=e=>e===`length`||e===`size`||e===`bg-size`,jj=e=>e===`length`,Mj=e=>e===`number`,Nj=e=>e===`family-name`,Pj=e=>e===`number`||e===`weight`,Fj=e=>e===`shadow`,Ij=HA(()=>{let e=WA(`color`),t=WA(`font`),n=WA(`text`),r=WA(`font-weight`),i=WA(`tracking`),a=WA(`leading`),o=WA(`breakpoint`),s=WA(`container`),c=WA(`spacing`),l=WA(`radius`),u=WA(`shadow`),d=WA(`inset-shadow`),f=WA(`text-shadow`),p=WA(`drop-shadow`),m=WA(`blur`),h=WA(`perspective`),g=WA(`aspect`),_=WA(`ease`),v=WA(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Y,J],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Y,J,c],T=()=>[$A,`full`,`auto`,...w()],E=()=>[tj,`none`,`subgrid`,Y,J],D=()=>[`auto`,{span:[`full`,tj,Y,J]},tj,Y,J],O=()=>[tj,`auto`,Y,J],k=()=>[`auto`,`min`,`max`,`fr`,Y,J],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ee=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],j=()=>[`auto`,...w()],M=()=>[$A,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[$A,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],P=()=>[$A,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,Y,J],I=()=>[...b(),xj,gj,{position:[Y,J]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,Sj,dj,{size:[Y,J]}],re=()=>[nj,yj,fj],L=()=>[``,`none`,`full`,l,Y,J],R=()=>[``,ej,yj,fj],z=()=>[`solid`,`dashed`,`dotted`,`double`],B=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ie=()=>[ej,nj,xj,gj],ae=()=>[``,`none`,m,Y,J],oe=()=>[`none`,ej,Y,J],se=()=>[`none`,ej,Y,J],ce=()=>[ej,Y,J],le=()=>[$A,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[rj],breakpoint:[rj],color:[ij],container:[rj],"drop-shadow":[rj],ease:[`in`,`out`,`in-out`],font:[lj],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[rj],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[rj],shadow:[rj],spacing:[`px`,ej],text:[rj],"text-shadow":[rj],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,$A,J,Y,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Y,J]}],"container-named":[uj],columns:[{columns:[ej,J,Y,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[tj,`auto`,Y,J]}],basis:[{basis:[$A,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[ej,$A,`auto`,`initial`,`none`,J]}],grow:[{grow:[``,ej,Y,J]}],shrink:[{shrink:[``,ej,Y,J]}],order:[{order:[tj,`first`,`last`,`none`,Y,J]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...ee(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ee()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...ee(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ee(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...ee(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ee()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:M()}],"inline-size":[{inline:[`auto`,...N()]}],"min-inline-size":[{"min-inline":[`auto`,...N()]}],"max-inline-size":[{"max-inline":[`none`,...N()]}],"block-size":[{block:[`auto`,...P()]}],"min-block-size":[{"min-block":[`auto`,...P()]}],"max-block-size":[{"max-block":[`none`,...P()]}],w:[{w:[s,`screen`,...M()]}],"min-w":[{"min-w":[s,`screen`,`none`,...M()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...M()]}],h:[{h:[`screen`,`lh`,...M()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...M()]}],"max-h":[{"max-h":[`screen`,`lh`,...M()]}],"font-size":[{text:[`base`,n,yj,fj]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Tj,mj]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,nj,J]}],"font-family":[{font:[bj,hj,t]}],"font-features":[{"font-features":[J]}],"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:[i,Y,J]}],"line-clamp":[{"line-clamp":[ej,`none`,Y,pj]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Y,J]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Y,J]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...z(),`wavy`]}],"text-decoration-thickness":[{decoration:[ej,`from-font`,`auto`,Y,fj]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[ej,`auto`,Y,J]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[tj,Y,J]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Y,J]}],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`,Y,J]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},tj,Y,J],radial:[``,Y,J],conic:[tj,Y,J]},Cj,_j]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":R()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...z(),`hidden`,`none`]}],"divide-style":[{divide:[...z(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...z(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[ej,Y,J]}],"outline-w":[{outline:[``,ej,yj,fj]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`none`,u,wj,vj]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,wj,vj]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:R()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[ej,fj]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,wj,vj]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[ej,Y,J]}],"mix-blend":[{"mix-blend":[...B(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":B()}],"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":[ej]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[Y,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[ej]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Y,J]}],filter:[{filter:[``,`none`,Y,J]}],blur:[{blur:ae()}],brightness:[{brightness:[ej,Y,J]}],contrast:[{contrast:[ej,Y,J]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,wj,vj]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,ej,Y,J]}],"hue-rotate":[{"hue-rotate":[ej,Y,J]}],invert:[{invert:[``,ej,Y,J]}],saturate:[{saturate:[ej,Y,J]}],sepia:[{sepia:[``,ej,Y,J]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Y,J]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[ej,Y,J]}],"backdrop-contrast":[{"backdrop-contrast":[ej,Y,J]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,ej,Y,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ej,Y,J]}],"backdrop-invert":[{"backdrop-invert":[``,ej,Y,J]}],"backdrop-opacity":[{"backdrop-opacity":[ej,Y,J]}],"backdrop-saturate":[{"backdrop-saturate":[ej,Y,J]}],"backdrop-sepia":[{"backdrop-sepia":[``,ej,Y,J]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Y,J]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[ej,`initial`,Y,J]}],ease:[{ease:[`linear`,`initial`,_,Y,J]}],delay:[{delay:[ej,Y,J]}],animate:[{animate:[`none`,v,Y,J]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Y,J]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":[`scale-3d`],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[Y,J,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":[`translate-none`],zoom:[{zoom:[tj,Y,J]}],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"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`,Y,J]}],"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":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,Y,J]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[ej,yj,fj,pj]}],stroke:[{stroke:[`none`,...F()]}],"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`]}});function Lj({label:e,onClose:t,className:n,children:r}){return(0,g.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/35`,onMouseDown:e=>e.target===e.currentTarget&&t(),children:(0,g.jsx)(`div`,{role:`dialog`,"aria-label":e,className:Ij(`w-140 max-w-[95vw] rounded-[0.625rem] border border-border bg-canvas p-4 shadow-[0_1rem_3rem_rgba(0,0,0,0.3)]`,n),children:r})})}var Rj=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),zj=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Bj=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Vj=e=>{let t=Bj(e);return t.charAt(0).toUpperCase()+t.slice(1)},Hj={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`},Uj=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Wj=(0,p.createContext)({}),Gj=()=>(0,p.useContext)(Wj),Kj=(0,p.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:m=``}=Gj()??{},h=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,p.createElement)(`svg`,{ref:c,...Hj,width:t??l??Hj.width,height:t??l??Hj.height,stroke:e??f,strokeWidth:h,className:Rj(`lucide`,m,i),...!a&&!Uj(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,p.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),qj=(e,t)=>{let n=(0,p.forwardRef)(({className:n,...r},i)=>(0,p.createElement)(Kj,{ref:i,iconNode:t,className:Rj(`lucide-${zj(Vj(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Vj(e),n},Jj=qj(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),Yj=qj(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Xj=qj(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Zj=qj(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Qj=qj(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),$j=qj(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),eM=qj(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),tM=qj(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),nM=qj(`chevrons-down-up`,[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]),rM=qj(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),iM=qj(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),aM=qj(`clipboard-copy`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2`,key:`4jdomd`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v4`,key:`3hqy98`}],[`path`,{d:`M21 14H11`,key:`1bme5i`}],[`path`,{d:`m15 10-4 4 4 4`,key:`5dvupr`}]]),oM=qj(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),sM=qj(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),cM=qj(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),lM=qj(`crosshair`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]),uM=qj(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),dM=qj(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),fM=qj(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),pM=qj(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),mM=qj(`file-code-corner`,[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]]),hM=qj(`file-diff`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]),gM=qj(`file-exclamation-point`,[[`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:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),_M=qj(`file-search`,[[`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`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]),vM=qj(`file-text`,[[`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`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),yM=qj(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),bM=qj(`git-commit-vertical`,[[`path`,{d:`M12 3v6`,key:`1holv5`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M12 15v6`,key:`a9ows0`}]]),xM=qj(`git-compare-arrows`,[[`circle`,{cx:`5`,cy:`6`,r:`3`,key:`1qnov2`}],[`path`,{d:`M12 6h5a2 2 0 0 1 2 2v7`,key:`1yj91y`}],[`path`,{d:`m15 9-3-3 3-3`,key:`1lwv8l`}],[`circle`,{cx:`19`,cy:`18`,r:`3`,key:`1qljk2`}],[`path`,{d:`M12 18H7a2 2 0 0 1-2-2V9`,key:`16sdep`}],[`path`,{d:`m9 15 3 3-3 3`,key:`1m3kbl`}]]),SM=qj(`git-pull-request-arrow`,[[`circle`,{cx:`5`,cy:`6`,r:`3`,key:`1qnov2`}],[`path`,{d:`M5 9v12`,key:`ih889a`}],[`circle`,{cx:`19`,cy:`18`,r:`3`,key:`1qljk2`}],[`path`,{d:`m15 9-3-3 3-3`,key:`1lwv8l`}],[`path`,{d:`M12 6h5a2 2 0 0 1 2 2v7`,key:`1yj91y`}]]),CM=qj(`git-pull-request`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]),wM=qj(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),TM=qj(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),EM=qj(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),DM=qj(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),OM=qj(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),kM=qj(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),AM=qj(`message-square-plus`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),jM=qj(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),MM=qj(`monitor`,[[`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`}]]),NM=qj(`moon`,[[`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`}]]),PM=qj(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),FM=qj(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),IM=qj(`pencil-ruler`,[[`path`,{d:`M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13`,key:`orapub`}],[`path`,{d:`m8 6 2-2`,key:`115y1s`}],[`path`,{d:`m18 16 2-2`,key:`ee94s4`}],[`path`,{d:`m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17`,key:`cfq27r`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),LM=qj(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),RM=qj(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),zM=qj(`reply`,[[`path`,{d:`M20 18v-2a4 4 0 0 0-4-4H4`,key:`5vmcpk`}],[`path`,{d:`m9 17-5-5 5-5`,key:`nvlc11`}]]),BM=qj(`rotate-ccw-clock`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),VM=qj(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),HM=qj(`rows-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]]),UM=qj(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),WM=qj(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),GM=qj(`shapes`,[[`path`,{d:`M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z`,key:`1bo67w`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}],[`circle`,{cx:`17.5`,cy:`17.5`,r:`3.5`,key:`w3z12y`}]]),KM=qj(`sun`,[[`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`}]]),qM=qj(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),JM=qj(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),YM=qj(`whole-word`,[[`circle`,{cx:`7`,cy:`12`,r:`3`,key:`12clwm`}],[`path`,{d:`M10 9v6`,key:`17i7lo`}],[`circle`,{cx:`17`,cy:`12`,r:`3`,key:`gl7c2s`}],[`path`,{d:`M14 7v8`,key:`dl84cr`}],[`path`,{d:`M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1`,key:`lt2kga`}]]),XM=qj(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function ZM({done:e,children:t,size:n=`0.875rem`}){let r=`absolute inset-0 inline-flex items-center justify-center [transition:opacity_160ms_ease,transform_200ms_cubic-bezier(0.2,0.8,0.2,1)]`;return(0,g.jsxs)(`span`,{className:`relative inline-block size-3.5`,"aria-hidden":`true`,children:[(0,g.jsx)(`span`,{className:Ij(r,e&&`[transform:scale(0.4)] opacity-0`),children:t}),(0,g.jsx)(`span`,{className:Ij(r,e?`[transform:scale(1)_rotate(0)] opacity-100`:`[transform:scale(0.4)_rotate(-30deg)] opacity-0`),children:(0,g.jsx)(Zj,{size:n})})]})}function X({variant:e=`default`,danger:t,icon:n,feedback:r,className:i,...a}){return(0,g.jsx)(`button`,{...a,"data-feedback":r,className:Ij(`inline-flex cursor-pointer items-center gap-1.25 rounded-md border border-border bg-surface px-2.25 py-0.75 leading-[1.2] whitespace-nowrap [transition:background-color_160ms_ease,color_160ms_ease,border-color_160ms_ease,padding_180ms_cubic-bezier(0.2,0.8,0.2,1),opacity_120ms_ease] hover:bg-hover disabled:cursor-default disabled:opacity-50 motion-reduce:transition-none [&_svg]:flex-none`,e===`primary`&&`border-transparent bg-accent text-accent-fg hover:bg-accent`,e===`ghost`&&`border-transparent bg-transparent hover:bg-hover`,t&&`text-danger`,n&&`px-1.25`,r===`confirm`&&(t?`border-transparent bg-danger text-white hover:bg-danger`:`border-transparent bg-accent text-accent-fg hover:bg-accent`),r===`posted`&&`border-transparent bg-add text-canvas hover:bg-add`,r===`copied`&&`border-transparent bg-add text-white hover:bg-add`,i)})}async function QM(e){if(navigator.clipboard&&window.isSecureContext)try{return await navigator.clipboard.writeText(e),!0}catch{}let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.top=`0`,t.style.left=`0`,t.style.opacity=`0`,document.body.appendChild(t),t.focus(),t.select(),t.setSelectionRange(0,e.length);let n=!1;try{n=document.execCommand(`copy`)}catch{n=!1}return document.body.removeChild(t),n}var $M=o(((e,t)=>{var n=`\\\\/`,r=`[^${n}]`,i=0,a=`\\.`,o=`\\+`,s=`\\?`,c=`\\/`,l=`(?=.)`,u=`[^/]`,d=`(?:${c}|$)`,f=`(?:^|${c})`,p=`${a}{1,2}${d}`,m={DOT_LITERAL:a,PLUS_LITERAL:o,QMARK_LITERAL:s,SLASH_LITERAL:c,ONE_CHAR:l,QMARK:u,END_ANCHOR:d,DOTS_SLASH:p,NO_DOT:`(?!${a})`,NO_DOTS:`(?!${f}${p})`,NO_DOT_SLASH:`(?!${a}{0,1}${d})`,NO_DOTS_SLASH:`(?!${p})`,QMARK_NO_DOT:`[^.${c}]`,STAR:`${u}*?`,START_ANCHOR:f,SEP:`/`},h={...m,SLASH_LITERAL:`[${n}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${a}{1,2}(?:[${n}]|$)`,NO_DOT:`(?!${a})`,NO_DOTS:`(?!(?:^|[${n}])${a}{1,2}(?:[${n}]|$))`,NO_DOT_SLASH:`(?!${a}{0,1}(?:[${n}]|$))`,NO_DOTS_SLASH:`(?!${a}{1,2}(?:[${n}]|$))`,QMARK_NO_DOT:`[^.${n}]`,START_ANCHOR:`(?:^|[${n}])`,END_ANCHOR:`(?:[${n}]|$)`,SEP:`\\`};t.exports={DEFAULT_MAX_EXTGLOB_RECURSION:i,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{__proto__:null,alnum:`a-zA-Z0-9`,alpha:`a-zA-Z`,ascii:`\\x00-\\x7F`,blank:` \\t`,cntrl:`\\x00-\\x1F\\x7F`,digit:`0-9`,graph:`\\x21-\\x7E`,lower:`a-z`,print:`\\x20-\\x7E `,punct:`\\-!"#$%&'()\\*+,./:;<=>?@[\\]^_\`{|}~`,space:` \\t\\r\\n\\v\\f`,upper:`A-Z`,word:`A-Za-z0-9_`,xdigit:`A-Fa-f0-9`},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":`*`,"**/**":`**`,"**/**/**":`**`},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:`negate`,open:`(?:(?!(?:`,close:`))${e.STAR})`},"?":{type:`qmark`,open:`(?:`,close:`)?`},"+":{type:`plus`,open:`(?:`,close:`)+`},"*":{type:`star`,open:`(?:`,close:`)*`},"@":{type:`at`,open:`(?:`,close:`)`}}},globChars(e){return e===!0?h:m}}})),eN=o((e=>{var{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=$M();e.isObject=e=>typeof e==`object`&&!!e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,`\\$1`),e.toPosixSlashes=e=>e.replace(t,`/`),e.isWindows=()=>{if(typeof navigator<`u`&&navigator.platform){let e=navigator.platform.toLowerCase();return e===`win32`||e===`windows`}return typeof process<`u`&&process.platform?process.platform===`win32`:!1},e.removeBackslashes=e=>e.replace(n,e=>e===`\\`?``:e),e.escapeLast=(t,n,r)=>{let i=t.lastIndexOf(n,r);return i===-1?t:t[i-1]===`\\`?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith(`./`)&&(n=n.slice(2),t.prefix=`./`),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?``:`^`}(?:${e})${n.contains?``:`$`}`;return t.negated===!0&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:`/`),r=n[n.length-1];return r===``?n[n.length-2]:r}})),tN=o(((e,t)=>{var n=eN(),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:h,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:_}=$M(),v=e=>e===l||e===a,y=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let b=t||{},x=e.length-1,S=b.parts===!0||b.tokens===!0||b.scanToEnd===!0,C=[],w=[],T=[],E=e,D=-1,O=0,k=0,A=!1,ee=!1,j=!1,M=!1,N=!1,P=!1,F=!1,I=!1,te=!1,ne=!1,re=0,L,R,z={value:``,depth:0,isGlob:!1},B=()=>D>=x,ie=()=>E.charCodeAt(D+1),ae=()=>(L=R,E.charCodeAt(++D));for(;D<x;){R=ae();let e;if(R===a){F=z.backslashes=!0,R=ae(),R===u&&(P=!0);continue}if(P===!0||R===u){for(re++;B()!==!0&&(R=ae());){if(R===a){F=z.backslashes=!0,ae();continue}if(R===u){re++;continue}if(P!==!0&&R===s&&(R=ae())===s){if(A=z.isBrace=!0,j=z.isGlob=!0,ne=!0,S===!0)continue;break}if(P!==!0&&R===o){if(A=z.isBrace=!0,j=z.isGlob=!0,ne=!0,S===!0)continue;break}if(R===h&&(re--,re===0)){P=!1,A=z.isBrace=!0,ne=!0;break}}if(S===!0)continue;break}if(R===l){if(C.push(D),w.push(z),z={value:``,depth:0,isGlob:!1},ne===!0)continue;if(L===s&&D===O+1){O+=2;continue}k=D+1;continue}if(b.noext!==!0&&(R===p||R===i||R===r||R===m||R===c)&&ie()===d){if(j=z.isGlob=!0,M=z.isExtglob=!0,ne=!0,R===c&&D===O&&(te=!0),S===!0){let e=0;for(;B()!==!0&&(R=ae());){if(R===a){F=z.backslashes=!0,ae();continue}if(R===d){e++;continue}if(R===g&&--e===0){ne=!0;break}}continue}break}if(R===r){if(L===r&&(N=z.isGlobstar=!0),j=z.isGlob=!0,ne=!0,S===!0)continue;break}if(R===m){if(j=z.isGlob=!0,ne=!0,S===!0)continue;break}if(R===f){for(;B()!==!0&&(e=ae());){if(e===a){F=z.backslashes=!0,ae();continue}if(e===_){ee=z.isBracket=!0,j=z.isGlob=!0,ne=!0;break}}if(S===!0)continue;break}if(b.nonegate!==!0&&R===c&&D===O){I=z.negated=!0,O++;continue}if(b.noparen!==!0&&R===d){if(j=z.isGlob=!0,S===!0){let e=1;for(;B()!==!0&&(R=ae());){if(R===a){F=z.backslashes=!0,ae();continue}if(R===d){e++;continue}if(R===g&&--e===0){ne=!0;break}}continue}break}if(j===!0){if(ne=!0,S===!0)continue;break}}b.noext===!0&&(M=!1,j=!1);let oe=E,se=``,ce=``;O>0&&(se=E.slice(0,O),E=E.slice(O),k-=O),oe&&j===!0&&k>0?(oe=E.slice(0,k),ce=E.slice(k)):j===!0?(oe=``,ce=E):oe=E,oe&&oe!==``&&oe!==`/`&&oe!==E&&v(oe.charCodeAt(oe.length-1))&&(oe=oe.slice(0,-1)),b.unescape===!0&&(ce&&=n.removeBackslashes(ce),oe&&F===!0&&(oe=n.removeBackslashes(oe)));let le={prefix:se,input:e,start:O,base:oe,glob:ce,isBrace:A,isBracket:ee,isGlob:j,isExtglob:M,isGlobstar:N,negated:I,negatedExtglob:te};if(b.tokens===!0&&(le.maxDepth=0,v(R)||w.push(z),le.tokens=w),b.parts===!0||b.tokens===!0){let t;for(let n=0;n<C.length;n++){let r=t===void 0?O:t+1,i=C[n],a=e.slice(r,i);b.tokens&&(n===0&&O!==0?(w[n].isPrefix=!0,w[n].value=se):w[n].value=a,y(w[n]),le.maxDepth+=w[n].depth),i>=O&&(T.push(a),t=i)}let n=t===void 0?O:t+1,r=e.slice(n);T.push(r),b.tokens&&t&&t+1<e.length&&(w[w.length-1].value=r,y(w[w.length-1]),le.maxDepth+=w[w.length-1].depth),le.slashes=C,le.parts=T}return le}})),nN=o(((e,t)=>{var n=$M(),r=eN(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:c}=n,l=(e,t)=>{if(typeof t.expandRange==`function`)return t.expandRange(...e,t);e.sort();let n=`[${e.join(`-`)}]`;try{new RegExp(n)}catch{return e.map(e=>r.escapeRegex(e)).join(`..`)}return n},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,d=e=>{let t=[],n=0,r=0,i=0,a=``,o=!1;for(let s of e){if(o===!0){a+=s,o=!1;continue}if(s===`\\`){a+=s,o=!0;continue}if(s===`"`){i=i===1?0:1,a+=s;continue}if(i===0){if(s===`[`)n++;else if(s===`]`&&n>0)n--;else if(n===0){if(s===`(`)r++;else if(s===`)`&&r>0)r--;else if(s===`|`&&r===0){t.push(a),a=``;continue}}}a+=s}return t.push(a),t},f=e=>{let t=!1;for(let n of e){if(t===!0){t=!1;continue}if(n===`\\`){t=!0;continue}if(/[?*+@!()[\]{}]/.test(n))return!1}return!0},p=e=>{let t=e.trim(),n=!0;for(;n===!0;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),n=!0);if(f(t))return t.replace(/\\(.)/g,`$1`)},m=e=>{let t=e.map(p).filter(Boolean);for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){let r=t[e],i=t[n],a=r[0];if(!(!a||r!==a.repeat(r.length)||i!==a.repeat(i.length))&&(r===i||r.startsWith(i)||i.startsWith(r)))return!0}return!1},h=(e,t=!0)=>{if(e[0]!==`+`&&e[0]!==`*`||e[1]!==`(`)return;let n=0,r=0,i=0,a=!1;for(let o=1;o<e.length;o++){let s=e[o];if(a===!0){a=!1;continue}if(s===`\\`){a=!0;continue}if(s===`"`){i=i===1?0:1;continue}if(i!==1){if(s===`[`){n++;continue}if(s===`]`&&n>0){n--;continue}if(!(n>0)){if(s===`(`){r++;continue}if(s===`)`&&(r--,r===0))return t===!0&&o!==e.length-1?void 0:{type:e[0],body:e.slice(2,o),end:o}}}}},g=e=>`${e.length===1?r.escapeRegex(e[0]):`[${e.map(e=>r.escapeRegex(e)).join(``)}]`}*`,_=e=>{let t=0,n=[];for(;t<e.length;){let r=h(e.slice(t),!1);if(!r||r.type!==`*`)return;let i=d(r.body).map(e=>e.trim());if(i.length!==1)return;let a=p(i[0]);if(!a||a.length!==1)return;n.push(a),t+=r.end+1}if(!(n.length<1))return n},v=e=>{let t=0,n=e.trim(),r=h(n);for(;r;)t++,n=r.body.trim(),r=h(n);return t},y=(e,t)=>{if(t.maxExtglobRecursion===!1)return{risky:!1};let r=typeof t.maxExtglobRecursion==`number`?t.maxExtglobRecursion:n.DEFAULT_MAX_EXTGLOB_RECURSION,i=d(e).map(e=>e.trim());if(i.length>1&&(i.some(e=>e===``)||i.some(e=>/^[*?]+$/.test(e))||m(i)))return{risky:!0};let a=[],o=!1,s=!0;for(let e of i){let t=_(e);if(t){o=!0,a.push(...t);continue}let n=p(e);if(n&&n.length===1){a.push(n);continue}if(s=!1,v(e)>r)return{risky:!0}}return o?s?{risky:!0,safeOutput:g([...new Set(a)])}:{risky:!0}:{risky:!1}},b=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);e=c[e]||e;let d={...t},f=typeof d.maxLength==`number`?Math.min(i,d.maxLength):i,p=e.length;if(p>f)throw SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${f}`);let m={type:`bos`,value:``,output:d.prepend||``},h=[m],g=d.capture?``:`?:`,_=n.globChars(d.windows),v=n.extglobChars(_),{DOT_LITERAL:x,PLUS_LITERAL:S,SLASH_LITERAL:C,ONE_CHAR:w,DOTS_SLASH:T,NO_DOT:E,NO_DOT_SLASH:D,NO_DOTS_SLASH:O,QMARK:k,QMARK_NO_DOT:A,STAR:ee,START_ANCHOR:j}=_,M=e=>`(${g}(?:(?!${j}${e.dot?T:x}).)*?)`,N=d.dot?``:E,P=d.dot?k:A,F=d.bash===!0?M(d):ee;d.capture&&(F=`(${F})`),typeof d.noext==`boolean`&&(d.noextglob=d.noext);let I={input:e,index:-1,start:0,dot:d.dot===!0,consumed:``,output:``,prefix:``,backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:h};e=r.removePrefix(e,I),p=e.length;let te=[],ne=[],re=[],L=m,R,z=()=>I.index===p-1,B=I.peek=(t=1)=>e[I.index+t],ie=I.advance=()=>e[++I.index]||``,ae=()=>e.slice(I.index+1),oe=(e=``,t=0)=>{I.consumed+=e,I.index+=t},se=e=>{I.output+=e.output==null?e.value:e.output,oe(e.value)},ce=()=>{let e=1;for(;B()===`!`&&(B(2)!==`(`||B(3)===`?`);)ie(),I.start++,e++;return e%2!=0&&(I.negated=!0,I.start++,!0)},le=e=>{I[e]++,re.push(e)},ue=e=>{I[e]--,re.pop()},V=e=>{if(L.type===`globstar`){let t=I.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||te.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(I.output=I.output.slice(0,-L.output.length),L.type=`star`,L.value=`*`,L.output=F,I.output+=L.output)}if(te.length&&e.type!==`paren`&&(te[te.length-1].inner+=e.value),(e.value||e.output)&&se(e),L&&L.type===`text`&&e.type===`text`){L.output=(L.output||L.value)+e.value,L.value+=e.value;return}e.prev=L,h.push(e),L=e},de=(e,t)=>{let n={...v[t],conditions:1,inner:``};n.prev=L,n.parens=I.parens,n.output=I.output,n.startIndex=I.index,n.tokensIndex=h.length;let r=(d.capture?`(`:``)+n.open;le(`parens`),V({type:e,value:t,output:I.output?``:w}),V({type:`paren`,extglob:!0,value:ie(),output:r}),te.push(n)},fe=n=>{let i=e.slice(n.startIndex,I.index+1),a=y(e.slice(n.startIndex+2,I.index),d);if((n.type===`plus`||n.type===`star`)&&a.risky){let e=a.safeOutput?(n.output?``:w)+(d.capture?`(${a.safeOutput})`:a.safeOutput):void 0,t=h[n.tokensIndex];t.type=`text`,t.value=i,t.output=e||r.escapeRegex(i);for(let e=n.tokensIndex+1;e<h.length;e++)h[e].value=``,h[e].output=``,delete h[e].suffix;I.output=n.output+t.output,I.backtrack=!0,V({type:`paren`,extglob:!0,value:R,output:``}),ue(`parens`);return}let o=n.close+(d.capture?`)`:``),s;if(n.type===`negate`){let e=F;n.inner&&n.inner.length>1&&n.inner.includes(`/`)&&(e=M(d)),(e!==F||z()||/^\)+$/.test(ae()))&&(o=n.close=`)$))${e}`),n.inner.includes(`*`)&&(s=ae())&&/^\.[^\\/.]+$/.test(s)&&(o=n.close=`)${b(s,{...t,fastpaths:!1}).output})${e})`),n.prev.type===`bos`&&(I.negatedExtglob=!0)}V({type:`paren`,extglob:!0,value:R,output:o}),ue(`parens`)};if(d.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(s,(e,t,r,i,a,o)=>i===`\\`?(n=!0,e):i===`?`?t?t+i+(a?k.repeat(a.length):``):o===0?P+(a?k.repeat(a.length):``):k.repeat(r.length):i===`.`?x.repeat(r.length):i===`*`?t?t+i+(a?F:``):F:t?e:`\\${e}`);return n===!0&&(i=d.unescape===!0?i.replace(/\\/g,``):i.replace(/\\+/g,e=>e.length%2==0?`\\\\`:e?`\\`:``)),i===e&&d.contains===!0?(I.output=e,I):(I.output=r.wrapOutput(i,I,t),I)}for(;!z();){if(R=ie(),R===`\0`)continue;if(R===`\\`){let e=B();if(e===`/`&&d.bash!==!0||e===`.`||e===`;`)continue;if(!e){R+=`\\`,V({type:`text`,value:R});continue}let t=/^\\+/.exec(ae()),n=0;if(t&&t[0].length>2&&(n=t[0].length,I.index+=n,n%2!=0&&(R+=`\\`)),d.unescape===!0?R=ie():R+=ie(),I.brackets===0){V({type:`text`,value:R});continue}}if(I.brackets>0&&(R!==`]`||L.value===`[`||L.value===`[^`)){if(d.posix!==!1&&R===`:`){let e=L.value.slice(1);if(e.includes(`[`)&&(L.posix=!0,e.includes(`:`))){let e=L.value.lastIndexOf(`[`),t=L.value.slice(0,e),n=a[L.value.slice(e+2)];if(n){L.value=t+n,I.backtrack=!0,ie(),!m.output&&h.indexOf(L)===1&&(m.output=w);continue}}}(R===`[`&&B()!==`:`||R===`-`&&B()===`]`)&&(R=`\\${R}`),R===`]`&&(L.value===`[`||L.value===`[^`)&&(R=`\\${R}`),d.posix===!0&&R===`!`&&L.value===`[`&&(R=`^`),L.value+=R,se({value:R});continue}if(I.quotes===1&&R!==`"`){R=r.escapeRegex(R),L.value+=R,se({value:R});continue}if(R===`"`){I.quotes=I.quotes===1?0:1,d.keepQuotes===!0&&V({type:`text`,value:R});continue}if(R===`(`){le(`parens`),V({type:`paren`,value:R});continue}if(R===`)`){if(I.parens===0&&d.strictBrackets===!0)throw SyntaxError(u(`opening`,`(`));let e=te[te.length-1];if(e&&I.parens===e.parens+1){fe(te.pop());continue}V({type:`paren`,value:R,output:I.parens?`)`:`\\)`}),ue(`parens`);continue}if(R===`[`){if(d.nobracket===!0||!ae().includes(`]`)){if(d.nobracket!==!0&&d.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));R=`\\${R}`}else le(`brackets`);V({type:`bracket`,value:R});continue}if(R===`]`){if(d.nobracket===!0||L&&L.type===`bracket`&&L.value.length===1){V({type:`text`,value:R,output:`\\${R}`});continue}if(I.brackets===0){if(d.strictBrackets===!0)throw SyntaxError(u(`opening`,`[`));V({type:`text`,value:R,output:`\\${R}`});continue}ue(`brackets`);let e=L.value.slice(1);if(L.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(R=`/${R}`),L.value+=R,se({value:R}),d.literalBrackets===!1||r.hasRegexChars(e))continue;let t=r.escapeRegex(L.value);if(I.output=I.output.slice(0,-L.value.length),d.literalBrackets===!0){I.output+=t,L.value=t;continue}L.value=`(${g}${t}|${L.value})`,I.output+=L.value;continue}if(R===`{`&&d.nobrace!==!0){le(`braces`);let e={type:`brace`,value:R,output:`(`,outputIndex:I.output.length,tokensIndex:I.tokens.length};ne.push(e),V(e);continue}if(R===`}`){let e=ne[ne.length-1];if(d.nobrace===!0||!e){V({type:`text`,value:R,output:R});continue}let t=`)`;if(e.dots===!0){let e=h.slice(),n=[];for(let t=e.length-1;t>=0&&(h.pop(),e[t].type!==`brace`);t--)e[t].type!==`dots`&&n.unshift(e[t].value);t=l(n,d),I.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=I.output.slice(0,e.outputIndex),r=I.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,R=t=`\\}`,I.output=n;for(let e of r)I.output+=e.output||e.value}V({type:`brace`,value:R,output:t}),ue(`braces`),ne.pop();continue}if(R===`|`){te.length>0&&te[te.length-1].conditions++,V({type:`text`,value:R});continue}if(R===`,`){let e=R,t=ne[ne.length-1];t&&re[re.length-1]===`braces`&&(t.comma=!0,e=`|`),V({type:`comma`,value:R,output:e});continue}if(R===`/`){if(L.type===`dot`&&I.index===I.start+1){I.start=I.index+1,I.consumed=``,I.output=``,h.pop(),L=m;continue}V({type:`slash`,value:R,output:C});continue}if(R===`.`){if(I.braces>0&&L.type===`dot`){L.value===`.`&&(L.output=x);let e=ne[ne.length-1];L.type=`dots`,L.output+=R,L.value+=R,e.dots=!0;continue}if(I.braces+I.parens===0&&L.type!==`bos`&&L.type!==`slash`){V({type:`text`,value:R,output:x});continue}V({type:`dot`,value:R,output:x});continue}if(R===`?`){if(!(L&&L.value===`(`)&&d.noextglob!==!0&&B()===`(`&&B(2)!==`?`){de(`qmark`,R);continue}if(L&&L.type===`paren`){let e=B(),t=R;(L.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(ae()))&&(t=`\\${R}`),V({type:`text`,value:R,output:t});continue}if(d.dot!==!0&&(L.type===`slash`||L.type===`bos`)){V({type:`qmark`,value:R,output:A});continue}V({type:`qmark`,value:R,output:k});continue}if(R===`!`){if(d.noextglob!==!0&&B()===`(`&&(B(2)!==`?`||!/[!=<:]/.test(B(3)))){de(`negate`,R);continue}if(d.nonegate!==!0&&I.index===0){ce();continue}}if(R===`+`){if(d.noextglob!==!0&&B()===`(`&&B(2)!==`?`){de(`plus`,R);continue}if(L&&L.value===`(`||d.regex===!1){V({type:`plus`,value:R,output:S});continue}if(L&&(L.type===`bracket`||L.type===`paren`||L.type===`brace`)||I.parens>0){V({type:`plus`,value:R});continue}V({type:`plus`,value:S});continue}if(R===`@`){if(d.noextglob!==!0&&B()===`(`&&B(2)!==`?`){V({type:`at`,extglob:!0,value:R,output:``});continue}V({type:`text`,value:R});continue}if(R!==`*`){(R===`$`||R===`^`)&&(R=`\\${R}`);let e=o.exec(ae());e&&(R+=e[0],I.index+=e[0].length),V({type:`text`,value:R});continue}if(L&&(L.type===`globstar`||L.star===!0)){L.type=`star`,L.star=!0,L.value+=R,L.output=F,I.backtrack=!0,I.globstar=!0,oe(R);continue}let t=ae();if(d.noextglob!==!0&&/^\([^?]/.test(t)){de(`star`,R);continue}if(L.type===`star`){if(d.noglobstar===!0){oe(R);continue}let n=L.prev,r=n.prev,i=n.type===`slash`||n.type===`bos`,a=r&&(r.type===`star`||r.type===`globstar`);if(d.bash===!0&&(!i||t[0]&&t[0]!==`/`)){V({type:`star`,value:R,output:``});continue}let o=I.braces>0&&(n.type===`comma`||n.type===`brace`),s=te.length&&(n.type===`pipe`||n.type===`paren`);if(!i&&n.type!==`paren`&&!o&&!s){V({type:`star`,value:R,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[I.index+4];if(n&&n!==`/`)break;t=t.slice(3),oe(`/**`,3)}let c=z()||I.parens>0&&t===`)`.repeat(I.parens)&&!te.some(e=>e.type===`negate`);if(n.type===`bos`&&z()){L.type=`globstar`,L.value+=R,L.output=M(d),I.output=L.output,I.globstar=!0,oe(R);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&c){I.output=I.output.slice(0,-(n.output+L.output).length),n.output=`(?:${n.output}`,L.type=`globstar`,L.output=M(d)+(d.strictSlashes?`)`:`|$)`),L.value+=R,I.globstar=!0,I.output+=n.output+L.output,oe(R);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;I.output=I.output.slice(0,-(n.output+L.output).length),n.output=`(?:${n.output}`,L.type=`globstar`,L.output=`${M(d)}${C}|${C}${e})`,L.value+=R,I.output+=n.output+L.output,I.globstar=!0,oe(R+ie()),V({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){L.type=`globstar`,L.value+=R,L.output=`(?:^|${C}|${M(d)}${C})`,I.output=L.output,I.globstar=!0,oe(R+ie()),V({type:`slash`,value:`/`,output:``});continue}I.output=I.output.slice(0,-L.output.length),L.type=`globstar`,L.output=M(d),L.value+=R,I.output+=L.output,I.globstar=!0,oe(R);continue}let n={type:`star`,value:R,output:F};if(d.bash===!0){n.output=`.*?`,(L.type===`bos`||L.type===`slash`)&&(n.output=N+n.output),V(n);continue}if(L&&(L.type===`bracket`||L.type===`paren`)&&d.regex===!0){n.output=R,V(n);continue}(I.index===I.start||L.type===`slash`||L.type===`dot`)&&(L.type===`dot`?(I.output+=D,L.output+=D):d.dot===!0?(I.output+=O,L.output+=O):(I.output+=N,L.output+=N),B()!==`*`&&(I.output+=w,L.output+=w)),V(n)}for(;I.brackets>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));I.output=r.escapeLast(I.output,`[`),ue(`brackets`)}for(;I.parens>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`)`));I.output=r.escapeLast(I.output,`(`),ue(`parens`)}for(;I.braces>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`}`));I.output=r.escapeLast(I.output,`{`),ue(`braces`)}if(d.strictSlashes!==!0&&(L.type===`star`||L.type===`bracket`)&&V({type:`maybe_slash`,value:``,output:`${C}?`}),I.backtrack===!0){I.output=``;for(let e of I.tokens)I.output+=e.output==null?e.value:e.output,e.suffix&&(I.output+=e.suffix)}return I};b.fastpaths=(e,t)=>{let a={...t},o=typeof a.maxLength==`number`?Math.min(i,a.maxLength):i,s=e.length;if(s>o)throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${o}`);e=c[e]||e;let{DOT_LITERAL:l,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:_}=n.globChars(a.windows),v=a.dot?m:p,y=a.dot?h:p,b=a.capture?``:`?:`,x={negated:!1,prefix:``},S=a.bash===!0?`.*?`:g;a.capture&&(S=`(${S})`);let C=e=>e.noglobstar===!0?S:`(${b}(?:(?!${_}${e.dot?f:l}).)*?)`,w=e=>{switch(e){case`*`:return`${v}${d}${S}`;case`.*`:return`${l}${d}${S}`;case`*.*`:return`${v}${S}${l}${d}${S}`;case`*/*`:return`${v}${S}${u}${d}${y}${S}`;case`**`:return v+C(a);case`**/*`:return`(?:${v}${C(a)}${u})?${y}${d}${S}`;case`**/*.*`:return`(?:${v}${C(a)}${u})?${y}${S}${l}${d}${S}`;case`**/.*`:return`(?:${v}${C(a)}${u})?${l}${d}${S}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=w(t[1]);return n?n+l+t[2]:void 0}}},T=w(r.removePrefix(e,x));return T&&a.strictSlashes!==!0&&(T+=`${u}?`),T},t.exports=b})),rN=o(((e,t)=>{var n=tN(),r=nN(),i=eN(),a=$M(),o=e=>e&&typeof e==`object`&&!Array.isArray(e),s=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>s(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=o(e)&&e.tokens&&e.input;if(e===``||typeof e!=`string`&&!r)throw TypeError(`Expected pattern to be a non-empty string`);let i=t||{},a=i.windows,c=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),l=c.state;delete c.state;let u=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};u=s(i.ignore,e,n)}let d=(n,r=!1)=>{let{isMatch:o,match:d,output:f}=s.test(n,c,t,{glob:e,posix:a}),p={glob:e,state:l,regex:c,posix:a,input:n,output:f,match:d,isMatch:o};return typeof i.onResult==`function`&&i.onResult(p),o===!1?(p.isMatch=!1,r?p:!1):u(n)?(typeof i.onIgnore==`function`&&i.onIgnore(p),p.isMatch=!1,r?p:!1):(typeof i.onMatch==`function`&&i.onMatch(p),!r||p)};return n&&(d.state=l),d};s.test=(e,t,n,{glob:r,posix:a}={})=>{if(typeof e!=`string`)throw TypeError(`Expected input to be a string`);if(e===``)return{isMatch:!1,output:``};let o=n||{},c=o.format||(a?i.toPosixSlashes:null),l=e===r,u=l&&c?c(e):e;return l===!1&&(u=c?c(e):e,l=u===r),(l===!1||o.capture===!0)&&(l=o.matchBase===!0||o.basename===!0?s.matchBase(e,t,n,a):t.exec(u)),{isMatch:!!l,match:l,output:u}},s.matchBase=(e,t,n,r=n&&n.windows)=>(t instanceof RegExp?t:s.makeRe(t,n)).test(i.basename(e,{windows:r})),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,t)=>Array.isArray(e)?e.map(e=>s.parse(e,t)):r(e,{...t,fastpaths:!1}),s.scan=(e,t)=>n(e,t),s.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,c=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(c=`^(?!${c}).*$`);let l=s.toRegex(c,t);return r===!0&&(l.state=e),l},s.makeRe=(e,t={},n=!1,i=!1)=>{if(!e||typeof e!=`string`)throw TypeError(`Expected a non-empty string`);let a={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]===`.`||e[0]===`*`)&&(a.output=r.fastpaths(e,t)),a.output||(a=r(e,t)),s.compileRe(a,t,n,i)},s.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?`i`:``))}catch(e){if(t&&t.debug===!0)throw e;return/$^/}},s.constants=a,t.exports=s})),iN=l(o(((e,t)=>{t.exports=rN()}))(),1),aN=1,oN=8,sN=4,cN=1;function lN(e,t){let n=Array.from(e.toLowerCase()),r=Array.from(t),i=n.length,a=r.length;if(i===0)return 0;if(i>a)return null;let o=r.map(e=>e.toLowerCase()),s=r.map((e,t)=>aN+uN(r[t-1],e)),c=new Float64Array(a).fill(-1/0);for(let e=0;e<i;e++){let t=new Float64Array(a).fill(-1/0),r=-1/0;for(let i=e;i<a;i++)e>0&&(r=Math.max(r-cN,c[i-1])),o[i]===n[e]&&(t[i]=(e===0?0:Math.max(r,c[i-1]+sN))+s[i]);c=t}let l=Math.max(...c);return l===-1/0?null:l}function uN(e,t){return e===void 0?10:!dN.test(e)||fN.test(t)&&!fN.test(e)||pN.test(t)&&!pN.test(e)?oN:0}var dN=/[\p{L}\p{N}]/u,fN=/\p{Lu}/u,pN=/\p{N}/u;function mN(e,t,n){let r=t.trim();if(!r)return[...e];let i=[];for(let t of e){let e=n(t),a=lN(r,e);a!==null&&i.push({item:t,score:a,length:e.length})}return i.sort((e,t)=>t.score-e.score||e.length-t.length).map(e=>e.item)}function hN(e,t){let n=_N(e),{startLine:r,endLine:i}=vN(e);if(n===`new`||!t)return{side:n,startLine:r,endLine:i};let a=[];for(let e=r;e<=i;e++){let n=gN(t,e);if(n==null)return{side:`old`,startLine:r,endLine:i};a.push(n)}return{side:`new`,startLine:a[0],endLine:a[a.length-1]}}function gN(e,t){for(let n of e.hunks){let e=n.deletionStart,r=n.additionStart;for(let i of n.hunkContent)if(i.type===`context`){if(t>=e&&t<e+i.lines)return r+(t-e);e+=i.lines,r+=i.lines}else{if(t>=e&&t<e+i.deletions)return null;e+=i.deletions,r+=i.additions}}return null}function _N(e){return(e.range.endSide??e.range.side)===`deletions`?`old`:`new`}function vN(e){let t=e.range.start,n=e.range.end;return{startLine:Math.min(t,n),endLine:Math.max(t,n)}}function yN(e,t,n){let r=e.split(`
|
|
1595
1595
|
`);return r.length&&r[r.length-1]===``&&r.pop(),r.slice(Math.max(0,t-1),Math.max(0,n)).join(`
|
|
1596
|
-
`)}function
|
|
1597
|
-
`),r=
|
|
1596
|
+
`)}function bN(e,t,n){return{kind:`line`,path:e,...t,quoted:yN(n,t.startLine,t.endLine)}}function xN(e,t,n){return`${e?`diff`:`file`}:${t}@${n}`}function SN(e){return e.replace(/^(diff|file):/,``).replace(/@\d+$/,``)}function CN(e,t){return xN(e.fileView?.path!==t&&(e.snapshot?.changed.some(e=>e.path===t)??!1),t,e.gens[t]??0)}var wN=e=>e.additions+e.deletions;function TN(e,t,n,r){let i=new Map(t.map(e=>[e.path,e])),a=e=>n.includes(e)?0:(r(e)?4:2)+ +(wN(i.get(e))>4e3),o=EN(e).filter(e=>i.has(e)).sort((e,t)=>a(e)-a(t)),s=[],c=[],l=0;for(let e of o){let t=wN(i.get(e));c.length>0&&(c.length>=12||l+t>4e3)&&(s.push(c),c=[],l=0),c.push(e),l+=t}return c.length>0&&s.push(c),s}function EN(e){return e.changed.map(e=>e.path).sort(jN)}function DN(e,t,n){let r=new Map(e.changed.map(e=>[e.path,e])),i=EN(e),a=i.indexOf(t);if(a===-1)return null;for(let e of i.slice(a+1)){let t=r.get(e);if(n(t))return t}return null}function ON(e){return e.activePath??e.fileView?.path??(e.snapshot&&EN(e.snapshot)[0])??null}function kN(e){return e.fileView!=null||e.jumpIndex>0}function AN(e){return e.jumpIndex<e.jumps.length-1}function jN(e,t){let n=e.split(`/`),r=t.split(`/`),i=Math.min(n.length,r.length);for(let e=0;e<i;e++){let t=n[e],i=r[e];if(t===i)continue;let a=e<n.length-1;if(a!==e<r.length-1)return a?-1:1;let o=t.toLowerCase(),s=i.toLowerCase(),c=MN(o,s);return c===0?o===s?t<i?-1:1:o<s?-1:1:c}return n.length-r.length}function MN(e,t){let n=NN(e),r=NN(t),i=Math.min(n.length,r.length);for(let e=0;e<i;e++){let t=n[e],i=r[e];if(t===i)continue;if(typeof t==`number`&&typeof i==`number`)return t<i?-1:1;let a=String(t),o=String(i);if(a!==o)return a<o?-1:1}return n.length-r.length}function NN(e){let t=[];for(let n of e.matchAll(/\d+|\D+/g))t.push(/^\d/.test(n[0])?Number(n[0]):n[0]);return t.length===0&&t.push(``),t}function PN(e,t){let n=e.viewed.find(e=>e.path===t.path&&e.blob===t.blob);return n?n.viewed?`viewed`:`unviewed`:e.viewed.some(e=>e.path===t.path&&e.viewed&&e.blob!==t.blob)?`restale`:YN(e.config,t.path)?`viewed`:`unviewed`}function FN(e,t){return PN(e,t)===`viewed`}function IN(e,t){let n=0;for(let r of t)FN(e,r)&&n++;return n}function LN(e,t){let n=t.endsWith(`/`)?t:`${t}/`;return e.filter(e=>e.path.startsWith(n))}function RN(e,t){let n=e.collapsed[t];if(n!=null)return n;let r=e.snapshot?.changed.find(e=>e.path===t);return r?FN(e,r)||r.generated:!1}function zN(e){return e.showResolved?e.threads:e.threads.filter(e=>!e.resolved)}function BN(e){return e.kind===`file`?`whole file`:VN(e)}function VN(e){let t=e.startLine===e.endLine?`${e.startLine}`:`${e.startLine}–${e.endLine}`;return`${e.side===`old`?`removed `:``}L${t}`}function HN(e,t,n){let r=e.loaded[t];return hN(n,r?.kind===`diff`?r.fileDiff:void 0)}function UN(e){let t=e.draft;return t?.selection?HN(e,t.path,t.selection):null}function WN(e,t){return e.find(e=>e.messages.some(e=>e.id===t))}function GN(e,t){if(e===t)return t;let n=new Map(e.map(e=>[e.id,e])),r=e.length===t.length,i=t.map((t,i)=>{let a=n.get(t.id),o=a&&JSON.stringify(a)===JSON.stringify(t)?a:t;return o!==e[i]&&(r=!1),o});return r?e:i}function KN(e,t,n,r){let i=e.replyTo!=null&&n.some(t=>t.id===e.replyTo)?e.replyTo:null,a=e.editingId!=null&&WN(n,e.editingId)?e.editingId:null;return[...n,e.draft?.path===t?e.draft:null,r,i,a]}function qN(e,t){return e&&e.deps.length===t.length&&e.deps.every((e,n)=>e===t[n])?e:{deps:t,version:(e?.version??0)+1}}var JN=new Map;function YN(e,t){let n=e.autoViewed.join(`
|
|
1597
|
+
`),r=JN.get(n);if(!r){let t=e.autoViewed.filter(Boolean);r=t.length?(0,iN.default)(t,{dot:!0,basename:!0}):()=>!1,JN.set(n,r)}return r(t)}function XN(e,t){return mN(e,t,e=>e.name)}var ZN=[null,`refs`,`commits`,`pr`,`commit`,`range-diff`];function QN(e,t){return{kind:`revspec`,args:[`HEAD~${e}..HEAD~${t}`]}}function $N(e){return e===`updated`?`Updated`:e===`unchanged`?`Already added`:`Added`}function eP(e,t){let n=e.mode.within??e.mode,{oldSha:r,newSha:i}=e.commits,a=(e,t,n)=>`${e} ${t.slice(0,7)} → ${n.slice(0,7)}`,o=[];return t.newSha!==i&&o.push(a(ik(n.new),i,t.newSha)),t.oldSha!==r&&o.push(a(n.base===`merge-base`?`merge base`:ik(n.old),r,t.oldSha)),o.join(`, `)}var tP=new Intl.RelativeTimeFormat(void 0,{numeric:`auto`}),nP=[[`day`,864e5],[`hour`,36e5],[`minute`,6e4]];function rP(e,t=Date.now()){let n=t-e;for(let[e,t]of nP)if(n>=t)return tP.format(-Math.round(n/t),e);return`just now`}function iP(e){return e.interdiff?rk(e)?`Comments are off while comparing iterations: leave them on the range itself`:`Comments are off in a range-diff: leave them on either range itself`:null}function aP(e,t,n,r){let[i,a]=e?r?[e.from,n]:[n,e.to]:[n,t],o=i<a?{from:i,to:a}:{from:a,to:i};return o.from===o.to||e&&e.from===o.from&&e.to===o.to?null:o}function oP(e,t,n,r){let i=e.at(-1)?.n;if(i==null)return null;let a=t?n===`lower`?t.from:t.to:i,o=e[e.findIndex(e=>e.n===a)+r];return o?aP(t,i,o.n,n===`higher`):null}function sP(e){let t=e.root.split(/[\\/]/).filter(Boolean);return t[t.length-1]??e.root}function cP(e,t=null){let n=t?.pullRequest;return n?`diffle: ${n.repository} #${n.number}`:`diffle: ${sP(e)}`}var lP=/\.(png|jpe?g|gif|webp|avif|bmp|ico)$/i;function uP(e,t){return lP.test(e)?t?t.status===`A`?`new`:t.status===`D`?`old`:`both`:`new`:null}function dP(e){let t=e.split(`
|
|
1598
1598
|
`).slice(1).join(`
|
|
1599
1599
|
`).trim();return t?t.split(/\n\s*\n/).map(e=>e.split(`
|
|
1600
|
-
`).reduce((e,t)=>/^\s|^([-*+]|\d+[.)])\s/.test(t)?`${e}\n${t}`:`${e} ${t}`,``).slice(1)):[]}function
|
|
1601
|
-
`);return t.length&&t[t.length-1]===``&&t.pop(),t.map((e,t)=>({side:`additions`,line:t+1,hunkStart:t===0}))}function yP(e,t,n,r,i={},a=`unified`,o=null){if(o){if(!o.item)return[];let e=vN(!1,o.path,n[o.path]??0);return[{id:e,path:o.path,collapsed:!1,rows:xP(o.item,i[e],a)}]}let s=[];for(let o of CN(e)){let e=t[o],c=vN(!0,o,n[o]??0);s.push({id:c,path:o,collapsed:r(o),rows:e?xP(e,i[c],a):[]})}return s}var bP=new WeakMap;function xP(e,t,n){let r=e.kind===`diff`?e.fileDiff:e.kind===`file`?e.file:null;if(!r)return[];let i=bP.get(r);if(i&&i.revealed===t&&i.style===n)return i.rows;let a=e.kind===`diff`?gP(e.fileDiff,t,n):vP(e.file.contents);return bP.set(r,{revealed:t,style:n,rows:a}),a}function SP(e,t){if(!t)return null;let n=e.findIndex(e=>e.id===t.id);if(n===-1)return null;let r=t.range.endSide??t.range.side??`additions`,i=e[n].rows,a=i.findIndex(e=>e.line===t.range.end&&e.side===r);if(a===-1&&(a=i.findIndex(e=>e.line===t.range.end)),a===-1){let e=1/0;if(i.forEach((n,i)=>{let o=Math.abs(n.line-t.range.end)+(n.side===r?0:.5);o<e&&(e=o,a=i)}),a===-1)return null}return{itemIndex:n,rowIndex:a}}function CP(e,t,n){if(e.length===0)return null;if(!t)return wP(e,n===1?0:e.length-1,n);if(t.rowIndex===-1){let r=e[t.itemIndex];return r&&!r.collapsed&&r.rows.length>0?{itemIndex:t.itemIndex,rowIndex:n===1?0:r.rows.length-1}:wP(e,t.itemIndex+n,n)??t}let{itemIndex:r,rowIndex:i}=t;for(i+=n;i<0||i>=(e[r]?.rows.length??0);){if(r+=n,r<0||r>=e.length)return t;let a=e[r];if(a.collapsed)return{itemIndex:r,rowIndex:-1};a.rows.length!==0&&(i=n===1?0:a.rows.length-1)}return{itemIndex:r,rowIndex:i}}function wP(e,t,n){for(let r=t;r>=0&&r<e.length;r+=n){let t=e[r];if(t.collapsed)return{itemIndex:r,rowIndex:-1};if(t.rows.length>0)return{itemIndex:r,rowIndex:n===1?0:t.rows.length-1}}return null}function TP(e,t,n){if(e.length===0)return null;let r=t?t.itemIndex+n:n===1?0:e.length-1;return r<0||r>=e.length?t:{itemIndex:r,rowIndex:e[r].collapsed?-1:0}}function EP(e,t,n){let r=[];if(e.forEach((e,t)=>{e.collapsed||e.rows.forEach((e,n)=>e.hunkStart&&r.push({itemIndex:t,rowIndex:n}))}),r.length===0)return t;if(!t)return n===1?r[0]:r[r.length-1];let i=e=>e.itemIndex*1e7+e.rowIndex,a=i(t);return n===1?r.find(e=>i(e)>a)??t:[...r].reverse().find(e=>i(e)<a)??t}function DP(e,t,n){let r=e[t.itemIndex],i=r?.rows[t.rowIndex];if(!r||!i)return null;if(n&&n.itemIndex===t.itemIndex){let e=r.rows[n.rowIndex];if(e)return{id:r.id,range:{start:e.line,side:e.side,end:i.line,endSide:i.side}}}return{id:r.id,range:{start:i.line,side:i.side,end:i.line,endSide:i.side}}}function OP(e){let t=Uk(e);return t===`json`||t===`jsonc`||t===`yaml`||t===`toml`}function kP(e,t){return!e.external&&e.path===t.path&&e.line===t.line&&e.col>=t.col&&e.col<t.col+t.text.length}var AP=null,jP=null,MP=null,NP=null,PP={get:()=>MP??AP,element:()=>MP?NP:jP,set(e,t=null){AP=e,jP=e?t:null},focus(e,t=null){MP=e,NP=e?t:null}},FP={python:`python`,javascript:`javascript`,javascriptreact:`javascript`,typescript:`typescript`,typescriptreact:`tsx`,rust:`rust`,go:`go`,c:`c`,cpp:`cpp`,ruby:`ruby`,java:`java`,lua:`lua`,zig:`zig`,swift:`swift`,php:`php`,shellscript:`bash`,ocaml:`ocaml`};function IP(e){let t=Uk(e);return t&&t in FP?FP[t]:null}var LP=null,RP=!1,zP=0,BP=new Map;function VP(){RP=!0,LP?.terminate(),LP=null;for(let e of BP.values())e(!1);BP.clear()}async function HP(e,t,n,r,i){let a=IP(e);if(!a||RP||typeof Worker>`u`)return!1;try{let o=await i();if(o.length>1e6||RP)return!1;LP||(LP=new Worker(new URL(``+new URL(`syntax.worker-Cc0dIGs8.js`,import.meta.url).href,``+import.meta.url),{type:`module`}),LP.onmessage=({data:e})=>{BP.get(e.id)?.(e.blocked),BP.delete(e.id)},LP.onerror=VP,LP.onmessageerror=VP);let s=++zP;return await new Promise(i=>{let c=setTimeout(VP,5e3);BP.set(s,e=>{clearTimeout(c),i(e)});try{LP.postMessage({id:s,key:`${t}:${e}`,grammar:a,contents:o,line:n,col:r})}catch{VP()}})}catch{return!1}}var UP={light:`github-light-high-contrast`,dark:`github-dark-high-contrast`},WP=`diffle:theme`;function GP(){try{let e=localStorage.getItem(WP);if(e===`light`||e===`dark`||e===`system`)return e}catch{}return`system`}function KP(e){try{localStorage.setItem(WP,e)}catch{}}function qP(e){let t=document.documentElement;e===`system`?(delete t.dataset.theme,t.style.colorScheme=`light dark`):(t.dataset.theme=e,t.style.colorScheme=e)}function JP(e){return e===`system`?`light`:e===`light`?`dark`:`system`}var YP=`diffle:diffStyle`,XP=3500,ZP=[`side-by-side`,`swipe`,`onion`,`difference`],QP=`diffle:imageCompare`;function $P(){try{let e=localStorage.getItem(QP);return ZP.find(t=>t===e)??`side-by-side`}catch{return`side-by-side`}}function eF(){try{return localStorage.getItem(YP)===`unified`?`unified`:`split`}catch{return`split`}}var tF=`diffle:layout`,nF={treeWidth:null,panelWidth:null,treeVisible:!0,panelVisible:!0};function rF(){try{let e=localStorage.getItem(tF);return e?{...nF,...JSON.parse(e)}:nF}catch{return nF}}var Z=hP((e,t)=>{let n=0,r=0,i=e=>e===n,a=0,o=0,s=0,c=null,l=()=>{c&&=(clearTimeout(c.timer),c.wake(),null)},u=new AbortController,d=new Map,f=()=>(u.abort(),u=new AbortController,d.clear(),++n),p=0,m=()=>(p++,f()),h=()=>{let e=0;return{start:()=>++e,latest:t=>t===e}},g=h(),_=h(),v=h(),y=h(),b=()=>{let e=Promise.resolve();return t=>{let n=e.then(t);return e=n.catch(()=>{}),n}},x=b(),S=b(),C=0,w=!1,T=e=>e<=C||!w&&e<=(t().snapshot?.version??0),E=()=>{let e=_.start(),t=v.start();return Promise.all([oA.threads(),oA.viewed()]).then(([n,r])=>({threads:n,viewed:r,tt:e,tv:t}))},D=async(t,n,r)=>{i(n)&&(v.latest(r.tv)&&e({viewed:r.viewed}),_.latest(r.tt)&&je(r.threads),await oe(t,n))},O=async(e,n)=>{let r=f(),a,o=!1;try{if(a=await e(),!i(r)||T(a.version))return;C=a.version,o=!0,await D(a,r,await E())}catch(e){i(r)&&t().report(n,e)}finally{o&&a&&C===a.version&&(C=0)}},k=(e,t)=>{let r=`${n}\0${t}\0${e}`,i=d.get(r);return i||(i=oA.file(e,t,u.signal),d.set(r,i),i.catch(()=>d.delete(r))),i},A=e=>e?.name===`AbortError`,ee=async(e,t)=>{for(;;)try{return await k(e,t)}catch(e){if(!A(e))throw e}},j=e=>e instanceof Error?e.message:String(e),M=(e,n)=>t().flash(`${e} failed: ${j(n)}`),N=async(r,a)=>{let o=t().contents[r]?.[a];if(o!=null)return o;let s=n,c=await ee(r,a);return i(s)&&e(e=>({contents:{...e.contents,[r]:{...e.contents[r],[a]:c.contents}}})),c.contents},P=(e,t)=>{let n={...e.gens};for(let e of t)n[e]=(n[e]??0)+1;let r=r=>{let i=yN(r.id);return t.includes(i)?{...r,id:bN({snapshot:e.snapshot,gens:n,fileView:e.fileView},i)}:r};return{gens:n,selection:e.selection&&r(e.selection),draft:e.draft&&t.includes(e.draft.path)?{...e.draft,selection:e.draft.selection&&r(e.draft.selection)}:e.draft,scrollTarget:e.scrollTarget&&r(e.scrollTarget),reveal:e.reveal&&r(e.reveal)}},F=async(n,r,a)=>{let o=new Map(n.changed.map(e=>[e.path,e])),s=r.filter(e=>o.has(e));if(s.length===0)return;let c={},l=[],u=t().loaded;for(let e of s){let t=o.get(e);t.binary?c[e]={kind:`binary`}:xN(t)>1e4&&u[e]?.kind!==`diff`?c[e]={kind:`oversized`,lines:xN(t)}:l.push(t)}Object.keys(c).length>0&&e(e=>({loaded:{...e.loaded,...c},...P(e,Object.keys(c))}));let d=t();await aF(SN(n,l,[d.fileView?.path,d.activePath,d.selection&&yN(d.selection.id)].filter(e=>e!=null),e=>FN(d,e)),2,()=>!i(a),e=>I(n,e,a))},I=async(t,n,r)=>{let a=new Map(t.changed.map(e=>[e.path,e])),o={},s=new Map;try{let e=Am(n.length===1?await oA.patch(n[0]):await oA.patches(n),`s${t.version}c${t.context}t${Date.now()}`);for(let t of e)for(let e of t.files)s.set(e.name,e);for(let e of n){let t=s.get(e);o[e]=t?{kind:`diff`,fileDiff:t}:{kind:`error`,message:`patch missing for file`}}}catch(e){for(let t of n)o[t]={kind:`error`,message:String(e)}}i(r)&&(e(e=>({loaded:{...e.loaded,...o},...P(e,Object.keys(o))})),re(n.filter(e=>!a.get(e).submodule),s,o,r))},te=[],ne=0,re=(e,t,n,r)=>{for(let i of e){let e=t.get(i);e?.isPartial&&e.hunks.length>0&&(e.type===`change`||e.type===`rename-changed`)&&te.push({path:i,file:e,replaces:n[i],g:r})}for(;ne<4&&ne<te.length;)ne++,L()},L=async()=>{try{for(;;){let e=te.shift();if(!e)return;!i(e.g)||t().loaded[e.path]!==e.replaces||await R(e)}}finally{ne--}},R=async({path:e,file:n,replaces:r,g:a})=>{let o=()=>!i(a)||t().loaded[e]!==r;try{let t=n.prevName??n.name,[i,s]=await Promise.all([k(t,`old`),k(n.name,`new`)]);if(o())return;let c=z_(`clone`,n,{oldFile:{name:t,contents:i.contents},newFile:{name:n.name,contents:s.contents}});ie({path:e,fileDiff:c,old:i.contents,new:s.contents,replaces:r,g:a})}catch{}},z=[],B=null,ie=e=>{z.push(e),!B&&(B=ae,typeof requestAnimationFrame==`function`?requestAnimationFrame(ae):setTimeout(ae,0))},ae=()=>{B=null;let n=z;z=[];let r=n.filter(e=>i(e.g)&&t().loaded[e.path]===e.replaces);r.length!==0&&e(e=>{let t={...e.loaded},n={...e.contents};for(let e of r)t[e.path]={kind:`diff`,fileDiff:e.fileDiff},n[e.path]={...n[e.path],old:e.old,new:e.new};return{loaded:t,contents:n,...P(e,r.map(e=>e.path))}})},oe=async(n,r)=>{let i=t().snapshot,a=i==null||i.mode.commentKey!==n.mode.commentKey,o=i!=null&&i.context!==n.context,s=i!=null&&(i.oldSha===`worktree`||i.oldSha!==n.oldSha),c=s||i!=null&&i.newSha!==n.newSha,l=new Map(i?.changed.map(e=>[e.path,e])??[]),u=new Map(n.changed.map(e=>[e.path,e])),d=a?{}:{...t().loaded},f=a||c?{}:{...t().contents},p=[];for(let e of n.changed){let t=l.get(e.path);if(a||o||s||!t||!iF(t,e)||d[e.path]==null){let t=d[e.path];t&&(d[e.path]={...t}),delete f[e.path],p.push(e.path)}}for(let e of l.keys())u.has(e)||(delete d[e],delete f[e]);let m=t().fileView,h=a||m==null||!m.external&&!n.tree.includes(m.path)?null:m,g=m!=null&&!m.external&&(c||l.has(m.path)!==u.has(m.path)||p.includes(m.path));h&&g&&delete f[h.path];let _={};if(!a)for(let[e,n]of Object.entries(t().collapsed))l.get(e)?.blob===u.get(e)?.blob&&(_[e]=n);let v=t().draft,y=v!=null&&!a&&(u.has(v.path)||h?.path===v.path);w=!1,e(e=>({snapshot:n,loaded:d,occurrences:null,contents:f,fileView:h,collapsed:_,error:null,draft:y?v:null,moved:e.moved&&e.moved.version<n.version?null:e.moved})),t().refreshGithub(),a&&e(e=>({selection:null,visualAnchor:null,replyTo:null,editingId:null,jumps:[],jumpIndex:0,revealed:{},reveal:null,scrollTarget:null,search:{...e.search,open:!1,kind:`text`,direction:1,matches:[],index:-1}})),await Promise.all([F(n,p,r),...h&&(g||!h.item)?[se(h.path,h.external,r,!0)]:[]])},se=async(n,r,a,o=!1)=>{let s=t().fileView?.from??{position:ue(),activePath:t().activePath};o||e({fileView:{path:n,external:r,item:null,from:s},selection:null,visualAnchor:null,draft:null,focusedThread:null});let c,l;try{let e=await k(n,`new`);l=e.contents,c=e.binary?{kind:`binary`}:{kind:`file`,file:{name:n,contents:e.contents,cacheKey:`${n}@full@${Date.now()}`}}}catch(e){c={kind:`error`,message:String(e)}}!i(a)||t().fileView?.path!==n||e(e=>({fileView:{path:n,external:r,item:c,from:e.fileView?.from??s},...P(e,[n]),contents:l==null?e.contents:{...e.contents,[n]:{...e.contents[n],new:l}}}))},ce=null,le=()=>{let e=t();if(!e.snapshot)return[];let n=[e.snapshot,e.loaded,e.gens,e.revealed,e.collapsed,e.viewed,e.config,e.diffStyle,e.fileView];if(ce&&ce.inputs.every((e,t)=>e===n[t]))return ce.items;let r=yP(e.snapshot,e.loaded,e.gens,t=>FN(e,t),e.revealed,e.diffStyle,e.fileView);return ce={inputs:n,items:r},r},ue=()=>{let e=t().selection;if(!e)return null;let n=yN(e.id),r=t().fileView;return r?.path===n?{path:n,side:mN(e),line:e.range.end,full:!0,...r.external?{external:!0}:{}}:{path:n,side:mN(e),line:e.range.end}},V=()=>{if(fe)return;let n=ue();if(!n)return;let{jumps:r,jumpIndex:i}=t(),a=r.slice(0,i),o=a[a.length-1];if(o&&o.path===n.path&&o.line===n.line&&o.side===n.side&&!!o.full==!!n.full){e({jumps:a,jumpIndex:a.length});return}let s=[...a,n].slice(-100);e({jumps:s,jumpIndex:s.length})},de=n=>{FN(t(),n)&&e(e=>({collapsed:{...e.collapsed,[n]:!1}}))},fe=!1,pe=e=>{fe=!0;let t=()=>{fe=!1},n;try{n=e()}catch(e){throw t(),e}return n instanceof Promise?n.finally(t):(t(),n)},me=async r=>{if(r.full&&t().fileView?.path!==r.path){let e=n;if(await se(r.path,r.external??!1,e),!i(e)||t().fileView?.path!==r.path)return}else!r.full&&t().fileView&&e({fileView:null,selection:null,visualAnchor:null,draft:null,focusedThread:null});fe=!0;try{he(r)}finally{fe=!1}},he=t=>{t.full||de(t.path);let n=le(),r=n.findIndex(e=>e.path===t.path);if(r===-1)return;let i=n[r],a=t.side===`old`?`deletions`:`additions`,o=i.rows.findIndex(e=>e.line===t.line&&e.side===a);if(o!==-1){be({itemIndex:r,rowIndex:o},!1,`eye`);return}e(e=>({selection:{id:i.id,range:{start:t.line,side:a,end:t.line,endSide:a}},activePath:t.path,scrollTarget:{id:i.id,line:t.line,side:t.side,align:`eye`,nonce:(e.scrollTarget?.nonce??0)+1}}))},ge=(n,r)=>{let i=t().snapshot,a=le(),o=a.find(e=>e.path===n);if(!i||!o)return;let s=wN(i,n,r),c=s?a.findIndex(e=>e.path===s.path):-1,l=a[c],u=null;if(l&&!l.collapsed&&l.rows.length>0){let e=l.rows.findIndex(e=>e.hunkStart);u=DP(a,{itemIndex:c,rowIndex:e===-1?0:e})}e(e=>({selection:u,visualAnchor:null,draft:null,activePath:l?l.path:n,scrollTarget:{id:o.id,align:`start`,nonce:(e.scrollTarget?.nonce??0)+1}}))},_e=e=>!MN(t(),e),ve=e=>!FN(t(),e.path),ye=(e,t)=>{let n=e.selection;return{id:n.id,line:n.range.end,side:mN(n),align:t,nonce:(e.scrollTarget?.nonce??0)+1}},be=(n,r=!1,i=`nearest`)=>{if(!n)return;i===`eye`&&V();let a=le(),o=DP(a,n,r?t().visualAnchor:null),s=a[n.itemIndex];if(!o||!s)return;let c=s.rows[n.rowIndex];e(e=>({selection:o,activePath:s.path,visualAnchor:r?e.visualAnchor:null,focusedThread:null,scrollTarget:{id:s.id,line:c.line,side:c.side===`deletions`?`old`:`new`,align:i,nonce:(e.scrollTarget?.nonce??0)+1}}))},xe=async(n,r,i=!1)=>{V(),await pe(()=>i?t().openFullFile(n,void 0,!0):t().openFile(n)),de(n);let a=le(),o=a.findIndex(e=>e.path===n);if(o===-1)return;let s=a[o],c=s.rows.findIndex(e=>e.side===`additions`&&e.line===r);if(c!==-1){pe(()=>be({itemIndex:o,rowIndex:c},!1,`eye`));return}e(e=>({selection:{id:s.id,range:{start:r,side:`additions`,end:r,endSide:`additions`}},activePath:n,visualAnchor:null,reveal:{id:s.id,path:n,line:r,nonce:(e.reveal?.nonce??0)+1}}))},Se=e=>{let{lsp:n,snapshot:r}=t();return n.enabled?!r||!Vk(r)?`Symbol navigation needs the new side to be the worktree or the checked-out commit`:Wk(n,e):Wk(n)},Ce=e=>Se(e.path)??(e.side===`old`?`Symbol navigation works on the new side only`:t().fileView?.external?`Symbol navigation starts from a repository file`:null),we=e=>{let n=e?Ce(e):Se()??`Hover a symbol first`;return n?(t().flash(n),null):{path:e.path,line:e.line,col:e.col}},Te=(t,n)=>i(t)&&g.latest(n)?!0:(g.latest(n)&&e(e=>({search:{...e.search,loading:!1}})),!1),Ee=async(r,a)=>{if(t().closeSymbolMenu(),r&&OP(r.path))return t().flash(`Configuration files support schema hover (gh)`);let o=we(r);if(!o)return;let s=n;try{let n=await(a===`definition`?oA.lspDefinition(o):oA.lspTypeDefinition(o));if(!i(s))return;let c=n.locations[0];if(!c)return t().flash(`No ${a} found for ${r.text}`);if(a===`definition`&&n.locations.every(e=>kP(e,r)))return await t().findReferences(r);if(a===`type definition`&&n.locations.length>1){e(e=>({references:{...e.references,open:!0,kind:`types`,symbol:r.text,items:n.locations,index:0}}));return}await xe(c.path,c.line,c.external)}catch(e){i(s)&&M(a===`definition`?`Go to definition`:`Go to type definition`,e)}},De=()=>SP(le(),t().selection),Oe=()=>{let e=De();if(e)return e;let n=le().findIndex(e=>e.path===t().activePath);return n===-1?null:{itemIndex:n,rowIndex:-1}},ke=(t,n=!1,r=`nearest`)=>{if(!t)return;if(t.rowIndex!==-1)return be(t,n,r);let i=le()[t.itemIndex];i&&e(e=>({selection:null,activePath:i.path,visualAnchor:null,focusedThread:null,scrollTarget:{id:i.id,align:r,nonce:(e.scrollTarget?.nonce??0)+1}}))},Ae=()=>{let e=t(),n=e.selection;if(!n)return;let r=yN(n.id),i=mN(n),a=n.range.end;return IN(e).find(e=>e.anchor.kind===`line`&&e.anchor.path===r&&e.anchor.side===i&&a>=e.anchor.startLine&&a<=e.anchor.endLine)},je=n=>e({threads:HN(t().threads,n)}),Me=async(e,n)=>{try{await n()}catch(t){return M(e,t)}await t().refreshThreads()},Ne=async(n,r)=>{let i=p,a=0;try{let t=await x(()=>(a=v.start(),r()));p===i&&v.latest(a)&&e({viewed:t})}catch(e){if(p!==i)return;M(n,e),t().refreshViewed()}},Pe=null;return{layout:rF(),setLayout(n){let r={...t().layout,...n};try{localStorage.setItem(tF,JSON.stringify(r))}catch{}e({layout:r})},theme:GP(),setTheme(t){KP(t),qP(t),e({theme:t})},visualAnchor:null,editingId:null,setEditingId(t){e({editingId:t})},replyTo:null,focusedThread:null,focusThread(t){e({focusedThread:t})},openReply(n){let r=t().threads.find(e=>e.id===n);r&&e({replyTo:n,draft:null,activePath:r.anchor.path})},closeReply(){t().replyTo&&e({replyTo:null})},githubMenuOpen:!1,github:{status:`idle`},setGithubMenuOpen(n){e({githubMenuOpen:n,...n?{modeMenuOpen:!1}:{}}),n&&t().refreshGithub()},async refreshGithub(){let i=t().snapshot;if(!i)return;let a=n,o=++r,s=()=>a===n&&t().snapshot===i&&r===o;e({github:{status:`loading`}});try{let t=await oA.github();s()&&e({github:t.version===i.version?{status:`ready`,data:t}:{status:`idle`}})}catch(t){s()&&e({github:{status:`error`,error:j(t)}})}},modeMenuOpen:!1,modePane:null,modeEntry:1,setModeMenuOpen(t){e({modeMenuOpen:t,modePane:null,modeEntry:1,...t?{githubMenuOpen:!1}:{}})},highlightModeEntry(n){let r=((n-1)%5+5)%5+1;r!==t().modeEntry&&e({modeEntry:r})},pickModeEntry(n){n===1?(e({modeMenuOpen:!1,modePane:null,modeEntry:1}),t().switchMode({kind:`working`})):n>=2&&n<=5&&e({modeMenuOpen:!0,modePane:JN[n-1],modeEntry:n})},closeModePane(){t().modePane&&e({modePane:null})},modeCommit:`HEAD`,setModeCommit(t){e({modeCommit:t})},helpOpen:!1,setHelpOpen(t){e({helpOpen:t})},treeModel:null,setTreeModel(t){e({treeModel:t})},toast:null,report:M,flash(t){e({toast:t}),Pe&&clearTimeout(Pe),Pe=setTimeout(()=>e({toast:null}),XP)},search:{open:!1,kind:`text`,direction:1,ignoreCase:!0,regex:!1,scope:`diff`,content:{file:`diff`,diff:`diff`},path:null,focusNonce:0,input:``,editing:!1,query:``,matches:[],index:-1,loading:!1,truncated:!1},openSearch(t){g.start(),e(e=>{let n=t??e.search.scope,r=n===`file`?TN(e):null,i=e.search.kind===`text`&&e.search.scope===n&&e.search.path===r;return{search:{...e.search,open:!0,kind:`text`,direction:1,scope:n,matches:i?e.search.matches:[],index:i?e.search.index:-1,truncated:i&&e.search.truncated,loading:!1,input:e.search.open&&e.search.kind===`text`?e.search.input:e.search.query,editing:!0,path:r,focusNonce:e.search.focusNonce+1},...r?{scrollTarget:{id:bN(e,r),align:`start`,unlessVisible:`search`,nonce:(e.scrollTarget?.nonce??0)+1}}:{}}})},setSearchInput(t){e(e=>({search:{...e.search,input:t,editing:!0}}))},blurSearchInput(){e(e=>({search:{...e.search,editing:!1}}))},typeSearchInput(t){e(e=>({search:{...e.search,input:t===`Backspace`?Array.from(e.search.input).slice(0,-1).join(``):e.search.input+t,editing:!0,focusNonce:e.search.focusNonce+1},...e.search.scope===`file`&&e.search.path?{scrollTarget:{id:bN(e,e.search.path),align:`start`,unlessVisible:`search`,nonce:(e.scrollTarget?.nonce??0)+1}}:{}}))},setSearchOptions(n){let{content:r,...i}=n;e(e=>({search:{...e.search,...i,content:r?{...e.search.content,[e.search.scope]:r}:e.search.content}}));let{query:a,kind:o}=t().search;o===`text`&&a&&t().runSearch(a)},closeSearch(){g.start(),e(e=>({search:{...e.search,open:!1,editing:!1,kind:`text`,direction:1,matches:[],index:-1,loading:!1}}))},async runSearch(r){let i=n,a=g.start(),o=t().search.scope===`file`?t().search.path:null;e(e=>({search:{...e.search,kind:`text`,direction:1,query:r,input:r,editing:!1,path:o,loading:!0}}));try{let{ignoreCase:n,regex:s,scope:c,content:l}=t().search;if(c===`file`&&!o)return e(e=>({search:{...e.search,matches:[],index:-1,loading:!1}})),t().flash(`No file to search in`);let u=await oA.search(r,{ignoreCase:n,regex:s,scope:c,content:l[c],...o?{path:o}:{}});if(!Te(i,a))return;e(e=>({search:{...e.search,matches:u.matches,truncated:u.truncated,index:-1,loading:!1}})),u.matches.length?t().moveMatch(1):t().flash(c===`file`?`No matches for “${r}” in ${o}`:`No matches for “${r}” in ${l[c]===`diff`?`the diff + context`:`changed files`}`)}catch(t){if(!Te(i,a))return;e(e=>({search:{...e.search,loading:!1}})),M(`Search`,t)}},moveMatch(n){let{search:r}=t(),i=r.matches.length;if(!i)return;let a=n*r.direction,o=((r.index<0?a===1?-1:0:r.index)+a+i)%i,s=r.matches[o];e({search:{...r,index:o}}),xe(s.path,s.line,s.external)},async searchWord(r){let i=PP.get()?.text;if(!i)return t().flash(`Focus a word first (w / b, or hover one)`);let a=n,o=g.start();e(e=>({search:{...e.search,open:!0,kind:`word`,direction:r,query:i,matches:[],index:-1,loading:!0,truncated:!1}}));try{let n=await oA.search(i,{word:!0,scope:`repo`,content:`full`});if(!Te(a,o))return;let s=n.matches,c=new Map(t().snapshot?.tree.map((e,t)=>[e,t])??[]),l=ue(),u=e=>c.get(e)??1/0,d=e=>l?u(e.path)-u(l.path)||e.line-l.line:r,f=r===1?s.findIndex(e=>d(e)>0):s.findLastIndex(e=>d(e)<0);f===-1&&s.length&&(f=r===1?0:s.length-1),e(e=>({search:{...e.search,matches:s,truncated:n.truncated,index:f,loading:!1}}));let p=s[f];p?xe(p.path,p.line):t().flash(`No other occurrence of “${i}”`)}catch(t){if(!Te(a,o))return;e(e=>({search:{...e.search,loading:!1}})),M(`Search`,t)}},lsp:{enabled:!1,servers:[],missing:[]},setLspStatus(t){e({lsp:t})},symbolMenu:null,async openSymbolMenu(r,o,s){if(OP(r.path)){t().closeSymbolMenu();return}if(!t().lsp.enabled)return;t().closeHover();let c=++a,l=n,u=await HP(r.path,r.side,r.line,r.col,()=>N(r.path,r.side));if(!(!i(l)||c!==a)){if(u){e({symbolMenu:null});return}if(!Ce(r)){let e=n,t=null;try{t=(await oA.lspTokenKind({path:r.path,line:r.line,col:r.col}))?.kind??null}catch{}if(!i(e)||c!==a||t===`keyword`)return}e({symbolMenu:{target:r,x:o,y:s}})}},closeSymbolMenu(){a++,t().symbolMenu&&e({symbolMenu:null})},hover:null,async requestHover(r,a){let s=++o;if(t().symbolMenu||Ce(r))return;let c=n;try{let n=await HP(r.path,r.side,r.line,r.col,()=>N(r.path,r.side));if(!i(c)||s!==o||t().symbolMenu)return;if(n){e({hover:null});return}let l=await oA.lspHover({path:r.path,line:r.line,col:r.col});if(!i(c)||s!==o||t().symbolMenu)return;e({hover:l.contents?{target:r,contents:l.contents,anchor:a}:null})}catch{}},async showHover(){let e=t().symbolMenu?.target??PP.get();if(!we(e))return;t().closeSymbolMenu();let n=PP.element()?.getBoundingClientRect(),r=n?{left:n.left,top:n.top,bottom:n.bottom}:{left:0,top:0,bottom:0};await new Promise(e=>setTimeout(e,0));let i=o+1;await t().requestHover(e,r),i===o&&!t().hover&&t().flash(`No hover information for ${e.text}`)},closeHover(){o++,t().hover&&e({hover:null})},occurrences:null,async requestOccurrences(t){let r=++s;if(Ce(t))return null;let a=n;try{let n=await HP(t.path,t.side,t.line,t.col,()=>N(t.path,t.side));if(!i(a))return null;let o=n?[]:(await oA.lspOccurrences({path:t.path,line:t.line,col:t.col})).occurrences;return i(a)?(r===s&&e({occurrences:o.length?{target:t,items:o}:null}),o):null}catch{return null}},clearOccurrences(){s++,t().occurrences&&e({occurrences:null})},async goToDefinition(e=t().symbolMenu?.target??PP.get()){await Ee(e,`definition`)},async goToTypeDefinition(e=t().symbolMenu?.target??PP.get()){await Ee(e,`type definition`)},async goToLink(e,n){t().closeHover(),t().closeSymbolMenu(),n==null?await t().openFile(e):await xe(e,n)},async findReferences(r=t().symbolMenu?.target??PP.get()){if(t().closeSymbolMenu(),r&&OP(r.path))return t().flash(`Configuration files support schema hover (gh)`);let a=we(r);if(!a)return;let o=n;try{let n=await oA.lspReferences(a);if(!i(o))return;let s=n.locations;if(s.length===0)return t().flash(`No references to ${r.text}`);let c=s.findIndex(e=>e.path===a.path&&e.line===a.line),l=c===-1?0:(c+1)%s.length;e(e=>({references:{...e.references,open:!0,kind:`references`,symbol:r.text,items:s,index:l}}))}catch(e){i(o)&&M(`Find references`,e)}},references:{open:!1,kind:`references`,symbol:``,items:[],index:-1,peek:!1},moveReference(n){let r=t().references,i=r.items.length;i&&e({references:{...r,index:(Math.max(r.index,0)+n+i)%i}})},togglePeek(){e(e=>({references:{...e.references,peek:!e.references.peek}}))},pickReference(n){let r=t().references,i=r.items[r.index];t().closeReferences(),i&&(r.kind===`references`&&e(e=>({search:{...e.search,open:!0,kind:`references`,direction:1,query:r.symbol,matches:r.items,index:r.index,loading:!1,truncated:!1}})),xe(i.path,n??i.line,i.external))},closeReferences(){e(e=>({references:{...e.references,open:!1}}))},symbols:{open:!1,scope:`document`,path:null,query:``,all:[],items:[],index:-1,loading:!1},async openSymbols(r){let a=r===`document`?t().activePath:null;if(r===`document`&&!a)return t().flash(`Move to a file first`);let o=a?Ce({path:a,side:`new`}):Se();if(o)return t().flash(o);if(e({symbols:{open:!0,scope:r,path:r===`document`?a:null,query:``,all:[],items:[],index:-1,loading:r===`document`}}),r!==`document`)return;let s=n;try{let n=await oA.lspSymbols({path:a}),r=t().symbols;if(!r.open||r.scope!==`document`||r.path!==a)return;if(!i(s))return e({symbols:{...r,loading:!1}});e({symbols:{...r,all:n,items:qN(n,r.query),index:n.length?0:-1,loading:!1}})}catch(e){t().closeSymbols(),M(`Document symbols`,e)}},async querySymbols(r){let a=t().symbols;if(!a.open)return;if(a.scope===`document`){let t=qN(a.all,r);return e({symbols:{...a,query:r,items:t,index:t.length?0:-1}})}if(e({symbols:{...a,query:r,loading:r.trim().length>0}}),l(),!r.trim())return e(e=>({symbols:{...e.symbols,items:[],index:-1}}));if(await new Promise(e=>{c={timer:setTimeout(()=>{c=null,e()},150),wake:e}}),t().symbols.query!==r||!t().symbols.open)return;let o=n;try{let n=await oA.lspSymbols({q:r}),a=t().symbols;if(!a.open||a.query!==r)return;if(!i(o))return e({symbols:{...a,loading:!1}});e({symbols:{...a,items:n,index:n.length?0:-1,loading:!1}})}catch(t){e(e=>({symbols:{...e.symbols,loading:!1}})),M(`Workspace symbols`,t)}},moveSymbol(n){let r=t().symbols,i=r.items.length;i&&e({symbols:{...r,index:(Math.max(r.index,0)+n+i)%i}})},pickSymbol(){let e=t().symbols,n=e.items[e.index];t().closeSymbols(),n&&xe(n.path,n.line)},closeSymbols(){e(e=>({symbols:{...e.symbols,open:!1,items:[],all:[],index:-1,loading:!1}}))},moveCursor(e){let n=le();ke(CP(n,Oe(),e),t().visualAnchor!=null)},jumps:[],jumpIndex:0,jumpBack(){if(!EN(t()))return;if(t().fileView)return t().closeFullFile();let{jumps:n,jumpIndex:r}=t(),i=n,a=r;if(a===i.length){let e=ue();e&&(i=[...i,e])}--a,e({jumps:i,jumpIndex:a});let o=i[a];o&&me(o)},jumpForward(){if(!DN(t()))return;let{jumps:n,jumpIndex:r}=t(),i=r+1;e({jumpIndex:i});let a=n[i];a&&me(a)},scrollCursorTo(n){if(!t().selection)return t().flash(`No line under the cursor`);e(e=>({scrollTarget:ye(e,n)}))},moveCursorBy(e){let n=le(),r=e<0?-1:1,i=Oe();for(let t=0;t<Math.abs(e);t++){let e=CP(n,i,r);if(!e||i&&e.itemIndex===i.itemIndex&&e.rowIndex===i.rowIndex)break;i=e}ke(i,t().visualAnchor!=null,`eye`)},async goToLine(e){let n=t(),r=TN(n);if(!r)return n.flash(`No file to jump in`);await xe(r,e)},moveFile(n){let r=le();if(!r.length)return;let i=r.findIndex(e=>e.path===t().activePath),a=Oe()??(i===-1?null:{itemIndex:i,rowIndex:0}),o=n===`first`?TP(r,null,1):n===`last`?TP(r,null,-1):TP(r,a,n);if(!o)return;let s=r[o.itemIndex];if(V(),s.collapsed||s.rows.length===0){e(e=>({selection:null,activePath:s.path,scrollTarget:{id:s.id,nonce:(e.scrollTarget?.nonce??0)+1}}));return}be(o),e(e=>({scrollTarget:{id:s.id,align:`start`,nonce:(e.scrollTarget?.nonce??0)+1}}))},moveHunk(e){be(EP(le(),Oe(),e),!1,`eye`)},toggleVisual(){let n=De();if(t().visualAnchor){e({visualAnchor:null}),n&&be(n);return}if(!n){let t=CP(le(),null,1);t&&be(t),e({visualAnchor:De()});return}e({visualAnchor:n})},editCommentAtCursor(){let e=Ae(),n=e?.messages[e.messages.length-1];n&&t().setEditingId(n.id)},async deleteCommentAtCursor(){let e=Ae();e&&await t().deleteThread(e.id)},async toggleResolvedAtCursor(){let e=Ae();if(!e)return t().flash(`No thread under the cursor`);await t().setResolved(e.id,!e.resolved),t().flash(e.resolved?`Thread reopened`:`Thread resolved`)},async toggleViewedAtCursor(){let e=t().activePath,n=e?t().snapshot?.changed.find(t=>t.path===e):void 0;if(!e||!n)return;let r=!MN(t(),n),i=t().setViewed(e,r);r&&ge(e,_e),await i},async toggleViewedAbove(){let n=le(),r=n.findIndex(e=>e.path===t().activePath),i=r>0?n[r-1].path:void 0,a=i?t().snapshot?.changed.find(e=>e.path===i):void 0;if(!a)return t().flash(`No file above`);let o=t().setViewed(a.path,!MN(t(),a)),s=n[r];e(e=>({scrollTarget:e.selection?ye(e,`eye`):{id:s.id,nonce:(e.scrollTarget?.nonce??0)+1}})),await o},setCollapsedAtCursor(n){let r=t().activePath;r&&(e(e=>({collapsed:{...e.collapsed,[r]:n}})),n?ge(r,ve):t().loadPatch(r))},setAllCollapsed(n){let r=t().snapshot?.changed.map(e=>e.path)??[],i={};for(let e of r)i[e]=n;e({collapsed:i})},escape(){let n=t();n.helpOpen?e({helpOpen:!1}):n.modePane?n.closeModePane():n.modeMenuOpen?e({modeMenuOpen:!1}):n.githubMenuOpen?e({githubMenuOpen:!1}):n.hover?n.closeHover():n.symbolMenu?n.closeSymbolMenu():n.references.open&&n.references.peek?n.togglePeek():n.references.open?n.closeReferences():n.symbols.open?n.closeSymbols():n.search.open?n.closeSearch():n.editingId?n.setEditingId(null):n.replyTo?n.closeReply():n.draft?n.closeDraft():n.visualAnchor?e({visualAnchor:null}):e({selection:null})},diffStyle:eF(),setDiffStyle(t){try{localStorage.setItem(YP,t)}catch{}e({diffStyle:t,draft:null,visualAnchor:null})},imageCompare:$P(),setImageCompare(t){try{localStorage.setItem(QP,t)}catch{}e({imageCompare:t})},snapshot:null,error:null,threads:[],showResolved:!1,setShowResolved(t){e({showResolved:t})},viewed:[],config:kk,fileView:null,loaded:{},gens:{},contents:{},collapsed:{},selection:null,draft:null,activePath:null,scrollTarget:null,reveal:null,revealed:{},addRevealed(t,n,r){e(e=>{let i=yN(t),a=Object.fromEntries(Object.entries(e.revealed).filter(([e])=>e===t||yN(e)!==i));return{revealed:{...a,[t]:[...a[t]??[],[n,r]]}}})},async boot(){let t=m();w=!0,C=0;try{let n=oA.lspStatus().catch(()=>({enabled:!1,servers:[],missing:[]})),r=y.start(),[a,o,s,c,l]=await Promise.all([oA.snapshot(),E(),oA.config(),n,oA.moved()]);e({lsp:c}),y.latest(r)&&e({config:s}),await D(a,t,o),i(t)&&(l==null||l.version>=a.version)&&e({moved:l})}catch(n){i(t)&&e({error:j(n)})}},async refreshSnapshot(t){if(t!=null){if(T(t))return;C=t}let n=f();try{let[e,t]=await Promise.all([oA.snapshot(),E()]);await D(e,n,t)}catch(t){i(n)&&e({error:j(t)})}finally{C===t&&(C=0)}},async refreshThreads(){let e=n,t=_.start();try{let n=await oA.threads();i(e)&&_.latest(t)&&je(n)}catch(n){i(e)&&_.latest(t)&&M(`Loading threads`,n)}},async refreshViewed(){let t=n,r=v.start();try{let n=await oA.viewed();i(t)&&v.latest(r)&&e({viewed:n})}catch(e){i(t)&&v.latest(r)&&M(`Loading viewed marks`,e)}},async refreshConfig(){let t=y.start();try{let n=await oA.config();y.latest(t)&&e({config:n})}catch(e){y.latest(t)&&M(`Loading config`,e)}},async switchMode(n){let r=m();e({error:null});let a,o=!1;try{return a=await oA.switchMode(n),i(r)?T(a.version)?`applied`:(C=a.version,o=!0,await D(a,r,await E()),i(r)?`applied`:`superseded`):`superseded`}catch(n){if(!i(r))return`superseded`;let a=j(n);return e({error:a}),t().refreshGithub(),{error:a}}finally{o&&a&&C===a.version&&(C=0)}},moved:null,setMoved(t){e({moved:t})},reload:()=>O(oA.reload,`Reloading`),clearIterations:()=>O(oA.clearIterations,`Forgetting iterations`),deleteIteration:e=>O(()=>oA.deleteIteration(e),`Forgetting iteration #${e}`),focusCommit(e){t().switchMode({kind:`focus`,commit:e})},compareIterations(e,n){t().switchMode({kind:`interdiff`,from:e,to:n})},showPair(e){t().switchMode({kind:`pair`,commit:e})},toggleInterdiff(){let e=t().snapshot;if(!e)return;if(e.mode.interdiff)return t().focusCommit(null);let[n,r]=e.iterations.slice(-2);if(!n||!r)return t().flash(`Only one iteration so far: reload once the branch moved`);t().compareIterations(n.n,r.n)},stepIteration(e,n){let r=t().snapshot;if(!r)return;let i=r.mode.interdiff?{from:r.mode.interdiff.from.n,to:r.mode.interdiff.to.n}:null,a=rP(r.iterations,i,e,n);a&&t().compareIterations(a.from,a.to)},pickIteration(e){let n=t().snapshot,r=n?.iterations.at(-1);if(!n||!r)return;if(!n.iterations.some(t=>t.n===e))return t().flash(`No iteration #${e}`);let i=nP(n.mode.interdiff?{from:n.mode.interdiff.from.n,to:n.mode.interdiff.to.n}:null,r.n,e,!1);i&&t().compareIterations(i.from,i.to)},reloadIfMoved(){t().moved?t().reload():t().flash(`Nothing moved since this snapshot`)},stepCommit(e){let n=t().snapshot;if(!n)return;if(n.mode.within||n.mode.base!==`parent`){let r=lP(n,e);if(r===void 0)return;n.mode.interdiff?t().showPair(r):t().focusCommit(r);return}let r=e<0?n.commit?.parent:n.commit?.child;r&&t().switchMode({kind:`revspec`,args:[`${r}^!`]})},loadFile:ee,async openFile(n,r,i){let a=t().snapshot;if(a){if(!a.changed.some(e=>e.path===n)||t().fileView?.path===n&&i!==`old`){await t().openFullFile(n,r);return}t().fileView&&(V(),e({fileView:null,selection:null,visualAnchor:null,draft:null,focusedThread:null})),t().jumpTo(n,r,i),e({activePath:n})}},async loadPatch(e){let r=t().snapshot;!r||t().loaded[e]?.kind!==`oversized`||await I(r,[e],n)},async openFullFile(r,a,o=!1){let s=t().snapshot;if(!s)return;let c=t().fileView,l=o||c?.path===r&&c.external;if(!l&&!s.tree.includes(r)){t().flash(`${r} no longer exists on this side`);return}let u=n;if(c?.path!==r&&(V(),await se(r,l,u),!i(u)||t().fileView?.path!==r))return;let d=t().fileView?.item;d?.kind===`error`&&t().flash(`Cannot open ${r}: ${d.message}`),t().jumpTo(r,a),e({activePath:r})},closeFullFile(){let n=t().fileView;if(!n)return;V();let{position:r,activePath:i}=n.from,a=t().jumps,o=r?a.findLastIndex(e=>e.path===r.path&&e.line===r.line&&e.side===r.side&&!e.full):-1;e({fileView:null,selection:null,visualAnchor:null,draft:null,focusedThread:null,activePath:i,...o>=0?{jumpIndex:o}:{}}),r?me(r):i&&e(e=>({scrollTarget:{id:bN(e,i),align:`start`,nonce:(e.scrollTarget?.nonce??0)+1}}))},setSelection(n){e({selection:n,visualAnchor:null,focusedThread:null}),n==null&&t().draft?.selection&&e({draft:null})},async openDraft(n){let r=t().snapshot&&tP(t().snapshot.mode);if(r)return t().flash(r);if(t().fileView?.external)return t().flash(`Comments go on repository files only`);let i=yN(n.id);e({draft:{path:i,selection:n},selection:n,activePath:i,replyTo:null})},openFileDraft(n){let r=t().snapshot&&tP(t().snapshot.mode);if(r)return t().flash(r);if(t().fileView?.external)return t().flash(`Comments go on repository files only`);let i=t().selection,a=i&&yN(i.id)===n?i:null;e(e=>({draft:{path:n,selection:null},selection:a,visualAnchor:null,activePath:n,replyTo:null,scrollTarget:{id:bN(e,n),align:`start`,unlessVisible:`top`,nonce:(e.scrollTarget?.nonce??0)+1}})),de(n)},closeDraft(){e({draft:null,selection:null})},async draftQuote(){let e=t().draft;if(!e?.selection)return``;let n=zN(t(),e.path,e.selection),r=await N(e.path,n.side);return _N(e.path,n,r).quoted},async submitDraft(n){let r=t().draft;if(!r||!n.trim())return;if(!r.selection){try{await oA.addThread({path:r.path,body:n})}catch(e){return M(`Posting the comment`,e)}e({draft:null}),await t().refreshThreads();return}try{let e=zN(t(),r.path,r.selection),i=await N(r.path,e.side),{path:a,side:o,startLine:s,endLine:c,quoted:l}=_N(r.path,e,i);await oA.addThread({path:a,side:o,startLine:s,endLine:c,quoted:l,body:n})}catch(e){return M(`Posting the comment`,e)}let i=r.selection.range;e({draft:null,visualAnchor:null,selection:{id:r.selection.id,range:{start:i.end,side:i.endSide??i.side,end:i.end,endSide:i.endSide??i.side}}}),await t().refreshThreads()},async submitReply(n,r){if(r.trim()){try{await oA.reply(n,{body:r})}catch(e){return M(`Posting the reply`,e)}t().replyTo===n&&e({replyTo:null}),await t().refreshThreads()}},editMessage:(e,t,n)=>Me(`Editing the message`,()=>oA.editMessage(e,t,n)),deleteMessage:(e,t)=>Me(`Deleting the message`,()=>oA.deleteMessage(e,t)),setResolved:(e,t)=>Me(t?`Resolving`:`Reopening`,()=>oA.setResolved(e,t)),deleteThread:e=>Me(`Deleting the thread`,()=>oA.deleteThread(e)),clearThreads:()=>Me(`Deleting all threads`,()=>oA.clearThreads()),deleteStaleThreads:()=>Me(`Deleting stale threads`,()=>oA.deleteStaleThreads()),async exportToGithub(e){if(!t().snapshot)return null;let n;try{n=await oA.exportToGithub({threadIds:e})}catch(e){return M(`Adding to the GitHub review`,e),null}let r=n.skipped.filter(e=>e.reason!==`already in the review`);if(r.length){let e=n.posted+n.updated+n.skipped.length;t().flash(`Skipped ${r.length} of ${e} (${r.map(e=>e.reason).join(`, `)})`)}return n.posted>0?`added`:n.updated>0?`updated`:`unchanged`},async setViewed(n,r){let i=t().snapshot?.changed.find(e=>e.path===n);i&&(e(e=>({viewed:[...e.viewed.filter(e=>e.path!==n||e.blob!==i.blob),{path:n,blob:i.blob,viewed:r}],collapsed:{...e.collapsed,[n]:r}})),await Ne(`Marking viewed`,()=>oA.setViewed(n,i.blob,r)))},async setViewedMany(n,r){let i=new Set(n),a=(t().snapshot?.changed??[]).filter(e=>i.has(e.path)).map(e=>({path:e.path,blob:e.blob,viewed:r}));a.length&&(e(e=>({viewed:[...e.viewed.filter(e=>!i.has(e.path)),...a],collapsed:{...e.collapsed,...Object.fromEntries(a.map(e=>[e.path,r]))}})),await Ne(r?`Marking viewed`:`Marking not viewed`,()=>oA.setViewedBulk(a)))},toggleCollapsed(n){let r=FN(t(),n);e(e=>({collapsed:{...e.collapsed,[n]:!r}})),r&&t().loadPatch(n)},selectFile(t){e({selection:null,visualAnchor:null,activePath:t})},async saveConfig(t){let n=0;try{let r=await S(()=>(n=y.start(),oA.saveConfig(t)));y.latest(n)&&e({config:r})}catch(e){y.latest(n)&&M(`Saving settings`,e)}},jumpTo(n,r,i){V(),r!=null&&de(n);let a=bN(t(),n);if(r==null){let t=le(),n=t.findIndex(e=>e.id===a),r=t[n];r&&!r.collapsed&&r.rows.length&&e({selection:DP(t,{itemIndex:n,rowIndex:Math.max(0,r.rows.findIndex(e=>e.hunkStart))}),visualAnchor:null})}if(r!=null&&i!==`old`){let i=le().find(e=>e.id===a);if(i!=null&&t().loaded[n]?.kind===`diff`&&!i.rows.some(e=>e.side===`additions`&&e.line===r)){e(e=>({activePath:n,reveal:{id:a,path:n,line:r,nonce:(e.reveal?.nonce??0)+1}}));return}}e(e=>({scrollTarget:{id:a,line:r,side:i,align:r?`eye`:`start`,nonce:(e.scrollTarget?.nonce??0)+1},activePath:n}))},setActivePath(t){e({activePath:t})}}});function iF(e,t){return e.blob===t.blob&&e.status===t.status&&e.oldPath===t.oldPath&&e.additions===t.additions&&e.deletions===t.deletions}async function aF(e,t,n,r){let i=0,a=Array.from({length:Math.min(t,e.length)},async()=>{for(;i<e.length&&!n();)await r(e[i++])});await Promise.all(a)}function oF({path:e,className:t,nowrap:n=!1,tooltip:r=!0}){let i=e.lastIndexOf(`/`)+1,a=e.slice(0,i).split(`/`).filter(Boolean),o=e.slice(i);return(0,g.jsxs)(`span`,{className:Nj(`font-mono break-normal wrap-anywhere`,n&&`min-w-0 truncate`,t),title:r?e:void 0,children:[a.length>0&&(0,g.jsx)(`span`,{className:`text-muted`,children:a.map((e,t)=>(0,g.jsxs)(p.Fragment,{children:[e,`/`,(0,g.jsx)(`wbr`,{})]},t))}),(0,g.jsx)(`span`,{className:`font-semibold text-foreground`,children:o})]})}var sF=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cF=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lF={};function uF(e,t){return((t||lF).jsx?cF:sF).test(e)}var dF=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
1602
|
-
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),fF=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(dF());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),pF=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),mF=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(fF()),r=pF();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),hF=_F(`end`),gF=_F(`start`);function _F(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function vF(e){let t=gF(e),n=hF(e);if(t&&n)return{start:t,end:n}}function yF(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?xF(e.position):`start`in e||`end`in e?xF(e):`line`in e||`column`in e?bF(e):``}function bF(e){return SF(e&&e.line)+`:`+SF(e&&e.column)}function xF(e){return bF(e&&e.start)+`-`+bF(e&&e.end)}function SF(e){return e&&typeof e==`number`?e:1}var CF=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=yF(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};CF.prototype.file=``,CF.prototype.name=``,CF.prototype.reason=``,CF.prototype.message=``,CF.prototype.stack=``,CF.prototype.column=void 0,CF.prototype.line=void 0,CF.prototype.ancestors=void 0,CF.prototype.cause=void 0,CF.prototype.fatal=void 0,CF.prototype.place=void 0,CF.prototype.ruleId=void 0,CF.prototype.source=void 0;var wF=l(mF(),1),TF={}.hasOwnProperty,EF=new Map,DF=/[A-Z]/g,OF=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),kF=new Set([`td`,`th`]),AF=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function jF(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=HF(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=VF(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,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`?Ni:Mi,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=MF(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function MF(e,t,n){if(t.type===`element`)return NF(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return PF(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return IF(e,t,n);if(t.type===`mdxjsEsm`)return FF(e,t);if(t.type===`root`)return LF(e,t,n);if(t.type===`text`)return RF(e,t)}function NF(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Ni,e.schema=i),e.ancestors.push(t);let a=JF(e,t.tagName,!1),o=UF(e,t),s=GF(e,t);return OF.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!pa(e)})),zF(e,o,a,t),BF(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function PF(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}YF(e,t.position)}function FF(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);YF(e,t.position)}function IF(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Ni,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:JF(e,t.name,!0),o=WF(e,t),s=GF(e,t);return zF(e,o,a,t),BF(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function LF(e,t,n){let r={};return BF(r,GF(e,t)),e.create(t,e.Fragment,r,n)}function RF(e,t){return t.value}function zF(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function BF(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function VF(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function HF(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=gF(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function UF(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&TF.call(t.properties,i)){let a=KF(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&kF.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function WF(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else YF(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else YF(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function GF(e,t){let n=[],r=-1,i=e.passKeys?new Map:EF;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=MF(e,a,o);s!==void 0&&n.push(s)}return n}function KF(e,t,n){let r=ki(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ua(n):da(n)),r.property===`style`){let t=typeof n==`object`?n:qF(e,String(n));return e.stylePropertyNameCase===`css`&&(t=XF(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Ti[r.property]||r.property:r.attribute,n]}}function qF(e,t){try{return(0,wF.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new CF("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=AF+`#cannot-parse-style-attribute`,r}}function JF(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=uF(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=uF(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return TF.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);YF(e)}function YF(e,t){let n=new CF("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=AF+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function XF(e){let t={},n;for(n in e)TF.call(e,n)&&(t[ZF(n)]=e[n]);return t}function ZF(e){let t=e.replace(DF,QF);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function QF(e){return`-`+e.toLowerCase()}var $F={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`]},eI={};function tI(e,t){let n=t||eI;return nI(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function nI(e,t,n){if(iI(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 rI(e.children,t,n)}return Array.isArray(e)?rI(e,t,n):``}function rI(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=nI(e[i],t,n);return r.join(``)}function iI(e){return!!(e&&typeof e==`object`)}var aI=document.createElement(`i`);function oI(e){let t=`&`+e+`;`;aI.innerHTML=t;let n=aI.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function sI(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function cI(e,t){return e.length>0?(sI(e,e.length,0,t),e):t}var lI={}.hasOwnProperty;function uI(e){let t={},n=-1;for(;++n<e.length;)dI(t,e[n]);return t}function dI(e,t){let n;for(n in t){let r=(lI.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){lI.call(r,a)||(r[a]=[]);let e=i[a];fI(r[a],Array.isArray(e)?e:e?[e]:[])}}}function fI(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);sI(e,0,0,r)}function pI(e,t){let 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 mI(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var hI=DI(/[A-Za-z]/),gI=DI(/[\dA-Za-z]/),_I=DI(/[#-'*+\--9=?A-Z^-~]/);function vI(e){return e!==null&&(e<32||e===127)}var yI=DI(/\d/),bI=DI(/[\dA-Fa-f]/),xI=DI(/[!-/:-@[-`{-~]/);function SI(e){return e!==null&&e<-2}function CI(e){return e!==null&&(e<0||e===32)}function wI(e){return e===-2||e===-1||e===32}var TI=DI(/\p{P}|\p{S}/u),EI=DI(/\s/);function DI(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function OI(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&gI(e.charCodeAt(n+1))&&gI(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function kI(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return wI(r)?(e.enter(n),s(r)):t(r)}function s(r){return wI(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var AI={tokenize:jI};function jI(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),kI(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return SI(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var MI={tokenize:PI},NI={tokenize:FI};function PI(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return sI(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(NI,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(NI,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return SI(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;sI(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function FI(e,t,n){return kI(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function II(e){if(e===null||CI(e)||EI(e))return 1;if(TI(e))return 2}function LI(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var RI={name:`attention`,resolveAll:zI,tokenize:BI};function zI(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};VI(d,-c),VI(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=cI(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=cI(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=cI(l,LI(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=cI(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=cI(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,sI(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function BI(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=II(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=II(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function VI(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var HI={name:`autolink`,tokenize:UI};function UI(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return hI(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||gI(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||gI(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||vI(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):_I(t)?(e.consume(t),l):n(t)}function u(e){return gI(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||gI(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var WI={partial:!0,tokenize:GI};function GI(e,t,n){return r;function r(t){return wI(t)?kI(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||SI(e)?t(e):n(e)}}var KI={continuation:{tokenize:JI},exit:YI,name:`blockQuote`,tokenize:qI};function qI(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return wI(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function JI(e,t,n){let r=this;return i;function i(t){return wI(t)?kI(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(KI,t,n)(r)}}function YI(e){e.exit(`blockQuote`)}var XI={name:`characterEscape`,tokenize:ZI};function ZI(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return xI(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var QI={name:`characterReference`,tokenize:$I};function $I(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=gI,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=bI,u):(e.enter(`characterReferenceValue`),a=7,o=yI,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===gI&&!oI(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var eL={partial:!0,tokenize:rL},tL={concrete:!0,name:`codeFenced`,tokenize:nL};function nL(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),wI(t)?kI(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||SI(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(eL,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||SI(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):wI(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),kI(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||SI(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||SI(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&wI(t)?kI(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||SI(t)?e.check(eL,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||SI(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),wI(t)?kI(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),wI(t)?kI(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||SI(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function rL(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var iL={name:`codeIndented`,tokenize:oL},aL={partial:!0,tokenize:sL};function oL(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),kI(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):SI(t)?e.attempt(aL,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||SI(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function sL(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):SI(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):kI(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):SI(e)?i(e):n(e)}}var cL={name:`codeText`,previous:uL,resolve:lL,tokenize:dL};function lL(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function uL(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function dL(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):SI(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||SI(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var fL=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&pL(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),pL(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),pL(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);pL(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);pL(this.left,t.reverse())}}}};function pL(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 mL(e){let t={},n=-1,r,i,a,o,s,c,l,u=new fL(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,hL(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return sI(e,0,1/0,u.slice(0)),!l}function hL(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var gL={resolve:vL,tokenize:yL},_L={partial:!0,tokenize:bL};function vL(e){return mL(e),e}function yL(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):SI(t)?e.check(_L,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function bL(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),kI(e,a,`linePrefix`)}function a(i){if(i===null||SI(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function xL(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||vI(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||SI(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||CI(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||vI(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function SL(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):SI(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||SI(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!wI(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function CL(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):SI(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),kI(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||SI(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function wL(e,t){let n;return r;function r(i){return SI(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):wI(i)?kI(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var TL={name:`definition`,tokenize:DL},EL={partial:!0,tokenize:OL};function DL(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return SL.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=mI(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return CI(t)?wL(e,l)(t):l(t)}function l(t){return xL(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(EL,d,d)(t)}function d(t){return wI(t)?kI(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||SI(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function OL(e,t,n){return r;function r(t){return CI(t)?wL(e,i)(t):n(t)}function i(t){return CL(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return wI(t)?kI(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||SI(e)?t(e):n(e)}}var kL={name:`hardBreakEscape`,tokenize:AL};function AL(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return SI(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var jL={name:`headingAtx`,resolve:ML,tokenize:NL};function ML(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},sI(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function NL(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||CI(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||SI(n)?(e.exit(`atxHeading`),t(n)):wI(n)?kI(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||CI(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var PL=`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`.split(`.`),FL=[`pre`,`script`,`style`,`textarea`],IL={concrete:!0,name:`htmlFlow`,resolveTo:zL,tokenize:BL},LL={partial:!0,tokenize:HL},RL={partial:!0,tokenize:VL};function zL(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 BL(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:F):hI(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):hI(a)?(e.consume(a),i=4,r.interrupt?t:F):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:F):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return hI(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||CI(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&FL.includes(l)?(i=1,r.interrupt?t(s):O(s)):PL.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||gI(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return wI(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||hI(t)?(e.consume(t),b):wI(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||gI(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):wI(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):wI(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||SI(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||CI(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||wI(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||SI(t)?O(t):wI(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),j):t===60&&i===1?(e.consume(t),M):t===62&&i===4?(e.consume(t),I):t===63&&i===3?(e.consume(t),F):t===93&&i===5?(e.consume(t),P):SI(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(LL,te,k)(t)):t===null||SI(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(RL,A,te)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return t===null||SI(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function j(t){return t===45?(e.consume(t),F):O(t)}function M(t){return t===47?(e.consume(t),o=``,N):O(t)}function N(t){if(t===62){let n=o.toLowerCase();return FL.includes(n)?(e.consume(t),I):O(t)}return hI(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),N):O(t)}function P(t){return t===93?(e.consume(t),F):O(t)}function F(t){return t===62?(e.consume(t),I):t===45&&i===2?(e.consume(t),F):O(t)}function I(t){return t===null||SI(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),I)}function te(n){return e.exit(`htmlFlow`),t(n)}}function VL(e,t,n){let r=this;return i;function i(t){return SI(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function HL(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(WI,t,n)}}var UL={name:`htmlText`,tokenize:WL};function WL(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):hI(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):hI(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):SI(t)?(o=d,M(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?j(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):SI(t)?(o=h,M(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?j(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?j(t):SI(t)?(o=v,M(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):SI(t)?(o=y,M(t)):(e.consume(t),y)}function b(e){return e===62?j(e):y(e)}function x(t){return hI(t)?(e.consume(t),S):n(t)}function S(t){return t===45||gI(t)?(e.consume(t),S):C(t)}function C(t){return SI(t)?(o=C,M(t)):wI(t)?(e.consume(t),C):j(t)}function w(t){return t===45||gI(t)?(e.consume(t),w):t===47||t===62||CI(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),j):t===58||t===95||hI(t)?(e.consume(t),E):SI(t)?(o=T,M(t)):wI(t)?(e.consume(t),T):j(t)}function E(t){return t===45||t===46||t===58||t===95||gI(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):SI(t)?(o=D,M(t)):wI(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):SI(t)?(o=O,M(t)):wI(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,ee):t===null?n(t):SI(t)?(o=k,M(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||CI(t)?T(t):(e.consume(t),A)}function ee(e){return e===47||e===62||CI(e)?T(e):n(e)}function j(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function M(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),N}function N(t){return wI(t)?kI(e,P,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):P(t)}function P(t){return e.enter(`htmlTextData`),o(t)}}var GL={name:`labelEnd`,resolveAll:YL,resolveTo:XL,tokenize:ZL},KL={tokenize:QL},qL={tokenize:$L},JL={tokenize:eR};function YL(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&sI(e,0,e.length,n),e}function XL(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=cI(s,e.slice(a+1,a+r+3)),s=cI(s,[[`enter`,u,t]]),s=cI(s,LI(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=cI(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=cI(s,e.slice(o+1)),s=cI(s,[[`exit`,c,t]]),sI(e,a,e.length,s),e}function ZL(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(mI(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(KL,u,o?u:d)(t):t===91?e.attempt(qL,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(JL,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function QL(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return CI(t)?wL(e,a)(t):a(t)}function a(t){return t===41?u(t):xL(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return CI(t)?wL(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?CL(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return CI(t)?wL(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function $L(e,t,n){let r=this;return i;function i(t){return SL.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(mI(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function eR(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var tR={name:`labelStartImage`,resolveAll:GL.resolveAll,tokenize:nR};function nR(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var rR={name:`labelStartLink`,resolveAll:GL.resolveAll,tokenize:iR};function iR(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var aR={name:`lineEnding`,tokenize:oR};function oR(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),kI(e,t,`linePrefix`)}}var sR={name:`thematicBreak`,tokenize:cR};function cR(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||SI(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),wI(t)?kI(e,s,`whitespace`)(t):s(t))}}var lR={continuation:{tokenize:pR},exit:hR,name:`list`,tokenize:fR},uR={partial:!0,tokenize:gR},dR={partial:!0,tokenize:mR};function fR(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:yI(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(sR,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return yI(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(WI,r.interrupt?n:u,e.attempt(uR,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return wI(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function pR(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(WI,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,kI(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!wI(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(dR,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,kI(e,e.attempt(lR,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function mR(e,t,n){let r=this;return kI(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function hR(e){e.exit(this.containerState.type)}function gR(e,t,n){let r=this;return kI(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!wI(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var _R={name:`setextUnderline`,resolveTo:vR,tokenize:yR};function vR(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function yR(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),wI(t)?kI(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||SI(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var bR={tokenize:xR};function xR(e){let t=this,n=e.attempt(WI,r,e.attempt(this.parser.constructs.flowInitial,i,kI(e,e.attempt(this.parser.constructs.flow,i,e.attempt(gL,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var SR={resolveAll:ER()},CR=TR(`string`),wR=TR(`text`);function TR(e){return{resolveAll:ER(e===`text`?DR:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function ER(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function DR(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var OR=s({attentionMarkers:()=>IR,contentInitial:()=>AR,disable:()=>LR,document:()=>kR,flow:()=>MR,flowInitial:()=>jR,insideSpan:()=>FR,string:()=>NR,text:()=>PR}),kR={42:lR,43:lR,45:lR,48:lR,49:lR,50:lR,51:lR,52:lR,53:lR,54:lR,55:lR,56:lR,57:lR,62:KI},AR={91:TL},jR={[-2]:iL,[-1]:iL,32:iL},MR={35:jL,42:sR,45:[_R,sR],60:IL,61:_R,95:sR,96:tL,126:tL},NR={38:QI,92:XI},PR={[-5]:aR,[-4]:aR,[-3]:aR,33:tR,38:QI,42:RI,60:[HI,UL],91:rR,92:[kL,XI],93:GL,95:RI,96:cL},FR={null:[RI,SR]},IR={null:[42,95]},LR={null:[]};function RR(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=cI(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=LI(a,l.events,l),l.events):[]}function f(e,t){return BR(p(e),t)}function p(e){return zR(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){SI(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&sI(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function zR(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function BR(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
1600
|
+
`).reduce((e,t)=>/^\s|^([-*+]|\d+[.)])\s/.test(t)?`${e}\n${t}`:`${e} ${t}`,``).slice(1)):[]}function fP(e,t){let{mode:n,commits:r}=e;if(!n.within&&n.base===`parent`)return;let i=n.interdiff?[...n.interdiff.pairs.filter(e=>e.new&&e.status!==`identical`).map(e=>e.new.sha),null]:[...r.list.map(e=>e.sha),null],a=n.interdiff?n.pair?.new??null:n.within?n.new:null,o=i.indexOf(a);return o<0?t>0?null:void 0:i[o+t]}var pP=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},mP=(e=>e?pP(e):pP),hP=e=>e;function gP(e,t=hP){let n=p.useSyncExternalStore(e.subscribe,p.useCallback(()=>t(e.getState()),[e,t]),p.useCallback(()=>t(e.getInitialState()),[e,t]));return p.useDebugValue(n),n}var _P=e=>{let t=mP(e),n=e=>gP(t,e);return Object.assign(n,t),n},vP=(e=>e?_P(e):_P);function yP(e,t=[],n=`unified`){let r=[],i=bP(e,t),a=0;for(let t of e.hunks){let e=t.deletionStart,o=t.additionStart;for(;a<i.length&&i[a]<o;)r.push({side:`additions`,line:i[a++],hunkStart:!1});for(let i of t.hunkContent)if(i.type===`context`){for(let e=0;e<i.lines;e++)r.push({side:`additions`,line:o+e,hunkStart:!1});e+=i.lines,o+=i.lines}else{let t=t=>({side:`deletions`,line:e+t,hunkStart:t===0&&i.additions===0}),a=e=>({side:`additions`,line:o+e,hunkStart:e===0});if(n===`split`){for(let e=0;e<i.additions;e++)r.push(a(e));for(let e=i.additions;e<i.deletions;e++)r.push(t(e))}else{for(let e=0;e<i.deletions;e++)r.push(t(e));for(let e=0;e<i.additions;e++)r.push(a(e))}e+=i.deletions,o+=i.additions}}for(;a<i.length;)r.push({side:`additions`,line:i[a++],hunkStart:!1});return r}function bP(e,t){if(t.length===0)return[];let n=new Set;for(let t of e.hunks){let e=t.additionStart;for(let r of t.hunkContent){let t=r.type===`context`?r.lines:r.additions;for(let r=0;r<t;r++)n.add(e+r);e+=t}}let r=new Set;for(let[e,i]of t)for(let t=e;t<=i;t++)n.has(t)||r.add(t);return[...r].sort((e,t)=>e-t)}function xP(e){let t=e.split(`
|
|
1601
|
+
`);return t.length&&t[t.length-1]===``&&t.pop(),t.map((e,t)=>({side:`additions`,line:t+1,hunkStart:t===0}))}function SP(e,t,n,r,i={},a=`unified`,o=null){if(o){if(!o.item)return[];let e=xN(!1,o.path,n[o.path]??0);return[{id:e,path:o.path,collapsed:!1,rows:wP(o.item,i[e],a)}]}let s=[];for(let o of EN(e)){let e=t[o],c=xN(!0,o,n[o]??0);s.push({id:c,path:o,collapsed:r(o),rows:e?wP(e,i[c],a):[]})}return s}var CP=new WeakMap;function wP(e,t,n){let r=e.kind===`diff`?e.fileDiff:e.kind===`file`?e.file:null;if(!r)return[];let i=CP.get(r);if(i&&i.revealed===t&&i.style===n)return i.rows;let a=e.kind===`diff`?yP(e.fileDiff,t,n):xP(e.file.contents);return CP.set(r,{revealed:t,style:n,rows:a}),a}function TP(e,t){if(!t)return null;let n=e.findIndex(e=>e.id===t.id);if(n===-1)return null;let r=t.range.endSide??t.range.side??`additions`,i=e[n].rows,a=i.findIndex(e=>e.line===t.range.end&&e.side===r);if(a===-1&&(a=i.findIndex(e=>e.line===t.range.end)),a===-1){let e=1/0;if(i.forEach((n,i)=>{let o=Math.abs(n.line-t.range.end)+(n.side===r?0:.5);o<e&&(e=o,a=i)}),a===-1)return null}return{itemIndex:n,rowIndex:a}}function EP(e,t,n){if(e.length===0)return null;if(!t)return DP(e,n===1?0:e.length-1,n);if(t.rowIndex===-1){let r=e[t.itemIndex];return r&&!r.collapsed&&r.rows.length>0?{itemIndex:t.itemIndex,rowIndex:n===1?0:r.rows.length-1}:DP(e,t.itemIndex+n,n)??t}let{itemIndex:r,rowIndex:i}=t;for(i+=n;i<0||i>=(e[r]?.rows.length??0);){if(r+=n,r<0||r>=e.length)return t;let a=e[r];if(a.collapsed)return{itemIndex:r,rowIndex:-1};a.rows.length!==0&&(i=n===1?0:a.rows.length-1)}return{itemIndex:r,rowIndex:i}}function DP(e,t,n){for(let r=t;r>=0&&r<e.length;r+=n){let t=e[r];if(t.collapsed)return{itemIndex:r,rowIndex:-1};if(t.rows.length>0)return{itemIndex:r,rowIndex:n===1?0:t.rows.length-1}}return null}function OP(e,t,n){if(e.length===0)return null;let r=t?t.itemIndex+n:n===1?0:e.length-1;return r<0||r>=e.length?t:{itemIndex:r,rowIndex:e[r].collapsed?-1:0}}function kP(e,t,n){let r=[];if(e.forEach((e,t)=>{e.collapsed||e.rows.forEach((e,n)=>e.hunkStart&&r.push({itemIndex:t,rowIndex:n}))}),r.length===0)return t;if(!t)return n===1?r[0]:r[r.length-1];let i=e=>e.itemIndex*1e7+e.rowIndex,a=i(t);return n===1?r.find(e=>i(e)>a)??t:[...r].reverse().find(e=>i(e)<a)??t}function AP(e,t,n){let r=e[t.itemIndex],i=r?.rows[t.rowIndex];if(!r||!i)return null;if(n&&n.itemIndex===t.itemIndex){let e=r.rows[n.rowIndex];if(e)return{id:r.id,range:{start:e.line,side:e.side,end:i.line,endSide:i.side}}}return{id:r.id,range:{start:i.line,side:i.side,end:i.line,endSide:i.side}}}function jP(e){let t=Kk(e);return t===`json`||t===`jsonc`||t===`yaml`||t===`toml`}function MP(e,t){return!e.external&&e.path===t.path&&e.line===t.line&&e.col>=t.col&&e.col<t.col+t.text.length}var NP=null,PP=null,FP=null,IP=null,LP={get:()=>FP??NP,element:()=>FP?IP:PP,set(e,t=null){NP=e,PP=e?t:null},focus(e,t=null){FP=e,IP=e?t:null}},RP={python:`python`,javascript:`javascript`,javascriptreact:`javascript`,typescript:`typescript`,typescriptreact:`tsx`,rust:`rust`,go:`go`,c:`c`,cpp:`cpp`,ruby:`ruby`,java:`java`,lua:`lua`,zig:`zig`,swift:`swift`,php:`php`,shellscript:`bash`,ocaml:`ocaml`};function zP(e){let t=Kk(e);return t&&t in RP?RP[t]:null}var BP=null,VP=!1,HP=0,UP=new Map;function WP(){VP=!0,BP?.terminate(),BP=null;for(let e of UP.values())e(!1);UP.clear()}async function GP(e,t,n,r,i){let a=zP(e);if(!a||VP||typeof Worker>`u`)return!1;try{let o=await i();if(o.length>1e6||VP)return!1;BP||(BP=new Worker(new URL(``+new URL(`syntax.worker-Cc0dIGs8.js`,import.meta.url).href,``+import.meta.url),{type:`module`}),BP.onmessage=({data:e})=>{UP.get(e.id)?.(e.blocked),UP.delete(e.id)},BP.onerror=WP,BP.onmessageerror=WP);let s=++HP;return await new Promise(i=>{let c=setTimeout(WP,5e3);UP.set(s,e=>{clearTimeout(c),i(e)});try{BP.postMessage({id:s,key:`${t}:${e}`,grammar:a,contents:o,line:n,col:r})}catch{WP()}})}catch{return!1}}var KP={light:`github-light-high-contrast`,dark:`github-dark-high-contrast`},qP=`diffle:theme`;function JP(){try{let e=localStorage.getItem(qP);if(e===`light`||e===`dark`||e===`system`)return e}catch{}return`system`}function YP(e){try{localStorage.setItem(qP,e)}catch{}}function XP(e){let t=document.documentElement;e===`system`?(delete t.dataset.theme,t.style.colorScheme=`light dark`):(t.dataset.theme=e,t.style.colorScheme=e)}function ZP(e){return e===`system`?`light`:e===`light`?`dark`:`system`}var QP=`diffle:diffStyle`,$P=3500,eF=[`side-by-side`,`swipe`,`onion`,`difference`],tF=`diffle:imageCompare`;function nF(){try{let e=localStorage.getItem(tF);return eF.find(t=>t===e)??`side-by-side`}catch{return`side-by-side`}}function rF(){try{return localStorage.getItem(QP)===`unified`?`unified`:`split`}catch{return`split`}}var iF=`diffle:layout`,aF={treeWidth:null,panelWidth:null,treeVisible:!0,panelVisible:!0};function oF(){try{let e=localStorage.getItem(iF);return e?{...aF,...JSON.parse(e)}:aF}catch{return aF}}var Z=vP((e,t)=>{let n=0,r=0,i=e=>e===n,a=0,o=0,s=0,c=null,l=()=>{c&&=(clearTimeout(c.timer),c.wake(),null)},u=new AbortController,d=new Map,f=()=>(u.abort(),u=new AbortController,d.clear(),++n),p=0,m=()=>(p++,f()),h=()=>{let e=0;return{start:()=>++e,latest:t=>t===e}},g=h(),_=h(),v=h(),y=h(),b=()=>{let e=Promise.resolve();return t=>{let n=e.then(t);return e=n.catch(()=>{}),n}},x=b(),S=b(),C=0,w=!1,T=e=>e<=C||!w&&e<=(t().snapshot?.version??0),E=()=>{let e=_.start(),t=v.start();return Promise.all([lA.threads(),lA.viewed()]).then(([n,r])=>({threads:n,viewed:r,tt:e,tv:t}))},D=async(t,n,r)=>{i(n)&&(v.latest(r.tv)&&e({viewed:r.viewed}),_.latest(r.tt)&&je(r.threads),await oe(t,n))},O=async(e,n)=>{let r=f(),a,o=!1;try{if(a=await e(),!i(r)||T(a.version))return;C=a.version,o=!0,await D(a,r,await E())}catch(e){i(r)&&t().report(n,e)}finally{o&&a&&C===a.version&&(C=0)}},k=(e,t)=>{let r=`${n}\0${t}\0${e}`,i=d.get(r);return i||(i=lA.file(e,t,u.signal),d.set(r,i),i.catch(()=>d.delete(r))),i},A=e=>e?.name===`AbortError`,ee=async(e,t)=>{for(;;)try{return await k(e,t)}catch(e){if(!A(e))throw e}},j=e=>e instanceof Error?e.message:String(e),M=(e,n)=>t().flash(`${e} failed: ${j(n)}`),N=async(r,a)=>{let o=t().contents[r]?.[a];if(o!=null)return o;let s=n,c=await ee(r,a);return i(s)&&e(e=>({contents:{...e.contents,[r]:{...e.contents[r],[a]:c.contents}}})),c.contents},P=(e,t)=>{let n={...e.gens};for(let e of t)n[e]=(n[e]??0)+1;let r=r=>{let i=SN(r.id);return t.includes(i)?{...r,id:CN({snapshot:e.snapshot,gens:n,fileView:e.fileView},i)}:r};return{gens:n,selection:e.selection&&r(e.selection),draft:e.draft&&t.includes(e.draft.path)?{...e.draft,selection:e.draft.selection&&r(e.draft.selection)}:e.draft,scrollTarget:e.scrollTarget&&r(e.scrollTarget),reveal:e.reveal&&r(e.reveal)}},F=async(n,r,a)=>{let o=new Map(n.changed.map(e=>[e.path,e])),s=r.filter(e=>o.has(e));if(s.length===0)return;let c={},l=[],u=t().loaded;for(let e of s){let t=o.get(e);t.binary?c[e]={kind:`binary`}:wN(t)>1e4&&u[e]?.kind!==`diff`?c[e]={kind:`oversized`,lines:wN(t)}:l.push(t)}Object.keys(c).length>0&&e(e=>({loaded:{...e.loaded,...c},...P(e,Object.keys(c))}));let d=t();await cF(TN(n,l,[d.fileView?.path,d.activePath,d.selection&&SN(d.selection.id)].filter(e=>e!=null),e=>RN(d,e)),2,()=>!i(a),e=>I(n,e,a))},I=async(t,n,r)=>{let a=new Map(t.changed.map(e=>[e.path,e])),o={},s=new Map;try{let e=Am(n.length===1?await lA.patch(n[0]):await lA.patches(n),`s${t.version}c${t.context}t${Date.now()}`);for(let t of e)for(let e of t.files)s.set(e.name,e);for(let e of n){let t=s.get(e);o[e]=t?{kind:`diff`,fileDiff:t}:{kind:`error`,message:`patch missing for file`}}}catch(e){for(let t of n)o[t]={kind:`error`,message:String(e)}}i(r)&&(e(e=>({loaded:{...e.loaded,...o},...P(e,Object.keys(o))})),re(n.filter(e=>!a.get(e).submodule),s,o,r))},te=[],ne=0,re=(e,t,n,r)=>{for(let i of e){let e=t.get(i);e?.isPartial&&e.hunks.length>0&&(e.type===`change`||e.type===`rename-changed`)&&te.push({path:i,file:e,replaces:n[i],g:r})}for(;ne<4&&ne<te.length;)ne++,L()},L=async()=>{try{for(;;){let e=te.shift();if(!e)return;!i(e.g)||t().loaded[e.path]!==e.replaces||await R(e)}}finally{ne--}},R=async({path:e,file:n,replaces:r,g:a})=>{let o=()=>!i(a)||t().loaded[e]!==r;try{let t=n.prevName??n.name,[i,s]=await Promise.all([k(t,`old`),k(n.name,`new`)]);if(o())return;let c=z_(`clone`,n,{oldFile:{name:t,contents:i.contents},newFile:{name:n.name,contents:s.contents}});ie({path:e,fileDiff:c,old:i.contents,new:s.contents,replaces:r,g:a})}catch{}},z=[],B=null,ie=e=>{z.push(e),!B&&(B=ae,typeof requestAnimationFrame==`function`?requestAnimationFrame(ae):setTimeout(ae,0))},ae=()=>{B=null;let n=z;z=[];let r=n.filter(e=>i(e.g)&&t().loaded[e.path]===e.replaces);r.length!==0&&e(e=>{let t={...e.loaded},n={...e.contents};for(let e of r)t[e.path]={kind:`diff`,fileDiff:e.fileDiff},n[e.path]={...n[e.path],old:e.old,new:e.new};return{loaded:t,contents:n,...P(e,r.map(e=>e.path))}})},oe=async(n,r)=>{let i=t().snapshot,a=i==null||i.mode.commentKey!==n.mode.commentKey,o=i!=null&&i.context!==n.context,s=i!=null&&(i.oldSha===`worktree`||i.oldSha!==n.oldSha),c=s||i!=null&&i.newSha!==n.newSha,l=new Map(i?.changed.map(e=>[e.path,e])??[]),u=new Map(n.changed.map(e=>[e.path,e])),d=a?{}:{...t().loaded},f=a||c?{}:{...t().contents},p=[];for(let e of n.changed){let t=l.get(e.path);if(a||o||s||!t||!sF(t,e)||d[e.path]==null){let t=d[e.path];t&&(d[e.path]={...t}),delete f[e.path],p.push(e.path)}}for(let e of l.keys())u.has(e)||(delete d[e],delete f[e]);let m=t().fileView,h=a||m==null||!m.external&&!n.tree.includes(m.path)?null:m,g=m!=null&&!m.external&&(c||l.has(m.path)!==u.has(m.path)||p.includes(m.path));h&&g&&delete f[h.path];let _={};if(!a)for(let[e,n]of Object.entries(t().collapsed))l.get(e)?.blob===u.get(e)?.blob&&(_[e]=n);let v=t().draft,y=v!=null&&!a&&(u.has(v.path)||h?.path===v.path);w=!1,e(e=>({snapshot:n,loaded:d,occurrences:null,contents:f,fileView:h,collapsed:_,error:null,draft:y?v:null,moved:e.moved&&e.moved.version<n.version?null:e.moved})),t().refreshGithub(),a&&e(e=>({selection:null,visualAnchor:null,replyTo:null,editingId:null,jumps:[],jumpIndex:0,revealed:{},reveal:null,scrollTarget:null,search:{...e.search,open:!1,kind:`text`,direction:1,matches:[],index:-1}})),await Promise.all([F(n,p,r),...h&&(g||!h.item)?[se(h.path,h.external,r,!0)]:[]])},se=async(n,r,a,o=!1)=>{let s=t().fileView?.from??{position:ue(),activePath:t().activePath};o||e({fileView:{path:n,external:r,item:null,from:s},selection:null,visualAnchor:null,draft:null,focusedThread:null});let c,l;try{let e=await k(n,`new`);l=e.contents,c=e.binary?{kind:`binary`}:{kind:`file`,file:{name:n,contents:e.contents,cacheKey:`${n}@full@${Date.now()}`}}}catch(e){c={kind:`error`,message:String(e)}}!i(a)||t().fileView?.path!==n||e(e=>({fileView:{path:n,external:r,item:c,from:e.fileView?.from??s},...P(e,[n]),contents:l==null?e.contents:{...e.contents,[n]:{...e.contents[n],new:l}}}))},ce=null,le=()=>{let e=t();if(!e.snapshot)return[];let n=[e.snapshot,e.loaded,e.gens,e.revealed,e.collapsed,e.viewed,e.config,e.diffStyle,e.fileView];if(ce&&ce.inputs.every((e,t)=>e===n[t]))return ce.items;let r=SP(e.snapshot,e.loaded,e.gens,t=>RN(e,t),e.revealed,e.diffStyle,e.fileView);return ce={inputs:n,items:r},r},ue=()=>{let e=t().selection;if(!e)return null;let n=SN(e.id),r=t().fileView;return r?.path===n?{path:n,side:_N(e),line:e.range.end,full:!0,...r.external?{external:!0}:{}}:{path:n,side:_N(e),line:e.range.end}},V=()=>{if(fe)return;let n=ue();if(!n)return;let{jumps:r,jumpIndex:i}=t(),a=r.slice(0,i),o=a[a.length-1];if(o&&o.path===n.path&&o.line===n.line&&o.side===n.side&&!!o.full==!!n.full){e({jumps:a,jumpIndex:a.length});return}let s=[...a,n].slice(-100);e({jumps:s,jumpIndex:s.length})},de=n=>{RN(t(),n)&&e(e=>({collapsed:{...e.collapsed,[n]:!1}}))},fe=!1,pe=e=>{fe=!0;let t=()=>{fe=!1},n;try{n=e()}catch(e){throw t(),e}return n instanceof Promise?n.finally(t):(t(),n)},me=async r=>{if(r.full&&t().fileView?.path!==r.path){let e=n;if(await se(r.path,r.external??!1,e),!i(e)||t().fileView?.path!==r.path)return}else!r.full&&t().fileView&&e({fileView:null,selection:null,visualAnchor:null,draft:null,focusedThread:null});fe=!0;try{he(r)}finally{fe=!1}},he=t=>{t.full||de(t.path);let n=le(),r=n.findIndex(e=>e.path===t.path);if(r===-1)return;let i=n[r],a=t.side===`old`?`deletions`:`additions`,o=i.rows.findIndex(e=>e.line===t.line&&e.side===a);if(o!==-1){be({itemIndex:r,rowIndex:o},!1,`eye`);return}e(e=>({selection:{id:i.id,range:{start:t.line,side:a,end:t.line,endSide:a}},activePath:t.path,scrollTarget:{id:i.id,line:t.line,side:t.side,align:`eye`,nonce:(e.scrollTarget?.nonce??0)+1}}))},ge=(n,r)=>{let i=t().snapshot,a=le(),o=a.find(e=>e.path===n);if(!i||!o)return;let s=DN(i,n,r),c=s?a.findIndex(e=>e.path===s.path):-1,l=a[c],u=null;if(l&&!l.collapsed&&l.rows.length>0){let e=l.rows.findIndex(e=>e.hunkStart);u=AP(a,{itemIndex:c,rowIndex:e===-1?0:e})}e(e=>({selection:u,visualAnchor:null,draft:null,activePath:l?l.path:n,scrollTarget:{id:o.id,align:`start`,nonce:(e.scrollTarget?.nonce??0)+1}}))},_e=e=>!FN(t(),e),ve=e=>!RN(t(),e.path),ye=(e,t)=>{let n=e.selection;return{id:n.id,line:n.range.end,side:_N(n),align:t,nonce:(e.scrollTarget?.nonce??0)+1}},be=(n,r=!1,i=`nearest`)=>{if(!n)return;i===`eye`&&V();let a=le(),o=AP(a,n,r?t().visualAnchor:null),s=a[n.itemIndex];if(!o||!s)return;let c=s.rows[n.rowIndex];e(e=>({selection:o,activePath:s.path,visualAnchor:r?e.visualAnchor:null,focusedThread:null,scrollTarget:{id:s.id,line:c.line,side:c.side===`deletions`?`old`:`new`,align:i,nonce:(e.scrollTarget?.nonce??0)+1}}))},xe=async(n,r,i=!1)=>{V(),await pe(()=>i?t().openFullFile(n,void 0,!0):t().openFile(n)),de(n);let a=le(),o=a.findIndex(e=>e.path===n);if(o===-1)return;let s=a[o],c=s.rows.findIndex(e=>e.side===`additions`&&e.line===r);if(c!==-1){pe(()=>be({itemIndex:o,rowIndex:c},!1,`eye`));return}e(e=>({selection:{id:s.id,range:{start:r,side:`additions`,end:r,endSide:`additions`}},activePath:n,visualAnchor:null,reveal:{id:s.id,path:n,line:r,nonce:(e.reveal?.nonce??0)+1}}))},Se=e=>{let{lsp:n,snapshot:r}=t();return n.enabled?!r||!Wk(r)?`Symbol navigation needs the new side to be the worktree or the checked-out commit`:qk(n,e):qk(n)},Ce=e=>Se(e.path)??(e.side===`old`?`Symbol navigation works on the new side only`:t().fileView?.external?`Symbol navigation starts from a repository file`:null),we=e=>{let n=e?Ce(e):Se()??`Hover a symbol first`;return n?(t().flash(n),null):{path:e.path,line:e.line,col:e.col}},Te=(t,n)=>i(t)&&g.latest(n)?!0:(g.latest(n)&&e(e=>({search:{...e.search,loading:!1}})),!1),Ee=async(r,a)=>{if(t().closeSymbolMenu(),r&&jP(r.path))return t().flash(`Configuration files support schema hover (gh)`);let o=we(r);if(!o)return;let s=n;try{let n=await(a===`definition`?lA.lspDefinition(o):lA.lspTypeDefinition(o));if(!i(s))return;let c=n.locations[0];if(!c)return t().flash(`No ${a} found for ${r.text}`);if(a===`definition`&&n.locations.every(e=>MP(e,r)))return await t().findReferences(r);if(a===`type definition`&&n.locations.length>1){e(e=>({references:{...e.references,open:!0,kind:`types`,symbol:r.text,items:n.locations,index:0}}));return}await xe(c.path,c.line,c.external)}catch(e){i(s)&&M(a===`definition`?`Go to definition`:`Go to type definition`,e)}},De=()=>TP(le(),t().selection),Oe=()=>{let e=De();if(e)return e;let n=le().findIndex(e=>e.path===t().activePath);return n===-1?null:{itemIndex:n,rowIndex:-1}},ke=(t,n=!1,r=`nearest`)=>{if(!t)return;if(t.rowIndex!==-1)return be(t,n,r);let i=le()[t.itemIndex];i&&e(e=>({selection:null,activePath:i.path,visualAnchor:null,focusedThread:null,scrollTarget:{id:i.id,align:r,nonce:(e.scrollTarget?.nonce??0)+1}}))},Ae=()=>{let e=t(),n=e.selection;if(!n)return;let r=SN(n.id),i=_N(n),a=n.range.end;return zN(e).find(e=>e.anchor.kind===`line`&&e.anchor.path===r&&e.anchor.side===i&&a>=e.anchor.startLine&&a<=e.anchor.endLine)},je=n=>e({threads:GN(t().threads,n)}),Me=async(e,n)=>{try{await n()}catch(t){return M(e,t)}await t().refreshThreads()},Ne=async(n,r)=>{let i=p,a=0;try{let t=await x(()=>(a=v.start(),r()));p===i&&v.latest(a)&&e({viewed:t})}catch(e){if(p!==i)return;M(n,e),t().refreshViewed()}},Pe=null;return{layout:oF(),setLayout(n){let r={...t().layout,...n};try{localStorage.setItem(iF,JSON.stringify(r))}catch{}e({layout:r})},theme:JP(),setTheme(t){YP(t),XP(t),e({theme:t})},visualAnchor:null,editingId:null,setEditingId(t){e({editingId:t})},replyTo:null,focusedThread:null,focusThread(t){e({focusedThread:t})},openReply(n){let r=t().threads.find(e=>e.id===n);r&&e({replyTo:n,draft:null,activePath:r.anchor.path})},closeReply(){t().replyTo&&e({replyTo:null})},githubMenuOpen:!1,github:{status:`idle`},setGithubMenuOpen(n){e({githubMenuOpen:n,...n?{modeMenuOpen:!1}:{}}),n&&t().refreshGithub()},async refreshGithub(){let i=t().snapshot;if(!i)return;let a=n,o=++r,s=()=>a===n&&t().snapshot===i&&r===o;e({github:{status:`loading`}});try{let t=await lA.github();s()&&e({github:t.version===i.version?{status:`ready`,data:t}:{status:`idle`}})}catch(t){s()&&e({github:{status:`error`,error:j(t)}})}},modeMenuOpen:!1,modePane:null,modeEntry:1,setModeMenuOpen(t){e({modeMenuOpen:t,modePane:null,modeEntry:1,...t?{githubMenuOpen:!1}:{}})},highlightModeEntry(n){let r=ZN.length,i=((n-1)%r+r)%r+1;i!==t().modeEntry&&e({modeEntry:i})},pickModeEntry(n){n===1?(e({modeMenuOpen:!1,modePane:null,modeEntry:1}),t().switchMode({kind:`working`})):n>=2&&n<=ZN.length&&e({modeMenuOpen:!0,modePane:ZN[n-1],modeEntry:n})},closeModePane(){t().modePane&&e({modePane:null})},modeCommit:`HEAD`,setModeCommit(t){e({modeCommit:t})},helpOpen:!1,setHelpOpen(t){e({helpOpen:t})},treeModel:null,setTreeModel(t){e({treeModel:t})},toast:null,report:M,flash(t){e({toast:t}),Pe&&clearTimeout(Pe),Pe=setTimeout(()=>e({toast:null}),$P)},search:{open:!1,kind:`text`,direction:1,ignoreCase:!0,regex:!1,scope:`diff`,content:{file:`diff`,diff:`diff`},path:null,focusNonce:0,input:``,editing:!1,query:``,matches:[],index:-1,loading:!1,truncated:!1},openSearch(t){g.start(),e(e=>{let n=t??e.search.scope,r=n===`file`?ON(e):null,i=e.search.kind===`text`&&e.search.scope===n&&e.search.path===r;return{search:{...e.search,open:!0,kind:`text`,direction:1,scope:n,matches:i?e.search.matches:[],index:i?e.search.index:-1,truncated:i&&e.search.truncated,loading:!1,input:e.search.open&&e.search.kind===`text`?e.search.input:e.search.query,editing:!0,path:r,focusNonce:e.search.focusNonce+1},...r?{scrollTarget:{id:CN(e,r),align:`start`,unlessVisible:`search`,nonce:(e.scrollTarget?.nonce??0)+1}}:{}}})},setSearchInput(t){e(e=>({search:{...e.search,input:t,editing:!0}}))},blurSearchInput(){e(e=>({search:{...e.search,editing:!1}}))},typeSearchInput(t){e(e=>({search:{...e.search,input:t===`Backspace`?Array.from(e.search.input).slice(0,-1).join(``):e.search.input+t,editing:!0,focusNonce:e.search.focusNonce+1},...e.search.scope===`file`&&e.search.path?{scrollTarget:{id:CN(e,e.search.path),align:`start`,unlessVisible:`search`,nonce:(e.scrollTarget?.nonce??0)+1}}:{}}))},setSearchOptions(n){let{content:r,...i}=n;e(e=>({search:{...e.search,...i,content:r?{...e.search.content,[e.search.scope]:r}:e.search.content}}));let{query:a,kind:o}=t().search;o===`text`&&a&&t().runSearch(a)},closeSearch(){g.start(),e(e=>({search:{...e.search,open:!1,editing:!1,kind:`text`,direction:1,matches:[],index:-1,loading:!1}}))},async runSearch(r){let i=n,a=g.start(),o=t().search.scope===`file`?t().search.path:null;e(e=>({search:{...e.search,kind:`text`,direction:1,query:r,input:r,editing:!1,path:o,loading:!0}}));try{let{ignoreCase:n,regex:s,scope:c,content:l}=t().search;if(c===`file`&&!o)return e(e=>({search:{...e.search,matches:[],index:-1,loading:!1}})),t().flash(`No file to search in`);let u=await lA.search(r,{ignoreCase:n,regex:s,scope:c,content:l[c],...o?{path:o}:{}});if(!Te(i,a))return;e(e=>({search:{...e.search,matches:u.matches,truncated:u.truncated,index:-1,loading:!1}})),u.matches.length?t().moveMatch(1):t().flash(c===`file`?`No matches for “${r}” in ${o}`:`No matches for “${r}” in ${l[c]===`diff`?`the diff + context`:`changed files`}`)}catch(t){if(!Te(i,a))return;e(e=>({search:{...e.search,loading:!1}})),M(`Search`,t)}},moveMatch(n){let{search:r}=t(),i=r.matches.length;if(!i)return;let a=n*r.direction,o=((r.index<0?a===1?-1:0:r.index)+a+i)%i,s=r.matches[o];e({search:{...r,index:o}}),xe(s.path,s.line,s.external)},async searchWord(r){let i=LP.get()?.text;if(!i)return t().flash(`Focus a word first (w / b, or hover one)`);let a=n,o=g.start();e(e=>({search:{...e.search,open:!0,kind:`word`,direction:r,query:i,matches:[],index:-1,loading:!0,truncated:!1}}));try{let n=await lA.search(i,{word:!0,scope:`repo`,content:`full`});if(!Te(a,o))return;let s=n.matches,c=new Map(t().snapshot?.tree.map((e,t)=>[e,t])??[]),l=ue(),u=e=>c.get(e)??1/0,d=e=>l?u(e.path)-u(l.path)||e.line-l.line:r,f=r===1?s.findIndex(e=>d(e)>0):s.findLastIndex(e=>d(e)<0);f===-1&&s.length&&(f=r===1?0:s.length-1),e(e=>({search:{...e.search,matches:s,truncated:n.truncated,index:f,loading:!1}}));let p=s[f];p?xe(p.path,p.line):t().flash(`No other occurrence of “${i}”`)}catch(t){if(!Te(a,o))return;e(e=>({search:{...e.search,loading:!1}})),M(`Search`,t)}},lsp:{enabled:!1,servers:[],missing:[]},setLspStatus(t){e({lsp:t})},symbolMenu:null,async openSymbolMenu(r,o,s){if(jP(r.path)){t().closeSymbolMenu();return}if(!t().lsp.enabled)return;t().closeHover();let c=++a,l=n,u=await GP(r.path,r.side,r.line,r.col,()=>N(r.path,r.side));if(!(!i(l)||c!==a)){if(u){e({symbolMenu:null});return}if(!Ce(r)){let e=n,t=null;try{t=(await lA.lspTokenKind({path:r.path,line:r.line,col:r.col}))?.kind??null}catch{}if(!i(e)||c!==a||t===`keyword`)return}e({symbolMenu:{target:r,x:o,y:s}})}},closeSymbolMenu(){a++,t().symbolMenu&&e({symbolMenu:null})},hover:null,async requestHover(r,a){let s=++o;if(t().symbolMenu||Ce(r))return;let c=n;try{let n=await GP(r.path,r.side,r.line,r.col,()=>N(r.path,r.side));if(!i(c)||s!==o||t().symbolMenu)return;if(n){e({hover:null});return}let l=await lA.lspHover({path:r.path,line:r.line,col:r.col});if(!i(c)||s!==o||t().symbolMenu)return;e({hover:l.contents?{target:r,contents:l.contents,anchor:a}:null})}catch{}},async showHover(){let e=t().symbolMenu?.target??LP.get();if(!we(e))return;t().closeSymbolMenu();let n=LP.element()?.getBoundingClientRect(),r=n?{left:n.left,top:n.top,bottom:n.bottom}:{left:0,top:0,bottom:0};await new Promise(e=>setTimeout(e,0));let i=o+1;await t().requestHover(e,r),i===o&&!t().hover&&t().flash(`No hover information for ${e.text}`)},closeHover(){o++,t().hover&&e({hover:null})},occurrences:null,async requestOccurrences(t){let r=++s;if(Ce(t))return null;let a=n;try{let n=await GP(t.path,t.side,t.line,t.col,()=>N(t.path,t.side));if(!i(a))return null;let o=n?[]:(await lA.lspOccurrences({path:t.path,line:t.line,col:t.col})).occurrences;return i(a)?(r===s&&e({occurrences:o.length?{target:t,items:o}:null}),o):null}catch{return null}},clearOccurrences(){s++,t().occurrences&&e({occurrences:null})},async goToDefinition(e=t().symbolMenu?.target??LP.get()){await Ee(e,`definition`)},async goToTypeDefinition(e=t().symbolMenu?.target??LP.get()){await Ee(e,`type definition`)},async goToLink(e,n){t().closeHover(),t().closeSymbolMenu(),n==null?await t().openFile(e):await xe(e,n)},async findReferences(r=t().symbolMenu?.target??LP.get()){if(t().closeSymbolMenu(),r&&jP(r.path))return t().flash(`Configuration files support schema hover (gh)`);let a=we(r);if(!a)return;let o=n;try{let n=await lA.lspReferences(a);if(!i(o))return;let s=n.locations;if(s.length===0)return t().flash(`No references to ${r.text}`);let c=s.findIndex(e=>e.path===a.path&&e.line===a.line),l=c===-1?0:(c+1)%s.length;e(e=>({references:{...e.references,open:!0,kind:`references`,symbol:r.text,items:s,index:l}}))}catch(e){i(o)&&M(`Find references`,e)}},references:{open:!1,kind:`references`,symbol:``,items:[],index:-1,peek:!1},moveReference(n){let r=t().references,i=r.items.length;i&&e({references:{...r,index:(Math.max(r.index,0)+n+i)%i}})},togglePeek(){e(e=>({references:{...e.references,peek:!e.references.peek}}))},pickReference(n){let r=t().references,i=r.items[r.index];t().closeReferences(),i&&(r.kind===`references`&&e(e=>({search:{...e.search,open:!0,kind:`references`,direction:1,query:r.symbol,matches:r.items,index:r.index,loading:!1,truncated:!1}})),xe(i.path,n??i.line,i.external))},closeReferences(){e(e=>({references:{...e.references,open:!1}}))},symbols:{open:!1,scope:`document`,path:null,query:``,all:[],items:[],index:-1,loading:!1},async openSymbols(r){let a=r===`document`?t().activePath:null;if(r===`document`&&!a)return t().flash(`Move to a file first`);let o=a?Ce({path:a,side:`new`}):Se();if(o)return t().flash(o);if(e({symbols:{open:!0,scope:r,path:r===`document`?a:null,query:``,all:[],items:[],index:-1,loading:r===`document`}}),r!==`document`)return;let s=n;try{let n=await lA.lspSymbols({path:a}),r=t().symbols;if(!r.open||r.scope!==`document`||r.path!==a)return;if(!i(s))return e({symbols:{...r,loading:!1}});e({symbols:{...r,all:n,items:XN(n,r.query),index:n.length?0:-1,loading:!1}})}catch(e){t().closeSymbols(),M(`Document symbols`,e)}},async querySymbols(r){let a=t().symbols;if(!a.open)return;if(a.scope===`document`){let t=XN(a.all,r);return e({symbols:{...a,query:r,items:t,index:t.length?0:-1}})}if(e({symbols:{...a,query:r,loading:r.trim().length>0}}),l(),!r.trim())return e(e=>({symbols:{...e.symbols,items:[],index:-1}}));if(await new Promise(e=>{c={timer:setTimeout(()=>{c=null,e()},150),wake:e}}),t().symbols.query!==r||!t().symbols.open)return;let o=n;try{let n=await lA.lspSymbols({q:r}),a=t().symbols;if(!a.open||a.query!==r)return;if(!i(o))return e({symbols:{...a,loading:!1}});e({symbols:{...a,items:n,index:n.length?0:-1,loading:!1}})}catch(t){e(e=>({symbols:{...e.symbols,loading:!1}})),M(`Workspace symbols`,t)}},moveSymbol(n){let r=t().symbols,i=r.items.length;i&&e({symbols:{...r,index:(Math.max(r.index,0)+n+i)%i}})},pickSymbol(){let e=t().symbols,n=e.items[e.index];t().closeSymbols(),n&&xe(n.path,n.line)},closeSymbols(){e(e=>({symbols:{...e.symbols,open:!1,items:[],all:[],index:-1,loading:!1}}))},moveCursor(e){let n=le();ke(EP(n,Oe(),e),t().visualAnchor!=null)},jumps:[],jumpIndex:0,jumpBack(){if(!kN(t()))return;if(t().fileView)return t().closeFullFile();let{jumps:n,jumpIndex:r}=t(),i=n,a=r;if(a===i.length){let e=ue();e&&(i=[...i,e])}--a,e({jumps:i,jumpIndex:a});let o=i[a];o&&me(o)},jumpForward(){if(!AN(t()))return;let{jumps:n,jumpIndex:r}=t(),i=r+1;e({jumpIndex:i});let a=n[i];a&&me(a)},scrollCursorTo(n){if(!t().selection)return t().flash(`No line under the cursor`);e(e=>({scrollTarget:ye(e,n)}))},moveCursorBy(e){let n=le(),r=e<0?-1:1,i=Oe();for(let t=0;t<Math.abs(e);t++){let e=EP(n,i,r);if(!e||i&&e.itemIndex===i.itemIndex&&e.rowIndex===i.rowIndex)break;i=e}ke(i,t().visualAnchor!=null,`eye`)},async goToLine(e){let n=t(),r=ON(n);if(!r)return n.flash(`No file to jump in`);await xe(r,e)},moveFile(n){let r=le();if(!r.length)return;let i=r.findIndex(e=>e.path===t().activePath),a=Oe()??(i===-1?null:{itemIndex:i,rowIndex:0}),o=n===`first`?OP(r,null,1):n===`last`?OP(r,null,-1):OP(r,a,n);if(!o)return;let s=r[o.itemIndex];if(V(),s.collapsed||s.rows.length===0){e(e=>({selection:null,activePath:s.path,scrollTarget:{id:s.id,nonce:(e.scrollTarget?.nonce??0)+1}}));return}be(o),e(e=>({scrollTarget:{id:s.id,align:`start`,nonce:(e.scrollTarget?.nonce??0)+1}}))},moveHunk(e){be(kP(le(),Oe(),e),!1,`eye`)},toggleVisual(){let n=De();if(t().visualAnchor){e({visualAnchor:null}),n&&be(n);return}if(!n){let t=EP(le(),null,1);t&&be(t),e({visualAnchor:De()});return}e({visualAnchor:n})},editCommentAtCursor(){let e=Ae(),n=e?.messages[e.messages.length-1];n&&t().setEditingId(n.id)},async deleteCommentAtCursor(){let e=Ae();e&&await t().deleteThread(e.id)},async toggleResolvedAtCursor(){let e=Ae();if(!e)return t().flash(`No thread under the cursor`);await t().setResolved(e.id,!e.resolved),t().flash(e.resolved?`Thread reopened`:`Thread resolved`)},async toggleViewedAtCursor(){let e=t().activePath,n=e?t().snapshot?.changed.find(t=>t.path===e):void 0;if(!e||!n)return;let r=!FN(t(),n),i=t().setViewed(e,r);r&&ge(e,_e),await i},async toggleViewedAbove(){let n=le(),r=n.findIndex(e=>e.path===t().activePath),i=r>0?n[r-1].path:void 0,a=i?t().snapshot?.changed.find(e=>e.path===i):void 0;if(!a)return t().flash(`No file above`);let o=t().setViewed(a.path,!FN(t(),a)),s=n[r];e(e=>({scrollTarget:e.selection?ye(e,`eye`):{id:s.id,nonce:(e.scrollTarget?.nonce??0)+1}})),await o},setCollapsedAtCursor(n){let r=t().activePath;r&&(e(e=>({collapsed:{...e.collapsed,[r]:n}})),n?ge(r,ve):t().loadPatch(r))},setAllCollapsed(n){let r=t().snapshot?.changed.map(e=>e.path)??[],i={};for(let e of r)i[e]=n;e({collapsed:i})},escape(){let n=t();n.helpOpen?e({helpOpen:!1}):n.modePane?n.closeModePane():n.modeMenuOpen?e({modeMenuOpen:!1}):n.githubMenuOpen?e({githubMenuOpen:!1}):n.hover?n.closeHover():n.symbolMenu?n.closeSymbolMenu():n.references.open&&n.references.peek?n.togglePeek():n.references.open?n.closeReferences():n.symbols.open?n.closeSymbols():n.search.open?n.closeSearch():n.editingId?n.setEditingId(null):n.replyTo?n.closeReply():n.draft?n.closeDraft():n.visualAnchor?e({visualAnchor:null}):e({selection:null})},diffStyle:rF(),setDiffStyle(t){try{localStorage.setItem(QP,t)}catch{}e({diffStyle:t,draft:null,visualAnchor:null})},imageCompare:nF(),setImageCompare(t){try{localStorage.setItem(tF,t)}catch{}e({imageCompare:t})},snapshot:null,error:null,threads:[],showResolved:!1,setShowResolved(t){e({showResolved:t})},viewed:[],config:Mk,fileView:null,loaded:{},gens:{},contents:{},collapsed:{},selection:null,draft:null,activePath:null,scrollTarget:null,reveal:null,revealed:{},addRevealed(t,n,r){e(e=>{let i=SN(t),a=Object.fromEntries(Object.entries(e.revealed).filter(([e])=>e===t||SN(e)!==i));return{revealed:{...a,[t]:[...a[t]??[],[n,r]]}}})},async boot(){let t=m();w=!0,C=0;try{let n=lA.lspStatus().catch(()=>({enabled:!1,servers:[],missing:[]})),r=y.start(),[a,o,s,c,l]=await Promise.all([lA.snapshot(),E(),lA.config(),n,lA.moved()]);e({lsp:c}),y.latest(r)&&e({config:s}),await D(a,t,o),i(t)&&(l==null||l.version>=a.version)&&e({moved:l})}catch(n){i(t)&&e({error:j(n)})}},async refreshSnapshot(t){if(t!=null){if(T(t))return;C=t}let n=f();try{let[e,t]=await Promise.all([lA.snapshot(),E()]);await D(e,n,t)}catch(t){i(n)&&e({error:j(t)})}finally{C===t&&(C=0)}},async refreshThreads(){let e=n,t=_.start();try{let n=await lA.threads();i(e)&&_.latest(t)&&je(n)}catch(n){i(e)&&_.latest(t)&&M(`Loading threads`,n)}},async refreshViewed(){let t=n,r=v.start();try{let n=await lA.viewed();i(t)&&v.latest(r)&&e({viewed:n})}catch(e){i(t)&&v.latest(r)&&M(`Loading viewed marks`,e)}},async refreshConfig(){let t=y.start();try{let n=await lA.config();y.latest(t)&&e({config:n})}catch(e){y.latest(t)&&M(`Loading config`,e)}},async switchMode(n){let r=m();e({error:null});let a,o=!1;try{return a=await lA.switchMode(n),i(r)?T(a.version)?`applied`:(C=a.version,o=!0,await D(a,r,await E()),i(r)?`applied`:`superseded`):`superseded`}catch(n){if(!i(r))return`superseded`;let a=j(n);return e({error:a}),t().refreshGithub(),{error:a}}finally{o&&a&&C===a.version&&(C=0)}},moved:null,setMoved(t){e({moved:t})},reload:()=>O(lA.reload,`Reloading`),clearIterations:()=>O(lA.clearIterations,`Forgetting iterations`),deleteIteration:e=>O(()=>lA.deleteIteration(e),`Forgetting iteration #${e}`),focusCommit(e){t().switchMode({kind:`focus`,commit:e})},compareIterations(e,n){t().switchMode({kind:`interdiff`,from:e,to:n})},showPair(e){t().switchMode({kind:`pair`,commit:e})},toggleInterdiff(){let e=t().snapshot;if(!e)return;if(e.mode.interdiff)return t().focusCommit(null);let[n,r]=e.iterations.slice(-2);if(!n||!r)return t().flash(`Only one iteration so far: reload once the branch moved`);t().compareIterations(n.n,r.n)},stepIteration(e,n){let r=t().snapshot;if(!r)return;let i=oP(r.iterations,rk(r.mode),e,n);i&&t().compareIterations(i.from,i.to)},pickIteration(e){let n=t().snapshot,r=n?.iterations.at(-1);if(!n||!r)return;if(!n.iterations.some(t=>t.n===e))return t().flash(`No iteration #${e}`);let i=aP(rk(n.mode),r.n,e,!1);i&&t().compareIterations(i.from,i.to)},reloadIfMoved(){t().moved?t().reload():t().flash(`Nothing moved since this snapshot`)},stepCommit(e){let n=t().snapshot;if(!n)return;if(n.mode.within||n.mode.base!==`parent`){let r=fP(n,e);if(r===void 0)return;n.mode.interdiff?t().showPair(r):t().focusCommit(r);return}let r=e<0?n.commit?.parent:n.commit?.child;r&&t().switchMode({kind:`revspec`,args:[`${r}^!`]})},loadFile:ee,async openFile(n,r,i){let a=t().snapshot;if(a){if(!a.changed.some(e=>e.path===n)||t().fileView?.path===n&&i!==`old`){await t().openFullFile(n,r);return}t().fileView&&(V(),e({fileView:null,selection:null,visualAnchor:null,draft:null,focusedThread:null})),t().jumpTo(n,r,i),e({activePath:n})}},async loadPatch(e){let r=t().snapshot;!r||t().loaded[e]?.kind!==`oversized`||await I(r,[e],n)},async openFullFile(r,a,o=!1){let s=t().snapshot;if(!s)return;let c=t().fileView,l=o||c?.path===r&&c.external;if(!l&&!s.tree.includes(r)){t().flash(`${r} no longer exists on this side`);return}let u=n;if(c?.path!==r&&(V(),await se(r,l,u),!i(u)||t().fileView?.path!==r))return;let d=t().fileView?.item;d?.kind===`error`&&t().flash(`Cannot open ${r}: ${d.message}`),t().jumpTo(r,a),e({activePath:r})},closeFullFile(){let n=t().fileView;if(!n)return;V();let{position:r,activePath:i}=n.from,a=t().jumps,o=r?a.findLastIndex(e=>e.path===r.path&&e.line===r.line&&e.side===r.side&&!e.full):-1;e({fileView:null,selection:null,visualAnchor:null,draft:null,focusedThread:null,activePath:i,...o>=0?{jumpIndex:o}:{}}),r?me(r):i&&e(e=>({scrollTarget:{id:CN(e,i),align:`start`,nonce:(e.scrollTarget?.nonce??0)+1}}))},setSelection(n){e({selection:n,visualAnchor:null,focusedThread:null}),n==null&&t().draft?.selection&&e({draft:null})},async openDraft(n){let r=t().snapshot&&iP(t().snapshot.mode);if(r)return t().flash(r);if(t().fileView?.external)return t().flash(`Comments go on repository files only`);let i=SN(n.id);e({draft:{path:i,selection:n},selection:n,activePath:i,replyTo:null})},openFileDraft(n){let r=t().snapshot&&iP(t().snapshot.mode);if(r)return t().flash(r);if(t().fileView?.external)return t().flash(`Comments go on repository files only`);let i=t().selection,a=i&&SN(i.id)===n?i:null;e(e=>({draft:{path:n,selection:null},selection:a,visualAnchor:null,activePath:n,replyTo:null,scrollTarget:{id:CN(e,n),align:`start`,unlessVisible:`top`,nonce:(e.scrollTarget?.nonce??0)+1}})),de(n)},closeDraft(){e({draft:null,selection:null})},async draftQuote(){let e=t().draft;if(!e?.selection)return``;let n=HN(t(),e.path,e.selection),r=await N(e.path,n.side);return bN(e.path,n,r).quoted},async submitDraft(n){let r=t().draft;if(!r||!n.trim())return;if(!r.selection){try{await lA.addThread({path:r.path,body:n})}catch(e){return M(`Posting the comment`,e)}e({draft:null}),await t().refreshThreads();return}try{let e=HN(t(),r.path,r.selection),i=await N(r.path,e.side),{path:a,side:o,startLine:s,endLine:c,quoted:l}=bN(r.path,e,i);await lA.addThread({path:a,side:o,startLine:s,endLine:c,quoted:l,body:n})}catch(e){return M(`Posting the comment`,e)}let i=r.selection.range;e({draft:null,visualAnchor:null,selection:{id:r.selection.id,range:{start:i.end,side:i.endSide??i.side,end:i.end,endSide:i.endSide??i.side}}}),await t().refreshThreads()},async submitReply(n,r){if(r.trim()){try{await lA.reply(n,{body:r})}catch(e){return M(`Posting the reply`,e)}t().replyTo===n&&e({replyTo:null}),await t().refreshThreads()}},editMessage:(e,t,n)=>Me(`Editing the message`,()=>lA.editMessage(e,t,n)),deleteMessage:(e,t)=>Me(`Deleting the message`,()=>lA.deleteMessage(e,t)),setResolved:(e,t)=>Me(t?`Resolving`:`Reopening`,()=>lA.setResolved(e,t)),deleteThread:e=>Me(`Deleting the thread`,()=>lA.deleteThread(e)),clearThreads:()=>Me(`Deleting all threads`,()=>lA.clearThreads()),deleteStaleThreads:()=>Me(`Deleting stale threads`,()=>lA.deleteStaleThreads()),async exportToGithub(e){if(!t().snapshot)return null;let n;try{n=await lA.exportToGithub({threadIds:e})}catch(e){return M(`Adding to the GitHub review`,e),null}let r=n.skipped.filter(e=>e.reason!==`already in the review`);if(r.length){let e=n.posted+n.updated+n.skipped.length;t().flash(`Skipped ${r.length} of ${e} (${r.map(e=>e.reason).join(`, `)})`)}return n.posted>0?`added`:n.updated>0?`updated`:`unchanged`},async setViewed(n,r){let i=t().snapshot?.changed.find(e=>e.path===n);i&&(e(e=>({viewed:[...e.viewed.filter(e=>e.path!==n||e.blob!==i.blob),{path:n,blob:i.blob,viewed:r}],collapsed:{...e.collapsed,[n]:r}})),await Ne(`Marking viewed`,()=>lA.setViewed(n,i.blob,r)))},async setViewedMany(n,r){let i=new Set(n),a=(t().snapshot?.changed??[]).filter(e=>i.has(e.path)).map(e=>({path:e.path,blob:e.blob,viewed:r}));a.length&&(e(e=>({viewed:[...e.viewed.filter(e=>!i.has(e.path)),...a],collapsed:{...e.collapsed,...Object.fromEntries(a.map(e=>[e.path,r]))}})),await Ne(r?`Marking viewed`:`Marking not viewed`,()=>lA.setViewedBulk(a)))},toggleCollapsed(n){let r=RN(t(),n);e(e=>({collapsed:{...e.collapsed,[n]:!r}})),r&&t().loadPatch(n)},selectFile(t){e({selection:null,visualAnchor:null,activePath:t})},async saveConfig(t){let n=0;try{let r=await S(()=>(n=y.start(),lA.saveConfig(t)));y.latest(n)&&e({config:r})}catch(e){y.latest(n)&&M(`Saving settings`,e)}},jumpTo(n,r,i){V(),r!=null&&de(n);let a=CN(t(),n);if(r==null){let t=le(),n=t.findIndex(e=>e.id===a),r=t[n];r&&!r.collapsed&&r.rows.length&&e({selection:AP(t,{itemIndex:n,rowIndex:Math.max(0,r.rows.findIndex(e=>e.hunkStart))}),visualAnchor:null})}if(r!=null&&i!==`old`){let i=le().find(e=>e.id===a);if(i!=null&&t().loaded[n]?.kind===`diff`&&!i.rows.some(e=>e.side===`additions`&&e.line===r)){e(e=>({activePath:n,reveal:{id:a,path:n,line:r,nonce:(e.reveal?.nonce??0)+1}}));return}}e(e=>({scrollTarget:{id:a,line:r,side:i,align:r?`eye`:`start`,nonce:(e.scrollTarget?.nonce??0)+1},activePath:n}))},setActivePath(t){e({activePath:t})}}});function sF(e,t){return e.blob===t.blob&&e.status===t.status&&e.oldPath===t.oldPath&&e.additions===t.additions&&e.deletions===t.deletions}async function cF(e,t,n,r){let i=0,a=Array.from({length:Math.min(t,e.length)},async()=>{for(;i<e.length&&!n();)await r(e[i++])});await Promise.all(a)}function lF({path:e,className:t,nowrap:n=!1,tooltip:r=!0}){let i=e.lastIndexOf(`/`)+1,a=e.slice(0,i).split(`/`).filter(Boolean),o=e.slice(i);return(0,g.jsxs)(`span`,{className:Ij(`font-mono break-normal wrap-anywhere`,n&&`min-w-0 truncate`,t),title:r?e:void 0,children:[a.length>0&&(0,g.jsx)(`span`,{className:`text-muted`,children:a.map((e,t)=>(0,g.jsxs)(p.Fragment,{children:[e,`/`,(0,g.jsx)(`wbr`,{})]},t))}),(0,g.jsx)(`span`,{className:`font-semibold text-foreground`,children:o})]})}var uF=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dF=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fF={};function pF(e,t){return((t||fF).jsx?dF:uF).test(e)}var mF=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
1602
|
+
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),hF=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(mF());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),gF=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),_F=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(hF()),r=gF();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),vF=bF(`end`),yF=bF(`start`);function bF(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function xF(e){let t=yF(e),n=vF(e);if(t&&n)return{start:t,end:n}}function SF(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?wF(e.position):`start`in e||`end`in e?wF(e):`line`in e||`column`in e?CF(e):``}function CF(e){return TF(e&&e.line)+`:`+TF(e&&e.column)}function wF(e){return CF(e&&e.start)+`-`+CF(e&&e.end)}function TF(e){return e&&typeof e==`number`?e:1}var EF=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=SF(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};EF.prototype.file=``,EF.prototype.name=``,EF.prototype.reason=``,EF.prototype.message=``,EF.prototype.stack=``,EF.prototype.column=void 0,EF.prototype.line=void 0,EF.prototype.ancestors=void 0,EF.prototype.cause=void 0,EF.prototype.fatal=void 0,EF.prototype.place=void 0,EF.prototype.ruleId=void 0,EF.prototype.source=void 0;var DF=l(_F(),1),OF={}.hasOwnProperty,kF=new Map,AF=/[A-Z]/g,jF=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),MF=new Set([`td`,`th`]),NF=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function PF(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=GF(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=WF(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,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`?Ni:Mi,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=FF(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function FF(e,t,n){if(t.type===`element`)return IF(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return LF(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return zF(e,t,n);if(t.type===`mdxjsEsm`)return RF(e,t);if(t.type===`root`)return BF(e,t,n);if(t.type===`text`)return VF(e,t)}function IF(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Ni,e.schema=i),e.ancestors.push(t);let a=ZF(e,t.tagName,!1),o=KF(e,t),s=JF(e,t);return jF.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!pa(e)})),HF(e,o,a,t),UF(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function LF(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}QF(e,t.position)}function RF(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);QF(e,t.position)}function zF(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Ni,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:ZF(e,t.name,!0),o=qF(e,t),s=JF(e,t);return HF(e,o,a,t),UF(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function BF(e,t,n){let r={};return UF(r,JF(e,t)),e.create(t,e.Fragment,r,n)}function VF(e,t){return t.value}function HF(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function UF(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function WF(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function GF(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=yF(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function KF(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&OF.call(t.properties,i)){let a=YF(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&MF.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function qF(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else QF(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else QF(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function JF(e,t){let n=[],r=-1,i=e.passKeys?new Map:kF;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=FF(e,a,o);s!==void 0&&n.push(s)}return n}function YF(e,t,n){let r=ki(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ua(n):da(n)),r.property===`style`){let t=typeof n==`object`?n:XF(e,String(n));return e.stylePropertyNameCase===`css`&&(t=$F(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Ti[r.property]||r.property:r.attribute,n]}}function XF(e,t){try{return(0,DF.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new EF("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=NF+`#cannot-parse-style-attribute`,r}}function ZF(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=pF(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=pF(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return OF.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);QF(e)}function QF(e,t){let n=new EF("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=NF+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function $F(e){let t={},n;for(n in e)OF.call(e,n)&&(t[eI(n)]=e[n]);return t}function eI(e){let t=e.replace(AF,tI);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function tI(e){return`-`+e.toLowerCase()}var nI={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`]},rI={};function iI(e,t){let n=t||rI;return aI(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function aI(e,t,n){if(sI(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 oI(e.children,t,n)}return Array.isArray(e)?oI(e,t,n):``}function oI(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=aI(e[i],t,n);return r.join(``)}function sI(e){return!!(e&&typeof e==`object`)}var cI=document.createElement(`i`);function lI(e){let t=`&`+e+`;`;cI.innerHTML=t;let n=cI.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function uI(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function dI(e,t){return e.length>0?(uI(e,e.length,0,t),e):t}var fI={}.hasOwnProperty;function pI(e){let t={},n=-1;for(;++n<e.length;)mI(t,e[n]);return t}function mI(e,t){let n;for(n in t){let r=(fI.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){fI.call(r,a)||(r[a]=[]);let e=i[a];hI(r[a],Array.isArray(e)?e:e?[e]:[])}}}function hI(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);uI(e,0,0,r)}function gI(e,t){let 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 _I(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var vI=AI(/[A-Za-z]/),yI=AI(/[\dA-Za-z]/),bI=AI(/[#-'*+\--9=?A-Z^-~]/);function xI(e){return e!==null&&(e<32||e===127)}var SI=AI(/\d/),CI=AI(/[\dA-Fa-f]/),wI=AI(/[!-/:-@[-`{-~]/);function TI(e){return e!==null&&e<-2}function EI(e){return e!==null&&(e<0||e===32)}function DI(e){return e===-2||e===-1||e===32}var OI=AI(/\p{P}|\p{S}/u),kI=AI(/\s/);function AI(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function jI(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&yI(e.charCodeAt(n+1))&&yI(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function MI(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return DI(r)?(e.enter(n),s(r)):t(r)}function s(r){return DI(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var NI={tokenize:PI};function PI(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),MI(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return TI(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var FI={tokenize:LI},II={tokenize:RI};function LI(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return uI(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(II,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(II,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return TI(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;uI(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function RI(e,t,n){return MI(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function zI(e){if(e===null||EI(e)||kI(e))return 1;if(OI(e))return 2}function BI(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var VI={name:`attention`,resolveAll:HI,tokenize:UI};function HI(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};WI(d,-c),WI(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=dI(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=dI(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=dI(l,BI(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=dI(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=dI(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,uI(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function UI(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=zI(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=zI(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function WI(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var GI={name:`autolink`,tokenize:KI};function KI(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return vI(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||yI(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||yI(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||xI(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):bI(t)?(e.consume(t),l):n(t)}function u(e){return yI(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||yI(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var qI={partial:!0,tokenize:JI};function JI(e,t,n){return r;function r(t){return DI(t)?MI(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||TI(e)?t(e):n(e)}}var YI={continuation:{tokenize:ZI},exit:QI,name:`blockQuote`,tokenize:XI};function XI(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return DI(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function ZI(e,t,n){let r=this;return i;function i(t){return DI(t)?MI(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(YI,t,n)(r)}}function QI(e){e.exit(`blockQuote`)}var $I={name:`characterEscape`,tokenize:eL};function eL(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return wI(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var tL={name:`characterReference`,tokenize:nL};function nL(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=yI,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=CI,u):(e.enter(`characterReferenceValue`),a=7,o=SI,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===yI&&!lI(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var rL={partial:!0,tokenize:oL},iL={concrete:!0,name:`codeFenced`,tokenize:aL};function aL(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),DI(t)?MI(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||TI(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(rL,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||TI(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):DI(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),MI(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||TI(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||TI(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&DI(t)?MI(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||TI(t)?e.check(rL,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||TI(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),DI(t)?MI(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),DI(t)?MI(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||TI(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function oL(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var sL={name:`codeIndented`,tokenize:lL},cL={partial:!0,tokenize:uL};function lL(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),MI(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):TI(t)?e.attempt(cL,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||TI(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function uL(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):TI(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):MI(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):TI(e)?i(e):n(e)}}var dL={name:`codeText`,previous:pL,resolve:fL,tokenize:mL};function fL(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function pL(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function mL(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):TI(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||TI(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var hL=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&gL(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),gL(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),gL(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);gL(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);gL(this.left,t.reverse())}}}};function gL(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 _L(e){let t={},n=-1,r,i,a,o,s,c,l,u=new hL(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,vL(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return uI(e,0,1/0,u.slice(0)),!l}function vL(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var yL={resolve:xL,tokenize:SL},bL={partial:!0,tokenize:CL};function xL(e){return _L(e),e}function SL(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):TI(t)?e.check(bL,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function CL(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),MI(e,a,`linePrefix`)}function a(i){if(i===null||TI(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function wL(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||xI(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||TI(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||EI(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||xI(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function TL(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):TI(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||TI(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!DI(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function EL(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):TI(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),MI(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||TI(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function DL(e,t){let n;return r;function r(i){return TI(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):DI(i)?MI(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var OL={name:`definition`,tokenize:AL},kL={partial:!0,tokenize:jL};function AL(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return TL.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=_I(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return EI(t)?DL(e,l)(t):l(t)}function l(t){return wL(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(kL,d,d)(t)}function d(t){return DI(t)?MI(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||TI(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function jL(e,t,n){return r;function r(t){return EI(t)?DL(e,i)(t):n(t)}function i(t){return EL(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return DI(t)?MI(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||TI(e)?t(e):n(e)}}var ML={name:`hardBreakEscape`,tokenize:NL};function NL(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return TI(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var PL={name:`headingAtx`,resolve:FL,tokenize:IL};function FL(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},uI(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function IL(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||EI(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||TI(n)?(e.exit(`atxHeading`),t(n)):DI(n)?MI(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||EI(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var LL=`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`.split(`.`),RL=[`pre`,`script`,`style`,`textarea`],zL={concrete:!0,name:`htmlFlow`,resolveTo:HL,tokenize:UL},BL={partial:!0,tokenize:GL},VL={partial:!0,tokenize:WL};function HL(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 UL(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:F):vI(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):vI(a)?(e.consume(a),i=4,r.interrupt?t:F):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:F):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return vI(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||EI(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&RL.includes(l)?(i=1,r.interrupt?t(s):O(s)):LL.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||yI(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return DI(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||vI(t)?(e.consume(t),b):DI(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||yI(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):DI(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):DI(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||TI(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||EI(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||DI(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||TI(t)?O(t):DI(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),j):t===60&&i===1?(e.consume(t),M):t===62&&i===4?(e.consume(t),I):t===63&&i===3?(e.consume(t),F):t===93&&i===5?(e.consume(t),P):TI(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(BL,te,k)(t)):t===null||TI(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(VL,A,te)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return t===null||TI(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function j(t){return t===45?(e.consume(t),F):O(t)}function M(t){return t===47?(e.consume(t),o=``,N):O(t)}function N(t){if(t===62){let n=o.toLowerCase();return RL.includes(n)?(e.consume(t),I):O(t)}return vI(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),N):O(t)}function P(t){return t===93?(e.consume(t),F):O(t)}function F(t){return t===62?(e.consume(t),I):t===45&&i===2?(e.consume(t),F):O(t)}function I(t){return t===null||TI(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),I)}function te(n){return e.exit(`htmlFlow`),t(n)}}function WL(e,t,n){let r=this;return i;function i(t){return TI(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function GL(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(qI,t,n)}}var KL={name:`htmlText`,tokenize:qL};function qL(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):vI(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):vI(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):TI(t)?(o=d,M(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?j(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):TI(t)?(o=h,M(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?j(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?j(t):TI(t)?(o=v,M(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):TI(t)?(o=y,M(t)):(e.consume(t),y)}function b(e){return e===62?j(e):y(e)}function x(t){return vI(t)?(e.consume(t),S):n(t)}function S(t){return t===45||yI(t)?(e.consume(t),S):C(t)}function C(t){return TI(t)?(o=C,M(t)):DI(t)?(e.consume(t),C):j(t)}function w(t){return t===45||yI(t)?(e.consume(t),w):t===47||t===62||EI(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),j):t===58||t===95||vI(t)?(e.consume(t),E):TI(t)?(o=T,M(t)):DI(t)?(e.consume(t),T):j(t)}function E(t){return t===45||t===46||t===58||t===95||yI(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):TI(t)?(o=D,M(t)):DI(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):TI(t)?(o=O,M(t)):DI(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,ee):t===null?n(t):TI(t)?(o=k,M(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||EI(t)?T(t):(e.consume(t),A)}function ee(e){return e===47||e===62||EI(e)?T(e):n(e)}function j(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function M(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),N}function N(t){return DI(t)?MI(e,P,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):P(t)}function P(t){return e.enter(`htmlTextData`),o(t)}}var JL={name:`labelEnd`,resolveAll:QL,resolveTo:$L,tokenize:eR},YL={tokenize:tR},XL={tokenize:nR},ZL={tokenize:rR};function QL(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&uI(e,0,e.length,n),e}function $L(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=dI(s,e.slice(a+1,a+r+3)),s=dI(s,[[`enter`,u,t]]),s=dI(s,BI(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=dI(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=dI(s,e.slice(o+1)),s=dI(s,[[`exit`,c,t]]),uI(e,a,e.length,s),e}function eR(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(_I(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(YL,u,o?u:d)(t):t===91?e.attempt(XL,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(ZL,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function tR(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return EI(t)?DL(e,a)(t):a(t)}function a(t){return t===41?u(t):wL(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return EI(t)?DL(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?EL(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return EI(t)?DL(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function nR(e,t,n){let r=this;return i;function i(t){return TL.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(_I(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function rR(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var iR={name:`labelStartImage`,resolveAll:JL.resolveAll,tokenize:aR};function aR(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var oR={name:`labelStartLink`,resolveAll:JL.resolveAll,tokenize:sR};function sR(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var cR={name:`lineEnding`,tokenize:lR};function lR(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),MI(e,t,`linePrefix`)}}var uR={name:`thematicBreak`,tokenize:dR};function dR(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||TI(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),DI(t)?MI(e,s,`whitespace`)(t):s(t))}}var fR={continuation:{tokenize:gR},exit:vR,name:`list`,tokenize:hR},pR={partial:!0,tokenize:yR},mR={partial:!0,tokenize:_R};function hR(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:SI(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(uR,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return SI(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(qI,r.interrupt?n:u,e.attempt(pR,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return DI(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function gR(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(qI,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,MI(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!DI(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(mR,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,MI(e,e.attempt(fR,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function _R(e,t,n){let r=this;return MI(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function vR(e){e.exit(this.containerState.type)}function yR(e,t,n){let r=this;return MI(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!DI(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var bR={name:`setextUnderline`,resolveTo:xR,tokenize:SR};function xR(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function SR(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),DI(t)?MI(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||TI(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var CR={tokenize:wR};function wR(e){let t=this,n=e.attempt(qI,r,e.attempt(this.parser.constructs.flowInitial,i,MI(e,e.attempt(this.parser.constructs.flow,i,e.attempt(yL,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var TR={resolveAll:kR()},ER=OR(`string`),DR=OR(`text`);function OR(e){return{resolveAll:kR(e===`text`?AR:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function kR(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function AR(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var jR=s({attentionMarkers:()=>zR,contentInitial:()=>NR,disable:()=>BR,document:()=>MR,flow:()=>FR,flowInitial:()=>PR,insideSpan:()=>RR,string:()=>IR,text:()=>LR}),MR={42:fR,43:fR,45:fR,48:fR,49:fR,50:fR,51:fR,52:fR,53:fR,54:fR,55:fR,56:fR,57:fR,62:YI},NR={91:OL},PR={[-2]:sL,[-1]:sL,32:sL},FR={35:PL,42:uR,45:[bR,uR],60:zL,61:bR,95:uR,96:iL,126:iL},IR={38:tL,92:$I},LR={[-5]:cR,[-4]:cR,[-3]:cR,33:iR,38:tL,42:VI,60:[GI,KL],91:oR,92:[ML,$I],93:JL,95:VI,96:dL},RR={null:[VI,TR]},zR={null:[42,95]},BR={null:[]};function VR(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=dI(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=BI(a,l.events,l),l.events):[]}function f(e,t){return UR(p(e),t)}function p(e){return HR(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){TI(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&uI(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function HR(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function UR(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
1603
1603
|
`;break;case-3:o=`\r
|
|
1604
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function VR(e){let t={constructs:uI([OR,...(e||{}).extensions||[]]),content:n(AI),defined:[],document:n(MI),flow:n(bR),lazy:{},string:n(CR),text:n(wR)};return t;function n(e){return n;function n(n){return RR(t,e,n)}}}function HR(e){for(;!mL(e););return e}var UR=/[\0\t\n\r]/g;function WR(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(UR.lastIndex=u,c=UR.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var GR=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function KR(e){return e.replace(GR,qR)}function qR(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return pI(n.slice(t?2:1),t?16:10)}return oI(n)||e}var JR={}.hasOwnProperty;function YR(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),XR(n)(HR(VR(n).document().write(WR()(e,t,!0))))}function XR(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(pe),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ue),blockQuote:a(ae),characterEscape:T,characterReference:T,codeFenced:a(oe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(oe,o),codeText:a(se,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ce),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(le),hardBreakEscape:a(V),hardBreakTrailing:a(V),htmlFlow:a(de,o),htmlFlowData:T,htmlText:a(de,o),htmlTextData:T,image:a(fe),label:o,link:a(pe),listItem:a(he),listItemValue:f,listOrdered:a(me,d),listUnordered:a(me),paragraph:a(ge),reference:ne,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ue),strong:a(_e),thematicBreak:a(ye)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ie,autolinkProtocol:B,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:L,characterReferenceMarkerNumeric:L,characterReferenceValue:R,characterReference:z,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(ee),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(M),label:P,labelText:N,lineEnding:D,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:re,resourceDestinationString:F,resourceTitleString:I,resource:te,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};QR(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];JR.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||ez).call(a,void 0,e[0])}for(r.position={start:ZR(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ZR(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:ZR(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||ez).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+yF({start:e.start,end:e.end})+`): it’s not open`);n.position.end=ZR(e.end)}function u(){return tI(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=mI(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=ve(),n.position={start:ZR(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=ZR(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=ZR(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=KR(t),n.identifier=mI(t).toLowerCase()}function P(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function te(){this.data.inReference=void 0}function ne(){this.data.referenceType=`collapsed`}function re(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=mI(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function L(e){this.data.characterReferenceType=e.type}function R(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=pI(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=oI(t);let i=this.stack[this.stack.length-1];i.value+=r}function z(e){let t=this.stack.pop();t.position.end=ZR(e.end)}function B(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ie(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ae(){return{type:`blockquote`,children:[]}}function oe(){return{type:`code`,lang:null,meta:null,value:``}}function se(){return{type:`inlineCode`,value:``}}function ce(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function le(){return{type:`emphasis`,children:[]}}function ue(){return{type:`heading`,depth:0,children:[]}}function V(){return{type:`break`}}function de(){return{type:`html`,value:``}}function fe(){return{type:`image`,title:null,url:``,alt:null}}function pe(){return{type:`link`,title:null,url:``,children:[]}}function me(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function he(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ge(){return{type:`paragraph`,children:[]}}function _e(){return{type:`strong`,children:[]}}function ve(){return{type:`text`,value:``}}function ye(){return{type:`thematicBreak`}}}function ZR(e){return{line:e.line,column:e.column,offset:e.offset}}function QR(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?QR(e,r):$R(e,r)}}function $R(e,t){let n;for(n in t)if(JR.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function ez(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+yF({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+yF({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+yF({start:t.start,end:t.end})+`) is still open`)}function tz(e){let t=this;t.parser=n;function n(n){return YR(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function nz(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function rz(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
1605
|
-
`}]}function
|
|
1606
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function
|
|
1604
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function WR(e){let t={constructs:pI([jR,...(e||{}).extensions||[]]),content:n(NI),defined:[],document:n(FI),flow:n(CR),lazy:{},string:n(ER),text:n(DR)};return t;function n(e){return n;function n(n){return VR(t,e,n)}}}function GR(e){for(;!_L(e););return e}var KR=/[\0\t\n\r]/g;function qR(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(KR.lastIndex=u,c=KR.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var JR=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function YR(e){return e.replace(JR,XR)}function XR(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return gI(n.slice(t?2:1),t?16:10)}return lI(n)||e}var ZR={}.hasOwnProperty;function QR(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),$R(n)(GR(WR(n).document().write(qR()(e,t,!0))))}function $R(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(pe),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ue),blockQuote:a(ae),characterEscape:T,characterReference:T,codeFenced:a(oe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(oe,o),codeText:a(se,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ce),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(le),hardBreakEscape:a(V),hardBreakTrailing:a(V),htmlFlow:a(de,o),htmlFlowData:T,htmlText:a(de,o),htmlTextData:T,image:a(fe),label:o,link:a(pe),listItem:a(he),listItemValue:f,listOrdered:a(me,d),listUnordered:a(me),paragraph:a(ge),reference:ne,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ue),strong:a(_e),thematicBreak:a(ye)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ie,autolinkProtocol:B,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:L,characterReferenceMarkerNumeric:L,characterReferenceValue:R,characterReference:z,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(ee),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(M),label:P,labelText:N,lineEnding:D,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:re,resourceDestinationString:F,resourceTitleString:I,resource:te,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};tz(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];ZR.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||rz).call(a,void 0,e[0])}for(r.position={start:ez(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ez(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:ez(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||rz).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+SF({start:e.start,end:e.end})+`): it’s not open`);n.position.end=ez(e.end)}function u(){return iI(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=_I(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=ve(),n.position={start:ez(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=ez(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=ez(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=YR(t),n.identifier=_I(t).toLowerCase()}function P(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function te(){this.data.inReference=void 0}function ne(){this.data.referenceType=`collapsed`}function re(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=_I(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function L(e){this.data.characterReferenceType=e.type}function R(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=gI(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=lI(t);let i=this.stack[this.stack.length-1];i.value+=r}function z(e){let t=this.stack.pop();t.position.end=ez(e.end)}function B(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ie(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ae(){return{type:`blockquote`,children:[]}}function oe(){return{type:`code`,lang:null,meta:null,value:``}}function se(){return{type:`inlineCode`,value:``}}function ce(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function le(){return{type:`emphasis`,children:[]}}function ue(){return{type:`heading`,depth:0,children:[]}}function V(){return{type:`break`}}function de(){return{type:`html`,value:``}}function fe(){return{type:`image`,title:null,url:``,alt:null}}function pe(){return{type:`link`,title:null,url:``,children:[]}}function me(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function he(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ge(){return{type:`paragraph`,children:[]}}function _e(){return{type:`strong`,children:[]}}function ve(){return{type:`text`,value:``}}function ye(){return{type:`thematicBreak`}}}function ez(e){return{line:e.line,column:e.column,offset:e.offset}}function tz(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?tz(e,r):nz(e,r)}}function nz(e,t){let n;for(n in t)if(ZR.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function rz(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+SF({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+SF({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+SF({start:t.start,end:t.end})+`) is still open`)}function iz(e){let t=this;t.parser=n;function n(n){return QR(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function az(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function oz(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
1605
|
+
`}]}function sz(e,t){let n=t.value?t.value+`
|
|
1606
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function cz(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lz(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uz(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=jI(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function dz(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fz(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function pz(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function mz(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return pz(e,t);let i={src:jI(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function hz(e,t){let n={src:jI(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function gz(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function _z(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return pz(e,t);let i={href:jI(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function vz(e,t){let n={href:jI(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function yz(e,t,n){let r=e.all(t),i=n?bz(n):xz(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
1607
1607
|
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
1608
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function
|
|
1608
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function bz(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=xz(n[r])}return t}function xz(e){return e.spread??e.children.length>1}function Sz(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Cz(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wz(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Tz(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ez(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=yF(t.children[1]),o=vF(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Dz(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Oz(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var kz=9,Az=32;function jz(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Mz(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Mz(t.slice(i),i>0,!1)),a.join(``)}function Mz(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===kz||t===Az;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===kz||t===Az;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Nz(e,t){let n={type:`text`,value:jz(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Pz(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Fz={blockquote:az,break:oz,code:sz,delete:cz,emphasis:lz,footnoteReference:uz,heading:dz,html:fz,imageReference:mz,image:hz,inlineCode:gz,linkReference:_z,link:vz,listItem:yz,list:Sz,paragraph:Cz,root:wz,strong:Tz,table:Ez,tableCell:Oz,tableRow:Dz,text:Nz,thematicBreak:Pz,toml:Iz,yaml:Iz,definition:Iz,footnoteDefinition:Iz};function Iz(){}var{defineProperty:Lz}=Object,Rz=typeof self==`object`?self:globalThis,zz=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Rz[e](t)},Bz=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?Lz(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Rz[e]==`function`?zz(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(zz(a,o),i)};return r},Vz=e=>Bz(new Map,e)(0),Hz=``,{toString:Uz}={},{keys:Wz,is:Gz}=Object,Kz=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Uz.call(e).slice(8,-1);switch(n){case`Array`:return[1,Hz];case`Object`:return[2,Hz];case`Date`:return[3,Hz];case`RegExp`:return[4,Hz];case`Map`:return[5,Hz];case`Set`:return[6,Hz];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},qz=([e,t])=>e===0&&(t===`function`||t===`symbol`),Jz=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=Kz(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&Gz(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of Wz(o))(e||!qz(Kz(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?Hz:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(qz(Kz(n))||qz(Kz(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!qz(Kz(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},Yz=(e,{json:t,lossy:n}={})=>{let r=[];return Jz(!(t||n),!!t,new Map,r)(e),r},Xz=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Vz(Yz(e,t)):structuredClone(e):(e,t)=>Vz(Yz(e,t));function Zz(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Qz(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function $z(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Zz,r=e.options.footnoteBackLabel||Qz,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=jI(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Xz(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
1609
1609
|
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
1610
|
-
`}]}}var
|
|
1610
|
+
`}]}}var eB=(function(e){if(e==null)return aB;if(typeof e==`function`)return iB(e);if(typeof e==`object`)return Array.isArray(e)?tB(e):nB(e);if(typeof e==`string`)return rB(e);throw Error(`Expected function, string, or object as test`)});function tB(e){let t=[],n=-1;for(;++n<e.length;)t[n]=eB(e[n]);return iB(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function nB(e){let t=e;return iB(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function rB(e){return iB(t);function t(t){return t&&t.type===e}}function iB(e){return t;function t(t,n,r){return!!(oB(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function aB(){return!0}function oB(e){return typeof e==`object`&&!!e&&`type`in e}function sB(e){return e}var cB=[];function lB(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=eB(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+sB(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=cB,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=uB(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function uB(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?cB:[e]}function dB(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),lB(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var fB={}.hasOwnProperty,pB={};function mB(e,t){let n=t||pB,r=new Map,i=new Map,a={all:s,applyData:gB,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Fz,...n.handlers},one:o,options:n,patch:hB,wrap:vB};return dB(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(fB.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Xz(n);return r.children=a.all(e),r}return Xz(e)}return(a.options.unknownHandler||_B)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=yB(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=yB(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function hB(e,t){e.position&&(t.position=xF(e))}function gB(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Xz(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function _B(e,t){let n=t.data||{},r=`value`in t&&!(fB.call(n,`hProperties`)||fB.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function vB(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
1611
1611
|
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
1612
1612
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
1613
|
-
`}),n}function
|
|
1614
|
-
`},i)),a}function vB(e,t){return e&&`run`in e?async function(n,r){let i=_B(n,{file:r,...t});await e.run(i,r)}:function(n,r){return _B(n,{file:r,...e||t})}}function yB(e){if(e)throw e}var bB=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function xB(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function SB(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?CB(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function CB(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var wB={basename:TB,dirname:EB,extname:DB,join:OB,sep:`/`};function TB(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);jB(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function EB(e){if(jB(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function DB(e){jB(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function OB(...e){let t=-1,n;for(;++t<e.length;)jB(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:kB(n)}function kB(e){jB(e);let t=e.codePointAt(0)===47,n=AB(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function AB(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function jB(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var MB={cwd:NB};function NB(){return`/`}function PB(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function FB(e){if(typeof e==`string`)e=new URL(e);else if(!PB(e)){let t=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:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return IB(e)}function IB(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var LB=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],RB=class{constructor(e){let t;t=e?PB(e)?{path:e}:typeof e==`string`||HB(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:MB.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<LB.length;){let e=LB[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)LB.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?wB.basename(this.path):void 0}set basename(e){BB(e,`basename`),zB(e,`basename`),this.path=wB.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?wB.dirname(this.path):void 0}set dirname(e){VB(this.basename,`dirname`),this.path=wB.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?wB.extname(this.path):void 0}set extname(e){if(zB(e,`extname`),VB(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=wB.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){PB(e)&&(e=FB(e)),BB(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?wB.basename(this.path,this.extname):void 0}set stem(e){BB(e,`stem`),zB(e,`stem`),this.path=wB.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new CF(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function zB(e,t){if(e&&e.includes(wB.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+wB.sep+"`")}function BB(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function VB(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function HB(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var UB=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),WB=l(bB(),1),GB={}.hasOwnProperty,KB=new class e extends UB{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=SB()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,WB.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(YB(`data`,this.frozen),this.namespace[e]=t,this):GB.call(this.namespace,e)&&this.namespace[e]||void 0:e?(YB(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=QB(e),n=this.parser||this.Parser;return qB(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),qB(`process`,this.parser||this.Parser),JB(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=QB(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);eV(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),qB(`processSync`,this.parser||this.Parser),JB(`processSync`,this.compiler||this.Compiler),this.process(e,r),ZB(`processSync`,`process`,t),n;function r(e,r){t=!0,yB(e),n=r}}run(e,t,n){XB(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=QB(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),ZB(`runSync`,`run`,n),r;function i(e,t){yB(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=QB(t),r=this.compiler||this.Compiler;return JB(`stringify`,r),XB(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(YB(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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");o(e.plugins),e.settings&&(r.settings=(0,WB.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];xB(o)&&xB(r)&&(r=(0,WB.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function qB(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function JB(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function YB(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function XB(e){if(!xB(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function ZB(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function QB(e){return $B(e)?e:new RB(e)}function $B(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function eV(e){return typeof e==`string`||tV(e)}function tV(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var nV=[],rV={allowDangerousHtml:!0},iV=/^(https?|ircs?|mailto|xmpp)$/i,aV=[{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 oV(e){let t=sV(e),n=cV(e);return lV(t.runSync(t.parse(n),n),e)}function sV(e){let t=e.rehypePlugins||nV,n=e.remarkPlugins||nV,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...rV}:rV;return KB().use(tz).use(n).use(vB,r).use(t)}function cV(e){let t=e.children||``,n=new RB;return typeof t==`string`?n.value=t:``+t,n}function lV(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||uV;for(let e of aV)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return cB(e,l),jF(e,{Fragment:g.Fragment,components:i,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in $F)if(Object.hasOwn($F,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=$F[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function uV(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||iV.test(e.slice(0,t))?e:``}function dV(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function fV(e,t,n){let r=Zz((n||{}).ignore||[]),i=pV(t),a=-1;for(;++a<i.length;)oB(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function pV(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([mV(e[0]),hV(e[1])])}return t}function mV(e){return typeof e==`string`?new RegExp(dV(e),`g`):e}function hV(e){return typeof e==`function`?e:function(){return e}}var gV=`phrasing`,_V=[`autolink`,`link`,`image`,`label`];function vV(){return{transforms:[EV],enter:{literalAutolink:bV,literalAutolinkEmail:xV,literalAutolinkHttp:xV,literalAutolinkWww:xV},exit:{literalAutolink:TV,literalAutolinkEmail:wV,literalAutolinkHttp:SV,literalAutolinkWww:CV}}}function yV(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:gV,notInConstruct:_V},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:gV,notInConstruct:_V},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:gV,notInConstruct:_V}]}}function bV(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function xV(e){this.config.enter.autolinkProtocol.call(this,e)}function SV(e){this.config.exit.autolinkProtocol.call(this,e)}function CV(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function wV(e){this.config.exit.autolinkEmail.call(this,e)}function TV(e){this.exit(e)}function EV(e){fV(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,DV],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,OV]],{ignore:[`link`,`linkReference`]})}function DV(e,t,n,r,i){let a=``;if(!jV(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!kV(n)))return!1;let o=AV(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function OV(e,t,n,r){return!jV(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function kV(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function AV(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=la(e,`(`),a=la(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function jV(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||EI(n)||TI(n))&&(!t||n!==47)}VV.peek=BV;function MV(){this.buffer()}function NV(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function PV(){this.buffer()}function FV(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function IV(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mI(this.sliceSerialize(e)).toLowerCase(),n.label=t}function LV(e){this.exit(e)}function RV(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mI(this.sliceSerialize(e)).toLowerCase(),n.label=t}function zV(e){this.exit(e)}function BV(){return`[`}function VV(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function HV(){return{enter:{gfmFootnoteCallString:MV,gfmFootnoteCall:NV,gfmFootnoteDefinitionLabelString:PV,gfmFootnoteDefinition:FV},exit:{gfmFootnoteCallString:IV,gfmFootnoteCall:LV,gfmFootnoteDefinitionLabelString:RV,gfmFootnoteDefinition:zV}}}function UV(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:VV},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
1615
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?
|
|
1616
|
-
`)}function
|
|
1617
|
-
`&&
|
|
1618
|
-
`}function
|
|
1613
|
+
`}),n}function yB(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function bB(e,t){let n=mB(e,t),r=n.one(e,void 0),i=$z(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
1614
|
+
`},i)),a}function xB(e,t){return e&&`run`in e?async function(n,r){let i=bB(n,{file:r,...t});await e.run(i,r)}:function(n,r){return bB(n,{file:r,...e||t})}}function SB(e){if(e)throw e}var CB=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function wB(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function TB(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?EB(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function EB(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var DB={basename:OB,dirname:kB,extname:AB,join:jB,sep:`/`};function OB(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);PB(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function kB(e){if(PB(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function AB(e){PB(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function jB(...e){let t=-1,n;for(;++t<e.length;)PB(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:MB(n)}function MB(e){PB(e);let t=e.codePointAt(0)===47,n=NB(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function NB(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function PB(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var FB={cwd:IB};function IB(){return`/`}function LB(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function RB(e){if(typeof e==`string`)e=new URL(e);else if(!LB(e)){let t=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:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return zB(e)}function zB(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var BB=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],VB=class{constructor(e){let t;t=e?LB(e)?{path:e}:typeof e==`string`||GB(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:FB.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<BB.length;){let e=BB[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)BB.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?DB.basename(this.path):void 0}set basename(e){UB(e,`basename`),HB(e,`basename`),this.path=DB.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?DB.dirname(this.path):void 0}set dirname(e){WB(this.basename,`dirname`),this.path=DB.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?DB.extname(this.path):void 0}set extname(e){if(HB(e,`extname`),WB(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=DB.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){LB(e)&&(e=RB(e)),UB(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?DB.basename(this.path,this.extname):void 0}set stem(e){UB(e,`stem`),HB(e,`stem`),this.path=DB.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new EF(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function HB(e,t){if(e&&e.includes(DB.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+DB.sep+"`")}function UB(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function WB(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function GB(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var KB=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),qB=l(CB(),1),JB={}.hasOwnProperty,YB=new class e extends KB{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=TB()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,qB.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(QB(`data`,this.frozen),this.namespace[e]=t,this):JB.call(this.namespace,e)&&this.namespace[e]||void 0:e?(QB(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=tV(e),n=this.parser||this.Parser;return XB(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),XB(`process`,this.parser||this.Parser),ZB(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=tV(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);rV(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),XB(`processSync`,this.parser||this.Parser),ZB(`processSync`,this.compiler||this.Compiler),this.process(e,r),eV(`processSync`,`process`,t),n;function r(e,r){t=!0,SB(e),n=r}}run(e,t,n){$B(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=tV(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),eV(`runSync`,`run`,n),r;function i(e,t){SB(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=tV(t),r=this.compiler||this.Compiler;return ZB(`stringify`,r),$B(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(QB(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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");o(e.plugins),e.settings&&(r.settings=(0,qB.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];wB(o)&&wB(r)&&(r=(0,qB.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function XB(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function ZB(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function QB(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $B(e){if(!wB(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function eV(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function tV(e){return nV(e)?e:new VB(e)}function nV(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function rV(e){return typeof e==`string`||iV(e)}function iV(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var aV=[],oV={allowDangerousHtml:!0},sV=/^(https?|ircs?|mailto|xmpp)$/i,cV=[{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 lV(e){let t=uV(e),n=dV(e);return fV(t.runSync(t.parse(n),n),e)}function uV(e){let t=e.rehypePlugins||aV,n=e.remarkPlugins||aV,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...oV}:oV;return YB().use(iz).use(n).use(xB,r).use(t)}function dV(e){let t=e.children||``,n=new VB;return typeof t==`string`?n.value=t:``+t,n}function fV(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||pV;for(let e of cV)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return dB(e,l),PF(e,{Fragment:g.Fragment,components:i,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in nI)if(Object.hasOwn(nI,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=nI[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function pV(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||sV.test(e.slice(0,t))?e:``}function mV(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function hV(e,t,n){let r=eB((n||{}).ignore||[]),i=gV(t),a=-1;for(;++a<i.length;)lB(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function gV(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([_V(e[0]),vV(e[1])])}return t}function _V(e){return typeof e==`string`?new RegExp(mV(e),`g`):e}function vV(e){return typeof e==`function`?e:function(){return e}}var yV=`phrasing`,bV=[`autolink`,`link`,`image`,`label`];function xV(){return{transforms:[kV],enter:{literalAutolink:CV,literalAutolinkEmail:wV,literalAutolinkHttp:wV,literalAutolinkWww:wV},exit:{literalAutolink:OV,literalAutolinkEmail:DV,literalAutolinkHttp:TV,literalAutolinkWww:EV}}}function SV(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:yV,notInConstruct:bV},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:yV,notInConstruct:bV},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:yV,notInConstruct:bV}]}}function CV(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function wV(e){this.config.enter.autolinkProtocol.call(this,e)}function TV(e){this.config.exit.autolinkProtocol.call(this,e)}function EV(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function DV(e){this.config.exit.autolinkEmail.call(this,e)}function OV(e){this.exit(e)}function kV(e){hV(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,AV],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,jV]],{ignore:[`link`,`linkReference`]})}function AV(e,t,n,r,i){let a=``;if(!PV(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!MV(n)))return!1;let o=NV(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function jV(e,t,n,r){return!PV(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function MV(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function NV(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=la(e,`(`),a=la(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function PV(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||kI(n)||OI(n))&&(!t||n!==47)}WV.peek=UV;function FV(){this.buffer()}function IV(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function LV(){this.buffer()}function RV(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function zV(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_I(this.sliceSerialize(e)).toLowerCase(),n.label=t}function BV(e){this.exit(e)}function VV(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_I(this.sliceSerialize(e)).toLowerCase(),n.label=t}function HV(e){this.exit(e)}function UV(){return`[`}function WV(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function GV(){return{enter:{gfmFootnoteCallString:FV,gfmFootnoteCall:IV,gfmFootnoteDefinitionLabelString:LV,gfmFootnoteDefinition:RV},exit:{gfmFootnoteCallString:zV,gfmFootnoteCall:BV,gfmFootnoteDefinitionLabelString:VV,gfmFootnoteDefinition:HV}}}function KV(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:WV},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
1615
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?JV:qV))),s(),o}}function qV(e,t,n){return t===0?e:JV(e,t,n)}function JV(e,t,n){return(n?``:` `)+e}var YV=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];eH.peek=tH;function XV(){return{canContainEols:[`delete`],enter:{strikethrough:QV},exit:{strikethrough:$V}}}function ZV(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:YV}],handlers:{delete:eH}}}function QV(e){this.enter({type:`delete`,children:[]},e)}function $V(e){this.exit(e)}function eH(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function tH(){return`~`}function nH(e){return e.length}function rH(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||nH,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=iH(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=aH(r[d]);else{let e=aH(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
1616
|
+
`)}function iH(e){return e==null?``:String(e)}function aH(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function oH(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),sH);return i(),o}function sH(e,t,n){return`>`+(n?``:` `)+e}function cH(e,t){return lH(e,t.inConstruct,!0)&&!lH(e,t.notInConstruct,!1)}function lH(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function uH(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
1617
|
+
`&&cH(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
1618
|
+
`}function dH(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function fH(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function pH(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function mH(e,t,n,r){let i=pH(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(fH(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,hH);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(dH(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
1619
1619
|
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
1620
1620
|
`),a&&(u+=s.move(a+`
|
|
1621
|
-
`)),u+=s.move(c),l(),u}function
|
|
1622
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function
|
|
1621
|
+
`)),u+=s.move(c),l(),u}function hH(e,t,n){return(n?``:` `)+e}function gH(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function _H(e,t,n,r){let i=gH(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
1622
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function vH(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function yH(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function bH(e,t,n){let r=zI(e),i=zI(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}xH.peek=SH;function xH(e,t,n,r){let i=vH(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=bH(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=yH(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=bH(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+yH(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function SH(e,t,n){return n.options.emphasis||`*`}function CH(e,t){let n=!1;return dB(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&iI(e)&&(t.options.setext||n))}function wH(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(CH(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
1623
1623
|
`,after:`
|
|
1624
1624
|
`});return r(),t(),o+`
|
|
1625
1625
|
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
1626
1626
|
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
1627
|
-
`,...a.current()});return/^[\t ]/.test(l)&&(l=
|
|
1627
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=yH(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}TH.peek=EH;function TH(e){return e.value||``}function EH(){return`<`}DH.peek=OH;function DH(e,t,n,r){let i=gH(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function OH(){return`!`}kH.peek=AH;function kH(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function AH(){return`!`}jH.peek=MH;function jH(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function MH(){return"`"}function NH(e,t){let n=iI(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}PH.peek=FH;function PH(e,t,n,r){let i=gH(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(NH(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function FH(e,t,n){return NH(e,n)?`<`:`[`}IH.peek=LH;function IH(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function LH(){return`[`}function RH(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function zH(e){let t=RH(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function BH(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function VH(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function HH(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?BH(n):RH(n),s=e.ordered?o===`.`?`)`:`.`:zH(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),VH(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function UH(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function WH(e,t,n,r){let i=UH(n),a=n.bulletCurrent||RH(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function GH(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var KH=eB([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function qH(e,t,n,r){return(e.children.some(function(e){return KH(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function JH(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}YH.peek=XH;function YH(e,t,n,r){let i=JH(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=bH(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=yH(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=bH(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+yH(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function XH(e,t,n){return n.options.strong||`*`}function ZH(e,t,n,r){return n.safe(e.value,r)}function QH(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function $H(e,t,n){let r=(VH(n)+(n.options.ruleSpaces?` `:``)).repeat(QH(n));return n.options.ruleSpaces?r.slice(0,-1):r}var eU={blockquote:oH,break:uH,code:mH,definition:_H,emphasis:xH,hardBreak:uH,heading:wH,html:TH,image:DH,imageReference:kH,inlineCode:jH,link:PH,linkReference:IH,list:HH,listItem:WH,paragraph:GH,root:qH,strong:YH,text:ZH,thematicBreak:$H};function tU(){return{enter:{table:nU,tableData:oU,tableHeader:oU,tableRow:iU},exit:{codeText:sU,table:rU,tableData:aU,tableHeader:aU,tableRow:aU}}}function nU(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function rU(e){this.exit(e),this.data.inTable=void 0}function iU(e){this.enter({type:`tableRow`,children:[]},e)}function aU(e){this.exit(e)}function oU(e){this.enter({type:`tableCell`,children:[]},e)}function sU(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,cU));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function cU(e,t){return t===`|`?t:e}function lU(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
1628
1628
|
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
1629
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return eH(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=ZH.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function sU(){return{exit:{taskListCheckValueChecked:lU,taskListCheckValueUnchecked:lU,paragraph:uU}}}function cU(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:dU}}}function lU(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function uU(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function dU(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=ZH.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function fU(){return[vV(),HV(),qV(),QH(),sU()]}function pU(e){return{extensions:[yV(),UV(e),JV(),oU(e),cU()]}}var mU={tokenize:OU,partial:!0},hU={tokenize:kU,partial:!0},gU={tokenize:AU,partial:!0},_U={tokenize:jU,partial:!0},vU={tokenize:MU,partial:!0},yU={name:`wwwAutolink`,tokenize:EU,previous:NU},bU={name:`protocolAutolink`,tokenize:DU,previous:PU},xU={name:`emailAutolink`,tokenize:TU,previous:FU},SU={};function CU(){return{text:SU}}for(var wU=48;wU<123;)SU[wU]=xU,wU++,wU===58?wU=65:wU===91&&(wU=97);SU[43]=xU,SU[45]=xU,SU[46]=xU,SU[95]=xU,SU[72]=[xU,bU],SU[104]=[xU,bU],SU[87]=[xU,yU],SU[119]=[xU,yU];function TU(e,t,n){let r=this,i,a;return o;function o(t){return!IU(t)||!FU.call(r,r.previous)||LU(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return IU(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(vU,u,l)(t):t===45||t===95||gI(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&hI(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function EU(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!NU.call(r,r.previous)||LU(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(mU,e.attempt(hU,e.attempt(gU,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function DU(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&PU.call(r,r.previous)&&!LU(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(hI(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||vI(t)||CI(t)||EI(t)||TI(t)?n(t):e.attempt(hU,e.attempt(gU,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function OU(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function kU(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(_U,c,s)(t):t===null||CI(t)||EI(t)||t!==45&&TI(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function AU(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(_U,t,a)(o):o===null||CI(o)||EI(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function jU(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||CI(o)||EI(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||CI(e)||EI(e)?t(e):r(e)}function a(e){return hI(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):hI(t)?(e.consume(t),o):n(t)}}function MU(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return gI(e)?n(e):t(e)}}function NU(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||CI(e)}function PU(e){return!hI(e)}function FU(e){return!(e===47||IU(e))}function IU(e){return e===43||e===45||e===46||e===95||gI(e)}function LU(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var RU={tokenize:KU,partial:!0};function zU(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:UU,continuation:{tokenize:WU},exit:GU}},text:{91:{name:`gfmFootnoteCall`,tokenize:HU},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:BU,resolveTo:VU}}}}function BU(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=mI(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function VU(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function HU(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||CI(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(mI(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return CI(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function UU(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||CI(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=mI(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return CI(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),kI(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function WU(e,t,n){return e.check(WI,t,e.attempt(RU,t,n))}function GU(e){e.exit(`gfmFootnoteDefinition`)}function KU(e,t,n){let r=this;return kI(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function qU(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&sI(o,o.length,0,LI(s,e.slice(r+1,n),t)),sI(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),sI(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=II(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=II(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var JU=class{constructor(){this.map=[]}add(e,t,n){YU(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function YU(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function XU(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function ZU(){return{flow:{null:{name:`table`,tokenize:QU,resolveAll:$U}}}}function QU(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):SI(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):wI(t)?kI(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||CI(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,wI(t)?kI(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return wI(t)?kI(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||SI(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return wI(t)?kI(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||SI(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||SI(n)?(e.exit(`tableRow`),t(n)):wI(n)?kI(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||CI(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function $U(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new JU;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(tW(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=eW(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=eW(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=eW(f,t,o,i,n,d)):(o[0]=o[1],d=eW(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&tW(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=XU(t.events,n))}return e}function eW(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},nW(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=nW(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=nW(t.events,n[2]),a=nW(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},nW(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function tW(e,t,n,r,i){let a=[],o=nW(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function nW(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var rW={name:`tasklistCheck`,tokenize:aW};function iW(){return{text:{91:rW}}}function aW(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return CI(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return SI(r)?t(r):wI(r)?e.check({tokenize:oW},t,n)(r):n(r)}}function oW(e,t,n){return kI(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function sW(e){return uI([CU(),zU(),qU(e),ZU(),iW()])}var cW={};function lW(e){let t=this,n=e||cW,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(sW(n)),a.push(fU()),o.push(pU(n))}var uW=200;function dW(e){return e===`system`?typeof matchMedia==`function`&&matchMedia(`(prefers-color-scheme: dark)`).matches:e===`dark`}async function fW(e,t,n){return pW(e,xd(t),n)}async function pW(e,t,n){let r=dW(n)?UP.dark:UP.light,i=await fd({themes:[UP.dark,UP.light],langs:[t]});return e.map(e=>{try{let[n=[]]=i.codeToTokensBase(e,{lang:t,theme:r});return n.map(e=>({text:e.content,color:e.color}))}catch{return[{text:e}]}})}var mW=()=>new Promise(e=>setTimeout(e,0));function hW(e,t,n=0){let[r,i]=(0,p.useState)(()=>({items:e,map:new Map})),a=(0,p.useRef)(n);return a.current=n,(0,p.useEffect)(()=>{let n=!1;i(t=>t.items===e?t:{items:e,map:new Map});let r=[];e.forEach((e,t)=>{let n=r[r.length-1];n&&n.path===e.path?(n.lines.push(e.text),n.last=t):r.push({path:e.path,lines:[e.text],first:t,last:t})});let o=e=>{let t=a.current;return t<e.first?e.first-t:t>e.last?t-e.last:0};return(async()=>{let a=[...r];for(;a.length>0&&!n;){let r=0;for(let e=1;e<a.length;e++)o(a[e])<o(a[r])&&(r=e);let[s]=a.splice(r,1),{path:c,lines:l}=s,u=[];for(let e=0;e<l.length&&!n;e+=uW){let n=l.slice(e,e+uW);u.push(...await fW(n,c,t).catch(()=>n.map(e=>[{text:e}]))),await mW()}if(n)return;i(t=>{if(t.items!==e)return t;let n=new Map(t.map);return u.forEach((e,t)=>n.set(`${c}\n${l[t]}`,e)),{items:t.items,map:n}})}})(),()=>{n=!0}},[e,t]),r.items===e?r.map:new Map}function gW({code:e,lang:t,theme:n}){let[r,i]=(0,p.useState)(null),a=(0,p.useMemo)(()=>e.replace(/\n$/,``).split(`
|
|
1630
|
-
`),[e]);return(0,p.useEffect)(()=>{let e=!0;return i(null),
|
|
1631
|
-
`]},t))})}function _W({tokens:e,fallback:t}){return e?(0,g.jsx)(g.Fragment,{children:e.map((e,t)=>(0,g.jsx)(`span`,{style:e.color?{color:e.color}:void 0,children:e.text},t))}):(0,g.jsx)(g.Fragment,{children:t})}function vW({text:e,path:t,quoted:n,highlight:r=!1}){let i=(0,p.useMemo)(()=>({pre:e=>(0,g.jsx)(yW,{...e,path:t,quoted:n,highlight:r}),a:OW}),[t,n,r]);return(0,g.jsx)(`div`,{className:`markdown`,children:(0,g.jsx)(oV,{remarkPlugins:[lW],components:i,urlTransform:DW,disallowedElements:[`img`],unwrapDisallowed:!0,children:e})})}function yW({children:e,node:t,path:n,quoted:r,highlight:i,...a}){let o=Z(e=>e.theme),s=(Array.isArray(e)?e[0]:e)?.props,c=/language-(\S+)/.exec(s?.className??``)?.[1];if(i&&c!==`suggestion`){let e=c??(n?xd(n):void 0);if(e)return(0,g.jsx)(`pre`,{...a,children:(0,g.jsx)(`code`,{className:s?.className,children:(0,g.jsx)(gW,{code:TW(s?.children),lang:e,theme:o})})})}if(c===`suggestion`){if(n!=null){let e=wW(TW(s?.children).replace(/\n$/,``)),t=r==null?void 0:wW(r);return(0,g.jsxs)(`div`,{className:`suggestion highlighted`,title:`Suggested replacement for the quoted lines`,children:[(0,g.jsx)(`span`,{className:`tag`,children:`Suggested change`}),t==null||e!==``&&t===e?(0,g.jsx)(bW,{path:n,source:e}):(0,g.jsx)(xW,{path:n,quoted:t,source:e})]})}return(0,g.jsxs)(`pre`,{...a,className:`suggestion`,title:`Suggested replacement for the quoted lines`,children:[(0,g.jsx)(`span`,{className:`tag`,children:`Suggested change`}),e]})}return(0,g.jsx)(`pre`,{...a,children:e})}function bW({path:e,source:t}){let n=Z(e=>e.theme),r=(0,p.useMemo)(()=>({name:e,contents:t,cacheKey:CW(`file`,e,t)}),[e,t]),i=(0,p.useMemo)(()=>({theme:UP,themeType:n,disableFileHeader:!0,disableLineNumbers:!0,overflow:`wrap`}),[n]),a=(0,p.useCallback)(e=>e.primeFileHighlightCache(r),[r]);return(0,g.jsx)(Gy,{file:r,options:i},SW(a))}function xW({path:e,quoted:t,source:n}){let r=Z(e=>e.theme),i=(0,p.useMemo)(()=>$m({name:e,contents:`${t}\n`,cacheKey:CW(`old`,e,t)},{name:e,contents:n===``?``:`${n}\n`,cacheKey:CW(`new`,e,n)}),[e,t,n]),a=(0,p.useMemo)(()=>({theme:UP,themeType:r,diffStyle:`unified`,diffIndicators:`classic`,expandUnchanged:!0,disableFileHeader:!0,disableLineNumbers:!0,overflow:`wrap`}),[r]),o=(0,p.useCallback)(e=>e.primeDiffHighlightCache(i),[i]);return(0,g.jsx)(Yy,{fileDiff:i,options:a},SW(o))}function SW(e){let t=Z(e=>e.theme),n=Zp(),[r,i]=(0,p.useState)(0);return(0,p.useEffect)(()=>{let t=!0;return n&&e(n).then(()=>t&&i(e=>e+1)).catch(()=>{}),()=>{t=!1}},[n,e,t]),`${t}:${r}`}function CW(...e){return JSON.stringify([`suggestion`,...e])}function wW(e){return e.replace(/\r$/gm,``)}function TW(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(TW).join(``);let t=e?.props?.children;return t==null?``:TW(t)}var EW=/^diffle:([^#]*)(?:#L(\d+))?$/;function DW(e){return EW.test(e)?e:uV(e)}function OW({node:e,href:t,children:n,...r}){let i=EW.exec(t??``);return i?(0,g.jsx)(`a`,{...r,href:t,onClick:e=>{e.preventDefault(),Z.getState().goToLink(decodeURI(i[1]),i[2]==null?void 0:Number(i[2]))},children:n}):(0,g.jsx)(`a`,{...r,href:t,target:`_blank`,rel:`noreferrer`,children:n})}function kW({text:e}){let t=(0,p.useRef)(null),n=(0,p.useRef)(null),r=(0,p.useRef)(null),[i,a]=(0,p.useState)(e||``);return e&&e!==i&&a(e),(0,p.useLayoutEffect)(()=>{let i=t.current,a=e?n.current.getBoundingClientRect().width:0,o=i.style.width?i.getBoundingClientRect().width:r.current;if(r.current=a,o===null||matchMedia(`(prefers-reduced-motion: reduce)`).matches){i.style.width=e?``:`0px`;return}i.style.width=`${o}px`,i.offsetWidth,i.style.width=`${a}px`},[e,i]),(0,g.jsx)(`span`,{ref:t,"aria-hidden":!e||void 0,className:`-ml-1.25 inline-block overflow-hidden [transition:width_180ms_cubic-bezier(0.2,0.8,0.2,1)]`,onTransitionEnd:n=>{n.propertyName===`width`&&e&&(t.current.style.width=``)},children:(0,g.jsx)(`span`,{ref:n,className:`inline-block pl-1.25 whitespace-nowrap`,children:e||i})})}function AW(e){let[t,n]=(0,p.useState)(!1);return(0,p.useEffect)(()=>{if(!t)return;let e=setTimeout(()=>n(!1),3e3);return()=>clearTimeout(e)},[t]),{armed:t,fire:()=>{if(!t){n(!0);return}n(!1),e()}}}var jW=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`}),MW=new Intl.DateTimeFormat(void 0,{dateStyle:`full`,timeStyle:`long`}),NW=5,PW=250,FW=1400;function IW({snapshot:e}){let{mode:t,commits:n}=e,r=Z(e=>e.focusCommit),i=Z(e=>e.showPair),a=Z(e=>e.stepCommit),o=t.interdiff??null,[s,c]=(0,p.useState)((o?o.pairs.length:n.total)<=NW),[l,u]=(0,p.useState)(null),d=(0,p.useRef)(void 0),f=(0,p.useRef)(null),m=(0,p.useId)(),h=t.within??(t.base===`parent`?null:t),_=t.pair?t.pair.new:t.base===`parent`?t.new:null,v=_===null&&!o,y=n.total-n.list.length;(0,p.useEffect)(()=>{let e=f.current?.querySelector(`[aria-current="true"]`);e?.scrollIntoView({block:`nearest`}),f.current?.contains(document.activeElement)&&document.activeElement!==e&&(e?.matches(`button`)?e:e?.querySelector(`button`))?.focus({preventScroll:!0})},[_,s]),(0,p.useEffect)(()=>()=>clearTimeout(d.current),[]);let b=(e,t)=>{clearTimeout(d.current),d.current=setTimeout(()=>u({commit:e,row:t.getBoundingClientRect()}),PW)},x=()=>{clearTimeout(d.current),u(null)},S=(e,t,n,r)=>(0,g.jsxs)(X,{variant:`ghost`,className:Nj(`w-full gap-2 rounded-none py-1 pr-2.5 pl-2 text-left leading-[1.125rem] outline-none focus-visible:bg-hover`,e&&`bg-accent/12 shadow-[inset_2px_0_0_var(--accent)] hover:bg-accent/12`),"aria-current":e?`true`:void 0,onClick:t,children:[(0,g.jsx)(wM,{size:`0.8125rem`,className:e?`text-accent`:`text-muted`}),(0,g.jsx)(`span`,{className:Nj(`flex-none`,e&&`font-semibold`),children:n}),(0,g.jsx)(`span`,{className:`min-w-0 truncate font-mono text-[0.75rem] text-muted`,children:r})]});return(0,g.jsxs)(`section`,{className:`flex max-h-[40%] shrink-0 flex-col border-b border-b-border text-[0.8125rem]`,"aria-label":`Commits`,children:[(0,g.jsxs)(`div`,{className:`flex min-h-10 flex-none items-center gap-0.5 pr-1.5`,children:[(0,g.jsxs)(X,{variant:`ghost`,className:`min-w-0 flex-1 gap-1.5 self-stretch rounded-none px-2.5 py-1.5 text-left font-semibold`,"aria-expanded":s,title:s?`Collapse the commits`:`Expand the commits`,onClick:()=>c(!s),children:[(0,g.jsx)(gM,{size:`0.9375rem`}),` Commits`,(0,g.jsx)(`span`,{className:`rounded-[0.625rem] bg-hover px-1.75 py-0 font-medium text-muted`,children:o?o.pairs.length:n.total})]}),h&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(X,{variant:`ghost`,icon:!0,disabled:lP(e,-1)===void 0,onClick:()=>a(-1),title:`Older commit (<)`,"aria-label":`Older commit`,children:(0,g.jsx)(Yj,{size:`0.875rem`})}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,disabled:lP(e,1)===void 0,onClick:()=>a(1),title:`Newer commit (>)`,"aria-label":`Newer commit`,children:(0,g.jsx)(Qj,{size:`0.875rem`})})]})]}),s&&(0,g.jsxs)(`div`,{ref:f,className:`min-h-0 overflow-auto pb-1.5`,onScroll:x,children:[h&&S(v,()=>r(null),`All changes`,ek(h)),o&&S(_===null,()=>i(null),`Since #${o.from.n}`,`${o.pairs.filter(e=>e.status!==`identical`).length} of ${o.pairs.length} commits differ`),(0,g.jsx)(`ol`,{className:`m-0 list-none p-0`,children:o?o.pairs.toReversed().map(e=>{let t=e.new??e.old;return(0,g.jsx)(RW,{pair:e,active:e.new!=null&&e.new.sha===_,described:l?.commit.sha===t.sha?m:void 0,onPick:e.new&&e.status!==`identical`?()=>i(e.new.sha):void 0,onHover:e=>b(t,e),onLeave:x},`${e.old?.sha??`-`}:${e.new?.sha??`-`}`)}):n.list.toReversed().map(e=>(0,g.jsx)(zW,{commit:e,rail:n.list.length>1,active:e.sha===_,described:l?.commit.sha===e.sha?m:void 0,onPick:h?()=>r(e.sha):void 0,onHover:t=>b(e,t),onLeave:x},e.sha))}),!o&&y>0&&(0,g.jsxs)(`p`,{className:`m-0 px-2.5 py-1 text-[0.75rem] text-muted`,children:[y,` older `,y===1?`commit`:`commits`,` not shown`]})]}),l&&l.commit.sha!==_&&(0,g.jsx)(UW,{id:m,commit:l.commit,row:l.row})]})}var LW={identical:{glyph:`=`,label:`identical`,className:`text-muted`},changed:{glyph:`!`,label:`amended`,className:`text-accent`},message:{glyph:`!`,label:`reworded`,className:`text-accent`},added:{glyph:`+`,label:`added`,className:`text-add`},dropped:{glyph:`−`,label:`dropped`,className:`text-del`}};function RW({pair:e,active:t,described:n,onPick:r,onHover:i,onLeave:a}){let o=LW[e.status],s=e.new??e.old,c=e.old&&e.new&&e.old.message!==e.new.message,l=(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{"aria-hidden":!0,className:Nj(`w-2 flex-none text-center font-mono font-bold`,o.className),children:o.glyph}),(0,g.jsx)(`span`,{className:Nj(`min-w-0 flex-1`,t?`font-semibold wrap-anywhere`:`truncate`),children:VW(s)}),(0,g.jsx)(`span`,{className:Nj(`flex-none text-[0.75rem]`,o.className),children:o.label})]});return(0,g.jsxs)(`li`,{className:Nj(`group relative`,t?`bg-accent/12 shadow-[inset_2px_0_0_var(--accent)]`:r&&`hover:bg-hover`,!r&&`opacity-70`),"aria-current":t?`true`:void 0,onPointerEnter:e=>i(e.currentTarget),onPointerLeave:a,children:[(0,g.jsxs)(`div`,{className:`flex items-start pr-1.5`,children:[r?(0,g.jsx)(X,{variant:`ghost`,className:Nj(`min-w-0 flex-1 items-start gap-2 rounded-none py-1 pr-1 pl-2.5 text-left leading-[1.125rem] outline-none hover:bg-transparent`,!t&&`focus-visible:bg-hover`),"aria-describedby":n,onClick:r,children:l}):(0,g.jsx)(`div`,{className:`flex min-w-0 flex-1 items-start gap-2 py-1 pr-1 pl-2.5 leading-[1.125rem]`,children:l}),(0,g.jsxs)(`span`,{className:`flex flex-none items-center font-mono text-[0.75rem] text-muted`,children:[e.old?(0,g.jsx)(BW,{commit:e.old}):(0,g.jsx)(`span`,{className:`px-1`,children:`———————`}),(0,g.jsx)(`span`,{"aria-hidden":!0,children:`→`}),e.new?(0,g.jsx)(BW,{commit:e.new}):(0,g.jsx)(`span`,{className:`px-1`,children:`———————`})]})]}),t&&(0,g.jsxs)(`div`,{className:`pr-2.5 pb-1.5 pl-6.5`,children:[(0,g.jsx)(HW,{commit:s}),c&&e.old&&(0,g.jsxs)(`div`,{className:`mt-1 border-l-2 border-border pl-2 text-muted`,children:[(0,g.jsx)(`div`,{className:`text-[0.75rem] font-semibold`,children:`Previous message`}),(0,g.jsx)(`div`,{className:`wrap-anywhere`,children:VW(e.old)}),cP(e.old.message).map((e,t)=>(0,g.jsx)(`p`,{className:`m-0 mt-1 wrap-anywhere whitespace-pre-wrap`,children:e},t))]})]})]})}function zW({commit:e,rail:t,active:n,described:r,onPick:i,onHover:a,onLeave:o}){let s=(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{"aria-hidden":!0,className:Nj(`relative mt-1.25 size-2 flex-none rounded-full border-[1.5px]`,n?`border-accent bg-accent`:`border-muted bg-surface group-hover:bg-hover`)}),(0,g.jsx)(`span`,{className:Nj(`min-w-0 flex-1`,n?`font-semibold wrap-anywhere`:`truncate`),children:VW(e)})]});return(0,g.jsxs)(`li`,{className:Nj(`group relative`,n?`bg-accent/12 shadow-[inset_2px_0_0_var(--accent)]`:`hover:bg-hover`),"aria-current":n?`true`:void 0,onPointerEnter:e=>a(e.currentTarget),onPointerLeave:o,children:[t&&(0,g.jsx)(`span`,{"aria-hidden":!0,className:`absolute top-0 bottom-0 left-[0.8125rem] w-px bg-border group-first:top-[0.8125rem] group-last:bottom-auto group-last:h-[0.8125rem]`}),(0,g.jsxs)(`div`,{className:`flex items-start pr-1.5`,children:[i?(0,g.jsx)(X,{variant:`ghost`,className:Nj(`min-w-0 flex-1 items-start gap-2 rounded-none py-1 pr-1 pl-2.5 text-left leading-[1.125rem] outline-none hover:bg-transparent`,!n&&`focus-visible:bg-hover`),"aria-describedby":r,onClick:i,children:s}):(0,g.jsx)(`div`,{className:`flex min-w-0 flex-1 items-start gap-2 py-1 pr-1 pl-2.5 leading-[1.125rem]`,children:s}),(0,g.jsx)(BW,{commit:e})]}),n&&(0,g.jsx)(`div`,{className:`pr-2.5 pb-1.5 pl-6.5`,children:(0,g.jsx)(HW,{commit:e})})]})}function BW({commit:e}){let[t,n]=(0,p.useState)(!1),r=(0,p.useRef)(void 0);(0,p.useEffect)(()=>()=>clearTimeout(r.current),[]);let i=`[transition:opacity_160ms_ease,transform_200ms_cubic-bezier(0.2,0.8,0.2,1)]`;return(0,g.jsxs)(X,{variant:`ghost`,className:`relative mt-0.5 flex-none px-1 py-px font-mono text-[0.75rem] text-muted hover:text-foreground`,"aria-label":t?`Copied ${e.short}`:`Copy hash ${e.short}`,onClick:async()=>{await YM(e.sha)&&(n(!0),clearTimeout(r.current),r.current=setTimeout(()=>n(!1),FW))},children:[(0,g.jsx)(`span`,{className:Nj(i,t&&`[transform:scale(0.6)] opacity-0`),children:e.short}),(0,g.jsx)(`span`,{"aria-hidden":!0,className:Nj(`absolute inset-0 flex items-center justify-center text-add`,i,t?`[transform:scale(1)_rotate(0)] opacity-100`:`[transform:scale(0.4)_rotate(-30deg)] opacity-0`),children:(0,g.jsx)(Jj,{size:`0.875rem`,strokeWidth:3})})]})}function VW(e){return e.message.split(`
|
|
1632
|
-
`,1)[0]||`(Empty commit message)`}function
|
|
1633
|
-
`):`Compared now`};return(0,g.jsxs)(`section`,{className:`flex max-h-[30%] shrink-0 flex-col border-b border-b-border text-[0.8125rem]`,"aria-label":`Iterations`,children:[(0,g.jsxs)(`div`,{className:`flex min-h-10 flex-none items-center gap-1.5 pr-1.5`,children:[(0,g.jsxs)(X,{variant:`ghost`,className:`min-w-0 flex-1 gap-1.5 self-stretch rounded-none px-2.5 py-1.5 text-left font-semibold`,"aria-expanded":i,title:i?`Collapse the iterations`:`Expand the iterations`,onClick:()=>a(!i),children:[(0,g.jsx)(LM,{size:`0.9375rem`}),` Iterations`,(0,g.jsx)(`span`,{className:`rounded-[0.625rem] bg-hover px-1.75 py-0 font-medium text-muted`,children:o.length})]}),(0,g.jsxs)(X,{variant:`ghost`,danger:!0,feedback:r.armed?`confirm`:void 0,className:`gap-1 px-1.5 py-px text-[0.75rem] leading-[1.2] font-normal`,title:r.armed?`Click again to forget them`:`Forget the recorded iterations of this range`,onClick:r.fire,children:[(0,g.jsx)(WM,{size:`0.875rem`}),(0,g.jsx)(kW,{text:r.armed&&`Forget all?`})]})]}),i&&(0,g.jsx)(`ol`,{className:`m-0 min-h-0 list-none overflow-auto p-0 pb-1.5`,children:o.toReversed().map(e=>{let t=l?.from===e.n,n=l?.to===e.n,r=l!=null&&l.from<e.n&&e.n<l.to,i=[e.n===c.n&&`latest`,n&&l&&`compared with #${l.from}`,t&&`from here`].filter(e=>!!e);return(0,g.jsx)(GW,{iteration:e,notes:i,from:t,to:n,inside:r,latest:e.n===c.n,title:d(e.n),onPick:t=>u(e.n,t)},e.n)})})]})}function GW({iteration:e,notes:t,from:n,to:r,inside:i,latest:a,title:o,onPick:s}){let c=Z(e=>e.deleteIteration),l=AW(()=>void c(e.n));return(0,g.jsxs)(`li`,{"aria-current":n?`true`:void 0,className:Nj(`group/iteration relative flex items-center pr-1.5`,(n||r)&&`bg-accent/12`,(n||r||i)&&`shadow-[inset_2px_0_0_var(--accent)]`),children:[(0,g.jsx)(X,{variant:`ghost`,className:`min-w-0 flex-1 rounded-none py-1 pr-1 pl-2.5 text-left outline-none hover:bg-transparent focus-visible:bg-hover`,title:o,onClick:e=>s(e.shiftKey),children:(0,g.jsx)(KW,{iteration:e,notes:t,emphasis:n||r})}),(0,g.jsx)(BW,{commit:{sha:e.newSha,short:e.newSha.slice(0,7)}}),(0,g.jsxs)(X,{variant:`ghost`,danger:!0,icon:!l.armed,feedback:l.armed?`confirm`:void 0,disabled:a,tabIndex:a?-1:void 0,"aria-hidden":a||void 0,className:Nj(`px-0.75 py-[1px] text-[0.75rem] leading-[1.2] font-normal opacity-0 group-focus-within/iteration:opacity-100 group-hover/iteration:opacity-100 data-[feedback=confirm]:opacity-100`,a&&`invisible`),title:l.armed?`Click again to forget #${e.n}`:`Forget iteration #${e.n}`,"aria-label":l.armed?`Forget iteration #${e.n}? Click again to confirm`:`Forget iteration #${e.n}`,onClick:l.fire,children:[(0,g.jsx)(WM,{size:`0.75rem`}),(0,g.jsx)(kW,{text:l.armed&&`Forget?`})]})]})}function KW({iteration:e,notes:t,emphasis:n}){return(0,g.jsxs)(`span`,{className:`flex w-full items-baseline gap-2 leading-[1.125rem]`,children:[(0,g.jsxs)(`span`,{className:Nj(`flex-none`,n?`font-semibold`:`font-medium`),children:[`#`,e.n]}),(0,g.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-muted`,children:eP(e.recordedAt)}),t.length>0&&(0,g.jsx)(`span`,{className:`flex-none text-[0.75rem] text-muted`,children:t.join(` · `)})]})}function qW(){let e=Z(e=>e.threads),t=Z(e=>e.showResolved),n=Z(e=>e.setShowResolved),r=Z(e=>e.openFile),i=Z(e=>e.clearThreads),a=Z(e=>e.deleteThread),o=Z(e=>e.deleteStaleThreads),s=Z(e=>e.focusThread),c=Z(e=>e.report),l=Z(e=>e.exportToGithub),u=Z(e=>e.github.data?.reason===null),d=Z(e=>e.snapshot),f=d?tP(d.mode):null,[m,h]=(0,p.useState)(!1),[_,v]=(0,p.useState)(null),[y,b]=(0,p.useState)(null);(0,p.useEffect)(()=>{if(!y)return;let e=setTimeout(()=>b(null),2e3);return()=>clearTimeout(e)},[y]);let x=AW(()=>{h(!0),l().then(b).finally(()=>h(!1))}),S=AW(()=>void i()),C=AW(()=>void o()),w=(0,p.useMemo)(()=>IN({threads:e,showResolved:t}),[e,t]),T=e.filter(e=>!e.resolved),E=e.length-T.length,D=e.filter(e=>e.stale).length,O=(0,p.useMemo)(()=>{let e=new Map;for(let t of[...w].sort(XW)){let n=e.get(t.anchor.path)??[];n.push(t),e.set(t.anchor.path,n)}return[...e.entries()]},[w]),k=async()=>{let e;try{e=await oA.exportComments()}catch(e){return c(`Copying comments`,e),!1}return await YM(e)?!0:(v(e),!1)};return(0,g.jsxs)(`aside`,{className:`flex min-h-0 flex-col bg-surface`,children:[d&&d.commits.total>0&&(0,g.jsx)(IW,{snapshot:d},(d.mode.within??d.mode).commentKey),d&&(0,g.jsx)(WW,{snapshot:d}),(0,g.jsxs)(`div`,{className:`flex min-h-10 items-center gap-1.5 border-b border-b-border px-2.5 py-1.5 [&_button]:flex-none [&_button]:px-2 [&_button]:whitespace-nowrap`,children:[(0,g.jsxs)(`span`,{className:`mr-auto inline-flex min-w-0 items-center gap-1.5 truncate font-semibold`,children:[(0,g.jsx)(OM,{size:`0.9375rem`}),` Threads`,T.length>0&&(0,g.jsx)(`span`,{className:`rounded-[0.625rem] bg-hover px-1.75 py-0 font-medium text-muted`,children:T.length})]}),(0,g.jsx)(YW,{label:`All`,icon:(0,g.jsx)(nM,{size:`0.875rem`}),primary:!0,disabled:T.length===0,title:`Copy all open threads as a prompt (yy)`,onCopy:()=>k()}),u&&(0,g.jsxs)(X,{variant:`ghost`,icon:!x.armed&&!y,feedback:x.armed?`confirm`:y?`posted`:void 0,disabled:m||T.length===0&&!y,title:x.armed?`Click again to add all open threads to the pending review`:`Add all open threads to a pending review on the GitHub pull request; you submit it on GitHub`,"aria-label":x.armed?`Add all open threads to the pending review? Click again to confirm`:`Add all open threads to a pending review on the GitHub pull request`,onClick:x.fire,children:[y?(0,g.jsx)(Jj,{size:`0.875rem`}):(0,g.jsx)(yM,{size:`0.875rem`}),(0,g.jsx)(kW,{text:x.armed?`Add all?`:y&&XN(y)})]}),(0,g.jsxs)(X,{variant:`ghost`,danger:!0,icon:!S.armed,feedback:S.armed?`confirm`:void 0,disabled:e.length===0,title:S.armed?`Click again to delete all threads`:`Delete all threads for this mode`,onClick:S.fire,children:[(0,g.jsx)(WM,{size:`0.875rem`}),(0,g.jsx)(kW,{text:S.armed&&`Delete all?`})]})]}),D>0&&(0,g.jsxs)(`div`,{className:`flex cursor-default items-center gap-1.5 border-b border-b-border px-2.5 py-1 text-[0.75rem] text-warn`,title:`Stale threads no longer point into the diff: their text changed or left the changed lines`,children:[(0,g.jsx)(GM,{size:`0.75rem`}),D,` stale`,(0,g.jsxs)(X,{variant:`ghost`,danger:!0,feedback:C.armed?`confirm`:void 0,className:`ml-auto gap-1 px-1.5 py-px text-[0.75rem] leading-[1.2]`,onClick:C.fire,children:[(0,g.jsx)(WM,{size:`0.75rem`}),(0,g.jsx)(kW,{text:C.armed?`Delete stale?`:`Delete`})]})]}),E>0&&(0,g.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-1.5 border-b border-b-border px-2.5 py-1 text-[0.75rem] text-muted`,title:`Resolved threads are kept but left out of the prompt`,children:[(0,g.jsx)(`input`,{type:`checkbox`,checked:t,onChange:e=>n(e.target.checked)}),`Show `,E,` resolved`]}),(0,g.jsxs)(`div`,{className:`flex flex-1 flex-col gap-3.5 overflow-auto p-2.5`,children:[O.length===0&&(0,g.jsxs)(`div`,{className:`px-3 py-6 text-center text-muted [&>p]:mt-0 [&>p]:mr-0 [&>p]:mb-1.5 [&>p]:ml-0`,children:[(0,g.jsx)(`p`,{children:e.length?`Every thread is resolved.`:`No comments yet.`}),(0,g.jsx)(`p`,{children:f??`Click a line number to comment, drag across line numbers for a block, or press C for a whole file.`})]}),O.map(([e,t])=>(0,g.jsxs)(`section`,{className:`border-0 [&+section]:border-t [&+section]:border-solid [&+section]:border-border [&+section]:pt-3`,children:[(0,g.jsx)(`h4`,{className:`m-0 mb-1.5 font-mono text-[0.75rem] leading-[1.4] text-muted`,children:(0,g.jsx)(oF,{path:e})}),t.map(e=>(0,g.jsx)(JW,{thread:e,openFile:r,focusThread:s,deleteThread:a},e.id))]},e))]}),_&&(0,g.jsxs)(Pj,{label:`Copy manually`,onClose:()=>v(null),children:[(0,g.jsx)(`h3`,{className:`m-0 mb-2`,children:`Copy manually`}),(0,g.jsx)(`p`,{className:`m-0 mb-2 text-muted`,children:`The browser blocked clipboard access. Select the text below and press Ctrl/⌘+c.`}),(0,g.jsx)(`textarea`,{className:`min-h-40 w-full rounded-md border border-border bg-surface p-2 font-mono text-[0.75rem]`,readOnly:!0,value:_,autoFocus:!0,onFocus:e=>e.currentTarget.select()}),(0,g.jsx)(`div`,{className:`mt-2.5 flex justify-end gap-1.5`,children:(0,g.jsx)(X,{onClick:()=>v(null),children:`Close`})})]})]})}var JW=(0,p.memo)(function({thread:e,openFile:t,focusThread:n,deleteThread:r}){let i=e.messages[0],a=AW(()=>void r(e.id)),o=()=>{e.anchor.kind===`line`?t(e.anchor.path,e.anchor.endLine,e.anchor.side):t(e.anchor.path),n(e.id)};return(0,g.jsxs)(`div`,{role:`button`,tabIndex:0,className:Nj(`group/thread mb-2 block w-full cursor-pointer overflow-hidden rounded-md border border-border bg-card p-0 text-left font-sans text-[0.8125rem] leading-[1.4] text-foreground shadow-card [transition:border-color_120ms_ease] hover:border-accent focus-visible:outline-2 focus-visible:outline-offset-[1px] focus-visible:outline-accent focus-visible:outline-solid ${e.stale?`border-dashed`:``} ${e.resolved?`opacity-65`:``}`),onClick:o,onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),o())},children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-b-border bg-hover py-1 pr-1.5 pl-2.5 text-[0.75rem] text-muted [&>svg]:flex-none [&>svg]:text-accent`,children:[(0,g.jsx)(OM,{size:`0.8125rem`}),(0,g.jsx)(`span`,{className:`font-mono font-semibold text-foreground`,children:LN(e.anchor)}),e.messages.length>1&&(0,g.jsxs)(`span`,{className:`text-muted`,children:[e.messages.length-1,` repl`,e.messages.length===2?`y`:`ies`]}),e.stale&&(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-0.75 font-sans text-[0.6875rem] leading-[normal] text-warn`,children:[(0,g.jsx)(GM,{size:`0.6875rem`}),` stale`]}),e.resolved&&(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-0.75 font-sans text-[0.6875rem] leading-[normal] text-add`,children:[(0,g.jsx)(Jj,{size:`0.6875rem`}),` resolved`]}),(0,g.jsxs)(X,{type:`button`,variant:`ghost`,danger:!0,icon:!a.armed,feedback:a.armed?`confirm`:void 0,className:`ml-auto px-0.75 py-[1px] opacity-0 group-focus-within/thread:opacity-100 group-hover/thread:opacity-100 data-[feedback=confirm]:opacity-100`,title:a.armed?`Click again to delete this thread`:`Delete this thread`,"aria-label":a.armed?`Delete this thread? Click again to confirm`:`Delete this thread`,onClick:e=>{e.stopPropagation(),a.fire()},children:[(0,g.jsx)(WM,{size:`0.75rem`}),(0,g.jsx)(kW,{text:a.armed&&`Delete?`})]})]}),(0,g.jsxs)(`div`,{className:`px-2.5 pt-1.5 pb-2 [&>.markdown]:font-sans [&>.markdown]:text-[0.8125rem] [&>.markdown]:leading-[1.4] [&>.markdown]:[word-break:break-word]`,children:[e.anchor.kind===`line`&&(0,g.jsx)(`div`,{className:`m-0 mb-1.5 overflow-hidden font-mono text-[0.75rem] leading-[1.4] text-ellipsis whitespace-nowrap text-muted`,children:ZW(e.anchor.quoted)}),(0,g.jsx)(vW,{text:i?.body??``,path:e.anchor.path,quoted:e.anchor.kind===`line`?e.anchor.quoted:void 0})]})]})});function YW({label:e,icon:t,onCopy:n,primary:r,disabled:i,title:a}){let[o,s]=(0,p.useState)(!1),c=(0,p.useRef)(null);return(0,p.useEffect)(()=>()=>void(c.current&&clearTimeout(c.current)),[]),(0,g.jsxs)(X,{variant:r?`primary`:`default`,feedback:o?`copied`:void 0,className:`relative`,disabled:i,title:a,onClick:async()=>{await n()&&(s(!0),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>s(!1),1400))},children:[(0,g.jsx)(JM,{done:o,children:t}),(0,g.jsx)(kW,{text:o?`Copied`:e})]})}function XW(e,t){if(e.anchor.path!==t.anchor.path)return e.anchor.path<t.anchor.path?-1:1;let n=e=>e.anchor.kind===`line`?e.anchor.startLine:0;return n(e)-n(t)||(e.messages[0]?.createdAt??0)-(t.messages[0]?.createdAt??0)}function ZW(e){let[t=``]=e.split(`
|
|
1634
|
-
`),n=t.trim();return n.length>70?n.slice(0,70)+`…`:n}function QW({className:e,...t}){return(0,g.jsx)(`div`,{...t,className:Nj(`inline-flex items-center gap-0.5 rounded-md bg-hover p-0.5`,e)})}function $W({selected:e,className:t,...n}){return(0,g.jsx)(X,{...n,"aria-pressed":e,className:Nj(`rounded-[0.25rem] border-0 bg-transparent px-2 py-0.5 text-muted hover:bg-transparent hover:text-foreground`,e&&`bg-raised text-foreground shadow-[0_1px_2px_rgba(0,0,0,0.12)] hover:bg-raised`,t)})}function eG(){let e=Z(e=>e.snapshot?.commit),t=Z(e=>e.snapshot?.mode.within!=null),n=Z(e=>e.stepCommit);return!e||t?null:(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-0.5`,children:[(0,g.jsx)(X,{variant:`ghost`,icon:!0,disabled:!e.parent,onClick:()=>n(-1),title:`Previous commit (<)`,"aria-label":`Previous commit`,children:(0,g.jsx)(Xj,{size:`1rem`})}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,disabled:!e.child,onClick:()=>n(1),title:`Next commit toward HEAD (>)`,"aria-label":`Next commit`,children:(0,g.jsx)(Zj,{size:`1rem`})})]})}function tG(){let e=Z(e=>e.githubMenuOpen),t=Z(e=>e.setGithubMenuOpen),n=Z(e=>e.github),r=n.data,i=r?.repository,a=(0,p.useRef)(null),o=(0,p.useRef)(null);(0,p.useEffect)(()=>{if(!e)return;let n=e=>{a.current?.contains(e.target)||t(!1)};return document.addEventListener(`mousedown`,n),()=>document.removeEventListener(`mousedown`,n)},[e,t]);let s=r?.pullRequest;return(0,g.jsxs)(`div`,{className:`relative`,ref:a,onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),t(!1),o.current?.focus())},children:[(0,g.jsxs)(X,{ref:o,variant:`ghost`,title:`GitHub information (o)`,"aria-label":`GitHub information`,"aria-expanded":e,"aria-controls":`github-menu`,onClick:()=>t(!e),children:[(0,g.jsx)(bM,{size:`1rem`}),` `,(0,g.jsx)(`span`,{className:`max-lg:hidden`,children:`GitHub`})]}),e&&(0,g.jsxs)(`section`,{id:`github-menu`,role:`dialog`,"aria-label":`GitHub information`,className:`absolute top-[calc(100%+0.375rem)] left-0 z-30 w-80 max-w-[85vw] rounded-lg border border-border bg-surface p-3 text-[0.8125rem] shadow-lg`,children:[(0,g.jsx)(`strong`,{children:`Repository`}),(0,g.jsx)(`p`,{className:`mt-1 mb-3 wrap-anywhere`,children:i?(0,g.jsxs)(`a`,{className:`inline-flex items-center gap-1 text-accent hover:underline`,href:`https://github.com/${i}`,target:`_blank`,rel:`noreferrer`,children:[i,(0,g.jsx)(cM,{size:`0.75rem`})]}):(0,g.jsx)(`span`,{className:`text-muted`,children:n.status===`loading`?`Loading…`:r?`No GitHub origin`:`Unavailable`})}),(0,g.jsx)(`strong`,{children:`Pull request`}),(0,g.jsx)(`div`,{"aria-live":`polite`,className:`mt-1`,children:n.status===`loading`?(0,g.jsx)(`p`,{className:`text-muted`,children:`Loading…`}):n.status===`error`?(0,g.jsxs)(`p`,{className:`text-warn`,children:[`Lookup failed: `,n.error]}):s?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`a`,{className:`text-accent hover:underline`,href:s.url,target:`_blank`,rel:`noreferrer`,children:[`#`,s.number,` `,s.title]}),(0,g.jsx)(`p`,{className:`mt-1 text-muted`,children:s.state===`OPEN`?s.isDraft?`Draft`:`Open`:s.state===`MERGED`?`Merged`:`Closed`}),s.repository!==i&&(0,g.jsx)(`p`,{className:`text-muted`,children:s.repository}),r?.reason&&(0,g.jsx)(`p`,{className:`mt-2 text-muted`,children:r?.reason})]}):(0,g.jsx)(`p`,{className:`text-muted`,children:r?.reason??`No matching pull request`})})]})]})}function nG(){let e=Z(EN),t=Z(DN),n=Z(e=>e.jumpBack),r=Z(e=>e.jumpForward);return(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-0.5`,children:[(0,g.jsx)(X,{variant:`ghost`,icon:!0,disabled:!e,onClick:n,title:`Back (Ctrl+o)`,"aria-label":`Back`,children:(0,g.jsx)(Kj,{size:`1rem`})}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,disabled:!t,onClick:r,title:`Forward (Ctrl+i)`,"aria-label":`Forward`,children:(0,g.jsx)(qj,{size:`1rem`})})]})}function rG(e){return e.dataset.lineType===`change-deletion`||(e.closest(`code`)?.hasAttribute(`data-deletions`)??!1)}function iG(e,t,n){let r=n===`old`;return[...e.querySelectorAll(`[data-line="${t}"]`)].find(e=>rG(e)===r)??null}function aG(e,t,n){let r=null;for(let{id:i,root:a}of e)for(let e of a.querySelectorAll(`[data-line]`)){let a=e.getBoundingClientRect();a.height===0||a.bottom<=t||a.top>=n||(!r||a.top<r.top||a.top===r.top&&rG(r.row)&&!rG(e))&&(r={id:i,row:e,top:a.top})}return r&&{id:r.id,line:Number(r.row.dataset.line),side:rG(r.row)?`old`:`new`,offset:r.top-t}}function oG(e,t,n,r,i=()=>{}){let a=0,o=new WeakSet,s=new MutationObserver(e=>{i(e),c()}),c=()=>{a||=requestAnimationFrame(()=>{a=0;let t=[];for(let n of e()?.getInstance()?.getRenderedItems()??[]){let e=n.element.shadowRoot??n.element;o.has(e)||(o.add(e),s.observe(e,{childList:!0,subtree:!0,characterData:!0})),t.push({id:n.id,root:e})}r(t)})};t.addEventListener(`scroll`,c,{passive:!0}),s.observe(t,{childList:!0,subtree:!0});let l=n(c);return c(),()=>{cancelAnimationFrame(a),s.disconnect(),t.removeEventListener(`scroll`,c),l()}}var sG={text:`diffle-occurrence`,read:`diffle-occurrence-read`,write:`diffle-occurrence-write`},cG=64;function lG(e,t,n){let r=n.filter(e=>e.line<=t&&t<=e.endLine);if(!r.length)return[];let i=[];for(let n of e.querySelectorAll(`span[data-char]`)){let a=Number(n.dataset.char),o=uG(n),s=o.reduce((e,t)=>e+t.data.length,0);if(!(!Number.isFinite(a)||!s))for(let n of r){let r=Math.max(n.line===t?n.col:0,a),c=Math.min(n.endLine===t?n.endCol:1/0,a+s);if(r>=c)continue;let l=e.ownerDocument.createRange(),[u,d]=dG(o,r-a),[f,p]=dG(o,c-a,!0);l.setStart(u,d),l.setEnd(f,p),i.push({range:l,kind:n.kind})}}return i}function uG(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=[];for(let e=t.nextNode();e;e=t.nextNode())n.push(e);return n}function dG(e,t,n=!1){let r=0;for(let i=0;i<e.length;i++){let a=e[i],o=r+a.data.length;if(n?t<=o:t<o)return[a,t-r];r=o}let i=e[e.length-1];return[i,i.data.length]}var fG=null,pG=null,mG=null,hG=new Map,gG=null,_G=e=>`${e.path}\0${e.line}\0${e.col}`;function vG(){let e=Z.getState().snapshot?.version??null;return e==null?null:(e!==gG&&(gG=e,hG=new Map),hG)}function yG(e){mG&&clearTimeout(mG),mG=null;let t=pG??fG,n=Z.getState();if(!t)return n.clearOccurrences();if(n.occurrences&&_G(n.occurrences.target)===_G(t))return;n.clearOccurrences();let r=vG()?.get(_G(t));if(r){r.length&&Z.setState({occurrences:{target:t,items:r}});return}mG=setTimeout(()=>{mG=null,Z.getState().requestOccurrences(t).then(e=>{if(!e?.length)return;let n=vG();if(n){n.set(_G(t),e);for(let e of n.keys()){if(n.size<=cG)break;n.delete(e)}}})},e)}var bG={focus(e){fG=e,pG||yG(80)},hover(e){pG=e,yG(e?150:80)},reset(){fG=null,pG=null,mG&&clearTimeout(mG),mG=null,hG=new Map,gG=null}},xG=()=>typeof CSS<`u`&&`highlights`in CSS&&typeof Highlight<`u`;function SG(e){let t=new Map;for(let n of e)for(let e=n.line;e<=n.endLine;e++){let r=t.get(e);r?r.push(n):t.set(e,[n])}return t}function CG(e,t){if(!xG())return()=>{};let n=()=>{for(let e of Object.values(sG))CSS.highlights.delete(e)},r=oG(e,t,e=>Z.subscribe((t,n)=>{(t.occurrences!==n.occurrences||t.loaded!==n.loaded||t.collapsed!==n.collapsed)&&e()}),e=>{let t=Z.getState().occurrences;if(!t)return n();let r=SG(t.items),i={text:[],read:[],write:[]};for(let{id:n,root:a}of e)if(yN(n)===t.target.path)for(let e of a.querySelectorAll(`[data-line]`)){if(rG(e))continue;let t=Number(e.dataset.line),n=r.get(t);if(n)for(let{range:r,kind:a}of lG(e,t,n))i[a].push(r)}for(let e of Object.keys(i)){let t=new Highlight(...i[e]);t.priority=1,CSS.highlights.set(sG[e],t)}});return()=>{r(),n()}}function wG(e){return[...e.matchAll(/[\p{L}\p{N}_]+/gu)].map(e=>({start:e.index,text:e[0]}))}var TG=()=>null,EG=null,DG=null,OG=null;function kG(e){TG=e}function AG(){typeof CSS<`u`&&`highlights`in CSS&&CSS.highlights.delete(`diffle-word-focus`),EG=null,DG=null,OG=null,PP.focus(null),bG.focus(null)}function jG(e){if(OG){if(e){let t=yN(e.id),n=RG(t,e.range.end,mN(e)===`old`);if(t===OG.path&&n===OG.line)return}AG()}}function MG(e,t){e.side===`new`&&LG({el:t,col:e.col,text:e.text},e.path,e.line)}var NG=200;function PG(e){let t=Z.getState(),n=t.selection;if(!n)return;let r=yN(n.id),i=RG(r,n.range.end,mN(n)===`old`),a=i==null?[]:BG(r,i)??[],o=a.findIndex(e=>e.el===EG&&e.col===DG),s=o===-1?e===1?0:a.length-1:o+e;if(i!=null&&s>=0&&s<a.length){LG(a[s],r,i);return}for(let n=0;n<NG;n++){let n=Z.getState().selection;t.moveCursor(e);let r=Z.getState().selection;if(!r||IG(n,r))break;let i=yN(r.id),a=RG(i,r.range.end,mN(r)===`old`);if(a==null)continue;let o=BG(i,a);if(o==null)break;if(o.length>0){LG(o[e===1?0:o.length-1],i,a);return}}AG()}function FG(e){let t=Z.getState(),n=t.selection;if(!n)return;let r=yN(n.id),i=RG(r,n.range.end,mN(n)===`old`),a=i==null?[]:BG(r,i)??[],o=e===`first`?a[0]:a[a.length-1];if(i==null||!o)return t.flash(`No symbol on this line`);LG(o,r,i)}function IG(e,t){return e.id===t.id&&e.range.end===t.range.end&&mN(e)===mN(t)}function LG({el:e,col:t,text:n},r,i){AG(),EG=e,DG=t,OG={path:r,line:i};let a=e.firstChild;if(a?.nodeType===Node.TEXT_NODE&&typeof CSS<`u`&&`highlights`in CSS&&typeof Highlight<`u`){let r=t-Number(e.dataset.char),i=document.createRange();i.setStart(a,r),i.setEnd(a,r+n.length);let o=new Highlight(i);o.priority=2,CSS.highlights.set(`diffle-word-focus`,o)}let o={path:r,side:`new`,line:i,col:t,text:n};PP.focus(o,e),bG.focus(o)}function RG(e,t,n){if(!n)return t;let r=zG(e),i=r&&iG(r,t,`old`);if(!i||!i.dataset.lineType?.startsWith(`context`))return null;let a=Number(i.dataset.altLine);return Number.isFinite(a)?a:null}function zG(e){let t=bN(Z.getState(),e),n=TG()?.getInstance()?.getRenderedItems().find(e=>e.id===t);return n?.element.shadowRoot??n?.element??null}function BG(e,t){let n=zG(e),r=n&&iG(n,t,`new`);return r?[...r.querySelectorAll(`span[data-char]`)].flatMap(e=>wG(e.textContent??``).map(t=>({el:e,col:Number(e.dataset.char)+t.start,text:t.text}))):null}function VG(){if(typeof document>`u`)return 16;let e=parseFloat(getComputedStyle(document.documentElement).fontSize);return Number.isFinite(e)&&e>0?e:16}var HG=800,UG=new Set([`g`,`d`,`y`,`z`,`i`]),WG=new Set([`PageUp`,`PageDown`,`Home`,`End`]),GG={gg:(e,t)=>void e.goToLine(t),G:(e,t)=>void e.goToLine(t),j:(e,t)=>e.moveCursorBy(t),k:(e,t)=>e.moveCursorBy(-t)},KG={w:()=>PG(1),b:()=>PG(-1),0:()=>FG(`first`),$:()=>FG(`last`),j:e=>e.moveCursor(1),k:e=>e.moveCursor(-1),J:e=>e.moveFile(1),K:e=>e.moveFile(-1),"]":e=>e.moveHunk(1),"[":e=>e.moveHunk(-1),"*":e=>e.searchWord(1),"#":e=>e.searchWord(-1),n:e=>e.search.matches.length?e.moveMatch(1):e.moveHunk(1),N:e=>e.search.matches.length?e.moveMatch(-1):e.moveHunk(-1),gg:e=>e.moveFile(`first`),G:e=>e.moveFile(`last`),V:e=>e.toggleVisual(),c:e=>e.selection&&e.openDraft(e.selection),C:e=>{let t=TN(e);t&&e.openFileDraft(t)},e:e=>e.editCommentAtCursor(),dd:e=>e.deleteCommentAtCursor(),R:e=>e.toggleResolvedAtCursor(),v:e=>e.toggleViewedAtCursor(),gv:e=>e.toggleViewedAbove(),zo:e=>e.setCollapsedAtCursor(!1),zc:e=>e.setCollapsedAtCursor(!0),zC:e=>e.setAllCollapsed(!0),zO:e=>e.setAllCollapsed(!1),zt:e=>e.scrollCursorTo(`top`),zb:e=>e.scrollCursorTo(`bottom`),zz:e=>e.scrollCursorTo(`eye`),s:e=>e.setDiffStyle(e.diffStyle===`split`?`unified`:`split`),t:e=>e.setTheme(JP(e.theme)),yy:()=>void rK(),Y:()=>void rK(),yp:e=>void tK(e),"/":e=>e.openSearch(`file`),"g/":e=>e.openSearch(`diff`),gf:()=>$G(),gd:e=>e.goToDefinition(),gy:e=>e.goToTypeDefinition(),gh:e=>e.showHover(),gA:e=>e.findReferences(),gs:e=>e.openSymbols(`document`),gS:e=>e.openSymbols(`workspace`),F:e=>{let t=TN(e);!e.fileView&&t&&e.openFullFile(t)},o:e=>e.setGithubMenuOpen(!e.githubMenuOpen),m:e=>e.setModeMenuOpen(!e.modeMenuOpen),"<":e=>e.stepCommit(-1),">":e=>e.stepCommit(1),ii:e=>e.toggleInterdiff(),ij:e=>e.stepIteration(`lower`,-1),ik:e=>e.stepIteration(`lower`,1),iJ:e=>e.stepIteration(`higher`,-1),iK:e=>e.stepIteration(`higher`,1),...Object.fromEntries([1,2,3,4,5,6,7,8,9].map(e=>[`i${e}`,t=>t.pickIteration(e)])),r:e=>e.reloadIfMoved(),"?":e=>e.setHelpOpen(!e.helpOpen)};function qG(e){return e.composedPath()[0]??e.target}function JG(e){return!e.ctrlKey&&!e.altKey?!1:[...e.key].length!==1||!(e.ctrlKey&&e.altKey||e.getModifierState(`AltGraph`))}function YG(e){if(!e)return!1;let t=e.tagName;return t===`TEXTAREA`||t===`INPUT`||t===`SELECT`||e.isContentEditable}function XG(){let e=(0,p.useRef)(null),t=(0,p.useRef)(``);(0,p.useEffect)(()=>{let n=()=>{e.current&&clearTimeout(e.current.timer),e.current=null},r=r=>{if(r.key===`Shift`||r.key===`Control`||r.key===`Alt`||r.key===`Meta`||r.key===`CapsLock`)return;let i=Z.getState(),a=qG(r),o=t.current;t.current=``;let s=Number(o);if(r.key===`Escape`&&a?.getAttribute(`role`)===`combobox`&&a.getAttribute(`aria-expanded`)===`true`)return;if(r.key===`Escape`){if(i.modePane&&!i.helpOpen){i.escape(),a?.closest(`#mode-picker`)&&ZG(),n();return}YG(a)&&(a.blur(),i.treeModel?.isSearchOpen()&&i.treeModel.closeSearch()),requestAnimationFrame(()=>nK()),AG(),i.escape(),n();return}if(!YG(a)&&!r.metaKey&&!JG(r)&&([...r.key].length===1||r.key===`Backspace`||r.key===`Enter`)&&i.search.open&&i.search.kind===`text`&&i.search.editing&&i.search.scope===`file`){r.preventDefault(),n(),[...r.key].length===1||r.key===`Backspace`?i.typeSearchInput(r.key):r.key===`Enter`&&i.runSearch(i.search.input);return}if((r.metaKey||r.ctrlKey)&&!r.altKey&&!r.shiftKey&&r.key.toLowerCase()===`p`){r.preventDefault(),n(),i.layout.treeVisible?$G():(i.setLayout({treeVisible:!0}),requestAnimationFrame($G));return}if(i.references.open){if(r.stopPropagation(),i.references.peek&&WG.has(r.key))return;if(r.preventDefault(),r.key===`j`||r.key===`ArrowDown`||r.ctrlKey&&r.key===`n`)return i.moveReference(1);if(r.key===`k`||r.key===`ArrowUp`||r.ctrlKey&&r.key===`p`)return i.moveReference(-1);if(r.key===`Enter`)return i.pickReference();if(r.key===` `)return i.togglePeek();if(i.references.peek&&(r.key===`J`||r.key===`K`||r.ctrlKey&&(r.key===`d`||r.key===`u`))){let e=document.querySelector(`[aria-label="Peek"]`);if(!e)return;let t=r.ctrlKey?e.clientHeight/2:3*parseFloat(getComputedStyle(e).lineHeight);e.scrollBy({top:r.key===`J`||r.key===`d`?t:-t})}return}if((r.metaKey||r.ctrlKey)&&!r.altKey&&r.key.toLowerCase()===`b`){r.preventDefault();let e=i.layout;r.shiftKey?i.setLayout({panelVisible:!e.panelVisible}):i.setLayout({treeVisible:!e.treeVisible});return}if((r.metaKey||r.ctrlKey)&&r.shiftKey&&!r.altKey&&r.key.toLowerCase()===`e`){r.preventDefault(),eK();return}if(r.ctrlKey&&!r.metaKey&&!r.altKey&&(r.key===`o`||r.key===`i`)&&!YG(a)){r.preventDefault(),r.key===`o`?i.jumpBack():i.jumpForward();return}if(r.ctrlKey&&!r.metaKey&&!r.altKey&&(r.key===`d`||r.key===`u`)&&!YG(a)){r.preventDefault();let e=document.querySelector(`.codeview`)?.clientHeight??800,t=Math.max(5,Math.floor(e/2/(1.25*VG())));i.moveCursorBy(r.key===`d`?t:-t);return}if(document.activeElement?.tagName===`FILE-TREE-CONTAINER`){r.key===`ArrowRight`&&!YG(a)&&(r.preventDefault(),r.stopPropagation(),nK());return}if(YG(a)||r.metaKey||JG(r))return;if(i.modeMenuOpen&&!i.helpOpen){let e=r.key===`j`||r.key===`ArrowDown`?1:r.key===`k`||r.key===`ArrowUp`?-1:0,t=/^[1-5]$/.test(r.key)?Number(r.key):r.key===`Enter`&&!a?.closest(`button, #mode-config`)?i.modeEntry:0;if(e||t){r.preventDefault(),e?(i.highlightModeEntry(i.modeEntry+e),a?.closest(`button`)&&!a.closest(`#mode-config`)&&ZG()):i.pickModeEntry(t);return}if(r.key===`l`||r.key===`ArrowRight`){if(r.preventDefault(),i.modeEntry===1)return;i.modePane===JN[i.modeEntry-1]?QG():i.pickModeEntry(i.modeEntry);return}if(r.key===`h`||r.key===`ArrowLeft`){r.preventDefault(),i.closeModePane(),a?.closest(`#mode-picker`)&&ZG();return}}if(i.modeMenuOpen&&a?.closest(`#mode-picker`))return;if(r.key===`ArrowDown`||r.key===`ArrowUp`){r.preventDefault();let e=r.key===`ArrowDown`?1:-1;s>0?i.moveCursorBy(e*s):i.moveCursor(e);return}if(r.key===`ArrowLeft`){r.preventDefault(),eK();return}if(i.helpOpen&&r.key!==`?`){i.setHelpOpen(!1);return}let c=e.current?.key;if(n(),!c&&/^[0-9]$/.test(r.key)&&(o||r.key!==`0`)){r.preventDefault(),t.current=o+r.key;return}if(!c&&UG.has(r.key)){t.current=o,e.current={key:r.key,timer:setTimeout(n,HG)};return}let l=c?c+r.key:r.key,u=s>0?GG[l]:void 0,d=KG[l];!u&&!d||(r.preventDefault(),u?u(i,s):d(i))},i=e=>{r(e),e.defaultPrevented&&e.stopPropagation()},a=e=>{if(e.button!==0||qG(e)?.closest(`[data-content-search]`))return;let r=Z.getState();!r.search.open||!r.search.editing||(r.blurSearchInput(),document.querySelector(`[data-content-search]`)?.blur(),n(),t.current=``)},o=e=>{e.key===`Escape`&&qG(e)?.getAttribute(`role`)!==`combobox`&&(Z.getState().modeMenuOpen&&document.activeElement?.closest(`#mode-picker`)||setTimeout(nK,0))};return document.addEventListener(`keydown`,i,!0),document.addEventListener(`pointerdown`,a,!0),document.addEventListener(`keyup`,o),()=>{document.removeEventListener(`keydown`,i,!0),document.removeEventListener(`pointerdown`,a,!0),document.removeEventListener(`keyup`,o),n(),t.current=``}},[])}function ZG(){document.querySelector(`[data-mode-entry="${Z.getState().modeEntry}"]`)?.focus()}function QG(){document.querySelector(`#mode-config :is(input, [tabindex="0"])`)?.focus()}function $G(){let e=Z.getState().treeModel;e?.openSearch(e.getSearchValue()),document.querySelector(`file-tree-container`)?.shadowRoot?.querySelector(`[data-file-tree-search-input]`)?.focus({preventScroll:!0})}function eK(){let e=Z.getState();e.layout.treeVisible||e.setLayout({treeVisible:!0});let t=e.treeModel,n=document.querySelector(`file-tree-container`);requestAnimationFrame(()=>{let r=e.activePath&&t?.getItem(e.activePath)?e.activePath:t?.focusNearestPath(e.activePath??null);r&&t&&t.focusPath(r),(n?.shadowRoot?.querySelector(`[role="treeitem"][tabindex="0"]`)??n?.shadowRoot?.querySelector(`[role="tree"]`)??n)?.focus()})}async function tK(e){let t=TN(e);t&&e.flash(await YM(t)?`Copied ${t}`:`The browser blocked clipboard access`)}function nK(){document.activeElement?.blur?.(),document.querySelector(`main[tabindex]`)?.focus({preventScroll:!0})}async function rK(){let e=Z.getState(),t;try{t=await oA.exportComments()}catch(t){return e.report(`Copying comments`,t)}let n=await YM(t);e.flash(n?`Copied all comments`:`Clipboard blocked; use the panel buttons`)}function iK({label:e,value:t,onChange:n,refs:r,autoFocus:i,inputRef:a,onAccept:o,worktree:s=!0}){let c=(0,p.useId)(),[l,u]=(0,p.useState)(!1),[d,f]=(0,p.useState)(``),[m,h]=(0,p.useState)(-1),_=(0,p.useRef)(null),v=[{value:`HEAD`,detail:`Current commit`,section:`special`},...s?[{value:`worktree`,detail:`Uncommitted changes`,section:`special`}]:[],...(r?.branches??[]).map(e=>({value:e,detail:e===r?.current?`Current branch`:`Branch`,section:`branches`})),...(r?.remoteBranches??[]).map(e=>({value:e,detail:`Remote branch`,section:`remotes`})),...(r?.tags??[]).map(e=>({value:e,detail:`Tag`,section:`tags`})),...(r?.recent??[]).map(e=>({value:e.short,detail:e.subject,section:`commits`}))].filter((e,t,n)=>n.findIndex(t=>t.value===e.value)===t).filter(e=>`${e.value} ${e.detail}`.toLowerCase().includes(d.toLowerCase())),y=v[m];(0,p.useEffect)(()=>{_.current?.querySelector(`[aria-selected="true"]`)?.scrollIntoView?.({block:`nearest`})},[m]);let b=e=>{n(e),u(!1),h(-1)};return(0,g.jsxs)(`div`,{className:`group/ref relative min-w-0 flex-1`,children:[(0,g.jsx)(`input`,{className:`w-full min-w-0 rounded-md border border-transparent bg-surface px-1.5 py-1 text-foreground [font:inherit] focus:bg-hover focus:outline-none`,ref:a,role:`combobox`,"aria-label":e,"aria-autocomplete":`list`,"aria-expanded":l,"aria-controls":l?c:void 0,"aria-activedescendant":l&&y?`${c}-${m}`:void 0,autoFocus:i,autoComplete:`off`,spellCheck:!1,placeholder:e,value:t,onFocus:e=>{e.currentTarget.select(),f(``),h(-1)},onClick:()=>u(!0),onBlur:()=>u(!1),onChange:e=>{n(e.target.value),f(e.target.value),h(0),u(!0)},onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),e.stopPropagation(),u(!0),h(t=>v.length?(t+(e.key===`ArrowDown`?1:t<0?0:-1)+v.length)%v.length:-1);else if(e.key===`Enter`&&!e.nativeEvent.isComposing){e.preventDefault(),e.stopPropagation();let n=l&&y?y.value:t.trim();n&&(b(n),o(n))}else e.key===`Escape`&&l&&(e.preventDefault(),e.stopPropagation(),u(!1))}}),l&&(0,g.jsxs)(`div`,{className:`absolute top-[calc(100%_+_0.375rem)] left-0 z-1 max-h-120 w-68 max-w-[calc(100vw_-_2rem)] overflow-auto rounded-md border border-border bg-canvas p-1 shadow-[0_0.375rem_1rem_rgba(0,_0,_0,_0.18)] group-last/ref:right-0 group-last/ref:left-auto`,id:c,role:`listbox`,tabIndex:-1,"aria-label":`${e} suggestions`,ref:_,children:[v.map((e,t)=>(0,g.jsxs)(p.Fragment,{children:[t>0&&v[t-1].section!==e.section&&(0,g.jsx)(`div`,{className:`mx-2 my-1 border-t border-t-border`,"aria-hidden":`true`}),(0,g.jsxs)(`div`,{id:`${c}-${t}`,role:`option`,"aria-selected":t===m,className:`flex cursor-pointer flex-col gap-0.5 rounded-sm px-2 py-1.5 hover:bg-hover aria-selected:bg-hover`,onMouseDown:e=>e.preventDefault(),onClick:()=>b(e.value),children:[(0,g.jsx)(`span`,{className:`truncate`,children:e.value}),(0,g.jsx)(`span`,{className:`truncate font-sans text-[0.6875rem] leading-[1.4] text-muted`,children:e.detail})]})]},e.value)),!v.length&&(0,g.jsx)(`div`,{className:`p-2 font-sans text-[0.6875rem] leading-[1.4] text-muted`,children:`Use this revision as typed.`})]})]})}function aK(e){let t=Number(e);return/^[0-9]+$/.test(e)&&Number.isSafeInteger(t)?t:null}function oK({label:e,value:t,onChange:n,autoFocus:r}){let i=(0,p.useRef)(null),a=(0,p.useRef)(!1);(0,p.useLayoutEffect)(()=>{a.current&&=(i.current?.focus(),i.current?.select(),!1)},[t]);let o=e=>{let r=String(Math.min(2**53-1,Math.max(0,(aK(t)??0)+e)));a.current=r!==t,n(r),i.current?.focus(),i.current?.select()};return(0,g.jsxs)(`div`,{className:`mx-0.5 my-0 inline-flex items-stretch overflow-hidden rounded-md bg-surface focus-within:bg-hover`,children:[(0,g.jsx)(`input`,{className:`m-0 box-content w-full max-w-[8ch] min-w-[1ch] flex-[0_1_auto] rounded-md border border-transparent bg-transparent px-1.5 py-0.5 text-center text-foreground [font:inherit] focus:outline-none`,ref:i,type:`text`,inputMode:`numeric`,pattern:`[0-9]+`,required:!0,"aria-label":e,"aria-invalid":aK(t)===null,autoFocus:r,onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{(e.key===`ArrowUp`||e.key===`ArrowDown`)&&(e.preventDefault(),e.stopPropagation(),o(e.key===`ArrowUp`?1:-1))},value:t,style:{width:`${Math.max(1,t.length)}ch`},onChange:e=>{/^[0-9]*$/.test(e.target.value)&&n(e.target.value)}}),(0,g.jsxs)(`div`,{className:`grid grid-rows-[1fr_1fr]`,children:[(0,g.jsx)(X,{className:`rounded-none border-0 bg-transparent px-0.75 py-0 leading-[1] text-muted hover:bg-surface hover:text-foreground`,type:`button`,tabIndex:-1,"aria-label":`Increase ${e.toLowerCase()}`,onMouseDown:e=>e.preventDefault(),onClick:()=>o(1),children:(0,g.jsx)(Qj,{size:`0.625rem`})}),(0,g.jsx)(X,{className:`rounded-none border-0 bg-transparent px-0.75 py-0 leading-[1] text-muted hover:bg-surface hover:text-foreground`,type:`button`,tabIndex:-1,"aria-label":`Decrease ${e.toLowerCase()}`,onMouseDown:e=>e.preventDefault(),onClick:()=>o(-1),children:(0,g.jsx)(Yj,{size:`0.625rem`})})]})]})}function sK({oldOffset:e,newOffset:t,version:n}){let[r,i]=(0,p.useState)(null),a=(0,p.useRef)(null),o=(0,p.useRef)(0);(0,p.useLayoutEffect)(()=>{let e=a.current;e&&(o.current=Math.max(o.current,e.getBoundingClientRect().height),e.style.minHeight=`${o.current}px`)}),(0,p.useEffect)(()=>{if(e===null||t===null)return;let r=new AbortController,a=setTimeout(()=>{oA.lastCommitsPreview(e,t,r.signal).then(a=>{r.signal.aborted||i({oldOffset:e,newOffset:t,version:n,result:a})},a=>{r.signal.aborted||i({oldOffset:e,newOffset:t,version:n,error:a instanceof Error?a.message:String(a)})})},150);return()=>{clearTimeout(a),r.abort()}},[e,t,n]);let s=r?.oldOffset===e&&r.newOffset===t&&r.version===n?r:null,c=e!==null&&t!==null&&!s,l=e===null||t===null?`Enter nonnegative whole numbers to preview commits.`:s?.error??(c?`Loading commit messages…`:null),u=s?.result;return(0,g.jsx)(`div`,{className:`min-h-22`,ref:a,"aria-busy":c,children:l===null?u?(0,g.jsx)(`div`,{className:`mt-1 grid gap-3`,"aria-live":`polite`,children:[[`HEAD~${e}`,u.old],[`HEAD~${t}`,u.new]].map(([e,t],n)=>(0,g.jsxs)(`div`,{children:[(0,g.jsxs)(`div`,{className:`flex justify-between gap-2 font-mono text-[0.6875rem] leading-[1.5] text-muted`,children:[(0,g.jsx)(`span`,{children:e}),t&&(0,g.jsx)(`span`,{title:t.sha,children:t.short})]}),(0,g.jsx)(`p`,{className:`mt-0.5 mb-0 max-h-24 overflow-auto font-sans text-[0.75rem] leading-[1.5] wrap-anywhere whitespace-pre-wrap`,children:t?t.message||`(Empty commit message)`:`Commit unavailable at this offset.`})]},n))}):null:(0,g.jsx)(`p`,{className:Nj(s?.error?`m-0 text-[0.75rem] wrap-anywhere text-del`:`m-0 p-0 text-[0.75rem] whitespace-normal text-muted`),role:`status`,children:l})})}function cK(){let e=Z(e=>e.snapshot),t=Z(e=>e.switchMode),n=Z(e=>e.modeMenuOpen),r=Z(e=>e.setModeMenuOpen),i=Z(e=>e.modePane),a=Z(e=>e.pickModeEntry),o=Z(e=>e.modeEntry),s=Z(e=>e.highlightModeEntry),[c,l]=(0,p.useState)(null),[u,d]=(0,p.useState)(``),[f,m]=(0,p.useState)(`HEAD`),[h,_]=(0,p.useState)(`...`),[v,y]=(0,p.useState)(`1`),[b,x]=(0,p.useState)(`0`),S=Z(e=>e.modeCommit),C=Z(e=>e.setModeCommit),[w,T]=(0,p.useState)(``),[E,D]=(0,p.useState)(!1),[O,k]=(0,p.useState)(null),A=(0,p.useRef)(!1),ee=(0,p.useRef)(0),j=(0,p.useRef)(null),M=(0,p.useRef)(!1);(0,p.useEffect)(()=>{M.current=!1},[n,i]),(0,p.useEffect)(()=>{let e=++ee.current;return()=>{ee.current=e+1}},[n,i]);let N=(0,p.useRef)(null),P=(0,p.useRef)(null),F=(0,p.useRef)(null);(0,p.useEffect)(()=>{if(!n)return;let e=!0;oA.refs().then(t=>{e&&(l(t),d(e=>e||t.defaultBranch||t.branches[0]||`HEAD`))}).catch(t=>{e&&Z.getState().report(`Loading refs`,t)});let t=e=>{N.current?.contains(e.target)||r(!1)};return document.addEventListener(`mousedown`,t),()=>{e=!1,document.removeEventListener(`mousedown`,t)}},[n,r]);let I=e=>{r(!1),nK(),t(e)},te=e=>I({kind:`revspec`,args:[`${e}^!`]}),ne=async()=>{if(A.current)return;A.current=!0,D(!0),k(null);let e=ee.current;try{let n=await t(w.trim()?{kind:`pr`,pr:w.trim()}:{kind:`pr`});if(e!==ee.current)return;n===`applied`?(r(!1),nK()):typeof n==`object`&&(k(n.error),j.current?.focus())}finally{A.current=!1,D(!1)}},re=aK(v),L=aK(b),R=re!==null&&L!==null,z=()=>{d(f),m(u)},B=[{label:`Working`,icon:NM,pane:null},{label:`Two refs…`,icon:gM,pane:`refs`},{label:`Last commits`,icon:LM,pane:`commits`},{label:`PR`,icon:bM,pane:`pr`},{label:`Commit…`,icon:_M,pane:`commit`}];return(0,g.jsxs)(`div`,{className:`relative min-w-28`,ref:N,children:[(0,g.jsxs)(X,{onClick:()=>r(!n),title:`Change what is compared (m)`,"aria-expanded":n,"aria-controls":`mode-picker`,className:`max-w-full font-mono`,children:[(0,g.jsx)(`span`,{className:`truncate`,children:e?ek(e.mode):`…`}),` `,(0,g.jsx)(Yj,{size:`0.875rem`})]}),n&&(0,g.jsxs)(`div`,{className:`absolute top-[calc(100%_+_0.375rem)] left-0 z-20 flex w-max max-w-[calc(100vw_-_2rem)] min-w-60 rounded-[0.625rem] border border-border bg-canvas p-1.5 shadow-[0_0.625rem_1.875rem_rgba(0,_0,_0,_0.18)] max-[640px]:fixed max-[640px]:top-12 max-[640px]:left-2 max-[640px]:max-w-[calc(100vw_-_1rem)]`,id:`mode-picker`,role:`dialog`,"aria-label":`Compare`,children:[(0,g.jsxs)(`div`,{className:`w-60 shrink-0 max-[640px]:w-44`,children:[(0,g.jsx)(`div`,{className:`px-2.5 pt-1 pb-1.5 text-[0.6875rem] font-semibold text-muted`,children:`Compare`}),B.map((e,t)=>(0,g.jsxs)(X,{className:Nj(`grid min-h-8.5 w-full grid-cols-[1.125rem_1fr_auto_1.5rem] items-center gap-2.5 rounded-[0.4375rem] border-0 bg-transparent px-2.5 py-1.75 text-left font-sans text-[0.8125rem] leading-[1.3] text-foreground [&_kbd]:ml-1 [&_kbd]:justify-self-end [&_kbd]:text-muted [&>svg]:text-muted ${o===t+1?`bg-hover hover:bg-hover`:`hover:bg-transparent`} ${e.pane&&i===e.pane?`[&>span:first-of-type]:font-semibold [&>svg]:text-accent`:``}`),"aria-expanded":e.pane?i===e.pane:void 0,"aria-controls":e.pane?`mode-config`:void 0,"data-mode-entry":t+1,"data-highlighted":o===t+1||void 0,onPointerMove:()=>s(t+1),onFocus:()=>s(t+1),onClick:e=>{M.current=e.detail>0,a(t+1)},children:[(0,g.jsx)(e.icon,{size:`0.875rem`}),(0,g.jsx)(`span`,{className:`whitespace-nowrap`,children:e.label}),(0,g.jsx)(`kbd`,{children:t+1}),e.pane?(0,g.jsx)(Zj,{size:`0.875rem`}):(0,g.jsx)(`span`,{})]},e.label))]}),i&&(0,g.jsxs)(`form`,{className:`ml-1.5 flex w-76 min-w-0 flex-col gap-3 border-l border-l-border px-3 pt-0 pb-2`,id:`mode-config`,"aria-label":B.find(e=>e.pane===i)?.label,onKeyDown:e=>{i!==`refs`||e.key!==`x`||e.ctrlKey||e.metaKey||e.altKey||e.target.closest(`input, textarea, select, [contenteditable]`)||(e.preventDefault(),e.stopPropagation(),e.repeat||z())},onSubmit:e=>{e.preventDefault(),i===`refs`&&u.trim()&&f.trim()&&I({kind:`revspec`,args:[`${u.trim()}${h}${f.trim()}`]}),i===`commits`&&R&&I(YN(re,L)),i===`pr`&&ne(),i===`commit`&&S.trim()&&te(S.trim())},children:[i===`pr`&&(0,g.jsx)(`div`,{className:`pt-1 pb-1.5 text-[0.6875rem] font-semibold text-muted`,children:`Pull request`}),i===`refs`&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-1.5 pt-1.5 font-mono text-[0.8125rem] leading-[1.5]`,children:[(0,g.jsx)(iK,{label:`Base ref`,value:u,onChange:d,refs:c,autoFocus:!M.current,onAccept:()=>P.current?.focus()}),(0,g.jsx)(`span`,{children:h}),(0,g.jsx)(iK,{label:`Target ref`,value:f,onChange:m,refs:c,inputRef:P,onAccept:()=>F.current?.focus()})]}),(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsxs)(QW,{className:`self-start focus-visible:outline-2 focus-visible:outline-offset-[2px] focus-visible:outline-accent focus-visible:outline-solid`,ref:F,role:`group`,"aria-label":`Comparison: ${h===`..`?`Direct`:`Merge base`}. Space to toggle.`,tabIndex:0,onKeyDown:e=>{if(e.key===`Enter`){e.preventDefault(),e.stopPropagation(),e.repeat||e.currentTarget.closest(`form`)?.requestSubmit();return}e.key===` `&&(e.preventDefault(),e.stopPropagation(),e.repeat||_(e=>e===`..`?`...`:`..`))},children:[(0,g.jsx)($W,{type:`button`,selected:h===`...`,tabIndex:-1,onClick:()=>_(`...`),children:`Merge base`}),(0,g.jsx)($W,{type:`button`,selected:h===`..`,tabIndex:-1,onClick:()=>_(`..`),children:`Direct`})]}),(0,g.jsx)(X,{id:`swap-refs`,className:`border-0 bg-transparent p-0.5 text-muted hover:bg-hover hover:text-foreground`,type:`button`,tabIndex:-1,"aria-label":`Swap refs`,"aria-keyshortcuts":`x`,title:`Swap refs (x)`,onClick:z,children:(0,g.jsx)(Gj,{size:`0.75rem`})})]}),(0,g.jsx)(`p`,{className:`m-0 p-0 text-[0.75rem] whitespace-normal text-muted`,children:h===`..`?`Compare these two revisions.`:`Compare changes since their common ancestor.`})]}),i===`commits`&&(0,g.jsxs)(`div`,{className:`flex flex-col gap-2 pt-1.5`,children:[(0,g.jsxs)(`div`,{className:`flex items-baseline font-mono text-[0.8125rem] leading-[1.5]`,children:[(0,g.jsx)(`span`,{children:`HEAD~`}),(0,g.jsx)(oK,{label:`Base offset`,value:v,onChange:y,autoFocus:!0}),(0,g.jsx)(`span`,{children:`..HEAD~`}),(0,g.jsx)(oK,{label:`Target offset`,value:b,onChange:x})]}),(0,g.jsx)(sK,{oldOffset:re,newOffset:L,version:e?.version??0})]}),i===`commit`&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-1.5 pt-1.5 font-mono text-[0.8125rem] leading-[1.5]`,children:[(0,g.jsx)(iK,{label:`Commit`,value:S,onChange:C,refs:c,worktree:!1,autoFocus:!M.current,onAccept:te}),(0,g.jsx)(`span`,{children:`^!`})]}),(0,g.jsx)(`p`,{className:`m-0 p-0 text-[0.75rem] whitespace-normal text-muted`,children:`Show this commit against its first parent.`})]}),i===`pr`&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`label`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,g.jsx)(`span`,{className:`text-[0.75rem] text-muted`,children:`PR number or URL`}),(0,g.jsx)(`input`,{className:`w-full min-w-0 rounded-md border border-border bg-surface px-2 py-1.5 font-mono text-[0.75rem] leading-[normal] text-foreground`,ref:j,autoFocus:!0,autoComplete:`off`,spellCheck:!1,readOnly:E,"aria-describedby":O?`pr-hint pr-error`:`pr-hint`,"aria-invalid":O?!0:void 0,value:w,onChange:e=>{T(e.target.value),k(null)},placeholder:`Current branch’s PR`})]}),(0,g.jsx)(`p`,{className:`m-0 p-0 text-[0.75rem] whitespace-normal text-muted`,id:`pr-hint`,children:`Enter a PR number or URL, or leave blank for this branch.`}),O&&(0,g.jsx)(`p`,{className:`m-0 text-[0.75rem] wrap-anywhere text-del`,id:`pr-error`,role:`alert`,children:O})]}),(0,g.jsx)(X,{className:`mt-auto self-end`,variant:`primary`,type:`submit`,"aria-live":i===`pr`?`polite`:void 0,"aria-busy":i===`pr`&&E,disabled:i===`pr`?E:i===`refs`?!u.trim()||!f.trim():i===`commit`?!S.trim():!R,children:i===`pr`?E?`Loading PR…`:`Show PR`:i===`commit`?`Show commit`:`Compare`})]})]})]})}function lK(){let e=Z(e=>e.snapshot),t=Z(e=>e.moved),n=Z(e=>e.reload);return!e||!t?null:(0,g.jsxs)(`span`,{role:`status`,className:`inline-flex min-w-0 items-center gap-2 rounded-md border border-border bg-hover py-0.5 pr-0.5 pl-2 text-[0.8125rem]`,children:[(0,g.jsx)(`span`,{className:`truncate font-mono text-[0.75rem]`,children:ZN(e,t)}),(0,g.jsxs)(X,{variant:`primary`,onClick:()=>void n(),title:`Recompute the review where the refs point now`,children:[(0,g.jsx)(FM,{size:`0.875rem`}),` Reload`]})]})}var uK=[[`on`,`Always`],[`auto`,`Auto (not on branches)`],[`off`,`Never`]];function dK({onClose:e}){let t=Z(e=>e.config),n=Z(e=>e.saveConfig),[r,i]=(0,p.useState)(t.autoViewed.join(`
|
|
1629
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return rH(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=eU.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function uU(){return{exit:{taskListCheckValueChecked:fU,taskListCheckValueUnchecked:fU,paragraph:pU}}}function dU(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:mU}}}function fU(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function pU(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function mU(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=eU.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function hU(){return[xV(),GV(),XV(),tU(),uU()]}function gU(e){return{extensions:[SV(),KV(e),ZV(),lU(e),dU()]}}var _U={tokenize:jU,partial:!0},vU={tokenize:MU,partial:!0},yU={tokenize:NU,partial:!0},bU={tokenize:PU,partial:!0},xU={tokenize:FU,partial:!0},SU={name:`wwwAutolink`,tokenize:kU,previous:IU},CU={name:`protocolAutolink`,tokenize:AU,previous:LU},wU={name:`emailAutolink`,tokenize:OU,previous:RU},TU={};function EU(){return{text:TU}}for(var DU=48;DU<123;)TU[DU]=wU,DU++,DU===58?DU=65:DU===91&&(DU=97);TU[43]=wU,TU[45]=wU,TU[46]=wU,TU[95]=wU,TU[72]=[wU,CU],TU[104]=[wU,CU],TU[87]=[wU,SU],TU[119]=[wU,SU];function OU(e,t,n){let r=this,i,a;return o;function o(t){return!zU(t)||!RU.call(r,r.previous)||BU(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return zU(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(xU,u,l)(t):t===45||t===95||yI(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&vI(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function kU(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!IU.call(r,r.previous)||BU(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(_U,e.attempt(vU,e.attempt(yU,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function AU(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&LU.call(r,r.previous)&&!BU(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(vI(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||xI(t)||EI(t)||kI(t)||OI(t)?n(t):e.attempt(vU,e.attempt(yU,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function jU(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function MU(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(bU,c,s)(t):t===null||EI(t)||kI(t)||t!==45&&OI(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function NU(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(bU,t,a)(o):o===null||EI(o)||kI(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function PU(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||EI(o)||kI(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||EI(e)||kI(e)?t(e):r(e)}function a(e){return vI(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):vI(t)?(e.consume(t),o):n(t)}}function FU(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return yI(e)?n(e):t(e)}}function IU(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||EI(e)}function LU(e){return!vI(e)}function RU(e){return!(e===47||zU(e))}function zU(e){return e===43||e===45||e===46||e===95||yI(e)}function BU(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var VU={tokenize:YU,partial:!0};function HU(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:KU,continuation:{tokenize:qU},exit:JU}},text:{91:{name:`gfmFootnoteCall`,tokenize:GU},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:UU,resolveTo:WU}}}}function UU(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=_I(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function WU(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function GU(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||EI(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(_I(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return EI(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function KU(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||EI(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=_I(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return EI(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),MI(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function qU(e,t,n){return e.check(qI,t,e.attempt(VU,t,n))}function JU(e){e.exit(`gfmFootnoteDefinition`)}function YU(e,t,n){let r=this;return MI(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function XU(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&uI(o,o.length,0,BI(s,e.slice(r+1,n),t)),uI(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),uI(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=zI(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=zI(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var ZU=class{constructor(){this.map=[]}add(e,t,n){QU(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function QU(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function $U(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function eW(){return{flow:{null:{name:`table`,tokenize:tW,resolveAll:nW}}}}function tW(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):TI(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):DI(t)?MI(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||EI(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,DI(t)?MI(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return DI(t)?MI(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||TI(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return DI(t)?MI(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||TI(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||TI(n)?(e.exit(`tableRow`),t(n)):DI(n)?MI(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||EI(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function nW(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new ZU;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(iW(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=rW(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=rW(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=rW(f,t,o,i,n,d)):(o[0]=o[1],d=rW(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&iW(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=$U(t.events,n))}return e}function rW(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},aW(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=aW(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=aW(t.events,n[2]),a=aW(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},aW(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function iW(e,t,n,r,i){let a=[],o=aW(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function aW(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var oW={name:`tasklistCheck`,tokenize:cW};function sW(){return{text:{91:oW}}}function cW(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return EI(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return TI(r)?t(r):DI(r)?e.check({tokenize:lW},t,n)(r):n(r)}}function lW(e,t,n){return MI(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function uW(e){return pI([EU(),HU(),XU(e),eW(),sW()])}var dW={};function fW(e){let t=this,n=e||dW,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(uW(n)),a.push(hU()),o.push(gU(n))}var pW=200;function mW(e){return e===`system`?typeof matchMedia==`function`&&matchMedia(`(prefers-color-scheme: dark)`).matches:e===`dark`}async function hW(e,t,n){return gW(e,xd(t),n)}async function gW(e,t,n){let r=mW(n)?KP.dark:KP.light,i=await fd({themes:[KP.dark,KP.light],langs:[t]});return e.map(e=>{try{let[n=[]]=i.codeToTokensBase(e,{lang:t,theme:r});return n.map(e=>({text:e.content,color:e.color}))}catch{return[{text:e}]}})}var _W=()=>new Promise(e=>setTimeout(e,0));function vW(e,t,n=0){let[r,i]=(0,p.useState)(()=>({items:e,map:new Map})),a=(0,p.useRef)(n);return a.current=n,(0,p.useEffect)(()=>{let n=!1;i(t=>t.items===e?t:{items:e,map:new Map});let r=[];e.forEach((e,t)=>{let n=r[r.length-1];n&&n.path===e.path?(n.lines.push(e.text),n.last=t):r.push({path:e.path,lines:[e.text],first:t,last:t})});let o=e=>{let t=a.current;return t<e.first?e.first-t:t>e.last?t-e.last:0};return(async()=>{let a=[...r];for(;a.length>0&&!n;){let r=0;for(let e=1;e<a.length;e++)o(a[e])<o(a[r])&&(r=e);let[s]=a.splice(r,1),{path:c,lines:l}=s,u=[];for(let e=0;e<l.length&&!n;e+=pW){let n=l.slice(e,e+pW);u.push(...await hW(n,c,t).catch(()=>n.map(e=>[{text:e}]))),await _W()}if(n)return;i(t=>{if(t.items!==e)return t;let n=new Map(t.map);return u.forEach((e,t)=>n.set(`${c}\n${l[t]}`,e)),{items:t.items,map:n}})}})(),()=>{n=!0}},[e,t]),r.items===e?r.map:new Map}function yW({code:e,lang:t,theme:n}){let[r,i]=(0,p.useState)(null),a=(0,p.useMemo)(()=>e.replace(/\n$/,``).split(`
|
|
1630
|
+
`),[e]);return(0,p.useEffect)(()=>{let e=!0;return i(null),gW(a,t,n).then(t=>e&&i(t)).catch(()=>{}),()=>{e=!1}},[a,t,n]),(0,g.jsx)(g.Fragment,{children:a.map((e,t)=>(0,g.jsxs)(`span`,{children:[(0,g.jsx)(bW,{tokens:r?.[t],fallback:e}),`
|
|
1631
|
+
`]},t))})}function bW({tokens:e,fallback:t}){return e?(0,g.jsx)(g.Fragment,{children:e.map((e,t)=>(0,g.jsx)(`span`,{style:e.color?{color:e.color}:void 0,children:e.text},t))}):(0,g.jsx)(g.Fragment,{children:t})}function xW({text:e,path:t,quoted:n,highlight:r=!1}){let i=(0,p.useMemo)(()=>({pre:e=>(0,g.jsx)(SW,{...e,path:t,quoted:n,highlight:r}),a:jW}),[t,n,r]);return(0,g.jsx)(`div`,{className:`markdown`,children:(0,g.jsx)(lV,{remarkPlugins:[fW],components:i,urlTransform:AW,disallowedElements:[`img`],unwrapDisallowed:!0,children:e})})}function SW({children:e,node:t,path:n,quoted:r,highlight:i,...a}){let o=Z(e=>e.theme),s=(Array.isArray(e)?e[0]:e)?.props,c=/language-(\S+)/.exec(s?.className??``)?.[1];if(i&&c!==`suggestion`){let e=c??(n?xd(n):void 0);if(e)return(0,g.jsx)(`pre`,{...a,children:(0,g.jsx)(`code`,{className:s?.className,children:(0,g.jsx)(yW,{code:OW(s?.children),lang:e,theme:o})})})}if(c===`suggestion`){if(n!=null){let e=DW(OW(s?.children).replace(/\n$/,``)),t=r==null?void 0:DW(r);return(0,g.jsxs)(`div`,{className:`suggestion highlighted`,title:`Suggested replacement for the quoted lines`,children:[(0,g.jsx)(`span`,{className:`tag`,children:`Suggested change`}),t==null||e!==``&&t===e?(0,g.jsx)(CW,{path:n,source:e}):(0,g.jsx)(wW,{path:n,quoted:t,source:e})]})}return(0,g.jsxs)(`pre`,{...a,className:`suggestion`,title:`Suggested replacement for the quoted lines`,children:[(0,g.jsx)(`span`,{className:`tag`,children:`Suggested change`}),e]})}return(0,g.jsx)(`pre`,{...a,children:e})}function CW({path:e,source:t}){let n=Z(e=>e.theme),r=(0,p.useMemo)(()=>({name:e,contents:t,cacheKey:EW(`file`,e,t)}),[e,t]),i=(0,p.useMemo)(()=>({theme:KP,themeType:n,disableFileHeader:!0,disableLineNumbers:!0,overflow:`wrap`}),[n]),a=(0,p.useCallback)(e=>e.primeFileHighlightCache(r),[r]);return(0,g.jsx)(Gy,{file:r,options:i},TW(a))}function wW({path:e,quoted:t,source:n}){let r=Z(e=>e.theme),i=(0,p.useMemo)(()=>$m({name:e,contents:`${t}\n`,cacheKey:EW(`old`,e,t)},{name:e,contents:n===``?``:`${n}\n`,cacheKey:EW(`new`,e,n)}),[e,t,n]),a=(0,p.useMemo)(()=>({theme:KP,themeType:r,diffStyle:`unified`,diffIndicators:`classic`,expandUnchanged:!0,disableFileHeader:!0,disableLineNumbers:!0,overflow:`wrap`}),[r]),o=(0,p.useCallback)(e=>e.primeDiffHighlightCache(i),[i]);return(0,g.jsx)(Yy,{fileDiff:i,options:a},TW(o))}function TW(e){let t=Z(e=>e.theme),n=Zp(),[r,i]=(0,p.useState)(0);return(0,p.useEffect)(()=>{let t=!0;return n&&e(n).then(()=>t&&i(e=>e+1)).catch(()=>{}),()=>{t=!1}},[n,e,t]),`${t}:${r}`}function EW(...e){return JSON.stringify([`suggestion`,...e])}function DW(e){return e.replace(/\r$/gm,``)}function OW(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(OW).join(``);let t=e?.props?.children;return t==null?``:OW(t)}var kW=/^diffle:([^#]*)(?:#L(\d+))?$/;function AW(e){return kW.test(e)?e:pV(e)}function jW({node:e,href:t,children:n,...r}){let i=kW.exec(t??``);return i?(0,g.jsx)(`a`,{...r,href:t,onClick:e=>{e.preventDefault(),Z.getState().goToLink(decodeURI(i[1]),i[2]==null?void 0:Number(i[2]))},children:n}):(0,g.jsx)(`a`,{...r,href:t,target:`_blank`,rel:`noreferrer`,children:n})}function MW({text:e}){let t=(0,p.useRef)(null),n=(0,p.useRef)(null),r=(0,p.useRef)(null),[i,a]=(0,p.useState)(e||``);return e&&e!==i&&a(e),(0,p.useLayoutEffect)(()=>{let i=t.current,a=e?n.current.getBoundingClientRect().width:0,o=i.style.width?i.getBoundingClientRect().width:r.current;if(r.current=a,o===null||matchMedia(`(prefers-reduced-motion: reduce)`).matches){i.style.width=e?``:`0px`;return}i.style.width=`${o}px`,i.offsetWidth,i.style.width=`${a}px`},[e,i]),(0,g.jsx)(`span`,{ref:t,"aria-hidden":!e||void 0,className:`-ml-1.25 inline-block overflow-hidden [transition:width_180ms_cubic-bezier(0.2,0.8,0.2,1)]`,onTransitionEnd:n=>{n.propertyName===`width`&&e&&(t.current.style.width=``)},children:(0,g.jsx)(`span`,{ref:n,className:`inline-block pl-1.25 whitespace-nowrap`,children:e||i})})}function NW(e){let[t,n]=(0,p.useState)(!1);return(0,p.useEffect)(()=>{if(!t)return;let e=setTimeout(()=>n(!1),3e3);return()=>clearTimeout(e)},[t]),{armed:t,fire:()=>{if(!t){n(!0);return}n(!1),e()}}}var PW=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`}),FW=new Intl.DateTimeFormat(void 0,{dateStyle:`full`,timeStyle:`long`}),IW=5,LW=250,RW=1400;function zW({snapshot:e}){let{mode:t,commits:n}=e,r=Z(e=>e.focusCommit),i=Z(e=>e.showPair),a=Z(e=>e.stepCommit),o=t.interdiff??null,[s,c]=(0,p.useState)((o?o.pairs.length:n.total)<=IW),[l,u]=(0,p.useState)(null),d=(0,p.useRef)(void 0),f=(0,p.useRef)(null),m=(0,p.useId)(),h=t.within??(t.base===`parent`?null:t),_=t.pair?t.pair.new:t.base===`parent`?t.new:null,v=_===null&&!o,y=n.total-n.list.length;(0,p.useEffect)(()=>{let e=f.current?.querySelector(`[aria-current="true"]`);e?.scrollIntoView({block:`nearest`}),f.current?.contains(document.activeElement)&&document.activeElement!==e&&(e?.matches(`button`)?e:e?.querySelector(`button`))?.focus({preventScroll:!0})},[_,s]),(0,p.useEffect)(()=>()=>clearTimeout(d.current),[]);let b=(e,t)=>{clearTimeout(d.current),d.current=setTimeout(()=>u({commit:e,row:t.getBoundingClientRect()}),LW)},x=()=>{clearTimeout(d.current),u(null)},S=(e,t,n,r)=>(0,g.jsxs)(X,{variant:`ghost`,className:Ij(`w-full gap-2 rounded-none py-1 pr-2.5 pl-2 text-left leading-[1.125rem] outline-none focus-visible:bg-hover`,e&&`bg-accent/12 shadow-[inset_2px_0_0_var(--accent)] hover:bg-accent/12`),"aria-current":e?`true`:void 0,onClick:t,children:[(0,g.jsx)(DM,{size:`0.8125rem`,className:e?`text-accent`:`text-muted`}),(0,g.jsx)(`span`,{className:Ij(`flex-none`,e&&`font-semibold`),children:n}),(0,g.jsx)(`span`,{className:`min-w-0 truncate font-mono text-[0.75rem] text-muted`,children:r})]});return(0,g.jsxs)(`section`,{className:`flex max-h-[40%] shrink-0 flex-col border-b border-b-border text-[0.8125rem]`,"aria-label":`Commits`,children:[(0,g.jsxs)(`div`,{className:`flex min-h-10 flex-none items-center gap-0.5 pr-1.5`,children:[(0,g.jsxs)(X,{variant:`ghost`,className:`min-w-0 flex-1 gap-1.5 self-stretch rounded-none px-2.5 py-1.5 text-left font-semibold`,"aria-expanded":s,title:s?`Collapse the commits`:`Expand the commits`,onClick:()=>c(!s),children:[(0,g.jsx)(yM,{size:`0.9375rem`}),` Commits`,(0,g.jsx)(`span`,{className:`rounded-[0.625rem] bg-hover px-1.75 py-0 font-medium text-muted`,children:o?o.pairs.length:n.total})]}),h&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(X,{variant:`ghost`,icon:!0,disabled:fP(e,-1)===void 0,onClick:()=>a(-1),title:`Older commit (<)`,"aria-label":`Older commit`,children:(0,g.jsx)(Qj,{size:`0.875rem`})}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,disabled:fP(e,1)===void 0,onClick:()=>a(1),title:`Newer commit (>)`,"aria-label":`Newer commit`,children:(0,g.jsx)(tM,{size:`0.875rem`})})]})]}),s&&(0,g.jsxs)(`div`,{ref:f,className:`min-h-0 overflow-auto pb-1.5`,onScroll:x,children:[h&&S(v,()=>r(null),`All changes`,tk(h)),o&&S(_===null,()=>i(null),o.from.iteration==null?`Since ${nk(o.from)}`:`Since #${o.from.iteration}`,`${o.pairs.filter(e=>e.status!==`identical`).length} of ${o.pairs.length} commits differ`),(0,g.jsx)(`ol`,{className:`m-0 list-none p-0`,children:o?o.pairs.toReversed().map(e=>{let t=e.new??e.old;return(0,g.jsx)(VW,{pair:e,active:e.new!=null&&e.new.sha===_,described:l?.commit.sha===t.sha?m:void 0,onPick:e.new&&e.status!==`identical`?()=>i(e.new.sha):void 0,onHover:e=>b(t,e),onLeave:x},`${e.old?.sha??`-`}:${e.new?.sha??`-`}`)}):n.list.toReversed().map(e=>(0,g.jsx)(HW,{commit:e,rail:n.list.length>1,active:e.sha===_,described:l?.commit.sha===e.sha?m:void 0,onPick:h?()=>r(e.sha):void 0,onHover:t=>b(e,t),onLeave:x},e.sha))}),!o&&y>0&&(0,g.jsxs)(`p`,{className:`m-0 px-2.5 py-1 text-[0.75rem] text-muted`,children:[y,` older `,y===1?`commit`:`commits`,` not shown`]})]}),l&&l.commit.sha!==_&&(0,g.jsx)(KW,{id:m,commit:l.commit,row:l.row})]})}var BW={identical:{glyph:`=`,label:`identical`,className:`text-muted`},changed:{glyph:`!`,label:`amended`,className:`text-accent`},message:{glyph:`!`,label:`reworded`,className:`text-accent`},added:{glyph:`+`,label:`added`,className:`text-add`},dropped:{glyph:`−`,label:`dropped`,className:`text-del`}};function VW({pair:e,active:t,described:n,onPick:r,onHover:i,onLeave:a}){let o=BW[e.status],s=e.new??e.old,c=e.old&&e.new&&e.old.message!==e.new.message,l=(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{"aria-hidden":!0,className:Ij(`w-2 flex-none text-center font-mono font-bold`,o.className),children:o.glyph}),(0,g.jsx)(`span`,{className:Ij(`min-w-0 flex-1`,t?`font-semibold wrap-anywhere`:`truncate`),children:WW(s)}),(0,g.jsx)(`span`,{className:Ij(`flex-none text-[0.75rem]`,o.className),children:o.label})]});return(0,g.jsxs)(`li`,{className:Ij(`group relative`,t?`bg-accent/12 shadow-[inset_2px_0_0_var(--accent)]`:r&&`hover:bg-hover`,!r&&`opacity-70`),"aria-current":t?`true`:void 0,onPointerEnter:e=>i(e.currentTarget),onPointerLeave:a,children:[(0,g.jsxs)(`div`,{className:`flex items-start pr-1.5`,children:[r?(0,g.jsx)(X,{variant:`ghost`,className:Ij(`min-w-0 flex-1 items-start gap-2 rounded-none py-1 pr-1 pl-2.5 text-left leading-[1.125rem] outline-none hover:bg-transparent`,!t&&`focus-visible:bg-hover`),"aria-describedby":n,onClick:r,children:l}):(0,g.jsx)(`div`,{className:`flex min-w-0 flex-1 items-start gap-2 py-1 pr-1 pl-2.5 leading-[1.125rem]`,children:l}),(0,g.jsxs)(`span`,{className:`flex flex-none items-center font-mono text-[0.75rem] text-muted`,children:[e.old?(0,g.jsx)(UW,{commit:e.old}):(0,g.jsx)(`span`,{className:`px-1`,children:`———————`}),(0,g.jsx)(`span`,{"aria-hidden":!0,children:`→`}),e.new?(0,g.jsx)(UW,{commit:e.new}):(0,g.jsx)(`span`,{className:`px-1`,children:`———————`})]})]}),t&&(0,g.jsxs)(`div`,{className:`pr-2.5 pb-1.5 pl-6.5`,children:[(0,g.jsx)(GW,{commit:s}),c&&e.old&&(0,g.jsxs)(`div`,{className:`mt-1 border-l-2 border-border pl-2 text-muted`,children:[(0,g.jsx)(`div`,{className:`text-[0.75rem] font-semibold`,children:`Previous message`}),(0,g.jsx)(`div`,{className:`wrap-anywhere`,children:WW(e.old)}),dP(e.old.message).map((e,t)=>(0,g.jsx)(`p`,{className:`m-0 mt-1 wrap-anywhere whitespace-pre-wrap`,children:e},t))]})]})]})}function HW({commit:e,rail:t,active:n,described:r,onPick:i,onHover:a,onLeave:o}){let s=(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{"aria-hidden":!0,className:Ij(`relative mt-1.25 size-2 flex-none rounded-full border-[1.5px]`,n?`border-accent bg-accent`:`border-muted bg-surface group-hover:bg-hover`)}),(0,g.jsx)(`span`,{className:Ij(`min-w-0 flex-1`,n?`font-semibold wrap-anywhere`:`truncate`),children:WW(e)})]});return(0,g.jsxs)(`li`,{className:Ij(`group relative`,n?`bg-accent/12 shadow-[inset_2px_0_0_var(--accent)]`:`hover:bg-hover`),"aria-current":n?`true`:void 0,onPointerEnter:e=>a(e.currentTarget),onPointerLeave:o,children:[t&&(0,g.jsx)(`span`,{"aria-hidden":!0,className:`absolute top-0 bottom-0 left-[0.8125rem] w-px bg-border group-first:top-[0.8125rem] group-last:bottom-auto group-last:h-[0.8125rem]`}),(0,g.jsxs)(`div`,{className:`flex items-start pr-1.5`,children:[i?(0,g.jsx)(X,{variant:`ghost`,className:Ij(`min-w-0 flex-1 items-start gap-2 rounded-none py-1 pr-1 pl-2.5 text-left leading-[1.125rem] outline-none hover:bg-transparent`,!n&&`focus-visible:bg-hover`),"aria-describedby":r,onClick:i,children:s}):(0,g.jsx)(`div`,{className:`flex min-w-0 flex-1 items-start gap-2 py-1 pr-1 pl-2.5 leading-[1.125rem]`,children:s}),(0,g.jsx)(UW,{commit:e})]}),n&&(0,g.jsx)(`div`,{className:`pr-2.5 pb-1.5 pl-6.5`,children:(0,g.jsx)(GW,{commit:e})})]})}function UW({commit:e}){let[t,n]=(0,p.useState)(!1),r=(0,p.useRef)(void 0);(0,p.useEffect)(()=>()=>clearTimeout(r.current),[]);let i=`[transition:opacity_160ms_ease,transform_200ms_cubic-bezier(0.2,0.8,0.2,1)]`;return(0,g.jsxs)(X,{variant:`ghost`,className:`relative mt-0.5 flex-none px-1 py-px font-mono text-[0.75rem] text-muted hover:text-foreground`,"aria-label":t?`Copied ${e.short}`:`Copy hash ${e.short}`,onClick:async()=>{await QM(e.sha)&&(n(!0),clearTimeout(r.current),r.current=setTimeout(()=>n(!1),RW))},children:[(0,g.jsx)(`span`,{className:Ij(i,t&&`[transform:scale(0.6)] opacity-0`),children:e.short}),(0,g.jsx)(`span`,{"aria-hidden":!0,className:Ij(`absolute inset-0 flex items-center justify-center text-add`,i,t?`[transform:scale(1)_rotate(0)] opacity-100`:`[transform:scale(0.4)_rotate(-30deg)] opacity-0`),children:(0,g.jsx)(Zj,{size:`0.875rem`,strokeWidth:3})})]})}function WW(e){return e.message.split(`
|
|
1632
|
+
`,1)[0]||`(Empty commit message)`}function GW({commit:e,full:t=!1}){let n=(0,g.jsx)(`time`,{className:`flex-none`,dateTime:new Date(e.date).toISOString(),title:FW.format(e.date),children:(t?FW:PW).format(e.date)});return(0,g.jsxs)(`div`,{className:`leading-[1.4]`,children:[dP(e.message).map((e,t)=>(0,g.jsx)(`p`,{className:`m-0 mb-1.5 wrap-anywhere whitespace-pre-wrap text-muted`,children:e},t)),t?(0,g.jsxs)(`div`,{className:`text-[0.75rem] text-muted`,children:[(0,g.jsxs)(`p`,{className:`m-0 wrap-anywhere`,children:[e.author,` <`,e.email,`>`]}),(0,g.jsxs)(`p`,{className:`m-0 flex items-center gap-1.5`,children:[n,(0,g.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,g.jsx)(`span`,{className:`font-mono text-foreground`,children:e.short})]})]}):(0,g.jsxs)(`p`,{className:`m-0 flex min-w-0 items-center gap-1.5 text-[0.75rem] text-muted`,children:[(0,g.jsx)(`span`,{className:`min-w-0 truncate`,title:`${e.author} <${e.email}>`,children:e.author}),(0,g.jsx)(`span`,{"aria-hidden":!0,children:`·`}),n]})]})}function KW({id:e,commit:t,row:n}){let r=(0,p.useRef)(null),[i,a]=(0,p.useState)(n.top);return(0,p.useLayoutEffect)(()=>{let e=r.current?.offsetHeight??0;a(Math.max(8,Math.min(n.top,window.innerHeight-e-8)))},[n]),(0,g.jsxs)(`div`,{ref:r,id:e,role:`tooltip`,className:`pointer-events-none fixed z-40 max-h-[calc(100vh-1rem)] w-[26rem] max-w-[calc(100vw-1rem)] overflow-hidden rounded-lg border border-border bg-canvas px-3 py-2.5 text-[0.8125rem] shadow-[0_0.5rem_1.5rem_rgba(0,_0,_0,_0.18)]`,style:{top:i,right:window.innerWidth-n.left+8},children:[(0,g.jsx)(`p`,{className:`m-0 mb-1.5 leading-[1.4] font-semibold wrap-anywhere`,children:WW(t)}),(0,g.jsx)(GW,{commit:t,full:!0})]})}function qW({snapshot:e}){let t=Z(e=>e.compareIterations),n=Z(e=>e.clearIterations),r=NW(()=>void n()),[i,a]=(0,p.useState)(!0),{iterations:o,mode:s}=e,c=o.at(-1);if(!c||o.length<2)return null;let l=rk(s),u=(e,n)=>{let r=aP(l,c.n,e,n);r&&t(r.from,r.to)},d=e=>{let t=[!1,!0].flatMap(t=>{let n=aP(l,c.n,e,t);return n?[`Compare #${n.from} with #${n.to}${t?` (shift-click)`:``}`]:[]});return t.length?t.join(`
|
|
1633
|
+
`):`Compared now`};return(0,g.jsxs)(`section`,{className:`flex max-h-[30%] shrink-0 flex-col border-b border-b-border text-[0.8125rem]`,"aria-label":`Iterations`,children:[(0,g.jsxs)(`div`,{className:`flex min-h-10 flex-none items-center gap-1.5 pr-1.5`,children:[(0,g.jsxs)(X,{variant:`ghost`,className:`min-w-0 flex-1 gap-1.5 self-stretch rounded-none px-2.5 py-1.5 text-left font-semibold`,"aria-expanded":i,title:i?`Collapse the iterations`:`Expand the iterations`,onClick:()=>a(!i),children:[(0,g.jsx)(BM,{size:`0.9375rem`}),` Iterations`,(0,g.jsx)(`span`,{className:`rounded-[0.625rem] bg-hover px-1.75 py-0 font-medium text-muted`,children:o.length})]}),(0,g.jsxs)(X,{variant:`ghost`,danger:!0,feedback:r.armed?`confirm`:void 0,className:`gap-1 px-1.5 py-px text-[0.75rem] leading-[1.2] font-normal`,title:r.armed?`Click again to forget them`:`Forget the recorded iterations of this range`,onClick:r.fire,children:[(0,g.jsx)(qM,{size:`0.875rem`}),(0,g.jsx)(MW,{text:r.armed&&`Forget all?`})]})]}),i&&(0,g.jsx)(`ol`,{className:`m-0 min-h-0 list-none overflow-auto p-0 pb-1.5`,children:o.toReversed().map(e=>{let t=l?.from===e.n,n=l?.to===e.n,r=l!=null&&l.from<e.n&&e.n<l.to,i=[e.n===c.n&&`latest`,n&&l&&`compared with #${l.from}`,t&&`from here`].filter(e=>!!e);return(0,g.jsx)(JW,{iteration:e,notes:i,from:t,to:n,inside:r,latest:e.n===c.n,title:d(e.n),onPick:t=>u(e.n,t)},e.n)})})]})}function JW({iteration:e,notes:t,from:n,to:r,inside:i,latest:a,title:o,onPick:s}){let c=Z(e=>e.deleteIteration),l=NW(()=>void c(e.n));return(0,g.jsxs)(`li`,{"aria-current":n?`true`:void 0,className:Ij(`group/iteration relative flex items-center pr-1.5`,(n||r)&&`bg-accent/12`,(n||r||i)&&`shadow-[inset_2px_0_0_var(--accent)]`),children:[(0,g.jsx)(X,{variant:`ghost`,className:`min-w-0 flex-1 rounded-none py-1 pr-1 pl-2.5 text-left outline-none hover:bg-transparent focus-visible:bg-hover`,title:o,onClick:e=>s(e.shiftKey),children:(0,g.jsx)(YW,{iteration:e,notes:t,emphasis:n||r})}),(0,g.jsx)(UW,{commit:{sha:e.newSha,short:e.newSha.slice(0,7)}}),(0,g.jsxs)(X,{variant:`ghost`,danger:!0,icon:!l.armed,feedback:l.armed?`confirm`:void 0,disabled:a,tabIndex:a?-1:void 0,"aria-hidden":a||void 0,className:Ij(`px-0.75 py-[1px] text-[0.75rem] leading-[1.2] font-normal opacity-0 group-focus-within/iteration:opacity-100 group-hover/iteration:opacity-100 data-[feedback=confirm]:opacity-100`,a&&`invisible`),title:l.armed?`Click again to forget #${e.n}`:`Forget iteration #${e.n}`,"aria-label":l.armed?`Forget iteration #${e.n}? Click again to confirm`:`Forget iteration #${e.n}`,onClick:l.fire,children:[(0,g.jsx)(qM,{size:`0.75rem`}),(0,g.jsx)(MW,{text:l.armed&&`Forget?`})]})]})}function YW({iteration:e,notes:t,emphasis:n}){return(0,g.jsxs)(`span`,{className:`flex w-full items-baseline gap-2 leading-[1.125rem]`,children:[(0,g.jsxs)(`span`,{className:Ij(`flex-none`,n?`font-semibold`:`font-medium`),children:[`#`,e.n]}),(0,g.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-muted`,children:rP(e.recordedAt)}),t.length>0&&(0,g.jsx)(`span`,{className:`flex-none text-[0.75rem] text-muted`,children:t.join(` · `)})]})}function XW(){let e=Z(e=>e.threads),t=Z(e=>e.showResolved),n=Z(e=>e.setShowResolved),r=Z(e=>e.openFile),i=Z(e=>e.clearThreads),a=Z(e=>e.deleteThread),o=Z(e=>e.deleteStaleThreads),s=Z(e=>e.focusThread),c=Z(e=>e.report),l=Z(e=>e.exportToGithub),u=Z(e=>e.github.data?.reason===null),d=Z(e=>e.snapshot),f=d?iP(d.mode):null,[m,h]=(0,p.useState)(!1),[_,v]=(0,p.useState)(null),[y,b]=(0,p.useState)(null);(0,p.useEffect)(()=>{if(!y)return;let e=setTimeout(()=>b(null),2e3);return()=>clearTimeout(e)},[y]);let x=NW(()=>{h(!0),l().then(b).finally(()=>h(!1))}),S=NW(()=>void i()),C=NW(()=>void o()),w=(0,p.useMemo)(()=>zN({threads:e,showResolved:t}),[e,t]),T=e.filter(e=>!e.resolved),E=e.length-T.length,D=e.filter(e=>e.stale).length,O=(0,p.useMemo)(()=>{let e=new Map;for(let t of[...w].sort($W)){let n=e.get(t.anchor.path)??[];n.push(t),e.set(t.anchor.path,n)}return[...e.entries()]},[w]),k=async()=>{let e;try{e=await lA.exportComments()}catch(e){return c(`Copying comments`,e),!1}return await QM(e)?!0:(v(e),!1)};return(0,g.jsxs)(`aside`,{className:`flex min-h-0 flex-col bg-surface`,children:[d&&d.commits.total>0&&(0,g.jsx)(zW,{snapshot:d},(d.mode.within??d.mode).commentKey),d&&(0,g.jsx)(qW,{snapshot:d}),(0,g.jsxs)(`div`,{className:`flex min-h-10 items-center gap-1.5 border-b border-b-border px-2.5 py-1.5 [&_button]:flex-none [&_button]:px-2 [&_button]:whitespace-nowrap`,children:[(0,g.jsxs)(`span`,{className:`mr-auto inline-flex min-w-0 items-center gap-1.5 truncate font-semibold`,children:[(0,g.jsx)(jM,{size:`0.9375rem`}),` Threads`,T.length>0&&(0,g.jsx)(`span`,{className:`rounded-[0.625rem] bg-hover px-1.75 py-0 font-medium text-muted`,children:T.length})]}),(0,g.jsx)(QW,{label:`All`,icon:(0,g.jsx)(aM,{size:`0.875rem`}),primary:!0,disabled:T.length===0,title:`Copy all open threads as a prompt (yy)`,onCopy:()=>k()}),u&&(0,g.jsxs)(X,{variant:`ghost`,icon:!x.armed&&!y,feedback:x.armed?`confirm`:y?`posted`:void 0,disabled:m||T.length===0&&!y,title:x.armed?`Click again to add all open threads to the pending review`:`Add all open threads to a pending review on the GitHub pull request; you submit it on GitHub`,"aria-label":x.armed?`Add all open threads to the pending review? Click again to confirm`:`Add all open threads to a pending review on the GitHub pull request`,onClick:x.fire,children:[y?(0,g.jsx)(Zj,{size:`0.875rem`}):(0,g.jsx)(SM,{size:`0.875rem`}),(0,g.jsx)(MW,{text:x.armed?`Add all?`:y&&$N(y)})]}),(0,g.jsxs)(X,{variant:`ghost`,danger:!0,icon:!S.armed,feedback:S.armed?`confirm`:void 0,disabled:e.length===0,title:S.armed?`Click again to delete all threads`:`Delete all threads for this mode`,onClick:S.fire,children:[(0,g.jsx)(qM,{size:`0.875rem`}),(0,g.jsx)(MW,{text:S.armed&&`Delete all?`})]})]}),D>0&&(0,g.jsxs)(`div`,{className:`flex cursor-default items-center gap-1.5 border-b border-b-border px-2.5 py-1 text-[0.75rem] text-warn`,title:`Stale threads no longer point into the diff: their text changed or left the changed lines`,children:[(0,g.jsx)(JM,{size:`0.75rem`}),D,` stale`,(0,g.jsxs)(X,{variant:`ghost`,danger:!0,feedback:C.armed?`confirm`:void 0,className:`ml-auto gap-1 px-1.5 py-px text-[0.75rem] leading-[1.2]`,onClick:C.fire,children:[(0,g.jsx)(qM,{size:`0.75rem`}),(0,g.jsx)(MW,{text:C.armed?`Delete stale?`:`Delete`})]})]}),E>0&&(0,g.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-1.5 border-b border-b-border px-2.5 py-1 text-[0.75rem] text-muted`,title:`Resolved threads are kept but left out of the prompt`,children:[(0,g.jsx)(`input`,{type:`checkbox`,checked:t,onChange:e=>n(e.target.checked)}),`Show `,E,` resolved`]}),(0,g.jsxs)(`div`,{className:`flex flex-1 flex-col gap-3.5 overflow-auto p-2.5`,children:[O.length===0&&(0,g.jsxs)(`div`,{className:`px-3 py-6 text-center text-muted [&>p]:mt-0 [&>p]:mr-0 [&>p]:mb-1.5 [&>p]:ml-0`,children:[(0,g.jsx)(`p`,{children:e.length?`Every thread is resolved.`:`No comments yet.`}),(0,g.jsx)(`p`,{children:f??`Click a line number to comment, drag across line numbers for a block, or press C for a whole file.`})]}),O.map(([e,t])=>(0,g.jsxs)(`section`,{className:`border-0 [&+section]:border-t [&+section]:border-solid [&+section]:border-border [&+section]:pt-3`,children:[(0,g.jsx)(`h4`,{className:`m-0 mb-1.5 font-mono text-[0.75rem] leading-[1.4] text-muted`,children:(0,g.jsx)(lF,{path:e})}),t.map(e=>(0,g.jsx)(ZW,{thread:e,openFile:r,focusThread:s,deleteThread:a},e.id))]},e))]}),_&&(0,g.jsxs)(Lj,{label:`Copy manually`,onClose:()=>v(null),children:[(0,g.jsx)(`h3`,{className:`m-0 mb-2`,children:`Copy manually`}),(0,g.jsx)(`p`,{className:`m-0 mb-2 text-muted`,children:`The browser blocked clipboard access. Select the text below and press Ctrl/⌘+c.`}),(0,g.jsx)(`textarea`,{className:`min-h-40 w-full rounded-md border border-border bg-surface p-2 font-mono text-[0.75rem]`,readOnly:!0,value:_,autoFocus:!0,onFocus:e=>e.currentTarget.select()}),(0,g.jsx)(`div`,{className:`mt-2.5 flex justify-end gap-1.5`,children:(0,g.jsx)(X,{onClick:()=>v(null),children:`Close`})})]})]})}var ZW=(0,p.memo)(function({thread:e,openFile:t,focusThread:n,deleteThread:r}){let i=e.messages[0],a=NW(()=>void r(e.id)),o=()=>{e.anchor.kind===`line`?t(e.anchor.path,e.anchor.endLine,e.anchor.side):t(e.anchor.path),n(e.id)};return(0,g.jsxs)(`div`,{role:`button`,tabIndex:0,className:Ij(`group/thread mb-2 block w-full cursor-pointer overflow-hidden rounded-md border border-border bg-card p-0 text-left font-sans text-[0.8125rem] leading-[1.4] text-foreground shadow-card [transition:border-color_120ms_ease] hover:border-accent focus-visible:outline-2 focus-visible:outline-offset-[1px] focus-visible:outline-accent focus-visible:outline-solid ${e.stale?`border-dashed`:``} ${e.resolved?`opacity-65`:``}`),onClick:o,onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),o())},children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-b-border bg-hover py-1 pr-1.5 pl-2.5 text-[0.75rem] text-muted [&>svg]:flex-none [&>svg]:text-accent`,children:[(0,g.jsx)(jM,{size:`0.8125rem`}),(0,g.jsx)(`span`,{className:`font-mono font-semibold text-foreground`,children:BN(e.anchor)}),e.messages.length>1&&(0,g.jsxs)(`span`,{className:`text-muted`,children:[e.messages.length-1,` repl`,e.messages.length===2?`y`:`ies`]}),e.stale&&(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-0.75 font-sans text-[0.6875rem] leading-[normal] text-warn`,children:[(0,g.jsx)(JM,{size:`0.6875rem`}),` stale`]}),e.resolved&&(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-0.75 font-sans text-[0.6875rem] leading-[normal] text-add`,children:[(0,g.jsx)(Zj,{size:`0.6875rem`}),` resolved`]}),(0,g.jsxs)(X,{type:`button`,variant:`ghost`,danger:!0,icon:!a.armed,feedback:a.armed?`confirm`:void 0,className:`ml-auto px-0.75 py-[1px] opacity-0 group-focus-within/thread:opacity-100 group-hover/thread:opacity-100 data-[feedback=confirm]:opacity-100`,title:a.armed?`Click again to delete this thread`:`Delete this thread`,"aria-label":a.armed?`Delete this thread? Click again to confirm`:`Delete this thread`,onClick:e=>{e.stopPropagation(),a.fire()},children:[(0,g.jsx)(qM,{size:`0.75rem`}),(0,g.jsx)(MW,{text:a.armed&&`Delete?`})]})]}),(0,g.jsxs)(`div`,{className:`px-2.5 pt-1.5 pb-2 [&>.markdown]:font-sans [&>.markdown]:text-[0.8125rem] [&>.markdown]:leading-[1.4] [&>.markdown]:[word-break:break-word]`,children:[e.anchor.kind===`line`&&(0,g.jsx)(`div`,{className:`m-0 mb-1.5 overflow-hidden font-mono text-[0.75rem] leading-[1.4] text-ellipsis whitespace-nowrap text-muted`,children:eG(e.anchor.quoted)}),(0,g.jsx)(xW,{text:i?.body??``,path:e.anchor.path,quoted:e.anchor.kind===`line`?e.anchor.quoted:void 0})]})]})});function QW({label:e,icon:t,onCopy:n,primary:r,disabled:i,title:a}){let[o,s]=(0,p.useState)(!1),c=(0,p.useRef)(null);return(0,p.useEffect)(()=>()=>void(c.current&&clearTimeout(c.current)),[]),(0,g.jsxs)(X,{variant:r?`primary`:`default`,feedback:o?`copied`:void 0,className:`relative`,disabled:i,title:a,onClick:async()=>{await n()&&(s(!0),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>s(!1),1400))},children:[(0,g.jsx)(ZM,{done:o,children:t}),(0,g.jsx)(MW,{text:o?`Copied`:e})]})}function $W(e,t){if(e.anchor.path!==t.anchor.path)return e.anchor.path<t.anchor.path?-1:1;let n=e=>e.anchor.kind===`line`?e.anchor.startLine:0;return n(e)-n(t)||(e.messages[0]?.createdAt??0)-(t.messages[0]?.createdAt??0)}function eG(e){let[t=``]=e.split(`
|
|
1634
|
+
`),n=t.trim();return n.length>70?n.slice(0,70)+`…`:n}function tG({className:e,...t}){return(0,g.jsx)(`div`,{...t,className:Ij(`inline-flex items-center gap-0.5 rounded-md bg-hover p-0.5`,e)})}function nG({selected:e,className:t,...n}){return(0,g.jsx)(X,{...n,"aria-pressed":e,className:Ij(`rounded-[0.25rem] border-0 bg-transparent px-2 py-0.5 text-muted hover:bg-transparent hover:text-foreground`,e&&`bg-raised text-foreground shadow-[0_1px_2px_rgba(0,0,0,0.12)] hover:bg-raised`,t)})}function rG(){let e=Z(e=>e.snapshot?.commit),t=Z(e=>e.snapshot?.mode.within!=null),n=Z(e=>e.stepCommit);return!e||t?null:(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-0.5`,children:[(0,g.jsx)(X,{variant:`ghost`,icon:!0,disabled:!e.parent,onClick:()=>n(-1),title:`Previous commit (<)`,"aria-label":`Previous commit`,children:(0,g.jsx)($j,{size:`1rem`})}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,disabled:!e.child,onClick:()=>n(1),title:`Next commit toward HEAD (>)`,"aria-label":`Next commit`,children:(0,g.jsx)(eM,{size:`1rem`})})]})}function iG(){let e=Z(e=>e.githubMenuOpen),t=Z(e=>e.setGithubMenuOpen),n=Z(e=>e.github),r=n.data,i=r?.repository,a=(0,p.useRef)(null),o=(0,p.useRef)(null);(0,p.useEffect)(()=>{if(!e)return;let n=e=>{a.current?.contains(e.target)||t(!1)};return document.addEventListener(`mousedown`,n),()=>document.removeEventListener(`mousedown`,n)},[e,t]);let s=r?.pullRequest;return(0,g.jsxs)(`div`,{className:`relative`,ref:a,onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),t(!1),o.current?.focus())},children:[(0,g.jsxs)(X,{ref:o,variant:`ghost`,title:`GitHub information (o)`,"aria-label":`GitHub information`,"aria-expanded":e,"aria-controls":`github-menu`,onClick:()=>t(!e),children:[(0,g.jsx)(CM,{size:`1rem`}),` `,(0,g.jsx)(`span`,{className:`max-lg:hidden`,children:`GitHub`})]}),e&&(0,g.jsxs)(`section`,{id:`github-menu`,role:`dialog`,"aria-label":`GitHub information`,className:`absolute top-[calc(100%+0.375rem)] left-0 z-30 w-80 max-w-[85vw] rounded-lg border border-border bg-surface p-3 text-[0.8125rem] shadow-lg`,children:[(0,g.jsx)(`strong`,{children:`Repository`}),(0,g.jsx)(`p`,{className:`mt-1 mb-3 wrap-anywhere`,children:i?(0,g.jsxs)(`a`,{className:`inline-flex items-center gap-1 text-accent hover:underline`,href:`https://github.com/${i}`,target:`_blank`,rel:`noreferrer`,children:[i,(0,g.jsx)(dM,{size:`0.75rem`})]}):(0,g.jsx)(`span`,{className:`text-muted`,children:n.status===`loading`?`Loading…`:r?`No GitHub origin`:`Unavailable`})}),(0,g.jsx)(`strong`,{children:`Pull request`}),(0,g.jsx)(`div`,{"aria-live":`polite`,className:`mt-1`,children:n.status===`loading`?(0,g.jsx)(`p`,{className:`text-muted`,children:`Loading…`}):n.status===`error`?(0,g.jsxs)(`p`,{className:`text-warn`,children:[`Lookup failed: `,n.error]}):s?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`a`,{className:`text-accent hover:underline`,href:s.url,target:`_blank`,rel:`noreferrer`,children:[`#`,s.number,` `,s.title]}),(0,g.jsx)(`p`,{className:`mt-1 text-muted`,children:s.state===`OPEN`?s.isDraft?`Draft`:`Open`:s.state===`MERGED`?`Merged`:`Closed`}),s.repository!==i&&(0,g.jsx)(`p`,{className:`text-muted`,children:s.repository}),r?.reason&&(0,g.jsx)(`p`,{className:`mt-2 text-muted`,children:r?.reason})]}):(0,g.jsx)(`p`,{className:`text-muted`,children:r?.reason??`No matching pull request`})})]})]})}function aG(){let e=Z(kN),t=Z(AN),n=Z(e=>e.jumpBack),r=Z(e=>e.jumpForward);return(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-0.5`,children:[(0,g.jsx)(X,{variant:`ghost`,icon:!0,disabled:!e,onClick:n,title:`Back (Ctrl+o)`,"aria-label":`Back`,children:(0,g.jsx)(Yj,{size:`1rem`})}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,disabled:!t,onClick:r,title:`Forward (Ctrl+i)`,"aria-label":`Forward`,children:(0,g.jsx)(Xj,{size:`1rem`})})]})}function oG(e){return e.dataset.lineType===`change-deletion`||(e.closest(`code`)?.hasAttribute(`data-deletions`)??!1)}function sG(e,t,n){let r=n===`old`;return[...e.querySelectorAll(`[data-line="${t}"]`)].find(e=>oG(e)===r)??null}function cG(e,t,n){let r=null;for(let{id:i,root:a}of e)for(let e of a.querySelectorAll(`[data-line]`)){let a=e.getBoundingClientRect();a.height===0||a.bottom<=t||a.top>=n||(!r||a.top<r.top||a.top===r.top&&oG(r.row)&&!oG(e))&&(r={id:i,row:e,top:a.top})}return r&&{id:r.id,line:Number(r.row.dataset.line),side:oG(r.row)?`old`:`new`,offset:r.top-t}}function lG(e,t,n,r,i=()=>{}){let a=0,o=new WeakSet,s=new MutationObserver(e=>{i(e),c()}),c=()=>{a||=requestAnimationFrame(()=>{a=0;let t=[];for(let n of e()?.getInstance()?.getRenderedItems()??[]){let e=n.element.shadowRoot??n.element;o.has(e)||(o.add(e),s.observe(e,{childList:!0,subtree:!0,characterData:!0})),t.push({id:n.id,root:e})}r(t)})};t.addEventListener(`scroll`,c,{passive:!0}),s.observe(t,{childList:!0,subtree:!0});let l=n(c);return c(),()=>{cancelAnimationFrame(a),s.disconnect(),t.removeEventListener(`scroll`,c),l()}}var uG={text:`diffle-occurrence`,read:`diffle-occurrence-read`,write:`diffle-occurrence-write`},dG=64;function fG(e,t,n){let r=n.filter(e=>e.line<=t&&t<=e.endLine);if(!r.length)return[];let i=[];for(let n of e.querySelectorAll(`span[data-char]`)){let a=Number(n.dataset.char),o=pG(n),s=o.reduce((e,t)=>e+t.data.length,0);if(!(!Number.isFinite(a)||!s))for(let n of r){let r=Math.max(n.line===t?n.col:0,a),c=Math.min(n.endLine===t?n.endCol:1/0,a+s);if(r>=c)continue;let l=e.ownerDocument.createRange(),[u,d]=mG(o,r-a),[f,p]=mG(o,c-a,!0);l.setStart(u,d),l.setEnd(f,p),i.push({range:l,kind:n.kind})}}return i}function pG(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=[];for(let e=t.nextNode();e;e=t.nextNode())n.push(e);return n}function mG(e,t,n=!1){let r=0;for(let i=0;i<e.length;i++){let a=e[i],o=r+a.data.length;if(n?t<=o:t<o)return[a,t-r];r=o}let i=e[e.length-1];return[i,i.data.length]}var hG=null,gG=null,_G=null,vG=new Map,yG=null,bG=e=>`${e.path}\0${e.line}\0${e.col}`;function xG(){let e=Z.getState().snapshot?.version??null;return e==null?null:(e!==yG&&(yG=e,vG=new Map),vG)}function SG(e){_G&&clearTimeout(_G),_G=null;let t=gG??hG,n=Z.getState();if(!t)return n.clearOccurrences();if(n.occurrences&&bG(n.occurrences.target)===bG(t))return;n.clearOccurrences();let r=xG()?.get(bG(t));if(r){r.length&&Z.setState({occurrences:{target:t,items:r}});return}_G=setTimeout(()=>{_G=null,Z.getState().requestOccurrences(t).then(e=>{if(!e?.length)return;let n=xG();if(n){n.set(bG(t),e);for(let e of n.keys()){if(n.size<=dG)break;n.delete(e)}}})},e)}var CG={focus(e){hG=e,gG||SG(80)},hover(e){gG=e,SG(e?150:80)},reset(){hG=null,gG=null,_G&&clearTimeout(_G),_G=null,vG=new Map,yG=null}},wG=()=>typeof CSS<`u`&&`highlights`in CSS&&typeof Highlight<`u`;function TG(e){let t=new Map;for(let n of e)for(let e=n.line;e<=n.endLine;e++){let r=t.get(e);r?r.push(n):t.set(e,[n])}return t}function EG(e,t){if(!wG())return()=>{};let n=()=>{for(let e of Object.values(uG))CSS.highlights.delete(e)},r=lG(e,t,e=>Z.subscribe((t,n)=>{(t.occurrences!==n.occurrences||t.loaded!==n.loaded||t.collapsed!==n.collapsed)&&e()}),e=>{let t=Z.getState().occurrences;if(!t)return n();let r=TG(t.items),i={text:[],read:[],write:[]};for(let{id:n,root:a}of e)if(SN(n)===t.target.path)for(let e of a.querySelectorAll(`[data-line]`)){if(oG(e))continue;let t=Number(e.dataset.line),n=r.get(t);if(n)for(let{range:r,kind:a}of fG(e,t,n))i[a].push(r)}for(let e of Object.keys(i)){let t=new Highlight(...i[e]);t.priority=1,CSS.highlights.set(uG[e],t)}});return()=>{r(),n()}}function DG(e){return[...e.matchAll(/[\p{L}\p{N}_]+/gu)].map(e=>({start:e.index,text:e[0]}))}var OG=()=>null,kG=null,AG=null,jG=null;function MG(e){OG=e}function NG(){typeof CSS<`u`&&`highlights`in CSS&&CSS.highlights.delete(`diffle-word-focus`),kG=null,AG=null,jG=null,LP.focus(null),CG.focus(null)}function PG(e){if(jG){if(e){let t=SN(e.id),n=VG(t,e.range.end,_N(e)===`old`);if(t===jG.path&&n===jG.line)return}NG()}}function FG(e,t){e.side===`new`&&BG({el:t,col:e.col,text:e.text},e.path,e.line)}var IG=200;function LG(e){let t=Z.getState(),n=t.selection;if(!n)return;let r=SN(n.id),i=VG(r,n.range.end,_N(n)===`old`),a=i==null?[]:UG(r,i)??[],o=a.findIndex(e=>e.el===kG&&e.col===AG),s=o===-1?e===1?0:a.length-1:o+e;if(i!=null&&s>=0&&s<a.length){BG(a[s],r,i);return}for(let n=0;n<IG;n++){let n=Z.getState().selection;t.moveCursor(e);let r=Z.getState().selection;if(!r||zG(n,r))break;let i=SN(r.id),a=VG(i,r.range.end,_N(r)===`old`);if(a==null)continue;let o=UG(i,a);if(o==null)break;if(o.length>0){BG(o[e===1?0:o.length-1],i,a);return}}NG()}function RG(e){let t=Z.getState(),n=t.selection;if(!n)return;let r=SN(n.id),i=VG(r,n.range.end,_N(n)===`old`),a=i==null?[]:UG(r,i)??[],o=e===`first`?a[0]:a[a.length-1];if(i==null||!o)return t.flash(`No symbol on this line`);BG(o,r,i)}function zG(e,t){return e.id===t.id&&e.range.end===t.range.end&&_N(e)===_N(t)}function BG({el:e,col:t,text:n},r,i){NG(),kG=e,AG=t,jG={path:r,line:i};let a=e.firstChild;if(a?.nodeType===Node.TEXT_NODE&&typeof CSS<`u`&&`highlights`in CSS&&typeof Highlight<`u`){let r=t-Number(e.dataset.char),i=document.createRange();i.setStart(a,r),i.setEnd(a,r+n.length);let o=new Highlight(i);o.priority=2,CSS.highlights.set(`diffle-word-focus`,o)}let o={path:r,side:`new`,line:i,col:t,text:n};LP.focus(o,e),CG.focus(o)}function VG(e,t,n){if(!n)return t;let r=HG(e),i=r&&sG(r,t,`old`);if(!i||!i.dataset.lineType?.startsWith(`context`))return null;let a=Number(i.dataset.altLine);return Number.isFinite(a)?a:null}function HG(e){let t=CN(Z.getState(),e),n=OG()?.getInstance()?.getRenderedItems().find(e=>e.id===t);return n?.element.shadowRoot??n?.element??null}function UG(e,t){let n=HG(e),r=n&&sG(n,t,`new`);return r?[...r.querySelectorAll(`span[data-char]`)].flatMap(e=>DG(e.textContent??``).map(t=>({el:e,col:Number(e.dataset.char)+t.start,text:t.text}))):null}function WG(){if(typeof document>`u`)return 16;let e=parseFloat(getComputedStyle(document.documentElement).fontSize);return Number.isFinite(e)&&e>0?e:16}var GG=800,KG=new Set([`g`,`d`,`y`,`z`,`i`]),qG=new Set([`PageUp`,`PageDown`,`Home`,`End`]),JG={gg:(e,t)=>void e.goToLine(t),G:(e,t)=>void e.goToLine(t),j:(e,t)=>e.moveCursorBy(t),k:(e,t)=>e.moveCursorBy(-t)},YG={w:()=>LG(1),b:()=>LG(-1),0:()=>RG(`first`),$:()=>RG(`last`),j:e=>e.moveCursor(1),k:e=>e.moveCursor(-1),J:e=>e.moveFile(1),K:e=>e.moveFile(-1),"]":e=>e.moveHunk(1),"[":e=>e.moveHunk(-1),"*":e=>e.searchWord(1),"#":e=>e.searchWord(-1),n:e=>e.search.matches.length?e.moveMatch(1):e.moveHunk(1),N:e=>e.search.matches.length?e.moveMatch(-1):e.moveHunk(-1),gg:e=>e.moveFile(`first`),G:e=>e.moveFile(`last`),V:e=>e.toggleVisual(),c:e=>e.selection&&e.openDraft(e.selection),C:e=>{let t=ON(e);t&&e.openFileDraft(t)},e:e=>e.editCommentAtCursor(),dd:e=>e.deleteCommentAtCursor(),R:e=>e.toggleResolvedAtCursor(),v:e=>e.toggleViewedAtCursor(),gv:e=>e.toggleViewedAbove(),zo:e=>e.setCollapsedAtCursor(!1),zc:e=>e.setCollapsedAtCursor(!0),zC:e=>e.setAllCollapsed(!0),zO:e=>e.setAllCollapsed(!1),zt:e=>e.scrollCursorTo(`top`),zb:e=>e.scrollCursorTo(`bottom`),zz:e=>e.scrollCursorTo(`eye`),s:e=>e.setDiffStyle(e.diffStyle===`split`?`unified`:`split`),t:e=>e.setTheme(ZP(e.theme)),yy:()=>void oK(),Y:()=>void oK(),yp:e=>void iK(e),"/":e=>e.openSearch(`file`),"g/":e=>e.openSearch(`diff`),gf:()=>nK(),gd:e=>e.goToDefinition(),gy:e=>e.goToTypeDefinition(),gh:e=>e.showHover(),gA:e=>e.findReferences(),gs:e=>e.openSymbols(`document`),gS:e=>e.openSymbols(`workspace`),F:e=>{let t=ON(e);!e.fileView&&t&&e.openFullFile(t)},o:e=>e.setGithubMenuOpen(!e.githubMenuOpen),m:e=>e.setModeMenuOpen(!e.modeMenuOpen),"<":e=>e.stepCommit(-1),">":e=>e.stepCommit(1),ii:e=>e.toggleInterdiff(),ij:e=>e.stepIteration(`lower`,-1),ik:e=>e.stepIteration(`lower`,1),iJ:e=>e.stepIteration(`higher`,-1),iK:e=>e.stepIteration(`higher`,1),...Object.fromEntries([1,2,3,4,5,6,7,8,9].map(e=>[`i${e}`,t=>t.pickIteration(e)])),r:e=>e.reloadIfMoved(),"?":e=>e.setHelpOpen(!e.helpOpen)};function XG(e){return e.composedPath()[0]??e.target}function ZG(e){return!e.ctrlKey&&!e.altKey?!1:[...e.key].length!==1||!(e.ctrlKey&&e.altKey||e.getModifierState(`AltGraph`))}function QG(e){if(!e)return!1;let t=e.tagName;return t===`TEXTAREA`||t===`INPUT`||t===`SELECT`||e.isContentEditable}function $G(){let e=(0,p.useRef)(null),t=(0,p.useRef)(``);(0,p.useEffect)(()=>{let n=()=>{e.current&&clearTimeout(e.current.timer),e.current=null},r=r=>{if(r.key===`Shift`||r.key===`Control`||r.key===`Alt`||r.key===`Meta`||r.key===`CapsLock`)return;let i=Z.getState(),a=XG(r),o=t.current;t.current=``;let s=Number(o);if(r.key===`Escape`&&a?.getAttribute(`role`)===`combobox`&&a.getAttribute(`aria-expanded`)===`true`)return;if(r.key===`Escape`){if(i.modePane&&!i.helpOpen){i.escape(),a?.closest(`#mode-picker`)&&eK(),n();return}QG(a)&&(a.blur(),i.treeModel?.isSearchOpen()&&i.treeModel.closeSearch()),requestAnimationFrame(()=>aK()),NG(),i.escape(),n();return}if(!QG(a)&&!r.metaKey&&!ZG(r)&&([...r.key].length===1||r.key===`Backspace`||r.key===`Enter`)&&i.search.open&&i.search.kind===`text`&&i.search.editing&&i.search.scope===`file`){r.preventDefault(),n(),[...r.key].length===1||r.key===`Backspace`?i.typeSearchInput(r.key):r.key===`Enter`&&i.runSearch(i.search.input);return}if((r.metaKey||r.ctrlKey)&&!r.altKey&&!r.shiftKey&&r.key.toLowerCase()===`p`){r.preventDefault(),n(),i.layout.treeVisible?nK():(i.setLayout({treeVisible:!0}),requestAnimationFrame(nK));return}if(i.references.open){if(r.stopPropagation(),i.references.peek&&qG.has(r.key))return;if(r.preventDefault(),r.key===`j`||r.key===`ArrowDown`||r.ctrlKey&&r.key===`n`)return i.moveReference(1);if(r.key===`k`||r.key===`ArrowUp`||r.ctrlKey&&r.key===`p`)return i.moveReference(-1);if(r.key===`Enter`)return i.pickReference();if(r.key===` `)return i.togglePeek();if(i.references.peek&&(r.key===`J`||r.key===`K`||r.ctrlKey&&(r.key===`d`||r.key===`u`))){let e=document.querySelector(`[aria-label="Peek"]`);if(!e)return;let t=r.ctrlKey?e.clientHeight/2:3*parseFloat(getComputedStyle(e).lineHeight);e.scrollBy({top:r.key===`J`||r.key===`d`?t:-t})}return}if((r.metaKey||r.ctrlKey)&&!r.altKey&&r.key.toLowerCase()===`b`){r.preventDefault();let e=i.layout;r.shiftKey?i.setLayout({panelVisible:!e.panelVisible}):i.setLayout({treeVisible:!e.treeVisible});return}if((r.metaKey||r.ctrlKey)&&r.shiftKey&&!r.altKey&&r.key.toLowerCase()===`e`){r.preventDefault(),rK();return}if(r.ctrlKey&&!r.metaKey&&!r.altKey&&(r.key===`o`||r.key===`i`)&&!QG(a)){r.preventDefault(),r.key===`o`?i.jumpBack():i.jumpForward();return}if(r.ctrlKey&&!r.metaKey&&!r.altKey&&(r.key===`d`||r.key===`u`)&&!QG(a)){r.preventDefault();let e=document.querySelector(`.codeview`)?.clientHeight??800,t=Math.max(5,Math.floor(e/2/(1.25*WG())));i.moveCursorBy(r.key===`d`?t:-t);return}if(document.activeElement?.tagName===`FILE-TREE-CONTAINER`){r.key===`ArrowRight`&&!QG(a)&&(r.preventDefault(),r.stopPropagation(),aK());return}if(QG(a)||r.metaKey||ZG(r))return;if(i.modeMenuOpen&&!i.helpOpen){let e=r.key===`j`||r.key===`ArrowDown`?1:r.key===`k`||r.key===`ArrowUp`?-1:0,t=RegExp(`^[1-${ZN.length}]$`).test(r.key)?Number(r.key):r.key===`Enter`&&!a?.closest(`button, #mode-config`)?i.modeEntry:0;if(e||t){r.preventDefault(),e?(i.highlightModeEntry(i.modeEntry+e),a?.closest(`button`)&&!a.closest(`#mode-config`)&&eK()):i.pickModeEntry(t);return}if(r.key===`l`||r.key===`ArrowRight`){if(r.preventDefault(),i.modeEntry===1)return;i.modePane===ZN[i.modeEntry-1]?tK():i.pickModeEntry(i.modeEntry);return}if(r.key===`h`||r.key===`ArrowLeft`){r.preventDefault(),i.closeModePane(),a?.closest(`#mode-picker`)&&eK();return}}if(i.modeMenuOpen&&a?.closest(`#mode-picker`))return;if(r.key===`ArrowDown`||r.key===`ArrowUp`){r.preventDefault();let e=r.key===`ArrowDown`?1:-1;s>0?i.moveCursorBy(e*s):i.moveCursor(e);return}if(r.key===`ArrowLeft`){r.preventDefault(),rK();return}if(i.helpOpen&&r.key!==`?`){i.setHelpOpen(!1);return}let c=e.current?.key;if(n(),!c&&/^[0-9]$/.test(r.key)&&(o||r.key!==`0`)){r.preventDefault(),t.current=o+r.key;return}if(!c&&KG.has(r.key)){t.current=o,e.current={key:r.key,timer:setTimeout(n,GG)};return}let l=c?c+r.key:r.key,u=s>0?JG[l]:void 0,d=YG[l];!u&&!d||(r.preventDefault(),u?u(i,s):d(i))},i=e=>{r(e),e.defaultPrevented&&e.stopPropagation()},a=e=>{if(e.button!==0||XG(e)?.closest(`[data-content-search]`))return;let r=Z.getState();!r.search.open||!r.search.editing||(r.blurSearchInput(),document.querySelector(`[data-content-search]`)?.blur(),n(),t.current=``)},o=e=>{e.key===`Escape`&&XG(e)?.getAttribute(`role`)!==`combobox`&&(Z.getState().modeMenuOpen&&document.activeElement?.closest(`#mode-picker`)||setTimeout(aK,0))};return document.addEventListener(`keydown`,i,!0),document.addEventListener(`pointerdown`,a,!0),document.addEventListener(`keyup`,o),()=>{document.removeEventListener(`keydown`,i,!0),document.removeEventListener(`pointerdown`,a,!0),document.removeEventListener(`keyup`,o),n(),t.current=``}},[])}function eK(){document.querySelector(`[data-mode-entry="${Z.getState().modeEntry}"]`)?.focus()}function tK(){document.querySelector(`#mode-config :is(input, [tabindex="0"])`)?.focus()}function nK(){let e=Z.getState().treeModel;e?.openSearch(e.getSearchValue()),document.querySelector(`file-tree-container`)?.shadowRoot?.querySelector(`[data-file-tree-search-input]`)?.focus({preventScroll:!0})}function rK(){let e=Z.getState();e.layout.treeVisible||e.setLayout({treeVisible:!0});let t=e.treeModel,n=document.querySelector(`file-tree-container`);requestAnimationFrame(()=>{let r=e.activePath&&t?.getItem(e.activePath)?e.activePath:t?.focusNearestPath(e.activePath??null);r&&t&&t.focusPath(r),(n?.shadowRoot?.querySelector(`[role="treeitem"][tabindex="0"]`)??n?.shadowRoot?.querySelector(`[role="tree"]`)??n)?.focus()})}async function iK(e){let t=ON(e);t&&e.flash(await QM(t)?`Copied ${t}`:`The browser blocked clipboard access`)}function aK(){document.activeElement?.blur?.(),document.querySelector(`main[tabindex]`)?.focus({preventScroll:!0})}async function oK(){let e=Z.getState(),t;try{t=await lA.exportComments()}catch(t){return e.report(`Copying comments`,t)}let n=await QM(t);e.flash(n?`Copied all comments`:`Clipboard blocked; use the panel buttons`)}function sK({label:e,value:t,onChange:n,refs:r,autoFocus:i,inputRef:a,onAccept:o,worktree:s=!0}){let c=(0,p.useId)(),[l,u]=(0,p.useState)(!1),[d,f]=(0,p.useState)(``),[m,h]=(0,p.useState)(-1),_=(0,p.useRef)(null),v=[{value:`HEAD`,detail:`Current commit`,section:`special`},...s?[{value:`worktree`,detail:`Uncommitted changes`,section:`special`}]:[],...(r?.branches??[]).map(e=>({value:e,detail:e===r?.current?`Current branch`:`Branch`,section:`branches`})),...(r?.remoteBranches??[]).map(e=>({value:e,detail:`Remote branch`,section:`remotes`})),...(r?.tags??[]).map(e=>({value:e,detail:`Tag`,section:`tags`})),...(r?.recent??[]).map(e=>({value:e.short,detail:e.subject,section:`commits`}))].filter((e,t,n)=>n.findIndex(t=>t.value===e.value)===t).filter(e=>`${e.value} ${e.detail}`.toLowerCase().includes(d.toLowerCase())),y=v[m];(0,p.useEffect)(()=>{_.current?.querySelector(`[aria-selected="true"]`)?.scrollIntoView?.({block:`nearest`})},[m]);let b=e=>{n(e),u(!1),h(-1)};return(0,g.jsxs)(`div`,{className:`group/ref relative min-w-0 flex-1`,children:[(0,g.jsx)(`input`,{className:`w-full min-w-0 rounded-md border border-transparent bg-surface px-1.5 py-1 text-foreground [font:inherit] focus:bg-hover focus:outline-none`,ref:a,role:`combobox`,"aria-label":e,"aria-autocomplete":`list`,"aria-expanded":l,"aria-controls":l?c:void 0,"aria-activedescendant":l&&y?`${c}-${m}`:void 0,autoFocus:i,autoComplete:`off`,spellCheck:!1,placeholder:e,value:t,onFocus:e=>{e.currentTarget.select(),f(``),h(-1)},onClick:()=>u(!0),onBlur:()=>u(!1),onChange:e=>{n(e.target.value),f(e.target.value),h(0),u(!0)},onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),e.stopPropagation(),u(!0),h(t=>v.length?(t+(e.key===`ArrowDown`?1:t<0?0:-1)+v.length)%v.length:-1);else if(e.key===`Enter`&&!e.nativeEvent.isComposing){e.preventDefault(),e.stopPropagation();let n=l&&y?y.value:t.trim();n&&(b(n),o(n))}else e.key===`Escape`&&l&&(e.preventDefault(),e.stopPropagation(),u(!1))}}),l&&(0,g.jsxs)(`div`,{className:`absolute top-[calc(100%_+_0.375rem)] left-0 z-1 max-h-120 w-68 max-w-[calc(100vw_-_2rem)] overflow-auto rounded-md border border-border bg-canvas p-1 shadow-[0_0.375rem_1rem_rgba(0,_0,_0,_0.18)] group-last/ref:right-0 group-last/ref:left-auto`,id:c,role:`listbox`,tabIndex:-1,"aria-label":`${e} suggestions`,ref:_,children:[v.map((e,t)=>(0,g.jsxs)(p.Fragment,{children:[t>0&&v[t-1].section!==e.section&&(0,g.jsx)(`div`,{className:`mx-2 my-1 border-t border-t-border`,"aria-hidden":`true`}),(0,g.jsxs)(`div`,{id:`${c}-${t}`,role:`option`,"aria-selected":t===m,className:`flex cursor-pointer flex-col gap-0.5 rounded-sm px-2 py-1.5 hover:bg-hover aria-selected:bg-hover`,onMouseDown:e=>e.preventDefault(),onClick:()=>b(e.value),children:[(0,g.jsx)(`span`,{className:`truncate`,children:e.value}),(0,g.jsx)(`span`,{className:`truncate font-sans text-[0.6875rem] leading-[1.4] text-muted`,children:e.detail})]})]},e.value)),!v.length&&(0,g.jsx)(`div`,{className:`p-2 font-sans text-[0.6875rem] leading-[1.4] text-muted`,children:`Use this revision as typed.`})]})]})}function cK(e){let t=Number(e);return/^[0-9]+$/.test(e)&&Number.isSafeInteger(t)?t:null}function lK({label:e,value:t,onChange:n,autoFocus:r}){let i=(0,p.useRef)(null),a=(0,p.useRef)(!1);(0,p.useLayoutEffect)(()=>{a.current&&=(i.current?.focus(),i.current?.select(),!1)},[t]);let o=e=>{let r=String(Math.min(2**53-1,Math.max(0,(cK(t)??0)+e)));a.current=r!==t,n(r),i.current?.focus(),i.current?.select()};return(0,g.jsxs)(`div`,{className:`mx-0.5 my-0 inline-flex items-stretch overflow-hidden rounded-md bg-surface focus-within:bg-hover`,children:[(0,g.jsx)(`input`,{className:`m-0 box-content w-full max-w-[8ch] min-w-[1ch] flex-[0_1_auto] rounded-md border border-transparent bg-transparent px-1.5 py-0.5 text-center text-foreground [font:inherit] focus:outline-none`,ref:i,type:`text`,inputMode:`numeric`,pattern:`[0-9]+`,required:!0,"aria-label":e,"aria-invalid":cK(t)===null,autoFocus:r,onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{(e.key===`ArrowUp`||e.key===`ArrowDown`)&&(e.preventDefault(),e.stopPropagation(),o(e.key===`ArrowUp`?1:-1))},value:t,style:{width:`${Math.max(1,t.length)}ch`},onChange:e=>{/^[0-9]*$/.test(e.target.value)&&n(e.target.value)}}),(0,g.jsxs)(`div`,{className:`grid grid-rows-[1fr_1fr]`,children:[(0,g.jsx)(X,{className:`rounded-none border-0 bg-transparent px-0.75 py-0 leading-[1] text-muted hover:bg-surface hover:text-foreground`,type:`button`,tabIndex:-1,"aria-label":`Increase ${e.toLowerCase()}`,onMouseDown:e=>e.preventDefault(),onClick:()=>o(1),children:(0,g.jsx)(tM,{size:`0.625rem`})}),(0,g.jsx)(X,{className:`rounded-none border-0 bg-transparent px-0.75 py-0 leading-[1] text-muted hover:bg-surface hover:text-foreground`,type:`button`,tabIndex:-1,"aria-label":`Decrease ${e.toLowerCase()}`,onMouseDown:e=>e.preventDefault(),onClick:()=>o(-1),children:(0,g.jsx)(Qj,{size:`0.625rem`})})]})]})}function uK({oldOffset:e,newOffset:t,version:n}){let[r,i]=(0,p.useState)(null),a=(0,p.useRef)(null),o=(0,p.useRef)(0);(0,p.useLayoutEffect)(()=>{let e=a.current;e&&(o.current=Math.max(o.current,e.getBoundingClientRect().height),e.style.minHeight=`${o.current}px`)}),(0,p.useEffect)(()=>{if(e===null||t===null)return;let r=new AbortController,a=setTimeout(()=>{lA.lastCommitsPreview(e,t,r.signal).then(a=>{r.signal.aborted||i({oldOffset:e,newOffset:t,version:n,result:a})},a=>{r.signal.aborted||i({oldOffset:e,newOffset:t,version:n,error:a instanceof Error?a.message:String(a)})})},150);return()=>{clearTimeout(a),r.abort()}},[e,t,n]);let s=r?.oldOffset===e&&r.newOffset===t&&r.version===n?r:null,c=e!==null&&t!==null&&!s,l=e===null||t===null?`Enter nonnegative whole numbers to preview commits.`:s?.error??(c?`Loading commit messages…`:null),u=s?.result;return(0,g.jsx)(`div`,{className:`min-h-22`,ref:a,"aria-busy":c,children:l===null?u?(0,g.jsx)(`div`,{className:`mt-1 grid gap-3`,"aria-live":`polite`,children:[[`HEAD~${e}`,u.old],[`HEAD~${t}`,u.new]].map(([e,t],n)=>(0,g.jsxs)(`div`,{children:[(0,g.jsxs)(`div`,{className:`flex justify-between gap-2 font-mono text-[0.6875rem] leading-[1.5] text-muted`,children:[(0,g.jsx)(`span`,{children:e}),t&&(0,g.jsx)(`span`,{title:t.sha,children:t.short})]}),(0,g.jsx)(`p`,{className:`mt-0.5 mb-0 max-h-24 overflow-auto font-sans text-[0.75rem] leading-[1.5] wrap-anywhere whitespace-pre-wrap`,children:t?t.message||`(Empty commit message)`:`Commit unavailable at this offset.`})]},n))}):null:(0,g.jsx)(`p`,{className:Ij(s?.error?`m-0 text-[0.75rem] wrap-anywhere text-del`:`m-0 p-0 text-[0.75rem] whitespace-normal text-muted`),role:`status`,children:l})})}function dK(){let e=Z(e=>e.snapshot),t=Z(e=>e.switchMode),n=Z(e=>e.modeMenuOpen),r=Z(e=>e.setModeMenuOpen),i=Z(e=>e.modePane),a=Z(e=>e.pickModeEntry),o=Z(e=>e.modeEntry),s=Z(e=>e.highlightModeEntry),[c,l]=(0,p.useState)(null),[u,d]=(0,p.useState)(``),[f,m]=(0,p.useState)(`HEAD`),[h,_]=(0,p.useState)(`...`),[v,y]=(0,p.useState)({oldBase:``,oldTip:``,newBase:``,newTip:`HEAD`}),b=e=>t=>y(n=>({...n,[e]:t})),[x,S]=(0,p.useState)(`1`),[C,w]=(0,p.useState)(`0`),T=Z(e=>e.modeCommit),E=Z(e=>e.setModeCommit),[D,O]=(0,p.useState)(``),[k,A]=(0,p.useState)(!1),[ee,j]=(0,p.useState)(null),M=(0,p.useRef)(!1),N=(0,p.useRef)(0),P=(0,p.useRef)(null),F=(0,p.useRef)(!1);(0,p.useEffect)(()=>{F.current=!1},[n,i]),(0,p.useEffect)(()=>{let e=++N.current;return()=>{N.current=e+1}},[n,i]);let I=(0,p.useRef)(null),te=(0,p.useRef)(null),ne=(0,p.useRef)([]),re=(0,p.useRef)(null);(0,p.useEffect)(()=>{if(!n)return;let e=!0;lA.refs().then(t=>{if(!e)return;l(t);let n=t.defaultBranch||t.branches[0]||`HEAD`;d(e=>e||n),y(e=>({...e,oldBase:e.oldBase||n,newBase:e.newBase||n}))}).catch(t=>{e&&Z.getState().report(`Loading refs`,t)});let t=e=>{I.current?.contains(e.target)||r(!1)};return document.addEventListener(`mousedown`,t),()=>{e=!1,document.removeEventListener(`mousedown`,t)}},[n,r]);let L=e=>{r(!1),aK(),t(e)},R=e=>L({kind:`revspec`,args:[`${e}^!`]}),z=async()=>{if(M.current)return;M.current=!0,A(!0),j(null);let e=N.current;try{let n=await t(D.trim()?{kind:`pr`,pr:D.trim()}:{kind:`pr`});if(e!==N.current)return;n===`applied`?(r(!1),aK()):typeof n==`object`&&(j(n.error),P.current?.focus())}finally{M.current=!1,A(!1)}},B=cK(x),ie=cK(C),ae=B!==null&&ie!==null,oe=()=>{d(f),m(u)},se=Object.values(v).every(e=>e.trim())?[`${v.oldBase.trim()}..${v.oldTip.trim()}`,`${v.newBase.trim()}..${v.newTip.trim()}`]:null,ce=[{label:`Working`,icon:IM,pane:null},{label:`Two refs…`,icon:yM,pane:`refs`},{label:`Last commits`,icon:BM,pane:`commits`},{label:`PR`,icon:CM,pane:`pr`},{label:`Commit…`,icon:bM,pane:`commit`},{label:`Range diff…`,icon:xM,pane:`range-diff`}];return(0,g.jsxs)(`div`,{className:`relative min-w-28`,ref:I,children:[(0,g.jsxs)(X,{onClick:()=>r(!n),title:`Change what is compared (m)`,"aria-expanded":n,"aria-controls":`mode-picker`,className:`max-w-full font-mono`,children:[(0,g.jsx)(`span`,{className:`truncate`,children:e?tk(e.mode):`…`}),` `,(0,g.jsx)(Qj,{size:`0.875rem`})]}),n&&(0,g.jsxs)(`div`,{className:`absolute top-[calc(100%_+_0.375rem)] left-0 z-20 flex w-max max-w-[calc(100vw_-_2rem)] min-w-60 rounded-[0.625rem] border border-border bg-canvas p-1.5 shadow-[0_0.625rem_1.875rem_rgba(0,_0,_0,_0.18)] max-[640px]:fixed max-[640px]:top-12 max-[640px]:left-2 max-[640px]:max-w-[calc(100vw_-_1rem)]`,id:`mode-picker`,role:`dialog`,"aria-label":`Compare`,children:[(0,g.jsxs)(`div`,{className:`w-60 shrink-0 max-[640px]:w-44`,children:[(0,g.jsx)(`div`,{className:`px-2.5 pt-1 pb-1.5 text-[0.6875rem] font-semibold text-muted`,children:`Compare`}),ce.map((e,t)=>(0,g.jsxs)(X,{className:Ij(`grid min-h-8.5 w-full grid-cols-[1.125rem_1fr_auto_1.5rem] items-center gap-2.5 rounded-[0.4375rem] border-0 bg-transparent px-2.5 py-1.75 text-left font-sans text-[0.8125rem] leading-[1.3] text-foreground [&_kbd]:ml-1 [&_kbd]:justify-self-end [&_kbd]:text-muted [&>svg]:text-muted ${o===t+1?`bg-hover hover:bg-hover`:`hover:bg-transparent`} ${e.pane&&i===e.pane?`[&>span:first-of-type]:font-semibold [&>svg]:text-accent`:``}`),"aria-expanded":e.pane?i===e.pane:void 0,"aria-controls":e.pane?`mode-config`:void 0,"data-mode-entry":t+1,"data-highlighted":o===t+1||void 0,onPointerMove:()=>s(t+1),onFocus:()=>s(t+1),onClick:e=>{F.current=e.detail>0,a(t+1)},children:[(0,g.jsx)(e.icon,{size:`0.875rem`}),(0,g.jsx)(`span`,{className:`whitespace-nowrap`,children:e.label}),(0,g.jsx)(`kbd`,{children:t+1}),e.pane?(0,g.jsx)(eM,{size:`0.875rem`}):(0,g.jsx)(`span`,{})]},e.label))]}),i&&(0,g.jsxs)(`form`,{className:`ml-1.5 flex w-76 min-w-0 flex-col gap-3 border-l border-l-border px-3 pt-0 pb-2`,id:`mode-config`,"aria-label":ce.find(e=>e.pane===i)?.label,onKeyDown:e=>{i!==`refs`||e.key!==`x`||e.ctrlKey||e.metaKey||e.altKey||e.target.closest(`input, textarea, select, [contenteditable]`)||(e.preventDefault(),e.stopPropagation(),e.repeat||oe())},onSubmit:e=>{e.preventDefault(),i===`refs`&&u.trim()&&f.trim()&&L({kind:`revspec`,args:[`${u.trim()}${h}${f.trim()}`]}),i===`commits`&&ae&&L(QN(B,ie)),i===`pr`&&z(),i===`commit`&&T.trim()&&R(T.trim()),i===`range-diff`&&se&&L({kind:`range-diff`,args:se})},children:[i===`pr`&&(0,g.jsx)(`div`,{className:`pt-1 pb-1.5 text-[0.6875rem] font-semibold text-muted`,children:`Pull request`}),i===`refs`&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-1.5 pt-1.5 font-mono text-[0.8125rem] leading-[1.5]`,children:[(0,g.jsx)(sK,{label:`Base ref`,value:u,onChange:d,refs:c,autoFocus:!F.current,onAccept:()=>te.current?.focus()}),(0,g.jsx)(`span`,{children:h}),(0,g.jsx)(sK,{label:`Target ref`,value:f,onChange:m,refs:c,inputRef:te,onAccept:()=>re.current?.focus()})]}),(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsxs)(tG,{className:`self-start focus-visible:outline-2 focus-visible:outline-offset-[2px] focus-visible:outline-accent focus-visible:outline-solid`,ref:re,role:`group`,"aria-label":`Comparison: ${h===`..`?`Direct`:`Merge base`}. Space to toggle.`,tabIndex:0,onKeyDown:e=>{if(e.key===`Enter`){e.preventDefault(),e.stopPropagation(),e.repeat||e.currentTarget.closest(`form`)?.requestSubmit();return}e.key===` `&&(e.preventDefault(),e.stopPropagation(),e.repeat||_(e=>e===`..`?`...`:`..`))},children:[(0,g.jsx)(nG,{type:`button`,selected:h===`...`,tabIndex:-1,onClick:()=>_(`...`),children:`Merge base`}),(0,g.jsx)(nG,{type:`button`,selected:h===`..`,tabIndex:-1,onClick:()=>_(`..`),children:`Direct`})]}),(0,g.jsx)(X,{id:`swap-refs`,className:`border-0 bg-transparent p-0.5 text-muted hover:bg-hover hover:text-foreground`,type:`button`,tabIndex:-1,"aria-label":`Swap refs`,"aria-keyshortcuts":`x`,title:`Swap refs (x)`,onClick:oe,children:(0,g.jsx)(Jj,{size:`0.75rem`})})]}),(0,g.jsx)(`p`,{className:`m-0 p-0 text-[0.75rem] whitespace-normal text-muted`,children:h===`..`?`Compare these two revisions.`:`Compare changes since their common ancestor.`})]}),i===`commits`&&(0,g.jsxs)(`div`,{className:`flex flex-col gap-2 pt-1.5`,children:[(0,g.jsxs)(`div`,{className:`flex items-baseline font-mono text-[0.8125rem] leading-[1.5]`,children:[(0,g.jsx)(`span`,{children:`HEAD~`}),(0,g.jsx)(lK,{label:`Base offset`,value:x,onChange:S,autoFocus:!0}),(0,g.jsx)(`span`,{children:`..HEAD~`}),(0,g.jsx)(lK,{label:`Target offset`,value:C,onChange:w})]}),(0,g.jsx)(uK,{oldOffset:B,newOffset:ie,version:e?.version??0})]}),i===`commit`&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-1.5 pt-1.5 font-mono text-[0.8125rem] leading-[1.5]`,children:[(0,g.jsx)(sK,{label:`Commit`,value:T,onChange:E,refs:c,worktree:!1,autoFocus:!F.current,onAccept:R}),(0,g.jsx)(`span`,{children:`^!`})]}),(0,g.jsx)(`p`,{className:`m-0 p-0 text-[0.75rem] whitespace-normal text-muted`,children:`Show this commit against its first parent.`})]}),i===`range-diff`&&(0,g.jsxs)(g.Fragment,{children:[[`old`,`new`].map((e,t)=>(0,g.jsxs)(`div`,{className:`flex flex-col gap-1 ${t===0?`pt-1.5`:``}`,children:[(0,g.jsx)(`span`,{className:`text-[0.75rem] text-muted`,children:e===`old`?`Old range`:`New range`}),(0,g.jsxs)(`div`,{className:`flex items-center gap-1.5 font-mono text-[0.8125rem] leading-[1.5]`,children:[(0,g.jsx)(sK,{label:`${e===`old`?`Old`:`New`} base`,value:v[`${e}Base`],onChange:b(`${e}Base`),refs:c,worktree:!1,autoFocus:t===0&&!F.current,onAccept:()=>ne.current[t*2+1]?.focus()}),(0,g.jsx)(`span`,{children:`..`}),(0,g.jsx)(sK,{label:`${e===`old`?`Old`:`New`} tip`,value:v[`${e}Tip`],onChange:b(`${e}Tip`),refs:c,worktree:!1,inputRef:e=>{ne.current[t*2+1]=e},onAccept:()=>t===0?ne.current[3]?.focus():se&&L({kind:`range-diff`,args:se})})]})]},e)),(0,g.jsx)(`p`,{className:`m-0 p-0 text-[0.75rem] whitespace-normal text-muted`,children:`How the old range’s commits became the new range’s, like git range-diff.`})]}),i===`pr`&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`label`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,g.jsx)(`span`,{className:`text-[0.75rem] text-muted`,children:`PR number or URL`}),(0,g.jsx)(`input`,{className:`w-full min-w-0 rounded-md border border-border bg-surface px-2 py-1.5 font-mono text-[0.75rem] leading-[normal] text-foreground`,ref:P,autoFocus:!0,autoComplete:`off`,spellCheck:!1,readOnly:k,"aria-describedby":ee?`pr-hint pr-error`:`pr-hint`,"aria-invalid":ee?!0:void 0,value:D,onChange:e=>{O(e.target.value),j(null)},placeholder:`Current branch’s PR`})]}),(0,g.jsx)(`p`,{className:`m-0 p-0 text-[0.75rem] whitespace-normal text-muted`,id:`pr-hint`,children:`Enter a PR number or URL, or leave blank for this branch.`}),ee&&(0,g.jsx)(`p`,{className:`m-0 text-[0.75rem] wrap-anywhere text-del`,id:`pr-error`,role:`alert`,children:ee})]}),(0,g.jsx)(X,{className:`mt-auto self-end`,variant:`primary`,type:`submit`,"aria-live":i===`pr`?`polite`:void 0,"aria-busy":i===`pr`&&k,disabled:i===`pr`?k:i===`refs`?!u.trim()||!f.trim():i===`commit`?!T.trim():i===`range-diff`?!se:!ae,children:i===`pr`?k?`Loading PR…`:`Show PR`:i===`commit`?`Show commit`:`Compare`})]})]})]})}function fK(){let e=Z(e=>e.snapshot),t=Z(e=>e.moved),n=Z(e=>e.reload);return!e||!t?null:(0,g.jsxs)(`span`,{role:`status`,className:`inline-flex min-w-0 items-center gap-2 rounded-md border border-border bg-hover py-0.5 pr-0.5 pl-2 text-[0.8125rem]`,children:[(0,g.jsx)(`span`,{className:`truncate font-mono text-[0.75rem]`,children:eP(e,t)}),(0,g.jsxs)(X,{variant:`primary`,onClick:()=>void n(),title:`Recompute the review where the refs point now`,children:[(0,g.jsx)(RM,{size:`0.875rem`}),` Reload`]})]})}var pK=[[`on`,`Always`],[`auto`,`Auto (not on branches)`],[`off`,`Never`]];function mK({onClose:e}){let t=Z(e=>e.config),n=Z(e=>e.saveConfig),[r,i]=(0,p.useState)(t.autoViewed.join(`
|
|
1635
1635
|
`)),[a,o]=(0,p.useState)(String(t.contextLines)),[s,c]=(0,p.useState)(t.followRefs),[l,u]=(0,p.useState)(!1),d=Object.entries(t.lspCommands).sort(([e],[t])=>e.localeCompare(t)),f=async()=>{u(!0),await n({autoViewed:r.split(`
|
|
1636
|
-
`).map(e=>e.trim()).filter(Boolean),contextLines:Math.max(0,Number.parseInt(a,10)||0),followRefs:s}),u(!1),e()},m=(0,p.useRef)({save:f,onClose:e,saving:l});return m.current={save:f,onClose:e,saving:l},(0,p.useEffect)(()=>{let e=e=>{if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),m.current.onClose();return}if(e.key===`Enter`&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey){if(e.target?.tagName===`TEXTAREA`)return;e.preventDefault(),e.stopPropagation(),m.current.saving||m.current.save()}};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[]),(0,g.jsxs)(
|
|
1637
|
-
`,1)[0]}),(0,g.jsx)(tG,{}),(0,g.jsx)(lK,{}),(0,g.jsxs)(`span`,{className:`shrink-0 whitespace-nowrap text-muted max-md:hidden`,children:[u,` files · `,(0,g.jsxs)(`span`,{className:`text-add`,children:[`+`,d]}),` `,(0,g.jsxs)(`span`,{className:`text-del`,children:[`−`,f]})]}),(0,g.jsx)(`span`,{className:`flex-1`}),t.enabled&&(0,g.jsx)(pK,{lsp:t}),(0,g.jsxs)(QW,{title:`Diff layout (s)`,children:[(0,g.jsxs)($W,{selected:c===`split`,onClick:()=>l(`split`),"aria-label":`Split`,children:[(0,g.jsx)(rM,{size:`0.875rem`}),` `,(0,g.jsx)(`span`,{className:`max-xl:hidden`,children:`Split`})]}),(0,g.jsxs)($W,{selected:c===`unified`,onClick:()=>l(`unified`),"aria-label":`Unified`,children:[(0,g.jsx)(zM,{size:`0.875rem`}),` `,(0,g.jsx)(`span`,{className:`max-xl:hidden`,children:`Unified`})]})]}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,onClick:()=>a(JP(i)),title:`Theme: ${i} (t)`,children:(0,g.jsx)(gK,{choice:i})}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,onClick:()=>Z.getState().setHelpOpen(!0),title:`Keyboard shortcuts (?)`,children:(0,g.jsx)(CM,{size:`1rem`})}),(0,g.jsxs)(X,{variant:`ghost`,onClick:()=>r(!0),title:`Settings`,"aria-label":`Settings`,children:[(0,g.jsx)(VM,{size:`0.9375rem`}),` `,(0,g.jsx)(`span`,{className:`max-xl:hidden`,children:`Settings`})]}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,className:o.panelVisible?``:`opacity-45`,onClick:()=>s({panelVisible:!o.panelVisible}),title:`Toggle comments panel (⌘/Ctrl+Shift+b)`,children:(0,g.jsx)(MM,{size:`1rem`})}),n&&(0,g.jsx)(dK,{onClose:()=>r(!1)})]})}function pK({lsp:e}){let t=(0,p.useRef)(null),n=()=>{t.current&&(t.current.open=!1,t.current.querySelector(`summary`)?.focus())};(0,p.useEffect)(()=>{let e=e=>{let n=t.current;n?.open&&!n.contains(e.target)&&(n.open=!1)},r=e=>{e.key!==`Escape`||!t.current?.open||(e.preventDefault(),e.stopPropagation(),n())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,r,!0)}},[]);let r=e.servers.some(e=>e.state===`starting`),i=r||e.servers.some(e=>e.activity?.length),a=e.servers.some(e=>e.state===`unavailable`),o=e.servers.some(e=>e.notice?.severity===`error`),s=e.servers.some(e=>e.notice?.severity===`warning`),c=e.servers.some(e=>e.stderr),l=a&&`unavailable`||o&&`error`||s&&`warning`||r&&`starting`||i&&`busy`||c&&`logs`||``;return(0,g.jsxs)(`details`,{ref:t,className:`relative`,children:[(0,g.jsxs)(`summary`,{className:Nj(`flex cursor-pointer list-none items-center gap-1.25 text-xs whitespace-nowrap text-muted [&::-webkit-details-marker]:hidden ${o||a?`text-warn`:``}`),"aria-label":`Language servers${l?`: ${l}`:``}`,children:[i?(0,g.jsx)(EM,{size:`0.875rem`,className:`animate-spin`}):(0,g.jsx)(iM,{size:`0.875rem`}),(0,g.jsx)(`span`,{className:`max-lg:hidden`,children:l})]}),(0,g.jsxs)(`section`,{className:`absolute top-[calc(100%+0.75rem)] right-0 z-100 max-h-[65vh] w-[min(28rem,85vw)] overflow-auto rounded-lg border border-border bg-surface p-2.5 text-[0.8125rem] text-foreground shadow-lg`,"aria-label":`Language server status`,children:[(0,g.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,g.jsx)(`strong`,{children:`Language servers`}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,type:`button`,"aria-label":`Close language server status`,className:`border-0 p-0.5 text-muted hover:text-foreground`,onClick:n,children:(0,g.jsx)(qM,{size:`0.875rem`})})]}),e.servers.map(e=>(0,g.jsx)(mK,{server:e},e.command)),!e.servers.length&&!e.missing.length&&(0,g.jsx)(`p`,{className:`text-muted`,children:`No servers`}),e.missing.map(e=>(0,g.jsxs)(`div`,{className:`mt-1.5 flex items-center gap-2 border-t border-border pt-1.5 text-muted`,title:e.tried.join(`, `),children:[(0,g.jsx)(qM,{size:`0.875rem`,className:`shrink-0`}),(0,g.jsx)(`span`,{className:`min-w-0 flex-1 font-medium wrap-anywhere text-foreground`,children:e.language}),(0,g.jsx)(`span`,{className:`shrink-0 text-[0.6875rem]`,children:e.tried.length?`Not on PATH`:`Disabled`})]},e.language))]})]})}function mK({server:e}){let t=e.state===`starting`||!!e.activity?.length,n=e.state===`unavailable`||!!e.notice,r=e.state===`unavailable`?`Unavailable`:e.state===`starting`?`Starting`:t?`Working`:`Connected`;return(0,g.jsxs)(`div`,{className:`mt-1.5 border-t border-border pt-1.5`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t?(0,g.jsx)(EM,{size:`0.875rem`,className:`shrink-0 animate-spin text-accent`}):n?(0,g.jsx)(tM,{size:`0.875rem`,className:`shrink-0 text-warn`}):(0,g.jsx)(Jj,{size:`0.875rem`,className:`shrink-0 text-add`}),(0,g.jsx)(`strong`,{className:`min-w-0 flex-1 font-medium wrap-anywhere`,children:e.name}),(0,g.jsx)(`span`,{className:`shrink-0 text-[0.6875rem] text-muted`,title:r===`Connected`?`Initialized; workspace readiness is not reported by LSP`:void 0,children:r})]}),(0,g.jsx)(`div`,{className:`mt-0.5 mb-0.5 ml-5.5 text-[0.6875rem] text-muted`,children:e.languages.join(`, `)}),e.activity?.map((e,t)=>(0,g.jsx)(`p`,{className:`my-1.5 ml-5.5 wrap-anywhere`,children:e},t)),e.message&&(0,g.jsx)(`p`,{className:`my-1.5 ml-5.5 wrap-anywhere text-warn`,children:e.message}),e.notice&&(0,g.jsx)(`p`,{className:`my-1.5 ml-5.5 wrap-anywhere text-warn`,children:e.notice.message}),(0,g.jsxs)(`details`,{className:`ml-5.5 text-[0.6875rem] text-muted`,children:[(0,g.jsx)(`summary`,{className:`cursor-pointer`,children:`Details`}),(0,g.jsx)(`pre`,{className:`my-2 font-mono wrap-anywhere whitespace-pre-wrap`,children:e.command}),e.stderr&&(0,g.jsx)(hK,{text:e.stderr})]})]})}function hK({text:e}){let[t,n]=(0,p.useState)(null);return(0,p.useEffect)(()=>{if(!t)return;let e=setTimeout(()=>n(null),3e3);return()=>clearTimeout(e)},[t]),(0,g.jsxs)(`div`,{className:`my-2`,children:[(0,g.jsxs)(`div`,{className:`flex items-center justify-between py-1`,children:[(0,g.jsx)(`span`,{children:`stderr`}),(0,g.jsxs)(X,{variant:`ghost`,type:`button`,"aria-label":`Copy stderr`,onClick:async()=>n(await YM(e)?`copied`:`failed`),children:[t===`copied`?(0,g.jsx)(Jj,{size:`0.75rem`}):(0,g.jsx)(aM,{size:`0.75rem`}),(0,g.jsx)(`span`,{"aria-live":`polite`,children:t===`copied`?`Copied`:`Copy`})]})]}),t===`failed`&&(0,g.jsx)(`p`,{role:`status`,className:`m-2 text-warn`,children:`Copy failed. Select the log and press Ctrl/⌘+C.`}),(0,g.jsx)(`pre`,{"aria-label":`stderr log`,tabIndex:0,className:`m-0 max-h-[min(12rem,25vh)] overflow-auto overscroll-contain p-2 font-mono whitespace-pre text-foreground`,children:e})]})}function gK({choice:e}){return e===`light`?(0,g.jsx)(UM,{size:`1rem`}):e===`dark`?(0,g.jsx)(AM,{size:`1rem`}):(0,g.jsx)(kM,{size:`1rem`})}var _K=[[{title:`Move`,rows:[[`j / k or ↓ / ↑`,`next / previous line`],[`{n}j / {n}k`,`n lines down / up`],[`Ctrl+d / Ctrl+u`,`half a page down / up`],[`Ctrl+o / Ctrl+i`,`jump back / forward in history`],[`← or ⌘/Ctrl+Shift+e / →`,`focus the file tree / back to the diff`],[`V, then j / k`,`extend a block selection`]]},{title:`Files and hunks`,rows:[[`J / K`,`next / previous file`],[`gg / G`,`first / last file`],[`{n}gg / {n}G`,`line n of the current file`],[`] / [ n / N`,`next / previous hunk (n / N follow matches while searching)`],[`v`,`toggle viewed on the current file`],[`gv`,`toggle viewed on the file above`],[`zo / zc`,`expand / collapse the current file (zo loads a large diff)`],[`zO / zC`,`open / close all files`],[`F`,`view the current file whole; Ctrl+o returns`]]},{title:`Comments`,rows:[[`c`,`comment on the current line or selection`],[`C`,`comment on the current file as a whole`],[`e`,`edit the newest message of the thread under the cursor`],[`dd`,`delete the thread under the cursor`],[`R`,`resolve / reopen the thread under the cursor`],[`yy or Y`,`copy all comments`],[`yp`,`copy the current file’s path`]]}],[{title:`Search`,rows:[[`/`,`search the current file, then n / N between matches`],[`g/`,`search changed files (toggle: diff + context / full file)`],[`⌘/Ctrl+p or gf`,`search files by name`],[`w / b`,`focus the next / previous symbol on the line`],[`0 / $`,`focus the first / last symbol on the line`],[`* / #`,`next / previous occurrence of the focused word`]]},{title:`Code intelligence (language server)`,rows:[[`hover a symbol or gh`,`signature and docs tooltip (gh: focused word); Esc closes`],[`click a symbol`,`definition / type definition / references popover`],[`gd or ⌘/Ctrl+click`,`go to the definition, or its references from there`],[`gy`,`go to the definition of the hovered symbol’s type`],[`gA`,`list references; j / k, Enter to jump, n / N to step`],[`gs / gS`,`symbols in the current file / across the repository`]]},{title:`View`,rows:[[`zz`,`scroll the current line to eye level`],[`zt / zb`,`scroll the current line to the top / bottom`],[`s`,`toggle split / unified`],[`t`,`cycle theme`],[`⌘/Ctrl+b`,`toggle the file tree (Shift: comments panel)`],[`o`,`GitHub repository and pull request`],[`m, then 1–5`,`open the mode picker and choose an entry`],[`< / >`,`older / newer commit or range-diff pair`]]},{title:`Iterations`,rows:[[`r`,`reload once the compared refs moved`],[`ii`,`latest iteration vs. the one before; again: the range`],[`ij / ik`,`span’s lower end one iteration older / newer`],[`iJ / iK`,`span’s higher end one iteration older / newer`],[`i, then 1–9`,`compare that iteration with the latest`]]},{title:`General`,rows:[[`?`,`toggle this help`],[`Esc`,`close composer, search, or menu; clear selection`]]}]];function vK(){let e=Z(e=>e.helpOpen),t=Z(e=>e.setHelpOpen);return e?(0,g.jsxs)(Pj,{label:`Keyboard shortcuts`,onClose:()=>t(!1),className:`flex max-h-[calc(100vh_-_2rem)] w-max max-w-[96vw] flex-col overflow-hidden p-0`,children:[(0,g.jsxs)(`div`,{className:`flex items-center justify-between border-b border-b-border px-4.5 pt-3 pb-2.5`,children:[(0,g.jsx)(`h3`,{className:`m-0 text-[0.9375rem]`,children:`Keyboard shortcuts`}),(0,g.jsx)(X,{onClick:()=>t(!1),children:`Close`})]}),(0,g.jsx)(`div`,{className:`grid grid-cols-[auto_auto] items-start gap-x-10 overflow-auto px-4.5 pt-2.5 pb-3.5 text-[0.75rem] whitespace-nowrap`,children:_K.map((e,t)=>(0,g.jsx)(`div`,{className:`grid grid-cols-[max-content_1fr] content-start gap-x-3`,children:e.map(e=>(0,g.jsxs)(`section`,{className:`col-span-full mb-2.5 grid grid-cols-subgrid last:mb-0`,children:[(0,g.jsx)(`h4`,{className:`col-span-full m-0 mb-0.5 text-[0.75rem] font-semibold text-muted`,children:e.title}),e.rows.map(([e,t])=>(0,g.jsxs)(`div`,{className:`col-span-full grid grid-cols-subgrid items-baseline leading-[1.7]`,children:[(0,g.jsx)(`span`,{className:`inline-flex gap-1.5`,children:e.split(/\s{2,}/).map((e,t)=>(0,g.jsx)(`kbd`,{children:e},t))}),(0,g.jsx)(`span`,{children:t})]},e))]},e.title))},t))})]}):null}function yK({path:e}){return Z(t=>{let n=t.search.kind===`text`&&t.search.scope===`file`;return t.search.open&&(n?t.search.path===e:e===void 0)})?(0,g.jsx)(bK,{}):null}function bK(){let e=Z(e=>e.search),t=Z(e=>e.runSearch),n=Z(e=>e.closeSearch),r=Z(e=>e.setSearchOptions),i=Z(e=>e.setSearchInput),a=(0,p.useRef)(null);(0,p.useEffect)(()=>{e.editing&&a.current?.focus({preventScroll:!0})},[e.editing,e.focusNonce]);let o=e.matches.length;if(e.kind!==`text`)return(0,g.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-b-border bg-surface px-2.5 py-1.5`,children:[e.kind===`references`?(0,g.jsx)(TM,{size:`0.875rem`}):(0,g.jsx)(KM,{size:`0.875rem`}),(0,g.jsxs)(`span`,{className:`flex-1 font-mono text-[0.75rem] leading-[normal] text-muted [&_code]:text-foreground`,children:[e.kind===`references`?`references to`:e.direction===1?`occurrences of`:`occurrences (upwards) of`,` `,(0,g.jsx)(`code`,{children:e.query})]}),(0,g.jsx)(`span`,{className:`min-w-17.5 text-right font-mono text-[0.75rem] leading-[normal] text-muted`,children:e.loading?`searching…`:o?`${e.index+1} / ${o}${e.truncated?`+`:``}`:`none`}),(0,g.jsx)(X,{type:`button`,variant:`ghost`,icon:!0,onClick:n,title:`Close (Esc)`,children:(0,g.jsx)(qM,{size:`0.875rem`})})]});let s=e.content[e.scope]===`full`,c=s?mM:fM;return(0,g.jsxs)(`form`,{className:`flex items-center gap-2 border-b border-b-border bg-surface px-2.5 py-1.5`,onClick:e=>e.stopPropagation(),onSubmit:n=>{n.preventDefault(),t(e.input).then(()=>{a.current?.blur(),document.querySelector(`main[tabindex]`)?.focus({preventScroll:!0})})},children:[(0,g.jsx)(BM,{size:`0.875rem`}),(0,g.jsx)(`input`,{"data-content-search":``,className:`min-w-0 flex-1 rounded-md border border-border bg-canvas px-2 py-1 font-mono text-[0.75rem]`,ref:a,value:e.input,onFocus:()=>{e.editing||i(e.input)},onChange:e=>i(e.target.value),placeholder:e.scope===`file`?`Search this file… (Enter, then n / N)`:`Search all files… (Enter, then n / N)`,spellCheck:!1}),(0,g.jsx)(X,{type:`button`,variant:`ghost`,className:Nj(`rounded-sm border border-transparent px-1.5 py-[2px] font-mono text-[0.6875rem] leading-[normal] text-muted ${e.ignoreCase?``:`border-accent bg-[color-mix(in_srgb,_var(--accent)_12%,_transparent)] text-accent`}`),"aria-pressed":!e.ignoreCase,onClick:()=>r({ignoreCase:!e.ignoreCase}),title:e.ignoreCase?`Ignoring case; click to match case`:`Matching case; click to ignore case`,children:`Aa`}),(0,g.jsx)(X,{type:`button`,variant:`ghost`,className:Nj(`rounded-sm border border-transparent px-1.5 py-[2px] font-mono text-[0.6875rem] leading-[normal] text-muted ${e.regex?`border-accent bg-[color-mix(in_srgb,_var(--accent)_12%,_transparent)] text-accent`:``}`),"aria-pressed":e.regex,onClick:()=>r({regex:!e.regex}),title:e.regex?`Extended regex; click for plain text`:`Plain text; click for extended regex`,children:`.*`}),(0,g.jsx)(X,{type:`button`,variant:`ghost`,className:Nj(`rounded-sm border border-transparent px-1.5 py-[2px] font-mono text-[0.6875rem] leading-[normal] text-muted ${s?`border-accent bg-[color-mix(in_srgb,_var(--accent)_12%,_transparent)] text-accent`:``}`),"aria-label":`Search full file`,"aria-pressed":s,onClick:()=>r({content:s?`diff`:`full`}),title:s?`Searching full file; click to search diff + context`:`Searching diff + context; click to search full file`,children:(0,g.jsx)(c,{size:`0.75rem`})}),(0,g.jsx)(`span`,{className:`min-w-17.5 text-right font-mono text-[0.75rem] leading-[normal] text-muted`,children:e.loading?`searching…`:o===0&&e.query?e.scope===`file`?`none in file`:s?`no matches`:`none in diff`:o?`${e.index+1} / ${o}${e.truncated?`+`:``}`:``}),(0,g.jsx)(X,{type:`button`,variant:`ghost`,icon:!0,onClick:n,title:`Close (Esc)`,children:(0,g.jsx)(qM,{size:`0.875rem`})})]})}var xK=250,SK=6,CK=`fixed z-40 rounded-lg border border-border bg-canvas px-3 py-2 text-[0.75rem] shadow-[0_0.5rem_1.5rem_rgba(0,_0,_0,_0.18)]`;function wK({boxRef:e,anchor:t,className:n,children:r,onPointerEnter:i,onPointerLeave:a}){let o=(0,p.useRef)(null),s=e??o;return(0,p.useLayoutEffect)(()=>{let e=s.current;if(!e)return;let{width:n,height:r}=e.getBoundingClientRect(),i=t.bottom+SK+r<=window.innerHeight;e.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-n-8))}px`,e.style.top=`${i?t.bottom+SK:Math.max(8,t.top-SK-r)}px`},[t,s]),(0,g.jsx)(`div`,{ref:s,role:`tooltip`,className:Nj(CK,n),onPointerEnter:i,onPointerLeave:a,children:r})}function TK(){let[e,t]=(0,p.useState)(null);return(0,p.useEffect)(()=>{let e=null,n=null,r=null,i=()=>{e!==null&&clearTimeout(e),e=null},a=()=>{i(),n&&r!==null&&!n.hasAttribute(`title`)&&n.setAttribute(`title`,r),n=null,r=null,t(null)},o=(r,a,o)=>{i();let s=()=>{let e=r.getBoundingClientRect();t({text:a,anchor:{left:e.left,top:e.top,bottom:e.bottom}})};o===0?s():e=setTimeout(()=>{e=null,n===r&&s()},o)},s=(e,t)=>{if(e===n)return;let i=e.getAttribute(`title`);a(),i&&(n=e,r=i,e.removeAttribute(`title`),o(e,i,t))},c=e=>{let t=e.composedPath()[0];return t instanceof Element?t.closest(`[title]`):null},l=e=>!(e instanceof Node)||!n?.contains(e),u=new Set,d=e=>{for(let e of u)e.host.isConnected||(x(e),u.delete(e));for(let t of e.composedPath())!(t instanceof ShadowRoot)||u.has(t)||(u.add(t),b(t))},f=e=>{d(e);let t=c(e);t&&s(t,xK)},p=e=>{n&&l(e.relatedTarget)&&a()},m=e=>{d(e);let t=c(e);t?.matches(`:focus-visible`)&&s(t,0)},h=e=>{n&&l(e.relatedTarget)&&a()},g=e=>{e.key===`Escape`&&a()},_=()=>{if(!n)return;let e=n.getAttribute(`title`);e!==null&&(r=e,n.removeAttribute(`title`),o(n,e,0))},v=()=>a(),y=()=>a(),b=e=>{e.addEventListener(`pointerover`,f),e.addEventListener(`pointerout`,p),e.addEventListener(`focusin`,m),e.addEventListener(`focusout`,h),e.addEventListener(`scroll`,y,!0)},x=e=>{e.removeEventListener(`pointerover`,f),e.removeEventListener(`pointerout`,p),e.removeEventListener(`focusin`,m),e.removeEventListener(`focusout`,h),e.removeEventListener(`scroll`,y,!0)};return b(document),document.addEventListener(`pointermove`,_),document.addEventListener(`keydown`,g,!0),document.addEventListener(`pointerdown`,v,!0),()=>{i(),x(document);for(let e of u)x(e);document.removeEventListener(`pointermove`,_),document.removeEventListener(`keydown`,g,!0),document.removeEventListener(`pointerdown`,v,!0)}},[]),e?(0,g.jsx)(wK,{anchor:e.anchor,className:`pointer-events-none max-w-[min(28rem,_90vw)] wrap-anywhere whitespace-pre-line`,children:e.text}):null}var EK=300,DK=!1,OK=!1,kK=null,AK=null,jK=()=>{kK&&clearTimeout(kK),kK=null},MK=()=>{AK&&clearTimeout(AK),AK=null},NK=()=>{MK(),!(DK||OK)&&(AK=setTimeout(()=>{AK=null,Z.getState().closeHover()},150))},PK={enter(e,t){DK=!0,jK(),NK(),kK=setTimeout(()=>{kK=null;let n=t.getBoundingClientRect();Z.getState().requestHover(e,{left:n.left,top:n.top,bottom:n.bottom})},EK)},leave(){DK=!1,jK(),NK()},tipEnter(){OK=!0,NK()},tipLeave(){OK&&(OK=!1,NK())},cancel(){jK(),MK(),Z.getState().closeHover()}};function FK(){let e=Z(e=>e.hover),t=(0,p.useRef)(null);return(0,p.useEffect)(()=>{let e=new Set([`Shift`,`Control`,`Alt`,`Meta`,`CapsLock`]),n=t=>{t.key!==`Escape`&&!e.has(t.key)&&PK.cancel()},r=e=>e.target instanceof Node&&!!t.current?.contains(e.target),i=e=>{r(e)||PK.cancel()};return document.addEventListener(`keydown`,n,!0),document.addEventListener(`scroll`,i,!0),document.addEventListener(`pointerdown`,i,!0),()=>{document.removeEventListener(`keydown`,n,!0),document.removeEventListener(`scroll`,i,!0),document.removeEventListener(`pointerdown`,i,!0)}},[]),e?(0,g.jsx)(IK,{hover:e,boxRef:t}):null}function IK({hover:e,boxRef:t}){return(0,p.useEffect)(()=>PK.tipLeave,[]),(0,g.jsx)(wK,{boxRef:t,anchor:e.anchor,className:`hover-markdown max-h-[45vh] max-w-[min(40rem,_90vw)] overflow-auto`,onPointerEnter:PK.tipEnter,onPointerLeave:PK.tipLeave,children:(0,g.jsx)(vW,{text:e.contents,path:e.target.path,highlight:!0})})}function LK(e){let t=t=>Math.round(t*e),n=t(1.25),r=t(.5),i=n+3*r,a=t(2);return{itemMetrics:{lineHeight:n,spacing:r,diffHeaderHeight:i,hunkSeparatorHeight:a},layout:{paddingTop:t(.75),paddingBottom:t(12.5),gap:t(1)},css:`
|
|
1636
|
+
`).map(e=>e.trim()).filter(Boolean),contextLines:Math.max(0,Number.parseInt(a,10)||0),followRefs:s}),u(!1),e()},m=(0,p.useRef)({save:f,onClose:e,saving:l});return m.current={save:f,onClose:e,saving:l},(0,p.useEffect)(()=>{let e=e=>{if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),m.current.onClose();return}if(e.key===`Enter`&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey){if(e.target?.tagName===`TEXTAREA`)return;e.preventDefault(),e.stopPropagation(),m.current.saving||m.current.save()}};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[]),(0,g.jsxs)(Lj,{label:`Settings`,onClose:e,className:`[&_code]:rounded-sm [&_code]:bg-hover [&_code]:px-1 [&_code]:font-mono`,children:[(0,g.jsx)(`h3`,{className:`m-0 mb-2`,children:`Auto-viewed patterns`}),(0,g.jsxs)(`p`,{className:`m-0 mb-2 text-muted`,children:[`Matching files start collapsed and viewed. One glob per line: `,(0,g.jsx)(`code`,{children:`*.lock`}),` matches a file name,`,` `,(0,g.jsx)(`code`,{children:`**/generated/**`}),` a path.`]}),(0,g.jsx)(`textarea`,{className:`min-h-40 w-full rounded-md border border-border bg-surface p-2 font-mono text-[0.75rem]`,value:r,onChange:e=>i(e.target.value),spellCheck:!1,autoFocus:!0}),(0,g.jsx)(`h3`,{className:`m-0 mt-[14px] mb-2`,children:`Context lines`}),(0,g.jsx)(`p`,{className:`m-0 mb-2 text-muted`,children:`Unchanged lines around each change.`}),(0,g.jsx)(`input`,{type:`number`,min:0,max:1e4,value:a,onChange:e=>o(e.target.value),className:`w-[100px]`}),(0,g.jsx)(`h3`,{className:`m-0 mt-[14px] mb-2`,children:`Reload behavior`}),(0,g.jsx)(`p`,{className:`m-0 mb-2 text-muted`,children:`Reload when a compared ref moves.`}),(0,g.jsx)(`div`,{role:`radiogroup`,"aria-label":`Reload behavior`,className:`flex flex-col gap-1`,children:pK.map(([e,t])=>(0,g.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-1.5`,children:[(0,g.jsx)(`input`,{type:`radio`,name:`follow-refs`,value:e,checked:s===e,onChange:()=>c(e)}),t]},e))}),(0,g.jsx)(`h3`,{className:`m-0 mt-[14px] mb-2`,children:`Language servers`}),(0,g.jsxs)(`p`,{className:`m-0 mb-2 text-muted`,children:[(0,g.jsx)(`code`,{children:`diffle lsp`}),` lists them; `,(0,g.jsx)(`code`,{children:`diffle config set-lsp`}),` overrides one.`]}),d.length>0&&(0,g.jsxs)(`p`,{className:`m-0 mb-2 text-muted`,children:[`Overrides:`,` `,d.map(([e,t],n)=>(0,g.jsxs)(`span`,{children:[n>0&&`, `,e,` `,(0,g.jsx)(`code`,{children:t||`(off)`})]},e))]}),(0,g.jsxs)(`div`,{className:`mt-2.5 flex items-center gap-1.5`,children:[(0,g.jsxs)(`span`,{className:`flex-1 text-[0.75rem] text-muted`,title:`Installed diffle version`,children:[`diffle v`,`0.2.1`]}),(0,g.jsx)(X,{onClick:e,children:`Cancel`}),(0,g.jsx)(X,{variant:`primary`,onClick:f,disabled:l,children:`Save`})]})]})}function hK(){let e=Z(e=>e.snapshot),t=Z(e=>e.lsp),[n,r]=(0,p.useState)(!1),i=Z(e=>e.theme),a=Z(e=>e.setTheme),o=Z(e=>e.layout),s=Z(e=>e.setLayout),c=Z(e=>e.diffStyle),l=Z(e=>e.setDiffStyle),u=e?.changed.length??0,d=e?.changed.reduce((e,t)=>e+t.additions,0)??0,f=e?.changed.reduce((e,t)=>e+t.deletions,0)??0;return(0,g.jsxs)(`header`,{className:`col-span-full flex items-center gap-2.5 border-b border-b-border bg-surface px-3 py-0`,children:[(0,g.jsx)(X,{variant:`ghost`,icon:!0,className:o.treeVisible?``:`opacity-45`,onClick:()=>s({treeVisible:!o.treeVisible}),title:`Toggle file tree (⌘/Ctrl+b)`,children:(0,g.jsx)(PM,{size:`1rem`})}),(0,g.jsx)(aG,{}),(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 font-bold tracking-[0.02em] max-sm:hidden`,children:[(0,g.jsx)(xM,{size:`1rem`}),` `,(0,g.jsx)(`span`,{className:`max-lg:hidden`,children:`diffle`})]}),(0,g.jsx)(`span`,{className:`truncate font-mono text-[0.75rem] text-muted max-lg:hidden`,title:e?.root,children:e?sP(e):``}),(0,g.jsx)(dK,{}),(0,g.jsx)(rG,{}),e?.commit&&(0,g.jsx)(`span`,{className:`max-w-[24rem] min-w-0 shrink-[100] truncate text-[0.8125rem] max-md:hidden`,title:e.commit.message,children:e.commit.message.split(`
|
|
1637
|
+
`,1)[0]}),(0,g.jsx)(iG,{}),(0,g.jsx)(fK,{}),(0,g.jsxs)(`span`,{className:`shrink-0 whitespace-nowrap text-muted max-md:hidden`,children:[u,` files · `,(0,g.jsxs)(`span`,{className:`text-add`,children:[`+`,d]}),` `,(0,g.jsxs)(`span`,{className:`text-del`,children:[`−`,f]})]}),(0,g.jsx)(`span`,{className:`flex-1`}),t.enabled&&(0,g.jsx)(gK,{lsp:t}),(0,g.jsxs)(tG,{title:`Diff layout (s)`,children:[(0,g.jsxs)(nG,{selected:c===`split`,onClick:()=>l(`split`),"aria-label":`Split`,children:[(0,g.jsx)(oM,{size:`0.875rem`}),` `,(0,g.jsx)(`span`,{className:`max-xl:hidden`,children:`Split`})]}),(0,g.jsxs)(nG,{selected:c===`unified`,onClick:()=>l(`unified`),"aria-label":`Unified`,children:[(0,g.jsx)(HM,{size:`0.875rem`}),` `,(0,g.jsx)(`span`,{className:`max-xl:hidden`,children:`Unified`})]})]}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,onClick:()=>a(ZP(i)),title:`Theme: ${i} (t)`,children:(0,g.jsx)(yK,{choice:i})}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,onClick:()=>Z.getState().setHelpOpen(!0),title:`Keyboard shortcuts (?)`,children:(0,g.jsx)(EM,{size:`1rem`})}),(0,g.jsxs)(X,{variant:`ghost`,onClick:()=>r(!0),title:`Settings`,"aria-label":`Settings`,children:[(0,g.jsx)(WM,{size:`0.9375rem`}),` `,(0,g.jsx)(`span`,{className:`max-xl:hidden`,children:`Settings`})]}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,className:o.panelVisible?``:`opacity-45`,onClick:()=>s({panelVisible:!o.panelVisible}),title:`Toggle comments panel (⌘/Ctrl+Shift+b)`,children:(0,g.jsx)(FM,{size:`1rem`})}),n&&(0,g.jsx)(mK,{onClose:()=>r(!1)})]})}function gK({lsp:e}){let t=(0,p.useRef)(null),n=()=>{t.current&&(t.current.open=!1,t.current.querySelector(`summary`)?.focus())};(0,p.useEffect)(()=>{let e=e=>{let n=t.current;n?.open&&!n.contains(e.target)&&(n.open=!1)},r=e=>{e.key!==`Escape`||!t.current?.open||(e.preventDefault(),e.stopPropagation(),n())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,r,!0)}},[]);let r=e.servers.some(e=>e.state===`starting`),i=r||e.servers.some(e=>e.activity?.length),a=e.servers.some(e=>e.state===`unavailable`),o=e.servers.some(e=>e.notice?.severity===`error`),s=e.servers.some(e=>e.notice?.severity===`warning`),c=e.servers.some(e=>e.stderr),l=a&&`unavailable`||o&&`error`||s&&`warning`||r&&`starting`||i&&`busy`||c&&`logs`||``;return(0,g.jsxs)(`details`,{ref:t,className:`relative`,children:[(0,g.jsxs)(`summary`,{className:Ij(`flex cursor-pointer list-none items-center gap-1.25 text-xs whitespace-nowrap text-muted [&::-webkit-details-marker]:hidden ${o||a?`text-warn`:``}`),"aria-label":`Language servers${l?`: ${l}`:``}`,children:[i?(0,g.jsx)(kM,{size:`0.875rem`,className:`animate-spin`}):(0,g.jsx)(sM,{size:`0.875rem`}),(0,g.jsx)(`span`,{className:`max-lg:hidden`,children:l})]}),(0,g.jsxs)(`section`,{className:`absolute top-[calc(100%+0.75rem)] right-0 z-100 max-h-[65vh] w-[min(28rem,85vw)] overflow-auto rounded-lg border border-border bg-surface p-2.5 text-[0.8125rem] text-foreground shadow-lg`,"aria-label":`Language server status`,children:[(0,g.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,g.jsx)(`strong`,{children:`Language servers`}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,type:`button`,"aria-label":`Close language server status`,className:`border-0 p-0.5 text-muted hover:text-foreground`,onClick:n,children:(0,g.jsx)(XM,{size:`0.875rem`})})]}),e.servers.map(e=>(0,g.jsx)(_K,{server:e},e.command)),!e.servers.length&&!e.missing.length&&(0,g.jsx)(`p`,{className:`text-muted`,children:`No servers`}),e.missing.map(e=>(0,g.jsxs)(`div`,{className:`mt-1.5 flex items-center gap-2 border-t border-border pt-1.5 text-muted`,title:e.tried.join(`, `),children:[(0,g.jsx)(XM,{size:`0.875rem`,className:`shrink-0`}),(0,g.jsx)(`span`,{className:`min-w-0 flex-1 font-medium wrap-anywhere text-foreground`,children:e.language}),(0,g.jsx)(`span`,{className:`shrink-0 text-[0.6875rem]`,children:e.tried.length?`Not on PATH`:`Disabled`})]},e.language))]})]})}function _K({server:e}){let t=e.state===`starting`||!!e.activity?.length,n=e.state===`unavailable`||!!e.notice,r=e.state===`unavailable`?`Unavailable`:e.state===`starting`?`Starting`:t?`Working`:`Connected`;return(0,g.jsxs)(`div`,{className:`mt-1.5 border-t border-border pt-1.5`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t?(0,g.jsx)(kM,{size:`0.875rem`,className:`shrink-0 animate-spin text-accent`}):n?(0,g.jsx)(iM,{size:`0.875rem`,className:`shrink-0 text-warn`}):(0,g.jsx)(Zj,{size:`0.875rem`,className:`shrink-0 text-add`}),(0,g.jsx)(`strong`,{className:`min-w-0 flex-1 font-medium wrap-anywhere`,children:e.name}),(0,g.jsx)(`span`,{className:`shrink-0 text-[0.6875rem] text-muted`,title:r===`Connected`?`Initialized; workspace readiness is not reported by LSP`:void 0,children:r})]}),(0,g.jsx)(`div`,{className:`mt-0.5 mb-0.5 ml-5.5 text-[0.6875rem] text-muted`,children:e.languages.join(`, `)}),e.activity?.map((e,t)=>(0,g.jsx)(`p`,{className:`my-1.5 ml-5.5 wrap-anywhere`,children:e},t)),e.message&&(0,g.jsx)(`p`,{className:`my-1.5 ml-5.5 wrap-anywhere text-warn`,children:e.message}),e.notice&&(0,g.jsx)(`p`,{className:`my-1.5 ml-5.5 wrap-anywhere text-warn`,children:e.notice.message}),(0,g.jsxs)(`details`,{className:`ml-5.5 text-[0.6875rem] text-muted`,children:[(0,g.jsx)(`summary`,{className:`cursor-pointer`,children:`Details`}),(0,g.jsx)(`pre`,{className:`my-2 font-mono wrap-anywhere whitespace-pre-wrap`,children:e.command}),e.stderr&&(0,g.jsx)(vK,{text:e.stderr})]})]})}function vK({text:e}){let[t,n]=(0,p.useState)(null);return(0,p.useEffect)(()=>{if(!t)return;let e=setTimeout(()=>n(null),3e3);return()=>clearTimeout(e)},[t]),(0,g.jsxs)(`div`,{className:`my-2`,children:[(0,g.jsxs)(`div`,{className:`flex items-center justify-between py-1`,children:[(0,g.jsx)(`span`,{children:`stderr`}),(0,g.jsxs)(X,{variant:`ghost`,type:`button`,"aria-label":`Copy stderr`,onClick:async()=>n(await QM(e)?`copied`:`failed`),children:[t===`copied`?(0,g.jsx)(Zj,{size:`0.75rem`}):(0,g.jsx)(cM,{size:`0.75rem`}),(0,g.jsx)(`span`,{"aria-live":`polite`,children:t===`copied`?`Copied`:`Copy`})]})]}),t===`failed`&&(0,g.jsx)(`p`,{role:`status`,className:`m-2 text-warn`,children:`Copy failed. Select the log and press Ctrl/⌘+C.`}),(0,g.jsx)(`pre`,{"aria-label":`stderr log`,tabIndex:0,className:`m-0 max-h-[min(12rem,25vh)] overflow-auto overscroll-contain p-2 font-mono whitespace-pre text-foreground`,children:e})]})}function yK({choice:e}){return e===`light`?(0,g.jsx)(KM,{size:`1rem`}):e===`dark`?(0,g.jsx)(NM,{size:`1rem`}):(0,g.jsx)(MM,{size:`1rem`})}var bK=[[{title:`Move`,rows:[[`j / k or ↓ / ↑`,`next / previous line`],[`{n}j / {n}k`,`n lines down / up`],[`Ctrl+d / Ctrl+u`,`half a page down / up`],[`Ctrl+o / Ctrl+i`,`jump back / forward in history`],[`← or ⌘/Ctrl+Shift+e / →`,`focus the file tree / back to the diff`],[`V, then j / k`,`extend a block selection`]]},{title:`Files and hunks`,rows:[[`J / K`,`next / previous file`],[`gg / G`,`first / last file`],[`{n}gg / {n}G`,`line n of the current file`],[`] / [ n / N`,`next / previous hunk (n / N follow matches while searching)`],[`v`,`toggle viewed on the current file`],[`gv`,`toggle viewed on the file above`],[`zo / zc`,`expand / collapse the current file (zo loads a large diff)`],[`zO / zC`,`open / close all files`],[`F`,`view the current file whole; Ctrl+o returns`]]},{title:`Comments`,rows:[[`c`,`comment on the current line or selection`],[`C`,`comment on the current file as a whole`],[`e`,`edit the newest message of the thread under the cursor`],[`dd`,`delete the thread under the cursor`],[`R`,`resolve / reopen the thread under the cursor`],[`yy or Y`,`copy all comments`],[`yp`,`copy the current file’s path`]]}],[{title:`Search`,rows:[[`/`,`search the current file, then n / N between matches`],[`g/`,`search changed files (toggle: diff + context / full file)`],[`⌘/Ctrl+p or gf`,`search files by name`],[`w / b`,`focus the next / previous symbol on the line`],[`0 / $`,`focus the first / last symbol on the line`],[`* / #`,`next / previous occurrence of the focused word`]]},{title:`Code intelligence (language server)`,rows:[[`hover a symbol or gh`,`signature and docs tooltip (gh: focused word); Esc closes`],[`click a symbol`,`definition / type definition / references popover`],[`gd or ⌘/Ctrl+click`,`go to the definition, or its references from there`],[`gy`,`go to the definition of the hovered symbol’s type`],[`gA`,`list references; j / k, Enter to jump, n / N to step`],[`gs / gS`,`symbols in the current file / across the repository`]]},{title:`View`,rows:[[`zz`,`scroll the current line to eye level`],[`zt / zb`,`scroll the current line to the top / bottom`],[`s`,`toggle split / unified`],[`t`,`cycle theme`],[`⌘/Ctrl+b`,`toggle the file tree (Shift: comments panel)`],[`o`,`GitHub repository and pull request`],[`m, then 1–6`,`open the mode picker and choose an entry`],[`< / >`,`older / newer commit or range-diff pair`]]},{title:`Iterations`,rows:[[`r`,`reload once the compared refs moved`],[`ii`,`latest iteration vs. the one before; again: the range`],[`ij / ik`,`span’s lower end one iteration older / newer`],[`iJ / iK`,`span’s higher end one iteration older / newer`],[`i, then 1–9`,`compare that iteration with the latest`]]},{title:`General`,rows:[[`?`,`toggle this help`],[`Esc`,`close composer, search, or menu; clear selection`]]}]];function xK(){let e=Z(e=>e.helpOpen),t=Z(e=>e.setHelpOpen);return e?(0,g.jsxs)(Lj,{label:`Keyboard shortcuts`,onClose:()=>t(!1),className:`flex max-h-[calc(100vh_-_2rem)] w-max max-w-[96vw] flex-col overflow-hidden p-0`,children:[(0,g.jsxs)(`div`,{className:`flex items-center justify-between border-b border-b-border px-4.5 pt-3 pb-2.5`,children:[(0,g.jsx)(`h3`,{className:`m-0 text-[0.9375rem]`,children:`Keyboard shortcuts`}),(0,g.jsx)(X,{onClick:()=>t(!1),children:`Close`})]}),(0,g.jsx)(`div`,{className:`grid grid-cols-[auto_auto] items-start gap-x-10 overflow-auto px-4.5 pt-2.5 pb-3.5 text-[0.75rem] whitespace-nowrap`,children:bK.map((e,t)=>(0,g.jsx)(`div`,{className:`grid grid-cols-[max-content_1fr] content-start gap-x-3`,children:e.map(e=>(0,g.jsxs)(`section`,{className:`col-span-full mb-2.5 grid grid-cols-subgrid last:mb-0`,children:[(0,g.jsx)(`h4`,{className:`col-span-full m-0 mb-0.5 text-[0.75rem] font-semibold text-muted`,children:e.title}),e.rows.map(([e,t])=>(0,g.jsxs)(`div`,{className:`col-span-full grid grid-cols-subgrid items-baseline leading-[1.7]`,children:[(0,g.jsx)(`span`,{className:`inline-flex gap-1.5`,children:e.split(/\s{2,}/).map((e,t)=>(0,g.jsx)(`kbd`,{children:e},t))}),(0,g.jsx)(`span`,{children:t})]},e))]},e.title))},t))})]}):null}function SK({path:e}){return Z(t=>{let n=t.search.kind===`text`&&t.search.scope===`file`;return t.search.open&&(n?t.search.path===e:e===void 0)})?(0,g.jsx)(CK,{}):null}function CK(){let e=Z(e=>e.search),t=Z(e=>e.runSearch),n=Z(e=>e.closeSearch),r=Z(e=>e.setSearchOptions),i=Z(e=>e.setSearchInput),a=(0,p.useRef)(null);(0,p.useEffect)(()=>{e.editing&&a.current?.focus({preventScroll:!0})},[e.editing,e.focusNonce]);let o=e.matches.length;if(e.kind!==`text`)return(0,g.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-b-border bg-surface px-2.5 py-1.5`,children:[e.kind===`references`?(0,g.jsx)(OM,{size:`0.875rem`}):(0,g.jsx)(YM,{size:`0.875rem`}),(0,g.jsxs)(`span`,{className:`flex-1 font-mono text-[0.75rem] leading-[normal] text-muted [&_code]:text-foreground`,children:[e.kind===`references`?`references to`:e.direction===1?`occurrences of`:`occurrences (upwards) of`,` `,(0,g.jsx)(`code`,{children:e.query})]}),(0,g.jsx)(`span`,{className:`min-w-17.5 text-right font-mono text-[0.75rem] leading-[normal] text-muted`,children:e.loading?`searching…`:o?`${e.index+1} / ${o}${e.truncated?`+`:``}`:`none`}),(0,g.jsx)(X,{type:`button`,variant:`ghost`,icon:!0,onClick:n,title:`Close (Esc)`,children:(0,g.jsx)(XM,{size:`0.875rem`})})]});let s=e.content[e.scope]===`full`,c=s?_M:hM;return(0,g.jsxs)(`form`,{className:`flex items-center gap-2 border-b border-b-border bg-surface px-2.5 py-1.5`,onClick:e=>e.stopPropagation(),onSubmit:n=>{n.preventDefault(),t(e.input).then(()=>{a.current?.blur(),document.querySelector(`main[tabindex]`)?.focus({preventScroll:!0})})},children:[(0,g.jsx)(UM,{size:`0.875rem`}),(0,g.jsx)(`input`,{"data-content-search":``,className:`min-w-0 flex-1 rounded-md border border-border bg-canvas px-2 py-1 font-mono text-[0.75rem]`,ref:a,value:e.input,onFocus:()=>{e.editing||i(e.input)},onChange:e=>i(e.target.value),placeholder:e.scope===`file`?`Search this file… (Enter, then n / N)`:`Search all files… (Enter, then n / N)`,spellCheck:!1}),(0,g.jsx)(X,{type:`button`,variant:`ghost`,className:Ij(`rounded-sm border border-transparent px-1.5 py-[2px] font-mono text-[0.6875rem] leading-[normal] text-muted ${e.ignoreCase?``:`border-accent bg-[color-mix(in_srgb,_var(--accent)_12%,_transparent)] text-accent`}`),"aria-pressed":!e.ignoreCase,onClick:()=>r({ignoreCase:!e.ignoreCase}),title:e.ignoreCase?`Ignoring case; click to match case`:`Matching case; click to ignore case`,children:`Aa`}),(0,g.jsx)(X,{type:`button`,variant:`ghost`,className:Ij(`rounded-sm border border-transparent px-1.5 py-[2px] font-mono text-[0.6875rem] leading-[normal] text-muted ${e.regex?`border-accent bg-[color-mix(in_srgb,_var(--accent)_12%,_transparent)] text-accent`:``}`),"aria-pressed":e.regex,onClick:()=>r({regex:!e.regex}),title:e.regex?`Extended regex; click for plain text`:`Plain text; click for extended regex`,children:`.*`}),(0,g.jsx)(X,{type:`button`,variant:`ghost`,className:Ij(`rounded-sm border border-transparent px-1.5 py-[2px] font-mono text-[0.6875rem] leading-[normal] text-muted ${s?`border-accent bg-[color-mix(in_srgb,_var(--accent)_12%,_transparent)] text-accent`:``}`),"aria-label":`Search full file`,"aria-pressed":s,onClick:()=>r({content:s?`diff`:`full`}),title:s?`Searching full file; click to search diff + context`:`Searching diff + context; click to search full file`,children:(0,g.jsx)(c,{size:`0.75rem`})}),(0,g.jsx)(`span`,{className:`min-w-17.5 text-right font-mono text-[0.75rem] leading-[normal] text-muted`,children:e.loading?`searching…`:o===0&&e.query?e.scope===`file`?`none in file`:s?`no matches`:`none in diff`:o?`${e.index+1} / ${o}${e.truncated?`+`:``}`:``}),(0,g.jsx)(X,{type:`button`,variant:`ghost`,icon:!0,onClick:n,title:`Close (Esc)`,children:(0,g.jsx)(XM,{size:`0.875rem`})})]})}var wK=250,TK=6,EK=`fixed z-40 rounded-lg border border-border bg-canvas px-3 py-2 text-[0.75rem] shadow-[0_0.5rem_1.5rem_rgba(0,_0,_0,_0.18)]`;function DK({boxRef:e,anchor:t,className:n,children:r,onPointerEnter:i,onPointerLeave:a}){let o=(0,p.useRef)(null),s=e??o;return(0,p.useLayoutEffect)(()=>{let e=s.current;if(!e)return;let{width:n,height:r}=e.getBoundingClientRect(),i=t.bottom+TK+r<=window.innerHeight;e.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-n-8))}px`,e.style.top=`${i?t.bottom+TK:Math.max(8,t.top-TK-r)}px`},[t,s]),(0,g.jsx)(`div`,{ref:s,role:`tooltip`,className:Ij(EK,n),onPointerEnter:i,onPointerLeave:a,children:r})}function OK(){let[e,t]=(0,p.useState)(null);return(0,p.useEffect)(()=>{let e=null,n=null,r=null,i=()=>{e!==null&&clearTimeout(e),e=null},a=()=>{i(),n&&r!==null&&!n.hasAttribute(`title`)&&n.setAttribute(`title`,r),n=null,r=null,t(null)},o=(r,a,o)=>{i();let s=()=>{let e=r.getBoundingClientRect();t({text:a,anchor:{left:e.left,top:e.top,bottom:e.bottom}})};o===0?s():e=setTimeout(()=>{e=null,n===r&&s()},o)},s=(e,t)=>{if(e===n)return;let i=e.getAttribute(`title`);a(),i&&(n=e,r=i,e.removeAttribute(`title`),o(e,i,t))},c=e=>{let t=e.composedPath()[0];return t instanceof Element?t.closest(`[title]`):null},l=e=>!(e instanceof Node)||!n?.contains(e),u=new Set,d=e=>{for(let e of u)e.host.isConnected||(x(e),u.delete(e));for(let t of e.composedPath())!(t instanceof ShadowRoot)||u.has(t)||(u.add(t),b(t))},f=e=>{d(e);let t=c(e);t&&s(t,wK)},p=e=>{n&&l(e.relatedTarget)&&a()},m=e=>{d(e);let t=c(e);t?.matches(`:focus-visible`)&&s(t,0)},h=e=>{n&&l(e.relatedTarget)&&a()},g=e=>{e.key===`Escape`&&a()},_=()=>{if(!n)return;let e=n.getAttribute(`title`);e!==null&&(r=e,n.removeAttribute(`title`),o(n,e,0))},v=()=>a(),y=()=>a(),b=e=>{e.addEventListener(`pointerover`,f),e.addEventListener(`pointerout`,p),e.addEventListener(`focusin`,m),e.addEventListener(`focusout`,h),e.addEventListener(`scroll`,y,!0)},x=e=>{e.removeEventListener(`pointerover`,f),e.removeEventListener(`pointerout`,p),e.removeEventListener(`focusin`,m),e.removeEventListener(`focusout`,h),e.removeEventListener(`scroll`,y,!0)};return b(document),document.addEventListener(`pointermove`,_),document.addEventListener(`keydown`,g,!0),document.addEventListener(`pointerdown`,v,!0),()=>{i(),x(document);for(let e of u)x(e);document.removeEventListener(`pointermove`,_),document.removeEventListener(`keydown`,g,!0),document.removeEventListener(`pointerdown`,v,!0)}},[]),e?(0,g.jsx)(DK,{anchor:e.anchor,className:`pointer-events-none max-w-[min(28rem,_90vw)] wrap-anywhere whitespace-pre-line`,children:e.text}):null}var kK=300,AK=!1,jK=!1,MK=null,NK=null,PK=()=>{MK&&clearTimeout(MK),MK=null},FK=()=>{NK&&clearTimeout(NK),NK=null},IK=()=>{FK(),!(AK||jK)&&(NK=setTimeout(()=>{NK=null,Z.getState().closeHover()},150))},LK={enter(e,t){AK=!0,PK(),IK(),MK=setTimeout(()=>{MK=null;let n=t.getBoundingClientRect();Z.getState().requestHover(e,{left:n.left,top:n.top,bottom:n.bottom})},kK)},leave(){AK=!1,PK(),IK()},tipEnter(){jK=!0,IK()},tipLeave(){jK&&(jK=!1,IK())},cancel(){PK(),FK(),Z.getState().closeHover()}};function RK(){let e=Z(e=>e.hover),t=(0,p.useRef)(null);return(0,p.useEffect)(()=>{let e=new Set([`Shift`,`Control`,`Alt`,`Meta`,`CapsLock`]),n=t=>{t.key!==`Escape`&&!e.has(t.key)&&LK.cancel()},r=e=>e.target instanceof Node&&!!t.current?.contains(e.target),i=e=>{r(e)||LK.cancel()};return document.addEventListener(`keydown`,n,!0),document.addEventListener(`scroll`,i,!0),document.addEventListener(`pointerdown`,i,!0),()=>{document.removeEventListener(`keydown`,n,!0),document.removeEventListener(`scroll`,i,!0),document.removeEventListener(`pointerdown`,i,!0)}},[]),e?(0,g.jsx)(zK,{hover:e,boxRef:t}):null}function zK({hover:e,boxRef:t}){return(0,p.useEffect)(()=>LK.tipLeave,[]),(0,g.jsx)(DK,{boxRef:t,anchor:e.anchor,className:`hover-markdown max-h-[45vh] max-w-[min(40rem,_90vw)] overflow-auto`,onPointerEnter:LK.tipEnter,onPointerLeave:LK.tipLeave,children:(0,g.jsx)(xW,{text:e.contents,path:e.target.path,highlight:!0})})}function BK(e){let t=t=>Math.round(t*e),n=t(1.25),r=t(.5),i=n+3*r,a=t(2);return{itemMetrics:{lineHeight:n,spacing:r,diffHeaderHeight:i,hunkSeparatorHeight:a},layout:{paddingTop:t(.75),paddingBottom:t(12.5),gap:t(1)},css:`
|
|
1638
1638
|
:host {
|
|
1639
1639
|
--diffle-header-height: ${i}px;
|
|
1640
1640
|
--diffs-font-size: ${t(.8125)}px;
|
|
@@ -1650,8 +1650,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1650
1650
|
}
|
|
1651
1651
|
[data-diffs-header='custom'] { height: auto; }
|
|
1652
1652
|
[data-separator='line-info'] { height: ${a}px; }
|
|
1653
|
-
`,edge:t(3)}}function
|
|
1654
|
-
`)})).catch(e=>t({message:e instanceof Error?e.message:String(e)}))}},[e,t,i]);let h=f?a.get(f):void 0,_=h&&`lines`in h?h.lines:null,v=Math.max(1,m-zK),y=(0,p.useMemo)(()=>_?.slice(v-1,m+zK)??null,[_,v,m]),b=c.theme===n?c.tokens:void 0;return(0,p.useEffect)(()=>{if(!y||!f)return;let e=c.theme===n?c.tokens:new Map,t=[...new Set(y)].filter(t=>!e.has(`${f}\n${t}`));if(t.length===0)return;let r=!0;return fW(t,f,n).then(e=>{r&&l(r=>{let i=new Map(r.theme===n?r.tokens:[]);return e.forEach((e,n)=>i.set(`${f}\n${t[n]}`,e)),{theme:n,tokens:i}})}).catch(()=>{}),()=>{r=!1}},[y,f,n,c]),(0,p.useEffect)(()=>{let e=document.activeElement;return u.current?.focus({preventScroll:!0}),()=>e?.focus({preventScroll:!0})},[]),(0,p.useLayoutEffect)(()=>{let e=u.current,t=e?.querySelector(`[data-target="true"]`);!e||!t||(e.scrollTop=t.offsetTop-(e.clientHeight-t.offsetHeight)/2)},[y]),d?(0,g.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-b-border px-3.5 py-1.5 font-mono text-[0.75rem] text-muted [&>svg]:flex-none`,children:[(0,g.jsx)(dM,{size:`0.875rem`}),(0,g.jsx)(oF,{path:d.path,nowrap:!0,className:`min-w-0 flex-1`}),(0,g.jsxs)(`span`,{className:`ml-auto`,children:[`:`,d.line]})]}),(0,g.jsx)(`div`,{className:`relative flex-1 overflow-auto py-2 font-mono text-[0.75rem] leading-[1.6] outline-none`,role:`region`,"aria-label":`Peek`,tabIndex:-1,ref:u,children:y?y.map((e,t)=>{let n=v+t;return(0,g.jsxs)(`div`,{"data-target":n===m,className:Nj(`group grid cursor-pointer grid-cols-[3.25rem_1fr] gap-3 pr-3.5`,n===m&&`bg-hover`),onClick:()=>getSelection()?.isCollapsed!==!1&&r(n),children:[(0,g.jsx)(`span`,{className:`pr-1.5 text-right text-muted group-hover:bg-hover group-hover:text-foreground`,children:n}),(0,g.jsx)(`span`,{className:`whitespace-pre`,children:(0,g.jsx)(_W,{tokens:b?.get(`${d.path}\n${e}`),fallback:e})})]},n)}):h&&`message`in h?(0,g.jsx)(`p`,{className:`px-3.5 text-muted`,children:h.message}):null})]}):(0,g.jsx)(`div`,{className:`flex-1`})}var HK=(0,p.memo)(function({row:e,on:t,tokens:n,onPick:r}){return(0,g.jsxs)(`div`,{"data-active":t,className:Nj(`grid cursor-pointer grid-cols-[3.25rem_1fr] gap-3 rounded-md px-2.5 py-0.75 font-mono text-[0.75rem] leading-[1.6] hover:bg-surface ${t?`bg-hover hover:bg-hover`:``}`),onMouseDown:e=>e.preventDefault(),onClick:()=>r(e.i),children:[(0,g.jsx)(`span`,{className:`text-right text-muted`,children:e.line}),(0,g.jsx)(`span`,{className:`overflow-hidden text-ellipsis whitespace-pre`,children:(0,g.jsx)(_W,{tokens:n,fallback:e.text})})]})});function UK(){let e=Z(e=>e.symbolMenu),t=Z(e=>e.theme),n=Z(e=>e.closeSymbolMenu),r=Z(e=>e.goToDefinition),i=Z(e=>e.goToTypeDefinition),a=Z(e=>e.findReferences),o=hW((0,p.useMemo)(()=>e?[{path:e.target.path,text:e.target.text}]:[],[e]),t);if((0,p.useEffect)(()=>{if(!e)return;let t=e=>{e.composedPath().some(e=>e instanceof HTMLElement&&e.hasAttribute(`data-symbol-menu`))||n()};return document.addEventListener(`pointerdown`,t,!0),document.addEventListener(`scroll`,n,!0),()=>{document.removeEventListener(`pointerdown`,t,!0),document.removeEventListener(`scroll`,n,!0)}},[e,n]),!e)return null;let s=VG(),c=28.75*s,l=2.75*s,u=Math.max(8,Math.min(e.x,window.innerWidth-c-8)),d=e.y+l<window.innerHeight?{left:u,top:e.y+12}:{left:u,top:e.y-l};return(0,g.jsxs)(`div`,{className:`fixed z-40 flex gap-[2px] rounded-lg border border-border bg-canvas p-0.75 shadow-[0_0.5rem_1.5rem_rgba(0,_0,_0,_0.18)]`,style:d,role:`menu`,"data-symbol-menu":!0,children:[(0,g.jsxs)(X,{className:`flex cursor-pointer items-center gap-1.5 rounded-md border-0 bg-transparent px-2 py-1 font-sans text-[0.75rem] leading-[normal] text-foreground hover:bg-hover`,onClick:()=>void r(e.target),title:`Go to definition (gd)`,children:[(0,g.jsx)(oM,{size:`0.8125rem`}),` Definition `,(0,g.jsx)(`kbd`,{className:`ml-[2px]`,children:`gd`})]}),(0,g.jsxs)(X,{className:`flex cursor-pointer items-center gap-1.5 rounded-md border-0 bg-transparent px-2 py-1 font-sans text-[0.75rem] leading-[normal] text-foreground hover:bg-hover`,onClick:()=>void a(e.target),title:`Find references (gA)`,children:[(0,g.jsx)(TM,{size:`0.8125rem`}),` References `,(0,g.jsx)(`kbd`,{className:`ml-[2px]`,children:`gA`})]}),(0,g.jsxs)(X,{className:`flex cursor-pointer items-center gap-1.5 rounded-md border-0 bg-transparent px-2 py-1 font-sans text-[0.75rem] leading-[normal] text-foreground hover:bg-hover`,onClick:()=>void i(e.target),title:`Go to type definition (gy)`,children:[(0,g.jsx)(HM,{size:`0.8125rem`}),` Type `,(0,g.jsx)(`kbd`,{className:`ml-[2px]`,children:`gy`})]}),(0,g.jsx)(`span`,{className:`ml-1 max-w-55 self-center truncate border-l border-l-border px-2 py-0.75 font-mono text-[0.75rem] leading-[normal] text-foreground`,title:e.target.text,children:(0,g.jsx)(_W,{tokens:o.get(`${e.target.path}\n${e.target.text}`),fallback:e.target.text})})]})}var WK={1:`file`,2:`module`,3:`namespace`,4:`package`,5:`class`,6:`method`,7:`property`,8:`field`,9:`ctor`,10:`enum`,11:`interface`,12:`function`,13:`variable`,14:`constant`,15:`string`,16:`number`,17:`boolean`,18:`array`,19:`object`,20:`key`,21:`null`,22:`member`,23:`struct`,24:`event`,25:`operator`,26:`type param`};function GK(e){return[5,10,11,23,26].includes(e)?`type`:[6,9,12].includes(e)?`callable`:[7,8,13,14,20,22,24].includes(e)?`value`:e<=4?`scope`:`other`}function KK(){let e=Z(e=>e.symbols),t=Z(e=>e.querySymbols),n=Z(e=>e.moveSymbol),r=Z(e=>e.pickSymbol),i=Z(e=>e.closeSymbols),[a,o]=(0,p.useState)(``),s=(0,p.useRef)(null),c=(0,p.useRef)(null);if((0,p.useEffect)(()=>{e.open&&(o(``),s.current?.focus())},[e.open,e.scope]),(0,p.useEffect)(()=>{c.current?.querySelector(`[aria-selected="true"]`)?.scrollIntoView({block:`nearest`})},[e.index]),!e.open)return null;let l=e=>{o(e),t(e)},u=e=>{let t=e.key===`ArrowDown`||e.ctrlKey&&e.key===`n`,i=e.key===`ArrowUp`||e.ctrlKey&&e.key===`p`;t||i?(e.preventDefault(),n(t?1:-1)):e.key===`Enter`&&(e.preventDefault(),r())},d=e.scope===`document`?`Symbols in ${e.path??`file`}…`:`Search symbols across the repository…`,f={type:`text-kind-type`,callable:`text-kind-callable`,value:`text-kind-value`,scope:`text-muted`,other:`text-muted`},m=e.loading?`loading…`:e.items.length?`${e.index+1} / ${e.items.length}`:``;return(0,g.jsxs)(`div`,{className:`absolute top-0 right-0 left-0 z-30 flex max-h-[60%] flex-col border-b border-b-border bg-surface shadow-[0_0.625rem_1.875rem_rgba(0,_0,_0,_0.18)]`,role:`dialog`,"aria-label":`Symbols`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-b-border bg-surface px-2.5 py-1.5`,children:[(0,g.jsx)(xM,{size:`0.875rem`}),(0,g.jsx)(`input`,{className:`flex-1 rounded-md border border-border bg-canvas px-2 py-1 font-mono text-[0.75rem]`,ref:s,value:a,onChange:e=>l(e.target.value),onKeyDown:u,placeholder:d,spellCheck:!1}),(0,g.jsx)(`span`,{className:`min-w-17.5 text-right font-mono text-[0.75rem] leading-[normal] text-muted`,children:m}),(0,g.jsx)(X,{type:`button`,variant:`ghost`,icon:!0,onClick:i,title:`Close (Esc)`,children:(0,g.jsx)(qM,{size:`0.875rem`})})]}),e.items.length>0?(0,g.jsx)(`ul`,{role:`listbox`,"aria-label":`Symbols`,className:`m-0 list-none overflow-auto p-1`,ref:c,children:e.items.map((t,n)=>(0,g.jsxs)(`li`,{role:`option`,"aria-selected":n===e.index,className:Nj(`grid cursor-pointer grid-cols-[4rem_1fr_auto] items-baseline gap-2.5 rounded-md px-2 py-1 font-mono text-[0.75rem] leading-[normal]`,n===e.index?`bg-hover`:``),onMouseDown:e=>e.preventDefault(),onClick:()=>{Z.setState(e=>({symbols:{...e.symbols,index:n}})),r()},children:[(0,g.jsx)(`span`,{className:Nj(`text-[0.6875rem] text-muted lowercase ${f[GK(t.kind)]}`),children:WK[t.kind]??`symbol`}),(0,g.jsxs)(`span`,{children:[t.name,t.container&&(0,g.jsxs)(`span`,{className:`text-muted`,children:[` · `,t.container]})]}),(0,g.jsxs)(`span`,{className:`text-[0.6875rem] whitespace-nowrap text-muted`,children:[e.scope===`workspace`&&(0,g.jsx)(oF,{path:t.path,nowrap:!0}),e.scope===`workspace`?`:`:``,t.line]})]},`${t.path}:${t.line}:${t.col}:${t.name}`))}):(0,g.jsx)(`div`,{className:`p-3`,children:e.loading?``:e.scope===`workspace`&&!a.trim()?`Type to search`:`No symbols`})]})}var qK=`diffle-search`,JK=`diffle-search-current`;function YK(e){if(!e.open||!e.query||e.matches.length===0)return null;let t=e.query.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);try{if(e.kind===`word`)return RegExp(`(?<![\\p{L}\\p{N}_])${t}(?![\\p{L}\\p{N}_])`,`gu`);if(e.kind===`text`)return new RegExp(e.regex?e.query:t,e.ignoreCase?`gi`:`g`)}catch{return null}return null}function XK(e,t){let n=[],r=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),i=``,a=[];for(let e=r.nextNode();e;e=r.nextNode())n.push(e),a.push(i.length),i+=e.data;if(!i)return[];let o=[];t.lastIndex=0;for(let r=t.exec(i);r;r=t.exec(i)){if(r[0].length===0){t.lastIndex++;continue}let i=e.ownerDocument.createRange(),[s,c]=ZK(n,a,r.index),[l,u]=ZK(n,a,r.index+r[0].length,!0);i.setStart(s,c),i.setEnd(l,u),o.push(i)}return o}function ZK(e,t,n,r=!1){let i=t.length-1;for(;i>0&&(r?t[i]>=n:t[i]>n);)i--;return[e[i],n-t[i]]}var QK=class{scan;key=``;rows=new WeakMap;constructor(e=XK){this.scan=e}rangesFor(e,t){let n=`${t.flags}/${t.source}`;n!==this.key&&(this.key=n,this.rows=new WeakMap);let r=this.rows.get(e);return r||(r=this.scan(e,t),this.rows.set(e,r)),r}invalidate(e){let t=(e instanceof Element?e:e.parentElement)?.closest(`[data-line]`);t&&this.rows.delete(t)}},$K=()=>typeof CSS<`u`&&`highlights`in CSS&&typeof Highlight<`u`;function eq(e,t){if(!$K())return()=>{};let n=new QK,r=oG(e,t,e=>Z.subscribe((t,n)=>{(t.search!==n.search||t.loaded!==n.loaded||t.collapsed!==n.collapsed)&&e()}),e=>{let t=Z.getState().search,r=YK(t);if(!r){CSS.highlights.delete(qK),CSS.highlights.delete(JK);return}let i=t.matches[t.index],a=[],o=[];for(let{id:t,root:s}of e){let e=yN(t);for(let t of s.querySelectorAll(`[data-line]`)){if(rG(t))continue;let s=i!=null&&i.path===e&&Number(t.dataset.line)===i.line;for(let e of n.rangesFor(t,r))(s?o:a).push(e)}}CSS.highlights.set(qK,new Highlight(...a)),CSS.highlights.set(JK,new Highlight(...o))},e=>{for(let t of e)n.invalidate(t.target)});return()=>{r(),CSS.highlights.delete(qK),CSS.highlights.delete(JK)}}var tq=`data-comment-line`;function nq(e,t){for(let n of e.querySelectorAll(`code`)){let[e,r]=n.children;if(!(!e||!r))for(let n=0;n<r.children.length;n++){let i=r.children[n];if(!(i instanceof HTMLElement)||i.dataset.line==null)continue;let a=Number(i.dataset.line),o=rG(i)?`old`:`new`,s=t.some(e=>e.side===o&&a>=e.startLine&&a<=e.endLine);i.toggleAttribute(tq,s),e.children[n]?.toggleAttribute(tq,s)}}}function rq(e,t){let n=IN(e).map(e=>e.anchor).filter(e=>e.kind===`line`&&e.path===t),r=e.draft?.path===t?BN(e):null;return r&&n.push(r),n}function iq(e,t){return oG(e,t,e=>Z.subscribe((t,n)=>{(t.threads!==n.threads||t.showResolved!==n.showResolved||t.draft!==n.draft||t.loaded!==n.loaded||t.collapsed!==n.collapsed)&&e()}),e=>{let t=Z.getState();for(let{id:n,root:r}of e)nq(r,rq(t,yN(n)))})}function aq({thread:e}){let t=Z(e=>e.deleteThread),n=Z(e=>e.setResolved),r=Z(t=>t.replyTo===e.id),i=Z(e=>e.openReply),a=Z(e=>e.closeReply),o=Z(e=>e.editingId),s=Z(e=>e.setEditingId),c=Z(t=>t.focusedThread===e.id),l=Z(e=>e.exportToGithub),u=Z(e=>e.github.data?.reason===null),[d,f]=(0,p.useState)(!1),[m,h]=(0,p.useState)(null),_=AW(()=>void t(e.id)),v=AW(()=>{f(!0),l([e.id]).then(h).finally(()=>f(!1))});(0,p.useEffect)(()=>{if(!m)return;let e=setTimeout(()=>h(null),2e3);return()=>clearTimeout(e)},[m]);let y=e.messages.length===1?e.messages[0]:null,b=y!=null&&o===y.id,x=e.anchor;return(0,g.jsxs)(`div`,{className:Nj(`mx-2 my-1 overflow-hidden rounded-md border border-border bg-card p-0 font-sans text-[0.8125rem] shadow-card [&_.markdown]:[word-break:break-word] ${e.stale?`border-dashed`:``} ${e.resolved?`opacity-70`:``} ${c?`border-accent shadow-[0_0_0_1px_var(--accent),_var(--review-card-shadow)]`:``}`),children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-b-border bg-hover py-1 pr-1.5 pl-2.5 text-[0.75rem] text-muted [&>svg]:flex-none [&>svg]:text-accent`,children:[(0,g.jsx)(OM,{size:`0.8125rem`}),(0,g.jsx)(`span`,{className:`font-mono font-semibold text-foreground`,children:LN(x)}),e.stale&&(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-0.75 text-warn`,title:x.kind===`file`?`Not in the current diff: the file left the review`:`Not found in the current diff: the text changed or left the changed lines`,children:[(0,g.jsx)(GM,{size:`0.75rem`}),` stale`]}),e.resolved&&(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-0.75 text-add`,children:[(0,g.jsx)(Jj,{size:`0.75rem`}),` resolved`]}),(0,g.jsx)(`span`,{className:`flex-1`}),y&&(0,g.jsx)(sq,{threadId:e.id,messageId:y.id,size:`0.875rem`}),y&&(0,g.jsx)(X,{variant:`ghost`,icon:!0,onClick:()=>s(b?null:y.id),title:b?`Cancel`:`Edit (e)`,children:b?(0,g.jsx)(qM,{size:`0.875rem`}):(0,g.jsx)(PM,{size:`0.875rem`})}),u&&(0,g.jsxs)(X,{variant:`ghost`,icon:!v.armed&&!m,feedback:v.armed?`confirm`:m?`posted`:void 0,disabled:d||e.stale,onClick:v.fire,title:e.stale?`Stale threads cannot be added to a GitHub review`:v.armed?`Click again to add this thread to the pending review`:`Add this thread to a pending review on the GitHub pull request; you submit it on GitHub`,children:[m?(0,g.jsx)(Jj,{size:`0.875rem`}):(0,g.jsx)(yM,{size:`0.875rem`}),(0,g.jsx)(kW,{text:v.armed?`Add?`:m&&XN(m)})]}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,onClick:()=>r?a():i(e.id),title:r?`Cancel reply`:`Reply`,children:r?(0,g.jsx)(qM,{size:`0.875rem`}):(0,g.jsx)(IM,{size:`0.875rem`})}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,onClick:()=>void n(e.id,!e.resolved),title:e.resolved?`Reopen (R)`:`Resolve (R)`,children:e.resolved?(0,g.jsx)(RM,{size:`0.875rem`}):(0,g.jsx)(Jj,{size:`0.875rem`})}),(0,g.jsxs)(X,{variant:`ghost`,danger:!0,icon:!_.armed,feedback:_.armed?`confirm`:void 0,onClick:_.fire,title:_.armed?`Click again to delete this thread`:`Delete thread (dd)`,children:[(0,g.jsx)(WM,{size:`0.875rem`}),(0,g.jsx)(kW,{text:_.armed&&`Delete?`})]})]}),e.messages.map((t,n)=>(0,g.jsx)(oq,{thread:e,message:t,first:n===0},t.id)),r&&(0,g.jsx)(cq,{threadId:e.id})]})}function oq({thread:e,message:t,first:n}){let r=Z(e=>e.editMessage),i=Z(e=>e.deleteMessage),a=Z(e=>e.editingId===t.id),o=Z(e=>e.setEditingId),[s,c]=(0,p.useState)(t.body),l=AW(()=>void i(e.id,t.id));(0,p.useEffect)(()=>{a&&c(t.body)},[a,t.body]);let u=e.messages.length>1,d=()=>{r(e.id,t.id,s),o(null)};return(0,g.jsxs)(`div`,{className:`px-2.5 py-2 data-[first=false]:border-t data-[first=false]:border-border`,"data-first":n,children:[u&&(0,g.jsxs)(`div`,{className:`mb-[2px] flex items-center gap-1.5 text-[0.6875rem] text-muted`,children:[(0,g.jsx)(`span`,{className:`flex-1`}),(0,g.jsx)(sq,{threadId:e.id,messageId:t.id,size:`0.75rem`}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,onClick:()=>o(a?null:t.id),title:a?`Cancel`:`Edit (e)`,children:a?(0,g.jsx)(qM,{size:`0.75rem`}):(0,g.jsx)(PM,{size:`0.75rem`})}),!n&&(0,g.jsxs)(X,{variant:`ghost`,danger:!0,icon:!l.armed,feedback:l.armed?`confirm`:void 0,onClick:l.fire,title:l.armed?`Click again to delete this reply`:`Delete this reply`,children:[(0,g.jsx)(WM,{size:`0.75rem`}),(0,g.jsx)(kW,{text:l.armed&&`Delete?`})]})]}),a?(0,g.jsxs)(`div`,{className:`rounded-md border-0 bg-surface p-0`,children:[(0,g.jsx)(`textarea`,{className:`min-h-17.5 w-full resize-y rounded-sm border border-border bg-canvas p-1.5 font-mono text-[0.75rem] leading-[1.5]`,value:s,onChange:e=>c(e.target.value),onKeyDown:e=>{e.key===`Escape`&&o(null),e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&d()},autoFocus:!0}),(0,g.jsx)(`div`,{className:`mt-1.5 flex items-center justify-end gap-1.5`,children:(0,g.jsx)(X,{variant:`primary`,onClick:d,children:`Save`})})]}):(0,g.jsx)(vW,{text:t.body,path:e.anchor.path,quoted:e.anchor.kind===`line`?e.anchor.quoted:void 0})]})}function sq({threadId:e,messageId:t,size:n}){let r=Z(e=>e.flash),i=Z(e=>e.report),[a,o]=(0,p.useState)(!1),s=(0,p.useRef)(null);return(0,p.useEffect)(()=>()=>void(s.current&&clearTimeout(s.current)),[]),(0,g.jsx)(X,{variant:`ghost`,icon:!0,feedback:a?`copied`:void 0,className:`relative`,title:`Copy this comment as a prompt`,onClick:async()=>{let n;try{n=await oA.exportComment(e,t)}catch(e){i(`Copying comment`,e);return}if(!await YM(n))return r(`The browser blocked clipboard access`);o(!0),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>o(!1),1400)},children:(0,g.jsx)(JM,{done:a,size:n,children:(0,g.jsx)(aM,{size:n})})})}function cq({threadId:e}){let t=Z(e=>e.submitReply),n=Z(e=>e.closeReply),[r,i]=(0,p.useState)(``),[a,o]=(0,p.useState)(!1),s=(0,p.useRef)(null);(0,p.useEffect)(()=>{s.current?.focus()},[]);let c=async()=>{if(!(!r.trim()||a)){o(!0);try{await t(e,r)}finally{o(!1)}}};return(0,g.jsxs)(`div`,{className:`@container mx-2.5 mt-0 mb-2.5 rounded-md border border-accent bg-surface p-2`,children:[(0,g.jsx)(`textarea`,{className:`min-h-17.5 w-full resize-y rounded-sm border border-border bg-canvas p-1.5 font-mono text-[0.75rem] leading-[1.5]`,ref:s,value:r,placeholder:`Reply…`,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Escape`&&n(),e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&c()}}),(0,g.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap items-center justify-end gap-1.5`,children:[(0,g.jsxs)(`span`,{className:`mr-auto text-[0.75rem] whitespace-nowrap text-muted @max-[26rem]:hidden`,children:[(0,g.jsx)(`kbd`,{children:`⌘/Ctrl`}),`+`,(0,g.jsx)(`kbd`,{children:`Enter`}),` to send · `,(0,g.jsx)(`kbd`,{children:`Esc`}),` to cancel`]}),(0,g.jsx)(X,{onClick:n,children:`Cancel`}),(0,g.jsx)(X,{variant:`primary`,onClick:()=>void c(),disabled:!r.trim()||a,children:`Reply`})]})]})}function lq({label:e}){let t=Z(e=>e.submitDraft),n=Z(e=>e.closeDraft),r=Z(e=>e.draftQuote),i=Z(e=>e.draft),a=i!=null&&i.selection==null,[o,s]=(0,p.useState)(``),[c,l]=(0,p.useState)(!1),u=(0,p.useRef)(null);(0,p.useLayoutEffect)(()=>{let e=u.current;if(!e)return;e.style.height=`auto`;let t=getComputedStyle(e),n=parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth);e.style.height=`${e.scrollHeight+n}px`},[o]),(0,p.useEffect)(()=>{let e=u.current;if(!e)return;if(e.getClientRects().length>0)return e.focus();let t=new ResizeObserver(()=>{e.getClientRects().length!==0&&(t.disconnect(),e.focus())});return t.observe(e),()=>t.disconnect()},[i]);let d=async()=>{if(!(!o.trim()||c)){l(!0);try{await t(o)}finally{l(!1)}}},f=async()=>{let e=`\`\`\`suggestion\n${await r()}\n\`\`\``;s(t=>t.trim()?`${t.replace(/\s+$/,``)}\n\n${e}\n`:`${e}\n`),u.current?.focus()};return(0,g.jsxs)(`div`,{className:`@container mx-2 my-1 overflow-hidden rounded-md border border-accent bg-surface font-sans text-[0.8125rem]`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-b-border bg-hover px-2.5 py-1 text-[0.75rem] text-muted [&>svg]:flex-none [&>svg]:text-accent`,children:[(0,g.jsx)(OM,{size:`0.8125rem`}),(0,g.jsx)(`span`,{className:`font-mono font-semibold text-foreground`,children:e})]}),(0,g.jsxs)(`div`,{className:`p-2`,children:[(0,g.jsx)(`textarea`,{className:`max-h-[60vh] min-h-17.5 w-full resize-y rounded-sm border border-border bg-canvas p-1.5 font-mono text-[0.75rem] leading-[1.5]`,ref:u,value:o,placeholder:`Leave a comment…`,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Escape`&&n(),e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&d()}}),(0,g.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap items-center justify-end gap-1.5`,children:[(0,g.jsxs)(`span`,{className:`mr-auto text-[0.75rem] whitespace-nowrap text-muted @max-[36rem]:hidden`,children:[(0,g.jsx)(`kbd`,{children:`⌘/Ctrl`}),`+`,(0,g.jsx)(`kbd`,{children:`Enter`}),` to save · `,(0,g.jsx)(`kbd`,{children:`Esc`}),` to cancel`]}),!a&&(0,g.jsxs)(X,{variant:`ghost`,onClick:()=>void f(),title:`Insert the selected lines as a suggestion block to edit`,"aria-label":`Suggest change`,children:[(0,g.jsx)(fM,{size:`0.8125rem`}),` `,(0,g.jsx)(`span`,{className:`@max-[18rem]:hidden`,children:`Suggest change`})]}),(0,g.jsx)(X,{onClick:n,children:`Cancel`}),(0,g.jsx)(X,{variant:`primary`,onClick:()=>void d(),disabled:!o.trim()||c,children:`Comment`})]})]})]})}function uq(e){let t=e.getRootNode();if(t instanceof ShadowRoot)return t.host;for(let t=e.parentElement;t;t=t.parentElement)if(t.shadowRoot)return t;return null}var dq={binary:SM,empty:pM,oversized:pM,loading:EM,error:GM};function fq(e,t){(0,p.useLayoutEffect)(()=>{let n=e.current&&uq(e.current);if(n)return n.setAttribute(`data-placeholder`,t),()=>n.removeAttribute(`data-placeholder`)},[e,t])}function pq({kind:e,message:t}){let n=dq[e],r=(0,p.useRef)(null);return fq(r,e),(0,g.jsxs)(`div`,{ref:r,className:`flex items-center gap-2 bg-hover px-4 py-2 text-[0.8125rem] ${e===`error`?`text-danger`:`text-muted`}`,"data-placeholder":e,children:[(0,g.jsx)(n,{size:`0.875rem`,className:e===`loading`?`animate-spin`:void 0}),(0,g.jsx)(`span`,{children:t})]})}var mq=32,hq={"side-by-side":`Side by side`,swipe:`Swipe`,onion:`Onion skin`,difference:`Difference`},gq={old:`Old`,new:`New`},_q=new Map;function vq(e){let[t,n]=(0,p.useState)(null),[,r]=(0,p.useReducer)(e=>e+1,0);if((0,p.useEffect)(()=>{if(e==null||_q.has(e))return;let t=!0,i=new Image;return i.onload=()=>{_q.set(e,{width:i.naturalWidth,height:i.naturalHeight}),t&&r()},i.onerror=()=>{t&&n(e)},i.src=e,()=>{t=!1}},[e]),e==null||t===e)return null;let i=_q.get(e);return i&&{url:e,size:i}}function yq({width:e,height:t}){let n=Math.max(e,1),r=Math.max(t,1);return{width:`min(100%, ${n}px, ${mq*n/r}rem)`,aspectRatio:`${n} / ${r}`}}function bq(e,t){return t?`${gq[e]} · ${t.size.width} × ${t.size.height}`:gq[e]}function xq({path:e,sides:t}){let n=(0,p.useRef)(null);fq(n,`image`);let r=Z(e=>e.snapshot),i=t=>{let n=r&&Xk(r,e,t);return n?oA.imageUrl(e,t,n):null};return(0,g.jsx)(`div`,{ref:n,className:`flex flex-col gap-2 bg-hover px-4 py-3 font-sans text-[0.8125rem]`,"data-image-diff":!0,children:t===`both`?(0,g.jsx)(Cq,{path:e,url:{old:i(`old`),new:i(`new`)}}):(0,g.jsx)(Sq,{path:e,side:t,url:i(t)})})}function Sq({path:e,side:t,url:n}){return(0,g.jsx)(wq,{path:e,side:t,image:vq(n)})}function Cq({path:e,url:t}){let n=Z(e=>e.imageCompare),r=Z(e=>e.setImageCompare),i=vq(t.old),a=vq(t.new),o=i&&a?{old:i,new:a}:null,s=o?n:`side-by-side`;return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(QW,{className:`self-start`,role:`group`,"aria-label":`Image comparison`,children:ZP.map(e=>(0,g.jsx)($W,{selected:s===e,disabled:!o,onClick:()=>r(e),children:hq[e]},e))}),o&&s!==`side-by-side`?(0,g.jsx)(Tq,{mode:s,path:e,pair:o}):(0,g.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,g.jsx)(wq,{path:e,side:`old`,image:i}),(0,g.jsx)(wq,{path:e,side:`new`,image:a})]})]})}function wq({path:e,side:t,image:n}){return(0,g.jsxs)(`figure`,{className:`m-0 flex min-w-0 flex-col gap-1`,children:[n===void 0?(0,g.jsx)(`span`,{className:`text-muted`,children:`Loading image…`}):n===null?(0,g.jsx)(`span`,{className:`text-muted`,children:`Binary file: not a displayable image`}):(0,g.jsx)(`img`,{src:n.url,alt:`${e} (${t})`,draggable:!1,className:`image-checker block`,style:yq(n.size)}),(0,g.jsx)(`figcaption`,{className:`font-mono text-[0.75rem] text-muted`,children:bq(t,n)})]})}function Tq({mode:e,path:t,pair:n}){let[r,i]=(0,p.useState)(50),a={width:Math.max(n.old.size.width,n.new.size.width),height:Math.max(n.old.size.height,n.new.size.height)},o=e=>({width:`${e.width/a.width*100}%`,height:`${e.height/a.height*100}%`}),s=e=>{let t=e.currentTarget.getBoundingClientRect();t.width>0&&i(Math.round(Math.min(1,Math.max(0,(e.clientX-t.left)/t.width))*100))},c=e===`swipe`?{clipPath:`inset(0 0 0 ${r}%)`}:e===`onion`?{opacity:r/100}:{mixBlendMode:`difference`};return(0,g.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,g.jsxs)(`div`,{className:`relative isolate overflow-hidden ${e===`difference`?`bg-black`:`image-checker`} ${e===`swipe`?`cursor-ew-resize touch-none`:``}`,style:yq(a),"data-stack":e,onPointerDown:e===`swipe`?e=>{e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),s(e)}:void 0,onPointerMove:e===`swipe`?e=>e.currentTarget.hasPointerCapture(e.pointerId)&&s(e):void 0,children:[(0,g.jsx)(`img`,{src:n.old.url,alt:`${t} (old)`,draggable:!1,className:`absolute top-0 left-0`,style:o(n.old.size)}),(0,g.jsx)(`div`,{className:`absolute inset-0`,style:c,"data-layer":`new`,children:(0,g.jsx)(`img`,{src:n.new.url,alt:`${t} (new)`,draggable:!1,className:`absolute top-0 left-0`,style:o(n.new.size)})}),e===`swipe`&&(0,g.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 w-0.5 bg-accent`,style:{left:`${r}%`}})]}),(0,g.jsxs)(`div`,{className:`flex items-center gap-3 font-mono text-[0.75rem] text-muted`,children:[(0,g.jsx)(`span`,{children:bq(`old`,n.old)}),e===`onion`&&(0,g.jsx)(`input`,{type:`range`,min:0,max:100,value:r,onChange:e=>i(Number(e.target.value)),"aria-label":`New side opacity`,className:`w-40 accent-accent`}),(0,g.jsx)(`span`,{children:bq(`new`,n.new)}),e===`difference`&&(0,g.jsx)(`span`,{className:`font-sans`,children:`Unchanged pixels are black.`})]})]})}var Eq=.5;async function Dq(e){let t=e.name,n=e.prevName??t,{loadFile:r}=Z.getState(),[i,a]=await Promise.all([r(n,`old`).catch(()=>null),r(t,`new`).catch(()=>null)]);if(!a)throw Error(`cannot load ${t}`);let o={name:t,contents:a.contents,cacheKey:`${t}@new@${Date.now()}`};return i?{oldFile:{name:n,contents:i.contents,cacheKey:`${n}@old@${Date.now()}`},newFile:o}:{oldFile:null,newFile:o}}var Oq=`
|
|
1653
|
+
`,edge:t(3)}}function VK(e,t,n=0){return t.top<e.top+n?t.top-(e.top+n):t.bottom>e.bottom?t.bottom-e.bottom:0}var HK=40;function UK(){let e=Z(e=>e.references),t=Z(e=>e.theme),n=Z(e=>e.closeReferences),r=Z(e=>e.pickReference),i=(0,p.useRef)(null),a=(0,p.useMemo)(()=>e.items.map(e=>({...e,text:e.text.trim()})),[e.items]),o=vW(a,t,e.index),s=(0,p.useMemo)(()=>{let e=[];return a.forEach((t,n)=>{let r=e[e.length-1];r&&r.path===t.path?r.rows.push({i:n,line:t.line,text:t.text}):e.push({path:t.path,rows:[{i:n,line:t.line,text:t.text}]})}),e},[a]),c=(0,p.useCallback)(e=>{Z.setState(t=>({references:{...t.references,index:e}})),r()},[r]);return(0,p.useLayoutEffect)(()=>{let e=i.current,t=e?.querySelector(`[data-active="true"]`);if(!e||!t)return;let n=t.parentElement?.querySelector(`header`),r=getComputedStyle(e),a=n?(parseFloat(r.paddingTop)||0)+n.getBoundingClientRect().height+(parseFloat(getComputedStyle(n).marginBottom)||0):0,o=e.getBoundingClientRect(),s=o.bottom-(parseFloat(r.paddingBottom)||0);e.scrollTop+=VK({top:o.top,bottom:s},t.getBoundingClientRect(),a)},[e.index,e.open,e.peek]),e.open?(0,g.jsxs)(Lj,{label:`References`,onClose:n,className:Ij(`flex max-h-[80vh] w-[min(60rem,_92vw)] flex-col overflow-hidden p-0`,e.peek&&`h-[80vh] w-[min(96rem,_96vw)]`),children:[(0,g.jsxs)(`div`,{className:`flex items-baseline gap-3.5 border-b border-b-border px-4.5 pt-3.5 pb-2.5`,children:[(0,g.jsx)(`h3`,{className:`m-0 text-[0.9375rem]`,children:e.kind===`types`?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`code`,{className:`rounded-[0.3125rem] bg-hover px-1.5 py-[1px] font-mono text-foreground`,children:e.symbol}),` `,`has `,a.length,` types in its signature; pick one`]}):(0,g.jsxs)(g.Fragment,{children:[a.length,` reference`,a.length===1?``:`s`,` to`,` `,(0,g.jsx)(`code`,{className:`rounded-[0.3125rem] bg-hover px-1.5 py-[1px] font-mono text-foreground`,children:e.symbol})]})}),(0,g.jsxs)(`span`,{className:`ml-auto text-[0.6875rem] whitespace-nowrap text-muted`,children:[(0,g.jsx)(`kbd`,{children:`j`}),` `,(0,g.jsx)(`kbd`,{children:`k`}),` move · `,(0,g.jsx)(`kbd`,{children:`Space`}),` peek`,e.peek&&(0,g.jsxs)(g.Fragment,{children:[` `,`· `,(0,g.jsx)(`kbd`,{children:`J`}),` `,(0,g.jsx)(`kbd`,{children:`K`}),` scroll`]}),` `,`· `,(0,g.jsx)(`kbd`,{children:`Enter`}),` jump · `,(0,g.jsx)(`kbd`,{children:`Esc`}),` `,e.peek?`back`:`close`]})]}),(0,g.jsxs)(`div`,{className:Ij(`flex min-h-0 flex-1`,!e.peek&&`contents`),children:[(0,g.jsx)(`div`,{className:Ij(`overflow-auto px-2.5 pt-2 pb-3`,e.peek&&`w-[min(32rem,_38%)] flex-none border-r border-r-border`),ref:i,children:s.map(t=>(0,g.jsxs)(`section`,{className:`[&+section]:mt-2.5`,children:[(0,g.jsxs)(`header`,{className:`sticky top-0 z-1 mb-[2px] flex items-center gap-2 rounded-lg border border-border bg-hover px-2.5 py-1.5 font-mono text-[0.75rem] leading-[normal] [&>svg]:flex-none [&>svg]:text-muted`,children:[(0,g.jsx)(mM,{size:`0.875rem`}),(0,g.jsx)(lF,{path:t.path,nowrap:!0,className:`flex-1`}),(0,g.jsx)(`span`,{className:`ml-auto rounded-[0.625rem] border border-border bg-canvas px-1.75 py-0 text-[0.6875rem] text-muted`,children:t.rows.length})]}),t.rows.map(n=>(0,g.jsx)(GK,{row:n,on:n.i===e.index,tokens:o.get(`${t.path}\n${n.text}`),onPick:c},`${n.line}:${n.i}`))]},t.path))}),e.peek&&(0,g.jsx)(WK,{items:a,index:e.index,theme:t,onPick:r})]})]}):null}function WK({items:e,index:t,theme:n,onPick:r}){let i=Z(e=>e.loadFile),[a,o]=(0,p.useState)(new Map),s=(0,p.useRef)(new Set),[c,l]=(0,p.useState)({theme:n,tokens:new Map}),u=(0,p.useRef)(null),d=e[t],f=d?.path,m=d?.line??0;(0,p.useEffect)(()=>{for(let n of[e[t],e[t+1],e[t-1]]){if(!n||s.current.has(n.path))continue;let e=n.path;s.current.add(e);let t=t=>o(n=>new Map(n).set(e,t));i(e,`new`).then(e=>t(e.binary?{message:`Binary file`}:{lines:e.contents.split(`
|
|
1654
|
+
`)})).catch(e=>t({message:e instanceof Error?e.message:String(e)}))}},[e,t,i]);let h=f?a.get(f):void 0,_=h&&`lines`in h?h.lines:null,v=Math.max(1,m-HK),y=(0,p.useMemo)(()=>_?.slice(v-1,m+HK)??null,[_,v,m]),b=c.theme===n?c.tokens:void 0;return(0,p.useEffect)(()=>{if(!y||!f)return;let e=c.theme===n?c.tokens:new Map,t=[...new Set(y)].filter(t=>!e.has(`${f}\n${t}`));if(t.length===0)return;let r=!0;return hW(t,f,n).then(e=>{r&&l(r=>{let i=new Map(r.theme===n?r.tokens:[]);return e.forEach((e,n)=>i.set(`${f}\n${t[n]}`,e)),{theme:n,tokens:i}})}).catch(()=>{}),()=>{r=!1}},[y,f,n,c]),(0,p.useEffect)(()=>{let e=document.activeElement;return u.current?.focus({preventScroll:!0}),()=>e?.focus({preventScroll:!0})},[]),(0,p.useLayoutEffect)(()=>{let e=u.current,t=e?.querySelector(`[data-target="true"]`);!e||!t||(e.scrollTop=t.offsetTop-(e.clientHeight-t.offsetHeight)/2)},[y]),d?(0,g.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-b-border px-3.5 py-1.5 font-mono text-[0.75rem] text-muted [&>svg]:flex-none`,children:[(0,g.jsx)(mM,{size:`0.875rem`}),(0,g.jsx)(lF,{path:d.path,nowrap:!0,className:`min-w-0 flex-1`}),(0,g.jsxs)(`span`,{className:`ml-auto`,children:[`:`,d.line]})]}),(0,g.jsx)(`div`,{className:`relative flex-1 overflow-auto py-2 font-mono text-[0.75rem] leading-[1.6] outline-none`,role:`region`,"aria-label":`Peek`,tabIndex:-1,ref:u,children:y?y.map((e,t)=>{let n=v+t;return(0,g.jsxs)(`div`,{"data-target":n===m,className:Ij(`group grid cursor-pointer grid-cols-[3.25rem_1fr] gap-3 pr-3.5`,n===m&&`bg-hover`),onClick:()=>getSelection()?.isCollapsed!==!1&&r(n),children:[(0,g.jsx)(`span`,{className:`pr-1.5 text-right text-muted group-hover:bg-hover group-hover:text-foreground`,children:n}),(0,g.jsx)(`span`,{className:`whitespace-pre`,children:(0,g.jsx)(bW,{tokens:b?.get(`${d.path}\n${e}`),fallback:e})})]},n)}):h&&`message`in h?(0,g.jsx)(`p`,{className:`px-3.5 text-muted`,children:h.message}):null})]}):(0,g.jsx)(`div`,{className:`flex-1`})}var GK=(0,p.memo)(function({row:e,on:t,tokens:n,onPick:r}){return(0,g.jsxs)(`div`,{"data-active":t,className:Ij(`grid cursor-pointer grid-cols-[3.25rem_1fr] gap-3 rounded-md px-2.5 py-0.75 font-mono text-[0.75rem] leading-[1.6] hover:bg-surface ${t?`bg-hover hover:bg-hover`:``}`),onMouseDown:e=>e.preventDefault(),onClick:()=>r(e.i),children:[(0,g.jsx)(`span`,{className:`text-right text-muted`,children:e.line}),(0,g.jsx)(`span`,{className:`overflow-hidden text-ellipsis whitespace-pre`,children:(0,g.jsx)(bW,{tokens:n,fallback:e.text})})]})});function KK(){let e=Z(e=>e.symbolMenu),t=Z(e=>e.theme),n=Z(e=>e.closeSymbolMenu),r=Z(e=>e.goToDefinition),i=Z(e=>e.goToTypeDefinition),a=Z(e=>e.findReferences),o=vW((0,p.useMemo)(()=>e?[{path:e.target.path,text:e.target.text}]:[],[e]),t);if((0,p.useEffect)(()=>{if(!e)return;let t=e=>{e.composedPath().some(e=>e instanceof HTMLElement&&e.hasAttribute(`data-symbol-menu`))||n()};return document.addEventListener(`pointerdown`,t,!0),document.addEventListener(`scroll`,n,!0),()=>{document.removeEventListener(`pointerdown`,t,!0),document.removeEventListener(`scroll`,n,!0)}},[e,n]),!e)return null;let s=WG(),c=28.75*s,l=2.75*s,u=Math.max(8,Math.min(e.x,window.innerWidth-c-8)),d=e.y+l<window.innerHeight?{left:u,top:e.y+12}:{left:u,top:e.y-l};return(0,g.jsxs)(`div`,{className:`fixed z-40 flex gap-[2px] rounded-lg border border-border bg-canvas p-0.75 shadow-[0_0.5rem_1.5rem_rgba(0,_0,_0,_0.18)]`,style:d,role:`menu`,"data-symbol-menu":!0,children:[(0,g.jsxs)(X,{className:`flex cursor-pointer items-center gap-1.5 rounded-md border-0 bg-transparent px-2 py-1 font-sans text-[0.75rem] leading-[normal] text-foreground hover:bg-hover`,onClick:()=>void r(e.target),title:`Go to definition (gd)`,children:[(0,g.jsx)(lM,{size:`0.8125rem`}),` Definition `,(0,g.jsx)(`kbd`,{className:`ml-[2px]`,children:`gd`})]}),(0,g.jsxs)(X,{className:`flex cursor-pointer items-center gap-1.5 rounded-md border-0 bg-transparent px-2 py-1 font-sans text-[0.75rem] leading-[normal] text-foreground hover:bg-hover`,onClick:()=>void a(e.target),title:`Find references (gA)`,children:[(0,g.jsx)(OM,{size:`0.8125rem`}),` References `,(0,g.jsx)(`kbd`,{className:`ml-[2px]`,children:`gA`})]}),(0,g.jsxs)(X,{className:`flex cursor-pointer items-center gap-1.5 rounded-md border-0 bg-transparent px-2 py-1 font-sans text-[0.75rem] leading-[normal] text-foreground hover:bg-hover`,onClick:()=>void i(e.target),title:`Go to type definition (gy)`,children:[(0,g.jsx)(GM,{size:`0.8125rem`}),` Type `,(0,g.jsx)(`kbd`,{className:`ml-[2px]`,children:`gy`})]}),(0,g.jsx)(`span`,{className:`ml-1 max-w-55 self-center truncate border-l border-l-border px-2 py-0.75 font-mono text-[0.75rem] leading-[normal] text-foreground`,title:e.target.text,children:(0,g.jsx)(bW,{tokens:o.get(`${e.target.path}\n${e.target.text}`),fallback:e.target.text})})]})}var qK={1:`file`,2:`module`,3:`namespace`,4:`package`,5:`class`,6:`method`,7:`property`,8:`field`,9:`ctor`,10:`enum`,11:`interface`,12:`function`,13:`variable`,14:`constant`,15:`string`,16:`number`,17:`boolean`,18:`array`,19:`object`,20:`key`,21:`null`,22:`member`,23:`struct`,24:`event`,25:`operator`,26:`type param`};function JK(e){return[5,10,11,23,26].includes(e)?`type`:[6,9,12].includes(e)?`callable`:[7,8,13,14,20,22,24].includes(e)?`value`:e<=4?`scope`:`other`}function YK(){let e=Z(e=>e.symbols),t=Z(e=>e.querySymbols),n=Z(e=>e.moveSymbol),r=Z(e=>e.pickSymbol),i=Z(e=>e.closeSymbols),[a,o]=(0,p.useState)(``),s=(0,p.useRef)(null),c=(0,p.useRef)(null);if((0,p.useEffect)(()=>{e.open&&(o(``),s.current?.focus())},[e.open,e.scope]),(0,p.useEffect)(()=>{c.current?.querySelector(`[aria-selected="true"]`)?.scrollIntoView({block:`nearest`})},[e.index]),!e.open)return null;let l=e=>{o(e),t(e)},u=e=>{let t=e.key===`ArrowDown`||e.ctrlKey&&e.key===`n`,i=e.key===`ArrowUp`||e.ctrlKey&&e.key===`p`;t||i?(e.preventDefault(),n(t?1:-1)):e.key===`Enter`&&(e.preventDefault(),r())},d=e.scope===`document`?`Symbols in ${e.path??`file`}…`:`Search symbols across the repository…`,f={type:`text-kind-type`,callable:`text-kind-callable`,value:`text-kind-value`,scope:`text-muted`,other:`text-muted`},m=e.loading?`loading…`:e.items.length?`${e.index+1} / ${e.items.length}`:``;return(0,g.jsxs)(`div`,{className:`absolute top-0 right-0 left-0 z-30 flex max-h-[60%] flex-col border-b border-b-border bg-surface shadow-[0_0.625rem_1.875rem_rgba(0,_0,_0,_0.18)]`,role:`dialog`,"aria-label":`Symbols`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-b-border bg-surface px-2.5 py-1.5`,children:[(0,g.jsx)(wM,{size:`0.875rem`}),(0,g.jsx)(`input`,{className:`flex-1 rounded-md border border-border bg-canvas px-2 py-1 font-mono text-[0.75rem]`,ref:s,value:a,onChange:e=>l(e.target.value),onKeyDown:u,placeholder:d,spellCheck:!1}),(0,g.jsx)(`span`,{className:`min-w-17.5 text-right font-mono text-[0.75rem] leading-[normal] text-muted`,children:m}),(0,g.jsx)(X,{type:`button`,variant:`ghost`,icon:!0,onClick:i,title:`Close (Esc)`,children:(0,g.jsx)(XM,{size:`0.875rem`})})]}),e.items.length>0?(0,g.jsx)(`ul`,{role:`listbox`,"aria-label":`Symbols`,className:`m-0 list-none overflow-auto p-1`,ref:c,children:e.items.map((t,n)=>(0,g.jsxs)(`li`,{role:`option`,"aria-selected":n===e.index,className:Ij(`grid cursor-pointer grid-cols-[4rem_1fr_auto] items-baseline gap-2.5 rounded-md px-2 py-1 font-mono text-[0.75rem] leading-[normal]`,n===e.index?`bg-hover`:``),onMouseDown:e=>e.preventDefault(),onClick:()=>{Z.setState(e=>({symbols:{...e.symbols,index:n}})),r()},children:[(0,g.jsx)(`span`,{className:Ij(`text-[0.6875rem] text-muted lowercase ${f[JK(t.kind)]}`),children:qK[t.kind]??`symbol`}),(0,g.jsxs)(`span`,{children:[t.name,t.container&&(0,g.jsxs)(`span`,{className:`text-muted`,children:[` · `,t.container]})]}),(0,g.jsxs)(`span`,{className:`text-[0.6875rem] whitespace-nowrap text-muted`,children:[e.scope===`workspace`&&(0,g.jsx)(lF,{path:t.path,nowrap:!0}),e.scope===`workspace`?`:`:``,t.line]})]},`${t.path}:${t.line}:${t.col}:${t.name}`))}):(0,g.jsx)(`div`,{className:`p-3`,children:e.loading?``:e.scope===`workspace`&&!a.trim()?`Type to search`:`No symbols`})]})}var XK=`diffle-search`,ZK=`diffle-search-current`;function QK(e){if(!e.open||!e.query||e.matches.length===0)return null;let t=e.query.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);try{if(e.kind===`word`)return RegExp(`(?<![\\p{L}\\p{N}_])${t}(?![\\p{L}\\p{N}_])`,`gu`);if(e.kind===`text`)return new RegExp(e.regex?e.query:t,e.ignoreCase?`gi`:`g`)}catch{return null}return null}function $K(e,t){let n=[],r=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),i=``,a=[];for(let e=r.nextNode();e;e=r.nextNode())n.push(e),a.push(i.length),i+=e.data;if(!i)return[];let o=[];t.lastIndex=0;for(let r=t.exec(i);r;r=t.exec(i)){if(r[0].length===0){t.lastIndex++;continue}let i=e.ownerDocument.createRange(),[s,c]=eq(n,a,r.index),[l,u]=eq(n,a,r.index+r[0].length,!0);i.setStart(s,c),i.setEnd(l,u),o.push(i)}return o}function eq(e,t,n,r=!1){let i=t.length-1;for(;i>0&&(r?t[i]>=n:t[i]>n);)i--;return[e[i],n-t[i]]}var tq=class{scan;key=``;rows=new WeakMap;constructor(e=$K){this.scan=e}rangesFor(e,t){let n=`${t.flags}/${t.source}`;n!==this.key&&(this.key=n,this.rows=new WeakMap);let r=this.rows.get(e);return r||(r=this.scan(e,t),this.rows.set(e,r)),r}invalidate(e){let t=(e instanceof Element?e:e.parentElement)?.closest(`[data-line]`);t&&this.rows.delete(t)}},nq=()=>typeof CSS<`u`&&`highlights`in CSS&&typeof Highlight<`u`;function rq(e,t){if(!nq())return()=>{};let n=new tq,r=lG(e,t,e=>Z.subscribe((t,n)=>{(t.search!==n.search||t.loaded!==n.loaded||t.collapsed!==n.collapsed)&&e()}),e=>{let t=Z.getState().search,r=QK(t);if(!r){CSS.highlights.delete(XK),CSS.highlights.delete(ZK);return}let i=t.matches[t.index],a=[],o=[];for(let{id:t,root:s}of e){let e=SN(t);for(let t of s.querySelectorAll(`[data-line]`)){if(oG(t))continue;let s=i!=null&&i.path===e&&Number(t.dataset.line)===i.line;for(let e of n.rangesFor(t,r))(s?o:a).push(e)}}CSS.highlights.set(XK,new Highlight(...a)),CSS.highlights.set(ZK,new Highlight(...o))},e=>{for(let t of e)n.invalidate(t.target)});return()=>{r(),CSS.highlights.delete(XK),CSS.highlights.delete(ZK)}}var iq=`data-comment-line`;function aq(e,t){for(let n of e.querySelectorAll(`code`)){let[e,r]=n.children;if(!(!e||!r))for(let n=0;n<r.children.length;n++){let i=r.children[n];if(!(i instanceof HTMLElement)||i.dataset.line==null)continue;let a=Number(i.dataset.line),o=oG(i)?`old`:`new`,s=t.some(e=>e.side===o&&a>=e.startLine&&a<=e.endLine);i.toggleAttribute(iq,s),e.children[n]?.toggleAttribute(iq,s)}}}function oq(e,t){let n=zN(e).map(e=>e.anchor).filter(e=>e.kind===`line`&&e.path===t),r=e.draft?.path===t?UN(e):null;return r&&n.push(r),n}function sq(e,t){return lG(e,t,e=>Z.subscribe((t,n)=>{(t.threads!==n.threads||t.showResolved!==n.showResolved||t.draft!==n.draft||t.loaded!==n.loaded||t.collapsed!==n.collapsed)&&e()}),e=>{let t=Z.getState();for(let{id:n,root:r}of e)aq(r,oq(t,SN(n)))})}function cq({thread:e}){let t=Z(e=>e.deleteThread),n=Z(e=>e.setResolved),r=Z(t=>t.replyTo===e.id),i=Z(e=>e.openReply),a=Z(e=>e.closeReply),o=Z(e=>e.editingId),s=Z(e=>e.setEditingId),c=Z(t=>t.focusedThread===e.id),l=Z(e=>e.exportToGithub),u=Z(e=>e.github.data?.reason===null),[d,f]=(0,p.useState)(!1),[m,h]=(0,p.useState)(null),_=NW(()=>void t(e.id)),v=NW(()=>{f(!0),l([e.id]).then(h).finally(()=>f(!1))});(0,p.useEffect)(()=>{if(!m)return;let e=setTimeout(()=>h(null),2e3);return()=>clearTimeout(e)},[m]);let y=e.messages.length===1?e.messages[0]:null,b=y!=null&&o===y.id,x=e.anchor;return(0,g.jsxs)(`div`,{className:Ij(`mx-2 my-1 overflow-hidden rounded-md border border-border bg-card p-0 font-sans text-[0.8125rem] shadow-card [&_.markdown]:[word-break:break-word] ${e.stale?`border-dashed`:``} ${e.resolved?`opacity-70`:``} ${c?`border-accent shadow-[0_0_0_1px_var(--accent),_var(--review-card-shadow)]`:``}`),children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-b-border bg-hover py-1 pr-1.5 pl-2.5 text-[0.75rem] text-muted [&>svg]:flex-none [&>svg]:text-accent`,children:[(0,g.jsx)(jM,{size:`0.8125rem`}),(0,g.jsx)(`span`,{className:`font-mono font-semibold text-foreground`,children:BN(x)}),e.stale&&(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-0.75 text-warn`,title:x.kind===`file`?`Not in the current diff: the file left the review`:`Not found in the current diff: the text changed or left the changed lines`,children:[(0,g.jsx)(JM,{size:`0.75rem`}),` stale`]}),e.resolved&&(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-0.75 text-add`,children:[(0,g.jsx)(Zj,{size:`0.75rem`}),` resolved`]}),(0,g.jsx)(`span`,{className:`flex-1`}),y&&(0,g.jsx)(uq,{threadId:e.id,messageId:y.id,size:`0.875rem`}),y&&(0,g.jsx)(X,{variant:`ghost`,icon:!0,onClick:()=>s(b?null:y.id),title:b?`Cancel`:`Edit (e)`,children:b?(0,g.jsx)(XM,{size:`0.875rem`}):(0,g.jsx)(LM,{size:`0.875rem`})}),u&&(0,g.jsxs)(X,{variant:`ghost`,icon:!v.armed&&!m,feedback:v.armed?`confirm`:m?`posted`:void 0,disabled:d||e.stale,onClick:v.fire,title:e.stale?`Stale threads cannot be added to a GitHub review`:v.armed?`Click again to add this thread to the pending review`:`Add this thread to a pending review on the GitHub pull request; you submit it on GitHub`,children:[m?(0,g.jsx)(Zj,{size:`0.875rem`}):(0,g.jsx)(SM,{size:`0.875rem`}),(0,g.jsx)(MW,{text:v.armed?`Add?`:m&&$N(m)})]}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,onClick:()=>r?a():i(e.id),title:r?`Cancel reply`:`Reply`,children:r?(0,g.jsx)(XM,{size:`0.875rem`}):(0,g.jsx)(zM,{size:`0.875rem`})}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,onClick:()=>void n(e.id,!e.resolved),title:e.resolved?`Reopen (R)`:`Resolve (R)`,children:e.resolved?(0,g.jsx)(VM,{size:`0.875rem`}):(0,g.jsx)(Zj,{size:`0.875rem`})}),(0,g.jsxs)(X,{variant:`ghost`,danger:!0,icon:!_.armed,feedback:_.armed?`confirm`:void 0,onClick:_.fire,title:_.armed?`Click again to delete this thread`:`Delete thread (dd)`,children:[(0,g.jsx)(qM,{size:`0.875rem`}),(0,g.jsx)(MW,{text:_.armed&&`Delete?`})]})]}),e.messages.map((t,n)=>(0,g.jsx)(lq,{thread:e,message:t,first:n===0},t.id)),r&&(0,g.jsx)(dq,{threadId:e.id})]})}function lq({thread:e,message:t,first:n}){let r=Z(e=>e.editMessage),i=Z(e=>e.deleteMessage),a=Z(e=>e.editingId===t.id),o=Z(e=>e.setEditingId),[s,c]=(0,p.useState)(t.body),l=NW(()=>void i(e.id,t.id));(0,p.useEffect)(()=>{a&&c(t.body)},[a,t.body]);let u=e.messages.length>1,d=()=>{r(e.id,t.id,s),o(null)};return(0,g.jsxs)(`div`,{className:`px-2.5 py-2 data-[first=false]:border-t data-[first=false]:border-border`,"data-first":n,children:[u&&(0,g.jsxs)(`div`,{className:`mb-[2px] flex items-center gap-1.5 text-[0.6875rem] text-muted`,children:[(0,g.jsx)(`span`,{className:`flex-1`}),(0,g.jsx)(uq,{threadId:e.id,messageId:t.id,size:`0.75rem`}),(0,g.jsx)(X,{variant:`ghost`,icon:!0,onClick:()=>o(a?null:t.id),title:a?`Cancel`:`Edit (e)`,children:a?(0,g.jsx)(XM,{size:`0.75rem`}):(0,g.jsx)(LM,{size:`0.75rem`})}),!n&&(0,g.jsxs)(X,{variant:`ghost`,danger:!0,icon:!l.armed,feedback:l.armed?`confirm`:void 0,onClick:l.fire,title:l.armed?`Click again to delete this reply`:`Delete this reply`,children:[(0,g.jsx)(qM,{size:`0.75rem`}),(0,g.jsx)(MW,{text:l.armed&&`Delete?`})]})]}),a?(0,g.jsxs)(`div`,{className:`rounded-md border-0 bg-surface p-0`,children:[(0,g.jsx)(`textarea`,{className:`min-h-17.5 w-full resize-y rounded-sm border border-border bg-canvas p-1.5 font-mono text-[0.75rem] leading-[1.5]`,value:s,onChange:e=>c(e.target.value),onKeyDown:e=>{e.key===`Escape`&&o(null),e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&d()},autoFocus:!0}),(0,g.jsx)(`div`,{className:`mt-1.5 flex items-center justify-end gap-1.5`,children:(0,g.jsx)(X,{variant:`primary`,onClick:d,children:`Save`})})]}):(0,g.jsx)(xW,{text:t.body,path:e.anchor.path,quoted:e.anchor.kind===`line`?e.anchor.quoted:void 0})]})}function uq({threadId:e,messageId:t,size:n}){let r=Z(e=>e.flash),i=Z(e=>e.report),[a,o]=(0,p.useState)(!1),s=(0,p.useRef)(null);return(0,p.useEffect)(()=>()=>void(s.current&&clearTimeout(s.current)),[]),(0,g.jsx)(X,{variant:`ghost`,icon:!0,feedback:a?`copied`:void 0,className:`relative`,title:`Copy this comment as a prompt`,onClick:async()=>{let n;try{n=await lA.exportComment(e,t)}catch(e){i(`Copying comment`,e);return}if(!await QM(n))return r(`The browser blocked clipboard access`);o(!0),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>o(!1),1400)},children:(0,g.jsx)(ZM,{done:a,size:n,children:(0,g.jsx)(cM,{size:n})})})}function dq({threadId:e}){let t=Z(e=>e.submitReply),n=Z(e=>e.closeReply),[r,i]=(0,p.useState)(``),[a,o]=(0,p.useState)(!1),s=(0,p.useRef)(null);(0,p.useEffect)(()=>{s.current?.focus()},[]);let c=async()=>{if(!(!r.trim()||a)){o(!0);try{await t(e,r)}finally{o(!1)}}};return(0,g.jsxs)(`div`,{className:`@container mx-2.5 mt-0 mb-2.5 rounded-md border border-accent bg-surface p-2`,children:[(0,g.jsx)(`textarea`,{className:`min-h-17.5 w-full resize-y rounded-sm border border-border bg-canvas p-1.5 font-mono text-[0.75rem] leading-[1.5]`,ref:s,value:r,placeholder:`Reply…`,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Escape`&&n(),e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&c()}}),(0,g.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap items-center justify-end gap-1.5`,children:[(0,g.jsxs)(`span`,{className:`mr-auto text-[0.75rem] whitespace-nowrap text-muted @max-[26rem]:hidden`,children:[(0,g.jsx)(`kbd`,{children:`⌘/Ctrl`}),`+`,(0,g.jsx)(`kbd`,{children:`Enter`}),` to send · `,(0,g.jsx)(`kbd`,{children:`Esc`}),` to cancel`]}),(0,g.jsx)(X,{onClick:n,children:`Cancel`}),(0,g.jsx)(X,{variant:`primary`,onClick:()=>void c(),disabled:!r.trim()||a,children:`Reply`})]})]})}function fq({label:e}){let t=Z(e=>e.submitDraft),n=Z(e=>e.closeDraft),r=Z(e=>e.draftQuote),i=Z(e=>e.draft),a=i!=null&&i.selection==null,[o,s]=(0,p.useState)(``),[c,l]=(0,p.useState)(!1),u=(0,p.useRef)(null);(0,p.useLayoutEffect)(()=>{let e=u.current;if(!e)return;e.style.height=`auto`;let t=getComputedStyle(e),n=parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth);e.style.height=`${e.scrollHeight+n}px`},[o]),(0,p.useEffect)(()=>{let e=u.current;if(!e)return;if(e.getClientRects().length>0)return e.focus();let t=new ResizeObserver(()=>{e.getClientRects().length!==0&&(t.disconnect(),e.focus())});return t.observe(e),()=>t.disconnect()},[i]);let d=async()=>{if(!(!o.trim()||c)){l(!0);try{await t(o)}finally{l(!1)}}},f=async()=>{let e=`\`\`\`suggestion\n${await r()}\n\`\`\``;s(t=>t.trim()?`${t.replace(/\s+$/,``)}\n\n${e}\n`:`${e}\n`),u.current?.focus()};return(0,g.jsxs)(`div`,{className:`@container mx-2 my-1 overflow-hidden rounded-md border border-accent bg-surface font-sans text-[0.8125rem]`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-b-border bg-hover px-2.5 py-1 text-[0.75rem] text-muted [&>svg]:flex-none [&>svg]:text-accent`,children:[(0,g.jsx)(jM,{size:`0.8125rem`}),(0,g.jsx)(`span`,{className:`font-mono font-semibold text-foreground`,children:e})]}),(0,g.jsxs)(`div`,{className:`p-2`,children:[(0,g.jsx)(`textarea`,{className:`max-h-[60vh] min-h-17.5 w-full resize-y rounded-sm border border-border bg-canvas p-1.5 font-mono text-[0.75rem] leading-[1.5]`,ref:u,value:o,placeholder:`Leave a comment…`,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Escape`&&n(),e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&d()}}),(0,g.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap items-center justify-end gap-1.5`,children:[(0,g.jsxs)(`span`,{className:`mr-auto text-[0.75rem] whitespace-nowrap text-muted @max-[36rem]:hidden`,children:[(0,g.jsx)(`kbd`,{children:`⌘/Ctrl`}),`+`,(0,g.jsx)(`kbd`,{children:`Enter`}),` to save · `,(0,g.jsx)(`kbd`,{children:`Esc`}),` to cancel`]}),!a&&(0,g.jsxs)(X,{variant:`ghost`,onClick:()=>void f(),title:`Insert the selected lines as a suggestion block to edit`,"aria-label":`Suggest change`,children:[(0,g.jsx)(hM,{size:`0.8125rem`}),` `,(0,g.jsx)(`span`,{className:`@max-[18rem]:hidden`,children:`Suggest change`})]}),(0,g.jsx)(X,{onClick:n,children:`Cancel`}),(0,g.jsx)(X,{variant:`primary`,onClick:()=>void d(),disabled:!o.trim()||c,children:`Comment`})]})]})]})}function pq(e){let t=e.getRootNode();if(t instanceof ShadowRoot)return t.host;for(let t=e.parentElement;t;t=t.parentElement)if(t.shadowRoot)return t;return null}var mq={binary:TM,empty:gM,oversized:gM,loading:kM,error:JM};function hq(e,t){(0,p.useLayoutEffect)(()=>{let n=e.current&&pq(e.current);if(n)return n.setAttribute(`data-placeholder`,t),()=>n.removeAttribute(`data-placeholder`)},[e,t])}function gq({kind:e,message:t}){let n=mq[e],r=(0,p.useRef)(null);return hq(r,e),(0,g.jsxs)(`div`,{ref:r,className:`flex items-center gap-2 bg-hover px-4 py-2 text-[0.8125rem] ${e===`error`?`text-danger`:`text-muted`}`,"data-placeholder":e,children:[(0,g.jsx)(n,{size:`0.875rem`,className:e===`loading`?`animate-spin`:void 0}),(0,g.jsx)(`span`,{children:t})]})}var _q=32,vq={"side-by-side":`Side by side`,swipe:`Swipe`,onion:`Onion skin`,difference:`Difference`},yq={old:`Old`,new:`New`},bq=new Map;function xq(e){let[t,n]=(0,p.useState)(null),[,r]=(0,p.useReducer)(e=>e+1,0);if((0,p.useEffect)(()=>{if(e==null||bq.has(e))return;let t=!0,i=new Image;return i.onload=()=>{bq.set(e,{width:i.naturalWidth,height:i.naturalHeight}),t&&r()},i.onerror=()=>{t&&n(e)},i.src=e,()=>{t=!1}},[e]),e==null||t===e)return null;let i=bq.get(e);return i&&{url:e,size:i}}function Sq({width:e,height:t}){let n=Math.max(e,1),r=Math.max(t,1);return{width:`min(100%, ${n}px, ${_q*n/r}rem)`,aspectRatio:`${n} / ${r}`}}function Cq(e,t){return t?`${yq[e]} · ${t.size.width} × ${t.size.height}`:yq[e]}function wq({path:e,sides:t}){let n=(0,p.useRef)(null);hq(n,`image`);let r=Z(e=>e.snapshot),i=t=>{let n=r&&$k(r,e,t);return n?lA.imageUrl(e,t,n):null};return(0,g.jsx)(`div`,{ref:n,className:`flex flex-col gap-2 bg-hover px-4 py-3 font-sans text-[0.8125rem]`,"data-image-diff":!0,children:t===`both`?(0,g.jsx)(Eq,{path:e,url:{old:i(`old`),new:i(`new`)}}):(0,g.jsx)(Tq,{path:e,side:t,url:i(t)})})}function Tq({path:e,side:t,url:n}){return(0,g.jsx)(Dq,{path:e,side:t,image:xq(n)})}function Eq({path:e,url:t}){let n=Z(e=>e.imageCompare),r=Z(e=>e.setImageCompare),i=xq(t.old),a=xq(t.new),o=i&&a?{old:i,new:a}:null,s=o?n:`side-by-side`;return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(tG,{className:`self-start`,role:`group`,"aria-label":`Image comparison`,children:eF.map(e=>(0,g.jsx)(nG,{selected:s===e,disabled:!o,onClick:()=>r(e),children:vq[e]},e))}),o&&s!==`side-by-side`?(0,g.jsx)(Oq,{mode:s,path:e,pair:o}):(0,g.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,g.jsx)(Dq,{path:e,side:`old`,image:i}),(0,g.jsx)(Dq,{path:e,side:`new`,image:a})]})]})}function Dq({path:e,side:t,image:n}){return(0,g.jsxs)(`figure`,{className:`m-0 flex min-w-0 flex-col gap-1`,children:[n===void 0?(0,g.jsx)(`span`,{className:`text-muted`,children:`Loading image…`}):n===null?(0,g.jsx)(`span`,{className:`text-muted`,children:`Binary file: not a displayable image`}):(0,g.jsx)(`img`,{src:n.url,alt:`${e} (${t})`,draggable:!1,className:`image-checker block`,style:Sq(n.size)}),(0,g.jsx)(`figcaption`,{className:`font-mono text-[0.75rem] text-muted`,children:Cq(t,n)})]})}function Oq({mode:e,path:t,pair:n}){let[r,i]=(0,p.useState)(50),a={width:Math.max(n.old.size.width,n.new.size.width),height:Math.max(n.old.size.height,n.new.size.height)},o=e=>({width:`${e.width/a.width*100}%`,height:`${e.height/a.height*100}%`}),s=e=>{let t=e.currentTarget.getBoundingClientRect();t.width>0&&i(Math.round(Math.min(1,Math.max(0,(e.clientX-t.left)/t.width))*100))},c=e===`swipe`?{clipPath:`inset(0 0 0 ${r}%)`}:e===`onion`?{opacity:r/100}:{mixBlendMode:`difference`};return(0,g.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,g.jsxs)(`div`,{className:`relative isolate overflow-hidden ${e===`difference`?`bg-black`:`image-checker`} ${e===`swipe`?`cursor-ew-resize touch-none`:``}`,style:Sq(a),"data-stack":e,onPointerDown:e===`swipe`?e=>{e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),s(e)}:void 0,onPointerMove:e===`swipe`?e=>e.currentTarget.hasPointerCapture(e.pointerId)&&s(e):void 0,children:[(0,g.jsx)(`img`,{src:n.old.url,alt:`${t} (old)`,draggable:!1,className:`absolute top-0 left-0`,style:o(n.old.size)}),(0,g.jsx)(`div`,{className:`absolute inset-0`,style:c,"data-layer":`new`,children:(0,g.jsx)(`img`,{src:n.new.url,alt:`${t} (new)`,draggable:!1,className:`absolute top-0 left-0`,style:o(n.new.size)})}),e===`swipe`&&(0,g.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 w-0.5 bg-accent`,style:{left:`${r}%`}})]}),(0,g.jsxs)(`div`,{className:`flex items-center gap-3 font-mono text-[0.75rem] text-muted`,children:[(0,g.jsx)(`span`,{children:Cq(`old`,n.old)}),e===`onion`&&(0,g.jsx)(`input`,{type:`range`,min:0,max:100,value:r,onChange:e=>i(Number(e.target.value)),"aria-label":`New side opacity`,className:`w-40 accent-accent`}),(0,g.jsx)(`span`,{children:Cq(`new`,n.new)}),e===`difference`&&(0,g.jsx)(`span`,{className:`font-sans`,children:`Unchanged pixels are black.`})]})]})}var kq=.5;async function Aq(e){let t=e.name,n=e.prevName??t,{loadFile:r}=Z.getState(),[i,a]=await Promise.all([r(n,`old`).catch(()=>null),r(t,`new`).catch(()=>null)]);if(!a)throw Error(`cannot load ${t}`);let o={name:t,contents:a.contents,cacheKey:`${t}@new@${Date.now()}`};return i?{oldFile:{name:n,contents:i.contents,cacheKey:`${n}@old@${Date.now()}`},newFile:o}:{oldFile:null,newFile:o}}var jq=`
|
|
1655
1655
|
[data-diffs-header] {
|
|
1656
1656
|
--diffs-header-font-family: var(--mono);
|
|
1657
1657
|
font-size: 0.75rem;
|
|
@@ -1727,7 +1727,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1727
1727
|
:host([data-placeholder]) :is(pre, [data-code]) { grid-template-columns: minmax(0, 1fr); padding-block: 0; }
|
|
1728
1728
|
:host([data-placeholder]) :is([data-gutter], [data-deletions], [data-line], [data-column-number]) { display: none; }
|
|
1729
1729
|
:host([data-placeholder]) [data-content] { grid-column: 1; }
|
|
1730
|
-
`;function kq(e,t,n){let r=yN(t);if(!Aq(r))return null;let i=jq(e.tokenElement,n,OP(r));if(!i)return null;let a=`side`in e&&e.side===`deletions`?`old`:`new`,o=e.lineNumber;if(a===`old`){let t=e.tokenElement.closest(`[data-line]`),n=t?.dataset.lineType?.startsWith(`context`)?Number(t.dataset.altLine):NaN;Number.isFinite(n)&&(a=`new`,o=n)}return{path:r,side:a,line:o,col:e.lineCharStart+i.start,text:i.text}}function Aq(e){let t=Uk(e),{lsp:n}=Z.getState();return t!=null&&n.enabled&&n.servers.some(e=>e.languages.includes(t))}function jq(e,t,n=!1){let r=e.firstChild;if(!r||r.nodeType!==Node.TEXT_NODE||e.childNodes.length!==1)return null;let i=r.textContent??``,a=document.createRange(),o=-1;for(let e=0;e<i.length;e++){a.setStart(r,e),a.setEnd(r,e+1);let n=a.getBoundingClientRect();if(t>=n.left&&t<=n.right){o=e;break}}return n?o>=0&&/\S/.test(i[o])?{start:o,text:i}:null:wG(i).find(e=>o>=e.start&&o<e.start+e.text.length)??null}function Mq(e,t){e.classList.toggle(`lsp-hover`,t)}var Nq={theme:UP,loadDiffFiles:Dq,stickyHeaders:!0,enableLineSelection:!0,useTokenTransformer:!0,lineHoverHighlight:`number`,overflow:`wrap`},Pq={kind:`loading`};function Fq(e){if(e.runningKey||!e.pending)return;let t=e.pending;e.pending=null,e.lastKey!==t.key&&(e.runningKey=t.key,Promise.resolve().then(()=>t.pool.primeDiffHighlightCache(t.diff)).catch(()=>{}).finally(()=>{e.runningKey=null,e.lastKey=t.key,Fq(e)}))}function Iq(){let e=VG(),t=(0,p.useMemo)(()=>LK(e),[e]),n=Z(e=>e.snapshot),r=Z(e=>e.error),i=Z(e=>e.loaded),a=Z(e=>e.gens),o=Z(e=>e.fileView),s=Z(e=>e.threads),c=Z(e=>e.showResolved),l=Z(e=>e.replyTo),u=Z(e=>e.editingId),d=Z(e=>e.draft),f=Z(e=>e.collapsed),m=Z(e=>e.viewed),h=Z(e=>e.config),_=Z(e=>e.selection),v=Z(e=>e.setSelection),y=Z(e=>e.openDraft),b=Z(e=>e.goToDefinition),x=Z(e=>e.openSymbolMenu),S=Z(e=>e.scrollTarget),C=Z(e=>e.reveal),w=Z(e=>e.setActivePath),T=(0,p.useRef)(null),E=Zp(),D=(0,p.useRef)({runningKey:null,lastKey:null,pending:null}),O=Z(e=>e.theme),k=Z(e=>e.diffStyle),A=(0,p.useRef)(new Map),ee=(0,p.useMemo)(()=>{if(!n)return[];let e=new Map(n.changed.map(e=>[e.path,e])),t={collapsed:f,viewed:m,config:h,snapshot:n},r=new Map;for(let e of IN({threads:s,showResolved:c})){let t=r.get(e.anchor.path);t?t.push(e):r.set(e.anchor.path,[e])}let p=(e,t,n)=>{let r=WN(A.current.get(e),UN({draft:d,replyTo:l,editingId:u},e,t,n));return A.current.set(e,r),r.version};if(o){let{path:e,item:t}=o,n=r.get(e)??[],i=t&&Rq(e,t,void 0,n,d,p(e,n,!1),a[e]??0,!1);return i?[i]:[]}let g=[];for(let o of CN(n)){let n=i[o]??Pq,s=r.get(o)??[],c=FN(t,o),l=Rq(o,n,e.get(o),s,d,p(o,s,c),a[o]??0,c);l&&g.push(l)}return g},[n,i,a,o,s,c,l,u,d,f,m,h]),[j,M]=(0,p.useState)(null),N=(0,p.useRef)(null),P=(0,p.useCallback)(e=>{N.current=e,M(e)},[]),F=(0,p.useRef)(!1),I=(0,p.useRef)(o);(I.current==null!=(o==null)||I.current?.path!==o?.path)&&(I.current=o,F.current=!0),(0,p.useEffect)(()=>{F.current=!1},[ee]),(0,p.useEffect)(()=>(kG(()=>T.current),()=>kG(()=>null)),[]),(0,p.useEffect)(()=>{if(j)return eq(()=>T.current,j)},[j]),(0,p.useEffect)(()=>{if(j)return iq(()=>T.current,j)},[j]),(0,p.useEffect)(()=>{if(j)return CG(()=>T.current,j)},[j]),(0,p.useEffect)(()=>{jG(_)},[_]);let te=(0,p.useRef)(!1);(0,p.useEffect)(()=>{if(!j)return;let e=0,n=j.scrollTop,r=`down`,i=new Map(ee.map((e,t)=>[e.id,t])),a=D.current,o=()=>{e=0;let n=T.current?.getInstance()?.getRenderedItems()??[];if(E&&n.length>0){let e=r===`down`?-1:ee.length;for(let t of n){let n=i.get(t.id);n!==void 0&&(e=r===`down`?Math.max(e,n):Math.min(e,n))}let t=e+(r===`down`?1:-1),o=ee[t];if(o?.type===`diff`&&o.fileDiff.cacheKey){let e=`${O}:${o.fileDiff.cacheKey}`;a.runningKey!==e&&a.lastKey!==e?a.pending={key:e,diff:o.fileDiff,pool:E}:a.pending?.key!==e&&(a.pending=null),Fq(a)}else a.pending=null}if(te.current||Z.getState().selection)return;let o=j.getBoundingClientRect(),s=t.itemMetrics.diffHeaderHeight,c=o.top+o.height*Eq,l=n.map(e=>({id:e.id,rect:e.element.getBoundingClientRect()})).filter(e=>e.rect.bottom>o.top+s+1&&e.rect.top<o.bottom&&e.rect.height>0);if(l.length===0)return;let u=Z.getState(),d=yN((l.find(e=>yN(e.id)===u.activePath)??l.filter(e=>e.rect.top<=c).sort((e,t)=>t.rect.top-e.rect.top)[0]??l[0]).id);d!==u.activePath&&u.setActivePath(d)},s=()=>{let t=j.scrollTop;t!==n&&(r=t>n?`down`:`up`),n=t,e||=requestAnimationFrame(o)};return j.addEventListener(`scroll`,s,{passive:!0}),()=>{j.removeEventListener(`scroll`,s),e&&cancelAnimationFrame(e),a.pending=null}},[j,t,ee,E,O]),(0,p.useEffect)(()=>Z.subscribe((e,n)=>{if(e.theme===n.theme&&e.diffStyle===n.diffStyle)return;let r=N.current,i=T.current?.getInstance()?.getRenderedItems();if(!r||!i)return;let a=r.getBoundingClientRect(),o=aG(i.map(e=>({id:e.id,root:e.element.shadowRoot??e.element})),a.top+t.itemMetrics.diffHeaderHeight,a.bottom);o&&Z.setState(e=>({scrollTarget:{...o,align:`keep`,nonce:(e.scrollTarget?.nonce??0)+1}}))}),[t]),(0,p.useEffect)(()=>{if(!C||!T.current)return;let e=T.current;e.scrollTo({type:`item`,id:C.id,align:`start`,behavior:`instant`});let t=0,n=!1,r=()=>{if(n)return;let i=e.getInstance()?.getRenderedItems().find(e=>e.id===C.id);if(i?.type===`diff`){i.instance.revealLine(C.line);let e=i.instance,t=C.line,r=C.line;for(;t>1&&C.line-t<1e4&&e.isLineRenderable(t-1);)t--;for(;r-t<1e4&&e.isLineRenderable(r+1);)r++;Z.getState().addRevealed(C.id,t,r),setTimeout(()=>{n||Z.setState(e=>({scrollTarget:{id:C.id,line:C.line,side:`new`,align:`eye`,nonce:(e.scrollTarget?.nonce??0)+1}}))},30);return}t++<40&&setTimeout(r,50)};return r(),()=>{n=!0}},[C]);let ne=(0,p.useCallback)(e=>{let n=e.align??`center`,r=n===`eye`||n===`top`||n===`bottom`||n===`keep`,i=N.current?.clientHeight??800,a=(T.current?.getInstance()?.getRenderedItems().find(t=>t.id===e.id))?.element.shadowRoot?.querySelector(`[data-diffs-header]`)?.getBoundingClientRect().height??t.itemMetrics.diffHeaderHeight,o=t.edge,s=n===`eye`?i*Eq-a:n===`top`?o:n===`bottom`?Math.max(o,i-a-o-t.itemMetrics.lineHeight):n===`keep`?e.offset??0:0,c=r?`start`:n;return{eye:r,offset:s,header:a,target:e.line?{type:`line`,id:e.id,lineNumber:e.line,side:e.side===`old`?`deletions`:`additions`,align:c,offset:s,behavior:r?`instant`:void 0}:{type:`item`,id:e.id,align:`start`,behavior:`instant`}}},[t]),re=e=>{let t=T.current?.getInstance()?.getRenderedItems().find(t=>t.id===e.id),n=t?.element.shadowRoot??t?.element;return n&&e.line?iG(n,e.line,e.side??`new`):null},L=(0,p.useRef)(O),R=(0,p.useRef)(S);(0,p.useLayoutEffect)(()=>{let e=F.current||L.current!==O,t=S!==R.current;L.current=O,R.current=S;let n=N.current;n&&(n.style.visibility=e&&t&&S?.line&&!re(S)?`hidden`:``)},[S,O]),(0,p.useEffect)(()=>{if(!S||!T.current)return;if(S.unlessVisible&&N.current){let e=T.current.getInstance()?.getRenderedItems().find(e=>e.id===S.id),t=N.current.getBoundingClientRect();if(S.unlessVisible===`search`){let n=e?.element.querySelector(`[data-content-search]`)?.closest(`form`)?.getBoundingClientRect();if(n&&n.height>0&&n.top>=t.top&&n.bottom<=t.bottom)return}else{let n=e?.element.getBoundingClientRect().top;if(n!=null&&n>=t.top&&n<t.bottom)return}}let{eye:e,offset:n,header:r,target:i}=ne(S),a=e&&S.line!=null;te.current=!0;let o,s=()=>{o=setTimeout(()=>{te.current=!1},150)},c=()=>{N.current&&(N.current.style.visibility=``)},l=()=>{let e=N.current;if(!e)return NaN;let a=e.getBoundingClientRect().top;if(i.type===`item`){let e=T.current?.getInstance()?.getRenderedItems().find(e=>e.id===S.id)?.element;return e?e.getBoundingClientRect().top-(a+t.layout.paddingTop):NaN}return(re(S)?.getBoundingClientRect().top??NaN)-(a+n+r)},u=a||i.type===`item`,d=()=>{let e=N.current,t=re(S);if(!e||!t)return NaN;let n=(T.current?.getInstance()?.getRenderedItems().find(e=>e.id===S.id))?.element.shadowRoot?.querySelector(`[data-diffs-header]`)?.getBoundingClientRect().height;return RK(e.getBoundingClientRect(),t.getBoundingClientRect(),n??r)},f=()=>{let e=T.current,t=e?.getInstance();if(!e||!t||!e.getItem(S.id))return!1;if(e.scrollTo(i),t.render(!0),!u){let e=i.type===`line`?d():NaN;return!Number.isNaN(e)&&Math.abs(e)>1&&N.current&&(N.current.scrollTop+=e,t.render(!0)),!0}for(let n=0;n<4;n++){let n=l();if(Number.isNaN(n)){e.scrollTo(i),t.render(!0);continue}if(Math.abs(n)<=1||(e.scrollTo({...i,offset:(i.offset??0)-n}),t.render(!0),!(l()!==n||!N.current)&&(N.current.scrollTop+=n,t.render(!0),l()===n)))break}return!0},p=!1,m=0,h=()=>{setTimeout(()=>{if(p)return;let e=l();!Number.isNaN(e)&&Math.abs(e)>1&&N.current&&(N.current.scrollTop+=e),m++<2&&h()},100)},g=0,_=()=>{if(!p){if(!f()){g++<20?setTimeout(_,100):(c(),s());return}c(),s(),u&&h()}};return _(),()=>{p=!0,o&&clearTimeout(o)}},[S,t,ne]);let z=(0,p.useCallback)(e=>{e==null&&F.current||(v(e),e&&w(yN(e.id)))},[v,w]),B=(0,p.useRef)(()=>{}),ie=(0,p.useMemo)(()=>({...Nq,unsafeCSS:Oq+t.css,layout:t.layout,itemMetrics:t.itemMetrics,hunkSeparators:`line-info`,themeType:O,diffStyle:k,onLineSelectionEnd:()=>{let e=T.current?.getSelectedLines();e&&y(e)},onTokenEnter:(e,t,n)=>{let r=null,i=t=>{let i=kq(e,n.item.id,t.clientX);i?.col!==r?.col&&(r=i,PP.set(i,e.tokenElement),bG.hover(i),i?PK.enter(i,e.tokenElement):PK.leave(),Mq(e.tokenElement,!!i&&!OP(i.path)&&(t.ctrlKey||t.metaKey)))};i(t),e.tokenElement.addEventListener(`pointermove`,i),B.current=()=>e.tokenElement.removeEventListener(`pointermove`,i)},onTokenLeave:e=>{B.current(),B.current=()=>{},PP.set(null),bG.hover(null),PK.leave(),Mq(e.tokenElement,!1)},onLineClick:(e,t)=>{let n=`annotationSide`in e?e.annotationSide:`additions`,r={start:e.lineNumber,side:n,end:e.lineNumber,endSide:n};if(e.numberColumn){T.current?.getSelectedLines()||y({id:t.item.id,range:r});return}v({id:t.item.id,range:r}),w(yN(t.item.id))},onTokenClick:(e,t,n)=>{let r=kq(e,n.item.id,t.clientX);if(!(!r||OP(r.path))){if(Mq(e.tokenElement,!1),PK.cancel(),t.ctrlKey||t.metaKey){t.preventDefault(),b(r);return}MG(r,e.tokenElement),x(r,t.clientX,t.clientY)}}}),[y,b,x,v,w,O,k,t]),ae=(0,p.useCallback)(e=>{let t=e.metadata;if(t.kind===`placeholder`)return(0,g.jsx)(pq,{kind:t.placeholder,message:t.message});if(t.kind===`image`)return(0,g.jsx)(xq,{path:t.path,sides:t.sides});if(t.kind===`draft`){let e=BN(Z.getState());return(0,g.jsx)(lq,{label:e?RN(e):`whole file`})}return(0,g.jsx)(aq,{thread:t.thread})},[]),oe=(0,p.useCallback)((e,n)=>{let r=T.current?.getInstance(),i=r?.getRenderedItems().find(t=>t.id===e);if(!r||!i)return;let a=N.current,o=a?.scrollTop;i.instance.setMetrics({...t.itemMetrics,diffHeaderHeight:n}),r.instanceChanged(i.instance,!0),r.render(!0),a&&o!==void 0&&a.scrollTop!==o&&(a.scrollTop=o,a.dispatchEvent(new Event(`scroll`)),r.render(!0))},[t]),se=(0,p.useCallback)(e=>(0,g.jsx)(Vq,{id:e.id,resizeHeader:oe}),[oe]);return r?(0,g.jsx)(`main`,{className:`relative flex min-h-0 min-w-0 flex-col outline-none`,children:(0,g.jsx)(`div`,{className:`border-b border-b-border bg-hover px-3 py-2 text-danger`,children:r})}):n?n.changed.length===0&&!o?(0,g.jsx)(`main`,{className:`relative flex min-h-0 min-w-0 flex-col outline-none`,children:(0,g.jsxs)(`div`,{className:`p-10 text-center text-muted`,children:[`No changes for `,(0,g.jsx)(`code`,{children:ek(n.mode)}),`. Open any file from the tree to comment on it.`]})}):(0,g.jsxs)(`main`,{className:`relative flex min-h-0 min-w-0 flex-col outline-none`,tabIndex:-1,children:[(0,g.jsx)(yK,{}),(0,g.jsx)(KK,{}),(0,g.jsx)(UK,{}),(0,g.jsx)(FK,{}),(0,g.jsx)(BK,{}),o&&(0,g.jsx)(Lq,{path:o.path}),o?!o.item&&(0,g.jsxs)(`div`,{className:`border-b border-b-border bg-hover px-3 py-2 text-muted`,children:[`Loading `,o.path,`…`]}):n.changed.some(e=>!i[e.path])&&(0,g.jsx)(`div`,{className:`border-b border-b-border bg-hover px-3 py-2 text-muted`,children:`Loading diffs…`}),(0,g.jsx)(Ay,{ref:T,containerRef:P,className:`codeview min-h-0 flex-1 overflow-auto bg-surface outline-none`,items:ee,options:ie,selectedLines:_,onSelectedLinesChange:z,renderAnnotation:ae,renderCustomHeader:se},O)]}):(0,g.jsx)(`main`,{className:`relative flex min-h-0 min-w-0 flex-col outline-none`,children:(0,g.jsx)(`div`,{className:`p-10 text-center text-muted`,children:`Loading snapshot…`})})}function Lq({path:e}){let t=Z(e=>e.fileView?.external??!1),n=Z(t=>t.snapshot?.changed.find(t=>t.path===e));return(0,g.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-b-border bg-hover px-3 py-1.5 text-[0.75rem]`,children:[(0,g.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono`,children:(0,g.jsx)(oF,{path:e})}),n&&(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-2.5 font-mono text-[0.75rem]`,children:[n.additions>0&&(0,g.jsxs)(`span`,{className:`text-add`,children:[`+`,n.additions]}),n.deletions>0&&(0,g.jsxs)(`span`,{className:`text-del`,children:[`−`,n.deletions]})]}),t&&(0,g.jsx)(`span`,{className:`inline-flex items-center gap-2.5 font-mono text-[0.75rem]`,children:`outside the repository, read-only`})]})}function Rq(e,t,n,r,i,a,o,s){let c=vN(n!=null,e,o),l=r.filter(e=>e.anchor.kind===`file`).map(e=>({lineNumber:zq,metadata:{kind:`thread`,thread:e}}));if(i?.path===e&&i.selection==null&&l.push({lineNumber:zq,metadata:{kind:`draft`}}),n){let o=n.status===`D`?`deletions`:`additions`,u=l.map(e=>({...e,side:o}));for(let e of r)e.anchor.kind===`line`&&u.push({side:e.anchor.side===`old`?`deletions`:`additions`,lineNumber:e.anchor.endLine,metadata:{kind:`thread`,thread:e}});if(i?.path===e&&i.selection){let{endLine:e}=hN(i.selection),t=i.selection.range.endSide??i.selection.range.side??`additions`;u.push({side:t,lineNumber:e,metadata:{kind:`draft`}})}if(t.kind===`diff`&&t.fileDiff.hunks.length>0)return{id:c,type:`diff`,fileDiff:t.fileDiff,annotations:u,version:a,collapsed:s};let[d,f]=t.kind===`diff`?n.status===`R`?[`empty`,`No content changes`]:[`empty`,`No changed lines`]:t.kind===`oversized`?[`oversized`,`${t.lines.toLocaleString()} changed lines: not loaded. Press zo or the header's load button to load the diff.`]:t.kind===`error`?[`error`,t.message]:t.kind===`loading`?[`loading`,`Loading…`]:[`binary`,`Binary file`];return l.unshift(Bq(e,t,n,d,f)),{id:c,type:`file`,file:{name:e,contents:``,prevName:n.status===`R`?n.oldPath:void 0},annotations:l,version:a,collapsed:s}}if(t.kind!==`file`){let[n,r]=t.kind===`binary`?[`binary`,`Binary file`]:t.kind===`error`?[`error`,t.message]:[`loading`,`Loading…`];return l.unshift(Bq(e,t,void 0,n,r)),{id:c,type:`file`,file:{name:e,contents:``},annotations:l,version:a,collapsed:s}}let u=l;for(let e of r)e.anchor.kind===`line`&&e.anchor.side!==`old`&&u.push({lineNumber:e.anchor.endLine,metadata:{kind:`thread`,thread:e}});return i?.path===e&&i.selection&&mN(i.selection)===`new`&&u.push({lineNumber:hN(i.selection).endLine,metadata:{kind:`draft`}}),{id:c,type:`file`,file:t.file,annotations:u,version:a,collapsed:s}}var zq=0;function Bq(e,t,n,r,i){let a=t.kind===`binary`?sP(e,n):null;return a?{lineNumber:zq,metadata:{kind:`image`,path:e,sides:a}}:{lineNumber:zq,metadata:{kind:`placeholder`,placeholder:r,message:i}}}function Vq({id:e,resizeHeader:t}){let n=yN(e),r=(0,p.useRef)(null),i=Z(e=>e.search.open&&e.search.kind===`text`&&e.search.scope===`file`&&e.search.path===n);(0,p.useLayoutEffect)(()=>{let n=r.current;if(!n)return;let i=0,a=()=>{let r=n.getBoundingClientRect().height+1;r<=1||r===i||(i=r,t(e,r))};a();let o=new ResizeObserver(a);return o.observe(n),()=>o.disconnect()},[e,t,i]);let a=Z(e=>e.snapshot?.changed.find(e=>e.path===n));return(0,g.jsxs)(`div`,{ref:r,"data-path":n,children:[(0,g.jsxs)(`div`,{className:`group flex h-[calc(var(--diffle-header-height)-1px)] items-center gap-2 px-2.5 py-1.5`,children:[(0,g.jsx)(hM,{size:`0.875rem`,className:`shrink-0 text-muted`}),a?.oldPath&&a.oldPath!==n&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(oF,{path:a.oldPath,nowrap:!0,tooltip:!1}),(0,g.jsx)(`span`,{className:`text-muted`,children:`→`})]}),(0,g.jsx)(oF,{path:n,nowrap:!0,tooltip:!1}),(0,g.jsx)(Hq,{path:n}),(0,g.jsx)(`span`,{className:`mr-auto`}),a&&(0,g.jsxs)(`span`,{className:`flex shrink-0 gap-2 font-mono text-[0.75rem]`,children:[(0,g.jsxs)(`span`,{className:`text-del`,children:[`−`,a.deletions]}),(0,g.jsxs)(`span`,{className:`text-add`,children:[`+`,a.additions]})]}),(0,g.jsx)(Uq,{path:n})]}),(0,g.jsx)(yK,{path:n})]})}function Hq({path:e}){let t=Z(e=>e.flash),[n,r]=(0,p.useState)(!1),i=(0,p.useRef)(null);return(0,p.useEffect)(()=>()=>void(i.current&&clearTimeout(i.current)),[]),(0,g.jsx)(X,{variant:`ghost`,icon:!0,className:Nj(`shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100`,n&&`opacity-100`),title:`Copy path (yp)`,"aria-label":`Copy path`,onClick:async()=>{if(!await YM(e))return t(`The browser blocked clipboard access`);r(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>r(!1),1400)},children:(0,g.jsx)(JM,{done:n,children:(0,g.jsx)(aM,{size:`0.875rem`})})})}function Uq({path:e}){let t=Z(t=>t.snapshot?.changed.find(t=>t.path===e)),n=Z(t=>t.activePath===e),r=(0,p.useRef)(null);(0,p.useEffect)(()=>{let e=r.current&&uq(r.current);if(e)return e.toggleAttribute(`data-active`,n),()=>e.removeAttribute(`data-active`)},[n]);let i=Z(e=>e.toggleCollapsed),a=Z(e=>e.selectFile),o=Z(t=>t.fileView?.path===e);(0,p.useEffect)(()=>{let t=r.current,n=(t&&uq(t))?.shadowRoot?.querySelector(`[data-diffs-header]`)??t?.closest(`[data-diffs-header]`);if(!n)return;if(o)return n.style.cursor=`auto`,()=>{n.style.cursor=``};let s=t=>{let n=t.target;n instanceof Element&&n.closest(`button, input, label, a, form, [role="button"]`)||(window.getSelection()?.isCollapsed??!0)&&(a(e),i(e))};return n.addEventListener(`click`,s),()=>n.removeEventListener(`click`,s)},[e,i,a,o]);let s=Z(e=>t?jN(e,t):`unviewed`),c=Z(e=>e.setViewed),l=Z(t=>t.threads.filter(t=>t.anchor.path===e&&!t.resolved).length),u=Z(t=>FN(t,e)),d=Z(e=>e.openFullFile),f=Z(t=>t.loaded[e]?.kind===`oversized`),m=Z(e=>e.loadPatch),h=Z(e=>e.openFileDraft),_=Z(t=>t.fileView?.external===!0&&t.fileView.path===e),v=Z(e=>e.snapshot==null||tP(e.snapshot.mode)==null);return(0,g.jsxs)(`span`,{ref:r,className:`inline-flex items-center gap-2.5 font-mono text-[0.75rem]`,children:[l>0&&(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-0.75 rounded-[0.625rem] bg-hover px-1.75 py-0`,children:[(0,g.jsx)(OM,{size:`0.75rem`}),` `,l]}),t?.generated&&(0,g.jsx)(`span`,{className:`inline-flex items-center gap-0.75 rounded-[0.625rem] bg-hover px-1.75 py-0 font-sans text-muted`,title:`Detected as generated: starts collapsed and ranks low`,children:`generated`}),t?.submodule&&(0,g.jsx)(`span`,{className:`inline-flex items-center gap-0.75 rounded-[0.625rem] bg-hover px-1.75 py-0 font-sans text-muted`,title:`Submodule: only the recorded commit changes`,children:`submodule`}),f&&(0,g.jsxs)(X,{variant:`ghost`,onClick:()=>void m(e),title:`Large diff, not loaded yet (zo)`,children:[(0,g.jsx)(sM,{size:`0.875rem`}),` Load diff`]}),t&&s===`restale`&&(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-0.75 rounded-[0.625rem] bg-hover px-1.75 py-0 font-sans text-warn`,title:`You marked this viewed, then its contents changed`,children:[(0,g.jsx)(FM,{size:`0.75rem`}),` changed since viewed`]}),!_&&v&&(0,g.jsx)(X,{variant:`ghost`,icon:!0,onClick:()=>h(e),title:`Comment on this file as a whole (C)`,children:(0,g.jsx)(DM,{size:`0.875rem`})}),!o&&(!t||!t.binary&&!t.submodule&&t.status!==`D`)&&(0,g.jsx)(X,{variant:`ghost`,icon:!0,onClick:()=>void d(e),title:`View full file (F)`,children:(0,g.jsx)(hM,{size:`0.875rem`})}),t&&!o&&(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(`label`,{className:`inline-flex cursor-pointer items-center gap-1 font-sans`,title:s===`restale`?`Mark viewed again and collapse the file (v)`:`Mark as viewed and collapse the file (v)`,children:[(0,g.jsx)(`input`,{type:`checkbox`,checked:s===`viewed`,onChange:t=>void c(e,t.target.checked)}),`Viewed`]})}),!o&&(0,g.jsx)(X,{variant:`ghost`,icon:!0,onClick:()=>i(e),title:`Collapse / expand`,children:u?(0,g.jsx)(Zj,{size:`0.875rem`}):(0,g.jsx)(Yj,{size:`0.875rem`})})]})}var Wq=`file-tree-container`,Gq=`data-file-tree-style`,Kq=`data-file-tree-unsafe-css`,qq=`data-file-tree-scrollbar-measure`,Jq=`data-file-tree-scrollbar-gutter-measured`,Yq=`--trees-scrollbar-gutter-measured`,Xq=`header`,Zq=`context-menu`,Qq=`context-menu-trigger`,$q=typeof window>`u`?p.useEffect:p.useLayoutEffect;function eJ(e,t,n){let r=e==null?null:(0,g.jsx)(`div`,{slot:Xq,children:e}),i=t!=null&&n!=null?(0,g.jsx)(`div`,{slot:Zq,children:t(n.item,n.context)}):null;return r==null&&i==null?null:(0,g.jsxs)(g.Fragment,{children:[r,i]})}function tJ(e,t){return typeof window>`u`&&t!=null?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t.shadowHtml}}),e]}):(0,g.jsx)(g.Fragment,{children:e})}function nJ(e){let t=e.shadowRoot;return t?.querySelector(`[data-file-tree-id]`)instanceof HTMLElement||t?.querySelector(`[data-file-tree-id]`)instanceof SVGElement||e.querySelector(`template[shadowrootmode="open"]`)instanceof HTMLTemplateElement}function rJ(e,t,n,r,i){let a={...e??{}};if(t!=null&&delete a.header,n){let t=e?.contextMenu,n=t?.onClose,o=t?.onOpen;a.contextMenu={...t??{},enabled:!0,onClose:()=>{n?.(),r()},onOpen:(e,t)=>{i(e,t),o?.(e,t)}},delete a.contextMenu.render}return a.header!=null||a.contextMenu!=null?a:void 0}function iJ({header:e,id:t,model:n,preloadedData:r,renderContextMenu:i,...a}){let[o,s]=(0,p.useState)(null),[c,l]=(0,p.useState)(null),u=(0,p.useRef)(n.getComposition()),d=(0,p.useRef)(n);d.current!==n&&(d.current=n,u.current=n.getComposition());let f=i!=null,m=(0,p.useCallback)(()=>{s(null)},[]),h=(0,p.useCallback)((e,t)=>{s({context:t,item:e})},[]),_=u.current,v=(0,p.useMemo)(()=>rJ(_,e,f,m,h),[_,m,h,f,e]),y=(0,p.useCallback)(e=>{l(e)},[]);(0,p.useEffect)(()=>{f||s(null)},[f]),$q(()=>{n.setComposition(v)},[v,n]),$q(()=>{if(c!=null)return r!=null&&nJ(c)?n.hydrate({fileTreeContainer:c}):n.render({fileTreeContainer:c}),()=>{n.unmount(),n.setComposition(_)}},[_,c,n,r]);let b=tJ(eJ(e,i,o),r),x=t??r?.id,S={"--trees-item-height":`${String(n.getItemHeight())}px`,"--trees-density-override":n.getDensityFactor(),...a.style};return(0,g.jsx)(Wq,{...a,id:x,ref:y,style:S,suppressHydrationWarning:r!=null,children:b})}var aJ=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
1730
|
+
`;function Mq(e,t,n){let r=SN(t);if(!Nq(r))return null;let i=Pq(e.tokenElement,n,jP(r));if(!i)return null;let a=`side`in e&&e.side===`deletions`?`old`:`new`,o=e.lineNumber;if(a===`old`){let t=e.tokenElement.closest(`[data-line]`),n=t?.dataset.lineType?.startsWith(`context`)?Number(t.dataset.altLine):NaN;Number.isFinite(n)&&(a=`new`,o=n)}return{path:r,side:a,line:o,col:e.lineCharStart+i.start,text:i.text}}function Nq(e){let t=Kk(e),{lsp:n}=Z.getState();return t!=null&&n.enabled&&n.servers.some(e=>e.languages.includes(t))}function Pq(e,t,n=!1){let r=e.firstChild;if(!r||r.nodeType!==Node.TEXT_NODE||e.childNodes.length!==1)return null;let i=r.textContent??``,a=document.createRange(),o=-1;for(let e=0;e<i.length;e++){a.setStart(r,e),a.setEnd(r,e+1);let n=a.getBoundingClientRect();if(t>=n.left&&t<=n.right){o=e;break}}return n?o>=0&&/\S/.test(i[o])?{start:o,text:i}:null:DG(i).find(e=>o>=e.start&&o<e.start+e.text.length)??null}function Fq(e,t){e.classList.toggle(`lsp-hover`,t)}var Iq={theme:KP,loadDiffFiles:Aq,stickyHeaders:!0,enableLineSelection:!0,useTokenTransformer:!0,lineHoverHighlight:`number`,overflow:`wrap`},Lq={kind:`loading`};function Rq(e){if(e.runningKey||!e.pending)return;let t=e.pending;e.pending=null,e.lastKey!==t.key&&(e.runningKey=t.key,Promise.resolve().then(()=>t.pool.primeDiffHighlightCache(t.diff)).catch(()=>{}).finally(()=>{e.runningKey=null,e.lastKey=t.key,Rq(e)}))}function zq(){let e=WG(),t=(0,p.useMemo)(()=>BK(e),[e]),n=Z(e=>e.snapshot),r=Z(e=>e.error),i=Z(e=>e.loaded),a=Z(e=>e.gens),o=Z(e=>e.fileView),s=Z(e=>e.threads),c=Z(e=>e.showResolved),l=Z(e=>e.replyTo),u=Z(e=>e.editingId),d=Z(e=>e.draft),f=Z(e=>e.collapsed),m=Z(e=>e.viewed),h=Z(e=>e.config),_=Z(e=>e.selection),v=Z(e=>e.setSelection),y=Z(e=>e.openDraft),b=Z(e=>e.goToDefinition),x=Z(e=>e.openSymbolMenu),S=Z(e=>e.scrollTarget),C=Z(e=>e.reveal),w=Z(e=>e.setActivePath),T=(0,p.useRef)(null),E=Zp(),D=(0,p.useRef)({runningKey:null,lastKey:null,pending:null}),O=Z(e=>e.theme),k=Z(e=>e.diffStyle),A=(0,p.useRef)(new Map),ee=(0,p.useMemo)(()=>{if(!n)return[];let e=new Map(n.changed.map(e=>[e.path,e])),t={collapsed:f,viewed:m,config:h,snapshot:n},r=new Map;for(let e of zN({threads:s,showResolved:c})){let t=r.get(e.anchor.path);t?t.push(e):r.set(e.anchor.path,[e])}let p=(e,t,n)=>{let r=qN(A.current.get(e),KN({draft:d,replyTo:l,editingId:u},e,t,n));return A.current.set(e,r),r.version};if(o){let{path:e,item:t}=o,n=r.get(e)??[],i=t&&Vq(e,t,void 0,n,d,p(e,n,!1),a[e]??0,!1);return i?[i]:[]}let g=[];for(let o of EN(n)){let n=i[o]??Lq,s=r.get(o)??[],c=RN(t,o),l=Vq(o,n,e.get(o),s,d,p(o,s,c),a[o]??0,c);l&&g.push(l)}return g},[n,i,a,o,s,c,l,u,d,f,m,h]),[j,M]=(0,p.useState)(null),N=(0,p.useRef)(null),P=(0,p.useCallback)(e=>{N.current=e,M(e)},[]),F=(0,p.useRef)(!1),I=(0,p.useRef)(o);(I.current==null!=(o==null)||I.current?.path!==o?.path)&&(I.current=o,F.current=!0),(0,p.useEffect)(()=>{F.current=!1},[ee]),(0,p.useEffect)(()=>(MG(()=>T.current),()=>MG(()=>null)),[]),(0,p.useEffect)(()=>{if(j)return rq(()=>T.current,j)},[j]),(0,p.useEffect)(()=>{if(j)return sq(()=>T.current,j)},[j]),(0,p.useEffect)(()=>{if(j)return EG(()=>T.current,j)},[j]),(0,p.useEffect)(()=>{PG(_)},[_]);let te=(0,p.useRef)(!1);(0,p.useEffect)(()=>{if(!j)return;let e=0,n=j.scrollTop,r=`down`,i=new Map(ee.map((e,t)=>[e.id,t])),a=D.current,o=()=>{e=0;let n=T.current?.getInstance()?.getRenderedItems()??[];if(E&&n.length>0){let e=r===`down`?-1:ee.length;for(let t of n){let n=i.get(t.id);n!==void 0&&(e=r===`down`?Math.max(e,n):Math.min(e,n))}let t=e+(r===`down`?1:-1),o=ee[t];if(o?.type===`diff`&&o.fileDiff.cacheKey){let e=`${O}:${o.fileDiff.cacheKey}`;a.runningKey!==e&&a.lastKey!==e?a.pending={key:e,diff:o.fileDiff,pool:E}:a.pending?.key!==e&&(a.pending=null),Rq(a)}else a.pending=null}if(te.current||Z.getState().selection)return;let o=j.getBoundingClientRect(),s=t.itemMetrics.diffHeaderHeight,c=o.top+o.height*kq,l=n.map(e=>({id:e.id,rect:e.element.getBoundingClientRect()})).filter(e=>e.rect.bottom>o.top+s+1&&e.rect.top<o.bottom&&e.rect.height>0);if(l.length===0)return;let u=Z.getState(),d=SN((l.find(e=>SN(e.id)===u.activePath)??l.filter(e=>e.rect.top<=c).sort((e,t)=>t.rect.top-e.rect.top)[0]??l[0]).id);d!==u.activePath&&u.setActivePath(d)},s=()=>{let t=j.scrollTop;t!==n&&(r=t>n?`down`:`up`),n=t,e||=requestAnimationFrame(o)};return j.addEventListener(`scroll`,s,{passive:!0}),()=>{j.removeEventListener(`scroll`,s),e&&cancelAnimationFrame(e),a.pending=null}},[j,t,ee,E,O]),(0,p.useEffect)(()=>Z.subscribe((e,n)=>{if(e.theme===n.theme&&e.diffStyle===n.diffStyle)return;let r=N.current,i=T.current?.getInstance()?.getRenderedItems();if(!r||!i)return;let a=r.getBoundingClientRect(),o=cG(i.map(e=>({id:e.id,root:e.element.shadowRoot??e.element})),a.top+t.itemMetrics.diffHeaderHeight,a.bottom);o&&Z.setState(e=>({scrollTarget:{...o,align:`keep`,nonce:(e.scrollTarget?.nonce??0)+1}}))}),[t]),(0,p.useEffect)(()=>{if(!C||!T.current)return;let e=T.current;e.scrollTo({type:`item`,id:C.id,align:`start`,behavior:`instant`});let t=0,n=!1,r=()=>{if(n)return;let i=e.getInstance()?.getRenderedItems().find(e=>e.id===C.id);if(i?.type===`diff`){i.instance.revealLine(C.line);let e=i.instance,t=C.line,r=C.line;for(;t>1&&C.line-t<1e4&&e.isLineRenderable(t-1);)t--;for(;r-t<1e4&&e.isLineRenderable(r+1);)r++;Z.getState().addRevealed(C.id,t,r),setTimeout(()=>{n||Z.setState(e=>({scrollTarget:{id:C.id,line:C.line,side:`new`,align:`eye`,nonce:(e.scrollTarget?.nonce??0)+1}}))},30);return}t++<40&&setTimeout(r,50)};return r(),()=>{n=!0}},[C]);let ne=(0,p.useCallback)(e=>{let n=e.align??`center`,r=n===`eye`||n===`top`||n===`bottom`||n===`keep`,i=N.current?.clientHeight??800,a=(T.current?.getInstance()?.getRenderedItems().find(t=>t.id===e.id))?.element.shadowRoot?.querySelector(`[data-diffs-header]`)?.getBoundingClientRect().height??t.itemMetrics.diffHeaderHeight,o=t.edge,s=n===`eye`?i*kq-a:n===`top`?o:n===`bottom`?Math.max(o,i-a-o-t.itemMetrics.lineHeight):n===`keep`?e.offset??0:0,c=r?`start`:n;return{eye:r,offset:s,header:a,target:e.line?{type:`line`,id:e.id,lineNumber:e.line,side:e.side===`old`?`deletions`:`additions`,align:c,offset:s,behavior:r?`instant`:void 0}:{type:`item`,id:e.id,align:`start`,behavior:`instant`}}},[t]),re=e=>{let t=T.current?.getInstance()?.getRenderedItems().find(t=>t.id===e.id),n=t?.element.shadowRoot??t?.element;return n&&e.line?sG(n,e.line,e.side??`new`):null},L=(0,p.useRef)(O),R=(0,p.useRef)(S);(0,p.useLayoutEffect)(()=>{let e=F.current||L.current!==O,t=S!==R.current;L.current=O,R.current=S;let n=N.current;n&&(n.style.visibility=e&&t&&S?.line&&!re(S)?`hidden`:``)},[S,O]),(0,p.useEffect)(()=>{if(!S||!T.current)return;if(S.unlessVisible&&N.current){let e=T.current.getInstance()?.getRenderedItems().find(e=>e.id===S.id),t=N.current.getBoundingClientRect();if(S.unlessVisible===`search`){let n=e?.element.querySelector(`[data-content-search]`)?.closest(`form`)?.getBoundingClientRect();if(n&&n.height>0&&n.top>=t.top&&n.bottom<=t.bottom)return}else{let n=e?.element.getBoundingClientRect().top;if(n!=null&&n>=t.top&&n<t.bottom)return}}let{eye:e,offset:n,header:r,target:i}=ne(S),a=e&&S.line!=null;te.current=!0;let o,s=()=>{o=setTimeout(()=>{te.current=!1},150)},c=()=>{N.current&&(N.current.style.visibility=``)},l=()=>{let e=N.current;if(!e)return NaN;let a=e.getBoundingClientRect().top;if(i.type===`item`){let e=T.current?.getInstance()?.getRenderedItems().find(e=>e.id===S.id)?.element;return e?e.getBoundingClientRect().top-(a+t.layout.paddingTop):NaN}return(re(S)?.getBoundingClientRect().top??NaN)-(a+n+r)},u=a||i.type===`item`,d=()=>{let e=N.current,t=re(S);if(!e||!t)return NaN;let n=(T.current?.getInstance()?.getRenderedItems().find(e=>e.id===S.id))?.element.shadowRoot?.querySelector(`[data-diffs-header]`)?.getBoundingClientRect().height;return VK(e.getBoundingClientRect(),t.getBoundingClientRect(),n??r)},f=()=>{let e=T.current,t=e?.getInstance();if(!e||!t||!e.getItem(S.id))return!1;if(e.scrollTo(i),t.render(!0),!u){let e=i.type===`line`?d():NaN;return!Number.isNaN(e)&&Math.abs(e)>1&&N.current&&(N.current.scrollTop+=e,t.render(!0)),!0}for(let n=0;n<4;n++){let n=l();if(Number.isNaN(n)){e.scrollTo(i),t.render(!0);continue}if(Math.abs(n)<=1||(e.scrollTo({...i,offset:(i.offset??0)-n}),t.render(!0),!(l()!==n||!N.current)&&(N.current.scrollTop+=n,t.render(!0),l()===n)))break}return!0},p=!1,m=0,h=()=>{setTimeout(()=>{if(p)return;let e=l();!Number.isNaN(e)&&Math.abs(e)>1&&N.current&&(N.current.scrollTop+=e),m++<2&&h()},100)},g=0,_=()=>{if(!p){if(!f()){g++<20?setTimeout(_,100):(c(),s());return}c(),s(),u&&h()}};return _(),()=>{p=!0,o&&clearTimeout(o)}},[S,t,ne]);let z=(0,p.useCallback)(e=>{e==null&&F.current||(v(e),e&&w(SN(e.id)))},[v,w]),B=(0,p.useRef)(()=>{}),ie=(0,p.useMemo)(()=>({...Iq,unsafeCSS:jq+t.css,layout:t.layout,itemMetrics:t.itemMetrics,hunkSeparators:`line-info`,themeType:O,diffStyle:k,onLineSelectionEnd:()=>{let e=T.current?.getSelectedLines();e&&y(e)},onTokenEnter:(e,t,n)=>{let r=null,i=t=>{let i=Mq(e,n.item.id,t.clientX);i?.col!==r?.col&&(r=i,LP.set(i,e.tokenElement),CG.hover(i),i?LK.enter(i,e.tokenElement):LK.leave(),Fq(e.tokenElement,!!i&&!jP(i.path)&&(t.ctrlKey||t.metaKey)))};i(t),e.tokenElement.addEventListener(`pointermove`,i),B.current=()=>e.tokenElement.removeEventListener(`pointermove`,i)},onTokenLeave:e=>{B.current(),B.current=()=>{},LP.set(null),CG.hover(null),LK.leave(),Fq(e.tokenElement,!1)},onLineClick:(e,t)=>{let n=`annotationSide`in e?e.annotationSide:`additions`,r={start:e.lineNumber,side:n,end:e.lineNumber,endSide:n};if(e.numberColumn){T.current?.getSelectedLines()||y({id:t.item.id,range:r});return}v({id:t.item.id,range:r}),w(SN(t.item.id))},onTokenClick:(e,t,n)=>{let r=Mq(e,n.item.id,t.clientX);if(!(!r||jP(r.path))){if(Fq(e.tokenElement,!1),LK.cancel(),t.ctrlKey||t.metaKey){t.preventDefault(),b(r);return}FG(r,e.tokenElement),x(r,t.clientX,t.clientY)}}}),[y,b,x,v,w,O,k,t]),ae=(0,p.useCallback)(e=>{let t=e.metadata;if(t.kind===`placeholder`)return(0,g.jsx)(gq,{kind:t.placeholder,message:t.message});if(t.kind===`image`)return(0,g.jsx)(wq,{path:t.path,sides:t.sides});if(t.kind===`draft`){let e=UN(Z.getState());return(0,g.jsx)(fq,{label:e?VN(e):`whole file`})}return(0,g.jsx)(cq,{thread:t.thread})},[]),oe=(0,p.useCallback)((e,n)=>{let r=T.current?.getInstance(),i=r?.getRenderedItems().find(t=>t.id===e);if(!r||!i)return;let a=N.current,o=a?.scrollTop;i.instance.setMetrics({...t.itemMetrics,diffHeaderHeight:n}),r.instanceChanged(i.instance,!0),r.render(!0),a&&o!==void 0&&a.scrollTop!==o&&(a.scrollTop=o,a.dispatchEvent(new Event(`scroll`)),r.render(!0))},[t]),se=(0,p.useCallback)(e=>(0,g.jsx)(Wq,{id:e.id,resizeHeader:oe}),[oe]);return r?(0,g.jsx)(`main`,{className:`relative flex min-h-0 min-w-0 flex-col outline-none`,children:(0,g.jsx)(`div`,{className:`border-b border-b-border bg-hover px-3 py-2 text-danger`,children:r})}):n?n.changed.length===0&&!o?(0,g.jsx)(`main`,{className:`relative flex min-h-0 min-w-0 flex-col outline-none`,children:(0,g.jsxs)(`div`,{className:`p-10 text-center text-muted`,children:[`No changes for `,(0,g.jsx)(`code`,{children:tk(n.mode)}),`. Open any file from the tree to comment on it.`]})}):(0,g.jsxs)(`main`,{className:`relative flex min-h-0 min-w-0 flex-col outline-none`,tabIndex:-1,children:[(0,g.jsx)(SK,{}),(0,g.jsx)(YK,{}),(0,g.jsx)(KK,{}),(0,g.jsx)(RK,{}),(0,g.jsx)(UK,{}),o&&(0,g.jsx)(Bq,{path:o.path}),o?!o.item&&(0,g.jsxs)(`div`,{className:`border-b border-b-border bg-hover px-3 py-2 text-muted`,children:[`Loading `,o.path,`…`]}):n.changed.some(e=>!i[e.path])&&(0,g.jsx)(`div`,{className:`border-b border-b-border bg-hover px-3 py-2 text-muted`,children:`Loading diffs…`}),(0,g.jsx)(Ay,{ref:T,containerRef:P,className:`codeview min-h-0 flex-1 overflow-auto bg-surface outline-none`,items:ee,options:ie,selectedLines:_,onSelectedLinesChange:z,renderAnnotation:ae,renderCustomHeader:se},O)]}):(0,g.jsx)(`main`,{className:`relative flex min-h-0 min-w-0 flex-col outline-none`,children:(0,g.jsx)(`div`,{className:`p-10 text-center text-muted`,children:`Loading snapshot…`})})}function Bq({path:e}){let t=Z(e=>e.fileView?.external??!1),n=Z(t=>t.snapshot?.changed.find(t=>t.path===e));return(0,g.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-b-border bg-hover px-3 py-1.5 text-[0.75rem]`,children:[(0,g.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono`,children:(0,g.jsx)(lF,{path:e})}),n&&(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-2.5 font-mono text-[0.75rem]`,children:[n.additions>0&&(0,g.jsxs)(`span`,{className:`text-add`,children:[`+`,n.additions]}),n.deletions>0&&(0,g.jsxs)(`span`,{className:`text-del`,children:[`−`,n.deletions]})]}),t&&(0,g.jsx)(`span`,{className:`inline-flex items-center gap-2.5 font-mono text-[0.75rem]`,children:`outside the repository, read-only`})]})}function Vq(e,t,n,r,i,a,o,s){let c=xN(n!=null,e,o),l=r.filter(e=>e.anchor.kind===`file`).map(e=>({lineNumber:Hq,metadata:{kind:`thread`,thread:e}}));if(i?.path===e&&i.selection==null&&l.push({lineNumber:Hq,metadata:{kind:`draft`}}),n){let o=n.status===`D`?`deletions`:`additions`,u=l.map(e=>({...e,side:o}));for(let e of r)e.anchor.kind===`line`&&u.push({side:e.anchor.side===`old`?`deletions`:`additions`,lineNumber:e.anchor.endLine,metadata:{kind:`thread`,thread:e}});if(i?.path===e&&i.selection){let{endLine:e}=vN(i.selection),t=i.selection.range.endSide??i.selection.range.side??`additions`;u.push({side:t,lineNumber:e,metadata:{kind:`draft`}})}if(t.kind===`diff`&&t.fileDiff.hunks.length>0)return{id:c,type:`diff`,fileDiff:t.fileDiff,annotations:u,version:a,collapsed:s};let[d,f]=t.kind===`diff`?n.status===`R`?[`empty`,`No content changes`]:[`empty`,`No changed lines`]:t.kind===`oversized`?[`oversized`,`${t.lines.toLocaleString()} changed lines: not loaded. Press zo or the header's load button to load the diff.`]:t.kind===`error`?[`error`,t.message]:t.kind===`loading`?[`loading`,`Loading…`]:[`binary`,`Binary file`];return l.unshift(Uq(e,t,n,d,f)),{id:c,type:`file`,file:{name:e,contents:``,prevName:n.status===`R`?n.oldPath:void 0},annotations:l,version:a,collapsed:s}}if(t.kind!==`file`){let[n,r]=t.kind===`binary`?[`binary`,`Binary file`]:t.kind===`error`?[`error`,t.message]:[`loading`,`Loading…`];return l.unshift(Uq(e,t,void 0,n,r)),{id:c,type:`file`,file:{name:e,contents:``},annotations:l,version:a,collapsed:s}}let u=l;for(let e of r)e.anchor.kind===`line`&&e.anchor.side!==`old`&&u.push({lineNumber:e.anchor.endLine,metadata:{kind:`thread`,thread:e}});return i?.path===e&&i.selection&&_N(i.selection)===`new`&&u.push({lineNumber:vN(i.selection).endLine,metadata:{kind:`draft`}}),{id:c,type:`file`,file:t.file,annotations:u,version:a,collapsed:s}}var Hq=0;function Uq(e,t,n,r,i){let a=t.kind===`binary`?uP(e,n):null;return a?{lineNumber:Hq,metadata:{kind:`image`,path:e,sides:a}}:{lineNumber:Hq,metadata:{kind:`placeholder`,placeholder:r,message:i}}}function Wq({id:e,resizeHeader:t}){let n=SN(e),r=(0,p.useRef)(null),i=Z(e=>e.search.open&&e.search.kind===`text`&&e.search.scope===`file`&&e.search.path===n);(0,p.useLayoutEffect)(()=>{let n=r.current;if(!n)return;let i=0,a=()=>{let r=n.getBoundingClientRect().height+1;r<=1||r===i||(i=r,t(e,r))};a();let o=new ResizeObserver(a);return o.observe(n),()=>o.disconnect()},[e,t,i]);let a=Z(e=>e.snapshot?.changed.find(e=>e.path===n));return(0,g.jsxs)(`div`,{ref:r,"data-path":n,children:[(0,g.jsxs)(`div`,{className:`group flex h-[calc(var(--diffle-header-height)-1px)] items-center gap-2 px-2.5 py-1.5`,children:[(0,g.jsx)(vM,{size:`0.875rem`,className:`shrink-0 text-muted`}),a?.oldPath&&a.oldPath!==n&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(lF,{path:a.oldPath,nowrap:!0,tooltip:!1}),(0,g.jsx)(`span`,{className:`text-muted`,children:`→`})]}),(0,g.jsx)(lF,{path:n,nowrap:!0,tooltip:!1}),(0,g.jsx)(Gq,{path:n}),(0,g.jsx)(`span`,{className:`mr-auto`}),a&&(0,g.jsxs)(`span`,{className:`flex shrink-0 gap-2 font-mono text-[0.75rem]`,children:[(0,g.jsxs)(`span`,{className:`text-del`,children:[`−`,a.deletions]}),(0,g.jsxs)(`span`,{className:`text-add`,children:[`+`,a.additions]})]}),(0,g.jsx)(Kq,{path:n})]}),(0,g.jsx)(SK,{path:n})]})}function Gq({path:e}){let t=Z(e=>e.flash),[n,r]=(0,p.useState)(!1),i=(0,p.useRef)(null);return(0,p.useEffect)(()=>()=>void(i.current&&clearTimeout(i.current)),[]),(0,g.jsx)(X,{variant:`ghost`,icon:!0,className:Ij(`shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100`,n&&`opacity-100`),title:`Copy path (yp)`,"aria-label":`Copy path`,onClick:async()=>{if(!await QM(e))return t(`The browser blocked clipboard access`);r(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>r(!1),1400)},children:(0,g.jsx)(ZM,{done:n,children:(0,g.jsx)(cM,{size:`0.875rem`})})})}function Kq({path:e}){let t=Z(t=>t.snapshot?.changed.find(t=>t.path===e)),n=Z(t=>t.activePath===e),r=(0,p.useRef)(null);(0,p.useEffect)(()=>{let e=r.current&&pq(r.current);if(e)return e.toggleAttribute(`data-active`,n),()=>e.removeAttribute(`data-active`)},[n]);let i=Z(e=>e.toggleCollapsed),a=Z(e=>e.selectFile),o=Z(t=>t.fileView?.path===e);(0,p.useEffect)(()=>{let t=r.current,n=(t&&pq(t))?.shadowRoot?.querySelector(`[data-diffs-header]`)??t?.closest(`[data-diffs-header]`);if(!n)return;if(o)return n.style.cursor=`auto`,()=>{n.style.cursor=``};let s=t=>{let n=t.target;n instanceof Element&&n.closest(`button, input, label, a, form, [role="button"]`)||(window.getSelection()?.isCollapsed??!0)&&(a(e),i(e))};return n.addEventListener(`click`,s),()=>n.removeEventListener(`click`,s)},[e,i,a,o]);let s=Z(e=>t?PN(e,t):`unviewed`),c=Z(e=>e.setViewed),l=Z(t=>t.threads.filter(t=>t.anchor.path===e&&!t.resolved).length),u=Z(t=>RN(t,e)),d=Z(e=>e.openFullFile),f=Z(t=>t.loaded[e]?.kind===`oversized`),m=Z(e=>e.loadPatch),h=Z(e=>e.openFileDraft),_=Z(t=>t.fileView?.external===!0&&t.fileView.path===e),v=Z(e=>e.snapshot==null||iP(e.snapshot.mode)==null);return(0,g.jsxs)(`span`,{ref:r,className:`inline-flex items-center gap-2.5 font-mono text-[0.75rem]`,children:[l>0&&(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-0.75 rounded-[0.625rem] bg-hover px-1.75 py-0`,children:[(0,g.jsx)(jM,{size:`0.75rem`}),` `,l]}),t?.generated&&(0,g.jsx)(`span`,{className:`inline-flex items-center gap-0.75 rounded-[0.625rem] bg-hover px-1.75 py-0 font-sans text-muted`,title:`Detected as generated: starts collapsed and ranks low`,children:`generated`}),t?.submodule&&(0,g.jsx)(`span`,{className:`inline-flex items-center gap-0.75 rounded-[0.625rem] bg-hover px-1.75 py-0 font-sans text-muted`,title:`Submodule: only the recorded commit changes`,children:`submodule`}),f&&(0,g.jsxs)(X,{variant:`ghost`,onClick:()=>void m(e),title:`Large diff, not loaded yet (zo)`,children:[(0,g.jsx)(uM,{size:`0.875rem`}),` Load diff`]}),t&&s===`restale`&&(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-0.75 rounded-[0.625rem] bg-hover px-1.75 py-0 font-sans text-warn`,title:`You marked this viewed, then its contents changed`,children:[(0,g.jsx)(RM,{size:`0.75rem`}),` changed since viewed`]}),!_&&v&&(0,g.jsx)(X,{variant:`ghost`,icon:!0,onClick:()=>h(e),title:`Comment on this file as a whole (C)`,children:(0,g.jsx)(AM,{size:`0.875rem`})}),!o&&(!t||!t.binary&&!t.submodule&&t.status!==`D`)&&(0,g.jsx)(X,{variant:`ghost`,icon:!0,onClick:()=>void d(e),title:`View full file (F)`,children:(0,g.jsx)(vM,{size:`0.875rem`})}),t&&!o&&(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(`label`,{className:`inline-flex cursor-pointer items-center gap-1 font-sans`,title:s===`restale`?`Mark viewed again and collapse the file (v)`:`Mark as viewed and collapse the file (v)`,children:[(0,g.jsx)(`input`,{type:`checkbox`,checked:s===`viewed`,onChange:t=>void c(e,t.target.checked)}),`Viewed`]})}),!o&&(0,g.jsx)(X,{variant:`ghost`,icon:!0,onClick:()=>i(e),title:`Collapse / expand`,children:u?(0,g.jsx)(eM,{size:`0.875rem`}):(0,g.jsx)(Qj,{size:`0.875rem`})})]})}var qq=`file-tree-container`,Jq=`data-file-tree-style`,Yq=`data-file-tree-unsafe-css`,Xq=`data-file-tree-scrollbar-measure`,Zq=`data-file-tree-scrollbar-gutter-measured`,Qq=`--trees-scrollbar-gutter-measured`,$q=`header`,eJ=`context-menu`,tJ=`context-menu-trigger`,nJ=typeof window>`u`?p.useEffect:p.useLayoutEffect;function rJ(e,t,n){let r=e==null?null:(0,g.jsx)(`div`,{slot:$q,children:e}),i=t!=null&&n!=null?(0,g.jsx)(`div`,{slot:eJ,children:t(n.item,n.context)}):null;return r==null&&i==null?null:(0,g.jsxs)(g.Fragment,{children:[r,i]})}function iJ(e,t){return typeof window>`u`&&t!=null?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t.shadowHtml}}),e]}):(0,g.jsx)(g.Fragment,{children:e})}function aJ(e){let t=e.shadowRoot;return t?.querySelector(`[data-file-tree-id]`)instanceof HTMLElement||t?.querySelector(`[data-file-tree-id]`)instanceof SVGElement||e.querySelector(`template[shadowrootmode="open"]`)instanceof HTMLTemplateElement}function oJ(e,t,n,r,i){let a={...e??{}};if(t!=null&&delete a.header,n){let t=e?.contextMenu,n=t?.onClose,o=t?.onOpen;a.contextMenu={...t??{},enabled:!0,onClose:()=>{n?.(),r()},onOpen:(e,t)=>{i(e,t),o?.(e,t)}},delete a.contextMenu.render}return a.header!=null||a.contextMenu!=null?a:void 0}function sJ({header:e,id:t,model:n,preloadedData:r,renderContextMenu:i,...a}){let[o,s]=(0,p.useState)(null),[c,l]=(0,p.useState)(null),u=(0,p.useRef)(n.getComposition()),d=(0,p.useRef)(n);d.current!==n&&(d.current=n,u.current=n.getComposition());let f=i!=null,m=(0,p.useCallback)(()=>{s(null)},[]),h=(0,p.useCallback)((e,t)=>{s({context:t,item:e})},[]),_=u.current,v=(0,p.useMemo)(()=>oJ(_,e,f,m,h),[_,m,h,f,e]),y=(0,p.useCallback)(e=>{l(e)},[]);(0,p.useEffect)(()=>{f||s(null)},[f]),nJ(()=>{n.setComposition(v)},[v,n]),nJ(()=>{if(c!=null)return r!=null&&aJ(c)?n.hydrate({fileTreeContainer:c}):n.render({fileTreeContainer:c}),()=>{n.unmount(),n.setComposition(_)}},[_,c,n,r]);let b=iJ(rJ(e,i,o),r),x=t??r?.id,S={"--trees-item-height":`${String(n.getItemHeight())}px`,"--trees-density-override":n.getDensityFactor(),...a.style};return(0,g.jsx)(qq,{...a,id:x,ref:y,style:S,suppressHydrationWarning:r!=null,children:b})}var cJ=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
1731
1731
|
<symbol id="file-tree-icon-chevron" viewBox="0 0 16 16">
|
|
1732
1732
|
<path d="M12.4697 5.46973C12.7626 5.17684 13.2374 5.17684 13.5303 5.46973C13.8232 5.76262 13.8232 6.23738 13.5303 6.53028L8.53028 11.5303C8.23738 11.8232 7.76262 11.8232 7.46973 11.5303L2.46973 6.53028C2.17684 6.23738 2.17684 5.76262 2.46973 5.46973C2.76262 5.17684 3.23738 5.17684 3.53028 5.46973L8 9.93946L12.4697 5.46973Z" fill="currentcolor"/>
|
|
1733
1733
|
</symbol>
|
|
@@ -1744,72 +1744,72 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1744
1744
|
<symbol id="file-tree-icon-ellipsis" viewBox="0 0 16 16">
|
|
1745
1745
|
<path d="M5 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M9.5 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M14 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" />
|
|
1746
1746
|
</symbol>
|
|
1747
|
-
</svg>`,
|
|
1747
|
+
</svg>`,lJ=`<symbol id="file-tree-builtin-astro" viewBox="0 0 16 16">
|
|
1748
1748
|
<path fill="currentColor" d="M6.08 13.92c-.63-.57-.81-1.79-.55-2.67.45.56 1.08.73 1.73.83 1 .15 1.99.1 2.92-.37l.32-.19q.13.38.08.78a2.1 2.1 0 0 1-.9 1.5q-.3.24-.61.43c-.64.44-.81.95-.57 1.69l.02.08a1.7 1.7 0 0 1-.74-.64 2 2 0 0 1-.3-.98q0-.27-.02-.52-.07-.61-.61-.62a.7.7 0 0 0-.75.6z" class="bg" opacity=".6"/>
|
|
1749
1749
|
<path fill="currentColor" d="M2.5 11.1s1.86-.9 3.72-.9l1.4-4.39c.05-.21.2-.36.38-.36s.33.15.38.36l1.4 4.38c2.2 0 3.72.92 3.72.92l-3.16-8.69q-.13-.4-.45-.42H6.11q-.3.02-.45.42z" class="fg"/>
|
|
1750
|
-
</symbol>`,
|
|
1750
|
+
</symbol>`,uJ=`<symbol id="file-tree-builtin-babel" viewBox="0 0 16 16">
|
|
1751
1751
|
<path fill="currentColor" fill-rule="evenodd" d="M9.49.5q1.92.05 2.66.54 1.27.6 1.35 1.52v.23a4 4 0 0 1-.53 1.9l-1.38 1.24q-.74.38-.72.63c.77.82 1.33 1.29.85 2.42q-.47 1.1-2.04 2.28c-.5.32-1.88 1.35-2.96 1.86-1.64.77-3.1 1.4-4.65 1.89-.51.16-1.5.16-1.5.16L.5 15A76 76 0 0 0 5.76 3.49q-.1-.08-.1-.2.1 0 .32-.35l-.03-.09q-1.17.39-2.38 1.3l-.13.03q0-.1-.21-.16-.46.31-.82.7l-.13-.19.16-.06-.03-.16-.34.29L2 4.5q.36-.48.72-.54l.04-.1V3.8q.16 0 .15-.06l.13-.06a6 6 0 0 0 1.13-.9v-.03H4.1l-.12.07q0-.1-.1-.1l-.15.07-.04-.1q.93-.52 1.63-1.05Q7.89.65 9.5.5M8.46 7.83l-.32.04c-1.31.54-2.31.82-2.91.88a71 71 0 0 0-2.2 4.54h.07q.58-.04 3.04-1.42.13 0 1.66-1.05L9.18 9.7v.03q.45-.2.81-1.3v-.2q-.5-.46-1.53-.4m.28-5.75c-.5.1-.75.19-.72.38l-1.16 2.6q-.17.1-.34.95-.3.48-.25.77v.1l.22.05A15 15 0 0 1 8.86 6c1.1-.71 2.12-1.38 2.8-2.54q.24-.33.21-.54-.02-.33-.4-.54c-.54 0-1.07-.34-1.63-.28l-.94-.03z" clip-rule="evenodd"/>
|
|
1752
|
-
</symbol>`,
|
|
1752
|
+
</symbol>`,dJ=`<symbol id="file-tree-builtin-bash" viewBox="0 0 16 16">
|
|
1753
1753
|
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
1754
1754
|
<path fill="currentColor" d="M11.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zM7 6.75C7 6.42 6.64 6 6 6s-1 .42-1 .75q-.01.25.22.41.26.21.89.35.74.14 1.28.53c.37.29.61.7.61 1.21 0 .87-.68 1.5-1.5 1.7v.55a.5.5 0 0 1-1 0v-.56c-.82-.18-1.5-.82-1.5-1.69a.5.5 0 0 1 1 0c0 .33.36.75 1 .75s1-.42 1-.75q.01-.25-.22-.41a2 2 0 0 0-.89-.35q-.74-.14-1.28-.53A1.5 1.5 0 0 1 4 6.75c0-.87.68-1.5 1.5-1.7V4.5a.5.5 0 0 1 1 0v.56c.82.18 1.5.82 1.5 1.69a.5.5 0 0 1-1 0" class="fg-stroke"/>
|
|
1755
|
-
</symbol>`,
|
|
1755
|
+
</symbol>`,fJ=`<symbol id="file-tree-builtin-biome" viewBox="0 0 16 16">
|
|
1756
1756
|
<path fill="currentColor" d="M8 2 4.88 7.35a7 7 0 0 1 3.7-.13l1.04.25-.99 4.16-1.05-.25a2.7 2.7 0 0 0-3.07 1.45l-.98-.47a4 4 0 0 1 1.07-1.31 3.8 3.8 0 0 1 3.23-.71l.5-2.08a6 6 0 0 0-5.07 1.12A5.9 5.9 0 0 0 1 14h14z"/>
|
|
1757
|
-
</symbol>`,
|
|
1757
|
+
</symbol>`,pJ=`<symbol id="file-tree-builtin-bootstrap" viewBox="0 0 16 16">
|
|
1758
1758
|
<path fill="currentColor" fill-rule="evenodd" d="M11.72 1.5A2.5 2.5 0 0 1 14.2 4q.02 1.08.3 2.09c.22.73.56 1.24 1.08 1.45.22.08.4.27.4.5s-.18.43-.4.51q-.76.34-1.08 1.45c-.2.65-.27 1.32-.3 2a2.5 2.5 0 0 1-2.48 2.5H4.25A2.6 2.6 0 0 1 1.7 12c-.04-.85-.1-1.68-.22-2.04C1.26 9.23.92 8.7.4 8.5.18 8.42 0 8.23 0 8s.18-.42.4-.5q.77-.35 1.09-1.46c.1-.36.17-1.19.2-2.04a2.6 2.6 0 0 1 2.56-2.5z" class="bg" clip-rule="evenodd" opacity=".2"/>
|
|
1759
1759
|
<path fill="currentColor" fill-rule="evenodd" d="M8.47 4.54c1.23 0 2.04.68 2.04 1.73 0 .73-.55 1.39-1.24 1.5v.04c.94.1 1.58.77 1.58 1.7 0 1.2-.9 1.95-2.37 1.95H5.97a.3.3 0 0 1-.2-.08.3.3 0 0 1-.08-.2V4.82a.3.3 0 0 1 .08-.2.3.3 0 0 1 .2-.08zm-1.7 6.04h1.49q1.47-.01 1.49-1.15Q9.74 8.31 8.2 8.3H6.77zm0-5.16v2.06h1.21c.93 0 1.45-.38 1.45-1.06 0-.65-.44-1-1.22-1z" class="fg" clip-rule="evenodd"/>
|
|
1760
|
-
</symbol>`,
|
|
1760
|
+
</symbol>`,mJ=`<symbol id="file-tree-builtin-browserslist" viewBox="0 0 16 16">
|
|
1761
1761
|
<path fill="currentColor" d="M8.88 6.96c0 3.82 3.72 4.7 5.7 3.74-.23.9-1.04 1.67-2.35 1.93-.02.4.42 1.28.82 1.63-.9.35-1.94-.12-2.51-.48a5 5 0 0 0-.32 1.87c-.68 0-1.57-1-1.8-1.37-.3.18-.85 1.15-.96 1.72a2.4 2.4 0 0 1-.81-.86 2.4 2.4 0 0 1-.3-1.15c-.38.27-1.48.95-1.99 1.18-.25-.58-.15-1.3 0-2.06-.21.12-1.8.27-2.43.12.32-.36.75-1.19.94-1.57A4.5 4.5 0 0 1 .44 10.6c.48-.22.97-.53 1.49-1.06C1.26 9.17.24 8.64 0 7.7a6 6 0 0 0 1.79-.32C1.28 7.08.44 6.15.6 5.01c.42.21 1.3.37 1.73.3a3.4 3.4 0 0 1-.25-2.75 5 5 0 0 0 1.48 1c-.08-.8.3-2.31.8-2.71.2.46.73 1.21 1.08 1.4.09-.61.87-2.06 1.57-2.25 0 .5.27 1.4.5 1.67.51-.54 2.25-1.44 3.64-1.13-.43.45-.75.61-.86.98 1.05 0 2.78.34 4.27 1.93-2.34-.89-5.69.56-5.69 3.5" class="bg" opacity=".5"/>
|
|
1762
1762
|
<path fill="currentColor" d="M11.21 3.59a4.1 4.1 0 0 0 2.47 2.89c.24-.22.61-.38.95-.19.76.44.2 1.26-.34 1.66l-.07.06a13 13 0 0 1-4.49 1.61l-.3-.43a10.5 10.5 0 0 0 4.13-1.31 1 1 0 0 0 .23-.25.5.5 0 0 0-.21-.69l-.15-.06a4.5 4.5 0 0 1-1.77-1.31 4.5 4.5 0 0 1-.88-1.77q.2-.12.43-.21"/>
|
|
1763
1763
|
<path fill="currentColor" d="M10.36 5.18a.4.4 0 0 0-.03.38c.09.2.3.3.46.23s.24-.3.15-.5l-.01-.02q.23.13.34.39a.83.83 0 0 1-.43 1.08.8.8 0 0 1-1.08-.43.83.83 0 0 1 .6-1.13"/>
|
|
1764
|
-
</symbol>`,
|
|
1764
|
+
</symbol>`,hJ=`<symbol id="file-tree-builtin-bun" viewBox="0 0 16 16">
|
|
1765
1765
|
<path fill="currentColor" d="M8 14c3.87 0 7-2.46 7-5.49 0-1.88-1.2-3.53-3.04-4.52q-1.1-.61-1.84-1.07C9.2 2.35 8.64 2 8 2s-1.36.45-2.31 1.03A29 29 0 0 1 4.04 4C2.2 4.98 1 6.63 1 8.51 1 11.54 4.13 14 8 14M7.18 3.88q.3-.66.3-1.37c0-.08.11-.1.13-.01.38 1.57-.53 2.35-1.2 2.61-.08.03-.12-.07-.06-.12a3 3 0 0 0 .83-1.12m1.2-.05a3 3 0 0 0-.45-1.3V2.5c-.04-.07.05-.15.1-.1 1.15 1.2.77 2.3.33 2.87-.05.05-.13 0-.11-.08q.21-.67.13-1.37m1.04-.32a3 3 0 0 0-.94-1.02v-.01c-.06-.05-.01-.16.07-.12 1.51.61 1.61 1.8 1.43 2.5l-.03.03a.07.07 0 0 1-.1-.06 3 3 0 0 0-.43-1.32m-2.97.32c-.36.3-.74.43-1.2.56q-.11 0-.1-.1a3.5 3.5 0 0 0 1.76-1.57s.09-.07.1.04c0 .18-.2.76-.56 1.07m2.89 6.36q-.13.52-.55.88a1.3 1.3 0 0 1-.75.35 1.3 1.3 0 0 1-.77-.35 1.7 1.7 0 0 1-.54-.88.13.13 0 0 1 .15-.15h2.31a.14.14 0 0 1 .15.15M6.15 8.95a1.1 1.1 0 0 1-1.39-.14A1.1 1.1 0 0 1 5.12 7a1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1-.17 1.69m4.96 0a1.1 1.1 0 0 1-1.4-.14 1.1 1.1 0 0 1 .37-1.8 1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1 .24 1.2 1 1 0 0 1-.41.5"/>
|
|
1766
|
-
</symbol>`,
|
|
1766
|
+
</symbol>`,gJ=`<symbol id="file-tree-builtin-c" viewBox="0 0 16 16">
|
|
1767
1767
|
<path fill="currentColor" fill-rule="evenodd" d="M8 1q.084 0 .166.021.098.023.186.075c1.055.624 4.22 2.486 5.277 3.11.085.05.15.112.209.192h-.002l.028.037a.5.5 0 0 1 .103.21q.031.102.033.21v6.29a.71.71 0 0 1-.347.616l-5.307 3.144a.68.68 0 0 1-.693 0l-5.307-3.144A.72.72 0 0 1 2 11.145V4.832a.71.71 0 0 1 .346-.612l5.288-3.126A.7.7 0 0 1 7.992 1zm2.901 4.349a3.75 3.75 0 1 0 0 5.302l-1.06-1.06a2.25 2.25 0 1 1 0-3.182z" clip-rule="evenodd"/>
|
|
1768
|
-
</symbol>`,
|
|
1768
|
+
</symbol>`,_J=`<symbol id="file-tree-builtin-claude" viewBox="0 0 16 16">
|
|
1769
1769
|
<path fill="currentColor" d="M3.75 10.31 6.5 8.77l.04-.14-.04-.07h-.14l-.46-.03-1.57-.04-1.38-.07-1.33-.07-.34-.07L1 7.86l.03-.21.28-.18.4.03.89.07 1.33.08.97.06 1.43.16h.22l.03-.1-.07-.05-.06-.06-1.39-.92-1.48-.98-.79-.57-.42-.28-.2-.28-.1-.6.39-.41.52.04.12.03.52.4 1.12.86L6.2 6.04l.2.17.09-.06.01-.04-.1-.15-.76-1.46-.85-1.46-.37-.6-.1-.36a1 1 0 0 1-.06-.42l.42-.59.25-.07.6.08.22.2.36.84.58 1.3.9 1.77.29.53.14.47.04.14h.1v-.07l.07-1 .14-1.22.14-1.57.04-.45.23-.53.42-.28.36.15.28.41-.04.25-.16 1.08-.36 1.7-.21 1.14h.12l.14-.15.58-.76.97-1.2.42-.5.5-.51.32-.25h.6l.44.66-.2.68-.61.79-.52.65-.74 1-.45.8.04.05h.1l1.68-.36.9-.16 1.06-.18.5.23.05.22-.2.48-1.15.28-1.34.28-2 .46-.04.01.03.04.9.09.4.03h.94l1.77.14.46.28.27.37-.04.28-.72.37-.95-.23-2.24-.53-.76-.18h-.11v.06l.64.63L12 10.86l1.48 1.35.07.34-.18.28-.2-.03-1.29-.98-.5-.42-1.12-.95h-.07v.1l.25.38 1.37 2.05.07.63-.1.2-.36.14-.38-.08-.8-1.12-.85-1.26-.66-1.15-.07.05-.4 4.23-.19.21-.42.17-.35-.28-.2-.42.2-.87.23-1.12.18-.9.17-1.1.1-.36v-.03h-.1l-.84 1.16-1.27 1.72-1 1.07-.24.1-.42-.22.04-.39.22-.32 1.4-1.8.84-1.1.57-.64-.02-.07h-.04l-3.7 2.4-.66.09-.28-.28.03-.42.14-.14 1.12-.77z"/>
|
|
1770
|
-
</symbol>`,
|
|
1770
|
+
</symbol>`,vJ=`<symbol id="file-tree-builtin-cpp" viewBox="0 0 16 16">
|
|
1771
1771
|
<path fill="currentColor" fill-rule="evenodd" d="M8 1q.084 0 .166.021.098.023.186.075c1.055.624 4.22 2.486 5.277 3.11.085.05.15.112.209.192h-.002l.028.037a.5.5 0 0 1 .103.21q.031.102.033.21v6.29a.71.71 0 0 1-.347.616l-5.307 3.144a.68.68 0 0 1-.693 0l-5.307-3.144A.72.72 0 0 1 2 11.145V4.832a.71.71 0 0 1 .346-.612l5.288-3.126A.7.7 0 0 1 7.992 1zm2.901 4.349a3.75 3.75 0 1 0 0 5.302l-1.06-1.06a2.25 2.25 0 1 1 0-3.182z" clip-rule="evenodd"/>
|
|
1772
|
-
</symbol>`,
|
|
1772
|
+
</symbol>`,yJ=`<symbol id="file-tree-builtin-css" viewBox="0 0 16 16">
|
|
1773
1773
|
<path fill="currentColor" d="M8 15c-5.76 0-7-1.24-7-7V2a1 1 0 0 1 1-1h6c5.77 0 7 1.24 7 7s-1.24 7-7 7" class="vector" opacity=".2"/>
|
|
1774
1774
|
<path fill="currentColor" d="M10.1 9.19h.73c.03.49.22.6 1 .6.76 0 .93-.12.93-.68 0-.52-.17-.67-.94-.85-1.38-.3-1.68-.56-1.68-1.47 0-1.05.3-1.29 1.67-1.29 1.29 0 1.57.2 1.6 1.13h-.74c-.01-.34-.17-.42-.85-.42-.77 0-.94.1-.94.58 0 .42.17.55.96.73 1.36.3 1.66.58 1.66 1.59 0 1.14-.31 1.39-1.73 1.39-1.39 0-1.69-.24-1.67-1.31m-3.9 0h.74c.03.49.21.6.99.6.76 0 .93-.12.93-.68 0-.52-.17-.67-.93-.85-1.39-.3-1.69-.56-1.69-1.47 0-1.05.3-1.29 1.67-1.29 1.3 0 1.58.2 1.6 1.13h-.73c-.02-.34-.18-.42-.85-.42-.78 0-.95.1-.95.58 0 .42.17.55.96.73 1.37.3 1.67.58 1.67 1.59 0 1.14-.32 1.39-1.74 1.39-1.38 0-1.68-.24-1.66-1.31m-1.22 0h.75c-.09 1.07-.37 1.31-1.56 1.31-1.37 0-1.68-.45-1.68-2.5 0-1.96.36-2.5 1.68-2.5 1.16 0 1.44.25 1.52 1.35h-.76c-.08-.52-.22-.64-.76-.64-.74 0-.9.33-.9 1.78 0 1.47.16 1.8.9 1.8.58 0 .74-.11.8-.6"/>
|
|
1775
|
-
</symbol>`,
|
|
1775
|
+
</symbol>`,bJ=`<symbol id="file-tree-builtin-database" viewBox="0 0 16 16">
|
|
1776
1776
|
<path fill="currentColor" d="M14.953 9.733a12.4 12.4 0 0 1-.244 1.936c-.207.933-.532 1.58-.996 2.044s-1.11.789-2.044.996C10.73 14.918 9.533 15 8 15s-2.73-.082-3.669-.291c-.933-.207-1.58-.532-2.044-.996s-.789-1.11-.996-2.044c-.122-.547-.2-1.182-.244-1.92q.23.364.532.667c.64.639 1.482 1.031 2.533 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265a4 4 0 0 0 .541-.683"/>
|
|
1777
1777
|
<path fill="currentColor" d="M14.93 5.924c-.046.663-.118 1.24-.23 1.743-.207.932-.532 1.579-.995 2.042s-1.11.789-2.042.996c-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997s-.789-1.11-.996-2.042a12 12 0 0 1-.227-1.683l.016-.188a4 4 0 0 0 .5.62c.638.639 1.48 1.031 2.532 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265.192-.192.357-.404.506-.633z"/>
|
|
1778
1778
|
<path fill="currentColor" d="M8 1c1.533 0 2.73.082 3.669.291.933.207 1.58.533 2.044.996.403.404.904.944.91 1.695.004.764-.509 1.318-.918 1.727-.463.463-1.11.789-2.042.996-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997-.406-.406-.915-.953-.915-1.71 0-.758.509-1.305.915-1.712.464-.463 1.11-.789 2.044-.996C5.27 1.082 6.467 1 8 1"/>
|
|
1779
|
-
</symbol>`,
|
|
1779
|
+
</symbol>`,xJ=`<symbol id="file-tree-builtin-default" viewBox="0 0 16 16">
|
|
1780
1780
|
<path fill="currentColor" d="M8 1v3a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1z" class="bg" opacity=".4"/>
|
|
1781
1781
|
<path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
|
|
1782
|
-
</symbol>`,
|
|
1782
|
+
</symbol>`,SJ=`<symbol id="file-tree-builtin-docker" viewBox="0 0 16 16">
|
|
1783
1783
|
<path fill="currentColor" d="M15.85 6.54c-.05-.04-.45-.36-1.31-.36q-.34 0-.68.06a2.7 2.7 0 0 0-1.14-1.79l-.23-.14-.15.23a3 3 0 0 0-.4 1q-.24 1.01.26 1.84c-.4.24-1.03.3-1.17.3H.5a.5.5 0 0 0-.5.52q-.01 1.46.46 2.83.55 1.5 1.6 2.18c.79.5 2.08.79 3.54.79q.96 0 1.94-.18a8 8 0 0 0 2.55-.97 7 7 0 0 0 1.73-1.5 10 10 0 0 0 1.7-3.06h.15a2.4 2.4 0 0 0 1.8-.7 2 2 0 0 0 .47-.74l.06-.2z"/>
|
|
1784
1784
|
<path fill="currentColor" d="M1.48 7.36h1.4a.14.14 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H1.48a.13.13 0 0 0-.13.14v1.32q.02.13.13.13m1.94 0h1.41a.14.14 0 0 0 .13-.13V5.91q-.01-.12-.13-.14h-1.4a.13.13 0 0 0-.13.14v1.32q0 .13.12.13m1.98 0h1.4q.13 0 .14-.13V5.91a.13.13 0 0 0-.14-.14H5.4q-.1.01-.12.14v1.32q0 .13.12.13m1.95 0h1.42q.1 0 .12-.13V5.91q0-.12-.12-.14H7.35q-.1.01-.12.14v1.32q.01.13.12.13M3.42 5.5h1.41c.07 0 .13-.08.13-.15V4.03a.13.13 0 0 0-.13-.14h-1.4q-.12 0-.13.14v1.31q0 .13.12.15m1.98 0h1.4c.08 0 .14-.08.14-.15V4.03q0-.13-.14-.14H5.4q-.1 0-.12.14v1.31q0 .13.12.15m1.95 0h1.42c.06 0 .12-.08.12-.15V4.03q-.01-.13-.12-.14H7.35q-.1 0-.12.14v1.31q.01.13.12.15m0-1.9h1.42q.1-.02.12-.14v-1.3Q8.88 2 8.77 2H7.35q-.1 0-.12.14v1.3q.01.13.12.14m1.97 3.78h1.4a.13.13 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H9.32q-.1.01-.12.14v1.32q.01.13.12.13" opacity=".5"/>
|
|
1785
|
-
</symbol>`,
|
|
1785
|
+
</symbol>`,CJ=`<symbol id="file-tree-builtin-eslint" viewBox="0 0 16 16">
|
|
1786
1786
|
<path fill="currentColor" d="M11.16 6.1 8.12 4.35a.3.3 0 0 0-.24 0L4.84 6.1a.3.3 0 0 0-.12.2v3.5q0 .14.12.22l3.04 1.74q.12.08.24 0l3.04-1.74a.2.2 0 0 0 .13-.22V6.3a.3.3 0 0 0-.13-.2" opacity=".5"/>
|
|
1787
1787
|
<path fill="currentColor" d="m.1 7.69 3.63-6.3A.8.8 0 0 1 4.37 1h7.26c.26 0 .5.17.64.4l3.63 6.27a.8.8 0 0 1 0 .75l-3.63 6.24a.7.7 0 0 1-.64.34H4.37a.7.7 0 0 1-.64-.34L.1 8.41a.7.7 0 0 1 0-.72m3 3.02q.01.15.14.23l4.63 2.66q.13.06.26 0l4.63-2.66a.3.3 0 0 0 .14-.23V5.4a.3.3 0 0 0-.14-.23L8.13 2.52a.3.3 0 0 0-.26 0L3.24 5.17a.3.3 0 0 0-.14.23z"/>
|
|
1788
|
-
</symbol>`,
|
|
1788
|
+
</symbol>`,wJ=`<symbol id="file-tree-builtin-font" viewBox="0 0 16 16">
|
|
1789
1789
|
<path fill="currentColor" d="M12.3 13c-1.59 0-2.68-.99-2.68-2.5 0-1.43 1-2.34 2.88-2.35h2.16v-.83c0-1.08-.62-1.68-1.73-1.68-1.05 0-1.66.54-1.73 1.36H9.93c.09-1.43 1.06-2.48 3.05-2.48 1.75 0 3.02.95 3.02 2.68v5.66h-1.29v-1.02h-.04c-.41.66-1.16 1.16-2.37 1.16m.36-1.12c1.14 0 2-.72 2-1.74v-.96H12.6c-1.12 0-1.6.54-1.6 1.28 0 .97.8 1.42 1.66 1.42m-11.24.98H0L3.8 2h1.39l3.8 10.86H7.54l-1.08-3.2H2.5zm3.09-9.25h-.04l-1.6 4.95H6.1z"/>
|
|
1790
|
-
</symbol>`,
|
|
1790
|
+
</symbol>`,TJ=`<symbol id="file-tree-builtin-git" viewBox="0 0 16 16">
|
|
1791
1791
|
<path fill="currentColor" d="M14.74 7.38 8.62 1.26a.9.9 0 0 0-1.27 0L6.08 2.53l1.61 1.61a1.07 1.07 0 0 1 1.36 1.37l1.55 1.55a1.07 1.07 0 0 1 1.1 1.77 1.07 1.07 0 0 1-1.74-1.16L8.5 6.22v3.8a1.07 1.07 0 1 1-.89-.02V6.15a1.07 1.07 0 0 1-.58-1.4l-1.58-1.6-4.2 4.2a.9.9 0 0 0 0 1.27l6.12 6.12a.9.9 0 0 0 1.27 0l6.09-6.09a.9.9 0 0 0 0-1.27"/>
|
|
1792
|
-
</symbol>`,
|
|
1792
|
+
</symbol>`,EJ=`<symbol id="file-tree-builtin-go" viewBox="0 0 16 16">
|
|
1793
1793
|
<path fill="currentColor" fill-rule="evenodd" d="M4.41 4.57A3.2 3.2 0 0 1 6.87 5q.74.49 1.08 1.29.08.12-.1.16l-1.55.4c-.14.03-.15.04-.27-.1a1 1 0 0 0-.44-.34 1.6 1.6 0 0 0-1.68.14q-.95.61-.94 1.73c0 .73.52 1.33 1.25 1.43q.95.1 1.58-.6l.25-.34h-1.8c-.19 0-.24-.12-.17-.27.12-.28.34-.76.47-1a.3.3 0 0 1 .24-.14h2.98a4 4 0 0 1 .64-1.19 4 4 0 0 1 2.6-1.52 3.5 3.5 0 0 1 2.64.46q1.13.73 1.31 2.04a3.5 3.5 0 0 1-1.06 3.09q-.93.92-2.23 1.17l-.74.08a3.5 3.5 0 0 1-2.27-.8 3 3 0 0 1-.93-1.42 4 4 0 0 1-.39.61 4 4 0 0 1-2.64 1.56 3.3 3.3 0 0 1-2.5-.6 3 3 0 0 1-1.18-2.03 3.5 3.5 0 0 1 .8-2.67 4 4 0 0 1 2.6-1.58M13.1 7.5a1.53 1.53 0 0 0-1.9-1.21q-1.3.3-1.62 1.59a1.5 1.5 0 0 0 .85 1.72q.77.33 1.52-.05a2 2 0 0 0 1.18-1.74q0-.17-.03-.3" clip-rule="evenodd"/>
|
|
1794
|
-
</symbol>`,
|
|
1794
|
+
</symbol>`,DJ=`<symbol id="file-tree-builtin-graphql" viewBox="0 0 16 16">
|
|
1795
1795
|
<path fill="currentColor" fill-rule="evenodd" d="M8 1a1.25 1.25 0 0 1 1.18 1.65l2.8 1.61q.33-.25.77-.26a1.25 1.25 0 0 1 .48 2.4v3.2a1.25 1.25 0 1 1-1.25 2.13l-2.8 1.62A1.25 1.25 0 0 1 8 15a1.25 1.25 0 0 1-1.18-1.65l-2.8-1.62q-.33.26-.77.27a1.25 1.25 0 0 1-.48-2.4V6.4a1.25 1.25 0 1 1 1.25-2.14l2.8-1.61A1.25 1.25 0 0 1 8 1M4.44 11.14l-.06.13 2.75 1.58a1.25 1.25 0 0 1 1.74 0l2.74-1.58-.05-.13zm3.89-7.68a1.3 1.3 0 0 1-.66 0L4.03 9.77q.37.3.45.78h7.04q.08-.48.45-.78zM4.38 4.73a1.24 1.24 0 0 1-1.02 1.76v3.02l.13.01 3.67-6.35-.03-.02zm4.46-1.56 3.67 6.35.13-.01V6.49a1.25 1.25 0 0 1-1.03-1.76L8.87 3.15z" clip-rule="evenodd"/>
|
|
1796
|
-
</symbol>`,
|
|
1796
|
+
</symbol>`,OJ=`<symbol id="file-tree-builtin-html" viewBox="0 0 16 16">
|
|
1797
1797
|
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
1798
1798
|
<path fill="currentColor" d="M10.48 3.76a.5.5 0 0 1 .4.58L10.6 5.8h1.14a.5.5 0 0 1 0 1h-1.32L10 9.2h1.08a.5.5 0 0 1 0 1H9.8l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H6.4l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H4.25a.5.5 0 0 1 0-1h1.32L6 6.8H4.93a.5.5 0 0 1 0-1H6.2l.3-1.64a.5.5 0 1 1 .98.18L7.2 5.8h2.4l.3-1.64a.5.5 0 0 1 .58-.4M6.58 9.2h2.4l.44-2.4h-2.4z" class="fg"/>
|
|
1799
|
-
</symbol>`,
|
|
1799
|
+
</symbol>`,kJ=`<symbol id="file-tree-builtin-image" viewBox="0 0 16 16">
|
|
1800
1800
|
<path fill="currentColor" d="M12.5 2A2.5 2.5 0 0 1 15 4.5v4.67l-4.05-3.54-4.08 4.08-3-2L1 10.6V4.5A2.5 2.5 0 0 1 3.5 2z" opacity=".3"/>
|
|
1801
1801
|
<path fill="currentColor" d="M15 10.5v1a2.5 2.5 0 0 1-2.5 2.5h-9a2.5 2.5 0 0 1-2.46-2.04L4 9l3 2 4-4zm-7-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"/>
|
|
1802
|
-
</symbol>`,
|
|
1802
|
+
</symbol>`,AJ=`<symbol id="file-tree-builtin-javascript" viewBox="0 0 16 16">
|
|
1803
1803
|
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
1804
1804
|
<path fill="currentColor" d="M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66M3.5 9.5h.98c0 .76.15.92.85.92.77 0 .94-.18.94-1.02V5.1h1v4.34c0 1.54-.35 1.87-1.92 1.87-1.55 0-1.89-.32-1.86-1.8"/>
|
|
1805
|
-
</symbol>`,
|
|
1805
|
+
</symbol>`,jJ=`<symbol id="file-tree-builtin-json" viewBox="0 0 16 16">
|
|
1806
1806
|
<path fill="currentColor" d="M13.25 11.5V9.75a.5.5 0 0 1 .36-.48l.55-.15a1.16 1.16 0 0 0 0-2.24l-.55-.15a.5.5 0 0 1-.36-.48V4.5a2.5 2.5 0 0 0-2.5-2.5h-.25a.5.5 0 0 0 0 1h.25a1.5 1.5 0 0 1 1.5 1.5v1.75a1.5 1.5 0 0 0 1.09 1.44l.54.15a.16.16 0 0 1 0 .32l-.54.15a1.5 1.5 0 0 0-1.09 1.44v1.75a1.5 1.5 0 0 1-1.5 1.5h-.25a.5.5 0 0 0 0 1h.25a2.5 2.5 0 0 0 2.5-2.5m-10.5 0V9.75a.5.5 0 0 0-.36-.48l-.55-.15a1.16 1.16 0 0 1 0-2.24l.55-.15a.5.5 0 0 0 .36-.48V4.5A2.5 2.5 0 0 1 5.25 2h.25a.5.5 0 0 1 0 1h-.25a1.5 1.5 0 0 0-1.5 1.5v1.75a1.5 1.5 0 0 1-1.09 1.44l-.54.15a.16.16 0 0 0 0 .32l.54.15a1.5 1.5 0 0 1 1.09 1.45v1.74a1.5 1.5 0 0 0 1.5 1.5h.25a.5.5 0 0 1 0 1h-.25a2.5 2.5 0 0 1-2.5-2.5"/>
|
|
1807
|
-
</symbol>`,
|
|
1807
|
+
</symbol>`,MJ=`<symbol id="file-tree-builtin-markdown" viewBox="0 0 16 16">
|
|
1808
1808
|
<path fill="currentColor" d="M1 12V4h2l2 2.5L7 4h2v8H7V7.5l-2 2-2-2V12zm9-3 3 3.5L16 9h-2V4h-2v5z"/>
|
|
1809
|
-
</symbol>`,
|
|
1809
|
+
</symbol>`,NJ=`<symbol id="file-tree-builtin-mcp" viewBox="0 0 16 16">
|
|
1810
1810
|
<path fill="currentColor" d="M9.26-.04a3 3 0 0 1 2 .82 2.8 2.8 0 0 1 .8 2.35 2.9 2.9 0 0 1 2.41.8l.03.02a2.74 2.74 0 0 1 0 3.94l-5.8 5.69-.04.06-.02.07q0 .04.02.07.01.04.04.06l1.2 1.17a.55.55 0 0 1 0 .79.6.6 0 0 1-.81 0l-1.2-1.17a1.3 1.3 0 0 1 0-1.84L13.7 7.1a1.65 1.65 0 0 0 .37-1.82 2 2 0 0 0-.37-.54l-.03-.03a1.73 1.73 0 0 0-2.4 0L6.47 9.4l-.07.06a.58.58 0 0 1-.92-.18.6.6 0 0 1 .12-.6l4.85-4.76a1.65 1.65 0 0 0 0-2.36 1.73 1.73 0 0 0-2.4 0l-6.43 6.3a.6.6 0 0 1-.8 0 .55.55 0 0 1 0-.8L7.25.79a3 3 0 0 1 2-.82"/>
|
|
1811
1811
|
<path fill="currentColor" d="M9.26 2.19a.6.6 0 0 1 .52.34.6.6 0 0 1 0 .43l-.12.18L4.9 7.79a1.65 1.65 0 0 0 0 2.36 1.73 1.73 0 0 0 2.4 0l4.75-4.66a.58.58 0 0 1 .93.18.6.6 0 0 1-.12.61l-4.75 4.66a2.9 2.9 0 0 1-4.01 0 2.75 2.75 0 0 1-.62-3.04A3 3 0 0 1 4.1 7l4.74-4.65a.6.6 0 0 1 .4-.16"/>
|
|
1812
|
-
</symbol>`,
|
|
1812
|
+
</symbol>`,PJ=`<symbol id="file-tree-builtin-nextjs" viewBox="0 0 16 16">
|
|
1813
1813
|
<defs>
|
|
1814
1814
|
<linearGradient id="a" x1="4.522" x2="14" y1="3.943" y2="16" gradientUnits="userSpaceOnUse">
|
|
1815
1815
|
<stop stop-color="currentColor"/>
|
|
@@ -1819,82 +1819,82 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
1819
1819
|
<path fill="currentColor" d="M3 2h1.522v9.09H3z"/>
|
|
1820
1820
|
<path fill="url(#a)" d="M4.903 2 15 15.075q-.565.5-1.195.925L4.522 3.943z"/>
|
|
1821
1821
|
<path fill="currentColor" d="M12.172 2h-1.508v9.094h1.508z"/>
|
|
1822
|
-
</symbol>`,
|
|
1822
|
+
</symbol>`,FJ=`<symbol id="file-tree-builtin-npm" viewBox="0 0 16 16">
|
|
1823
1823
|
<path fill="currentColor" d="M2 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1z" class="vector" opacity=".2"/>
|
|
1824
1824
|
<path fill="currentColor" d="M10.5 13H13V3H3v10h5V5.5h2.5z"/>
|
|
1825
|
-
</symbol>`,
|
|
1825
|
+
</symbol>`,IJ=`<symbol id="file-tree-builtin-oxc" viewBox="0 0 16 16">
|
|
1826
1826
|
<path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .5.5V3h3.5a.5.5 0 0 1 .38.83L10.5 7.69v1.44q.41.04.95-.16a4 4 0 0 0 .72-.35l.04-.03h.01a.5.5 0 0 1 .67.1l2 2.5a.5.5 0 0 1 0 .62c-.76.96-3.14 2.69-6.89 2.69s-6.13-1.73-6.89-2.69a.5.5 0 0 1 0-.62l2-2.5a.5.5 0 0 1 .67-.1l.05.03.16.09q.22.13.56.26.54.2.95.16V7.69L2.12 3.83A.5.5 0 0 1 2.5 3H6V1.5a.5.5 0 0 1 .5-.5zM7 3.5a.5.5 0 0 1-.5.5H3.6l2.78 3.17a.5.5 0 0 1 .12.33v2a.5.5 0 0 1-.28.45c-.7.35-1.5.15-2.02-.05a5 5 0 0 1-.58-.26l-1.46 1.84c.82.78 2.8 2.02 5.84 2.02s5.02-1.24 5.84-2.02l-1.46-1.83a5 5 0 0 1-.58.26c-.52.2-1.33.39-2.02.04a.5.5 0 0 1-.28-.45v-2a.5.5 0 0 1 .12-.33L12.4 4H9.5a.5.5 0 0 1-.5-.5V2H7z"/>
|
|
1827
|
-
</symbol>`,
|
|
1827
|
+
</symbol>`,LJ=`<symbol id="file-tree-builtin-postcss" viewBox="0 0 16 16">
|
|
1828
1828
|
<path fill="currentColor" d="M14.5 8a6.5 6.5 0 0 0-5.9-6.47l5.42 8.93A7 7 0 0 0 14.5 8M2.88 12A6.5 6.5 0 0 0 8 14.5c2.08 0 3.93-.98 5.12-2.5zm8.62-1h1.68L11.5 8.24zm-1-.55a4 4 0 0 1-.7.55h.7zM8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M5.5 11h.7a4 4 0 0 1-.7-.55zm-2.68 0H4.5V8.24zm3.76-6.2A4 4 0 0 1 8 4.5q.76 0 1.42.3L8 2.46zM1.5 8q0 1.31.48 2.46L7.4 1.53A6.5 6.5 0 0 0 1.5 8m14 0a7.5 7.5 0 0 1-.99 3.72l-.01.03-.02.03A7.5 7.5 0 0 1 8 15.5a7.5 7.5 0 0 1-6.5-3.75l-.01-.03A7.5 7.5 0 1 1 15.5 8"/>
|
|
1829
|
-
</symbol>`,
|
|
1829
|
+
</symbol>`,RJ=`<symbol id="file-tree-builtin-prettier" viewBox="0 0 16 16">
|
|
1830
1830
|
<path fill="currentColor" d="M6 12v1H4.93v-1zm1-2v1H2v-1zm6-4v1h-3V6zm-1-4v1H9V2z"/>
|
|
1831
1831
|
<path fill="currentColor" d="M11.5 10v1H8v-1zM5 6v1H2V6zm5-2v1H9V4z" opacity=".8"/>
|
|
1832
1832
|
<path fill="currentColor" d="M6 14v1H2v-1zm-.5-6v1H2V8zM13 4v1h-3V4zM4.93 2v1H2V2z" opacity=".6"/>
|
|
1833
1833
|
<path fill="currentColor" d="M4.93 12v1H2v-1zM13 8v1H9V8zM5.5 4v1H2V4zM9 2v1H4.93V2z" opacity=".4"/>
|
|
1834
|
-
</symbol>`,
|
|
1834
|
+
</symbol>`,zJ=`<symbol id="file-tree-builtin-python" viewBox="0 0 16 16">
|
|
1835
1835
|
<path fill="currentColor" d="M8.33 8.4H10c1.16 0 1.9-.73 1.9-1.86V5.08q0-.24.25-.24h.74c.75 0 1.33.32 1.66.97q.4.73.41 1.46c.09.9.09 1.78-.24 2.67-.25.73-.75 1.3-1.58 1.46h-4.8c-.08 0-.25 0-.25.08v.4s.17.09.25.09h2.82q.34-.02.33.32v1.06c0 .56-.25.97-.75 1.13-.41.16-.83.33-1.24.4a7 7 0 0 1-2.98-.07 3 3 0 0 1-1.16-.49c-.33-.32-.58-.65-.5-1.14v-2.91c0-1.13.67-1.78 1.82-1.78q.89-.1 1.66-.08m2.32 4.86a.65.65 0 0 0-.66-.65c-.34 0-.67.33-.67.65s.33.57.67.65a.65.65 0 0 0 .66-.65" class="bg" opacity=".8"/>
|
|
1836
1836
|
<path fill="currentColor" d="M7.67 7.6H6c-1.16 0-1.9.73-1.9 1.86v1.46q0 .24-.25.24h-.74c-.75 0-1.33-.32-1.66-.97a3 3 0 0 1-.41-1.46 6 6 0 0 1 .24-2.67c.25-.73.75-1.3 1.58-1.46h4.8c.08 0 .25 0 .25-.08v-.4s-.17-.09-.25-.09H4.85c-.24 0-.33-.08-.33-.32V2.65c0-.56.25-.97.75-1.13.41-.16.83-.33 1.24-.4a7 7 0 0 1 2.98.07c.41.09.83.25 1.16.49.33.32.58.65.5 1.13v2.92c0 1.14-.67 1.78-1.82 1.78-.58.08-1.16.08-1.66.08M5.35 2.73c0 .33.25.65.66.65.33 0 .66-.32.66-.65 0-.32-.33-.56-.66-.64a.65.65 0 0 0-.66.64" class="fg"/>
|
|
1837
|
-
</symbol>`,
|
|
1837
|
+
</symbol>`,BJ=`<symbol id="file-tree-builtin-react" viewBox="0 0 16 16">
|
|
1838
1838
|
<path fill="currentColor" d="M8 6.65c.73 0 1.31.6 1.31 1.35S8.73 9.35 8 9.35 6.69 8.75 6.69 8 7.27 6.65 8 6.65"/>
|
|
1839
1839
|
<path fill="currentColor" fill-rule="evenodd" d="M8 2.55c1.3-.99 2.59-1.34 3.5-.8.92.55 1.27 1.87 1.08 3.53C14.06 5.94 15 6.9 15 8s-.94 2.06-2.42 2.72c.19 1.65-.16 2.98-1.08 3.52-.91.55-2.2.2-3.5-.8-1.3 1-2.58 1.35-3.5.8-.91-.54-1.27-1.87-1.08-3.52C1.94 10.06 1 9.1 1 8s.94-2.06 2.42-2.72c-.19-1.66.17-2.98 1.08-3.52s2.2-.2 3.5.8M4.26 11.2c-.08 1.34.28 2.03.68 2.26s1.15.22 2.25-.52l.11-.09a12 12 0 0 1-1.24-1.39 11 11 0 0 1-1.8-.41zm7.47-.15q-.83.27-1.79.41-.6.8-1.24 1.4l.11.08c1.1.74 1.86.76 2.25.52.4-.23.76-.92.68-2.26zm-3.04.54a14 14 0 0 1-1.38 0q.34.38.69.7.35-.32.7-.7M8 5.29q-.76 0-1.47.1A13 13 0 0 0 5.07 8a14 14 0 0 0 1.46 2.62 13 13 0 0 0 2.94 0A13 13 0 0 0 10.93 8a14 14 0 0 0-1.46-2.62A13 13 0 0 0 8 5.3M4.64 9.18q-.15.5-.25.96.44.16.94.27a15 15 0 0 1-.7-1.23m6.73 0a15 15 0 0 1-.7 1.23q.5-.11.95-.27a10 10 0 0 0-.25-.96M3.44 6.26C2.27 6.86 1.87 7.53 1.87 8s.4 1.14 1.57 1.74l.13.07q.18-.88.55-1.81a12 12 0 0 1-.55-1.8q-.07.02-.13.06m8.99-.07A12 12 0 0 1 11.88 8q.36.94.55 1.8l.13-.06c1.17-.6 1.56-1.27 1.56-1.74s-.39-1.14-1.56-1.74zm-7.1-.6q-.5.11-.94.27.1.46.25.96a15 15 0 0 1 .69-1.23m5.34 0a15 15 0 0 1 .7 1.23q.14-.5.24-.96-.44-.15-.94-.27M7.18 3.06c-1.09-.74-1.85-.76-2.24-.52s-.76.92-.69 2.26l.01.15a11 11 0 0 1 1.8-.41q.6-.8 1.24-1.4zm3.88-.52c-.4-.24-1.15-.22-2.25.52l-.12.08q.65.6 1.25 1.4.96.15 1.8.41v-.14c.08-1.35-.28-2.04-.68-2.27M8 3.7a10 10 0 0 0-.7.7 14 14 0 0 1 1.4 0 10 10 0 0 0-.7-.7" clip-rule="evenodd"/>
|
|
1840
|
-
</symbol>`,
|
|
1840
|
+
</symbol>`,VJ=`<symbol id="file-tree-builtin-ruby" viewBox="0 0 16 16">
|
|
1841
1841
|
<path fill="currentColor" fill-rule="evenodd" d="M11.04 2c.48 0 .92.23 1.18.6l2.54 3.65c.37.52.3 1.23-.15 1.69l-5.58 5.64a1.47 1.47 0 0 1-2.06 0L1.39 7.94a1.3 1.3 0 0 1-.15-1.7l2.54-3.63q.2-.3.5-.45.33-.16.68-.16zm.84 2.17a.5.5 0 0 0-.7-.05L8 6.84 4.83 4.12a.5.5 0 0 0-.65.76L6.65 7H3.5a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1H9.35l2.48-2.12a.5.5 0 0 0 .05-.7" clip-rule="evenodd"/>
|
|
1842
|
-
</symbol>`,
|
|
1842
|
+
</symbol>`,HJ=`<symbol id="file-tree-builtin-rust" viewBox="0 0 16 16">
|
|
1843
1843
|
<path fill="currentColor" fill-rule="evenodd" d="M8 .8a.2.2 0 0 1 .18.1l.38.6.16.02.5-.53.01-.01a.2.2 0 0 1 .33.08l.25.68.16.05.59-.43h.02a.2.2 0 0 1 .3.14l.12.71.15.08.65-.3a.2.2 0 0 1 .2.02.2.2 0 0 1 .1.18l-.03.72.12.1.71-.16a.2.2 0 0 1 .25.25l-.17.7q.06.06.1.13l.73-.03A.2.2 0 0 1 14 4a.2.2 0 0 1 .02.2l-.3.66.08.14.71.12a.2.2 0 0 1 .14.32l-.43.59.05.16.68.25a.2.2 0 0 1 .07.35l-.53.49.01.16.62.38a.2.2 0 0 1 0 .36l-.62.38-.01.16.53.5a.2.2 0 0 1-.07.34l-.68.25-.05.16.43.59a.2.2 0 0 1-.14.32l-.72.12-.07.15.3.65a.2.2 0 0 1-.02.2.2.2 0 0 1-.18.1l-.72-.03-.1.13.16.7a.2.2 0 0 1-.25.25l-.7-.17-.13.1.03.73a.2.2 0 0 1-.1.18.2.2 0 0 1-.2.02l-.66-.3-.14.08-.12.71a.2.2 0 0 1-.32.14l-.59-.43-.16.05-.25.68a.2.2 0 0 1-.34.07l-.5-.53-.16.01-.38.62a.2.2 0 0 1-.36 0l-.38-.62-.16-.01-.5.53a.2.2 0 0 1-.34-.07l-.25-.68-.16-.05-.59.43a.2.2 0 0 1-.32-.14L5 13.78l-.15-.07-.65.3a.2.2 0 0 1-.2-.02.2.2 0 0 1-.1-.18l.03-.72-.13-.1-.7.16a.2.2 0 0 1-.25-.25l.17-.7-.1-.13-.73.03a.2.2 0 0 1-.2-.3l.3-.66-.08-.14-.71-.12a.2.2 0 0 1-.14-.32l.43-.59-.05-.16-.68-.25A.2.2 0 0 1 1 9.22l.53-.5-.02-.16-.6-.38A.2.2 0 0 1 .8 8a.2.2 0 0 1 .1-.18l.6-.38.02-.16-.53-.5a.2.2 0 0 1 .07-.34l.68-.25.05-.16-.43-.59a.2.2 0 0 1 .14-.32L2.2 5l.08-.15L2 4.2a.2.2 0 0 1 .2-.3l.72.03.1-.13-.16-.7a.2.2 0 0 1 .25-.25l.7.16.13-.1-.03-.72A.2.2 0 0 1 4 2a.2.2 0 0 1 .2-.02l.65.3L5 2.2l.12-.71v-.03a.2.2 0 0 1 .32-.1l.59.41.16-.04.25-.68.01-.02A.2.2 0 0 1 6.8.99l.49.53.16-.02.38-.61.02-.02A.2.2 0 0 1 8 .79M6.8 9.45h1.26l.06.01q.03.01.03.05v1.52q0 .07-.09.06h-4.5A5.4 5.4 0 0 0 8 13.42a5.4 5.4 0 0 0 4.45-2.33h-2.42c-.36 0-.68-.5-.77-.75-.08-.22-.2-.91-.25-1.12-.15-.61-.59-.71-.78-.73H6.8zM8 2.58a5.4 5.4 0 0 0-4.07 1.85h5.74l.17.02c.23.03.6.12.96.35.34.23.83.68.83 1.4 0 .66-.55 1.16-1.08 1.5.42.33.7.53.86 1.44.04.17.34.32.62.29.29-.03.62-.16.62-.75v-.24q0-.1.07-.1h.68A5.43 5.43 0 0 0 8 2.59M2.96 6.03a5.4 5.4 0 0 0-.19 3.37h1.66V6.03zM6.8 7.06h1.66c.35 0 .77-.12.77-.47 0-.42-.55-.53-.65-.53H6.8z" clip-rule="evenodd"/>
|
|
1844
|
-
</symbol>`,
|
|
1844
|
+
</symbol>`,UJ=`<symbol id="file-tree-builtin-sass" viewBox="0 0 16 16">
|
|
1845
1845
|
<path fill="currentColor" fill-rule="evenodd" d="M8.08 1.44c2.41-.91 4.96-.37 5.35 1.27.39 1.62-.92 3.56-2.6 4.25a5 5 0 0 1-3.26.35c-.58-.2-.92-.62-1-.85-.03-.09-.09-.24 0-.3.05-.03.08-.02.22.15s.7.6 1.75.48c2.78-.34 4.45-2.64 3.92-3.88-.37-.87-2.5-1.26-5.18.16C4.03 4.81 3.85 6.24 3.82 6.8c-.08 1.5 1.73 2.28 2.7 3.4q.04.03.07.08c.3-.12.7-.19 1.35-.2 1.58-.03 2.47 1.08 2.43 2.08-.03.78-.7 1.1-.82 1.13-.1.01-.14.02-.15-.06q-.03-.06.13-.15c.16-.09.42-.3.48-.72.05-.43-.24-1.44-1.76-1.63a3 3 0 0 0-1.33.08c.27.62.32 1.87-.29 2.83-.63 1-1.8 1.61-2.93 1.27-.37-.1-.93-.92-.45-2.05.46-1.07 2.4-2.12 2.66-2.26-.9-.83-3.08-1.95-3.4-3.65-.08-.49.13-1.65 1.46-2.98a12 12 0 0 1 4.11-2.52m-1.88 9.7c-.01.01-.9.47-1.52 1.17-.59.66-.75 1.48-.43 1.69.3.18 1-.04 1.51-.62a3 3 0 0 0 .5-.9q.2-.64.02-1.39z" clip-rule="evenodd"/>
|
|
1846
|
-
</symbol>`,
|
|
1846
|
+
</symbol>`,WJ=`<symbol id="file-tree-builtin-stylelint" viewBox="0 0 16 16">
|
|
1847
1847
|
<path fill="currentColor" d="M4 3v3.5l1.5-1L7 15 .5 6l1-1.5L0 3l2.5-2h1zm12 0-1.5 1.5 1 1.5L9 15l1.5-9.5 1.5 1V3l.5-2h1zm-8 8.5a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1"/>
|
|
1848
1848
|
<path fill="currentColor" d="M6.5 2.5V4l-2 1.5v-4zm5 3L9.5 4V2.5l2-1zM9 4H7V2.5h2z"/>
|
|
1849
|
-
</symbol>`,
|
|
1849
|
+
</symbol>`,GJ=`<symbol id="file-tree-builtin-svelte" viewBox="0 0 16 16">
|
|
1850
1850
|
<path fill="currentColor" d="m3.98 3.7 3.36-2.08a4.5 4.5 0 0 1 5.9 1.23 4 4 0 0 1 .7 3.02q-.16.75-.58 1.4c.42.77.56 1.66.4 2.52a3.7 3.7 0 0 1-1.57 2.4l-.17.1-3.36 2.09a4.5 4.5 0 0 1-5.9-1.23 4 4 0 0 1-.66-1.44 4 4 0 0 1-.04-1.58 4 4 0 0 1 .58-1.4 4 4 0 0 1-.4-2.52 3.7 3.7 0 0 1 1.57-2.4zl3.36-2.08zm7.87 0a2.7 2.7 0 0 0-1.26-.95 2.7 2.7 0 0 0-1.6-.07 3 3 0 0 0-.52.2l-.16.09-3.36 2.08a2 2 0 0 0-.69.64 2 2 0 0 0-.36.86 2.3 2.3 0 0 0 .42 1.81A2.7 2.7 0 0 0 7.18 9.4q.28-.06.53-.2l.16-.09 1.28-.79.2-.09a.8.8 0 0 1 .87.31.7.7 0 0 1 .13.55.7.7 0 0 1-.24.4l-.08.05-3.36 2.08-.2.09a1 1 0 0 1-.49-.02 1 1 0 0 1-.38-.3 1 1 0 0 1-.13-.37v-.1l.01-.13-.13-.03a4 4 0 0 1-1.1-.5l-.2-.14-.18-.12-.07.18-.08.3a2.3 2.3 0 0 0 .43 1.82q.45.64 1.19.93.73.28 1.51.14l.16-.04q.27-.07.52-.2l.16-.09 3.36-2.08q.4-.25.69-.64.27-.4.36-.86a2.3 2.3 0 0 0-.42-1.82 2.7 2.7 0 0 0-1.27-.95 2.7 2.7 0 0 0-1.6-.08q-.27.07-.52.2l-.16.1-1.28.79-.2.09a1 1 0 0 1-.49-.03 1 1 0 0 1-.38-.29.7.7 0 0 1-.13-.54.7.7 0 0 1 .24-.4l.08-.06L9.33 4.4l.2-.1a.8.8 0 0 1 .87.32 1 1 0 0 1 .13.38v.22l.11.04q.6.18 1.12.5l.2.14.17.12.06-.19.08-.3a2.3 2.3 0 0 0-.42-1.81z"/>
|
|
1851
|
-
</symbol>`,
|
|
1851
|
+
</symbol>`,KJ=`<symbol id="file-tree-builtin-svg" viewBox="0 0 16 16">
|
|
1852
1852
|
<path fill="currentColor" d="M5 7a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2z"/>
|
|
1853
1853
|
<path fill="currentColor" d="M6 1a5 5 0 0 1 4.58 3H7a3 3 0 0 0-3 3v3.58A5 5 0 0 1 6 1" opacity=".5"/>
|
|
1854
|
-
</symbol>`,
|
|
1854
|
+
</symbol>`,qJ=`<symbol id="file-tree-builtin-svgo" viewBox="0 0 16 16">
|
|
1855
1855
|
<path fill="currentColor" d="M9.43 4.8A.6.6 0 1 1 9.19 6l-.56.96a1.2 1.2 0 0 1 .32 1.58l.7.53a.89.89 0 1 1-.17.22l-.7-.52a1.2 1.2 0 0 1-1.4.25l-.56.87a.75.75 0 1 1-.57-.2 1 1 0 0 1 .32.05l.56-.87a1.2 1.2 0 0 1-.4-1.24l-1.2-.47a.56.56 0 1 1 .1-.28v.02l1.2.47a1.2 1.2 0 0 1 1.56-.55l.56-.97a.6.6 0 0 1-.15-.64.6.6 0 0 1 .63-.4"/>
|
|
1856
1856
|
<path fill="currentColor" fill-rule="evenodd" d="M9.17 1q.16.63.27 1.26a6 6 0 0 1 1.61.67q.52-.38 1.08-.71l1.65 1.64q-.32.56-.68 1.05.48.78.72 1.67.6.09 1.18.25v2.32q-.55.15-1.11.24a6 6 0 0 1-.7 1.82q.31.44.59.91l-1.65 1.65-.85-.55a6 6 0 0 1-1.9.83q-.08.47-.2.95H6.84q-.12-.46-.2-.93a6 6 0 0 1-1.96-.81q-.39.27-.8.51l-1.65-1.65q.25-.43.53-.84a6 6 0 0 1-.75-1.9L1 9.16V6.83q.54-.14 1.09-.24a6 6 0 0 1 .77-1.74q-.33-.47-.63-.98l1.65-1.65q.54.32 1.03.68a6 6 0 0 1 1.66-.66q.1-.61.26-1.24zM7.96 3.73a4 4 0 0 0-1.74.36 4.5 4.5 0 0 0-2.3 2.3 4.4 4.4 0 0 0-.1 3.29l.03.06a4.4 4.4 0 0 0 2.4 2.47 4.4 4.4 0 0 0 3.48-.02l.03-.02a4.4 4.4 0 0 0 2.3-2.42l.06-.14a4.4 4.4 0 0 0-.2-3.4 4.4 4.4 0 0 0-2.13-2.07L9.47 4a4 4 0 0 0-1.51-.27" clip-rule="evenodd"/>
|
|
1857
|
-
</symbol>`,
|
|
1857
|
+
</symbol>`,JJ=`<symbol id="file-tree-builtin-swift" viewBox="0 0 16 16">
|
|
1858
1858
|
<path fill="currentColor" d="M9.63 1c6.15 4.35 4.16 9.15 4.16 9.15s1.75 2.05 1.04 3.85c0 0-.72-1.26-1.93-1.26-1.17 0-1.85 1.26-4.2 1.26C3.47 14 1 9.46 1 9.46c4.71 3.22 7.93.94 7.93.94C6.8 9.12 2.29 3 2.29 3c3.93 3.47 5.63 4.39 5.63 4.39-1.01-.87-3.86-5.13-3.86-5.13C6.34 4.66 10.86 8 10.86 8c1.28-3.7-1.23-7-1.23-7"/>
|
|
1859
|
-
</symbol>`,
|
|
1859
|
+
</symbol>`,YJ=`<symbol id="file-tree-builtin-table" viewBox="0 0 16 16">
|
|
1860
1860
|
<path fill="currentColor" d="M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z" class="bg" opacity=".4"/>
|
|
1861
1861
|
<path fill="currentColor" d="M11.5 8a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5zM5 12h2.5v-1H5zm3.5 0H11v-1H8.5zM5 10h2.5V9H5zm3.5 0H11V9H8.5zm1-9a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
|
|
1862
|
-
</symbol>`,
|
|
1862
|
+
</symbol>`,XJ=`<symbol id="file-tree-builtin-tailwind" viewBox="0 0 16 16">
|
|
1863
1863
|
<path fill="currentColor" fill-rule="evenodd" d="M8 4Q5.2 4 4.5 6.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C8.98 7.23 9.77 8 11.5 8q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C10.52 4.77 9.73 4 8 4M4.5 8Q1.7 8 1 10.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C5.48 11.23 6.26 12 8 12q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C7.02 8.77 6.24 8 4.5 8" clip-rule="evenodd"/>
|
|
1864
|
-
</symbol>`,
|
|
1864
|
+
</symbol>`,ZJ=`<symbol id="file-tree-builtin-terraform" viewBox="0 0 16 16">
|
|
1865
1865
|
<path fill="currentColor" d="M1 0v5.05l4.35 2.53V2.53zm9.18 5.34L5.83 2.82v5.05l4.35 2.53zm.47 5.06V5.34L15 2.82v5.05zm-.48 5.6-4.35-2.53V8.42l4.35 2.53z"/>
|
|
1866
|
-
</symbol>`,
|
|
1866
|
+
</symbol>`,QJ=`<symbol id="file-tree-builtin-text" viewBox="0 0 16 16">
|
|
1867
1867
|
<path fill="currentColor" fill-rule="evenodd" d="M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z" class="bg" clip-rule="evenodd" opacity=".4"/>
|
|
1868
1868
|
<path fill="currentColor" d="M8.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zm2-2a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1zm-1-8a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z"/>
|
|
1869
|
-
</symbol
|
|
1869
|
+
</symbol>`,$J=`<symbol id="file-tree-builtin-typescript" viewBox="0 0 16 16">
|
|
1870
1870
|
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
1871
1871
|
<path fill="currentColor" d="M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66m-3 1.57V5.99H3.5v-.9h4.21v.9H6.1v5.22z"/>
|
|
1872
|
-
</symbol>`,
|
|
1872
|
+
</symbol>`,eY=`<symbol id="file-tree-builtin-vite" viewBox="0 0 16 16">
|
|
1873
1873
|
<path fill="currentColor" d="M8.57 14.87c-.18.26-.55.11-.55-.22v-3.18l-.05-.27-.13-.22-.2-.15-.24-.06H4.29c-.26 0-.4-.32-.26-.55L6.08 7c.3-.46 0-1.1-.5-1.1H1.8c-.25 0-.4-.32-.25-.56l2.65-4.2A.3.3 0 0 1 4.46 1h7.9c.26 0 .4.32.26.55l-2.05 3.23c-.29.46 0 1.1.5 1.1h3.12c.26 0 .4.34.24.57z"/>
|
|
1874
|
-
</symbol>`,
|
|
1874
|
+
</symbol>`,tY=`<symbol id="file-tree-builtin-vscode" viewBox="0 0 16 16">
|
|
1875
1875
|
<path fill="currentColor" d="m5.11 9.68-2.4 1.84a.6.6 0 0 1-.75-.04l-.77-.7a.6.6 0 0 1 0-.87L3.28 8zm5.52-8.42a.51.51 0 0 1 .87.36V4.8L7.32 8 5.1 6.32z" opacity=".75"/>
|
|
1876
1876
|
<path fill="currentColor" d="M11.1 14.99h.03zM1.96 4.52a.6.6 0 0 1 .75-.04l8.8 6.71v3.19a.51.51 0 0 1-.88.36L1.19 6.1a.6.6 0 0 1 0-.87z" opacity=".65"/>
|
|
1877
1877
|
<path fill="currentColor" d="M11.62 14.91a.9.9 0 0 1-1-.17.51.51 0 0 0 .88-.36V1.62a.51.51 0 0 0-.87-.36.9.9 0 0 1 1-.17l2.87 1.39a.9.9 0 0 1 .5.8v9.44a.9.9 0 0 1-.5.8z"/>
|
|
1878
|
-
</symbol
|
|
1878
|
+
</symbol>`,nY=`<symbol id="file-tree-builtin-vue" viewBox="0 0 16 16">
|
|
1879
1879
|
<path fill="currentColor" d="M9.62 2.25 8 5.02 6.38 2.25H1l7 12 7-12z" opacity=".5"/>
|
|
1880
1880
|
<path fill="currentColor" d="M9.54 2.25 8 4.95l-1.54-2.7H4l4 7 4-7z"/>
|
|
1881
|
-
</symbol>`,
|
|
1881
|
+
</symbol>`,rY=`<symbol id="file-tree-builtin-wasm" viewBox="0 0 16 16">
|
|
1882
1882
|
<path fill="currentColor" d="M13 1a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h3a2 2 0 1 0 4 0z" class="subtract" opacity=".2"/>
|
|
1883
1883
|
<path fill="currentColor" d="M4.64 11.4h.02l.8-3.4h.91l.73 3.45L7.88 8h.96l-1.25 5h-.97L5.9 9.6 5.1 13h-1L3 8h.98z"/>
|
|
1884
1884
|
<path fill="currentColor" fill-rule="evenodd" d="M13 13h-1.02l-.33-1.11H9.9L9.64 13h-.97l1.26-5h1.54zm-2.49-3.77-.42 1.84h1.32l-.49-1.84z" clip-rule="evenodd"/>
|
|
1885
|
-
</symbol>`,
|
|
1885
|
+
</symbol>`,iY=`<symbol id="file-tree-builtin-webpack" viewBox="0 0 16 16">
|
|
1886
1886
|
<path fill="currentColor" d="M14.1 11.79 8.26 15v-2.5l3.64-1.94zm.4-.35V4.73l-2.14 1.2v4.3zm-12.6.35L7.74 15v-2.5L4.1 10.56zm-.4-.35V4.73l2.14 1.2v4.3zm.25-7.15 6-3.29v2.42L3.9 5.47l-.03.01zm12.5 0L8.25 1v2.42l3.85 2.05.03.01z" class="bg" opacity=".4"/>
|
|
1887
1887
|
<path fill="currentColor" d="m7.74 11.93-3.59-1.92v-3.8l3.6 2.02zm.52 0 3.59-1.92v-3.8l-3.6 2.02zM4.4 5.77 8 3.85l3.6 1.93L8 7.8z" class="fg"/>
|
|
1888
|
-
</symbol>`,
|
|
1888
|
+
</symbol>`,aY=`<symbol id="file-tree-builtin-yml" viewBox="0 0 16 16">
|
|
1889
1889
|
<path fill="currentColor" d="M7.5 2A1.5 1.5 0 0 1 9 3.5v3A1.5 1.5 0 0 1 7.5 8h-2v2A1.5 1.5 0 0 0 7 11.5v-1A1.5 1.5 0 0 1 8.5 9h5a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-5A1.5 1.5 0 0 1 7 13.5v-1A2.5 2.5 0 0 1 4.5 10V8h-2A1.5 1.5 0 0 1 1 6.5v-3A1.5 1.5 0 0 1 2.5 2zm1 8a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zm-6-7a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5z"/>
|
|
1890
|
-
</symbol>`,
|
|
1890
|
+
</symbol>`,oY=`<symbol id="file-tree-builtin-zig" viewBox="0 0 16 16">
|
|
1891
1891
|
<path fill="currentColor" d="m14.73 1.5-7.29 8.82h4.17l-1.73 2.04H5.76L1.27 14.5l7.3-8.91H4.39l1.73-2.05h4.12z"/>
|
|
1892
1892
|
<path fill="currentColor" d="M5.21 3.54 3.56 5.6h-.55v4.73h.83L2.1 12.36H1V3.54zm9.79 0v8.82h-4.3l1.74-2.04h.55V5.68h-.83l1.74-2.14z"/>
|
|
1893
|
-
</symbol>`,
|
|
1893
|
+
</symbol>`,sY=[dJ,gJ,vJ,yJ,bJ,xJ,wJ,TJ,EJ,OJ,kJ,AJ,jJ,MJ,NJ,zJ,VJ,HJ,JJ,YJ,QJ,$J,`<symbol id="file-tree-builtin-zip" viewBox="0 0 16 16">
|
|
1894
1894
|
<path fill="currentColor" d="M4.585 2a2 2 0 0 1 1.028.285l1.788 1.072a1 1 0 0 0 .514.143H12A2 2 0 0 1 13.935 5H0V4a2 2 0 0 1 2-2z" class="bg" opacity=".5"/>
|
|
1895
1895
|
<path fill="currentColor" fill-rule="evenodd" d="M14 12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-1.25h1v-1H0V6h14zM9.9 8.25c-.883 0-1.9.5-1.9.5H7v1h1v1s1.017.5 1.9.5c.884 0 1.6-.672 1.6-1.5s-.716-1.5-1.6-1.5M2 9.75v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1zm-5-1v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1z" class="fg" clip-rule="evenodd"/>
|
|
1896
|
-
</symbol>`],
|
|
1897
|
-
`)}\n</svg>`)}var
|
|
1896
|
+
</symbol>`],cY=[lJ,uJ,fJ,pJ,mJ,hJ,_J,SJ,CJ,DJ,PJ,FJ,IJ,LJ,RJ,BJ,UJ,WJ,GJ,KJ,qJ,XJ,ZJ,eY,tY,nY,rY,iY,aY,oY];function lY(e,t){return t.length===0?e:e.replace(`</svg>`,`\n ${t.join(`
|
|
1897
|
+
`)}\n</svg>`)}var uY=lY(cJ,sY),dY={minimal:cJ,standard:uY,complete:lY(uY,cY)},fY={".babelrc":`babel`,".babelrc.json":`babel`,".bash_profile":`bash`,".bashrc":`bash`,".browserslistrc":`browserslist`,".dockerignore":`docker`,".eslintignore":`eslint`,".eslintrc":`eslint`,".eslintrc.cjs":`eslint`,".eslintrc.js":`eslint`,".eslintrc.json":`eslint`,".eslintrc.yaml":`eslint`,".eslintrc.yml":`eslint`,".gitattributes":`git`,".gitignore":`git`,".gitkeep":`git`,".gitmodules":`git`,".oxlintrc.json":`oxc`,".postcssrc":`postcss`,".postcssrc.json":`postcss`,".postcssrc.yaml":`postcss`,".postcssrc.yml":`postcss`,".prettierignore":`prettier`,".prettierrc":`prettier`,".prettierrc.cjs":`prettier`,".prettierrc.js":`prettier`,".prettierrc.json":`prettier`,".prettierrc.mjs":`prettier`,".prettierrc.toml":`prettier`,".prettierrc.yaml":`prettier`,".prettierrc.yml":`prettier`,".stylelintignore":`stylelint`,".stylelintrc":`stylelint`,".stylelintrc.cjs":`stylelint`,".stylelintrc.js":`stylelint`,".stylelintrc.json":`stylelint`,".stylelintrc.mjs":`stylelint`,".stylelintrc.yaml":`stylelint`,".stylelintrc.yml":`stylelint`,".terraform.lock.hcl":`terraform`,".zprofile":`bash`,".zshenv":`bash`,".zshrc":`bash`,"babel.config.cjs":`babel`,"babel.config.js":`babel`,"babel.config.json":`babel`,"babel.config.mjs":`babel`,"biome.json":`biome`,"biome.jsonc":`biome`,"bootstrap.bundle.js":`bootstrap`,"bootstrap.bundle.min.js":`bootstrap`,"bootstrap.css":`bootstrap`,"bootstrap.js":`bootstrap`,"bootstrap.min.css":`bootstrap`,"bootstrap.min.js":`bootstrap`,"bun.lock":`bun`,"bun.lockb":`bun`,"bunfig.toml":`bun`,"claude.md":`claude`,"compose.yaml":`docker`,"compose.yml":`docker`,"docker-compose.override.yml":`docker`,"docker-compose.yaml":`docker`,"docker-compose.yml":`docker`,dockerfile:`docker`,"eslint.config.cjs":`eslint`,"eslint.config.js":`eslint`,"eslint.config.mjs":`eslint`,"eslint.config.mts":`eslint`,"eslint.config.ts":`eslint`,gemfile:`ruby`,"next.config.js":`nextjs`,"next.config.mjs":`nextjs`,"next.config.mts":`nextjs`,"next.config.ts":`nextjs`,"postcss.config.cjs":`postcss`,"postcss.config.js":`postcss`,"postcss.config.mjs":`postcss`,"postcss.config.ts":`postcss`,"prettier.config.cjs":`prettier`,"prettier.config.js":`prettier`,"prettier.config.mjs":`prettier`,rakefile:`ruby`,"readme.md":`markdown`,"stylelint.config.cjs":`stylelint`,"stylelint.config.js":`stylelint`,"stylelint.config.mjs":`stylelint`,"svgo.config.cjs":`svgo`,"svgo.config.js":`svgo`,"svgo.config.mjs":`svgo`,"svgo.config.ts":`svgo`,"tailwind.config.cjs":`tailwind`,"tailwind.config.js":`tailwind`,"tailwind.config.mjs":`tailwind`,"tailwind.config.ts":`tailwind`,"vite.config.js":`vite`,"vite.config.mjs":`vite`,"vite.config.mts":`vite`,"vite.config.ts":`vite`,"webpack.config.babel.js":`webpack`,"webpack.config.cjs":`webpack`,"webpack.config.js":`webpack`,"webpack.config.mjs":`webpack`,"webpack.config.ts":`webpack`},pY={"7z":`zip`,astro:`astro`,AUTHORS:`text`,avif:`image`,bash:`bash`,bmp:`image`,bz2:`zip`,c:`c`,cc:`cpp`,cfg:`text`,CHANGELOG:`text`,cjs:`javascript`,"code-workspace":`vscode`,conf:`text`,CONTRIBUTORS:`text`,cpp:`cpp`,csh:`bash`,css:`css`,csv:`table`,cts:`typescript`,cxx:`cpp`,db:`database`,editorconfig:`text`,env:`text`,"env.development":`text`,"env.local":`text`,"env.production":`text`,eot:`font`,erb:`ruby`,fish:`bash`,gemspec:`ruby`,gif:`image`,go:`go`,gql:`graphql`,graphql:`graphql`,gz:`zip`,h:`c`,hh:`cpp`,hpp:`cpp`,htm:`html`,html:`html`,hxx:`cpp`,icns:`image`,ico:`image`,ini:`text`,inl:`cpp`,jar:`zip`,jpeg:`image`,jpg:`image`,js:`javascript`,json:`json`,json5:`json`,jsonc:`json`,jsonl:`json`,jsx:`javascript`,ksh:`bash`,less:`css`,LICENSE:`text`,log:`text`,markdown:`markdown`,mcp:`mcp`,md:`markdown`,mdx:`markdown`,"mdx.tsx":`markdown`,mjs:`javascript`,mm:`cpp`,mts:`typescript`,ods:`table`,otf:`font`,png:`image`,postcss:`css`,py:`python`,pyi:`python`,pyw:`python`,pyx:`python`,rake:`ruby`,rar:`zip`,rb:`ruby`,rs:`rust`,rst:`text`,rtf:`text`,sass:`css`,scss:`css`,sh:`bash`,sql:`database`,sqlite:`database`,sqlite3:`database`,styl:`css`,svelte:`svelte`,svg:`svg`,swift:`swift`,tar:`zip`,tf:`terraform`,tfstate:`terraform`,tfvars:`terraform`,tgz:`zip`,tif:`image`,tiff:`image`,ts:`typescript`,tsv:`table`,tsx:`typescript`,ttf:`font`,txt:`text`,vue:`vue`,war:`zip`,wasm:`wasm`,wast:`wasm`,wat:`wasm`,webp:`image`,woff:`font`,woff2:`font`,xhtml:`html`,xls:`table`,xlsx:`table`,xz:`zip`,yaml:`yml`,yml:`yml`,zig:`zig`,zip:`zip`,zsh:`bash`},mY={jsx:`react`,sass:`sass`,scss:`sass`,tsx:`react`},hY=new Set([`bash`,`c`,`cpp`,`css`,`database`,`default`,`font`,`git`,`go`,`html`,`image`,`javascript`,`json`,`markdown`,`mcp`,`python`,`ruby`,`rust`,`swift`,`table`,`text`,`typescript`,`zip`]),gY=new Set([`complete`]);function _Y(e){return dY[e===`none`?`minimal`:e]}function vY(e){return`file-tree-builtin-${e}`}function yY(e){return e!==`none`&&gY.has(e)}function bY(e,t,n){if(e===`minimal`||e===`none`)return;let r=e===`complete`,i=fY[t.toLowerCase()];if(i!=null&&(r||hY.has(i)))return i;for(let e of n){if(r){let t=mY[e];if(t!=null)return t}let t=pY[e];if(t!=null&&(r||hY.has(t)))return t}return`default`}function xY(e){return e.spriteSheet!=null||e.remap!=null||e.byFileName!=null||e.byFileExtension!=null||e.byFileNameContains!=null}function SY(e){return e==null?{set:`complete`,colored:!0}:typeof e==`string`?{set:e,colored:!0}:{...e,set:e.set??(xY(e)?`none`:`complete`),colored:e.colored??!0}}var CY={compact:{itemHeight:24,factor:.8},default:{itemHeight:30,factor:1},relaxed:{itemHeight:36,factor:1.2}};function wY(e,t){if(typeof e==`number`)return{itemHeight:t??CY.default.itemHeight,factor:e};let n=CY[e??`default`];return{itemHeight:t??n.itemHeight,factor:n.factor}}var TY=CY.default.itemHeight,EY=`@layer base {
|
|
1898
1898
|
:host {
|
|
1899
1899
|
--trees-accent: var(--trees-accent-override, #009fff);
|
|
1900
1900
|
--trees-fg: var(--trees-fg-override, var(--trees-theme-sidebar-fg, light-dark(#6c6c71, #adadb1)));
|
|
@@ -2986,20 +2986,20 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
2986
2986
|
}
|
|
2987
2987
|
|
|
2988
2988
|
@layer theme, unsafe;
|
|
2989
|
-
`,
|
|
2989
|
+
`,DY=`@layer base, unsafe;`;function OY(e){return`${DY}
|
|
2990
2990
|
@layer base {
|
|
2991
2991
|
${e}
|
|
2992
|
-
}`}function
|
|
2992
|
+
}`}function kY(e){return`${DY}
|
|
2993
2993
|
@layer unsafe {
|
|
2994
2994
|
${e}
|
|
2995
|
-
}`}var DY=new WeakMap;function OY(e){let t=DY.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(qq,`true`);let r=document.createElement(`div`);r.style.position=`relative`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n);let i=Math.max(n.offsetWidth-n.clientWidth,0);return n.remove(),DY.set(e,i),i}function kY(e,t){if(!e.isConnected)return;let n=OY(t);if(n==null)return;let r=t.querySelector(`style[${Jq}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(Jq,``),t.appendChild(i)),i.textContent=`:host { ${Yq}: ${n}px; }`}var AY;function jY(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){AY??(AY=new CSSStyleSheet,AY.replaceSync(TY(CY)));let t=!1;try{e.adoptedStyleSheets=[AY],t=!0}catch{}if(t){e.querySelector(`style[${Gq}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(Gq,``),t.textContent=TY(CY),e.prepend(t)}}function MY(e,t){NY(e,t),jY(t),kY(e,t)}function NY(e,t){let n=e.querySelector(`template[shadowrootmode="open"], template[data-file-tree-shadowrootmode="open"]`);n instanceof HTMLTemplateElement&&(t.childNodes.length>0||(t.appendChild(n.content.cloneNode(!0)),n.hasAttribute(`shadowrootmode`)&&n.remove()))}if(typeof HTMLElement<`u`&&customElements.get(`file-tree-container`)==null){class e extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.shadowRoot??this.attachShadow({mode:`open`});MY(this,e)}}if(customElements.define(Wq,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(Wq)))e instanceof HTMLElement&&MY(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var PY=5,FY=32,IY=128;function LY(){return{childIdByNameId:new Map,childIds:[],childPositionById:new Map,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function RY(){return{childIdByNameId:null,childIds:[],childPositionById:null,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function zY(e,t){if(t.childIdByNameId!=null)return t.childIdByNameId;let n=new Map;for(let r of t.childIds){let t=e[r];t!=null&&n.set(t.nameId,r)}return t.childIdByNameId=n,n}function BY(e){if(e.childPositionById!=null)return e.childPositionById;let t=new Map;for(let n=0;n<e.childIds.length;n++){let r=e.childIds[n];r!=null&&t.set(r,n)}return e.childPositionById=t,t}function VY(e,t){e.childPositionById!=null&&e.childPositionById.set(t,e.childIds.length),e.childIds.push(t)}function HY(e,t){if(e.childPositionById!=null)for(let n=t;n<e.childIds.length;n++){let t=e.childIds[n];t!=null&&e.childPositionById.set(t,n)}}function UY(e,t){let n=0,r=0;for(let i of t.childIds){let t=e[i];t!=null&&(n+=t.subtreeNodeCount,r+=t.visibleSubtreeCount)}t.totalChildSubtreeNodeCount=n,t.totalChildVisibleSubtreeCount=r,qY(e,t)}function WY(e,t,n,r){if(e.totalChildSubtreeNodeCount+=n,e.totalChildVisibleSubtreeCount+=r,e.childVisibleChunkSums==null||r===0)return;let i=BY(e).get(t);if(i===void 0)return;let a=i>>PY;e.childVisibleChunkSums[a]+=r}function GY(e,t,n){let r=t.childVisibleChunkSums;if(r!=null){let i=n,a=0;for(let o of r){if(i<o){let r=JY(e,t,a,i);return{...r,childVisibleIndex:n-r.localVisibleIndex}}i-=o,a+=FY}throw Error(`Visible child index ${String(n)} is out of range`)}let i=n;for(let r=0;r<t.childIds.length;r++){let a=t.childIds[r];if(a==null)continue;let o=e[a];if(o!=null){if(i<o.visibleSubtreeCount)return{childIndex:r,childVisibleIndex:n-i,localVisibleIndex:i};i-=o.visibleSubtreeCount}}throw Error(`Visible child index ${String(n)} is out of range`)}function KY(e,t,n){let r=0,i=t.childVisibleChunkSums,a=0;if(i!=null){let e=n>>PY;for(let t=0;t<e;t+=1)r+=i[t]??0;a=e<<PY}for(let i=a;i<n;i+=1){let n=t.childIds[i];if(n==null)continue;let a=e[n];a!=null&&(r+=a.visibleSubtreeCount)}return r}function qY(e,t){if(t.childIds.length<IY){t.childVisibleChunkSums=null;return}let n=Math.ceil(t.childIds.length/FY),r=new Int32Array(n);for(let n=0;n<t.childIds.length;n++){let i=t.childIds[n];if(i==null)continue;let a=e[i];a!=null&&(r[n>>PY]+=a.visibleSubtreeCount)}t.childVisibleChunkSums=r}function JY(e,t,n,r){let i=Math.min(t.childIds.length,n+FY),a=r;for(let r=n;r<i;r++){let n=t.childIds[r];if(n==null)continue;let i=e[n];if(i!=null){if(a<i.visibleSubtreeCount)return{childIndex:r,localVisibleIndex:a};a-=i.visibleSubtreeCount}}throw Error(`Visible child index ${String(r)} is out of range`)}var YY=7,XY=3,ZY=8,QY=4;function $Y(e,t,n=0){return e<<QY|n<<XY|t}function eX(e){return e.depthAndFlags>>>QY}function tX(e){return(e.depthAndFlags&ZY)>>XY}function nX(e){return(e.depthAndFlags&ZY)!==0}function rX(e){return e.depthAndFlags&YY}function iX(e,t){return(rX(e)&t)!==0}function aX(e,t){e.depthAndFlags|=t}function oX(e,t){e.depthAndFlags=$Y(t,rX(e),tX(e))}var sX=Symbol(`benchmarkInstrumentation`);function cX(e,t){return t==null||Object.defineProperty(e,sX,{configurable:!0,enumerable:!1,value:t,writable:!1}),e}function lX(e){return e==null?null:e[sX]??null}function Q(e,t,n){return e==null?n():e.measurePhase(t,n)}function uX(e,t,n){!Number.isFinite(n)||e==null||e.setCounter(t,n)}function dX(e){return e>=48&&e<=57}function fX(e){let t=[],n=0,r=0;for(;r<e.length;){for(;r<e.length&&!dX(e.charCodeAt(r));)r+=1;if(r>=e.length)break;r>n&&t.push(e.slice(n,r));let i=0;for(;r<e.length&&dX(e.charCodeAt(r));)i=i*10+(e.charCodeAt(r)-48),r+=1;t.push(i),n=r}return(n<e.length||t.length===0)&&t.push(e.slice(n)),t}function pX(e){let t=e.toLowerCase();return{lowerValue:t,tokens:fX(t)}}function mX(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++){let n=e[r],i=t[r];if(n===i)continue;if(typeof n==`number`&&typeof i==`number`)return n<i?-1:1;let a=String(n),o=String(i);if(a!==o)return a<o?-1:1}return e.length===t.length?0:e.length<t.length?-1:1}function hX(e,t){if(e.tokens.length===1&&t.tokens.length===1&&typeof e.tokens[0]==`string`&&typeof t.tokens[0]==`string`)return e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1;let n=mX(e.tokens,t.tokens);return n===0?e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1:n}function gX(e,t,n){let r=hX(n(e),n(t));return r===0?e===t?0:e<t?-1:1:r}function _X(e,t){return gX(e,t,pX)}function vX(e,t){return t===e.segments.length-1?+!!e.isDirectory:1}function yX(e,t){let n=Math.min(e.segments.length,t.segments.length);for(let r=0;r<n;r++){let n=e.segments[r],i=t.segments[r];if(n===i)continue;let a=vX(e,r);return a===vX(t,r)?_X(n,i):a===1?-1:1}return e.segments.length===t.segments.length?e.isDirectory===t.isDirectory?0:e.isDirectory?-1:1:e.segments.length<t.segments.length?-1:1}function bX(e,t){return yX(e,t)}function xX(e,t,n){let r=e=>{let t=n.get(e);if(t!=null)return t;let r=pX(e);return n.set(e,r),r},i=Math.min(e.segments.length,t.segments.length);for(let n=0;n<i;n++){let i=e.segments[n],a=t.segments[n];if(i===a)continue;let o=vX(e,n);return o===vX(t,n)?gX(i,a,r):o===1?-1:1}return e.segments.length===t.segments.length?e.isDirectory===t.isDirectory?0:e.isDirectory?-1:1:e.segments.length<t.segments.length?-1:1}function SX(e,t){let n=e.sortKeyById[t];if(n!==void 0)return n;let r=e.valueById[t],i=pX(r);return e.sortKeyById[t]=i,i}function CX(e={}){return{flattenEmptyDirectories:e.flattenEmptyDirectories!==!1,sort:e.sort??`default`}}function wX(e){let t=e.length>0&&e.charCodeAt(e.length-1)===47,n=t?e.length-1:e.length,r=[],i=0;for(let t=0;t<n;t++)e.charCodeAt(t)===47&&(r.push(e.slice(i,t)),i=t+1);return r.push(e.slice(i,n)),{hasTrailingSlash:t,segments:r}}function TX(e){let{hasTrailingSlash:t,segments:n}=wX(e);return{basename:n[n.length-1]??``,isDirectory:t,path:e,segments:n}}function EX(e){if(e.length===0)return{requiresDirectory:!1,segments:[]};let{hasTrailingSlash:t,segments:n}=wX(e);return{requiresDirectory:t,segments:n}}function DX(){let e=new Map;return e.set(``,0),{idByValue:e,valueById:[``],sortKeyById:[pX(``)]}}function OX(e,t){let n=e.idByValue.get(t);if(n!==void 0)return n;let r=e.valueById.length;return e.idByValue.set(t,r),e.valueById.push(t),r}function kX(e,t){let n=e.valueById[t];if(n===void 0)throw Error(`Unknown segment ID: ${String(t)}`);return n}var AX=Symbol(`pathStorePreparedInputKind`);function jX(e,t){return e[AX]=t,e}function MX(e){return{basename:e.basename,depth:e.segments.length,isDirectory:e.isDirectory,path:e.path,segments:e.segments}}function NX(e,t,n){return n==="default"?bX(e,t):n(MX(e),MX(t))}function PX(){return{depthAndFlags:$Y(0,3,1),nameId:0,parentId:0,subtreeNodeCount:1,visibleSubtreeCount:1}}function FX(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e[r]!==t[r])return r;return n}function IX(e){return e.isDirectory?e.segments.length:e.segments.length-1}function LX(e){return Array.isArray(e)&&e.every(e=>typeof e==`object`&&!!e&&typeof e.path==`string`&&Array.isArray(e.segments)&&typeof e.basename==`string`&&typeof e.isDirectory==`boolean`)}function RX(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function zX(e,t={}){return GX(e,t).map(e=>e.path)}function BX(e,t={}){let n=GX(e,t);return jX({paths:n.map(e=>e.path),preparedPaths:n},`prepared`)}function VX(e){let t=e.length,n=!1;for(let r=0;r<t;r+=1){let t=e[r];if(t.length>0&&t.charCodeAt(t.length-1)===47){n=!0;break}}return jX({paths:e,presortedPaths:e,presortedPathsContainDirectories:n},`presorted`)}function HX(e){let t=e,n=t.preparedPaths;if(t[AX]===`prepared`&&n!=null)return n;if(!LX(n))throw Error(`preparedInput must come from PathStore.prepareInput()`);return n}function UX(e){let t=e;return t[AX]===`presorted`&&t.presortedPaths!=null||RX(t.presortedPaths)?t.presortedPaths:null}function WX(e){let t=e;return typeof t.presortedPathsContainDirectories==`boolean`?t.presortedPathsContainDirectories:null}function GX(e,t={}){let n=CX(t),r=lX(t);uX(r,`workload.inputFiles`,e.length);let i=Q(r,`store.preparePathEntries.parse`,()=>e.map(e=>TX(e)));return Q(r,`store.preparePathEntries.sort`,()=>i.sort((e,t)=>NX(e,t,n.sort))),i}var KX=class{directories=new Map;directoryStack=[0];presortedDirectoryNodeIds=[];initialExpandedPathSet;createdDirectoriesAllExpanded=!1;createdDirectoryCount=0;lastPreparedPath=null;nodes=[PX()];options;instrumentation;segmentSortKeyCache=new Map;segmentTable=DX();hasDeferredDirectoryIndexes=!1;constructor(e={}){this.instrumentation=lX(e),this.options=CX(e);let t=e.initialExpandedPaths??null;if(t==null||t.length===0)this.initialExpandedPathSet=null;else{let e=new Set,n=t.length;for(let r=0;r<n;r+=1){let n=t[r],i=n.length;e.add(i>0&&n.charCodeAt(i-1)===47?n.slice(0,i-1):n)}this.initialExpandedPathSet=e,this.createdDirectoriesAllExpanded=!0}this.directories.set(0,LY())}appendPaths(e){return Q(this.instrumentation,`store.builder.appendPaths.parse`,()=>this.appendPreparedPaths(e.map(e=>TX(e))))}appendPreparedPaths(e,t=!0){return this.createdDirectoriesAllExpanded=!1,Q(this.instrumentation,`store.builder.appendPreparedPaths`,()=>{for(let n of e)this.appendPreparedPath(n,t)}),this}appendPresortedPaths(e,t=null){return Q(this.instrumentation,`store.builder.appendPresortedPaths`,()=>{if(t===!1){this.appendPresortedFilePaths(e);return}this.createdDirectoriesAllExpanded=!1;let n=null,r=0,i=this.nodes,a=this.segmentTable,o=a.idByValue,s=a.valueById,c=this.directoryStack,l=0,u=``,d=0;for(let t of e){if(n===t)throw Error(`Duplicate path: "${t}"`);let e=t.length>0&&t.charCodeAt(t.length-1)===47,a=e?t.length-1:t.length,f=0,p=0;if(n!=null){if(u.length>0&&t.length>u.length&&t.startsWith(u))f=d,p=u.length;else{let r=Math.min(a,n.length),i=!0;for(let e=0;e<r;e++){let r=t.charCodeAt(e);if(r!==n.charCodeAt(e)){i=!1;break}r===47&&(f++,p=e+1)}i&&e&&r===a&&n.length>a&&n.charCodeAt(a)===47&&(f++,p=a+1)}}l=f,r=f;let m=p,h=t.indexOf(`/`,m);for(;h>=0&&h<a;){let e=c[l];if(e===void 0)throw Error(`Directory stack underflow while building the path store`);r++;let n=t.slice(m,h),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n));let u=i.length;i.push({depthAndFlags:$Y(r,0,1),nameId:a,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),this.recordCreatedDirectoryPath(t.slice(0,h)),l++,c[l]=u,m=h+1,h=t.indexOf(`/`,m)}if(e){if(m<a){let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory parent for "${t}"`);r++;let n=t.slice(m,a),u=o.get(n);u===void 0&&(u=s.length,o.set(n,u),s.push(n));let d=i.length;i.push({depthAndFlags:$Y(r,0,1),nameId:u,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),l++,c[l]=d,m=a+1}let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory node for "${t}"`);this.promoteDirectoryToExplicit(e,t)}else{let e=c[l];if(e===void 0)throw Error(`Unable to resolve file parent for "${t}"`);let n=t.slice(m),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n)),i.push({depthAndFlags:$Y(r+1,0),nameId:a,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1})}m!==u.length&&(u=t.substring(0,m),d=r),n=t}c.length=l+1,n!=null&&(this.lastPreparedPath=TX(n)),this.hasDeferredDirectoryIndexes=!0}),this}appendPresortedFilePaths(e){let t=null,n=0,r=this.nodes,i=this.segmentTable,a=i.idByValue,o=i.valueById,s=this.directoryStack,c=0,l=``,u=0;for(let i of e){if(t===i)throw Error(`Duplicate path: "${i}"`);let e=i.length,d=0,f=0;if(t!=null){if(l.length>0&&i.length>l.length&&i.startsWith(l))d=u,f=l.length;else{let n=Math.min(e,t.length);for(let e=0;e<n;e++){let n=i.charCodeAt(e);if(n!==t.charCodeAt(e))break;n===47&&(d++,f=e+1)}}}c=d,n=d;let p=f,m=i.indexOf(`/`,p);for(;m>=0;){let e=s[c];if(e===void 0)throw Error(`Directory stack underflow while building the path store`);n++;let t=i.slice(p,m),l=a.get(t);l===void 0&&(l=o.length,a.set(t,l),o.push(t));let u=r.length;r.push({depthAndFlags:$Y(n,0,1),nameId:l,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),this.recordCreatedDirectoryPath(i.slice(0,m)),this.presortedDirectoryNodeIds.push(u),c++,s[c]=u,p=m+1,m=i.indexOf(`/`,p)}let h=s[c];if(h===void 0)throw Error(`Unable to resolve file parent for "${i}"`);let g=i.slice(p),_=a.get(g);_===void 0&&(_=o.length,a.set(g,_),o.push(g)),r.push({depthAndFlags:$Y(n+1,0),nameId:_,parentId:h,subtreeNodeCount:1,visibleSubtreeCount:1}),p!==l.length&&(l=i.substring(0,p),u=n),t=i}s.length=c+1,t!=null&&(this.lastPreparedPath=TX(t)),this.hasDeferredDirectoryIndexes=!0}finish(e={}){let t=e.skipSubtreeCountPass===!0;return this.hasDeferredDirectoryIndexes?(Q(this.instrumentation,`store.builder.buildDirectoryIndexes`,()=>this.buildPresortedFinish(t)),this.hasDeferredDirectoryIndexes=!1):t||Q(this.instrumentation,`store.builder.computeSubtreeCounts`,()=>this.computeSubtreeCounts(0)),{directories:this.directories,nodes:this.nodes,options:this.options,rootId:0,segmentTable:this.segmentTable,presortedDirectoryNodeIds:this.presortedDirectoryNodeIds.length>0?this.presortedDirectoryNodeIds:null}}didMatchAllInitialExpandedPaths(){return this.createdDirectoriesAllExpanded&&this.initialExpandedPathSet!=null&&this.createdDirectoryCount===this.initialExpandedPathSet.size}appendPreparedPath(e,t){if(this.hasDeferredDirectoryIndexes&&=(this.buildDirectoryIndexes(),!1),this.lastPreparedPath!=null){if(e.path===this.lastPreparedPath.path)throw Error(`Duplicate path: "${e.path}"`);if(t&&(this.options.sort==="default"?xX(this.lastPreparedPath,e,this.segmentSortKeyCache):NX(this.lastPreparedPath,e,this.options.sort))>0)throw Error(`Builder input must be sorted before appendPaths(): "${e.path}"`)}let n=this.lastPreparedPath,r=IX(e),i=n==null?0:IX(n),a=n==null?0:FX(n.segments,e.segments),o=Math.min(a,r,i);this.directoryStack.length=o+1;for(let n=o;n<r;n++){let r=this.directoryStack[this.directoryStack.length-1];if(r===void 0)throw Error(`Directory stack underflow while building the path store`);let i=t?this.getOrCreateDirectoryChild(r,e.segments[n]):this.createDirectoryChild(r,e.segments[n]);this.directoryStack.push(i)}if(e.isDirectory){let t=this.directoryStack[this.directoryStack.length-1];if(t===void 0)throw Error(`Unable to resolve directory node for "${e.path}"`);this.promoteDirectoryToExplicit(t,e.path),this.lastPreparedPath=e;return}let s=this.directoryStack[this.directoryStack.length-1];if(s===void 0)throw Error(`Unable to resolve file parent for "${e.path}"`);t?this.createFileChild(s,e.basename,e.path):this.createFileChildUnchecked(s,e.basename),this.lastPreparedPath=e}recordCreatedDirectoryPath(e){!this.createdDirectoriesAllExpanded||this.initialExpandedPathSet==null||(this.createdDirectoryCount+=1,this.initialExpandedPathSet.has(e)||(this.createdDirectoriesAllExpanded=!1))}createFileChild(e,t,n){let r=OX(this.segmentTable,t),i=this.getDirectoryIndex(e),a=i.childIdByNameId;if(a!=null&&a.get(r)!==void 0)throw Error(`Path collides with an existing entry: "${n}"`);let o=this.nodes[e];if(o===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let s=this.nodes.length;return this.nodes.push({depthAndFlags:$Y(eX(o)+1,0),nameId:r,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),a?.set(r,s),VY(i,s),s}createFileChildUnchecked(e,t){let n=OX(this.segmentTable,t),r=this.getDirectoryIndex(e),i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:$Y(eX(i)+1,0),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),VY(r,a),a}getOrCreateDirectoryChild(e,t){let n=OX(this.segmentTable,t),r=this.getDirectoryIndex(e);if(r.childIdByNameId!=null){let e=r.childIdByNameId.get(n);if(e!==void 0){let n=this.nodes[e];if(n!=null&&!nX(n))throw Error(`Path collides with an existing file while creating directory "${t}"`);return e}}let i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:$Y(eX(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),VY(r,a),this.directories.set(a,LY()),a}createDirectoryChild(e,t){let n=OX(this.segmentTable,t),r=this.getDirectoryIndex(e),i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:$Y(eX(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),VY(r,a),this.directories.set(a,LY()),a}promoteDirectoryToExplicit(e,t){let n=this.nodes[e];if(n===void 0)throw Error(`Unknown directory node ID: ${String(e)}`);if(!nX(n))throw Error(`Path is not a directory: "${t}"`);if(iX(n,1))throw Error(`Duplicate path: "${t}"`);aX(n,1)}getDirectoryIndex(e){let t=this.directories.get(e);if(t!==void 0)return t;throw Error(`Unknown directory child index for node ${String(e)}`)}buildPresortedFinish(e){let t=this.nodes,n=this.directories;n.set(0,RY());let r=-1,i=null;for(let e=1;e<t.length;e++){let a=t[e];if(a==null)continue;if(nX(a)){let t=RY();n.set(e,t),r=e,i=t}let o;a.parentId===r?o=i:(o=n.get(a.parentId),r=a.parentId,i=o??null),o?.childIds.push(e)}if(!e)for(let e=t.length-1;e>=1;e--){let n=t[e];if(n==null)continue;let r=t[n.parentId];r!=null&&(r.subtreeNodeCount+=n.subtreeNodeCount,r.visibleSubtreeCount+=n.visibleSubtreeCount)}}buildDirectoryIndexes(){let e=this.nodes;for(let t=1;t<e.length;t++){let n=e[t];if(n==null)continue;nX(n)&&this.directories.set(t,LY());let r=this.directories.get(n.parentId);r!=null&&(r.childIdByNameId!=null&&r.childIdByNameId.set(n.nameId,t),VY(r,t))}}computeSubtreeCounts(e){let t=this.nodes[e];if(t===void 0)throw Error(`Unknown node ID: ${String(e)}`);if(!nX(t))return t.subtreeNodeCount=1,t.visibleSubtreeCount=1,1;let n=this.getDirectoryIndex(e),r=1;for(let e of n.childIds)r+=this.computeSubtreeCounts(e);return UY(this.nodes,n),t.subtreeNodeCount=r,t.visibleSubtreeCount=r,r}};function qX(e,t=`closed`,n=null){let r=YX(t);return{activeNodeCount:e.nodes.length-1,collapsedDirectoryIds:new Set,collapseNewDirectoriesByDefault:!1,defaultExpansion:r,directoriesOpenByDefault:r===`open`,hasCollapsedDirectoryOverrides:!1,directoryLoadInfoById:new Map,expandedDirectoryIds:new Set,instrumentation:n,listeners:new Map,pathCacheByNodeId:new Map([[e.rootId,{path:``,version:0}]]),pathCacheVersion:0,snapshot:e,transactionStack:[]}}function JX(){return{affectedAncestorIds:new Set,affectedNodeIds:new Set,events:[]}}function YX(e){if(typeof e!=`number`)return e;if(!Number.isInteger(e)||e<0)throw Error(`initialExpansion must be "open", "closed", or a non-negative integer depth. Received: ${String(e)}`);return e}function XX(e,t){return iX(t,2)||e.defaultExpansion===`open`?!0:e.defaultExpansion!==`closed`&&eX(t)<=e.defaultExpansion}function ZX(e,t,n=e.snapshot.nodes[t]){return n==null||!nX(n)?!1:e.directoriesOpenByDefault&&!e.hasCollapsedDirectoryOverrides?!0:e.collapsedDirectoryIds.has(t)?!1:e.expandedDirectoryIds.has(t)?!0:XX(e,n)}function QX(e,t,n,r=e.snapshot.nodes[t]){if(r==null||!nX(r))return;let i=XX(e,r);if(n){if(i){e.collapsedDirectoryIds.delete(t),e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0;return}e.expandedDirectoryIds.add(t);return}if(i){e.collapsedDirectoryIds.add(t),e.hasCollapsedDirectoryOverrides=!0;return}e.expandedDirectoryIds.delete(t)}function $X(e,t){let n=e.directoryLoadInfoById.get(t);if(n!=null)return n;let r={activeAttemptId:null,errorMessage:null,nextAttemptId:1,state:`loaded`};return e.directoryLoadInfoById.set(t,r),r}function eZ(e,t){return e.directoryLoadInfoById.get(t)?.state??`loaded`}function tZ(e,t){let n=$X(e,t);if(n.state===`loading`&&n.activeAttemptId!=null)return{attemptId:n.activeAttemptId,nodeId:t,reused:!0};let r=n.nextAttemptId;return n.activeAttemptId=r,n.errorMessage=null,n.nextAttemptId+=1,n.state=`loading`,{attemptId:r,nodeId:t,reused:!1}}function nZ(e,t){let n=$X(e,t);n.activeAttemptId=null,n.errorMessage=null,n.state=`unloaded`}function rZ(e,t,n){let r=e.directoryLoadInfoById.get(t);return r==null||r.activeAttemptId!==n?!1:(r.activeAttemptId=null,r.errorMessage=null,r.state=`loaded`,!0)}function iZ(e,t,n){return e.directoryLoadInfoById.get(t)?.activeAttemptId===n}function aZ(e,t,n,r){let i=e.directoryLoadInfoById.get(t);return i==null||i.activeAttemptId!==n?!1:(i.activeAttemptId=null,i.errorMessage=r??null,i.state=`error`,!0)}function oZ(e,t){e.directoryLoadInfoById.delete(t)}function sZ(e,t,n){let r=n,i=e.listeners.get(t);return i==null?e.listeners.set(t,new Set([r])):i.add(r),()=>{let n=e.listeners.get(t);n!=null&&(n.delete(r),n.size===0&&e.listeners.delete(t))}}function cZ(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`add`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function lZ(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`remove`,path:e.path,projectionChanged:e.projectionChanged,recursive:e.recursive,visibleCountDelta:null}}function uZ(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,from:e.from,operation:`move`,projectionChanged:e.projectionChanged,to:e.to,visibleCountDelta:null}}function dZ(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`expand`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function fZ(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`collapse`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function pZ(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`mark-directory-unloaded`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function mZ(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,operation:`begin-child-load`,path:e.path,projectionChanged:e.projectionChanged,reused:e.reused,visibleCountDelta:null}}function hZ(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:e.childEvents.some(e=>e.canonicalChanged),childEvents:e.childEvents,operation:`apply-child-patch`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function gZ(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,operation:`complete-child-load`,path:e.path,projectionChanged:e.projectionChanged,stale:e.stale,visibleCountDelta:null}}function _Z(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,errorMessage:e.errorMessage,operation:`fail-child-load`,path:e.path,projectionChanged:e.projectionChanged,stale:e.stale,visibleCountDelta:null}}function vZ(e){return{activeNodeCountAfter:e.activeNodeCountAfter,activeNodeCountBefore:e.activeNodeCountBefore,affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],cachedPathEntryCountAfter:e.cachedPathEntryCountAfter,cachedPathEntryCountBefore:e.cachedPathEntryCountBefore,canonicalChanged:!1,idsPreserved:e.idsPreserved,loadInfoEntryCountAfter:e.loadInfoEntryCountAfter,loadInfoEntryCountBefore:e.loadInfoEntryCountBefore,mode:e.mode,operation:`cleanup`,projectionChanged:e.projectionChanged,reclaimedCachedPathEntryCount:e.reclaimedCachedPathEntryCount,reclaimedLoadInfoEntryCount:e.reclaimedLoadInfoEntryCount,reclaimedNodeSlotCount:e.reclaimedNodeSlotCount,reclaimedSegmentCount:e.reclaimedSegmentCount,segmentCountAfter:e.segmentCountAfter,segmentCountBefore:e.segmentCountBefore,totalNodeSlotCountAfter:e.totalNodeSlotCountAfter,totalNodeSlotCountBefore:e.totalNodeSlotCountBefore,visibleCountDelta:null}}function yZ(e,t,n){return{...n,visibleCountDelta:AZ(e)-t}}function bZ(e,t){let n=AZ(e),r=JX();e.transactionStack.push(r);try{t()}catch(t){throw CZ(e,r,!1),t}CZ(e,r,!0,AZ(e)-n)}function xZ(e,t){let n=e.instrumentation;if(n==null){SZ(e,t);return}Q(n,`store.events.record`,()=>SZ(e,t))}function SZ(e,t){let n=e.transactionStack[e.transactionStack.length-1]??null;if(n==null){OZ(e,t);return}n.events.push(t),DZ(n,t)}function CZ(e,t,n,r=null){if(e.transactionStack.pop()!==t)throw Error(`Transaction stack underflow`);if(!n)return;let i=e.transactionStack[e.transactionStack.length-1]??null;if(i!=null){let n=e.instrumentation;n==null?EZ(i,t):Q(n,`store.events.batch.merge`,()=>EZ(i,t));return}let a=wZ(t,r),o=e.instrumentation;if(o==null){OZ(e,a);return}Q(o,`store.events.batch.commit`,()=>OZ(e,a))}function wZ(e,t){return{affectedAncestorIds:[...e.affectedAncestorIds],affectedNodeIds:[...e.affectedNodeIds],canonicalChanged:e.events.some(e=>e.canonicalChanged),events:[...e.events],operation:`batch`,projectionChanged:e.events.some(e=>e.projectionChanged),visibleCountDelta:t}}function TZ(e,t){for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n);for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n)}function EZ(e,t){for(let n of t.events)e.events.push(n);TZ(e,t)}function DZ(e,t){for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n);for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n)}function OZ(e,t){let n=e.instrumentation;if(n==null){kZ(e,t);return}Q(n,`store.events.emit`,()=>kZ(e,t))}function kZ(e,t){e.listeners.get(t.operation)?.forEach(e=>e(t)),e.listeners.get(`*`)?.forEach(e=>e(t))}function AZ(e){return e.snapshot.nodes[e.snapshot.rootId]?.visibleSubtreeCount??0}function jZ(e,t){if(e.snapshot.options.flattenEmptyDirectories!==!0)return null;let n=e.snapshot.nodes[t];if(n==null||!nX(n)||iX(n,2))return null;let r=e.snapshot.directories.get(t);if(r==null||r.childIds.length!==1)return null;let i=r.childIds[0];if(i==null)return null;let a=e.snapshot.nodes[i];return a==null||!nX(a)?null:i}function MZ(e,t){let n=t;for(;;){let t=jZ(e,n);if(t==null)return n;n=t}}function NZ(e,t){let n=[t],r=t;for(;;){let t=jZ(e,r);if(t==null)return n;n.push(t),r=t}}function PZ(e,t){let n=t==null?e.snapshot.rootId:WZ(e,t);return n==null?[]:JZ(e,n)}function FZ(e,t){let n=TX(t),r=n.isDirectory?n.segments:n.segments.slice(0,-1),i=lQ(e,cQ(e,r)),{createdNodeIds:a,directoryId:o}=YZ(e,r),s=new Set(a),c=o;if(n.isDirectory){let n=qZ(e,o);if(iX(n,1))throw Error(`Path already exists: "${t}"`);aX(n,1),e.pathCacheByNodeId.set(o,{path:t,version:e.pathCacheVersion}),s.add(o)}else c=ZZ(e,o,n.basename),s.add(c);VZ(e,o);let l=lQ(e,o);return cZ({affectedAncestorIds:UZ(e,c),affectedNodeIds:[...s],path:t,projectionChanged:uQ(i,l)})}function IZ(e,t,n){let r=WZ(e,t);if(r==null)throw Error(`Path does not exist: "${t}"`);let i=qZ(e,r);if(iX(i,2))throw Error(`The root node cannot be removed`);if(nX(i)&&KZ(e,r).childIds.length>0&&n.recursive!==!0)throw Error(`Cannot remove a non-empty directory without recursive: "${t}"`);let a=i.parentId,o=lQ(e,a),s=oQ(e,r);eQ(e,a,r,i.nameId),sQ(e,a),VZ(e,a);let c=lQ(e,a);return lZ({affectedAncestorIds:UZ(e,a),affectedNodeIds:s,path:t,projectionChanged:uQ(o,c),recursive:n.recursive===!0})}function LZ(e,t,n,r){let i=WZ(e,t);if(i==null)throw Error(`Source path does not exist: "${t}"`);let a=qZ(e,i);if(iX(a,2))throw Error(`The root node cannot be moved`);let o=r.collision??`error`,s=iQ(e,i,n),c=lQ(e,a.parentId),l=lQ(e,s.parentId),u=kX(e.snapshot.segmentTable,a.nameId),d=OX(e.snapshot.segmentTable,s.basename);if(s.parentId===a.parentId&&u===s.basename)return null;if(nX(a)&&mQ(e,i,s.parentId))throw Error(`Cannot move a directory into one of its descendants`);let f=zY(e.snapshot.nodes,KZ(e,s.parentId)).get(d),p=s.existingNodeId??f??null;if(p!=null&&p!==i&&aQ(e,p,o,tX(a))===`skip`)return null;let m=a.parentId;eQ(e,m,i,a.nameId),a.parentId=s.parentId,a.nameId=d,e.pathCacheByNodeId.delete(i),pQ(e,i),$Z(e,s.parentId,i),sQ(e,m),e.pathCacheVersion++,VZ(e,m),s.parentId!==m&&VZ(e,s.parentId);let h=lQ(e,m),g=lQ(e,s.parentId);return uZ({affectedAncestorIds:[...new Set([...UZ(e,m),...UZ(e,s.parentId)])],affectedNodeIds:[i],from:t,projectionChanged:dQ([c,l],[h,g]),to:BZ(e,i)})}function RZ(e,t){let n=e.pathCacheByNodeId.get(t);return n!=null&&n.version===e.pathCacheVersion?n.path:null}function zZ(e,t,n){return e.pathCacheByNodeId.set(t,{path:n,version:e.pathCacheVersion}),n}function BZ(e,t){let n=qZ(e,t),r=RZ(e,t);if(r!=null)return r;if(iX(n,2))return zZ(e,t,``);let i=BZ(e,n.parentId),a=kX(e.snapshot.segmentTable,n.nameId),o=i.length===0?a:`${i}${a}`;return zZ(e,t,nX(n)?`${o}/`:o)}function VZ(e,t){let n=e.instrumentation;if(n==null){gQ(e,t);return}Q(n,`store.recomputeCountsUpwardFrom`,()=>gQ(e,t))}function HZ(e,t){let n=[[t,0]],{nodes:r,directories:i}=e.snapshot;for(;n.length>0;){let t=n[n.length-1],a=t[0],o=r[a];if(o==null||!nX(o)){hQ(e,a,o,!0),n.pop();continue}let s=i.get(a);if(s==null||t[1]>=s.childIds.length){hQ(e,a,o,!0),n.pop();continue}let c=s.childIds[t[1]++];n.push([c,0])}}function UZ(e,t){let n=[],r=t;for(;r!=null;){let t=qZ(e,r);if(n.push(r),r===e.snapshot.rootId)break;r=t.parentId}return n}function WZ(e,t){if(t.length===0)return e.snapshot.rootId;let n=EX(t);return GZ(e,n.segments,n.requiresDirectory)}function GZ(e,t,n){let r=e.snapshot.rootId;for(let n of t){let t=e.snapshot.segmentTable.idByValue.get(n);if(t===void 0)return null;let i=KZ(e,r),a=zY(e.snapshot.nodes,i).get(t);if(a===void 0)return null;r=a}let i=qZ(e,r);return n&&!nX(i)?null:r}function KZ(e,t){let n=e.snapshot.directories.get(t);if(n===void 0)throw Error(`Unknown directory child index for node ${String(t)}`);return n}function qZ(e,t){let n=e.snapshot.nodes[t];if(n===void 0||iX(n,4))throw Error(`Unknown node ID: ${String(t)}`);return n}function JZ(e,t){let n=e.snapshot.nodes[t];if(n===void 0||iX(n,4))return[];if(!nX(n))return[BZ(e,t)];if(KZ(e,t).childIds.length===0)return iX(n,1)&&!iX(n,2)?[BZ(e,t)]:[];let r=[],i=[{childIndex:0,nodeId:t}];for(;i.length>0;){let t=i[i.length-1];if(t==null)break;let n=e.snapshot.nodes[t.nodeId];if(n===void 0||iX(n,4)){i.pop();continue}if(!nX(n)){r.push(BZ(e,t.nodeId)),i.pop();continue}let a=KZ(e,t.nodeId);if(a.childIds.length===0){iX(n,1)&&!iX(n,2)&&r.push(BZ(e,t.nodeId)),i.pop();continue}let o=a.childIds[t.childIndex];if(o==null){i.pop();continue}t.childIndex++,i.push({childIndex:0,nodeId:o})}return r}function YZ(e,t){let n=[],r=e.snapshot.rootId;for(let i of t){let t=OX(e.snapshot.segmentTable,i),a=KZ(e,r),o=zY(e.snapshot.nodes,a).get(t);if(o!==void 0){if(!nX(qZ(e,o)))throw Error(`Cannot create a directory that collides with an existing file: "${i}"`);r=o;continue}r=XZ(e,r,t),n.push(r)}return{createdNodeIds:n,directoryId:r}}function XZ(e,t,n){let r=qZ(e,t),i=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:$Y(eX(r)+1,0,1),nameId:n,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),e.snapshot.directories.set(i,LY()),$Z(e,t,i),e.collapseNewDirectoriesByDefault&&(e.collapsedDirectoryIds.add(i),e.hasCollapsedDirectoryOverrides=!0),e.activeNodeCount++,i}function ZZ(e,t,n){let r=OX(e.snapshot.segmentTable,n),i=KZ(e,t);if(zY(e.snapshot.nodes,i).has(r))throw Error(`Path already exists: "${vQ(e,t,n)}"`);let a=qZ(e,t),o=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:$Y(eX(a)+1,0),nameId:r,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),$Z(e,t,o),e.activeNodeCount++,o}function QZ(e,t,n){let r=0,i=t.childIds.length;for(;r<i;){let a=r+i>>>1,o=t.childIds[a];if(o==null){i=a;continue}tQ(e,n,o)<0?i=a:r=a+1}return r}function $Z(e,t,n){let r=KZ(e,t),i=qZ(e,n);zY(e.snapshot.nodes,r).set(i.nameId,n),WY(r,n,i.subtreeNodeCount,i.visibleSubtreeCount);let a=QZ(e,r,n);r.childIds.splice(a,0,n),HY(r,a),qY(e.snapshot.nodes,r)}function eQ(e,t,n,r){let i=KZ(e,t),a=BY(i),o=a.get(n)??-1;zY(e.snapshot.nodes,i).delete(r),a.delete(n);let s=e.snapshot.nodes[n];s!=null&&WY(i,n,-s.subtreeNodeCount,-s.visibleSubtreeCount),o>=0&&(i.childIds.splice(o,1),HY(i,o),qY(e.snapshot.nodes,i))}function tQ(e,t,n){let r=e.snapshot.options.sort;return r==="default"?nQ(e,t,n):r(rQ(e,t),rQ(e,n))}function nQ(e,t,n){let r=qZ(e,t),i=qZ(e,n),a=nX(r);if(a!==nX(i))return a?-1:1;let o=hX(SX(e.snapshot.segmentTable,r.nameId),SX(e.snapshot.segmentTable,i.nameId));if(o!==0)return o;let s=kX(e.snapshot.segmentTable,r.nameId),c=kX(e.snapshot.segmentTable,i.nameId);return s===c?t<n?-1:1:s<c?-1:1}function rQ(e,t){let n=qZ(e,t),r=BZ(e,t),i=nX(n),a=i?r.slice(0,-1):r;return{basename:kX(e.snapshot.segmentTable,n.nameId),depth:eX(n),isDirectory:i,path:r,segments:a.length===0?[]:a.split(`/`)}}function iQ(e,t,n){let r=qZ(e,t),i=WZ(e,n);if(i!=null){let t=qZ(e,i);if(nX(t))return{basename:kX(e.snapshot.segmentTable,r.nameId),existingNodeId:null,parentId:i};let a=EX(n).segments;return{basename:a[a.length-1]??``,existingNodeId:i,parentId:t.parentId}}let a=EX(n),o=a.segments[a.segments.length-1]??``,s=a.segments.slice(0,-1),c=s.length===0?e.snapshot.rootId:GZ(e,s,!0);if(c==null)throw Error(`Destination parent does not exist: "${n}"`);return{basename:o,existingNodeId:null,parentId:c}}function aQ(e,t,n,r){if(n===`skip`)return`skip`;if(n===`error`)throw Error(`Destination already exists: "${BZ(e,t)}"`);let i=qZ(e,t);if(tX(i)!==r)throw Error(`replace collision requires the same source and destination kinds`);if(nX(i)&&KZ(e,t).childIds.length>0)throw Error(`replace collision does not support non-empty directories`);let a=i.parentId,o=i.nameId;return oQ(e,t),eQ(e,a,t,o),sQ(e,a),VZ(e,a),`handled`}function oQ(e,t){let n=[],r=[{nodeId:t,visitedChildren:!1}];for(;r.length>0;){let t=r.pop();if(t==null)break;let i=qZ(e,t.nodeId);if(t.visitedChildren||!nX(i)){nX(i)&&e.snapshot.directories.delete(t.nodeId),aX(i,4),e.pathCacheByNodeId.delete(t.nodeId),e.collapsedDirectoryIds.delete(t.nodeId)&&(e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0),e.expandedDirectoryIds.delete(t.nodeId),oZ(e,t.nodeId),e.activeNodeCount--,n.push(t.nodeId);continue}r.push({nodeId:t.nodeId,visitedChildren:!0});let a=KZ(e,t.nodeId);for(let e=a.childIds.length-1;e>=0;e--){let t=a.childIds[e];t!=null&&r.push({nodeId:t,visitedChildren:!1})}}return n}function sQ(e,t){let n=t;for(;n!=null;){let t=qZ(e,n);if(!nX(t)||iX(t,2)||KZ(e,n).childIds.length>0)return;aX(t,1),n=t.parentId===n?null:t.parentId}}function cQ(e,t){let n=e.snapshot.rootId;for(let r of t){let t=e.snapshot.segmentTable.idByValue.get(r);if(t==null)break;let i=zY(e.snapshot.nodes,KZ(e,n)).get(t);if(i==null||!nX(qZ(e,i)))break;n=i}return n}function lQ(e,t){let n=fQ(e,t);if(n==null)return null;let r=MZ(e,n),i=qZ(e,r),a=n===r?null:NZ(e,n).map(t=>BZ(e,t));return JSON.stringify({flattenedSegmentPaths:a,hasChildren:KZ(e,r).childIds.length>0,path:BZ(e,r),terminalKind:tX(i)})}function uQ(e,t){return dQ([e],[t])}function dQ(e,t){for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(r==null||i==null||r!==i)return!0}return!1}function fQ(e,t){let n=t;for(;n!=null;){let t=qZ(e,n);if(!nX(t)||iX(t,2))return null;if(!ZX(e,n,t))return n;n=t.parentId}return null}function pQ(e,t){let n=qZ(e,t);if(oX(n,(t===e.snapshot.rootId?-1:eX(qZ(e,n.parentId)))+1),!nX(n))return;let r=KZ(e,t);for(let t of r.childIds)pQ(e,t)}function mQ(e,t,n){let r=n;for(;r!=null;){if(r===t)return!0;let n=qZ(e,r);if(r===e.snapshot.rootId)return!1;r=n.parentId}return!1}function hQ(e,t,n=qZ(e,t),r=!1){let i=e.instrumentation;if(i==null){_Q(e,t,n,r);return}Q(i,`store.recomputeNodeCounts`,()=>_Q(e,t,n,r))}function gQ(e,t){let n=t;for(;n!=null;){let t=qZ(e,n),r=t.subtreeNodeCount,i=t.visibleSubtreeCount;if(hQ(e,n,t),n===e.snapshot.rootId)return;let a=t.subtreeNodeCount-r,o=t.visibleSubtreeCount-i,s=t.parentId;(a!==0||o!==0)&&WY(KZ(e,s),n,a,o),n=s}}function _Q(e,t,n,r){if(!nX(n)){n.subtreeNodeCount=1,n.visibleSubtreeCount=1;return}let i=KZ(e,t);if(r){let t=e.instrumentation;t==null?UY(e.snapshot.nodes,i):Q(t,`store.recomputeNodeCounts.rebuildChildAggregates`,()=>UY(e.snapshot.nodes,i))}let a=1+i.totalChildSubtreeNodeCount,o=i.totalChildVisibleSubtreeCount;if(n.subtreeNodeCount=a,iX(n,2)){n.visibleSubtreeCount=o;return}n.visibleSubtreeCount=jZ(e,t)==null?ZX(e,t,n)?1+o:1:o}function vQ(e,t,n){let r=BZ(e,t);return r.length===0?n:`${r}${n}`}function yQ(e){return e!=null&&!iX(e,4)}function bQ(e,t){let n=e.snapshot.nodes[t];return!yQ(n)||!nX(n)||iX(n,2)?null:n}function xQ(e){let t=0;for(let[n,r]of e.pathCacheByNodeId)r.version===e.pathCacheVersion&&yQ(e.snapshot.nodes[n])&&(t+=1);return t}function SQ(e){return Math.max(0,e.valueById.length-1)}function CQ(e){return{activeNodeCount:e.activeNodeCount,cachedPathEntryCount:xQ(e),loadInfoEntryCount:e.directoryLoadInfoById.size,segmentCount:SQ(e.snapshot.segmentTable),totalNodeSlotCount:Math.max(0,e.snapshot.nodes.length-1)}}function wQ(e,t,n,r){return{activeNodeCountAfter:r.activeNodeCount,activeNodeCountBefore:n.activeNodeCount,cachedPathEntryCountAfter:r.cachedPathEntryCount,cachedPathEntryCountBefore:n.cachedPathEntryCount,idsPreserved:t,loadInfoEntryCountAfter:r.loadInfoEntryCount,loadInfoEntryCountBefore:n.loadInfoEntryCount,mode:e,reclaimedCachedPathEntryCount:n.cachedPathEntryCount-r.cachedPathEntryCount,reclaimedLoadInfoEntryCount:n.loadInfoEntryCount-r.loadInfoEntryCount,reclaimedNodeSlotCount:n.totalNodeSlotCount-r.totalNodeSlotCount,reclaimedSegmentCount:n.segmentCount-r.segmentCount,segmentCountAfter:r.segmentCount,segmentCountBefore:n.segmentCount,totalNodeSlotCountAfter:r.totalNodeSlotCount,totalNodeSlotCountBefore:n.totalNodeSlotCount}}function TQ(e){let t=[],n=[];for(let n of e.collapsedDirectoryIds)bQ(e,n)!=null&&t.push(BZ(e,n));for(let t of e.expandedDirectoryIds)bQ(e,t)!=null&&n.push(BZ(e,t));return{collapsedPaths:t,expandedPaths:n}}function EQ(e){let t=[];for(let[n,r]of e.directoryLoadInfoById)bQ(e,n)!=null&&eZ(e,n)!==`loaded`&&t.push({info:{activeAttemptId:null,errorMessage:r.errorMessage,nextAttemptId:r.nextAttemptId,state:r.state},path:BZ(e,n)});return t}function DQ(e,t){e.collapsedDirectoryIds.clear(),e.hasCollapsedDirectoryOverrides=!1,e.expandedDirectoryIds.clear();for(let n of t.expandedPaths){let t=WZ(e,n);t!=null&&QX(e,t,!0,qZ(e,t))}for(let n of t.collapsedPaths){let t=WZ(e,n);t!=null&&QX(e,t,!1,qZ(e,t))}}function OQ(e,t){e.directoryLoadInfoById.clear();for(let n of t){let t=WZ(e,n.path);t!=null&&bQ(e,t)!=null&&e.directoryLoadInfoById.set(t,{activeAttemptId:null,errorMessage:n.info.errorMessage,nextAttemptId:n.info.nextAttemptId,state:n.info.state})}}function kQ(e){e.pathCacheVersion+=1,e.pathCacheByNodeId.clear(),e.pathCacheByNodeId.set(e.snapshot.rootId,{path:``,version:e.pathCacheVersion})}function AQ(e){let t=e.snapshot.segmentTable,n=DX();for(let r of e.snapshot.nodes)if(yQ(r)){if(iX(r,2)){r.nameId=0;continue}r.nameId=OX(n,kX(t,r.nameId))}e.snapshot.segmentTable=n}function jQ(e){for(let[t,n]of e.snapshot.directories){let r=e.snapshot.nodes[t];if(!yQ(r)||!nX(r)){e.snapshot.directories.delete(t);continue}let i=n.childIds.filter(n=>{let r=e.snapshot.nodes[n];return yQ(r)&&r.parentId===t});n.childIds=i,n.childIdByNameId=new Map(i.map(t=>[qZ(e,t).nameId,t])),n.childPositionById=new Map(i.map((e,t)=>[e,t])),UY(e.snapshot.nodes,n)}}function MQ(e){let t=e.snapshot.nodes.length-1;for(;t>e.snapshot.rootId;){let n=e.snapshot.nodes[t];if(yQ(n))break;--t}e.snapshot.nodes.length=t+1}function NQ(e){let t=TQ(e),n=EQ(e);Q(e.instrumentation,`store.cleanup.stable.clearPathCaches`,()=>kQ(e)),Q(e.instrumentation,`store.cleanup.stable.rebuildSegmentTable`,()=>AQ(e)),Q(e.instrumentation,`store.cleanup.stable.rebuildDirectoryIndexes`,()=>jQ(e)),Q(e.instrumentation,`store.cleanup.stable.trimTrailingRemovedNodeSlots`,()=>MQ(e)),Q(e.instrumentation,`store.cleanup.stable.restoreExpansionOverrides`,()=>DQ(e,t)),Q(e.instrumentation,`store.cleanup.stable.restoreDirectoryLoadInfos`,()=>OQ(e,n)),Q(e.instrumentation,`store.cleanup.stable.recomputeCounts`,()=>HZ(e,e.snapshot.rootId))}function PQ(e){let t=TQ(e),n=EQ(e),r=Q(e.instrumentation,`store.cleanup.aggressive.listPaths`,()=>PZ(e)),i=cX({...e.snapshot.options},e.instrumentation),a=Q(e.instrumentation,`store.cleanup.aggressive.rebuildSnapshot`,()=>{let e=new KX(i);return e.appendPaths(r),e.finish()});e.snapshot=a,e.activeNodeCount=a.nodes.length-1,e.pathCacheByNodeId=new Map([[a.rootId,{path:``,version:0}]]),e.pathCacheVersion=0,Q(e.instrumentation,`store.cleanup.aggressive.restoreExpansionOverrides`,()=>DQ(e,t)),Q(e.instrumentation,`store.cleanup.aggressive.restoreDirectoryLoadInfos`,()=>OQ(e,n)),Q(e.instrumentation,`store.cleanup.aggressive.recomputeCounts`,()=>HZ(e,e.snapshot.rootId))}function FQ(e){for(let t of e.directoryLoadInfoById.values())if(t.state===`loading`&&t.activeAttemptId!=null)return!0;return!1}function IQ(e,t){let n=CQ(e);t===`stable`?Q(e.instrumentation,`store.cleanup.stable`,()=>NQ(e)):Q(e.instrumentation,`store.cleanup.aggressive`,()=>PQ(e));let r=CQ(e);return wQ(t,t===`stable`,n,r)}var LQ=64;function RQ(e,t){let n=t+2;if(n<=e.length)return e;let r=e.length;for(;r<n;)r*=2;let i=new Int32Array(r);return i.fill(-1),i.set(e),i}function zQ(e){return qZ(e,e.snapshot.rootId).visibleSubtreeCount}function BQ(e,t,n,r){let i=qZ(e,t.terminalNodeId),a=Math.max(1,i.visibleSubtreeCount);return Math.min(r-1,n+a-1)}function VQ(e,t,n,r){return{ancestorPaths:r,index:t.index,posInSet:t.posInSet,row:o$(e,t.cursor),setSize:t.setSize,subtreeEndIndex:BQ(e,t.cursor,t.index,n)}}function HQ(e,t,n,r,i,a){let o=KZ(e,t),{childIndex:s,childVisibleIndex:c,localVisibleIndex:l}=GY(e.snapshot.nodes,o,n),u=o.childIds[s];if(u==null)throw Error(`Visible index ${String(n)} is out of range`);return UQ(e,u,l,r+c,i+1,s,o.childIds.length,a)}function UQ(e,t,n,r,i,a,o,s){if(!nX(qZ(e,t))){if(n===0)return{ancestors:s,cursor:{headNodeId:t,terminalNodeId:t,visibleDepth:i},index:r,posInSet:a,setSize:o};throw Error(`Visible index ${String(n)} is out of range for file`)}let c=e$(e,t,i);if(n===0)return{ancestors:s,cursor:c,index:r,posInSet:a,setSize:o};let l=qZ(e,c.terminalNodeId);if(!nX(l)||!ZX(e,c.terminalNodeId,l))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return HQ(e,c.terminalNodeId,n-1,r+1,c.visibleDepth,[...s,{cursor:c,index:r,posInSet:a,setSize:o}])}function WQ(e,t){let n=zQ(e);if(t<0||t>=n)return null;let r=HQ(e,e.snapshot.rootId,t,0,-1,[]),i=r.ancestors.map(t=>BZ(e,t.cursor.terminalNodeId)),a=null;return{ancestorPaths:i,get ancestorRows(){if(a!=null)return a;let t=[],i=[];for(let a of r.ancestors){let r=VQ(e,a,n,[...i]);t.push(r),i.push(r.row.path)}return a=t,a},index:r.index,posInSet:r.posInSet,row:o$(e,r.cursor),setSize:r.setSize,subtreeEndIndex:BQ(e,r.cursor,r.index,n)}}function GQ(e,t,n){let r=e.instrumentation,i=zQ(e);if(i<=0||n<t)return[];let a=Math.max(0,Math.min(t,i-1)),o=Math.max(a,Math.min(n,i-1));if(r==null){if(a===0)return a$(e,o+1);let t=[],n=ZQ(e,a);for(let r=a;r<=o&&n!=null;r++){let r=o$(e,n);t.push(r),n=n$(e,n)}return t}let s=[],c=0,l=0,u=Q(r,`store.getVisibleSlice.selectFirstRow`,()=>ZQ(e,a));for(let t=a;t<=o&&u!=null;t++){let t=Q(r,`store.getVisibleSlice.materializeRow`,()=>o$(e,u));s.push(t),t.isFlattened&&(c++,l+=t.flattenedSegments?.length??0),u=Q(r,`store.getVisibleSlice.advanceCursor`,()=>n$(e,u))}return uX(r,`workload.visibleRowsRead`,s.length),uX(r,`workload.flattenedRowsRead`,c),uX(r,`workload.flattenedSegmentsRead`,l),s}function KQ(e,t=zQ(e)){let n=e.instrumentation;return n==null?i$(e,t):Q(n,`store.getVisibleTreeProjection`,()=>i$(e,t))}function qQ(e){return r$(KQ(e))}function JQ(e,t){let n=WZ(e,t);if(n==null||n===e.snapshot.rootId||nX(qZ(e,n))&&MZ(e,n)!==n)return null;let r=0,i=n,{nodes:a,rootId:o}=e.snapshot;for(;i!==o;){let t=qZ(e,i).parentId,n=KZ(e,t),s=BY(n).get(i);if(s==null)throw Error(`Child ${String(i)} was not found in its parent index`);if(r+=KY(a,n,s),t!==o){let n=qZ(e,t),a=jZ(e,t);if(!ZX(e,t,n)&&a!==i)return null;MZ(e,t)===t&&(r+=1)}i=t}return r}function YQ(e,t){let n=WZ(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=qZ(e,n);if(!nX(r))throw Error(`Path is not a directory: "${t}"`);return ZX(e,n,r)?null:(QX(e,n,!0,r),VZ(e,n),dZ({affectedAncestorIds:UZ(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0}))}function XQ(e,t){let n=WZ(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=qZ(e,n);if(!nX(r))throw Error(`Path is not a directory: "${t}"`);return ZX(e,n,r)?(QX(e,n,!1,r),VZ(e,n),fZ({affectedAncestorIds:UZ(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0})):null}function ZQ(e,t){return t<0||t>=zQ(e)?null:QQ(e,e.snapshot.rootId,t,-1)}function QQ(e,t,n,r){let i=KZ(e,t),a=e.instrumentation,{childIndex:o,localVisibleIndex:s}=a==null?GY(e.snapshot.nodes,i,n):Q(a,`store.getVisibleSlice.selectChildIndex`,()=>GY(e.snapshot.nodes,i,n)),c=i.childIds[o];if(c!=null)return $Q(e,c,s,r+1);throw Error(`Visible index ${String(n)} is out of range`)}function $Q(e,t,n,r){if(!nX(qZ(e,t))){if(n===0)return{headNodeId:t,terminalNodeId:t,visibleDepth:r};throw Error(`Visible index ${String(n)} is out of range for file`)}let i=e$(e,t,r);if(n===0)return i;let a=qZ(e,i.terminalNodeId);if(!nX(a)||!ZX(e,i.terminalNodeId,a))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return QQ(e,i.terminalNodeId,n-1,i.visibleDepth)}function e$(e,t,n){return nX(qZ(e,t))?e.instrumentation==null?{headNodeId:t,terminalNodeId:MZ(e,t),visibleDepth:n}:{headNodeId:t,terminalNodeId:Q(e.instrumentation,`store.getVisibleSlice.flatten.resolveTerminalDirectory`,()=>MZ(e,t)),visibleDepth:n}:{headNodeId:t,terminalNodeId:t,visibleDepth:n}}function t$(e,t){let n=qZ(e,t);if(!nX(n))return!0;let r=n.parentId;return r===e.snapshot.rootId||jZ(e,r)!==t}function n$(e,t){let n=qZ(e,t.terminalNodeId);if(nX(n)){let r=KZ(e,t.terminalNodeId);if(ZX(e,t.terminalNodeId,n)&&r.childIds.length>0){let n=r.childIds[0];return n==null?null:$Q(e,n,0,t.visibleDepth+1)}}let r=t.terminalNodeId,i=t.visibleDepth;for(;;){let t=qZ(e,r);if(r===e.snapshot.rootId)return null;let n=t.parentId,a=KZ(e,n),o=BY(a).get(r)??-1;if(o<0)throw Error(`Child ${String(r)} was not found in its parent index`);let s=a.childIds[o+1]??null;if(s!=null)return $Q(e,s,0,i);t$(e,r)&&i--,r=n}}function r$(e){let t=e.paths.length,n=Array(t);for(let r=0;r<t;r+=1){let t=e.getParentIndex(r);n[r]={index:r,parentPath:t>=0?e.paths[t]??null:null,path:e.paths[r]??``,posInSet:e.posInSetByIndex[r]??0,setSize:e.setSizeByIndex[r]??0}}return{getParentIndex:e.getParentIndex,rows:n,get visibleIndexByPath(){return e.visibleIndexByPath}}}function i$(e,t){let n=Array(t),r=new Int32Array(t),i=new Int32Array(t),a=new Int32Array(t),o=new Int32Array(LQ);o.fill(-1);let s=0,{nodes:c,directories:l,segmentTable:u}=e.snapshot,d=[[l.get(e.snapshot.rootId),0,-1,``]],f=e.snapshot.options.flattenEmptyDirectories,p=e.pathCacheByNodeId,m=e.pathCacheVersion,h=u.valueById;for(;d.length>0&&s<t;){let t=d[d.length-1],u=t[0];if(t[1]>=u.childIds.length){d.pop();continue}let g=t[1],_=u.childIds[t[1]++],v=c[_],y=t[2]+1,b=t[3];o=RQ(o,y);let x,S=_;if(nX(v))S=f?MZ(e,_):_,x=S===_?`${b}${h[v.nameId]}/`:BZ(e,S);else{let e=p.get(_);x=e!=null&&e.version===m?e.path:`${b}${h[v.nameId]}`}r[s]=o[y],n[s]=x,i[s]=g,a[s]=u.childIds.length,o[y+1]=s,s+=1;let C=c[S];C!=null&&nX(C)&&ZX(e,S,C)&&d.push([l.get(S),0,y,x])}s<t&&(n.length=s);let g=r.subarray(0,s),_=i.subarray(0,s),v=a.subarray(0,s),y=null;return{getParentIndex(e){return e<0||e>=s?-1:g[e]??-1},paths:n,posInSetByIndex:_,setSizeByIndex:v,get visibleIndexByPath(){if(y==null){y=new Map;for(let e=0;e<s;e+=1)y.set(n[e]??``,e)}return y}}}function a$(e,t){let n=Array(t),r=0,{nodes:i,directories:a,segmentTable:o}=e.snapshot,s=[[a.get(e.snapshot.rootId),0,-1]],c=o.valueById,l=e.snapshot.options.flattenEmptyDirectories,u=e.pathCacheByNodeId,d=e.pathCacheVersion;for(;s.length>0&&r<t;){let t=s[s.length-1],o=t[0];if(t[1]>=o.childIds.length){s.pop();continue}let f=o.childIds[t[1]++],p=i[f],m=t[2]+1;if(!nX(p)){let t=u.get(f);n[r++]={depth:m,flattenedSegments:void 0,hasChildren:!1,id:f,isExpanded:!1,isFlattened:!1,isLoading:!1,kind:`file`,loadState:void 0,name:c[p.nameId],path:t!=null&&t.version===d?t.path:BZ(e,f)};continue}let h=l?MZ(e,f):f,g={headNodeId:f,terminalNodeId:h,visibleDepth:m};n[r++]=o$(e,g);let _=i[h];_!=null&&nX(_)&&ZX(e,h,_)&&s.push([a.get(h),0,m])}return r<t&&(n.length=r),n}function o$(e,t){let n=qZ(e,t.terminalNodeId),r=nX(n)?s$(e,t):null,i=BZ(e,t.terminalNodeId),a=kX(e.snapshot.segmentTable,n.nameId),o=nX(n)&&KZ(e,t.terminalNodeId).childIds.length>0,s=t.headNodeId!==t.terminalNodeId,c=e.instrumentation,l=s?c==null?NZ(e,t.headNodeId).map(n=>{let r=qZ(e,n);return{isTerminal:n===t.terminalNodeId,name:kX(e.snapshot.segmentTable,r.nameId),nodeId:n,path:BZ(e,n)}}):Q(c,`store.getVisibleSlice.flatten.collectSegments`,()=>NZ(e,t.headNodeId).map(n=>{let r=qZ(e,n);return{isTerminal:n===t.terminalNodeId,name:kX(e.snapshot.segmentTable,r.nameId),nodeId:n,path:BZ(e,n)}})):void 0;return{depth:t.visibleDepth,flattenedSegments:l,hasChildren:o,id:t.terminalNodeId,isExpanded:nX(n)&&ZX(e,t.terminalNodeId,n),isFlattened:s,isLoading:r===`loading`,kind:nX(n)?`directory`:`file`,loadState:r==null||r===`loaded`?void 0:r,name:a,path:i}}function s$(e,t){if(t.headNodeId===t.terminalNodeId)return eZ(e,t.terminalNodeId);let n=NZ(e,t.headNodeId),r=!1,i=!1;for(let t of n){let n=eZ(e,t);if(n===`loading`)return`loading`;if(n===`error`){i=!0;continue}n===`unloaded`&&(r=!0)}return i?`error`:r?`unloaded`:`loaded`}var c$=8;function l$(e){let{nodes:t,directories:n,rootId:r,options:i}=e,a=t.length,o=new Int32Array(a),s=new Int32Array(a),c=new Int32Array(a),l=new Int32Array(a),u=new Int32Array(a),d=new Int32Array(a),f=new Int32Array(a);for(let e=0;e<a;e+=1){let n=t[e];n!=null&&(o[e]=n.parentId,s[e]=n.nameId,c[e]=n.depthAndFlags,l[e]=n.subtreeNodeCount,u[e]=n.visibleSubtreeCount)}let p=0;for(let e of n.values())p+=e.childIds.length;let m=new Int32Array(p),h=0;for(let[e,t]of n){let n=t.childIds;d[e]=h,f[e]=n.length;for(let e=0;e<n.length;e+=1)m[h]=n[e],h+=1}return{nodeCount:a,rootId:r,flattenEmptyDirectories:i.flattenEmptyDirectories===!0,parentId:o,nameId:s,depthAndFlags:c,subtreeNodeCount:l,visibleSubtreeCount:u,childStart:d,childCount:f,childIdsFlat:m}}function u$(e){let{nodeCount:t,rootId:n,flattenEmptyDirectories:r,depthAndFlags:i,subtreeNodeCount:a,visibleSubtreeCount:o,childStart:s,childCount:c,childIdsFlat:l}=e;for(let e=t-1;e>=1;--e){if((i[e]&c$)===0)continue;let t=s[e],n=c[e],u=0,d=0;for(let e=0;e<n;e+=1){let n=l[t+e];u+=a[n],d+=o[n]}a[e]=1+u;let f;f=r&&n===1?(i[l[t]]&c$)===0?1+d:d:1+d,o[e]=f}let u=s[n],d=c[n],f=0,p=0;for(let e=0;e<d;e+=1){let t=l[u+e];f+=a[t],p+=o[t]}a[n]=1+f,o[n]=p}function d$(e){let{directories:t,nodes:n,options:r,rootId:i,presortedDirectoryNodeIds:a}=e.snapshot,o=r.flattenEmptyDirectories===!0,s=e=>{let r=n[e];if(r==null||!nX(r))return;let i=t.get(e);if(i==null)throw Error(`Unknown directory child index for node ${String(e)}`);let a=i.childIds,s=a.length,c=0,l=0;for(let e=0;e<s;e++){let t=a[e];if(t==null)continue;let r=n[t];c+=r.subtreeNodeCount,l+=r.visibleSubtreeCount}i.totalChildSubtreeNodeCount=c,i.totalChildVisibleSubtreeCount=l,s>=128&&qY(n,i),r.subtreeNodeCount=1+c;let u;if(o&&s===1){let e=n[a[0]];u=e!=null&&nX(e)?l:1+l}else u=1+l;r.visibleSubtreeCount=u};if(a!=null)for(let e=a.length-1;e>=0;e--)s(a[e]);else for(let e=n.length-1;e>=1;e--)s(e);let c=n[i],l=t.get(i);if(c==null||l==null)return;let u=l.childIds,d=0,f=0;for(let e=0;e<u.length;e++){let t=u[e];if(t==null)continue;let r=n[t];d+=r.subtreeNodeCount,f+=r.visibleSubtreeCount}l.totalChildSubtreeNodeCount=d,l.totalChildVisibleSubtreeCount=f,qY(n,l),c.subtreeNodeCount=1+d,c.visibleSubtreeCount=f}function f$(e){let{directories:t,nodes:n,rootId:r}=e.snapshot,i=l$(e.snapshot);u$(i);let a=i.subtreeNodeCount,o=i.visibleSubtreeCount;for(let e=0;e<n.length;e+=1){let t=n[e];t!=null&&(t.subtreeNodeCount=a[e],t.visibleSubtreeCount=o[e])}for(let[e,i]of t){let t=i.childIds,a=t.length,o=0,s=0;for(let e=0;e<a;e++){let r=t[e];if(r==null)continue;let i=n[r];o+=i.subtreeNodeCount,s+=i.visibleSubtreeCount}i.totalChildSubtreeNodeCount=o,i.totalChildVisibleSubtreeCount=s,(e===r||a>=128)&&qY(n,i)}}function p$(e){return e.initialExpansion===`open`&&(e.initialExpandedPaths==null||e.initialExpandedPaths.length===0)}var m$=class e{#e;constructor(e={}){let t=lX(e),n=Q(t,`store.builder.create`,()=>new KX(e));if(e.preparedInput!=null){let t=UX(e.preparedInput);t==null?n.appendPreparedPaths(HX(e.preparedInput),!1):n.appendPresortedPaths(t,WX(e.preparedInput))}else{let r=e.paths??[];e.presorted===!0?n.appendPaths(r):n.appendPreparedPaths(Q(t,`store.preparePathEntries`,()=>GX(r,e)))}let r=Q(t,`store.builder.finish`,()=>n.finish({skipSubtreeCountPass:!0})),i=Q(t,`store.state.detectAllDirectoriesExpanded`,()=>(e.initialExpansion??`closed`)===`closed`&&n.didMatchAllInitialExpandedPaths());this.#e=Q(t,`store.state.create`,()=>qX(r,i?`open`:e.initialExpansion??`closed`,t)),i&&(this.#e.collapseNewDirectoriesByDefault=!0);let a=i?this.#e.snapshot.directories.size-1:Q(t,`store.state.initializeExpandedPaths`,()=>this.initializeExpandedPaths(e.initialExpandedPaths));i||p$(e)||(e.initialExpansion??`closed`)===`closed`&&a===this.#e.snapshot.directories.size-1||(e.initialExpandedPaths?.length??0)>0&&Q(t,`store.state.checkAllDirectoriesExpanded`,()=>this.hasAllDirectoriesExpanded())?e.useSoaCountSweep===!0?Q(t,`store.state.initializeOpenVisibleCountsViaSoa`,()=>f$(this.#e)):Q(t,`store.state.initializeOpenVisibleCounts`,()=>d$(this.#e)):Q(t,`store.state.recomputeCounts`,()=>HZ(this.#e,this.#e.snapshot.rootId))}static preparePaths(e,t={}){return zX(e,t)}static prepareInput(e,t={}){return BX(e,t)}static preparePresortedInput(e){return VX(e)}list(e){return Q(this.#e.instrumentation,`store.list`,()=>PZ(this.#e,e))}add(e){Q(this.#e.instrumentation,`store.add`,()=>{let t=zQ(this.#e);xZ(this.#e,yZ(this.#e,t,FZ(this.#e,e)))})}remove(e,t={}){Q(this.#e.instrumentation,`store.remove`,()=>{let n=zQ(this.#e);xZ(this.#e,yZ(this.#e,n,IZ(this.#e,e,t)))})}move(e,t,n={}){Q(this.#e.instrumentation,`store.move`,()=>{let r=zQ(this.#e),i=LZ(this.#e,e,t,n);i!=null&&xZ(this.#e,yZ(this.#e,r,i))})}batch(e){bZ(this.#e,()=>{if(typeof e==`function`){e(this);return}for(let t of e)switch(t.type){case`add`:this.add(t.path);break;case`remove`:this.remove(t.path,{recursive:t.recursive});break;case`move`:this.move(t.from,t.to,{collision:t.collision})}})}getVisibleCount(){return Q(this.#e.instrumentation,`store.getVisibleCount`,()=>zQ(this.#e))}getVisibleSlice(e,t){return Q(this.#e.instrumentation,`store.getVisibleSlice`,()=>GQ(this.#e,e,t))}getVisibleRowContext(e){return Q(this.#e.instrumentation,`store.getVisibleRowContext`,()=>WQ(this.#e,e))}getVisibleTreeProjection(){return qQ(this.#e)}getVisibleTreeProjectionData(e){return KQ(this.#e,e)}getVisibleIndex(e){return Q(this.#e.instrumentation,`store.getVisibleIndex`,()=>JQ(this.#e,e))}getPathInfo(e){return Q(this.#e.instrumentation,`store.getPathInfo`,()=>{let t=WZ(this.#e,e);if(t==null)return null;let n=qZ(this.#e,t);return{depth:eX(n),kind:nX(n)?`directory`:`file`,path:BZ(this.#e,t)}})}isExpanded(e){return Q(this.#e.instrumentation,`store.isExpanded`,()=>{let t=this.requireDirectoryNodeId(e),n=qZ(this.#e,t);return ZX(this.#e,t,n)})}expand(e){Q(this.#e.instrumentation,`store.expand`,()=>{let t=zQ(this.#e),n=YQ(this.#e,e);n!=null&&xZ(this.#e,yZ(this.#e,t,n))})}collapse(e){Q(this.#e.instrumentation,`store.collapse`,()=>{let t=zQ(this.#e),n=XQ(this.#e,e);n!=null&&xZ(this.#e,yZ(this.#e,t,n))})}on(e,t){return sZ(this.#e,e,t)}getDirectoryLoadState(e){let t=this.requireDirectoryNodeId(e);return eZ(this.#e,t)}markDirectoryUnloaded(e){Q(this.#e.instrumentation,`store.markDirectoryUnloaded`,()=>{let t=this.requireDirectoryNodeId(e);if(KZ(this.#e,t).childIds.length>0)throw Error(`Cannot mark a directory with known children as unloaded: "${e}"`);let n=zQ(this.#e);nZ(this.#e,t),xZ(this.#e,yZ(this.#e,n,pZ({affectedAncestorIds:UZ(this.#e,t),affectedNodeIds:[t],path:e,projectionChanged:this.isDirectoryProjectionVisible(t)})))})}beginChildLoad(e){return Q(this.#e.instrumentation,`store.beginChildLoad`,()=>{let t=this.requireDirectoryNodeId(e),n=zQ(this.#e),r=tZ(this.#e,t);return xZ(this.#e,yZ(this.#e,n,mZ({affectedAncestorIds:UZ(this.#e,t),affectedNodeIds:[t],attemptId:r.attemptId,path:e,projectionChanged:this.isDirectoryProjectionVisible(t),reused:r.reused}))),r})}applyChildPatch(e,t){return Q(this.#e.instrumentation,`store.applyChildPatch`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null||eZ(this.#e,n)!==`loading`||!iZ(this.#e,n,e.attemptId))return!1;let r=BZ(this.#e,n);this.validateChildPatch(r,t);let i=zQ(this.#e),a=[];for(let e of t.operations){h$(r,e);let t=zQ(this.#e);switch(e.type){case`add`:a.push(yZ(this.#e,t,FZ(this.#e,e.path)));break;case`remove`:a.push(yZ(this.#e,t,IZ(this.#e,e.path,{recursive:e.recursive})));break;case`move`:{let n=LZ(this.#e,e.from,e.to,{collision:e.collision});n!=null&&a.push(yZ(this.#e,t,n));break}}}let o=a.some(e=>e.projectionChanged)||this.isDirectoryProjectionVisible(n);return xZ(this.#e,yZ(this.#e,i,hZ({affectedAncestorIds:UZ(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,childEvents:a,path:BZ(this.#e,n),projectionChanged:o}))),!0})}completeChildLoad(e){return Q(this.#e.instrumentation,`store.completeChildLoad`,()=>{let t=this.resolveActiveDirectoryNodeId(e.nodeId);if(t==null)return!1;let n=zQ(this.#e),r=rZ(this.#e,t,e.attemptId);return xZ(this.#e,yZ(this.#e,n,gZ({affectedAncestorIds:UZ(this.#e,t),affectedNodeIds:[t],attemptId:e.attemptId,path:BZ(this.#e,t),projectionChanged:this.isDirectoryProjectionVisible(t),stale:!r}))),r})}failChildLoad(e,t){return Q(this.#e.instrumentation,`store.failChildLoad`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null)return!1;let r=zQ(this.#e),i=aZ(this.#e,n,e.attemptId,t);return xZ(this.#e,yZ(this.#e,r,_Z({affectedAncestorIds:UZ(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,errorMessage:t,path:BZ(this.#e,n),projectionChanged:this.isDirectoryProjectionVisible(n),stale:!i}))),i})}cleanup(e={}){return Q(this.#e.instrumentation,`store.cleanup`,()=>{if(this.#e.transactionStack.length>0)throw Error(`Cleanup cannot run during an open batch or transaction.`);if(FQ(this.#e))throw Error(`Cleanup cannot run while directory loads are active.`);let t=zQ(this.#e),n=IQ(this.#e,e.mode??`stable`);return xZ(this.#e,yZ(this.#e,t,vZ({...n,affectedAncestorIds:[],affectedNodeIds:[],projectionChanged:n.idsPreserved===!1}))),n})}getNodeCount(){return this.#e.activeNodeCount}initializeExpandedPaths(e){if(e==null||e.length===0)return 0;let t=0,n=[],r=[],i=0,a=null,o=this.#e.snapshot.segmentTable,s=o.valueById,c=this.#e.snapshot.nodes,l=new Map;for(let u of e){a!=null&&u<a&&(a=null,i=0,n.length=0,r.length=0);let e=u.length>0&&u.charCodeAt(u.length-1)===47?u.length-1:u.length;if(e===0){a=u,i=e,n.length=0,r.length=0;continue}let d=0,f=0;if(a!=null){let t=Math.min(e,i),n=!0;for(let e=0;e<t;e+=1){let t=u.charCodeAt(e);if(t!==a.charCodeAt(e)){n=!1;break}t===47&&(d+=1,f=e+1)}n&&(t===i&&e>t&&u.charCodeAt(t)===47?(d+=1,f=t+1):t===e&&i>t&&a.charCodeAt(t)===47&&(d+=1,f=e+1)),d=Math.min(d,r.length)}let p=d===0?this.#e.snapshot.rootId:r[d-1]??this.#e.snapshot.rootId,m=d,h=!0,g=f;for(;g<=e;){let t=u.indexOf(`/`,g),i=t===-1||t>e?e:t,a=u.slice(g,i),f=KZ(this.#e,p).childIds,_=m===d?n[m]??0:0,v=_,y,b=l.get(a)??pX(a);l.set(a,b);let x=(e,t)=>{for(v=e;v<t;v+=1){let e=f[v],t=c[e],n=s[t.nameId];if(n===a)return y=e,!0;let r=hX(SX(o,t.nameId),b);if(r>0||r===0&&n>a)return!1}return!1};if(!x(_,f.length)&&_>0&&x(0,_),y===void 0){h=!1;break}if(!nX(qZ(this.#e,y))){h=!1;break}if(n[m]=v,r[m]=y,p=y,m+=1,i===e)break;g=i+1}if(a=u,i=e,n.length=m,r.length=m,!h){a=null,i=0,n.length=0,r.length=0;continue}for(let e=d;e<m;e+=1){let n=r[e];if(n==null)continue;let i=qZ(this.#e,n);ZX(this.#e,n,i)||(QX(this.#e,n,!0,i),t+=1)}}return t}hasAllDirectoriesExpanded(){for(let e of this.#e.snapshot.directories.keys()){if(e===this.#e.snapshot.rootId)continue;let t=qZ(this.#e,e);if(!ZX(this.#e,e,t))return!1}return!0}requireDirectoryNodeId(e){let t=WZ(this.#e,e);if(t==null)throw Error(`Path does not exist: "${e}"`);if(!nX(qZ(this.#e,t)))throw Error(`Path is not a directory: "${e}"`);return t}resolveActiveDirectoryNodeId(e){try{if(!nX(qZ(this.#e,e)))throw Error(`Node is not a directory: ${String(e)}`);return e}catch{return null}}isDirectoryProjectionVisible(e){let t=e;for(;t!==this.#e.snapshot.rootId;){let e=qZ(this.#e,t).parentId;if(e!==this.#e.snapshot.rootId){let n=qZ(this.#e,e),r=jZ(this.#e,e);if(!ZX(this.#e,e,n)&&r!==t)return!1}t=e}return!0}validateChildPatch(t,n){new e({paths:this.list(t),presorted:!0,sort:this.#e.snapshot.options.sort}).batch(n.operations)}};function h$(e,t){switch(t.type){case`add`:case`remove`:if(!t.path.startsWith(e)||t.path===e)throw Error(`Child patch operation must stay within ${e}: "${t.path}"`);break;case`move`:if(!t.from.startsWith(e)||!t.to.startsWith(e)||t.from===e||t.to===e)throw Error(`Child patch move must stay within ${e}: "${t.from}" -> "${t.to}"`)}}var g$=e=>e.startsWith(`f::`)?e.slice(3):e;function _$(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function v$(e,t){return e===``?t:`${e}/${t}`}function y$({files:e,path:t,isFolder:n,nextBasename:r}){let i=g$(t),a=r.trim();if(a.length===0)return{error:`Name cannot be empty.`};if(a.includes(`/`))return{error:`Name cannot include "/".`};let{parentPath:o,baseName:s}=_$(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=v$(o,a),l=Array(e.length),u=new Set;if(!n){let t=`${c}/`,r=!1;for(let n=0;n<e.length;n++){let a=e[n];if(a!==i&&a.startsWith(t))return{error:`"${c}" already exists.`};let o=a===i?c:a;if(u.has(o))return{error:`"${c}" already exists.`};u.add(o),l[n]=o,a===i&&(r=!0)}return r?{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}:{error:`Could not find the selected file to rename.`}}let d=`${i}/`,f=`${c}/`,p=0;for(let t=0;t<e.length;t++){let n=e[t],r=n===i||n.startsWith(d);if(!r&&(n===c||n.startsWith(f)))return{error:`"${c}" already exists.`};let a=r?`${c}${n.slice(i.length)}`:n;if(u.has(a))return{error:`"${c}" already exists.`};u.add(a),l[t]=a,r&&p++}return p===0?{error:`Could not find the selected folder to rename.`}:{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}}function b$(e){return e.endsWith(`/`)}function x$(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`),r=n<0?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function S$(e){let t=[],n=new Set;for(let r of e)n.has(r)||(n.add(r),t.push(r));let r=new Set;for(let e of t.toSorted((e,t)=>e.length===t.length?e.localeCompare(t):e.length-t.length)){let t=(e.endsWith(`/`)?e.slice(0,-1):e).split(`/`),n=!1;for(let e=0;e<t.length-1;e+=1){let i=`${t.slice(0,e+1).join(`/`)}/`;if(r.has(i)){n=!0;break}}n||r.add(e)}return t.filter(e=>r.has(e))}function C$(e,t){return t.includes(e)?S$(t):[e]}function w$(e,t){return e===t?!0:e==null||t==null?!1:e.kind===t.kind&&e.directoryPath===t.directoryPath&&e.flattenedSegmentPath===t.flattenedSegmentPath&&e.hoveredPath===t.hoveredPath}function T$(e,t){return{draggedPaths:e,target:t}}function E$(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(b$(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function D$(e,t){return t.kind===`root`||t.directoryPath==null?x$(e):t.directoryPath}function O$(e,t){let n=e.map(e=>{let n=D$(e,t);return n===e?null:{from:e,to:n,type:`move`}}).filter(e=>e!=null);return n.length===0?null:{operations:n,result:{draggedPaths:e,operation:n.length===1?`move`:`batch`,target:t}}}function k$(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function A$(e,t,n){let{paths:r,preparedInput:i}=e;if(i==null){if(r==null)throw Error(`FileTree requires paths or preparedInput`);return{paths:r,preparedInput:void 0}}let a=i.paths;if(r==null)return{paths:a,preparedInput:i};if(!k$(m$.preparePaths(r,n==null?{}:{sort:n}),a))throw Error(`FileTree ${t} received paths and preparedInput for different path lists`);return{paths:a,preparedInput:i}}function j$(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}function M$(e,t,n){if(e===t)return n;let r=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(r)?`${n.endsWith(`/`)?n:`${n}/`}${e.slice(r.length)}`:e}function N$(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function P$(e,t,n=!1){if(e==null)return null;switch(t.operation){case`add`:case`expand`:case`collapse`:case`mark-directory-unloaded`:case`begin-child-load`:case`apply-child-patch`:case`complete-child-load`:case`fail-child-load`:case`cleanup`:return e;case`remove`:return N$(e,t.path)?n?e:null:e;case`move`:return M$(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=P$(r,e,n),r==null)return null;return r}}}function F$(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function I$(e){switch(e.operation){case`add`:return{...F$(e),operation:`add`,path:e.path};case`remove`:return{...F$(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...F$(e),from:e.from,operation:`move`,to:e.to}}}function L$(e){return{...F$(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>I$(e)),operation:`batch`}}function R$(e){switch(e.operation){case`add`:case`remove`:case`move`:return I$(e);case`batch`:return L$(e);default:return null}}function z$(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function B$(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=t.split(`/`);return n.slice(0,-1).map((e,t)=>`${n.slice(0,t+1).join(`/`)}/`)}function V$(e){return B$(e).at(-1)??null}function H$(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}function U$(e){return e.endsWith(`/`)}var W$=e=>e.toLowerCase();function G$(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function K$(e){return e.endsWith(`/`)?e.slice(0,-1):e}function q$(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}var J$=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},Y$=Symbol(`FILE_TREE_RENAME_VIEW`),X$=512,Z$=512;function Q$(e){return e===`top`||e===`center`?e:`nearest`}function $$(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=B$(n);for(let e=r.length-1;e>=0;--e){let n=r[e];if(n==null)continue;let i=t(n);if(i!=null)return i}}return 0}function e1(e,t,n){if(e.paths.length===0)return{focusedIndex:-1,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};if(t==null)return{focusedIndex:0,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};let r=n??(t=>e.visibleIndexByPath.get(t)??null);return{focusedIndex:$$(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var t1=class e{static{Object.defineProperty(e.prototype,Y$,{configurable:!0,value(){return{cancel:()=>{this.#q()},commit:()=>{this.#J()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#Y(e)}}},writable:!0})}#e;#t=new Set;#n=new Map;#r=null;#i=null;#a=new Map;#o=new Map;#s=-1;#c=null;#l=!1;#u=e=>-1;#d=new Map;#f=null;#p=null;#m=null;#h=null;#g=null;#_;#v;#y;#b=[];#x=new Int32Array;#S=new Int32Array;#C=void 0;#w=!1;#T=null;#E=``;#D=!1;#O=new Set;#k=[];#A;#j=null;#M=null;#N=null;#P=null;#F=null;#I=null;#L=null;#R=0;#z=null;#B=new Set;#V=0;#H;#U=0;#W=!1;#G=0;#K;constructor(e){let{dragAndDrop:t,fileTreeSearchMode:n,initialSearchQuery:r,initialSelectedPaths:i,renaming:a,onSearchChange:o,paths:s,preparedInput:c,...l}=e,u=A$({paths:s,preparedInput:c},`constructor`,l.sort);this.#e=l,t!=null&&t!==!1&&(this.#r=t===!0?{}:t),this.#w=a!=null&&a!==!1,a!=null&&a!==!1&&a!==!0&&(this.#C=a.canRename,this.#v=a.onError,this.#_=a.onRename),this.#y=o,this.#A=n??`hide-non-matches`,this.#H=this.#le(u.paths,u.preparedInput);let d=i?.map(e=>this.#Ne(e)).filter(e=>e!=null)??[],f=d.at(-1)??null;d.length>0&&(this.#B=new Set(d),this.#z=f,this.#V=1),this.#je(f,!1),r!=null&&this.#Te(r,!1),this.#K=this.#Re()}destroy(){this.#K?.(),this.#K=null,this.#n.clear(),this.#t.clear(),this.#d.clear(),this.#i=null,this.#he()}focusFirstItem(){this.#be().length>0&&this.#Fe(0)}focusLastItem(){this.#G<=0||(this.#Ie(),this.#Fe(this.#G-1))}focusNextItem(){this.#Ae(1)}focusParentItem(){if(this.#c==null)return;let e=V$(this.#c);if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t)}focusPath(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;this.#Ie();let n=this.#Z(t);n>=0&&this.#Fe(n)}scrollToPath(e,t){let n=this.#H.getPathInfo(e)?.path??null;if(n==null)return;this.#Ie();let r=this.#xe(n);r<0||this.#Me(r)!=null&&(t?.focus!==!1&&this.#Fe(r,!1),this.#L={id:this.#R+=1,offset:Q$(t?.offset),visibleIndex:r},this.#De())}focusMountedPathFromInput(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;let n=this.#Z(t);n>=0&&this.#Fe(n)}focusNearestPath(e){let t=this.resolveNearestVisiblePath(e);if(t==null)return null;let n=this.#Z(t);return n>=0?(this.#Fe(n),this.#be()[n]??t):null}focusPreviousItem(){this.#Ae(-1)}getFocusedIndex(){return this.#s}getFocusedItem(){return this.#c==null?null:this.#Q(this.#c)}getFocusedPath(){return this.#c}getScrollRequest(){return this.#L}clearScrollRequest(e){this.#L?.id===e&&(this.#L=null)}resolveNearestVisiblePath(e){let t=this.#be();if(this.#G===0)return null;if(e==null)return this.#c??t[0]??null;let n=this.#H.getPathInfo(e)?.path??e,r=this.#Z(n);return r>=0?t[r]??n:this.#X(n)??this.#c??t[0]??null}getSelectedPaths(){return[...this.#B]}getSelectionVersion(){return this.#V}getVisibleCount(){return this.#G}getVisibleRows(e,t){if(t<e||this.#G===0)return[];let n=Math.max(0,e),r=Math.min(this.#G-1,t);if(r<n)return[];let i=r-n+1;if(this.#F==null&&!this.#l&&r>=this.#b.length&&i<=Z$){let e=[];for(let t=n;t<=r;t+=1){let n=this.#H.getVisibleRowContext(t);if(n==null)break;e.push(this.#ee(n))}return e}if(!this.#l&&r>=this.#b.length&&this.#Ie(),this.#F!=null){let e=Array.from({length:r-n+1},(e,t)=>this.#Se(n+t)),t=new Map,i=e[0]??-1,a=i;for(let n=1;n<=e.length;n+=1){let r=e[n];if(r!=null&&r===a+1){a=r;continue}if(i>=0&&this.#H.getVisibleSlice(i,a).forEach((e,n)=>{t.set(i+n,e)}),r==null){i=-1,a=-1;continue}i=r,a=r}return Array.from({length:r-n+1},(e,r)=>{let i=n+r,a=this.#Se(i),o=t.get(a),s=this.#b[a];if(o==null||s==null)throw Error(`Missing projection row for filtered visible index ${String(i)}`);return this.#$(o,i,a,{ancestorPaths:this.#re(a),path:s})})}return this.#H.getVisibleSlice(n,r).map((e,t)=>{let r=n+t,i=this.#b[r];if(i==null)throw Error(`Missing projection path for visible index ${String(r)}`);return this.#$(e,r,r,{ancestorPaths:this.#re(r),path:i})})}getStickyRowCandidates(e,t){if(this.#F!=null)return null;if(this.#G===0||e<=0||t<=0)return[];let n=[];for(let r=0;r<this.#G;r+=1){let i=e+r*t,a=Math.min(this.#G-1,Math.floor(i/t)),o=this.#te(a,r)??(a>0?this.#te(a-1,r):void 0);if(o==null)break;n.push({row:this.#ee(o),subtreeEndIndex:o.subtreeEndIndex})}return n}getItem(e){let t=this.#H.getPathInfo(e);return t==null?null:this.#Q(t.path,t)}resolveMountedDirectoryPathFromInput(e){let t=this.#H.getPathInfo(e);return t?.kind===`directory`?t.path:null}toggleMountedDirectoryFromInput(e){let t=this.resolveMountedDirectoryPathFromInput(e);t!=null&&this.#ze(t)}selectAllVisiblePaths(){this.#Ie();let e=[...this.#be()];this.#ae(e,this.#c??this.#z)}selectOnlyPath(e){let t=this.#Ne(e);t!=null&&this.#ae([t],t)}selectOnlyMountedPathFromInput(e){this.#ae([e],e)}selectPath(e){let t=this.#Ne(e);t==null||this.#B.has(t)||this.#ae([...this.#B,t])}deselectPath(e){let t=this.#Ne(e);t==null||!this.#B.has(t)||this.#ae([...this.#B].filter(e=>e!==t))}toggleFocusedSelection(){this.#c!=null&&this.togglePathSelectionFromInput(this.#c)}togglePathSelection(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.deselectPath(t);return}this.selectPath(t)}}togglePathSelectionFromInput(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.#ae([...this.#B].filter(e=>e!==t),t);return}this.#ae([...this.#B,t],t)}}selectPathRange(e,t){let n=this.#Ne(e);if(n==null)return;this.#Ie();let r=this.#z,i=r==null?-1:this.#Ce(r),a=this.#Ce(n);if(i===-1||a===-1){let e=t?[...this.#B,n]:[n];this.#ae(e,n);return}let[o,s]=i<=a?[i,a]:[a,i],c=this.#be().slice(o,s+1),l=t?[...this.#B,...c]:c;this.#ae(l,r)}extendSelectionFromFocused(e){if(this.#c==null)return;let t=this.#s;if(t===-1)return;let n=Math.min(this.#G-1,Math.max(0,t+e));if(n===t)return;!this.#l&&n>=this.#b.length&&this.#Ie();let r=this.#be(),i=r[t]??null,a=r[n]??null;if(i==null||a==null)return;let o=new Set(this.#B);o.has(i)&&o.has(a)?o.delete(i):o.add(a),this.#ae([...o],this.#z??i,!1),this.#Fe(n)}getDragAndDropConfig(){return this.#r}isDragAndDropEnabled(){return this.#r!=null}getDragSession(){return this.#i==null?null:{draggedPaths:[...this.#i.draggedPaths],primaryPath:this.#i.primaryPath,target:this.#i.target==null?null:{...this.#i.target}}}startDrag(e){if(this.#r==null)return!1;let t=this.#Ne(e);if(t==null||this.#M!=null&&this.#M.length>0)return!1;let n=this.getSelectedPaths(),r=C$(t,n);return this.#r.canDrag?.(r)!==!1&&(n.includes(t)||this.#ae([t],t,!1),this.#Pe(t),this.#i={draggedPaths:r,primaryPath:t,target:null},this.#De(),!0)}setDragTarget(e){let t=this.#i;if(t==null)return;let n=e;if(n!=null){let e=T$(t.draggedPaths,n);(E$(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}w$(t.target,n)||(this.#i={...t,target:n},this.#De())}cancelDrag(){this.#i!=null&&(this.#i=null,this.#De())}completeDrag(){let e=this.#i;if(e==null)return!1;this.#i=null;let t=e.target==null?null:{...e.target};if(t==null)return this.#De(),!1;let n=T$(e.draggedPaths,t);if(E$(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#De(),!1;let r=O$(e.draggedPaths,t);if(r==null)return this.#De(),!1;try{if(r.operations.length===1){let e=r.operations[0];if(e==null||e.type!==`move`)throw Error(`Expected a single move operation for one-item drops`);this.#H.move(e.from,e.to,{collision:e.collision})}else this.#ce(r.operations),this.#H.batch(r.operations)}catch(e){return this.#De(),this.#r?.onDropError?.(e instanceof Error?e.message:String(e),n),!1}return this.#r?.onDropComplete?.(r.result),!0}subscribe(e){return this.#t.add(e),e(),()=>{this.#t.delete(e)}}add(e){this.#H.add(e)}remove(e,t={}){this.#H.remove(e,t)}move(e,t,n={}){this.#H.move(e,t,n)}batch(e){this.#H.batch(e)}onMutation(e,t){let n=e,r=t,i=this.#n.get(n);return i??(i=new Set,this.#n.set(n,i)),i.add(r),()=>{let e=this.#n.get(n);e?.delete(r),e?.size===0&&this.#n.delete(n)}}setSearch(e){this.#Te(e,!0)}openSearch(e=``){this.#Te(e,!0)}closeSearch(){this.#Te(null,!0)}isSearchOpen(){return this.#M!==null}getSearchValue(){return this.#M??``}getSearchMatchingPaths(){return this.#k}focusNextSearchMatch(){this.#we(1)}focusPreviousSearchMatch(){this.#we(-1)}startRenaming(e=this.#c??``,t={}){if(!this.#w)return!1;let n=this.#H.getPathInfo(e);if(n==null)return!1;let r=n.path,i=U$(r),a=K$(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of B$(r))this.#H.isExpanded(e)||this.#H.expand(e);return this.#ae([r],r,!1),this.#M!=null&&(this.#Te(null,!1),this.#y?.(this.#M)),this.#Pe(r),this.#T=r,this.#E=G$(r),this.#D=t.removeIfCanceled??!1,this.#De(),!0}#q(){if(this.#T==null)return;let e=this.#T,t=this.#D;if(this.#T=null,this.#E=``,this.#D=!1,t){this.remove(e,U$(e)?{recursive:!0}:void 0);return}this.#Pe(e),this.#De()}#J(){let e=this.#T;if(e==null)return;if(this.#D&&this.#E.trim().length===0){this.#T=null,this.#E=``,this.#D=!1,this.remove(e,U$(e)?{recursive:!0}:void 0);return}let t=U$(e),n=y$({files:this.#H.list(),isFolder:t,nextBasename:this.#E,path:K$(e)});if(this.#T=null,this.#E=``,this.#D=!1,`error`in n){this.#Pe(e),this.#v?.(n.error),this.#De();return}if(n.sourcePath===n.destinationPath){this.#Pe(e),this.#De();return}this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(q$(n.sourcePath,t),q$(n.destinationPath,t))}#Y(e){this.#T!=null&&this.#E!==e&&(this.#E=e,this.#De())}resetPaths(e,t={}){let n=!Array.isArray(e),r=n?void 0:e,i=n?e:t,a=this.#H.list().length,o=this.#G,s=A$({paths:r,preparedInput:i.preparedInput},`resetPaths`,this.#e.sort),c=this.#le(s.paths,s.preparedInput,i.initialExpandedPaths),l=this.#c,u=this.#T,d=this.getSelectedPaths(),f=this.#z;this.#K?.(),this.#H=c,this.#d.clear(),this.#he();let p=d.map(e=>c.getPathInfo(e)?.path??null).filter(e=>e!=null),m=!z$(this.#B,p);this.#B=new Set(p),m&&(this.#V+=1),this.#z=f==null?null:c.getPathInfo(f)?.path??null,this.#T=u==null?null:c.getPathInfo(u)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#je(l,l!=null||p.length>0||this.#z!=null),this.#K=this.#Re(),this.#De(),this.#Oe({canonicalChanged:!0,operation:`reset`,pathCountAfter:s.paths.length,pathCountBefore:a,projectionChanged:!0,usedPreparedInput:i.preparedInput!=null,visibleCountDelta:this.#G-o})}#X(e){this.#Ie();let t=V$(e),n=H$(e,t),r=null,i=null;for(let e of this.#be()){if(V$(e)!==t)continue;let a=H$(e,t);if(a<n){r=e;continue}if(a>n){i=e;break}}return r??i}#Z(e){let t=this.#Ce(e);if(t!==-1)return t;let n=B$(e);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t==null)continue;let r=this.#Ce(t);if(r!==-1)return r}return this.#be().length>0?0:-1}#Q(e,t){let n=this.#d.get(e);if(n!=null)return n;let r=t??this.#H.getPathInfo(e);if(r==null)return null;let i=r.kind===`directory`?this.#oe(r.path):this.#se(r.path);return this.#d.set(r.path,i),i}#$(e,t,n,r){return{ancestorPaths:r.ancestorPaths,depth:e.depth,flattenedSegments:e.flattenedSegments?.map(e=>({isTerminal:e.isTerminal,name:e.name,path:e.path})),hasChildren:e.hasChildren,index:t,isExpanded:e.isExpanded,isFlattened:e.isFlattened,isFocused:r.path===this.#c,isSelected:this.#B.has(r.path),kind:e.kind,level:e.depth,name:e.name,path:r.path,posInSet:r.posInSet??this.#x[n]??0,setSize:r.setSize??this.#S[n]??0}}#ee(e){return this.#$(e.row,e.index,e.index,{ancestorPaths:e.ancestorPaths,path:e.row.path,posInSet:e.posInSet,setSize:e.setSize})}#te(e,t){let n=this.#H.getVisibleRowContext(e);return n==null?void 0:n.ancestorRows[t]??(t===n.ancestorRows.length&&n.row.kind===`directory`&&n.row.isExpanded?n:void 0)}#ne(e){let t=this.#a.get(e);if(t!=null)return t;let n=this.#u(e),r=n<0?[]:[...this.#ne(n),n];return this.#a.set(e,r),r}#re(e){let t=this.#o.get(e);if(t!=null)return t;let n=this.#ne(e).map(e=>this.#b[e]??``).filter(e=>e!==``);return this.#o.set(e,n),n}#ie(e){this.#H.collapse(e)}#ae(e,t=this.#z,n=!0){let r=[...new Set(e)],i=!z$(this.#B,r),a=this.#z!==t;!i&&!a||(this.#B=new Set(r),this.#z=t,i&&(this.#V+=1),n&&this.#De())}#oe(e){return{collapse:()=>{this.#ie(e)},deselect:()=>{this.deselectPath(e)},expand:()=>{this.#ke(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!0,isExpanded:()=>this.#H.isExpanded(e),isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)},toggle:()=>{this.#ze(e)}}}#se(e){return{deselect:()=>{this.deselectPath(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!1,isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)}}}#ce(e){let t=this.#H.list();this.#le(t).batch(e)}#le(e,t,n){return new m$({...this.#e,paths:e,preparedInput:t??void 0,...n===void 0?{}:{initialExpandedPaths:n}})}#ue(){return this.#h??=this.#H.list(),this.#h}#de(){if(this.#m!=null)return this.#m;let e=new Set;for(let t of this.#ue()){e.add(t);for(let n of B$(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#fe(){return this.#g??=this.#ue().map(W$),this.#g}#pe(){return this.#f??=this.#de().filter(e=>e.endsWith(`/`)),this.#f}#me(){return this.#p??=this.#pe().map(W$),this.#p}#he(){this.#f=null,this.#p=null,this.#m=null,this.#h=null,this.#g=null}#ge(){return this.#pe().filter(e=>this.#H.isExpanded(e))}#_e(e){let t=new Set(this.#j??[]);if(e)for(let e of this.#B)for(let n of B$(e))t.add(n);this.#ve(t)}#ve(e){this.#W=!0;try{for(let t of this.#pe()){let n=e.has(t),r=this.#H.isExpanded(t);n&&!r?this.#H.expand(t):!n&&r&&this.#H.collapse(t)}}finally{this.#W=!1}}#ye(){if(this.#M==null||this.#M.length===0){this.#k=[],this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let e=this.#b;if(this.#k=e.filter(e=>this.#O.has(e)),this.#A!==`hide-non-matches`||this.#O.size===0){this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let t=[],n=[],r=new Map;for(let[i,a]of e.entries())this.#N?.has(a)===!0&&(r.set(a,n.length),t.push(i),n.push(a));this.#F=t,this.#I=n,this.#P=r,this.#G=n.length}#be(){return this.#I??this.#b}#xe(e){return this.#I==null?this.#H.getVisibleIndex(e)??-1:this.#P?.get(e)??-1}#Se(e){return this.#F?.[e]??e}#Ce(e){return this.#P?.get(e)??this.#H.getVisibleIndex(e)??-1}#we(e){let t=this.#k;if(t.length===0)return;let n=this.#c,r=n==null?-1:t.indexOf(n),i=t[r<0?e>0?0:t.length-1:Math.min(t.length-1,Math.max(0,r+e))];i!=null&&this.focusPath(i)}#Te(e,t){let n=e==null?null:J$(e),r=this.#M;if(r!==n){if(r==null&&n!=null&&(this.#j=this.#ge()),this.#M=n,n==null)this.#_e(!0),this.#j=null,this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else if(n.length===0)this.#_e(!1),this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else{let e=this.#Ee();this.#je(e,!0)}t&&(this.#y?.(this.#M),this.#De())}}#Ee(){if(this.#M==null||this.#M.length===0)return this.#O.clear(),this.#c;let e=this.#M,t=this.#ue(),n=this.#fe(),r=[],i=new Set,a=null;for(let o=0;o<t.length;o+=1){if(!n[o].includes(e))continue;let s=t[o];r.push(s),i.add(s),a??=s}let o=this.#pe(),s=this.#me();for(let t=0;t<o.length;t+=1){if(!s[t].includes(e))continue;let n=o[t];i.has(n)||(r.push(n),i.add(n),a??=n)}this.#O=i;let c=this.#A===`hide-non-matches`&&r.length>0?new Set:null;this.#N=c;let l=this.#A===`expand-matches`?new Set(this.#j??[]):new Set;for(let e of r){c?.add(e),e.endsWith(`/`)&&l.add(e);for(let t of B$(e))l.add(t),c?.add(t)}return this.#ve(l),a??this.#c}#De(){for(let e of this.#t)e()}#Oe(e){this.#n.get(e.operation)?.forEach(t=>{t(e)}),this.#n.get(`*`)?.forEach(t=>{t(e)})}#ke(e){for(let t of B$(e))this.#H.isExpanded(t)||this.#H.expand(t);this.#H.isExpanded(e)||this.#H.expand(e)}#Ae(e){let t=this.#G;if(t===0)return;let n=this.#s===-1?0:this.#s,r=Math.min(t-1,Math.max(0,n+e));(r!==n||this.#s===-1)&&(!this.#l&&this.#F==null&&r>=this.#b.length&&this.#Ie(),this.#Fe(r))}#je(e,t=!0){let n=this.#H.getVisibleCount();this.#U=n;let r=e1(this.#H.getVisibleTreeProjectionData(t?void 0:Math.min(n,X$)),e,t?e=>this.#H.getVisibleIndex(e):void 0);this.#a.clear(),this.#o.clear(),this.#l=r.paths.length>=n,this.#u=r.getParentIndex,this.#b=r.paths,this.#x=r.posInSetByIndex,this.#S=r.setSizeByIndex,this.#ye(),this.#s=e==null?this.#be().length>0?0:-1:this.#Z(e),this.#c=this.#s<0?null:this.#Me(this.#s)}#Me(e){return this.#be()[e]??(this.#F==null?this.#H.getVisibleRowContext(e)?.row.path??null:null)}#Ne(e){return this.#H.getPathInfo(e)?.path??null}#Pe(e){if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t,!1)}#Fe(e,t=!0){let n=this.#Me(e);n!=null&&(this.#s!==e||this.#c!==n)&&(this.#s=e,this.#c=n,t&&this.#De())}#Ie(){this.#l||this.#je(this.#c,!0)}#Le(e){let t=P$(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=P$(this.#c,e,!0),r=[...this.#B].map(t=>P$(t,e)).filter(e=>e!=null).map(e=>this.#H.getPathInfo(e)?.path??null).filter(e=>e!=null),i=P$(this.#z,e),a=i==null?null:this.#H.getPathInfo(i)?.path??null,o=[...new Set(r)];return z$(this.#B,o)||(this.#B=new Set(o),this.#V+=1),this.#z=a,n}#Re(){return this.#H.on(`*`,e=>{if(this.#W)return;e.canonicalChanged&&(this.#d.clear(),this.#he()),this.#i!=null&&j$(e)&&(this.#i=null);let t=j$(e)?this.#Le(e):this.#c,n=this.#M!=null&&this.#M.length>0?this.#Ee():this.#M===``?this.#c:t,r=this.#M!=null||e.operation!==`expand`&&e.operation!==`collapse`;this.#je(n,r),this.#De();let i=R$(e);i!=null&&this.#Oe(i)})}#ze(e){if(this.#H.isExpanded(e)){this.#ie(e);return}this.#ke(e)}},n1=e=>{if(e==null||e.length===0)return`0`;let t=`${e.length}`;for(let n of e)t+=`\0${n.path}\0${n.status}`;return t};function r1(e){let t=e.endsWith(`/`),n=``,r=-1;for(let t=0;t<=e.length;t+=1){if(e[t]!==`/`&&t!==e.length){r===-1&&(r=t);continue}r!==-1&&(n!==``&&(n+=`/`),n+=e.slice(r,t),r=-1)}return n===``?null:{isDirectory:t,path:n}}function i1(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=[],r=0;for(;;){let e=t.indexOf(`/`,r);if(e===-1)break;n.push(t.slice(0,e+1)),r=e+1}return n}function a1(e,t){return t?`${e}/`:e}function o1(e,t=null){let n=n1(e==null?void 0:[...e]);if(n===`0`)return null;if(t?.signature===n)return t;let r=new Map,i=new Set,a=new Set,o=new Map;for(let t of e??[]){let e=c1(t);e!=null&&d1({canonicalPath:e.canonicalPath,changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,isDirectory:e.isDirectory,status:t.status,statusByPath:r})}return r.size===0?null:{changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}function s1(e,t){let n=t?.remove??[],r=t?.set??[];if(n.length===0&&r.length===0)return e;let i=new Map(e?.statusByPath),a=new Set(e?.directoriesWithChanges),o=new Set(e?.ignoredDirectoryPaths),s=new Map(e?.changeCountByDirectoryPath),c=!1;for(let e of n){let t=l1(e);t!=null&&(c=u1({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,statusByPath:i})||c)}for(let e of r){let t=c1(e);t!=null&&(c=d1({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,isDirectory:t.isDirectory,status:e.status,statusByPath:i})||c)}return c?i.size===0?null:{changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,signature:m1(i),statusByPath:i}:e}function c1(e){return l1(e.path)}function l1(e){let t=r1(e);if(t!=null)return{canonicalPath:a1(t.path,t.isDirectory),isDirectory:t.isDirectory}}function u1({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,statusByPath:i}){let a=i.get(e);return a!=null&&(i.delete(e),a===`ignored`&&e.endsWith(`/`)&&r.delete(e),p1(t,n,e),!0)}function d1({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,isDirectory:i,status:a,statusByPath:o}){let s=o.get(e);return s!==a&&(s??f1(t,n,e),o.set(e,a),a===`ignored`&&i?r.add(e):i&&r.delete(e),!0)}function f1(e,t,n){for(let r of i1(n))e.set(r,(e.get(r)??0)+1),t.add(r)}function p1(e,t,n){for(let r of i1(n)){let n=(e.get(r)??0)-1;n>0?e.set(r,n):(e.delete(r),t.delete(r))}}function m1(e){let t=`${e.size}`;for(let[n,r]of e)t+=`\0${n}\0${r}`;return t}var h1=e=>e.trim().toLowerCase(),g1=e=>e.split(`/`).at(-1)??e,_1=e=>{let t=e.toLowerCase().split(`.`),n=[];for(let e=1;e<t.length;e+=1)n.push(t.slice(e).join(`.`));return n};function v1(e,t){return typeof e==`string`?{name:e,remappedFrom:t}:{...e,remappedFrom:t}}function y1(e){let t=yY(e),n=t.remap,r=new Map;for(let[e,n]of Object.entries(t.byFileName??{}))r.set(e.toLowerCase(),n);let i=new Map;for(let[e,n]of Object.entries(t.byFileExtension??{}))i.set(h1(e),n);let a=Object.entries(t.byFileNameContains??{}).map(([e,t])=>[e.toLowerCase(),t]);return{resolveIcon:(e,o)=>{if(e===`file-tree-icon-file`&&o!=null){let s=g1(o),c=s.toLowerCase(),l=r.get(c);if(l!=null)return v1(l,e);for(let[t,n]of a)if(c.includes(t))return v1(n,e);let u=_1(s);for(let t of u){let n=i.get(t);if(n!=null)return v1(n,e)}let d=_Y(t.set,s,u);if(d!=null&&t.set!==`none`){if(d==="default"){let t=n?.[e];if(t!=null)return v1(t,e)}return{name:hY(d),remappedFrom:e,token:d}}}let s=n?.[e];return s==null?{name:e}:v1(s,e)}}}var b1,x1,S1,C1,w1,T1,E1,D1,O1,k1,A1={},j1=[],M1=Array.isArray,N1=j1.slice,P1=Object.assign;function F1(e){e&&e.parentNode&&e.remove()}function I1(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`&&typeof e!=`function`?i=t[a]:o[a]=t[a];return arguments.length>2&&(o.children=arguments.length>3?N1.call(arguments,2):n),L1(e,o,r,i,null)}function L1(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++x1,__i:-1,__u:0};return i==null&&b1.vnode!=null&&b1.vnode(a),a}function R1(e){return e.children}function z1(e,t){this.props=e,this.context=t,this.__g=0}function B1(e,t){if(t==null)return e.__?B1(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?B1(e):null}function V1(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=n.__e;break}return V1(e)}}function H1(e){(8&e.__g||!(e.__g|=8)||!S1.push(e)||w1++)&&C1==b1.debounceRendering||((C1=b1.debounceRendering)||queueMicrotask)(U1)}function U1(){for(var e,t,n,r,i,a,o,s,c=1;S1.length;)S1.length>c&&S1.sort(T1),e=S1.shift(),c=S1.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=P1({},r)).__v=r.__v+1,b1.vnode&&b1.vnode(n),Z1(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??B1(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,$1(a,n,o),n.__e!=i&&V1(n)));w1=0}function W1(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||j1,b=t.length;for(c=G1(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?A1:y[m.__i]||A1,m.__i=f,_=Z1(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&n0(p.ref,null,m),u.push(m.ref,m.__c||h,m)),g==null&&h!=null&&(g=h),(v=!!(4&m.__u))||p.__k===m.__k?c=K1(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function G1(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(c=a+f,(o=e.__k[a]=typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?L1(null,o,null,null,null):M1(o)?L1(R1,{children:o},null,null,null):o.constructor==null&&o.__b>0?L1(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,s=null,(l=o.__i=q1(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=B1(s)),r0(s,s));return r}function K1(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=K1(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=B1(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function q1(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&e.key==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function J1(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function Y1(e,t,n,r,i){var a;n:if(t==`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||J1(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||J1(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(E1,`$1`)),(t=t.slice(2))[0].toLowerCase()!=t[0]&&(t=t.toLowerCase()),e.__l||={},e.__l[t+a]=n,n?r?n.l=r.l:(n.l=D1,e.addEventListener(t,a?k1:O1,a)):e.removeEventListener(t,a?k1:O1,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function X1(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=D1++;else if(t.u<n.l)return;return n(b1.event?b1.event(t):t)}}}function Z1(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,ee,j=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),n.__c.__z&&(s=t.__e=n.__e=(a=n.__c.__z)[0],n.__c.__z=null)),(d=b1.__b)&&d(t);n:if(typeof j==`function`)try{if(v=t.props,y=`prototype`in j&&j.prototype.render,b=(d=j.contextType)&&r[d.__c],x=d?b?b.props.value:d.__:r,n.__c?2&(f=t.__c=n.__c).__g&&(f.__g|=1,_=!0):(y?t.__c=f=new j(v,x):(t.__c=f=new z1(v,x),f.constructor=j,f.render=i0),b&&b.sub(f),f.props=v,f.state||(f.state={}),f.context=x,f.__n=r,p=!0,f.__g|=8,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&j.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=P1({},f.__s)),P1(f.__s,j.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&j.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&j.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),!(4&f.__g)&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),S=0;S<f._sb.length;S++)f.__h.push(f._sb[S]);f._sb=[],f.__h.length&&o.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__g&=-5,C=b1.__r,w=0,y){for(f.state=f.__s,f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),T=0;T<f._sb.length;T++)f.__h.push(f._sb[T]);f._sb=[]}else do f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(8&f.__g&&++w<25);f.state=f.__s,f.getChildContext!=null&&(r=P1({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),E=d,d!=null&&d.type===R1&&d.key==null&&(E=e0(d.props.children)),s=W1(e,M1(E)?E:[E],t,n,r,i,a,o,s,c,l,u),t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__g&=-4)}catch(e){if(t.__v=null,c||a!=null){if(e.then){for(D=0,O=!1,t.__u|=c?160:128,t.__c.__z=[],k=0;k<a.length;k++)(A=a[k])==null||O||(A.nodeType==8&&A.data==`$s`?(D>0&&t.__c.__z.push(A),D++,a[k]=null):A.nodeType==8&&A.data==`/$s`?(--D>0&&t.__c.__z.push(A),O=D===0,s=a[k],a[k]=null):D>0&&(t.__c.__z.push(A),a[k]=null));if(!O){for(;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__c.__z=[s]}t.__e=s}else{for(ee=a.length;ee--;)F1(a[ee]);Q1(t)}}else t.__e=n.__e,t.__k=n.__k,e.then||Q1(t);b1.__e(e,t,n)}else s=t.__e=t0(n.__e,t,n,r,i,a,o,c,l,u);return(d=b1.diffed)&&d(t),128&t.__u?void 0:s}function Q1(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(Q1)}function $1(e,t,n){for(var r=0;r<n.length;r++)n0(n[r],n[++r],n[++r]);b1.__c&&b1.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){b1.__e(e,t.__v)}})}function e0(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:M1(e)?e.map(e0):P1({},e)}function t0(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v=n.props,y=t.props,b=t.type;if(b==`svg`?i=`http://www.w3.org/2000/svg`:b==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||=`http://www.w3.org/1999/xhtml`,a!=null){for(u=0;u<a.length;u++)if((m=a[u])&&`setAttribute`in m==!!b&&(b?m.localName==b:m.nodeType==3)){e=m,a[u]=null;break}}if(e==null){if(b==null)return l.createTextNode(y);e=l.createElementNS(i,b,y.is&&y),s&&=(b1.__m&&b1.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=N1.call(e.childNodes),v=n.props||A1,!s&&a!=null)for(v={},u=0;u<e.attributes.length;u++)v[(m=e.attributes[u]).name]=m.value;for(u in v)if(m=v[u],u!=`children`){if(u==`dangerouslySetInnerHTML`)f=m;else if(!(u in y)){if(u==`value`&&`defaultValue`in y||u==`checked`&&`defaultChecked`in y)continue;Y1(e,u,null,m,i)}}for(u in _=1&n.__u,y)m=y[u],u==`children`?p=m:u==`dangerouslySetInnerHTML`?d=m:u==`value`?h=m:u==`checked`?g=m:s&&typeof m!=`function`||v[u]===m&&!_||Y1(e,u,m,v[u],i);if(d)s||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(f&&(e.innerHTML=``),W1(b==`template`?e.content:e,M1(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&B1(n,0),s,c,l),a!=null)for(u=a.length;u--;)F1(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||Y1(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&Y1(e,u,g,v[u],i))}return e}function n0(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){b1.__e(e,n)}}function r0(e,t,n){var r,i;if(b1.unmount&&b1.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||n0(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){b1.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&r0(r[i],t,n||typeof e.type!=`function`);n||F1(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function i0(e,t,n){return this.constructor(e,n)}function a0(e,t){var n,r,i,a;t==document&&(t=document.documentElement),b1.__&&b1.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=I1(R1,null,[e]),i=[],a=[],Z1(t,e,r||A1,A1,t.namespaceURI,r?null:t.firstChild?N1.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),$1(i,e,a)}function o0(e,t){e.__u|=32,a0(e,t)}b1={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!(1&i.__g)){i.__g|=4;try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=8&i.__g),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=8&i.__g),o)return void(i.__g|=2)}catch(t){e=t}}throw w1=0,e}},x1=0,z1.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=P1({},this.state);typeof e==`function`&&(e=e(P1({},n),this.props)),e&&P1(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),H1(this))},z1.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),H1(this))},z1.prototype.render=R1,S1=[],w1=0,T1=function(e,t){return e.__v.__b-t.__v.__b},E1=/(PointerCapture)$|Capture$/i,D1=0,O1=X1(!1),k1=X1(!0);var s0=0;Array.isArray;function $(e,t,n,r,i,a){t||={};var o,s,c=t;if(`ref`in c&&typeof e!=`function`)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--s0,__i:-1,__u:0,__source:i,__self:a};return b1.vnode&&b1.vnode(l),l}var c0=16,l0=16,u0={};function d0({name:e,remappedFrom:t,token:n,width:r,height:i,viewBox:a,label:o,alignCapitals:s=!1}){"use no memo";let c=`#${e.replace(/^#/,``)}`,{width:l,height:u,viewBox:d}=u0[e]??{width:c0,height:l0},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return $(`svg`,{"data-icon-name":t??e,"data-icon-token":n,"data-align-capitals":s,...o==null?{"aria-hidden":!0}:{"aria-label":o,role:`img`},viewBox:m,width:f,height:p,children:$(`use`,{href:c})})}var f0=e=>e!==void 0&&/\s/.test(e),p0=(e,t)=>{let n=t=>f0(e[t-1])||f0(e[t]);if(!n(t))return t;for(let r=1;r<e.length;r++){let i=t-r;if(i>0&&!n(i))return i;let a=t+r;if(a<e.length&&!n(a))return a}return t},m0=e=>p0(e,Math.ceil(e.length/2)),h0=e=>{if(e.length<2)return[e,``];let t=m0(e);return[e.slice(0,t),e.slice(t)]},g0=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:m0(e);return[e.slice(0,r),e.slice(r)]},_0=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`/`)+1,n=e.length-t>25,r=t>=1&&!n?t:Math.ceil(e.length/2);return[e.slice(0,r),e.slice(r)]},v0=(e,{splitIndex:t}={})=>{if(typeof t!=`number`){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}return[e.slice(0,t),e.slice(t)]},y0=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=e.length-t;return[e.slice(0,n),e.slice(n)]},b0=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=t;return[e.slice(0,n),e.slice(n)]};function x0({children:e,marker:t,variant:n=`default`}){"use no memo";return $(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:$(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?$(`span`,{"data-truncate-fade":!0}):t})})}function S0(e){"use no memo";let{mode:t,children:n}=e;return $(`div`,{children:[$(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?$(`span`,{children:n}):n}),$(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?$(`span`,{children:n}):n})]})}function C0({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=$(S0,{mode:t,children:e},`content`),o=$(x0,{marker:n,mode:t,variant:r},`marker`),s=$(`div`,{"data-truncate-fill":!0},`fill`);return $(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:$(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function w0({children:e,...t}){"use no memo";return $(C0,{mode:`truncate`,...t,children:e})}function T0({children:e,...t}){"use no memo";return $(C0,{mode:`fruncate`,...t,children:e})}function E0({children:e,contents:t,priority:n=`end`,split:r=`center`,minimumLength:i=12,className:a,style:o,...s}){"use no memo";let c=null,l=null;if(Array.isArray(t)){if(t.length!==2)return console.error(`MiddleTruncate: contents must be an array of two items`),null;c=$(w0,{...s,children:t[0]}),l=$(T0,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return $(`div`,{className:a,style:o});if(e.length<i)return $(n===`end`?T0:w0,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=h0:r===`extension`?t=g0:r===`leaf-path`&&(t=_0);else if(typeof r==`number`)t=v0,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=y0:e===`first`&&(t=b0)}else typeof r==`function`&&(t=r);t??=h0;let[f,p]=t(e,{priority:n,variant:s.variant,splitIndex:typeof u==`number`?u:void 0,splitOffset:typeof d==`number`?d:void 0}),m=f.length>=p.length,h=n===`equal`&&!m,g=n===`equal`&&m,_={},v={};h&&(_.marker=``),g&&(v.marker=``),c=$(w0,{...s,..._,children:f}),l=$(T0,{...s,...v,children:p})}return $(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[$(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),$(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var D0={endIndex:-1,startIndex:-1};function O0(e,t,n){return Math.min(Math.max(e,t),n)}function k0(e,t){return e<0||t<e?D0:{endIndex:t,startIndex:e}}function A0(e){return e.startIndex<0||e.endIndex<e.startIndex}function j0(e,t){return A0(e)?0:(e.endIndex-e.startIndex+1)*t}function M0(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function N0(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function P0(e){let t=new Map;return e.forEach((e,n)=>{if(e.kind!==`directory`||!e.isExpanded)return;let r=e.ancestorPaths.length,i=t.get(r);if(i==null){t.set(r,[n]);return}i.push(n)}),t}function F0(e,t){let n=0,r=e.length-1,i=-1;for(;n<=r;){let a=Math.floor((n+r)/2),o=e[a];if(o==null)break;if(o<=t){i=a,n=a+1;continue}r=a-1}return i}function I0(e){let t=new Map,n=[];for(let r=0;r<e.length;r+=1){let i=e[r];if(i==null)continue;let a=i.kind===`directory`&&i.isExpanded?[...i.ancestorPaths,i.path]:i.ancestorPaths,o=0;for(;o<n.length&&o<a.length&&n[o]===a[o];)o+=1;for(let e=n.length-1;e>=o;--e){let i=n[e];i!=null&&t.set(i,r-1)}n.length=o;for(let e=o;e<a.length;e+=1){let t=a[e];t!=null&&n.push(t)}}let r=e.length-1;for(let e of n)t.set(e,r);return t}function L0(e,t,n){if(e.length===0||t<=0)return[];let r=I0(e),i=P0(e),a=[];for(let r=0;r<e.length;r+=1){let o=i.get(r);if(o==null||o.length===0)break;let s=t+r*n,c=F0(o,Math.min(e.length-1,Math.floor(s/n))),l=null;for(;c>=0;){let t=o[c],n=t==null?null:e[t]??null;if(n!=null&&(r===0||n.ancestorPaths[r-1]===a[r-1]?.path)){l=n;break}--c}if(l==null)break;a.push(l)}return a.map((i,a)=>{let o=a*n,s=(r.get(i.path)??e.length-1)+1;if(s>=e.length)return{row:i,top:o};let c=s*n-t;return{row:i,top:Math.min(o,c-n)}}).filter(e=>e.top+n>0)}function R0(e,t){let n=t.totalRowCount??e.length,r=n*t.itemHeight,i=Math.max(0,t.viewportHeight),a=Math.max(0,Math.floor(t.overscan)),o=Math.max(0,r-i),s=O0(t.scrollTop,0,o),c=t.stickyRows??L0(e,s,t.itemHeight),l=c.reduce((e,n)=>Math.max(e,n.top+t.itemHeight),0),u=Math.min(r,s+l),d=Math.max(0,i-l),f=Math.max(0,r-u),p=M0(s,n,t.itemHeight),m=M0(u,n,t.itemHeight),h=l<=0||p<0||p>=n?-1:p,g=h===-1?-1:Math.min(n-1,m-1),_=h===-1||g<h?0:g-h+1,v=d<=0||m>=n?D0:k0(m,N0(u+d,n,t.itemHeight)),y=g+1,b=A0(v)?D0:k0(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=j0(b,t.itemHeight);return{occlusion:{firstOccludedIndex:h,lastOccludedIndex:g,occludedCount:_},physical:{itemHeight:t.itemHeight,maxScrollTop:o,overscan:a,scrollTop:s,totalHeight:r,totalRowCount:n,viewportHeight:i},projected:{contentHeight:f,paneHeight:d,paneTop:u},sticky:{height:l,rows:c},visible:v,window:{endIndex:b.endIndex,height:x,offsetTop:A0(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var z0={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},B0={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},V0=`Contains git status items`;function H0(e){return e.current?!0:(e.current=!0,!1)}function U0(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:i=0,viewportHeight:a}=e;if(n<0)return null;let o=Math.max(0,i),s=n*r,c=s+r;if(s<t+o){let e=Math.max(0,s-o);return e===t?null:e}if(c>t+a){let e=c-a;return e===t?null:e}return null}function W0(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,offset:i,topInset:a=0,totalHeight:o,viewportHeight:s}=e;if(i===`nearest`)return U0({currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:a,viewportHeight:s});if(n<0)return null;let c=Math.max(0,a),l=n*r,u=Math.max(0,s-c),d=i===`center`?c+Math.max(0,(u-r)/2):c,f=Math.max(0,o-s),p=Math.max(0,Math.min(l-d,f));return p===t?null:p}function G0(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,targetViewportOffset:i,totalHeight:a,viewportHeight:o}=e;if(n<0)return null;let s=Math.max(0,i),c=n*r,l=c+r,u=t+s,d=t+o;if(c>=u&&l<=d)return null;let f=Math.max(0,a-o),p=Math.max(0,Math.min(c-s,f));return p===t?null:p}function K0(e){if(e==null||!e.isConnected||e===document.body||e===document.documentElement)return!1;e.focus({preventScroll:!0});let t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement===e:document.activeElement===e}function q0(e){let t=e.getRootNode();if(t instanceof ShadowRoot){let e=t.activeElement;return e instanceof HTMLElement?e:null}let n=document.activeElement;return n instanceof HTMLElement&&e.contains(n)?n:null}function J0(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function Y0(e,t){return e!=null&&e>0?e:t}function X0(e){let t=e.borderBoxSize,n=Array.isArray(t)?t[0]:t;return n!=null&&Number.isFinite(n.blockSize)&&n.blockSize>0?n.blockSize:e.contentRect.height>0?e.contentRect.height:null}function Z0(e,t,n,r,i=0){let a=U0({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a!=null&&(e.scrollTop=a,!0)}function Q0(e,t,n,r,i,a,o=0){let s=W0({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,offset:a,topInset:o,totalHeight:i,viewportHeight:r});return s!=null&&(e.scrollTop=s,!0)}function $0(e,t,n,r,i,a){let o=G0({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o!=null&&(e.scrollTop=o,!0)}function e2(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function t2(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function n2({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return $(`input`,{ref:n,"data-item-rename-input":!0,...t?{"data-item-flattened-rename-input":!0}:{},"aria-label":e,value:r,onBlur:i,onInput:a,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()})}function r2(e){let{row:t,mode:n,targetPath:r,ariaLabel:i,domId:a,isParked:o,itemHeight:s,features:c,state:l,extraStyle:u}=e,d=n===`sticky`,f=t.ancestorPaths.at(-1)??``,p={};return l.isFocusRinged&&(p[`data-item-focused`]=!0),t.isSelected&&(p[`data-item-selected`]=!0),l.isContextHovered&&(p[`data-item-context-hover`]=`true`),l.isDragTarget&&(p[`data-item-drag-target`]=!0),l.isDragging&&(p[`data-item-dragging`]=!0),l.effectiveGitStatus!=null&&(p[`data-item-git-status`]=l.effectiveGitStatus),l.containsGitChange&&(p[`data-item-contains-git-change`]=`true`),{"aria-expanded":!d&&t.kind===`directory`?t.isExpanded:void 0,"aria-haspopup":c.contextMenuEnabled?`menu`:void 0,"aria-label":i,"aria-level":d?void 0:t.level+1,"aria-posinset":d?void 0:t.posInSet+1,"aria-selected":d?void 0:t.isSelected?`true`:`false`,"aria-setsize":d?void 0:t.setSize,"data-file-tree-sticky-path":d?r:void 0,"data-file-tree-sticky-row":d?`true`:void 0,"data-item-context-menu-button-visibility":c.actionLaneEnabled?c.contextMenuButtonVisibility:void 0,"data-item-context-menu-trigger-mode":c.contextMenuEnabled?c.contextMenuTriggerMode:void 0,"data-item-has-context-menu-action-lane":c.actionLaneEnabled?`true`:void 0,"data-item-has-git-lane":c.gitLaneActive?`true`:void 0,"data-item-parent-path":f.length>0?f:void 0,"data-item-parked":o?`true`:void 0,"data-item-path":r,"data-item-type":t.kind===`directory`?`folder`:`file`,"data-type":`item`,id:d?void 0:a,role:d?void 0:`treeitem`,style:{minHeight:`${s}px`,...u},tabIndex:!d&&t.isFocused?0:-1,...p}}function i2(e){let{event:t,mode:n,isSearchOpen:r,isDirectory:i}=e,a=t.ctrlKey||t.metaKey,o=t.shiftKey||a,s=t.shiftKey?{additive:a,kind:`range`}:a?{kind:`toggle`}:{kind:`single`};return{closeSearch:r,revealCanonical:n===`sticky`,selection:s,toggleDirectory:!o&&i}}var a2,o2,s2,c2,l2=Object.is,u2=0,d2=[],f2=b1,p2=f2.__b,m2=f2.__r,h2=f2.diffed,g2=f2.__c,_2=f2.unmount,v2=f2.__;function y2(e,t){f2.__h&&f2.__h(o2,e,u2||t),u2=0;var n=o2.__H||(o2.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function b2(e){return u2=1,x2(N2,e)}function x2(e,t,n){var r=y2(a2++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):N2(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);l2(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=o2,!o2.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,l2(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};o2.__f=!0;var a=o2.shouldComponentUpdate,o=o2.componentWillUpdate;o2.componentWillUpdate=function(e,t,n){if(4&this.__g){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},o2.shouldComponentUpdate=i}return r.__N||r.__}function S2(e,t){var n=y2(a2++,3);!f2.__s&&M2(n.__H,t)&&(n.__=e,n.u=t,o2.__H.__h.push(n))}function C2(e,t){var n=y2(a2++,4);!f2.__s&&M2(n.__H,t)&&(n.__=e,n.u=t,o2.__h.push(n))}function w2(e){return u2=5,T2(function(){return{current:e}},[])}function T2(e,t){var n=y2(a2++,7);return M2(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function E2(e,t){return u2=8,T2(function(){return e},t)}function D2(){for(var e;e=d2.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(A2),e.__H.__h.forEach(j2),e.__H.__h=[]}catch(t){e.__H.__h=[],f2.__e(t,e.__v)}}f2.__b=function(e){o2=null,p2&&p2(e)},f2.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),v2&&v2(e,t)},f2.__r=function(e){m2&&m2(e),a2=0;var t=(o2=e.__c).__H;t&&(s2===o2?(t.__h=[],o2.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(A2),t.__h.forEach(j2),t.__h=[],a2=0)),s2=o2},f2.diffed=function(e){h2&&h2(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(d2.push(t)!==1&&c2===f2.requestAnimationFrame||((c2=f2.requestAnimationFrame)||k2)(D2)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),s2=o2=null},f2.__c=function(e,t){t.some(function(e){try{e.__h.forEach(A2),e.__h=e.__h.filter(function(e){return!e.__||j2(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],f2.__e(n,e.__v)}}),g2&&g2(e,t)},f2.unmount=function(e){_2&&_2(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{A2(e)}catch(e){t=e}}),n.__H=void 0,t&&f2.__e(t,n.__v))};var O2=typeof requestAnimationFrame==`function`;function k2(e){var t,n=function(){clearTimeout(r),O2&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);O2&&(t=requestAnimationFrame(n))}function A2(e){var t=o2,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),o2=t}function j2(e){var t=o2;e.__c=e.__(),o2=t}function M2(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!l2(t,e[n])})}function N2(e,t){return typeof t==`function`?t(e):t}function P2(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:$(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return $(R1,{children:[$(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:$(w0,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function F2(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function I2(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function L2(e,t,n,r){return e.map((e,i)=>{let a=i*n,o=e.subtreeEndIndex+1;if(o>=r)return{row:e.row,top:a};let s=o*n-t;return{row:e.row,top:Math.min(a,s-n)}}).filter(e=>e.top+n>0)}function R2({controller:e,itemHeight:t,overscan:n,scrollTop:r,stickyFolders:i,viewportHeight:a}){let o=e.getVisibleCount(),s=i&&o>0?e.getStickyRowCandidates(r,t):[],c=s==null&&i&&o>0?e.getVisibleRows(0,o-1):[],l=R0(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:L2(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?L2(u,1,t,o):i&&r<=0&&c.length>0?L0(c,1,t):l.sticky.rows;return{overlayHeight:d.reduce((e,n)=>Math.max(e,n.top+t),0),overlayRows:d,snapshot:l,visibleRows:c}}var z2=400,B2=40,V2=18;function H2(e,t,n){let r=e,i=document.elementFromPoint?.bind(document)??null,a=r.elementFromPoint?.(t,n)??i?.(t,n)??null;return e instanceof ShadowRoot&&(a==null||!e.contains(a))?U2(e,t,n):a instanceof HTMLElement?a:null}function U2(e,t,n){let r=Array.from(e.querySelectorAll(`[data-type="item"], [data-item-flattened-subitem]`));for(let e=r.length-1;e>=0;e--){let i=r[e],a=i.getBoundingClientRect();if(t>=a.left&&t<=a.right&&n>=a.top&&n<=a.bottom)return i}return null}function W2(e){let t=e?.closest?.(`[data-type="item"]`);if(!(t instanceof HTMLElement))return null;let n=t.dataset.itemPath??null;if(n==null)return null;let r=e?.closest?.(`[data-item-flattened-subitem]`),i=r instanceof HTMLElement?r.getAttribute(`data-item-flattened-subitem`)??null:null;if(i!=null&&i.endsWith(`/`))return{directoryPath:i,flattenedSegmentPath:i,hoveredPath:n,kind:`directory`};if(t.dataset.itemType===`folder`)return{directoryPath:n,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`};let a=t.dataset.itemParentPath??null;return a==null||a.length===0?{directoryPath:null,flattenedSegmentPath:null,hoveredPath:n,kind:`root`}:{directoryPath:a,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`}}function G2(e){let t=e.cloneNode(!0);return t.removeAttribute(`id`),t.dataset.fileTreeDragPreview=`true`,t.setAttribute(`aria-hidden`,`true`),t.tabIndex=-1,Object.assign(t.style,{boxShadow:`0 4px 12px rgba(0, 0, 0, 0.15)`,left:`0px`,margin:`0`,pointerEvents:`none`,position:`fixed`,top:`0px`,willChange:`transform`,zIndex:`10000`}),t}function K2(){return navigator.vendor!==`Apple Computer, Inc.`}function q2(e,t){let n=e-t.top;if(n<B2)return-Math.ceil((B2-Math.max(0,n))/B2*V2);let r=t.bottom-e;return r<B2?Math.ceil((B2-Math.max(0,r))/B2*V2):0}function J2(e,t){if(e!=null){let t=z0[e];return t==null?null:{text:t,title:B0[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:V0}:null}function Y2(e,t,n){if(t==null||t.size===0)return null;let r=[];for(let i=e.length-1;i>=0;--i){let a=e[i],o=n.get(a);if(o!=null){for(let e of r)n.set(e,o);return o?`ignored`:null}if(t.has(a)){n.set(a,!0);for(let e of r)n.set(e,!0);return`ignored`}r.push(a)}for(let e of r)n.set(e,!1);return null}function X2(e){return e!=null&&`toggle`in e}function Z2(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function Q2(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function $2(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function e4(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function t4(e,t){return t&&e4(e)||(e.ctrlKey||e.metaKey)&&Z2(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var n4=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function r4(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&(t.dataset.fileTreeContextMenuRoot===`true`||t.dataset.type===`context-menu-anchor`||t.dataset.type===`context-menu-trigger`||t.getAttribute(`slot`)===`context-menu`))return!0;return!1}function i4(e){return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width,x:e.x,y:e.y}}function a4(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function o4(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function s4(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function c4(e,t,n){if(e==null)return null;let r=t.get(e)??null;if(r!=null)return r;let i=n.get(e)??null;return i?.dataset.itemParked===`true`?null:i}function l4(e){if(e==null)return[];let t=[];for(let n of e.querySelectorAll(`button[data-file-tree-sticky-row="true"]`)){if(!(n instanceof HTMLElement))continue;let e=n.dataset.fileTreeStickyPath;e!=null&&t.push(e)}return t}function u4(e,t){if(e==null||t==null)return null;for(let n of e.querySelectorAll(`button[data-item-focused="true"][data-item-parked="true"]`))if(n instanceof HTMLElement&&n.dataset.itemPath===t)return n;return null}function d4(e,t,n,r,i,a,o){let s=Math.max(0,a-i),c=t?.getBoundingClientRect()??null,l=c==null||n==null?null:n.getBoundingClientRect().top-c.top,u=u4(e,r),d=c==null||u==null?null:u.getBoundingClientRect().top-c.top;return Math.max(0,Math.min(d??Math.max(l??0,s),Math.max(0,o-i)))}function f4(e,t){return{kind:e.kind,name:I2(e),path:t}}function p4(e){return e==null?void 0:`${e}__tree`}function m4(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function h4(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function g4(e,t){if(e==null)return null;if(`text`in e)return e.parts==null?$(`span`,{title:e.title,children:e.text}):$(`span`,{title:e.title,children:e.parts.map((e,t)=>$(`span`,{style:{color:e.color},children:e.text},t))});let n=typeof e.icon==`string`?h4(e.icon)?t(e.icon):{name:e.icon}:h4(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return $(`span`,{title:e.title,children:$(d0,{...n})})}function _4(e){e!=null&&K0(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function v4(e,t,{actionLaneEnabled:n=!1,customDecoration:r=null,decorationLaneEnabled:i=!1,dragTargetFlattenedSegmentPath:a=null,gitDecoration:o=null,gitLaneActive:s=!1,renameInput:c=null,showDecorativeActionAffordance:l=!1}={}){let u=F2(e);return $(R1,{children:[e.depth>0?$(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>$(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,$(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?$(d0,{...t(`file-tree-icon-chevron`)}):$(d0,{...t(`file-tree-icon-file`,u)})}),$(`div`,{"data-item-section":`content`,children:e.isFlattened?P2(e,c,a):c??$(E0,{minimumLength:5,split:`extension`,children:e.name})}),i?$(`div`,{"data-item-section":`decoration`,children:r==null?null:g4(r,t)}):null,s?$(`div`,{"data-item-section":`git`,children:g4(o,t)}):null,n?$(`div`,{"data-item-section":`action`,children:l?$(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:$(d0,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function y4(e,t,n,r={}){let{controller:i,renameView:a,visualFocusPath:o,contextHoverPath:s,draggedPathSet:c,dragTarget:l,dragAndDropEnabled:u,shouldSuppressContextMenu:d,handleRowDragStart:f,handleRowDragEnd:p,handleRowTouchStart:m,instanceId:h,itemHeight:g,gitStatusByPath:_,ignoredGitDirectories:v,ignoredInheritanceCache:y,directoriesWithGitChanges:b,gitLaneActive:x,contextMenuEnabled:S,contextMenuTriggerMode:C,contextMenuButtonTriggerEnabled:w,contextMenuButtonVisibility:T,contextMenuRightClickEnabled:E,registerRenameInput:D,registerButton:O,resolveIcon:k,renderDecorationForRow:A,openContextMenuForRow:ee,onRowClick:j,onKeyDown:M}=e,N=F2(t),{isParked:P=!1,mode:F=`flow`,style:I}=r,te=F===`sticky`,ne=_?.get(N)??null??Y2(t.ancestorPaths,v,y),re=t.kind===`directory`&&(b?.has(N)??!1),L=A(t,N),R=J2(ne,re),z=S&&w,B=L!=null||x||z,ie=z&&T===`always`,ae=a.getPath()===N,oe=ae?a.getValue():``,se=te||!ae?null:$(n2,{ref:D,ariaLabel:`Rename ${I2(t)}`,isFlattened:t.isFlattened,value:oe,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),ce=v4(t,k,{actionLaneEnabled:z,customDecoration:L,decorationLaneEnabled:B,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:R,gitLaneActive:x,renameInput:se,showDecorativeActionAffordance:ie}),le={...r2({ariaLabel:I2(t),domId:t.isFocused?m4(h,N,P):void 0,extraStyle:I,features:{actionLaneEnabled:z,contextMenuButtonVisibility:z?T:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:P,itemHeight:g,mode:F,row:t,state:{containsGitChange:re,effectiveGitStatus:ne,isContextHovered:s===N,isDragTarget:l?.kind===`directory`&&l.directoryPath===N,isDragging:c?.has(N)===!0,isFocusRinged:t.isFocused&&o===N},targetPath:N}),key:n,onContextMenu:S||u?e=>{if(d()){e.preventDefault();return}S&&(e.preventDefault(),E&&(i.focusMountedPathFromInput(N),ee(t,N,{anchorRect:a4(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:te?void 0:()=>{i.focusMountedPathFromInput(N)},onKeyDown:te?void 0:M,ref:e=>{O(N,e)}};return!te&&ae?$(`div`,{...le,children:ce}):$(`button`,{...le,type:`button`,draggable:u&&!P,onDragEnd:u&&!P?p:void 0,onDragStart:u&&!P?e=>{f(e,t,N)}:void 0,onMouseDown:e=>{if(te){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!P?e=>{m(e,t,N)}:void 0,onClick:e=>{j(e,t,N,F)},children:ce})}function b4(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(F2(e))).map((n,r)=>y4(e,n,t.start+r))}function x4({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=SY,overscan:c=10,renamingEnabled:l=!1,renderRowDecoration:u,searchBlurBehavior:d=`close`,searchEnabled:f=!1,searchFakeFocus:p=!1,slotHost:m,stickyFolders:h=!1,initialViewportHeight:g=420}){"use no memo";let _=w2(null),v=w2(null),y=w2(!1),b=w2(null),x=w2(null),S=w2(null),C=w2(null),w=w2(null),T=w2(new Map),E=w2(new Map),D=w2(()=>{}),O=w2(null),k=w2(0),A=w2(!1),ee=w2(null);ee.current!==t&&(A.current=!1,ee.current=t);let j=w2(!1),M=w2(null),N=w2(null),P=w2(!1),F=w2(null),I=w2(null),te=w2(null),ne=w2(null),re=w2(null),L=w2(null),R=w2(null),z=w2(null),B=w2(!1),ie=w2(null),ae=w2(null),oe=w2(null),se=w2(null),ce=T2(()=>new Map,[]),[,le]=b2(0),ue=w2(!1),[V,de]=b2(null),[fe,pe]=b2(null),[me,he]=b2(null),[ge,_e]=b2(null),[ve,ye]=b2(0),[be,xe]=b2(null),Se=w2(be);Se.current=be;let Ce=w2(null),we=w2(null),Te=w2(null),Ee=w2(null),De=w2(null),Oe=w2(!1),ke=()=>{we.current=null,Te.current=null,Ee.current=null},Ae=(e,t)=>{we.current=e,Te.current=null,Ee.current=t==null?null:{path:e,scrollTop:t}},je=(e,t)=>{we.current=null,Te.current={path:e,viewportOffset:t},Ee.current=null},Me=w2(d===`retain`&&t.isSearchOpen()),[Ne,Pe]=b2(p);S2(()=>{p||Pe(!1)},[p]);let Fe=w2(!1),Ie=E2(()=>{Fe.current=!0,Pe(e=>e&&!1)},[]),[Le,Re]=b2(()=>R2({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[ze,Be]=b2(!1);S2(()=>{Be(!0)},[]);let Ve=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,He=e?.contextMenu?.triggerMode??(Ve?`right-click`:`both`),Ue=He===`both`||He===`button`,We=e?.contextMenu?.buttonVisibility??`when-needed`,Ge=He===`both`||He===`right-click`;C2(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;De.current=t,pe(t),_e(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(Oe.current=e.detail?.disabled===!0)};return e.addEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.addEventListener(`file-tree-debug-set-scroll-suppression`,n),()=>{e.removeEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.removeEventListener(`file-tree-debug-set-scroll-suppression`,n)}},[]);let Ke=E2((e,t)=>{s4(T.current,e,t)},[]),qe=E2((e,t)=>{s4(E.current,e,t)},[]),H=E2(e=>{x.current=e},[]),Je=E2(e=>c4(e,E.current,T.current),[]),Ye=n!=null||r!=null||i!=null,{resolveIcon:Xe}=T2(()=>y1(a),[a]),Ze=t[Y$](),Qe=Ze.getPath(),$e=Qe!=null,et=t.isSearchOpen(),tt=t.getSearchValue(),nt=t.getFocusedPath(),rt=t.getFocusedIndex(),it=t.getScrollRequest(),at=t.isDragAndDropEnabled(),ot=t.getDragSession(),st=T2(()=>ot==null?null:new Set(ot.draggedPaths),[ot]),ct=ot?.target??null,lt=ot?.primaryPath??null,ut=p4(o),{overlayHeight:dt,overlayRows:ft,snapshot:pt,visibleRows:mt}=Le,ht=pt.physical.viewportHeight,gt=T2(()=>({end:pt.window.endIndex,start:pt.window.startIndex}),[pt.window.endIndex,pt.window.startIndex]),_t=ft,vt=pt.sticky.rows,yt=pt.physical.totalHeight,bt=pt.sticky.height,xt=T2(()=>new Set(vt.map(e=>F2(e.row))),[vt]),St=rt>=0&&rt>=gt.start&&rt<=gt.end,Ct=E2((e,t)=>u?.({item:f4(e,t),row:e})??null,[u]),wt=E2(e=>K0(e==null?null:T.current.get(e)??null)?!0:K0(S.current),[]),Tt=E2(e=>{wt(t.focusNearestPath(e))},[t,wt]),Et=w2(Tt);Et.current=Tt;let Dt=w2(!0),Ot=w2(()=>{}),kt=E2((t=!0)=>{let n=Se.current;n!=null&&(Dt.current=Dt.current&&t,xe(null),e?.contextMenu?.onClose?.(),Dt.current&&Tt(n.path))},[e?.contextMenu,Tt]);Ot.current=kt;let At=E2(e=>{let t=e==null?null:o4(S.current,e);he(e=>e===t?e:t)},[]),jt=E2((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=Je(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;Ae(n,e?.scrollTop??null),j.current=!0,de(e=>e===n?e:n)}i.focus(),At(a),Dt.current=!0,xe({anchorRect:r?.anchorRect??null,item:f4(e,n),path:n,source:r?.source??`keyboard`})},[t,Je,At]),Mt=E2(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=J0(e,ht);F.current=rt<0||e==null?null:Math.max(0,Math.min(rt*s-e.scrollTop,Math.max(0,t-s))),P.current=!0}t.startRenaming(e)!==!1&&(_e(`focus`),le(e=>e+1))}},[t,rt,s,l,ht]),Nt=E2((e,{restoreTreeFocus:n=!0,targetOffset:r=`live-overlay`}={})=>{let i=C.current;if(i==null)return!1;t.focusPath(e);let a=t.getFocusedIndex();if(a<0)return!1;let o=t.getVisibleRows(a,a)[0]??null;if(o==null)return!1;let l=J0(i,ht),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:R2({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return j.current=!0,$0(i,a,s,l,u,d),D.current(),Ce.current=n?e:null,!0},[t,s,c,ht,h]),Pt=()=>y.current===!0||se.current!=null||B.current===!0,Ft=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),It=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},Lt=()=>{ne.current!=null&&(clearTimeout(ne.current),ne.current=null),te.current=null},Rt=()=>{L.current?.remove(),L.current=null},zt=()=>{It(I.current),I.current=null,re.current=null},Bt=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},Vt=()=>{z.current?.(),z.current=null,se.current!=null&&(clearTimeout(se.current),se.current=null),B.current=!1,ie.current=null,oe.current=null,ae.current!=null&&(ae.current.setAttribute(`draggable`,`true`),ae.current.style.removeProperty(`touch-action`),ae.current=null),Rt(),Lt(),zt(),R.current=null},Ht=(e,n)=>{let r=S.current?.getRootNode(),i=W2(H2(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},Ut=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){Lt();return}let r=t.getItem(e.directoryPath),i=X2(r)?r:null;if(i==null||i.isExpanded()){Lt();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;te.current!==a&&(Lt(),te.current=a,ne.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind===`directory`&&n.directoryPath===e.directoryPath&&n.flattenedSegmentPath===e.flattenedSegmentPath&&i.expand()},n))},Wt=()=>{I.current=null;let e=re.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=q2(e.clientY,r);if(i===0)return;let a=Math.max(0,n.scrollHeight-n.clientHeight),o=Math.max(0,Math.min(a,n.scrollTop+i));o!==n.scrollTop&&(n.scrollTop=o,D.current()),Ut(Ht(e.clientX,e.clientY)),I.current=Ft(Wt)},Gt=(e,t)=>{re.current={clientX:e,clientY:t},I.current??=Ft(Wt)},Kt=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(Vt(),Rt(),Lt(),zt(),t.startDrag(r)===!1){e.preventDefault();return}if(R.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),K2())){let t=G2(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),Bt(t),L.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},qt=()=>{Rt(),Lt(),zt(),R.current=null,t.cancelDrag()},Jt=(e,n,r)=>{if(se.current!=null||B.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;oe.current={clientX:i.clientX,clientY:i.clientY},ae.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!B.current;se.current!=null&&(clearTimeout(se.current),se.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),z.current===o&&(z.current=null),t&&(a.setAttribute(`draggable`,`true`),ae.current===a&&(ae.current=null),oe.current=null)},s=e=>{let t=e.touches[0],n=oe.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=100||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),z.current=o,se.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),ae.current===a&&(ae.current=null),oe.current=null;return}B.current=!0,ae.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),R.current=n;let e=a.getBoundingClientRect(),s=G2(a);Object.assign(s.style,{height:`${e.height}px`,opacity:`0.85`,transform:`translate3d(${e.left}px, ${e.top}px, 0)`,width:`${e.width}px`}),Bt(s),L.current=s,ie.current={x:i.clientX-e.left,y:i.clientY-e.top};let c=e=>{let t=e.touches[0];if(t==null)return;e.preventDefault();let n=ie.current;n!=null&&L.current!=null&&(L.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),Ut(Ht(t.clientX,t.clientY)),Gt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Ht(n.clientX,n.clientY),t.completeDrag(),Vt()},u=()=>{t.cancelDrag(),Vt()};z.current=()=>{document.removeEventListener(`touchmove`,c),document.removeEventListener(`touchend`,l),document.removeEventListener(`touchcancel`,u)},document.addEventListener(`touchmove`,c,{passive:!1}),document.addEventListener(`touchend`,l),document.addEventListener(`touchcancel`,u)},z2)},Yt=e=>{if(be!=null){if(e.key===`Escape`){kt(),e.preventDefault(),e.stopPropagation();return}n4.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(Ze.isActive()){if(e.isComposing||e.keyCode===229)return;if(e.key===`Escape`)Ze.cancel();else if(e.key===`Enter`)Ze.commit();else return;_e(`focus`),le(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){Mt(nt??void 0),e.preventDefault(),e.stopPropagation();return}if(et){if(e.key===`Escape`)P.current=!1,F.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=J0(n,ht);F.current=rt<0||n==null?null:Math.max(0,Math.min(rt*s-n.scrollTop,Math.max(0,r-s))),P.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;_e(`focus`),le(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&Q2(e)){t.openSearch(e.key),le(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=Ve&&e4(e),r=t4(e,Ve),i=r&&S.current!=null?q0(S.current):null,a=r?new Set(l4(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==nt&&a.has(o)){let e=C.current;Ae(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=X2(p)?p:null,h=u!=null&&(xt.has(u)||c&&o===u&&a.has(u)),g=e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`ArrowRight`&&m!=null&&m.isExpanded(),_=e.key===`ArrowLeft`&&h&&m!=null&&m.isExpanded(),v=C.current,y=!0;if(e.shiftKey&&e.key===`ArrowDown`)t.extendSelectionFromFocused(1);else if(e.shiftKey&&e.key===`ArrowUp`)t.extendSelectionFromFocused(-1);else if(n&&u!=null&&d>=0){let e=t.getVisibleRows(d,d)[0]??null,n=c4(u,E.current,T.current);e==null||n==null?y=!1:jt(e,u)}else if((e.ctrlKey||e.metaKey)&&Z2(e))t.toggleFocusedSelection();else if((e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`a`)t.selectAllVisiblePaths();else switch(e.key){case`ArrowDown`:t.focusNextItem();break;case`ArrowUp`:t.focusPreviousItem();break;case`ArrowRight`:m==null||m.isExpanded()?t.focusNextItem():m.expand();break;case`ArrowLeft`:m!=null&&m.isExpanded()?m.collapse():t.focusParentItem();break;case`Home`:t.focusFirstItem();break;case`End`:t.focusLastItem();break;default:y=!1}if(!y)return;_e(`focus`);let b=t.getFocusedPath(),x=b!=null&&(xt.has(b)||a.has(b)),w=g&&b!==u,D=n&&c&&o===u&&b===u;if((h||D)&&b!=null&&(w&&x||D))Ae(b,v?.scrollTop??null),j.current=!0,de(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(je(b,d4(S.current,v,i,u,s,bt,ht)),j.current=!0,de(e=>e===b?e:b)):ke()}le(e=>e+1),e.preventDefault(),e.stopPropagation()};C2(()=>{if(!(!f||!et)){if(Me.current){Me.current=!1;return}K0(w.current)}},[et,f]),C2(()=>{let e=x.current;switch(t2({hasRenderedInput:e!=null,previousRenamingPath:N.current,renamingPath:Qe})){case`reset`:N.current=null;return;case`reveal-canonical`:Qe!=null&&Nt(Qe,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(Ce.current=null,N.current=Qe,K0(e),e.select());return}},[gt.end,gt.start,Qe,Nt,xt]),C2(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=q0(e)?.dataset.itemPath??null;de(e=>e===t?e:t)},i=()=>{n(),j.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,q0(e)!=null){r();return}j.current=!1,de(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),j.current=!1,de(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;de(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),C2(()=>{let e=S.current;e!=null&&(pt.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[pt.physical.scrollTop]),C2(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;O.current=J0(n,g);let a=()=>{let e=t.getVisibleCount(),r=Y0(O.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),Re(R2({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};if(!A.current){A.current=!0;let e=t.getFocusedIndex();if(e>=0){let r=Y0(O.current,g),i=t.getVisibleRows(e,e)[0]??null;Z0(n,e,s,r,h&&i!=null?Math.max(0,Math.min(i.ancestorPaths.length*s,Math.max(0,r-s))):0)}}D.current=a;let o=t.subscribe(()=>{H0(ue)&&le(e=>e+1),a()}),l=()=>{Oe.current!==!0&&(r!=null&&(r.dataset.isScrolling??=``),i!=null&&(i.dataset.isScrolling??=``),y.current=!0,e!=null&&clearTimeout(e),e=setTimeout(()=>{r!=null&&delete r.dataset.isScrolling,i!=null&&delete i.dataset.isScrolling,y.current=!1,ye(e=>e+1),e=null},50))},u=null,d=()=>{i!=null&&delete i.dataset.overlayReveal,u!=null&&(clearTimeout(u),u=null)},f=()=>{i!=null&&Oe.current!==!0&&(n.scrollTop>0||(i.dataset.overlayReveal=`true`,u!=null&&clearTimeout(u),u=setTimeout(()=>{d()},200)))},p=()=>{if(a(),n.scrollTop>0&&d(),Se.current!=null&&y.current&&Ot.current(),Oe.current===!0){y.current=!1;return}pe(e=>e==null?e:null),l()},m=()=>{l(),f()},_=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),v=e=>{_.has(e.key)&&m()};n.addEventListener(`scroll`,p,{passive:!0}),n.addEventListener(`wheel`,m,{passive:!0}),n.addEventListener(`touchmove`,m,{passive:!0}),n.addEventListener(`keydown`,v);let x=typeof ResizeObserver<`u`?new ResizeObserver(e=>{O.current=(e[0]==null?null:X0(e[0]))??J0(n,g),a()}):null;return x?.observe(n),()=>{D.current=()=>{},o(),n.removeEventListener(`scroll`,p),n.removeEventListener(`wheel`,m),n.removeEventListener(`touchmove`,m),n.removeEventListener(`keydown`,v),e!=null&&clearTimeout(e),u!=null&&clearTimeout(u),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,O.current=null,x?.disconnect()}},[t,g,s,c,h]),C2(()=>{Ve||be==null||kt(!1)},[kt,Ve,be]);let Xt=T2(()=>be==null?null:`${be.path}::${be.source}`,[be]);C2(()=>{if(Xt==null){m?.clearSlotContent(Zq);return}let t=Se.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??i4(n.getBoundingClientRect()),close:e=>{Ot.current(e?.restoreFocus??!0)},restoreFocus:()=>{Dt.current&&Et.current(Se.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(Zq,i),e?.contextMenu?.onOpen?.(t.item,r),_4(i),queueMicrotask(()=>{i==null||!i.isConnected||document.activeElement===i&&_4(i)}),()=>{m?.clearSlotContent(Zq)}},[Xt,e?.contextMenu,m]),C2(()=>{be!=null&&t.getItem(be.path)==null&&kt()},[kt,be,t]),C2(()=>{if(be==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(r4(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&kt())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),kt())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[kt,be]),C2(()=>{let e=C.current,n=S.current;if(e==null||n==null){M.current=nt;return}let r=nt==null?null:T.current.get(nt)??null,i=q0(n),a=i?.dataset.itemPath??null,o=$e&&x.current===i,c=f&&w.current===i,l=P.current&&!et,u=F.current??0,d=Ce.current,p=we.current,m=Te.current,g=Ee.current,_=i!=null,v=j.current||_,y=M.current!==nt,b=p!=null&&p===nt&&nt!=null,E=!1,O=!1;if(it!=null&&it.id!==k.current){k.current=it.id;let n=it.visibleIndex,r=t.getVisibleRows(n,n)[0]??null;if(r!=null){let t=h?Math.max(0,Math.min(r.ancestorPaths.length*s,Math.max(0,ht-s))):bt;E=!0,O=Q0(e,n,s,ht,yt,it.offset,t)}t.clearScrollRequest(it.id)}let A=!E&&l&&$0(e,rt,s,ht,yt,u),ee=!E&&d!=null&&d===nt&&$0(e,rt,s,ht,yt,bt),N=!E&&m!=null&&m.path===nt&&$0(e,rt,s,ht,yt,m.viewportOffset),I=!E&&g!=null&&g.path===nt&&e.scrollTop!==g.scrollTop;if(I&&(e.scrollTop=g.scrollTop),(I||O||ee||N||A||v&&y&&d!==nt&&!b&&Z0(e,rt,s,ht,bt))&&D.current(),E){M.current=nt;return}if(!v){M.current=nt;return}if(o){M.current=nt;return}if(c&&!l){M.current=nt;return}if(r==null){l&&rt>=0&&($0(e,rt,s,ht,yt,u),D.current()),M.current=nt;return}(y||l||d===nt||p===nt||m?.path===nt||g?.path===nt||a==null||a!==nt)&&(K0(r),d===nt&&(Ce.current=null),p===nt&&(we.current=null),m?.path===nt&&(Te.current=null),g?.path===nt&&(Ee.current=null),P.current=!1,F.current=null),M.current=nt},[t,rt,nt,St,s,$e,et,gt,ht,f,it,h,bt,yt,mt]);let Zt=rt>=0&&rt>=pt.visible.startIndex&&rt<=pt.visible.endIndex,Qt=nt!=null&&_t.some(e=>F2(e.row)===nt),$t=Zt||Qt,en=Ue&&j.current===!0&&$t?nt:null,tn=ge===`pointer`?fe:null,nn=be?.path??De.current??tn??en??fe,rn=be?.source===`right-click`;C2(()=>{y.current&&be==null||At(Je(nn))},[be,Je,gt,ht,ve,_t,nn,At,mt]);let an=E2(e=>{if(y.current||r4(e))return;let t=e.target;if(!(t instanceof HTMLElement)||t.closest?.(`[data-type="context-menu-trigger"]`)!=null)return;let n=t.closest?.(`[data-file-tree-sticky-row="true"]`),r=t.closest?.(`[data-type="item"]`),i=n instanceof HTMLElement?n.dataset.fileTreeStickyPath??null:r instanceof HTMLElement?r.dataset.itemPath??null:null;i!=null&&_e(e=>e===`pointer`?e:`pointer`),pe(e=>e===i?e:i)},[]),on=E2(()=>{pe(null)},[]);C2(()=>{if(!at)return;let e=()=>{Vt(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),Vt(),t.cancelDrag()}},[t,at]);let sn=e=>{if(!at||t.getDragSession()==null||B.current)return;let n=W2(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),Ut(t.getDragSession()?.target??null),Gt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},cn=e=>{if(!at||t.getDragSession()==null||B.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(Lt(),zt(),t.setDragTarget(null))},ln=e=>{!at||t.getDragSession()==null||B.current||(e.preventDefault(),Ht(e.clientX,e.clientY),t.completeDrag(),Rt(),Lt(),zt(),R.current=null)},un=pt.window.height,dn=pt.window.offsetTop,fn=Math.min(0,ht-un),pn=Math.min(0,ht-un-bt),mn=V===nt||P.current,hn=nt!=null&&mn&&!St&&rt>=0?mt[rt]??t.getVisibleRows(rt,rt)[0]??null:null,gn=hn==null?null:e2(rt,s,gt,un),_n=R.current,vn=lt!=null&&_n!=null&&_n.path===lt&&_n.index>=gt.start&&_n.index<=gt.end,yn=lt!=null&&_n!=null&&_n.path===lt&&!vn&&_n.path!==hn?.path?_n:null,bn=yn==null?null:e2(yn.index,s,gt,un),xn=$2((rt>=0?mt[rt]??t.getVisibleRows(rt,rt)[0]??null:null)?.ancestorPaths.at(-1)??null),Sn=et&&nt!=null?m4(o,nt,!St):void 0,Cn=be?.path??(et?nt:V),wn=be?.path??fe,Tn=Je(nn),En=Ve&&Ue&&!rn&&!$e&&Tn!=null&&me!=null&&nn!=null,Dn=Ve&&(En||be!=null),On=be?.anchorRect,kn=On==null&&Tn!=null&&me!=null&&(be!=null||En)?me:null,An=On==null?kn==null?void 0:{top:`${kn}px`}:{left:`${On.left}px`,position:`fixed`,right:`auto`,top:`${On.top}px`},jn=rn?{opacity:`0`}:void 0,Mn=E2((e,n,r,i)=>{let a=i2({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:et,mode:i}),o=a.toggleDirectory&&n.kind===`directory`,s=o?t.resolveMountedDirectoryPathFromInput(r):null;if(o&&s==null)return;let c=s??r;switch(a.selection.kind){case`range`:t.selectPathRange(c,a.selection.additive);break;case`toggle`:t.togglePathSelectionFromInput(c);break;case`single`:t.selectOnlyMountedPathFromInput(c)}let l=e.currentTarget instanceof HTMLElement?e.currentTarget:null,u=n.index>=pt.visible.startIndex&&n.index<=pt.visible.endIndex,d=i===`flow`&&u&&l!=null&&l.dataset.itemParked!==`true`;t.focusMountedPathFromInput(c),d&&(j.current=!0,de(e=>e===c?e:c),_e(`focus`)),o&&t.toggleMountedDirectoryFromInput(c),a.closeSearch&&t.closeSearch(),a.revealCanonical&&Nt(c,{targetOffset:`sticky-parents`})},[t,et,pt.visible.endIndex,pt.visible.startIndex,Nt]),Nn=()=>{if(y.current||!Ue||nn==null||Tn==null)return;let e=t.getItem(nn);e!=null&&(At(Tn),Dt.current=!0,xe({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:Tn.getAttribute(`aria-label`)??nn,path:e.getPath()},path:e.getPath(),source:`button`}))},Pn={contextHoverPath:wn,contextMenuButtonTriggerEnabled:Ue,contextMenuButtonVisibility:We,contextMenuEnabled:Ve,contextMenuRightClickEnabled:Ge,contextMenuTriggerMode:He,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:at,draggedPathSet:st,dragTarget:ct,gitLaneActive:Ye,gitStatusByPath:n,handleRowDragEnd:qt,handleRowDragStart:Kt,handleRowTouchStart:Jt,ignoredGitDirectories:r,ignoredInheritanceCache:ce,instanceId:o,itemHeight:s,onKeyDown:Yt,onRowClick:Mn,openContextMenuForRow:jt,registerButton:Ke,registerRenameInput:H,renameView:Ze,renderDecorationForRow:Ct,resolveIcon:Xe,shouldSuppressContextMenu:Pt,visualFocusPath:Cn},Fn={...Pn,registerButton:qe};return $(`div`,{ref:S,id:ut,"data-file-tree-context-menu-button-visibility":Ve&&Ue?We:void 0,"data-file-tree-context-menu-trigger-mode":Ve?He:void 0,"data-file-tree-has-context-menu-action-lane":Ve&&Ue?`true`:void 0,"data-file-tree-has-git-lane":Ye?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:at?cn:void 0,onDragOver:at?sn:void 0,onDrop:at?ln:void 0,onKeyDown:Yt,onPointerLeave:Ve?on:void 0,onPointerOver:Ve?an:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[$(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:xn}}),$(`slot`,{name:Xq,"data-type":`header-slot`}),f?$(`div`,{"data-file-tree-search-container":!0,"data-open":et?`true`:`false`,children:$(`input`,{ref:w,"aria-activedescendant":Sn,"aria-controls":ut,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":Ne?`true`:void 0,value:tt,onBlur:()=>{d===`retain`&&!Fe.current||t.closeSearch()},onFocus:Ie,onPointerDown:Ie,onInput:e=>{Ie();let n=e.currentTarget;t.setSearch(n.value)}})}):null,$(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&ze&&_t.length>0?$(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:$(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${dt}px`},children:_t.map((e,t)=>y4(Fn,e.row,`sticky:${F2(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${_t.length-t}`}}))})}):null,$(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${yt}px`},children:[$(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${dn}px`}}),$(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${un}px`,top:`${fn}px`,bottom:`${pn}px`},children:[b4(Pn,gt,xt),hn!=null&&gn!=null?y4(Pn,hn,`parked:${hn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:lt===hn.path?`none`:void 0,position:`absolute`,right:`0`,top:`${gn}px`}}):null,yn!=null&&bn!=null?y4(Pn,yn,`parked-drag:${yn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${bn}px`}}):null]})]})]}),Ve?$(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":Dn?`true`:`false`,style:An,children:[$(`button`,{ref:v,type:`button`,"data-type":Qq,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":be==null?`false`:`true`,"data-visible":En?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),be!=null){kt();return}Nn()},tabIndex:-1,style:jn,children:$(d0,{...Xe(`file-tree-icon-ellipsis`)})}),be==null?null:$(`slot`,{name:Zq})]}):null,be==null?null:$(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),kt()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),kt()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var S4={hydrateRoot:(e,t)=>{o0(I1(x4,t),e)},renderRoot:(e,t)=>{a0(I1(x4,t),e)},unmountRoot:e=>{a0(null,e)}};function C4(e,t){S4.renderRoot(e,t)}function w4(e,t){S4.hydrateRoot(e,t)}function T4(e){S4.unmountRoot(e)}var E4=class{#e=new Map;#t=null;clearAll(){for(let e of this.#e.values())e.remove();this.#e.clear()}clearSlotContent(e){let t=this.#n(e);t!=null&&(t.remove(),this.#e.delete(e))}setHost(e){if(this.#t=e,e!=null){this.#i(e);for(let[e,t]of this.#e)this.#r(e,t)}}setSlotContent(e,t){let n=this.#n(e);if(n===t){t!=null&&(this.#e.set(e,t),this.#r(e,t));return}if(n?.remove(),t==null){this.#e.delete(e);return}this.#e.set(e,t),this.#r(e,t)}setSlotHtml(e,t){let n=t?.trim()??``;if(n.length===0){this.setSlotContent(e,null);return}let r=this.#n(e);if(r!=null&&r.innerHTML===n){this.#e.set(e,r),this.#r(e,r);return}let i=document.createElement(`div`);i.innerHTML=n,this.setSlotContent(e,i)}#n(e){let t=this.#e.get(e)??null;if(t!=null)return t;let n=this.#t;if(n==null)return null;for(let t of Array.from(n.children))if(t instanceof HTMLElement&&t.dataset.fileTreeManagedSlot===e)return t;return null}#r(e,t){t.slot=e,t.dataset.fileTreeManagedSlot=e,this.#t!=null&&t.parentNode!==this.#t&&this.#t.appendChild(t)}#i(e){for(let t of Array.from(e.children)){if(!(t instanceof HTMLElement))continue;let e=t.dataset.fileTreeManagedSlot;e==null||this.#e.has(e)||this.#e.set(e,t)}}};Array.isArray;var D4=0;function O4(e){return e!=null&&e.length>0?e:(D4+=1,`pst_ft_${D4}`)}function k4({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??SY)}function A4(e){if(typeof document>`u`)return;let t=document.createElement(`div`);t.innerHTML=e;let n=t.querySelector(`svg`);return n instanceof SVGElement?n:void 0}function j4(e){return e.querySelector(`#file-tree-icon-chevron`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-file`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-dot`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-lock`)instanceof SVGElement}function M4(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var N4=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new E4;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y=null;#b;#x=!1;#S=!1;constructor(e){let{composition:t,density:n,fileTreeSearchMode:r,gitStatus:i,id:a,initialSearchQuery:o,icons:s,itemHeight:c,onSearchChange:l,onSelectionChange:u,overscan:d,renderRowDecoration:f,renaming:p,search:m,searchBlurBehavior:h,searchFakeFocus:g,stickyFolders:_,unsafeCSS:v,initialVisibleRowCount:y,...b}=e;this.#e=t,this.#n=O4(a),this.#p=o1(i),this.#m=s,this.#h=v,this.#r=u,this.#i=f,this.#a=p!=null&&p!==!1,this.#o=h,this.#s=m===!0,this.#c=g===!0,this.#u=xY(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new t1({...b,fileTreeSearchMode:r,initialSearchQuery:o,onSearchChange:l,renaming:p}),this.#v=this.#t.getSelectionVersion(),this.#y=this.#r==null?null:this.subscribe(()=>{this.#D()})}unmount(){this.#b!=null&&(T4(this.#b),delete this.#b.dataset.fileTreeVirtualizedWrapper,this.#b=void 0),this.#l.clearAll(),this.#l.setHost(null),this.#f!=null&&(delete this.#f.dataset.fileTreeVirtualized,this.#I(this.#f),this.#f=void 0)}cleanUp(){this.unmount(),this.#y?.(),this.#y=null,this.#t.destroy()}getFileTreeContainer(){return this.#f}getItem(e){return this.#t.getItem(e)}getFocusedItem(){return this.#t.getFocusedItem()}getFocusedPath(){return this.#t.getFocusedPath()}getFocusedIndex(){return this.#t.getFocusedIndex()}getVisibleCount(){return this.#t.getVisibleCount()}getVisibleRows(e,t){return this.#t.getVisibleRows(e,t)}getSelectedPaths(){return this.#t.getSelectedPaths()}getComposition(){return this.#e}getItemHeight(){return this.#u.itemHeight}getDensityFactor(){return this.#u.factor}subscribe(e){let t=!1;return this.#t.subscribe(()=>{if(!t){t=!0;return}e()})}focusPath(e){this.#t.focusPath(e)}focusFirstItem(){this.#t.focusFirstItem()}focusLastItem(){this.#t.focusLastItem()}focusNextItem(){this.#t.focusNextItem()}focusPreviousItem(){this.#t.focusPreviousItem()}focusParentItem(){this.#t.focusParentItem()}scrollToPath(e,t){this.#t.scrollToPath(e,t)}focusNearestPath(e){return this.#t.focusNearestPath(e)}add(e){this.#t.add(e)}batch(e){this.#t.batch(e)}applyGitStatusPatch(e){let t=s1(this.#p,e);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&C4(n.wrapper,this.#w())}move(e,t,n){this.#t.move(e,t,n)}onMutation(e,t){return this.#t.onMutation(e,t)}setSearch(e){this.#t.setSearch(e)}openSearch(e){this.#t.openSearch(e)}closeSearch(){this.#t.closeSearch()}isSearchOpen(){return this.#t.isSearchOpen()}getSearchValue(){return this.#t.getSearchValue()}getSearchMatchingPaths(){return this.#t.getSearchMatchingPaths()}focusNextSearchMatch(){this.#t.focusNextSearchMatch()}focusPreviousSearchMatch(){this.#t.focusPreviousSearchMatch()}startRenaming(e,t){return this.#t.startRenaming(e,t)}remove(e,t){this.#t.remove(e,t)}resetPaths(e,t){Array.isArray(e)?this.#t.resetPaths(e,t):this.#t.resetPaths(e)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),C4(t.wrapper,this.#w()))}setGitStatus(e){let t=o1(e,this.#p);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&C4(n.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),C4(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),w4(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),C4(r,this.#w())}#C(){return{initialViewportHeight:k4({initialVisibleRowCount:this.#d.initialVisibleRowCount,itemHeight:this.#d.itemHeight}),itemHeight:this.#d.itemHeight,overscan:this.#d.overscan,stickyFolders:this.#d.stickyFolders}}#w(){return{composition:this.#e,controller:this.#t,gitStatusByPath:this.#p?.statusByPath,ignoredGitDirectories:this.#p?.ignoredDirectoryPaths,directoriesWithGitChanges:this.#p?.directoriesWithChanges,icons:this.#m,instanceId:this.#n,renamingEnabled:this.#a,renderRowDecoration:this.#i,searchBlurBehavior:this.#o,searchEnabled:this.#s,searchFakeFocus:this.#c,slotHost:this.#l,...this.#C()}}#T(){let e=this.#f,t=this.#b;return e==null||t==null?null:{host:e,wrapper:t}}#E(e,t){let n=e.shadowRoot;n!=null&&(this.#k(n),this.#A(n)),this.#j(t)}#D(){let e=this.#r;if(e==null)return;let t=this.#t.getSelectionVersion();t!==this.#v&&(this.#v=t,e(this.#t.getSelectedPaths()))}#O(){let e=this.#e?.header?.render;if(e!=null){this.#l.setSlotContent(Xq,e());return}this.#l.setSlotHtml(Xq,this.#e?.header?.html??null)}#k(e){let t=M4(e).find(e=>j4(e)),n=A4(mY(yY(this.#m).set));n!=null&&(t==null||t.outerHTML!==n.outerHTML)&&(t==null?e.prepend(n):t.replaceWith(n))}#A(e){let t=M4(e),n=t.find(e=>j4(e)),r=t.filter(e=>e!==n),i=yY(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=A4(i);if(a==null){for(let e of r)e.remove();return}if(r.length!==1||r[0].outerHTML!==a.outerHTML){for(let e of r)e.remove();e.appendChild(a)}}#j(e){let t=yY(this.#m);t.colored&&gY(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${Kq}]`);if(this.#g==null&&t instanceof HTMLStyleElement&&(this.#g=t),this.#h==null||this.#h===``){this.#g?.remove(),this.#g=void 0,this.#_=void 0;return}(this.#g?.parentNode!==e||this.#_!==this.#h)&&(this.#g??=document.createElement(`style`),this.#g.setAttribute(Kq,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=EY(this.#h),this.#_=this.#h)}#N(e){if(this.#b!=null)return this.#b;let t=e.shadowRoot;if(t==null)throw Error(`FileTree requires a shadow root`);let n=Array.from(t.children).filter(e=>e instanceof HTMLDivElement&&typeof e.dataset.fileTreeId==`string`&&e.dataset.fileTreeId.length>0),r=n.find(e=>e.dataset.fileTreeId===this.#n)??n[0];return r!=null&&(this.#n=r.dataset.fileTreeId??this.#n),this.#b=r??document.createElement(`div`),this.#b.dataset.fileTreeId=this.#n,this.#b.dataset.fileTreeVirtualizedWrapper=`true`,this.#E(e,this.#b),this.#b.parentNode!==t&&t.appendChild(this.#b),this.#b}#P(e,t){let n=e??this.#f??document.createElement(`file-tree-container`);t!=null&&n.parentNode!==t&&t.appendChild(n);let r=n.shadowRoot??n.attachShadow({mode:`open`});return MY(n,r),this.#M(r),n.dataset.fileTreeVirtualized=`true`,n.style.display=`flex`,this.#F(n),this.#l.setHost(n),this.#f=n,n}#F(e){e.style.getPropertyValue(`--trees-item-height`)===``&&(e.style.setProperty(`--trees-item-height`,`${String(this.#u.itemHeight)}px`),this.#x=!0),e.style.getPropertyValue(`--trees-density-override`)===``&&(e.style.setProperty(`--trees-density-override`,String(this.#u.factor)),this.#S=!0)}#I(e){this.#x&&=(e.style.removeProperty(`--trees-item-height`),!1),this.#S&&=(e.style.removeProperty(`--trees-density-override`),!1)}};function P4(e){let[t]=(0,p.useState)(()=>new N4(e)),n=(0,p.useRef)({timeout:null,model:t});return(0,p.useEffect)(()=>{let{current:e}=n;return e.timeout!=null&&(clearTimeout(e.timeout),e.timeout=null),()=>{e.timeout=setTimeout(()=>e.model.cleanUp(),1)}},[]),{model:t}}function F4(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(!Object.is(e[n],t[n]))return!1;return!0}function I4(e,t,n){return Object.is(e,t)||n?.(e,t)===!0}function L4(e,t,n){let r=(0,p.useRef)({hasValue:!1,model:null,selector:null,value:void 0}),i=(0,p.useCallback)(t=>e.subscribe(t),[e]),a=(0,p.useCallback)(()=>{let i=r.current,a=t(e);if(i.model!==e||i.selector!==t||!i.hasValue)return i.hasValue=!0,i.model=e,i.selector=t,i.value=a,a;let o=i.value;return I4(o,a,n)?o:(i.value=a,a)},[n,e,t]);return(0,p.useSyncExternalStore)(i,a,a)}function R4(e,t){return e.isOpen===t.isOpen&&e.value===t.value&&F4(e.matchingPaths,t.matchingPaths)}function z4(e){let t=L4(e,e=>({isOpen:e.isSearchOpen(),matchingPaths:e.getSearchMatchingPaths(),value:e.getSearchValue()}),R4);return(0,p.useMemo)(()=>({...t,close:()=>{e.closeSearch()},focusNextMatch:()=>{e.focusNextSearchMatch()},focusPreviousMatch:()=>{e.focusPreviousSearchMatch()},open:t=>{e.openSearch(t)},setValue:t=>{e.setSearch(t)}}),[e,t])}function B4(e){let t=new Set;for(let n of e)for(let e=n.indexOf(`/`);e!==-1;e=n.indexOf(`/`,e+1))t.add(n.slice(0,e));return[...t]}function V4(e,t){let n=[];for(let r of B4(t)){let t=e.getItem(r);(!t||!t.isDirectory()||t.isExpanded())&&n.push(r)}return n}function H4(e){let t=e.status===`A`?`added`:e.status===`D`?`deleted`:e.status===`R`||e.status===`C`?`renamed`:`modified`;return{path:e.path,status:t}}function U4(e){return e.map(e=>`${e.path}\0${H4(e).status}`).join(`
|
|
2996
|
-
`)}function
|
|
2997
|
-
`)}function
|
|
2995
|
+
}`}var AY=new WeakMap;function jY(e){let t=AY.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(Xq,`true`);let r=document.createElement(`div`);r.style.position=`relative`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n);let i=Math.max(n.offsetWidth-n.clientWidth,0);return n.remove(),AY.set(e,i),i}function MY(e,t){if(!e.isConnected)return;let n=jY(t);if(n==null)return;let r=t.querySelector(`style[${Zq}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(Zq,``),t.appendChild(i)),i.textContent=`:host { ${Qq}: ${n}px; }`}var NY;function PY(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){NY??(NY=new CSSStyleSheet,NY.replaceSync(OY(EY)));let t=!1;try{e.adoptedStyleSheets=[NY],t=!0}catch{}if(t){e.querySelector(`style[${Jq}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(Jq,``),t.textContent=OY(EY),e.prepend(t)}}function FY(e,t){IY(e,t),PY(t),MY(e,t)}function IY(e,t){let n=e.querySelector(`template[shadowrootmode="open"], template[data-file-tree-shadowrootmode="open"]`);n instanceof HTMLTemplateElement&&(t.childNodes.length>0||(t.appendChild(n.content.cloneNode(!0)),n.hasAttribute(`shadowrootmode`)&&n.remove()))}if(typeof HTMLElement<`u`&&customElements.get(`file-tree-container`)==null){class e extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.shadowRoot??this.attachShadow({mode:`open`});FY(this,e)}}if(customElements.define(qq,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(qq)))e instanceof HTMLElement&&FY(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var LY=5,RY=32,zY=128;function BY(){return{childIdByNameId:new Map,childIds:[],childPositionById:new Map,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function VY(){return{childIdByNameId:null,childIds:[],childPositionById:null,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function HY(e,t){if(t.childIdByNameId!=null)return t.childIdByNameId;let n=new Map;for(let r of t.childIds){let t=e[r];t!=null&&n.set(t.nameId,r)}return t.childIdByNameId=n,n}function UY(e){if(e.childPositionById!=null)return e.childPositionById;let t=new Map;for(let n=0;n<e.childIds.length;n++){let r=e.childIds[n];r!=null&&t.set(r,n)}return e.childPositionById=t,t}function WY(e,t){e.childPositionById!=null&&e.childPositionById.set(t,e.childIds.length),e.childIds.push(t)}function GY(e,t){if(e.childPositionById!=null)for(let n=t;n<e.childIds.length;n++){let t=e.childIds[n];t!=null&&e.childPositionById.set(t,n)}}function KY(e,t){let n=0,r=0;for(let i of t.childIds){let t=e[i];t!=null&&(n+=t.subtreeNodeCount,r+=t.visibleSubtreeCount)}t.totalChildSubtreeNodeCount=n,t.totalChildVisibleSubtreeCount=r,XY(e,t)}function qY(e,t,n,r){if(e.totalChildSubtreeNodeCount+=n,e.totalChildVisibleSubtreeCount+=r,e.childVisibleChunkSums==null||r===0)return;let i=UY(e).get(t);if(i===void 0)return;let a=i>>LY;e.childVisibleChunkSums[a]+=r}function JY(e,t,n){let r=t.childVisibleChunkSums;if(r!=null){let i=n,a=0;for(let o of r){if(i<o){let r=ZY(e,t,a,i);return{...r,childVisibleIndex:n-r.localVisibleIndex}}i-=o,a+=RY}throw Error(`Visible child index ${String(n)} is out of range`)}let i=n;for(let r=0;r<t.childIds.length;r++){let a=t.childIds[r];if(a==null)continue;let o=e[a];if(o!=null){if(i<o.visibleSubtreeCount)return{childIndex:r,childVisibleIndex:n-i,localVisibleIndex:i};i-=o.visibleSubtreeCount}}throw Error(`Visible child index ${String(n)} is out of range`)}function YY(e,t,n){let r=0,i=t.childVisibleChunkSums,a=0;if(i!=null){let e=n>>LY;for(let t=0;t<e;t+=1)r+=i[t]??0;a=e<<LY}for(let i=a;i<n;i+=1){let n=t.childIds[i];if(n==null)continue;let a=e[n];a!=null&&(r+=a.visibleSubtreeCount)}return r}function XY(e,t){if(t.childIds.length<zY){t.childVisibleChunkSums=null;return}let n=Math.ceil(t.childIds.length/RY),r=new Int32Array(n);for(let n=0;n<t.childIds.length;n++){let i=t.childIds[n];if(i==null)continue;let a=e[i];a!=null&&(r[n>>LY]+=a.visibleSubtreeCount)}t.childVisibleChunkSums=r}function ZY(e,t,n,r){let i=Math.min(t.childIds.length,n+RY),a=r;for(let r=n;r<i;r++){let n=t.childIds[r];if(n==null)continue;let i=e[n];if(i!=null){if(a<i.visibleSubtreeCount)return{childIndex:r,localVisibleIndex:a};a-=i.visibleSubtreeCount}}throw Error(`Visible child index ${String(r)} is out of range`)}var QY=7,$Y=3,eX=8,tX=4;function nX(e,t,n=0){return e<<tX|n<<$Y|t}function rX(e){return e.depthAndFlags>>>tX}function iX(e){return(e.depthAndFlags&eX)>>$Y}function aX(e){return(e.depthAndFlags&eX)!==0}function oX(e){return e.depthAndFlags&QY}function sX(e,t){return(oX(e)&t)!==0}function cX(e,t){e.depthAndFlags|=t}function lX(e,t){e.depthAndFlags=nX(t,oX(e),iX(e))}var uX=Symbol(`benchmarkInstrumentation`);function dX(e,t){return t==null||Object.defineProperty(e,uX,{configurable:!0,enumerable:!1,value:t,writable:!1}),e}function fX(e){return e==null?null:e[uX]??null}function Q(e,t,n){return e==null?n():e.measurePhase(t,n)}function pX(e,t,n){!Number.isFinite(n)||e==null||e.setCounter(t,n)}function mX(e){return e>=48&&e<=57}function hX(e){let t=[],n=0,r=0;for(;r<e.length;){for(;r<e.length&&!mX(e.charCodeAt(r));)r+=1;if(r>=e.length)break;r>n&&t.push(e.slice(n,r));let i=0;for(;r<e.length&&mX(e.charCodeAt(r));)i=i*10+(e.charCodeAt(r)-48),r+=1;t.push(i),n=r}return(n<e.length||t.length===0)&&t.push(e.slice(n)),t}function gX(e){let t=e.toLowerCase();return{lowerValue:t,tokens:hX(t)}}function _X(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++){let n=e[r],i=t[r];if(n===i)continue;if(typeof n==`number`&&typeof i==`number`)return n<i?-1:1;let a=String(n),o=String(i);if(a!==o)return a<o?-1:1}return e.length===t.length?0:e.length<t.length?-1:1}function vX(e,t){if(e.tokens.length===1&&t.tokens.length===1&&typeof e.tokens[0]==`string`&&typeof t.tokens[0]==`string`)return e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1;let n=_X(e.tokens,t.tokens);return n===0?e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1:n}function yX(e,t,n){let r=vX(n(e),n(t));return r===0?e===t?0:e<t?-1:1:r}function bX(e,t){return yX(e,t,gX)}function xX(e,t){return t===e.segments.length-1?+!!e.isDirectory:1}function SX(e,t){let n=Math.min(e.segments.length,t.segments.length);for(let r=0;r<n;r++){let n=e.segments[r],i=t.segments[r];if(n===i)continue;let a=xX(e,r);return a===xX(t,r)?bX(n,i):a===1?-1:1}return e.segments.length===t.segments.length?e.isDirectory===t.isDirectory?0:e.isDirectory?-1:1:e.segments.length<t.segments.length?-1:1}function CX(e,t){return SX(e,t)}function wX(e,t,n){let r=e=>{let t=n.get(e);if(t!=null)return t;let r=gX(e);return n.set(e,r),r},i=Math.min(e.segments.length,t.segments.length);for(let n=0;n<i;n++){let i=e.segments[n],a=t.segments[n];if(i===a)continue;let o=xX(e,n);return o===xX(t,n)?yX(i,a,r):o===1?-1:1}return e.segments.length===t.segments.length?e.isDirectory===t.isDirectory?0:e.isDirectory?-1:1:e.segments.length<t.segments.length?-1:1}function TX(e,t){let n=e.sortKeyById[t];if(n!==void 0)return n;let r=e.valueById[t],i=gX(r);return e.sortKeyById[t]=i,i}function EX(e={}){return{flattenEmptyDirectories:e.flattenEmptyDirectories!==!1,sort:e.sort??`default`}}function DX(e){let t=e.length>0&&e.charCodeAt(e.length-1)===47,n=t?e.length-1:e.length,r=[],i=0;for(let t=0;t<n;t++)e.charCodeAt(t)===47&&(r.push(e.slice(i,t)),i=t+1);return r.push(e.slice(i,n)),{hasTrailingSlash:t,segments:r}}function OX(e){let{hasTrailingSlash:t,segments:n}=DX(e);return{basename:n[n.length-1]??``,isDirectory:t,path:e,segments:n}}function kX(e){if(e.length===0)return{requiresDirectory:!1,segments:[]};let{hasTrailingSlash:t,segments:n}=DX(e);return{requiresDirectory:t,segments:n}}function AX(){let e=new Map;return e.set(``,0),{idByValue:e,valueById:[``],sortKeyById:[gX(``)]}}function jX(e,t){let n=e.idByValue.get(t);if(n!==void 0)return n;let r=e.valueById.length;return e.idByValue.set(t,r),e.valueById.push(t),r}function MX(e,t){let n=e.valueById[t];if(n===void 0)throw Error(`Unknown segment ID: ${String(t)}`);return n}var NX=Symbol(`pathStorePreparedInputKind`);function PX(e,t){return e[NX]=t,e}function FX(e){return{basename:e.basename,depth:e.segments.length,isDirectory:e.isDirectory,path:e.path,segments:e.segments}}function IX(e,t,n){return n==="default"?CX(e,t):n(FX(e),FX(t))}function LX(){return{depthAndFlags:nX(0,3,1),nameId:0,parentId:0,subtreeNodeCount:1,visibleSubtreeCount:1}}function RX(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e[r]!==t[r])return r;return n}function zX(e){return e.isDirectory?e.segments.length:e.segments.length-1}function BX(e){return Array.isArray(e)&&e.every(e=>typeof e==`object`&&!!e&&typeof e.path==`string`&&Array.isArray(e.segments)&&typeof e.basename==`string`&&typeof e.isDirectory==`boolean`)}function VX(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function HX(e,t={}){return JX(e,t).map(e=>e.path)}function UX(e,t={}){let n=JX(e,t);return PX({paths:n.map(e=>e.path),preparedPaths:n},`prepared`)}function WX(e){let t=e.length,n=!1;for(let r=0;r<t;r+=1){let t=e[r];if(t.length>0&&t.charCodeAt(t.length-1)===47){n=!0;break}}return PX({paths:e,presortedPaths:e,presortedPathsContainDirectories:n},`presorted`)}function GX(e){let t=e,n=t.preparedPaths;if(t[NX]===`prepared`&&n!=null)return n;if(!BX(n))throw Error(`preparedInput must come from PathStore.prepareInput()`);return n}function KX(e){let t=e;return t[NX]===`presorted`&&t.presortedPaths!=null||VX(t.presortedPaths)?t.presortedPaths:null}function qX(e){let t=e;return typeof t.presortedPathsContainDirectories==`boolean`?t.presortedPathsContainDirectories:null}function JX(e,t={}){let n=EX(t),r=fX(t);pX(r,`workload.inputFiles`,e.length);let i=Q(r,`store.preparePathEntries.parse`,()=>e.map(e=>OX(e)));return Q(r,`store.preparePathEntries.sort`,()=>i.sort((e,t)=>IX(e,t,n.sort))),i}var YX=class{directories=new Map;directoryStack=[0];presortedDirectoryNodeIds=[];initialExpandedPathSet;createdDirectoriesAllExpanded=!1;createdDirectoryCount=0;lastPreparedPath=null;nodes=[LX()];options;instrumentation;segmentSortKeyCache=new Map;segmentTable=AX();hasDeferredDirectoryIndexes=!1;constructor(e={}){this.instrumentation=fX(e),this.options=EX(e);let t=e.initialExpandedPaths??null;if(t==null||t.length===0)this.initialExpandedPathSet=null;else{let e=new Set,n=t.length;for(let r=0;r<n;r+=1){let n=t[r],i=n.length;e.add(i>0&&n.charCodeAt(i-1)===47?n.slice(0,i-1):n)}this.initialExpandedPathSet=e,this.createdDirectoriesAllExpanded=!0}this.directories.set(0,BY())}appendPaths(e){return Q(this.instrumentation,`store.builder.appendPaths.parse`,()=>this.appendPreparedPaths(e.map(e=>OX(e))))}appendPreparedPaths(e,t=!0){return this.createdDirectoriesAllExpanded=!1,Q(this.instrumentation,`store.builder.appendPreparedPaths`,()=>{for(let n of e)this.appendPreparedPath(n,t)}),this}appendPresortedPaths(e,t=null){return Q(this.instrumentation,`store.builder.appendPresortedPaths`,()=>{if(t===!1){this.appendPresortedFilePaths(e);return}this.createdDirectoriesAllExpanded=!1;let n=null,r=0,i=this.nodes,a=this.segmentTable,o=a.idByValue,s=a.valueById,c=this.directoryStack,l=0,u=``,d=0;for(let t of e){if(n===t)throw Error(`Duplicate path: "${t}"`);let e=t.length>0&&t.charCodeAt(t.length-1)===47,a=e?t.length-1:t.length,f=0,p=0;if(n!=null){if(u.length>0&&t.length>u.length&&t.startsWith(u))f=d,p=u.length;else{let r=Math.min(a,n.length),i=!0;for(let e=0;e<r;e++){let r=t.charCodeAt(e);if(r!==n.charCodeAt(e)){i=!1;break}r===47&&(f++,p=e+1)}i&&e&&r===a&&n.length>a&&n.charCodeAt(a)===47&&(f++,p=a+1)}}l=f,r=f;let m=p,h=t.indexOf(`/`,m);for(;h>=0&&h<a;){let e=c[l];if(e===void 0)throw Error(`Directory stack underflow while building the path store`);r++;let n=t.slice(m,h),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n));let u=i.length;i.push({depthAndFlags:nX(r,0,1),nameId:a,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),this.recordCreatedDirectoryPath(t.slice(0,h)),l++,c[l]=u,m=h+1,h=t.indexOf(`/`,m)}if(e){if(m<a){let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory parent for "${t}"`);r++;let n=t.slice(m,a),u=o.get(n);u===void 0&&(u=s.length,o.set(n,u),s.push(n));let d=i.length;i.push({depthAndFlags:nX(r,0,1),nameId:u,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),l++,c[l]=d,m=a+1}let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory node for "${t}"`);this.promoteDirectoryToExplicit(e,t)}else{let e=c[l];if(e===void 0)throw Error(`Unable to resolve file parent for "${t}"`);let n=t.slice(m),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n)),i.push({depthAndFlags:nX(r+1,0),nameId:a,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1})}m!==u.length&&(u=t.substring(0,m),d=r),n=t}c.length=l+1,n!=null&&(this.lastPreparedPath=OX(n)),this.hasDeferredDirectoryIndexes=!0}),this}appendPresortedFilePaths(e){let t=null,n=0,r=this.nodes,i=this.segmentTable,a=i.idByValue,o=i.valueById,s=this.directoryStack,c=0,l=``,u=0;for(let i of e){if(t===i)throw Error(`Duplicate path: "${i}"`);let e=i.length,d=0,f=0;if(t!=null){if(l.length>0&&i.length>l.length&&i.startsWith(l))d=u,f=l.length;else{let n=Math.min(e,t.length);for(let e=0;e<n;e++){let n=i.charCodeAt(e);if(n!==t.charCodeAt(e))break;n===47&&(d++,f=e+1)}}}c=d,n=d;let p=f,m=i.indexOf(`/`,p);for(;m>=0;){let e=s[c];if(e===void 0)throw Error(`Directory stack underflow while building the path store`);n++;let t=i.slice(p,m),l=a.get(t);l===void 0&&(l=o.length,a.set(t,l),o.push(t));let u=r.length;r.push({depthAndFlags:nX(n,0,1),nameId:l,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),this.recordCreatedDirectoryPath(i.slice(0,m)),this.presortedDirectoryNodeIds.push(u),c++,s[c]=u,p=m+1,m=i.indexOf(`/`,p)}let h=s[c];if(h===void 0)throw Error(`Unable to resolve file parent for "${i}"`);let g=i.slice(p),_=a.get(g);_===void 0&&(_=o.length,a.set(g,_),o.push(g)),r.push({depthAndFlags:nX(n+1,0),nameId:_,parentId:h,subtreeNodeCount:1,visibleSubtreeCount:1}),p!==l.length&&(l=i.substring(0,p),u=n),t=i}s.length=c+1,t!=null&&(this.lastPreparedPath=OX(t)),this.hasDeferredDirectoryIndexes=!0}finish(e={}){let t=e.skipSubtreeCountPass===!0;return this.hasDeferredDirectoryIndexes?(Q(this.instrumentation,`store.builder.buildDirectoryIndexes`,()=>this.buildPresortedFinish(t)),this.hasDeferredDirectoryIndexes=!1):t||Q(this.instrumentation,`store.builder.computeSubtreeCounts`,()=>this.computeSubtreeCounts(0)),{directories:this.directories,nodes:this.nodes,options:this.options,rootId:0,segmentTable:this.segmentTable,presortedDirectoryNodeIds:this.presortedDirectoryNodeIds.length>0?this.presortedDirectoryNodeIds:null}}didMatchAllInitialExpandedPaths(){return this.createdDirectoriesAllExpanded&&this.initialExpandedPathSet!=null&&this.createdDirectoryCount===this.initialExpandedPathSet.size}appendPreparedPath(e,t){if(this.hasDeferredDirectoryIndexes&&=(this.buildDirectoryIndexes(),!1),this.lastPreparedPath!=null){if(e.path===this.lastPreparedPath.path)throw Error(`Duplicate path: "${e.path}"`);if(t&&(this.options.sort==="default"?wX(this.lastPreparedPath,e,this.segmentSortKeyCache):IX(this.lastPreparedPath,e,this.options.sort))>0)throw Error(`Builder input must be sorted before appendPaths(): "${e.path}"`)}let n=this.lastPreparedPath,r=zX(e),i=n==null?0:zX(n),a=n==null?0:RX(n.segments,e.segments),o=Math.min(a,r,i);this.directoryStack.length=o+1;for(let n=o;n<r;n++){let r=this.directoryStack[this.directoryStack.length-1];if(r===void 0)throw Error(`Directory stack underflow while building the path store`);let i=t?this.getOrCreateDirectoryChild(r,e.segments[n]):this.createDirectoryChild(r,e.segments[n]);this.directoryStack.push(i)}if(e.isDirectory){let t=this.directoryStack[this.directoryStack.length-1];if(t===void 0)throw Error(`Unable to resolve directory node for "${e.path}"`);this.promoteDirectoryToExplicit(t,e.path),this.lastPreparedPath=e;return}let s=this.directoryStack[this.directoryStack.length-1];if(s===void 0)throw Error(`Unable to resolve file parent for "${e.path}"`);t?this.createFileChild(s,e.basename,e.path):this.createFileChildUnchecked(s,e.basename),this.lastPreparedPath=e}recordCreatedDirectoryPath(e){!this.createdDirectoriesAllExpanded||this.initialExpandedPathSet==null||(this.createdDirectoryCount+=1,this.initialExpandedPathSet.has(e)||(this.createdDirectoriesAllExpanded=!1))}createFileChild(e,t,n){let r=jX(this.segmentTable,t),i=this.getDirectoryIndex(e),a=i.childIdByNameId;if(a!=null&&a.get(r)!==void 0)throw Error(`Path collides with an existing entry: "${n}"`);let o=this.nodes[e];if(o===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let s=this.nodes.length;return this.nodes.push({depthAndFlags:nX(rX(o)+1,0),nameId:r,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),a?.set(r,s),WY(i,s),s}createFileChildUnchecked(e,t){let n=jX(this.segmentTable,t),r=this.getDirectoryIndex(e),i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:nX(rX(i)+1,0),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),WY(r,a),a}getOrCreateDirectoryChild(e,t){let n=jX(this.segmentTable,t),r=this.getDirectoryIndex(e);if(r.childIdByNameId!=null){let e=r.childIdByNameId.get(n);if(e!==void 0){let n=this.nodes[e];if(n!=null&&!aX(n))throw Error(`Path collides with an existing file while creating directory "${t}"`);return e}}let i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:nX(rX(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),WY(r,a),this.directories.set(a,BY()),a}createDirectoryChild(e,t){let n=jX(this.segmentTable,t),r=this.getDirectoryIndex(e),i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:nX(rX(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),WY(r,a),this.directories.set(a,BY()),a}promoteDirectoryToExplicit(e,t){let n=this.nodes[e];if(n===void 0)throw Error(`Unknown directory node ID: ${String(e)}`);if(!aX(n))throw Error(`Path is not a directory: "${t}"`);if(sX(n,1))throw Error(`Duplicate path: "${t}"`);cX(n,1)}getDirectoryIndex(e){let t=this.directories.get(e);if(t!==void 0)return t;throw Error(`Unknown directory child index for node ${String(e)}`)}buildPresortedFinish(e){let t=this.nodes,n=this.directories;n.set(0,VY());let r=-1,i=null;for(let e=1;e<t.length;e++){let a=t[e];if(a==null)continue;if(aX(a)){let t=VY();n.set(e,t),r=e,i=t}let o;a.parentId===r?o=i:(o=n.get(a.parentId),r=a.parentId,i=o??null),o?.childIds.push(e)}if(!e)for(let e=t.length-1;e>=1;e--){let n=t[e];if(n==null)continue;let r=t[n.parentId];r!=null&&(r.subtreeNodeCount+=n.subtreeNodeCount,r.visibleSubtreeCount+=n.visibleSubtreeCount)}}buildDirectoryIndexes(){let e=this.nodes;for(let t=1;t<e.length;t++){let n=e[t];if(n==null)continue;aX(n)&&this.directories.set(t,BY());let r=this.directories.get(n.parentId);r!=null&&(r.childIdByNameId!=null&&r.childIdByNameId.set(n.nameId,t),WY(r,t))}}computeSubtreeCounts(e){let t=this.nodes[e];if(t===void 0)throw Error(`Unknown node ID: ${String(e)}`);if(!aX(t))return t.subtreeNodeCount=1,t.visibleSubtreeCount=1,1;let n=this.getDirectoryIndex(e),r=1;for(let e of n.childIds)r+=this.computeSubtreeCounts(e);return KY(this.nodes,n),t.subtreeNodeCount=r,t.visibleSubtreeCount=r,r}};function XX(e,t=`closed`,n=null){let r=QX(t);return{activeNodeCount:e.nodes.length-1,collapsedDirectoryIds:new Set,collapseNewDirectoriesByDefault:!1,defaultExpansion:r,directoriesOpenByDefault:r===`open`,hasCollapsedDirectoryOverrides:!1,directoryLoadInfoById:new Map,expandedDirectoryIds:new Set,instrumentation:n,listeners:new Map,pathCacheByNodeId:new Map([[e.rootId,{path:``,version:0}]]),pathCacheVersion:0,snapshot:e,transactionStack:[]}}function ZX(){return{affectedAncestorIds:new Set,affectedNodeIds:new Set,events:[]}}function QX(e){if(typeof e!=`number`)return e;if(!Number.isInteger(e)||e<0)throw Error(`initialExpansion must be "open", "closed", or a non-negative integer depth. Received: ${String(e)}`);return e}function $X(e,t){return sX(t,2)||e.defaultExpansion===`open`?!0:e.defaultExpansion!==`closed`&&rX(t)<=e.defaultExpansion}function eZ(e,t,n=e.snapshot.nodes[t]){return n==null||!aX(n)?!1:e.directoriesOpenByDefault&&!e.hasCollapsedDirectoryOverrides?!0:e.collapsedDirectoryIds.has(t)?!1:e.expandedDirectoryIds.has(t)?!0:$X(e,n)}function tZ(e,t,n,r=e.snapshot.nodes[t]){if(r==null||!aX(r))return;let i=$X(e,r);if(n){if(i){e.collapsedDirectoryIds.delete(t),e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0;return}e.expandedDirectoryIds.add(t);return}if(i){e.collapsedDirectoryIds.add(t),e.hasCollapsedDirectoryOverrides=!0;return}e.expandedDirectoryIds.delete(t)}function nZ(e,t){let n=e.directoryLoadInfoById.get(t);if(n!=null)return n;let r={activeAttemptId:null,errorMessage:null,nextAttemptId:1,state:`loaded`};return e.directoryLoadInfoById.set(t,r),r}function rZ(e,t){return e.directoryLoadInfoById.get(t)?.state??`loaded`}function iZ(e,t){let n=nZ(e,t);if(n.state===`loading`&&n.activeAttemptId!=null)return{attemptId:n.activeAttemptId,nodeId:t,reused:!0};let r=n.nextAttemptId;return n.activeAttemptId=r,n.errorMessage=null,n.nextAttemptId+=1,n.state=`loading`,{attemptId:r,nodeId:t,reused:!1}}function aZ(e,t){let n=nZ(e,t);n.activeAttemptId=null,n.errorMessage=null,n.state=`unloaded`}function oZ(e,t,n){let r=e.directoryLoadInfoById.get(t);return r==null||r.activeAttemptId!==n?!1:(r.activeAttemptId=null,r.errorMessage=null,r.state=`loaded`,!0)}function sZ(e,t,n){return e.directoryLoadInfoById.get(t)?.activeAttemptId===n}function cZ(e,t,n,r){let i=e.directoryLoadInfoById.get(t);return i==null||i.activeAttemptId!==n?!1:(i.activeAttemptId=null,i.errorMessage=r??null,i.state=`error`,!0)}function lZ(e,t){e.directoryLoadInfoById.delete(t)}function uZ(e,t,n){let r=n,i=e.listeners.get(t);return i==null?e.listeners.set(t,new Set([r])):i.add(r),()=>{let n=e.listeners.get(t);n!=null&&(n.delete(r),n.size===0&&e.listeners.delete(t))}}function dZ(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`add`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function fZ(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`remove`,path:e.path,projectionChanged:e.projectionChanged,recursive:e.recursive,visibleCountDelta:null}}function pZ(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,from:e.from,operation:`move`,projectionChanged:e.projectionChanged,to:e.to,visibleCountDelta:null}}function mZ(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`expand`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function hZ(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`collapse`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function gZ(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`mark-directory-unloaded`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function _Z(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,operation:`begin-child-load`,path:e.path,projectionChanged:e.projectionChanged,reused:e.reused,visibleCountDelta:null}}function vZ(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:e.childEvents.some(e=>e.canonicalChanged),childEvents:e.childEvents,operation:`apply-child-patch`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function yZ(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,operation:`complete-child-load`,path:e.path,projectionChanged:e.projectionChanged,stale:e.stale,visibleCountDelta:null}}function bZ(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,errorMessage:e.errorMessage,operation:`fail-child-load`,path:e.path,projectionChanged:e.projectionChanged,stale:e.stale,visibleCountDelta:null}}function xZ(e){return{activeNodeCountAfter:e.activeNodeCountAfter,activeNodeCountBefore:e.activeNodeCountBefore,affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],cachedPathEntryCountAfter:e.cachedPathEntryCountAfter,cachedPathEntryCountBefore:e.cachedPathEntryCountBefore,canonicalChanged:!1,idsPreserved:e.idsPreserved,loadInfoEntryCountAfter:e.loadInfoEntryCountAfter,loadInfoEntryCountBefore:e.loadInfoEntryCountBefore,mode:e.mode,operation:`cleanup`,projectionChanged:e.projectionChanged,reclaimedCachedPathEntryCount:e.reclaimedCachedPathEntryCount,reclaimedLoadInfoEntryCount:e.reclaimedLoadInfoEntryCount,reclaimedNodeSlotCount:e.reclaimedNodeSlotCount,reclaimedSegmentCount:e.reclaimedSegmentCount,segmentCountAfter:e.segmentCountAfter,segmentCountBefore:e.segmentCountBefore,totalNodeSlotCountAfter:e.totalNodeSlotCountAfter,totalNodeSlotCountBefore:e.totalNodeSlotCountBefore,visibleCountDelta:null}}function SZ(e,t,n){return{...n,visibleCountDelta:NZ(e)-t}}function CZ(e,t){let n=NZ(e),r=ZX();e.transactionStack.push(r);try{t()}catch(t){throw EZ(e,r,!1),t}EZ(e,r,!0,NZ(e)-n)}function wZ(e,t){let n=e.instrumentation;if(n==null){TZ(e,t);return}Q(n,`store.events.record`,()=>TZ(e,t))}function TZ(e,t){let n=e.transactionStack[e.transactionStack.length-1]??null;if(n==null){jZ(e,t);return}n.events.push(t),AZ(n,t)}function EZ(e,t,n,r=null){if(e.transactionStack.pop()!==t)throw Error(`Transaction stack underflow`);if(!n)return;let i=e.transactionStack[e.transactionStack.length-1]??null;if(i!=null){let n=e.instrumentation;n==null?kZ(i,t):Q(n,`store.events.batch.merge`,()=>kZ(i,t));return}let a=DZ(t,r),o=e.instrumentation;if(o==null){jZ(e,a);return}Q(o,`store.events.batch.commit`,()=>jZ(e,a))}function DZ(e,t){return{affectedAncestorIds:[...e.affectedAncestorIds],affectedNodeIds:[...e.affectedNodeIds],canonicalChanged:e.events.some(e=>e.canonicalChanged),events:[...e.events],operation:`batch`,projectionChanged:e.events.some(e=>e.projectionChanged),visibleCountDelta:t}}function OZ(e,t){for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n);for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n)}function kZ(e,t){for(let n of t.events)e.events.push(n);OZ(e,t)}function AZ(e,t){for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n);for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n)}function jZ(e,t){let n=e.instrumentation;if(n==null){MZ(e,t);return}Q(n,`store.events.emit`,()=>MZ(e,t))}function MZ(e,t){e.listeners.get(t.operation)?.forEach(e=>e(t)),e.listeners.get(`*`)?.forEach(e=>e(t))}function NZ(e){return e.snapshot.nodes[e.snapshot.rootId]?.visibleSubtreeCount??0}function PZ(e,t){if(e.snapshot.options.flattenEmptyDirectories!==!0)return null;let n=e.snapshot.nodes[t];if(n==null||!aX(n)||sX(n,2))return null;let r=e.snapshot.directories.get(t);if(r==null||r.childIds.length!==1)return null;let i=r.childIds[0];if(i==null)return null;let a=e.snapshot.nodes[i];return a==null||!aX(a)?null:i}function FZ(e,t){let n=t;for(;;){let t=PZ(e,n);if(t==null)return n;n=t}}function IZ(e,t){let n=[t],r=t;for(;;){let t=PZ(e,r);if(t==null)return n;n.push(t),r=t}}function LZ(e,t){let n=t==null?e.snapshot.rootId:qZ(e,t);return n==null?[]:ZZ(e,n)}function RZ(e,t){let n=OX(t),r=n.isDirectory?n.segments:n.segments.slice(0,-1),i=fQ(e,dQ(e,r)),{createdNodeIds:a,directoryId:o}=QZ(e,r),s=new Set(a),c=o;if(n.isDirectory){let n=XZ(e,o);if(sX(n,1))throw Error(`Path already exists: "${t}"`);cX(n,1),e.pathCacheByNodeId.set(o,{path:t,version:e.pathCacheVersion}),s.add(o)}else c=eQ(e,o,n.basename),s.add(c);WZ(e,o);let l=fQ(e,o);return dZ({affectedAncestorIds:KZ(e,c),affectedNodeIds:[...s],path:t,projectionChanged:pQ(i,l)})}function zZ(e,t,n){let r=qZ(e,t);if(r==null)throw Error(`Path does not exist: "${t}"`);let i=XZ(e,r);if(sX(i,2))throw Error(`The root node cannot be removed`);if(aX(i)&&YZ(e,r).childIds.length>0&&n.recursive!==!0)throw Error(`Cannot remove a non-empty directory without recursive: "${t}"`);let a=i.parentId,o=fQ(e,a),s=lQ(e,r);rQ(e,a,r,i.nameId),uQ(e,a),WZ(e,a);let c=fQ(e,a);return fZ({affectedAncestorIds:KZ(e,a),affectedNodeIds:s,path:t,projectionChanged:pQ(o,c),recursive:n.recursive===!0})}function BZ(e,t,n,r){let i=qZ(e,t);if(i==null)throw Error(`Source path does not exist: "${t}"`);let a=XZ(e,i);if(sX(a,2))throw Error(`The root node cannot be moved`);let o=r.collision??`error`,s=sQ(e,i,n),c=fQ(e,a.parentId),l=fQ(e,s.parentId),u=MX(e.snapshot.segmentTable,a.nameId),d=jX(e.snapshot.segmentTable,s.basename);if(s.parentId===a.parentId&&u===s.basename)return null;if(aX(a)&&_Q(e,i,s.parentId))throw Error(`Cannot move a directory into one of its descendants`);let f=HY(e.snapshot.nodes,YZ(e,s.parentId)).get(d),p=s.existingNodeId??f??null;if(p!=null&&p!==i&&cQ(e,p,o,iX(a))===`skip`)return null;let m=a.parentId;rQ(e,m,i,a.nameId),a.parentId=s.parentId,a.nameId=d,e.pathCacheByNodeId.delete(i),gQ(e,i),nQ(e,s.parentId,i),uQ(e,m),e.pathCacheVersion++,WZ(e,m),s.parentId!==m&&WZ(e,s.parentId);let h=fQ(e,m),g=fQ(e,s.parentId);return pZ({affectedAncestorIds:[...new Set([...KZ(e,m),...KZ(e,s.parentId)])],affectedNodeIds:[i],from:t,projectionChanged:mQ([c,l],[h,g]),to:UZ(e,i)})}function VZ(e,t){let n=e.pathCacheByNodeId.get(t);return n!=null&&n.version===e.pathCacheVersion?n.path:null}function HZ(e,t,n){return e.pathCacheByNodeId.set(t,{path:n,version:e.pathCacheVersion}),n}function UZ(e,t){let n=XZ(e,t),r=VZ(e,t);if(r!=null)return r;if(sX(n,2))return HZ(e,t,``);let i=UZ(e,n.parentId),a=MX(e.snapshot.segmentTable,n.nameId),o=i.length===0?a:`${i}${a}`;return HZ(e,t,aX(n)?`${o}/`:o)}function WZ(e,t){let n=e.instrumentation;if(n==null){yQ(e,t);return}Q(n,`store.recomputeCountsUpwardFrom`,()=>yQ(e,t))}function GZ(e,t){let n=[[t,0]],{nodes:r,directories:i}=e.snapshot;for(;n.length>0;){let t=n[n.length-1],a=t[0],o=r[a];if(o==null||!aX(o)){vQ(e,a,o,!0),n.pop();continue}let s=i.get(a);if(s==null||t[1]>=s.childIds.length){vQ(e,a,o,!0),n.pop();continue}let c=s.childIds[t[1]++];n.push([c,0])}}function KZ(e,t){let n=[],r=t;for(;r!=null;){let t=XZ(e,r);if(n.push(r),r===e.snapshot.rootId)break;r=t.parentId}return n}function qZ(e,t){if(t.length===0)return e.snapshot.rootId;let n=kX(t);return JZ(e,n.segments,n.requiresDirectory)}function JZ(e,t,n){let r=e.snapshot.rootId;for(let n of t){let t=e.snapshot.segmentTable.idByValue.get(n);if(t===void 0)return null;let i=YZ(e,r),a=HY(e.snapshot.nodes,i).get(t);if(a===void 0)return null;r=a}let i=XZ(e,r);return n&&!aX(i)?null:r}function YZ(e,t){let n=e.snapshot.directories.get(t);if(n===void 0)throw Error(`Unknown directory child index for node ${String(t)}`);return n}function XZ(e,t){let n=e.snapshot.nodes[t];if(n===void 0||sX(n,4))throw Error(`Unknown node ID: ${String(t)}`);return n}function ZZ(e,t){let n=e.snapshot.nodes[t];if(n===void 0||sX(n,4))return[];if(!aX(n))return[UZ(e,t)];if(YZ(e,t).childIds.length===0)return sX(n,1)&&!sX(n,2)?[UZ(e,t)]:[];let r=[],i=[{childIndex:0,nodeId:t}];for(;i.length>0;){let t=i[i.length-1];if(t==null)break;let n=e.snapshot.nodes[t.nodeId];if(n===void 0||sX(n,4)){i.pop();continue}if(!aX(n)){r.push(UZ(e,t.nodeId)),i.pop();continue}let a=YZ(e,t.nodeId);if(a.childIds.length===0){sX(n,1)&&!sX(n,2)&&r.push(UZ(e,t.nodeId)),i.pop();continue}let o=a.childIds[t.childIndex];if(o==null){i.pop();continue}t.childIndex++,i.push({childIndex:0,nodeId:o})}return r}function QZ(e,t){let n=[],r=e.snapshot.rootId;for(let i of t){let t=jX(e.snapshot.segmentTable,i),a=YZ(e,r),o=HY(e.snapshot.nodes,a).get(t);if(o!==void 0){if(!aX(XZ(e,o)))throw Error(`Cannot create a directory that collides with an existing file: "${i}"`);r=o;continue}r=$Z(e,r,t),n.push(r)}return{createdNodeIds:n,directoryId:r}}function $Z(e,t,n){let r=XZ(e,t),i=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:nX(rX(r)+1,0,1),nameId:n,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),e.snapshot.directories.set(i,BY()),nQ(e,t,i),e.collapseNewDirectoriesByDefault&&(e.collapsedDirectoryIds.add(i),e.hasCollapsedDirectoryOverrides=!0),e.activeNodeCount++,i}function eQ(e,t,n){let r=jX(e.snapshot.segmentTable,n),i=YZ(e,t);if(HY(e.snapshot.nodes,i).has(r))throw Error(`Path already exists: "${xQ(e,t,n)}"`);let a=XZ(e,t),o=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:nX(rX(a)+1,0),nameId:r,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),nQ(e,t,o),e.activeNodeCount++,o}function tQ(e,t,n){let r=0,i=t.childIds.length;for(;r<i;){let a=r+i>>>1,o=t.childIds[a];if(o==null){i=a;continue}iQ(e,n,o)<0?i=a:r=a+1}return r}function nQ(e,t,n){let r=YZ(e,t),i=XZ(e,n);HY(e.snapshot.nodes,r).set(i.nameId,n),qY(r,n,i.subtreeNodeCount,i.visibleSubtreeCount);let a=tQ(e,r,n);r.childIds.splice(a,0,n),GY(r,a),XY(e.snapshot.nodes,r)}function rQ(e,t,n,r){let i=YZ(e,t),a=UY(i),o=a.get(n)??-1;HY(e.snapshot.nodes,i).delete(r),a.delete(n);let s=e.snapshot.nodes[n];s!=null&&qY(i,n,-s.subtreeNodeCount,-s.visibleSubtreeCount),o>=0&&(i.childIds.splice(o,1),GY(i,o),XY(e.snapshot.nodes,i))}function iQ(e,t,n){let r=e.snapshot.options.sort;return r==="default"?aQ(e,t,n):r(oQ(e,t),oQ(e,n))}function aQ(e,t,n){let r=XZ(e,t),i=XZ(e,n),a=aX(r);if(a!==aX(i))return a?-1:1;let o=vX(TX(e.snapshot.segmentTable,r.nameId),TX(e.snapshot.segmentTable,i.nameId));if(o!==0)return o;let s=MX(e.snapshot.segmentTable,r.nameId),c=MX(e.snapshot.segmentTable,i.nameId);return s===c?t<n?-1:1:s<c?-1:1}function oQ(e,t){let n=XZ(e,t),r=UZ(e,t),i=aX(n),a=i?r.slice(0,-1):r;return{basename:MX(e.snapshot.segmentTable,n.nameId),depth:rX(n),isDirectory:i,path:r,segments:a.length===0?[]:a.split(`/`)}}function sQ(e,t,n){let r=XZ(e,t),i=qZ(e,n);if(i!=null){let t=XZ(e,i);if(aX(t))return{basename:MX(e.snapshot.segmentTable,r.nameId),existingNodeId:null,parentId:i};let a=kX(n).segments;return{basename:a[a.length-1]??``,existingNodeId:i,parentId:t.parentId}}let a=kX(n),o=a.segments[a.segments.length-1]??``,s=a.segments.slice(0,-1),c=s.length===0?e.snapshot.rootId:JZ(e,s,!0);if(c==null)throw Error(`Destination parent does not exist: "${n}"`);return{basename:o,existingNodeId:null,parentId:c}}function cQ(e,t,n,r){if(n===`skip`)return`skip`;if(n===`error`)throw Error(`Destination already exists: "${UZ(e,t)}"`);let i=XZ(e,t);if(iX(i)!==r)throw Error(`replace collision requires the same source and destination kinds`);if(aX(i)&&YZ(e,t).childIds.length>0)throw Error(`replace collision does not support non-empty directories`);let a=i.parentId,o=i.nameId;return lQ(e,t),rQ(e,a,t,o),uQ(e,a),WZ(e,a),`handled`}function lQ(e,t){let n=[],r=[{nodeId:t,visitedChildren:!1}];for(;r.length>0;){let t=r.pop();if(t==null)break;let i=XZ(e,t.nodeId);if(t.visitedChildren||!aX(i)){aX(i)&&e.snapshot.directories.delete(t.nodeId),cX(i,4),e.pathCacheByNodeId.delete(t.nodeId),e.collapsedDirectoryIds.delete(t.nodeId)&&(e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0),e.expandedDirectoryIds.delete(t.nodeId),lZ(e,t.nodeId),e.activeNodeCount--,n.push(t.nodeId);continue}r.push({nodeId:t.nodeId,visitedChildren:!0});let a=YZ(e,t.nodeId);for(let e=a.childIds.length-1;e>=0;e--){let t=a.childIds[e];t!=null&&r.push({nodeId:t,visitedChildren:!1})}}return n}function uQ(e,t){let n=t;for(;n!=null;){let t=XZ(e,n);if(!aX(t)||sX(t,2)||YZ(e,n).childIds.length>0)return;cX(t,1),n=t.parentId===n?null:t.parentId}}function dQ(e,t){let n=e.snapshot.rootId;for(let r of t){let t=e.snapshot.segmentTable.idByValue.get(r);if(t==null)break;let i=HY(e.snapshot.nodes,YZ(e,n)).get(t);if(i==null||!aX(XZ(e,i)))break;n=i}return n}function fQ(e,t){let n=hQ(e,t);if(n==null)return null;let r=FZ(e,n),i=XZ(e,r),a=n===r?null:IZ(e,n).map(t=>UZ(e,t));return JSON.stringify({flattenedSegmentPaths:a,hasChildren:YZ(e,r).childIds.length>0,path:UZ(e,r),terminalKind:iX(i)})}function pQ(e,t){return mQ([e],[t])}function mQ(e,t){for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(r==null||i==null||r!==i)return!0}return!1}function hQ(e,t){let n=t;for(;n!=null;){let t=XZ(e,n);if(!aX(t)||sX(t,2))return null;if(!eZ(e,n,t))return n;n=t.parentId}return null}function gQ(e,t){let n=XZ(e,t);if(lX(n,(t===e.snapshot.rootId?-1:rX(XZ(e,n.parentId)))+1),!aX(n))return;let r=YZ(e,t);for(let t of r.childIds)gQ(e,t)}function _Q(e,t,n){let r=n;for(;r!=null;){if(r===t)return!0;let n=XZ(e,r);if(r===e.snapshot.rootId)return!1;r=n.parentId}return!1}function vQ(e,t,n=XZ(e,t),r=!1){let i=e.instrumentation;if(i==null){bQ(e,t,n,r);return}Q(i,`store.recomputeNodeCounts`,()=>bQ(e,t,n,r))}function yQ(e,t){let n=t;for(;n!=null;){let t=XZ(e,n),r=t.subtreeNodeCount,i=t.visibleSubtreeCount;if(vQ(e,n,t),n===e.snapshot.rootId)return;let a=t.subtreeNodeCount-r,o=t.visibleSubtreeCount-i,s=t.parentId;(a!==0||o!==0)&&qY(YZ(e,s),n,a,o),n=s}}function bQ(e,t,n,r){if(!aX(n)){n.subtreeNodeCount=1,n.visibleSubtreeCount=1;return}let i=YZ(e,t);if(r){let t=e.instrumentation;t==null?KY(e.snapshot.nodes,i):Q(t,`store.recomputeNodeCounts.rebuildChildAggregates`,()=>KY(e.snapshot.nodes,i))}let a=1+i.totalChildSubtreeNodeCount,o=i.totalChildVisibleSubtreeCount;if(n.subtreeNodeCount=a,sX(n,2)){n.visibleSubtreeCount=o;return}n.visibleSubtreeCount=PZ(e,t)==null?eZ(e,t,n)?1+o:1:o}function xQ(e,t,n){let r=UZ(e,t);return r.length===0?n:`${r}${n}`}function SQ(e){return e!=null&&!sX(e,4)}function CQ(e,t){let n=e.snapshot.nodes[t];return!SQ(n)||!aX(n)||sX(n,2)?null:n}function wQ(e){let t=0;for(let[n,r]of e.pathCacheByNodeId)r.version===e.pathCacheVersion&&SQ(e.snapshot.nodes[n])&&(t+=1);return t}function TQ(e){return Math.max(0,e.valueById.length-1)}function EQ(e){return{activeNodeCount:e.activeNodeCount,cachedPathEntryCount:wQ(e),loadInfoEntryCount:e.directoryLoadInfoById.size,segmentCount:TQ(e.snapshot.segmentTable),totalNodeSlotCount:Math.max(0,e.snapshot.nodes.length-1)}}function DQ(e,t,n,r){return{activeNodeCountAfter:r.activeNodeCount,activeNodeCountBefore:n.activeNodeCount,cachedPathEntryCountAfter:r.cachedPathEntryCount,cachedPathEntryCountBefore:n.cachedPathEntryCount,idsPreserved:t,loadInfoEntryCountAfter:r.loadInfoEntryCount,loadInfoEntryCountBefore:n.loadInfoEntryCount,mode:e,reclaimedCachedPathEntryCount:n.cachedPathEntryCount-r.cachedPathEntryCount,reclaimedLoadInfoEntryCount:n.loadInfoEntryCount-r.loadInfoEntryCount,reclaimedNodeSlotCount:n.totalNodeSlotCount-r.totalNodeSlotCount,reclaimedSegmentCount:n.segmentCount-r.segmentCount,segmentCountAfter:r.segmentCount,segmentCountBefore:n.segmentCount,totalNodeSlotCountAfter:r.totalNodeSlotCount,totalNodeSlotCountBefore:n.totalNodeSlotCount}}function OQ(e){let t=[],n=[];for(let n of e.collapsedDirectoryIds)CQ(e,n)!=null&&t.push(UZ(e,n));for(let t of e.expandedDirectoryIds)CQ(e,t)!=null&&n.push(UZ(e,t));return{collapsedPaths:t,expandedPaths:n}}function kQ(e){let t=[];for(let[n,r]of e.directoryLoadInfoById)CQ(e,n)!=null&&rZ(e,n)!==`loaded`&&t.push({info:{activeAttemptId:null,errorMessage:r.errorMessage,nextAttemptId:r.nextAttemptId,state:r.state},path:UZ(e,n)});return t}function AQ(e,t){e.collapsedDirectoryIds.clear(),e.hasCollapsedDirectoryOverrides=!1,e.expandedDirectoryIds.clear();for(let n of t.expandedPaths){let t=qZ(e,n);t!=null&&tZ(e,t,!0,XZ(e,t))}for(let n of t.collapsedPaths){let t=qZ(e,n);t!=null&&tZ(e,t,!1,XZ(e,t))}}function jQ(e,t){e.directoryLoadInfoById.clear();for(let n of t){let t=qZ(e,n.path);t!=null&&CQ(e,t)!=null&&e.directoryLoadInfoById.set(t,{activeAttemptId:null,errorMessage:n.info.errorMessage,nextAttemptId:n.info.nextAttemptId,state:n.info.state})}}function MQ(e){e.pathCacheVersion+=1,e.pathCacheByNodeId.clear(),e.pathCacheByNodeId.set(e.snapshot.rootId,{path:``,version:e.pathCacheVersion})}function NQ(e){let t=e.snapshot.segmentTable,n=AX();for(let r of e.snapshot.nodes)if(SQ(r)){if(sX(r,2)){r.nameId=0;continue}r.nameId=jX(n,MX(t,r.nameId))}e.snapshot.segmentTable=n}function PQ(e){for(let[t,n]of e.snapshot.directories){let r=e.snapshot.nodes[t];if(!SQ(r)||!aX(r)){e.snapshot.directories.delete(t);continue}let i=n.childIds.filter(n=>{let r=e.snapshot.nodes[n];return SQ(r)&&r.parentId===t});n.childIds=i,n.childIdByNameId=new Map(i.map(t=>[XZ(e,t).nameId,t])),n.childPositionById=new Map(i.map((e,t)=>[e,t])),KY(e.snapshot.nodes,n)}}function FQ(e){let t=e.snapshot.nodes.length-1;for(;t>e.snapshot.rootId;){let n=e.snapshot.nodes[t];if(SQ(n))break;--t}e.snapshot.nodes.length=t+1}function IQ(e){let t=OQ(e),n=kQ(e);Q(e.instrumentation,`store.cleanup.stable.clearPathCaches`,()=>MQ(e)),Q(e.instrumentation,`store.cleanup.stable.rebuildSegmentTable`,()=>NQ(e)),Q(e.instrumentation,`store.cleanup.stable.rebuildDirectoryIndexes`,()=>PQ(e)),Q(e.instrumentation,`store.cleanup.stable.trimTrailingRemovedNodeSlots`,()=>FQ(e)),Q(e.instrumentation,`store.cleanup.stable.restoreExpansionOverrides`,()=>AQ(e,t)),Q(e.instrumentation,`store.cleanup.stable.restoreDirectoryLoadInfos`,()=>jQ(e,n)),Q(e.instrumentation,`store.cleanup.stable.recomputeCounts`,()=>GZ(e,e.snapshot.rootId))}function LQ(e){let t=OQ(e),n=kQ(e),r=Q(e.instrumentation,`store.cleanup.aggressive.listPaths`,()=>LZ(e)),i=dX({...e.snapshot.options},e.instrumentation),a=Q(e.instrumentation,`store.cleanup.aggressive.rebuildSnapshot`,()=>{let e=new YX(i);return e.appendPaths(r),e.finish()});e.snapshot=a,e.activeNodeCount=a.nodes.length-1,e.pathCacheByNodeId=new Map([[a.rootId,{path:``,version:0}]]),e.pathCacheVersion=0,Q(e.instrumentation,`store.cleanup.aggressive.restoreExpansionOverrides`,()=>AQ(e,t)),Q(e.instrumentation,`store.cleanup.aggressive.restoreDirectoryLoadInfos`,()=>jQ(e,n)),Q(e.instrumentation,`store.cleanup.aggressive.recomputeCounts`,()=>GZ(e,e.snapshot.rootId))}function RQ(e){for(let t of e.directoryLoadInfoById.values())if(t.state===`loading`&&t.activeAttemptId!=null)return!0;return!1}function zQ(e,t){let n=EQ(e);t===`stable`?Q(e.instrumentation,`store.cleanup.stable`,()=>IQ(e)):Q(e.instrumentation,`store.cleanup.aggressive`,()=>LQ(e));let r=EQ(e);return DQ(t,t===`stable`,n,r)}var BQ=64;function VQ(e,t){let n=t+2;if(n<=e.length)return e;let r=e.length;for(;r<n;)r*=2;let i=new Int32Array(r);return i.fill(-1),i.set(e),i}function HQ(e){return XZ(e,e.snapshot.rootId).visibleSubtreeCount}function UQ(e,t,n,r){let i=XZ(e,t.terminalNodeId),a=Math.max(1,i.visibleSubtreeCount);return Math.min(r-1,n+a-1)}function WQ(e,t,n,r){return{ancestorPaths:r,index:t.index,posInSet:t.posInSet,row:l$(e,t.cursor),setSize:t.setSize,subtreeEndIndex:UQ(e,t.cursor,t.index,n)}}function GQ(e,t,n,r,i,a){let o=YZ(e,t),{childIndex:s,childVisibleIndex:c,localVisibleIndex:l}=JY(e.snapshot.nodes,o,n),u=o.childIds[s];if(u==null)throw Error(`Visible index ${String(n)} is out of range`);return KQ(e,u,l,r+c,i+1,s,o.childIds.length,a)}function KQ(e,t,n,r,i,a,o,s){if(!aX(XZ(e,t))){if(n===0)return{ancestors:s,cursor:{headNodeId:t,terminalNodeId:t,visibleDepth:i},index:r,posInSet:a,setSize:o};throw Error(`Visible index ${String(n)} is out of range for file`)}let c=r$(e,t,i);if(n===0)return{ancestors:s,cursor:c,index:r,posInSet:a,setSize:o};let l=XZ(e,c.terminalNodeId);if(!aX(l)||!eZ(e,c.terminalNodeId,l))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return GQ(e,c.terminalNodeId,n-1,r+1,c.visibleDepth,[...s,{cursor:c,index:r,posInSet:a,setSize:o}])}function qQ(e,t){let n=HQ(e);if(t<0||t>=n)return null;let r=GQ(e,e.snapshot.rootId,t,0,-1,[]),i=r.ancestors.map(t=>UZ(e,t.cursor.terminalNodeId)),a=null;return{ancestorPaths:i,get ancestorRows(){if(a!=null)return a;let t=[],i=[];for(let a of r.ancestors){let r=WQ(e,a,n,[...i]);t.push(r),i.push(r.row.path)}return a=t,a},index:r.index,posInSet:r.posInSet,row:l$(e,r.cursor),setSize:r.setSize,subtreeEndIndex:UQ(e,r.cursor,r.index,n)}}function JQ(e,t,n){let r=e.instrumentation,i=HQ(e);if(i<=0||n<t)return[];let a=Math.max(0,Math.min(t,i-1)),o=Math.max(a,Math.min(n,i-1));if(r==null){if(a===0)return c$(e,o+1);let t=[],n=e$(e,a);for(let r=a;r<=o&&n!=null;r++){let r=l$(e,n);t.push(r),n=a$(e,n)}return t}let s=[],c=0,l=0,u=Q(r,`store.getVisibleSlice.selectFirstRow`,()=>e$(e,a));for(let t=a;t<=o&&u!=null;t++){let t=Q(r,`store.getVisibleSlice.materializeRow`,()=>l$(e,u));s.push(t),t.isFlattened&&(c++,l+=t.flattenedSegments?.length??0),u=Q(r,`store.getVisibleSlice.advanceCursor`,()=>a$(e,u))}return pX(r,`workload.visibleRowsRead`,s.length),pX(r,`workload.flattenedRowsRead`,c),pX(r,`workload.flattenedSegmentsRead`,l),s}function YQ(e,t=HQ(e)){let n=e.instrumentation;return n==null?s$(e,t):Q(n,`store.getVisibleTreeProjection`,()=>s$(e,t))}function XQ(e){return o$(YQ(e))}function ZQ(e,t){let n=qZ(e,t);if(n==null||n===e.snapshot.rootId||aX(XZ(e,n))&&FZ(e,n)!==n)return null;let r=0,i=n,{nodes:a,rootId:o}=e.snapshot;for(;i!==o;){let t=XZ(e,i).parentId,n=YZ(e,t),s=UY(n).get(i);if(s==null)throw Error(`Child ${String(i)} was not found in its parent index`);if(r+=YY(a,n,s),t!==o){let n=XZ(e,t),a=PZ(e,t);if(!eZ(e,t,n)&&a!==i)return null;FZ(e,t)===t&&(r+=1)}i=t}return r}function QQ(e,t){let n=qZ(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=XZ(e,n);if(!aX(r))throw Error(`Path is not a directory: "${t}"`);return eZ(e,n,r)?null:(tZ(e,n,!0,r),WZ(e,n),mZ({affectedAncestorIds:KZ(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0}))}function $Q(e,t){let n=qZ(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=XZ(e,n);if(!aX(r))throw Error(`Path is not a directory: "${t}"`);return eZ(e,n,r)?(tZ(e,n,!1,r),WZ(e,n),hZ({affectedAncestorIds:KZ(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0})):null}function e$(e,t){return t<0||t>=HQ(e)?null:t$(e,e.snapshot.rootId,t,-1)}function t$(e,t,n,r){let i=YZ(e,t),a=e.instrumentation,{childIndex:o,localVisibleIndex:s}=a==null?JY(e.snapshot.nodes,i,n):Q(a,`store.getVisibleSlice.selectChildIndex`,()=>JY(e.snapshot.nodes,i,n)),c=i.childIds[o];if(c!=null)return n$(e,c,s,r+1);throw Error(`Visible index ${String(n)} is out of range`)}function n$(e,t,n,r){if(!aX(XZ(e,t))){if(n===0)return{headNodeId:t,terminalNodeId:t,visibleDepth:r};throw Error(`Visible index ${String(n)} is out of range for file`)}let i=r$(e,t,r);if(n===0)return i;let a=XZ(e,i.terminalNodeId);if(!aX(a)||!eZ(e,i.terminalNodeId,a))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return t$(e,i.terminalNodeId,n-1,i.visibleDepth)}function r$(e,t,n){return aX(XZ(e,t))?e.instrumentation==null?{headNodeId:t,terminalNodeId:FZ(e,t),visibleDepth:n}:{headNodeId:t,terminalNodeId:Q(e.instrumentation,`store.getVisibleSlice.flatten.resolveTerminalDirectory`,()=>FZ(e,t)),visibleDepth:n}:{headNodeId:t,terminalNodeId:t,visibleDepth:n}}function i$(e,t){let n=XZ(e,t);if(!aX(n))return!0;let r=n.parentId;return r===e.snapshot.rootId||PZ(e,r)!==t}function a$(e,t){let n=XZ(e,t.terminalNodeId);if(aX(n)){let r=YZ(e,t.terminalNodeId);if(eZ(e,t.terminalNodeId,n)&&r.childIds.length>0){let n=r.childIds[0];return n==null?null:n$(e,n,0,t.visibleDepth+1)}}let r=t.terminalNodeId,i=t.visibleDepth;for(;;){let t=XZ(e,r);if(r===e.snapshot.rootId)return null;let n=t.parentId,a=YZ(e,n),o=UY(a).get(r)??-1;if(o<0)throw Error(`Child ${String(r)} was not found in its parent index`);let s=a.childIds[o+1]??null;if(s!=null)return n$(e,s,0,i);i$(e,r)&&i--,r=n}}function o$(e){let t=e.paths.length,n=Array(t);for(let r=0;r<t;r+=1){let t=e.getParentIndex(r);n[r]={index:r,parentPath:t>=0?e.paths[t]??null:null,path:e.paths[r]??``,posInSet:e.posInSetByIndex[r]??0,setSize:e.setSizeByIndex[r]??0}}return{getParentIndex:e.getParentIndex,rows:n,get visibleIndexByPath(){return e.visibleIndexByPath}}}function s$(e,t){let n=Array(t),r=new Int32Array(t),i=new Int32Array(t),a=new Int32Array(t),o=new Int32Array(BQ);o.fill(-1);let s=0,{nodes:c,directories:l,segmentTable:u}=e.snapshot,d=[[l.get(e.snapshot.rootId),0,-1,``]],f=e.snapshot.options.flattenEmptyDirectories,p=e.pathCacheByNodeId,m=e.pathCacheVersion,h=u.valueById;for(;d.length>0&&s<t;){let t=d[d.length-1],u=t[0];if(t[1]>=u.childIds.length){d.pop();continue}let g=t[1],_=u.childIds[t[1]++],v=c[_],y=t[2]+1,b=t[3];o=VQ(o,y);let x,S=_;if(aX(v))S=f?FZ(e,_):_,x=S===_?`${b}${h[v.nameId]}/`:UZ(e,S);else{let e=p.get(_);x=e!=null&&e.version===m?e.path:`${b}${h[v.nameId]}`}r[s]=o[y],n[s]=x,i[s]=g,a[s]=u.childIds.length,o[y+1]=s,s+=1;let C=c[S];C!=null&&aX(C)&&eZ(e,S,C)&&d.push([l.get(S),0,y,x])}s<t&&(n.length=s);let g=r.subarray(0,s),_=i.subarray(0,s),v=a.subarray(0,s),y=null;return{getParentIndex(e){return e<0||e>=s?-1:g[e]??-1},paths:n,posInSetByIndex:_,setSizeByIndex:v,get visibleIndexByPath(){if(y==null){y=new Map;for(let e=0;e<s;e+=1)y.set(n[e]??``,e)}return y}}}function c$(e,t){let n=Array(t),r=0,{nodes:i,directories:a,segmentTable:o}=e.snapshot,s=[[a.get(e.snapshot.rootId),0,-1]],c=o.valueById,l=e.snapshot.options.flattenEmptyDirectories,u=e.pathCacheByNodeId,d=e.pathCacheVersion;for(;s.length>0&&r<t;){let t=s[s.length-1],o=t[0];if(t[1]>=o.childIds.length){s.pop();continue}let f=o.childIds[t[1]++],p=i[f],m=t[2]+1;if(!aX(p)){let t=u.get(f);n[r++]={depth:m,flattenedSegments:void 0,hasChildren:!1,id:f,isExpanded:!1,isFlattened:!1,isLoading:!1,kind:`file`,loadState:void 0,name:c[p.nameId],path:t!=null&&t.version===d?t.path:UZ(e,f)};continue}let h=l?FZ(e,f):f,g={headNodeId:f,terminalNodeId:h,visibleDepth:m};n[r++]=l$(e,g);let _=i[h];_!=null&&aX(_)&&eZ(e,h,_)&&s.push([a.get(h),0,m])}return r<t&&(n.length=r),n}function l$(e,t){let n=XZ(e,t.terminalNodeId),r=aX(n)?u$(e,t):null,i=UZ(e,t.terminalNodeId),a=MX(e.snapshot.segmentTable,n.nameId),o=aX(n)&&YZ(e,t.terminalNodeId).childIds.length>0,s=t.headNodeId!==t.terminalNodeId,c=e.instrumentation,l=s?c==null?IZ(e,t.headNodeId).map(n=>{let r=XZ(e,n);return{isTerminal:n===t.terminalNodeId,name:MX(e.snapshot.segmentTable,r.nameId),nodeId:n,path:UZ(e,n)}}):Q(c,`store.getVisibleSlice.flatten.collectSegments`,()=>IZ(e,t.headNodeId).map(n=>{let r=XZ(e,n);return{isTerminal:n===t.terminalNodeId,name:MX(e.snapshot.segmentTable,r.nameId),nodeId:n,path:UZ(e,n)}})):void 0;return{depth:t.visibleDepth,flattenedSegments:l,hasChildren:o,id:t.terminalNodeId,isExpanded:aX(n)&&eZ(e,t.terminalNodeId,n),isFlattened:s,isLoading:r===`loading`,kind:aX(n)?`directory`:`file`,loadState:r==null||r===`loaded`?void 0:r,name:a,path:i}}function u$(e,t){if(t.headNodeId===t.terminalNodeId)return rZ(e,t.terminalNodeId);let n=IZ(e,t.headNodeId),r=!1,i=!1;for(let t of n){let n=rZ(e,t);if(n===`loading`)return`loading`;if(n===`error`){i=!0;continue}n===`unloaded`&&(r=!0)}return i?`error`:r?`unloaded`:`loaded`}var d$=8;function f$(e){let{nodes:t,directories:n,rootId:r,options:i}=e,a=t.length,o=new Int32Array(a),s=new Int32Array(a),c=new Int32Array(a),l=new Int32Array(a),u=new Int32Array(a),d=new Int32Array(a),f=new Int32Array(a);for(let e=0;e<a;e+=1){let n=t[e];n!=null&&(o[e]=n.parentId,s[e]=n.nameId,c[e]=n.depthAndFlags,l[e]=n.subtreeNodeCount,u[e]=n.visibleSubtreeCount)}let p=0;for(let e of n.values())p+=e.childIds.length;let m=new Int32Array(p),h=0;for(let[e,t]of n){let n=t.childIds;d[e]=h,f[e]=n.length;for(let e=0;e<n.length;e+=1)m[h]=n[e],h+=1}return{nodeCount:a,rootId:r,flattenEmptyDirectories:i.flattenEmptyDirectories===!0,parentId:o,nameId:s,depthAndFlags:c,subtreeNodeCount:l,visibleSubtreeCount:u,childStart:d,childCount:f,childIdsFlat:m}}function p$(e){let{nodeCount:t,rootId:n,flattenEmptyDirectories:r,depthAndFlags:i,subtreeNodeCount:a,visibleSubtreeCount:o,childStart:s,childCount:c,childIdsFlat:l}=e;for(let e=t-1;e>=1;--e){if((i[e]&d$)===0)continue;let t=s[e],n=c[e],u=0,d=0;for(let e=0;e<n;e+=1){let n=l[t+e];u+=a[n],d+=o[n]}a[e]=1+u;let f;f=r&&n===1?(i[l[t]]&d$)===0?1+d:d:1+d,o[e]=f}let u=s[n],d=c[n],f=0,p=0;for(let e=0;e<d;e+=1){let t=l[u+e];f+=a[t],p+=o[t]}a[n]=1+f,o[n]=p}function m$(e){let{directories:t,nodes:n,options:r,rootId:i,presortedDirectoryNodeIds:a}=e.snapshot,o=r.flattenEmptyDirectories===!0,s=e=>{let r=n[e];if(r==null||!aX(r))return;let i=t.get(e);if(i==null)throw Error(`Unknown directory child index for node ${String(e)}`);let a=i.childIds,s=a.length,c=0,l=0;for(let e=0;e<s;e++){let t=a[e];if(t==null)continue;let r=n[t];c+=r.subtreeNodeCount,l+=r.visibleSubtreeCount}i.totalChildSubtreeNodeCount=c,i.totalChildVisibleSubtreeCount=l,s>=128&&XY(n,i),r.subtreeNodeCount=1+c;let u;if(o&&s===1){let e=n[a[0]];u=e!=null&&aX(e)?l:1+l}else u=1+l;r.visibleSubtreeCount=u};if(a!=null)for(let e=a.length-1;e>=0;e--)s(a[e]);else for(let e=n.length-1;e>=1;e--)s(e);let c=n[i],l=t.get(i);if(c==null||l==null)return;let u=l.childIds,d=0,f=0;for(let e=0;e<u.length;e++){let t=u[e];if(t==null)continue;let r=n[t];d+=r.subtreeNodeCount,f+=r.visibleSubtreeCount}l.totalChildSubtreeNodeCount=d,l.totalChildVisibleSubtreeCount=f,XY(n,l),c.subtreeNodeCount=1+d,c.visibleSubtreeCount=f}function h$(e){let{directories:t,nodes:n,rootId:r}=e.snapshot,i=f$(e.snapshot);p$(i);let a=i.subtreeNodeCount,o=i.visibleSubtreeCount;for(let e=0;e<n.length;e+=1){let t=n[e];t!=null&&(t.subtreeNodeCount=a[e],t.visibleSubtreeCount=o[e])}for(let[e,i]of t){let t=i.childIds,a=t.length,o=0,s=0;for(let e=0;e<a;e++){let r=t[e];if(r==null)continue;let i=n[r];o+=i.subtreeNodeCount,s+=i.visibleSubtreeCount}i.totalChildSubtreeNodeCount=o,i.totalChildVisibleSubtreeCount=s,(e===r||a>=128)&&XY(n,i)}}function g$(e){return e.initialExpansion===`open`&&(e.initialExpandedPaths==null||e.initialExpandedPaths.length===0)}var _$=class e{#e;constructor(e={}){let t=fX(e),n=Q(t,`store.builder.create`,()=>new YX(e));if(e.preparedInput!=null){let t=KX(e.preparedInput);t==null?n.appendPreparedPaths(GX(e.preparedInput),!1):n.appendPresortedPaths(t,qX(e.preparedInput))}else{let r=e.paths??[];e.presorted===!0?n.appendPaths(r):n.appendPreparedPaths(Q(t,`store.preparePathEntries`,()=>JX(r,e)))}let r=Q(t,`store.builder.finish`,()=>n.finish({skipSubtreeCountPass:!0})),i=Q(t,`store.state.detectAllDirectoriesExpanded`,()=>(e.initialExpansion??`closed`)===`closed`&&n.didMatchAllInitialExpandedPaths());this.#e=Q(t,`store.state.create`,()=>XX(r,i?`open`:e.initialExpansion??`closed`,t)),i&&(this.#e.collapseNewDirectoriesByDefault=!0);let a=i?this.#e.snapshot.directories.size-1:Q(t,`store.state.initializeExpandedPaths`,()=>this.initializeExpandedPaths(e.initialExpandedPaths));i||g$(e)||(e.initialExpansion??`closed`)===`closed`&&a===this.#e.snapshot.directories.size-1||(e.initialExpandedPaths?.length??0)>0&&Q(t,`store.state.checkAllDirectoriesExpanded`,()=>this.hasAllDirectoriesExpanded())?e.useSoaCountSweep===!0?Q(t,`store.state.initializeOpenVisibleCountsViaSoa`,()=>h$(this.#e)):Q(t,`store.state.initializeOpenVisibleCounts`,()=>m$(this.#e)):Q(t,`store.state.recomputeCounts`,()=>GZ(this.#e,this.#e.snapshot.rootId))}static preparePaths(e,t={}){return HX(e,t)}static prepareInput(e,t={}){return UX(e,t)}static preparePresortedInput(e){return WX(e)}list(e){return Q(this.#e.instrumentation,`store.list`,()=>LZ(this.#e,e))}add(e){Q(this.#e.instrumentation,`store.add`,()=>{let t=HQ(this.#e);wZ(this.#e,SZ(this.#e,t,RZ(this.#e,e)))})}remove(e,t={}){Q(this.#e.instrumentation,`store.remove`,()=>{let n=HQ(this.#e);wZ(this.#e,SZ(this.#e,n,zZ(this.#e,e,t)))})}move(e,t,n={}){Q(this.#e.instrumentation,`store.move`,()=>{let r=HQ(this.#e),i=BZ(this.#e,e,t,n);i!=null&&wZ(this.#e,SZ(this.#e,r,i))})}batch(e){CZ(this.#e,()=>{if(typeof e==`function`){e(this);return}for(let t of e)switch(t.type){case`add`:this.add(t.path);break;case`remove`:this.remove(t.path,{recursive:t.recursive});break;case`move`:this.move(t.from,t.to,{collision:t.collision})}})}getVisibleCount(){return Q(this.#e.instrumentation,`store.getVisibleCount`,()=>HQ(this.#e))}getVisibleSlice(e,t){return Q(this.#e.instrumentation,`store.getVisibleSlice`,()=>JQ(this.#e,e,t))}getVisibleRowContext(e){return Q(this.#e.instrumentation,`store.getVisibleRowContext`,()=>qQ(this.#e,e))}getVisibleTreeProjection(){return XQ(this.#e)}getVisibleTreeProjectionData(e){return YQ(this.#e,e)}getVisibleIndex(e){return Q(this.#e.instrumentation,`store.getVisibleIndex`,()=>ZQ(this.#e,e))}getPathInfo(e){return Q(this.#e.instrumentation,`store.getPathInfo`,()=>{let t=qZ(this.#e,e);if(t==null)return null;let n=XZ(this.#e,t);return{depth:rX(n),kind:aX(n)?`directory`:`file`,path:UZ(this.#e,t)}})}isExpanded(e){return Q(this.#e.instrumentation,`store.isExpanded`,()=>{let t=this.requireDirectoryNodeId(e),n=XZ(this.#e,t);return eZ(this.#e,t,n)})}expand(e){Q(this.#e.instrumentation,`store.expand`,()=>{let t=HQ(this.#e),n=QQ(this.#e,e);n!=null&&wZ(this.#e,SZ(this.#e,t,n))})}collapse(e){Q(this.#e.instrumentation,`store.collapse`,()=>{let t=HQ(this.#e),n=$Q(this.#e,e);n!=null&&wZ(this.#e,SZ(this.#e,t,n))})}on(e,t){return uZ(this.#e,e,t)}getDirectoryLoadState(e){let t=this.requireDirectoryNodeId(e);return rZ(this.#e,t)}markDirectoryUnloaded(e){Q(this.#e.instrumentation,`store.markDirectoryUnloaded`,()=>{let t=this.requireDirectoryNodeId(e);if(YZ(this.#e,t).childIds.length>0)throw Error(`Cannot mark a directory with known children as unloaded: "${e}"`);let n=HQ(this.#e);aZ(this.#e,t),wZ(this.#e,SZ(this.#e,n,gZ({affectedAncestorIds:KZ(this.#e,t),affectedNodeIds:[t],path:e,projectionChanged:this.isDirectoryProjectionVisible(t)})))})}beginChildLoad(e){return Q(this.#e.instrumentation,`store.beginChildLoad`,()=>{let t=this.requireDirectoryNodeId(e),n=HQ(this.#e),r=iZ(this.#e,t);return wZ(this.#e,SZ(this.#e,n,_Z({affectedAncestorIds:KZ(this.#e,t),affectedNodeIds:[t],attemptId:r.attemptId,path:e,projectionChanged:this.isDirectoryProjectionVisible(t),reused:r.reused}))),r})}applyChildPatch(e,t){return Q(this.#e.instrumentation,`store.applyChildPatch`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null||rZ(this.#e,n)!==`loading`||!sZ(this.#e,n,e.attemptId))return!1;let r=UZ(this.#e,n);this.validateChildPatch(r,t);let i=HQ(this.#e),a=[];for(let e of t.operations){v$(r,e);let t=HQ(this.#e);switch(e.type){case`add`:a.push(SZ(this.#e,t,RZ(this.#e,e.path)));break;case`remove`:a.push(SZ(this.#e,t,zZ(this.#e,e.path,{recursive:e.recursive})));break;case`move`:{let n=BZ(this.#e,e.from,e.to,{collision:e.collision});n!=null&&a.push(SZ(this.#e,t,n));break}}}let o=a.some(e=>e.projectionChanged)||this.isDirectoryProjectionVisible(n);return wZ(this.#e,SZ(this.#e,i,vZ({affectedAncestorIds:KZ(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,childEvents:a,path:UZ(this.#e,n),projectionChanged:o}))),!0})}completeChildLoad(e){return Q(this.#e.instrumentation,`store.completeChildLoad`,()=>{let t=this.resolveActiveDirectoryNodeId(e.nodeId);if(t==null)return!1;let n=HQ(this.#e),r=oZ(this.#e,t,e.attemptId);return wZ(this.#e,SZ(this.#e,n,yZ({affectedAncestorIds:KZ(this.#e,t),affectedNodeIds:[t],attemptId:e.attemptId,path:UZ(this.#e,t),projectionChanged:this.isDirectoryProjectionVisible(t),stale:!r}))),r})}failChildLoad(e,t){return Q(this.#e.instrumentation,`store.failChildLoad`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null)return!1;let r=HQ(this.#e),i=cZ(this.#e,n,e.attemptId,t);return wZ(this.#e,SZ(this.#e,r,bZ({affectedAncestorIds:KZ(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,errorMessage:t,path:UZ(this.#e,n),projectionChanged:this.isDirectoryProjectionVisible(n),stale:!i}))),i})}cleanup(e={}){return Q(this.#e.instrumentation,`store.cleanup`,()=>{if(this.#e.transactionStack.length>0)throw Error(`Cleanup cannot run during an open batch or transaction.`);if(RQ(this.#e))throw Error(`Cleanup cannot run while directory loads are active.`);let t=HQ(this.#e),n=zQ(this.#e,e.mode??`stable`);return wZ(this.#e,SZ(this.#e,t,xZ({...n,affectedAncestorIds:[],affectedNodeIds:[],projectionChanged:n.idsPreserved===!1}))),n})}getNodeCount(){return this.#e.activeNodeCount}initializeExpandedPaths(e){if(e==null||e.length===0)return 0;let t=0,n=[],r=[],i=0,a=null,o=this.#e.snapshot.segmentTable,s=o.valueById,c=this.#e.snapshot.nodes,l=new Map;for(let u of e){a!=null&&u<a&&(a=null,i=0,n.length=0,r.length=0);let e=u.length>0&&u.charCodeAt(u.length-1)===47?u.length-1:u.length;if(e===0){a=u,i=e,n.length=0,r.length=0;continue}let d=0,f=0;if(a!=null){let t=Math.min(e,i),n=!0;for(let e=0;e<t;e+=1){let t=u.charCodeAt(e);if(t!==a.charCodeAt(e)){n=!1;break}t===47&&(d+=1,f=e+1)}n&&(t===i&&e>t&&u.charCodeAt(t)===47?(d+=1,f=t+1):t===e&&i>t&&a.charCodeAt(t)===47&&(d+=1,f=e+1)),d=Math.min(d,r.length)}let p=d===0?this.#e.snapshot.rootId:r[d-1]??this.#e.snapshot.rootId,m=d,h=!0,g=f;for(;g<=e;){let t=u.indexOf(`/`,g),i=t===-1||t>e?e:t,a=u.slice(g,i),f=YZ(this.#e,p).childIds,_=m===d?n[m]??0:0,v=_,y,b=l.get(a)??gX(a);l.set(a,b);let x=(e,t)=>{for(v=e;v<t;v+=1){let e=f[v],t=c[e],n=s[t.nameId];if(n===a)return y=e,!0;let r=vX(TX(o,t.nameId),b);if(r>0||r===0&&n>a)return!1}return!1};if(!x(_,f.length)&&_>0&&x(0,_),y===void 0){h=!1;break}if(!aX(XZ(this.#e,y))){h=!1;break}if(n[m]=v,r[m]=y,p=y,m+=1,i===e)break;g=i+1}if(a=u,i=e,n.length=m,r.length=m,!h){a=null,i=0,n.length=0,r.length=0;continue}for(let e=d;e<m;e+=1){let n=r[e];if(n==null)continue;let i=XZ(this.#e,n);eZ(this.#e,n,i)||(tZ(this.#e,n,!0,i),t+=1)}}return t}hasAllDirectoriesExpanded(){for(let e of this.#e.snapshot.directories.keys()){if(e===this.#e.snapshot.rootId)continue;let t=XZ(this.#e,e);if(!eZ(this.#e,e,t))return!1}return!0}requireDirectoryNodeId(e){let t=qZ(this.#e,e);if(t==null)throw Error(`Path does not exist: "${e}"`);if(!aX(XZ(this.#e,t)))throw Error(`Path is not a directory: "${e}"`);return t}resolveActiveDirectoryNodeId(e){try{if(!aX(XZ(this.#e,e)))throw Error(`Node is not a directory: ${String(e)}`);return e}catch{return null}}isDirectoryProjectionVisible(e){let t=e;for(;t!==this.#e.snapshot.rootId;){let e=XZ(this.#e,t).parentId;if(e!==this.#e.snapshot.rootId){let n=XZ(this.#e,e),r=PZ(this.#e,e);if(!eZ(this.#e,e,n)&&r!==t)return!1}t=e}return!0}validateChildPatch(t,n){new e({paths:this.list(t),presorted:!0,sort:this.#e.snapshot.options.sort}).batch(n.operations)}};function v$(e,t){switch(t.type){case`add`:case`remove`:if(!t.path.startsWith(e)||t.path===e)throw Error(`Child patch operation must stay within ${e}: "${t.path}"`);break;case`move`:if(!t.from.startsWith(e)||!t.to.startsWith(e)||t.from===e||t.to===e)throw Error(`Child patch move must stay within ${e}: "${t.from}" -> "${t.to}"`)}}var y$=e=>e.startsWith(`f::`)?e.slice(3):e;function b$(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function x$(e,t){return e===``?t:`${e}/${t}`}function S$({files:e,path:t,isFolder:n,nextBasename:r}){let i=y$(t),a=r.trim();if(a.length===0)return{error:`Name cannot be empty.`};if(a.includes(`/`))return{error:`Name cannot include "/".`};let{parentPath:o,baseName:s}=b$(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=x$(o,a),l=Array(e.length),u=new Set;if(!n){let t=`${c}/`,r=!1;for(let n=0;n<e.length;n++){let a=e[n];if(a!==i&&a.startsWith(t))return{error:`"${c}" already exists.`};let o=a===i?c:a;if(u.has(o))return{error:`"${c}" already exists.`};u.add(o),l[n]=o,a===i&&(r=!0)}return r?{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}:{error:`Could not find the selected file to rename.`}}let d=`${i}/`,f=`${c}/`,p=0;for(let t=0;t<e.length;t++){let n=e[t],r=n===i||n.startsWith(d);if(!r&&(n===c||n.startsWith(f)))return{error:`"${c}" already exists.`};let a=r?`${c}${n.slice(i.length)}`:n;if(u.has(a))return{error:`"${c}" already exists.`};u.add(a),l[t]=a,r&&p++}return p===0?{error:`Could not find the selected folder to rename.`}:{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}}function C$(e){return e.endsWith(`/`)}function w$(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`),r=n<0?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function T$(e){let t=[],n=new Set;for(let r of e)n.has(r)||(n.add(r),t.push(r));let r=new Set;for(let e of t.toSorted((e,t)=>e.length===t.length?e.localeCompare(t):e.length-t.length)){let t=(e.endsWith(`/`)?e.slice(0,-1):e).split(`/`),n=!1;for(let e=0;e<t.length-1;e+=1){let i=`${t.slice(0,e+1).join(`/`)}/`;if(r.has(i)){n=!0;break}}n||r.add(e)}return t.filter(e=>r.has(e))}function E$(e,t){return t.includes(e)?T$(t):[e]}function D$(e,t){return e===t?!0:e==null||t==null?!1:e.kind===t.kind&&e.directoryPath===t.directoryPath&&e.flattenedSegmentPath===t.flattenedSegmentPath&&e.hoveredPath===t.hoveredPath}function O$(e,t){return{draggedPaths:e,target:t}}function k$(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(C$(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function A$(e,t){return t.kind===`root`||t.directoryPath==null?w$(e):t.directoryPath}function j$(e,t){let n=e.map(e=>{let n=A$(e,t);return n===e?null:{from:e,to:n,type:`move`}}).filter(e=>e!=null);return n.length===0?null:{operations:n,result:{draggedPaths:e,operation:n.length===1?`move`:`batch`,target:t}}}function M$(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function N$(e,t,n){let{paths:r,preparedInput:i}=e;if(i==null){if(r==null)throw Error(`FileTree requires paths or preparedInput`);return{paths:r,preparedInput:void 0}}let a=i.paths;if(r==null)return{paths:a,preparedInput:i};if(!M$(_$.preparePaths(r,n==null?{}:{sort:n}),a))throw Error(`FileTree ${t} received paths and preparedInput for different path lists`);return{paths:a,preparedInput:i}}function P$(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}function F$(e,t,n){if(e===t)return n;let r=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(r)?`${n.endsWith(`/`)?n:`${n}/`}${e.slice(r.length)}`:e}function I$(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function L$(e,t,n=!1){if(e==null)return null;switch(t.operation){case`add`:case`expand`:case`collapse`:case`mark-directory-unloaded`:case`begin-child-load`:case`apply-child-patch`:case`complete-child-load`:case`fail-child-load`:case`cleanup`:return e;case`remove`:return I$(e,t.path)?n?e:null:e;case`move`:return F$(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=L$(r,e,n),r==null)return null;return r}}}function R$(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function z$(e){switch(e.operation){case`add`:return{...R$(e),operation:`add`,path:e.path};case`remove`:return{...R$(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...R$(e),from:e.from,operation:`move`,to:e.to}}}function B$(e){return{...R$(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>z$(e)),operation:`batch`}}function V$(e){switch(e.operation){case`add`:case`remove`:case`move`:return z$(e);case`batch`:return B$(e);default:return null}}function H$(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function U$(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=t.split(`/`);return n.slice(0,-1).map((e,t)=>`${n.slice(0,t+1).join(`/`)}/`)}function W$(e){return U$(e).at(-1)??null}function G$(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}function K$(e){return e.endsWith(`/`)}var q$=e=>e.toLowerCase();function J$(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function Y$(e){return e.endsWith(`/`)?e.slice(0,-1):e}function X$(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}var Z$=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},Q$=Symbol(`FILE_TREE_RENAME_VIEW`),$$=512,e1=512;function t1(e){return e===`top`||e===`center`?e:`nearest`}function n1(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=U$(n);for(let e=r.length-1;e>=0;--e){let n=r[e];if(n==null)continue;let i=t(n);if(i!=null)return i}}return 0}function r1(e,t,n){if(e.paths.length===0)return{focusedIndex:-1,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};if(t==null)return{focusedIndex:0,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};let r=n??(t=>e.visibleIndexByPath.get(t)??null);return{focusedIndex:n1(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var i1=class e{static{Object.defineProperty(e.prototype,Q$,{configurable:!0,value(){return{cancel:()=>{this.#q()},commit:()=>{this.#J()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#Y(e)}}},writable:!0})}#e;#t=new Set;#n=new Map;#r=null;#i=null;#a=new Map;#o=new Map;#s=-1;#c=null;#l=!1;#u=e=>-1;#d=new Map;#f=null;#p=null;#m=null;#h=null;#g=null;#_;#v;#y;#b=[];#x=new Int32Array;#S=new Int32Array;#C=void 0;#w=!1;#T=null;#E=``;#D=!1;#O=new Set;#k=[];#A;#j=null;#M=null;#N=null;#P=null;#F=null;#I=null;#L=null;#R=0;#z=null;#B=new Set;#V=0;#H;#U=0;#W=!1;#G=0;#K;constructor(e){let{dragAndDrop:t,fileTreeSearchMode:n,initialSearchQuery:r,initialSelectedPaths:i,renaming:a,onSearchChange:o,paths:s,preparedInput:c,...l}=e,u=N$({paths:s,preparedInput:c},`constructor`,l.sort);this.#e=l,t!=null&&t!==!1&&(this.#r=t===!0?{}:t),this.#w=a!=null&&a!==!1,a!=null&&a!==!1&&a!==!0&&(this.#C=a.canRename,this.#v=a.onError,this.#_=a.onRename),this.#y=o,this.#A=n??`hide-non-matches`,this.#H=this.#le(u.paths,u.preparedInput);let d=i?.map(e=>this.#Ne(e)).filter(e=>e!=null)??[],f=d.at(-1)??null;d.length>0&&(this.#B=new Set(d),this.#z=f,this.#V=1),this.#je(f,!1),r!=null&&this.#Te(r,!1),this.#K=this.#Re()}destroy(){this.#K?.(),this.#K=null,this.#n.clear(),this.#t.clear(),this.#d.clear(),this.#i=null,this.#he()}focusFirstItem(){this.#be().length>0&&this.#Fe(0)}focusLastItem(){this.#G<=0||(this.#Ie(),this.#Fe(this.#G-1))}focusNextItem(){this.#Ae(1)}focusParentItem(){if(this.#c==null)return;let e=W$(this.#c);if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t)}focusPath(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;this.#Ie();let n=this.#Z(t);n>=0&&this.#Fe(n)}scrollToPath(e,t){let n=this.#H.getPathInfo(e)?.path??null;if(n==null)return;this.#Ie();let r=this.#xe(n);r<0||this.#Me(r)!=null&&(t?.focus!==!1&&this.#Fe(r,!1),this.#L={id:this.#R+=1,offset:t1(t?.offset),visibleIndex:r},this.#De())}focusMountedPathFromInput(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;let n=this.#Z(t);n>=0&&this.#Fe(n)}focusNearestPath(e){let t=this.resolveNearestVisiblePath(e);if(t==null)return null;let n=this.#Z(t);return n>=0?(this.#Fe(n),this.#be()[n]??t):null}focusPreviousItem(){this.#Ae(-1)}getFocusedIndex(){return this.#s}getFocusedItem(){return this.#c==null?null:this.#Q(this.#c)}getFocusedPath(){return this.#c}getScrollRequest(){return this.#L}clearScrollRequest(e){this.#L?.id===e&&(this.#L=null)}resolveNearestVisiblePath(e){let t=this.#be();if(this.#G===0)return null;if(e==null)return this.#c??t[0]??null;let n=this.#H.getPathInfo(e)?.path??e,r=this.#Z(n);return r>=0?t[r]??n:this.#X(n)??this.#c??t[0]??null}getSelectedPaths(){return[...this.#B]}getSelectionVersion(){return this.#V}getVisibleCount(){return this.#G}getVisibleRows(e,t){if(t<e||this.#G===0)return[];let n=Math.max(0,e),r=Math.min(this.#G-1,t);if(r<n)return[];let i=r-n+1;if(this.#F==null&&!this.#l&&r>=this.#b.length&&i<=e1){let e=[];for(let t=n;t<=r;t+=1){let n=this.#H.getVisibleRowContext(t);if(n==null)break;e.push(this.#ee(n))}return e}if(!this.#l&&r>=this.#b.length&&this.#Ie(),this.#F!=null){let e=Array.from({length:r-n+1},(e,t)=>this.#Se(n+t)),t=new Map,i=e[0]??-1,a=i;for(let n=1;n<=e.length;n+=1){let r=e[n];if(r!=null&&r===a+1){a=r;continue}if(i>=0&&this.#H.getVisibleSlice(i,a).forEach((e,n)=>{t.set(i+n,e)}),r==null){i=-1,a=-1;continue}i=r,a=r}return Array.from({length:r-n+1},(e,r)=>{let i=n+r,a=this.#Se(i),o=t.get(a),s=this.#b[a];if(o==null||s==null)throw Error(`Missing projection row for filtered visible index ${String(i)}`);return this.#$(o,i,a,{ancestorPaths:this.#re(a),path:s})})}return this.#H.getVisibleSlice(n,r).map((e,t)=>{let r=n+t,i=this.#b[r];if(i==null)throw Error(`Missing projection path for visible index ${String(r)}`);return this.#$(e,r,r,{ancestorPaths:this.#re(r),path:i})})}getStickyRowCandidates(e,t){if(this.#F!=null)return null;if(this.#G===0||e<=0||t<=0)return[];let n=[];for(let r=0;r<this.#G;r+=1){let i=e+r*t,a=Math.min(this.#G-1,Math.floor(i/t)),o=this.#te(a,r)??(a>0?this.#te(a-1,r):void 0);if(o==null)break;n.push({row:this.#ee(o),subtreeEndIndex:o.subtreeEndIndex})}return n}getItem(e){let t=this.#H.getPathInfo(e);return t==null?null:this.#Q(t.path,t)}resolveMountedDirectoryPathFromInput(e){let t=this.#H.getPathInfo(e);return t?.kind===`directory`?t.path:null}toggleMountedDirectoryFromInput(e){let t=this.resolveMountedDirectoryPathFromInput(e);t!=null&&this.#ze(t)}selectAllVisiblePaths(){this.#Ie();let e=[...this.#be()];this.#ae(e,this.#c??this.#z)}selectOnlyPath(e){let t=this.#Ne(e);t!=null&&this.#ae([t],t)}selectOnlyMountedPathFromInput(e){this.#ae([e],e)}selectPath(e){let t=this.#Ne(e);t==null||this.#B.has(t)||this.#ae([...this.#B,t])}deselectPath(e){let t=this.#Ne(e);t==null||!this.#B.has(t)||this.#ae([...this.#B].filter(e=>e!==t))}toggleFocusedSelection(){this.#c!=null&&this.togglePathSelectionFromInput(this.#c)}togglePathSelection(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.deselectPath(t);return}this.selectPath(t)}}togglePathSelectionFromInput(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.#ae([...this.#B].filter(e=>e!==t),t);return}this.#ae([...this.#B,t],t)}}selectPathRange(e,t){let n=this.#Ne(e);if(n==null)return;this.#Ie();let r=this.#z,i=r==null?-1:this.#Ce(r),a=this.#Ce(n);if(i===-1||a===-1){let e=t?[...this.#B,n]:[n];this.#ae(e,n);return}let[o,s]=i<=a?[i,a]:[a,i],c=this.#be().slice(o,s+1),l=t?[...this.#B,...c]:c;this.#ae(l,r)}extendSelectionFromFocused(e){if(this.#c==null)return;let t=this.#s;if(t===-1)return;let n=Math.min(this.#G-1,Math.max(0,t+e));if(n===t)return;!this.#l&&n>=this.#b.length&&this.#Ie();let r=this.#be(),i=r[t]??null,a=r[n]??null;if(i==null||a==null)return;let o=new Set(this.#B);o.has(i)&&o.has(a)?o.delete(i):o.add(a),this.#ae([...o],this.#z??i,!1),this.#Fe(n)}getDragAndDropConfig(){return this.#r}isDragAndDropEnabled(){return this.#r!=null}getDragSession(){return this.#i==null?null:{draggedPaths:[...this.#i.draggedPaths],primaryPath:this.#i.primaryPath,target:this.#i.target==null?null:{...this.#i.target}}}startDrag(e){if(this.#r==null)return!1;let t=this.#Ne(e);if(t==null||this.#M!=null&&this.#M.length>0)return!1;let n=this.getSelectedPaths(),r=E$(t,n);return this.#r.canDrag?.(r)!==!1&&(n.includes(t)||this.#ae([t],t,!1),this.#Pe(t),this.#i={draggedPaths:r,primaryPath:t,target:null},this.#De(),!0)}setDragTarget(e){let t=this.#i;if(t==null)return;let n=e;if(n!=null){let e=O$(t.draggedPaths,n);(k$(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}D$(t.target,n)||(this.#i={...t,target:n},this.#De())}cancelDrag(){this.#i!=null&&(this.#i=null,this.#De())}completeDrag(){let e=this.#i;if(e==null)return!1;this.#i=null;let t=e.target==null?null:{...e.target};if(t==null)return this.#De(),!1;let n=O$(e.draggedPaths,t);if(k$(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#De(),!1;let r=j$(e.draggedPaths,t);if(r==null)return this.#De(),!1;try{if(r.operations.length===1){let e=r.operations[0];if(e==null||e.type!==`move`)throw Error(`Expected a single move operation for one-item drops`);this.#H.move(e.from,e.to,{collision:e.collision})}else this.#ce(r.operations),this.#H.batch(r.operations)}catch(e){return this.#De(),this.#r?.onDropError?.(e instanceof Error?e.message:String(e),n),!1}return this.#r?.onDropComplete?.(r.result),!0}subscribe(e){return this.#t.add(e),e(),()=>{this.#t.delete(e)}}add(e){this.#H.add(e)}remove(e,t={}){this.#H.remove(e,t)}move(e,t,n={}){this.#H.move(e,t,n)}batch(e){this.#H.batch(e)}onMutation(e,t){let n=e,r=t,i=this.#n.get(n);return i??(i=new Set,this.#n.set(n,i)),i.add(r),()=>{let e=this.#n.get(n);e?.delete(r),e?.size===0&&this.#n.delete(n)}}setSearch(e){this.#Te(e,!0)}openSearch(e=``){this.#Te(e,!0)}closeSearch(){this.#Te(null,!0)}isSearchOpen(){return this.#M!==null}getSearchValue(){return this.#M??``}getSearchMatchingPaths(){return this.#k}focusNextSearchMatch(){this.#we(1)}focusPreviousSearchMatch(){this.#we(-1)}startRenaming(e=this.#c??``,t={}){if(!this.#w)return!1;let n=this.#H.getPathInfo(e);if(n==null)return!1;let r=n.path,i=K$(r),a=Y$(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of U$(r))this.#H.isExpanded(e)||this.#H.expand(e);return this.#ae([r],r,!1),this.#M!=null&&(this.#Te(null,!1),this.#y?.(this.#M)),this.#Pe(r),this.#T=r,this.#E=J$(r),this.#D=t.removeIfCanceled??!1,this.#De(),!0}#q(){if(this.#T==null)return;let e=this.#T,t=this.#D;if(this.#T=null,this.#E=``,this.#D=!1,t){this.remove(e,K$(e)?{recursive:!0}:void 0);return}this.#Pe(e),this.#De()}#J(){let e=this.#T;if(e==null)return;if(this.#D&&this.#E.trim().length===0){this.#T=null,this.#E=``,this.#D=!1,this.remove(e,K$(e)?{recursive:!0}:void 0);return}let t=K$(e),n=S$({files:this.#H.list(),isFolder:t,nextBasename:this.#E,path:Y$(e)});if(this.#T=null,this.#E=``,this.#D=!1,`error`in n){this.#Pe(e),this.#v?.(n.error),this.#De();return}if(n.sourcePath===n.destinationPath){this.#Pe(e),this.#De();return}this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(X$(n.sourcePath,t),X$(n.destinationPath,t))}#Y(e){this.#T!=null&&this.#E!==e&&(this.#E=e,this.#De())}resetPaths(e,t={}){let n=!Array.isArray(e),r=n?void 0:e,i=n?e:t,a=this.#H.list().length,o=this.#G,s=N$({paths:r,preparedInput:i.preparedInput},`resetPaths`,this.#e.sort),c=this.#le(s.paths,s.preparedInput,i.initialExpandedPaths),l=this.#c,u=this.#T,d=this.getSelectedPaths(),f=this.#z;this.#K?.(),this.#H=c,this.#d.clear(),this.#he();let p=d.map(e=>c.getPathInfo(e)?.path??null).filter(e=>e!=null),m=!H$(this.#B,p);this.#B=new Set(p),m&&(this.#V+=1),this.#z=f==null?null:c.getPathInfo(f)?.path??null,this.#T=u==null?null:c.getPathInfo(u)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#je(l,l!=null||p.length>0||this.#z!=null),this.#K=this.#Re(),this.#De(),this.#Oe({canonicalChanged:!0,operation:`reset`,pathCountAfter:s.paths.length,pathCountBefore:a,projectionChanged:!0,usedPreparedInput:i.preparedInput!=null,visibleCountDelta:this.#G-o})}#X(e){this.#Ie();let t=W$(e),n=G$(e,t),r=null,i=null;for(let e of this.#be()){if(W$(e)!==t)continue;let a=G$(e,t);if(a<n){r=e;continue}if(a>n){i=e;break}}return r??i}#Z(e){let t=this.#Ce(e);if(t!==-1)return t;let n=U$(e);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t==null)continue;let r=this.#Ce(t);if(r!==-1)return r}return this.#be().length>0?0:-1}#Q(e,t){let n=this.#d.get(e);if(n!=null)return n;let r=t??this.#H.getPathInfo(e);if(r==null)return null;let i=r.kind===`directory`?this.#oe(r.path):this.#se(r.path);return this.#d.set(r.path,i),i}#$(e,t,n,r){return{ancestorPaths:r.ancestorPaths,depth:e.depth,flattenedSegments:e.flattenedSegments?.map(e=>({isTerminal:e.isTerminal,name:e.name,path:e.path})),hasChildren:e.hasChildren,index:t,isExpanded:e.isExpanded,isFlattened:e.isFlattened,isFocused:r.path===this.#c,isSelected:this.#B.has(r.path),kind:e.kind,level:e.depth,name:e.name,path:r.path,posInSet:r.posInSet??this.#x[n]??0,setSize:r.setSize??this.#S[n]??0}}#ee(e){return this.#$(e.row,e.index,e.index,{ancestorPaths:e.ancestorPaths,path:e.row.path,posInSet:e.posInSet,setSize:e.setSize})}#te(e,t){let n=this.#H.getVisibleRowContext(e);return n==null?void 0:n.ancestorRows[t]??(t===n.ancestorRows.length&&n.row.kind===`directory`&&n.row.isExpanded?n:void 0)}#ne(e){let t=this.#a.get(e);if(t!=null)return t;let n=this.#u(e),r=n<0?[]:[...this.#ne(n),n];return this.#a.set(e,r),r}#re(e){let t=this.#o.get(e);if(t!=null)return t;let n=this.#ne(e).map(e=>this.#b[e]??``).filter(e=>e!==``);return this.#o.set(e,n),n}#ie(e){this.#H.collapse(e)}#ae(e,t=this.#z,n=!0){let r=[...new Set(e)],i=!H$(this.#B,r),a=this.#z!==t;!i&&!a||(this.#B=new Set(r),this.#z=t,i&&(this.#V+=1),n&&this.#De())}#oe(e){return{collapse:()=>{this.#ie(e)},deselect:()=>{this.deselectPath(e)},expand:()=>{this.#ke(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!0,isExpanded:()=>this.#H.isExpanded(e),isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)},toggle:()=>{this.#ze(e)}}}#se(e){return{deselect:()=>{this.deselectPath(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!1,isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)}}}#ce(e){let t=this.#H.list();this.#le(t).batch(e)}#le(e,t,n){return new _$({...this.#e,paths:e,preparedInput:t??void 0,...n===void 0?{}:{initialExpandedPaths:n}})}#ue(){return this.#h??=this.#H.list(),this.#h}#de(){if(this.#m!=null)return this.#m;let e=new Set;for(let t of this.#ue()){e.add(t);for(let n of U$(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#fe(){return this.#g??=this.#ue().map(q$),this.#g}#pe(){return this.#f??=this.#de().filter(e=>e.endsWith(`/`)),this.#f}#me(){return this.#p??=this.#pe().map(q$),this.#p}#he(){this.#f=null,this.#p=null,this.#m=null,this.#h=null,this.#g=null}#ge(){return this.#pe().filter(e=>this.#H.isExpanded(e))}#_e(e){let t=new Set(this.#j??[]);if(e)for(let e of this.#B)for(let n of U$(e))t.add(n);this.#ve(t)}#ve(e){this.#W=!0;try{for(let t of this.#pe()){let n=e.has(t),r=this.#H.isExpanded(t);n&&!r?this.#H.expand(t):!n&&r&&this.#H.collapse(t)}}finally{this.#W=!1}}#ye(){if(this.#M==null||this.#M.length===0){this.#k=[],this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let e=this.#b;if(this.#k=e.filter(e=>this.#O.has(e)),this.#A!==`hide-non-matches`||this.#O.size===0){this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let t=[],n=[],r=new Map;for(let[i,a]of e.entries())this.#N?.has(a)===!0&&(r.set(a,n.length),t.push(i),n.push(a));this.#F=t,this.#I=n,this.#P=r,this.#G=n.length}#be(){return this.#I??this.#b}#xe(e){return this.#I==null?this.#H.getVisibleIndex(e)??-1:this.#P?.get(e)??-1}#Se(e){return this.#F?.[e]??e}#Ce(e){return this.#P?.get(e)??this.#H.getVisibleIndex(e)??-1}#we(e){let t=this.#k;if(t.length===0)return;let n=this.#c,r=n==null?-1:t.indexOf(n),i=t[r<0?e>0?0:t.length-1:Math.min(t.length-1,Math.max(0,r+e))];i!=null&&this.focusPath(i)}#Te(e,t){let n=e==null?null:Z$(e),r=this.#M;if(r!==n){if(r==null&&n!=null&&(this.#j=this.#ge()),this.#M=n,n==null)this.#_e(!0),this.#j=null,this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else if(n.length===0)this.#_e(!1),this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else{let e=this.#Ee();this.#je(e,!0)}t&&(this.#y?.(this.#M),this.#De())}}#Ee(){if(this.#M==null||this.#M.length===0)return this.#O.clear(),this.#c;let e=this.#M,t=this.#ue(),n=this.#fe(),r=[],i=new Set,a=null;for(let o=0;o<t.length;o+=1){if(!n[o].includes(e))continue;let s=t[o];r.push(s),i.add(s),a??=s}let o=this.#pe(),s=this.#me();for(let t=0;t<o.length;t+=1){if(!s[t].includes(e))continue;let n=o[t];i.has(n)||(r.push(n),i.add(n),a??=n)}this.#O=i;let c=this.#A===`hide-non-matches`&&r.length>0?new Set:null;this.#N=c;let l=this.#A===`expand-matches`?new Set(this.#j??[]):new Set;for(let e of r){c?.add(e),e.endsWith(`/`)&&l.add(e);for(let t of U$(e))l.add(t),c?.add(t)}return this.#ve(l),a??this.#c}#De(){for(let e of this.#t)e()}#Oe(e){this.#n.get(e.operation)?.forEach(t=>{t(e)}),this.#n.get(`*`)?.forEach(t=>{t(e)})}#ke(e){for(let t of U$(e))this.#H.isExpanded(t)||this.#H.expand(t);this.#H.isExpanded(e)||this.#H.expand(e)}#Ae(e){let t=this.#G;if(t===0)return;let n=this.#s===-1?0:this.#s,r=Math.min(t-1,Math.max(0,n+e));(r!==n||this.#s===-1)&&(!this.#l&&this.#F==null&&r>=this.#b.length&&this.#Ie(),this.#Fe(r))}#je(e,t=!0){let n=this.#H.getVisibleCount();this.#U=n;let r=r1(this.#H.getVisibleTreeProjectionData(t?void 0:Math.min(n,$$)),e,t?e=>this.#H.getVisibleIndex(e):void 0);this.#a.clear(),this.#o.clear(),this.#l=r.paths.length>=n,this.#u=r.getParentIndex,this.#b=r.paths,this.#x=r.posInSetByIndex,this.#S=r.setSizeByIndex,this.#ye(),this.#s=e==null?this.#be().length>0?0:-1:this.#Z(e),this.#c=this.#s<0?null:this.#Me(this.#s)}#Me(e){return this.#be()[e]??(this.#F==null?this.#H.getVisibleRowContext(e)?.row.path??null:null)}#Ne(e){return this.#H.getPathInfo(e)?.path??null}#Pe(e){if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t,!1)}#Fe(e,t=!0){let n=this.#Me(e);n!=null&&(this.#s!==e||this.#c!==n)&&(this.#s=e,this.#c=n,t&&this.#De())}#Ie(){this.#l||this.#je(this.#c,!0)}#Le(e){let t=L$(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=L$(this.#c,e,!0),r=[...this.#B].map(t=>L$(t,e)).filter(e=>e!=null).map(e=>this.#H.getPathInfo(e)?.path??null).filter(e=>e!=null),i=L$(this.#z,e),a=i==null?null:this.#H.getPathInfo(i)?.path??null,o=[...new Set(r)];return H$(this.#B,o)||(this.#B=new Set(o),this.#V+=1),this.#z=a,n}#Re(){return this.#H.on(`*`,e=>{if(this.#W)return;e.canonicalChanged&&(this.#d.clear(),this.#he()),this.#i!=null&&P$(e)&&(this.#i=null);let t=P$(e)?this.#Le(e):this.#c,n=this.#M!=null&&this.#M.length>0?this.#Ee():this.#M===``?this.#c:t,r=this.#M!=null||e.operation!==`expand`&&e.operation!==`collapse`;this.#je(n,r),this.#De();let i=V$(e);i!=null&&this.#Oe(i)})}#ze(e){if(this.#H.isExpanded(e)){this.#ie(e);return}this.#ke(e)}},a1=e=>{if(e==null||e.length===0)return`0`;let t=`${e.length}`;for(let n of e)t+=`\0${n.path}\0${n.status}`;return t};function o1(e){let t=e.endsWith(`/`),n=``,r=-1;for(let t=0;t<=e.length;t+=1){if(e[t]!==`/`&&t!==e.length){r===-1&&(r=t);continue}r!==-1&&(n!==``&&(n+=`/`),n+=e.slice(r,t),r=-1)}return n===``?null:{isDirectory:t,path:n}}function s1(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=[],r=0;for(;;){let e=t.indexOf(`/`,r);if(e===-1)break;n.push(t.slice(0,e+1)),r=e+1}return n}function c1(e,t){return t?`${e}/`:e}function l1(e,t=null){let n=a1(e==null?void 0:[...e]);if(n===`0`)return null;if(t?.signature===n)return t;let r=new Map,i=new Set,a=new Set,o=new Map;for(let t of e??[]){let e=d1(t);e!=null&&m1({canonicalPath:e.canonicalPath,changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,isDirectory:e.isDirectory,status:t.status,statusByPath:r})}return r.size===0?null:{changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}function u1(e,t){let n=t?.remove??[],r=t?.set??[];if(n.length===0&&r.length===0)return e;let i=new Map(e?.statusByPath),a=new Set(e?.directoriesWithChanges),o=new Set(e?.ignoredDirectoryPaths),s=new Map(e?.changeCountByDirectoryPath),c=!1;for(let e of n){let t=f1(e);t!=null&&(c=p1({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,statusByPath:i})||c)}for(let e of r){let t=d1(e);t!=null&&(c=m1({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,isDirectory:t.isDirectory,status:e.status,statusByPath:i})||c)}return c?i.size===0?null:{changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,signature:_1(i),statusByPath:i}:e}function d1(e){return f1(e.path)}function f1(e){let t=o1(e);if(t!=null)return{canonicalPath:c1(t.path,t.isDirectory),isDirectory:t.isDirectory}}function p1({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,statusByPath:i}){let a=i.get(e);return a!=null&&(i.delete(e),a===`ignored`&&e.endsWith(`/`)&&r.delete(e),g1(t,n,e),!0)}function m1({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,isDirectory:i,status:a,statusByPath:o}){let s=o.get(e);return s!==a&&(s??h1(t,n,e),o.set(e,a),a===`ignored`&&i?r.add(e):i&&r.delete(e),!0)}function h1(e,t,n){for(let r of s1(n))e.set(r,(e.get(r)??0)+1),t.add(r)}function g1(e,t,n){for(let r of s1(n)){let n=(e.get(r)??0)-1;n>0?e.set(r,n):(e.delete(r),t.delete(r))}}function _1(e){let t=`${e.size}`;for(let[n,r]of e)t+=`\0${n}\0${r}`;return t}var v1=e=>e.trim().toLowerCase(),y1=e=>e.split(`/`).at(-1)??e,b1=e=>{let t=e.toLowerCase().split(`.`),n=[];for(let e=1;e<t.length;e+=1)n.push(t.slice(e).join(`.`));return n};function x1(e,t){return typeof e==`string`?{name:e,remappedFrom:t}:{...e,remappedFrom:t}}function S1(e){let t=SY(e),n=t.remap,r=new Map;for(let[e,n]of Object.entries(t.byFileName??{}))r.set(e.toLowerCase(),n);let i=new Map;for(let[e,n]of Object.entries(t.byFileExtension??{}))i.set(v1(e),n);let a=Object.entries(t.byFileNameContains??{}).map(([e,t])=>[e.toLowerCase(),t]);return{resolveIcon:(e,o)=>{if(e===`file-tree-icon-file`&&o!=null){let s=y1(o),c=s.toLowerCase(),l=r.get(c);if(l!=null)return x1(l,e);for(let[t,n]of a)if(c.includes(t))return x1(n,e);let u=b1(s);for(let t of u){let n=i.get(t);if(n!=null)return x1(n,e)}let d=bY(t.set,s,u);if(d!=null&&t.set!==`none`){if(d==="default"){let t=n?.[e];if(t!=null)return x1(t,e)}return{name:vY(d),remappedFrom:e,token:d}}}let s=n?.[e];return s==null?{name:e}:x1(s,e)}}}var C1,w1,T1,E1,D1,O1,k1,A1,j1,M1,N1={},P1=[],F1=Array.isArray,I1=P1.slice,L1=Object.assign;function R1(e){e&&e.parentNode&&e.remove()}function z1(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`&&typeof e!=`function`?i=t[a]:o[a]=t[a];return arguments.length>2&&(o.children=arguments.length>3?I1.call(arguments,2):n),B1(e,o,r,i,null)}function B1(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++w1,__i:-1,__u:0};return i==null&&C1.vnode!=null&&C1.vnode(a),a}function V1(e){return e.children}function H1(e,t){this.props=e,this.context=t,this.__g=0}function U1(e,t){if(t==null)return e.__?U1(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?U1(e):null}function W1(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=n.__e;break}return W1(e)}}function G1(e){(8&e.__g||!(e.__g|=8)||!T1.push(e)||D1++)&&E1==C1.debounceRendering||((E1=C1.debounceRendering)||queueMicrotask)(K1)}function K1(){for(var e,t,n,r,i,a,o,s,c=1;T1.length;)T1.length>c&&T1.sort(O1),e=T1.shift(),c=T1.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=L1({},r)).__v=r.__v+1,C1.vnode&&C1.vnode(n),e0(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??U1(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,n0(a,n,o),n.__e!=i&&W1(n)));D1=0}function q1(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||P1,b=t.length;for(c=J1(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?N1:y[m.__i]||N1,m.__i=f,_=e0(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&a0(p.ref,null,m),u.push(m.ref,m.__c||h,m)),g==null&&h!=null&&(g=h),(v=!!(4&m.__u))||p.__k===m.__k?c=Y1(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function J1(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(c=a+f,(o=e.__k[a]=typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?B1(null,o,null,null,null):F1(o)?B1(V1,{children:o},null,null,null):o.constructor==null&&o.__b>0?B1(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,s=null,(l=o.__i=X1(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=U1(s)),o0(s,s));return r}function Y1(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=Y1(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=U1(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function X1(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&e.key==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function Z1(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function Q1(e,t,n,r,i){var a;n:if(t==`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||Z1(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||Z1(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(k1,`$1`)),(t=t.slice(2))[0].toLowerCase()!=t[0]&&(t=t.toLowerCase()),e.__l||={},e.__l[t+a]=n,n?r?n.l=r.l:(n.l=A1,e.addEventListener(t,a?M1:j1,a)):e.removeEventListener(t,a?M1:j1,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function $1(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=A1++;else if(t.u<n.l)return;return n(C1.event?C1.event(t):t)}}}function e0(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,ee,j=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),n.__c.__z&&(s=t.__e=n.__e=(a=n.__c.__z)[0],n.__c.__z=null)),(d=C1.__b)&&d(t);n:if(typeof j==`function`)try{if(v=t.props,y=`prototype`in j&&j.prototype.render,b=(d=j.contextType)&&r[d.__c],x=d?b?b.props.value:d.__:r,n.__c?2&(f=t.__c=n.__c).__g&&(f.__g|=1,_=!0):(y?t.__c=f=new j(v,x):(t.__c=f=new H1(v,x),f.constructor=j,f.render=s0),b&&b.sub(f),f.props=v,f.state||(f.state={}),f.context=x,f.__n=r,p=!0,f.__g|=8,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&j.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=L1({},f.__s)),L1(f.__s,j.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&j.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&j.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),!(4&f.__g)&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),S=0;S<f._sb.length;S++)f.__h.push(f._sb[S]);f._sb=[],f.__h.length&&o.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__g&=-5,C=C1.__r,w=0,y){for(f.state=f.__s,f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),T=0;T<f._sb.length;T++)f.__h.push(f._sb[T]);f._sb=[]}else do f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(8&f.__g&&++w<25);f.state=f.__s,f.getChildContext!=null&&(r=L1({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),E=d,d!=null&&d.type===V1&&d.key==null&&(E=r0(d.props.children)),s=q1(e,F1(E)?E:[E],t,n,r,i,a,o,s,c,l,u),t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__g&=-4)}catch(e){if(t.__v=null,c||a!=null){if(e.then){for(D=0,O=!1,t.__u|=c?160:128,t.__c.__z=[],k=0;k<a.length;k++)(A=a[k])==null||O||(A.nodeType==8&&A.data==`$s`?(D>0&&t.__c.__z.push(A),D++,a[k]=null):A.nodeType==8&&A.data==`/$s`?(--D>0&&t.__c.__z.push(A),O=D===0,s=a[k],a[k]=null):D>0&&(t.__c.__z.push(A),a[k]=null));if(!O){for(;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__c.__z=[s]}t.__e=s}else{for(ee=a.length;ee--;)R1(a[ee]);t0(t)}}else t.__e=n.__e,t.__k=n.__k,e.then||t0(t);C1.__e(e,t,n)}else s=t.__e=i0(n.__e,t,n,r,i,a,o,c,l,u);return(d=C1.diffed)&&d(t),128&t.__u?void 0:s}function t0(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(t0)}function n0(e,t,n){for(var r=0;r<n.length;r++)a0(n[r],n[++r],n[++r]);C1.__c&&C1.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){C1.__e(e,t.__v)}})}function r0(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:F1(e)?e.map(r0):L1({},e)}function i0(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v=n.props,y=t.props,b=t.type;if(b==`svg`?i=`http://www.w3.org/2000/svg`:b==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||=`http://www.w3.org/1999/xhtml`,a!=null){for(u=0;u<a.length;u++)if((m=a[u])&&`setAttribute`in m==!!b&&(b?m.localName==b:m.nodeType==3)){e=m,a[u]=null;break}}if(e==null){if(b==null)return l.createTextNode(y);e=l.createElementNS(i,b,y.is&&y),s&&=(C1.__m&&C1.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=I1.call(e.childNodes),v=n.props||N1,!s&&a!=null)for(v={},u=0;u<e.attributes.length;u++)v[(m=e.attributes[u]).name]=m.value;for(u in v)if(m=v[u],u!=`children`){if(u==`dangerouslySetInnerHTML`)f=m;else if(!(u in y)){if(u==`value`&&`defaultValue`in y||u==`checked`&&`defaultChecked`in y)continue;Q1(e,u,null,m,i)}}for(u in _=1&n.__u,y)m=y[u],u==`children`?p=m:u==`dangerouslySetInnerHTML`?d=m:u==`value`?h=m:u==`checked`?g=m:s&&typeof m!=`function`||v[u]===m&&!_||Q1(e,u,m,v[u],i);if(d)s||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(f&&(e.innerHTML=``),q1(b==`template`?e.content:e,F1(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&U1(n,0),s,c,l),a!=null)for(u=a.length;u--;)R1(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||Q1(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&Q1(e,u,g,v[u],i))}return e}function a0(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){C1.__e(e,n)}}function o0(e,t,n){var r,i;if(C1.unmount&&C1.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||a0(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){C1.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&o0(r[i],t,n||typeof e.type!=`function`);n||R1(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function s0(e,t,n){return this.constructor(e,n)}function c0(e,t){var n,r,i,a;t==document&&(t=document.documentElement),C1.__&&C1.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=z1(V1,null,[e]),i=[],a=[],e0(t,e,r||N1,N1,t.namespaceURI,r?null:t.firstChild?I1.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),n0(i,e,a)}function l0(e,t){e.__u|=32,c0(e,t)}C1={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!(1&i.__g)){i.__g|=4;try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=8&i.__g),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=8&i.__g),o)return void(i.__g|=2)}catch(t){e=t}}throw D1=0,e}},w1=0,H1.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=L1({},this.state);typeof e==`function`&&(e=e(L1({},n),this.props)),e&&L1(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),G1(this))},H1.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),G1(this))},H1.prototype.render=V1,T1=[],D1=0,O1=function(e,t){return e.__v.__b-t.__v.__b},k1=/(PointerCapture)$|Capture$/i,A1=0,j1=$1(!1),M1=$1(!0);var u0=0;Array.isArray;function $(e,t,n,r,i,a){t||={};var o,s,c=t;if(`ref`in c&&typeof e!=`function`)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--u0,__i:-1,__u:0,__source:i,__self:a};return C1.vnode&&C1.vnode(l),l}var d0=16,f0=16,p0={};function m0({name:e,remappedFrom:t,token:n,width:r,height:i,viewBox:a,label:o,alignCapitals:s=!1}){"use no memo";let c=`#${e.replace(/^#/,``)}`,{width:l,height:u,viewBox:d}=p0[e]??{width:d0,height:f0},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return $(`svg`,{"data-icon-name":t??e,"data-icon-token":n,"data-align-capitals":s,...o==null?{"aria-hidden":!0}:{"aria-label":o,role:`img`},viewBox:m,width:f,height:p,children:$(`use`,{href:c})})}var h0=e=>e!==void 0&&/\s/.test(e),g0=(e,t)=>{let n=t=>h0(e[t-1])||h0(e[t]);if(!n(t))return t;for(let r=1;r<e.length;r++){let i=t-r;if(i>0&&!n(i))return i;let a=t+r;if(a<e.length&&!n(a))return a}return t},_0=e=>g0(e,Math.ceil(e.length/2)),v0=e=>{if(e.length<2)return[e,``];let t=_0(e);return[e.slice(0,t),e.slice(t)]},y0=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:_0(e);return[e.slice(0,r),e.slice(r)]},b0=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`/`)+1,n=e.length-t>25,r=t>=1&&!n?t:Math.ceil(e.length/2);return[e.slice(0,r),e.slice(r)]},x0=(e,{splitIndex:t}={})=>{if(typeof t!=`number`){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}return[e.slice(0,t),e.slice(t)]},S0=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=e.length-t;return[e.slice(0,n),e.slice(n)]},C0=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=t;return[e.slice(0,n),e.slice(n)]};function w0({children:e,marker:t,variant:n=`default`}){"use no memo";return $(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:$(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?$(`span`,{"data-truncate-fade":!0}):t})})}function T0(e){"use no memo";let{mode:t,children:n}=e;return $(`div`,{children:[$(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?$(`span`,{children:n}):n}),$(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?$(`span`,{children:n}):n})]})}function E0({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=$(T0,{mode:t,children:e},`content`),o=$(w0,{marker:n,mode:t,variant:r},`marker`),s=$(`div`,{"data-truncate-fill":!0},`fill`);return $(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:$(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function D0({children:e,...t}){"use no memo";return $(E0,{mode:`truncate`,...t,children:e})}function O0({children:e,...t}){"use no memo";return $(E0,{mode:`fruncate`,...t,children:e})}function k0({children:e,contents:t,priority:n=`end`,split:r=`center`,minimumLength:i=12,className:a,style:o,...s}){"use no memo";let c=null,l=null;if(Array.isArray(t)){if(t.length!==2)return console.error(`MiddleTruncate: contents must be an array of two items`),null;c=$(D0,{...s,children:t[0]}),l=$(O0,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return $(`div`,{className:a,style:o});if(e.length<i)return $(n===`end`?O0:D0,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=v0:r===`extension`?t=y0:r===`leaf-path`&&(t=b0);else if(typeof r==`number`)t=x0,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=S0:e===`first`&&(t=C0)}else typeof r==`function`&&(t=r);t??=v0;let[f,p]=t(e,{priority:n,variant:s.variant,splitIndex:typeof u==`number`?u:void 0,splitOffset:typeof d==`number`?d:void 0}),m=f.length>=p.length,h=n===`equal`&&!m,g=n===`equal`&&m,_={},v={};h&&(_.marker=``),g&&(v.marker=``),c=$(D0,{...s,..._,children:f}),l=$(O0,{...s,...v,children:p})}return $(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[$(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),$(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var A0={endIndex:-1,startIndex:-1};function j0(e,t,n){return Math.min(Math.max(e,t),n)}function M0(e,t){return e<0||t<e?A0:{endIndex:t,startIndex:e}}function N0(e){return e.startIndex<0||e.endIndex<e.startIndex}function P0(e,t){return N0(e)?0:(e.endIndex-e.startIndex+1)*t}function F0(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function I0(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function L0(e){let t=new Map;return e.forEach((e,n)=>{if(e.kind!==`directory`||!e.isExpanded)return;let r=e.ancestorPaths.length,i=t.get(r);if(i==null){t.set(r,[n]);return}i.push(n)}),t}function R0(e,t){let n=0,r=e.length-1,i=-1;for(;n<=r;){let a=Math.floor((n+r)/2),o=e[a];if(o==null)break;if(o<=t){i=a,n=a+1;continue}r=a-1}return i}function z0(e){let t=new Map,n=[];for(let r=0;r<e.length;r+=1){let i=e[r];if(i==null)continue;let a=i.kind===`directory`&&i.isExpanded?[...i.ancestorPaths,i.path]:i.ancestorPaths,o=0;for(;o<n.length&&o<a.length&&n[o]===a[o];)o+=1;for(let e=n.length-1;e>=o;--e){let i=n[e];i!=null&&t.set(i,r-1)}n.length=o;for(let e=o;e<a.length;e+=1){let t=a[e];t!=null&&n.push(t)}}let r=e.length-1;for(let e of n)t.set(e,r);return t}function B0(e,t,n){if(e.length===0||t<=0)return[];let r=z0(e),i=L0(e),a=[];for(let r=0;r<e.length;r+=1){let o=i.get(r);if(o==null||o.length===0)break;let s=t+r*n,c=R0(o,Math.min(e.length-1,Math.floor(s/n))),l=null;for(;c>=0;){let t=o[c],n=t==null?null:e[t]??null;if(n!=null&&(r===0||n.ancestorPaths[r-1]===a[r-1]?.path)){l=n;break}--c}if(l==null)break;a.push(l)}return a.map((i,a)=>{let o=a*n,s=(r.get(i.path)??e.length-1)+1;if(s>=e.length)return{row:i,top:o};let c=s*n-t;return{row:i,top:Math.min(o,c-n)}}).filter(e=>e.top+n>0)}function V0(e,t){let n=t.totalRowCount??e.length,r=n*t.itemHeight,i=Math.max(0,t.viewportHeight),a=Math.max(0,Math.floor(t.overscan)),o=Math.max(0,r-i),s=j0(t.scrollTop,0,o),c=t.stickyRows??B0(e,s,t.itemHeight),l=c.reduce((e,n)=>Math.max(e,n.top+t.itemHeight),0),u=Math.min(r,s+l),d=Math.max(0,i-l),f=Math.max(0,r-u),p=F0(s,n,t.itemHeight),m=F0(u,n,t.itemHeight),h=l<=0||p<0||p>=n?-1:p,g=h===-1?-1:Math.min(n-1,m-1),_=h===-1||g<h?0:g-h+1,v=d<=0||m>=n?A0:M0(m,I0(u+d,n,t.itemHeight)),y=g+1,b=N0(v)?A0:M0(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=P0(b,t.itemHeight);return{occlusion:{firstOccludedIndex:h,lastOccludedIndex:g,occludedCount:_},physical:{itemHeight:t.itemHeight,maxScrollTop:o,overscan:a,scrollTop:s,totalHeight:r,totalRowCount:n,viewportHeight:i},projected:{contentHeight:f,paneHeight:d,paneTop:u},sticky:{height:l,rows:c},visible:v,window:{endIndex:b.endIndex,height:x,offsetTop:N0(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var H0={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},U0={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},W0=`Contains git status items`;function G0(e){return e.current?!0:(e.current=!0,!1)}function K0(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:i=0,viewportHeight:a}=e;if(n<0)return null;let o=Math.max(0,i),s=n*r,c=s+r;if(s<t+o){let e=Math.max(0,s-o);return e===t?null:e}if(c>t+a){let e=c-a;return e===t?null:e}return null}function q0(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,offset:i,topInset:a=0,totalHeight:o,viewportHeight:s}=e;if(i===`nearest`)return K0({currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:a,viewportHeight:s});if(n<0)return null;let c=Math.max(0,a),l=n*r,u=Math.max(0,s-c),d=i===`center`?c+Math.max(0,(u-r)/2):c,f=Math.max(0,o-s),p=Math.max(0,Math.min(l-d,f));return p===t?null:p}function J0(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,targetViewportOffset:i,totalHeight:a,viewportHeight:o}=e;if(n<0)return null;let s=Math.max(0,i),c=n*r,l=c+r,u=t+s,d=t+o;if(c>=u&&l<=d)return null;let f=Math.max(0,a-o),p=Math.max(0,Math.min(c-s,f));return p===t?null:p}function Y0(e){if(e==null||!e.isConnected||e===document.body||e===document.documentElement)return!1;e.focus({preventScroll:!0});let t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement===e:document.activeElement===e}function X0(e){let t=e.getRootNode();if(t instanceof ShadowRoot){let e=t.activeElement;return e instanceof HTMLElement?e:null}let n=document.activeElement;return n instanceof HTMLElement&&e.contains(n)?n:null}function Z0(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function Q0(e,t){return e!=null&&e>0?e:t}function $0(e){let t=e.borderBoxSize,n=Array.isArray(t)?t[0]:t;return n!=null&&Number.isFinite(n.blockSize)&&n.blockSize>0?n.blockSize:e.contentRect.height>0?e.contentRect.height:null}function e2(e,t,n,r,i=0){let a=K0({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a!=null&&(e.scrollTop=a,!0)}function t2(e,t,n,r,i,a,o=0){let s=q0({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,offset:a,topInset:o,totalHeight:i,viewportHeight:r});return s!=null&&(e.scrollTop=s,!0)}function n2(e,t,n,r,i,a){let o=J0({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o!=null&&(e.scrollTop=o,!0)}function r2(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function i2(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function a2({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return $(`input`,{ref:n,"data-item-rename-input":!0,...t?{"data-item-flattened-rename-input":!0}:{},"aria-label":e,value:r,onBlur:i,onInput:a,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()})}function o2(e){let{row:t,mode:n,targetPath:r,ariaLabel:i,domId:a,isParked:o,itemHeight:s,features:c,state:l,extraStyle:u}=e,d=n===`sticky`,f=t.ancestorPaths.at(-1)??``,p={};return l.isFocusRinged&&(p[`data-item-focused`]=!0),t.isSelected&&(p[`data-item-selected`]=!0),l.isContextHovered&&(p[`data-item-context-hover`]=`true`),l.isDragTarget&&(p[`data-item-drag-target`]=!0),l.isDragging&&(p[`data-item-dragging`]=!0),l.effectiveGitStatus!=null&&(p[`data-item-git-status`]=l.effectiveGitStatus),l.containsGitChange&&(p[`data-item-contains-git-change`]=`true`),{"aria-expanded":!d&&t.kind===`directory`?t.isExpanded:void 0,"aria-haspopup":c.contextMenuEnabled?`menu`:void 0,"aria-label":i,"aria-level":d?void 0:t.level+1,"aria-posinset":d?void 0:t.posInSet+1,"aria-selected":d?void 0:t.isSelected?`true`:`false`,"aria-setsize":d?void 0:t.setSize,"data-file-tree-sticky-path":d?r:void 0,"data-file-tree-sticky-row":d?`true`:void 0,"data-item-context-menu-button-visibility":c.actionLaneEnabled?c.contextMenuButtonVisibility:void 0,"data-item-context-menu-trigger-mode":c.contextMenuEnabled?c.contextMenuTriggerMode:void 0,"data-item-has-context-menu-action-lane":c.actionLaneEnabled?`true`:void 0,"data-item-has-git-lane":c.gitLaneActive?`true`:void 0,"data-item-parent-path":f.length>0?f:void 0,"data-item-parked":o?`true`:void 0,"data-item-path":r,"data-item-type":t.kind===`directory`?`folder`:`file`,"data-type":`item`,id:d?void 0:a,role:d?void 0:`treeitem`,style:{minHeight:`${s}px`,...u},tabIndex:!d&&t.isFocused?0:-1,...p}}function s2(e){let{event:t,mode:n,isSearchOpen:r,isDirectory:i}=e,a=t.ctrlKey||t.metaKey,o=t.shiftKey||a,s=t.shiftKey?{additive:a,kind:`range`}:a?{kind:`toggle`}:{kind:`single`};return{closeSearch:r,revealCanonical:n===`sticky`,selection:s,toggleDirectory:!o&&i}}var c2,l2,u2,d2,f2=Object.is,p2=0,m2=[],h2=C1,g2=h2.__b,_2=h2.__r,v2=h2.diffed,y2=h2.__c,b2=h2.unmount,x2=h2.__;function S2(e,t){h2.__h&&h2.__h(l2,e,p2||t),p2=0;var n=l2.__H||(l2.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function C2(e){return p2=1,w2(I2,e)}function w2(e,t,n){var r=S2(c2++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):I2(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);f2(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=l2,!l2.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,f2(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};l2.__f=!0;var a=l2.shouldComponentUpdate,o=l2.componentWillUpdate;l2.componentWillUpdate=function(e,t,n){if(4&this.__g){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},l2.shouldComponentUpdate=i}return r.__N||r.__}function T2(e,t){var n=S2(c2++,3);!h2.__s&&F2(n.__H,t)&&(n.__=e,n.u=t,l2.__H.__h.push(n))}function E2(e,t){var n=S2(c2++,4);!h2.__s&&F2(n.__H,t)&&(n.__=e,n.u=t,l2.__h.push(n))}function D2(e){return p2=5,O2(function(){return{current:e}},[])}function O2(e,t){var n=S2(c2++,7);return F2(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function k2(e,t){return p2=8,O2(function(){return e},t)}function A2(){for(var e;e=m2.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(N2),e.__H.__h.forEach(P2),e.__H.__h=[]}catch(t){e.__H.__h=[],h2.__e(t,e.__v)}}h2.__b=function(e){l2=null,g2&&g2(e)},h2.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),x2&&x2(e,t)},h2.__r=function(e){_2&&_2(e),c2=0;var t=(l2=e.__c).__H;t&&(u2===l2?(t.__h=[],l2.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(N2),t.__h.forEach(P2),t.__h=[],c2=0)),u2=l2},h2.diffed=function(e){v2&&v2(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(m2.push(t)!==1&&d2===h2.requestAnimationFrame||((d2=h2.requestAnimationFrame)||M2)(A2)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),u2=l2=null},h2.__c=function(e,t){t.some(function(e){try{e.__h.forEach(N2),e.__h=e.__h.filter(function(e){return!e.__||P2(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],h2.__e(n,e.__v)}}),y2&&y2(e,t)},h2.unmount=function(e){b2&&b2(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{N2(e)}catch(e){t=e}}),n.__H=void 0,t&&h2.__e(t,n.__v))};var j2=typeof requestAnimationFrame==`function`;function M2(e){var t,n=function(){clearTimeout(r),j2&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);j2&&(t=requestAnimationFrame(n))}function N2(e){var t=l2,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),l2=t}function P2(e){var t=l2;e.__c=e.__(),l2=t}function F2(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!f2(t,e[n])})}function I2(e,t){return typeof t==`function`?t(e):t}function L2(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:$(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return $(V1,{children:[$(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:$(D0,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function R2(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function z2(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function B2(e,t,n,r){return e.map((e,i)=>{let a=i*n,o=e.subtreeEndIndex+1;if(o>=r)return{row:e.row,top:a};let s=o*n-t;return{row:e.row,top:Math.min(a,s-n)}}).filter(e=>e.top+n>0)}function V2({controller:e,itemHeight:t,overscan:n,scrollTop:r,stickyFolders:i,viewportHeight:a}){let o=e.getVisibleCount(),s=i&&o>0?e.getStickyRowCandidates(r,t):[],c=s==null&&i&&o>0?e.getVisibleRows(0,o-1):[],l=V0(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:B2(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?B2(u,1,t,o):i&&r<=0&&c.length>0?B0(c,1,t):l.sticky.rows;return{overlayHeight:d.reduce((e,n)=>Math.max(e,n.top+t),0),overlayRows:d,snapshot:l,visibleRows:c}}var H2=400,U2=40,W2=18;function G2(e,t,n){let r=e,i=document.elementFromPoint?.bind(document)??null,a=r.elementFromPoint?.(t,n)??i?.(t,n)??null;return e instanceof ShadowRoot&&(a==null||!e.contains(a))?K2(e,t,n):a instanceof HTMLElement?a:null}function K2(e,t,n){let r=Array.from(e.querySelectorAll(`[data-type="item"], [data-item-flattened-subitem]`));for(let e=r.length-1;e>=0;e--){let i=r[e],a=i.getBoundingClientRect();if(t>=a.left&&t<=a.right&&n>=a.top&&n<=a.bottom)return i}return null}function q2(e){let t=e?.closest?.(`[data-type="item"]`);if(!(t instanceof HTMLElement))return null;let n=t.dataset.itemPath??null;if(n==null)return null;let r=e?.closest?.(`[data-item-flattened-subitem]`),i=r instanceof HTMLElement?r.getAttribute(`data-item-flattened-subitem`)??null:null;if(i!=null&&i.endsWith(`/`))return{directoryPath:i,flattenedSegmentPath:i,hoveredPath:n,kind:`directory`};if(t.dataset.itemType===`folder`)return{directoryPath:n,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`};let a=t.dataset.itemParentPath??null;return a==null||a.length===0?{directoryPath:null,flattenedSegmentPath:null,hoveredPath:n,kind:`root`}:{directoryPath:a,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`}}function J2(e){let t=e.cloneNode(!0);return t.removeAttribute(`id`),t.dataset.fileTreeDragPreview=`true`,t.setAttribute(`aria-hidden`,`true`),t.tabIndex=-1,Object.assign(t.style,{boxShadow:`0 4px 12px rgba(0, 0, 0, 0.15)`,left:`0px`,margin:`0`,pointerEvents:`none`,position:`fixed`,top:`0px`,willChange:`transform`,zIndex:`10000`}),t}function Y2(){return navigator.vendor!==`Apple Computer, Inc.`}function X2(e,t){let n=e-t.top;if(n<U2)return-Math.ceil((U2-Math.max(0,n))/U2*W2);let r=t.bottom-e;return r<U2?Math.ceil((U2-Math.max(0,r))/U2*W2):0}function Z2(e,t){if(e!=null){let t=H0[e];return t==null?null:{text:t,title:U0[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:W0}:null}function Q2(e,t,n){if(t==null||t.size===0)return null;let r=[];for(let i=e.length-1;i>=0;--i){let a=e[i],o=n.get(a);if(o!=null){for(let e of r)n.set(e,o);return o?`ignored`:null}if(t.has(a)){n.set(a,!0);for(let e of r)n.set(e,!0);return`ignored`}r.push(a)}for(let e of r)n.set(e,!1);return null}function $2(e){return e!=null&&`toggle`in e}function e4(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function t4(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function n4(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function r4(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function i4(e,t){return t&&r4(e)||(e.ctrlKey||e.metaKey)&&e4(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var a4=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function o4(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&(t.dataset.fileTreeContextMenuRoot===`true`||t.dataset.type===`context-menu-anchor`||t.dataset.type===`context-menu-trigger`||t.getAttribute(`slot`)===`context-menu`))return!0;return!1}function s4(e){return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width,x:e.x,y:e.y}}function c4(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function l4(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function u4(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function d4(e,t,n){if(e==null)return null;let r=t.get(e)??null;if(r!=null)return r;let i=n.get(e)??null;return i?.dataset.itemParked===`true`?null:i}function f4(e){if(e==null)return[];let t=[];for(let n of e.querySelectorAll(`button[data-file-tree-sticky-row="true"]`)){if(!(n instanceof HTMLElement))continue;let e=n.dataset.fileTreeStickyPath;e!=null&&t.push(e)}return t}function p4(e,t){if(e==null||t==null)return null;for(let n of e.querySelectorAll(`button[data-item-focused="true"][data-item-parked="true"]`))if(n instanceof HTMLElement&&n.dataset.itemPath===t)return n;return null}function m4(e,t,n,r,i,a,o){let s=Math.max(0,a-i),c=t?.getBoundingClientRect()??null,l=c==null||n==null?null:n.getBoundingClientRect().top-c.top,u=p4(e,r),d=c==null||u==null?null:u.getBoundingClientRect().top-c.top;return Math.max(0,Math.min(d??Math.max(l??0,s),Math.max(0,o-i)))}function h4(e,t){return{kind:e.kind,name:z2(e),path:t}}function g4(e){return e==null?void 0:`${e}__tree`}function _4(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function v4(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function y4(e,t){if(e==null)return null;if(`text`in e)return e.parts==null?$(`span`,{title:e.title,children:e.text}):$(`span`,{title:e.title,children:e.parts.map((e,t)=>$(`span`,{style:{color:e.color},children:e.text},t))});let n=typeof e.icon==`string`?v4(e.icon)?t(e.icon):{name:e.icon}:v4(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return $(`span`,{title:e.title,children:$(m0,{...n})})}function b4(e){e!=null&&Y0(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function x4(e,t,{actionLaneEnabled:n=!1,customDecoration:r=null,decorationLaneEnabled:i=!1,dragTargetFlattenedSegmentPath:a=null,gitDecoration:o=null,gitLaneActive:s=!1,renameInput:c=null,showDecorativeActionAffordance:l=!1}={}){let u=R2(e);return $(V1,{children:[e.depth>0?$(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>$(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,$(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?$(m0,{...t(`file-tree-icon-chevron`)}):$(m0,{...t(`file-tree-icon-file`,u)})}),$(`div`,{"data-item-section":`content`,children:e.isFlattened?L2(e,c,a):c??$(k0,{minimumLength:5,split:`extension`,children:e.name})}),i?$(`div`,{"data-item-section":`decoration`,children:r==null?null:y4(r,t)}):null,s?$(`div`,{"data-item-section":`git`,children:y4(o,t)}):null,n?$(`div`,{"data-item-section":`action`,children:l?$(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:$(m0,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function S4(e,t,n,r={}){let{controller:i,renameView:a,visualFocusPath:o,contextHoverPath:s,draggedPathSet:c,dragTarget:l,dragAndDropEnabled:u,shouldSuppressContextMenu:d,handleRowDragStart:f,handleRowDragEnd:p,handleRowTouchStart:m,instanceId:h,itemHeight:g,gitStatusByPath:_,ignoredGitDirectories:v,ignoredInheritanceCache:y,directoriesWithGitChanges:b,gitLaneActive:x,contextMenuEnabled:S,contextMenuTriggerMode:C,contextMenuButtonTriggerEnabled:w,contextMenuButtonVisibility:T,contextMenuRightClickEnabled:E,registerRenameInput:D,registerButton:O,resolveIcon:k,renderDecorationForRow:A,openContextMenuForRow:ee,onRowClick:j,onKeyDown:M}=e,N=R2(t),{isParked:P=!1,mode:F=`flow`,style:I}=r,te=F===`sticky`,ne=_?.get(N)??null??Q2(t.ancestorPaths,v,y),re=t.kind===`directory`&&(b?.has(N)??!1),L=A(t,N),R=Z2(ne,re),z=S&&w,B=L!=null||x||z,ie=z&&T===`always`,ae=a.getPath()===N,oe=ae?a.getValue():``,se=te||!ae?null:$(a2,{ref:D,ariaLabel:`Rename ${z2(t)}`,isFlattened:t.isFlattened,value:oe,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),ce=x4(t,k,{actionLaneEnabled:z,customDecoration:L,decorationLaneEnabled:B,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:R,gitLaneActive:x,renameInput:se,showDecorativeActionAffordance:ie}),le={...o2({ariaLabel:z2(t),domId:t.isFocused?_4(h,N,P):void 0,extraStyle:I,features:{actionLaneEnabled:z,contextMenuButtonVisibility:z?T:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:P,itemHeight:g,mode:F,row:t,state:{containsGitChange:re,effectiveGitStatus:ne,isContextHovered:s===N,isDragTarget:l?.kind===`directory`&&l.directoryPath===N,isDragging:c?.has(N)===!0,isFocusRinged:t.isFocused&&o===N},targetPath:N}),key:n,onContextMenu:S||u?e=>{if(d()){e.preventDefault();return}S&&(e.preventDefault(),E&&(i.focusMountedPathFromInput(N),ee(t,N,{anchorRect:c4(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:te?void 0:()=>{i.focusMountedPathFromInput(N)},onKeyDown:te?void 0:M,ref:e=>{O(N,e)}};return!te&&ae?$(`div`,{...le,children:ce}):$(`button`,{...le,type:`button`,draggable:u&&!P,onDragEnd:u&&!P?p:void 0,onDragStart:u&&!P?e=>{f(e,t,N)}:void 0,onMouseDown:e=>{if(te){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!P?e=>{m(e,t,N)}:void 0,onClick:e=>{j(e,t,N,F)},children:ce})}function C4(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(R2(e))).map((n,r)=>S4(e,n,t.start+r))}function w4({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=TY,overscan:c=10,renamingEnabled:l=!1,renderRowDecoration:u,searchBlurBehavior:d=`close`,searchEnabled:f=!1,searchFakeFocus:p=!1,slotHost:m,stickyFolders:h=!1,initialViewportHeight:g=420}){"use no memo";let _=D2(null),v=D2(null),y=D2(!1),b=D2(null),x=D2(null),S=D2(null),C=D2(null),w=D2(null),T=D2(new Map),E=D2(new Map),D=D2(()=>{}),O=D2(null),k=D2(0),A=D2(!1),ee=D2(null);ee.current!==t&&(A.current=!1,ee.current=t);let j=D2(!1),M=D2(null),N=D2(null),P=D2(!1),F=D2(null),I=D2(null),te=D2(null),ne=D2(null),re=D2(null),L=D2(null),R=D2(null),z=D2(null),B=D2(!1),ie=D2(null),ae=D2(null),oe=D2(null),se=D2(null),ce=O2(()=>new Map,[]),[,le]=C2(0),ue=D2(!1),[V,de]=C2(null),[fe,pe]=C2(null),[me,he]=C2(null),[ge,_e]=C2(null),[ve,ye]=C2(0),[be,xe]=C2(null),Se=D2(be);Se.current=be;let Ce=D2(null),we=D2(null),Te=D2(null),Ee=D2(null),De=D2(null),Oe=D2(!1),ke=()=>{we.current=null,Te.current=null,Ee.current=null},Ae=(e,t)=>{we.current=e,Te.current=null,Ee.current=t==null?null:{path:e,scrollTop:t}},je=(e,t)=>{we.current=null,Te.current={path:e,viewportOffset:t},Ee.current=null},Me=D2(d===`retain`&&t.isSearchOpen()),[Ne,Pe]=C2(p);T2(()=>{p||Pe(!1)},[p]);let Fe=D2(!1),Ie=k2(()=>{Fe.current=!0,Pe(e=>e&&!1)},[]),[Le,Re]=C2(()=>V2({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[ze,Be]=C2(!1);T2(()=>{Be(!0)},[]);let Ve=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,He=e?.contextMenu?.triggerMode??(Ve?`right-click`:`both`),Ue=He===`both`||He===`button`,We=e?.contextMenu?.buttonVisibility??`when-needed`,Ge=He===`both`||He===`right-click`;E2(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;De.current=t,pe(t),_e(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(Oe.current=e.detail?.disabled===!0)};return e.addEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.addEventListener(`file-tree-debug-set-scroll-suppression`,n),()=>{e.removeEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.removeEventListener(`file-tree-debug-set-scroll-suppression`,n)}},[]);let Ke=k2((e,t)=>{u4(T.current,e,t)},[]),qe=k2((e,t)=>{u4(E.current,e,t)},[]),H=k2(e=>{x.current=e},[]),Je=k2(e=>d4(e,E.current,T.current),[]),Ye=n!=null||r!=null||i!=null,{resolveIcon:Xe}=O2(()=>S1(a),[a]),Ze=t[Q$](),Qe=Ze.getPath(),$e=Qe!=null,et=t.isSearchOpen(),tt=t.getSearchValue(),nt=t.getFocusedPath(),rt=t.getFocusedIndex(),it=t.getScrollRequest(),at=t.isDragAndDropEnabled(),ot=t.getDragSession(),st=O2(()=>ot==null?null:new Set(ot.draggedPaths),[ot]),ct=ot?.target??null,lt=ot?.primaryPath??null,ut=g4(o),{overlayHeight:dt,overlayRows:ft,snapshot:pt,visibleRows:mt}=Le,ht=pt.physical.viewportHeight,gt=O2(()=>({end:pt.window.endIndex,start:pt.window.startIndex}),[pt.window.endIndex,pt.window.startIndex]),_t=ft,vt=pt.sticky.rows,yt=pt.physical.totalHeight,bt=pt.sticky.height,xt=O2(()=>new Set(vt.map(e=>R2(e.row))),[vt]),St=rt>=0&&rt>=gt.start&&rt<=gt.end,Ct=k2((e,t)=>u?.({item:h4(e,t),row:e})??null,[u]),wt=k2(e=>Y0(e==null?null:T.current.get(e)??null)?!0:Y0(S.current),[]),Tt=k2(e=>{wt(t.focusNearestPath(e))},[t,wt]),Et=D2(Tt);Et.current=Tt;let Dt=D2(!0),Ot=D2(()=>{}),kt=k2((t=!0)=>{let n=Se.current;n!=null&&(Dt.current=Dt.current&&t,xe(null),e?.contextMenu?.onClose?.(),Dt.current&&Tt(n.path))},[e?.contextMenu,Tt]);Ot.current=kt;let At=k2(e=>{let t=e==null?null:l4(S.current,e);he(e=>e===t?e:t)},[]),jt=k2((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=Je(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;Ae(n,e?.scrollTop??null),j.current=!0,de(e=>e===n?e:n)}i.focus(),At(a),Dt.current=!0,xe({anchorRect:r?.anchorRect??null,item:h4(e,n),path:n,source:r?.source??`keyboard`})},[t,Je,At]),Mt=k2(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=Z0(e,ht);F.current=rt<0||e==null?null:Math.max(0,Math.min(rt*s-e.scrollTop,Math.max(0,t-s))),P.current=!0}t.startRenaming(e)!==!1&&(_e(`focus`),le(e=>e+1))}},[t,rt,s,l,ht]),Nt=k2((e,{restoreTreeFocus:n=!0,targetOffset:r=`live-overlay`}={})=>{let i=C.current;if(i==null)return!1;t.focusPath(e);let a=t.getFocusedIndex();if(a<0)return!1;let o=t.getVisibleRows(a,a)[0]??null;if(o==null)return!1;let l=Z0(i,ht),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:V2({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return j.current=!0,n2(i,a,s,l,u,d),D.current(),Ce.current=n?e:null,!0},[t,s,c,ht,h]),Pt=()=>y.current===!0||se.current!=null||B.current===!0,Ft=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),It=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},Lt=()=>{ne.current!=null&&(clearTimeout(ne.current),ne.current=null),te.current=null},Rt=()=>{L.current?.remove(),L.current=null},zt=()=>{It(I.current),I.current=null,re.current=null},Bt=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},Vt=()=>{z.current?.(),z.current=null,se.current!=null&&(clearTimeout(se.current),se.current=null),B.current=!1,ie.current=null,oe.current=null,ae.current!=null&&(ae.current.setAttribute(`draggable`,`true`),ae.current.style.removeProperty(`touch-action`),ae.current=null),Rt(),Lt(),zt(),R.current=null},Ht=(e,n)=>{let r=S.current?.getRootNode(),i=q2(G2(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},Ut=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){Lt();return}let r=t.getItem(e.directoryPath),i=$2(r)?r:null;if(i==null||i.isExpanded()){Lt();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;te.current!==a&&(Lt(),te.current=a,ne.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind===`directory`&&n.directoryPath===e.directoryPath&&n.flattenedSegmentPath===e.flattenedSegmentPath&&i.expand()},n))},Wt=()=>{I.current=null;let e=re.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=X2(e.clientY,r);if(i===0)return;let a=Math.max(0,n.scrollHeight-n.clientHeight),o=Math.max(0,Math.min(a,n.scrollTop+i));o!==n.scrollTop&&(n.scrollTop=o,D.current()),Ut(Ht(e.clientX,e.clientY)),I.current=Ft(Wt)},Gt=(e,t)=>{re.current={clientX:e,clientY:t},I.current??=Ft(Wt)},Kt=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(Vt(),Rt(),Lt(),zt(),t.startDrag(r)===!1){e.preventDefault();return}if(R.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),Y2())){let t=J2(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),Bt(t),L.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},qt=()=>{Rt(),Lt(),zt(),R.current=null,t.cancelDrag()},Jt=(e,n,r)=>{if(se.current!=null||B.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;oe.current={clientX:i.clientX,clientY:i.clientY},ae.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!B.current;se.current!=null&&(clearTimeout(se.current),se.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),z.current===o&&(z.current=null),t&&(a.setAttribute(`draggable`,`true`),ae.current===a&&(ae.current=null),oe.current=null)},s=e=>{let t=e.touches[0],n=oe.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=100||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),z.current=o,se.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),ae.current===a&&(ae.current=null),oe.current=null;return}B.current=!0,ae.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),R.current=n;let e=a.getBoundingClientRect(),s=J2(a);Object.assign(s.style,{height:`${e.height}px`,opacity:`0.85`,transform:`translate3d(${e.left}px, ${e.top}px, 0)`,width:`${e.width}px`}),Bt(s),L.current=s,ie.current={x:i.clientX-e.left,y:i.clientY-e.top};let c=e=>{let t=e.touches[0];if(t==null)return;e.preventDefault();let n=ie.current;n!=null&&L.current!=null&&(L.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),Ut(Ht(t.clientX,t.clientY)),Gt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Ht(n.clientX,n.clientY),t.completeDrag(),Vt()},u=()=>{t.cancelDrag(),Vt()};z.current=()=>{document.removeEventListener(`touchmove`,c),document.removeEventListener(`touchend`,l),document.removeEventListener(`touchcancel`,u)},document.addEventListener(`touchmove`,c,{passive:!1}),document.addEventListener(`touchend`,l),document.addEventListener(`touchcancel`,u)},H2)},Yt=e=>{if(be!=null){if(e.key===`Escape`){kt(),e.preventDefault(),e.stopPropagation();return}a4.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(Ze.isActive()){if(e.isComposing||e.keyCode===229)return;if(e.key===`Escape`)Ze.cancel();else if(e.key===`Enter`)Ze.commit();else return;_e(`focus`),le(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){Mt(nt??void 0),e.preventDefault(),e.stopPropagation();return}if(et){if(e.key===`Escape`)P.current=!1,F.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=Z0(n,ht);F.current=rt<0||n==null?null:Math.max(0,Math.min(rt*s-n.scrollTop,Math.max(0,r-s))),P.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;_e(`focus`),le(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&t4(e)){t.openSearch(e.key),le(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=Ve&&r4(e),r=i4(e,Ve),i=r&&S.current!=null?X0(S.current):null,a=r?new Set(f4(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==nt&&a.has(o)){let e=C.current;Ae(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=$2(p)?p:null,h=u!=null&&(xt.has(u)||c&&o===u&&a.has(u)),g=e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`ArrowRight`&&m!=null&&m.isExpanded(),_=e.key===`ArrowLeft`&&h&&m!=null&&m.isExpanded(),v=C.current,y=!0;if(e.shiftKey&&e.key===`ArrowDown`)t.extendSelectionFromFocused(1);else if(e.shiftKey&&e.key===`ArrowUp`)t.extendSelectionFromFocused(-1);else if(n&&u!=null&&d>=0){let e=t.getVisibleRows(d,d)[0]??null,n=d4(u,E.current,T.current);e==null||n==null?y=!1:jt(e,u)}else if((e.ctrlKey||e.metaKey)&&e4(e))t.toggleFocusedSelection();else if((e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`a`)t.selectAllVisiblePaths();else switch(e.key){case`ArrowDown`:t.focusNextItem();break;case`ArrowUp`:t.focusPreviousItem();break;case`ArrowRight`:m==null||m.isExpanded()?t.focusNextItem():m.expand();break;case`ArrowLeft`:m!=null&&m.isExpanded()?m.collapse():t.focusParentItem();break;case`Home`:t.focusFirstItem();break;case`End`:t.focusLastItem();break;default:y=!1}if(!y)return;_e(`focus`);let b=t.getFocusedPath(),x=b!=null&&(xt.has(b)||a.has(b)),w=g&&b!==u,D=n&&c&&o===u&&b===u;if((h||D)&&b!=null&&(w&&x||D))Ae(b,v?.scrollTop??null),j.current=!0,de(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(je(b,m4(S.current,v,i,u,s,bt,ht)),j.current=!0,de(e=>e===b?e:b)):ke()}le(e=>e+1),e.preventDefault(),e.stopPropagation()};E2(()=>{if(!(!f||!et)){if(Me.current){Me.current=!1;return}Y0(w.current)}},[et,f]),E2(()=>{let e=x.current;switch(i2({hasRenderedInput:e!=null,previousRenamingPath:N.current,renamingPath:Qe})){case`reset`:N.current=null;return;case`reveal-canonical`:Qe!=null&&Nt(Qe,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(Ce.current=null,N.current=Qe,Y0(e),e.select());return}},[gt.end,gt.start,Qe,Nt,xt]),E2(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=X0(e)?.dataset.itemPath??null;de(e=>e===t?e:t)},i=()=>{n(),j.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,X0(e)!=null){r();return}j.current=!1,de(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),j.current=!1,de(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;de(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),E2(()=>{let e=S.current;e!=null&&(pt.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[pt.physical.scrollTop]),E2(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;O.current=Z0(n,g);let a=()=>{let e=t.getVisibleCount(),r=Q0(O.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),Re(V2({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};if(!A.current){A.current=!0;let e=t.getFocusedIndex();if(e>=0){let r=Q0(O.current,g),i=t.getVisibleRows(e,e)[0]??null;e2(n,e,s,r,h&&i!=null?Math.max(0,Math.min(i.ancestorPaths.length*s,Math.max(0,r-s))):0)}}D.current=a;let o=t.subscribe(()=>{G0(ue)&&le(e=>e+1),a()}),l=()=>{Oe.current!==!0&&(r!=null&&(r.dataset.isScrolling??=``),i!=null&&(i.dataset.isScrolling??=``),y.current=!0,e!=null&&clearTimeout(e),e=setTimeout(()=>{r!=null&&delete r.dataset.isScrolling,i!=null&&delete i.dataset.isScrolling,y.current=!1,ye(e=>e+1),e=null},50))},u=null,d=()=>{i!=null&&delete i.dataset.overlayReveal,u!=null&&(clearTimeout(u),u=null)},f=()=>{i!=null&&Oe.current!==!0&&(n.scrollTop>0||(i.dataset.overlayReveal=`true`,u!=null&&clearTimeout(u),u=setTimeout(()=>{d()},200)))},p=()=>{if(a(),n.scrollTop>0&&d(),Se.current!=null&&y.current&&Ot.current(),Oe.current===!0){y.current=!1;return}pe(e=>e==null?e:null),l()},m=()=>{l(),f()},_=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),v=e=>{_.has(e.key)&&m()};n.addEventListener(`scroll`,p,{passive:!0}),n.addEventListener(`wheel`,m,{passive:!0}),n.addEventListener(`touchmove`,m,{passive:!0}),n.addEventListener(`keydown`,v);let x=typeof ResizeObserver<`u`?new ResizeObserver(e=>{O.current=(e[0]==null?null:$0(e[0]))??Z0(n,g),a()}):null;return x?.observe(n),()=>{D.current=()=>{},o(),n.removeEventListener(`scroll`,p),n.removeEventListener(`wheel`,m),n.removeEventListener(`touchmove`,m),n.removeEventListener(`keydown`,v),e!=null&&clearTimeout(e),u!=null&&clearTimeout(u),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,O.current=null,x?.disconnect()}},[t,g,s,c,h]),E2(()=>{Ve||be==null||kt(!1)},[kt,Ve,be]);let Xt=O2(()=>be==null?null:`${be.path}::${be.source}`,[be]);E2(()=>{if(Xt==null){m?.clearSlotContent(eJ);return}let t=Se.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??s4(n.getBoundingClientRect()),close:e=>{Ot.current(e?.restoreFocus??!0)},restoreFocus:()=>{Dt.current&&Et.current(Se.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(eJ,i),e?.contextMenu?.onOpen?.(t.item,r),b4(i),queueMicrotask(()=>{i==null||!i.isConnected||document.activeElement===i&&b4(i)}),()=>{m?.clearSlotContent(eJ)}},[Xt,e?.contextMenu,m]),E2(()=>{be!=null&&t.getItem(be.path)==null&&kt()},[kt,be,t]),E2(()=>{if(be==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(o4(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&kt())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),kt())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[kt,be]),E2(()=>{let e=C.current,n=S.current;if(e==null||n==null){M.current=nt;return}let r=nt==null?null:T.current.get(nt)??null,i=X0(n),a=i?.dataset.itemPath??null,o=$e&&x.current===i,c=f&&w.current===i,l=P.current&&!et,u=F.current??0,d=Ce.current,p=we.current,m=Te.current,g=Ee.current,_=i!=null,v=j.current||_,y=M.current!==nt,b=p!=null&&p===nt&&nt!=null,E=!1,O=!1;if(it!=null&&it.id!==k.current){k.current=it.id;let n=it.visibleIndex,r=t.getVisibleRows(n,n)[0]??null;if(r!=null){let t=h?Math.max(0,Math.min(r.ancestorPaths.length*s,Math.max(0,ht-s))):bt;E=!0,O=t2(e,n,s,ht,yt,it.offset,t)}t.clearScrollRequest(it.id)}let A=!E&&l&&n2(e,rt,s,ht,yt,u),ee=!E&&d!=null&&d===nt&&n2(e,rt,s,ht,yt,bt),N=!E&&m!=null&&m.path===nt&&n2(e,rt,s,ht,yt,m.viewportOffset),I=!E&&g!=null&&g.path===nt&&e.scrollTop!==g.scrollTop;if(I&&(e.scrollTop=g.scrollTop),(I||O||ee||N||A||v&&y&&d!==nt&&!b&&e2(e,rt,s,ht,bt))&&D.current(),E){M.current=nt;return}if(!v){M.current=nt;return}if(o){M.current=nt;return}if(c&&!l){M.current=nt;return}if(r==null){l&&rt>=0&&(n2(e,rt,s,ht,yt,u),D.current()),M.current=nt;return}(y||l||d===nt||p===nt||m?.path===nt||g?.path===nt||a==null||a!==nt)&&(Y0(r),d===nt&&(Ce.current=null),p===nt&&(we.current=null),m?.path===nt&&(Te.current=null),g?.path===nt&&(Ee.current=null),P.current=!1,F.current=null),M.current=nt},[t,rt,nt,St,s,$e,et,gt,ht,f,it,h,bt,yt,mt]);let Zt=rt>=0&&rt>=pt.visible.startIndex&&rt<=pt.visible.endIndex,Qt=nt!=null&&_t.some(e=>R2(e.row)===nt),$t=Zt||Qt,en=Ue&&j.current===!0&&$t?nt:null,tn=ge===`pointer`?fe:null,nn=be?.path??De.current??tn??en??fe,rn=be?.source===`right-click`;E2(()=>{y.current&&be==null||At(Je(nn))},[be,Je,gt,ht,ve,_t,nn,At,mt]);let an=k2(e=>{if(y.current||o4(e))return;let t=e.target;if(!(t instanceof HTMLElement)||t.closest?.(`[data-type="context-menu-trigger"]`)!=null)return;let n=t.closest?.(`[data-file-tree-sticky-row="true"]`),r=t.closest?.(`[data-type="item"]`),i=n instanceof HTMLElement?n.dataset.fileTreeStickyPath??null:r instanceof HTMLElement?r.dataset.itemPath??null:null;i!=null&&_e(e=>e===`pointer`?e:`pointer`),pe(e=>e===i?e:i)},[]),on=k2(()=>{pe(null)},[]);E2(()=>{if(!at)return;let e=()=>{Vt(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),Vt(),t.cancelDrag()}},[t,at]);let sn=e=>{if(!at||t.getDragSession()==null||B.current)return;let n=q2(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),Ut(t.getDragSession()?.target??null),Gt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},cn=e=>{if(!at||t.getDragSession()==null||B.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(Lt(),zt(),t.setDragTarget(null))},ln=e=>{!at||t.getDragSession()==null||B.current||(e.preventDefault(),Ht(e.clientX,e.clientY),t.completeDrag(),Rt(),Lt(),zt(),R.current=null)},un=pt.window.height,dn=pt.window.offsetTop,fn=Math.min(0,ht-un),pn=Math.min(0,ht-un-bt),mn=V===nt||P.current,hn=nt!=null&&mn&&!St&&rt>=0?mt[rt]??t.getVisibleRows(rt,rt)[0]??null:null,gn=hn==null?null:r2(rt,s,gt,un),_n=R.current,vn=lt!=null&&_n!=null&&_n.path===lt&&_n.index>=gt.start&&_n.index<=gt.end,yn=lt!=null&&_n!=null&&_n.path===lt&&!vn&&_n.path!==hn?.path?_n:null,bn=yn==null?null:r2(yn.index,s,gt,un),xn=n4((rt>=0?mt[rt]??t.getVisibleRows(rt,rt)[0]??null:null)?.ancestorPaths.at(-1)??null),Sn=et&&nt!=null?_4(o,nt,!St):void 0,Cn=be?.path??(et?nt:V),wn=be?.path??fe,Tn=Je(nn),En=Ve&&Ue&&!rn&&!$e&&Tn!=null&&me!=null&&nn!=null,Dn=Ve&&(En||be!=null),On=be?.anchorRect,kn=On==null&&Tn!=null&&me!=null&&(be!=null||En)?me:null,An=On==null?kn==null?void 0:{top:`${kn}px`}:{left:`${On.left}px`,position:`fixed`,right:`auto`,top:`${On.top}px`},jn=rn?{opacity:`0`}:void 0,Mn=k2((e,n,r,i)=>{let a=s2({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:et,mode:i}),o=a.toggleDirectory&&n.kind===`directory`,s=o?t.resolveMountedDirectoryPathFromInput(r):null;if(o&&s==null)return;let c=s??r;switch(a.selection.kind){case`range`:t.selectPathRange(c,a.selection.additive);break;case`toggle`:t.togglePathSelectionFromInput(c);break;case`single`:t.selectOnlyMountedPathFromInput(c)}let l=e.currentTarget instanceof HTMLElement?e.currentTarget:null,u=n.index>=pt.visible.startIndex&&n.index<=pt.visible.endIndex,d=i===`flow`&&u&&l!=null&&l.dataset.itemParked!==`true`;t.focusMountedPathFromInput(c),d&&(j.current=!0,de(e=>e===c?e:c),_e(`focus`)),o&&t.toggleMountedDirectoryFromInput(c),a.closeSearch&&t.closeSearch(),a.revealCanonical&&Nt(c,{targetOffset:`sticky-parents`})},[t,et,pt.visible.endIndex,pt.visible.startIndex,Nt]),Nn=()=>{if(y.current||!Ue||nn==null||Tn==null)return;let e=t.getItem(nn);e!=null&&(At(Tn),Dt.current=!0,xe({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:Tn.getAttribute(`aria-label`)??nn,path:e.getPath()},path:e.getPath(),source:`button`}))},Pn={contextHoverPath:wn,contextMenuButtonTriggerEnabled:Ue,contextMenuButtonVisibility:We,contextMenuEnabled:Ve,contextMenuRightClickEnabled:Ge,contextMenuTriggerMode:He,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:at,draggedPathSet:st,dragTarget:ct,gitLaneActive:Ye,gitStatusByPath:n,handleRowDragEnd:qt,handleRowDragStart:Kt,handleRowTouchStart:Jt,ignoredGitDirectories:r,ignoredInheritanceCache:ce,instanceId:o,itemHeight:s,onKeyDown:Yt,onRowClick:Mn,openContextMenuForRow:jt,registerButton:Ke,registerRenameInput:H,renameView:Ze,renderDecorationForRow:Ct,resolveIcon:Xe,shouldSuppressContextMenu:Pt,visualFocusPath:Cn},Fn={...Pn,registerButton:qe};return $(`div`,{ref:S,id:ut,"data-file-tree-context-menu-button-visibility":Ve&&Ue?We:void 0,"data-file-tree-context-menu-trigger-mode":Ve?He:void 0,"data-file-tree-has-context-menu-action-lane":Ve&&Ue?`true`:void 0,"data-file-tree-has-git-lane":Ye?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:at?cn:void 0,onDragOver:at?sn:void 0,onDrop:at?ln:void 0,onKeyDown:Yt,onPointerLeave:Ve?on:void 0,onPointerOver:Ve?an:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[$(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:xn}}),$(`slot`,{name:$q,"data-type":`header-slot`}),f?$(`div`,{"data-file-tree-search-container":!0,"data-open":et?`true`:`false`,children:$(`input`,{ref:w,"aria-activedescendant":Sn,"aria-controls":ut,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":Ne?`true`:void 0,value:tt,onBlur:()=>{d===`retain`&&!Fe.current||t.closeSearch()},onFocus:Ie,onPointerDown:Ie,onInput:e=>{Ie();let n=e.currentTarget;t.setSearch(n.value)}})}):null,$(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&ze&&_t.length>0?$(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:$(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${dt}px`},children:_t.map((e,t)=>S4(Fn,e.row,`sticky:${R2(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${_t.length-t}`}}))})}):null,$(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${yt}px`},children:[$(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${dn}px`}}),$(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${un}px`,top:`${fn}px`,bottom:`${pn}px`},children:[C4(Pn,gt,xt),hn!=null&&gn!=null?S4(Pn,hn,`parked:${hn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:lt===hn.path?`none`:void 0,position:`absolute`,right:`0`,top:`${gn}px`}}):null,yn!=null&&bn!=null?S4(Pn,yn,`parked-drag:${yn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${bn}px`}}):null]})]})]}),Ve?$(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":Dn?`true`:`false`,style:An,children:[$(`button`,{ref:v,type:`button`,"data-type":tJ,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":be==null?`false`:`true`,"data-visible":En?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),be!=null){kt();return}Nn()},tabIndex:-1,style:jn,children:$(m0,{...Xe(`file-tree-icon-ellipsis`)})}),be==null?null:$(`slot`,{name:eJ})]}):null,be==null?null:$(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),kt()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),kt()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var T4={hydrateRoot:(e,t)=>{l0(z1(w4,t),e)},renderRoot:(e,t)=>{c0(z1(w4,t),e)},unmountRoot:e=>{c0(null,e)}};function E4(e,t){T4.renderRoot(e,t)}function D4(e,t){T4.hydrateRoot(e,t)}function O4(e){T4.unmountRoot(e)}var k4=class{#e=new Map;#t=null;clearAll(){for(let e of this.#e.values())e.remove();this.#e.clear()}clearSlotContent(e){let t=this.#n(e);t!=null&&(t.remove(),this.#e.delete(e))}setHost(e){if(this.#t=e,e!=null){this.#i(e);for(let[e,t]of this.#e)this.#r(e,t)}}setSlotContent(e,t){let n=this.#n(e);if(n===t){t!=null&&(this.#e.set(e,t),this.#r(e,t));return}if(n?.remove(),t==null){this.#e.delete(e);return}this.#e.set(e,t),this.#r(e,t)}setSlotHtml(e,t){let n=t?.trim()??``;if(n.length===0){this.setSlotContent(e,null);return}let r=this.#n(e);if(r!=null&&r.innerHTML===n){this.#e.set(e,r),this.#r(e,r);return}let i=document.createElement(`div`);i.innerHTML=n,this.setSlotContent(e,i)}#n(e){let t=this.#e.get(e)??null;if(t!=null)return t;let n=this.#t;if(n==null)return null;for(let t of Array.from(n.children))if(t instanceof HTMLElement&&t.dataset.fileTreeManagedSlot===e)return t;return null}#r(e,t){t.slot=e,t.dataset.fileTreeManagedSlot=e,this.#t!=null&&t.parentNode!==this.#t&&this.#t.appendChild(t)}#i(e){for(let t of Array.from(e.children)){if(!(t instanceof HTMLElement))continue;let e=t.dataset.fileTreeManagedSlot;e==null||this.#e.has(e)||this.#e.set(e,t)}}};Array.isArray;var A4=0;function j4(e){return e!=null&&e.length>0?e:(A4+=1,`pst_ft_${A4}`)}function M4({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??TY)}function N4(e){if(typeof document>`u`)return;let t=document.createElement(`div`);t.innerHTML=e;let n=t.querySelector(`svg`);return n instanceof SVGElement?n:void 0}function P4(e){return e.querySelector(`#file-tree-icon-chevron`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-file`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-dot`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-lock`)instanceof SVGElement}function F4(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var I4=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new k4;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y=null;#b;#x=!1;#S=!1;constructor(e){let{composition:t,density:n,fileTreeSearchMode:r,gitStatus:i,id:a,initialSearchQuery:o,icons:s,itemHeight:c,onSearchChange:l,onSelectionChange:u,overscan:d,renderRowDecoration:f,renaming:p,search:m,searchBlurBehavior:h,searchFakeFocus:g,stickyFolders:_,unsafeCSS:v,initialVisibleRowCount:y,...b}=e;this.#e=t,this.#n=j4(a),this.#p=l1(i),this.#m=s,this.#h=v,this.#r=u,this.#i=f,this.#a=p!=null&&p!==!1,this.#o=h,this.#s=m===!0,this.#c=g===!0,this.#u=wY(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new i1({...b,fileTreeSearchMode:r,initialSearchQuery:o,onSearchChange:l,renaming:p}),this.#v=this.#t.getSelectionVersion(),this.#y=this.#r==null?null:this.subscribe(()=>{this.#D()})}unmount(){this.#b!=null&&(O4(this.#b),delete this.#b.dataset.fileTreeVirtualizedWrapper,this.#b=void 0),this.#l.clearAll(),this.#l.setHost(null),this.#f!=null&&(delete this.#f.dataset.fileTreeVirtualized,this.#I(this.#f),this.#f=void 0)}cleanUp(){this.unmount(),this.#y?.(),this.#y=null,this.#t.destroy()}getFileTreeContainer(){return this.#f}getItem(e){return this.#t.getItem(e)}getFocusedItem(){return this.#t.getFocusedItem()}getFocusedPath(){return this.#t.getFocusedPath()}getFocusedIndex(){return this.#t.getFocusedIndex()}getVisibleCount(){return this.#t.getVisibleCount()}getVisibleRows(e,t){return this.#t.getVisibleRows(e,t)}getSelectedPaths(){return this.#t.getSelectedPaths()}getComposition(){return this.#e}getItemHeight(){return this.#u.itemHeight}getDensityFactor(){return this.#u.factor}subscribe(e){let t=!1;return this.#t.subscribe(()=>{if(!t){t=!0;return}e()})}focusPath(e){this.#t.focusPath(e)}focusFirstItem(){this.#t.focusFirstItem()}focusLastItem(){this.#t.focusLastItem()}focusNextItem(){this.#t.focusNextItem()}focusPreviousItem(){this.#t.focusPreviousItem()}focusParentItem(){this.#t.focusParentItem()}scrollToPath(e,t){this.#t.scrollToPath(e,t)}focusNearestPath(e){return this.#t.focusNearestPath(e)}add(e){this.#t.add(e)}batch(e){this.#t.batch(e)}applyGitStatusPatch(e){let t=u1(this.#p,e);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&E4(n.wrapper,this.#w())}move(e,t,n){this.#t.move(e,t,n)}onMutation(e,t){return this.#t.onMutation(e,t)}setSearch(e){this.#t.setSearch(e)}openSearch(e){this.#t.openSearch(e)}closeSearch(){this.#t.closeSearch()}isSearchOpen(){return this.#t.isSearchOpen()}getSearchValue(){return this.#t.getSearchValue()}getSearchMatchingPaths(){return this.#t.getSearchMatchingPaths()}focusNextSearchMatch(){this.#t.focusNextSearchMatch()}focusPreviousSearchMatch(){this.#t.focusPreviousSearchMatch()}startRenaming(e,t){return this.#t.startRenaming(e,t)}remove(e,t){this.#t.remove(e,t)}resetPaths(e,t){Array.isArray(e)?this.#t.resetPaths(e,t):this.#t.resetPaths(e)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),E4(t.wrapper,this.#w()))}setGitStatus(e){let t=l1(e,this.#p);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&E4(n.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),E4(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),D4(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),E4(r,this.#w())}#C(){return{initialViewportHeight:M4({initialVisibleRowCount:this.#d.initialVisibleRowCount,itemHeight:this.#d.itemHeight}),itemHeight:this.#d.itemHeight,overscan:this.#d.overscan,stickyFolders:this.#d.stickyFolders}}#w(){return{composition:this.#e,controller:this.#t,gitStatusByPath:this.#p?.statusByPath,ignoredGitDirectories:this.#p?.ignoredDirectoryPaths,directoriesWithGitChanges:this.#p?.directoriesWithChanges,icons:this.#m,instanceId:this.#n,renamingEnabled:this.#a,renderRowDecoration:this.#i,searchBlurBehavior:this.#o,searchEnabled:this.#s,searchFakeFocus:this.#c,slotHost:this.#l,...this.#C()}}#T(){let e=this.#f,t=this.#b;return e==null||t==null?null:{host:e,wrapper:t}}#E(e,t){let n=e.shadowRoot;n!=null&&(this.#k(n),this.#A(n)),this.#j(t)}#D(){let e=this.#r;if(e==null)return;let t=this.#t.getSelectionVersion();t!==this.#v&&(this.#v=t,e(this.#t.getSelectedPaths()))}#O(){let e=this.#e?.header?.render;if(e!=null){this.#l.setSlotContent($q,e());return}this.#l.setSlotHtml($q,this.#e?.header?.html??null)}#k(e){let t=F4(e).find(e=>P4(e)),n=N4(_Y(SY(this.#m).set));n!=null&&(t==null||t.outerHTML!==n.outerHTML)&&(t==null?e.prepend(n):t.replaceWith(n))}#A(e){let t=F4(e),n=t.find(e=>P4(e)),r=t.filter(e=>e!==n),i=SY(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=N4(i);if(a==null){for(let e of r)e.remove();return}if(r.length!==1||r[0].outerHTML!==a.outerHTML){for(let e of r)e.remove();e.appendChild(a)}}#j(e){let t=SY(this.#m);t.colored&&yY(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${Yq}]`);if(this.#g==null&&t instanceof HTMLStyleElement&&(this.#g=t),this.#h==null||this.#h===``){this.#g?.remove(),this.#g=void 0,this.#_=void 0;return}(this.#g?.parentNode!==e||this.#_!==this.#h)&&(this.#g??=document.createElement(`style`),this.#g.setAttribute(Yq,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=kY(this.#h),this.#_=this.#h)}#N(e){if(this.#b!=null)return this.#b;let t=e.shadowRoot;if(t==null)throw Error(`FileTree requires a shadow root`);let n=Array.from(t.children).filter(e=>e instanceof HTMLDivElement&&typeof e.dataset.fileTreeId==`string`&&e.dataset.fileTreeId.length>0),r=n.find(e=>e.dataset.fileTreeId===this.#n)??n[0];return r!=null&&(this.#n=r.dataset.fileTreeId??this.#n),this.#b=r??document.createElement(`div`),this.#b.dataset.fileTreeId=this.#n,this.#b.dataset.fileTreeVirtualizedWrapper=`true`,this.#E(e,this.#b),this.#b.parentNode!==t&&t.appendChild(this.#b),this.#b}#P(e,t){let n=e??this.#f??document.createElement(`file-tree-container`);t!=null&&n.parentNode!==t&&t.appendChild(n);let r=n.shadowRoot??n.attachShadow({mode:`open`});return FY(n,r),this.#M(r),n.dataset.fileTreeVirtualized=`true`,n.style.display=`flex`,this.#F(n),this.#l.setHost(n),this.#f=n,n}#F(e){e.style.getPropertyValue(`--trees-item-height`)===``&&(e.style.setProperty(`--trees-item-height`,`${String(this.#u.itemHeight)}px`),this.#x=!0),e.style.getPropertyValue(`--trees-density-override`)===``&&(e.style.setProperty(`--trees-density-override`,String(this.#u.factor)),this.#S=!0)}#I(e){this.#x&&=(e.style.removeProperty(`--trees-item-height`),!1),this.#S&&=(e.style.removeProperty(`--trees-density-override`),!1)}};function L4(e){let[t]=(0,p.useState)(()=>new I4(e)),n=(0,p.useRef)({timeout:null,model:t});return(0,p.useEffect)(()=>{let{current:e}=n;return e.timeout!=null&&(clearTimeout(e.timeout),e.timeout=null),()=>{e.timeout=setTimeout(()=>e.model.cleanUp(),1)}},[]),{model:t}}function R4(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(!Object.is(e[n],t[n]))return!1;return!0}function z4(e,t,n){return Object.is(e,t)||n?.(e,t)===!0}function B4(e,t,n){let r=(0,p.useRef)({hasValue:!1,model:null,selector:null,value:void 0}),i=(0,p.useCallback)(t=>e.subscribe(t),[e]),a=(0,p.useCallback)(()=>{let i=r.current,a=t(e);if(i.model!==e||i.selector!==t||!i.hasValue)return i.hasValue=!0,i.model=e,i.selector=t,i.value=a,a;let o=i.value;return z4(o,a,n)?o:(i.value=a,a)},[n,e,t]);return(0,p.useSyncExternalStore)(i,a,a)}function V4(e,t){return e.isOpen===t.isOpen&&e.value===t.value&&R4(e.matchingPaths,t.matchingPaths)}function H4(e){let t=B4(e,e=>({isOpen:e.isSearchOpen(),matchingPaths:e.getSearchMatchingPaths(),value:e.getSearchValue()}),V4);return(0,p.useMemo)(()=>({...t,close:()=>{e.closeSearch()},focusNextMatch:()=>{e.focusNextSearchMatch()},focusPreviousMatch:()=>{e.focusPreviousSearchMatch()},open:t=>{e.openSearch(t)},setValue:t=>{e.setSearch(t)}}),[e,t])}function U4(e){let t=new Set;for(let n of e)for(let e=n.indexOf(`/`);e!==-1;e=n.indexOf(`/`,e+1))t.add(n.slice(0,e));return[...t]}function W4(e,t){let n=[];for(let r of U4(t)){let t=e.getItem(r);(!t||!t.isDirectory()||t.isExpanded())&&n.push(r)}return n}function G4(e){let t=e.status===`A`?`added`:e.status===`D`?`deleted`:e.status===`R`||e.status===`C`?`renamed`:`modified`;return{path:e.path,status:t}}function K4(e){return e.map(e=>`${e.path}\0${G4(e).status}`).join(`
|
|
2996
|
+
`)}function q4(e,t){return t.map(t=>`${t.path}\0${t.additions}\0${t.deletions}\0${+!!t.binary}\0${PN(e,t)}`).join(`
|
|
2997
|
+
`)}function J4(e,t){return e?e.paths===t.paths?e.status===t.status?e.decoration===t.decoration?`none`:`decoration`:`status`:`reset`:`none`}var Y4={viewed:{glyph:`✓`,color:`var(--add)`,title:`Viewed · click or v to toggle`},unviewed:{glyph:`○`,color:`var(--fg-2)`,title:`Not viewed · click or v to toggle`},restale:{glyph:`◐`,color:`var(--warn)`,title:`Changed since you viewed it · click or v to mark viewed again`}},X4=`
|
|
2998
2998
|
[data-item-section="decoration"] { flex: 1 0 auto; overflow: visible; }
|
|
2999
2999
|
[data-item-section="decoration"] > span { gap: 0.375rem; overflow: visible; font-variant-numeric: tabular-nums; }
|
|
3000
3000
|
[data-item-section="decoration"] > span > span:last-child { min-width: 1ch; text-align: center; }
|
|
3001
3001
|
/* The library butts the search box against the toolbar above; give it the toolbar's own vertical rhythm. */
|
|
3002
3002
|
[data-file-tree-search-container] { padding-top: 0.5rem; }
|
|
3003
3003
|
:host([data-search-empty]) [data-file-tree-virtualized-scroll] { display: none; }
|
|
3004
|
-
`;function
|
|
3005
|
-
`),status:
|
|
3004
|
+
`;function Z4(e,t){let n=[];e.additions>0&&n.push({text:`+${e.additions}`,color:`var(--add)`}),e.deletions>0&&n.push({text:`−${e.deletions}`,color:`var(--del)`});let r=Y4[t];n.push({text:r.glyph,color:r.color});let i=e.binary?`binary`:`+${e.additions} −${e.deletions}`;return{text:n.map(e=>e.text).join(` `),parts:n,title:`${i} · ${r.title}`}}function Q4(e,t){if(e===t){let e=`All ${t} changed file(s) viewed · click to mark them not viewed`;return{text:Y4.viewed.glyph,parts:[{text:Y4.viewed.glyph,color:Y4.viewed.color}],title:e}}let n=[];e>0&&n.push({text:`${e}/${t}`,color:`var(--fg-2)`}),n.push({text:Y4.unviewed.glyph,color:Y4.unviewed.color});let r=`${e} of ${t} changed file(s) viewed · click to mark all viewed`;return{text:n.map(e=>e.text).join(` `),parts:n,title:r}}function $4(e){let t=Z.getState(),n=LN(t.snapshot?.changed??[],e);t.setViewedMany(n.map(e=>e.path),!n.every(e=>FN(t,e)))}function e3(){let e=Z(e=>e.snapshot),t=Z(e=>e.openFile),[n,r]=(0,p.useState)(`changed`),i=Z(e=>e.setViewedMany),a=Z(e=>e.viewed),o=Z(e=>e.config),s=(0,p.useMemo)(()=>e?IN({viewed:a,config:o},e.changed):0,[e,a,o]),c=NW(()=>void i(e?.changed.map(e=>e.path)??[],!1)),l=(0,p.useMemo)(()=>e?n===`changed`?e.changed.map(e=>e.path):e.tree:[],[e,n]),u=(0,p.useMemo)(()=>e?.changed.map(G4)??[],[e]),d=(0,p.useRef)(t);d.current=t;let{model:f}=L4({paths:l,gitStatus:u,initialExpansion:`closed`,initialExpandedPaths:U4(l),search:!0,itemHeight:Math.round(1.875*WG()),density:WG()/16,icons:{set:`standard`},unsafeCSS:X4,onSelectionChange:e=>{let t=e[0];t&&!t.endsWith(`/`)&&t!==Z.getState().activePath&&d.current(t)},renderRowDecoration:({item:e})=>{let t=Z.getState(),n=t.snapshot?.changed??[];if(e.kind===`directory`){let r=LN(n,e.path);return r.length?Q4(IN(t,r),r.length):null}let r=n.find(t=>t.path===e.path);return r?Z4(r,PN(t,r)):null}}),m=H4(f),h=m.value.trim().length>0&&m.matchingPaths.length===0,_=(0,p.useRef)(null);(0,p.useEffect)(()=>{_.current?.firstElementChild?.toggleAttribute(`data-search-empty`,h)},[h]),(0,p.useEffect)(()=>{let e=_.current;if(!e)return;let t=e=>{let t=e.composedPath()[0];t instanceof Element&&t.matches(`[data-file-tree-search-input]`)&&e.stopPropagation()},n=e=>{if(f.getSearchValue().trim()&&f.getSearchMatchingPaths().length===0&&[`Enter`,`ArrowUp`,`ArrowDown`].includes(e.key)){e.preventDefault(),e.stopPropagation();return}if(e.key!==`Enter`||e.isComposing||!f.isSearchOpen())return;let t=f.getFocusedPath();if(!t||t.endsWith(`/`))return;e.preventDefault(),e.stopPropagation();let n=Z.getState();RN(n,t)&&n.toggleCollapsed(t),d.current(t),requestAnimationFrame(aK)};return e.addEventListener(`blur`,t,!0),e.addEventListener(`keydown`,n,!0),()=>{e.removeEventListener(`blur`,t,!0),e.removeEventListener(`keydown`,n,!0)}},[f]),(0,p.useEffect)(()=>{let e=_.current;if(!e)return;let t=e=>{let t=e.composedPath();if(t.findIndex(e=>e instanceof HTMLElement&&e.dataset.itemSection===`decoration`)<=0)return null;let n=t.find(e=>e instanceof HTMLElement&&e.dataset.itemPath!=null),r=n?.dataset.itemPath;return r?{path:r,directory:n.dataset.itemType===`folder`}:null},n=e=>{e.button!==0||!t(e)||(e.preventDefault(),e.stopPropagation())},r=e=>{let n=t(e);if(!n){let t=e.composedPath().find(e=>e instanceof HTMLElement&&e.dataset.itemType===`file`)?.dataset.itemPath;if(!t)return;requestAnimationFrame(aK);let n=Z.getState();RN(n,t)&&n.toggleCollapsed(t),t===n.activePath&&d.current(t);return}if(e.preventDefault(),e.stopPropagation(),n.directory)return $4(n.path);let r=Z.getState(),i=r.snapshot?.changed.find(e=>e.path===n.path);i&&r.setViewed(n.path,!FN(r,i))};return e.addEventListener(`pointerdown`,n,!0),e.addEventListener(`click`,r,!0),()=>{e.removeEventListener(`pointerdown`,n,!0),e.removeEventListener(`click`,r,!0)}},[]),(0,p.useEffect)(()=>{let e=_.current?.firstElementChild?.shadowRoot;if(!e)return;let t=e.querySelector(`[data-file-tree-search-input]`);t&&(t.placeholder=`Search files…`);let n=e=>{let t=e.composedPath().find(e=>e instanceof HTMLElement&&e.dataset.itemPath!=null),n=e.relatedTarget;!t||n instanceof Node&&t.contains(n)||(Array.from(t.querySelectorAll(`[data-truncate-marker]`)).some(e=>getComputedStyle(e).opacity!==`0`)?t.title=t.getAttribute(`aria-label`)??``:t.removeAttribute(`title`))};return e.addEventListener(`pointerover`,n,!0),e.addEventListener(`focusin`,n,!0),()=>{e.removeEventListener(`pointerover`,n,!0),e.removeEventListener(`focusin`,n,!0)}},[]);let v=Z(e=>e.setTreeModel);(0,p.useEffect)(()=>(v(f),()=>v(null)),[f,v]);let y=(0,p.useMemo)(()=>({paths:l.join(`
|
|
3005
|
+
`),status:K4(e?.changed??[]),decoration:e?q4({viewed:a,config:o},e.changed):``}),[l,e,a,o]),b=(0,p.useRef)(null),x=(0,p.useRef)(n);(0,p.useEffect)(()=>{let e=J4(b.current,y);if(b.current=y,x.current!==n){x.current=n;let e=Z.getState().activePath;f.resetPaths(l,{initialExpandedPaths:U4(n===`all`?e?[e]:[]:l)}),f.setGitStatus(u);return}switch(e){case`reset`:f.resetPaths(l,{initialExpandedPaths:W4(f,l)}),f.setGitStatus(u);break;case`status`:f.setGitStatus(u);break;case`decoration`:f.setComposition(f.getComposition())}},[f,y,l,u,n]);let S=Z(e=>e.activePath);return(0,p.useEffect)(()=>{let e=f.getItem(S??``);if(!(!S||!e)){for(let e of f.getSelectedPaths())e!==S&&f.getItem(e)?.deselect();e.select(),f.scrollToPath(S)}},[f,S,l]),(0,g.jsxs)(`aside`,{className:`tree-theme flex min-h-0 flex-col bg-surface`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-b-border px-2.5 py-1.5 text-muted [&_button]:flex-none [&_button]:whitespace-nowrap`,children:[(0,g.jsxs)(tG,{children:[(0,g.jsx)(nG,{selected:n===`changed`,onClick:()=>r(`changed`),children:`Changed`}),(0,g.jsx)(nG,{selected:n===`all`,onClick:()=>r(`all`),children:`All files`})]}),(0,g.jsx)(`span`,{className:`ml-auto`,children:l.length}),(0,g.jsxs)(X,{variant:`ghost`,danger:c.armed,icon:!c.armed,feedback:c.armed?`confirm`:void 0,disabled:s===0,title:c.armed?`Click again to mark all files not viewed`:`Mark all ${s} viewed file(s) not viewed`,onClick:c.fire,children:[(0,g.jsx)(fM,{size:`0.875rem`}),(0,g.jsx)(MW,{text:c.armed&&`Un-view all?`})]})]}),(0,g.jsxs)(`div`,{className:`relative min-h-0 flex-1`,ref:_,children:[(0,g.jsx)(sJ,{model:f,className:`h-full`,renderContextMenu:(e,t)=>(0,g.jsx)(r3,{path:e.path,kind:e.kind,close:t.close})}),h&&(0,g.jsx)(`div`,{role:`status`,className:`absolute inset-x-0 top-14 pr-2.5 pl-[calc(1.5rem+1px)] text-muted`,children:`No matching files`})]})]})}var t3=`static top-[calc(100%_+_0.375rem)] left-0 z-20 min-w-95 rounded-[0.625rem] border border-border bg-canvas p-1.5 shadow-[0_0.625rem_1.875rem_rgba(0,_0,_0,_0.18)]`,n3=`grid min-h-8.5 w-full grid-cols-[1.125rem_1fr_auto_1.5rem] items-center gap-2.5 rounded-[0.4375rem] border-0 bg-transparent px-2.5 py-1.75 text-left font-sans text-[0.8125rem] leading-[1.3] text-foreground hover:bg-hover [&_kbd]:ml-1 [&_kbd]:justify-self-end [&_kbd]:text-muted [&>svg]:text-muted`;function r3({path:e,kind:t,close:n}){return t===`directory`?(0,g.jsx)(i3,{path:e,close:n}):(0,g.jsx)(a3,{path:e,close:n})}function i3({path:e,close:t}){let n=Z(e=>e.snapshot),r=Z(e=>e.viewed),i=Z(e=>e.config),a=(0,p.useMemo)(()=>LN(n?.changed??[],e),[n,e]);if(!a.length)return null;let o=IN({viewed:r,config:i},a)===a.length;return(0,g.jsx)(`div`,{className:t3,children:(0,g.jsxs)(X,{className:n3,onClick:()=>{$4(e),t()},children:[o?(0,g.jsx)(fM,{size:`0.875rem`}):(0,g.jsx)(pM,{size:`0.875rem`}),(0,g.jsx)(`span`,{className:`whitespace-nowrap`,children:o?`Mark directory not viewed`:`Mark directory viewed`}),(0,g.jsx)(`span`,{className:`inline-flex items-center justify-self-end font-mono text-[0.75rem] leading-[normal] text-muted`,children:a.length}),(0,g.jsx)(`span`,{})]})})}function a3({path:e,close:t}){let n=Z(t=>t.snapshot?.changed.find(t=>t.path===e)),r=Z(e=>n?FN(e,n):!1),i=Z(t=>RN(t,e)),a=Z(e=>e.setViewed),o=Z(e=>e.toggleCollapsed),s=Z(e=>e.openFile);return(0,g.jsx)(`div`,{className:t3,children:n?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(X,{className:n3,onClick:()=>{a(e,!r),t()},children:[r?(0,g.jsx)(fM,{size:`0.875rem`}):(0,g.jsx)(pM,{size:`0.875rem`}),(0,g.jsx)(`span`,{className:`whitespace-nowrap`,children:r?`Mark not viewed`:`Mark viewed`}),(0,g.jsx)(`span`,{className:`inline-flex items-center justify-self-end font-mono text-[0.75rem] leading-[normal] text-muted`,children:r?``:(0,g.jsx)(Zj,{size:`0.75rem`})}),(0,g.jsx)(`kbd`,{children:`v`})]}),(0,g.jsxs)(X,{className:n3,onClick:()=>{o(e),t()},children:[i?(0,g.jsx)(rM,{size:`0.875rem`}):(0,g.jsx)(nM,{size:`0.875rem`}),(0,g.jsx)(`span`,{className:`whitespace-nowrap`,children:i?`Expand`:`Collapse`}),(0,g.jsx)(`span`,{className:`inline-flex items-center justify-self-end font-mono text-[0.75rem] leading-[normal] text-muted`}),(0,g.jsx)(`kbd`,{children:i?`zo`:`zc`})]})]}):(0,g.jsxs)(X,{className:n3,onClick:()=>{s(e),t()},children:[(0,g.jsx)(pM,{size:`0.875rem`}),(0,g.jsx)(`span`,{className:`whitespace-nowrap`,children:`Open`}),(0,g.jsx)(`span`,{className:`inline-flex items-center justify-self-end font-mono text-[0.75rem] leading-[normal] text-muted`}),(0,g.jsx)(`span`,{})]})})}function o3(){let e=Z(e=>e.boot),t=Z(e=>e.refreshSnapshot),n=Z(e=>e.refreshThreads),r=Z(e=>e.refreshViewed),i=Z(e=>e.refreshConfig),a=Z(e=>e.setLspStatus),o=Z(e=>e.setMoved),s=Z(e=>e.toast),c=Z(e=>e.layout),l=Z(e=>e.setLayout),u=Z(e=>e.snapshot?cP(e.snapshot,e.github.data):`diffle`);$G(),(0,p.useEffect)(()=>{document.title=u},[u]);let d=(0,p.useCallback)(e=>t=>{t.preventDefault();let n=t.currentTarget,r=t.clientX,i=e===`tree`?t.currentTarget.previousElementSibling:t.currentTarget.nextElementSibling,a=(e===`tree`?c.treeWidth:c.panelWidth)??i?.getBoundingClientRect().width??0,o=t=>{let n=e===`tree`?t.clientX-r:r-t.clientX,i=Math.max(180,Math.min(800,a+n));l(e===`tree`?{treeWidth:i}:{panelWidth:i})},s=()=>{document.removeEventListener(`pointermove`,o),document.removeEventListener(`pointerup`,s),document.removeEventListener(`pointercancel`,s),delete document.body.dataset.resizing,n.removeAttribute(`data-resizing`)};document.body.dataset.resizing=``,n.setAttribute(`data-resizing`,``),document.addEventListener(`pointermove`,o),document.addEventListener(`pointerup`,s),document.addEventListener(`pointercancel`,s)},[c.treeWidth,c.panelWidth,l]),f=[c.treeVisible?`${c.treeWidth==null?`17.5rem`:`${c.treeWidth}px`} 4px`:``,`minmax(0, 1fr)`,c.panelVisible?`4px ${c.panelWidth==null?`21.25rem`:`${c.panelWidth}px`}`:``].filter(Boolean).join(` `);return(0,p.useEffect)(()=>uA(e=>{switch(e.type){case`snapshot`:t(e.version);break;case`moved`:o(e.moved);break;case`threads`:n();break;case`viewed`:r();break;case`config`:i();break;case`lsp`:a(e.payload)}},()=>void e().then(()=>performance.mark(`diffle:snapshot`))),[e,t,n,r,i,a,o]),(0,g.jsxs)(`div`,{className:`grid h-full grid-rows-[2.5rem_1fr]`,style:{gridTemplateColumns:f},children:[(0,g.jsx)(hK,{}),c.treeVisible&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(e3,{}),(0,g.jsx)(`div`,{className:`cursor-col-resize bg-border opacity-60 [transition:opacity_120ms_ease,_background_120ms_ease] hover:bg-accent hover:opacity-100 data-resizing:bg-accent data-resizing:opacity-100`,onPointerDown:d(`tree`),title:`Drag to resize`})]}),(0,g.jsx)(zq,{}),c.panelVisible&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`div`,{className:`cursor-col-resize bg-border opacity-60 [transition:opacity_120ms_ease,_background_120ms_ease] hover:bg-accent hover:opacity-100 data-resizing:bg-accent data-resizing:opacity-100`,onPointerDown:d(`panel`),title:`Drag to resize`}),(0,g.jsx)(XW,{})]}),(0,g.jsx)(xK,{}),(0,g.jsx)(OK,{}),s&&(0,g.jsx)(`div`,{className:`fixed bottom-6 left-[50%] z-60 max-w-[min(48rem,_90vw)] [transform:translateX(-50%)] [animation:flash-in_160ms_ease] rounded-lg bg-foreground px-5 py-3 text-[1rem] leading-[1.4] wrap-anywhere text-canvas shadow-[0_0.5rem_1.5rem_rgba(0,_0,_0,_0.35)]`,children:s})]})}XP(JP()),performance.mark(`diffle:boot`);var s3=Math.max(1,Math.min(4,(navigator.hardwareConcurrency||4)-1));(0,zO.createRoot)(document.getElementById(`root`)).render((0,g.jsx)(p.StrictMode,{children:(0,g.jsx)(Xp,{poolOptions:{poolSize:s3,workerFactory:()=>new u},highlighterOptions:{preferredHighlighter:`shiki-js`,useTokenTransformer:!0,theme:KP},children:(0,g.jsx)(o3,{})})}));export{s as t};
|