bb-app 0.0.1-alpha.3 → 0.0.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 -2
- package/app/dist/assets/{angular-html-B66mJRBQ.js → angular-html-Bof7a2F7.js} +1 -1
- package/app/dist/assets/{angular-ts-Db7jGnqJ.js → angular-ts-DeodVDM_.js} +1 -1
- package/app/dist/assets/{apl-DMgeEg7r.js → apl-CVKpas4d.js} +1 -1
- package/app/dist/assets/{astro-i1F4D3VM.js → astro-BOhQ8P2d.js} +1 -1
- package/app/dist/assets/{blade-CiWt8USs.js → blade-DHYv_YAC.js} +1 -1
- package/app/dist/assets/{c-BHq08H9G.js → c-DOfzIDnq.js} +1 -1
- package/app/dist/assets/{cobol-D_JmDLld.js → cobol-Yq5Xjret.js} +1 -1
- package/app/dist/assets/{coffee-umIHDekw.js → coffee-BLpGOPrm.js} +1 -1
- package/app/dist/assets/{cpp-D94npP6r.js → cpp-t6tCmbNr.js} +1 -1
- package/app/dist/assets/{crystal-8YBmtXaf.js → crystal-pfXgNOaY.js} +1 -1
- package/app/dist/assets/{css-BFM8U_dh.js → css-Dsd4PAbO.js} +1 -1
- package/app/dist/assets/{edge-DZng818P.js → edge-jP85Exuo.js} +1 -1
- package/app/dist/assets/{elixir-oG24WxNL.js → elixir-CYXJZGs7.js} +1 -1
- package/app/dist/assets/{elm-BQn9SMXX.js → elm-CYq0GyiH.js} +1 -1
- package/app/dist/assets/{erb-Cq0klEZI.js → erb-CXg22Grb.js} +1 -1
- package/app/dist/assets/{git-rebase-DR5b4anZ.js → git-rebase-BQdokrD3.js} +1 -1
- package/app/dist/assets/{glimmer-js-BDd0xnyC.js → glimmer-js-DgGKK2RH.js} +1 -1
- package/app/dist/assets/{glimmer-ts-CWNbj8-E.js → glimmer-ts-1FpqNG-n.js} +1 -1
- package/app/dist/assets/{glsl-B2PbL7Xo.js → glsl-CXnomNUS.js} +1 -1
- package/app/dist/assets/{graphql-B7GBakJc.js → graphql-D23lxvE7.js} +1 -1
- package/app/dist/assets/{hack-DOVnHknU.js → hack-CcGVZsvy.js} +1 -1
- package/app/dist/assets/{haml-Bb8YVHgL.js → haml-fJ7Eo5cb.js} +1 -1
- package/app/dist/assets/{handlebars-D0mwNWC9.js → handlebars-dur6589w.js} +1 -1
- package/app/dist/assets/{html-5tM-GssK.js → html-ECCRzsaz.js} +1 -1
- package/app/dist/assets/{html-derivative-Cn9-LWpS.js → html-derivative-DKJlSq0e.js} +1 -1
- package/app/dist/assets/{http-DSc9SnjM.js → http-DJ7RGsBa.js} +1 -1
- package/app/dist/assets/{hurl-C6ZqBePl.js → hurl-BFdKYmmy.js} +1 -1
- package/app/dist/assets/{index-M3g3Gg6J.js → index-Bn0s82oE.js} +66 -66
- package/app/dist/assets/{java-DVVviYm-.js → java-Dr8eNaIm.js} +1 -1
- package/app/dist/assets/{javascript-DdCIxHkN.js → javascript-B_y55JRU.js} +1 -1
- package/app/dist/assets/{jinja-DHPhjOzH.js → jinja-CtiLe81N.js} +1 -1
- package/app/dist/assets/{jison-By1Hu-Dz.js → jison-DgRjopVa.js} +1 -1
- package/app/dist/assets/{json-CrdbxEK1.js → json-Ey8lEvB9.js} +1 -1
- package/app/dist/assets/{jsx-BrcNxjjW.js → jsx-Bwa-oHXT.js} +1 -1
- package/app/dist/assets/{julia-DmT_hZuo.js → julia-B5-gQR4j.js} +1 -1
- package/app/dist/assets/{just-zec1wO4o.js → just-C5f3chM-.js} +1 -1
- package/app/dist/assets/{latex-DEL8AM-S.js → latex-BYDtpdR6.js} +1 -1
- package/app/dist/assets/{liquid-CakfIUn9.js → liquid-DoctsUmu.js} +1 -1
- package/app/dist/assets/{lua-CuS4yijJ.js → lua-CaWVeLFM.js} +1 -1
- package/app/dist/assets/{marko-BkQRYrVE.js → marko-DGdvjOVi.js} +1 -1
- package/app/dist/assets/{mdc-CPdw2KJD.js → mdc-BMIwxGlA.js} +1 -1
- package/app/dist/assets/{nginx-CuAYQPPK.js → nginx-B8Z5vbjm.js} +1 -1
- package/app/dist/assets/{nim-D1z45KKR.js → nim-CRqyHGha.js} +1 -1
- package/app/dist/assets/{perl-B8x_3S10.js → perl-eJR88W8D.js} +1 -1
- package/app/dist/assets/{php-D6nsPaWE.js → php-CwoMAUGt.js} +1 -1
- package/app/dist/assets/{pug-Dw4uD-ga.js → pug-C2JgKk_M.js} +1 -1
- package/app/dist/assets/{qml-ChhLw5P-.js → qml-n2KtJlY0.js} +1 -1
- package/app/dist/assets/{r-D06WP9cb.js → r-DXTlwI8p.js} +1 -1
- package/app/dist/assets/{razor-D5asdsXb.js → razor-CMxPhZUW.js} +1 -1
- package/app/dist/assets/{regexp-r_PMV4rl.js → regexp-CBkRwpNA.js} +1 -1
- package/app/dist/assets/{rst-CzgcFWde.js → rst-B5_i7k0h.js} +1 -1
- package/app/dist/assets/{ruby-Tab10fjZ.js → ruby-CMWR__9J.js} +1 -1
- package/app/dist/assets/{sas-BnhJR4wu.js → sas-7mMtYio7.js} +1 -1
- package/app/dist/assets/{scss-BBmEnVnb.js → scss-BiPLz-fO.js} +1 -1
- package/app/dist/assets/{shellscript-X9fEW9dZ.js → shellscript-DrtBuq9e.js} +1 -1
- package/app/dist/assets/{shellsession-B9vaRCQF.js → shellsession-Djk5q5V1.js} +1 -1
- package/app/dist/assets/{soy-CvIAn83B.js → soy-JN77R1Jj.js} +1 -1
- package/app/dist/assets/{sql-B6ER5sIr.js → sql-C4-fSzhL.js} +1 -1
- package/app/dist/assets/{stata-DjmIaxGQ.js → stata-Bwyd-bAF.js} +1 -1
- package/app/dist/assets/{surrealql-DCN0BLbL.js → surrealql-D3lvM65W.js} +1 -1
- package/app/dist/assets/{svelte-GOEpr8Ie.js → svelte-CAIdnjGH.js} +1 -1
- package/app/dist/assets/{templ-JztkjpQy.js → templ-C9M2pJgR.js} +1 -1
- package/app/dist/assets/{tex-CWi57Gg0.js → tex-CQHrEpwV.js} +1 -1
- package/app/dist/assets/{ts-tags-wyKOPTXK.js → ts-tags-DntjwYRw.js} +1 -1
- package/app/dist/assets/{tsx-DBYRxMLM.js → tsx-5cx08qAW.js} +1 -1
- package/app/dist/assets/{twig-BFpPa9u6.js → twig-CGnhH5-h.js} +1 -1
- package/app/dist/assets/{typescript-LnuLHd3v.js → typescript-CZ1tQAFx.js} +1 -1
- package/app/dist/assets/{vue-CfS6pKCD.js → vue-CAIHubmq.js} +1 -1
- package/app/dist/assets/{vue-html-CPERjiBI.js → vue-html-sTbSU39P.js} +1 -1
- package/app/dist/assets/{vue-vine-uBWCpWZh.js → vue-vine-DItbW504.js} +1 -1
- package/app/dist/assets/{xml-BbGNa1vt.js → xml-Ddf2Mf3j.js} +1 -1
- package/app/dist/assets/{xsl-CaMpt9fu.js → xsl-7PaMftNb.js} +1 -1
- package/app/dist/assets/{yaml-CbWnKJNt.js → yaml-oGZsxgqT.js} +1 -1
- package/app/dist/index.html +1 -1
- package/dist/bb-app.js +4 -1
- package/dist/bb-host-daemon.js +3 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-Bof7a2F7.js","assets/html-ECCRzsaz.js","assets/css-Dsd4PAbO.js","assets/javascript-B_y55JRU.js","assets/angular-ts-DeodVDM_.js","assets/scss-BiPLz-fO.js","assets/apl-CVKpas4d.js","assets/json-Ey8lEvB9.js","assets/xml-Ddf2Mf3j.js","assets/java-Dr8eNaIm.js","assets/astro-BOhQ8P2d.js","assets/postcss-8kqfa9f0.js","assets/tsx-5cx08qAW.js","assets/typescript-CZ1tQAFx.js","assets/blade-DHYv_YAC.js","assets/html-derivative-DKJlSq0e.js","assets/sql-C4-fSzhL.js","assets/bsl-Dx5tFn3i.js","assets/sdbl-Be_XWc3n.js","assets/cairo-wCCQTdA9.js","assets/python-CqTCsi7P.js","assets/cobol-Yq5Xjret.js","assets/coffee-BLpGOPrm.js","assets/cpp-t6tCmbNr.js","assets/glsl-CXnomNUS.js","assets/c-DOfzIDnq.js","assets/regexp-CBkRwpNA.js","assets/crystal-pfXgNOaY.js","assets/shellscript-DrtBuq9e.js","assets/edge-jP85Exuo.js","assets/elixir-CYXJZGs7.js","assets/elm-CYq0GyiH.js","assets/erb-CXg22Grb.js","assets/ruby-CMWR__9J.js","assets/graphql-D23lxvE7.js","assets/jsx-Bwa-oHXT.js","assets/haml-fJ7Eo5cb.js","assets/lua-CaWVeLFM.js","assets/yaml-oGZsxgqT.js","assets/erlang-CtK0kQ6z.js","assets/markdown-CS4LI6sN.js","assets/fortran-fixed-form-DBM4e0_k.js","assets/fortran-free-form-BIQEK2Jw.js","assets/fsharp-CmzzGQLe.js","assets/gdresource-B_wbPqHd.js","assets/gdscript-B5JQPh_-.js","assets/gdshader-vVjJ_Qr8.js","assets/git-commit-1z4D6NzL.js","assets/diff-togOXQX6.js","assets/git-rebase-BQdokrD3.js","assets/glimmer-js-DgGKK2RH.js","assets/glimmer-ts-1FpqNG-n.js","assets/hack-CcGVZsvy.js","assets/handlebars-dur6589w.js","assets/http-DJ7RGsBa.js","assets/hurl-BFdKYmmy.js","assets/csv-Dr8ri5Nd.js","assets/hxml-DC4KwKt2.js","assets/haxe-BRbuo5UO.js","assets/jinja-CtiLe81N.js","assets/jison-DgRjopVa.js","assets/julia-B5-gQR4j.js","assets/r-DXTlwI8p.js","assets/just-C5f3chM-.js","assets/perl-eJR88W8D.js","assets/latex-BYDtpdR6.js","assets/tex-CQHrEpwV.js","assets/liquid-DoctsUmu.js","assets/marko-DGdvjOVi.js","assets/less-Dj0T9pWC.js","assets/mdc-BMIwxGlA.js","assets/nextflow-CApkvBGW.js","assets/nextflow-groovy-eDLuZ_oi.js","assets/nginx-B8Z5vbjm.js","assets/nim-CRqyHGha.js","assets/php-CwoMAUGt.js","assets/pug-C2JgKk_M.js","assets/qml-n2KtJlY0.js","assets/razor-CMxPhZUW.js","assets/csharp-kfNshAa7.js","assets/rst-B5_i7k0h.js","assets/cmake-CCpZLdLI.js","assets/sas-7mMtYio7.js","assets/shaderlab-DXAhMdPo.js","assets/hlsl-C8Wes1nf.js","assets/shellsession-Djk5q5V1.js","assets/soy-JN77R1Jj.js","assets/sparql-BdcL8cbr.js","assets/turtle-Dpr8zLlw.js","assets/stata-Bwyd-bAF.js","assets/surrealql-D3lvM65W.js","assets/svelte-CAIdnjGH.js","assets/templ-C9M2pJgR.js","assets/go-toi-uWvg.js","assets/ts-tags-DntjwYRw.js","assets/twig-CGnhH5-h.js","assets/vue-CAIHubmq.js","assets/vue-html-sTbSU39P.js","assets/vue-vine-DItbW504.js","assets/stylus-tqAsmugv.js","assets/xsl-7PaMftNb.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(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},l=(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},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(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),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var f=s((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 j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(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 N(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,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(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+j(a,u),c+=N(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+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(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 P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(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)},te={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(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=te,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:ee}},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.4`})),p=s(((e,t)=>{t.exports=f()})),m=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),h=s(((e,t)=>{t.exports=m()})),g=s((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.4`})),_=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=s((e=>{var t=h(),n=p(),r=_();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,m=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var ee=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function ae(e){return{current:e}}function oe(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function I(e,t){ie++,re[ie]=e.current,e.current=t}var se=ae(null),ce=ae(null),le=ae(null),ue=ae(null);function de(e,t){switch(I(le,t),I(ce,e),I(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ef(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ef(t),e=tf(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}oe(se),I(se,e)}function fe(){oe(se),oe(ce),oe(le)}function pe(e){e.memoizedState!==null&&I(ue,e);var t=se.current,n=tf(t,e.type);t!==n&&(I(ce,e),I(se,n))}function me(e){ce.current===e&&(oe(se),oe(ce)),ue.current===e&&(oe(ue),dp._currentValue=ne)}var he,ge;function _e(e){if(he===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);he=t&&t[1]||``,ge=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+he+e+ge}var ve=!1;function ye(e,t){if(!e||ve)return``;ve=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
@@ -18,7 +18,7 @@ Error generating stack: `+e.message+`
|
|
|
18
18
|
\f\r "&'<=>\``.split(``)],[`\0
|
|
19
19
|
\f\r "&'<=>\``.split(``),`\0
|
|
20
20
|
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function ka(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=gi);let l=Aa(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!Sa(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!oa(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function Aa(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=ja(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function ja(e,t,n){let r=fi(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=Bi(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Oa.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Ji:Xi)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Bi(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Oa.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&Ki(n,o)>Ki(n,e.alternative)&&(o=e.alternative),s=o+Bi(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?Oa.single:Oa.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var Ma=[`<`,`&`];function Na(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Bi(e.value,Object.assign({},r.settings.characterReferences,{subset:Ma}))}function Pa(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Na(e,t,n,r)}function Fa(e,t,n,r){return r.all(e)}var Ia=vi(`type`,{invalid:La,unknown:Ra,handlers:{comment:Wi,doctype:Gi,element:ka,raw:Pa,root:Fa,text:Na}});function La(e){throw Error("Expected node, not `"+e+"`")}function Ra(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var za={},Ba={},Va=[];function Ha(e,t){let n=t||za,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Ua,all:Wa,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Fr,characterReferences:n.characterReferences||Ba,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?gi:hi,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function Ua(e,t,n){return Ia(e,t,n,this)}function Wa(e){let t=[],n=e&&e.children||Va,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function Ga(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 Ka(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function qa(e){return Array.isArray(e)?e:[e]}async function Ja(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function Ya(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function Xa(e){return e===`ansi`||Ya(e)}function Za(e){return e===`none`}function Qa(e){return Za(e)}function $a(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function eo(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),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}function to(e){let t=eo(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function no(e,t,n){let r=new Set;for(let t of e.matchAll(/:?lang=["']([^"']+)["']/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/(?:```|~~~)([\w-]+)/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/\\begin\{([\w-]+)\}/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return Array.from(r);let i=n.getBundledLanguages();return Array.from(r).filter(e=>e&&i[e])}var ro=`light-dark()`,io=[`color`,`background-color`];function ao(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function oo(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?ao(e,t):e})):e}function so(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>co(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&io.includes(a))if(r===ro&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new Xt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function co(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&vn.Italic&&(t[`font-style`]=`italic`),e.fontStyle&vn.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&vn.Underline&&n.push(`underline`),e.fontStyle&vn.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function lo(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}var uo=new WeakMap;function fo(e,t){uo.set(e,t)}function po(e){return uo.get(e)}var mo=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(qa(n).map(e=>[e,Pr])),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 ho(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function ho(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 go(e,t){if(!(e instanceof mo))throw new Xt(`Invalid grammar state`);return e.getInternalStack(t)}function _o(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new Xt(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}else{let t=r.lines[e.line];if(t===void 0)throw new Xt(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new Xt(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=to(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));vo(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return oo(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new Xt(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=yo(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new Xt(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new Xt(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&$a(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function vo(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new Xt(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new Xt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function yo(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(yo).join(``):``}var bo=[_o()];function xo(e){let t=So(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...bo]}function So(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var Co=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],wo={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function To(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function Eo(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function Do(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)wo[r]&&t.push({type:`setDecoration`,value:wo[r]});else if(r<=29){let e=wo[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:Co[r-30]}});else if(r===38){let n=Eo(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:Co[r-40]}});else if(r===48){let n=Eo(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:Co[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:Co[r-100+8]}})}return t}function Oo(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=To(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=Do(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var ko={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function Ao(e=ko){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<Co.length;e++)r.push(t(Co[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var jo={black:`#000000`,red:`#cd3131`,green:`#0DBC79`,yellow:`#E5E510`,blue:`#2472C8`,magenta:`#BC3FBC`,cyan:`#11A8CD`,white:`#E5E5E5`,brightBlack:`#666666`,brightRed:`#F14C4C`,brightGreen:`#23D18B`,brightYellow:`#F5F543`,brightBlue:`#3B8EEA`,brightMagenta:`#D670D6`,brightCyan:`#29B8DB`,brightWhite:`#FFFFFF`};function Mo(e,t,n){let r=Ga(e,n),i=eo(t),a=Ao(Object.fromEntries(Co.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||jo[t]]}))),o=Oo();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=Ka(i,r),o=Ka(o,r),n.decorations.has(`dim`)&&(i=No(i));let s=vn.None;return n.decorations.has(`bold`)&&(s|=vn.Bold),n.decorations.has(`italic`)&&(s|=vn.Italic),n.decorations.has(`underline`)&&(s|=vn.Underline),n.decorations.has(`strikethrough`)&&(s|=vn.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function No(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}else if(e.length===6)return`#${e}80`;else if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}else if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Po(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||`text`);if(Ya(i)||Za(r))return eo(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:a,colorMap:o}=e.setTheme(r);if(i===`ansi`)return Mo(a,t,n);let s=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new Xt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(a.name))throw new Xt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return Io(t,s,a,o,n)}function Fo(...e){if(e.length===2)return po(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(Ya(i)||Za(a))throw new Xt(`Plain language does not have grammar state`);if(i===`ansi`)throw new Xt(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new mo(Lo(n,c,o,s,r).stateStack,c.name,o.name)}function Io(e,t,n,r,i){let a=Lo(e,t,n,r,i),o=new mo(a.stateStack,t.name,n.name);return fo(a.tokens,o),a.tokens}function Lo(e,t,n,r,i){let a=Ga(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=eo(e),l=i.grammarState?go(i.grammarState,n.name)??Pr:i.grammarContextCode==null?Pr:Lo(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,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]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=Ka(r[wn.getForeground(s)],a),l=wn.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?Ro(t.scopes):zo(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function Ro(e){return e.map(e=>({scopeName:e}))}function zo(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:Ho(e,i,t.slice(0,r))}}return n}function Bo(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function Vo(e,t,n){if(!Bo(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Bo(e[r],n[i])&&--r,--i;return r===-1}function Ho(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(Vo(e,t,n)){r.push(a);break}return r}function Uo(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=Po(e,t,{...n,theme:r.theme});return{tokens:i,state:po(i),theme:typeof r.theme==`string`?r.theme:r.theme.name}}),a=Wo(...i.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:c,...l}=e[t][i];o.variants[r[n].color]=l}),o})),s=i[0].state?new mo(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return s&&fo(o,s),o}function Wo(...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}function Go(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new Xt("`themes` option must not be empty");let p=Uo(e,t,n);if(c=po(p),l&&ro!==l&&!f.find(e=>e.color===l))throw new Xt(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>so(e,h,u,l,d))),c&&fo(a,c);let g=f.map(e=>Ga(e.theme,n));i=Ko(f,m,g,u,l,`fg`,d),r=Ko(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=Ga(n.theme,n);a=Po(e,t,n);let l=e.getTheme(n.theme);r=Ka(l.bg,s),i=Ka(l.fg,s),o=l.name,c=po(a)}else throw new Xt("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function Ko(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=Ka(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===ro&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new Xt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Ka(t[r][a],n[r])||`inherit`}, ${Ka(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function qo(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>qo(e,t,n),codeToTokens:(t,n)=>Go(e,t,n)}){let i=t;for(let e of xo(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=Go(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=Yo(a):d===`never`&&(a=Xo(a)),f&&(a=Zo(a));let p={...r,get source(){return i}};for(let e of xo(n))a=e.tokens?.call(p,a)||a;return Jo(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function Jo(e,t,n,r=po(e)){let i=xo(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:$a,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
21
|
-
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=lo(a.htmlStyle||co(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&fo(m,r),m}function Yo(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&vn.Underline||i.fontStyle&vn.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function Xo(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function Zo(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=lo(e.htmlStyle||co(e)),i=lo(n.htmlStyle||co(n)),a=e.fontStyle&&(e.fontStyle&vn.Underline||e.fontStyle&vn.Strikethrough),o=n.fontStyle&&(n.fontStyle&vn.Underline||n.fontStyle&vn.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var Qo=Ha;function $o(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>qo(e,t,n),codeToTokens:(t,n)=>Go(e,t,n)},i=Qo(qo(e,t,n,r));for(let e of xo(n))i=e.postprocess?.call(r,i,n)||i;return i}var es={light:`#333333`,dark:`#bbbbbb`},ts={light:`#fffffe`,dark:`#1e1e1e`},ns=`__shiki_resolved`;function rs(e){if(e?.[ns])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`?es.light:es.dark,n||=t.type===`light`?ts.light:ts.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,ns,{enumerable:!1,writable:!1,value:!0}),t}async function is(e){return Array.from(new Set((await Promise.all(e.filter(e=>!Xa(e)).map(async e=>await Ja(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function as(e){return(await Promise.all(e.map(async e=>Qa(e)?null:rs(await Ja(e))))).filter(e=>!!e)}var os=3,ss=!1;function cs(e,t=3){if(os&&!(typeof os==`number`&&t>os)){if(ss)throw Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}var ls=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function us(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 ls(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var ds=class extends Nr{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)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=rs(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=dn.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=us(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=Array.from(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 ls(`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))}},fs=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}},ps=0;function ms(e){ps+=1,e.warnings!==!1&&ps>=10&&ps%10==0&&console.warn(`[Shiki] ${ps} 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 ls("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(rs),i=new ds(new fs(e.engine,n),r,n,e.langAlias),a;function o(t){return us(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new ls(`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 ls(`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 is(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await as(e))}function g(){if(t)throw new ls(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--ps)}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 hs(e){e.engine||cs("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([as(e.themes||[]),is(e.langs||[]),e.engine]);return ms({...e,themes:t,langs:n,engine:r})}async function gs(e){let t=await hs(e);return{getLastGrammarState:(...e)=>Fo(t,...e),codeToTokensBase:(e,n)=>Po(t,e,n),codeToTokensWithThemes:(e,n)=>Uo(t,e,n),codeToTokens:(e,n)=>Go(t,e,n),codeToHast:(e,n)=>qo(t,e,n),codeToHtml:(e,n)=>$o(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function _s(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,Xa(n))return[];let r=t[n];if(!r)throw new Xt(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(Qa(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new Xt(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await gs({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function vs(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function ys(e,t){let n=vs(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var bs=u(_(),1),xs=y(),Ss=`modulepreload`,Cs=function(e){return`/`+e},ws={},z=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}))))}r=o(t.map(t=>{if(t=Cs(t,n),t in ws)return;ws[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Ss,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.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)})},Ts=[{id:`abap`,name:`ABAP`,import:(()=>z(()=>import(`./abap-CkQ0tsz-.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>z(()=>import(`./actionscript-3-DHm0ZfF4.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>z(()=>import(`./ada-DK_ua92Z.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>z(()=>import(`./angular-html-B66mJRBQ.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>z(()=>import(`./angular-ts-Db7jGnqJ.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>z(()=>import(`./apache-DXtpFu7o.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>z(()=>import(`./apex-DlnRRWpl.js`),[]))},{id:`apl`,name:`APL`,import:(()=>z(()=>import(`./apl-DMgeEg7r.js`),__vite__mapDeps([6,2,1,3,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>z(()=>import(`./applescript-CShk62ad.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>z(()=>import(`./ara-CWN-FDkm.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>z(()=>import(`./asciidoc-Bg-PM9Vn.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>z(()=>import(`./asm-DKOhR24S.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>z(()=>import(`./astro-i1F4D3VM.js`),__vite__mapDeps([10,2,3,7,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>z(()=>import(`./awk-3ibKHffv.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>z(()=>import(`./ballerina-xx7VNGxs.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>z(()=>import(`./bat-DGYsZ5wR.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>z(()=>import(`./beancount-D_ATR1UV.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>z(()=>import(`./berry-BqYMORfH.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>z(()=>import(`./bibtex-CQTBDajW.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>z(()=>import(`./bicep-CfNtxPrK.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>z(()=>import(`./bird2-C0dUPe3I.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>z(()=>import(`./blade-CiWt8USs.js`),__vite__mapDeps([14,2,15,1,3,7,16,8,9])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>z(()=>import(`./bsl-Dx5tFn3i.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>z(()=>import(`./c-BHq08H9G.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>z(()=>import(`./c3-BUwZ5e3k.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>z(()=>import(`./cadence-C3OKDYrr.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>z(()=>import(`./cairo-wCCQTdA9.js`),__vite__mapDeps([19,20])))},{id:`clarity`,name:`Clarity`,import:(()=>z(()=>import(`./clarity-Crxe8gSr.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>z(()=>import(`./clojure-BuzOUPMr.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>z(()=>import(`./cmake-CCpZLdLI.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>z(()=>import(`./cobol-D_JmDLld.js`),__vite__mapDeps([21,1,2,3,9])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>z(()=>import(`./codeowners-Bo1VYpHz.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>z(()=>import(`./codeql-Db01hzHE.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>z(()=>import(`./coffee-umIHDekw.js`),__vite__mapDeps([22,3])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>z(()=>import(`./common-lisp-CMlJIc6Y.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>z(()=>import(`./coq-BlzBYp3f.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>z(()=>import(`./cpp-D94npP6r.js`).then(e=>e.n),__vite__mapDeps([23,24,25,26,16])))},{id:`crystal`,name:`Crystal`,import:(()=>z(()=>import(`./crystal-8YBmtXaf.js`),__vite__mapDeps([27,25,2,1,3,28,16])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>z(()=>import(`./csharp-kfNshAa7.js`),[]))},{id:`css`,name:`CSS`,import:(()=>z(()=>import(`./css-BFM8U_dh.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>z(()=>import(`./csv-Dr8ri5Nd.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>z(()=>import(`./cue-jXfhyOwY.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>z(()=>import(`./cypher-CayLeiaR.js`),[]))},{id:`d`,name:`D`,import:(()=>z(()=>import(`./d-BMZQ0mAy.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>z(()=>import(`./dart-gMOEMyuz.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>z(()=>import(`./dax-C3t5LadU.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>z(()=>import(`./desktop-DmhXLwLR.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>z(()=>import(`./diff-togOXQX6.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>z(()=>import(`./docker--6N01olR.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>z(()=>import(`./dotenv-Bq930Yx8.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>z(()=>import(`./dream-maker-BiMf3DHl.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>z(()=>import(`./edge-DZng818P.js`),__vite__mapDeps([29,15,1,2,3,13])))},{id:`elixir`,name:`Elixir`,import:(()=>z(()=>import(`./elixir-oG24WxNL.js`),__vite__mapDeps([30,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>z(()=>import(`./elm-BQn9SMXX.js`),__vite__mapDeps([31,24,25])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>z(()=>import(`./emacs-lisp-Dhht7he2.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>z(()=>import(`./erb-Cq0klEZI.js`),__vite__mapDeps([32,1,2,3,33,25,23,24,26,16,34,35,12,13,36,37,28,8,9,38])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>z(()=>import(`./erlang-CtK0kQ6z.js`),__vite__mapDeps([39,40])))},{id:`fennel`,name:`Fennel`,import:(()=>z(()=>import(`./fennel-BExc9TZf.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>z(()=>import(`./fish-C2p-AJmZ.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>z(()=>import(`./fluent-CeYzs8Qy.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>z(()=>import(`./fortran-fixed-form-DBM4e0_k.js`),__vite__mapDeps([41,42])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>z(()=>import(`./fortran-free-form-BIQEK2Jw.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>z(()=>import(`./fsharp-CmzzGQLe.js`),__vite__mapDeps([43,40])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>z(()=>import(`./gdresource-B_wbPqHd.js`),__vite__mapDeps([44,45,46])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>z(()=>import(`./gdscript-B5JQPh_-.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>z(()=>import(`./gdshader-vVjJ_Qr8.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>z(()=>import(`./genie-DGl5rqC8.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>z(()=>import(`./gherkin-CY_VLUnD.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>z(()=>import(`./git-commit-1z4D6NzL.js`),__vite__mapDeps([47,48])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>z(()=>import(`./git-rebase-DR5b4anZ.js`),__vite__mapDeps([49,28])))},{id:`gleam`,name:`Gleam`,import:(()=>z(()=>import(`./gleam-BarIG9kQ.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>z(()=>import(`./glimmer-js-BDd0xnyC.js`),__vite__mapDeps([50,2,1,3,13])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>z(()=>import(`./glimmer-ts-CWNbj8-E.js`),__vite__mapDeps([51,2,1,3,13])))},{id:`glsl`,name:`GLSL`,import:(()=>z(()=>import(`./glsl-B2PbL7Xo.js`).then(e=>e.n),__vite__mapDeps([24,25])))},{id:`gn`,name:`GN`,import:(()=>z(()=>import(`./gn-DhYsTPYc.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>z(()=>import(`./gnuplot-CucLlTBc.js`),[]))},{id:`go`,name:`Go`,import:(()=>z(()=>import(`./go-toi-uWvg.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>z(()=>import(`./graphql-B7GBakJc.js`).then(e=>e.n),__vite__mapDeps([34,3,35,12,13])))},{id:`groovy`,name:`Groovy`,import:(()=>z(()=>import(`./groovy-Ds4dis_k.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>z(()=>import(`./hack-DOVnHknU.js`),__vite__mapDeps([52,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>z(()=>import(`./haml-Bb8YVHgL.js`).then(e=>e.n),__vite__mapDeps([36,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>z(()=>import(`./handlebars-D0mwNWC9.js`),__vite__mapDeps([53,2,1,3,38])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>z(()=>import(`./haskell-B_jvz5Po.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>z(()=>import(`./haxe-BRbuo5UO.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>z(()=>import(`./hcl-BzNUCtsK.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>z(()=>import(`./hjson-BxVo3sS2.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>z(()=>import(`./hlsl-C8Wes1nf.js`),[]))},{id:`html`,name:`HTML`,import:(()=>z(()=>import(`./html-5tM-GssK.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>z(()=>import(`./html-derivative-Cn9-LWpS.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>z(()=>import(`./http-DSc9SnjM.js`),__vite__mapDeps([54,34,3,35,12,13,7,28,8,9])))},{id:`hurl`,name:`Hurl`,import:(()=>z(()=>import(`./hurl-C6ZqBePl.js`),__vite__mapDeps([55,56,34,3,35,12,13,8,9])))},{id:`hxml`,name:`HXML`,import:(()=>z(()=>import(`./hxml-DC4KwKt2.js`),__vite__mapDeps([57,58])))},{id:`hy`,name:`Hy`,import:(()=>z(()=>import(`./hy-dMrJKKU_.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>z(()=>import(`./imba-DG_oO8tg.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>z(()=>import(`./ini-geHw79Aj.js`),[]))},{id:`java`,name:`Java`,import:(()=>z(()=>import(`./java-DVVviYm-.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>z(()=>import(`./javascript-DdCIxHkN.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>z(()=>import(`./jinja-DHPhjOzH.js`),__vite__mapDeps([59,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>z(()=>import(`./jison-By1Hu-Dz.js`),__vite__mapDeps([60,3])))},{id:`json`,name:`JSON`,import:(()=>z(()=>import(`./json-CrdbxEK1.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>z(()=>import(`./json5-CDUsNqz6.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>z(()=>import(`./jsonc-D48xcwyD.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>z(()=>import(`./jsonl-cpIYDXEe.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>z(()=>import(`./jsonnet-Da1lhszN.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>z(()=>import(`./jssm-B8BLrEGL.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>z(()=>import(`./jsx-BrcNxjjW.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>z(()=>import(`./julia-DmT_hZuo.js`),__vite__mapDeps([61,23,24,25,26,16,3,20,62])))},{id:`just`,name:`Just`,import:(()=>z(()=>import(`./just-zec1wO4o.js`),__vite__mapDeps([63,3,64,2,1,16,8,9,20,33,25,23,24,26,34,35,12,13,36,37,28,38])))},{id:`kdl`,name:`KDL`,import:(()=>z(()=>import(`./kdl-B-2tSRmp.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>z(()=>import(`./kotlin-DepsEzh3.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>z(()=>import(`./kusto-BcCtXIb8.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>z(()=>import(`./latex-DEL8AM-S.js`),__vite__mapDeps([65,66,62])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>z(()=>import(`./lean-CNO9ffpX.js`),[]))},{id:`less`,name:`Less`,import:(()=>z(()=>import(`./less-Dj0T9pWC.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>z(()=>import(`./liquid-CakfIUn9.js`),__vite__mapDeps([67,2,1,3,7])))},{id:`llvm`,name:`LLVM IR`,import:(()=>z(()=>import(`./llvm-DbV9b66l.js`),[]))},{id:`log`,name:`Log file`,import:(()=>z(()=>import(`./log-BMblmPyH.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>z(()=>import(`./logo-B78qMxws.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>z(()=>import(`./lua-CuS4yijJ.js`).then(e=>e.n),__vite__mapDeps([37,25])))},{id:`luau`,name:`Luau`,import:(()=>z(()=>import(`./luau-BUd8xsdE.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>z(()=>import(`./make-Ev-6cJrd.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>z(()=>import(`./markdown-CS4LI6sN.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>z(()=>import(`./marko-BkQRYrVE.js`),__vite__mapDeps([68,2,69,5,13])))},{id:`matlab`,name:`MATLAB`,import:(()=>z(()=>import(`./matlab-C0qEtAx9.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>z(()=>import(`./mdc-CPdw2KJD.js`),__vite__mapDeps([70,15,1,2,3,40,38])))},{id:`mdx`,name:`MDX`,import:(()=>z(()=>import(`./mdx-CzvnbLXb.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>z(()=>import(`./mermaid-BPquZaKt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>z(()=>import(`./mipsasm-k5DQoS6j.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>z(()=>import(`./mojo-sTTDuNnR.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>z(()=>import(`./moonbit-j5ChFtBC.js`),[]))},{id:`move`,name:`Move`,import:(()=>z(()=>import(`./move-Dj0Gmn6R.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>z(()=>import(`./narrat-DJgMz2oW.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>z(()=>import(`./nextflow-CApkvBGW.js`),__vite__mapDeps([71,72])))},{id:`nextflow-groovy`,name:`nextflow-groovy`,import:(()=>z(()=>import(`./nextflow-groovy-eDLuZ_oi.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>z(()=>import(`./nginx-CuAYQPPK.js`),__vite__mapDeps([73,37,25])))},{id:`nim`,name:`Nim`,import:(()=>z(()=>import(`./nim-D1z45KKR.js`),__vite__mapDeps([74,25,2,24,1,3,40,8,9])))},{id:`nix`,name:`Nix`,import:(()=>z(()=>import(`./nix-CxIPS3pb.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>z(()=>import(`./nushell-GDfBmoBU.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>z(()=>import(`./objective-c-MFQ_MGUa.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>z(()=>import(`./objective-cpp-Y83LcBE7.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>z(()=>import(`./ocaml-FxYfaJxu.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>z(()=>import(`./odin-CprihY3z.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>z(()=>import(`./openscad-Bc1FbpOi.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>z(()=>import(`./pascal-Bb4d8cUL.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>z(()=>import(`./perl-B8x_3S10.js`),__vite__mapDeps([64,2,1,3,16,8,9])))},{id:`php`,name:`PHP`,import:(()=>z(()=>import(`./php-D6nsPaWE.js`),__vite__mapDeps([75,2,1,3,7,16,8,9])))},{id:`pkl`,name:`Pkl`,import:(()=>z(()=>import(`./pkl-tM25Sq0w.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>z(()=>import(`./plsql-CLEfFhSj.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>z(()=>import(`./po-CaAzdrrh.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>z(()=>import(`./polar-TG7aTGdK.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>z(()=>import(`./postcss-8kqfa9f0.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>z(()=>import(`./powerquery-CtSu1Nfd.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>z(()=>import(`./powershell-87lLBHMy.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>z(()=>import(`./prisma-Dnf694DZ.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>z(()=>import(`./prolog-C0XbHTWa.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>z(()=>import(`./proto-BZP-HLIb.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>z(()=>import(`./pug-Dw4uD-ga.js`),__vite__mapDeps([76,2,1,3])))},{id:`puppet`,name:`Puppet`,import:(()=>z(()=>import(`./puppet-CJYWgYC5.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>z(()=>import(`./purescript-B95Q6BAd.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>z(()=>import(`./python-CqTCsi7P.js`),[]))},{id:`qml`,name:`QML`,import:(()=>z(()=>import(`./qml-ChhLw5P-.js`),__vite__mapDeps([77,3])))},{id:`qmldir`,name:`QML Directory`,import:(()=>z(()=>import(`./qmldir-DlIL4hls.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>z(()=>import(`./qss-BW72E0q_.js`),[]))},{id:`r`,name:`R`,import:(()=>z(()=>import(`./r-D06WP9cb.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>z(()=>import(`./racket-CCAimEsC.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>z(()=>import(`./raku-mSuqElkM.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>z(()=>import(`./razor-D5asdsXb.js`),__vite__mapDeps([78,79,1,2,3])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>z(()=>import(`./reg-CGwMBJ2c.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>z(()=>import(`./regexp-r_PMV4rl.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>z(()=>import(`./rel-JwrbYgX4.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>z(()=>import(`./riscv-CoYyE75b.js`),[]))},{id:`ron`,name:`RON`,import:(()=>z(()=>import(`./ron-C5wrhnmJ.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>z(()=>import(`./rosmsg-DlimTR9t.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>z(()=>import(`./rst-CzgcFWde.js`),__vite__mapDeps([80,81,23,24,25,26,16,15,1,2,3,20,33,34,35,12,13,36,37,28,8,9,38])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>z(()=>import(`./ruby-Tab10fjZ.js`),__vite__mapDeps([33,25,23,24,26,16,2,34,3,35,12,13,36,1,37,28,8,9,38])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>z(()=>import(`./rust-Cxnkxx3h.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>z(()=>import(`./sas-BnhJR4wu.js`),__vite__mapDeps([82,16])))},{id:`sass`,name:`Sass`,import:(()=>z(()=>import(`./sass-DEyqUIpU.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>z(()=>import(`./scala-i3RN3yAN.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>z(()=>import(`./scheme-BcKdjYkO.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>z(()=>import(`./scss-BBmEnVnb.js`).then(e=>e.n),__vite__mapDeps([5,2])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>z(()=>import(`./sdbl-Be_XWc3n.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>z(()=>import(`./shaderlab-DXAhMdPo.js`),__vite__mapDeps([83,84])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>z(()=>import(`./shellscript-X9fEW9dZ.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>z(()=>import(`./shellsession-B9vaRCQF.js`),__vite__mapDeps([85,28])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>z(()=>import(`./smalltalk-BdBlL6ks.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>z(()=>import(`./solidity-DH-yUSWc.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>z(()=>import(`./soy-CvIAn83B.js`),__vite__mapDeps([86,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>z(()=>import(`./sparql-BdcL8cbr.js`),__vite__mapDeps([87,88])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>z(()=>import(`./splunk-CIjc4kxs.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>z(()=>import(`./sql-B6ER5sIr.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>z(()=>import(`./ssh-config-BKVd4drG.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>z(()=>import(`./stata-DjmIaxGQ.js`),__vite__mapDeps([89,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>z(()=>import(`./stylus-tqAsmugv.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>z(()=>import(`./surrealql-DCN0BLbL.js`),__vite__mapDeps([90,3])))},{id:`svelte`,name:`Svelte`,import:(()=>z(()=>import(`./svelte-GOEpr8Ie.js`),__vite__mapDeps([91,2,3,11,13])))},{id:`swift`,name:`Swift`,import:(()=>z(()=>import(`./swift-CdDBQ3_Z.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>z(()=>import(`./system-verilog-CBqEY-9v.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>z(()=>import(`./systemd-khRP5zwK.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>z(()=>import(`./talonscript-D_lneH-6.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>z(()=>import(`./tasl-CLymawGe.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>z(()=>import(`./tcl-BRY1S87U.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>z(()=>import(`./templ-JztkjpQy.js`),__vite__mapDeps([92,2,93,3])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>z(()=>import(`./terraform-BqohMo2f.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>z(()=>import(`./tex-CWi57Gg0.js`),__vite__mapDeps([66,62])))},{id:`toml`,name:`TOML`,import:(()=>z(()=>import(`./toml-C4c85Lwg.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>z(()=>import(`./ts-tags-wyKOPTXK.js`),__vite__mapDeps([94,2,24,25,1,3,16,13,8,9])))},{id:`tsv`,name:`TSV`,import:(()=>z(()=>import(`./tsv-DsZq9HBQ.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>z(()=>import(`./tsx-DBYRxMLM.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>z(()=>import(`./turtle-Dpr8zLlw.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>z(()=>import(`./twig-BFpPa9u6.js`),__vite__mapDeps([95,2,3,75,1,7,16,8,9,20,33,25,23,24,26,34,35,12,13,36,37,28,38,5])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>z(()=>import(`./typescript-LnuLHd3v.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>z(()=>import(`./typespec-DcqgATB-.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>z(()=>import(`./typst-CeVxmuPg.js`),[]))},{id:`v`,name:`V`,import:(()=>z(()=>import(`./v-C2Qsh2-1.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>z(()=>import(`./vala-CvZ3yL7c.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>z(()=>import(`./vb-B_p4qDw4.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>z(()=>import(`./verilog-D8MGjxD7.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>z(()=>import(`./vhdl-MLyYh_Gz.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>z(()=>import(`./viml-BuYIArcz.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>z(()=>import(`./vue-CfS6pKCD.js`),__vite__mapDeps([96,2,15,1,3,7,13])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>z(()=>import(`./vue-html-CPERjiBI.js`),__vite__mapDeps([97,3])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>z(()=>import(`./vue-vine-uBWCpWZh.js`),__vite__mapDeps([98,2,3,69,11,5,99])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>z(()=>import(`./vyper-CNqG09-_.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>z(()=>import(`./wasm-BsQDV7Y0.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>z(()=>import(`./wenyan-BmOQge13.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>z(()=>import(`./wgsl-CgWrmvIg.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>z(()=>import(`./wikitext-DkwckXCk.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>z(()=>import(`./wit-CtyVFGe7.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>z(()=>import(`./wolfram-CXE4FrKz.js`),[]))},{id:`xml`,name:`XML`,import:(()=>z(()=>import(`./xml-BbGNa1vt.js`).then(e=>e.n),__vite__mapDeps([8,9])))},{id:`xsl`,name:`XSL`,import:(()=>z(()=>import(`./xsl-CaMpt9fu.js`),__vite__mapDeps([100,8,9])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>z(()=>import(`./yaml-CbWnKJNt.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>z(()=>import(`./zenscript-DH15wJt0.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>z(()=>import(`./zig-CqXN9brD.js`),[]))}],Es=Object.fromEntries(Ts.map(e=>[e.id,e.import])),Ds=Object.fromEntries(Ts.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Os={...Es,...Ds},ks=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>z(()=>import(`./andromeeda-D2ccw8v4.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>z(()=>import(`./aurora-x-DpaEirL8.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>z(()=>import(`./ayu-dark-ursiSH5k.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>z(()=>import(`./ayu-light-DMjlrKmx.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>z(()=>import(`./ayu-mirage-DZEMb75h.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>z(()=>import(`./catppuccin-frappe-CMnRXVZP.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>z(()=>import(`./catppuccin-latte-CqhXSjCC.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>z(()=>import(`./catppuccin-macchiato-B6kneE0C.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>z(()=>import(`./catppuccin-mocha-CP8YZpvj.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>z(()=>import(`./dark-plus-B__q47Nr.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>z(()=>import(`./dracula-CBkSghcw.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>z(()=>import(`./dracula-soft-CCSYeoxL.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>z(()=>import(`./everforest-dark-NqSz4oHS.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>z(()=>import(`./everforest-light-a3Yzs_lT.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>z(()=>import(`./github-dark-ClO4AStc.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>z(()=>import(`./github-dark-default-CM0dPco8.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>z(()=>import(`./github-dark-dimmed-Cb6xxpXY.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>z(()=>import(`./github-dark-high-contrast-BpYtx2-M.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>z(()=>import(`./github-light-CeOVFgf_.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>z(()=>import(`./github-light-default-BmnCWL6x.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>z(()=>import(`./github-light-high-contrast-rpagNF5O.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>z(()=>import(`./gruvbox-dark-hard-aPiW8pQh.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>z(()=>import(`./gruvbox-dark-medium-2HJCvzsS.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>z(()=>import(`./gruvbox-dark-soft-Da97ODX9.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>z(()=>import(`./gruvbox-light-hard-BXlEipFe.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>z(()=>import(`./gruvbox-light-medium-Cun-GjGk.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>z(()=>import(`./gruvbox-light-soft-Bd3qiiSw.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>z(()=>import(`./horizon-D54PjLAY.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`dark`,import:(()=>z(()=>import(`./horizon-bright-D9RccdIr.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>z(()=>import(`./houston-CMu1N_4K.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>z(()=>import(`./kanagawa-dragon-2Sk8Rx83.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>z(()=>import(`./kanagawa-lotus-CQVSWfJp.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>z(()=>import(`./kanagawa-wave-BKWNioLX.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>z(()=>import(`./laserwave-BUqkO46F.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>z(()=>import(`./light-plus-C9Hnuc1T.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>z(()=>import(`./material-theme-5rA1zn0D.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>z(()=>import(`./material-theme-darker-DGOEiL65.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>z(()=>import(`./material-theme-lighter-CULfFRX0.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>z(()=>import(`./material-theme-ocean-LQZ9CleP.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>z(()=>import(`./material-theme-palenight-Di_f5oks.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>z(()=>import(`./min-dark-rkuIbtJV.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>z(()=>import(`./min-light-Dj_HOGsr.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>z(()=>import(`./monokai-D5p-u2ij.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>z(()=>import(`./night-owl-CEdtPl3A.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>z(()=>import(`./night-owl-light-GdSldewm.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>z(()=>import(`./nord-3WFAz5H9.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>z(()=>import(`./one-dark-pro-BB6mpmmA.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>z(()=>import(`./one-light-BYLoxNtg.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>z(()=>import(`./plastic-D3k2Xp_5.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>z(()=>import(`./poimandres-bPTvT4Da.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>z(()=>import(`./red-C-DA4yBI.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>z(()=>import(`./rose-pine-DlrMPYYd.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>z(()=>import(`./rose-pine-dawn-DBHFtZD2.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>z(()=>import(`./rose-pine-moon-BBfrpe5q.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>z(()=>import(`./slack-dark-3PDtm74m.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>z(()=>import(`./slack-ochin-CwiuFRJD.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>z(()=>import(`./snazzy-light-Dyqc8Is2.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>z(()=>import(`./solarized-dark-DZiTscIX.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>z(()=>import(`./solarized-light-DBcfxrfG.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>z(()=>import(`./synthwave-84-CbbRs73K.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>z(()=>import(`./tokyo-night-BWUONxad.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>z(()=>import(`./vesper-DossXiE1.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>z(()=>import(`./vitesse-black-C3kc1227.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>z(()=>import(`./vitesse-dark-kWOu5V36.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>z(()=>import(`./vitesse-light-DMtiL8bK.js`),[]))}].map(e=>[e.id,e.import])),As=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function js(){return 2147483648}function Ms(){return typeof performance<`u`?performance.now():Date.now()}var Ns=(e,t)=>e+(t-e%t)%t;async function Ps(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=js();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,Ns(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:Ms,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 Fs=Object.defineProperty,Is=(e,t,n)=>t in e?Fs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ls=(e,t,n)=>Is(e,typeof t==`symbol`?t:t+``,n),Rs=null;function zs(e){throw new As(e.UTF8ToString(e.getLastOnigError()))}var Bs=class e{constructor(t){Ls(this,`utf16Length`),Ls(this,`utf8Length`),Ls(this,`utf16Value`),Ls(this,`utf8Value`),Ls(this,`utf16OffsetToUtf8`),Ls(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)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Vs=class e{constructor(t){if(Ls(this,`id`,++e.LAST_ID),Ls(this,`_onigBinding`),Ls(this,`content`),Ls(this,`utf16Length`),Ls(this,`utf8Length`),Ls(this,`utf16OffsetToUtf8`),Ls(this,`utf8OffsetToUtf16`),Ls(this,`ptr`),!Rs)throw new As(`Must invoke loadWasm first.`);this._onigBinding=Rs,this.content=t;let n=new Bs(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=Rs.omalloc(1e4),e._sharedPtrInUse=!0,Rs.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(Rs)}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)}};Ls(Vs,`LAST_ID`,0),Ls(Vs,`_sharedPtr`,0),Ls(Vs,`_sharedPtrInUse`,!1);var Hs=Vs,Us=class{constructor(e){if(Ls(this,`_onigBinding`),Ls(this,`_ptr`),!Rs)throw new As(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Bs(e[r]);t[r]=i.createString(Rs),n[r]=i.utf8Length}let r=Rs.omalloc(4*e.length);Rs.HEAPU32.set(t,r/4);let i=Rs.omalloc(4*e.length);Rs.HEAPU32.set(n,i/4);let a=Rs.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)Rs.ofree(t[n]);Rs.ofree(i),Rs.ofree(r),a===0&&zs(Rs),this._onigBinding=Rs,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 Hs(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 Ws(e){return typeof e.instantiator==`function`}function Gs(e){return typeof e.default==`function`}function Ks(e){return e.data!==void 0}function qs(e){return typeof Response<`u`&&e instanceof Response}function Js(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 Ys;function Xs(e){if(Ys)return Ys;async function t(){Rs=await Ps(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Ws(n)?n=await n.instantiator(t):Gs(n)?n=await n.default(t):(Ks(n)&&(n=n.data),qs(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Qs(n)(t):await $s(n)(t):Js(n)||n instanceof WebAssembly.Module?n=await Zs(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Zs(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Ys=t(),Ys}function Zs(e){return t=>WebAssembly.instantiate(e,t)}function Qs(e){return t=>WebAssembly.instantiateStreaming(e,t)}function $s(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function ec(e){return e&&await Xs(e),{createScanner(e){return new Us(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Hs(e)}}}var tc=_s({langs:Os,themes:ks,engine:()=>ec(z(()=>import(`./wasm-D_MQmneJ.js`),[]))}),{codeToHtml:nc,codeToHast:rc,codeToTokens:ic,codeToTokensBase:eee,codeToTokensWithThemes:ac,getSingletonHighlighter:oc,getLastGrammarState:sc}=ys(tc,{guessEmbeddedLanguages:no});function cc(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function lc(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var uc=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),dc=String.raw;function fc(e,t){if(e==null)throw Error(t??`Value expected`);return e}var pc=dc`\[\^?`,mc=`c.? | C(?:-.?)?|${dc`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${dc`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${dc`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${dc`o\{[^\}]*\}?`}|${dc`\d{1,3}`}`,hc=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,gc=new RegExp(dc`
|
|
21
|
+
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=lo(a.htmlStyle||co(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&fo(m,r),m}function Yo(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&vn.Underline||i.fontStyle&vn.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function Xo(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function Zo(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=lo(e.htmlStyle||co(e)),i=lo(n.htmlStyle||co(n)),a=e.fontStyle&&(e.fontStyle&vn.Underline||e.fontStyle&vn.Strikethrough),o=n.fontStyle&&(n.fontStyle&vn.Underline||n.fontStyle&vn.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var Qo=Ha;function $o(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>qo(e,t,n),codeToTokens:(t,n)=>Go(e,t,n)},i=Qo(qo(e,t,n,r));for(let e of xo(n))i=e.postprocess?.call(r,i,n)||i;return i}var es={light:`#333333`,dark:`#bbbbbb`},ts={light:`#fffffe`,dark:`#1e1e1e`},ns=`__shiki_resolved`;function rs(e){if(e?.[ns])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`?es.light:es.dark,n||=t.type===`light`?ts.light:ts.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,ns,{enumerable:!1,writable:!1,value:!0}),t}async function is(e){return Array.from(new Set((await Promise.all(e.filter(e=>!Xa(e)).map(async e=>await Ja(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function as(e){return(await Promise.all(e.map(async e=>Qa(e)?null:rs(await Ja(e))))).filter(e=>!!e)}var os=3,ss=!1;function cs(e,t=3){if(os&&!(typeof os==`number`&&t>os)){if(ss)throw Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}var ls=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function us(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 ls(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var ds=class extends Nr{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)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=rs(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=dn.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=us(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=Array.from(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 ls(`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))}},fs=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}},ps=0;function ms(e){ps+=1,e.warnings!==!1&&ps>=10&&ps%10==0&&console.warn(`[Shiki] ${ps} 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 ls("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(rs),i=new ds(new fs(e.engine,n),r,n,e.langAlias),a;function o(t){return us(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new ls(`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 ls(`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 is(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await as(e))}function g(){if(t)throw new ls(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--ps)}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 hs(e){e.engine||cs("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([as(e.themes||[]),is(e.langs||[]),e.engine]);return ms({...e,themes:t,langs:n,engine:r})}async function gs(e){let t=await hs(e);return{getLastGrammarState:(...e)=>Fo(t,...e),codeToTokensBase:(e,n)=>Po(t,e,n),codeToTokensWithThemes:(e,n)=>Uo(t,e,n),codeToTokens:(e,n)=>Go(t,e,n),codeToHast:(e,n)=>qo(t,e,n),codeToHtml:(e,n)=>$o(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function _s(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,Xa(n))return[];let r=t[n];if(!r)throw new Xt(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(Qa(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new Xt(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await gs({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function vs(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function ys(e,t){let n=vs(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var bs=u(_(),1),xs=y(),Ss=`modulepreload`,Cs=function(e){return`/`+e},ws={},z=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}))))}r=o(t.map(t=>{if(t=Cs(t,n),t in ws)return;ws[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Ss,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.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)})},Ts=[{id:`abap`,name:`ABAP`,import:(()=>z(()=>import(`./abap-CkQ0tsz-.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>z(()=>import(`./actionscript-3-DHm0ZfF4.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>z(()=>import(`./ada-DK_ua92Z.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>z(()=>import(`./angular-html-Bof7a2F7.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>z(()=>import(`./angular-ts-DeodVDM_.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>z(()=>import(`./apache-DXtpFu7o.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>z(()=>import(`./apex-DlnRRWpl.js`),[]))},{id:`apl`,name:`APL`,import:(()=>z(()=>import(`./apl-CVKpas4d.js`),__vite__mapDeps([6,2,1,3,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>z(()=>import(`./applescript-CShk62ad.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>z(()=>import(`./ara-CWN-FDkm.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>z(()=>import(`./asciidoc-Bg-PM9Vn.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>z(()=>import(`./asm-DKOhR24S.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>z(()=>import(`./astro-BOhQ8P2d.js`),__vite__mapDeps([10,2,3,7,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>z(()=>import(`./awk-3ibKHffv.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>z(()=>import(`./ballerina-xx7VNGxs.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>z(()=>import(`./bat-DGYsZ5wR.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>z(()=>import(`./beancount-D_ATR1UV.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>z(()=>import(`./berry-BqYMORfH.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>z(()=>import(`./bibtex-CQTBDajW.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>z(()=>import(`./bicep-CfNtxPrK.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>z(()=>import(`./bird2-C0dUPe3I.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>z(()=>import(`./blade-DHYv_YAC.js`),__vite__mapDeps([14,2,15,1,3,7,16,8,9])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>z(()=>import(`./bsl-Dx5tFn3i.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>z(()=>import(`./c-DOfzIDnq.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>z(()=>import(`./c3-BUwZ5e3k.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>z(()=>import(`./cadence-C3OKDYrr.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>z(()=>import(`./cairo-wCCQTdA9.js`),__vite__mapDeps([19,20])))},{id:`clarity`,name:`Clarity`,import:(()=>z(()=>import(`./clarity-Crxe8gSr.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>z(()=>import(`./clojure-BuzOUPMr.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>z(()=>import(`./cmake-CCpZLdLI.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>z(()=>import(`./cobol-Yq5Xjret.js`),__vite__mapDeps([21,1,2,3,9])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>z(()=>import(`./codeowners-Bo1VYpHz.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>z(()=>import(`./codeql-Db01hzHE.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>z(()=>import(`./coffee-BLpGOPrm.js`),__vite__mapDeps([22,3])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>z(()=>import(`./common-lisp-CMlJIc6Y.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>z(()=>import(`./coq-BlzBYp3f.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>z(()=>import(`./cpp-t6tCmbNr.js`).then(e=>e.n),__vite__mapDeps([23,24,25,26,16])))},{id:`crystal`,name:`Crystal`,import:(()=>z(()=>import(`./crystal-pfXgNOaY.js`),__vite__mapDeps([27,25,2,1,3,28,16])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>z(()=>import(`./csharp-kfNshAa7.js`),[]))},{id:`css`,name:`CSS`,import:(()=>z(()=>import(`./css-Dsd4PAbO.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>z(()=>import(`./csv-Dr8ri5Nd.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>z(()=>import(`./cue-jXfhyOwY.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>z(()=>import(`./cypher-CayLeiaR.js`),[]))},{id:`d`,name:`D`,import:(()=>z(()=>import(`./d-BMZQ0mAy.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>z(()=>import(`./dart-gMOEMyuz.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>z(()=>import(`./dax-C3t5LadU.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>z(()=>import(`./desktop-DmhXLwLR.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>z(()=>import(`./diff-togOXQX6.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>z(()=>import(`./docker--6N01olR.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>z(()=>import(`./dotenv-Bq930Yx8.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>z(()=>import(`./dream-maker-BiMf3DHl.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>z(()=>import(`./edge-jP85Exuo.js`),__vite__mapDeps([29,15,1,2,3,13])))},{id:`elixir`,name:`Elixir`,import:(()=>z(()=>import(`./elixir-CYXJZGs7.js`),__vite__mapDeps([30,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>z(()=>import(`./elm-CYq0GyiH.js`),__vite__mapDeps([31,24,25])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>z(()=>import(`./emacs-lisp-Dhht7he2.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>z(()=>import(`./erb-CXg22Grb.js`),__vite__mapDeps([32,1,2,3,33,25,23,24,26,16,34,35,12,13,36,37,28,8,9,38])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>z(()=>import(`./erlang-CtK0kQ6z.js`),__vite__mapDeps([39,40])))},{id:`fennel`,name:`Fennel`,import:(()=>z(()=>import(`./fennel-BExc9TZf.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>z(()=>import(`./fish-C2p-AJmZ.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>z(()=>import(`./fluent-CeYzs8Qy.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>z(()=>import(`./fortran-fixed-form-DBM4e0_k.js`),__vite__mapDeps([41,42])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>z(()=>import(`./fortran-free-form-BIQEK2Jw.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>z(()=>import(`./fsharp-CmzzGQLe.js`),__vite__mapDeps([43,40])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>z(()=>import(`./gdresource-B_wbPqHd.js`),__vite__mapDeps([44,45,46])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>z(()=>import(`./gdscript-B5JQPh_-.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>z(()=>import(`./gdshader-vVjJ_Qr8.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>z(()=>import(`./genie-DGl5rqC8.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>z(()=>import(`./gherkin-CY_VLUnD.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>z(()=>import(`./git-commit-1z4D6NzL.js`),__vite__mapDeps([47,48])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>z(()=>import(`./git-rebase-BQdokrD3.js`),__vite__mapDeps([49,28])))},{id:`gleam`,name:`Gleam`,import:(()=>z(()=>import(`./gleam-BarIG9kQ.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>z(()=>import(`./glimmer-js-DgGKK2RH.js`),__vite__mapDeps([50,2,1,3,13])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>z(()=>import(`./glimmer-ts-1FpqNG-n.js`),__vite__mapDeps([51,2,1,3,13])))},{id:`glsl`,name:`GLSL`,import:(()=>z(()=>import(`./glsl-CXnomNUS.js`).then(e=>e.n),__vite__mapDeps([24,25])))},{id:`gn`,name:`GN`,import:(()=>z(()=>import(`./gn-DhYsTPYc.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>z(()=>import(`./gnuplot-CucLlTBc.js`),[]))},{id:`go`,name:`Go`,import:(()=>z(()=>import(`./go-toi-uWvg.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>z(()=>import(`./graphql-D23lxvE7.js`).then(e=>e.n),__vite__mapDeps([34,3,35,12,13])))},{id:`groovy`,name:`Groovy`,import:(()=>z(()=>import(`./groovy-Ds4dis_k.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>z(()=>import(`./hack-CcGVZsvy.js`),__vite__mapDeps([52,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>z(()=>import(`./haml-fJ7Eo5cb.js`).then(e=>e.n),__vite__mapDeps([36,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>z(()=>import(`./handlebars-dur6589w.js`),__vite__mapDeps([53,2,1,3,38])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>z(()=>import(`./haskell-B_jvz5Po.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>z(()=>import(`./haxe-BRbuo5UO.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>z(()=>import(`./hcl-BzNUCtsK.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>z(()=>import(`./hjson-BxVo3sS2.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>z(()=>import(`./hlsl-C8Wes1nf.js`),[]))},{id:`html`,name:`HTML`,import:(()=>z(()=>import(`./html-ECCRzsaz.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>z(()=>import(`./html-derivative-DKJlSq0e.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>z(()=>import(`./http-DJ7RGsBa.js`),__vite__mapDeps([54,34,3,35,12,13,7,28,8,9])))},{id:`hurl`,name:`Hurl`,import:(()=>z(()=>import(`./hurl-BFdKYmmy.js`),__vite__mapDeps([55,56,34,3,35,12,13,8,9])))},{id:`hxml`,name:`HXML`,import:(()=>z(()=>import(`./hxml-DC4KwKt2.js`),__vite__mapDeps([57,58])))},{id:`hy`,name:`Hy`,import:(()=>z(()=>import(`./hy-dMrJKKU_.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>z(()=>import(`./imba-DG_oO8tg.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>z(()=>import(`./ini-geHw79Aj.js`),[]))},{id:`java`,name:`Java`,import:(()=>z(()=>import(`./java-Dr8eNaIm.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>z(()=>import(`./javascript-B_y55JRU.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>z(()=>import(`./jinja-CtiLe81N.js`),__vite__mapDeps([59,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>z(()=>import(`./jison-DgRjopVa.js`),__vite__mapDeps([60,3])))},{id:`json`,name:`JSON`,import:(()=>z(()=>import(`./json-Ey8lEvB9.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>z(()=>import(`./json5-CDUsNqz6.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>z(()=>import(`./jsonc-D48xcwyD.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>z(()=>import(`./jsonl-cpIYDXEe.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>z(()=>import(`./jsonnet-Da1lhszN.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>z(()=>import(`./jssm-B8BLrEGL.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>z(()=>import(`./jsx-Bwa-oHXT.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>z(()=>import(`./julia-B5-gQR4j.js`),__vite__mapDeps([61,23,24,25,26,16,3,20,62])))},{id:`just`,name:`Just`,import:(()=>z(()=>import(`./just-C5f3chM-.js`),__vite__mapDeps([63,3,64,2,1,16,8,9,20,33,25,23,24,26,34,35,12,13,36,37,28,38])))},{id:`kdl`,name:`KDL`,import:(()=>z(()=>import(`./kdl-B-2tSRmp.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>z(()=>import(`./kotlin-DepsEzh3.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>z(()=>import(`./kusto-BcCtXIb8.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>z(()=>import(`./latex-BYDtpdR6.js`),__vite__mapDeps([65,66,62])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>z(()=>import(`./lean-CNO9ffpX.js`),[]))},{id:`less`,name:`Less`,import:(()=>z(()=>import(`./less-Dj0T9pWC.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>z(()=>import(`./liquid-DoctsUmu.js`),__vite__mapDeps([67,2,1,3,7])))},{id:`llvm`,name:`LLVM IR`,import:(()=>z(()=>import(`./llvm-DbV9b66l.js`),[]))},{id:`log`,name:`Log file`,import:(()=>z(()=>import(`./log-BMblmPyH.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>z(()=>import(`./logo-B78qMxws.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>z(()=>import(`./lua-CaWVeLFM.js`).then(e=>e.n),__vite__mapDeps([37,25])))},{id:`luau`,name:`Luau`,import:(()=>z(()=>import(`./luau-BUd8xsdE.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>z(()=>import(`./make-Ev-6cJrd.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>z(()=>import(`./markdown-CS4LI6sN.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>z(()=>import(`./marko-DGdvjOVi.js`),__vite__mapDeps([68,2,69,5,13])))},{id:`matlab`,name:`MATLAB`,import:(()=>z(()=>import(`./matlab-C0qEtAx9.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>z(()=>import(`./mdc-BMIwxGlA.js`),__vite__mapDeps([70,15,1,2,3,40,38])))},{id:`mdx`,name:`MDX`,import:(()=>z(()=>import(`./mdx-CzvnbLXb.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>z(()=>import(`./mermaid-BPquZaKt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>z(()=>import(`./mipsasm-k5DQoS6j.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>z(()=>import(`./mojo-sTTDuNnR.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>z(()=>import(`./moonbit-j5ChFtBC.js`),[]))},{id:`move`,name:`Move`,import:(()=>z(()=>import(`./move-Dj0Gmn6R.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>z(()=>import(`./narrat-DJgMz2oW.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>z(()=>import(`./nextflow-CApkvBGW.js`),__vite__mapDeps([71,72])))},{id:`nextflow-groovy`,name:`nextflow-groovy`,import:(()=>z(()=>import(`./nextflow-groovy-eDLuZ_oi.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>z(()=>import(`./nginx-B8Z5vbjm.js`),__vite__mapDeps([73,37,25])))},{id:`nim`,name:`Nim`,import:(()=>z(()=>import(`./nim-CRqyHGha.js`),__vite__mapDeps([74,25,2,24,1,3,40,8,9])))},{id:`nix`,name:`Nix`,import:(()=>z(()=>import(`./nix-CxIPS3pb.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>z(()=>import(`./nushell-GDfBmoBU.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>z(()=>import(`./objective-c-MFQ_MGUa.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>z(()=>import(`./objective-cpp-Y83LcBE7.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>z(()=>import(`./ocaml-FxYfaJxu.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>z(()=>import(`./odin-CprihY3z.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>z(()=>import(`./openscad-Bc1FbpOi.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>z(()=>import(`./pascal-Bb4d8cUL.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>z(()=>import(`./perl-eJR88W8D.js`),__vite__mapDeps([64,2,1,3,16,8,9])))},{id:`php`,name:`PHP`,import:(()=>z(()=>import(`./php-CwoMAUGt.js`),__vite__mapDeps([75,2,1,3,7,16,8,9])))},{id:`pkl`,name:`Pkl`,import:(()=>z(()=>import(`./pkl-tM25Sq0w.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>z(()=>import(`./plsql-CLEfFhSj.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>z(()=>import(`./po-CaAzdrrh.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>z(()=>import(`./polar-TG7aTGdK.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>z(()=>import(`./postcss-8kqfa9f0.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>z(()=>import(`./powerquery-CtSu1Nfd.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>z(()=>import(`./powershell-87lLBHMy.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>z(()=>import(`./prisma-Dnf694DZ.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>z(()=>import(`./prolog-C0XbHTWa.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>z(()=>import(`./proto-BZP-HLIb.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>z(()=>import(`./pug-C2JgKk_M.js`),__vite__mapDeps([76,2,1,3])))},{id:`puppet`,name:`Puppet`,import:(()=>z(()=>import(`./puppet-CJYWgYC5.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>z(()=>import(`./purescript-B95Q6BAd.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>z(()=>import(`./python-CqTCsi7P.js`),[]))},{id:`qml`,name:`QML`,import:(()=>z(()=>import(`./qml-n2KtJlY0.js`),__vite__mapDeps([77,3])))},{id:`qmldir`,name:`QML Directory`,import:(()=>z(()=>import(`./qmldir-DlIL4hls.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>z(()=>import(`./qss-BW72E0q_.js`),[]))},{id:`r`,name:`R`,import:(()=>z(()=>import(`./r-DXTlwI8p.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>z(()=>import(`./racket-CCAimEsC.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>z(()=>import(`./raku-mSuqElkM.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>z(()=>import(`./razor-CMxPhZUW.js`),__vite__mapDeps([78,79,1,2,3])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>z(()=>import(`./reg-CGwMBJ2c.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>z(()=>import(`./regexp-CBkRwpNA.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>z(()=>import(`./rel-JwrbYgX4.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>z(()=>import(`./riscv-CoYyE75b.js`),[]))},{id:`ron`,name:`RON`,import:(()=>z(()=>import(`./ron-C5wrhnmJ.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>z(()=>import(`./rosmsg-DlimTR9t.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>z(()=>import(`./rst-B5_i7k0h.js`),__vite__mapDeps([80,81,23,24,25,26,16,15,1,2,3,20,33,34,35,12,13,36,37,28,8,9,38])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>z(()=>import(`./ruby-CMWR__9J.js`),__vite__mapDeps([33,25,23,24,26,16,2,34,3,35,12,13,36,1,37,28,8,9,38])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>z(()=>import(`./rust-Cxnkxx3h.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>z(()=>import(`./sas-7mMtYio7.js`),__vite__mapDeps([82,16])))},{id:`sass`,name:`Sass`,import:(()=>z(()=>import(`./sass-DEyqUIpU.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>z(()=>import(`./scala-i3RN3yAN.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>z(()=>import(`./scheme-BcKdjYkO.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>z(()=>import(`./scss-BiPLz-fO.js`).then(e=>e.n),__vite__mapDeps([5,2])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>z(()=>import(`./sdbl-Be_XWc3n.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>z(()=>import(`./shaderlab-DXAhMdPo.js`),__vite__mapDeps([83,84])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>z(()=>import(`./shellscript-DrtBuq9e.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>z(()=>import(`./shellsession-Djk5q5V1.js`),__vite__mapDeps([85,28])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>z(()=>import(`./smalltalk-BdBlL6ks.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>z(()=>import(`./solidity-DH-yUSWc.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>z(()=>import(`./soy-JN77R1Jj.js`),__vite__mapDeps([86,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>z(()=>import(`./sparql-BdcL8cbr.js`),__vite__mapDeps([87,88])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>z(()=>import(`./splunk-CIjc4kxs.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>z(()=>import(`./sql-C4-fSzhL.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>z(()=>import(`./ssh-config-BKVd4drG.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>z(()=>import(`./stata-Bwyd-bAF.js`),__vite__mapDeps([89,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>z(()=>import(`./stylus-tqAsmugv.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>z(()=>import(`./surrealql-D3lvM65W.js`),__vite__mapDeps([90,3])))},{id:`svelte`,name:`Svelte`,import:(()=>z(()=>import(`./svelte-CAIdnjGH.js`),__vite__mapDeps([91,2,3,11,13])))},{id:`swift`,name:`Swift`,import:(()=>z(()=>import(`./swift-CdDBQ3_Z.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>z(()=>import(`./system-verilog-CBqEY-9v.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>z(()=>import(`./systemd-khRP5zwK.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>z(()=>import(`./talonscript-D_lneH-6.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>z(()=>import(`./tasl-CLymawGe.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>z(()=>import(`./tcl-BRY1S87U.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>z(()=>import(`./templ-C9M2pJgR.js`),__vite__mapDeps([92,2,93,3])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>z(()=>import(`./terraform-BqohMo2f.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>z(()=>import(`./tex-CQHrEpwV.js`),__vite__mapDeps([66,62])))},{id:`toml`,name:`TOML`,import:(()=>z(()=>import(`./toml-C4c85Lwg.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>z(()=>import(`./ts-tags-DntjwYRw.js`),__vite__mapDeps([94,2,24,25,1,3,16,13,8,9])))},{id:`tsv`,name:`TSV`,import:(()=>z(()=>import(`./tsv-DsZq9HBQ.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>z(()=>import(`./tsx-5cx08qAW.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>z(()=>import(`./turtle-Dpr8zLlw.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>z(()=>import(`./twig-CGnhH5-h.js`),__vite__mapDeps([95,2,3,75,1,7,16,8,9,20,33,25,23,24,26,34,35,12,13,36,37,28,38,5])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>z(()=>import(`./typescript-CZ1tQAFx.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>z(()=>import(`./typespec-DcqgATB-.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>z(()=>import(`./typst-CeVxmuPg.js`),[]))},{id:`v`,name:`V`,import:(()=>z(()=>import(`./v-C2Qsh2-1.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>z(()=>import(`./vala-CvZ3yL7c.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>z(()=>import(`./vb-B_p4qDw4.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>z(()=>import(`./verilog-D8MGjxD7.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>z(()=>import(`./vhdl-MLyYh_Gz.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>z(()=>import(`./viml-BuYIArcz.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>z(()=>import(`./vue-CAIHubmq.js`),__vite__mapDeps([96,2,15,1,3,7,13])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>z(()=>import(`./vue-html-sTbSU39P.js`),__vite__mapDeps([97,3])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>z(()=>import(`./vue-vine-DItbW504.js`),__vite__mapDeps([98,2,3,69,11,5,99])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>z(()=>import(`./vyper-CNqG09-_.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>z(()=>import(`./wasm-BsQDV7Y0.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>z(()=>import(`./wenyan-BmOQge13.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>z(()=>import(`./wgsl-CgWrmvIg.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>z(()=>import(`./wikitext-DkwckXCk.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>z(()=>import(`./wit-CtyVFGe7.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>z(()=>import(`./wolfram-CXE4FrKz.js`),[]))},{id:`xml`,name:`XML`,import:(()=>z(()=>import(`./xml-Ddf2Mf3j.js`).then(e=>e.n),__vite__mapDeps([8,9])))},{id:`xsl`,name:`XSL`,import:(()=>z(()=>import(`./xsl-7PaMftNb.js`),__vite__mapDeps([100,8,9])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>z(()=>import(`./yaml-oGZsxgqT.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>z(()=>import(`./zenscript-DH15wJt0.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>z(()=>import(`./zig-CqXN9brD.js`),[]))}],Es=Object.fromEntries(Ts.map(e=>[e.id,e.import])),Ds=Object.fromEntries(Ts.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Os={...Es,...Ds},ks=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>z(()=>import(`./andromeeda-D2ccw8v4.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>z(()=>import(`./aurora-x-DpaEirL8.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>z(()=>import(`./ayu-dark-ursiSH5k.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>z(()=>import(`./ayu-light-DMjlrKmx.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>z(()=>import(`./ayu-mirage-DZEMb75h.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>z(()=>import(`./catppuccin-frappe-CMnRXVZP.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>z(()=>import(`./catppuccin-latte-CqhXSjCC.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>z(()=>import(`./catppuccin-macchiato-B6kneE0C.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>z(()=>import(`./catppuccin-mocha-CP8YZpvj.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>z(()=>import(`./dark-plus-B__q47Nr.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>z(()=>import(`./dracula-CBkSghcw.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>z(()=>import(`./dracula-soft-CCSYeoxL.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>z(()=>import(`./everforest-dark-NqSz4oHS.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>z(()=>import(`./everforest-light-a3Yzs_lT.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>z(()=>import(`./github-dark-ClO4AStc.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>z(()=>import(`./github-dark-default-CM0dPco8.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>z(()=>import(`./github-dark-dimmed-Cb6xxpXY.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>z(()=>import(`./github-dark-high-contrast-BpYtx2-M.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>z(()=>import(`./github-light-CeOVFgf_.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>z(()=>import(`./github-light-default-BmnCWL6x.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>z(()=>import(`./github-light-high-contrast-rpagNF5O.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>z(()=>import(`./gruvbox-dark-hard-aPiW8pQh.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>z(()=>import(`./gruvbox-dark-medium-2HJCvzsS.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>z(()=>import(`./gruvbox-dark-soft-Da97ODX9.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>z(()=>import(`./gruvbox-light-hard-BXlEipFe.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>z(()=>import(`./gruvbox-light-medium-Cun-GjGk.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>z(()=>import(`./gruvbox-light-soft-Bd3qiiSw.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>z(()=>import(`./horizon-D54PjLAY.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`dark`,import:(()=>z(()=>import(`./horizon-bright-D9RccdIr.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>z(()=>import(`./houston-CMu1N_4K.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>z(()=>import(`./kanagawa-dragon-2Sk8Rx83.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>z(()=>import(`./kanagawa-lotus-CQVSWfJp.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>z(()=>import(`./kanagawa-wave-BKWNioLX.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>z(()=>import(`./laserwave-BUqkO46F.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>z(()=>import(`./light-plus-C9Hnuc1T.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>z(()=>import(`./material-theme-5rA1zn0D.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>z(()=>import(`./material-theme-darker-DGOEiL65.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>z(()=>import(`./material-theme-lighter-CULfFRX0.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>z(()=>import(`./material-theme-ocean-LQZ9CleP.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>z(()=>import(`./material-theme-palenight-Di_f5oks.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>z(()=>import(`./min-dark-rkuIbtJV.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>z(()=>import(`./min-light-Dj_HOGsr.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>z(()=>import(`./monokai-D5p-u2ij.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>z(()=>import(`./night-owl-CEdtPl3A.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>z(()=>import(`./night-owl-light-GdSldewm.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>z(()=>import(`./nord-3WFAz5H9.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>z(()=>import(`./one-dark-pro-BB6mpmmA.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>z(()=>import(`./one-light-BYLoxNtg.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>z(()=>import(`./plastic-D3k2Xp_5.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>z(()=>import(`./poimandres-bPTvT4Da.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>z(()=>import(`./red-C-DA4yBI.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>z(()=>import(`./rose-pine-DlrMPYYd.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>z(()=>import(`./rose-pine-dawn-DBHFtZD2.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>z(()=>import(`./rose-pine-moon-BBfrpe5q.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>z(()=>import(`./slack-dark-3PDtm74m.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>z(()=>import(`./slack-ochin-CwiuFRJD.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>z(()=>import(`./snazzy-light-Dyqc8Is2.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>z(()=>import(`./solarized-dark-DZiTscIX.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>z(()=>import(`./solarized-light-DBcfxrfG.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>z(()=>import(`./synthwave-84-CbbRs73K.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>z(()=>import(`./tokyo-night-BWUONxad.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>z(()=>import(`./vesper-DossXiE1.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>z(()=>import(`./vitesse-black-C3kc1227.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>z(()=>import(`./vitesse-dark-kWOu5V36.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>z(()=>import(`./vitesse-light-DMtiL8bK.js`),[]))}].map(e=>[e.id,e.import])),As=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function js(){return 2147483648}function Ms(){return typeof performance<`u`?performance.now():Date.now()}var Ns=(e,t)=>e+(t-e%t)%t;async function Ps(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=js();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,Ns(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:Ms,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 Fs=Object.defineProperty,Is=(e,t,n)=>t in e?Fs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ls=(e,t,n)=>Is(e,typeof t==`symbol`?t:t+``,n),Rs=null;function zs(e){throw new As(e.UTF8ToString(e.getLastOnigError()))}var Bs=class e{constructor(t){Ls(this,`utf16Length`),Ls(this,`utf8Length`),Ls(this,`utf16Value`),Ls(this,`utf8Value`),Ls(this,`utf16OffsetToUtf8`),Ls(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)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Vs=class e{constructor(t){if(Ls(this,`id`,++e.LAST_ID),Ls(this,`_onigBinding`),Ls(this,`content`),Ls(this,`utf16Length`),Ls(this,`utf8Length`),Ls(this,`utf16OffsetToUtf8`),Ls(this,`utf8OffsetToUtf16`),Ls(this,`ptr`),!Rs)throw new As(`Must invoke loadWasm first.`);this._onigBinding=Rs,this.content=t;let n=new Bs(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=Rs.omalloc(1e4),e._sharedPtrInUse=!0,Rs.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(Rs)}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)}};Ls(Vs,`LAST_ID`,0),Ls(Vs,`_sharedPtr`,0),Ls(Vs,`_sharedPtrInUse`,!1);var Hs=Vs,Us=class{constructor(e){if(Ls(this,`_onigBinding`),Ls(this,`_ptr`),!Rs)throw new As(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Bs(e[r]);t[r]=i.createString(Rs),n[r]=i.utf8Length}let r=Rs.omalloc(4*e.length);Rs.HEAPU32.set(t,r/4);let i=Rs.omalloc(4*e.length);Rs.HEAPU32.set(n,i/4);let a=Rs.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)Rs.ofree(t[n]);Rs.ofree(i),Rs.ofree(r),a===0&&zs(Rs),this._onigBinding=Rs,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 Hs(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 Ws(e){return typeof e.instantiator==`function`}function Gs(e){return typeof e.default==`function`}function Ks(e){return e.data!==void 0}function qs(e){return typeof Response<`u`&&e instanceof Response}function Js(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 Ys;function Xs(e){if(Ys)return Ys;async function t(){Rs=await Ps(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Ws(n)?n=await n.instantiator(t):Gs(n)?n=await n.default(t):(Ks(n)&&(n=n.data),qs(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Qs(n)(t):await $s(n)(t):Js(n)||n instanceof WebAssembly.Module?n=await Zs(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Zs(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Ys=t(),Ys}function Zs(e){return t=>WebAssembly.instantiate(e,t)}function Qs(e){return t=>WebAssembly.instantiateStreaming(e,t)}function $s(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function ec(e){return e&&await Xs(e),{createScanner(e){return new Us(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Hs(e)}}}var tc=_s({langs:Os,themes:ks,engine:()=>ec(z(()=>import(`./wasm-D_MQmneJ.js`),[]))}),{codeToHtml:nc,codeToHast:rc,codeToTokens:ic,codeToTokensBase:eee,codeToTokensWithThemes:ac,getSingletonHighlighter:oc,getLastGrammarState:sc}=ys(tc,{guessEmbeddedLanguages:no});function cc(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function lc(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var uc=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),dc=String.raw;function fc(e,t){if(e==null)throw Error(t??`Value expected`);return e}var pc=dc`\[\^?`,mc=`c.? | C(?:-.?)?|${dc`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${dc`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${dc`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${dc`o\{[^\}]*\}?`}|${dc`\d{1,3}`}`,hc=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,gc=new RegExp(dc`
|
|
22
22
|
\\ (?:
|
|
23
23
|
${mc}
|
|
24
24
|
| [gk]<[^>]*>?
|
|
@@ -1416,7 +1416,7 @@ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHid
|
|
|
1416
1416
|
|
|
1417
1417
|
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return L.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},fve=`DialogDescriptionWarning`,pve=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${aN(fve).contentName}}.`;return L.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},oN=BM,sN=HM,cN=GM,lN=qM,uN=YM,dN=QM,fN=eN,pN=nN;function mve(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var mN=L.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:`bottom`,shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),hN=()=>{let e=L.useContext(mN);if(!e)throw Error(`useDrawerContext must be used within a Drawer.Root`);return e};mve(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
1418
1418
|
[data-state=closed]
|
|
1419
|
-
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function hve(){let e=navigator.userAgent;return typeof window<`u`&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function gve(){return vN(/^Mac/)}function _ve(){return vN(/^iPhone/)}function gN(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function vve(){return vN(/^iPad/)||gve()&&navigator.maxTouchPoints>1}function _N(){return _ve()||vve()}function vN(e){return typeof window<`u`&&window.navigator!=null?e.test(window.navigator.platform):void 0}var yve=24,bve=typeof window<`u`?L.useLayoutEffect:L.useEffect;function yN(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}var bN=typeof document<`u`&&window.visualViewport;function xN(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function SN(e){for(xN(e)&&(e=e.parentElement);e&&!xN(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}var xve=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]),CN=0,wN;function Sve(e={}){let{isDisabled:t}=e;bve(()=>{if(!t)return CN++,CN===1&&_N()&&(wN=Cve()),()=>{CN--,CN===0&&wN?.()}},[t])}function Cve(){let e,t=0,n=n=>{e=SN(n.target),!(e===document.documentElement&&e===document.body)&&(t=n.changedTouches[0].pageY)},r=n=>{if(!e||e===document.documentElement||e===document.body){n.preventDefault();return}let r=n.changedTouches[0].pageY,i=e.scrollTop,a=e.scrollHeight-e.clientHeight;a!==0&&((i<=0&&r>t||i>=a&&r<t)&&n.preventDefault(),t=r)},i=e=>{let t=e.target;DN(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform=`translateY(-2000px)`,t.focus(),requestAnimationFrame(()=>{t.style.transform=``}))},a=e=>{let t=e.target;DN(t)&&(t.style.transform=`translateY(-2000px)`,requestAnimationFrame(()=>{t.style.transform=``,bN&&(bN.height<window.innerHeight?requestAnimationFrame(()=>{EN(t)}):bN.addEventListener(`resize`,()=>EN(t),{once:!0}))}))},o=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,l=yN(wve(document.documentElement,`paddingRight`,`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let u=yN(TN(document,`touchstart`,n,{passive:!1,capture:!0}),TN(document,`touchmove`,r,{passive:!1,capture:!0}),TN(document,`touchend`,i,{passive:!1,capture:!0}),TN(document,`focus`,a,!0),TN(window,`scroll`,o));return()=>{l(),u(),window.scrollTo(s,c)}}function wve(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function TN(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function EN(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=SN(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+yve&&(t.scrollTop+=r-n)}e=t.parentElement}}function DN(e){return e instanceof HTMLInputElement&&!xve.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function Tve(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function Eve(...e){return t=>e.forEach(e=>Tve(e,t))}function ON(...e){return L.useCallback(Eve(...e),e)}var kN=new WeakMap;function AN(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([t,n])=>{if(t.startsWith(`--`)){e.style.setProperty(t,n);return}r[t]=e.style[t],e.style[t]=n}),!n&&kN.set(e,r)}function Dve(e,t){if(!e||!(e instanceof HTMLElement))return;let n=kN.get(e);n&&(e.style[t]=n[t])}var jN=e=>{switch(e){case`top`:case`bottom`:return!0;case`left`:case`right`:return!1;default:return e}};function MN(e,t){if(!e)return null;let n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform,i=r.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(`, `)[jN(t)?13:12]):(i=r.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(`, `)[jN(t)?5:4]):null)}function Ove(e){return 8*(Math.log(e+1)-2)}function NN(e,t){if(!e)return()=>{};let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}var PN={DURATION:.5,EASE:[.32,.72,0,1]},FN=.4,kve=.25,Ave=100,IN=8,LN=16,RN=26,zN=`vaul-dragging`;function BN(e){let t=L.useRef(e);return L.useEffect(()=>{t.current=e}),L.useMemo(()=>(...e)=>t.current==null?void 0:t.current.call(t,...e),[])}function jve({defaultProp:e,onChange:t}){let n=L.useState(e),[r]=n,i=L.useRef(r),a=BN(t);return L.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}function VN({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=jve({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=BN(n);return[o,L.useCallback(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function Mve({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:i,fadeFromIndex:a,onSnapPointChange:o,direction:s=`bottom`,container:c,snapToSequentialPoint:l}){let[u,d]=VN({prop:e,defaultProp:n?.[0],onChange:t}),[f,p]=L.useState(typeof window<`u`?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);L.useEffect(()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let m=L.useMemo(()=>u===n?.[n.length-1]||null,[n,u]),h=L.useMemo(()=>n?.findIndex(e=>e===u)??null,[n,u]),g=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===u||!n,_=L.useMemo(()=>{let e=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<`u`?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};return n?.map(t=>{let n=typeof t==`string`,r=0;if(n&&(r=parseInt(t,10)),jN(s)){let i=n?r:f?t*e.height:0;return f?s===`bottom`?e.height-i:-e.height+i:i}let i=n?r:f?t*e.width:0;return f?s===`right`?e.width-i:-e.width+i:i})??[]},[n,f,c]),v=L.useMemo(()=>h===null?null:_?.[h],[_,h]),y=L.useCallback(e=>{let t=_?.findIndex(t=>t===e)??null;o(t),AN(r.current,{transition:`transform ${PN.DURATION}s cubic-bezier(${PN.EASE.join(`,`)})`,transform:jN(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),_&&t!==_.length-1&&a!==void 0&&t!==a&&t<a?AN(i.current,{transition:`opacity ${PN.DURATION}s cubic-bezier(${PN.EASE.join(`,`)})`,opacity:`0`}):AN(i.current,{transition:`opacity ${PN.DURATION}s cubic-bezier(${PN.EASE.join(`,`)})`,opacity:`1`}),d(n?.[Math.max(t,0)])},[r.current,n,_,a,i,d]);L.useEffect(()=>{if(u||e){let t=n?.findIndex(t=>t===e||t===u)??-1;_&&t!==-1&&typeof _[t]==`number`&&y(_[t])}},[u,e,n,_,y]);function b({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:o}){if(a===void 0)return;let c=s===`bottom`||s===`right`?(v??0)-e:(v??0)+e,u=h===a-1,d=h===0,f=e>0;if(u&&AN(i.current,{transition:`opacity ${PN.DURATION}s cubic-bezier(${PN.EASE.join(`,`)})`}),!l&&r>2&&!f){o?t():y(_[0]);return}if(!l&&r>2&&f&&_&&n){y(_[n.length-1]);return}let p=_?.reduce((e,t)=>typeof e!=`number`||typeof t!=`number`?e:Math.abs(t-c)<Math.abs(e-c)?t:e),g=jN(s)?window.innerHeight:window.innerWidth;if(r>FN&&Math.abs(e)<g*.4){let e=f?1:-1;if(e>0&&m&&n){y(_[n.length-1]);return}if(d&&e<0&&o&&t(),h===null)return;y(_[h+e]);return}y(p)}function x({draggedDistance:e}){if(v===null)return;let t=s===`bottom`||s===`right`?v-e:v+e;(s===`bottom`||s===`right`)&&t<_[_.length-1]||(s===`top`||s===`left`)&&t>_[_.length-1]||AN(r.current,{transform:jN(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})}function S(e,t){if(!n||typeof h!=`number`||!_||a===void 0)return null;let r=h===a-1;if(h>=a&&t)return 0;if(r&&!t)return 1;if(!g&&!r)return null;let i=r?h+1:h-1,o=r?_[i]-_[i-1]:_[i+1]-_[i],s=e/Math.abs(o);return r?1-s:s}return{isLastSnapPoint:m,activeSnapPoint:u,shouldFade:g,getPercentageDragged:S,setActiveSnapPoint:d,activeSnapPointIndex:h,onRelease:b,onDrag:x,snapPointsOffset:_}}function Nve(){let{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:i}=hN(),a=L.useRef(null),o=(0,L.useMemo)(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-RN)/window.innerWidth}L.useEffect(()=>{if(t&&n){a.current&&clearTimeout(a.current);let t=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`);if(!t)return;r&&!i&&NN(document.body,{background:`black`}),NN(t,{transformOrigin:jN(e)?`top`:`left`,transitionProperty:`transform, border-radius`,transitionDuration:`${PN.DURATION}s`,transitionTimingFunction:`cubic-bezier(${PN.EASE.join(`,`)})`});let n=NN(t,{borderRadius:`${IN}px`,overflow:`hidden`,...jN(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),a.current=window.setTimeout(()=>{o?document.body.style.background=o:document.body.style.removeProperty(`background`)},PN.DURATION*1e3)}}},[t,n,o])}var HN=null;function Pve({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:i,noBodyStyles:a}){let[o,s]=L.useState(()=>typeof window<`u`?window.location.href:``),c=L.useRef(0),l=L.useCallback(()=>{if(gN()&&HN===null&&e&&!a){HN={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:`unset`};let{scrollX:e,innerHeight:t}=window;document.body.style.setProperty(`position`,`fixed`,`important`),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-e}px`,right:`0px`,height:`auto`}),window.setTimeout(()=>window.requestAnimationFrame(()=>{let e=t-window.innerHeight;e&&c.current>=t&&(document.body.style.top=`${-(c.current+e)}px`)}),300)}},[e]),u=L.useCallback(()=>{if(gN()&&HN!==null&&!a){let e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,HN),window.requestAnimationFrame(()=>{if(i&&o!==window.location.href){s(window.location.href);return}window.scrollTo(t,e)}),HN=null}},[o]);return L.useEffect(()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener(`scroll`,e),()=>{window.removeEventListener(`scroll`,e)}},[]),L.useEffect(()=>{if(t)return()=>{typeof document>`u`||document.querySelector(`[data-vaul-drawer]`)||u()}},[t,u]),L.useEffect(()=>{n||!r||(e?(!window.matchMedia(`(display-mode: standalone)`).matches&&l(),t||window.setTimeout(()=>{u()},500)):u())},[e,r,o,t,n,l,u]),{restorePositionSetting:u}}function UN({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:i,snapPoints:a,shouldScaleBackground:o=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=kve,scrollLockTimeout:l=Ave,dismissible:u=!0,handleOnly:d=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:m,fixed:h,modal:g=!0,onClose:_,nested:v,noBodyStyles:y=!1,direction:b=`bottom`,defaultOpen:x=!1,disablePreventScroll:S=!0,snapToSequentialPoint:C=!1,preventScrollRestoration:w=!1,repositionInputs:T=!0,onAnimationEnd:E,container:D,autoFocus:O=!1}){let[k=!1,A]=VN({defaultProp:x,prop:e,onChange:e=>{t?.(e),!e&&!v&&Ce(),setTimeout(()=>{E?.(e)},PN.DURATION*1e3),e&&!g&&typeof window<`u`&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents=`auto`}),e||(document.body.style.pointerEvents=`auto`)}}),[j,M]=L.useState(!1),[N,P]=L.useState(!1),[ee,F]=L.useState(!1),te=L.useRef(null),ne=L.useRef(null),re=L.useRef(null),ie=L.useRef(null),ae=L.useRef(null),oe=L.useRef(!1),I=L.useRef(null),se=L.useRef(0),ce=L.useRef(!1),le=L.useRef(!x),ue=L.useRef(0),de=L.useRef(null),fe=L.useRef(de.current?.getBoundingClientRect().height||0),pe=L.useRef(de.current?.getBoundingClientRect().width||0),me=L.useRef(0),{activeSnapPoint:he,activeSnapPointIndex:ge,setActiveSnapPoint:_e,onRelease:ve,snapPointsOffset:ye,onDrag:be,shouldFade:xe,getPercentageDragged:Se}=Mve({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:m,drawerRef:de,fadeFromIndex:f,overlayRef:te,onSnapPointChange:L.useCallback(e=>{a&&e===ye.length-1&&(ne.current=new Date)},[]),direction:b,container:D,snapToSequentialPoint:C});Sve({isDisabled:!k||N||!g||ee||!j||!T||!S});let{restorePositionSetting:Ce}=Pve({isOpen:k,modal:g,nested:v??!1,hasBeenOpened:j,preventScrollRestoration:w,noBodyStyles:y});function we(){return(window.innerWidth-RN)/window.innerWidth}function Te(e){!u&&!a||de.current&&!de.current.contains(e.target)||(fe.current=de.current?.getBoundingClientRect().height||0,pe.current=de.current?.getBoundingClientRect().width||0,P(!0),re.current=new Date,_N()&&window.addEventListener(`touchend`,()=>oe.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),se.current=jN(b)?e.pageY:e.pageX)}function Ee(e,t){let n=e,r=window.getSelection()?.toString(),i=de.current?MN(de.current,b):null,a=new Date;if(n.tagName===`SELECT`||n.hasAttribute(`data-vaul-no-drag`)||n.closest(`[data-vaul-no-drag]`))return!1;if(b===`right`||b===`left`)return!0;if(ne.current&&a.getTime()-ne.current.getTime()<500)return!1;if(i!==null&&(b===`bottom`?i>0:i<0))return!0;if(r&&r.length>0)return!1;if(ae.current&&a.getTime()-ae.current.getTime()<l&&i===0||t)return ae.current=a,!1;for(;n;){if(n.scrollHeight>n.clientHeight){if(n.scrollTop!==0)return ae.current=new Date,!1;if(n.getAttribute(`role`)===`dialog`)return!0}n=n.parentNode}return!0}function De(e){if(de.current&&N){let t=b===`bottom`||b===`right`?1:-1,n=(se.current-(jN(b)?e.pageY:e.pageX))*t,i=n>0,s=a&&!u&&!i;if(s&&ge===0)return;let c=Math.abs(n),l=document.querySelector(`[data-vaul-drawer-wrapper]`),d=c/(b===`bottom`||b===`top`?fe.current:pe.current),p=Se(c,i);if(p!==null&&(d=p),s&&d>=1||!oe.current&&!Ee(e.target,i))return;if(de.current.classList.add(zN),oe.current=!0,AN(de.current,{transition:`none`}),AN(te.current,{transition:`none`}),a&&be({draggedDistance:n}),i&&!a){let e=Ove(n),r=Math.min(e*-1,0)*t;AN(de.current,{transform:jN(b)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`});return}let m=1-d;if((xe||f&&ge===f-1)&&(r?.(e,d),AN(te.current,{opacity:`${m}`,transition:`none`},!0)),l&&te.current&&o){let e=Math.min(we()+d*(1-we()),1),t=8-d*8,n=Math.max(0,14-d*14);AN(l,{borderRadius:`${t}px`,transform:jN(b)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:`none`},!0)}if(!a){let e=c*t;AN(de.current,{transform:jN(b)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}}L.useEffect(()=>{window.requestAnimationFrame(()=>{le.current=!0})},[]),L.useEffect(()=>{var e;function t(){if(!de.current||!T)return;let e=document.activeElement;if(DN(e)||ce.current){let e=window.visualViewport?.height||0,t=window.innerHeight,n=t-e,r=de.current.getBoundingClientRect().height||0,i=r>t*.8;me.current||=r;let o=de.current.getBoundingClientRect().top;if(Math.abs(ue.current-n)>60&&(ce.current=!ce.current),a&&a.length>0&&ye&&ge){let e=ye[ge]||0;n+=e}if(ue.current=n,r>e||ce.current){let t=de.current.getBoundingClientRect().height,r=t;t>e&&(r=e-(i?o:RN)),h?de.current.style.height=`${t-Math.max(n,0)}px`:de.current.style.height=`${Math.max(r,e-o)}px`}else hve()||(de.current.style.height=`${me.current}px`);a&&a.length>0&&!ce.current?de.current.style.bottom=`0px`:de.current.style.bottom=`${Math.max(n,0)}px`}}return(e=window.visualViewport)==null||e.addEventListener(`resize`,t),()=>window.visualViewport?.removeEventListener(`resize`,t)},[ge,a,ye]);function Oe(e){Ae(),_?.(),e||A(!1),setTimeout(()=>{a&&_e(a[0])},PN.DURATION*1e3)}function ke(){if(!de.current)return;let e=document.querySelector(`[data-vaul-drawer-wrapper]`),t=MN(de.current,b);AN(de.current,{transform:`translate3d(0, 0, 0)`,transition:`transform ${PN.DURATION}s cubic-bezier(${PN.EASE.join(`,`)})`}),AN(te.current,{transition:`opacity ${PN.DURATION}s cubic-bezier(${PN.EASE.join(`,`)})`,opacity:`1`}),o&&t&&t>0&&k&&AN(e,{borderRadius:`${IN}px`,overflow:`hidden`,...jN(b)?{transform:`scale(${we()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:`top`}:{transform:`scale(${we()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:`left`},transitionProperty:`transform, border-radius`,transitionDuration:`${PN.DURATION}s`,transitionTimingFunction:`cubic-bezier(${PN.EASE.join(`,`)})`},!0)}function Ae(){!N||!de.current||(de.current.classList.remove(zN),oe.current=!1,P(!1),ie.current=new Date)}function je(e){if(!N||!de.current)return;de.current.classList.remove(zN),oe.current=!1,P(!1),ie.current=new Date;let t=MN(de.current,b);if(!e||!Ee(e.target,!1)||!t||Number.isNaN(t)||re.current===null)return;let n=ie.current.getTime()-re.current.getTime(),r=se.current-(jN(b)?e.pageY:e.pageX),o=Math.abs(r)/n;if(o>.05&&(F(!0),setTimeout(()=>{F(!1)},200)),a){ve({draggedDistance:r*(b===`bottom`||b===`right`?1:-1),closeDrawer:Oe,velocity:o,dismissible:u}),i?.(e,!0);return}if(b===`bottom`||b===`right`?r>0:r<0){ke(),i?.(e,!0);return}if(o>FN){Oe(),i?.(e,!1);return}let s=Math.min(de.current.getBoundingClientRect().height??0,window.innerHeight),l=Math.min(de.current.getBoundingClientRect().width??0,window.innerWidth);if(Math.abs(t)>=(b===`left`||b===`right`?l:s)*c){Oe(),i?.(e,!1);return}i?.(e,!0),ke()}L.useEffect(()=>(k&&(AN(document.documentElement,{scrollBehavior:`auto`}),ne.current=new Date),()=>{Dve(document.documentElement,`scrollBehavior`)}),[k]);function Me(e){let t=e?(window.innerWidth-LN)/window.innerWidth:1,n=e?-LN:0;I.current&&window.clearTimeout(I.current),AN(de.current,{transition:`transform ${PN.DURATION}s cubic-bezier(${PN.EASE.join(`,`)})`,transform:jN(b)?`scale(${t}) translate3d(0, ${n}px, 0)`:`scale(${t}) translate3d(${n}px, 0, 0)`}),!e&&de.current&&(I.current=setTimeout(()=>{let e=MN(de.current,b);AN(de.current,{transition:`none`,transform:jN(b)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))}function Ne(e,t){if(t<0)return;let n=(window.innerWidth-LN)/window.innerWidth,r=n+t*(1-n),i=-LN+t*LN;AN(de.current,{transform:jN(b)?`scale(${r}) translate3d(0, ${i}px, 0)`:`scale(${r}) translate3d(${i}px, 0, 0)`,transition:`none`})}function Pe(e,t){let n=jN(b)?window.innerHeight:window.innerWidth,r=t?(n-LN)/n:1,i=t?-LN:0;t&&AN(de.current,{transition:`transform ${PN.DURATION}s cubic-bezier(${PN.EASE.join(`,`)})`,transform:jN(b)?`scale(${r}) translate3d(0, ${i}px, 0)`:`scale(${r}) translate3d(${i}px, 0, 0)`})}return L.useEffect(()=>{g||window.requestAnimationFrame(()=>{document.body.style.pointerEvents=`auto`})},[g]),L.createElement(oN,{defaultOpen:x,onOpenChange:e=>{!u&&!e||(e?M(!0):Oe(!0),A(e))},open:k},L.createElement(mN.Provider,{value:{activeSnapPoint:he,snapPoints:a,setActiveSnapPoint:_e,drawerRef:de,overlayRef:te,onOpenChange:t,onPress:Te,onRelease:je,onDrag:De,dismissible:u,shouldAnimate:le,handleOnly:d,isOpen:k,isDragging:N,shouldFade:xe,closeDrawer:Oe,onNestedDrag:Ne,onNestedOpenChange:Me,onNestedRelease:Pe,keyboardIsOpen:ce,modal:g,snapPointsOffset:ye,activeSnapPointIndex:ge,direction:b,shouldScaleBackground:o,setBackgroundColorOnScale:s,noBodyStyles:y,container:D,autoFocus:O}},n))}var WN=L.forwardRef(function({...e},t){let{overlayRef:n,snapPoints:r,onRelease:i,shouldFade:a,isOpen:o,modal:s,shouldAnimate:c}=hN(),l=ON(t,n),u=r&&r.length>0;if(!s)return null;let d=L.useCallback(e=>i(e),[i]);return L.createElement(lN,{onMouseUp:d,ref:l,"data-vaul-overlay":``,"data-vaul-snap-points":o&&u?`true`:`false`,"data-vaul-snap-points-overlay":o&&a?`true`:`false`,"data-vaul-animate":c?.current?`true`:`false`,...e})});WN.displayName=`Drawer.Overlay`;var GN=L.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},i){let{drawerRef:a,onPress:o,onRelease:s,onDrag:c,keyboardIsOpen:l,snapPointsOffset:u,activeSnapPointIndex:d,modal:f,isOpen:p,direction:m,snapPoints:h,container:g,handleOnly:_,shouldAnimate:v,autoFocus:y}=hN(),[b,x]=L.useState(!1),S=ON(i,a),C=L.useRef(null),w=L.useRef(null),T=L.useRef(!1),E=h&&h.length>0;Nve();let D=(e,t,n=0)=>{if(T.current)return!0;let r=Math.abs(e.y),i=Math.abs(e.x),a=i>r,o=[`bottom`,`right`].includes(t)?1:-1;if(t===`left`||t===`right`){if(!(e.x*o<0)&&i>=0&&i<=n)return a}else if(!(e.y*o<0)&&r>=0&&r<=n)return!a;return T.current=!0,!0};L.useEffect(()=>{E&&window.requestAnimationFrame(()=>{x(!0)})},[]);function O(e){C.current=null,T.current=!1,s(e)}return L.createElement(uN,{"data-vaul-drawer-direction":m,"data-vaul-drawer":``,"data-vaul-delayed-snap-points":b?`true`:`false`,"data-vaul-snap-points":p&&E?`true`:`false`,"data-vaul-custom-container":g?`true`:`false`,"data-vaul-animate":v?.current?`true`:`false`,...r,ref:S,style:u&&u.length>0?{"--snap-point-height":`${u[d??0]}px`,...t}:t,onPointerDown:e=>{_||(r.onPointerDown==null||r.onPointerDown.call(r,e),C.current={x:e.pageX,y:e.pageY},o(e))},onOpenAutoFocus:e=>{n?.(e),y||e.preventDefault()},onPointerDownOutside:t=>{if(e?.(t),!f||t.defaultPrevented){t.preventDefault();return}l.current&&=!1},onFocusOutside:e=>{if(!f){e.preventDefault();return}},onPointerMove:e=>{if(w.current=e,_||(r.onPointerMove==null||r.onPointerMove.call(r,e),!C.current))return;let t=e.pageY-C.current.y,n=e.pageX-C.current.x,i=e.pointerType===`touch`?10:2;D({x:n,y:t},m,i)?c(e):(Math.abs(n)>i||Math.abs(t)>i)&&(C.current=null)},onPointerUp:e=>{r.onPointerUp==null||r.onPointerUp.call(r,e),C.current=null,T.current=!1,s(e)},onPointerOut:e=>{r.onPointerOut==null||r.onPointerOut.call(r,e),O(w.current)},onContextMenu:e=>{r.onContextMenu==null||r.onContextMenu.call(r,e),w.current&&O(w.current)}})});GN.displayName=`Drawer.Content`;var Fve=250,Ive=120,KN=L.forwardRef(function({preventCycle:e=!1,children:t,...n},r){let{closeDrawer:i,isDragging:a,snapPoints:o,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:l,handleOnly:u,isOpen:d,onPress:f,onDrag:p}=hN(),m=L.useRef(null),h=L.useRef(!1);function g(){if(h.current){y();return}window.setTimeout(()=>{_()},Ive)}function _(){if(a||e||h.current){y();return}if(y(),!o||o.length===0){l||i();return}if(s===o[o.length-1]&&l){i();return}let t=o.findIndex(e=>e===s);if(t===-1)return;let n=o[t+1];c(n)}function v(){m.current=window.setTimeout(()=>{h.current=!0},Fve)}function y(){m.current&&window.clearTimeout(m.current),h.current=!1}return L.createElement(`div`,{onClick:g,onPointerCancel:y,onPointerDown:e=>{u&&f(e),v()},onPointerMove:e=>{u&&p(e)},ref:r,"data-vaul-drawer-visible":d?`true`:`false`,"data-vaul-handle":``,"aria-hidden":`true`,...n},L.createElement(`span`,{"data-vaul-handle-hitarea":``,"aria-hidden":`true`},t))});KN.displayName=`Drawer.Handle`;function Lve({onDrag:e,onOpenChange:t,open:n,...r}){let{onNestedDrag:i,onNestedOpenChange:a,onNestedRelease:o}=hN();if(!i)throw Error(`Drawer.NestedRoot must be placed in another drawer`);return L.createElement(UN,{nested:!0,open:n,onClose:()=>{a(!1)},onDrag:(t,n)=>{i(t,n),e?.(t,n)},onOpenChange:e=>{e&&a(e),t?.(e)},onRelease:o,...r})}function Rve(e){let t=hN(),{container:n=t.container,...r}=e;return L.createElement(cN,{container:n,...r})}var qN={Root:UN,NestedRoot:Lve,Content:GN,Overlay:WN,Trigger:sN,Portal:Rve,Handle:KN,Close:pN,Title:dN,Description:fN},zve=`select-none`,JN=e=>B(zve,e),YN=({shouldScaleBackground:e=!1,...t})=>(0,R.jsx)(qN.Root,{shouldScaleBackground:e,...t});YN.displayName=`Drawer`;var Bve=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(qN.Trigger,{ref:n,className:JN(e),...t}));Bve.displayName=qN.Trigger.displayName;var Vve=qN.Portal;qN.Close;var XN=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(qN.Overlay,{ref:n,className:B(`fixed inset-0 z-50 bg-black/40 backdrop-blur-[1px]`,e),...t}));XN.displayName=qN.Overlay.displayName;var ZN=L.forwardRef(({className:e,children:t,...n},r)=>(0,R.jsxs)(Vve,{children:[(0,R.jsx)(XN,{}),(0,R.jsxs)(qN.Content,{ref:r,className:B(`fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85dvh] flex-col rounded-t-xl border bg-background`,e),...n,children:[(0,R.jsx)(`div`,{className:`mx-auto mt-3 mb-1 h-1 w-10 shrink-0 rounded-full bg-muted-foreground/20`}),t]})]}));ZN.displayName=`DrawerContent`;var QN=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(qN.Title,{ref:n,className:B(`text-lg font-semibold leading-none tracking-tight`,e),...t}));QN.displayName=qN.Title.displayName;var $N=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(qN.Description,{ref:n,className:B(`text-sm text-muted-foreground`,e),...t}));$N.displayName=qN.Description.displayName;function eP(e,t,n=!1){let r=E_(),[i,a]=L.useState(n),o=e!==void 0,s=o?e:i,c=L.useCallback(e=>{o||a(e),t?.(e)},[o,t]);return L.useMemo(()=>({isCompactViewport:r,open:s,onOpenChange:c}),[r,s,c])}var tP=L.forwardRef(({asChild:e,open:t,onOpenChange:n,haspopup:r,onClick:i,children:a,className:o,...s},c)=>{let l=JN(o),u=e=>{i?.(e),e.defaultPrevented||n(!t)},d={"aria-expanded":t,"aria-haspopup":r,"data-state":t?`open`:`closed`};return e?(0,R.jsx)(y_,{ref:c,onClick:u,className:l,...d,...s,children:a}):(0,R.jsx)(`button`,{ref:c,type:`button`,onClick:u,className:l,...d,...s,children:a})});tP.displayName=`MobileTrigger`;var Hve=new Set([`side`,`sideOffset`,`align`,`alignOffset`,`collisionPadding`,`collisionBoundary`,`arrowPadding`,`sticky`,`hideWhenDetached`,`avoidCollisions`,`onOpenAutoFocus`,`onCloseAutoFocus`,`onEscapeKeyDown`,`onPointerDownOutside`,`onFocusOutside`,`onInteractOutside`]);function nP(e){let t={};for(let n of Object.keys(e))Hve.has(n)||(t[n]=e[n]);return t}function rP({open:e,onOpenChange:t,srLabel:n,contentClassName:r,handleOnly:i,children:a}){return(0,R.jsx)(YN,{open:e,onOpenChange:t,handleOnly:i,children:(0,R.jsxs)(ZN,{className:r,children:[n===void 0?null:(0,R.jsx)(QN,{className:`sr-only`,children:n}),a]})})}var iP=L.createContext({isCompactViewport:!1,open:!1,onOpenChange:()=>{}});function aP(){return L.useContext(iP)}function oP({children:e,open:t,onOpenChange:n,defaultOpen:r,...i}){let a=eP(t,n,r);return a.isCompactViewport?(0,R.jsx)(iP.Provider,{value:a,children:e}):(0,R.jsx)(J_e,{open:a.open,onOpenChange:a.onOpenChange,...i,children:(0,R.jsx)(iP.Provider,{value:a,children:e})})}var sP=L.forwardRef(({asChild:e,children:t,className:n,...r},i)=>{let{isCompactViewport:a,open:o,onOpenChange:s}=aP();return a?(0,R.jsx)(tP,{ref:i,asChild:e,open:o,onOpenChange:s,haspopup:`menu`,className:n,...r,children:t}):(0,R.jsx)(Y_e,{ref:i,asChild:e,className:JN(n),...r,children:t})});sP.displayName=`DropdownMenuTrigger`;var cP=L.forwardRef(({className:e,sideOffset:t=4,children:n,mobileTitle:r,...i},a)=>{let{isCompactViewport:o,open:s,onOpenChange:c}=aP();if(o){let t=nP(i);return(0,R.jsx)(rP,{open:s,onOpenChange:c,srLabel:r??`Menu`,children:(0,R.jsx)(`div`,{ref:a,className:B(`flex flex-col gap-0.5 overflow-y-auto p-2 pb-[max(0.5rem,env(safe-area-inset-bottom))]`,e),style:{minWidth:`auto`,maxWidth:`none`,width:`auto`},...t,children:n})})}return(0,R.jsx)(X_e,{children:(0,R.jsx)(Z_e,{ref:a,sideOffset:t,className:B(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...i,children:n})})});cP.displayName=`DropdownMenuContent`;function lP(){return new Event(`select`,{cancelable:!0})}var uP=L.forwardRef(({className:e,inset:t,onSelect:n,disabled:r,textValue:i,children:a,...o},s)=>{let{isCompactViewport:c,onOpenChange:l}=aP();return c?(0,R.jsx)(`button`,{ref:s,type:`button`,role:`menuitem`,disabled:r,"aria-disabled":r||void 0,className:B(`relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-2 text-left text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground active:bg-state-active active:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0`,t&&`pl-8`,e),"data-disabled":r?``:void 0,onClick:()=>{if(r)return;let e=lP();n?.(e),e.defaultPrevented||l(!1)},children:a}):(0,R.jsx)(eve,{ref:s,className:B(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-[0.3125rem] text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0`,t&&`pl-8`,e),disabled:r,onSelect:n,textValue:i,...o,children:a})});uP.displayName=`DropdownMenuItem`;var dP=L.forwardRef(({className:e,children:t,checked:n,onSelect:r,onCheckedChange:i,disabled:a,textValue:o,...s},c)=>{let{isCompactViewport:l,onOpenChange:u}=aP();return l?(0,R.jsxs)(`button`,{ref:c,type:`button`,role:`menuitemcheckbox`,"aria-checked":n===`indeterminate`?`mixed`:n===!0,disabled:a,"aria-disabled":a||void 0,className:B(`relative flex w-full cursor-default select-none items-center rounded-sm py-2 pl-2 pr-8 text-left text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground active:bg-state-active active:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),"data-disabled":a?``:void 0,onClick:()=>{if(a)return;let e=lP();r?.(e),i?.(n===`indeterminate`?!0:!n),e.defaultPrevented||u(!1)},children:[(0,R.jsx)(`span`,{className:B(`absolute right-2 flex items-center justify-center`,L_),children:(n===!0||n===`indeterminate`)&&(0,R.jsx)(V,{name:`Check`,className:`h-3.5 w-3.5 max-md:pointer-coarse:h-5 max-md:pointer-coarse:w-5`})}),t]}):(0,R.jsxs)(tve,{ref:c,className:B(`relative flex cursor-default select-none items-center rounded-sm py-[0.3125rem] pl-2 pr-8 text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),checked:n,onSelect:r,onCheckedChange:i,disabled:a,textValue:o,...s,children:[(0,R.jsx)(`span`,{className:B(`absolute right-2 flex items-center justify-center`,L_),children:(0,R.jsx)(PM,{children:(0,R.jsx)(V,{name:`Check`,className:L_})})}),t]})});dP.displayName=`DropdownMenuCheckboxItem`;var Uve=L.forwardRef(({className:e,children:t,...n},r)=>{let{isCompactViewport:i}=aP();return i?null:(0,R.jsxs)(NM,{ref:r,className:B(`relative flex cursor-default select-none items-center rounded-sm py-[0.3125rem] pl-8 pr-2 text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[(0,R.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,R.jsx)(PM,{children:(0,R.jsx)(V,{name:`Circle`,className:`h-2 w-2 fill-current`})})}),t]})});Uve.displayName=NM.displayName;var fP=L.forwardRef(({className:e,inset:t,children:n,...r},i)=>{let{isCompactViewport:a}=aP();return a?(0,R.jsx)(`div`,{ref:i,className:B(`px-2 py-1.5 text-xs font-medium text-muted-foreground`,t&&`pl-8`,e),children:n}):(0,R.jsx)($_e,{ref:i,className:B(`px-2 py-[0.3125rem] text-xs font-medium text-muted-foreground`,t&&`pl-8`,e),...r,children:n})});fP.displayName=`DropdownMenuLabel`;var pP=L.forwardRef(({className:e,...t},n)=>{let{isCompactViewport:r}=aP();return r?(0,R.jsx)(`hr`,{ref:n,className:B(`-mx-1 my-1 h-px border-0 bg-muted`,e)}):(0,R.jsx)(nve,{ref:n,className:B(`-mx-1 my-1 h-px bg-muted`,e),...t})});pP.displayName=`DropdownMenuSeparator`;var mP=L.forwardRef(({children:e,...t},n)=>{let{isCompactViewport:r}=aP();return r?(0,R.jsx)(`div`,{ref:n,role:`group`,...t,children:e}):(0,R.jsx)(Q_e,{ref:n,...t,children:e})});mP.displayName=`DropdownMenuGroup`;var Wve=L.forwardRef(({className:e,inset:t,children:n,...r},i)=>(0,R.jsxs)(FM,{ref:i,className:B(`flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-[0.3125rem] text-xs outline-none focus:bg-state-hover focus:text-foreground data-[state=open]:bg-state-active data-[state=open]:text-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,t&&`pl-8`,e),...r,children:[n,(0,R.jsx)(V,{name:`ChevronRight`,className:`ml-auto`})]}));Wve.displayName=FM.displayName;var Gve=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(IM,{ref:n,className:B(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...t}));Gve.displayName=IM.displayName;var Kve=({className:e,...t})=>(0,R.jsx)(`span`,{className:B(`ml-auto text-xs tracking-widest opacity-60`,e),...t});Kve.displayName=`DropdownMenuShortcut`;function hP({message:e,icon:t,className:n,iconClassName:r,messageClassName:i}){return(0,R.jsxs)(`div`,{className:B(`flex items-center gap-2`,n),children:[t?(0,R.jsx)(V,{name:t,"aria-hidden":`true`,className:B(`size-4 shrink-0 text-muted-foreground/70`,r)}):null,(0,R.jsx)(`p`,{className:B(`text-xs leading-5 text-muted-foreground`,i),children:e})]})}var gP=`ContextMenu`,[qve,Jve]=lv(gP,[fj]),_P=fj(),[Yve,vP]=qve(gP),yP=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=L.useState(!1),c=_P(t),l=bv(r),u=L.useCallback(e=>{s(e),l(e)},[l]);return(0,R.jsx)(Yve,{scope:t,open:o,onOpenChange:u,modal:a,children:(0,R.jsx)(eM,{...c,dir:i,open:o,onOpenChange:u,modal:a,children:n})})};yP.displayName=gP;var bP=`ContextMenuTrigger`,xP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=vP(bP,n),o=_P(n),s=L.useRef({x:0,y:0}),c=L.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=L.useRef(0),u=L.useCallback(()=>window.clearTimeout(l.current),[]),d=e=>{s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return L.useEffect(()=>u,[u]),L.useEffect(()=>void(r&&u()),[r,u]),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(tM,{...o,virtualRef:c}),(0,R.jsx)(vv.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:sv(e.onContextMenu,e=>{u(),d(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:sv(e.onPointerDown,PP(e=>{u(),l.current=window.setTimeout(()=>d(e),700)})),onPointerMove:r?e.onPointerMove:sv(e.onPointerMove,PP(u)),onPointerCancel:r?e.onPointerCancel:sv(e.onPointerCancel,PP(u)),onPointerUp:r?e.onPointerUp:sv(e.onPointerUp,PP(u))})]})});xP.displayName=bP;var Xve=`ContextMenuPortal`,SP=e=>{let{__scopeContextMenu:t,...n}=e,r=_P(t);return(0,R.jsx)(nM,{...r,...n})};SP.displayName=Xve;var CP=`ContextMenuContent`,wP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=vP(CP,n),a=_P(n),o=L.useRef(!1);return(0,R.jsx)(rM,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});wP.displayName=CP;var Zve=`ContextMenuGroup`,Qve=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(iM,{...i,...r,ref:t})});Qve.displayName=Zve;var $ve=`ContextMenuLabel`,TP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(aM,{...i,...r,ref:t})});TP.displayName=$ve;var eye=`ContextMenuItem`,EP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(oM,{...i,...r,ref:t})});EP.displayName=eye;var tye=`ContextMenuCheckboxItem`,DP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(sM,{...i,...r,ref:t})});DP.displayName=tye;var nye=`ContextMenuRadioGroup`,rye=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(cM,{...i,...r,ref:t})});rye.displayName=nye;var iye=`ContextMenuRadioItem`,OP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(lM,{...i,...r,ref:t})});OP.displayName=iye;var aye=`ContextMenuItemIndicator`,kP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(uM,{...i,...r,ref:t})});kP.displayName=aye;var oye=`ContextMenuSeparator`,AP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(dM,{...i,...r,ref:t})});AP.displayName=oye;var sye=`ContextMenuArrow`,cye=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(fM,{...i,...r,ref:t})});cye.displayName=sye;var jP=`ContextMenuSub`,lye=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=_P(t),[s,c]=db({prop:i,defaultProp:a??!1,onChange:r,caller:jP});return(0,R.jsx)(A_e,{...o,open:s,onOpenChange:c,children:n})};lye.displayName=jP;var uye=`ContextMenuSubTrigger`,MP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(pM,{...i,...r,ref:t})});MP.displayName=uye;var dye=`ContextMenuSubContent`,NP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(mM,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});NP.displayName=dye;function PP(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var fye=yP,pye=xP,mye=SP,FP=wP,IP=TP,LP=EP,RP=DP,zP=OP,BP=kP,VP=AP,HP=MP,UP=NP,WP=fye,GP=pye,hye=L.forwardRef(({className:e,inset:t,children:n,...r},i)=>(0,R.jsxs)(HP,{ref:i,className:B(`flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-[0.3125rem] text-xs outline-none focus:bg-state-hover focus:text-foreground data-[state=open]:bg-state-active data-[state=open]:text-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,t&&`pl-8`,e),...r,children:[n,(0,R.jsx)(V,{name:`ChevronRight`,className:`ml-auto`})]}));hye.displayName=HP.displayName;var gye=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(UP,{ref:n,className:B(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...t}));gye.displayName=UP.displayName;var KP=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(mye,{children:(0,R.jsx)(FP,{ref:n,className:B(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...t})}));KP.displayName=FP.displayName;var qP=L.forwardRef(({className:e,inset:t,...n},r)=>(0,R.jsx)(LP,{ref:r,className:B(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-[0.3125rem] text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0`,t&&`pl-8`,e),...n}));qP.displayName=LP.displayName;var JP=L.forwardRef(({className:e,children:t,checked:n,...r},i)=>(0,R.jsxs)(RP,{ref:i,className:B(`relative flex cursor-default select-none items-center rounded-sm py-[0.3125rem] pl-2 pr-8 text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),checked:n,...r,children:[(0,R.jsx)(`span`,{className:B(`absolute right-2 flex items-center justify-center`,L_),children:(0,R.jsx)(BP,{children:(0,R.jsx)(V,{name:`Check`,className:L_})})}),t]}));JP.displayName=RP.displayName;var _ye=L.forwardRef(({className:e,children:t,...n},r)=>(0,R.jsxs)(zP,{ref:r,className:B(`relative flex cursor-default select-none items-center rounded-sm py-[0.3125rem] pl-8 pr-2 text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[(0,R.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,R.jsx)(BP,{children:(0,R.jsx)(V,{name:`Circle`,className:`h-2 w-2 fill-current`})})}),t]}));_ye.displayName=zP.displayName;var vye=L.forwardRef(({className:e,inset:t,...n},r)=>(0,R.jsx)(IP,{ref:r,className:B(`px-2 py-[0.3125rem] text-xs font-medium text-muted-foreground`,t&&`pl-8`,e),...n}));vye.displayName=IP.displayName;var YP=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(VP,{ref:n,className:B(`-mx-1 my-1 h-px bg-muted`,e),...t}));YP.displayName=VP.displayName;function yye({className:e,...t}){return(0,R.jsx)(`span`,{className:B(`ml-auto text-xs tracking-widest opacity-60`,e),...t})}yye.displayName=`ContextMenuShortcut`;function XP(e){return Array.isArray(e)}function bye(e){return typeof e==`object`&&!!e&&`pages`in e&&Array.isArray(e.pages)}function*ZP(e){if(e){if(XP(e)){for(let t of e)yield t;return}for(let t of e.pages)for(let e of t)yield e}}function xye(e,t){return XP(e)?t(e):{...e,pages:e.pages.map(t)}}function Sye(e){return XP(e)||bye(e)}function QP(e,t){let n=[];for(let[r,i]of e.getQueriesData({queryKey:t.queryKey}))Sye(i)&&n.push({queryKey:r,data:i});return n}function $P(e,t){for(let{queryKey:n,data:r}of QP(e,{queryKey:t.queryKey}))e.setQueryData(n,xye(r,t.mapper))}function eF(e){if(e[0]!==`threads`)return;let t=e[1];if(t!==void 0&&Cye(t))return t}function Cye(e){return!(typeof e!=`object`||!e||Array.isArray(e)||!(`archived`in e)||typeof e.archived!=`boolean`||`projectId`in e&&e.projectId!==void 0&&typeof e.projectId!=`string`||`parentThreadId`in e&&e.parentThreadId!==void 0&&typeof e.parentThreadId!=`string`||`type`in e&&e.type!==void 0&&e.type!==`manager`&&e.type!==`standard`)}function wye(e){return!(typeof e!=`object`||!e||Array.isArray(e)||!(`projectId`in e)||typeof e.projectId!=`string`||!(`kind`in e)||e.kind!==`all`&&e.kind!==`manager`&&e.kind!==`managed`&&e.kind!==`unmanaged`)}function Tye(e){if(e[0]===`threads`){if(e[1]===`archivedList`){let t=e[2];return wye(t)?t.projectId:void 0}return eF(e)?.projectId}}function tF({projectId:e,queryClient:t}){let n=[];for(let[r]of t.getQueriesData({queryKey:RO()}))Tye(r)===e&&n.push(r);return n}function Eye({environmentId:e}){return[$O(e)]}function nF({environmentId:e}){return[tk(e),sk(e),ck(e)]}function rF({environmentId:e}){return[nk(e)]}function Dye(e,t){return e[0]===`environmentWorkStatus`&&e[1]===t&&(typeof e[2]==`string`||e[2]===null)}function Oye(e,t){return Dye(e,t)&&typeof e[2]==`string`}function kye(e,t){return e[0]===`environmentGitDiff`&&e[1]===t&&(typeof e[2]==`string`||e[2]===null)&&(typeof e[3]==`string`||e[3]===null)}function Aye(e,t){return kye(e,t)&&(e[2]===`all`||e[2]===`branch_committed`)}function jye(e,{environmentId:t}){let n=[];for(let[r]of e.getQueriesData({queryKey:tk(t)}))Oye(r,t)&&n.push(ek(t,r[2]));for(let[r]of e.getQueriesData({queryKey:sk(t)}))Aye(r,t)&&n.push(ok(t,r[2],r[3]));return n}function Mye({environmentId:e}){return[...nF({environmentId:e}),...rF({environmentId:e}),RO()]}function Nye(e,t){if(t){for(let{data:n}of QP(e,{queryKey:RO()}))for(let e of ZP(n))if(e.id===t)return e}}function iF(e,t,n){e.setQueryData(BO(t),e=>e&&n(e))}function Pye(e,t){return!(!t||t.archived&&e.archivedAt==null||!t.archived&&e.archivedAt!=null||t?.projectId&&e.projectId!==t.projectId||t?.type&&e.type!==t.type||t?.parentThreadId!==void 0&&e.parentThreadId!==t.parentThreadId)}function aF(e,t){for(let{queryKey:n,data:r}of QP(e,{queryKey:RO()}))Array.isArray(r)&&Pye(t,eF(n))&&(r.some(e=>e.id===t.id)||e.setQueryData(n,[{...t,environmentBranchName:null,environmentHostId:null,runtime:t.runtime,hasPendingInteraction:!1,environmentWorkspaceDisplayKind:`other`},...r]))}var oF=()=>!0,Fye=()=>!1;function sF({queryClient:e,shouldUpdate:t,threadId:n,updater:r}){let i=e.getQueriesData({queryKey:ik(n)});for(let[n,a]of i){if(!a||!t(n))continue;let i=r(a.rows);i!==null&&e.setQueryData(n,{...a,rows:[...i]})}}function Iye(e){return e.kind===`conversation`&&e.role===`user`&&e.userRequest.kind===`steer`&&e.userRequest.status===`pending`}function Lye(e){return e?e.type===`manager`?Cme:oF:Fye}function Rye(e,t,n){sF({queryClient:e,shouldUpdate:Iye(n)?Lye(e.getQueryData(BO(t))):oF,threadId:t,updater:e=>[...e,n]})}function zye(e,t,n){sF({queryClient:e,shouldUpdate:oF,threadId:t,updater:e=>{let t=e.filter(e=>e.id!==n);return t.length===e.length?null:t}})}function Bye(e,t,n){$P(e,{queryKey:RO(),mapper:e=>e.some(e=>e.id===t)?e.map(e=>e.id===t?{...e,hasPendingInteraction:n}:e):e})}function cF({queryClient:e,queryKeys:t}){for(let n of t)e.invalidateQueries({queryKey:n})}function Vye({queryClient:e,queryKeys:t}){for(let n of t)e.refetchQueries({queryKey:n,type:`active`,predicate:e=>e.state.status===`error`&&e.state.fetchStatus===`idle`}).catch(()=>{})}var lF={"thread-created":{flush:`debounced`,dirty:[pF,mF,hF,xF]},"thread-deleted":{flush:`debounced`,dirty:[pF,mF,hF,xF]},"events-appended":{flush:`debounced`,dirty:[hF,vF]},"interactions-changed":{flush:`debounced`,dirty:[yF,wF]},"status-changed":{flush:`immediate`,dirty:[pF,mF]},"title-changed":{flush:`debounced`,dirty:[pF,mF]},"queue-changed":{flush:`debounced`,dirty:[gF,_F]},"archived-changed":{flush:`debounced`,dirty:[pF,mF,xF]},"parent-changed":{flush:`debounced`,dirty:[pF,mF]},"read-state-changed":{flush:`debounced`,dirty:[SF,CF]},"manager-assignment-changed":{flush:`debounced`,dirty:[pF,mF]},"terminals-changed":{flush:`debounced`,dirty:[bF]}},Hye={"environment-created":{dirty:[TF,EF,kF]},"environment-deleted":{dirty:[TF,EF,kF]},"metadata-changed":{dirty:[TF,EF,kF]},"status-changed":{dirty:[TF,EF,kF]},"work-status-changed":{dirty:[DF]},"git-refs-changed":{dirty:[OF,kF]},"thread-storage-changed":{dirty:[AF]}},Uye={"project-created":{dirty:[jF]},"project-updated":{dirty:[jF]},"project-deleted":{dirty:[jF]},"project-sources-changed":{dirty:[MF]},"threads-changed":{dirty:[jF,xF]},"automations-changed":{dirty:[jF]},"nudges-changed":{dirty:[jF]}},uF=[NF,jF,PF,FF,IF],Wye={"host-connected":{dirty:uF},"host-disconnected":{dirty:uF}},Gye={"config-changed":{dirty:[PF,FF,IF]}};function dF({context:e,handlers:t}){for(let n of t){let t=n(e);if(t)for(let n of t)e.queryClient.invalidateQueries({queryKey:n})}}function fF(e){return e.some(e=>lF[e].flush===`immediate`)}function pF({projectId:e,queryClient:t}){return e?tF({projectId:e,queryClient:t}):[RO()]}function mF({threadId:e}){return e?[BO(e)]:[HO()]}function hF({threadId:e}){return e?[ik(e)]:[ak()]}function gF({threadId:e}){return e?[WO(e)]:[GO()]}function _F({threadId:e}){return e?[KO(e)]:[qO()]}function vF({eventTypes:e,threadId:t}){return e?.includes(`client/turn/requested`)?t?[KO(t)]:[qO()]:[]}function yF({threadId:e}){return e?[JO(e)]:[YO()]}function bF({threadId:e}){return e?[XO(e)]:[fme()]}function xF({projectId:e}){return e?[NO(e)]:[PO()]}function SF({queryClient:e,threadId:t}){t&&e.invalidateQueries({queryKey:BO(t),refetchType:`none`})}function CF({projectId:e,queryClient:t}){if(!e){t.invalidateQueries({queryKey:RO(),refetchType:`none`});return}for(let n of tF({projectId:e,queryClient:t}))t.invalidateQueries({queryKey:n,refetchType:`none`})}function wF({hasPendingInteraction:e,queryClient:t,threadId:n}){!n||e===void 0||Bye(t,n,e)}function TF(e){return Eye(e)}function EF(e){return nF(e)}function DF({environmentId:e,queryClient:t}){t.invalidateQueries({queryKey:tk(e)}),t.invalidateQueries({queryKey:ck(e)}),t.invalidateQueries({queryKey:sk(e),refetchType:`none`})}function OF({environmentId:e,queryClient:t}){return jye(t,{environmentId:e})}function kF(e){return rF(e)}function AF({getCachedThreadIdsForEnvironment:e}){let t=[];for(let n of e())t.push(ZO(n)),t.push(QO(n));return t}function jF(){return[jO()]}function MF({projectId:e}){let t=[jO(),fk()];return e?[...t,FO(e),LO(e)]:[...t,MO(),IO()]}function NF(){return[OO(),AO()]}function PF(){return[lk()]}function FF(){return[dk()]}function IF(){return[VO()]}function LF({environmentId:e,queryClient:t}){e&&(t.removeQueries({queryKey:tk(e)}),t.removeQueries({queryKey:sk(e)}),t.removeQueries({queryKey:ck(e)}),t.removeQueries({queryKey:nk(e)}),t.removeQueries({queryKey:Ome(e)}),t.removeQueries({queryKey:ume(e)}))}function RF({environmentId:e,queryClient:t}){cF({queryClient:t,queryKeys:Mye({environmentId:e})})}function zF({environmentId:e,queryClient:t}){cF({queryClient:t,queryKeys:nF({environmentId:e})})}function BF({queryClient:e}){e.invalidateQueries({queryKey:jO()})}function VF({projectId:e,queryClient:t}){t.invalidateQueries({queryKey:jO()}),t.invalidateQueries({queryKey:FO(e)}),t.invalidateQueries({queryKey:RO()})}function HF({queryClient:e}){e.invalidateQueries({queryKey:jO()}),e.invalidateQueries({queryKey:RO()})}function UF({projectId:e,queryClient:t}){if(t.invalidateQueries({queryKey:jO()}),t.invalidateQueries({queryKey:fk()}),!e){t.invalidateQueries({queryKey:MO()}),t.invalidateQueries({queryKey:IO()});return}t.invalidateQueries({queryKey:FO(e)}),t.invalidateQueries({queryKey:LO(e)})}function WF({queryClient:e}){e.refetchQueries({queryKey:RO(),type:`active`})}function GF({queryClient:e}){e.invalidateQueries({queryKey:jO()}),iI({queryClient:e})}function KF({queryClient:e}){e.invalidateQueries({queryKey:RO()})}function qF({queryClient:e,threadId:t}){e.invalidateQueries({queryKey:BO(t)}),e.invalidateQueries({queryKey:RO()})}function JF({projectId:e,queryClient:t}){t.invalidateQueries({queryKey:NO(e)})}function YF({queryClient:e}){e.invalidateQueries({queryKey:PO()})}function XF({queryClient:e}){e.invalidateQueries({queryKey:jO()}),YF({queryClient:e}),e.invalidateQueries({queryKey:RO()})}function ZF({queryClient:e,threadId:t}){e.invalidateQueries({queryKey:BO(t)}),e.invalidateQueries({queryKey:WO(t)}),e.invalidateQueries({queryKey:KO(t)})}function QF({queryClient:e,threadId:t}){ZF({queryClient:e,threadId:t}),e.invalidateQueries({queryKey:ik(t)}),e.invalidateQueries({queryKey:RO()})}function $F({queryClient:e,threadId:t}){e.invalidateQueries({queryKey:UO(t)}),e.invalidateQueries({queryKey:KO(t)})}function eI({queryClient:e,threadId:t}){$F({queryClient:e,threadId:t}),e.invalidateQueries({queryKey:BO(t)}),e.invalidateQueries({queryKey:ik(t)}),e.invalidateQueries({queryKey:RO()})}function tI({queryClient:e,threadId:t}){e.invalidateQueries({queryKey:BO(t)}),e.invalidateQueries({queryKey:RO()})}function nI({queryClient:e,threadId:t}){e.invalidateQueries({queryKey:JO(t)}),e.invalidateQueries({queryKey:ik(t)}),e.invalidateQueries({queryKey:BO(t)}),e.invalidateQueries({queryKey:RO()})}function rI({queryClient:e,threadId:t}){e.removeQueries({queryKey:BO(t)}),e.removeQueries({queryKey:ik(t)}),e.removeQueries({queryKey:UO(t)}),e.removeQueries({queryKey:WO(t)}),e.removeQueries({queryKey:KO(t)}),e.removeQueries({queryKey:ZO(t)}),e.removeQueries({queryKey:QO(t)})}function iI({queryClient:e}){e.invalidateQueries({queryKey:RO()})}function aI({queryClient:e}){cF({queryClient:e,queryKeys:lI()})}function oI({queryClient:e}){Vye({queryClient:e,queryKeys:lI()})}function sI({queryClient:e}){e.invalidateQueries({queryKey:OO()}),e.invalidateQueries({queryKey:AO()})}function cI({queryClient:e}){sI({queryClient:e}),e.invalidateQueries({queryKey:jO()})}function lI(){return[OO(),AO(),jO(),MO(),RO(),HO(),VO(),ak(),GO(),YO(),dme(),mme(),gme(),vme(),yme(),xme(),wme(),Dme(),fk(),lk(),dk()]}var uI=[`hireProjectManager`];function dI(){let e=et();return bt({meta:{errorMessage:`Failed to create project.`},mutationFn:e=>Gfe(e),onSuccess:()=>{BF({queryClient:e})}})}function fI(){let e=et();return bt({mutationKey:uI,meta:{errorMessage:`Failed to hire manager.`,showErrorToast:!1},mutationFn:({projectId:e,name:t,providerId:n,model:r,reasoningLevel:i,environment:a})=>Kfe(e,{name:t,...n?{providerId:n}:{},...r?{model:r}:{},...i?{reasoningLevel:i}:{},environment:a}),onSuccess:t=>{e.setQueryData(BO(t.id),t),aF(e,t),GF({queryClient:e})}})}function pI(){let e=et();return bt({meta:{errorMessage:`Failed to update project.`},mutationFn:({id:e,...t})=>qfe(e,t),onSuccess:(t,n)=>{VF({projectId:n.id,queryClient:e})}})}function mI(){let e=et();return bt({meta:{errorMessage:`Failed to remove project.`},mutationFn:e=>Zfe(e),onSuccess:()=>{HF({queryClient:e})}})}function hI(){let e=et();return bt({meta:{errorMessage:`Failed to add local source.`},mutationFn:({projectId:e,hostId:t,path:n})=>Qfe(e,{type:`local_path`,hostId:t,path:n}),onSuccess:(t,n)=>{UF({projectId:n.projectId,queryClient:e})}})}function gI(){let e=et();return bt({meta:{errorMessage:`Failed to update local source.`},mutationFn:({projectId:e,sourceId:t,path:n})=>$fe(e,t,{type:`local_path`,path:n}),onSuccess:(t,n)=>{UF({projectId:n.projectId,queryClient:e})}})}function _I(){return bt({meta:{errorMessage:`Failed to upload attachment.`,showErrorToast:!1},mutationFn:({projectId:e,file:t})=>rpe(e,t),retry:!1})}function vI(){let[e,t]=(0,L.useState)(null),n=(0,L.useCallback)(e=>{t(e)},[]),r=(0,L.useCallback)(()=>{t(null)},[]),i=(0,L.useCallback)(e=>{e||t(null)},[]);return(0,L.useMemo)(()=>({isOpen:e!==null,onClose:r,onOpen:n,onOpenChange:i,setTarget:t,target:e}),[r,n,i,t,e])}function yI({isPending:e,submit:t}){let{localHostId:n,pickFolder:r,platform:i}=iA(),a=vI(),o=a.onClose,s=(0,L.useCallback)((r,i)=>{e||!n||t({path:r,hostId:n,target:i,closeDialog:o})},[o,e,n,t]),c=(0,L.useCallback)(t=>{if(!(e||!n)){if(r){(async()=>{let e=await r();e&&s(SE(e),t)})();return}a.onOpen(t)}},[e,n,r,a,s]),l=(0,L.useCallback)((e,t)=>{s(t,e)},[s]);return{isAvailable:n!=null,localHostId:n,openPicker:c,platform:i,projectPathDialog:a,submitProjectPath:l}}var bI=L.createContext({isCompactViewport:!1,open:!1,onOpenChange:()=>{}});function xI(){return L.useContext(bI)}function SI({children:e,open:t,onOpenChange:n,...r}){let i=eP(t,n),a=i.isCompactViewport?e:(0,R.jsx)(oN,{open:i.open,onOpenChange:i.onOpenChange,...r,children:e});return(0,R.jsx)(bI.Provider,{value:i,children:a})}var CI=L.forwardRef(({asChild:e,children:t,className:n,...r},i)=>{let{isCompactViewport:a,open:o,onOpenChange:s}=xI();return a?(0,R.jsx)(tP,{ref:i,asChild:e,open:o,onOpenChange:s,haspopup:`dialog`,className:n,...r,children:t}):(0,R.jsx)(sN,{ref:i,asChild:e,className:JN(n),...r,children:t})});CI.displayName=`DialogTrigger`;var wI=L.forwardRef(({asChild:e,onClick:t,children:n,...r},i)=>{let{isCompactViewport:a,onOpenChange:o}=xI();if(a){let a=e?y_:`button`;return(0,R.jsx)(a,{ref:i,onClick:e=>{t?.(e),e.defaultPrevented||o(!1)},...r,children:n})}return(0,R.jsx)(pN,{ref:i,asChild:e,onClick:t,...r,children:n})});wI.displayName=`DialogClose`;var TI=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(lN,{ref:n,className:B(`fixed inset-0 z-50 bg-black/40 backdrop-blur-[1px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t}));TI.displayName=lN.displayName;var EI=L.forwardRef(({className:e,children:t,...n},r)=>{let{isCompactViewport:i,open:a,onOpenChange:o}=xI();if(i){let i=nP(n);return(0,R.jsx)(rP,{open:a,onOpenChange:o,children:(0,R.jsx)(`div`,{ref:r,className:B(`grid gap-4 overflow-y-auto px-4 pt-2 pb-[max(1rem,env(safe-area-inset-bottom))]`,e),...i,children:t})})}return(0,R.jsxs)(cN,{children:[(0,R.jsx)(TI,{}),(0,R.jsxs)(uN,{ref:r,className:B(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg`,e),...n,children:[t,(0,R.jsxs)(pN,{className:`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-state-active data-[state=open]:text-foreground`,children:[(0,R.jsx)(V,{name:`X`,className:`h-4 w-4`}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})});EI.displayName=`DialogContent`;var DI=({className:e,...t})=>(0,R.jsx)(`div`,{className:B(`flex flex-col space-y-1.5 text-center sm:text-left`,e),...t});DI.displayName=`DialogHeader`;var OI=({className:e,...t})=>(0,R.jsx)(`div`,{className:B(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});OI.displayName=`DialogFooter`;var kI=L.forwardRef(({className:e,...t},n)=>{let{isCompactViewport:r}=xI();return(0,R.jsx)(r?QN:dN,{ref:n,className:B(`text-lg font-semibold leading-none tracking-tight`,e),...t})});kI.displayName=`DialogTitle`;var AI=L.forwardRef(({className:e,...t},n)=>{let{isCompactViewport:r}=xI();return(0,R.jsx)(r?$N:fN,{ref:n,className:B(`text-sm text-muted-foreground`,e),...t})});AI.displayName=fN.displayName;function jI({target:e,pending:t=!1,platform:n,onOpenChange:r,onSubmit:i}){return(0,R.jsx)(SI,{open:e!==null,onOpenChange:r,children:(0,R.jsx)(EI,{children:e?(0,R.jsx)(FI,{target:e,pending:t,platform:n,onSubmit:i},e.kind===`create`?`create`:e.projectId):null})})}function MI(e){switch(e){case`create`:return`Add project`;case`update`:return`Update project path`;case`add-source`:return`Add project source`}}function NI(e){switch(e){case`create`:return`Add project`;case`update`:return`Save path`;case`add-source`:return`Add source`}}function PI(e){let t=`/path/to/project`;return e===`wsl`?{description:`Enter an absolute WSL path to the project folder, such as /home/me/repo or /mnt/c/...`,placeholder:t}:{description:`Enter an absolute path to the project folder.`,placeholder:t}}function FI({target:e,pending:t,platform:n,onSubmit:r}){let i=(0,L.useId)(),[a,o]=(0,L.useState)(e.kind===`update`?e.currentPath:``),[s,c]=(0,L.useState)(null),l=wE(a),u=PI(n),d=e.kind===`update`&&e.currentPath||u.placeholder;return(0,L.useEffect)(()=>{c(null)},[a]),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(DI,{children:[(0,R.jsx)(kI,{children:MI(e.kind)}),(0,R.jsx)(AI,{children:u.description})]}),(0,R.jsxs)(`form`,{className:`space-y-4`,onSubmit:n=>{if(n.preventDefault(),t)return;let i=SE(a),o=CE(i);if(o){c(o);return}if(e.kind===`create`&&!wE(i)){c(`Could not derive a project name from that path.`);return}r(e,i)},children:[(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(Z_,{id:i,"aria-label":`Project path`,value:a,autoFocus:!0,disabled:t,placeholder:d,onChange:e=>{o(e.target.value)}}),e.kind===`create`&&l?(0,R.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Project name:`,` `,(0,R.jsx)(`span`,{className:`font-medium text-foreground`,children:l})]}):null,s?(0,R.jsx)(`p`,{className:`text-sm text-destructive`,children:s}):null]}),(0,R.jsx)(OI,{children:(0,R.jsx)(O_,{type:`submit`,disabled:t,children:NI(e.kind)})})]})]})}function II({target:e,pending:t,onOpenChange:n,onDelete:r}){return(0,R.jsx)(SI,{open:e!==null,onOpenChange:n,children:(0,R.jsx)(EI,{children:e?(0,R.jsx)(LI,{target:e,pending:t,onDelete:r}):null})})}function LI({target:e,pending:t,onDelete:n}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(DI,{children:[(0,R.jsx)(kI,{children:`Remove project?`}),(0,R.jsx)(AI,{children:`Remove "${e.name}" and all of its threads? This cannot be undone.`})]}),(0,R.jsx)(OI,{children:(0,R.jsx)(O_,{type:`button`,variant:`destructive`,disabled:t,onClick:()=>n(e.id),children:`Remove project`})})]})}function RI({target:e,pending:t=!1,onOpenChange:n,onRename:r}){return(0,R.jsx)(SI,{open:e!==null,onOpenChange:n,children:(0,R.jsx)(EI,{children:e?(0,R.jsx)(zI,{target:e,pending:t,onRename:r},e.id):null})})}function zI({target:e,pending:t,onRename:n}){let r=(0,L.useId)(),[i,a]=(0,L.useState)(e.currentName),[o,s]=(0,L.useState)(null);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(DI,{children:[(0,R.jsx)(kI,{children:`Rename project`}),(0,R.jsx)(AI,{children:`Choose a new name for this project.`})]}),(0,R.jsxs)(`form`,{className:`space-y-4`,onSubmit:r=>{if(r.preventDefault(),t)return;let a=i.trim();if(!a){s(`Project name cannot be empty.`);return}n(e.id,a)},children:[(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(Z_,{id:r,"aria-label":`Project name`,value:i,autoFocus:!0,autoCapitalize:`words`,autoCorrect:`off`,spellCheck:!1,disabled:t,onChange:e=>{a(e.target.value),o&&s(null)}}),o?(0,R.jsx)(`p`,{className:`text-sm text-destructive`,children:o}):null]}),(0,R.jsx)(OI,{children:(0,R.jsx)(O_,{type:`submit`,disabled:t,children:`Rename project`})})]})]})}var BI=`bb.sidebar.collapsedProjects`,VI=`bb.sidebar.collapsedManagers`,HI=Dg(BI,[],Bk(),{getOnInit:!0}),UI=Dg(VI,[],Bk(),{getOnInit:!0}),WI=(0,L.createContext)(null);function GI(){let e=(0,L.useContext)(WI);if(!e)throw Error(`useProjectActions must be used within a <ProjectActionsProvider>`);return e}function KI({children:e}){let t=$m(),n=Cg(HI),r=pI(),i=mI(),a=hI(),{mutate:o}=r,{mutate:s}=i,{mutate:c}=a,l=vI(),u=vI(),{onClose:d,onOpen:f}=l,{onClose:p,onOpen:m}=u,h=(0,L.useCallback)(({path:e,hostId:t,target:n,closeDialog:r})=>{n.kind===`add-source`&&c({projectId:n.projectId,path:e,hostId:t},{onSuccess:r})},[c]),g=yI({isPending:a.isPending,submit:h}),_=(0,L.useCallback)(e=>{f({id:e.id,currentName:e.name})},[f]),v=(0,L.useCallback)((e,t)=>{o({id:e,name:t},{onSuccess:()=>d()})},[d,o]),y=(0,L.useCallback)(e=>{m({id:e.id,name:e.name})},[m]),b=(0,L.useCallback)(e=>{s(e,{onSuccess:()=>{p(),n(t=>t.filter(t=>t!==e)),t(`/`,{replace:!0})}})},[p,s,t,n]),x=(0,L.useCallback)(e=>{g.openPicker({kind:`add-source`,projectId:e.id,projectName:e.name})},[g]),S=(0,L.useMemo)(()=>({requestRename:_,requestDelete:y,requestAddLocalPath:x}),[_,y,x]);return(0,R.jsxs)(WI.Provider,{value:S,children:[e,(0,R.jsx)(RI,{target:l.target,pending:r.isPending,onOpenChange:l.onOpenChange,onRename:v}),(0,R.jsx)(II,{target:u.target,pending:i.isPending,onOpenChange:u.onOpenChange,onDelete:b}),(0,R.jsx)(jI,{target:g.projectPathDialog.target,pending:a.isPending,platform:g.platform,onOpenChange:g.projectPathDialog.onOpenChange,onSubmit:g.submitProjectPath})]})}function qI({children:e,className:t,onSelect:n,surface:r}){return r===`context`?(0,R.jsx)(qP,{className:t,onSelect:n,children:e}):(0,R.jsx)(uP,{className:t,onSelect:n,children:e})}function JI({project:e,surface:t}){let{localHostId:n}=iA(),{requestRename:r,requestDelete:i,requestAddLocalPath:a}=GI(),o=n!=null&&!vE(e.sources,n);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(qI,{surface:t,onSelect:n=>{t===`dropdown`&&n.preventDefault(),r(e)},children:`Rename`}),o?(0,R.jsx)(qI,{surface:t,onSelect:n=>{t===`dropdown`&&n.preventDefault(),a(e)},children:`Add local path`}):null,(0,R.jsx)(qI,{surface:t,className:`text-destructive focus:text-destructive`,onSelect:n=>{t===`dropdown`&&n.preventDefault(),i(e)},children:`Remove`})]})}function YI({project:e,triggerClassName:t,align:n=`end`,onOpenChange:r}){return(0,R.jsxs)(oP,{onOpenChange:r,children:[(0,R.jsx)(sP,{asChild:!0,children:(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:B(`rounded-md p-0 text-muted-foreground`,t),"aria-label":`${e.name} actions`,title:`${e.name} actions`,onClick:e=>{e.stopPropagation()},children:(0,R.jsx)(V,{name:`MoreHorizontal`,className:j_})})}),(0,R.jsx)(cP,{align:n,className:`w-44`,children:(0,R.jsx)(JI,{project:e,surface:`dropdown`})})]})}function XI({children:e,project:t,onOpenChange:n}){return(0,R.jsxs)(WP,{onOpenChange:n,children:[(0,R.jsx)(GP,{asChild:!0,children:e}),(0,R.jsx)(KP,{"aria-label":`${t.name} actions`,className:`w-44`,children:(0,R.jsx)(JI,{project:t,surface:`context`})})]})}function ZI(e){return e.title&&e.title.trim().length>0?e.title:e.titleFallback&&e.titleFallback.trim().length>0?e.titleFallback:`Thread ${e.id.slice(0,8)}`}function QI(e){return e===`manager`?`manager`:`thread`}function $I(e){return(e.lastReadAt??0)>=e.latestAttentionAt}var eL=e=>{switch(e){case`success`:return rL;case`info`:return aL;case`warning`:return iL;case`error`:return oL;default:return null}},tL=Array(12).fill(0),nL=({visible:e,className:t})=>L.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},L.createElement(`div`,{className:`sonner-spinner`},tL.map((e,t)=>L.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),rL=L.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},L.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),iL=L.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},L.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),aL=L.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},L.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),oL=L.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},L.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),sL=L.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},L.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),L.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),cL=()=>{let[e,t]=L.useState(document.hidden);return L.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},lL=1,uL=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:lL++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=e instanceof Promise?e:e(),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],L.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(fL(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description;this.create({id:n,type:`error`,message:r,description:a})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description;this.create({id:n,type:`success`,message:r,description:a})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description;this.create({id:n,type:`error`,message:r,description:a})}}).finally(()=>{var e;i&&(this.dismiss(n),n=void 0),(e=t.finally)==null||e.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||lL++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},dL=(e,t)=>{let n=t?.id||lL++;return uL.addToast({title:e,...t,id:n}),n},fL=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,pL=Object.assign(dL,{success:uL.success,info:uL.info,warning:uL.warning,error:uL.error,custom:uL.custom,message:uL.message,promise:uL.promise,dismiss:uL.dismiss,loading:uL.loading},{getHistory:()=>uL.toasts,getToasts:()=>uL.getActiveToasts()});function mL(e,{insertAt:t}={}){if(!e||typeof document>`u`)return;let n=document.head||document.getElementsByTagName(`head`)[0],r=document.createElement(`style`);r.type=`text/css`,t===`top`&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}mL(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
1419
|
+
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function hve(){let e=navigator.userAgent;return typeof window<`u`&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function gve(){return vN(/^Mac/)}function _ve(){return vN(/^iPhone/)}function gN(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function vve(){return vN(/^iPad/)||gve()&&navigator.maxTouchPoints>1}function _N(){return _ve()||vve()}function vN(e){return typeof window<`u`&&window.navigator!=null?e.test(window.navigator.platform):void 0}var yve=24,bve=typeof window<`u`?L.useLayoutEffect:L.useEffect;function yN(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}var bN=typeof document<`u`&&window.visualViewport;function xN(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function SN(e){for(xN(e)&&(e=e.parentElement);e&&!xN(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}var xve=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]),CN=0,wN;function Sve(e={}){let{isDisabled:t}=e;bve(()=>{if(!t)return CN++,CN===1&&_N()&&(wN=Cve()),()=>{CN--,CN===0&&wN?.()}},[t])}function Cve(){let e,t=0,n=n=>{e=SN(n.target),!(e===document.documentElement&&e===document.body)&&(t=n.changedTouches[0].pageY)},r=n=>{if(!e||e===document.documentElement||e===document.body){n.preventDefault();return}let r=n.changedTouches[0].pageY,i=e.scrollTop,a=e.scrollHeight-e.clientHeight;a!==0&&((i<=0&&r>t||i>=a&&r<t)&&n.preventDefault(),t=r)},i=e=>{let t=e.target;DN(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform=`translateY(-2000px)`,t.focus(),requestAnimationFrame(()=>{t.style.transform=``}))},a=e=>{let t=e.target;DN(t)&&(t.style.transform=`translateY(-2000px)`,requestAnimationFrame(()=>{t.style.transform=``,bN&&(bN.height<window.innerHeight?requestAnimationFrame(()=>{EN(t)}):bN.addEventListener(`resize`,()=>EN(t),{once:!0}))}))},o=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,l=yN(wve(document.documentElement,`paddingRight`,`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let u=yN(TN(document,`touchstart`,n,{passive:!1,capture:!0}),TN(document,`touchmove`,r,{passive:!1,capture:!0}),TN(document,`touchend`,i,{passive:!1,capture:!0}),TN(document,`focus`,a,!0),TN(window,`scroll`,o));return()=>{l(),u(),window.scrollTo(s,c)}}function wve(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function TN(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function EN(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=SN(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+yve&&(t.scrollTop+=r-n)}e=t.parentElement}}function DN(e){return e instanceof HTMLInputElement&&!xve.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function Tve(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function Eve(...e){return t=>e.forEach(e=>Tve(e,t))}function ON(...e){return L.useCallback(Eve(...e),e)}var kN=new WeakMap;function AN(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([t,n])=>{if(t.startsWith(`--`)){e.style.setProperty(t,n);return}r[t]=e.style[t],e.style[t]=n}),!n&&kN.set(e,r)}function Dve(e,t){if(!e||!(e instanceof HTMLElement))return;let n=kN.get(e);n&&(e.style[t]=n[t])}var jN=e=>{switch(e){case`top`:case`bottom`:return!0;case`left`:case`right`:return!1;default:return e}};function MN(e,t){if(!e)return null;let n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform,i=r.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(`, `)[jN(t)?13:12]):(i=r.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(`, `)[jN(t)?5:4]):null)}function Ove(e){return 8*(Math.log(e+1)-2)}function NN(e,t){if(!e)return()=>{};let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}var PN={DURATION:.5,EASE:[.32,.72,0,1]},FN=.4,kve=.25,Ave=100,IN=8,LN=16,RN=26,zN=`vaul-dragging`;function BN(e){let t=L.useRef(e);return L.useEffect(()=>{t.current=e}),L.useMemo(()=>(...e)=>t.current==null?void 0:t.current.call(t,...e),[])}function jve({defaultProp:e,onChange:t}){let n=L.useState(e),[r]=n,i=L.useRef(r),a=BN(t);return L.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}function VN({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=jve({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=BN(n);return[o,L.useCallback(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function Mve({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:i,fadeFromIndex:a,onSnapPointChange:o,direction:s=`bottom`,container:c,snapToSequentialPoint:l}){let[u,d]=VN({prop:e,defaultProp:n?.[0],onChange:t}),[f,p]=L.useState(typeof window<`u`?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);L.useEffect(()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let m=L.useMemo(()=>u===n?.[n.length-1]||null,[n,u]),h=L.useMemo(()=>n?.findIndex(e=>e===u)??null,[n,u]),g=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===u||!n,_=L.useMemo(()=>{let e=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<`u`?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};return n?.map(t=>{let n=typeof t==`string`,r=0;if(n&&(r=parseInt(t,10)),jN(s)){let i=n?r:f?t*e.height:0;return f?s===`bottom`?e.height-i:-e.height+i:i}let i=n?r:f?t*e.width:0;return f?s===`right`?e.width-i:-e.width+i:i})??[]},[n,f,c]),v=L.useMemo(()=>h===null?null:_?.[h],[_,h]),y=L.useCallback(e=>{let t=_?.findIndex(t=>t===e)??null;o(t),AN(r.current,{transition:`transform ${PN.DURATION}s cubic-bezier(${PN.EASE.join(`,`)})`,transform:jN(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),_&&t!==_.length-1&&a!==void 0&&t!==a&&t<a?AN(i.current,{transition:`opacity ${PN.DURATION}s cubic-bezier(${PN.EASE.join(`,`)})`,opacity:`0`}):AN(i.current,{transition:`opacity ${PN.DURATION}s cubic-bezier(${PN.EASE.join(`,`)})`,opacity:`1`}),d(n?.[Math.max(t,0)])},[r.current,n,_,a,i,d]);L.useEffect(()=>{if(u||e){let t=n?.findIndex(t=>t===e||t===u)??-1;_&&t!==-1&&typeof _[t]==`number`&&y(_[t])}},[u,e,n,_,y]);function b({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:o}){if(a===void 0)return;let c=s===`bottom`||s===`right`?(v??0)-e:(v??0)+e,u=h===a-1,d=h===0,f=e>0;if(u&&AN(i.current,{transition:`opacity ${PN.DURATION}s cubic-bezier(${PN.EASE.join(`,`)})`}),!l&&r>2&&!f){o?t():y(_[0]);return}if(!l&&r>2&&f&&_&&n){y(_[n.length-1]);return}let p=_?.reduce((e,t)=>typeof e!=`number`||typeof t!=`number`?e:Math.abs(t-c)<Math.abs(e-c)?t:e),g=jN(s)?window.innerHeight:window.innerWidth;if(r>FN&&Math.abs(e)<g*.4){let e=f?1:-1;if(e>0&&m&&n){y(_[n.length-1]);return}if(d&&e<0&&o&&t(),h===null)return;y(_[h+e]);return}y(p)}function x({draggedDistance:e}){if(v===null)return;let t=s===`bottom`||s===`right`?v-e:v+e;(s===`bottom`||s===`right`)&&t<_[_.length-1]||(s===`top`||s===`left`)&&t>_[_.length-1]||AN(r.current,{transform:jN(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})}function S(e,t){if(!n||typeof h!=`number`||!_||a===void 0)return null;let r=h===a-1;if(h>=a&&t)return 0;if(r&&!t)return 1;if(!g&&!r)return null;let i=r?h+1:h-1,o=r?_[i]-_[i-1]:_[i+1]-_[i],s=e/Math.abs(o);return r?1-s:s}return{isLastSnapPoint:m,activeSnapPoint:u,shouldFade:g,getPercentageDragged:S,setActiveSnapPoint:d,activeSnapPointIndex:h,onRelease:b,onDrag:x,snapPointsOffset:_}}function Nve(){let{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:i}=hN(),a=L.useRef(null),o=(0,L.useMemo)(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-RN)/window.innerWidth}L.useEffect(()=>{if(t&&n){a.current&&clearTimeout(a.current);let t=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`);if(!t)return;r&&!i&&NN(document.body,{background:`black`}),NN(t,{transformOrigin:jN(e)?`top`:`left`,transitionProperty:`transform, border-radius`,transitionDuration:`${PN.DURATION}s`,transitionTimingFunction:`cubic-bezier(${PN.EASE.join(`,`)})`});let n=NN(t,{borderRadius:`${IN}px`,overflow:`hidden`,...jN(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),a.current=window.setTimeout(()=>{o?document.body.style.background=o:document.body.style.removeProperty(`background`)},PN.DURATION*1e3)}}},[t,n,o])}var HN=null;function Pve({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:i,noBodyStyles:a}){let[o,s]=L.useState(()=>typeof window<`u`?window.location.href:``),c=L.useRef(0),l=L.useCallback(()=>{if(gN()&&HN===null&&e&&!a){HN={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:`unset`};let{scrollX:e,innerHeight:t}=window;document.body.style.setProperty(`position`,`fixed`,`important`),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-e}px`,right:`0px`,height:`auto`}),window.setTimeout(()=>window.requestAnimationFrame(()=>{let e=t-window.innerHeight;e&&c.current>=t&&(document.body.style.top=`${-(c.current+e)}px`)}),300)}},[e]),u=L.useCallback(()=>{if(gN()&&HN!==null&&!a){let e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,HN),window.requestAnimationFrame(()=>{if(i&&o!==window.location.href){s(window.location.href);return}window.scrollTo(t,e)}),HN=null}},[o]);return L.useEffect(()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener(`scroll`,e),()=>{window.removeEventListener(`scroll`,e)}},[]),L.useEffect(()=>{if(t)return()=>{typeof document>`u`||document.querySelector(`[data-vaul-drawer]`)||u()}},[t,u]),L.useEffect(()=>{n||!r||(e?(!window.matchMedia(`(display-mode: standalone)`).matches&&l(),t||window.setTimeout(()=>{u()},500)):u())},[e,r,o,t,n,l,u]),{restorePositionSetting:u}}function UN({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:i,snapPoints:a,shouldScaleBackground:o=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=kve,scrollLockTimeout:l=Ave,dismissible:u=!0,handleOnly:d=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:m,fixed:h,modal:g=!0,onClose:_,nested:v,noBodyStyles:y=!1,direction:b=`bottom`,defaultOpen:x=!1,disablePreventScroll:S=!0,snapToSequentialPoint:C=!1,preventScrollRestoration:w=!1,repositionInputs:T=!0,onAnimationEnd:E,container:D,autoFocus:O=!1}){let[k=!1,A]=VN({defaultProp:x,prop:e,onChange:e=>{t?.(e),!e&&!v&&Ce(),setTimeout(()=>{E?.(e)},PN.DURATION*1e3),e&&!g&&typeof window<`u`&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents=`auto`}),e||(document.body.style.pointerEvents=`auto`)}}),[j,M]=L.useState(!1),[N,P]=L.useState(!1),[ee,F]=L.useState(!1),te=L.useRef(null),ne=L.useRef(null),re=L.useRef(null),ie=L.useRef(null),ae=L.useRef(null),oe=L.useRef(!1),I=L.useRef(null),se=L.useRef(0),ce=L.useRef(!1),le=L.useRef(!x),ue=L.useRef(0),de=L.useRef(null),fe=L.useRef(de.current?.getBoundingClientRect().height||0),pe=L.useRef(de.current?.getBoundingClientRect().width||0),me=L.useRef(0),{activeSnapPoint:he,activeSnapPointIndex:ge,setActiveSnapPoint:_e,onRelease:ve,snapPointsOffset:ye,onDrag:be,shouldFade:xe,getPercentageDragged:Se}=Mve({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:m,drawerRef:de,fadeFromIndex:f,overlayRef:te,onSnapPointChange:L.useCallback(e=>{a&&e===ye.length-1&&(ne.current=new Date)},[]),direction:b,container:D,snapToSequentialPoint:C});Sve({isDisabled:!k||N||!g||ee||!j||!T||!S});let{restorePositionSetting:Ce}=Pve({isOpen:k,modal:g,nested:v??!1,hasBeenOpened:j,preventScrollRestoration:w,noBodyStyles:y});function we(){return(window.innerWidth-RN)/window.innerWidth}function Te(e){!u&&!a||de.current&&!de.current.contains(e.target)||(fe.current=de.current?.getBoundingClientRect().height||0,pe.current=de.current?.getBoundingClientRect().width||0,P(!0),re.current=new Date,_N()&&window.addEventListener(`touchend`,()=>oe.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),se.current=jN(b)?e.pageY:e.pageX)}function Ee(e,t){let n=e,r=window.getSelection()?.toString(),i=de.current?MN(de.current,b):null,a=new Date;if(n.tagName===`SELECT`||n.hasAttribute(`data-vaul-no-drag`)||n.closest(`[data-vaul-no-drag]`))return!1;if(b===`right`||b===`left`)return!0;if(ne.current&&a.getTime()-ne.current.getTime()<500)return!1;if(i!==null&&(b===`bottom`?i>0:i<0))return!0;if(r&&r.length>0)return!1;if(ae.current&&a.getTime()-ae.current.getTime()<l&&i===0||t)return ae.current=a,!1;for(;n;){if(n.scrollHeight>n.clientHeight){if(n.scrollTop!==0)return ae.current=new Date,!1;if(n.getAttribute(`role`)===`dialog`)return!0}n=n.parentNode}return!0}function De(e){if(de.current&&N){let t=b===`bottom`||b===`right`?1:-1,n=(se.current-(jN(b)?e.pageY:e.pageX))*t,i=n>0,s=a&&!u&&!i;if(s&&ge===0)return;let c=Math.abs(n),l=document.querySelector(`[data-vaul-drawer-wrapper]`),d=c/(b===`bottom`||b===`top`?fe.current:pe.current),p=Se(c,i);if(p!==null&&(d=p),s&&d>=1||!oe.current&&!Ee(e.target,i))return;if(de.current.classList.add(zN),oe.current=!0,AN(de.current,{transition:`none`}),AN(te.current,{transition:`none`}),a&&be({draggedDistance:n}),i&&!a){let e=Ove(n),r=Math.min(e*-1,0)*t;AN(de.current,{transform:jN(b)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`});return}let m=1-d;if((xe||f&&ge===f-1)&&(r?.(e,d),AN(te.current,{opacity:`${m}`,transition:`none`},!0)),l&&te.current&&o){let e=Math.min(we()+d*(1-we()),1),t=8-d*8,n=Math.max(0,14-d*14);AN(l,{borderRadius:`${t}px`,transform:jN(b)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:`none`},!0)}if(!a){let e=c*t;AN(de.current,{transform:jN(b)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}}L.useEffect(()=>{window.requestAnimationFrame(()=>{le.current=!0})},[]),L.useEffect(()=>{var e;function t(){if(!de.current||!T)return;let e=document.activeElement;if(DN(e)||ce.current){let e=window.visualViewport?.height||0,t=window.innerHeight,n=t-e,r=de.current.getBoundingClientRect().height||0,i=r>t*.8;me.current||=r;let o=de.current.getBoundingClientRect().top;if(Math.abs(ue.current-n)>60&&(ce.current=!ce.current),a&&a.length>0&&ye&&ge){let e=ye[ge]||0;n+=e}if(ue.current=n,r>e||ce.current){let t=de.current.getBoundingClientRect().height,r=t;t>e&&(r=e-(i?o:RN)),h?de.current.style.height=`${t-Math.max(n,0)}px`:de.current.style.height=`${Math.max(r,e-o)}px`}else hve()||(de.current.style.height=`${me.current}px`);a&&a.length>0&&!ce.current?de.current.style.bottom=`0px`:de.current.style.bottom=`${Math.max(n,0)}px`}}return(e=window.visualViewport)==null||e.addEventListener(`resize`,t),()=>window.visualViewport?.removeEventListener(`resize`,t)},[ge,a,ye]);function Oe(e){Ae(),_?.(),e||A(!1),setTimeout(()=>{a&&_e(a[0])},PN.DURATION*1e3)}function ke(){if(!de.current)return;let e=document.querySelector(`[data-vaul-drawer-wrapper]`),t=MN(de.current,b);AN(de.current,{transform:`translate3d(0, 0, 0)`,transition:`transform ${PN.DURATION}s cubic-bezier(${PN.EASE.join(`,`)})`}),AN(te.current,{transition:`opacity ${PN.DURATION}s cubic-bezier(${PN.EASE.join(`,`)})`,opacity:`1`}),o&&t&&t>0&&k&&AN(e,{borderRadius:`${IN}px`,overflow:`hidden`,...jN(b)?{transform:`scale(${we()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:`top`}:{transform:`scale(${we()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:`left`},transitionProperty:`transform, border-radius`,transitionDuration:`${PN.DURATION}s`,transitionTimingFunction:`cubic-bezier(${PN.EASE.join(`,`)})`},!0)}function Ae(){!N||!de.current||(de.current.classList.remove(zN),oe.current=!1,P(!1),ie.current=new Date)}function je(e){if(!N||!de.current)return;de.current.classList.remove(zN),oe.current=!1,P(!1),ie.current=new Date;let t=MN(de.current,b);if(!e||!Ee(e.target,!1)||!t||Number.isNaN(t)||re.current===null)return;let n=ie.current.getTime()-re.current.getTime(),r=se.current-(jN(b)?e.pageY:e.pageX),o=Math.abs(r)/n;if(o>.05&&(F(!0),setTimeout(()=>{F(!1)},200)),a){ve({draggedDistance:r*(b===`bottom`||b===`right`?1:-1),closeDrawer:Oe,velocity:o,dismissible:u}),i?.(e,!0);return}if(b===`bottom`||b===`right`?r>0:r<0){ke(),i?.(e,!0);return}if(o>FN){Oe(),i?.(e,!1);return}let s=Math.min(de.current.getBoundingClientRect().height??0,window.innerHeight),l=Math.min(de.current.getBoundingClientRect().width??0,window.innerWidth);if(Math.abs(t)>=(b===`left`||b===`right`?l:s)*c){Oe(),i?.(e,!1);return}i?.(e,!0),ke()}L.useEffect(()=>(k&&(AN(document.documentElement,{scrollBehavior:`auto`}),ne.current=new Date),()=>{Dve(document.documentElement,`scrollBehavior`)}),[k]);function Me(e){let t=e?(window.innerWidth-LN)/window.innerWidth:1,n=e?-LN:0;I.current&&window.clearTimeout(I.current),AN(de.current,{transition:`transform ${PN.DURATION}s cubic-bezier(${PN.EASE.join(`,`)})`,transform:jN(b)?`scale(${t}) translate3d(0, ${n}px, 0)`:`scale(${t}) translate3d(${n}px, 0, 0)`}),!e&&de.current&&(I.current=setTimeout(()=>{let e=MN(de.current,b);AN(de.current,{transition:`none`,transform:jN(b)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))}function Ne(e,t){if(t<0)return;let n=(window.innerWidth-LN)/window.innerWidth,r=n+t*(1-n),i=-LN+t*LN;AN(de.current,{transform:jN(b)?`scale(${r}) translate3d(0, ${i}px, 0)`:`scale(${r}) translate3d(${i}px, 0, 0)`,transition:`none`})}function Pe(e,t){let n=jN(b)?window.innerHeight:window.innerWidth,r=t?(n-LN)/n:1,i=t?-LN:0;t&&AN(de.current,{transition:`transform ${PN.DURATION}s cubic-bezier(${PN.EASE.join(`,`)})`,transform:jN(b)?`scale(${r}) translate3d(0, ${i}px, 0)`:`scale(${r}) translate3d(${i}px, 0, 0)`})}return L.useEffect(()=>{g||window.requestAnimationFrame(()=>{document.body.style.pointerEvents=`auto`})},[g]),L.createElement(oN,{defaultOpen:x,onOpenChange:e=>{!u&&!e||(e?M(!0):Oe(!0),A(e))},open:k},L.createElement(mN.Provider,{value:{activeSnapPoint:he,snapPoints:a,setActiveSnapPoint:_e,drawerRef:de,overlayRef:te,onOpenChange:t,onPress:Te,onRelease:je,onDrag:De,dismissible:u,shouldAnimate:le,handleOnly:d,isOpen:k,isDragging:N,shouldFade:xe,closeDrawer:Oe,onNestedDrag:Ne,onNestedOpenChange:Me,onNestedRelease:Pe,keyboardIsOpen:ce,modal:g,snapPointsOffset:ye,activeSnapPointIndex:ge,direction:b,shouldScaleBackground:o,setBackgroundColorOnScale:s,noBodyStyles:y,container:D,autoFocus:O}},n))}var WN=L.forwardRef(function({...e},t){let{overlayRef:n,snapPoints:r,onRelease:i,shouldFade:a,isOpen:o,modal:s,shouldAnimate:c}=hN(),l=ON(t,n),u=r&&r.length>0;if(!s)return null;let d=L.useCallback(e=>i(e),[i]);return L.createElement(lN,{onMouseUp:d,ref:l,"data-vaul-overlay":``,"data-vaul-snap-points":o&&u?`true`:`false`,"data-vaul-snap-points-overlay":o&&a?`true`:`false`,"data-vaul-animate":c?.current?`true`:`false`,...e})});WN.displayName=`Drawer.Overlay`;var GN=L.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},i){let{drawerRef:a,onPress:o,onRelease:s,onDrag:c,keyboardIsOpen:l,snapPointsOffset:u,activeSnapPointIndex:d,modal:f,isOpen:p,direction:m,snapPoints:h,container:g,handleOnly:_,shouldAnimate:v,autoFocus:y}=hN(),[b,x]=L.useState(!1),S=ON(i,a),C=L.useRef(null),w=L.useRef(null),T=L.useRef(!1),E=h&&h.length>0;Nve();let D=(e,t,n=0)=>{if(T.current)return!0;let r=Math.abs(e.y),i=Math.abs(e.x),a=i>r,o=[`bottom`,`right`].includes(t)?1:-1;if(t===`left`||t===`right`){if(!(e.x*o<0)&&i>=0&&i<=n)return a}else if(!(e.y*o<0)&&r>=0&&r<=n)return!a;return T.current=!0,!0};L.useEffect(()=>{E&&window.requestAnimationFrame(()=>{x(!0)})},[]);function O(e){C.current=null,T.current=!1,s(e)}return L.createElement(uN,{"data-vaul-drawer-direction":m,"data-vaul-drawer":``,"data-vaul-delayed-snap-points":b?`true`:`false`,"data-vaul-snap-points":p&&E?`true`:`false`,"data-vaul-custom-container":g?`true`:`false`,"data-vaul-animate":v?.current?`true`:`false`,...r,ref:S,style:u&&u.length>0?{"--snap-point-height":`${u[d??0]}px`,...t}:t,onPointerDown:e=>{_||(r.onPointerDown==null||r.onPointerDown.call(r,e),C.current={x:e.pageX,y:e.pageY},o(e))},onOpenAutoFocus:e=>{n?.(e),y||e.preventDefault()},onPointerDownOutside:t=>{if(e?.(t),!f||t.defaultPrevented){t.preventDefault();return}l.current&&=!1},onFocusOutside:e=>{if(!f){e.preventDefault();return}},onPointerMove:e=>{if(w.current=e,_||(r.onPointerMove==null||r.onPointerMove.call(r,e),!C.current))return;let t=e.pageY-C.current.y,n=e.pageX-C.current.x,i=e.pointerType===`touch`?10:2;D({x:n,y:t},m,i)?c(e):(Math.abs(n)>i||Math.abs(t)>i)&&(C.current=null)},onPointerUp:e=>{r.onPointerUp==null||r.onPointerUp.call(r,e),C.current=null,T.current=!1,s(e)},onPointerOut:e=>{r.onPointerOut==null||r.onPointerOut.call(r,e),O(w.current)},onContextMenu:e=>{r.onContextMenu==null||r.onContextMenu.call(r,e),w.current&&O(w.current)}})});GN.displayName=`Drawer.Content`;var Fve=250,Ive=120,KN=L.forwardRef(function({preventCycle:e=!1,children:t,...n},r){let{closeDrawer:i,isDragging:a,snapPoints:o,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:l,handleOnly:u,isOpen:d,onPress:f,onDrag:p}=hN(),m=L.useRef(null),h=L.useRef(!1);function g(){if(h.current){y();return}window.setTimeout(()=>{_()},Ive)}function _(){if(a||e||h.current){y();return}if(y(),!o||o.length===0){l||i();return}if(s===o[o.length-1]&&l){i();return}let t=o.findIndex(e=>e===s);if(t===-1)return;let n=o[t+1];c(n)}function v(){m.current=window.setTimeout(()=>{h.current=!0},Fve)}function y(){m.current&&window.clearTimeout(m.current),h.current=!1}return L.createElement(`div`,{onClick:g,onPointerCancel:y,onPointerDown:e=>{u&&f(e),v()},onPointerMove:e=>{u&&p(e)},ref:r,"data-vaul-drawer-visible":d?`true`:`false`,"data-vaul-handle":``,"aria-hidden":`true`,...n},L.createElement(`span`,{"data-vaul-handle-hitarea":``,"aria-hidden":`true`},t))});KN.displayName=`Drawer.Handle`;function Lve({onDrag:e,onOpenChange:t,open:n,...r}){let{onNestedDrag:i,onNestedOpenChange:a,onNestedRelease:o}=hN();if(!i)throw Error(`Drawer.NestedRoot must be placed in another drawer`);return L.createElement(UN,{nested:!0,open:n,onClose:()=>{a(!1)},onDrag:(t,n)=>{i(t,n),e?.(t,n)},onOpenChange:e=>{e&&a(e),t?.(e)},onRelease:o,...r})}function Rve(e){let t=hN(),{container:n=t.container,...r}=e;return L.createElement(cN,{container:n,...r})}var qN={Root:UN,NestedRoot:Lve,Content:GN,Overlay:WN,Trigger:sN,Portal:Rve,Handle:KN,Close:pN,Title:dN,Description:fN},zve=`select-none`,JN=e=>B(zve,e),YN=({shouldScaleBackground:e=!1,...t})=>(0,R.jsx)(qN.Root,{shouldScaleBackground:e,...t});YN.displayName=`Drawer`;var Bve=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(qN.Trigger,{ref:n,className:JN(e),...t}));Bve.displayName=qN.Trigger.displayName;var Vve=qN.Portal;qN.Close;var XN=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(qN.Overlay,{ref:n,className:B(`fixed inset-0 z-50 bg-black/40 backdrop-blur-[1px]`,e),...t}));XN.displayName=qN.Overlay.displayName;var ZN=L.forwardRef(({className:e,children:t,...n},r)=>(0,R.jsxs)(Vve,{children:[(0,R.jsx)(XN,{}),(0,R.jsxs)(qN.Content,{ref:r,className:B(`fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85dvh] flex-col rounded-t-xl border bg-background`,e),...n,children:[(0,R.jsx)(`div`,{className:`mx-auto mt-3 mb-1 h-1 w-10 shrink-0 rounded-full bg-muted-foreground/20`}),t]})]}));ZN.displayName=`DrawerContent`;var QN=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(qN.Title,{ref:n,className:B(`text-lg font-semibold leading-none tracking-tight`,e),...t}));QN.displayName=qN.Title.displayName;var $N=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(qN.Description,{ref:n,className:B(`text-sm text-muted-foreground`,e),...t}));$N.displayName=qN.Description.displayName;function eP(e,t,n=!1){let r=E_(),[i,a]=L.useState(n),o=e!==void 0,s=o?e:i,c=L.useCallback(e=>{o||a(e),t?.(e)},[o,t]);return L.useMemo(()=>({isCompactViewport:r,open:s,onOpenChange:c}),[r,s,c])}var tP=L.forwardRef(({asChild:e,open:t,onOpenChange:n,haspopup:r,onClick:i,children:a,className:o,...s},c)=>{let l=JN(o),u=e=>{i?.(e),e.defaultPrevented||n(!t)},d={"aria-expanded":t,"aria-haspopup":r,"data-state":t?`open`:`closed`};return e?(0,R.jsx)(y_,{ref:c,onClick:u,className:l,...d,...s,children:a}):(0,R.jsx)(`button`,{ref:c,type:`button`,onClick:u,className:l,...d,...s,children:a})});tP.displayName=`MobileTrigger`;var Hve=new Set([`side`,`sideOffset`,`align`,`alignOffset`,`collisionPadding`,`collisionBoundary`,`arrowPadding`,`sticky`,`hideWhenDetached`,`avoidCollisions`,`onOpenAutoFocus`,`onCloseAutoFocus`,`onEscapeKeyDown`,`onPointerDownOutside`,`onFocusOutside`,`onInteractOutside`]);function nP(e){let t={};for(let n of Object.keys(e))Hve.has(n)||(t[n]=e[n]);return t}function rP({open:e,onOpenChange:t,srLabel:n,contentClassName:r,handleOnly:i,children:a}){return(0,R.jsx)(YN,{open:e,onOpenChange:t,handleOnly:i,children:(0,R.jsxs)(ZN,{className:r,children:[n===void 0?null:(0,R.jsx)(QN,{className:`sr-only`,children:n}),a]})})}var iP=L.createContext({isCompactViewport:!1,open:!1,onOpenChange:()=>{}});function aP(){return L.useContext(iP)}function oP({children:e,open:t,onOpenChange:n,defaultOpen:r,...i}){let a=eP(t,n,r);return a.isCompactViewport?(0,R.jsx)(iP.Provider,{value:a,children:e}):(0,R.jsx)(J_e,{open:a.open,onOpenChange:a.onOpenChange,...i,children:(0,R.jsx)(iP.Provider,{value:a,children:e})})}var sP=L.forwardRef(({asChild:e,children:t,className:n,...r},i)=>{let{isCompactViewport:a,open:o,onOpenChange:s}=aP();return a?(0,R.jsx)(tP,{ref:i,asChild:e,open:o,onOpenChange:s,haspopup:`menu`,className:n,...r,children:t}):(0,R.jsx)(Y_e,{ref:i,asChild:e,className:JN(n),...r,children:t})});sP.displayName=`DropdownMenuTrigger`;var cP=L.forwardRef(({className:e,sideOffset:t=4,children:n,mobileTitle:r,...i},a)=>{let{isCompactViewport:o,open:s,onOpenChange:c}=aP();if(o){let t=nP(i);return(0,R.jsx)(rP,{open:s,onOpenChange:c,srLabel:r??`Menu`,children:(0,R.jsx)(`div`,{ref:a,className:B(`flex flex-col gap-0.5 overflow-y-auto p-2 pb-[max(0.5rem,env(safe-area-inset-bottom))]`,e),style:{minWidth:`auto`,maxWidth:`none`,width:`auto`},...t,children:n})})}return(0,R.jsx)(X_e,{children:(0,R.jsx)(Z_e,{ref:a,sideOffset:t,className:B(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...i,children:n})})});cP.displayName=`DropdownMenuContent`;function lP(){return new Event(`select`,{cancelable:!0})}var uP=L.forwardRef(({className:e,inset:t,onSelect:n,disabled:r,textValue:i,children:a,...o},s)=>{let{isCompactViewport:c,onOpenChange:l}=aP();return c?(0,R.jsx)(`button`,{ref:s,type:`button`,role:`menuitem`,disabled:r,"aria-disabled":r||void 0,className:B(`relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-2 text-left text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground active:bg-state-active active:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0`,t&&`pl-8`,e),"data-disabled":r?``:void 0,onClick:()=>{if(r)return;let e=lP();n?.(e),e.defaultPrevented||l(!1)},children:a}):(0,R.jsx)(eve,{ref:s,className:B(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-[0.3125rem] text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0`,t&&`pl-8`,e),disabled:r,onSelect:n,textValue:i,...o,children:a})});uP.displayName=`DropdownMenuItem`;var dP=L.forwardRef(({className:e,children:t,checked:n,onSelect:r,onCheckedChange:i,disabled:a,textValue:o,...s},c)=>{let{isCompactViewport:l,onOpenChange:u}=aP();return l?(0,R.jsxs)(`button`,{ref:c,type:`button`,role:`menuitemcheckbox`,"aria-checked":n===`indeterminate`?`mixed`:n===!0,disabled:a,"aria-disabled":a||void 0,className:B(`relative flex w-full cursor-default select-none items-center rounded-sm py-2 pl-2 pr-8 text-left text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground active:bg-state-active active:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),"data-disabled":a?``:void 0,onClick:()=>{if(a)return;let e=lP();r?.(e),i?.(n===`indeterminate`?!0:!n),e.defaultPrevented||u(!1)},children:[(0,R.jsx)(`span`,{className:B(`absolute right-2 flex items-center justify-center`,L_),children:(n===!0||n===`indeterminate`)&&(0,R.jsx)(V,{name:`Check`,className:`h-3.5 w-3.5 max-md:pointer-coarse:h-5 max-md:pointer-coarse:w-5`})}),t]}):(0,R.jsxs)(tve,{ref:c,className:B(`relative flex cursor-default select-none items-center rounded-sm py-[0.3125rem] pl-2 pr-8 text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),checked:n,onSelect:r,onCheckedChange:i,disabled:a,textValue:o,...s,children:[(0,R.jsx)(`span`,{className:B(`absolute right-2 flex items-center justify-center`,L_),children:(0,R.jsx)(PM,{children:(0,R.jsx)(V,{name:`Check`,className:L_})})}),t]})});dP.displayName=`DropdownMenuCheckboxItem`;var Uve=L.forwardRef(({className:e,children:t,...n},r)=>{let{isCompactViewport:i}=aP();return i?null:(0,R.jsxs)(NM,{ref:r,className:B(`relative flex cursor-default select-none items-center rounded-sm py-[0.3125rem] pl-8 pr-2 text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[(0,R.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,R.jsx)(PM,{children:(0,R.jsx)(V,{name:`Circle`,className:`h-2 w-2 fill-current`})})}),t]})});Uve.displayName=NM.displayName;var fP=L.forwardRef(({className:e,inset:t,children:n,...r},i)=>{let{isCompactViewport:a}=aP();return a?(0,R.jsx)(`div`,{ref:i,className:B(`px-2 py-1.5 text-xs font-medium text-muted-foreground`,t&&`pl-8`,e),children:n}):(0,R.jsx)($_e,{ref:i,className:B(`px-2 py-[0.3125rem] text-xs font-medium text-muted-foreground`,t&&`pl-8`,e),...r,children:n})});fP.displayName=`DropdownMenuLabel`;var pP=L.forwardRef(({className:e,...t},n)=>{let{isCompactViewport:r}=aP();return r?(0,R.jsx)(`hr`,{ref:n,className:B(`-mx-1 my-1 h-px border-0 bg-muted`,e)}):(0,R.jsx)(nve,{ref:n,className:B(`-mx-1 my-1 h-px bg-muted`,e),...t})});pP.displayName=`DropdownMenuSeparator`;var mP=L.forwardRef(({children:e,...t},n)=>{let{isCompactViewport:r}=aP();return r?(0,R.jsx)(`div`,{ref:n,role:`group`,...t,children:e}):(0,R.jsx)(Q_e,{ref:n,...t,children:e})});mP.displayName=`DropdownMenuGroup`;var Wve=L.forwardRef(({className:e,inset:t,children:n,...r},i)=>(0,R.jsxs)(FM,{ref:i,className:B(`flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-[0.3125rem] text-xs outline-none focus:bg-state-hover focus:text-foreground data-[state=open]:bg-state-active data-[state=open]:text-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,t&&`pl-8`,e),...r,children:[n,(0,R.jsx)(V,{name:`ChevronRight`,className:`ml-auto`})]}));Wve.displayName=FM.displayName;var Gve=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(IM,{ref:n,className:B(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...t}));Gve.displayName=IM.displayName;var Kve=({className:e,...t})=>(0,R.jsx)(`span`,{className:B(`ml-auto text-xs tracking-widest opacity-60`,e),...t});Kve.displayName=`DropdownMenuShortcut`;function hP({message:e,icon:t,className:n,iconClassName:r,messageClassName:i}){return(0,R.jsxs)(`div`,{className:B(`flex items-center gap-2`,n),children:[t?(0,R.jsx)(V,{name:t,"aria-hidden":`true`,className:B(`size-4 shrink-0 text-muted-foreground/70`,r)}):null,(0,R.jsx)(`p`,{className:B(`text-xs leading-5 text-muted-foreground`,i),children:e})]})}var gP=`ContextMenu`,[qve,Jve]=lv(gP,[fj]),_P=fj(),[Yve,vP]=qve(gP),yP=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=L.useState(!1),c=_P(t),l=bv(r),u=L.useCallback(e=>{s(e),l(e)},[l]);return(0,R.jsx)(Yve,{scope:t,open:o,onOpenChange:u,modal:a,children:(0,R.jsx)(eM,{...c,dir:i,open:o,onOpenChange:u,modal:a,children:n})})};yP.displayName=gP;var bP=`ContextMenuTrigger`,xP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=vP(bP,n),o=_P(n),s=L.useRef({x:0,y:0}),c=L.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=L.useRef(0),u=L.useCallback(()=>window.clearTimeout(l.current),[]),d=e=>{s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return L.useEffect(()=>u,[u]),L.useEffect(()=>void(r&&u()),[r,u]),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(tM,{...o,virtualRef:c}),(0,R.jsx)(vv.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:sv(e.onContextMenu,e=>{u(),d(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:sv(e.onPointerDown,PP(e=>{u(),l.current=window.setTimeout(()=>d(e),700)})),onPointerMove:r?e.onPointerMove:sv(e.onPointerMove,PP(u)),onPointerCancel:r?e.onPointerCancel:sv(e.onPointerCancel,PP(u)),onPointerUp:r?e.onPointerUp:sv(e.onPointerUp,PP(u))})]})});xP.displayName=bP;var Xve=`ContextMenuPortal`,SP=e=>{let{__scopeContextMenu:t,...n}=e,r=_P(t);return(0,R.jsx)(nM,{...r,...n})};SP.displayName=Xve;var CP=`ContextMenuContent`,wP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=vP(CP,n),a=_P(n),o=L.useRef(!1);return(0,R.jsx)(rM,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});wP.displayName=CP;var Zve=`ContextMenuGroup`,Qve=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(iM,{...i,...r,ref:t})});Qve.displayName=Zve;var $ve=`ContextMenuLabel`,TP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(aM,{...i,...r,ref:t})});TP.displayName=$ve;var eye=`ContextMenuItem`,EP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(oM,{...i,...r,ref:t})});EP.displayName=eye;var tye=`ContextMenuCheckboxItem`,DP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(sM,{...i,...r,ref:t})});DP.displayName=tye;var nye=`ContextMenuRadioGroup`,rye=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(cM,{...i,...r,ref:t})});rye.displayName=nye;var iye=`ContextMenuRadioItem`,OP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(lM,{...i,...r,ref:t})});OP.displayName=iye;var aye=`ContextMenuItemIndicator`,kP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(uM,{...i,...r,ref:t})});kP.displayName=aye;var oye=`ContextMenuSeparator`,AP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(dM,{...i,...r,ref:t})});AP.displayName=oye;var sye=`ContextMenuArrow`,cye=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(fM,{...i,...r,ref:t})});cye.displayName=sye;var jP=`ContextMenuSub`,lye=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=_P(t),[s,c]=db({prop:i,defaultProp:a??!1,onChange:r,caller:jP});return(0,R.jsx)(A_e,{...o,open:s,onOpenChange:c,children:n})};lye.displayName=jP;var uye=`ContextMenuSubTrigger`,MP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(pM,{...i,...r,ref:t})});MP.displayName=uye;var dye=`ContextMenuSubContent`,NP=L.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=_P(n);return(0,R.jsx)(mM,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});NP.displayName=dye;function PP(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var fye=yP,pye=xP,mye=SP,FP=wP,IP=TP,LP=EP,RP=DP,zP=OP,BP=kP,VP=AP,HP=MP,UP=NP,WP=fye,GP=pye,hye=L.forwardRef(({className:e,inset:t,children:n,...r},i)=>(0,R.jsxs)(HP,{ref:i,className:B(`flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-[0.3125rem] text-xs outline-none focus:bg-state-hover focus:text-foreground data-[state=open]:bg-state-active data-[state=open]:text-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,t&&`pl-8`,e),...r,children:[n,(0,R.jsx)(V,{name:`ChevronRight`,className:`ml-auto`})]}));hye.displayName=HP.displayName;var gye=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(UP,{ref:n,className:B(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...t}));gye.displayName=UP.displayName;var KP=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(mye,{children:(0,R.jsx)(FP,{ref:n,className:B(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...t})}));KP.displayName=FP.displayName;var qP=L.forwardRef(({className:e,inset:t,...n},r)=>(0,R.jsx)(LP,{ref:r,className:B(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-[0.3125rem] text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0`,t&&`pl-8`,e),...n}));qP.displayName=LP.displayName;var JP=L.forwardRef(({className:e,children:t,checked:n,...r},i)=>(0,R.jsxs)(RP,{ref:i,className:B(`relative flex cursor-default select-none items-center rounded-sm py-[0.3125rem] pl-2 pr-8 text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),checked:n,...r,children:[(0,R.jsx)(`span`,{className:B(`absolute right-2 flex items-center justify-center`,L_),children:(0,R.jsx)(BP,{children:(0,R.jsx)(V,{name:`Check`,className:L_})})}),t]}));JP.displayName=RP.displayName;var _ye=L.forwardRef(({className:e,children:t,...n},r)=>(0,R.jsxs)(zP,{ref:r,className:B(`relative flex cursor-default select-none items-center rounded-sm py-[0.3125rem] pl-8 pr-2 text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[(0,R.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,R.jsx)(BP,{children:(0,R.jsx)(V,{name:`Circle`,className:`h-2 w-2 fill-current`})})}),t]}));_ye.displayName=zP.displayName;var vye=L.forwardRef(({className:e,inset:t,...n},r)=>(0,R.jsx)(IP,{ref:r,className:B(`px-2 py-[0.3125rem] text-xs font-medium text-muted-foreground`,t&&`pl-8`,e),...n}));vye.displayName=IP.displayName;var YP=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(VP,{ref:n,className:B(`-mx-1 my-1 h-px bg-muted`,e),...t}));YP.displayName=VP.displayName;function yye({className:e,...t}){return(0,R.jsx)(`span`,{className:B(`ml-auto text-xs tracking-widest opacity-60`,e),...t})}yye.displayName=`ContextMenuShortcut`;function XP(e){return Array.isArray(e)}function bye(e){return typeof e==`object`&&!!e&&`pages`in e&&Array.isArray(e.pages)}function*ZP(e){if(e){if(XP(e)){for(let t of e)yield t;return}for(let t of e.pages)for(let e of t)yield e}}function xye(e,t){return XP(e)?t(e):{...e,pages:e.pages.map(t)}}function Sye(e){return XP(e)||bye(e)}function QP(e,t){let n=[];for(let[r,i]of e.getQueriesData({queryKey:t.queryKey}))Sye(i)&&n.push({queryKey:r,data:i});return n}function $P(e,t){for(let{queryKey:n,data:r}of QP(e,{queryKey:t.queryKey}))e.setQueryData(n,xye(r,t.mapper))}function eF(e){if(e[0]!==`threads`)return;let t=e[1];if(t!==void 0&&Cye(t))return t}function Cye(e){return!(typeof e!=`object`||!e||Array.isArray(e)||!(`archived`in e)||typeof e.archived!=`boolean`||`projectId`in e&&e.projectId!==void 0&&typeof e.projectId!=`string`||`parentThreadId`in e&&e.parentThreadId!==void 0&&typeof e.parentThreadId!=`string`||`type`in e&&e.type!==void 0&&e.type!==`manager`&&e.type!==`standard`)}function wye(e){return!(typeof e!=`object`||!e||Array.isArray(e)||!(`projectId`in e)||typeof e.projectId!=`string`||!(`kind`in e)||e.kind!==`all`&&e.kind!==`manager`&&e.kind!==`managed`&&e.kind!==`unmanaged`)}function Tye(e){if(e[0]===`threads`){if(e[1]===`archivedList`){let t=e[2];return wye(t)?t.projectId:void 0}return eF(e)?.projectId}}function tF({projectId:e,queryClient:t}){let n=[];for(let[r]of t.getQueriesData({queryKey:RO()}))Tye(r)===e&&n.push(r);return n}function Eye({environmentId:e}){return[$O(e)]}function nF({environmentId:e}){return[tk(e),sk(e),ck(e)]}function rF({environmentId:e}){return[nk(e)]}function Dye(e,t){return e[0]===`environmentWorkStatus`&&e[1]===t&&(typeof e[2]==`string`||e[2]===null)}function Oye(e,t){return Dye(e,t)&&typeof e[2]==`string`}function kye(e,t){return e[0]===`environmentGitDiff`&&e[1]===t&&(typeof e[2]==`string`||e[2]===null)&&(typeof e[3]==`string`||e[3]===null)}function Aye(e,t){return kye(e,t)&&(e[2]===`all`||e[2]===`branch_committed`)}function jye(e,{environmentId:t}){let n=[];for(let[r]of e.getQueriesData({queryKey:tk(t)}))Oye(r,t)&&n.push(ek(t,r[2]));for(let[r]of e.getQueriesData({queryKey:sk(t)}))Aye(r,t)&&n.push(ok(t,r[2],r[3]));return n}function Mye({environmentId:e}){return[...nF({environmentId:e}),...rF({environmentId:e}),RO()]}function Nye(e,t){if(t){for(let{data:n}of QP(e,{queryKey:RO()}))for(let e of ZP(n))if(e.id===t)return e}}function iF(e,t,n){e.setQueryData(BO(t),e=>e&&n(e))}function Pye(e,t){return!(!t||t.archived&&e.archivedAt==null||!t.archived&&e.archivedAt!=null||t?.projectId&&e.projectId!==t.projectId||t?.type&&e.type!==t.type||t?.parentThreadId!==void 0&&e.parentThreadId!==t.parentThreadId)}function aF(e,t){for(let{queryKey:n,data:r}of QP(e,{queryKey:RO()}))Array.isArray(r)&&Pye(t,eF(n))&&(r.some(e=>e.id===t.id)||e.setQueryData(n,[{...t,environmentBranchName:null,environmentHostId:null,runtime:t.runtime,hasPendingInteraction:!1,environmentWorkspaceDisplayKind:`other`},...r]))}var oF=()=>!0,Fye=()=>!1;function sF({queryClient:e,shouldUpdate:t,threadId:n,updater:r}){let i=e.getQueriesData({queryKey:ik(n)});for(let[n,a]of i){if(!a||!t(n))continue;let i=r(a.rows);i!==null&&e.setQueryData(n,{...a,rows:[...i]})}}function Iye(e){return e.kind===`conversation`&&e.role===`user`&&e.userRequest.kind===`steer`&&e.userRequest.status===`pending`}function Lye(e){return e?e.type===`manager`?Cme:oF:Fye}function Rye(e,t,n){sF({queryClient:e,shouldUpdate:Iye(n)?Lye(e.getQueryData(BO(t))):oF,threadId:t,updater:e=>[...e,n]})}function zye(e,t,n){sF({queryClient:e,shouldUpdate:oF,threadId:t,updater:e=>{let t=e.filter(e=>e.id!==n);return t.length===e.length?null:t}})}function Bye(e,t,n){$P(e,{queryKey:RO(),mapper:e=>e.some(e=>e.id===t)?e.map(e=>e.id===t?{...e,hasPendingInteraction:n}:e):e})}function cF({queryClient:e,queryKeys:t}){for(let n of t)e.invalidateQueries({queryKey:n})}function Vye({queryClient:e,queryKeys:t}){for(let n of t)e.refetchQueries({queryKey:n,type:`active`,predicate:e=>e.state.status===`error`&&e.state.fetchStatus===`idle`}).catch(()=>{})}var lF={"thread-created":{flush:`debounced`,dirty:[pF,mF,hF,xF]},"thread-deleted":{flush:`debounced`,dirty:[pF,mF,hF,xF]},"events-appended":{flush:`debounced`,dirty:[hF,vF]},"interactions-changed":{flush:`debounced`,dirty:[yF,wF]},"status-changed":{flush:`immediate`,dirty:[pF,mF]},"title-changed":{flush:`debounced`,dirty:[pF,mF]},"queue-changed":{flush:`debounced`,dirty:[gF,_F]},"archived-changed":{flush:`debounced`,dirty:[pF,mF,xF]},"parent-changed":{flush:`debounced`,dirty:[pF,mF]},"read-state-changed":{flush:`debounced`,dirty:[SF,CF]},"manager-assignment-changed":{flush:`debounced`,dirty:[pF,mF]},"terminals-changed":{flush:`debounced`,dirty:[bF]}},Hye={"environment-created":{dirty:[TF,EF,kF]},"environment-deleted":{dirty:[TF,EF,kF]},"metadata-changed":{dirty:[TF,EF,kF]},"status-changed":{dirty:[TF,EF,kF]},"work-status-changed":{dirty:[DF]},"git-refs-changed":{dirty:[OF,kF]},"thread-storage-changed":{dirty:[AF]}},Uye={"project-created":{dirty:[jF]},"project-updated":{dirty:[jF]},"project-deleted":{dirty:[jF]},"project-sources-changed":{dirty:[MF]},"threads-changed":{dirty:[jF,xF]},"automations-changed":{dirty:[jF]},"nudges-changed":{dirty:[jF]}},uF=[NF,jF,PF,FF,IF],Wye={"host-connected":{dirty:uF},"host-disconnected":{dirty:uF}},Gye={"config-changed":{dirty:[PF,FF,IF]}};function dF({context:e,handlers:t}){for(let n of t){let t=n(e);if(t)for(let n of t)e.queryClient.invalidateQueries({queryKey:n})}}function fF(e){return e.some(e=>lF[e].flush===`immediate`)}function pF({projectId:e,queryClient:t}){return e?tF({projectId:e,queryClient:t}):[RO()]}function mF({threadId:e}){return e?[BO(e)]:[HO()]}function hF({threadId:e}){return e?[ik(e)]:[ak()]}function gF({threadId:e}){return e?[WO(e)]:[GO()]}function _F({threadId:e}){return e?[KO(e)]:[qO()]}function vF({eventTypes:e,threadId:t}){return e?.includes(`client/turn/requested`)?t?[KO(t)]:[qO()]:[]}function yF({threadId:e}){return e?[JO(e)]:[YO()]}function bF({threadId:e}){return e?[XO(e)]:[fme()]}function xF({projectId:e}){return e?[NO(e)]:[PO()]}function SF({queryClient:e,threadId:t}){t&&e.invalidateQueries({queryKey:BO(t),refetchType:`none`})}function CF({projectId:e,queryClient:t}){if(!e){t.invalidateQueries({queryKey:RO(),refetchType:`none`});return}for(let n of tF({projectId:e,queryClient:t}))t.invalidateQueries({queryKey:n,refetchType:`none`})}function wF({hasPendingInteraction:e,queryClient:t,threadId:n}){!n||e===void 0||Bye(t,n,e)}function TF(e){return Eye(e)}function EF(e){return nF(e)}function DF({environmentId:e,queryClient:t}){t.invalidateQueries({queryKey:tk(e)}),t.invalidateQueries({queryKey:ck(e)}),t.invalidateQueries({queryKey:sk(e)})}function OF({environmentId:e,queryClient:t}){return jye(t,{environmentId:e})}function kF(e){return rF(e)}function AF({getCachedThreadIdsForEnvironment:e}){let t=[];for(let n of e())t.push(ZO(n)),t.push(QO(n));return t}function jF(){return[jO()]}function MF({projectId:e}){let t=[jO(),fk()];return e?[...t,FO(e),LO(e)]:[...t,MO(),IO()]}function NF(){return[OO(),AO()]}function PF(){return[lk()]}function FF(){return[dk()]}function IF(){return[VO()]}function LF({environmentId:e,queryClient:t}){e&&(t.removeQueries({queryKey:tk(e)}),t.removeQueries({queryKey:sk(e)}),t.removeQueries({queryKey:ck(e)}),t.removeQueries({queryKey:nk(e)}),t.removeQueries({queryKey:Ome(e)}),t.removeQueries({queryKey:ume(e)}))}function RF({environmentId:e,queryClient:t}){cF({queryClient:t,queryKeys:Mye({environmentId:e})})}function zF({environmentId:e,queryClient:t}){cF({queryClient:t,queryKeys:nF({environmentId:e})})}function BF({queryClient:e}){e.invalidateQueries({queryKey:jO()})}function VF({projectId:e,queryClient:t}){t.invalidateQueries({queryKey:jO()}),t.invalidateQueries({queryKey:FO(e)}),t.invalidateQueries({queryKey:RO()})}function HF({queryClient:e}){e.invalidateQueries({queryKey:jO()}),e.invalidateQueries({queryKey:RO()})}function UF({projectId:e,queryClient:t}){if(t.invalidateQueries({queryKey:jO()}),t.invalidateQueries({queryKey:fk()}),!e){t.invalidateQueries({queryKey:MO()}),t.invalidateQueries({queryKey:IO()});return}t.invalidateQueries({queryKey:FO(e)}),t.invalidateQueries({queryKey:LO(e)})}function WF({queryClient:e}){e.refetchQueries({queryKey:RO(),type:`active`})}function GF({queryClient:e}){e.invalidateQueries({queryKey:jO()}),iI({queryClient:e})}function KF({queryClient:e}){e.invalidateQueries({queryKey:RO()})}function qF({queryClient:e,threadId:t}){e.invalidateQueries({queryKey:BO(t)}),e.invalidateQueries({queryKey:RO()})}function JF({projectId:e,queryClient:t}){t.invalidateQueries({queryKey:NO(e)})}function YF({queryClient:e}){e.invalidateQueries({queryKey:PO()})}function XF({queryClient:e}){e.invalidateQueries({queryKey:jO()}),YF({queryClient:e}),e.invalidateQueries({queryKey:RO()})}function ZF({queryClient:e,threadId:t}){e.invalidateQueries({queryKey:BO(t)}),e.invalidateQueries({queryKey:WO(t)}),e.invalidateQueries({queryKey:KO(t)})}function QF({queryClient:e,threadId:t}){ZF({queryClient:e,threadId:t}),e.invalidateQueries({queryKey:ik(t)}),e.invalidateQueries({queryKey:RO()})}function $F({queryClient:e,threadId:t}){e.invalidateQueries({queryKey:UO(t)}),e.invalidateQueries({queryKey:KO(t)})}function eI({queryClient:e,threadId:t}){$F({queryClient:e,threadId:t}),e.invalidateQueries({queryKey:BO(t)}),e.invalidateQueries({queryKey:ik(t)}),e.invalidateQueries({queryKey:RO()})}function tI({queryClient:e,threadId:t}){e.invalidateQueries({queryKey:BO(t)}),e.invalidateQueries({queryKey:RO()})}function nI({queryClient:e,threadId:t}){e.invalidateQueries({queryKey:JO(t)}),e.invalidateQueries({queryKey:ik(t)}),e.invalidateQueries({queryKey:BO(t)}),e.invalidateQueries({queryKey:RO()})}function rI({queryClient:e,threadId:t}){e.removeQueries({queryKey:BO(t)}),e.removeQueries({queryKey:ik(t)}),e.removeQueries({queryKey:UO(t)}),e.removeQueries({queryKey:WO(t)}),e.removeQueries({queryKey:KO(t)}),e.removeQueries({queryKey:ZO(t)}),e.removeQueries({queryKey:QO(t)})}function iI({queryClient:e}){e.invalidateQueries({queryKey:RO()})}function aI({queryClient:e}){cF({queryClient:e,queryKeys:lI()})}function oI({queryClient:e}){Vye({queryClient:e,queryKeys:lI()})}function sI({queryClient:e}){e.invalidateQueries({queryKey:OO()}),e.invalidateQueries({queryKey:AO()})}function cI({queryClient:e}){sI({queryClient:e}),e.invalidateQueries({queryKey:jO()})}function lI(){return[OO(),AO(),jO(),MO(),RO(),HO(),VO(),ak(),GO(),YO(),dme(),mme(),gme(),vme(),yme(),xme(),wme(),Dme(),fk(),lk(),dk()]}var uI=[`hireProjectManager`];function dI(){let e=et();return bt({meta:{errorMessage:`Failed to create project.`},mutationFn:e=>Gfe(e),onSuccess:()=>{BF({queryClient:e})}})}function fI(){let e=et();return bt({mutationKey:uI,meta:{errorMessage:`Failed to hire manager.`,showErrorToast:!1},mutationFn:({projectId:e,name:t,providerId:n,model:r,reasoningLevel:i,environment:a})=>Kfe(e,{name:t,...n?{providerId:n}:{},...r?{model:r}:{},...i?{reasoningLevel:i}:{},environment:a}),onSuccess:t=>{e.setQueryData(BO(t.id),t),aF(e,t),GF({queryClient:e})}})}function pI(){let e=et();return bt({meta:{errorMessage:`Failed to update project.`},mutationFn:({id:e,...t})=>qfe(e,t),onSuccess:(t,n)=>{VF({projectId:n.id,queryClient:e})}})}function mI(){let e=et();return bt({meta:{errorMessage:`Failed to remove project.`},mutationFn:e=>Zfe(e),onSuccess:()=>{HF({queryClient:e})}})}function hI(){let e=et();return bt({meta:{errorMessage:`Failed to add local source.`},mutationFn:({projectId:e,hostId:t,path:n})=>Qfe(e,{type:`local_path`,hostId:t,path:n}),onSuccess:(t,n)=>{UF({projectId:n.projectId,queryClient:e})}})}function gI(){let e=et();return bt({meta:{errorMessage:`Failed to update local source.`},mutationFn:({projectId:e,sourceId:t,path:n})=>$fe(e,t,{type:`local_path`,path:n}),onSuccess:(t,n)=>{UF({projectId:n.projectId,queryClient:e})}})}function _I(){return bt({meta:{errorMessage:`Failed to upload attachment.`,showErrorToast:!1},mutationFn:({projectId:e,file:t})=>rpe(e,t),retry:!1})}function vI(){let[e,t]=(0,L.useState)(null),n=(0,L.useCallback)(e=>{t(e)},[]),r=(0,L.useCallback)(()=>{t(null)},[]),i=(0,L.useCallback)(e=>{e||t(null)},[]);return(0,L.useMemo)(()=>({isOpen:e!==null,onClose:r,onOpen:n,onOpenChange:i,setTarget:t,target:e}),[r,n,i,t,e])}function yI({isPending:e,submit:t}){let{localHostId:n,pickFolder:r,platform:i}=iA(),a=vI(),o=a.onClose,s=(0,L.useCallback)((r,i)=>{e||!n||t({path:r,hostId:n,target:i,closeDialog:o})},[o,e,n,t]),c=(0,L.useCallback)(t=>{if(!(e||!n)){if(r){(async()=>{let e=await r();e&&s(SE(e),t)})();return}a.onOpen(t)}},[e,n,r,a,s]),l=(0,L.useCallback)((e,t)=>{s(t,e)},[s]);return{isAvailable:n!=null,localHostId:n,openPicker:c,platform:i,projectPathDialog:a,submitProjectPath:l}}var bI=L.createContext({isCompactViewport:!1,open:!1,onOpenChange:()=>{}});function xI(){return L.useContext(bI)}function SI({children:e,open:t,onOpenChange:n,...r}){let i=eP(t,n),a=i.isCompactViewport?e:(0,R.jsx)(oN,{open:i.open,onOpenChange:i.onOpenChange,...r,children:e});return(0,R.jsx)(bI.Provider,{value:i,children:a})}var CI=L.forwardRef(({asChild:e,children:t,className:n,...r},i)=>{let{isCompactViewport:a,open:o,onOpenChange:s}=xI();return a?(0,R.jsx)(tP,{ref:i,asChild:e,open:o,onOpenChange:s,haspopup:`dialog`,className:n,...r,children:t}):(0,R.jsx)(sN,{ref:i,asChild:e,className:JN(n),...r,children:t})});CI.displayName=`DialogTrigger`;var wI=L.forwardRef(({asChild:e,onClick:t,children:n,...r},i)=>{let{isCompactViewport:a,onOpenChange:o}=xI();if(a){let a=e?y_:`button`;return(0,R.jsx)(a,{ref:i,onClick:e=>{t?.(e),e.defaultPrevented||o(!1)},...r,children:n})}return(0,R.jsx)(pN,{ref:i,asChild:e,onClick:t,...r,children:n})});wI.displayName=`DialogClose`;var TI=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(lN,{ref:n,className:B(`fixed inset-0 z-50 bg-black/40 backdrop-blur-[1px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t}));TI.displayName=lN.displayName;var EI=L.forwardRef(({className:e,children:t,...n},r)=>{let{isCompactViewport:i,open:a,onOpenChange:o}=xI();if(i){let i=nP(n);return(0,R.jsx)(rP,{open:a,onOpenChange:o,children:(0,R.jsx)(`div`,{ref:r,className:B(`grid gap-4 overflow-y-auto px-4 pt-2 pb-[max(1rem,env(safe-area-inset-bottom))]`,e),...i,children:t})})}return(0,R.jsxs)(cN,{children:[(0,R.jsx)(TI,{}),(0,R.jsxs)(uN,{ref:r,className:B(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg`,e),...n,children:[t,(0,R.jsxs)(pN,{className:`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-state-active data-[state=open]:text-foreground`,children:[(0,R.jsx)(V,{name:`X`,className:`h-4 w-4`}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})});EI.displayName=`DialogContent`;var DI=({className:e,...t})=>(0,R.jsx)(`div`,{className:B(`flex flex-col space-y-1.5 text-center sm:text-left`,e),...t});DI.displayName=`DialogHeader`;var OI=({className:e,...t})=>(0,R.jsx)(`div`,{className:B(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});OI.displayName=`DialogFooter`;var kI=L.forwardRef(({className:e,...t},n)=>{let{isCompactViewport:r}=xI();return(0,R.jsx)(r?QN:dN,{ref:n,className:B(`text-lg font-semibold leading-none tracking-tight`,e),...t})});kI.displayName=`DialogTitle`;var AI=L.forwardRef(({className:e,...t},n)=>{let{isCompactViewport:r}=xI();return(0,R.jsx)(r?$N:fN,{ref:n,className:B(`text-sm text-muted-foreground`,e),...t})});AI.displayName=fN.displayName;function jI({target:e,pending:t=!1,platform:n,onOpenChange:r,onSubmit:i}){return(0,R.jsx)(SI,{open:e!==null,onOpenChange:r,children:(0,R.jsx)(EI,{children:e?(0,R.jsx)(FI,{target:e,pending:t,platform:n,onSubmit:i},e.kind===`create`?`create`:e.projectId):null})})}function MI(e){switch(e){case`create`:return`Add project`;case`update`:return`Update project path`;case`add-source`:return`Add project source`}}function NI(e){switch(e){case`create`:return`Add project`;case`update`:return`Save path`;case`add-source`:return`Add source`}}function PI(e){let t=`/path/to/project`;return e===`wsl`?{description:`Enter an absolute WSL path to the project folder, such as /home/me/repo or /mnt/c/...`,placeholder:t}:{description:`Enter an absolute path to the project folder.`,placeholder:t}}function FI({target:e,pending:t,platform:n,onSubmit:r}){let i=(0,L.useId)(),[a,o]=(0,L.useState)(e.kind===`update`?e.currentPath:``),[s,c]=(0,L.useState)(null),l=wE(a),u=PI(n),d=e.kind===`update`&&e.currentPath||u.placeholder;return(0,L.useEffect)(()=>{c(null)},[a]),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(DI,{children:[(0,R.jsx)(kI,{children:MI(e.kind)}),(0,R.jsx)(AI,{children:u.description})]}),(0,R.jsxs)(`form`,{className:`space-y-4`,onSubmit:n=>{if(n.preventDefault(),t)return;let i=SE(a),o=CE(i);if(o){c(o);return}if(e.kind===`create`&&!wE(i)){c(`Could not derive a project name from that path.`);return}r(e,i)},children:[(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(Z_,{id:i,"aria-label":`Project path`,value:a,autoFocus:!0,disabled:t,placeholder:d,onChange:e=>{o(e.target.value)}}),e.kind===`create`&&l?(0,R.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Project name:`,` `,(0,R.jsx)(`span`,{className:`font-medium text-foreground`,children:l})]}):null,s?(0,R.jsx)(`p`,{className:`text-sm text-destructive`,children:s}):null]}),(0,R.jsx)(OI,{children:(0,R.jsx)(O_,{type:`submit`,disabled:t,children:NI(e.kind)})})]})]})}function II({target:e,pending:t,onOpenChange:n,onDelete:r}){return(0,R.jsx)(SI,{open:e!==null,onOpenChange:n,children:(0,R.jsx)(EI,{children:e?(0,R.jsx)(LI,{target:e,pending:t,onDelete:r}):null})})}function LI({target:e,pending:t,onDelete:n}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(DI,{children:[(0,R.jsx)(kI,{children:`Remove project?`}),(0,R.jsx)(AI,{children:`Remove "${e.name}" and all of its threads? This cannot be undone.`})]}),(0,R.jsx)(OI,{children:(0,R.jsx)(O_,{type:`button`,variant:`destructive`,disabled:t,onClick:()=>n(e.id),children:`Remove project`})})]})}function RI({target:e,pending:t=!1,onOpenChange:n,onRename:r}){return(0,R.jsx)(SI,{open:e!==null,onOpenChange:n,children:(0,R.jsx)(EI,{children:e?(0,R.jsx)(zI,{target:e,pending:t,onRename:r},e.id):null})})}function zI({target:e,pending:t,onRename:n}){let r=(0,L.useId)(),[i,a]=(0,L.useState)(e.currentName),[o,s]=(0,L.useState)(null);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(DI,{children:[(0,R.jsx)(kI,{children:`Rename project`}),(0,R.jsx)(AI,{children:`Choose a new name for this project.`})]}),(0,R.jsxs)(`form`,{className:`space-y-4`,onSubmit:r=>{if(r.preventDefault(),t)return;let a=i.trim();if(!a){s(`Project name cannot be empty.`);return}n(e.id,a)},children:[(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(Z_,{id:r,"aria-label":`Project name`,value:i,autoFocus:!0,autoCapitalize:`words`,autoCorrect:`off`,spellCheck:!1,disabled:t,onChange:e=>{a(e.target.value),o&&s(null)}}),o?(0,R.jsx)(`p`,{className:`text-sm text-destructive`,children:o}):null]}),(0,R.jsx)(OI,{children:(0,R.jsx)(O_,{type:`submit`,disabled:t,children:`Rename project`})})]})]})}var BI=`bb.sidebar.collapsedProjects`,VI=`bb.sidebar.collapsedManagers`,HI=Dg(BI,[],Bk(),{getOnInit:!0}),UI=Dg(VI,[],Bk(),{getOnInit:!0}),WI=(0,L.createContext)(null);function GI(){let e=(0,L.useContext)(WI);if(!e)throw Error(`useProjectActions must be used within a <ProjectActionsProvider>`);return e}function KI({children:e}){let t=$m(),n=Cg(HI),r=pI(),i=mI(),a=hI(),{mutate:o}=r,{mutate:s}=i,{mutate:c}=a,l=vI(),u=vI(),{onClose:d,onOpen:f}=l,{onClose:p,onOpen:m}=u,h=(0,L.useCallback)(({path:e,hostId:t,target:n,closeDialog:r})=>{n.kind===`add-source`&&c({projectId:n.projectId,path:e,hostId:t},{onSuccess:r})},[c]),g=yI({isPending:a.isPending,submit:h}),_=(0,L.useCallback)(e=>{f({id:e.id,currentName:e.name})},[f]),v=(0,L.useCallback)((e,t)=>{o({id:e,name:t},{onSuccess:()=>d()})},[d,o]),y=(0,L.useCallback)(e=>{m({id:e.id,name:e.name})},[m]),b=(0,L.useCallback)(e=>{s(e,{onSuccess:()=>{p(),n(t=>t.filter(t=>t!==e)),t(`/`,{replace:!0})}})},[p,s,t,n]),x=(0,L.useCallback)(e=>{g.openPicker({kind:`add-source`,projectId:e.id,projectName:e.name})},[g]),S=(0,L.useMemo)(()=>({requestRename:_,requestDelete:y,requestAddLocalPath:x}),[_,y,x]);return(0,R.jsxs)(WI.Provider,{value:S,children:[e,(0,R.jsx)(RI,{target:l.target,pending:r.isPending,onOpenChange:l.onOpenChange,onRename:v}),(0,R.jsx)(II,{target:u.target,pending:i.isPending,onOpenChange:u.onOpenChange,onDelete:b}),(0,R.jsx)(jI,{target:g.projectPathDialog.target,pending:a.isPending,platform:g.platform,onOpenChange:g.projectPathDialog.onOpenChange,onSubmit:g.submitProjectPath})]})}function qI({children:e,className:t,onSelect:n,surface:r}){return r===`context`?(0,R.jsx)(qP,{className:t,onSelect:n,children:e}):(0,R.jsx)(uP,{className:t,onSelect:n,children:e})}function JI({project:e,surface:t}){let{localHostId:n}=iA(),{requestRename:r,requestDelete:i,requestAddLocalPath:a}=GI(),o=n!=null&&!vE(e.sources,n);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(qI,{surface:t,onSelect:n=>{t===`dropdown`&&n.preventDefault(),r(e)},children:`Rename`}),o?(0,R.jsx)(qI,{surface:t,onSelect:n=>{t===`dropdown`&&n.preventDefault(),a(e)},children:`Add local path`}):null,(0,R.jsx)(qI,{surface:t,className:`text-destructive focus:text-destructive`,onSelect:n=>{t===`dropdown`&&n.preventDefault(),i(e)},children:`Remove`})]})}function YI({project:e,triggerClassName:t,align:n=`end`,onOpenChange:r}){return(0,R.jsxs)(oP,{onOpenChange:r,children:[(0,R.jsx)(sP,{asChild:!0,children:(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:B(`rounded-md p-0 text-muted-foreground`,t),"aria-label":`${e.name} actions`,title:`${e.name} actions`,onClick:e=>{e.stopPropagation()},children:(0,R.jsx)(V,{name:`MoreHorizontal`,className:j_})})}),(0,R.jsx)(cP,{align:n,className:`w-44`,children:(0,R.jsx)(JI,{project:e,surface:`dropdown`})})]})}function XI({children:e,project:t,onOpenChange:n}){return(0,R.jsxs)(WP,{onOpenChange:n,children:[(0,R.jsx)(GP,{asChild:!0,children:e}),(0,R.jsx)(KP,{"aria-label":`${t.name} actions`,className:`w-44`,children:(0,R.jsx)(JI,{project:t,surface:`context`})})]})}function ZI(e){return e.title&&e.title.trim().length>0?e.title:e.titleFallback&&e.titleFallback.trim().length>0?e.titleFallback:`Thread ${e.id.slice(0,8)}`}function QI(e){return e===`manager`?`manager`:`thread`}function $I(e){return(e.lastReadAt??0)>=e.latestAttentionAt}var eL=e=>{switch(e){case`success`:return rL;case`info`:return aL;case`warning`:return iL;case`error`:return oL;default:return null}},tL=Array(12).fill(0),nL=({visible:e,className:t})=>L.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},L.createElement(`div`,{className:`sonner-spinner`},tL.map((e,t)=>L.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),rL=L.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},L.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),iL=L.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},L.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),aL=L.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},L.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),oL=L.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},L.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),sL=L.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},L.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),L.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),cL=()=>{let[e,t]=L.useState(document.hidden);return L.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},lL=1,uL=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:lL++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=e instanceof Promise?e:e(),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],L.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(fL(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description;this.create({id:n,type:`error`,message:r,description:a})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description;this.create({id:n,type:`success`,message:r,description:a})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description;this.create({id:n,type:`error`,message:r,description:a})}}).finally(()=>{var e;i&&(this.dismiss(n),n=void 0),(e=t.finally)==null||e.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||lL++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},dL=(e,t)=>{let n=t?.id||lL++;return uL.addToast({title:e,...t,id:n}),n},fL=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,pL=Object.assign(dL,{success:uL.success,info:uL.info,warning:uL.warning,error:uL.error,custom:uL.custom,message:uL.message,promise:uL.promise,dismiss:uL.dismiss,loading:uL.loading},{getHistory:()=>uL.toasts,getToasts:()=>uL.getActiveToasts()});function mL(e,{insertAt:t}={}){if(!e||typeof document>`u`)return;let n=document.head||document.getElementsByTagName(`head`)[0],r=document.createElement(`style`);r.type=`text/css`,t===`top`&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}mL(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
1420
1420
|
`);function hL(e){return e.label!==void 0}var gL=3,_L=`32px`,vL=`16px`,yL=4e3,bL=356,xL=14,SL=20,CL=200;function wL(...e){return e.filter(Boolean).join(` `)}function TL(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var EL=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,loadingIcon:S,expandByDefault:C,classNames:w,icons:T,closeButtonAriaLabel:E=`Close toast`,pauseWhenPageIsHidden:D}=e,[O,k]=L.useState(null),[A,j]=L.useState(null),[M,N]=L.useState(!1),[P,ee]=L.useState(!1),[F,te]=L.useState(!1),[ne,re]=L.useState(!1),[ie,ae]=L.useState(!1),[oe,I]=L.useState(0),[se,ce]=L.useState(0),le=L.useRef(n.duration||y||yL),ue=L.useRef(null),de=L.useRef(null),fe=c===0,pe=c+1<=o,me=n.type,he=n.dismissible!==!1,ge=n.className||``,_e=n.descriptionClassName||``,ve=L.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),ye=L.useMemo(()=>n.closeButton??p,[n.closeButton,p]),be=L.useMemo(()=>n.duration||y||yL,[n.duration,y]),xe=L.useRef(0),Se=L.useRef(0),Ce=L.useRef(0),we=L.useRef(null),[Te,Ee]=b.split(`-`),De=L.useMemo(()=>s.reduce((e,t,n)=>n>=ve?e:e+t.height,0),[s,ve]),Oe=cL(),ke=n.invert||t,Ae=me===`loading`;Se.current=L.useMemo(()=>ve*x+De,[ve,De]),L.useEffect(()=>{le.current=be},[be]),L.useEffect(()=>{N(!0)},[]),L.useEffect(()=>{let e=de.current;if(e){let t=e.getBoundingClientRect().height;return ce(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),L.useLayoutEffect(()=>{if(!M)return;let e=de.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,ce(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[M,n.title,n.description,a,n.id]);let je=L.useCallback(()=>{ee(!0),I(Se.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},CL)},[n,d,a,Se]);L.useEffect(()=>{if(n.promise&&me===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||D&&Oe?(()=>{if(Ce.current<xe.current){let e=new Date().getTime()-xe.current;le.current-=e}Ce.current=new Date().getTime()})():le.current!==1/0&&(xe.current=new Date().getTime(),e=setTimeout(()=>{var e;(e=n.onAutoClose)==null||e.call(n,n),je()},le.current)),()=>clearTimeout(e)},[u,i,n,me,D,Oe,je]),L.useEffect(()=>{n.delete&&je()},[je,n.delete]);function Me(){return T!=null&&T.loading?L.createElement(`div`,{className:wL(w?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":me===`loading`},T.loading):S?L.createElement(`div`,{className:wL(w?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":me===`loading`},S):L.createElement(nL,{className:wL(w?.loader,n?.classNames?.loader),visible:me===`loading`})}return L.createElement(`li`,{tabIndex:0,ref:de,className:wL(_,ge,w?.toast,n?.classNames?.toast,w?.default,w?.[me],n?.classNames?.[me]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":M,"data-promise":!!n.promise,"data-swiped":ie,"data-removed":P,"data-visible":pe,"data-y-position":Te,"data-x-position":Ee,"data-index":c,"data-front":fe,"data-swiping":F,"data-dismissible":he,"data-type":me,"data-invert":ke,"data-swipe-out":ne,"data-swipe-direction":A,"data-expanded":!!(u||C&&M),style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${P?oe:Se.current}px`,"--initial-height":C?`auto`:`${se}px`,...m,...n.style},onDragEnd:()=>{te(!1),k(null),we.current=null},onPointerDown:e=>{Ae||!he||(ue.current=new Date,I(Se.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(te(!0),we.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e;if(ne||!he)return;we.current=null;let t=Number(de.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),r=Number(de.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),i=new Date().getTime()-ue.current?.getTime(),a=O===`x`?t:r,o=Math.abs(a)/i;if(Math.abs(a)>=SL||o>.11){I(Se.current),(e=n.onDismiss)==null||e.call(n,n),j(O===`x`?t>0?`right`:`left`:r>0?`down`:`up`),je(),re(!0),ae(!1);return}te(!1),k(null)},onPointerMove:t=>{var n,r;if(!we.current||!he||window.getSelection()?.toString().length>0)return;let i=t.clientY-we.current.y,a=t.clientX-we.current.x,o=e.swipeDirections??TL(b);!O&&(Math.abs(a)>1||Math.abs(i)>1)&&k(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0};O===`y`?(o.includes(`top`)||o.includes(`bottom`))&&(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)&&(s.y=i):O===`x`&&(o.includes(`left`)||o.includes(`right`))&&(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)&&(s.x=a),(Math.abs(s.x)>0||Math.abs(s.y)>0)&&ae(!0),(n=de.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=de.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},ye&&!n.jsx?L.createElement(`button`,{"aria-label":E,"data-disabled":Ae,"data-close-button":!0,onClick:Ae||!he?()=>{}:()=>{var e;je(),(e=n.onDismiss)==null||e.call(n,n)},className:wL(w?.closeButton,n?.classNames?.closeButton)},T?.close??sL):null,n.jsx||(0,L.isValidElement)(n.title)?n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title:L.createElement(L.Fragment,null,me||n.icon||n.promise?L.createElement(`div`,{"data-icon":``,className:wL(w?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Me():null,n.type===`loading`?null:n.icon||T?.[me]||eL(me)):null,L.createElement(`div`,{"data-content":``,className:wL(w?.content,n?.classNames?.content)},L.createElement(`div`,{"data-title":``,className:wL(w?.title,n?.classNames?.title)},typeof n.title==`function`?n.title():n.title),n.description?L.createElement(`div`,{"data-description":``,className:wL(v,_e,w?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),(0,L.isValidElement)(n.cancel)?n.cancel:n.cancel&&hL(n.cancel)?L.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{var t,r;hL(n.cancel)&&he&&((r=(t=n.cancel).onClick)==null||r.call(t,e),je())},className:wL(w?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,(0,L.isValidElement)(n.action)?n.action:n.action&&hL(n.action)?L.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{var t,r;hL(n.action)&&((r=(t=n.action).onClick)==null||r.call(t,e),!e.defaultPrevented&&je())},className:wL(w?.actionButton,n?.classNames?.actionButton)},n.action.label):null))};function DL(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function OL(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?vL:_L;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var kL=(0,L.forwardRef)(function(e,t){let{invert:n,position:r=`bottom-right`,hotkey:i=[`altKey`,`KeyT`],expand:a,closeButton:o,className:s,offset:c,mobileOffset:l,theme:u=`light`,richColors:d,duration:f,style:p,visibleToasts:m=gL,toastOptions:h,dir:g=DL(),gap:_=xL,loadingIcon:v,icons:y,containerAriaLabel:b=`Notifications`,pauseWhenPageIsHidden:x}=e,[S,C]=L.useState([]),w=L.useMemo(()=>Array.from(new Set([r].concat(S.filter(e=>e.position).map(e=>e.position)))),[S,r]),[T,E]=L.useState([]),[D,O]=L.useState(!1),[k,A]=L.useState(!1),[j,M]=L.useState(u===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:u),N=L.useRef(null),P=i.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),ee=L.useRef(null),F=L.useRef(!1),te=L.useCallback(e=>{C(t=>{var n;return(n=t.find(t=>t.id===e.id))!=null&&n.delete||uL.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return L.useEffect(()=>uL.subscribe(e=>{if(e.dismiss){C(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t));return}setTimeout(()=>{bs.flushSync(()=>{C(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),L.useEffect(()=>{if(u!==`system`){M(u);return}if(u===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?M(`dark`):M(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{M(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{M(e?`dark`:`light`)}catch(e){console.error(e)}})}},[u]),L.useEffect(()=>{S.length<=1&&O(!1)},[S]),L.useEffect(()=>{let e=e=>{var t,n;i.every(t=>e[t]||e.code===t)&&(O(!0),(t=N.current)==null||t.focus()),e.code===`Escape`&&(document.activeElement===N.current||(n=N.current)!=null&&n.contains(document.activeElement))&&O(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[i]),L.useEffect(()=>{if(N.current)return()=>{ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null,F.current=!1)}},[N.current]),L.createElement(`section`,{ref:t,"aria-label":`${b} ${P}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},w.map((t,r)=>{let[i,u]=t.split(`-`);return S.length?L.createElement(`ol`,{key:t,dir:g===`auto`?DL():g,tabIndex:-1,ref:N,className:s,"data-sonner-toaster":!0,"data-theme":j,"data-y-position":i,"data-lifted":D&&S.length>1&&!a,"data-x-position":u,style:{"--front-toast-height":`${T[0]?.height||0}px`,"--width":`${bL}px`,"--gap":`${_}px`,...p,...OL(c,l)},onBlur:e=>{F.current&&!e.currentTarget.contains(e.relatedTarget)&&(F.current=!1,ee.current&&=(ee.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||F.current||(F.current=!0,ee.current=e.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{k||O(!1)},onDragEnd:()=>O(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||A(!0)},onPointerUp:()=>A(!1)},S.filter(e=>!e.position&&r===0||e.position===t).map((r,i)=>L.createElement(EL,{key:r.id,icons:y,index:i,toast:r,defaultRichColors:d,duration:h?.duration??f,className:h?.className,descriptionClassName:h?.descriptionClassName,invert:n,visibleToasts:m,closeButton:h?.closeButton??o,interacting:k,position:t,style:h?.style,unstyled:h?.unstyled,classNames:h?.classNames,cancelButtonStyle:h?.cancelButtonStyle,actionButtonStyle:h?.actionButtonStyle,removeToast:te,toasts:S.filter(e=>e.position==r.position),heights:T.filter(e=>e.position==r.position),setHeights:E,expandByDefault:a,gap:_,loadingIcon:v,expanded:D,pauseWhenPageIsHidden:x,swipeDirections:e.swipeDirections}))):null}))});function AL(e){return QP(e,{queryKey:RO()})}function jL(e,t){$P(e,{queryKey:RO(),mapper:e=>e.filter(e=>e.id!==t)})}function ML(e,t){for(let{queryKey:n,data:r}of t)e.setQueryData(n,r)}function NL({queryClient:e,thread:t}){$P(e,{queryKey:RO(),mapper:e=>e.map(e=>e.id===t.id?{...e,...t}:e)})}function PL(){let e=et();return bt({meta:{errorMessage:`Failed to update thread.`},mutationFn:({id:e,...t})=>ppe(e,t),onSuccess:t=>{e.setQueryData(BO(t.id),t),KF({queryClient:e})}})}function FL(){let e=et();return bt({meta:{errorMessage:`Failed to archive thread.`,showErrorToast:!1},mutationFn:({id:e})=>kpe(e),onMutate:async({id:t})=>{await e.cancelQueries({queryKey:BO(t)}),await e.cancelQueries({queryKey:RO()});let n=e.getQueryData(BO(t)),r=AL(e),i=Date.now();return e.setQueryData(BO(t),e=>e&&{...e,archivedAt:i}),jL(e,t),{previousThread:n,previousThreadLists:r}},onError:(t,n,r)=>{r&&(e.setQueryData(BO(n.id),r.previousThread),ML(e,r.previousThreadLists))},onSettled:(t,n,r)=>{qF({queryClient:e,threadId:r.id})}})}function IL(){let e=et();return bt({meta:{errorMessage:`Failed to unarchive thread.`},mutationFn:({id:e})=>Ape(e),onMutate:async({id:t})=>{await e.cancelQueries({queryKey:BO(t)}),await e.cancelQueries({queryKey:RO()});let n=e.getQueryData(BO(t)),r=AL(e);return e.setQueryData(BO(t),e=>e&&{...e,archivedAt:null}),jL(e,t),{previousThread:n,previousThreadLists:r}},onError:(t,n,r)=>{r&&(e.setQueryData(BO(n.id),r.previousThread),ML(e,r.previousThreadLists))},onSettled:(t,n,r)=>{qF({queryClient:e,threadId:r.id})}})}function LL(){let e=et();return bt({meta:{errorMessage:`Failed to delete thread.`},mutationFn:({id:e,managerChildThreadsConfirmed:t})=>jpe(e,{managerChildThreadsConfirmed:t}),onMutate:async({id:t})=>{await e.cancelQueries({queryKey:BO(t)}),await e.cancelQueries({queryKey:RO()}),await e.cancelQueries({queryKey:jO()});let n=e.getQueryData(BO(t)),r=AL(e),i=e.getQueryData(jO()),a=n?.environmentId;return rI({queryClient:e,threadId:t}),LF({environmentId:a,queryClient:e}),jL(e,t),{previousThread:n,previousThreadLists:r,previousProjects:i,environmentId:a}},onError:(t,n,r)=>{r&&(e.setQueryData(BO(n.id),r.previousThread),ML(e,r.previousThreadLists),e.setQueryData(jO(),r.previousProjects))},onSettled:(t,n,r,i)=>{rI({queryClient:e,threadId:r.id}),LF({environmentId:i?.environmentId,queryClient:e}),XF({queryClient:e})}})}function RL(){let e=et();return bt({meta:{errorMessage:`Failed to mark thread read.`,showErrorToast:!1},mutationFn:e=>Mpe(e),onSuccess:t=>{e.setQueryData(BO(t.id),t),NL({queryClient:e,thread:t})}})}function zL(){let e=et();return bt({meta:{errorMessage:`Failed to mark thread unread.`,showErrorToast:!1},mutationFn:e=>Npe(e),onSuccess:t=>{e.setQueryData(BO(t.id),t),NL({queryClient:e,thread:t})}})}var BL=/^HTTP \d{3}:\s*/u,VL=`Could not reach the server. Check that it is running and try again.`;function HL(e){return e.replace(/\s+/g,` `).trim()}function UL(e){return e.replace(BL,``)}function WL(e){return e instanceof DOMException&&e.name===`AbortError`?!0:ID(e)?.name===`AbortError`}function GL(e){if(e instanceof JD||WL(e))return!1;let t=ID(e);if(!t||typeof t.message!=`string`)return!1;let n=HL(t.message).toLowerCase();return n.includes(`failed to fetch`)||n.includes(`load failed`)||n.includes(`networkerror`)}function KL(e){let t=LD(e.body);if(t)return HL(t);let n=UL(HL(e.message));return n.length>0?n:null}function qL(e){if(!e)return{};let t=typeof e.errorMessage==`string`?HL(e.errorMessage):void 0,n=typeof e.showErrorToast==`boolean`?e.showErrorToast:void 0;return{...t?{errorMessage:t}:{},...n===void 0?{}:{showErrorToast:n}}}function JL({error:e,fallbackMessage:t}){if(e instanceof JD)return KL(e)??t;if(GL(e))return VL;let n=LD(e);if(!n)return t;let r=UL(HL(n));return r.length>0?r:t}function YL(e){return!WL(e)}function XL({error:e,fallbackMessage:t}){YL(e)&&pL.error(JL({error:e,fallbackMessage:t}))}function ZL({target:e,pending:t=!1,onOpenChange:n,onRename:r}){return(0,R.jsx)(SI,{open:e!==null,onOpenChange:n,children:(0,R.jsx)(EI,{children:e?(0,R.jsx)(QL,{target:e,pending:t,onRename:r},e.id):null})})}function QL({target:e,pending:t,onRename:n}){let r=(0,L.useId)(),[i,a]=(0,L.useState)(e.currentTitle),[o,s]=(0,L.useState)(null),c=r=>{if(r.preventDefault(),t)return;let a=i.trim();if(!a){s(`${l.charAt(0).toUpperCase()+l.slice(1)} name cannot be empty.`);return}n(e.id,a)},l=QI(e.threadType??`standard`);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(DI,{children:[(0,R.jsxs)(kI,{children:[`Rename `,l]}),(0,R.jsxs)(AI,{children:[`Choose a new name for this `,l,`.`]})]}),(0,R.jsxs)(`form`,{className:`space-y-4`,onSubmit:c,children:[(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(Z_,{id:r,"aria-label":`${l.charAt(0).toUpperCase()+l.slice(1)} name`,value:i,autoFocus:!0,autoCapitalize:`sentences`,autoCorrect:`off`,spellCheck:!1,disabled:t,onChange:e=>{a(e.target.value),o&&s(null)}}),o?(0,R.jsx)(`p`,{className:`text-sm text-destructive`,children:o}):null]}),(0,R.jsx)(OI,{children:(0,R.jsxs)(O_,{type:`submit`,disabled:t,children:[`Rename `,l]})})]})]})}function $L({target:e,pending:t,onOpenChange:n,onDelete:r}){return(0,R.jsx)(SI,{open:e!==null,onOpenChange:n,children:(0,R.jsx)(EI,{children:e?(0,R.jsx)(eR,{target:e,pending:t,onOpenChange:n,onDelete:r}):null})})}function eR({target:e,pending:t,onOpenChange:n,onDelete:r}){let i=QI(e.thread.type),a=[e.assignedChildCount?`Assigned threads will be unassigned.`:null,`This action cannot be undone.`].filter(e=>e!==null);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(DI,{children:[(0,R.jsxs)(kI,{children:[`Delete `,i,`?`]}),(0,R.jsx)(AI,{children:a.join(` `)})]}),(0,R.jsxs)(OI,{children:[(0,R.jsx)(O_,{type:`button`,variant:`outline`,disabled:t,onClick:()=>n(!1),children:`Cancel`}),(0,R.jsxs)(O_,{type:`button`,variant:`destructive`,disabled:t,onClick:()=>r(e),children:[`Delete `,i]})]})]})}function tR(e){return $I(e)?`mark_unread`:`mark_read`}var nR=(0,L.createContext)(null);function rR(){let e=(0,L.useContext)(nR);if(!e)throw Error(`useThreadActions must be used within a <ThreadActionsProvider>`);return e}function iR({children:e}){let t=$m(),{threadId:n}=FE(),r=FL(),i=IL(),a=RL(),o=zL(),s=LL(),c=PL(),l=(0,L.useRef)(null),{mutate:u}=r,{mutate:d}=i,{mutate:f}=a,{mutate:p}=o,{mutate:m}=s,{mutate:h}=c,g=vI(),_=vI(),{onClose:v,onOpen:y}=g,{onClose:b,onOpen:x}=_;(0,L.useEffect)(()=>()=>{l.current?.abort(),l.current=null},[]);let S=(0,L.useCallback)(e=>{n===e.id&&t(`/projects/${e.projectId}`)},[t,n]),C=(0,L.useCallback)(e=>{y({id:e.id,currentTitle:ZI(e),threadType:e.type})},[y]),w=(0,L.useCallback)((e,t)=>{h({id:e,title:t},{onSuccess:()=>{v()}})},[v,h]),T=(0,L.useCallback)(async(e,t)=>{try{let n=e.type===`manager`?await cpe(e.id,t):null;return t.aborted?null:{assignedChildCount:n?.nonDeletedAssignedChildCount??0}}catch(e){return t.aborted||YL(e)&&pL.error(JL({error:e,fallbackMessage:`Failed to check thread state.`})),null}},[]),E=(0,L.useCallback)(()=>{l.current?.abort();let e=new AbortController;return l.current=e,e},[]);function D(e,t){return{...e,...t.assignedChildCount>0?{assignedChildCount:t.assignedChildCount}:{}}}let O=(0,L.useCallback)(({closeDialog:e,managerChildThreadsConfirmed:t,thread:n})=>{m({id:n.id,managerChildThreadsConfirmed:t},{onSuccess:()=>{e(),S(n)}})},[m,S]),k=(0,L.useCallback)(async e=>{let t=E(),n=await T(e,t.signal);n===null||t.signal.aborted||(l.current===t&&(l.current=null),x(D({thread:e},n)))},[E,T,x]),A=(0,L.useCallback)(e=>{O({closeDialog:b,managerChildThreadsConfirmed:e.assignedChildCount!==void 0,thread:e.thread})},[b,O]),j=(0,L.useCallback)((e,t)=>{pL.error(JL({error:t,fallbackMessage:`Failed to archive ${QI(e.type)}.`}))},[]),M=(0,L.useCallback)(e=>{u({id:e.id},{onSuccess:()=>{S(e),pL.success(`Archived ${QI(e.type)}`,{action:{label:`Undo`,onClick:()=>{d({id:e.id})}}})},onError:t=>{j(e,t)}})},[u,S,j,d]),N=(0,L.useCallback)(e=>{if(e.archivedAt!=null){d({id:e.id});return}M(e)},[M,d]),P=(0,L.useCallback)(e=>{if(tR(e)===`mark_unread`){p(e.id,{onError:e=>{pL.error(JL({error:e,fallbackMessage:`Failed to mark thread unread.`}))}});return}f(e.id,{onError:e=>{pL.error(JL({error:e,fallbackMessage:`Failed to mark thread read.`}))}})},[f,p]),ee=(0,L.useMemo)(()=>({requestRename:C,requestDelete:k,toggleArchive:N,toggleRead:P}),[C,k,N,P]);return(0,R.jsxs)(nR.Provider,{value:ee,children:[e,(0,R.jsx)(ZL,{target:g.target,pending:c.isPending,onOpenChange:g.onOpenChange,onRename:w}),(0,R.jsx)($L,{target:_.target,pending:s.isPending,onOpenChange:_.onOpenChange,onDelete:A})]})}function aR({children:e,className:t,onSelect:n,surface:r}){return r===`context`?(0,R.jsx)(qP,{className:t,onSelect:n,children:e}):(0,R.jsx)(uP,{className:t,onSelect:n,children:e})}function oR({checked:e,children:t,onCheckedChange:n,onSelect:r,surface:i}){return i===`context`?(0,R.jsx)(JP,{checked:e,onCheckedChange:n,onSelect:r,children:t}):(0,R.jsx)(dP,{checked:e,onCheckedChange:n,onSelect:r,children:t})}function sR({surface:e}){return e===`context`?(0,R.jsx)(YP,{}):(0,R.jsx)(pP,{})}function cR({thread:e,canDelete:t=!0,viewerToggleLabel:n,viewerToggleChecked:r,onViewerToggleCheckedChange:i,surface:a}){let{requestRename:o,requestDelete:s,toggleArchive:c,toggleRead:l}=rR(),u=$I(e),d=e.archivedAt!=null;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(aR,{surface:a,onSelect:t=>{a===`dropdown`&&t.preventDefault(),l(e)},children:u?`Mark as unread`:`Mark as read`}),(0,R.jsx)(aR,{surface:a,onSelect:()=>{window.setTimeout(()=>{o(e)},0)},children:`Rename`}),(0,R.jsx)(aR,{surface:a,onSelect:t=>{a===`dropdown`&&t.preventDefault(),c(e)},children:d?`Unarchive`:`Archive`}),t?(0,R.jsx)(aR,{surface:a,className:`text-destructive focus:text-destructive`,onSelect:()=>{window.setTimeout(()=>{s(e)},0)},children:`Delete`}):null,n&&i?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(sR,{surface:a}),(0,R.jsx)(oR,{surface:a,checked:r,onCheckedChange:e=>{i(e===!0)},onSelect:e=>{a===`dropdown`&&e.preventDefault()},children:n})]}):null]})}function lR({thread:e,canDelete:t=!0,viewerToggleLabel:n,viewerToggleChecked:r,onViewerToggleCheckedChange:i,onOpenChange:a,triggerClassName:o,align:s=`end`}){let c=QI(e.type),l=c.charAt(0).toUpperCase()+c.slice(1);return(0,R.jsxs)(oP,{onOpenChange:a,children:[(0,R.jsx)(sP,{asChild:!0,children:(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:B(`rounded-md p-0`,o),"aria-label":`${l} actions`,title:`${l} actions`,onClick:e=>{e.stopPropagation()},children:(0,R.jsx)(V,{name:`MoreHorizontal`,className:j_})})}),(0,R.jsx)(cP,{align:s,className:`w-44`,children:(0,R.jsx)(cR,{thread:e,canDelete:t,viewerToggleLabel:n,viewerToggleChecked:r,onViewerToggleCheckedChange:i,surface:`dropdown`})})]})}function uR({children:e,thread:t,canDelete:n=!0,viewerToggleLabel:r,viewerToggleChecked:i,onViewerToggleCheckedChange:a,onOpenChange:o}){let s=QI(t.type),c=s.charAt(0).toUpperCase()+s.slice(1);return(0,R.jsxs)(WP,{onOpenChange:o,children:[(0,R.jsx)(GP,{asChild:!0,children:e}),(0,R.jsx)(KP,{"aria-label":`${c} actions`,className:`w-44`,children:(0,R.jsx)(cR,{thread:t,canDelete:n,viewerToggleLabel:r,viewerToggleChecked:i,onViewerToggleCheckedChange:a,surface:`context`})})]})}var dR=`Laptop`;function fR(e){return dR}function pR(e){switch(e){case`managed-worktree`:return`GitBranch`;case`unmanaged-worktree`:return`GitBranch`;case`other`:return null}}function mR(e){return pR(e)??`Laptop`}function hR(e){switch(e){case`managed-worktree`:return`Managed worktree environment`;case`unmanaged-worktree`:return`Git worktree environment`;case`other`:return null}}function gR(e){switch(e){case`active`:case`created`:case`host-reconnecting`:case`provisioning`:return!0;case`error`:case`idle`:case`waiting-for-host`:return!1;default:return jD(e)}}function _R(e,t){throw Error(t??`Unexpected value: ${String(e)}`)}function vR(e){let t=e.replaceAll(`\\`,`/`).split(`/`),n=t[t.length-1];return n&&n.length>0?n:e}function yR({mode:e,path:t}){switch(e){case`compact`:return vR(t);case`full`:return t}}function bR(e){return(e??``).toLowerCase().replaceAll(/[^a-z0-9]/gu,``)}function xR(e){let t=e.trimEnd();return t.startsWith(`diff --git `)||t.startsWith(`index `)||t.startsWith(`new file mode `)||t.startsWith(`deleted file mode `)||t.startsWith(`similarity index `)||t.startsWith(`rename from `)||t.startsWith(`rename to `)||t.startsWith(`--- `)||t.startsWith(`+++ `)||t.startsWith(`@@`)||t===`\`}function SR(e){let t=e.diff;if(!t)return!1;for(let e of t.split(`
|
|
1421
1421
|
`))if(!(e.startsWith(`+++ `)||e.startsWith(`--- `))&&(e.startsWith(`+`)||e.startsWith(`-`)))return!0;return!1}function CR(e){if(e.movePath)return SR(e)?`edited`:`renamed`;let t=bR(e.kind);return t.includes(`add`)||t.includes(`create`)?`created`:t.includes(`delete`)||t.includes(`remove`)?`deleted`:`edited`}function wR(e){switch(e){case`created`:return`Created`;case`deleted`:return`Deleted`;case`renamed`:return`Renamed`;case`edited`:return`Edited`}}function TR(e){switch(e){case`created`:return`Creating`;case`deleted`:return`Deleting`;case`renamed`:return`Renaming`;case`edited`:return`Editing`}}function ER(e){switch(e){case`created`:return`create`;case`deleted`:return`delete`;case`renamed`:return`rename`;case`edited`:return`edit`}}function DR({change:e,mode:t}){let n=yR({path:e.path,mode:t});return e.movePath?CR(e)===`edited`?yR({path:e.movePath,mode:t}):`${n} -> ${yR({path:e.movePath,mode:t})}`:n}function OR(e,t,n){return`${e} ${e===1?t:n??`${t}s`}`}function kR(e){if(e===void 0)return;if(!Number.isFinite(e)||e<0)return`0s`;if(e<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/1e3);return t<60?`${t}s`:AR(t)}function AR(e){let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60,i=[];return t>0&&i.push(`${t}h`),n>0&&i.push(`${n}m`),r>0&&i.push(`${r}s`),i.join(` `)}var jR=new Intl.NumberFormat(`en-US`);function MR(e){return jR.format(e)}function NR(e){let{added:t,removed:n,hideZero:r=!1}=e,i=`+${MR(t)}`,a=`-${MR(n)}`;if(!r)return`${i} ${a}`;let o=[];return t>0&&o.push(i),n>0&&o.push(a),o.join(` `)}function PR(e){return e.activityIntents.find(e=>e.type!==`unknown`)??null}function FR(e){return PR(e)!==null}function IR(e){return e.path??e.name}function LR(e,t){return yR({path:IR(e),mode:t})}function RR({intent:e,pathMode:t,pending:n}){return zR({intent:e,pathMode:t,pending:n})}function zR({intent:e,pathMode:t,pending:n}){switch(e.type){case`read`:return{prefix:n?`Reading`:`Read`,content:LR(e,t)};case`list_files`:return{prefix:n?`Listing`:`Listed`,content:e.path?`files in ${e.path}`:`files`};case`search`:{let t=n?`Searching`:`Searched`;return e.query&&e.path?{prefix:t,content:`for ${e.query} in ${e.path}`}:e.query?{prefix:t,content:`for ${e.query}`}:e.path?{prefix:t,content:`in ${e.path}`}:{prefix:t,content:`files`}}case`unknown`:return{prefix:null,content:e.command};default:return _R(e)}}function BR(e){switch(e.type){case`read`:return`read:${e.path??e.name}`;case`list_files`:return`list:${e.path??``}`;case`search`:return`search:${e.query??``}|${e.path??``}`;case`unknown`:return null;default:return _R(e)}}function VR(e){return e.length===0?e:`${e.charAt(0).toLowerCase()}${e.slice(1)}`}function HR(e){switch(e.type){case`read`:return e.path??e.name;case`list_files`:case`search`:case`unknown`:return null;default:return _R(e)}}function UR(e,t,n,r){for(let i of e.activityIntents)switch(i.type){case`read`:{let e=HR(i);e&&(n.add(e),r(`files`));break}case`list_files`:t.lists+=1,r(`lists`);break;case`search`:t.searches+=1,r(`searches`);break;case`unknown`:break;default:_R(i)}}function WR(e){return e.change.movePath??e.change.path}function GR(e){let t=[],n=new Set,r=e=>{n.has(e)||(n.add(e),t.push(e))},i={commands:0,createdFiles:0,deletedFiles:0,delegations:0,editedFiles:0,fileChanges:0,files:0,lists:0,renamedFiles:0,searches:0,tools:0,webFetches:0,webSearches:0,explorationKindOrder:t},a=new Set,o=new Set,s=new Set,c=new Set,l=new Set;for(let t of e)switch(t.workKind){case`command`:FR(t)?UR(t,i,a,r):i.commands+=1;break;case`tool`:FR(t)?UR(t,i,a,r):i.tools+=1;break;case`file-change`:switch(CR(t.change)){case`created`:o.add(WR(t));break;case`deleted`:s.add(WR(t));break;case`edited`:c.add(WR(t));break;case`renamed`:l.add(WR(t));break}break;case`web-fetch`:i.webFetches+=1;break;case`web-search`:i.webSearches+=Math.max(1,t.queries.length);break;case`delegation`:i.delegations+=1;break;case`question`:case`approval`:break;default:_R(t)}return i.files=a.size,i.createdFiles=o.size,i.deletedFiles=s.size,i.editedFiles=c.size,i.renamedFiles=l.size,i.fileChanges=i.createdFiles+i.deletedFiles+i.editedFiles+i.renamedFiles,i}function KR(e){let t=e.explorationKindOrder.map(t=>{switch(t){case`files`:return e.files>0?OR(e.files,`file`):null;case`searches`:return e.searches>0?OR(e.searches,`search`,`searches`):null;case`lists`:return e.lists>0?OR(e.lists,`list`):null;default:return _R(t)}}).filter(e=>e!==null);return t.length===0?null:t.join(`, `)}function qR(e){let t=null,n=0,r=0,i=0;for(let a of e){let e;switch(a.workKind){case`command`:if(a.approvalStatus===null)return null;e=a.approvalStatus,n+=1;break;case`file-change`:if(a.approvalStatus===null)return null;e=a.approvalStatus,r+=1;break;case`tool`:if(a.approvalStatus===null)return null;e=a.approvalStatus,i+=1;break;case`approval`:case`question`:case`delegation`:case`web-fetch`:case`web-search`:return null;default:_R(a)}if(t===null)t=e;else if(t!==e)return null}if(t===null)return null;let a=[n>0?OR(n,`command`):null,r>0?OR(r,`file change`):null,i>0?OR(i,`tool`):null].filter(e=>e!==null).join(`, `);return t===`denied`?`Denied ${a}`:`Waiting for approval on ${a}`}function JR(e){switch(e.workKind){case`command`:return FR(e)?`exploration`:`commands`;case`tool`:return FR(e)?`exploration`:`tools`;case`file-change`:return`fileChanges`;case`web-fetch`:case`web-search`:return`webResearch`;case`delegation`:return`delegations`;case`approval`:case`question`:return null;default:return _R(e)}}function YR(e){let t=[];for(let n of e){let e=JR(n);e&&!t.includes(e)&&t.push(e)}return t}var XR={created:`Creating`,deleted:`Deleting`,edited:`Editing`,renamed:`Renaming`},ZR={created:`Created`,deleted:`Deleted`,edited:`Edited`,renamed:`Renamed`};function QR(e,t){let n=[[`created`,e.createdFiles],[`deleted`,e.deletedFiles],[`edited`,e.editedFiles],[`renamed`,e.renamedFiles]].filter(([,e])=>e>0).map(([e,t])=>({action:e,count:t}));if(n.length===0)return null;if(n.length===1){let{action:e,count:r}=n[0];return`${t?XR[e]:ZR[e]} ${OR(r,`file`)}`}let r=n.reduce((e,t)=>e+t.count,0);return`${t?`Editing`:`Edited`} ${OR(r,`file`)}`}function $R(e,t,n){switch(e){case`exploration`:return n?`Explored ${n}`:null;case`commands`:return t.commands>0?`Ran ${OR(t.commands,`command`)}`:null;case`fileChanges`:return QR(t,!1);case`webResearch`:return nz(t,!1);case`delegations`:return t.delegations>0?`Ran ${OR(t.delegations,`subagent`)}`:null;case`tools`:return t.tools>0?`Ran ${OR(t.tools,`tool`)}`:null;default:return _R(e)}}function ez(e,t,n){switch(e){case`exploration`:return n?`Exploring ${n}`:null;case`commands`:return t.commands>0?`Running ${OR(t.commands,`command`)}`:null;case`fileChanges`:return QR(t,!0);case`webResearch`:return nz(t,!0);case`delegations`:return t.delegations>0?`Running ${OR(t.delegations,`subagent`)}`:null;case`tools`:return t.tools>0?`Running ${OR(t.tools,`tool`)}`:null;default:return _R(e)}}function tz(e){return e.map((e,t)=>t===0?e:VR(e)).join(`, `)}function nz(e,t){let n=[];return e.webSearches>0&&n.push(OR(e.webSearches,`search query`,`search queries`)),e.webFetches>0&&n.push(OR(e.webFetches,`web page`)),n.length===0?null:`${t?`Researching`:`Researched`} ${n.join(`, `)}`}function rz(e,t={active:!1}){let n=qR(e.children);if(n!==null)return iz(n);let r=GR(e.children),i=t.active,a=KR(r),o=YR(e.children).map(e=>i?ez(e,r,a):$R(e,r,a)).filter(e=>e!==null);return o.length===0?{verb:i?`Working`:`Worked`,rest:``}:iz(tz(o))}function iz(e){let t=e.indexOf(` `);return t===-1?{verb:e,rest:``}:{verb:e.slice(0,t),rest:e.slice(t+1)}}function az(e,t){return e===`error`||t===`error`?`error`:e===`pending`||t===`pending`?`pending`:e===`interrupted`||t===`interrupted`?`interrupted`:`completed`}function oz(e){let t=e[0];if(!t)throw Error(`Cannot summarize an empty timeline activity run`);let n=t.sourceSeqStart,r=t.sourceSeqEnd,i=t.startedAt,a=t.createdAt,o=t.turnId,s=t.status;for(let t of e)n=Math.min(n,t.sourceSeqStart),r=Math.max(r,t.sourceSeqEnd),i=Math.min(i,t.startedAt),a=Math.max(a,t.createdAt),s=az(s,t.status),o!==t.turnId&&(o=null);return{id:[t.threadId,o??`thread`,`work-summary`,t.id].join(`:`),threadId:t.threadId,turnId:o,sourceSeqStart:n,sourceSeqEnd:r,startedAt:i,createdAt:a,status:s}}function sz(e){return e.kind===`work`&&e.workKind!==`approval`&&e.workKind!==`question`}function cz(e){return!(e.kind!==`conversation`||e.role===`user`&&e.userRequest.status===`pending`)}function lz(e){switch(e.workKind){case`command`:case`tool`:return FR(e)?`exploration`:e.workKind===`command`?`commands`:`tools`;case`file-change`:return`fileChanges`;case`delegation`:return`delegations`;case`web-search`:case`web-fetch`:return`webResearch`;case`approval`:case`question`:return`tools`;default:return _R(e)}}function uz(e){let t=null,n=[];for(let r of e){if(r.workKind!==`command`&&r.workKind!==`tool`||r.activityIntents.length===0){t=null,n.push(r);continue}let e=FR(r),i=[];for(let e of r.activityIntents){if(e.type===`unknown`){i.push(e);continue}let n=BR(e);n!==null&&n===t||(i.push(e),t=n)}if(i.length===r.activityIntents.length){n.push(r);continue}e&&!i.some(e=>e.type!==`unknown`)||n.push({...r,activityIntents:i})}return n}function dz(e){let t=uz(e);return{...oz(t),kind:`step-summary`,children:t}}function fz(e){let t=uz(e);return{...oz(t),kind:`bundle-summary`,children:t}}function pz(e){return e.length===0?[]:e.length===1?[{...e[0],inClosedStep:!0}]:[dz(e)]}function mz(e){if(e.length===0)return[];let t=[];for(let n of e){let e=lz(n),r=t[t.length-1];r&&r.concept===e?r.rows.push(n):t.push({concept:e,rows:[n]})}let n=[];for(let e of t)e.rows.length===1?n.push(e.rows[0]):n.push(fz(e.rows));return n}function hz(){return new WeakMap}function gz(e,t){if(e.workKind!==`delegation`)return e;let n=e.status!==`pending`;return{...e,childRows:vz(e.childRows,{cache:t,closedScope:n})}}function _z(e,t){switch(e.kind){case`conversation`:case`system`:return e;case`work`:return gz(e,t);case`turn`:return{...e,children:e.children?vz(e.children,{cache:t,closedScope:!0}):null};default:return _R(e)}}function vz(e,t={}){let n=t.cache;if(n){let t=n.get(e);if(t)return t}let r=n??hz(),i=e.map(e=>_z(e,r)),a=[],o=[];for(let e of i){if(sz(e)){o.push(e);continue}if(cz(e)){a.push(...pz(o)),o=[],a.push(e);continue}a.push(...mz(o)),o=[],a.push(e)}return t.closedScope?a.push(...pz(o)):a.push(...mz(o)),n&&n.set(e,a),a}var yz=new Set([`sh`,`bash`,`zsh`]);function bz(e){if(e.length<2)return e;let t=e[0];if(t!==`'`&&t!==`"`||e[e.length-1]!==t)return e;let n=e.slice(1,-1);if(t===`'`)return n;let r=``;for(let e=0;e<n.length;e+=1){let t=n[e];if(t===`\\`&&e+1<n.length){let t=n[e+1];if(t===`$`||t==="`"||t===`"`||t===`\\`||t===`
|
|
1422
1422
|
`){r+=t,e+=1;continue}}r+=t}return r}function xz(e){let t=e.split(`/`).pop()??e;return yz.has(t)}function Sz(e){let t=e.trim();if(t.length===0)return;let n=/^(\S+)\s+(-lc|-c)\s+([\s\S]+)$/.exec(t);if(!n)return t;let r=n[1],i=n[3];return!r||!i||!xz(r)?t:bz(i.trim())}function Cz(e,t){if(!t)return e;let n=Object.entries(t).filter(([,e])=>e!==void 0);return n.length===0?e:`${e} { ${n.map(([e,t])=>{let n=typeof t==`string`?t.trim():JSON.stringify(t);return`${e}: ${n.length>40?`${n.slice(0,37)}...`:n}`}).join(`, `)} }`}function wz(e){return e.replace(/[\r\n]+/gu,` `)}function Tz(e,t={}){return{text:wz(e),em:t.em??!1,shimmer:t.shimmer??!1,truncate:t.truncate??!1,...t.plainText===void 0?{}:{plainText:wz(t.plainText)},...t.link===void 0?{}:{link:t.link}}}function Ez(e){return e.filter(e=>e!==null)}function Dz(e){return e!==null&&e>1e3?e:null}function Oz(e,t,n={}){return t!==null&&Dz(t-e)===null?null:{kind:`duration`,startedAt:e,completedAt:t,em:n.em??!1}}function kz(e,t){return t===null?null:{kind:`duration`,startedAt:e,completedAt:t,em:!0}}function Az(e,t){return{kind:`status`,status:e,durationMs:Dz(t)}}function jz(e){let t=0,n=0;for(let r of e.children)r.status===`error`&&(t+=1),r.status===`interrupted`&&(n+=1);return t===0&&n===0?null:{kind:`summary-status`,errorCount:t,interruptedCount:n}}function Mz(e){let{added:t,removed:n}=e.diffStats;return t===0&&n===0?null:{kind:`diff-stats`,added:t,removed:n}}function Nz(e){switch(e.kind){case`duration`:return e.completedAt===null?``:`(${kR(e.completedAt-e.startedAt)})`;case`status`:return e.durationMs===null?`(${e.status})`:`(${kR(e.durationMs)}, ${e.status})`;case`summary-status`:{let t=[];return e.errorCount>0&&t.push(`${e.errorCount} error${e.errorCount>1?`s`:``}`),e.interruptedCount>0&&t.push(`${e.interruptedCount} interrupted`),t.length===0?``:`(${t.join(`, `)})`}case`diff-stats`:return NR({added:e.added,removed:e.removed,hideZero:!0});default:return _R(e)}}function Pz(e,t){let n=e.map(e=>e.plainText??e.text).filter(e=>e.length>0).join(` `),r=t.map(Nz).filter(e=>e.length>0).join(` `);return r.length===0?n:n.length===0?r:`${n} ${r}`}function Fz({segments:e,decorations:t=[],tone:n=`default`,action:r=null}){return{segments:e,decorations:t,tone:n,action:r,plain:Pz(e,t)}}function Iz({approvalStatus:e,status:t}){return e===`waiting_for_approval`?`waiting`:e===`denied`?`denied`:t}function Lz(e){let t=Rz(e);if(t!==null)return t;let n=Iz({approvalStatus:e.approvalStatus,status:e.status}),r=e.workKind===`command`,i=r?e.command:Cz(e.toolName,e.toolArgs);switch(n){case`waiting`:return Fz({segments:[Tz(`Waiting for approval`,{shimmer:!0}),Tz(r?`to run`:`to use`),Tz(i,{em:!0,truncate:!0})]});case`denied`:return Fz({segments:[Tz(`Permission denied:`),Tz(i,{em:!0,truncate:!0})],decorations:Ez([Oz(e.startedAt,e.completedAt)])});case`pending`:return Fz({segments:[Tz(r?`Running`:`Running tool:`,{shimmer:!0}),Tz(i,{em:!0,truncate:!0})],decorations:Ez([Oz(e.startedAt,e.completedAt)])});case`completed`:return Fz({segments:[Tz(r?`Ran`:`Ran tool:`),Tz(i,{em:!0,truncate:!0})],decorations:Ez([Oz(e.startedAt,e.completedAt)])});case`error`:return Fz({segments:[Tz(r?`Ran`:`Ran tool:`),Tz(i,{em:!0,truncate:!0})],decorations:[Az(`error`,e.completedAt===null?null:e.completedAt-e.startedAt)]});case`interrupted`:return Fz({segments:[Tz(r?`Ran`:`Ran tool:`),Tz(i,{em:!0,truncate:!0})],decorations:[Az(`interrupted`,e.completedAt===null?null:e.completedAt-e.startedAt)]});default:return _R(n)}}function Rz(e){if(!FR(e))return null;let t=e.activityIntents.filter(e=>e.type!==`unknown`);if(t.length!==1)return null;let n=t[0];if(!n)return null;let r=Iz({approvalStatus:e.approvalStatus,status:e.status}),i=r===`pending`,a=RR({intent:n,pathMode:`compact`,pending:i}),o=RR({intent:n,pathMode:`full`,pending:i});if(r===`denied`){let e=a.prefix?`${a.prefix} ${a.content}`:a.content,t=o.prefix?`${o.prefix} ${o.content}`:o.content;return Fz({segments:[Tz(`Permission denied:`),Tz(e,{em:!0,truncate:!0,plainText:t})]})}if(r===`waiting`){let e=a.prefix?`${a.prefix} ${a.content}`:a.content,t=o.prefix?`${o.prefix} ${o.content}`:o.content;return Fz({segments:[Tz(`Waiting for approval`,{shimmer:!0}),Tz(`to use`),Tz(e,{em:!0,truncate:!0,plainText:t})]})}let s=[];return a.prefix&&s.push(Tz(a.prefix,{shimmer:i})),s.push(Tz(a.content,{em:!1,truncate:!0,plainText:o.content})),Fz({segments:s,decorations:r===`error`?[Az(`error`,null)]:r===`interrupted`?[Az(`interrupted`,null)]:[]})}function zz(e){let t=Iz({approvalStatus:e.approvalStatus,status:e.status}),n=CR(e.change),r=DR({change:e.change,mode:`compact`}),i=DR({change:e.change,mode:`full`}),a={kind:`open-file-diff`,path:e.change.movePath??e.change.path},o=Tz(r,{em:!0,truncate:!0,plainText:i});switch(t){case`waiting`:return Fz({segments:[Tz(`Waiting for approval`,{shimmer:!0}),Tz(`to edit`),o],decorations:Ez([Mz(e.change)]),action:a});case`denied`:return Fz({segments:[Tz(`Permission denied:`),o],decorations:Ez([Mz(e.change)]),action:a});case`pending`:return Fz({segments:[Tz(TR(n),{shimmer:!0}),o],decorations:Ez([Mz(e.change)]),action:a});case`completed`:return Fz({segments:[Tz(wR(n)),o],decorations:Ez([Mz(e.change)]),action:a});case`error`:return Fz({segments:[Tz(`Failed to ${ER(n)}`),o],decorations:[Az(`error`,null)],action:a});case`interrupted`:return Fz({segments:[Tz(`Interrupted while ${TR(n).toLowerCase()}`),o],action:a});default:return _R(t)}}function Bz(e){let t=Tz(e.queries.join(`, `)||`web search`,{em:!1,truncate:!0});switch(e.status){case`pending`:return Fz({segments:[Tz(`Running web search:`,{shimmer:!0}),t]});case`completed`:return Fz({segments:[Tz(`Ran web search:`),t],decorations:Ez([Oz(e.startedAt,e.completedAt)])});case`error`:return Fz({segments:[Tz(`Ran web search:`),t],decorations:[Az(`error`,e.completedAt===null?null:e.completedAt-e.startedAt)]});case`interrupted`:return Fz({segments:[Tz(`Interrupted web search:`),t],decorations:[Az(`interrupted`,e.completedAt===null?null:e.completedAt-e.startedAt)]});default:return _R(e.status)}}function Vz(e){let t=Tz(e.url,{em:!1,truncate:!0});switch(e.status){case`pending`:return Fz({segments:[Tz(`Fetching:`,{shimmer:!0}),t]});case`completed`:return Fz({segments:[Tz(`Fetched:`),t],decorations:Ez([Oz(e.startedAt,e.completedAt)])});case`error`:return Fz({segments:[Tz(`Fetched:`),t],decorations:[Az(`error`,e.completedAt===null?null:e.completedAt-e.startedAt)]});case`interrupted`:return Fz({segments:[Tz(`Interrupted fetch:`),t],decorations:[Az(`interrupted`,e.completedAt===null?null:e.completedAt-e.startedAt)]});default:return _R(e.status)}}function Hz(e){switch(e){case`pending`:return{text:`Running subagent:`,shimmer:!0};case`completed`:return{text:`Ran subagent:`,shimmer:!1};case`error`:return{text:`Failed subagent:`,shimmer:!1};case`interrupted`:return{text:`Interrupted subagent:`,shimmer:!1};default:return _R(e)}}function Uz(e){let t=e.description??(e.output.trim()||e.toolName),n=Hz(e.status),r=[Tz(n.text,{shimmer:n.shimmer}),Tz(t,{em:!0,truncate:!0})];return e.subagentType&&r.push(Tz(`(${e.subagentType})`,{em:!1,truncate:!0})),Fz({segments:r,decorations:Ez([Oz(e.startedAt,e.completedAt)])})}function Wz(e){switch(e.lifecycle){case`waiting`:return Fz({segments:[Tz(`Waiting for approval to edit`,{shimmer:!0}),Tz(`files`,{em:!0,truncate:!0})]});case`denied`:return Fz({segments:[Tz(`Permission denied:`),Tz(`file changes`,{em:!0,truncate:!0})]});default:return _R(e.lifecycle)}}function Gz(e){let t=e.target.toolName,n=e.statusReason!==null&&e.statusReason.trim().length>0?e.statusReason.trim():null,r=n===null?null:Tz(`(${n})`,{truncate:!0});switch(e.lifecycle){case`pending`:return Fz({segments:t===null?[Tz(`Waiting for permissions`,{shimmer:!0})]:[Tz(`Waiting for permission`,{shimmer:!0}),Tz(`to use`),Tz(t,{em:!0,truncate:!0})]});case`resolving`:return Fz({segments:t===null?[Tz(`Delivering permissions`,{shimmer:!0})]:[Tz(`Delivering permission`,{shimmer:!0}),Tz(`to use`),Tz(t,{em:!0,truncate:!0})]});case`granted`:{let n=e.grantScope===`turn`?`for this turn`:e.grantScope===`session`?`for this session`:null,r=n===null?`Permission granted:`:`Permission granted ${n}:`;return Fz({segments:t===null?[Tz(n===null?`Permission granted`:`Permission granted ${n}`)]:[Tz(r),Tz(t,{em:!0,truncate:!0})]})}case`denied`:return Fz({segments:t===null?[Tz(`Permission denied`)]:[Tz(`Permission denied:`),Tz(t,{em:!0,truncate:!0})]});case`interrupted`:return Fz({segments:Ez([Tz(t===null?`Permission grant interrupted`:`Permission grant interrupted:`),t===null?null:Tz(t,{em:!0,truncate:!0}),r])});case`expired`:return Fz({segments:Ez([Tz(t===null?`Permission grant expired`:`Permission grant expired:`),t===null?null:Tz(t,{em:!0,truncate:!0}),r])});default:return _R(e.lifecycle)}}function Kz(e){switch(e.approvalKind){case`file-edit`:return Wz(e);case`permission-grant`:return Gz(e);default:return _R(e)}}function qz(e){return e.questions[0]?.prompt??null}function Jz(e){let t=qz(e),n=e.statusReason?Tz(e.statusReason,{truncate:!0}):null;switch(e.lifecycle){case`pending`:return Fz({segments:Ez([Tz(`Waiting for answer`,{shimmer:!0}),t?Tz(t,{em:!0,truncate:!0}):null])});case`resolving`:return Fz({segments:Ez([Tz(`Delivering answer`,{shimmer:!0}),t?Tz(t,{em:!0,truncate:!0}):null])});case`answered`:return Fz({segments:Ez([Tz(`Answered`),t?Tz(t,{em:!0,truncate:!0}):null])});case`interrupted`:return Fz({segments:Ez([Tz(`Question interrupted`),t?Tz(t,{em:!0,truncate:!0}):null,n])});case`expired`:return Fz({segments:Ez([Tz(`Question expired`),t?Tz(t,{em:!0,truncate:!0}):null,n])});default:return _R(e.lifecycle)}}function Yz(e,t){let n=(()=>{switch(e.workKind){case`command`:case`tool`:return Lz(e);case`file-change`:return zz(e);case`web-search`:return Bz(e);case`web-fetch`:return Vz(e);case`delegation`:return Uz(e);case`approval`:return Kz(e);case`question`:return Jz(e);default:return _R(e)}})();return t.workStyle===`default`||n.tone===`destructive`?n:{...n,tone:`summary`}}function Xz(e,t){let n=e.kind===`bundle-summary`&&t.isActiveLatestBundle===!0,{verb:r,rest:i}=rz(e,{active:n}),a=Ez([jz(e)]);if(t.summaryStyle===`background`)return Fz({segments:[Tz(i.length===0?r:`${r} ${i}`,{em:!1,truncate:!0})],decorations:a,tone:`summary`});let o=Tz(r,{shimmer:n});return i.length===0?Fz({segments:[{...o,truncate:!0}],decorations:a}):Fz({segments:[o,Tz(i,{em:!0,truncate:!0})],decorations:a})}function Zz(e){let t=e.status===`pending`,n=t?Oz(e.startedAt,e.completedAt,{em:!0}):kz(e.startedAt,e.completedAt);return!t&&e.completedAt!==null&&n!==null?Fz({segments:[Tz(`Worked for`,{shimmer:!1})],decorations:[n]}):Fz({segments:[Tz(t?`Working`:`Worked`,{shimmer:t})],decorations:t&&n!==null?[n]:[]})}function Qz(e,t){return e===null?null:Tz(t??e,{em:!0,truncate:!0,link:{kind:`thread`,threadId:e}})}function $z(e){switch(e){case`completed`:case`error`:case`interrupted`:return{assign:`Thread assigned to`,release:`Thread unassigned from`,transferFrom:`Thread reassigned from`,transferTo:`to`};case`pending`:return{assign:`Assigning thread to`,release:`Releasing thread from`,transferFrom:`Reassigning thread from`,transferTo:`to`};default:return _R(e)}}function eB(e){let t=e.managerAssignment,n=Qz(t.previousManagerThreadId,t.previousManagerThreadTitle),r=Qz(t.nextManagerThreadId,t.nextManagerThreadTitle),i=e.status===`pending`,a=$z(e.status);return Fz({segments:(()=>{switch(t.action){case`assign`:return Ez([Tz(a.assign,{shimmer:i}),r]);case`release`:return Ez([Tz(a.release,{shimmer:i}),n]);case`transfer`:return Ez([Tz(a.transferFrom,{shimmer:i}),n,r===null?null:Tz(a.transferTo,{shimmer:i}),r]);default:return _R(t.action)}})(),decorations:(()=>{switch(e.status){case`error`:return[Az(`error`,null)];case`interrupted`:return[Az(`interrupted`,null)];case`pending`:case`completed`:return[];default:return _R(e.status)}})(),tone:e.status===`error`?`destructive`:`default`})}function tB(e){let t=e.systemKind===`error`||e.status===`error`;if(e.systemKind===`operation`&&e.operationKind===`manager-assignment`)return eB(e);let n=e.systemKind===`operation`&&e.operationKind===`compaction`,r=n&&(e.status===`pending`||e.status===`completed`)?Ez([Oz(e.startedAt,e.completedAt)]):[];return Fz({segments:[Tz(n&&e.status===`pending`?`${e.title}…`:e.title,{em:t,shimmer:e.status===`pending`,truncate:!0})],decorations:r,tone:t?`destructive`:`default`})}function nB(e){return Fz({segments:[Tz(e.role===`user`?`User`:`Assistant`,{em:!1})]})}function rB({intent:e,pending:t,failureStatus:n}){let r=RR({intent:e,pathMode:`compact`,pending:t}),i=RR({intent:e,pathMode:`full`,pending:t}),a=[];return r.prefix&&a.push(Tz(r.prefix,{shimmer:t})),a.push(Tz(r.content,{em:!1,truncate:!0,plainText:i.content})),Fz({segments:a,decorations:n?[Az(n,null)]:[]})}function iB(e){if(!FR(e))return[];let t=null,n=[],r=e.status===`error`?`error`:e.status===`interrupted`?`interrupted`:void 0;return e.activityIntents.forEach((i,a)=>{if(i.type===`unknown`)return;let o=BR(i);o!==null&&o===t||(n.push({id:`${e.id}:activity-intent:${a}`,title:rB({intent:i,pending:e.status===`pending`,...r?{failureStatus:r}:{}})}),t=o)}),n}function aB(e){return e.kind===`conversation`&&e.role===`user`}function oB(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n&&!aB(n))return n}return null}function sB(e){let t=oB(e);return t?.kind===`bundle-summary`?t.id:null}function cB(e,t){switch(e.kind){case`conversation`:return nB(e);case`system`:return tB(e);case`work`:return Yz(e,t);case`bundle-summary`:case`step-summary`:return Xz(e,t);case`turn`:return Zz(e);default:return _R(e)}}G({content:U(),status:U()}).passthrough(),G({todos:KC(HC())});function lB(e){switch(e.workKind){case`web-search`:case`web-fetch`:case`approval`:return!1;case`question`:return!0;case`command`:case`tool`:return!FR(e);case`file-change`:return!0;case`delegation`:return e.childRows.length>0||e.output.trim().length>0;default:return _R(e)}}function uB(e){switch(e.kind){case`conversation`:return!1;case`system`:return e.detail!==null&&e.detail.trim().length>0;case`bundle-summary`:case`step-summary`:return e.children.length>0;case`turn`:return!0;case`work`:return lB(e);default:return _R(e)}}function dB(e){return e.length>0&&e.every(e=>!lB(e))}function fB(e){if(!uB(e))return!1;switch(e.kind){case`system`:case`bundle-summary`:return!0;case`work`:return e.workKind===`delegation`;case`conversation`:case`step-summary`:case`turn`:return!1;default:return _R(e)}}function pB(e,t,n){if(!t)return;let r=oB(e);r&&fB(r)&&n.add(r.id);for(let t of e)t.kind===`work`&&t.workKind===`delegation`&&t.status===`pending`&&pB(t.childRows,!0,n)}function mB({rows:e,scopeActive:t}){let n=new Set;return pB(e,t,n),n}function hB({event:e,hasNavigation:t}){return e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey?null:e.key===`Escape`?`close`:t?e.key===`ArrowLeft`?`previous`:e.key===`ArrowRight`?`next`:null:null}function gB({currentIndex:e,direction:t,itemCount:n}){return n<=0?e:t===`previous`?e===0?n-1:e-1:e===n-1?0:e+1}function _B({hasMultipleImages:e=!1,imageAlt:t,imageSrc:n,onClose:r,onNext:i,onPrevious:a,title:o}){let s=e&&a!==void 0&&i!==void 0;return(0,L.useEffect)(()=>{if(!n)return;let e=e=>{let t=hB({event:e,hasNavigation:s});if(t)switch(t){case`close`:e.preventDefault(),r();return;case`previous`:if(!a)return;e.preventDefault(),a();return;case`next`:if(!i)return;e.preventDefault(),i();return}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[s,n,r,i,a]),n?(0,R.jsx)(SI,{open:!0,onOpenChange:e=>!e&&r(),children:(0,R.jsxs)(EI,{className:`left-0 top-0 flex h-screen w-screen max-w-none translate-x-0 translate-y-0 items-center justify-center border-none bg-transparent p-0 shadow-none data-[state=closed]:slide-out-to-left-0 data-[state=closed]:slide-out-to-top-0 data-[state=open]:slide-in-from-left-0 data-[state=open]:slide-in-from-top-0 sm:rounded-none [&>button]:hidden`,onClick:e=>{e.target===e.currentTarget&&r()},children:[(0,R.jsx)(kI,{className:`sr-only`,children:o}),(0,R.jsx)(`img`,{src:n,alt:t,className:`max-h-[82vh] max-w-[90vw] rounded bg-background/95 object-contain`}),s?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:`absolute left-2 top-1/2 size-9 -translate-y-1/2 rounded-full bg-black/45 text-white hover:bg-black/60 hover:text-white`,onClick:a,"aria-label":`Previous image`,children:(0,R.jsx)(V,{name:`ChevronLeft`,className:`size-5`})}),(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:`absolute right-2 top-1/2 size-9 -translate-y-1/2 rounded-full bg-black/45 text-white hover:bg-black/60 hover:text-white`,onClick:i,"aria-label":`Next image`,children:(0,R.jsx)(V,{name:`ChevronRight`,className:`size-5`})})]}):null,(0,R.jsx)(wI,{asChild:!0,children:(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:`absolute right-2 top-2 size-9 rounded-full bg-black/45 text-white hover:bg-black/60 hover:text-white`,"aria-label":`Close image preview`,children:(0,R.jsx)(V,{name:`X`,className:`size-5`})})})]})}):null}function vB({text:e,className:t,iconClassName:n,label:r=`Copy to clipboard`}){let[i,a]=(0,L.useState)(!1);(0,L.useEffect)(()=>{if(!i)return;let e=window.setTimeout(()=>{a(!1)},2e3);return()=>window.clearTimeout(e)},[i]);let o=async()=>{if(!(!e||i))try{await navigator.clipboard.writeText(e),a(!0)}catch{a(!1)}};return(0,R.jsx)(`button`,{type:`button`,className:B(`inline-flex size-5 items-center justify-center text-muted-foreground hover:text-foreground focus-visible:opacity-100`,t),onClick:()=>{o()},"aria-label":r,title:r,children:i?(0,R.jsx)(V,{name:`Check`,className:B(`size-3`,n)}):(0,R.jsx)(V,{name:`Copy`,className:B(`size-3`,n)})})}var yB=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bB=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xB={};function SB(e,t){return((t||xB).jsx?bB:yB).test(e)}var CB=s(((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,u=`
|
|
@@ -1459,7 +1459,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1459
1459
|
`),n=[],r=[],i=!1;for(let e of t){let t=e.startsWith(`diff --git `);if(t&&(i=!0),t&&r.length>0){n.push(r.join(`
|
|
1460
1460
|
`)),r=[e];continue}r.push(e)}return r.length>0&&n.push(r.join(`
|
|
1461
1461
|
`)),i?n.filter(e=>e.trim().length>0):[e]}function jOe(e){let t=[];for(let n of e)t.push(...y$(n));return t}function b$(e){return`${e.length}:${e.slice(0,120)}:${e.slice(-120)}`}function MOe(e,t){if(e.length>0){let t=0,n=0;for(let r of e)for(let e of r.hunks)t+=e.additionCount,n+=e.deletionCount;return{filesCount:e.length,insertions:t,deletions:n}}let n=0,r=0,i=0;for(let e of t.split(`
|
|
1462
|
-
`)){if(e.startsWith(`diff --git `)){i+=1;continue}if(!e.startsWith(`+++ `)&&!e.startsWith(`--- `)){if(e.startsWith(`+`)){n+=1;continue}e.startsWith(`-`)&&(r+=1)}}return{filesCount:i>0?i:+(n>0||r>0),insertions:n,deletions:r}}function NOe(e){let t=0,n=0;for(let r of e.hunks)t+=r.additionCount,n+=r.deletionCount;return{insertions:t,deletions:n}}function x$(e){switch(e.type){case`new`:return`added`;case`deleted`:return`deleted`;case`rename-pure`:case`rename-changed`:return`renamed`;case`change`:return`modified`;default:return e.type}}function POe(e){let t=S$(e.name)??e.name,n=S$(e.prevName);return n&&n!==t?`${n} -> ${t}`:t}function FOe(e){return`${x$(e)}:${S$(e.name)??``}:${S$(e.prevName)??``}`}function IOe(e){let t=new Map;return e.map(e=>{let n=FOe(e),r=t.get(n)??0;return t.set(n,r+1),{key:r===0?n:`${n}:${r+1}`,fileDiff:e}})}function S$(e){let t=e?.trim();return t&&t.length>0?t:void 0}function C$(e){let t=S$(e);if(!t||t===`/dev/null`)return[];let n=t.startsWith(`./`)?t.slice(2):t;if(n.length===0)return[];let r=[n];return(n.startsWith(`a/`)||n.startsWith(`b/`))&&r.push(n.slice(2)),Array.from(new Set(r.filter(e=>e.length>0)))}function LOe(e,t){let n=new Set(C$(t));if(n.size===0)return!1;for(let t of[e.name,e.prevName])for(let e of C$(t))if(n.has(e))return!0;return!1}function ROe(e){for(let t of[e.name,e.prevName]){let e=C$(t);if(e.length>0)return e[e.length-1]??null}return null}var zOe={overflow:`scroll`,disableFileHeader:!1,expansionLineCount:30},BOe={"--diffs-font-size":`12px`,"--diffs-line-height":`18px`},VOe={contain:`layout paint style`,contentVisibility:`auto`,containIntrinsicSize:`0 600px`},HOe=/(?<=\n)/u;function UOe(e,t){let n=S$(e.name)??e.name,r=S$(e.prevName)??n,i=t===`added`?{kind:`empty`,path:n}:{kind:`request`,path:t===`renamed`?r:n,side:`old`},a=t===`deleted`?{kind:`empty`,path:n}:{kind:`request`,path:n,side:`new`},o=e.hunks.map(e=>`${e.hunkSpecs??``}:${e.additionStart}:${e.additionCount}:${e.deletionStart}:${e.deletionCount}`).join(`|`);return{identity:[t,w$(i),w$(a),o].join(`:`),old:i,new:a}}function w$(e){return e.kind===`empty`?`empty:${e.path}`:`request:${e.side}:${e.path}`}function T$(e,t){return e.kind===`empty`?Promise.resolve({name:e.path,contents:``}):t(e.path,e.side)}function E$(e){return e.contents.length===0?[]:e.contents.split(HOe)}var D$=(0,L.memo)(function({fileDiff:e,diffViewOptions:t,filePathRoot:n,onOpenFileInEditor:r,onOpenFilePreview:i,isCollapsed:a,onToggleCollapsed:o,stickyHeader:s=!1,isRendering:c=!1,cardRef:l,onRequestFileContents:u}){let d=(0,L.useMemo)(()=>NOe(e),[e]),f=(0,L.useMemo)(()=>POe(e),[e]),p=(0,L.useMemo)(()=>x$(e),[e]),m=p===`added`,h=p===`deleted`,g=h?0:d.insertions,_=m?0:d.deletions,v=m||h,y=(0,L.useMemo)(()=>{let t=S$(e.name)??e.name,n=S$(e.prevName);return n&&n!==t?{from:n,to:t}:null},[e]),b=(0,L.useMemo)(()=>ROe(e),[e]),x=b?v$({path:b,rootPath:n}):null,S=!!b,C=e.hunks.length>0,w=a!==void 0&&o!==void 0,T=!C||w&&a,E=(0,L.useMemo)(()=>({...t,disableFileHeader:!0}),[t]),{ref:D,isIntersecting:O}=d$({initialIsIntersecting:!0,threshold:1}),k=s&&!O,A=(0,L.useMemo)(()=>UOe(e,p),[e,p]),{ref:j,isIntersecting:M}=d$({initialIsIntersecting:!1,rootMargin:`200px`}),N=(0,L.useRef)(u);(0,L.useEffect)(()=>{N.current=u});let[P,ee]=(0,L.useState)({status:`idle`}),F=(0,L.useRef)(`idle`),[te,ne]=(0,L.useState)(!1),[re,ie]=(0,L.useState)(!1);(0,L.useEffect)(()=>{F.current=`idle`,ee({status:`idle`}),
|
|
1462
|
+
`)){if(e.startsWith(`diff --git `)){i+=1;continue}if(!e.startsWith(`+++ `)&&!e.startsWith(`--- `)){if(e.startsWith(`+`)){n+=1;continue}e.startsWith(`-`)&&(r+=1)}}return{filesCount:i>0?i:+(n>0||r>0),insertions:n,deletions:r}}function NOe(e){let t=0,n=0;for(let r of e.hunks)t+=r.additionCount,n+=r.deletionCount;return{insertions:t,deletions:n}}function x$(e){switch(e.type){case`new`:return`added`;case`deleted`:return`deleted`;case`rename-pure`:case`rename-changed`:return`renamed`;case`change`:return`modified`;default:return e.type}}function POe(e){let t=S$(e.name)??e.name,n=S$(e.prevName);return n&&n!==t?`${n} -> ${t}`:t}function FOe(e){return`${x$(e)}:${S$(e.name)??``}:${S$(e.prevName)??``}`}function IOe(e){let t=new Map;return e.map(e=>{let n=FOe(e),r=t.get(n)??0;return t.set(n,r+1),{key:r===0?n:`${n}:${r+1}`,fileDiff:e}})}function S$(e){let t=e?.trim();return t&&t.length>0?t:void 0}function C$(e){let t=S$(e);if(!t||t===`/dev/null`)return[];let n=t.startsWith(`./`)?t.slice(2):t;if(n.length===0)return[];let r=[n];return(n.startsWith(`a/`)||n.startsWith(`b/`))&&r.push(n.slice(2)),Array.from(new Set(r.filter(e=>e.length>0)))}function LOe(e,t){let n=new Set(C$(t));if(n.size===0)return!1;for(let t of[e.name,e.prevName])for(let e of C$(t))if(n.has(e))return!0;return!1}function ROe(e){for(let t of[e.name,e.prevName]){let e=C$(t);if(e.length>0)return e[e.length-1]??null}return null}var zOe={overflow:`scroll`,disableFileHeader:!1,expansionLineCount:30},BOe={"--diffs-font-size":`12px`,"--diffs-line-height":`18px`},VOe={contain:`layout paint style`,contentVisibility:`auto`,containIntrinsicSize:`0 600px`},HOe=/(?<=\n)/u;function UOe(e,t){let n=S$(e.name)??e.name,r=S$(e.prevName)??n,i=t===`added`?{kind:`empty`,path:n}:{kind:`request`,path:t===`renamed`?r:n,side:`old`},a=t===`deleted`?{kind:`empty`,path:n}:{kind:`request`,path:n,side:`new`},o=e.hunks.map(e=>`${e.hunkSpecs??``}:${e.additionStart}:${e.additionCount}:${e.deletionStart}:${e.deletionCount}`).join(`|`);return{identity:[t,w$(i),w$(a),o].join(`:`),old:i,new:a}}function w$(e){return e.kind===`empty`?`empty:${e.path}`:`request:${e.side}:${e.path}`}function T$(e,t){return e.kind===`empty`?Promise.resolve({name:e.path,contents:``}):t(e.path,e.side)}function E$(e){return e.contents.length===0?[]:e.contents.split(HOe)}var D$=(0,L.memo)(function({fileDiff:e,diffViewOptions:t,filePathRoot:n,onOpenFileInEditor:r,onOpenFilePreview:i,isCollapsed:a,onToggleCollapsed:o,stickyHeader:s=!1,isRendering:c=!1,cardRef:l,onRequestFileContents:u}){let d=(0,L.useMemo)(()=>NOe(e),[e]),f=(0,L.useMemo)(()=>POe(e),[e]),p=(0,L.useMemo)(()=>x$(e),[e]),m=p===`added`,h=p===`deleted`,g=h?0:d.insertions,_=m?0:d.deletions,v=m||h,y=(0,L.useMemo)(()=>{let t=S$(e.name)??e.name,n=S$(e.prevName);return n&&n!==t?{from:n,to:t}:null},[e]),b=(0,L.useMemo)(()=>ROe(e),[e]),x=b?v$({path:b,rootPath:n}):null,S=!!b,C=e.hunks.length>0,w=a!==void 0&&o!==void 0,T=!C||w&&a,E=(0,L.useMemo)(()=>({...t,disableFileHeader:!0}),[t]),{ref:D,isIntersecting:O}=d$({initialIsIntersecting:!0,threshold:1}),k=s&&!O,A=(0,L.useMemo)(()=>UOe(e,p),[e,p]),{ref:j,isIntersecting:M}=d$({initialIsIntersecting:!1,rootMargin:`200px`}),N=(0,L.useRef)(u);(0,L.useEffect)(()=>{N.current=u});let[P,ee]=(0,L.useState)({status:`idle`}),F=(0,L.useRef)(`idle`),[te,ne]=(0,L.useState)(!1),[re,ie]=(0,L.useState)(!1);(0,L.useEffect)(()=>{F.current=`idle`,ee({status:`idle`}),ie(!1)},[A.identity]),(0,L.useEffect)(()=>{!T&&M&&ne(!0)},[T,M]);let ae=h&&!re,oe=te&&!c&&!ae;(0,L.useEffect)(()=>{if(!oe||F.current!==`idle`)return;let e=N.current;if(!e)return;let t=!1;return F.current=`loading`,ee({status:`loading`}),Promise.all([T$(A.old,e),T$(A.new,e)]).then(([e,n])=>{if(!t){if(!e||!n){F.current=`unavailable`,ee({status:`unavailable`});return}F.current=`ready`,ee({status:`ready`,oldLines:E$(e),newLines:E$(n)})}}).catch(()=>{t||(F.current=`error`,ee({status:`error`}))}),()=>{t=!0,F.current===`loading`&&(F.current=`idle`)}},[A,oe]);let I=(0,L.useMemo)(()=>P.status===`ready`?{...e,oldLines:P.oldLines,newLines:P.newLines}:e,[e,P]);return(0,R.jsxs)(`div`,{ref:l,className:`rounded-lg border border-border/70 bg-background`,children:[s?(0,R.jsx)(`div`,{ref:D,className:`h-0`}):null,(0,R.jsx)(`div`,{className:B(`rounded-lg bg-background py-1.5 pl-2 pr-3 text-xs font-medium text-foreground`,s&&`sticky top-0 z-30`,!T&&`rounded-b-none`,k&&`rounded-t-none border-t border-border/70`),children:(0,R.jsxs)(`div`,{className:`flex w-full min-w-0 items-center justify-between gap-2`,children:[(0,R.jsxs)(`span`,{className:`flex min-w-0 items-center`,children:[w?(0,R.jsx)(`button`,{type:`button`,className:B(`inline-flex w-8 shrink-0 items-center justify-center text-muted-foreground transition-colors`,C?`hover:text-foreground`:`cursor-not-allowed opacity-40`),onClick:C?o:void 0,disabled:!C,"aria-label":C?`${a?`Expand`:`Collapse`} ${f}`:`${f} has no changes to expand`,"aria-expanded":C?!a:void 0,children:(0,R.jsx)(V,{name:`ChevronRight`,className:B(`size-3.5 shrink-0 transition-transform duration-150`,C&&!a&&`rotate-90`)})}):null,(0,R.jsxs)(`span`,{className:B(`flex min-w-0 items-center gap-1.5`,`pl-[1ch]`),children:[y?(0,R.jsx)(m$,{className:`min-w-0 font-mono text-xs leading-5 text-muted-foreground/80`,title:y.from,children:y.from}):null,y?(0,R.jsx)(V,{name:`ArrowRight`,"aria-hidden":`true`,className:`size-3 shrink-0 text-muted-foreground/60`}):null,(0,R.jsx)(h$,{path:b??e.name,displayName:y?y.to:f,onClick:S&&b&&i?()=>i(b):void 0,className:`font-mono font-medium text-foreground`}),x?(0,R.jsx)(vB,{text:x,label:`Copy path for ${f}`,className:`rounded-md hover:bg-state-hover`}):null,S&&b&&r?(0,R.jsx)(`button`,{type:`button`,onClick:()=>r(b),"aria-label":`Open ${f} in editor`,title:`Open in editor`,className:`inline-flex size-5 shrink-0 items-center justify-center rounded-md text-muted-foreground/80 hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:(0,R.jsx)(V,{name:`ExternalLink`,"aria-hidden":!0,className:`size-3`})}):null]})]}),(0,R.jsx)(`span`,{className:`flex shrink-0 items-center gap-1`,children:(0,R.jsx)(FJ,{insertions:g,deletions:_,hideZero:v,className:`text-xs`})})]})}),T?null:(0,R.jsx)(`div`,{ref:j,className:`overflow-hidden rounded-b-lg bg-background`,style:VOe,children:ae?(0,R.jsxs)(`div`,{className:`flex items-center py-3 pl-2 pr-3 text-xs text-muted-foreground`,children:[w?(0,R.jsx)(`span`,{"aria-hidden":!0,className:`w-8 shrink-0`}):null,(0,R.jsxs)(`span`,{className:`pl-[1ch]`,children:[(0,R.jsx)(`span`,{children:`This file was deleted.`}),` `,(0,R.jsx)(O_,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0 text-xs underline underline-offset-4 hover:underline`,onClick:()=>{ie(!0),ne(!0)},children:`Load diff`})]})]}):oe?(0,R.jsx)(`div`,{className:`overflow-x-auto`,children:(0,R.jsx)(`div`,{className:`w-full max-w-full`,style:BOe,children:(0,R.jsx)(lee,{fileDiff:I,options:E})})}):(0,R.jsxs)(`div`,{className:`space-y-1.5 px-3 py-3`,children:[(0,R.jsx)(ov,{className:`h-3 w-full rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-[96%] rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-[93%] rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-[90%] rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-[87%] rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-[84%] rounded-sm`})]})})]})}),WOe={overflow:`scroll`,diffStyle:`unified`},O$=new WeakMap;function GOe(e){let t=e.replaceAll(`\r
|
|
1463
1463
|
`,`
|
|
1464
1464
|
`);if(t.length===0)return[];let n=t.split(`
|
|
1465
1465
|
`);return n[n.length-1]===``&&n.pop(),n}function k$(e){return e?GOe(e).filter(e=>!xR(e)):[]}function A$(e){return e.replaceAll(`\\`,`/`).replace(/^\/+/u,``)}function j$(e,t){if(!e||!t)return e;let n=t.replace(/\/+$/u,``);return n.length===0||e===n?e:e.startsWith(`${n}/`)?e.slice(n.length+1):e}function KOe(e,t){if(!t)return e;let n=j$(e.path,t)??e.path,r=j$(e.movePath,t);return n===e.path&&r===e.movePath?e:{...e,path:n,movePath:r}}function qOe(e,t){let n=t===`created`?`+`:`-`,r=t===`created`?`-`:`+`,i=[];for(let t of e){if(t.startsWith(n)){i.push(t);continue}t.startsWith(r)||t.startsWith(` `)||i.push(`${n}${t}`)}return i}function M$(e,t){let n=k$(e.diff);if(n.length===0)return null;let r=A$(e.path),i=t===`created`?`/dev/null`:`a/${r}`,a=t===`created`?`b/${r}`:`/dev/null`,o=qOe(n,t);return o.length===0?null:`diff --git a/${r} b/${r}\n--- ${i}\n+++ ${a}\n@@ -1,${t===`created`?0:o.length} +1,${t===`created`?o.length:0} @@\n${o.join(`
|
|
@@ -1486,7 +1486,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1486
1486
|
|
|
1487
1487
|
`),s=uNe(t);return{id:a,kind:`conversation`,role:`user`,threadId:r,turnId:null,sourceSeqStart:0,sourceSeqEnd:0,startedAt:e,createdAt:e,text:o,attachments:s?{webImages:s.webImages,localImages:s.localImages,localFiles:s.localFiles,imageUrls:s.imageUrls??[],localImagePaths:s.localImagePaths??[],localFilePaths:s.localFilePaths??[]}:null,userRequest:{kind:_Ne({mode:n,threadStatus:i}),status:`pending`}}}function yNe(){let e=et();return bt({meta:{errorMessage:`Failed to send message.`,showErrorToast:!1},mutationFn:({id:e,input:t,model:n,serviceTier:r,reasoningLevel:i,permissionMode:a,mode:o})=>ype(e,{input:t,model:n,serviceTier:r,reasoningLevel:i,permissionMode:a,mode:o}),onMutate:async t=>{await Promise.all([e.cancelQueries({queryKey:BO(t.id)}),e.cancelQueries({queryKey:ik(t.id)})]);let n=e.getQueryData(BO(t.id)),r=Date.now();iF(e,t.id,e=>({...e,status:`active`,updatedAt:Math.max(e.updatedAt,r),runtime:{...e.runtime,displayStatus:e.runtime.displayStatus===`host-reconnecting`||e.runtime.displayStatus===`waiting-for-host`?e.runtime.displayStatus:`active`}}));let i=vNe({createdAt:r,input:t.input,mode:t.mode,threadId:t.id,threadStatus:n?.status??null});return Rye(e,t.id,i),{previousThread:n,optimisticCreatedAt:r,optimisticRowId:i.id}},onError:(t,n,r)=>{r?.optimisticRowId&&zye(e,n.id,r.optimisticRowId),r?.previousThread&&e.setQueryData(BO(n.id),r.previousThread)},onSuccess:(t,n,r)=>{e2(e,n.id,$0({createdAt:r?.optimisticCreatedAt??Date.now(),input:n.input})),(TD.getConnectionState()===`connected`?$F:eI)({queryClient:e,threadId:n.id})}})}function bNe(){let e=et();return bt({meta:{errorMessage:`Failed to queue message.`,showErrorToast:!1},mutationFn:({id:e,input:t,model:n,serviceTier:r,reasoningLevel:i,permissionMode:a})=>bpe(e,{input:t,model:n,serviceTier:r,reasoningLevel:i,permissionMode:a}),onSuccess:(t,n)=>{e2(e,n.id,dNe(t)),ZF({queryClient:e,threadId:n.id})}})}function xNe(){let e=et();return bt({meta:{errorMessage:`Failed to send queued message.`,showErrorToast:!1},mutationFn:({id:e,mode:t,queuedMessageId:n})=>wpe(e,n,{mode:t}),onSuccess:(t,n)=>{QF({queryClient:e,threadId:n.id})}})}function SNe(){let e=et();return bt({meta:{errorMessage:`Failed to delete queued message.`,showErrorToast:!1},mutationFn:({id:e,queuedMessageId:t})=>Tpe(e,t),onSuccess:(t,n)=>{ZF({queryClient:e,threadId:n.id})}})}function CNe(){let e=et();return bt({meta:{errorMessage:`Failed to stop thread.`},mutationFn:e=>Epe(e),onMutate:async t=>{await Promise.all([e.cancelQueries({queryKey:BO(t)}),e.cancelQueries({queryKey:RO()})]);let n=e.getQueryData(BO(t)),r=pNe(e);return hNe({queryClient:e,requestedAt:Date.now(),threadId:t}),{previousThread:n,previousThreadLists:r}},onError:(t,n,r)=>{r&&(e.setQueryData(BO(n),r.previousThread),mNe(e,r.previousThreadLists))},onSettled:(t,n,r)=>{tI({queryClient:e,threadId:r})}})}var t2=`bb.promptbox.contents`,n2=`3`,r2=w0(),i2=new Map,a2=new Map,o2=!1;function s2(e){return encodeURIComponent(e.trim())}function c2(e){if(!e||typeof window>`u`)return r2;let t=window.localStorage.getItem(e),n=i2.get(e);if(n&&n.rawValue===t)return n.draft;let r=NMe(t);return i2.set(e,{rawValue:t,draft:r}),r}function l2(e){let t=a2.get(e);if(!(!t||t.size===0))for(let e of t)e()}function wNe(){o2||typeof window>`u`||(o2=!0,window.addEventListener(`storage`,e=>{e.key&&(i2.delete(e.key),l2(e.key))}))}function TNe(e,t){if(!e)return()=>{};wNe();let n=a2.get(e);return n||(n=new Set,a2.set(e,n)),n.add(t),()=>{let n=a2.get(e);n&&(n.delete(t),n.size===0&&a2.delete(e))}}function u2(e,t){if(!e||typeof window>`u`)return;let n=E0(t);if(!n){window.localStorage.removeItem(e),i2.set(e,{rawValue:null,draft:r2}),l2(e);return}window.localStorage.setItem(e,n),i2.set(e,{rawValue:n,draft:t}),l2(e)}function ENe(e,t){return!e||typeof window>`u`||T0(t)||!T0(c2(e))?!1:(u2(e,t),!0)}function DNe({projectId:e,threadId:t}){if(!e)return null;let n=s2(e);return t?`${t2}-${n}-${s2(t)}-${n2}`:`${t2}-${n}-draft-${n2}`}function d2(e){let t=(0,L.useMemo)(()=>DNe({projectId:e.projectId,threadId:e.threadId}),[e.projectId,e.threadId]),n=(0,L.useSyncExternalStore)((0,L.useCallback)(e=>TNe(t,e),[t]),(0,L.useCallback)(()=>c2(t),[t]),()=>r2),r=(0,L.useCallback)(e=>{u2(t,e)},[t]),i=(0,L.useCallback)(()=>c2(t),[t]),a=(0,L.useCallback)(e=>{u2(t,{...c2(t),text:e})},[t]),o=(0,L.useCallback)(e=>{let n=e.replace(/\s+/g,` `).trim();if(n.length===0)return;let r=c2(t),i=r.text.trimEnd(),a=i.length===0?n:`${i} ${n}`;u2(t,{...r,text:a})},[t]),s=(0,L.useCallback)(e=>{let n=c2(t);n.attachments.some(t=>t.path===e.path)||u2(t,{...n,attachments:[...n.attachments,e]})},[t]),c=(0,L.useCallback)(e=>{let n=c2(t),r=n.attachments.filter(t=>t.path!==e);r.length!==n.attachments.length&&u2(t,{...n,attachments:r})},[t]),l=(0,L.useCallback)(()=>{r(r2)},[r]),u=(0,L.useCallback)(e=>D0(c2(t),e)?(r(r2),!0):!1,[r,t]),d=(0,L.useCallback)(e=>{u2(t,{...c2(t),attachments:e})},[t]),f=(0,L.useCallback)(e=>{ENe(t,e)},[t]);return{storageKey:t,getCurrent:i,value:n.text,text:n.text,attachments:n.attachments,setDraft:r,setValue:a,setText:a,setAttachments:d,appendText:o,addAttachment:s,removeAttachment:c,clear:l,clearIfCurrentMatches:u,restoreIfEmpty:f}}var ONe=120,f2=8;function p2(e,t){let[n,r]=(0,L.useState)(null),[i]=TOe(n,ONe),a=n===null?null:i,o=Nme({projectId:e,query:a,limit:f2,environmentId:t.environmentId}),s=t.threadSuggestionMode??`none`,c=$1(s===`managers`?{archived:!1,projectId:e,type:`manager`}:{archived:!1,projectId:e},{enabled:s!==`none`}),l=(n?.trim().length??0)>0,u=l&&n!==a,d=n?.trim().toLowerCase()??``,f=t.currentThreadId,p=(0,L.useMemo)(()=>(o.data?.files??[]).map(e=>({kind:`file`,path:e.path,replacement:e.path})),[o.data?.files]),m=(0,L.useMemo)(()=>s===`none`||d.length===0?[]:(c.data??[]).filter(e=>e.id!==f).filter(e=>s===`managers`?e.type===`manager`:!0).filter(e=>{let t=e.title?.trim().toLowerCase()??``;return e.id.toLowerCase().includes(d)||t.includes(d)}).sort((e,t)=>{if(e.type!==t.type)return e.type===`manager`?-1:1;let n=e.title?.trim().toLowerCase()??``,r=t.title?.trim().toLowerCase()??``;return n.localeCompare(r)||e.id.localeCompare(t.id)}).slice(0,f2).map(e=>({kind:`thread`,path:`thread:${e.id}`,replacement:`thread:${e.id}`,threadId:e.id,title:e.title??e.titleFallback??void 0,threadType:e.type})),[f,s,c.data,d]),h=(0,L.useMemo)(()=>l?[...m,...p].slice(0,f2):[],[l,p,m]);return{query:n,setQuery:r,suggestions:h,isLoading:l&&h.length===0&&(u||o.isPending||o.isFetching),isError:o.isError}}function kNe(e){return e.selectedBranch?{kind:`named`,name:e.selectedBranch.name}:{kind:`default`}}function ANe(e){if(!e.projectId)return null;let t=J0(e.environmentValue);if(!t)return null;if(t.type===`host`){if(t.mode===`worktree`)return{type:`host`,hostId:t.hostId,workspace:{type:`managed-worktree`,baseBranch:kNe(e)}};if(e.selectedBranch?.isNew)return{type:`host`,hostId:t.hostId,workspace:{type:`unmanaged`,path:null,branch:{kind:`new`}}};let n=e.selectedBranch?.name??e.currentBranch;return{type:`host`,hostId:t.hostId,workspace:{type:`unmanaged`,path:null,...n?{branch:{kind:`existing`,name:n}}:{}}}}return null}function jNe(e){return!e.projectId||!e.environmentValue?null:{environmentValue:e.environmentValue,projectId:e.projectId}}function m2(e,t){return e!==void 0&&t!==null&&e.projectId===t.projectId&&e.environmentValue===t.environmentValue}function MNe(e){let[t,n]=(0,L.useState)(null),r=(0,L.useMemo)(()=>jNe({environmentValue:e.environmentValue,projectId:e.projectId}),[e.environmentValue,e.projectId]),i=t!==null&&m2(t.scope,r)?t.branch:null;return{onBranchChange:(0,L.useCallback)(e=>{r&&n({scope:r,branch:{name:e,isNew:!1}})},[r]),onCreateBranch:(0,L.useCallback)(()=>{r&&n(t=>{let n=(m2(t?.scope,r)?t?.branch:null)?.name??e.currentBranch;return n?{scope:r,branch:{name:n,isNew:!0}}:m2(t?.scope,r)?null:t})},[e.currentBranch,r]),selectedBranch:i}}var NNe=`bb.promptbox.zen-mode.project-main`;function PNe(){let{projectId:e}=eh(),t=Ym(),n=$m(),r=hk(),i=mk({enabled:r.isSuccess||r.isError}),a=i.data,o=r.isFetching||i.isLoading,s=gNe(),{localHostId:c}=iA(),l=_I(),u=d2({projectId:e,threadId:null}),{data:d=[]}=Mme(e),f=p2(e,{environmentId:null}),[p,m]=(0,L.useState)(null),h=u.text,g=(0,L.useMemo)(()=>k0({text:u.text,attachments:u.attachments}),[u.attachments,u.text]),_=(0,L.useMemo)(()=>Fk(NNe,e),[e]),v=(0,L.useMemo)(()=>Z0(d),[d]),{selectedProviderId:y,setSelectedProviderId:b,providerOptions:x,hasMultipleProviders:S,selectedModel:C,setSelectedModel:w,serviceTier:T,setServiceTier:E,reasoningLevel:D,setReasoningLevel:O,permissionMode:k,setPermissionMode:A,environmentSelectionValue:j,setEnvironmentSelectionValue:M,activeModel:N,modelOptions:P,reasoningOptions:ee,permissionModeOptions:F,supportsPermissionModeSelection:te,supportsServiceTier:ne,serviceTierSupportByProvider:re}=m0({scope:`new-thread`,projectId:e}),ie=(0,L.useMemo)(()=>a?.find(t=>t.id===e),[a,e]),ae=(0,L.useMemo)(()=>ie?.sources??[],[ie?.sources]),oe=(0,L.useMemo)(()=>j&&J0(j)?j:c?`host:${c}:local`:``,[j,c]),I=(0,L.useMemo)(()=>J0(oe),[oe]),se=I?.type===`host`,ce=jme(e,se?I.hostId:null,{enabled:se}),le=ce.data?.branches??[],ue=se&&I.mode===`local`?ce.data?.current??null:ce.data?.defaultBranch??null,{selectedBranch:de,onBranchChange:fe,onCreateBranch:pe}=MNe({currentBranch:ue,environmentValue:oe,projectId:e}),me=(0,L.useMemo)(()=>ANe({environmentValue:oe,projectId:e,currentBranch:ue,selectedBranch:de}),[oe,e,ue,de]),he=(0,L.useMemo)(()=>{let t=a?.map(e=>({value:e.id,label:e.name}))??[];return e&&!t.some(t=>t.value===e)&&t.unshift({value:e,label:o?`Loading project…`:e}),t},[e,a,o]),ge=N?.model??C,_e=(0,L.useCallback)(t=>{t!==e&&n(`/projects/${t}`)},[n,e]),ve=typeof t.state==`object`&&t.state!==null&&`focusPrompt`in t.state&&t.state.focusPrompt===!0;(0,L.useEffect)(()=>{if(!ve)return;let e=window.requestAnimationFrame(()=>{let e=document.getElementById(`project-main-prompt`);if(!(e instanceof HTMLTextAreaElement))return;e.focus();let t=e.value.length;e.setSelectionRange(t,t)});return()=>window.cancelAnimationFrame(e)},[t.key,ve]);let ye=(0,L.useCallback)(async t=>{if(!(!e||t.length===0)){m(null);for(let n of t)try{let t=await l.mutateAsync({projectId:e,file:n});u.addAttachment(t)}catch(e){m(JL({error:e,fallbackMessage:`Attachment upload failed.`}));break}}},[e,u,l]);if(!e)return(0,R.jsx)(c0,{contentClassName:`min-h-full items-center justify-center`,children:(0,R.jsx)(`p`,{className:`py-12 text-center text-sm text-muted-foreground`,children:`Select a project.`})});let be=async()=>{let t={text:u.text,attachments:u.attachments},n=k0(t);if(!(n.length===0||s.isPending||!me||!y||!ge)){m(null);try{await s.mutateAsync({input:n,projectId:e,providerId:y,model:ge,...ne&&T?{serviceTier:T}:{},reasoningLevel:D,permissionMode:k,environment:me}),u.clearIfCurrentMatches(t)}catch{}}},xe=s.isPending||g.length===0||!me||!y||!ge;return(0,R.jsx)(c0,{contentClassName:`pt-4 md:pt-5`,children:(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsx)(`div`,{className:`flex items-center px-3.5`,children:e?(0,R.jsx)(`div`,{className:`flex items-center gap-3`,children:(0,R.jsx)(x0,{label:`Project`,value:e,options:he,onChange:_e,className:`h-8 text-sm`})}):null}),(0,R.jsx)(lNe,{id:`project-main-prompt`,value:h,onChange:u.setText,onSubmit:be,isSubmitting:s.isPending,disabled:xe,zenModeStorageKey:_,history:{currentDraft:{text:u.text,attachments:u.attachments},entries:v,onSelectEntry:u.setDraft,resetKey:e},mentions:{suggestions:f.suggestions,isLoading:f.isLoading,isError:f.isError,onQueryChange:f.setQuery},attachments:{items:u.attachments,projectId:e,onAttachFiles:ye,onRemove:u.removeAttachment,isAttaching:l.isPending,error:p},execution:{provider:{options:x,selectedId:y,onChange:b,hasMultiple:S},model:{active:N,selected:C,options:P,onChange:w},serviceTier:{value:T,onChange:E,supported:ne,supportByProvider:re},reasoning:{value:D,options:ee,onChange:O}},environment:{value:oe,onChange:M,sources:ae},branch:{value:de?.name??null,current:ue,isNew:de?.isNew??!1,options:le,loading:ce.isLoading,placeholder:`Default branch`,onChange:fe,onCreate:pe},permission:{value:k,options:F,onChange:A,supported:te}})]})})}function h2({message:e,className:t}){return e?(0,R.jsx)(`p`,{className:B(`rounded-md border border-destructive/20 bg-destructive/5 px-3 py-2 text-sm text-destructive`,t),children:e}):null}function FNe({hosts:e,eligibleHosts:t,selectedHostId:n,onChange:r,isLocalHost:i,muted:a,defaultOpen:o,modal:s}){let c=e.find(e=>e.id===n),l=c?.name??`Select host`,u=fR(c),d=t.length<=1;return(0,R.jsxs)(oP,{defaultOpen:o,modal:s,children:[(0,R.jsx)(sP,{asChild:!0,children:(0,R.jsxs)(O_,{type:`button`,variant:`ghost`,size:`sm`,"aria-label":`Host`,title:`Host: ${l}`,className:B(g0,_0,a&&`text-muted-foreground/75 hover:text-foreground`),children:[(0,R.jsxs)(`span`,{className:v0,children:[(0,R.jsx)(V,{name:u,className:`size-3.5 shrink-0`}),d?null:(0,R.jsx)(`span`,{className:`truncate`,children:l})]}),(0,R.jsx)(V,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`})]})}),(0,R.jsxs)(cP,{align:`start`,className:`min-w-44 max-w-80`,mobileTitle:`Host`,children:[(0,R.jsx)(fP,{children:`Host`}),t.length>0?t.map(e=>(0,R.jsxs)(uP,{onSelect:()=>r(e.id),className:`flex items-center justify-between gap-3`,children:[(0,R.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 text-xs`,children:[(0,R.jsx)(V,{name:fR(e),className:`size-3.5 shrink-0`}),(0,R.jsx)(`span`,{className:`truncate`,children:e.name}),i(e.id)?(0,R.jsx)(H0,{}):null,(0,R.jsx)(K0,{connected:e.status===`connected`})]}),(0,R.jsx)(V,{name:`Check`,className:B(M_,e.id===n?`opacity-100`:`opacity-0`)})]},e.id)):(0,R.jsx)(uP,{disabled:!0,className:`text-xs text-muted-foreground`,children:`No hosts available for this project`})]})]})}var INe={low:`Low`,medium:`Medium`,high:`High`,xhigh:`Extra High`},LNe=[],RNe=[],zNe=[],BNe=[];function VNe(e){return`/projects/${e}/managers/new`}function HNe(){let{projectId:e}=eh(),t=$m(),[n,r]=(0,L.useState)(``),i=mk(),a=i.data??zNe,o=i.data!==void 0,{data:s=[]}=W0(),{isLocalHost:c}=iA(),l=u0({providerId:n||void 0}),u=l.data?.providers??LNe,d=l.data!==void 0,f=l.data?.models??RNe,p=fI(),m=(0,L.useCallback)(async e=>{let n=await p.mutateAsync(e);t(`/projects/${n.projectId}/threads/${n.id}`)},[p,t]),h=(0,L.useCallback)(n=>{n!==e&&t(VNe(n))},[t,e]);return e?(0,R.jsx)(c0,{contentClassName:`pt-4 md:pt-5`,children:(0,R.jsx)(UNe,{projectId:e,projects:a,projectsAreLoaded:o,providers:u,providersAreLoaded:d,hosts:s,isLocalHost:c,models:f,selectedProviderId:n,onSelectedProviderIdChange:r,onProjectChange:h,onHire:m,isHirePending:p.isPending})}):(0,R.jsx)(c0,{contentClassName:`min-h-full items-center justify-center`,children:(0,R.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-12 text-center`,children:[(0,R.jsx)(V,{name:`FolderOpen`,className:`size-5 text-muted-foreground`,"aria-hidden":!0}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Pick a project from the sidebar to hire a manager.`})]})})}function UNe({projectId:e,projects:t,projectsAreLoaded:n,providers:r,providersAreLoaded:i,hosts:a,isLocalHost:o,models:s,selectedProviderId:c,onSelectedProviderIdChange:l,onProjectChange:u,onHire:d,isHirePending:f}){let p=(0,L.useId)(),[m,h]=(0,L.useState)(``),[g,_]=(0,L.useState)(``),[v,y]=(0,L.useState)(``),[b,x]=(0,L.useState)(`default`),[S,C]=(0,L.useState)(``),[w,T]=(0,L.useState)(!1),[E,D]=(0,L.useState)(null),O=(0,L.useMemo)(()=>{if(c){let e=r.find(e=>e.id===c);if(e)return e}return r[0]??null},[r,c]),k=O?.id??``,A=O!==null,j=i?`No providers available`:`Loading providers…`,M=n?`No projects available`:`Loading projects…`,N=(0,L.useMemo)(()=>t.some(t=>t.id===e)?e:t[0]?.id??e,[e,t]),P=(0,L.useMemo)(()=>t.find(e=>e.id===N)??null,[N,t]),ee=(0,L.useMemo)(()=>t.map(e=>({value:e.id,label:e.name})),[t]),F=P?.sources??BNe,te=(0,L.useMemo)(()=>s.find(e=>e.model===g),[s,g]),ne=(0,L.useMemo)(()=>te?.supportedReasoningEfforts?.length?te.supportedReasoningEfforts.map(e=>({value:e.reasoningEffort,label:INe[e.reasoningEffort]??e.reasoningEffort})):[],[te]),re=(0,L.useMemo)(()=>r.map(e=>({value:e.id,label:e.displayName,icon:l0(e.id)?.icon})),[r]),ie=O?.id,ae=(0,L.useMemo)(()=>s.map(e=>({value:e.model,label:p0(e.displayName||e.model,ie)})),[s,ie]);(0,L.useEffect)(()=>{A&&s.length>0&&!s.some(e=>e.model===g)&&_(s.find(e=>e.isDefault)?.model??s[0]?.model??``)},[A,s,g]),(0,L.useEffect)(()=>{if(!te){y(``);return}let e=ne.some(e=>e.value===v);b===`user`&&e||y(te.defaultReasoningEffort??ne[0]?.value??``)},[ne,b,te,v]);let oe=ne.find(e=>e.value===v)?.value??ne[0]?.value,I=(0,L.useMemo)(()=>a.filter(e=>e.status===`connected`&&vE(F,e.id)!==void 0),[a,F]);(0,L.useEffect)(()=>{if(I.length===0){S&&C(``);return}I.some(e=>e.id===S)||C(I.find(e=>o(e.id))?.id??I[0].id)},[I,S,o]);let se=(0,L.useCallback)(e=>{l(e),D(null)},[l]),ce=(0,L.useCallback)(e=>{u(e),D(null)},[u]),le=(0,L.useCallback)(e=>{_(e),x(`default`),D(null)},[]),ue=(0,L.useCallback)(e=>{y(e),x(`user`),D(null)},[]),de=(0,L.useCallback)(async e=>{if(e.preventDefault(),!(!N||w||f)){if(!O){D(`A provider is required`);return}if(!g){D(`A model is required`);return}if(!S){D(`A host is required`);return}T(!0),D(null);try{let e=m.trim();await d({projectId:N,...e?{name:e}:{},providerId:O.id,model:g,...oe?{reasoningLevel:oe}:{},environment:{type:`host`,hostId:S}})}catch(e){D(JL({error:e,fallbackMessage:`Failed to hire manager.`}))}finally{T(!1)}}},[oe,N,f,w,m,d,S,g,O]),fe=w||f;return(0,R.jsxs)(`form`,{"aria-label":`Hire manager`,className:`space-y-1`,onSubmit:de,children:[(0,R.jsx)(`div`,{className:`flex items-center px-3.5`,children:ee.length>0?(0,R.jsx)(x0,{label:`Project`,value:N,options:ee,onChange:ce,className:`h-8 text-sm`}):(0,R.jsx)(g2,{isLoading:!n,message:M})}),(0,R.jsxs)(`div`,{className:`relative w-full rounded-lg border border-input bg-background pb-2`,children:[(0,R.jsxs)(`div`,{className:`space-y-1 px-4 pt-3`,children:[(0,R.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:`New Manager`}),(0,R.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:`Managers are special threads that have persistent memory and can help you coordinate work by delegating tasks to managed child threads.`})]}),(0,R.jsx)(`div`,{className:`px-4 pt-3`,children:(0,R.jsx)(Z_,{id:p,value:m,placeholder:`Give them a name (optional)`,disabled:w,"aria-label":`Manager name`,className:`h-10 border-muted-foreground/30 text-sm`,onChange:e=>{h(e.target.value),D(null)}})}),(0,R.jsxs)(`div`,{className:`flex flex-row items-center gap-3 px-3.5 pt-1.5`,children:[(0,R.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-row items-center gap-1`,children:A?ae.length>0?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(S0,{providerOptions:re,selectedProviderId:k,onSelectedProviderChange:se,hasMultipleProviders:r.length>1,modelValue:g,modelOptions:ae,onModelChange:le,formatModelLabel:p0,fastModeEnabled:!1,onFastModeChange:()=>{},showFastModeToggle:!1,muted:!0}),ne.length>0?(0,R.jsx)(x0,{label:`Reasoning`,value:oe??ne[0].value,options:ne,onChange:ue,muted:!0}):null,(0,R.jsx)(FNe,{hosts:a,eligibleHosts:I,selectedHostId:S,onChange:C,isLocalHost:o,muted:!0})]}):(0,R.jsx)(g2,{isLoading:!0,message:`Loading models…`}):(0,R.jsx)(g2,{isLoading:!i,message:j})}),(0,R.jsx)(`div`,{className:`flex shrink-0 flex-row items-center gap-1`,children:(0,R.jsx)(O_,{type:`submit`,size:`sm`,variant:`default`,title:fe?`Hiring…`:`Hire manager`,"aria-label":`Hire Manager`,disabled:fe,className:V_,children:fe?(0,R.jsx)(V,{name:`Spinner`,className:`size-4 animate-spin`}):(0,R.jsx)(V,{name:`UserRoundPlus`,className:`size-4`})})})]})]}),(0,R.jsx)(h2,{message:E})]})}function g2({isLoading:e,message:t}){return(0,R.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-sm text-muted-foreground`,children:[e?(0,R.jsx)(V,{name:`Spinner`,className:`size-3 animate-spin`,"aria-hidden":!0}):null,t]})}function _2({isPending:e,onUnarchive:t,buttonLabel:n,threadType:r,className:i}){let a=n??`Unarchive ${QI(r??`standard`)}`;return(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":a,title:a,onClick:t,disabled:!!e,className:B(`size-6`,i),children:e?(0,R.jsx)(V,{name:`Spinner`,className:`size-3 animate-spin`}):(0,R.jsx)(V,{name:`ArchiveRestore`,className:`size-3`})})}var WNe=[{value:`all`,label:`All`},{value:`manager`,label:`Managers`},{value:`managed`,label:`Managed`},{value:`unmanaged`,label:`Unmanaged`}];function GNe(e){return e.type===`manager`?`manager`:e.parentThreadId===null?null:`managed`}function KNe(){let{projectId:e}=eh(),[t,n]=(0,L.useState)(`all`),r=gje({projectId:e,kind:t}),i=IL(),a=(0,L.useMemo)(()=>(r.data?.pages??[]).flat().filter(e=>e.archivedAt!=null),[r.data]);if(!e)return(0,R.jsx)(c0,{contentClassName:`min-h-full items-center justify-center`,children:(0,R.jsx)(`p`,{className:`py-12 text-center text-sm text-muted-foreground`,children:`Project not found`})});let o=r.isPending,s=!o&&a.length===0;return(0,R.jsx)(c0,{contentClassName:`pt-0`,children:(0,R.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl`,children:[(0,R.jsxs)(`div`,{className:`sticky top-0 z-10 -mx-4 bg-background px-4 pt-4 md:-mx-5 md:px-5 md:pt-5`,children:[(0,R.jsx)(Yb,{placement:`below`,tone:`background`}),(0,R.jsx)(`div`,{className:`inline-flex items-center gap-1 rounded-lg border border-border/70 p-0.5`,role:`tablist`,"aria-label":`Filter archived threads`,children:WNe.map(e=>{let r=t===e.value;return(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`sm`,role:`tab`,"aria-selected":r,"aria-pressed":r,className:`h-7 rounded-md px-2 text-xs font-medium text-muted-foreground sm:px-3`,onClick:()=>n(e.value),children:e.label},e.value)})})]}),(0,R.jsxs)(`div`,{className:`space-y-3 pt-3`,children:[o?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading archived threads…`}):s?(0,R.jsx)(`p`,{className:`rounded-md border border-dashed border-border px-3 py-4 text-sm text-muted-foreground`,children:`No archived threads yet.`}):(0,R.jsx)(`div`,{className:`space-y-1`,children:a.map(t=>{let n=GNe(t);return(0,R.jsxs)(`div`,{className:`group flex h-9 items-center gap-3 rounded-md px-3 text-sm transition-colors hover:bg-state-hover`,children:[(0,R.jsx)(Ih,{to:`/projects/${e}/threads/${t.id}`,className:`min-w-0 flex-1`,children:(0,R.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,R.jsx)(`span`,{className:`truncate`,children:ZI(t)}),n?(0,R.jsx)(N$,{variant:`outline`,className:`shrink-0`,children:n}):null]})}),(0,R.jsx)(_2,{isPending:i.isPending&&i.variables?.id===t.id,onUnarchive:()=>{i.mutate({id:t.id})},threadType:t.type,className:`hover:bg-accent-foreground/15`})]},t.id)})}),r.hasNextPage?(0,R.jsx)(O_,{type:`button`,variant:`ghost`,onClick:()=>{r.fetchNextPage()},disabled:r.isFetchingNextPage,className:`h-9 w-full justify-center rounded-md px-3 text-sm font-normal text-muted-foreground`,children:r.isFetchingNextPage?`Loading…`:`Load more`}):null]})]})})}var qNe=`size-2 shrink-0 rounded-full ring-1 ring-inset transition-all bg-success ring-success/25 shadow-[0_0_0_4px_color-mix(in_oklch,var(--color-success)_16%,transparent)]`;function v2({action:e,children:t,description:n,title:r}){return(0,R.jsxs)(`section`,{className:`space-y-2`,children:[(0,R.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h2`,{className:`text-sm font-semibold`,children:r}),n?(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n}):null]}),e?(0,R.jsx)(`div`,{className:`shrink-0`,children:e}):null]}),(0,R.jsx)(`div`,{className:`rounded-lg border border-border bg-card px-3 py-2.5`,children:t})]})}function y2({children:e}){return(0,R.jsx)(`div`,{className:`divide-y divide-border`,children:e})}function b2({children:e}){return(0,R.jsx)(`div`,{className:`flex items-center gap-3 py-2 text-sm first:pt-0 last:pb-0`,children:e})}function JNe({label:e,description:t,children:n}){return(0,R.jsxs)(`div`,{className:B(`flex flex-col gap-2 sm:flex-row sm:justify-between sm:gap-4`,t?`sm:items-start`:`sm:items-center`),children:[(0,R.jsxs)(`div`,{className:`flex-1`,children:[(0,R.jsx)(`p`,{className:`text-sm font-semibold`,children:e}),t?(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t}):null]}),(0,R.jsx)(`div`,{className:`sm:flex sm:min-w-[320px] sm:justify-end`,children:n})]})}function YNe({target:e,pending:t,onOpenChange:n,onDelete:r}){return(0,R.jsx)(SI,{open:e!==null,onOpenChange:n,children:(0,R.jsx)(EI,{children:e?(0,R.jsx)(XNe,{target:e,pending:t,onDelete:r}):null})})}function XNe({target:e,pending:t,onDelete:n}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(DI,{children:[(0,R.jsx)(kI,{children:`Remove host?`}),(0,R.jsx)(AI,{children:`Remove "${e.name}" and all of its project sources? This cannot be undone.`})]}),(0,R.jsx)(OI,{children:(0,R.jsx)(O_,{type:`button`,variant:`destructive`,disabled:t,onClick:()=>n(e.id),children:`Remove host`})})]})}function ZNe({target:e,pending:t,onOpenChange:n,onRename:r}){return(0,R.jsx)(SI,{open:e!==null,onOpenChange:n,children:(0,R.jsx)(EI,{children:e?(0,R.jsx)(QNe,{target:e,pending:t,onRename:r},e.id):null})})}function QNe({target:e,pending:t,onRename:n}){let r=(0,L.useId)(),[i,a]=(0,L.useState)(e.currentName),[o,s]=(0,L.useState)(null);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(DI,{children:[(0,R.jsx)(kI,{children:`Rename host`}),(0,R.jsx)(AI,{children:`Choose a new name for this host.`})]}),(0,R.jsxs)(`form`,{className:`space-y-4`,onSubmit:r=>{if(r.preventDefault(),t)return;let a=i.trim();if(!a){s(`Host name cannot be empty.`);return}n(e.id,a)},children:[(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(Z_,{id:r,"aria-label":`Host name`,value:i,autoFocus:!0,disabled:t,onChange:e=>{a(e.target.value),o&&s(null)}}),o?(0,R.jsx)(`p`,{className:`text-sm text-destructive`,children:o}):null]}),(0,R.jsx)(OI,{children:(0,R.jsx)(O_,{type:`submit`,disabled:t,children:`Rename host`})})]})]})}function $Ne({open:e,onOpenChange:t}){return(0,R.jsx)(SI,{open:e,onOpenChange:t,children:(0,R.jsx)(EI,{className:`sm:max-w-2xl`,children:(0,R.jsx)(ePe,{})})})}function ePe(){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(DI,{children:[(0,R.jsx)(kI,{children:`Unable to add new host`}),(0,R.jsx)(AI,{children:`You need to specify the URL that allows the new host to talk to the server.`})]}),(0,R.jsxs)(`div`,{className:`min-w-0 space-y-2 text-sm text-foreground`,children:[(0,R.jsx)(`p`,{children:`Run this on the server machine, then restart bb:`}),(0,R.jsx)(`pre`,{className:`min-w-0 overflow-x-auto rounded-md border border-border bg-muted/40 px-3 py-2 font-mono text-xs leading-5`,children:(0,R.jsx)(`code`,{children:`npx bb-app config BB_APP_URL http://<your-machine>.<tailnet>.ts.net:38886`})})]})]})}function tPe(e){return new Date(e).toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`})}function nPe({host:e,open:t,target:n,onOpenChange:r}){let i=t&&n!==null;return(0,R.jsx)(SI,{open:i,onOpenChange:r,children:(0,R.jsx)(EI,{className:`sm:max-w-2xl`,children:i&&n?(0,R.jsx)(rPe,{host:e,target:n}):null})})}function rPe({host:e,target:t}){let[n,r]=(0,L.useState)(()=>t.expiresAt<=Date.now()),i=e?.status===`connected`,a=!i&&!n,o=i?`Host connected`:n?`Join command expired`:`Waiting for host`;return(0,L.useEffect)(()=>{let e=t.expiresAt-Date.now();if(e<=0){r(!0);return}r(!1);let n=window.setTimeout(()=>r(!0),e);return()=>window.clearTimeout(n)},[t.expiresAt]),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(DI,{children:[(0,R.jsx)(kI,{children:`New host`}),(0,R.jsx)(AI,{children:`Run this command from the new host.`})]}),(0,R.jsxs)(`div`,{className:`min-w-0 space-y-3`,children:[(0,R.jsxs)(`div`,{className:`relative min-w-0 rounded-md border border-border bg-muted/40`,children:[(0,R.jsx)(`pre`,{className:`max-h-56 min-w-0 overflow-y-auto whitespace-pre-wrap break-all px-3 py-2.5 pr-10 text-xs leading-5`,children:(0,R.jsx)(`code`,{children:t.joinCommand})}),(0,R.jsx)(vB,{text:t.joinCommand,label:`Copy host command`,className:`absolute right-2 top-2`})]}),(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-xs text-muted-foreground`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:[i?(0,R.jsx)(V,{name:`CircleCheck`,className:`size-4 text-success`,"aria-hidden":`true`}):n?(0,R.jsx)(V,{name:`AlertCircle`,className:`size-4 text-destructive`,"aria-hidden":`true`}):null,(0,R.jsx)(`span`,{className:a?`animate-shine font-medium`:`font-medium text-foreground`,children:o}),a?(0,R.jsxs)(`span`,{children:[`· Expires at `,tPe(t.expiresAt)]}):null]})]})]})}var iPe=[{label:`System`,value:`system`},{label:`Light`,value:`light`},{label:`Dark`,value:`dark`}],aPe={dark:`Dark`,light:`Light`,system:`System`};function oPe(){let e=QEe(),{data:t=[],isLoading:n}=W0(),r=et(),[i,a]=(0,L.useState)(null),[o,s]=(0,L.useState)(null),[c,l]=(0,L.useState)(null),[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(!1),m=bt({meta:{errorMessage:`Failed to rename host.`},mutationFn:({id:e,name:t})=>qpe(e,{name:t}),onSuccess:()=>{sI({queryClient:r}),a(null)}}),h=bt({meta:{errorMessage:`Failed to remove host.`},mutationFn:({id:e})=>Jpe(e),onSuccess:()=>{cI({queryClient:r}),s(null)}}),g=bt({meta:{errorMessage:`Failed to create host join command.`,showErrorToast:!1},mutationFn:()=>Wpe(),onSuccess:e=>{sI({queryClient:r}),l(e),d(!0)},onError:e=>{if(e instanceof JD&&e.code===`app_url_required`){p(!0);return}XL({error:e,fallbackMessage:`Failed to create host join command.`})}}),_=bt({meta:{errorMessage:`Failed to cancel host join.`},mutationFn:({id:e})=>Gpe(e),onSuccess:(e,t)=>{sI({queryClient:r}),l(e=>e?.hostId===t.id?null:e),d(!1)}}),v=c===null?null:t.find(e=>e.id===c.hostId)??null,y=g.isPending||_.isPending;async function b(){if(c!==null&&c.expiresAt>Date.now()&&v?.status!==`connected`){d(!0);return}if(c!==null&&v?.status!==`connected`)try{await _.mutateAsync({id:c.hostId})}catch{return}g.mutate()}(0,L.useEffect)(()=>{if(!u||v?.status!==`connected`)return;let e=window.setTimeout(()=>{l(null),d(!1)},1500);return()=>window.clearTimeout(e)},[u,v?.status]);function x(e){if(e){d(!0);return}c!==null&&v?.status!==`connected`&&_.mutate({id:c.hostId}),l(null),d(!1)}return(0,R.jsxs)(c0,{contentClassName:`pt-4 md:pt-5`,children:[(0,R.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl space-y-6`,children:[(0,R.jsx)(v2,{title:`Appearance`,children:(0,R.jsx)(JNe,{label:`Theme`,children:(0,R.jsxs)(oP,{children:[(0,R.jsx)(sP,{asChild:!0,children:(0,R.jsxs)(O_,{variant:`outline`,size:`sm`,className:`w-full justify-between sm:w-48`,"aria-label":`Theme`,children:[aPe[e],(0,R.jsx)(V,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`})]})}),(0,R.jsx)(cP,{align:`end`,className:`w-48`,children:iPe.map(t=>(0,R.jsxs)(uP,{onSelect:()=>JEe(t.value),children:[t.label,(0,R.jsx)(V,{name:`Check`,className:B(`ml-auto`,e!==t.value&&`opacity-0`,j_)})]},t.value))})]})})}),(0,R.jsx)(v2,{title:`Hosts`,description:`Persistent hosts`,action:(0,R.jsxs)(O_,{type:`button`,size:`sm`,variant:`ghost`,disabled:y,onClick:()=>{b()},children:[(0,R.jsx)(V,{name:`Plus`,className:`size-3.5`}),`New host`]}),children:n?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading…`}):t.length===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No registered hosts.`}):(0,R.jsx)(y2,{children:t.map(e=>{let t=e.status===`connected`;return(0,R.jsxs)(b2,{children:[(0,R.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[e.name,(0,R.jsx)(`span`,{className:`ml-1.5 text-xs text-muted-foreground`,children:e.id})]}),t?(0,R.jsx)(`span`,{className:qNe,title:`Connected`}):e.lastSeenAt===null?(0,R.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:`Never connected`}):(0,R.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:[`Offline · `,Cfe(e.lastSeenAt)]}),(0,R.jsxs)(oP,{children:[(0,R.jsx)(sP,{asChild:!0,children:(0,R.jsx)(O_,{variant:`ghost`,size:`icon`,className:`h-7 w-7 shrink-0`,"aria-label":`Host actions`,children:(0,R.jsx)(V,{name:`MoreHorizontal`,className:`size-4`})})}),(0,R.jsxs)(cP,{align:`end`,className:`w-40`,children:[(0,R.jsx)(uP,{onSelect:()=>a({id:e.id,currentName:e.name}),children:`Rename`}),(0,R.jsx)(uP,{className:`text-destructive focus:text-destructive`,onSelect:()=>s({id:e.id,name:e.name}),children:`Remove`})]})]})]},e.id)})})})]}),(0,R.jsx)(ZNe,{target:i,pending:m.isPending,onOpenChange:e=>{e||a(null)},onRename:(e,t)=>m.mutate({id:e,name:t})}),(0,R.jsx)(YNe,{target:o,pending:h.isPending,onOpenChange:e=>{e||s(null)},onDelete:e=>h.mutate({id:e})}),(0,R.jsx)(nPe,{open:u,target:c,host:v,onOpenChange:x}),(0,R.jsx)($Ne,{open:f,onOpenChange:p})]})}function sPe({target:e,pending:t,onOpenChange:n,onDelete:r}){return(0,R.jsx)(SI,{open:e!==null,onOpenChange:n,children:(0,R.jsx)(EI,{children:e?(0,R.jsx)(cPe,{target:e,pending:t,onDelete:r}):null})})}function cPe({target:e,pending:t,onDelete:n}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(DI,{children:[(0,R.jsx)(kI,{children:`Remove source?`}),(0,R.jsx)(AI,{children:`Remove "${e.label}" from this project? This cannot be undone.`})]}),(0,R.jsx)(OI,{children:(0,R.jsx)(O_,{type:`button`,variant:`destructive`,disabled:t,onClick:()=>n(e.id),children:`Remove source`})})]})}function lPe({source:e,isLocalhostSource:t,isLocalPathInvalid:n,hostName:r,isEditPending:i,isOnlySource:a,onEditLocalPath:o,onRemove:s}){return(0,R.jsxs)(b2,{children:[(0,R.jsx)(V,{name:dR,className:`size-4 shrink-0 text-muted-foreground`}),(0,R.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,R.jsx)(`span`,{className:`min-w-0 flex-shrink truncate`,children:e.path}),(0,R.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:r}),t?(0,R.jsx)(`span`,{className:`self-center`,children:(0,R.jsx)(H0,{})}):null,n?(0,R.jsx)(N$,{variant:`destructive`,children:`Invalid local path`}):null]}),(0,R.jsxs)(oP,{children:[(0,R.jsx)(sP,{asChild:!0,children:(0,R.jsx)(O_,{variant:`ghost`,size:`icon`,className:`h-7 w-7 shrink-0`,"aria-label":`Source actions`,children:(0,R.jsx)(V,{name:`MoreHorizontal`,className:`size-4`})})}),(0,R.jsxs)(cP,{align:`end`,className:`w-40`,children:[t?(0,R.jsx)(uP,{disabled:i,onSelect:t=>{t.preventDefault(),o(e)},children:`Edit local path`}):null,(0,R.jsx)(uP,{className:`text-destructive focus:text-destructive`,disabled:a,onSelect:()=>s(e),children:`Remove`})]})]})]})}function uPe(e,t){return t.get(e.hostId)??e.hostId}function dPe(){let{projectId:e}=eh(),t=hk(),n=mk({enabled:t.isSuccess||t.isError}),r=n.data,i=t.isFetching||n.isLoading,{data:a=[]}=W0(),o=et(),[s,c]=(0,L.useState)(null),l=bt({meta:{errorMessage:`Failed to remove source.`},mutationFn:({sourceId:t})=>e?epe(e,t):Promise.resolve(),onSuccess:()=>{UF({projectId:e,queryClient:o}),c(null)}}),u=hI(),d=gI(),f=r?.find(t=>t.id===e),p=f?.sources,m=(0,L.useMemo)(()=>p??[],[p]),h=(0,L.useMemo)(()=>new Map(a.map(e=>[e.id,e.name])),[a]),g=f?.name??``,_=u.isPending||d.isPending,v=yI({isPending:_,submit:(0,L.useCallback)(({path:t,hostId:n,target:r,closeDialog:i})=>{if(e){if(r.kind===`add-source`)u.mutate({projectId:e,path:t,hostId:n},{onSuccess:i});else if(r.kind===`update`){let r=m.find(e=>_E(e)&&e.hostId===n);if(!r)return;d.mutate({projectId:e,sourceId:r.id,path:t},{onSuccess:i})}}},[u,e,m,d])}),y=(0,L.useCallback)(()=>{e&&v.openPicker({kind:`add-source`,projectId:e,projectName:g})},[v,e,g]),b=(0,L.useCallback)(t=>{e&&v.openPicker({kind:`update`,projectId:e,projectName:g,currentPath:t.path})},[v,e,g]),x=v.localHostId,S=nA((0,L.useMemo)(()=>x?m.filter(e=>_E(e)&&e.hostId===x).map(e=>e.path):[],[x,m])),C=x!=null&&!vE(m,x)?(0,R.jsx)(`div`,{className:`mt-2 flex gap-2`,children:(0,R.jsx)(O_,{size:`sm`,variant:`outline`,disabled:u.isPending,onClick:y,children:`Add local path`})}):null;return(0,R.jsxs)(c0,{contentClassName:`pt-4 md:pt-5`,children:[(0,R.jsx)(`div`,{className:`mx-auto w-full max-w-3xl space-y-6`,children:(0,R.jsx)(v2,{title:`Project Sources`,children:i?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading…`}):m.length===0?(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No sources configured.`}),C]}):(0,R.jsxs)(`div`,{children:[(0,R.jsx)(y2,{children:m.map(e=>{let t=_E(e)&&x!=null&&e.hostId===x;return(0,R.jsx)(lPe,{source:e,isLocalhostSource:t,isLocalPathInvalid:t&&rA(S,e.path),hostName:_E(e)?h.get(e.hostId)??e.hostId:``,isEditPending:_,isOnlySource:m.length<=1,onEditLocalPath:b,onRemove:e=>c({id:e.id,label:uPe(e,h)})},e.id)})}),C]})})}),(0,R.jsx)(jI,{target:v.projectPathDialog.target,pending:_,platform:v.platform,onOpenChange:v.projectPathDialog.onOpenChange,onSubmit:v.submitProjectPath}),(0,R.jsx)(sPe,{target:s,pending:l.isPending,onOpenChange:e=>{e||c(null)},onDelete:e=>l.mutate({sourceId:e})})]})}var fPe=`bb.thread.secondaryPanel`,pPe=`bb.thread.secondaryPanelState`,mPe=336*60*60*1e3,x2=rw([`git-diff`,`thread-info`]),hPe=ZC(`kind`,[G({kind:K(`working-tree`)}).strict(),G({kind:K(`head`)}).strict(),G({kind:K(`merge-base`),ref:U().min(1)}).strict()]),gPe=K(`deleted`).nullable(),S2=G({lineNumber:W().int().positive().nullable(),path:U().min(1),source:hPe,statusLabel:gPe}).strict(),_Pe=G({lineNumber:W().int().positive().nullable(),path:U().min(1)}).strict(),vPe=ZC(`type`,[G({type:K(`workspace`),path:U().min(1)}).strict(),G({type:K(`storage`),path:U().min(1)}).strict()]),yPe=ZC(`type`,[G({type:K(`workspace`),path:U().min(1)}).strict(),G({type:K(`storage`),path:U().min(1)}).strict(),G({type:K(`host-file`),path:U().min(1)}).strict()]),bPe=G({workspace:KC(S2),storage:KC(U().min(1)),hostFiles:KC(_Pe),active:yPe.nullable()}).strict(),xPe=G({workspace:KC(S2),storage:KC(U().min(1)),active:vPe.nullable()}).strict(),SPe=G({version:K(1),activePanel:x2.nullable(),environmentId:U().min(1).nullable(),fileTabs:bPe,lastUsedAt:W().int().nonnegative()}).strict(),CPe=G({version:K(1),activePanel:x2.nullable(),environmentId:U().min(1).nullable(),fileTabs:xPe,lastUsedAt:W().int().nonnegative()}).strict();function wPe(){return typeof window>`u`?null:window.localStorage}function TPe(e){return encodeURIComponent(e.trim())}function EPe(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.path!==i.path||r.lineNumber!==i.lineNumber||!VD(r.source,i.source)||r.statusLabel!==i.statusLabel)return!1}return!0}function C2(e,t){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 DPe(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.path!==i.path||r.lineNumber!==i.lineNumber)return!1}return!0}function w2(e,t){return e===null||t===null?e===t:e.type===t.type&&e.path===t.path}function T2(e,t){return e.find(e=>e.path===t)??null}function E2(e,t){return e.find(e=>e.path===t)??null}function OPe(e){let t=new Set,n=[];for(let r of e)t.has(r.path)||(t.add(r.path),n.push(r));return n}function kPe(e){let t=new Set,n=[];for(let r of e)t.has(r)||(t.add(r),n.push(r));return n}function APe(e){let t=new Set,n=[];for(let r of e)t.has(r.path)||(t.add(r.path),n.push(r));return n}function jPe(e,t){let n=e.active;return n===null?null:n.type===`workspace`?T2(e.workspace,n.path)===null?null:n:n.type===`host-file`?E2(e.hostFiles,n.path)===null?null:n:t&&e.storage.includes(n.path)?n:null}function MPe(e={}){return{version:1,activePanel:e.activePanel??null,environmentId:e.environmentId??null,fileTabs:e.fileTabs??{workspace:[],storage:[],hostFiles:[],active:null},lastUsedAt:e.lastUsedAt??0}}var D2=MPe();function NPe({threadId:e}){return`${pPe}-${TPe(e)}-1`}function PPe(e){return e.startsWith(`bb.thread.secondaryPanelState-`)&&e.endsWith(`-1`)}function O2({now:e,state:t}){return e-t.lastUsedAt>mPe}function FPe({initialValue:e,now:t,storedValue:n}){return k2({initialValue:e,now:t,storedValue:n}).state}function k2({initialValue:e,now:t,storedValue:n}){if(n===null)return{shouldPrune:!1,state:e};let r;try{r=JSON.parse(n)}catch{return{shouldPrune:!0,state:e}}let i=SPe.safeParse(r);if(i.success)return O2({now:t,state:i.data})?{shouldPrune:!0,state:e}:{shouldPrune:!1,state:i.data};let a=CPe.safeParse(r);if(!a.success)return{shouldPrune:!0,state:e};let o={...a.data,fileTabs:{...a.data.fileTabs,hostFiles:[]}};return O2({now:t,state:o})?{shouldPrune:!0,state:e}:{shouldPrune:!1,state:o}}function IPe({state:e}){return JSON.stringify(e)}function A2({isManagerThread:e,state:t}){let n=OPe(t.fileTabs.workspace),r=e?kPe(t.fileTabs.storage):[],i=APe(t.fileTabs.hostFiles),a={workspace:n,storage:r,hostFiles:i,active:jPe({workspace:n,storage:r,hostFiles:i,active:t.fileTabs.active},e)};return EPe(n,t.fileTabs.workspace)&&C2(r,t.fileTabs.storage)&&DPe(i,t.fileTabs.hostFiles)&&w2(a.active,t.fileTabs.active)?t:{...t,fileTabs:a}}function LPe(e){let t=e.fileTabs.active;return t?.type===`workspace`?T2(e.fileTabs.workspace,t.path):null}function j2(e){let t=e.fileTabs.active;return t?.type===`storage`&&e.fileTabs.storage.includes(t.path)?t.path:null}function RPe(e){let t=e.fileTabs.active;return t?.type===`host-file`?E2(e.fileTabs.hostFiles,t.path):null}function zPe(e){return e.fileTabs.active===null?e:{...e,fileTabs:{...e.fileTabs,active:null}}}function BPe({environmentId:e,state:t}){let n=e??null;return!(t.fileTabs.workspace.length>0||t.fileTabs.active?.type===`workspace`)||t.environmentId===n?t:{...t,environmentId:n,fileTabs:{...t.fileTabs,workspace:[],active:t.fileTabs.active?.type===`workspace`?null:t.fileTabs.active}}}function VPe({isManagerThread:e,pinnedStorageFilePath:t,state:n,storageFiles:r}){if(!e)return A2({isManagerThread:e,state:n});let i=new Set([t,...r.map(e=>e.path)]),a=n.fileTabs.storage.filter(e=>i.has(e)),o=n.fileTabs.active?.type===`storage`&&!i.has(n.fileTabs.active.path)?null:n.fileTabs.active;return C2(a,n.fileTabs.storage)&&w2(o,n.fileTabs.active)?n:{...n,fileTabs:{...n.fileTabs,storage:a,active:o}}}function HPe({now:e}){let t=wPe();if(!t)return;t.removeItem(fPe);let n=[];for(let r=0;r<t.length;r+=1){let i=t.key(r);!i||!PPe(i)||k2({initialValue:D2,now:e,storedValue:t.getItem(i)}).shouldPrune&&n.push(i)}for(let e of n)t.removeItem(e)}var M2=`secondaryPanel`,UPe=`git-diff`,WPe=`thread-info`,N2=60*1e3;function GPe(e){switch(e){case UPe:return`git-diff`;case WPe:return`thread-info`;default:return null}}function P2(e){return e!=null&&e.length>0}function KPe(e,t){return{...e,lastUsedAt:t}}var qPe=Vk({parse:(e,t)=>FPe({initialValue:t,now:Date.now(),storedValue:e}),serialize:e=>IPe({state:e})}),JPe=pg(D2),YPe=Pk(e=>Dg(NPe({threadId:e}),D2,qPe,{getOnInit:!0}));function F2(e){return P2(e)?YPe(e):JPe}function XPe(e){return GPe(new URLSearchParams(e).get(M2))}function I2(e,t){let n=new URLSearchParams(e);return t?n.set(M2,t):n.delete(M2),n.toString()}function ZPe(e){(0,L.useEffect)(()=>{HPe({now:Date.now()})},[e])}function L2(e){return Sg(F2(e))}function R2(e){let t=Cg(F2(e));return(0,L.useCallback)(n=>{if(!P2(e))return;let r=Date.now();t(e=>{let t=n(e);return t===e?e:KPe(t,r)})},[t,e])}function QPe(e){let t=Ym(),n=$m(),r=R2(e);(0,L.useEffect)(()=>{let e=XPe(t.search);if(e===null)return;r(t=>t.activePanel===e?t:{...t,activePanel:e});let i=I2(t.search,null);n({pathname:t.pathname,search:i.length>0?`?${i}`:``},{replace:!0})},[t.pathname,t.search,n,r])}function $Pe(e){return I2(e,null)}function eFe(e){return t=>t.activePanel===e?t:{...t,activePanel:e}}function z2(e){let t=R2(e),n=$m(),r=Ym(),i=(0,L.useRef)(r);return i.current=r,(0,L.useCallback)(r=>{if(!P2(e))return;t(eFe(r));let a=i.current,o=$Pe(a.search);n({pathname:a.pathname,search:o.length>0?`?${o}`:``},{replace:!0})},[n,e,t])}function tFe(e){let t=R2(e),n=(0,L.useRef)(null);return(0,L.useCallback)(()=>{let r=Date.now();n.current!==null&&n.current.threadId===e&&r-n.current.touchedAt<N2||(n.current={threadId:e,touchedAt:r},t(e=>e.activePanel===null||r-e.lastUsedAt<N2?e:{...e}))},[e,t])}function nFe(e){return L2(e).activePanel}var rFe=`bb.thread.terminalPanelState`,iFe=336*60*60*1e3,aFe=G({version:K(1),isOpen:RC(),activeTerminalId:U().min(1).nullable(),panelHeightPercent:W().int().min(18).max(70),lastUsedAt:W().int().nonnegative()}).strict();function oFe(){return typeof window>`u`?null:window.localStorage}function sFe(e){return encodeURIComponent(e.trim())}function cFe(e={}){return{version:1,isOpen:e.isOpen??!1,activeTerminalId:e.activeTerminalId??null,panelHeightPercent:e.panelHeightPercent??32,lastUsedAt:e.lastUsedAt??0}}var B2=cFe();function lFe({threadId:e}){return`${rFe}-${sFe(e)}-1`}function uFe(e){return e.startsWith(`bb.thread.terminalPanelState-`)&&e.endsWith(`-1`)}function dFe({now:e,state:t}){return e-t.lastUsedAt>iFe}function fFe({initialValue:e,now:t,storedValue:n}){return V2({initialValue:e,now:t,storedValue:n}).state}function V2({initialValue:e,now:t,storedValue:n}){if(n===null)return{shouldPrune:!1,state:e};let r;try{r=JSON.parse(n)}catch{return{shouldPrune:!0,state:e}}let i=aFe.safeParse(r);return!i.success||dFe({now:t,state:i.data})?{shouldPrune:!0,state:e}:{shouldPrune:!1,state:i.data}}function pFe({state:e}){return JSON.stringify(e)}function mFe({now:e}){let t=oFe();if(!t)return;let n=[];for(let e=0;e<t.length;e+=1){let r=t.key(e);r&&uFe(r)&&n.push(r)}for(let r of n)V2({initialValue:B2,now:e,storedValue:t.getItem(r)}).shouldPrune&&t.removeItem(r)}function H2(e){return e!=null&&e.length>0}function hFe(e,t){return{...e,lastUsedAt:t}}var gFe=Vk({parse:(e,t)=>fFe({initialValue:t,now:Date.now(),storedValue:e}),serialize:e=>pFe({state:e})}),_Fe=pg(B2),vFe=Pk(e=>Dg(lFe({threadId:e}),B2,gFe,{getOnInit:!0}));function U2(e){return H2(e)?vFe(e):_Fe}function yFe(e){return t=>t.isOpen===e?t:{...t,isOpen:e}}function bFe(e){(0,L.useEffect)(()=>{mFe({now:Date.now()})},[e])}function W2(e){return Sg(U2(e))}function G2(e){let t=Cg(U2(e));return(0,L.useCallback)(n=>{if(!H2(e))return;let r=Date.now();t(e=>{let t=n(e);return t===e?e:hFe(t,r)})},[t,e])}function xFe(e){let t=G2(e);return(0,L.useCallback)(e=>{t(yFe(e))},[t])}function SFe(e){let t=G2(e);return(0,L.useCallback)(()=>{t(e=>({...e,isOpen:!e.isOpen}))},[t])}function CFe(){let e=et();return bt({meta:{errorMessage:`Failed to run environment action.`,showErrorToast:!1},mutationFn:({id:e,...t})=>Rpe(e,t),onSuccess:(t,n)=>{RF({environmentId:n.id,queryClient:e})}})}function wFe(){let e=et();return bt({meta:{errorMessage:`Failed to update environment.`,showErrorToast:!1},mutationFn:({id:e,...t})=>Fpe(e,t),onSuccess:t=>{e.setQueryData($O(t.id),t),zF({environmentId:t.id,queryClient:e})}})}var TFe=1e4,EFe=3e4;function K2(e,t){if(!e)throw Error(`${t}: environmentId is required when query is enabled`);return e}function DFe(e){if(!e)throw Error(`useEnvironmentFilePreview: path is required when query is enabled`);return e}function OFe(e){if(!e)throw Error(`useEnvironmentFilePreview: source is required when query is enabled`);return e}function kFe(e){if(!e)throw Error(`useEnvironmentGitDiff: target is required when query is enabled`);return e}function AFe(e,t){return gt({queryKey:$O(e),queryFn:()=>Ppe(K2(e,`useEnvironment`)),enabled:(t?.enabled??!0)&&!!e,staleTime:t?.staleTime})}function q2(e,t,n){return gt({queryKey:ek(e,t??null),queryFn:()=>Ipe(K2(e,`useEnvironmentWorkStatus`),t),enabled:(n?.enabled??!0)&&!!e,refetchOnWindowFocus:!1,staleTime:TFe,placeholderData:(t,n)=>e?dje(t,n?.queryKey,e):void 0})}function jFe(e,t){return gt({queryKey:bme(e),queryFn:()=>Lpe(e),enabled:(t?.enabled??!0)&&!!e,refetchOnWindowFocus:!1,staleTime:EFe})}function MFe(e,t,n,r){return gt({queryKey:Eme(e,t,n),queryFn:({signal:r})=>Wfe({id:K2(e,`useEnvironmentFilePreview`),path:DFe(t),source:OFe(n),signal:r}),enabled:(r?.enabled??!0)&&!!e&&!!t&&n!==null,refetchOnWindowFocus:!1})}function NFe(e,t){let n=t.target,r=n?.type===`commit`?n.sha:n?.type===`all`||n?.type===`branch_committed`?n.mergeBaseBranch:null;return gt({queryKey:ok(e,n?.type??null,r),queryFn:()=>Vpe(e,kFe(n)),enabled:(t.enabled??!0)&&!!e&&n!==void 0,placeholderData:(t,n)=>fje(t,n?.queryKey,e),refetchOnWindowFocus:!1,staleTime:5e3})}var PFe=`grid grid-cols-[var(--detail-label-width,96px)_minmax(0,1fr)] gap-x-3`,J2=`m-0 text-xs leading-5 text-muted-foreground`,Y2=`m-0 min-w-0 text-xs leading-5 text-foreground`;function FFe(e){if(e)return{"--detail-label-width":e}}function X2({children:e,className:t,labelWidth:n}){return(0,R.jsx)(`dl`,{className:B(`flex flex-col gap-1 rounded-md border border-border/80 bg-background/40 px-2 py-1`,t),style:FFe(n),children:e})}function Z2({label:e,children:t,className:n,labelClassName:r,valueClassName:i,align:a=`center`,orientation:o=`horizontal`}){return o===`vertical`?(0,R.jsxs)(`div`,{className:B(`flex flex-col gap-1 py-0.5`,n),children:[(0,R.jsx)(`dt`,{className:B(J2,r),children:e}),(0,R.jsx)(`dd`,{className:B(Y2,i),children:t})]}):(0,R.jsxs)(`div`,{className:B(PFe,a===`center`?`items-center py-0.5`:`py-0.5`,n),children:[(0,R.jsx)(`dt`,{className:B(J2,r),children:e}),(0,R.jsx)(`dd`,{className:B(Y2,i),children:t})]})}function Q2(e){return{filesCount:e.files.length,insertions:e.insertions,deletions:e.deletions}}function $2(e){return`${e} file${e===1?``:`s`}`}function e4(e){if(e.filesCount===0&&e.insertions===0&&e.deletions===0)return`No changes`;let t=$2(e.filesCount);return e.insertions===0&&e.deletions===0?t:`${t}, ${NR({added:e.insertions,removed:e.deletions})}`}function t4(e){if(e.filesCount===0&&e.insertions===0&&e.deletions===0)return`No changes`;let t=$2(e.filesCount);return e.insertions===0&&e.deletions===0?t:(0,R.jsxs)(R.Fragment,{children:[t,`,`,` `,(0,R.jsx)(FJ,{insertions:e.insertions,deletions:e.deletions})]})}function n4(e){if(!e)return null;let t=e.workingTree;if(t.files.length>0){let e=t.state===`untracked`;return{kind:e?`untracked`:`uncommitted`,label:e?`Untracked files`:`Uncommitted files`,files:t.files,mergeBaseRef:null,stats:t}}let n=e.mergeBase;return n&&n.files.length>0?{kind:`committed`,label:`Committed files`,files:n.files,mergeBaseRef:n.baseRef,stats:n}:null}function IFe(e){return e===`??`?`A?`:e}function r4({files:e,className:t=`max-h-32`,emptyMessage:n=`No changed files detected.`,onFileClick:r}){return!e||e.length===0?(0,R.jsx)(hP,{message:n}):(0,R.jsx)(`ul`,{className:B(`space-y-1 overflow-auto`,t),children:e.map(e=>(0,R.jsxs)(`li`,{className:`grid grid-cols-[1.5rem_minmax(0,1fr)_auto] items-start gap-x-3`,children:[(0,R.jsx)(`span`,{className:`text-xs leading-5 text-muted-foreground/80`,children:IFe(e.status)}),(0,R.jsx)(h$,{path:e.path,onClick:r?()=>r(e):void 0}),e.insertions!==null&&e.deletions!==null?(0,R.jsx)(FJ,{insertions:e.insertions,deletions:e.deletions,hideZero:!0,className:`text-xs leading-5`}):null]},`${e.status}:${e.path}`))})}function i4(e){switch(e.kind){case`commit`:return{title:`Commit changes`,description:`Create a commit from the current workspace changes.`,submitLabel:`Commit changes`,showCommitControls:!0,showMergeBase:!1};case`commit_and_squash_merge`:return{title:`Commit and squash merge`,description:`Commit the current workspace changes, then squash merge this branch.`,submitLabel:`Commit + squash merge`,showCommitControls:!0,showMergeBase:!0};case`squash_merge`:return{title:`Squash merge`,description:`Squash merge this branch into the selected merge base.`,submitLabel:`Squash merge`,showCommitControls:!1,showMergeBase:!0};default:return jD(e)}}function LFe({target:e,branchName:t,gitStatusDisplay:n,changedFiles:r,threadId:i,threadType:a,showMergeBaseDetails:o=!1,mergeBaseBranch:s,mergeBaseBranchOptions:c,mergeBaseBranchOptionsLoading:l=!1,onMergeBaseBranchChange:u,onOpenChange:d,onCommit:f,onSquashMerge:p}){let m=(0,L.useMemo)(()=>e?i4(e):null,[e]);return(0,R.jsx)(SI,{open:e!==null,onOpenChange:d,children:(0,R.jsx)(EI,{className:`max-w-[34rem] gap-0 overflow-hidden border-border/80 bg-background p-0 shadow-xl`,children:e&&m?(0,R.jsx)(RFe,{target:e,branchName:t,gitStatusDisplay:n,changedFiles:r,threadId:i,threadType:a,showMergeBaseDetails:o,mergeBaseBranch:s,mergeBaseBranchOptions:c,mergeBaseBranchOptionsLoading:l,onMergeBaseBranchChange:u,onOpenChange:d,onCommit:f,onSquashMerge:p},e.kind):null})})}function RFe({target:e,branchName:t,gitStatusDisplay:n,changedFiles:r,threadId:i,threadType:a,showMergeBaseDetails:o,mergeBaseBranch:s,mergeBaseBranchOptions:c,mergeBaseBranchOptionsLoading:l,onMergeBaseBranchChange:u,onOpenChange:d,onCommit:f,onSquashMerge:p}){let[m,h]=(0,L.useState)(null),g=i4(e),_=R0({mergeBaseBranch:s,mergeBaseBranchOptions:c}),v=s??_[0],y=g.showMergeBase&&o===!0&&!!u&&_.length>0,b=g.showMergeBase&&o===!0&&(y||!!v),x=!!(r&&r.length>0);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(DI,{className:`px-6 pt-5 pb-3`,children:[(0,R.jsx)(kI,{children:g.title}),(0,R.jsx)(AI,{children:g.description})]}),(0,R.jsxs)(`form`,{className:`space-y-5 px-6 pt-3 pb-5`,onSubmit:t=>{switch(t.preventDefault(),h(null),e.kind){case`commit`:d(!1),f();break;case`commit_and_squash_merge`:if(!v){h(`A merge base branch is required`);return}d(!1),p({mergeBaseBranch:v});break;case`squash_merge`:if(!v){h(`A merge base branch is required`);return}d(!1),p({mergeBaseBranch:v});break;default:jD(e)}},children:[t||n||b||x?(0,R.jsxs)(X2,{className:`border-border/70 bg-muted/20`,children:[t?(0,R.jsx)(Z2,{label:`Branch`,valueClassName:`min-w-0 truncate`,children:(0,R.jsx)(`span`,{className:`block truncate`,title:t,children:t})}):null,n?(0,R.jsx)(Z2,{label:`Git status`,valueClassName:`min-w-0`,children:(0,R.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-2 whitespace-nowrap`,title:`${n.label} ${n.summary}`.trim(),children:[(0,R.jsx)(`span`,{className:`shrink-0 font-medium`,children:n.label}),(0,R.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,children:n.summaryContent})]})}):null,b&&v?(0,R.jsx)(Z2,{label:`Merge base`,valueClassName:`min-w-0`,children:y?(0,R.jsx)(B0,{value:v,options:_,loading:l,onChange:e=>u?.(e),className:`max-w-full`}):(0,R.jsx)(`span`,{className:`block truncate`,title:v,children:v})}):null,x?(0,R.jsx)(Z2,{label:`Changed files`,orientation:`vertical`,valueClassName:`pt-0.5`,children:(0,R.jsx)(r4,{files:r??[],className:`max-h-40`})}):null]}):null,(0,R.jsx)(h2,{message:m}),(0,R.jsx)(OI,{children:(0,R.jsx)(O_,{type:`submit`,disabled:g.showMergeBase&&!v,children:g.submitLabel})})]})]})}var zFe=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAeGVYSWZNTQAqAAAACAAEARoABQAAAAEAAAA+ARsABQAAAAEAAABGASgAAwAAAAEAAgAAh2kABAAAAAEAAABOAAAAAAAAAJAAAAABAAAAkAAAAAEAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAACU3PoRAAAACXBIWXMAABYlAAAWJQFJUiTwAAABzWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyI+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+MTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MTAyNDwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4xMDI0PC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CsHtO6kAAAqwSURBVHgB7VtpbFTXFf5mX73vC9gGDBFLcOOSkNC0Jgk4aVMIDQii0hLUlB8hRK2gQW6pRNqkrZICaRNo4kQEKEoUIVVQ1HRBKiZg4rAYQ5ABY2yM443xeBkvs3lmes7YY4w9943neaOKr/T03rvbOd93zz333PtmgMk0ycAkA5MMTDLw9WVAMRLoHR0diQqFIkWlUsUplcpI6ktPzxqv16ui9xH1PVAv6o9ffXR5fD6fm+4OyrN5PB4rvTdERETc5gpyUthKdnZ2JhkMhrUEfDld95ECsXRXyRE+0jYk20OyW+h+lcg40tLScjApKalppP0K27tcrnXE/E0SeE8m1o11FAKQW7B9+3Y1dbzrnkQdRCm3272LdZaLd0g7Av9WEDn3dBbrPASInAybzfb8PY1UQjnWXQ7m/jbnzp1LoXn1lYSMe7qIdS8vL0/pBxTkQRkkrz9r5syZ68jLpvVn/J89sO6pqanPS6ktJCA3N1ej1+uXSzUey7JjVyzYeKQGO887cKvDHwfIEmc0GpcxlrAbHz16dGpPTw+vseOe9hRV+jQ/+diHNft95t9d8839a4fv18XdvuutHAeFlxgDYxERILSANEoUzUWJGo5V/uufXsGLB87C7aXAT+2DrscOG8V+737pxNNHOvDKSTvKrZ5hi2cMjEXUQEgARXvxNIeE5aIO5ebT2GLzoTJsowscRSv7RCsU/lejWoFuImJ/uRPL/96Jl493o8wSmgjGwFhEegkBqtVqju3HJTncHryw7yx2/uMKjTpF1QQ6WGJeDESEi3B/UuHCM0TEa1/YaYMQrPadPK1WG3Hn7e4nIQEajUZ/d9WxeWuzu7G68HPsK6oEtAw+tBzmh4ngWfKXS05ctPRINqINmkFUQRgukqsJ33OKpAjyG9odWEPgP7vcAOiEqgha984UFy0QjR00NxLF7aWwCFvR3BnTHV6lpROr9hSjrNoqC3yAFTYYX+92OZA15C6FRTgFhusArd09qGh2DBEqlXGhtg1P7jyBspstZPbCMZDqIqwyKSxCAoYjoaS2Cwv3XEXOW+XY8ulXsPeEDliKKiz47q4TuNFoAzQhjIy824gUHAYI2f3/67oNT++7jkqLA3byRjuON+B7H17HdatTKPZwWT2e+fNJNLbZpcGzV/d4sTInGotnRMDVE8LNCyWGLpBFQCWBXP1xFaxd5H3JG/s9t1aJ40RK3ntXcbi8bYjkD0/fxHPvFqPd7qI2EmJp1I1kGL/MS8DuNXORHBdFXIS2rCECh5khoYm4B1u3EzYHgR987KdRop7CtpUHb2DbsTq4+xboHf+5hhf2fgEHTxGVhEga6emxahSuSMfmp+YgMT0Tao0GFCONWZLlgWbHqbD1G0q8WeqFl4efXXEgqRT+wOT1Y/W41OTEDE0Hdh29SM6OVlUOcoIlv8n7kJ9txPalUzAvOxOmyGh/zbEEzwJkEaDTG/CLR5NgVtfjtfOA0zuIBCaErOHoZfLyLvIJehPdu3uJ4hB3YKRHVsIhwEsPx2LjdzKRlpYOLfXfm8Zw6PskyCJAQSBik1Lx0rdUiNLV4VclXnS4Cdhg6yZrgJHAGDKBNjqs7aA1X0VWEAh3yeSnRquw/fFkLPvmNETHJ1KxLJX64IR/ky2N1lZEJSRj/UIVIrW12FLsQbMjCAkBG46hgxktkdFKUZ+LIjfaZy2eYcKrS6figVmZMJLJc5/jnWQTwIqyuubYBKxaoEKcsRabity42ckmHsR0feQATTSvaYuha63HxgVGvLh4OtLT06EzGMcbd7+8wUbbXxDOgzEqFikJcVBYauibTZd/dIO2ZxI0OorbM2BOyURmVtaEgmcdR4WA01VWrCi8gOpmcnTWW0A3RXnCowQfnGQ7vynuxg8P1eI2xxITmEZMwD8vN2LZnz5DrZVGXq/tjQ2stUBnqwQJhJh84SelViwuvIbims4Jo2BEBHx05hZW7j4FayctdRzdsRNjD8/BTksdOTwLhbQS2Ch6LG+0I39vBd75XPb3TQkBoYtkEcAubnfRDax7v4SOqQjhwOiOSVASCTS7Hom2YfV08vg09f3fdoPpQ6F0l9uLTYdrsO5QNVrs4zslZK0Cl+vasemjUgpRiYrB4TCB5dXhxwtisPWJLEQatEg63YK3v1QQB1TChYOT33IUOHCmGZca7Ch8NgML0ih4GockywJUPg8Mwc6LKLCJ1SvwRn4i/rBiDrJnzEDK1Cxsy0vGtlwfNLw8Blkh+3HSlCir68KS9yvwwdlmylaQcQVjrL/FiB9kEZCdYMAfn0xDhJaU4w0PgyLwOSla7F+VgQ2PzUVi6hT/RoaOpRGfkoaffzsNv19IgaGKKvOUECXyJe1OD35K02HT36pp99gzxMhETeXky5oCaq0eP3p0FkwaBQr+XQdLlwfP3m9GwROZyM6aCoPp7kNYPl2PTkjBhkfUFDrX4pViL1pdxL2I/r5Rf+d4IxIylDDFxYY89pIDntvIIoBDVnN0HH7w8H3IiNGhucOBB7NTkJySCo2WAp0gidtExCXiuQc5dL6Fn53sQUMXMcD+UpTIQfbtqEU1RpwvJIAcnJSh+gWbo2Kw8H49PB439EYzfcsQDekdPU1E3PdzVTBra/DyCSdutPOyead88NNoeAApLEKN6Tc3IQlgZXUGA4zmyGGBD4AzRETj8fnTsHeJAfPjaBmVihUCjQR3dj98SSUpLEICyGRpAR+7pCM/sXDONHyQb8KiZGJAxvLPI8TGE6ORHispLEIC6Ccm4Z11y+BKazBh/qxpKMyPxFMZwyeBR9zpJdXprHBFUivmxUoTIIVFSIDdbh+XAF2jM2Dm9Gl4e2kM1mTzdBAbdAC4mtbRvCgr3phZi63zfTCbzJL0S2EROsH29nb+EaKXzEdIkqTUMArVWi0yMzPx5hI+YWrGe+UkcgAPfO7oohE3K93Ii27BsuQOPJCsRXx8mv/sUMmnTILEGBiLoFi8DF68eLFx0aJFNvpK3Hs6KephlPJVag1S0zPw6mMUK2ibsOMC+0YV3CodjHBjaWwrAe/E/GQ9YuOnwECOlz56hpRODtDGWEQVhatMQkKCubq6ushkMuWKGo9FPn/ns95uoK1yA/7bpMcUijPyk+yYl2xATFyCH/hwltuAbl1dXeezsrLyLBb6GBluqqysfI1MaNwT/brL12a1+G7dqPDV11T5Om1tPhpJWXpUVVX9Nlzc/fXp15azyYM2ypI8Co2YiJEkh8PRWFBQMLsfkIwH1ZkzZzaPRImJbFtSUrKFMId2FBLEsI+IJl+wfyKByJHNOrPudAn9nATuu4qUGRkZKTSXDshRZCLakO86EB8fn0ooRm0JZzNKOHXqVEF3d3fDRIAajkzWjXVkXekakelT+yGJOzStX7/+IfoN8Q76c8IFp9PZRt5ZnnseDqIQdVg268C6lJaW7tiwYcNDrCNdwwYf7vzg+hw98qY/fu3atak5OTnJ9C+N2KioKDP9HE3Hf5mhS0kRJNelz4hKf0xHHj3oM9UJmrg+F3B7eubzR14KvXS5aWVyUnTX2dTU1FJWVtZ48ODBeqrKZ2h0PO3fVg2IIylHIoVLwMCueH4FLj9Yeg/0F7gPrD8azwFgfA9cvBMKXKMhY7KPSQYmGZhk4OvDwP8A/pUraDR7d2UAAAAASUVORK5CYII=`,BFe=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAeGVYSWZNTQAqAAAACAAEARoABQAAAAEAAAA+ARsABQAAAAEAAABGASgAAwAAAAEAAgAAh2kABAAAAAEAAABOAAAAAAAAAJAAAAABAAAAkAAAAAEAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAACU3PoRAAAACXBIWXMAABYlAAAWJQFJUiTwAAABy2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyI+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+MTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+NTEyPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjUxMjwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgoAheCYAAAJbUlEQVR4Ae1bW2wU1xn+Z3Z9wxeW3TU2BrzYzq21SSCoLWqfEElooqqQUEGDVCkvfajUpzxFat8qtY9VpFaRIjVVHiMhocakBQK4pGACNb5hQmobY4xZr70Xr71rY3u9M/2/Y89q2c7sbY6Jq+yR1jN7Lv/83/dfzmXWRKVSYqDEQImBEgPfXgaUYqHvrK31rFQmm3Vdden8p1g5dsYpiqKpq3pkWXdOzM3NzRYjq1ACVK93y08Ujd7RSTnID2zgzzcCPg1sku8DDOQaX/8ajCycS2vLeZs3AV5v7fOkaX/kAa8T/9H1nLKfagdlXSdF0c8kktq70ejSeD4K5EXA9m21P9JU7RPuvHOzAc8ECSJIV8bYWD8LRhf7Mtszv+ckQFhe17oUnXZsMqNnYkl9XyOB7ju15KGp6NKDVIPJTa74LaOk9gGz9H8DHhiFlyrUknA43+evWTFmbax31xxVVDq02d3exLDrOUo/6nZXv2LWbtRlI4ANr//S6Cj7qmlJcjgcpKoqh6smW7yQh/hWcmBAH9PC010TacodbnSZdiiyEmABekdTE+3e7aPY/DxNTfkpGp1lq/HkKgK4SOHmw6YSSWe71TrBaT6GmUs62nRFkwYe4PBxuz3U2tYmrqurq5RYWaE9e1ooFvMwEVMUj8cECRKJaChXVn2M03ShZEmApibdKhzIZuoHaFi9uqaGWlpaqbFxh/CAZDIpCDGIqavbSjU1tRQOh2l6eoqWl5dFPysDFVCv6k5lm1V/SwI4/jk/WEaIlbwn6gGyvLycXb2Zdjf7qKKiglBnFvNGXX19PblcW5mEaQqFQtx/1TYRTLJlrstCwBNYCvoCMHBhxHlLSxvV1tYK0ACfq2Cs01lGu3btFmESCCA/RMUwiWGRUkMqAWvurLEF3SLOPR6vCKF8gKc04hsjLKqqqgSBc3NRCgSmaGFhQXZ+ICkEQGFYbsuWLZzQWqmpaSepDvvTG+SiuFzb2IvqOD8ERWiscOLETCKj2CZgzWWd1Ozzkc/XQpWVlZZxXqzCRkht394oyJieDohkadQXKxfjbBEAC3k8Hnrmmeeoiq0PhR4/XmSx+SVPLIaQ7Q1L5wMEeQBE1NW51sMibmvtYIsAKOxjl//e939Ar7x6hJOXkzC3U55TJ68MCO6cb3/wCgJA75V/dtFnn33KeSGeD2+WfWwRAGUAemRkmGo40588eYqaebrbyIKEOhsJ0eXLn4vHsAq2ii0CjCfD9a9d/Rf13uqhw4dfozffOs6h4TWapVzhKaHQDC2yxW8PDtKX169TWVmZbdlSCIAWWPDA/Ts7z9CNG9107NhxevW1I1xfYUtJkBthi0fCobXwYmlnz3aKRGtL8PpgOXPJujCEREVFJSscoQ8//IB++5v3qKfnZtF6zs/P0f37ozTNawCQixmm+9o1EXIIPRlFjpQMTbDNxQe54Q+//x0dPPhDOnHy52KazOhq+hUzSTA4Q/HYvGjHnI9PJBKmc+f+LmSbDiyickMIMPQwYvTq1S+of6CXfnzkDfrp0Tdp61bzTWYikaAwxzm2xhonOyVtsQOLX7hwXiyEsKeQVTaUAENJKLzC8/3p059Qd/dVeuv4CTp06LCYQdAHcR6djVCIV3rYHsPameDHx8fpiytXRK4x5Mq4PhUCoKjCZ2vIDzMzM/TnP71PXZcv0qlTv6DW1ja2qp8WFxfFHA/wmQULpbOdn4o+SLYyy/8+TaZ0E1nIDQiN4eH/0Mcff0T37g3T0tLSmtVNJnUAHujvp/7+PunWh3pPzQPwMFgSBGBjU8MHJNjtwf0xe5gth1EPz+hk65u1Q6bd8lQIgPIAA9A4+YEHAHguULD+5UsXaXx8zPZ6woqoDSXAAIj5G5kfVxSj3kop1MNTpgMBOn/+nDggydbXTtuGEQCQsDQsXl1dbenmVsojGd68eVMcglj1kVEvPQkCONwdFm9oaBRuD0XzsboBCNb3+/00+WiS2jv28kFqo5gWETayizQPMIDD2gAP66OuEOAGOADt6fk3JRIrQs5OPh/cxsfpAfH+QO75oBQCABKLHQBHZkcpBjjGYcU3PDxMExMTnAecKRLF+WBrG/ELDkEEZgd+rO1iiwCAhMJeb71IcFbTWb5aYjzWBLd4W4379GIQ6nK5xCkzlsujIyOCoMy+6eNy3dvKAVDq4cQDsTWVsTuDxYdu3xbnfWYrQoDBMzE94ugcmyO7XmDLA6DkBBMwMzNN7e176bvt7ewJVal9ey7209sha5b3A4O3By12ezh9coiFEQ5e7t69I84TkTDtFFsE4MFQAKc12PePjY3Svn0vUwvHKgAV8j4Abtzbe0sAzPQmPAOyvv76Lg0M9NEcvyhBnV3w0N82ARAC5aE03uB0dV0S5wD7Xz5ADfweUOeMnmv6ApDJyUkeNyLkQCYKSIRsv/8R9TE5eItsPGuth/2/Uggw1IDCKJOTD8WR9bPPPkcvvrRPLIZgQSORGf1xRa5DG6Y9XEEGQOKKRIdN0Ni90VRb+lgZ91IJMBSC8rD6V1/doQcPxqlj70v0wgvfEVOlODY3OvIViQ/T3iNe9OAenoSZAK5+Z2hIvGdAHWRuRMlCAP8sykYxXBVgbnzZTfdGRwhh4fPtERYGEfAYzOeIfWR1FExt/f29IsMDdGY+KE4layyWBKhJNaKrtjgQuhpEYMq6dPGCeG+wf/8B8vJrcLTBxWOxOB95B6mvr4cmHz4U9XKACxU0ZVVbWz6asPfkaiOtg9tdtYuPIvETmbq0atu3sDzm8ec5JDo6XhSxPTQ0SCN8QII26a6u0PTyitoei8XCZspbEsCdFa+n+hJ3kP4rMSRDJDzsG3CPMABweITMAnG8NftbKBw/ZiU320qQ33nTX6wG2qk3wgL5AS9H4e6ywaf007SsGLIRQC7Pwmn+2el1yYZJ6QbQGwVc6KzThdDs4j9SDzS5yUrA6CgtK5r+K/Yj0/gxkbdpqjh9+zmufs0K8etq65KVAAybiS4M8C973uZwCm2UJ1irV3iL0JEXj6qmnggG50dySchrdfH4cWKsuqL8c1L0DnbZ5s1IBHTCh3PqRV1R3g5F4r25wKOdh+Rf2vklcMBTfYIHvcNhcYBHur5pMta3wxHWid/CKh8FI/EzrFdWt09HXBAB6QOxTnBojlbNobmZ96LlpMss/J7/ZUZzhHVHciwUWvQXPr40osRAiYESAyUGvt0M/Bfz0vXwaPGzHAAAAABJRU5ErkJggg==`,VFe=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAeGVYSWZNTQAqAAAACAAEARoABQAAAAEAAAA+ARsABQAAAAEAAABGASgAAwAAAAEAAgAAh2kABAAAAAEAAABOAAAAAAAAAJAAAAABAAAAkAAAAAEAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAACU3PoRAAAACXBIWXMAABYlAAAWJQFJUiTwAAABzWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyI+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+MTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MTAyNDwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4xMDI0PC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CsHtO6kAAAsbSURBVHgB7VtLTFzXGf7nyTAwwDAMxqDQuEaxY7t2Gmw5srxopXRl2XXSyl1V3bTLriu1kWq13UTNsuq+i0pNrWxae1Enu6hOGsePJPgR4xrbGAYGhscwwDyZft+de+ByuefOHcDEUjny4dx7Hv/j+//zn8cdi+ymXQR2EdhFYBeB/18EfFtR/fz58x3VarV3ZWUlCToxv98fwXsQmXQN2j4kPrOOGX2M0okvulZBq8qSGX34LurZLCuoyweDwYVSqTSNPmNXrlyZdaLnpa5hAM6dOxeDIG9BiB+j/C6Y7EEO4ZmCeuG55T4AUpiRSshTeL4N3h80NTV9cOnSpflGGDQkMZR/G8R/ByseJhNaxxSkEZ7b2pegQx6DJuT5Gvm3ly9fft8rE68A+M6ePft7MPs1so+Kv4jJAsR7g4ODv7p48WJdQQNeFDlz5swfMOd+A8U5f70M+Ub6UDbmQCBwamxsrPXBgwdX6wlSFwBY/jyQ/ROVr0dM106h6Ko7lcgPMp8aGBj4enh4eMiNr6tUDHhQ/HMQe+VFdXudcpwOkHkEYAy6rRK16KGhUqlU3oY7vRDKc+KVVvySLwekjLJeosEg+z4AcMGtrysluO0FEHAb/1zbuJ0omkoHfStyKJ6Rnx+5I9/vGzXAqMecssMTCIDW07UNp0+fjre3t98BCHt3EgREC0M54t4WLsorHbNyYk9aBrunpT+2IL4mkQ+H++Tdm4MSCVRcMWDcgezT2DAdvnr1atqpc9CpknWtra0voUjuhPLY+5kWrUpnU15e7ZyVkz1peS05LXtblkTop3RELmpl/GM89uCYpuydKPsxsjEAyuVyN5Y+bmsxdvtTBUpzLiNUSbJ5WY4kZqD0pBztmpFENF9zWipM9o6G9iYXpoAfOnC36pi0HgD3iakRCgTTpVS1UTrVqQ5sY6qN90lNaZ8E/SuyN7oox2BhWvowLN7WXKwNo9LMHpOSzam74g8MVnWx99MCAMLN7GxlYH1WhJzqVNsKvKcCK9PSTZiv/bGsvG4qfSA+L9Em+DMTFXa0stHq+IeO6cabg1Q7VgRDFydCWgDQ2a3NiZZRxyDGOVpBbg6WZH/HvBzfM2UEsoGOrIRD0Jbeq3VtLWlbg7cpYA7S6qJtwECjTaFodXX1vFbCgLByCUrHQiU5lJiXE3Dt44jcL7ctSCAEYZVrN2hpm9bGq1V1J/msY8x27WpXFwBFTDHiu3pWJa3dE83JWwOP5XUo/VJscUPkVnS2o/TDfexTQMniRB9tjQPgNsjOpFjxyY8GHsnZg6PGMrWZOW2nueGdKnA5xOkls4zNgDGHNvRquMLNA1YtbaWqkFYRVr2HENmNQEZX366klIbPzy6H5avpuHw6npRrEz0SDqzdRShZyJby2N/dxHEFQBF0IqAUr/XZLnuAGq3MDCDTuYjcnuqUT1NJGcp0SiYfgd39hvLY45G1kayysML+Xuvl/LcuAM7D7LUQZk0ee6O3d1PpZ9mo3JhMGErfn+2QuUIEFsWdm78KxclkG6KoRSJXABpB0kKz8UcoeGsiLn+99235YjohS+WwYWW6eSS4Nqcoj9W9FSN7vfW9ng6uAJBBPQK1PkqUTZYw7MHOrPzi6LB8MTUjn010yfBcu8wXwoI7ZOwc4fjGJbFeHruc9nedZHUB0A1cX79V/xdsmipyIJGVA8msXDgwImMLUbmZTsh/MP/vznTIbIGR34epsLIKxnoZNvemBQCXIZ6sv8Z26yCsbpZAtK9tSfral+TswKhMLUbgGXH5JNUtQ1gJGAzpFU6JlrdOE75TF13SAqAGeHEl8KhZhYFMz0uR9FauTX1J4nT45r6UkefyYfnzrQPy4dM+CXPpdUheZFbDKPKWUwDz89p4t6SykdoxlrBuC2VTNBqbwCJ3RIvG5ch23cy7eoBXJEOI1h+P9citdCeC2Zy8sXdaBnsy8q0YLjPIgYZyNhYaGkwAg1tvr6meDq4AkEk9AkoQzsnlSggRvBtreLe04lDE099JgHECYOzvyK0dimhR5i0kgwTn3haTFgAEkoapc3dW26zgBrcalK8yCbk1lZC/3Ckbp8LjAOJ4z4wMxHO47+NnPaSGudSGwTLmw9YKLQC4RIDxN8+EYHD3FsA2rrASxFY2IQ/n2uR2ql1++PITOdmbkUhYJIxsftrbPBguGNTTQQuA8oB6BJx4Wy85401FORifkxM4Jh/FvV9PBHEBuBZwA1bg1R+3uSGRCJZ5ghFQ36pcsGcTbbMZ2ezyagFo1AN45C4Yl5xVXHLm5UjXrLzRMy3HUO7BMuaHoiVE8TKCISN4BIquQIkV1iFncyYYkKgJQDAbYDDeOYLhWGnXr+67FgAdWyeKtEYE119v9qblVN+0fKdrTuKWS04qXEEfH5bGIBSqouQYAlAFEMaFEfswA4wc7lNyXEDQ1gTPIBh8Nj5vYHwj4Ylewq9EuqQFwGkKcIfl5Hb5SkB+duix/PS1x9AArMjPwpOKq5BquC6lUQCYYChADFAIBDNoLQGIRROMKMCItIrkS7gTInj8s8WkBQDEGQXXkbe/rzaiXxfc3lCaANgSvdiwHgt6AMnSkqw3FDEKo94AAHU8BGIhMfZT7LeMRePBVFRu34/LldF+47TI4VtNWgAaJczA5zURBCYWHEbvICb8Q09nvGBjvuiTR3Mtcn2yE/uLhPw32ya5UlhCuBfg7tNLotGUNzv1dwOgJpPNC5yIeBPFaaTpBZwiyEyFol8eZFqxmUrIZ8gj2VZZLockgCWVmy1+X2Cyi6WbnkZnE1/zeV2hBQAnqIrW5deRwAuksQtk77LhnVY2lV4sBOTedJt8Mp6Qz2Htp9kWrCgB7CPgETjwRHBUrpd0srIeWUtACwAG5XVE6wmjbbcoPb8Uki+n2+XaGHaL6bikclEpY3mglZmbNSc9LW2XBtiyoGt2AyCnAFAl3Yxpw7uOOutpZWYEtanFsNye7MDJsQvn+w5JL0WwFPprc5rzetVQ6/mQjJa36XpOU8BSt0AaTkkLAFDLQNEKiDAuGUkpvuHdEMISCZTScLwxHJFv4L7vGtz7Diw+k8daBiA3XHJahtv5kJ+9rt67GoN+1WKxyB9UOiYtAAsLC2PNzc0z+JkJfwXqmig73ZZH3yq+d47MRuV6qtOY0/dn2iRbDBvLH5VuCrK3RVtXyltrpAdgEzS3vLw8qqOkBeDevXvprq6uO/iJwPesaPOZhK2JSxIVnsIXm38/46EnJoslRm4Cs/5m1zrueT+bANwfGhpK6XhpAcCASqFQ+Ec4HF4HAAlZAeE7j8D/etIjlRGfqXR1XeQ2pym77niCDv8EU/M7/Eb2nK3aNDMzcwm/r3mGHxho+7CBCtK9eYfPW1vrVxvXgc+xkdaH7JMTExN/c2PjqtnDhw+f5XK5d90IvKhtBGBxcfG9J0+ejLjJuBrhdZ1SqdSXyWSyPxKJHLO7vm7MN12PwE3l379+/fo7kMW8enKWqi4AGFbG724/RkDsAwhHncm8GLW0OqcrvPbS3bt3f4nlb66eZF4AII3l8fHxj2Kx2AKC4quhUIj/Z6Ae7R1pV0pTcfyybXJ2dvaPN2/efAfKZ7wI0KgWfkyHY729vT9paWn5AZbI/RCgncx3GhBOR2as81ko/mhpaemj0dHRv2cymRtQHPtOb6lRABRVBs893d3d++AV/fCIJMBoBQgRZHoV6W6WtuJhL43dE5TmIS0PxXP5fH4K7v40nU4z0E0iaw89dmLqfbuF3G56Sk57aYBhr9x930VgF4FdBHYRaBCB/wHWGEMSa+r9eQAAAABJRU5ErkJggg==`,HFe=`/assets/zed-C-eVD5h3.png`,UFe=`/assets/windsurf-Do5nbXdF.png`,WFe=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAHhlWElmTU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAIdpAAQAAAABAAAATgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAECgAwAEAAAAAQAAAEAAAAAAdd52hwAAAAlwSFlzAAALEwAACxMBAJqcGAAADB1JREFUeAHtW2tsZFUd/537mPdM37vtbtvtdt0HdlnA1/IUgyhoDIoJYjZE+WRIIPIBFaOSEAPGD4bwSWLkgyZKIiaEGDGC8lR5rY+NggQWaNnt7rqPbjudzuO+/f3vdEgnvbPbzt5CG3qS05l75txzz+/3f5+ZAuttnYF1BtYZ+AAzoJaBXeYG8/MTG4aGhpIwNiuFjiDActZZxiPPPJXPDvjsogX3yInDhw9ztj1/x8K9nnGRpW48XLC3d8tANqvtU0r/MiGPceUOxV28n00YYCtSNK8GgfdIuew/dOrUO8c4tiQSlrL7cM7w8NabNN24m4BHRRHmH/x+Ym96dl0QoUq87Xvu3YcOjf9qfkJDa5vmNy70xpsWrwJeHx4evUfXjfso7K7VBrx537RFpbo0pV1fKHQmisXpZ/l52wRocvPg8MgPDMO4izJvftYqv9J07YpcvuDNFmeEhBBL1JZbaYBIPhgYGLommUw+QKm3mhe15qoZ03X9snQqu39ubvZNbkowLWrCTFTj5L5cIpW4ix8moiaskbFEHUNfjvtdFgH+wEDycgV16eq2+TOLQfYuGAQLZ/pRs6M0QJhSpml+TiktkrWohVbrmGAQLIJpvjdt1Wi6ql/IxBQ0deFZHGjErWcfElfquBQH35j0LAGf5vJCqE6sCN98UIgFaT66xt7kzaMI4JxclvvZwDexNo9KKHnTlecBV48qbDHIwJyBiZMKTxxx8fyME4pJ55w4Wx1LLsuHCQFNLZKATMY3SVuyaeY5Xrge0FUAvnWjjmt3KiRLOtRpA9qMgSvyBvb1anh00sYPJ2ZR9gLES4KWFEyVymIQUQQoOo9YZeBT8tmMwndvy2DvNg2nTynorgaD0dWADpNhOkHEX+lPoIMjt49PwRbNXbzftkfmMS3CFeczWm7Op0Rv+GoBW8cKOFLNYyoo4LTKY0bLoqRnUDZSqBhJjhn4TE8Ot27shC1O4j1oURoQ62NdJ8CO8zO46Ko+HK2Sb5+Sp2xNpSFFp5fiDjJGANfw4LPTI+ImEvB4sYL/VCzOWyS0WPe34gRo9HOXXNePol6A5WlQvg49MJhdCQEErwWwdA+O4cKTrjvoMj18va8bd4RFXax4Fy22ogR4boDBXXn0jm3AiWoCrpdgFWmGBJi0f4lLWRJQI3DbcEiCDc+0AM/GpV0adp6YxsFqDcYKasGKEhDQjrdd3s9IV8BcJQHHSyJgV54Jk1qQIrCKIgGaC0e3qAHSazSFKnqSSVzd1YPXKpNrkwABn+lMoHfPIE5Xc6g4KSZAaXhuimbAsyRqQjLQUCUBlkbpkwCX4F2zCt8rQwU1fKJnEwrHj8HiWivlCVZMA3w6s96dPQi6+jBbTqPqZuE4GRKQoaNLQacWJGgGFhMzmwS4VH+Xkvf8Mnw/xUyxgu5CAjuynfhXcQqmtjIBa8UIEG/Ts2cL5rwOzDlp1GwhIEcCsjQDZtqhGehwOM+lCXga7Z8E+D5JCtgxB8PIYE/vMP4xc5Kz1hIBrMISuSRS20YwW8mjSvAWwYcEUAtAApRPn8CIwMDHMo0hkFrgi/0TvE/36LMcUW4FI307kJn4N9ywsuPkmNuKaIDPpD8/2Au/YzOqtQJsOwebBLjsPv1AEPqBBCWthTVqoHwE1ALoEhdSLBhSvE7C53Wux8CGbA8mZ49Dl5gac1sRAqjHyHxoK2pBD2pWmpLPw6UWiP374gMYDsFyQw6awnyPBNAmCM1hdcjPFKOFEKDRVBJ5DPZtx6HiUSbNa4QAjVVeYusuSj9PydPzCwHz4MX+BTz1nZ12zbKDsFklelCagE/wPfMFvvfZNeWif/NF0N76S8yyry8XvwZQ+kZXF0/UtsOqUuqh5EX1M2EOEND26wTotPe6Y5M8hx6AwNmZHyjWBNBIkk4yAhvZ/guQTXWgapX4WbzOMHYCAs+FObgVbmIAXpW27BK8V/f8oeoz/tO4Sb+ArJuATwfHOMBYLySwTKZpKPmcZASsFfOdo+jq3YHy4Zegk5Q4W+wEyOb0kQuo8gUEDlVZwNPpgZIPpU+7lpM2vzIFvzpNoBR/uhsq20WnKLUQ02JKmQWzrMTOgpkm1T20F5OHXpDlY23xEkBJauks9M0XwqsRtMszlTD9pdQCqjO9unvsAGoHHuTr3xHYswRDCpIdSGzei9xF34DWdx5TZnGIHA+JEDIU8kOXwDB/RscpZ5vx5YXxGhSlp20cRdCxjbZPL06HJ7l/CF5Lw3rlN5h9dB+sNx6lBpygZtjsFvzy/1D978OYeuRGlN94jAmRDpemYFEDanSIFb7qfWPIdm+jFjFcxthiJsCDPnox7bajDpw5fxCerqVhH/wDys98j1pRgzIY7wmQIp7vtHmTTtIuYfrJO1CZ+CvLYo2OUePXvRpPMpkxUksKWy7nuquVAKo/klT/kcto++LoxOZpYYzp/vQEys/dTU2QeC923aJpdHokaIZE2aWT8GkC75LAW3Ojn2VwoGnVs4cWiyxvOD4N8LnVTWNQ3bsY07gsJa/o8RUlWH3xJ/DnjhL82V2OYvhzp9/C7Mv30wyoMOTVYa5g0UOaG/Yg3ffhWLUgPgKoAcaua6nVOeb51ACGMDlYdsafgv3mY1R7kdzSmphI5bWHUZvcz4ip6iRQAzwzicKO62L1A/EQ4DOGdw3BGL0KGs8A343jdgXV/ffXVX85npu+IfAslF6+j/WDw/BYJ8Gm+We2fwFmfoBrSqQ49xYPATzCMse+xBC4idJn2JJERjdhvfoQ3OMHwoxuuVtVehLW5N9QeZ0Rg8okOYLDPyrfj9yu68Posdw1o+afOwES+rpHYO6+oS59ZnlKCpmpcdT++UBIRNSDlzImWeEcfYFTPM7zAhVqgnytljv/Zhj5zfQz564F504AVTGx9xZWspu4IUlQKC5urPr8vYzvJ+rhbiloo+bQaXqz76D0wo/DslngyveIqmMT8h+7lb6g8ZuoqJuXNnZuBDgVmOd9EebO60U/Q9XXDKr+gZ/DHn9iWY6v1XbFIdZefwSVVx4K/WroD3iMlBnbh/S2zzPkRnzf1WqxiPH2CWC81ocvQeqT34cmFRztXjMSsF9/DNWX7qMZMBLE1BQ1Ye75e1Abfw5SS4k/8JSJwqfuRaL/I6HDbPdR7REgMX/jbmSuvZ8HFj2ymzr4Nx9H5ek767YZZ9kqazlVlP78TVjMEkMSpCTI9KHjmgdgsFpkvd0WB+0RQOeUvvRO6LlBBjd+tUlpWwd+ifKfbqdKls+c7bW1Td5ELQhqRZT+eAtqr/6W18RMTVDdg8h89La2c4PI1Iw/NeMhnQTaqKpLnqqFmwnKp+HPHCb4B2Ed/B2HJfmJXLJd2M33CQk8KJ176jtwjr6M1O6vQcv1wp15O9xT8+QFV8QSYlow1HgbhVCS9cLwyOjjPIT8eORvhCTv1/kVZ6ozrOkDt8pwF+vPCRr7a/HKH+2xilRmlp2HrBbL6hYmJz+g9Hxv/6GJt6/hYlJ/N8XOKBMgOvCAPngjWgP4qVRxtLkwzFFR3lvwfD41M0ytA/eM4GVmiCHEQkwRVVQrAjzXdZ6JmC8rzjeSICVtpJk05qz0q+whCsLC5/K4LcQSSl6E29Ra3a2mpkpP+743Liq0VpvsXTAIFmKIBBJFgLDkW1bxmGM7P12r4Bv7FgyCRTCxL9KAVqcTMlEvlWYP5vIdO/lD6R0R9zaesSpf5TzRcd3fH5l850fcoNi/fA25qLUiQCYKCV7gey8lUqnzdc0YWSskCHjXc54tTp+63bZt+WZVigbRgEXtTATI5IALVKxa9ZlUKt2p6fpu2lWU2Sxa+P0YmPdXnuvYvz554ti3K5XKEe5DwDeFvoV7i3QMCybI55LZSJDPbty46dP89fjNJOJiPizfwq8suP29ehv+A0fJ97wXLcv6xfHjR5/kk5mS8mCZBST7ItvnWNjORoBMkjkidSFByMh3dnZuT6Uyu0nECP85oYNjMmcpa3FabE1A8YcofpHAJ2q1yiszMzMHOVZiF9ACPtLxcfzdtpxNCwliMkKCvMp1oy9nHd4WWxMSBGSji6oLeHmNtHmON7V2Ni73CHB5bXRZtJ215L52W0OtQ03gIg0yGuPtrrt+3zoD6wx8gBj4P0ccrJjDzl2qAAAAAElFTkSuQmCC`,GFe=`/assets/finder-BYyfd7HG.png`,KFe=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAeGVYSWZNTQAqAAAACAAEARoABQAAAAEAAAA+ARsABQAAAAEAAABGASgAAwAAAAEAAgAAh2kABAAAAAEAAABOAAAAAAAAAJAAAAABAAAAkAAAAAEAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAACU3PoRAAAACXBIWXMAABYlAAAWJQFJUiTwAAABnWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyI+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4yNTY8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjU2PC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+Cl6wHhsAAAq/SURBVHgB7VtrbFTHFT779Pu5xhgw2IANuBaIuPRBUkoCpKUWVYsatUpDkRJaSn4gfrT8QfygtKpUfqDKiESlCDlFSaNAgyJZbSrjildDIAUT83AwuMGv4Cdee9drr3fvnZ7vLnd9d72zi9fGj8ZHup7ZufM455tzzsydOSaapVkEZhGYRWAWgS8vAqbxiP7hhf/MS81xFJjt1kwzmTPJRMkWs8mmcqcmk+Csxaqq+PWYTCa7hUtJMZTp75BazCQEqaqi+PRis9lMqhB+IYRi5kLkSSgeVZicqk9xPup1Nn//2dVf8CuhtxlLOmYA3v/3p7mFi+b9xGKzbbWYzCstVkuOzW4ni8VCYJZB0MjEaXjnKBtVGM4ti8EghBB+Bsv4h6oKUhSFfL5hUv1KjyKU28Pe4Q+6O1v+unnNmochjWP8COcxWnXTR/daXktNS92fnpFR6B0aoqbG+9Ta9IC6uzrJ3d9PvmFmSFW0PsBkID8yBM8sCxImXdiIJkbJzGCOkGBgAW6gH+QBeEpaGuXMyaUFBYVUsLSIkpKSqd/Z2zrgdv9+bfGiP3F7iZqN9PzEud0VFQlXGlvf+KzXI2519onDxyvFs99+QaSnpWmTwx1NWZqakiq+8dw68Yc3/yxutveKBueg+Lix9cSBAweSn1jAGBUtHzV8/ua9fq+4cOe+eLF8S1BYnhPBczWlD3jQJ+CF72wWZ6/fEvddw+Jyw4MTzz9/wBpDttivq6/d+sXtrn5x/laDKPva17XB2NKDQiM/lY9xAgBE8bLlovraTVHf4xY112/vjiXhiIFGqHn4rbcWPPetjR8nJCbm/+q17VTzz7+Tbp1Awsq2mpySQvyerFYre36T9vCfCL1NQBH7D/gQPH6/n+CHPAMD5Gffoo8ID7R+44v0x8q32Un6Oq6dv/DN1199+YFs9KgqsqJk1cuZWVn5H7z7zijh09gJOebMIZvNhjWPsQckk0iPx2Qhqae7m1zshAECJuh8TTVVnXqXfvzqz+cuWVm6jYt+J+OMtTcyFRUVJaSmpP1w0OOhv52sDFaCmGnp6ZQ3f7629Hm9XtK9uz47k5Ly/gLjYALm5uVpPBmn4Mw7J2nA1U+JiUk/WLt2bVJQgLCMFICXduxYYLNaSx403qM7dTeCKga1z8nJ4SVOpczMTFq3bp2WH+YlcCoIIMD0wBN4A0ETPrt1k/7bcJcSEuzLvvujnxZoLyL8kQKwtGB5odVmzWprbiI32xkqAmHYvJVRBwCpqalUWVlJx44do9WrVxO0AbY52QQQwBN4A4/g1cP+ofXB5/BN6YsKF44dALPdlMU7O1NPZ6fWqS4UHB5sHru+jo4OqqiooLKyMjpz5gwdOnSICgsLaXBwUFNPvc2kpMyTxpthsO6uLo1Pk9XmMBSHZKUaYDFb0zHnHrcrpAG8PRwe1A4O6PDhw1ReXk5HjhyhTZs20enTp2nv3r2segmTCwK0ALwZyONyaXzaLJYsQ3FIVg6AxaLp0xCrkpEguE7IJyUl0cOHD+ngwYO0bds2crvdtHv3bsrPz9f263rdyUiNvGE8rzegiWarJU02fihkhlrsY+2qUMnPs2wk4yCwPQA0d+5c2rVrF23fvp1S2A6PHz9ObW1t2iphbPu080beMJbfxx+OLINZCLtsbCkAFrPZLviDxu8PBQD2D9IcD6scBN+xY4cGQlVVFR09epTu3LmjmUA4QzImJqzcoJ3oE45a8Ke3X1X1/duooaQAsJgJ3IOG4qhWjzvHzO/bt48uX75Me/bsoStXrmg2lwhHOQ0Is489Cs+ilBspAIrPZ1ZUViEGIRJhdj28Sdq5cyedO3eOsA+A4wsnLIvQlkikb58jvZuIMmgwZAg5lAnrWAoAGqmsPkAxEmEZ7O3tperqam03Fkl4gLR8+XKy8/d7JGpubtac5tMylYAGsBySSQRPUgDYbjQvzkdQkXjXysC4TDjMOkA5ceIE5fFWNRLBd9TU1ETUnEj1x1oG3nFyBFlkJAUgoAFyE5B1qJcDHOwT9u/fry2Verkxra+vD3xMGQsnMA/zVZU4TQCOQ//IiZcngHj27FmpD4D2aOeI8Q4Qox20MG4nCOahPjInGGPs4OtIviH48ilnwDtkiOYDpDvBgAnEPsR8yjKMq3tdA+ICwM/LhxLDfsbF3SQ0Dmixn52gfB8g1QBuFfABrEYzlQJOEBshuQxSAFRsIOADoiyD0x2YEROIQwP0fYBsIzTdhQd/4D3WPkCuAaw2CraxvJ2cqaRthbGcx2MCbDi8fIx/GZxK8DQfgKu6eJyg4lP80IDgaehUShLn2DjPgB+LdxnktjPfCfI0Rv0WkPoAhg1Xz+PeCcY5eRPSLLAThCnHsQrw7Cv4kJjJpC+Dce0D/D5AID/MmAnA6E4wLh+A+AJGQHogMiMAeOwERTwmoHvP/4+doHy6pE6Qz/IYA/YB4Vvh8N/yvif/TRhvmDxoMZ8LSj8GpAAIRRnGKhB+XjedNWL0npUD0ngvw5MpvbmVAsCnvB6c6CL6y0jTGoCwL1fcFkMGPuF2G2Uw5uUA+Hz9QC/80BMd6pcjxo6mPM9nkBpvBkbsdhtrgI+GvF6noTgkKwVg0O128bWYSEpODtkNIyxllF8I6XKKfrC9a7wZhsd1OQ5mhwYGxg5AU1NTi9c71JeZkUGJfHgJ+8KlmBaTw52G+wbDuJOeBS+4wwRv4BG8JvC1HYf30LDX6+bL2xYZUzINMF2/fv0LVp172Y5smr9gQTDqEAFJ3RyTA18wHUAAD+AFPIE3EFz+PA7hyXE4oBWNFy9ebOWiwKUmKhhIBoDo6+tzOXt7/2HhyMyvrlkTbIJeEJDUwVfiUC8wYOJbIi1FfrKex2OCh4729mCQlM5oGfPMES7k7Ov70OVywQRGLxJcKL0YQYNrn3zyPpvA6yWlpXNK6uqo/u5dLQpLA4GDDxBANR3D5JYVFdHKVSsByqNPa2tPyYTn8ugAXL16taG0tLRi8eLFvy3fsoX6eebbeOaxMAIEbDJQxn/Q15QQ+MADggFA7TeXf48DpqzU1txy9NKlS/VcHHH20SZ0kUfJCGl+r6Gh4W5xcXGhw+H4ylJG1vnoEXX19ASdos7AVKVgEjaPtJj527p1K+Xm5iJ+qeqtv5z8DS+NiPEJOAfOhFM0AFBXsI35GIQrS5YsWZidnVWyomQFObKzOTJkUDMBHJ7qDICJyXzAoJ2jw/LZSa9fv542bNhAHM1OnZ1dVRy09Wu+vUbofFiEB1qNkK49IyWjc6iDiIfcn73yyq68+fN+yRHaWcMcq48ITafTSQPuAS1EDiYR7dNzdNdjL8FdInan9gQOmU9J1WIVc3Ic/DuB+XA72zvaj7/33uk3OHSnnXv38iP9DsDoTwKAXg/RDymrVq1aXfbMMy9lZGZs5Hu/Ap4B/i8QC3t/rASo+vRJ0zLWPADOCspL/XBzn9P5rxt1dadqa2tvMAcD/CC6C1Wj0lhZ5sBgDp1hjeAtch6DsYR9w6KUlKSFHBaTCBCeHNOofEV5iWBpFbGI3iHPUPOjnp6W2rq6Rv52wYxDaMw6jrJiCs91nlgDUFcngAbfATCQ4jFKPlZQufmYSBcMKdQbDg4PbB2p/p6zsWm8zOrtker52KNOTA0IqgurpxPT82wvswjMIvClQeB/QMMm6ZCwrokAAAAASUVORK5CYII=`,qFe=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAeGVYSWZNTQAqAAAACAAEARoABQAAAAEAAAA+ARsABQAAAAEAAABGASgAAwAAAAEAAgAAh2kABAAAAAEAAABOAAAAAAAAAJAAAAABAAAAkAAAAAEAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAACU3PoRAAAACXBIWXMAABYlAAAWJQFJUiTwAAABnWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyI+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4yNTY8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjU2PC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+Cl6wHhsAAAuWSURBVHgB7Vvrb1THFT/3uXt3ba/tXWObABGkgiYlD1UVUQRSkfqQWjVITatKadS0/Antl0RVW0BKP/ClUpFKq6B8aNqQFqlEpVFIVYQQ/VCBiICKCLuVWlzAu+DX4tfd5739nZmdvfu6i20WYrcec3ced+bMOb85Z+bM3IFoPawjsI7AOgLrCPz/IqA9iOhnzpxJZrPZodnZ2ZTneT14nFKpxI9RLpcJeeJYpYvFIhUKBVHOMedrn7CyfD4vaPi+X8bjgr6LeBZ0J9FHZmRkZGqlciwbgJMnTyanp6e/PjExse/unTvPTs/MDMzPzzu5XE4IB+aEgGCQGh8GhMs49vg9g6TyXFb3MHBBmaKlaRrpui4ewzBcpCcQX0XbUwsLC+/dvn17WWAsC4Bjx469PDY2duDatWs7RkZHKZNOE4QnFvpRBwbBNE2KRCLUFY9T1HEI4IxCow7dvHnz3aXysyQATpw4YaTT6TeuXLny2vnz5zV0IEZ7qZ087HqsFQ4ASCQSFI1GfYBw+NatWz9Cv+X79W3crwLea7t37/7phQsXXj99+rQ2Pj4u7HEJ7R5pFZ5LXNdl09CcqLMnFovZc3NzZx+YiSNHjryyf/9+L5VK+UDaB8FV/TCPzOvWrVu94eHhV+4HQFsNOHjw4NDMzMxvPzz9Yf/t8dtiAgsIsvWsloe5CqyZV41oJKrBHJ6zitaJxeLifMB3fUqvz9bnent7XxodGd1289bNqvAaOpJ/q0f8gB+Z4mU3ey/LfG7rTnW/VC9VfS4UgL1795pY3/eNYrZnRDkw+dZis10oy5A1W9XjOuqPa7Wq04ky5tN1c8RLs2Vb+9CRKbpr8RMKACa+wempmZ2ZTEY0w+orAGgJQa9BfT/ZSNYX4hUgmsUwEjr17O6nxJ4kOc91EVWMryU99Phg5ZrQ2MWFRR6WnZs2bRpsIbsoCgUgmUwO38tmU/NzbD5q7Dmu/2MqmqNR6rsbyXwqIoiKspp6nDdTNg2//Dh1faOfnD095Fd7rqfXqRwPVy6XJ9/zUnE7PlxlrCERqhpwS9nDixRLxerY86jUBqn08O48jTwXXluZS9gcPPzKIVZtNB9qiRGZmJ+gSC7oVo20aNjRH43KcNDKpXJEM7WBMNIBJw01bMPuZttnm4XjKcazvgqE7dKo/zsbKfHVFGlQ8eSrQ1R8upfuvTtBhb8ukC6GWUEg9UjXqkMPmkq36il3Ise0fU+63fAYu8NoBtw01IDvHePNCQeplirmHIjHNNp0dDul3thMi5vzNHEpQ+69RTK+GKWBtx6nyKs90APWBG4XCCo9CUmjma4s6dSvmJqxv4BvEBOMtPgJ1QAAEC0VpY8v2Q1as1bE9yQo8pUuSl+8RQuvT1L5nwXSbI3Mz0Yp+s0eKl3NVRsoQdFMBAZEwlIbi8IO/8A0oQWarkXDCIcCUPI9w8N6KpkNRpAJsRzGoE05DyaSwZb3qlwmaZGodNal+XMu8eAHpsMtKjBiLuCgtCLIieKO/vBA8T/N90MdvlATKMO3bmRTcceCuZfnqJQukPN8N6WObKHIC3HSIlJkwzOw8Jo1AAQwShpKfM6pd4p652JlSjwUYSH0De/NsZiqcUN7rho85Wt5yh4Yp1KmQNaLcRp6+wka/v2nqGt/krReFkq1VWwgFqPBI6LElkAooB9OHCa6LA81AQ+HEZAfgQVoxInLDCr8cYEKl12yvhYnG05Q5EmHug8MUnRfgrI/HCfvOi+hqq0aaRnXwNKewwd8y/20C4q7pjplryy8KUWglmGZ1gEB1Pw/RIWjszT3vQxlv58m96M5omcMcl7rJ9+Rjm+VOOy/fvQlvM20O1dS7TskEQoAmwBrQMBKvYIKYDG18HuTLDLndPL+7NLCoUmK5uERbsPLFJNnNVJUhFXhh/OqtJ6uLO9k2Qo1wCtiDuAlRDCqmJWCsEjxb/XS4Ntbyfq8Q35czLeYInRytneRHYuQl4UGzTX4AQJQNBahFWUFVGdiCSN3FroIYPBCAp+wsCelWKmtpqGV9bxD9IJFqc9tIf8GXJ50kcxum2LY6EzNTlPhdzCFLLcPNlGCoapWKVBrKXc2LSDGcVm4+G22iTwH8IktA9AYtJJG2R+nSTtrk/3lGNmY/OxdDrnZPE2fnabcH+5RCeZg4E8ujKwzKih6rSirOp2MVX+taYZqAHuBrAFBACFFC8X6Aizk/Twtvu+Su8Okze/soPRxuMO/nCajjBNbniABQK2Y3Fy4whwLYqJEdqFoc662W/l2ab+KRm372nQLKqEA8KmK70sb5vVf0RY0OIOJTCo3JroZpGH/GhxCo8xrg1UZea6Nvbn45UaSCu8M5V8FiDri1WpI1ARJJChQgjW25RqVMjWJB42aU6EAFEu8zeVe1EoOqqrTCh0WQkx/ukaLM4uk4RA6UPt60NiY2LewNZs0QxGqwKCyzfzVl7Sq16qsyh/Py1il9FAxwyfBUjEvNhJSDGa0deA3Hr7FzOzHueEcb52l2nN91YbrlCeKNHkiLYj4BY90nCEoqqpe6x5WXsrDY+gGWZHQvVA4AMU8TKBmGWzHho5tgweHSAoip73G+hrA8a5hZamokTKghyW86h+fzShirUADPEyC7AwFo9ToM9XrHo87l7QTSNYJarWrqwSQMddU7er7ba4XlAQaYAWFDalQaJQfwPV5tJpDM/vNJa1aLaVWc7sA2uW0hw8gNCA4q2yk3BYAqQFSeKUJjQRWc5551sUcsBINwGEovsaDhPwLRuCTEHnpat/IHS/Plr4SAOAKizMBQfGTHv/lqH0tBNAAHMJa1goAUJ5gMP4rZaKWoUebZo5ZA/SVrALForziokxg7YkvjVaYwEo0wMNHhXo/YG1CwCZgQgvCQugb2H/FV2PB16LwUmReBqEFalPThEPoMogFICe/4kgA1iIE7JPyPSLsBYKPFA0QhAJApbKrG7wTuN9uoIHiKsry/MUrgK/7+FDROoQCgJtfczyBGHjwhXXNGQF7Dgbs37Ztws4Wx1OtQygARb84Zel23rLMSCHP3wjXmhH4GH0bt8eieU8rht4dDJ0EZ+dnM3Ajp3DPpgqdnA0kFGshHYvHKNYVn5rMTMpbHlVJgkQoADcyN+5iB3Y9hkuIusb7OA5rQWzJowb1T6ZwG8Vxrl/8+0XI0jqEAoDqbi7nfoDbVuTEcPSNggppxKv7j7fOUSdKw48N48swfYC7jaGTYDsAKHM3cwruwBjfwOTlpN2WpDW+j7ZUaqlPpmHShsENNDA4MPbx6Men2nHRDgB/Ij8xNjs/f9i2Lb+vv1fsrflEZ7WOPw8Qb397k320/cnt/FH88Lm/nRtDcejYtftmIICbdqf+kbATPfFYfJdhGVQq4N4NvhlwYCBWS+CBMU3cVkv10dPP7qS+Df1H33znVz8Hf+wErRgAblieXJi8ABBiMSe+K+JExEdTcS2+cmwuYXjUYKjTRWgkX5aOR2nosSF66pnPsPC/+M17vz6EKz6zzD+e0LBUrnlD3f1Ecvu3e7t6foArJ1uLuD/E9/DyuIrGW2e+isJ3+mVQcWi/dS9a164vVTlmmDWPnTQTXl6sK0b9UPmhjcOw+4F/lwz/Z28df/M4qrHzw7c82oalAsBE2Gmyu+y+bVuSwy/GnNiXdMP4NHaM/X7ZizAAfIDCO8gAiLZ9i5eYpYXdVjYtQjAWjs/zNREjjREG6KKeCTNkwXEDFFfjI3ncCp+OxKIjRa/0l8ujH/3p0qVL/wJh9tyW9J8YlgMAM8z1GQh+ujf0bRhKOIlB07CTlml04QweVya1KFTyvnML2osgRjKCb0lmhGzeuIg0PrcjrXPe4u2sSQbsG3XL2Jrk8IHFLZVL827ZnRq/M34HV/nZ0eERZ6H5UQqDZPuwXAAUNW7HKwg/igbHtWlkOx6UYBzXpnm7y48q63jH6wTXEVhHYB2B/0kE/gviOG5RK/1x9AAAAABJRU5ErkJggg==`,JFe=`/assets/ghostty-D5T950Nz.png`,YFe=`/assets/xcode-BOSzsT4U.png`,XFe=B_;function a4({primaryAction:e,secondaryActions:t,disabled:n=!1,className:r,triggerLabel:i=`More actions`,mobileTitle:a,defaultOpen:o,modal:s}){let c=B(D_({variant:`outline`,size:`sm`}),XFe,r);return(0,R.jsxs)(`div`,{className:`inline-flex items-center`,children:[(0,R.jsx)(`button`,{type:`button`,disabled:n,className:B(c,`rounded-r-none border-r-0 pr-1 focus-visible:z-10`),"aria-label":e.label,title:e.label,onClick:e.onSelect,children:e.content??e.label}),(0,R.jsxs)(oP,{defaultOpen:o,modal:s,children:[(0,R.jsx)(sP,{asChild:!0,children:(0,R.jsx)(`button`,{type:`button`,disabled:n,className:B(c,`rounded-l-none border-l-0 px-1 pl-0 focus-visible:z-10`,`data-[state=open]:bg-state-active data-[state=open]:text-foreground`),"aria-label":i,title:i,children:(0,R.jsx)(V,{name:`ChevronDown`,className:`size-3`})})}),(0,R.jsx)(cP,{align:`end`,sideOffset:2,mobileTitle:a,children:t.map((e,n)=>{let r=t[n-1];return(0,R.jsxs)(L.Fragment,{children:[e.groupLabel!==void 0&&e.groupLabel!==r?.groupLabel?(0,R.jsxs)(R.Fragment,{children:[n>0?(0,R.jsx)(pP,{}):null,(0,R.jsx)(fP,{children:e.groupLabel})]}):null,(0,R.jsx)(uP,{onSelect:e.onSelect,textValue:e.label,children:e.content??e.label})]},e.label)})})]})]})}var ZFe={vscode:zFe,cursor:BFe,"sublime-text":VFe,zed:HFe,windsurf:UFe,antigravity:WFe,finder:GFe,terminal:KFe,iterm2:qFe,ghostty:JFe,xcode:YFe};function o4({target:e,className:t=`size-4`}){return(0,R.jsx)(`img`,{alt:``,className:`${t} shrink-0 rounded-[3px]`,draggable:!1,src:ZFe[e.id]})}function QFe({onOpenPreferredTarget:e,onOpenTarget:t,preferredTarget:n,targets:r}){let[i,a]=(0,L.useState)(null),o=i!==null,s=(0,L.useCallback)(async(e,t)=>{if(i===null){a(e.id);try{await t()}finally{a(null)}}},[i]);return n?(0,R.jsx)(a4,{disabled:o,className:`px-1`,primaryAction:{label:`Open workspace in ${n.label}`,onSelect:()=>{s(n,e)},content:(0,R.jsx)(o4,{target:n,className:`size-5`})},secondaryActions:r.map(e=>({label:e.label,onSelect:()=>{s(e,()=>t(e.id))},content:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(o4,{target:e,className:`size-5`}),(0,R.jsx)(`span`,{className:`min-w-0 flex-1`,children:e.label})]})})),triggerLabel:`Choose workspace open target`,mobileTitle:`Open Workspace`}):null}var $Fe=pg(null),eIe=pg(null),tIe=pg([]);function nIe(e){let t=Sg(e.enabled?$k:$Fe),n=Sg(e.enabled?tA:eIe),r=Sg(e.enabled?eA:tIe);return{openWorkspace:(0,L.useMemo)(()=>{if(!e.enabled||!t||!n||r.length===0)return null;let i=n;return e=>Lhe(i,e)},[e.enabled,t,n,r.length]),workspaceOpenTargets:r}}var s4=`Failed to open file locally`,rIe=`Localhost is disconnected.`,iIe=`No local editor is available.`;function c4(e){return e.hasDaemon?iIe:rIe}function aIe(e){let{hasDaemon:t}=iA(),{openWorkspace:n,workspaceOpenTargets:r}=nIe(e),[i,a]=qhe(),o=(0,L.useMemo)(()=>Gk({preferredTargetId:i,targets:r}),[i,r]),s=(0,L.useCallback)(async e=>{if(!r.find(t=>t.id===e.targetId)||!n)return pL.error(s4,{description:c4({hasDaemon:t})}),!1;e.rememberTarget&&a(e.targetId);try{return await n({lineNumber:e.lineNumber,path:e.path,targetId:e.targetId}),!0}catch(e){return pL.error(s4,{description:e instanceof Error?e.message:void 0}),!1}},[t,n,a,r]),c=(0,L.useCallback)(async e=>o?s({lineNumber:e.lineNumber,path:e.path,rememberTarget:!1,targetId:o.id}):(pL.error(s4,{description:c4({hasDaemon:t})}),!1),[t,s,o]);return{canOpenPreferredTarget:o!==null,openPathInPreferredTarget:c,openPathInTarget:s,preferredTarget:o,workspaceOpenTargets:r}}function l4(e,t){return e?e.sessions.findIndex(e=>e.id===t.id)===-1?{sessions:[...e.sessions,t]}:{sessions:e.sessions.map(e=>e.id===t.id?t:e)}:{sessions:[t]}}function oIe(e,t){if(!e)return e;let n=e.sessions.filter(e=>e.id!==t);return n.length===e.sessions.length?e:{sessions:n}}function sIe(e,t){if(!e)throw Error(`${t}: thread id is required when query is enabled`);return e}function u4(e,t){return gt({queryKey:XO(e),queryFn:({signal:t})=>hpe(sIe(e,`useThreadTerminals`),t),enabled:(t?.enabled??!0)&&!!e,refetchOnWindowFocus:!1})}function cIe(){let e=et();return bt({meta:{errorMessage:`Failed to start terminal.`},mutationFn:({threadId:e,...t})=>gpe(e,t),onSuccess:t=>{e.setQueryData(XO(t.threadId),e=>l4(e,t)),e.invalidateQueries({queryKey:XO(t.threadId)})}})}function lIe(){let e=et();return bt({meta:{errorMessage:`Failed to rename terminal.`},mutationFn:({terminalId:e,threadId:t,...n})=>_pe(t,e,n),onSuccess:t=>{e.setQueryData(XO(t.threadId),e=>l4(e,t)),e.invalidateQueries({queryKey:XO(t.threadId)})}})}function uIe(){let e=et();return bt({meta:{errorMessage:`Failed to close terminal.`},mutationFn:({mode:e,terminalId:t,threadId:n})=>vpe(n,t,{mode:e,reason:`user`}),onSuccess:(t,n)=>{e.setQueryData(XO(t.threadId),e=>t.status===`exited`?oIe(e,n.terminalId):l4(e,t)),e.invalidateQueries({queryKey:XO(t.threadId)})}})}var dIe=`bb.thread.useStandardManagerTimeline`,fIe=`bb.thread.showAllEvents`;function pIe(){return typeof window>`u`?null:window.localStorage}function d4(e,t){return e===`true`?!0:e===`false`?!1:t}function mIe({currentValue:e,initialValue:t,legacyValue:n}){return d4(e===null?n:e,t)}var f4=Vk({parse:d4,serialize:e=>String(e)}),hIe=Dg(dIe,!1,{getItem:(e,t)=>{let n=pIe();return mIe({currentValue:n?.getItem(e)??null,legacyValue:n?.getItem(fIe)??null,initialValue:t})},removeItem:e=>{f4.removeItem(e)},setItem:(e,t)=>{f4.setItem(e,t)},subscribe:f4.subscribe},{getOnInit:!0});function gIe(){return wg(hIe)}function _Ie(e,t){let n=e.mergeBase?.aheadCount??0,r=e.mergeBase?.behindCount??0;return n===0&&r===0?null:n>0&&r>0?t?`${n} ahead, ${r} behind relative to ${t}`:`${n} ahead, ${r} behind`:n>0?t?`${n} ahead of ${t}`:`${n} ahead`:t?`${r} behind ${t}`:`${r} behind`}function p4(e){return e.filter(e=>e!==null&&e.length>0).join(` • `)}function m4(e){return e.filter(e=>e!==null).map((e,t)=>(0,R.jsxs)(`span`,{children:[t>0?` • `:null,e]},t))}function h4(e,t){return{label:e,summary:t,summaryContent:t}}function g4(e,t){if(!e){let e=t?.error instanceof JD&&t.error.code===`path_not_found`;return t?.workspaceDeleted||e?h4(`Unknown`,`Workspace not found.`):h4(`Unknown`,`Workspace status unavailable.`)}let n=t?.mergeBaseBranch??e.mergeBase?.mergeBaseBranch,r=t?.showBranchComparison?_Ie(e,n):null,i=Q2(e.workingTree),a=i.filesCount>0||i.insertions>0||i.deletions>0,o=a?e4(i):null,s=a?t4(i):null;switch(e.workingTree.state){case`clean`:return(e.mergeBase?.aheadCount??0)>0&&(e.mergeBase?.behindCount??0)>0?h4(`Diverged`,r??`Branch has diverged.`):(e.mergeBase?.aheadCount??0)>0?h4(`Ahead`,r??`Local commits pending merge.`):(e.mergeBase?.behindCount??0)>0?h4(`Behind`,r??`Branch is behind its merge base.`):h4(t?.showBranchComparison?`Up to date`:`Clean`,n?`No local changes relative to ${n}.`:`No local changes.`);case`untracked`:return{label:`Untracked`,summary:p4([o,r]),summaryContent:m4([s,r])};case`dirty_uncommitted`:return{label:`Dirty`,summary:p4([o??`Local changes pending commit.`,r]),summaryContent:m4([s??`Local changes pending commit.`,r])};case`committed_unmerged`:return(e.mergeBase?.aheadCount??0)>0&&(e.mergeBase?.behindCount??0)>0?h4(`Diverged`,r??`Branch has diverged.`):(e.mergeBase?.behindCount??0)>0?h4(`Behind`,r??`Branch is behind its merge base.`):h4(`Ahead`,r??`Local commits pending merge.`);case`dirty_and_committed_unmerged`:return{label:`Dirty`,summary:p4([o??`Local changes and commits pending merge.`,r]),summaryContent:m4([s??`Local changes and commits pending merge.`,r])};default:return jD(e.workingTree.state)}}var _4=pg(!1),v4=Dg(`bb.thread.secondaryPanel.widthPercent`,50,Vk({parse:(e,t)=>{if(e===null)return t;let n=Number.parseFloat(e);return Number.isFinite(n)&&n>0&&n<=100?n:t},serialize:e=>String(e)})),y4=pg(new Set),b4=pg(new Set),x4=pg(void 0),S4=pg(null);function vIe({clearActiveFileTabs:e,defaultMergeBaseBranch:t,environmentId:n,mergeBaseBranchOptionsEnabled:r=!1,threadId:i}){let a=z2(i),o=nFe(i),s=Sg(x4),c=Cg(x4),l=Cg(S4),{data:u,isLoading:d}=jFe(n??``,{enabled:!!n&&(r||o===`git-diff`)});(0,L.useEffect)(()=>{c(void 0)},[n,c]);let f=(0,L.useCallback)(e=>{a(e)},[a]),p=(0,L.useCallback)(e=>{f(e)},[f]),m=(0,L.useCallback)(()=>{p(`git-diff`)},[p]),h=(0,L.useCallback)(()=>{if(o!==null){f(null);return}f(`thread-info`)},[o,f]);return{closeThreadSecondaryPanel:(0,L.useCallback)(()=>{o!==null&&f(null)},[o,f]),defaultMergeBaseBranch:t,isLoadingMergeBaseBranchOptions:d,mergeBaseBranchOptions:u,openDiffFile:(0,L.useCallback)(t=>{e(),l(t),m()},[e,m,l]),openThreadDiffPanel:m,openThreadSecondaryPanel:p,selectedMergeBaseBranch:s,setSelectedMergeBaseBranch:c,toggleThreadSecondaryPanel:h}}function yIe(e){return!!e.threadId&&e.inlineRowCount===0&&e.cachedRowCount===0&&!e.isLoading}function C4(e){return{sourceSeqEnd:e.sourceSeqEnd,sourceSeqStart:e.sourceSeqStart,turnId:e.turnId}}function w4(e,t){return e.turnId===t.turnId&&e.sourceSeqStart===t.sourceSeqStart&&e.sourceSeqEnd===t.sourceSeqEnd}function bIe(e){let t={},n=e=>{for(let r of e){if(r.kind===`turn`){t[r.id]=C4(r),r.children&&n(r.children);continue}r.kind===`work`&&r.workKind===`delegation`&&n(r.childRows)}};return n(e),t}function xIe({candidateRowIds:e,previousRangesById:t,visibleRangesById:n}){let r=new Set;for(let i of e){let e=n[i],a=t[i];(!e||a&&!w4(a,e))&&r.add(i)}return r}function T4(e,t){let n=null;for(let r of t)e.has(r)&&(n??=new Set(e),n.delete(r));return n}function SIe(e,t){let n=null;for(let r of t)r in e&&(n??={...e},delete n[r]);return n}function E4({currentLoadGeneration:e,request:t,visibleRangesById:n}){if(e!==t.loadGeneration)return!1;let r=n[t.rowId];return r!==void 0&&w4(r,t.range)}function CIe({loadTurnSummaryRows:e,managerTimelineView:t,timelineRows:n,threadId:r}){let i=(0,L.useRef)(0),a=(0,L.useRef)(e),o=(0,L.useRef)(r),s=(0,L.useRef)({}),c=(0,L.useRef)(new Set),l=(0,L.useRef)(new Set),u=(0,L.useRef)(new Set),d=(0,L.useRef)({}),[f,p]=(0,L.useState)(()=>new Set),[m,h]=(0,L.useState)(()=>new Set),[g,_]=(0,L.useState)({});(0,L.useLayoutEffect)(()=>{a.current=e},[e]),(0,L.useLayoutEffect)(()=>{o.current=r},[r]),(0,L.useLayoutEffect)(()=>{let e=bIe(n),t=xIe({candidateRowIds:[...Object.keys(d.current),...c.current,...l.current,...u.current],previousRangesById:s.current,visibleRangesById:e});if(s.current=e,t.size===0)return;let r=T4(c.current,t);r&&(c.current=r);let i=T4(l.current,t);i&&(l.current=i,p(i));let a=T4(u.current,t);a&&(u.current=a,h(a));let o=SIe(d.current,t);o&&(d.current=o,_(o))},[n]);let v=(0,L.useCallback)(e=>{let t=o.current,n={loadGeneration:i.current,range:C4(e),rowId:e.id},r=c.current,f=s.current[e.id];if(f===void 0||!w4(f,n.range)||r.has(e.id)||!yIe({cachedRowCount:d.current[e.id]?.length??0,inlineRowCount:e.children?.length??0,isLoading:l.current.has(e.id),threadId:t})||!t)return;r.add(e.id);let m=new Set(l.current).add(e.id);if(l.current=m,p(m),u.current.has(e.id)){let t=new Set(u.current);t.delete(e.id),u.current=t,h(t)}a.current({id:t,turnId:e.turnId,sourceSeqStart:e.sourceSeqStart,sourceSeqEnd:e.sourceSeqEnd}).then(t=>{if(!E4({currentLoadGeneration:i.current,request:n,visibleRangesById:s.current}))return;let r={...d.current,[e.id]:t.rows};d.current=r,_(r)}).catch(()=>{if(!E4({currentLoadGeneration:i.current,request:n,visibleRangesById:s.current}))return;c.current.delete(e.id);let t=new Set(u.current).add(e.id);u.current=t,h(t)}).finally(()=>{if(!E4({currentLoadGeneration:i.current,request:n,visibleRangesById:s.current}))return;let t=new Set(l.current);t.delete(e.id),l.current=t,p(t)})},[]);return(0,L.useLayoutEffect)(()=>{i.current+=1,c.current=new Set;let e=new Set,t=new Set,n={};l.current=e,u.current=t,d.current=n,p(e),h(t),_(n)},[t,r]),{erroredTurnSummaryIds:m,handleLoadTurnSummaryRows:v,loadingTurnSummaryIds:f,turnSummaryRowsById:g}}function wIe({managerTimelineView:e,timelineRows:t,threadId:n}){let{mutateAsync:r}=Oje();return CIe({managerTimelineView:e,timelineRows:t,threadId:n,loadTurnSummaryRows:(0,L.useCallback)(t=>r({...t,managerTimelineView:e}),[r,e])})}var TIe=B_;function EIe({actionsMenu:e,activeTerminalCount:t,isManagedThread:n,isManagerThread:r,isSecondaryPanelOpen:i,isTerminalPanelOpen:a,isThreadGitActionPending:o,onOpenThreadGitAction:s,onToggleSecondaryPanel:c,onToggleTerminalPanel:l,showTerminalPanelToggle:u,threadHeaderGitActions:d,threadTitle:f,workspaceOpenButton:p}){let[m,...h]=d,g=E_(),_=g?`PanelBottom`:`PanelRight`;return(0,R.jsx)(Y1,{center:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`p`,{className:`truncate text-sm font-semibold`,children:f}),r?(0,R.jsx)(N$,{variant:`outline`,children:`manager`}):null,!r&&n?(0,R.jsx)(N$,{variant:`outline`,children:`managed`}):null]}),actions:(0,R.jsxs)(R.Fragment,{children:[p,m&&h.length>0?(0,R.jsx)(a4,{disabled:o,primaryAction:{label:m.label,onSelect:()=>s(m.target)},secondaryActions:h.map(e=>({label:e.label,onSelect:()=>s(e.target)}))}):m?(0,R.jsx)(O_,{type:`button`,variant:`outline`,size:`sm`,disabled:o,className:TIe,onClick:()=>s(m.target),children:m.label}):null,u?(0,R.jsxs)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:`${J1} relative`,"aria-label":a?`Hide terminal panel`:`Show terminal panel`,"aria-pressed":a,title:a?`Hide terminal panel`:`Show terminal panel`,onClick:l,children:[(0,R.jsx)(V,{name:`Terminal`}),t>0?(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-primary px-1 text-[9px] font-semibold leading-none text-primary-foreground`,children:t>9?`9+`:t}):null]}):null,e,!g&&i?null:(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:J1,"aria-label":i?`Hide secondary panel`:`Show secondary panel`,"aria-pressed":i,title:i?`Hide secondary panel`:`Show secondary panel`,onClick:c,children:(0,R.jsx)(V,{name:_})})]})})}function DIe({interaction:e,threadId:t}){return MT(e.payload)?(0,R.jsx)(kIe,{interaction:e,payload:e.payload,threadId:t}):jT(e.payload)?(0,R.jsx)(OIe,{interaction:e,payload:e.payload,threadId:t}):jD(e.payload)}function OIe({interaction:e,payload:t,threadId:n}){let r=P$(),[i,a]=(0,L.useState)(0),o=e.status===`resolving`;(0,L.useEffect)(()=>{a(0)},[e.id]);let s=(0,L.useMemo)(()=>AIe({interaction:e,payload:t}),[e,t]),c=r.error?JL({error:r.error,fallbackMessage:`Failed to resolve pending interaction.`}):null,l=Math.min(i,s.options.length-1),u=s.options[l]??null,d=s.skip,f=!o&&u!==null,p=!o&&d!==null,m=f||p,h=t=>{r.mutateAsync({threadId:n,interactionId:e.id,resolution:t}).catch(()=>{})};return(0,R.jsxs)(`div`,{className:`mb-2 rounded-lg border border-border/60 bg-muted/40 px-4 py-3 text-xs text-muted-foreground`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,R.jsx)(`h3`,{className:`min-w-0 flex-1 text-sm font-semibold text-foreground`,children:(0,R.jsx)(a$,{fullText:s.title,collapsedClassName:`line-clamp-2`,children:s.title})}),o?(0,R.jsx)(N$,{variant:`secondary`,children:`Delivering`}):null]}),s.subject?(0,R.jsx)(`div`,{className:`mt-3`,children:s.subject}):null,o?(0,R.jsx)(`div`,{className:`mt-3 rounded-md border border-border/50 bg-background/60 px-3 py-2 text-xs text-muted-foreground`,children:`Answer submitted. Delivering it to the provider.`}):null,!o&&s.options.length>0?(0,R.jsx)(`ol`,{className:`mt-3 flex flex-col`,children:s.options.map((e,t)=>{let n=t===l;return(0,R.jsx)(`li`,{children:(0,R.jsx)(`button`,{type:`button`,onClick:()=>a(t),disabled:r.isPending,className:B(`flex w-full items-center rounded-md px-3 py-2 text-left text-sm transition-colors`,n?`bg-foreground/15 font-bold text-foreground`:`text-muted-foreground hover:bg-foreground/5 hover:text-foreground`,r.isPending&&`opacity-60`),"aria-pressed":n,children:(0,R.jsx)(`span`,{className:`flex-1 truncate`,children:e.label})})},e.label)})}):null,m?(0,R.jsxs)(`div`,{className:`mt-3 flex items-center justify-end gap-2`,children:[p&&d?(0,R.jsx)(O_,{type:`button`,size:`sm`,variant:`link`,disabled:r.isPending,onClick:()=>h(d.resolution),children:d.label}):null,f&&u?(0,R.jsx)(O_,{type:`button`,size:`sm`,variant:`default`,disabled:r.isPending,onClick:()=>h(u.resolution),children:`Submit`}):null]}):null,c?(0,R.jsx)(`div`,{className:`mt-2 rounded-md border border-destructive/30 bg-destructive/[0.06] px-2 py-1 text-xs text-destructive`,children:c}):null]})}function kIe({interaction:e,payload:t,threadId:n}){let r=e.status===`resolving`,i=Sfe({interaction:e,surface:`app`});return(0,R.jsxs)(`div`,{className:`mb-2 rounded-lg border border-border/60 bg-muted/40 px-4 py-3 text-xs text-muted-foreground`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,R.jsx)(`h3`,{className:`min-w-0 flex-1 text-sm font-semibold text-foreground`,children:(0,R.jsx)(a$,{fullText:i,collapsedClassName:`line-clamp-2`,children:i})}),r?(0,R.jsx)(N$,{variant:`secondary`,children:`Delivering`}):null]}),r?(0,R.jsx)(`div`,{className:`mt-3`,children:(0,R.jsx)(B$,{message:`Answer submitted. Delivering it to the provider.`,statusReason:e.statusReason,tone:`default`})}):(0,R.jsx)(pke,{className:`mt-3`,interactionId:e.id,questions:t.questions,threadId:n})]})}function AIe({interaction:e,payload:t}){let n=t.availableDecisions.map(t=>({label:jIe(t),resolution:bfe(e,t)}));switch(t.subject.kind){case`command`:{let r=t.subject.command,i=r?Sz(r)??r:null,a=FD(e).filter(e=>!e.startsWith(`Command: `)),o=i?(0,R.jsxs)(`div`,{className:`overflow-hidden rounded-lg border border-border bg-card`,children:[(0,R.jsxs)(`pre`,{className:B(i$(`base`),`overflow-auto whitespace-pre px-4 py-3 font-mono text-sm leading-tight text-foreground`),children:[`$ `,i]}),a.length>0?(0,R.jsx)(`ul`,{className:`border-t border-border/60 px-4 py-3 text-xs text-muted-foreground`,children:a.map(e=>(0,R.jsx)(`li`,{children:e},e))}):null]}):null;return{title:t.reason??`Do you want to run this command?`,subject:o,options:n,skip:null}}case`file_change`:{let r=FD(e);return{title:t.reason??`Do you want to make these changes?`,subject:r.length>0?(0,R.jsx)(`ul`,{className:`rounded-lg border border-border bg-card px-4 py-3 text-xs text-muted-foreground`,children:r.map(e=>(0,R.jsx)(`li`,{children:e},e))}):null,options:n,skip:null}}case`permission_grant`:{let r=FD(e);return{title:t.reason??`Do you want to grant this permission?`,subject:r.length>0?(0,R.jsx)(`ul`,{className:`rounded-lg border border-border bg-card px-4 py-3 text-xs text-muted-foreground`,children:r.map(e=>(0,R.jsx)(`li`,{children:e},e))}):null,options:n,skip:null}}default:return jD(t.subject)}}function jIe(e){switch(e){case`allow_once`:return`Allow once`;case`allow_for_session`:return`Allow for session`;case`deny`:return`Deny`}}var D4=`rounded-md border border-border/60 bg-muted/30`;function O4({children:e,ariaLabel:t,className:n,style:r}){return t?(0,R.jsx)(`section`,{"aria-label":t,className:B(D4,n),style:r,children:e}):(0,R.jsx)(`div`,{className:B(D4,n),style:r,children:e})}var MIe=new Set([`active`,`host-reconnecting`,`waiting-for-host`]);function NIe(e){return MIe.has(e)}var PIe={uncommitted:`Uncommitted`,untracked:`Untracked`,committed:`Committed`},k4={managedBy:{toggle:`thread-prompt-banner-managed-by-toggle`,body:`thread-prompt-banner-managed-by-body`},managerChildren:{toggle:`thread-prompt-banner-manager-children-toggle`,body:`thread-prompt-banner-manager-children-body`},todos:{toggle:`thread-prompt-banner-todos-toggle`,body:`thread-prompt-banner-todos-body`},git:{toggle:`thread-prompt-banner-git-toggle`,body:`thread-prompt-banner-git-body`}},A4={in_progress:0,pending:1,completed:2};function FIe(e){return e.items.length>0}function IIe(e){if(e.length===0)return null;let t=0;for(let n of e)n.status===`completed`&&(t+=1);return t===0?`${e.length}`:`${t}/${e.length}`}function LIe({className:e}){return(0,R.jsx)(V,{name:`ChevronDown`,className:B(`size-3.5 shrink-0 rotate-45`,e),"aria-hidden":`true`})}function j4({id:e,controlsId:t,ariaLabel:n,icon:r,label:i,isExpanded:a,onToggle:o}){return(0,R.jsxs)(`button`,{type:`button`,id:e,"aria-expanded":a,"aria-controls":t,"aria-label":n,onClick:o,className:B(`flex min-w-0 items-center rounded px-1 py-0.5 text-xs transition-colors hover:bg-state-hover`,i==null?`gap-0`:`gap-1.5`,a?`text-foreground/90`:`text-muted-foreground`),children:[r,i==null?null:(0,R.jsx)(`span`,{className:`min-w-0 truncate`,children:i}),(0,R.jsx)(V,{name:`ChevronDown`,className:B(`size-3.5 shrink-0 text-muted-foreground/70 transition-transform duration-200`,a&&`rotate-180`),"aria-hidden":`true`})]})}function RIe({status:e}){let t=`size-3.5 shrink-0`;switch(e){case`in_progress`:return(0,R.jsx)(V,{name:`Square`,className:B(t,`fill-current text-muted-foreground/30`),"aria-hidden":`true`});case`completed`:return(0,R.jsx)(V,{name:`Check`,className:B(t,`text-muted-foreground/60`),"aria-hidden":`true`});case`pending`:return(0,R.jsx)(V,{name:`Square`,className:B(t,`text-muted-foreground/45`),"aria-hidden":`true`})}}function zIe({items:e}){return(0,R.jsx)(`ul`,{className:`max-h-40 space-y-0.5 overflow-y-auto px-3 pb-2 pt-1.5`,children:[...e].sort((e,t)=>A4[e.status]-A4[t.status]).map(e=>(0,R.jsxs)(`li`,{className:`flex min-w-0 items-center gap-2 py-0.5 text-xs`,children:[(0,R.jsx)(RIe,{status:e.status}),(0,R.jsx)(`span`,{className:B(`min-w-0 flex-1 truncate`,e.status===`in_progress`&&`font-medium text-foreground/90`,e.status===`pending`&&`text-foreground/85`,e.status===`completed`&&`text-muted-foreground/70 line-through decoration-muted-foreground/40`),title:e.text,children:e.text})]},e.id))})}function M4({managerName:e,href:t}){return(0,R.jsxs)(`div`,{className:`px-3 pb-2 pt-1.5 text-xs leading-relaxed text-muted-foreground`,children:[`This thread is managed by`,` `,(0,R.jsx)(Lh,{to:t,className:`text-foreground/90 underline-offset-2 hover:underline`,children:e}),`.`]})}function BIe({items:e}){return(0,R.jsx)(`ul`,{className:`max-h-40 space-y-0.5 overflow-y-auto px-3 pb-2 pt-1.5`,children:e.map(e=>(0,R.jsx)(`li`,{className:`text-xs`,children:(0,R.jsxs)(Lh,{to:e.href,title:e.title,className:`flex min-w-0 items-center gap-2 py-0.5 text-foreground/90 underline-offset-2 hover:underline`,children:[(0,R.jsx)(LIe,{className:`text-muted-foreground/60 no-underline`}),(0,R.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.title})]})},e.id))})}function N4({id:e,labelledBy:t,isExpanded:n,children:r}){return(0,R.jsx)(`section`,{id:e,role:`region`,"aria-labelledby":t,"aria-hidden":!n,className:B(`grid overflow-hidden transition-[grid-template-rows,opacity,border-color] duration-200 ease-out`,n?`grid-rows-[1fr] border-t border-border/40 opacity-100`:`pointer-events-none grid-rows-[0fr] border-t border-transparent opacity-0`),children:(0,R.jsx)(`div`,{className:`overflow-hidden`,children:r})})}function VIe({todoSection:e,gitSection:t,gitSectionPending:n,archivedSection:r,managedBySection:i,managerChildrenSection:a,expandedSection:o,onToggleSection:s}){if(n)return null;if(r){let e=o===`managedBy`&&i!==null;return(0,R.jsxs)(O4,{ariaLabel:`Thread context before sending`,className:`overflow-hidden`,style:{minHeight:32},children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-0.5 px-2 py-1 text-xs text-muted-foreground`,children:[i?(0,R.jsx)(j4,{id:k4.managedBy.toggle,controlsId:k4.managedBy.body,ariaLabel:`Managed by ${i.managerName}`,icon:(0,R.jsx)(V,{name:`UserRound`,className:`size-3.5 shrink-0`,"aria-hidden":`true`}),label:null,isExpanded:e,onToggle:()=>s(`managedBy`)}):null,(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 px-1 py-0.5`,children:[(0,R.jsx)(V,{name:`Archive`,className:`size-3.5 shrink-0`,"aria-hidden":`true`}),(0,R.jsx)(`span`,{className:`min-w-0 truncate`,children:`Thread is archived`})]})]}),i?(0,R.jsx)(N4,{id:k4.managedBy.body,labelledBy:k4.managedBy.toggle,isExpanded:e,children:(0,R.jsx)(M4,{managerName:i.managerName,href:i.href})}):null]})}let c=e!==null&&FIe(e.pendingTodos),l=t!==null,u=i!==null,d=a!==null&&a.items.length>0;if(!c&&!l&&!u&&!d)return null;let f=c&&e?e.pendingTodos.items:[],p=o===`todos`&&c,m=o===`git`&&l,h=o===`managedBy`&&u,g=o===`managerChildren`&&d,_=l?(0,R.jsxs)(R.Fragment,{children:[c?null:(0,R.jsxs)(R.Fragment,{children:[PIe[t.changedFiles.kind],` · `]}),t4(Q2(t.changedFiles.stats))]}):null,v=l&&t.mergeBase?R0({mergeBaseBranch:t.mergeBase.branch,mergeBaseBranchOptions:t.mergeBase.options}):[],y=u&&!c&&!l&&!d;return(0,R.jsxs)(O4,{ariaLabel:`Thread context before sending`,className:`overflow-hidden`,style:{minHeight:32},children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-0.5 px-2 py-1 text-xs text-muted-foreground`,children:[u&&i&&y?(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 px-1 py-0.5`,children:[(0,R.jsx)(V,{name:`UserRound`,className:`size-3.5 shrink-0`,"aria-hidden":`true`}),(0,R.jsxs)(`span`,{className:`min-w-0 truncate`,children:[`Managed by`,` `,(0,R.jsx)(Lh,{to:i.href,className:`text-foreground/90 underline underline-offset-2`,children:i.managerName})]})]}):null,u&&i&&!y?(0,R.jsx)(j4,{id:k4.managedBy.toggle,controlsId:k4.managedBy.body,ariaLabel:`Managed by ${i.managerName}`,icon:(0,R.jsx)(V,{name:`UserRound`,className:`size-3.5 shrink-0`,"aria-hidden":`true`}),label:null,isExpanded:h,onToggle:()=>s(`managedBy`)}):null,d&&a?(0,R.jsx)(j4,{id:k4.managerChildren.toggle,controlsId:k4.managerChildren.body,icon:(0,R.jsx)(V,{name:`CircleDashed`,className:`size-3.5 shrink-0 animate-spin`,"aria-hidden":`true`}),label:`${a.items.length} active managed ${a.items.length===1?`thread`:`threads`}`,isExpanded:g,onToggle:()=>s(`managerChildren`)}):null,c?(0,R.jsx)(j4,{id:k4.todos.toggle,controlsId:k4.todos.body,icon:(0,R.jsx)(V,{name:`ListTodo`,className:`size-3.5 shrink-0`,"aria-hidden":`true`}),label:IIe(f),isExpanded:p,onToggle:()=>s(`todos`)}):null,l&&_?(0,R.jsx)(j4,{id:k4.git.toggle,controlsId:k4.git.body,icon:(0,R.jsx)(V,{name:`FileDiff`,className:`size-3.5 shrink-0`,"aria-hidden":`true`}),label:_,isExpanded:m,onToggle:()=>s(`git`)}):null,l&&t.mergeBase?(0,R.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground/90`,children:[(0,R.jsx)(`span`,{className:`shrink-0`,children:`Merge base:`}),(0,R.jsx)(B0,{value:t.mergeBase.branch,options:v,variant:`minimal`,loading:t.mergeBase.optionsLoading,onChange:t.mergeBase.onChange,onOpenChange:t.mergeBase.onPickerOpenChange,className:`max-w-[10rem]`,muted:!0,popoverAlign:`end`})]}):null]}),u&&i&&!y?(0,R.jsx)(N4,{id:k4.managedBy.body,labelledBy:k4.managedBy.toggle,isExpanded:h,children:(0,R.jsx)(M4,{managerName:i.managerName,href:i.href})}):null,d&&a?(0,R.jsx)(N4,{id:k4.managerChildren.body,labelledBy:k4.managerChildren.toggle,isExpanded:g,children:(0,R.jsx)(BIe,{items:a.items})}):null,c?(0,R.jsx)(N4,{id:k4.todos.body,labelledBy:k4.todos.toggle,isExpanded:p,children:(0,R.jsx)(zIe,{items:f})}):null,l?(0,R.jsx)(N4,{id:k4.git.body,labelledBy:k4.git.toggle,isExpanded:m,children:(0,R.jsx)(r4,{files:t.changedFiles.files,className:`max-h-32 px-3 pb-2 pt-1`,onFileClick:e=>t.onPromptBannerFileClick({file:e,section:t.changedFiles})})}):null]})}var P4=220;function HIe(e){let t=e.trim();return t.length===0?`Attachment`:vR(t)}function F4(e){let t=0;for(let n of e)(n.type===`localImage`||n.type===`localFile`)&&(t+=1);return t}function UIe(e){let t=e.filter(e=>e.type===`text`).map(e=>e.text.trim()).filter(e=>e.length>0).join(`
|
|
1488
1488
|
|
|
1489
|
-
`).trim();if(t.length>0)return t.length<=P4?t:`${t.slice(0,P4-1)}...`;let n=F4(e);if(n===1){let t=e.find(e=>e.type===`localImage`||e.type===`localFile`);return t?t.type===`localFile`&&t.name?`Attachment only (${t.name})`:`Attachment only (${HIe(t.path)})`:`Attachment only (1 file)`}return n>1?`Attachment only (${n} files)`:`(empty message)`}function WIe(e){return A0(e)}function GIe({queuedMessages:e,sendDisabled:t,actionDisabled:n,processingMessageId:r,onSendImmediately:i,onEdit:a,onDelete:o}){return e.length===0?null:(0,R.jsxs)(O4,{ariaLabel:`Queued messages`,className:`overflow-hidden`,children:[(0,R.jsx)(`div`,{className:`flex items-center justify-between px-2.5 pb-1 pt-2.5`,children:(0,R.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Queued (`,e.length,`)`]})}),(0,R.jsx)(`ul`,{children:e.map((e,s)=>{let c=UIe(e.content),l=F4(e.content),u=r===e.id;return(0,R.jsx)(`li`,{className:`px-2.5 py-0.5`,children:(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,R.jsx)(`div`,{className:`p-0.5 text-muted-foreground`,children:(0,R.jsx)(V,{name:`CornerDownRight`,className:`size-3.5`})}),(0,R.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1 text-xs leading-4`,children:[(0,R.jsx)(`p`,{className:`min-w-0 truncate text-foreground`,title:c,children:c}),l>0?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`.`}),(0,R.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:l===1?`1 attachment`:`${l} attachments`})]}):null,u?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`.`}),(0,R.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`Sending...`})]}):null]})}),(0,R.jsxs)(`div`,{className:`ml-1 flex shrink-0 items-center gap-1`,children:[(0,R.jsx)(O_,{type:`button`,size:`sm`,variant:`link`,className:`h-auto px-0 pr-1 text-xs text-muted-foreground underline`,disabled:t||u,onClick:()=>i(e.id),children:u?`Sending...`:`Send now`}),(0,R.jsx)(O_,{type:`button`,size:`icon`,variant:`ghost`,className:`size-7 text-muted-foreground`,disabled:n||u,onClick:()=>a(e.id),"aria-label":`Edit queued message ${s+1}`,title:`Edit queued message`,children:(0,R.jsx)(V,{name:`Edit`,className:`size-3.5`})}),(0,R.jsx)(O_,{type:`button`,size:`icon`,variant:`ghost`,className:`size-7 text-muted-foreground hover:text-destructive`,disabled:n||u,onClick:()=>o(e.id),"aria-label":`Delete queued message ${s+1}`,title:`Delete queued message`,children:(0,R.jsx)(V,{name:`Trash2`,className:`size-3.5`})})]})]})},e.id)})})]})}async function I4(e,{successMessage:t=`Copied`,errorMessage:n=`Failed to copy`}={}){if(typeof navigator>`u`||!navigator.clipboard?.writeText)return n&&pL.error(n),!1;try{return await navigator.clipboard.writeText(e),t&&pL.success(t),!0}catch{return n&&pL.error(n),!1}}function KIe({environmentLabel:e,environmentHostLabel:t,environmentHostConnected:n,environmentIcon:r,environmentBranchName:i}){return!e&&n===void 0?null:(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 pr-1.5`,children:[e?(0,R.jsx)(b0,{label:`Environment`,value:(0,R.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,R.jsx)(`span`,{children:e}),t?(0,R.jsxs)(`span`,{className:`hidden text-muted-foreground/60 lg:inline`,children:[`· `,t]}):null,n===void 0?null:(0,R.jsx)(K0,{connected:n,className:`translate-y-px`})]}),leading:r?(0,R.jsx)(V,{name:r,className:`size-4 shrink-0`}):null,className:`h-6 shrink-0`,muted:!0}):n===void 0?null:(0,R.jsx)(K0,{connected:n}),i?(0,R.jsxs)(`button`,{type:`button`,className:`hidden min-w-0 items-center gap-1 rounded-md px-1.5 py-0.5 text-xs text-muted-foreground/75 transition-colors hover:bg-state-hover hover:text-foreground md:flex`,title:`Copy branch name: ${i}`,onClick:()=>{I4(i,{successMessage:`Branch name copied`,errorMessage:`Failed to copy branch name`})},children:[(0,R.jsx)(V,{name:`GitMerge`,className:`size-3.5 shrink-0`}),(0,R.jsx)(`span`,{className:`truncate`,children:i})]}):null]})}function qIe({visible:e,active:t=!1,onClick:n,className:r,ariaLabel:i=`Scroll to latest event`}){return(0,R.jsx)(`div`,{className:B(`flex h-0 items-center justify-center`,r),children:(0,R.jsx)(`button`,{onClick:n,className:B(`z-20 -mt-20 flex size-8 items-center justify-center rounded-full border border-foreground/20 bg-background/80 backdrop-blur-md transition-all duration-200 hover:border-foreground/30 hover:bg-background/90`,e?`translate-y-0 opacity-100`:`pointer-events-none translate-y-2 opacity-0`),"aria-label":i,type:`button`,children:t?(0,R.jsx)(JIe,{}):(0,R.jsx)(V,{name:`ArrowDown`,className:`size-4`})})})}function JIe(){return(0,R.jsxs)(`span`,{className:`flex items-center gap-0.5`,"aria-hidden":!0,children:[(0,R.jsx)(`span`,{className:`size-1 animate-typing-dot rounded-full bg-current [animation-delay:-240ms]`}),(0,R.jsx)(`span`,{className:`size-1 animate-typing-dot rounded-full bg-current [animation-delay:-120ms]`}),(0,R.jsx)(`span`,{className:`size-1 animate-typing-dot rounded-full bg-current`})]})}function YIe({active:e}){let t=q$();return t?(0,R.jsx)(qIe,{visible:!t.isAtBottom,active:e,onClick:t.scrollToBottom}):null}function XIe({onSubmit:e,submission:t,...n}){let r=q$(),i=()=>{e(),r?.scrollToBottom()},a=t?.onModifierSubmit===void 0?void 0:()=>{t.onModifierSubmit?.(),r?.scrollToBottom()},o=t===void 0?void 0:{...t,...a?{onModifierSubmit:a}:{}};return(0,R.jsx)(P0,{...n,onSubmit:i,submission:o})}var L4=68,ZIe=L4+32;function QIe({attachments:e,stack:t,composer:n,environmentSummary:r,contextWindowUsage:i,execution:a,permission:o,mentions:s,zenModeResetKey:c}){let l=n.submitMode,u=l.kind===`queue`,d=l.kind===`ready`||l.kind===`queue`,f=l.kind===`blocked`&&l.reason===`stopping`,p=l.kind===`queue`||l.kind===`stop-only`?l.onStop:void 0,m=p!==void 0,h=(0,L.useRef)(null),g=L0(h),_=n.canSteerSubmit?n.onSteerSubmit:void 0,v=(0,L.useRef)(null),[y,b]=(0,L.useState)(0);(0,L.useLayoutEffect)(()=>{let e=v.current;if(!e)return;let t=e.offsetHeight;b(e=>e===t?e:t)},[t]),(0,L.useEffect)(()=>{let e=v.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(e=>{let t=e[0];t&&b(t.contentRect.height)});return t.observe(e),()=>t.disconnect()},[]);let x=Math.max(L4,ZIe-y);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(YIe,{active:n.threadRuntimeDisplayStatus===`active`}),(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`div`,{ref:v,className:`space-y-2`,children:t}),(0,R.jsx)(XIe,{promptBoxRef:h,voice:g,minHeight:x,value:n.message,onChange:n.onChangeMessage,onSubmit:n.onSubmit,history:n.history,placeholder:n.promptPlaceholder,mentionMenuPlacement:`top`,autoFocus:!0,submission:{onStop:p,isSubmitting:n.isFollowUpSubmitting||f,disabled:!d||n.isFollowUpSubmitting,onModifierSubmit:_,title:u?`Queue follow-up (Enter)`:f?`Stopping run...`:`Submit (Enter)`,isRunning:m,mode:`enter`},mentions:s,attachments:e,zenMode:{layout:`thread`,storageKey:null,resetKey:c,resetOnSubmit:!0},footerStart:(0,R.jsx)(C0,{...a})}),(0,R.jsxs)(`div`,{className:`mt-1 flex min-h-6 items-center justify-between gap-2 pl-[15px] pr-3.5`,children:[(0,R.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-wrap items-center gap-1`,children:r}),(0,R.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,R.jsx)(X0,{value:o.value,options:o.options,onChange:o.onChange,supported:o.supported,className:`h-6`}),i?(0,R.jsx)(FAe,{usage:i}):null]})]})]})]})}function $Ie(e,t){if(e===`created`||e===`provisioning`)return t?`Hiring manager...`:`Creating thread...`;switch(e){case`waiting-for-host`:return`Host daemon disconnected`;case`host-reconnecting`:return`Waiting for host daemon to reconnect...`;case`error`:return`Retry by sending a follow-up message`;case`idle`:case`active`:return t?`Send a message. @ to mention files or threads`:`Ask for follow-up changes. @ to mention files`;default:return jD(e)}}function eLe(e){return e===`active`||e===`host-reconnecting`}function tLe({canUseGitUi:e,composerQueriesEnabled:t,composerQueriesRefetchOnMount:n,composerQueriesStaleTime:r,contextWindowUsage:i,environmentBranchName:a,environmentHostConnected:o,environmentHostLabel:s,environmentIcon:c,environmentLabel:l,isEnvironmentActionPending:u,pendingInteractions:d,onChangedFileClick:f,openThreadDiffPanel:p,projectId:m,workspaceChangedFilesSection:h,workspaceStatusPending:g,contextBannerMergeBase:_,pendingTodos:v,managedBySection:y,managerChildrenSection:b,sendMessage:x,thread:S}){let{data:C}=bje(S.id,{enabled:t,refetchOnMount:n,staleTime:r}),{data:w=[]}=xje(S.id,{enabled:t,refetchOnMount:n,staleTime:r}),{data:T=[]}=Sje(S.id,{enabled:t,refetchOnMount:n,staleTime:r}),E=bNe(),D=xNe(),O=SNe(),k=CNe(),A=_I(),j=d2({projectId:m,threadId:S.id}),M=p2(m,{threadSuggestionMode:S.type===`manager`?`all`:`managers`,currentThreadId:S.id,environmentId:S.environmentId??null}),[N,P]=(0,L.useState)(null),[ee,F]=(0,L.useState)(null),[te,ne]=(0,L.useState)(null),[re,ie]=(0,L.useState)(!1),ae=(0,L.useMemo)(()=>Z0(T),[T]),{selectedProviderId:oe,providerOptions:I,hasMultipleProviders:se,selectedProviderDisplayName:ce,selectedModel:le,setSelectedModel:ue,serviceTier:de,setServiceTier:fe,reasoningLevel:pe,setReasoningLevel:me,permissionMode:he,setPermissionMode:ge,activeModel:_e,modelOptions:ve,reasoningOptions:ye,permissionModeOptions:be,supportsPermissionModeSelection:xe,supportsServiceTier:Se,serviceTierSupportByProvider:Ce}=m0({enabled:t,environmentId:S.environmentId??void 0,scope:`thread`,resetKey:S.id,initialProviderId:S.providerId,initialModel:C?.model,initialServiceTier:C?.serviceTier,initialReasoningLevel:C?.reasoningLevel,initialPermissionMode:C?.permissionMode,initialEnvironmentSelectionValue:S.environmentId??void 0}),we=S.runtime.displayStatus,Te=we===`created`,Ee=we===`provisioning`,De=we===`waiting-for-host`,Oe=S.stopRequestedAt!==null||k.isPending&&k.variables===S.id,ke=n0(d),Ae=ke!==null,je=E.isPending||D.isPending||O.isPending||re,Me=x.isPending||u||E.isPending||re,Ne=Oe?{kind:`blocked`,reason:`stopping`}:Ae?{kind:`blocked`,reason:`pending-interaction`}:Te||Ee?{kind:`blocked`,reason:`provisioning`}:De?{kind:`stop-only`,onStop:()=>k.mutate(S.id)}:we===`active`||we===`host-reconnecting`?{kind:`queue`,onStop:()=>k.mutate(S.id)}:{kind:`ready`},Pe=Oe?`Stopping thread...`:$Ie(we,S.type===`manager`),Fe=(0,L.useMemo)(()=>({text:j.text,attachments:j.attachments}),[j.attachments,j.text]),Ie=(0,L.useMemo)(()=>k0(Fe),[Fe]),Le=Ie.length>0,Re=we===`active`&&Ne.kind===`queue`&&!Me&&!je&&(w.length>0||Le),ze=(0,L.useCallback)(async({input:e,mode:t,model:n,serviceTier:r,reasoningLevel:i,permissionMode:a})=>{if(e.length===0)return;let o=t===`steer`?{}:{...n?{model:n}:{},...r?{serviceTier:r}:{},...i?{reasoningLevel:i}:{},...a?{permissionMode:a}:{}};await x.mutateAsync({id:S.id,input:e,mode:t,...o})},[x,S.id]),Be=(0,L.useCallback)(async e=>{if(e.length===0)return;P(null);let t=[];for(let n of e)try{let e=await A.mutateAsync({projectId:m,file:n});j.addAttachment(e)}catch{t.push(n.name)}t.length>0&&P(`Failed to attach: ${t.join(`, `)}`)},[m,j,A]),Ve=(0,L.useCallback)(async()=>{let e=Fe,t=Ie;if(t.length===0)return;j.clearIfCurrentMatches(e),P(null);let n=eLe(we);try{n?await E.mutateAsync({id:S.id,input:t,model:_e?.model??le,...Se&&de?{serviceTier:de}:{},reasoningLevel:pe,permissionMode:he}):await ze({input:t,mode:`auto`,model:_e?.model??le,...Se&&de?{serviceTier:de}:{},reasoningLevel:pe,permissionMode:he})}catch(t){j.restoreIfEmpty(e),pL.error(JL({error:t,fallbackMessage:n?`Failed to queue message.`:`Failed to send follow-up.`}))}},[_e?.model,E,Fe,Ie,j,pe,he,le,ze,de,Se,S.id,we]),He=(0,L.useCallback)(async()=>{if(!Re)return;let e=Fe,t=Ie;if(!(w.length===0&&t.length===0)){ie(!0),t.length>0&&j.clearIfCurrentMatches(e),P(null);try{for(let e of w)await D.mutateAsync({id:S.id,mode:`steer`,queuedMessageId:e.id});await ze({input:t,mode:`steer`})}catch(t){j.restoreIfEmpty(e),pL.error(JL({error:t,fallbackMessage:`Failed to send steer.`}))}finally{ie(!1)}}},[Re,Fe,Ie,j,w,D,ze,S.id]),Ue=(0,L.useCallback)(e=>{w.find(t=>t.id===e)&&(ne(e),D.mutateAsync({id:S.id,mode:`auto`,queuedMessageId:e}).then(()=>{P(null)}).catch(e=>{pL.error(JL({error:e,fallbackMessage:`Failed to send queued message.`}))}).finally(()=>{ne(t=>t===e?null:t)}))},[w,D,S.id]),We=(0,L.useCallback)(e=>{let t=w.find(t=>t.id===e);t&&(ne(e),O.mutateAsync({id:S.id,queuedMessageId:e}).then(()=>{let e=WIe(t.content);j.setDraft(e),P(null)}).catch(e=>{pL.error(JL({error:e,fallbackMessage:`Failed to edit queued message.`}))}).finally(()=>{ne(t=>t===e?null:t)}))},[O,j,w,S.id]),Ge=(0,L.useCallback)(e=>{ne(e),O.mutateAsync({id:S.id,queuedMessageId:e}).catch(e=>{pL.error(JL({error:e,fallbackMessage:`Failed to delete queued message.`}))}).finally(()=>{ne(t=>t===e?null:t)})},[O,S.id]),Ke=(0,L.useCallback)(e=>{f(e)},[f]);return ke?(0,R.jsx)(DIe,{interaction:ke,threadId:S.id}):(0,R.jsx)(QIe,{attachments:{items:j.attachments,projectId:m,isAttaching:A.isPending,error:N,onAttachFiles:Be,onRemove:j.removeAttachment},stack:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(VIe,{todoSection:S.type===`manager`||!v?null:{pendingTodos:v},archivedSection:S.archivedAt===null?null:{archivedAt:S.archivedAt},managedBySection:y,managerChildrenSection:b,gitSection:h?{changedFiles:h,mergeBase:_,onPromptBannerFileClick:e?Ke:()=>{}}:null,gitSectionPending:g,expandedSection:ee,onToggleSection:e=>{F(t=>t===e?null:e)}}),(0,R.jsx)(GIe,{queuedMessages:w,sendDisabled:!(Ne.kind===`ready`||Ne.kind===`queue`)||Me||je,actionDisabled:je,processingMessageId:te,onSendImmediately:Ue,onEdit:We,onDelete:Ge})]}),composer:{history:{currentDraft:{text:j.text,attachments:j.attachments},entries:ae,onSelectEntry:j.setDraft,resetKey:S.id},isFollowUpSubmitting:Me,message:j.text,onChangeMessage:j.setText,onSteerSubmit:He,onSubmit:Ve,promptPlaceholder:Pe,canSteerSubmit:Re,submitMode:Ne,threadRuntimeDisplayStatus:we},zenModeResetKey:S.id,environmentSummary:l||o!==void 0?(0,R.jsx)(KIe,{environmentLabel:l,environmentHostLabel:s,environmentHostConnected:o,environmentIcon:c,environmentBranchName:a}):null,contextWindowUsage:i??null,execution:{provider:{options:I,selectedId:oe,hasMultiple:se,displayName:ce},model:{active:_e,selected:le,options:ve,onChange:ue},serviceTier:{value:de,onChange:fe,supported:Se,supportByProvider:Ce},reasoning:{value:pe,options:ye,onChange:me}},permission:{value:he,options:be,onChange:ge,supported:xe},mentions:{suggestions:M.suggestions,isLoading:M.isLoading,isError:M.isError,onQueryChange:M.setQuery}})}var R4=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=p();function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if(n!==`default`){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var r=n(t),i=typeof window<`u`,a=t.createContext(null);a.displayName=`PanelGroupContext`;var o={group:`data-panel-group`,groupDirection:`data-panel-group-direction`,groupId:`data-panel-group-id`,panel:`data-panel`,panelCollapsible:`data-panel-collapsible`,panelId:`data-panel-id`,panelSize:`data-panel-size`,resizeHandle:`data-resize-handle`,resizeHandleActive:`data-resize-handle-active`,resizeHandleEnabled:`data-panel-resize-handle-enabled`,resizeHandleId:`data-panel-resize-handle-id`,resizeHandleState:`data-resize-handle-state`},s=10,c=i?t.useLayoutEffect:()=>{},l=r.useId,u=typeof l==`function`?l:()=>null,d=0;function f(e=null){let n=u(),r=t.useRef(e||n||null);return r.current===null&&(r.current=``+ d++),e??r.current}function m({children:e,className:n=``,collapsedSize:r,collapsible:i,defaultSize:s,forwardedRef:l,id:u,maxSize:d,minSize:p,onCollapse:m,onExpand:h,onResize:g,order:_,style:v,tagName:y=`div`,...b}){let x=t.useContext(a);if(x===null)throw Error(`Panel components must be rendered within a PanelGroup container`);let{collapsePanel:S,expandPanel:C,getPanelSize:w,getPanelStyle:T,groupId:E,isPanelCollapsed:D,reevaluatePanelConstraints:O,registerPanel:k,resizePanel:A,unregisterPanel:j}=x,M=f(u),N=t.useRef({callbacks:{onCollapse:m,onExpand:h,onResize:g},constraints:{collapsedSize:r,collapsible:i,defaultSize:s,maxSize:d,minSize:p},id:M,idIsFromProps:u!==void 0,order:_});t.useRef({didLogMissingDefaultSizeWarning:!1}),c(()=>{let{callbacks:e,constraints:t}=N.current,n={...t};N.current.id=M,N.current.idIsFromProps=u!==void 0,N.current.order=_,e.onCollapse=m,e.onExpand=h,e.onResize=g,t.collapsedSize=r,t.collapsible=i,t.defaultSize=s,t.maxSize=d,t.minSize=p,(n.collapsedSize!==t.collapsedSize||n.collapsible!==t.collapsible||n.maxSize!==t.maxSize||n.minSize!==t.minSize)&&O(N.current,n)}),c(()=>{let e=N.current;return k(e),()=>{j(e)}},[_,M,k,j]),t.useImperativeHandle(l,()=>({collapse:()=>{S(N.current)},expand:e=>{C(N.current,e)},getId(){return M},getSize(){return w(N.current)},isCollapsed(){return D(N.current)},isExpanded(){return!D(N.current)},resize:e=>{A(N.current,e)}}),[S,C,w,D,M,A]);let P=T(N.current,s);return t.createElement(y,{...b,children:e,className:n,id:M,style:{...P,...v},[o.groupId]:E,[o.panel]:``,[o.panelCollapsible]:i||void 0,[o.panelId]:M,[o.panelSize]:parseFloat(``+P.flexGrow).toFixed(1)})}var h=t.forwardRef((e,n)=>t.createElement(m,{...e,forwardedRef:n}));m.displayName=`Panel`,h.displayName=`forwardRef(Panel)`;var g;function _(){return g}var v=null,y=!0,b=-1,x=null;function S(e,t){if(t){let e=(t&re)!==0,n=(t&ie)!==0,r=(t&ae)!==0,i=(t&oe)!==0;if(e)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}switch(e){case`horizontal`:return`ew-resize`;case`intersection`:return`move`;case`vertical`:return`ns-resize`}}function C(){x!==null&&(document.head.removeChild(x),v=null,x=null,b=-1)}function w(e,t){if(!y)return;let n=S(e,t);if(v!==n){if(v=n,x===null){x=document.createElement(`style`);let e=_();e&&x.setAttribute(`nonce`,e),document.head.appendChild(x)}if(b>=0){var r;(r=x.sheet)==null||r.removeRule(b)}b=x.sheet?.insertRule(`*{cursor: ${n} !important;}`)??-1}}function T(e){return e.type===`keydown`}function E(e){return e.type.startsWith(`pointer`)}function D(e){return e.type.startsWith(`mouse`)}function O(e){if(E(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(D(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function k(){if(typeof matchMedia==`function`)return matchMedia(`(pointer:coarse)`).matches?`coarse`:`fine`}function A(e,t,n){return n?e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y:e.x<=t.x+t.width&&e.x+e.width>=t.x&&e.y<=t.y+t.height&&e.y+e.height>=t.y}function j(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:te(e),b:te(t)},r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;we(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:F(ee(n.a)),b:F(ee(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var M=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function N(e){let t=getComputedStyle(ne(e)??e).display;return t===`flex`||t===`inline-flex`}function P(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||N(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||M.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function ee(e){let t=e.length;for(;t--;){let n=e[t];if(we(n,`Missing node`),P(n))return n}return null}function F(e){return e&&Number(getComputedStyle(e).zIndex)||0}function te(e){let t=[];for(;e;)t.push(e),e=ne(e);return t}function ne(e){let{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}var re=1,ie=2,ae=4,oe=8,I=k()===`coarse`,se=[],ce=!1,le=new Map,ue=new Map,de=new Set;function fe(e,t,n,r,i){let{ownerDocument:a}=t,o={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:i},s=le.get(a)??0;return le.set(a,s+1),de.add(o),xe(),function(){ue.delete(e),de.delete(o);let t=le.get(a)??1;if(le.set(a,t-1),xe(),t===1&&le.delete(a),se.includes(o)){let e=se.indexOf(o);e>=0&&se.splice(e,1),ye(),i(`up`,!0,null)}}}function pe(e){let{target:t}=e,{x:n,y:r}=O(e);ce=!0,_e({target:t,x:n,y:r}),xe(),se.length>0&&(Se(`down`,e),e.preventDefault(),ge(t)||e.stopImmediatePropagation())}function me(e){let{x:t,y:n}=O(e);if(ce&&e.buttons===0&&(ce=!1,Se(`up`,e)),!ce){let{target:r}=e;_e({target:r,x:t,y:n})}Se(`move`,e),ye(),se.length>0&&e.preventDefault()}function he(e){let{target:t}=e,{x:n,y:r}=O(e);ue.clear(),ce=!1,se.length>0&&(e.preventDefault(),ge(t)||e.stopImmediatePropagation()),Se(`up`,e),_e({target:t,x:n,y:r}),ye(),xe()}function ge(e){let t=e;for(;t;){if(t.hasAttribute(o.resizeHandle))return!0;t=t.parentElement}return!1}function _e({target:e,x:t,y:n}){se.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),de.forEach(e=>{let{element:i,hitAreaMargins:a}=e,o=i.getBoundingClientRect(),{bottom:s,left:c,right:l,top:u}=o,d=I?a.coarse:a.fine;if(t>=c-d&&t<=l+d&&n>=u-d&&n<=s+d){if(r!==null&&document.contains(r)&&i!==r&&!i.contains(r)&&!r.contains(i)&&j(r,i)>0){let e=r,t=!1;for(;e&&!e.contains(i);){if(A(e.getBoundingClientRect(),o,!0)){t=!0;break}e=e.parentElement}if(t)return}se.push(e)}})}function ve(e,t){ue.set(e,t)}function ye(){let e=!1,t=!1;se.forEach(n=>{let{direction:r}=n;r===`horizontal`?e=!0:t=!0});let n=0;ue.forEach(e=>{n|=e}),e&&t?w(`intersection`,n):e?w(`horizontal`,n):t?w(`vertical`,n):C()}var be=new AbortController;function xe(){be.abort(),be=new AbortController;let e={capture:!0,signal:be.signal};de.size&&(ce?(se.length>0&&le.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener(`contextmenu`,he,e),r.addEventListener(`pointerleave`,me,e),r.addEventListener(`pointermove`,me,e))}),window.addEventListener(`pointerup`,he,e),window.addEventListener(`pointercancel`,he,e)):le.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener(`pointerdown`,pe,e),r.addEventListener(`pointermove`,me,e))}))}function Se(e,t){de.forEach(n=>{let{setResizeHandlerState:r}=n;r(e,se.includes(n),t)})}function Ce(){let[e,n]=t.useState(0);return t.useCallback(()=>n(e=>e+1),[])}function we(e,t){if(!e)throw console.error(t),Error(t)}function Te(e,t,n=s){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Ee(e,t,n=s){return Te(e,t,n)===0}function De(e,t,n){return Te(e,t,n)===0}function Oe(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],a=t[r];if(!De(i,a,n))return!1}return!0}function ke({panelConstraints:e,panelIndex:t,size:n}){let r=e[t];we(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,maxSize:o=100,minSize:c=0}=r;if(Te(n,c)<0)if(a){let e=(i+c)/2;n=Te(n,e)<0?i:c}else n=c;return n=Math.min(o,n),n=parseFloat(n.toFixed(s)),n}function Ae({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(De(e,0))return t;let o=[...t],[s,c]=r;we(s!=null,`Invalid first pivot index`),we(c!=null,`Invalid second pivot index`);let l=0;if(a===`keyboard`){{let r=e<0?c:s,i=n[r];we(i,`Panel constraints not found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(we(n!=null,`Previous layout not found for panel index ${r}`),De(n,a)){let t=l-n;Te(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let r=e<0?s:c,i=n[r];we(i,`No panel constraints found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(we(n!=null,`Previous layout not found for panel index ${r}`),De(n,l)){let t=n-a;Te(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}}{let r=e<0?1:-1,i=e<0?c:s,a=0;for(;;){let e=t[i];we(e!=null,`Previous layout not found for panel index ${i}`);let o=ke({panelConstraints:n,panelIndex:i,size:100})-e;if(a+=o,i+=r,i<0||i>=n.length)break}let o=Math.min(Math.abs(e),Math.abs(a));e=e<0?0-o:o}{let r=e<0?s:c;for(;r>=0&&r<n.length;){let i=Math.abs(e)-Math.abs(l),a=t[r];we(a!=null,`Previous layout not found for panel index ${r}`);let s=a-i,c=ke({panelConstraints:n,panelIndex:r,size:s});if(!De(a,c)&&(l+=a-c,o[r]=c,l.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?r--:r++}}if(Oe(i,o))return i;{let r=e<0?c:s,i=t[r];we(i!=null,`Previous layout not found for panel index ${r}`);let a=i+l,u=ke({panelConstraints:n,panelIndex:r,size:a});if(o[r]=u,!De(u,a)){let t=a-u,r=e<0?c:s;for(;r>=0&&r<n.length;){let i=o[r];we(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=ke({panelConstraints:n,panelIndex:r,size:a});if(De(i,s)||(t-=s-i,o[r]=s),De(t,0))break;e>0?r--:r++}}}return De(o.reduce((e,t)=>t+e,0),100)?o:i}function je({layout:e,panelsArray:t,pivotIndices:n}){let r=0,i=100,a=0,o=0,s=n[0];return we(s!=null,`No pivot index found`),t.forEach((e,t)=>{let{constraints:n}=e,{maxSize:c=100,minSize:l=0}=n;t===s?(r=l,i=c):(a+=l,o+=c)}),{valueMax:Math.min(i,100-a),valueMin:Math.max(r,100-o),valueNow:e[s]}}function Me(e,t=document){return Array.from(t.querySelectorAll(`[${o.resizeHandleId}][data-panel-group-id="${e}"]`))}function Ne(e,t,n=document){return Me(e,n).findIndex(e=>e.getAttribute(o.resizeHandleId)===t)??null}function Pe(e,t,n){let r=Ne(e,t,n);return r==null?[-1,-1]:[r,r+1]}function Fe(e,t=document){return t instanceof HTMLElement&&t?.dataset?.panelGroupId==e?t:t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`)||null}function Ie(e,t=document){return t.querySelector(`[${o.resizeHandleId}="${e}"]`)||null}function Le(e,t,n,r=document){let i=Ie(t,r),a=Me(e,r),o=i?a.indexOf(i):-1;return[n[o]?.id??null,n[o+1]?.id??null]}function Re({committedValuesRef:e,eagerValuesRef:n,groupId:r,layout:i,panelDataArray:a,panelGroupElement:s,setLayout:l}){t.useRef({didWarnAboutMissingResizeHandle:!1}),c(()=>{if(!s)return;let e=Me(r,s);for(let t=0;t<a.length-1;t++){let{valueMax:n,valueMin:r,valueNow:o}=je({layout:i,panelsArray:a,pivotIndices:[t,t+1]}),s=e[t];if(s!=null){let e=a[t];we(e,`No panel data found for index "${t}"`),s.setAttribute(`aria-controls`,e.id),s.setAttribute(`aria-valuemax`,``+Math.round(n)),s.setAttribute(`aria-valuemin`,``+Math.round(r)),s.setAttribute(`aria-valuenow`,o==null?``:``+Math.round(o))}}return()=>{e.forEach((e,t)=>{e.removeAttribute(`aria-controls`),e.removeAttribute(`aria-valuemax`),e.removeAttribute(`aria-valuemin`),e.removeAttribute(`aria-valuenow`)})}},[r,i,a,s]),t.useEffect(()=>{if(!s)return;let e=n.current;we(e,`Eager values not found`);let{panelDataArray:t}=e;we(Fe(r,s)!=null,`No group found for id "${r}"`);let a=Me(r,s);we(a,`No resize handles found for group id "${r}"`);let c=a.map(e=>{let n=e.getAttribute(o.resizeHandleId);we(n,`Resize handle element has no handle id attribute`);let[a,c]=Le(r,n,t,s);if(a==null||c==null)return()=>{};let u=e=>{if(!e.defaultPrevented)switch(e.key){case`Enter`:{e.preventDefault();let o=t.findIndex(e=>e.id===a);if(o>=0){let e=t[o];we(e,`No panel data found for index ${o}`);let a=i[o],{collapsedSize:c=0,collapsible:u,minSize:d=0}=e.constraints;if(a!=null&&u){let e=Ae({delta:De(a,c)?d-c:c-a,initialLayout:i,panelConstraints:t.map(e=>e.constraints),pivotIndices:Pe(r,n,s),prevLayout:i,trigger:`keyboard`});i!==e&&l(e)}}break}}};return e.addEventListener(`keydown`,u),()=>{e.removeEventListener(`keydown`,u)}});return()=>{c.forEach(e=>e())}},[s,e,n,r,i,a,l])}function ze(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Be(e,t){let n=e===`horizontal`,{x:r,y:i}=O(t);return n?r:i}function Ve(e,t,n,r,i){let a=n===`horizontal`,s=Ie(t,i);we(s,`No resize handle element found for id "${t}"`);let c=s.getAttribute(o.groupId);we(c,`Resize handle element has no group id attribute`);let{initialCursorPosition:l}=r,u=Be(n,e),d=Fe(c,i);we(d,`No group element found for id "${c}"`);let f=d.getBoundingClientRect(),p=a?f.width:f.height;return(u-l)/p*100}function He(e,t,n,r,i,a){if(T(e)){let t=n===`horizontal`,r=0;r=e.shiftKey?100:i??10;let a=0;switch(e.key){case`ArrowDown`:a=t?0:r;break;case`ArrowLeft`:a=t?-r:0;break;case`ArrowRight`:a=t?r:0;break;case`ArrowUp`:a=t?0:-r;break;case`End`:a=100;break;case`Home`:a=-100;break}return a}else return r==null?0:Ve(e,t,n,r,a)}function Ue({panelDataArray:e}){let t=Array(e.length),n=e.map(e=>e.constraints),r=0,i=100;for(let a=0;a<e.length;a++){let e=n[a];we(e,`Panel constraints not found for index ${a}`);let{defaultSize:o}=e;o!=null&&(r++,t[a]=o,i-=o)}for(let a=0;a<e.length;a++){let o=n[a];we(o,`Panel constraints not found for index ${a}`);let{defaultSize:s}=o;if(s!=null)continue;let c=e.length-r,l=i/c;r++,t[a]=l,i-=l}return t}function We(e,t,n){t.forEach((t,r)=>{let i=e[r];we(i,`Panel data not found for index ${r}`);let{callbacks:a,constraints:o,id:s}=i,{collapsedSize:c=0,collapsible:l}=o,u=n[s];if(u==null||t!==u){n[s]=t;let{onCollapse:e,onExpand:r,onResize:i}=a;i&&i(t,u),l&&(e||r)&&(r&&(u==null||Ee(u,c))&&!Ee(t,c)&&r(),e&&(u==null||!Ee(u,c))&&Ee(t,c)&&e())}})}function Ge(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Ke({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:i,precision:a=3}){let o=n[i],s;return s=o==null?e==null?`1`:e.toPrecision(a):r.length===1?`1`:o.toPrecision(a),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:`hidden`,pointerEvents:t===null?void 0:`none`}}function qe(e,t=10){let n=null;return(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function Je(e){try{if(typeof localStorage<`u`)e.getItem=e=>localStorage.getItem(e),e.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw Error(`localStorage not supported in this environment`)}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function Ye(e){return`react-resizable-panels:${e}`}function Xe(e){return e.map(e=>{let{constraints:t,id:n,idIsFromProps:r,order:i}=e;return r?n:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(`,`)}function Ze(e,t){try{let n=Ye(e),r=t.getItem(n);if(r){let e=JSON.parse(r);if(typeof e==`object`&&e)return e}}catch{}return null}function Qe(e,t,n){return(Ze(e,n)??{})[Xe(t)]??null}function L(e,t,n,r,i){let a=Ye(e),o=Xe(t),s=Ze(e,i)??{};s[o]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(a,JSON.stringify(s))}catch(e){console.error(e)}}function R({layout:e,panelConstraints:t}){let n=[...e],r=n.reduce((e,t)=>e+t,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(e=>`${e}%`).join(`, `)}`);if(!De(r,100)&&n.length>0)for(let e=0;e<t.length;e++){let t=n[e];we(t!=null,`No layout data found for index ${e}`),n[e]=100/r*t}let i=0;for(let e=0;e<t.length;e++){let r=n[e];we(r!=null,`No layout data found for index ${e}`);let a=ke({panelConstraints:t,panelIndex:e,size:r});r!=a&&(i+=r-a,n[e]=a)}if(!De(i,0))for(let e=0;e<t.length;e++){let r=n[e];we(r!=null,`No layout data found for index ${e}`);let a=r+i,o=ke({panelConstraints:t,panelIndex:e,size:a});if(r!==o&&(i-=o-r,n[e]=o,De(i,0)))break}return n}var $e=100,et={getItem:e=>(Je(et),et.getItem(e)),setItem:(e,t)=>{Je(et),et.setItem(e,t)}},tt={};function nt({autoSaveId:e=null,children:n,className:r=``,direction:i,forwardedRef:s,id:l=null,onLayout:u=null,keyboardResizeBy:d=null,storage:p=et,style:m,tagName:h=`div`,...g}){let _=f(l),v=t.useRef(null),[y,b]=t.useState(null),[x,S]=t.useState([]),C=Ce(),w=t.useRef({}),O=t.useRef(new Map),k=t.useRef(0),A=t.useRef({autoSaveId:e,direction:i,dragState:y,id:_,keyboardResizeBy:d,onLayout:u,storage:p}),j=t.useRef({layout:x,panelDataArray:[],panelDataArrayChanged:!1});t.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),t.useImperativeHandle(s,()=>({getId:()=>A.current.id,getLayout:()=>{let{layout:e}=j.current;return e},setLayout:e=>{let{onLayout:t}=A.current,{layout:n,panelDataArray:r}=j.current,i=R({layout:e,panelConstraints:r.map(e=>e.constraints)});ze(n,i)||(S(i),j.current.layout=i,t&&t(i),We(r,i,w.current))}}),[]),c(()=>{A.current.autoSaveId=e,A.current.direction=i,A.current.dragState=y,A.current.id=_,A.current.onLayout=u,A.current.storage=p}),Re({committedValuesRef:A,eagerValuesRef:j,groupId:_,layout:x,panelDataArray:j.current.panelDataArray,setLayout:S,panelGroupElement:v.current}),t.useEffect(()=>{let{panelDataArray:t}=j.current;if(e){if(x.length===0||x.length!==t.length)return;let n=tt[e];n??(n=qe(L,$e),tt[e]=n);let r=[...t],i=new Map(O.current);n(e,r,i,x,p)}},[e,x,p]),t.useEffect(()=>{});let M=t.useCallback(e=>{let{onLayout:t}=A.current,{layout:n,panelDataArray:r}=j.current;if(e.constraints.collapsible){let i=r.map(e=>e.constraints),{collapsedSize:a=0,panelSize:o,pivotIndices:s}=at(r,e,n);if(we(o!=null,`Panel size not found for panel "${e.id}"`),!Ee(o,a)){O.current.set(e.id,o);let c=Ae({delta:it(r,e)===r.length-1?o-a:a-o,initialLayout:n,panelConstraints:i,pivotIndices:s,prevLayout:n,trigger:`imperative-api`});Ge(n,c)||(S(c),j.current.layout=c,t&&t(c),We(r,c,w.current))}}},[]),N=t.useCallback((e,t)=>{let{onLayout:n}=A.current,{layout:r,panelDataArray:i}=j.current;if(e.constraints.collapsible){let a=i.map(e=>e.constraints),{collapsedSize:o=0,panelSize:s=0,minSize:c=0,pivotIndices:l}=at(i,e,r),u=t??c;if(Ee(s,o)){let t=O.current.get(e.id),o=t!=null&&t>=u?t:u,c=Ae({delta:it(i,e)===i.length-1?s-o:o-s,initialLayout:r,panelConstraints:a,pivotIndices:l,prevLayout:r,trigger:`imperative-api`});Ge(r,c)||(S(c),j.current.layout=c,n&&n(c),We(i,c,w.current))}}},[]),P=t.useCallback(e=>{let{layout:t,panelDataArray:n}=j.current,{panelSize:r}=at(n,e,t);return we(r!=null,`Panel size not found for panel "${e.id}"`),r},[]),ee=t.useCallback((e,t)=>{let{panelDataArray:n}=j.current;return Ke({defaultSize:t,dragState:y,layout:x,panelData:n,panelIndex:it(n,e)})},[y,x]),F=t.useCallback(e=>{let{layout:t,panelDataArray:n}=j.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=at(n,e,t);return we(a!=null,`Panel size not found for panel "${e.id}"`),i===!0&&Ee(a,r)},[]),te=t.useCallback(e=>{let{layout:t,panelDataArray:n}=j.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=at(n,e,t);return we(a!=null,`Panel size not found for panel "${e.id}"`),!i||Te(a,r)>0},[]),ne=t.useCallback(e=>{let{panelDataArray:t}=j.current;t.push(e),t.sort((e,t)=>{let n=e.order,r=t.order;return n==null&&r==null?0:n==null?-1:r==null?1:n-r}),j.current.panelDataArrayChanged=!0,C()},[C]);c(()=>{if(j.current.panelDataArrayChanged){j.current.panelDataArrayChanged=!1;let{autoSaveId:e,onLayout:t,storage:n}=A.current,{layout:r,panelDataArray:i}=j.current,a=null;if(e){let t=Qe(e,i,n);t&&(O.current=new Map(Object.entries(t.expandToSizes)),a=t.layout)}a??=Ue({panelDataArray:i});let o=R({layout:a,panelConstraints:i.map(e=>e.constraints)});ze(r,o)||(S(o),j.current.layout=o,t&&t(o),We(i,o,w.current))}}),c(()=>{let e=j.current;return()=>{e.layout=[]}},[]);let I=t.useCallback(e=>{let t=!1,n=v.current;return n&&window.getComputedStyle(n,null).getPropertyValue(`direction`)===`rtl`&&(t=!0),function(n){n.preventDefault();let r=v.current;if(!r)return()=>null;let{direction:i,dragState:a,id:o,keyboardResizeBy:s,onLayout:c}=A.current,{layout:l,panelDataArray:u}=j.current,{initialLayout:d}=a??{},f=Pe(o,e,r),p=He(n,e,i,a,s,r),m=i===`horizontal`;m&&t&&(p=-p);let h=u.map(e=>e.constraints),g=Ae({delta:p,initialLayout:d??l,panelConstraints:h,pivotIndices:f,prevLayout:l,trigger:T(n)?`keyboard`:`mouse-or-touch`}),_=!Ge(l,g);(E(n)||D(n))&&k.current!=p&&(k.current=p,!_&&p!==0?m?ve(e,p<0?re:ie):ve(e,p<0?ae:oe):ve(e,0)),_&&(S(g),j.current.layout=g,c&&c(g),We(u,g,w.current))}},[]),se=t.useCallback((e,t)=>{let{onLayout:n}=A.current,{layout:r,panelDataArray:i}=j.current,a=i.map(e=>e.constraints),{panelSize:o,pivotIndices:s}=at(i,e,r);we(o!=null,`Panel size not found for panel "${e.id}"`);let c=Ae({delta:it(i,e)===i.length-1?o-t:t-o,initialLayout:r,panelConstraints:a,pivotIndices:s,prevLayout:r,trigger:`imperative-api`});Ge(r,c)||(S(c),j.current.layout=c,n&&n(c),We(i,c,w.current))},[]),ce=t.useCallback((e,t)=>{let{layout:n,panelDataArray:r}=j.current,{collapsedSize:i=0,collapsible:a}=t,{collapsedSize:o=0,collapsible:s,maxSize:c=100,minSize:l=0}=e.constraints,{panelSize:u}=at(r,e,n);u!=null&&(a&&s&&Ee(u,i)?Ee(i,o)||se(e,o):u<l?se(e,l):u>c&&se(e,c))},[se]),le=t.useCallback((e,t)=>{let{direction:n}=A.current,{layout:r}=j.current;if(!v.current)return;let i=Ie(e,v.current);we(i,`Drag handle element not found for id "${e}"`);let a=Be(n,t);b({dragHandleId:e,dragHandleRect:i.getBoundingClientRect(),initialCursorPosition:a,initialLayout:r})},[]),ue=t.useCallback(()=>{b(null)},[]),de=t.useCallback(e=>{let{panelDataArray:t}=j.current,n=it(t,e);n>=0&&(t.splice(n,1),delete w.current[e.id],j.current.panelDataArrayChanged=!0,C())},[C]),fe=t.useMemo(()=>({collapsePanel:M,direction:i,dragState:y,expandPanel:N,getPanelSize:P,getPanelStyle:ee,groupId:_,isPanelCollapsed:F,isPanelExpanded:te,reevaluatePanelConstraints:ce,registerPanel:ne,registerResizeHandle:I,resizePanel:se,startDragging:le,stopDragging:ue,unregisterPanel:de,panelGroupElement:v.current}),[M,y,i,N,P,ee,_,F,te,ce,ne,I,se,le,ue,de]),pe={display:`flex`,flexDirection:i===`horizontal`?`row`:`column`,height:`100%`,overflow:`hidden`,width:`100%`};return t.createElement(a.Provider,{value:fe},t.createElement(h,{...g,children:n,className:r,id:l,ref:v,style:{...pe,...m},[o.group]:``,[o.groupDirection]:i,[o.groupId]:_}))}var rt=t.forwardRef((e,n)=>t.createElement(nt,{...e,forwardedRef:n}));nt.displayName=`PanelGroup`,rt.displayName=`forwardRef(PanelGroup)`;function it(e,t){return e.findIndex(e=>e===t||e.id===t.id)}function at(e,t,n){let r=it(e,t),i=r===e.length-1?[r-1,r]:[r,r+1],a=n[r];return{...t.constraints,panelSize:a,pivotIndices:i}}function ot({disabled:e,handleId:n,resizeHandler:r,panelGroupElement:i}){t.useEffect(()=>{if(e||r==null||i==null)return;let t=Ie(n,i);if(t==null)return;let a=e=>{if(!e.defaultPrevented)switch(e.key){case`ArrowDown`:case`ArrowLeft`:case`ArrowRight`:case`ArrowUp`:case`End`:case`Home`:e.preventDefault(),r(e);break;case`F6`:{e.preventDefault();let r=t.getAttribute(o.groupId);we(r,`No group element found for id "${r}"`);let a=Me(r,i),s=Ne(r,n,i);we(s!==null,`No resize element found for id "${n}"`),a[e.shiftKey?s>0?s-1:a.length-1:s+1<a.length?s+1:0].focus();break}}};return t.addEventListener(`keydown`,a),()=>{t.removeEventListener(`keydown`,a)}},[i,e,n,r])}function st({children:e=null,className:n=``,disabled:r=!1,hitAreaMargins:i,id:s,onBlur:l,onClick:u,onDragging:d,onFocus:p,onPointerDown:m,onPointerUp:h,style:g={},tabIndex:_=0,tagName:v=`div`,...y}){let b=t.useRef(null),x=t.useRef({onClick:u,onDragging:d,onPointerDown:m,onPointerUp:h});t.useEffect(()=>{x.current.onClick=u,x.current.onDragging=d,x.current.onPointerDown=m,x.current.onPointerUp=h});let S=t.useContext(a);if(S===null)throw Error(`PanelResizeHandle components must be rendered within a PanelGroup container`);let{direction:C,groupId:w,registerResizeHandle:T,startDragging:E,stopDragging:D,panelGroupElement:O}=S,k=f(s),[A,j]=t.useState(`inactive`),[M,N]=t.useState(!1),[P,ee]=t.useState(null),F=t.useRef({state:A});c(()=>{F.current.state=A}),t.useEffect(()=>{if(r)ee(null);else{let e=T(k);ee(()=>e)}},[r,k,T]);let te=i?.coarse??15,ne=i?.fine??5;t.useEffect(()=>{if(r||P==null)return;let e=b.current;we(e,`Element ref not attached`);let t=!1;return fe(k,e,C,{coarse:te,fine:ne},(e,n,r)=>{if(!n){j(`inactive`);return}switch(e){case`down`:{j(`drag`),t=!1,we(r,`Expected event to be defined for "down" action`),E(k,r);let{onDragging:e,onPointerDown:n}=x.current;e?.(!0),n?.();break}case`move`:{let{state:e}=F.current;t=!0,e!==`drag`&&j(`hover`),we(r,`Expected event to be defined for "move" action`),P(r);break}case`up`:{j(`hover`),D();let{onClick:e,onDragging:n,onPointerUp:r}=x.current;n?.(!1),r?.(),t||e?.();break}}})},[te,C,r,ne,T,k,P,E,D]),ot({disabled:r,handleId:k,resizeHandler:P,panelGroupElement:O});let re={touchAction:`none`,userSelect:`none`};return t.createElement(v,{...y,children:e,className:n,id:s,onBlur:()=>{N(!1),l?.()},onFocus:()=>{N(!0),p?.()},ref:b,role:`separator`,style:{...re,...g},tabIndex:_,[o.groupDirection]:C,[o.groupId]:w,[o.resizeHandle]:``,[o.resizeHandleActive]:A===`drag`?`pointer`:M?`keyboard`:void 0,[o.resizeHandleEnabled]:!r,[o.resizeHandleId]:k,[o.resizeHandleState]:A})}st.displayName=`PanelResizeHandle`,e.Panel=h,e.PanelGroup=rt,e.PanelResizeHandle=st}))(),nLe=`max-w-[180px]`;function z4({label:e,secondaryLabel:t=null,title:n,isActive:r,onSelect:i,labelMaxWidthClass:a=nLe,closeAction:o}){let s=o!==null;return(0,R.jsxs)(`div`,{className:B(`inline-flex h-7 shrink-0 items-center rounded-md text-xs transition-colors`,r?`bg-muted text-foreground`:`text-muted-foreground hover:bg-muted/60`),children:[(0,R.jsxs)(`button`,{type:`button`,onClick:i,"aria-pressed":r,title:n,className:B(`flex h-full min-w-0 items-center rounded-l-md pl-2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,s?`pr-1`:`rounded-r-md pr-2`),children:[(0,R.jsx)(`span`,{className:B(`truncate`,a),children:e}),t?(0,R.jsx)(`span`,{className:`ml-1 shrink-0 text-muted-foreground/80`,children:t}):null]}),o?(0,R.jsx)(`button`,{type:`button`,onClick:o.onClose,disabled:o.isClosing,"aria-label":o.closeLabel,title:o.closeTooltip,className:`mr-1 ml-0.5 inline-flex size-4 shrink-0 items-center justify-center rounded opacity-70 transition-opacity hover:bg-muted-foreground/15 hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-30`,children:o.isClosing?(0,R.jsx)(V,{name:`Spinner`,className:`size-3 animate-spin`}):(0,R.jsx)(V,{name:`X`,className:`size-3`})}):null]})}var rLe=`uncommitted`;function iLe(e,t){if(e===`uncommitted`)return{type:`uncommitted`};if(e)return{type:`commit`,sha:e};if(t)return{type:`all`,mergeBaseBranch:t}}function aLe(e,t={hasUncommittedChanges:!1}){let n={value:`all`,label:`All changes`},r={value:rLe,label:`Uncommitted changes`},i=e.map(e=>({value:e.sha,label:e.subject,monoPrefix:e.shortSha}));return e.length>0||t.hasUncommittedChanges?[n,...t.hasUncommittedChanges?[r]:[],...i]:[n]}function oLe(e,t,n={hasUncommittedChanges:!1}){return e?e===`uncommitted`?!n.hasUncommittedChanges:!t.some(t=>t.sha===e):!1}function sLe(e){let t=e.currentGitDiff.trim().length>0,n=b$(e.currentGitDiff),r=e.parsedGitDiffFileCount>0,i=t&&e.lastParsedGitDiffKey!==n;return{currentGitDiffKey:n,hasCurrentGitDiff:t,hasParsedGitDiffFiles:r,isAwaitingCurrentGitDiffParse:i,isPreparingGitDiff:!r&&(e.isAwaitingPrerequisites||e.isGitDiffLoading||e.isParsingGitDiffFiles||i)}}function cLe({entry:e,expectedFileCount:t}){return t>10?!0:x$(e.fileDiff)===`deleted`}function lLe({bulkCollapsePreference:e,currentCollapsedFileKeys:t,expectedFileCount:n,focusedFileKey:r,parsedGitDiffFileEntries:i,previousFileKeys:a}){if(e===`expanded-all`)return new Set;let o=new Set;for(let s of i){if(r!==null){s.key!==r&&o.add(s.key);continue}if(e===`collapsed-all`){o.add(s.key);continue}if(a.has(s.key)){t.has(s.key)&&o.add(s.key);continue}cLe({entry:s,expectedFileCount:n})&&o.add(s.key)}return o}function uLe(e){let t=b$(e.gitDiff);if(!e.isDiffPanelActive||e.gitDiff.trim().length===0)return{kind:`reset`,gitDiffKey:t,patchChunks:[]};let n=AOe(e.gitDiff);return n.length===0?{kind:`empty`,gitDiffKey:t,patchChunks:[]}:n.length<=24?{kind:`immediate`,gitDiffKey:t,patchChunks:n}:{kind:`batched`,gitDiffKey:t,patchChunks:n}}var B4=150,V4=4,dLe=6,fLe=30,pLe=70;function mLe(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function hLe({environmentId:e,gitDiffIdentity:t,expectedGitDiffFileCount:n,parsedGitDiffFileEntries:r,isDiffPanelActive:i,isParsingGitDiffFiles:a}){let o=Hte((0,L.useCallback)(e=>e(y4),[])),s=Cg(y4),c=Cg(b4),l=(0,L.useRef)(new Map),u=(0,L.useRef)(new Map),d=(0,L.useRef)(`default`),f=(0,L.useRef)(null),p=(0,L.useRef)(new Set),m=(0,L.useRef)(new Set),h=(0,L.useRef)(new Map),g=(0,L.useCallback)(e=>{let t=u.current.get(e);if(t===void 0)return;u.current.delete(e);let n=l.current.get(t);n&&(n.delete(e),n.size===0&&(window.clearTimeout(t),l.current.delete(t)))},[]),_=(0,L.useCallback)(()=>{for(let e of l.current.keys())window.clearTimeout(e);l.current.clear(),u.current.clear()},[]);(0,L.useLayoutEffect)(()=>{_(),d.current=`default`,f.current=null,p.current=new Set,m.current.clear(),s(new Set),c(new Set)},[e,t,_,s,c]),(0,L.useEffect)(()=>()=>{_(),m.current.clear()},[_]);let v=(0,L.useCallback)((e,t)=>{if(e.length===0)return;let n=[],r=new Set;for(let t of e)r.has(t)||(r.add(t),n.push(t));if(n.length===0)return;let i=Math.max(1,Math.min(t?.initialBatchSize??n.length,n.length)),a=Math.max(1,t?.batchSize??n.length),o=Math.max(0,t?.initialDelayMs??B4),s=Math.max(0,t?.batchDelayMs??B4);c(e=>{let t=new Set(e);for(let e of n)t.add(e);return t});for(let e of n)g(e);let d=(e,t)=>{let n=new Set(e),r=0;r=window.setTimeout(()=>{let e=l.current.get(r);if(e){l.current.delete(r);for(let t of e)u.current.delete(t);c(t=>{let n=!1,r=new Set(t);for(let t of e)n=r.delete(t)||n;return n?r:t})}},t),l.current.set(r,n);for(let e of n)u.current.set(e,r)};d(n.slice(0,i),o);let f=0;for(let e=i;e<n.length;e+=a){let t=o+(f+1)*s;d(n.slice(e,e+a),t),f+=1}},[g,c]);(0,L.useLayoutEffect)(()=>{if(!i)return;if(r.length===0&&!a&&n===0){p.current=new Set,m.current.clear(),s(e=>e.size===0?e:new Set),c(e=>e.size===0?e:new Set),_();return}if(r.length===0)return;let e=new Set(r.map(({key:e})=>e));f.current!==null&&!e.has(f.current)&&(f.current=null);for(let t of m.current)e.has(t)||m.current.delete(t);let t=lLe({bulkCollapsePreference:d.current,currentCollapsedFileKeys:o(),expectedFileCount:n,focusedFileKey:f.current,parsedGitDiffFileEntries:r,previousFileKeys:p.current});p.current=e,s(e=>mLe(e,t)?e:t);let l=[];for(let{key:e}of r)m.current.has(e)||(m.current.add(e),t.has(e)||l.push(e));l.length!==0&&v(l,n>10||a||l.length>V4?{initialBatchSize:V4,initialDelayMs:fLe,batchSize:dLe,batchDelayMs:pLe}:void 0)},[_,n,o,i,a,r,v,s,c]);let y=(0,L.useCallback)(e=>{d.current=`default`,f.current=null;let t=o().has(e);if(s(n=>{let r=new Set(n);return t?r.delete(e):r.add(e),r}),t){v([e]);return}g(e),c(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},[g,v,s,c,o]),b=(0,L.useCallback)(e=>{if(r.length===0)return;let t=r.map(({key:e})=>e);if(!t.includes(e))return;d.current=`default`,f.current=e,m.current.add(e);let n=o().has(e);for(let n of t)n!==e&&g(n);s(new Set(t.filter(t=>t!==e))),c(t=>{let n=!1,r=new Set(t);for(let i of t)i!==e&&(n=r.delete(i)||n);return n?r:t}),n&&v([e])},[g,o,r,v,s,c]),x=(0,L.useCallback)(()=>{if(r.length===0)return;let e=r.map(({key:e})=>e),t=o();if(e.every(e=>t.has(e))){d.current=`expanded-all`,f.current=null,s(new Set),v(e);return}d.current=`collapsed-all`,f.current=null,_(),s(new Set(e)),c(new Set)},[_,r,v,s,c,o]),S=(0,L.useCallback)((e,t)=>{if(t){h.current.set(e,t);return}h.current.delete(e)},[]);return{focusGitDiffFile:b,gitDiffFileRefs:h,queuedGitDiffFileRenderKeys:m.current,setGitDiffFileRef:S,toggleAllGitDiffFilesCollapsed:x,toggleGitDiffFileCollapsed:y}}function gLe({environmentId:e,isDiffPanelActive:t,defaultMergeBaseBranch:n}){let r=Sg(x4),i=Sg(S4),a=Cg(S4),o=Sg(y4),s=Sg(b4),c=(0,L.useRef)(null),[l,u]=(0,L.useState)(null),[d,f]=(0,L.useState)([]),[p,m]=(0,L.useState)(0),[h,g]=(0,L.useState)(!1),[_,v]=(0,L.useState)(``),y=r??n,b=(0,L.useMemo)(()=>iLe(l,y),[y,l]),{data:x}=q2(e??``,y,{enabled:!!e&&!!y&&t}),{data:S,isLoading:C,error:w}=NFe(e??``,{enabled:!!e&&t&&b!==void 0,target:b}),T=S?.mergeBaseRef??null,E=(0,L.useMemo)(()=>_Le({environmentId:e,mergeBaseRef:T,target:b}),[T,e,b]),D=S?.diff??``,O=(0,L.useMemo)(()=>IOe(d),[d]),{focusGitDiffFile:k,gitDiffFileRefs:A,queuedGitDiffFileRenderKeys:j,setGitDiffFileRef:M,toggleAllGitDiffFilesCollapsed:N,toggleGitDiffFileCollapsed:P}=hLe({environmentId:e,gitDiffIdentity:E,expectedGitDiffFileCount:p,parsedGitDiffFileEntries:O,isDiffPanelActive:t,isParsingGitDiffFiles:h}),ee=sLe({currentGitDiff:D,isAwaitingPrerequisites:t&&!!e&&b===void 0,isGitDiffLoading:C,isParsingGitDiffFiles:h,lastParsedGitDiffKey:_,parsedGitDiffFileCount:O.length});(0,L.useEffect)(()=>{let e=uLe({gitDiff:D,isDiffPanelActive:t});if(e.kind===`reset`){f([]),m(0),g(!1),v(``);return}if(f([]),m(e.patchChunks.length),e.kind===`empty`){g(!1),v(e.gitDiffKey);return}if(e.kind===`immediate`){f(y$(D)),g(!1),v(e.gitDiffKey);return}let n=e.patchChunks,r=!1,i=null,a=0,o=!1,s=()=>{if(r)return;let t=a===0?6:18,c=n.slice(a,a+t);if(c.length===0){g(!1),v(e.gitDiffKey);return}let l=jOe(c);if(!r){if(a+=c.length,f(e=>o?[...e,...l]:l),o=!0,a>=n.length||r){g(!1),v(e.gitDiffKey);return}i=window.setTimeout(s,24)}};return g(!0),s(),()=>{r=!0,i!==null&&window.clearTimeout(i)}},[D,t]),(0,L.useEffect)(()=>{u(null)},[e]),(0,L.useEffect)(()=>{a(null)},[e,a]),(0,L.useEffect)(()=>{i&&u(null)},[i]);let F=(x?.workingTree.files.length??0)>0;(0,L.useEffect)(()=>{oLe(l,x?.mergeBase?.commits??[],{hasUncommittedChanges:F})&&u(null)},[x?.mergeBase?.commits,F,l]),(0,L.useLayoutEffect)(()=>{if(!i||!t){c.current=null;return}let e=O.find(({fileDiff:e})=>LOe(e,i));if(!e){!C&&!h&&!ee.isAwaitingCurrentGitDiffParse&&a(null);return}if(c.current!==i){c.current=i,k(e.key);return}let n=o.has(e.key),r=!j.has(e.key)||s.has(e.key);n||r||(A.current.get(e.key)?.scrollIntoView({block:`start`,behavior:`instant`}),a(null))},[o,k,A,ee.isAwaitingCurrentGitDiffParse,t,C,h,s,O,i,j,a]);let te=(0,L.useMemo)(()=>x?.mergeBase?.commits??[],[x?.mergeBase?.commits]),ne=l??`all`,re=(0,L.useMemo)(()=>aLe(te,{hasUncommittedChanges:F}),[te,F]),ie=(0,L.useMemo)(()=>MOe(h?[]:d,D),[D,h,d]),{hasParsedGitDiffFiles:ae,isPreparingGitDiff:oe}=ee,I=(0,L.useCallback)(e=>{u(e===`all`?null:e)},[]),se=et(),ce=(0,L.useMemo)(()=>yLe(b,T),[b,T]);return{currentGitDiff:D,gitDiffError:w,gitDiffSelectOptions:re,gitDiffSelectValue:ne,gitDiffStats:ie,hasParsedGitDiffFiles:ae,isGitDiffLoading:C,isParsingGitDiffFiles:h,isPreparingGitDiff:oe,onGitDiffSelectionChange:I,onRequestFileContents:(0,L.useMemo)(()=>{if(!e||ce===void 0)return;let t=e,n=ce,r=vLe(n);return async(e,i)=>{let a=await se.fetchQuery({queryKey:Tme(t,n.type,r,e,i),queryFn:()=>Bpe(t,n,e,i),staleTime:5e3});return bLe(e,a.content,a.contentEncoding)}},[e,ce,se]),parsedGitDiffFileEntries:O,queuedGitDiffFileRenderKeys:j,setGitDiffFileRef:M,threadGitDiff:S,toggleAllGitDiffFilesCollapsed:N,toggleGitDiffFileCollapsed:P}}function _Le({environmentId:e,mergeBaseRef:t,target:n}){let r=e??`none`;if(!n)return`${r}:none`;switch(n.type){case`uncommitted`:return`${r}:uncommitted`;case`branch_committed`:return[r,`branch_committed`,n.mergeBaseBranch,t??`pending`].join(`:`);case`all`:return[r,`all`,n.mergeBaseBranch,t??`pending`].join(`:`);case`commit`:return`${r}:commit:${n.sha}`;default:return n}}function vLe(e){switch(e.type){case`uncommitted`:return null;case`branch_committed`:case`all`:return e.mergeBaseRef;case`commit`:return e.sha;default:return e}}function yLe(e,t){if(e)switch(e.type){case`uncommitted`:return{type:`uncommitted`};case`branch_committed`:return t?{type:`branch_committed`,mergeBaseRef:t}:void 0;case`all`:return t?{type:`all`,mergeBaseRef:t}:void 0;case`commit`:return{type:`commit`,sha:e.sha};default:return e}}function bLe(e,t,n){return n===`utf8`?{name:e,contents:t}:null}var xLe=760;function SLe({isSecondaryPanelOpen:e}){let[t,n]=(0,L.useState)(`unified`),r=Cg(_4),i=Sg(v4),a=Cg(v4),o=(0,L.useRef)(null),s=(0,L.useRef)(null),c=(0,L.useRef)(i),l=(0,L.useRef)(null),u=(0,L.useRef)(!1),d=(0,L.useCallback)(t=>{if(!e||t===void 0)return;let r=t>=xLe,i=l.current,a=i!==null&&i!==r;if(a&&u.current&&(u.current=!1),!u.current||a){let e=r?`split`:`unified`;n(t=>t===e?t:e)}l.current=r},[e,n]),f=(0,L.useRef)(e);return(0,L.useEffect)(()=>{if(f.current===e)return;f.current=e;let t=s.current;t&&(e?(t.expand(c.current),d(o.current?.getBoundingClientRect().width)):t.collapse())},[e,d]),(0,L.useEffect)(()=>{e||(u.current=!1,l.current=null)},[e]),DOe({ref:o,onResize:({width:e})=>{d(e??o.current?.getBoundingClientRect().width)}}),{gitDiffDisplayMode:t,handleGitDiffDisplayModeChange:(0,L.useCallback)(e=>{u.current=!0,n(e)},[n]),handleSecondaryPanelDragging:(0,L.useCallback)(e=>{if(r(e),e){u.current=!1;return}c.current>0&&a(c.current)},[r,a]),handleSecondaryPanelResize:(0,L.useCallback)(e=>{e<=0||(c.current=e)},[]),persistedWidthPercent:i,secondaryPanelRef:o,secondaryResizablePanelRef:s}}function CLe({value:e,options:t,onChange:n,disabled:r}){let i=t.find(t=>t.value===e),a=i?.label??e,o=i?.monoPrefix;return(0,R.jsxs)(oP,{children:[(0,R.jsx)(sP,{asChild:!0,disabled:r,children:(0,R.jsxs)(O_,{type:`button`,variant:`ghost`,size:`sm`,disabled:r,className:B(`h-8 w-full min-w-0 justify-between gap-2 rounded-lg border border-border/70 bg-transparent px-2.5 text-xs font-normal`,r&&`opacity-60`),children:[(0,R.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-2`,children:[o?(0,R.jsx)(`span`,{className:`shrink-0 font-mono text-muted-foreground`,children:o}):null,(0,R.jsx)(`span`,{className:`truncate`,children:a})]}),(0,R.jsx)(V,{name:`ChevronDown`,className:`size-3.5 shrink-0 text-muted-foreground`})]})}),(0,R.jsx)(cP,{align:`start`,className:`min-w-[var(--radix-dropdown-menu-trigger-width)] max-w-[var(--radix-popper-available-width)]`,children:t.map(t=>(0,R.jsxs)(uP,{onSelect:()=>n(t.value),className:`flex items-center justify-between gap-2`,children:[(0,R.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-2`,title:t.monoPrefix?`${t.monoPrefix} ${t.label}`:t.label,children:[t.monoPrefix?(0,R.jsx)(`span`,{className:`shrink-0 font-mono text-muted-foreground`,children:t.monoPrefix}):null,(0,R.jsx)(`span`,{className:`truncate`,children:t.label})]}),(0,R.jsx)(V,{name:`Check`,className:B(N_,t.value===e?`opacity-100`:`opacity-0`)})]},t.value))})]})}function wLe({selectionValue:e,selectionOptions:t,onSelectionChange:n,isSelectorDisabled:r,stats:i,isParsing:a,areAllFilesCollapsed:o,isCollapseAllDisabled:s,onToggleAllCollapsed:c,displayMode:l,onDisplayModeChange:u}){return(0,R.jsx)(`div`,{className:`px-4 pb-3`,children:(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,R.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,R.jsx)(CLe,{value:e,options:t,onChange:n,disabled:r})}),(0,R.jsx)(`span`,{className:`min-w-0 shrink truncate text-xs text-muted-foreground`,title:e4(i),children:t4(i)}),a?(0,R.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground`,children:[(0,R.jsx)(V,{name:`Spinner`,className:`size-3 animate-spin`}),`Parsing`]}):null,(0,R.jsxs)(`div`,{className:`ml-auto flex min-w-0 shrink-0 items-center justify-end gap-1`,children:[(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`sm`,className:`h-7 w-7 rounded-md p-0 text-muted-foreground`,onClick:c,disabled:s,"aria-label":o?`Expand all files`:`Collapse all files`,title:o?`Expand all files`:`Collapse all files`,children:o?(0,R.jsx)(V,{name:`ChevronsDown`,className:`size-3.5`}):(0,R.jsx)(V,{name:`ChevronsUp`,className:`size-3.5`})}),(0,R.jsxs)(`div`,{className:`inline-flex items-center gap-1 rounded-lg border border-border/70 p-0.5`,role:`tablist`,"aria-label":`Diff view mode`,children:[(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`sm`,className:`h-7 w-7 rounded-md p-0 text-muted-foreground`,onClick:()=>u(`unified`),"aria-label":`Stacked diff view`,"aria-pressed":l===`unified`,title:`Stacked diff view`,children:(0,R.jsx)(V,{name:`Rows2`,className:`size-3.5`})}),(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`sm`,className:`h-7 w-7 rounded-md p-0 text-muted-foreground`,onClick:()=>u(`split`),"aria-label":`Split diff view`,"aria-pressed":l===`split`,title:`Split diff view`,children:(0,R.jsx)(V,{name:`Columns2`,className:`size-3.5`})})]})]})]})})}var TLe=24,ELe=70,DLe=3,H4=`duration-[220ms] ease-[cubic-bezier(0.32,0.72,0,1)]`,U4=`min-h-0 flex-1 overflow-x-hidden overflow-y-auto`;function OLe({count:e=DLe}){return(0,R.jsx)(`div`,{className:`space-y-2 pt-2`,children:Array.from({length:e}).map((e,t)=>(0,R.jsxs)(`div`,{className:`rounded-lg border border-border/70 bg-background/70`,children:[(0,R.jsx)(`div`,{className:`border-b border-border/70 bg-card/70 px-3 py-1.5`,children:(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1.5`,children:[(0,R.jsx)(ov,{className:`size-4 shrink-0 rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-48 max-w-full rounded-sm`})]}),(0,R.jsx)(ov,{className:`h-3 w-14 shrink-0 rounded-sm`})]})}),(0,R.jsxs)(`div`,{className:`space-y-1.5 px-2.5 py-2`,children:[(0,R.jsx)(ov,{className:`h-3 w-full rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-[94%] rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-[90%] rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-[86%] rounded-sm`})]})]},`git-diff-skeleton-${t}`))})}var kLe=(0,L.memo)(function({fileKey:e,fileDiff:t,diffViewOptions:n,filePathRoot:r,onOpenFileInEditor:i,onOpenFilePreview:a,isCollapsed:o,isRendering:s,setGitDiffFileRef:c,toggleGitDiffFileCollapsed:l,onRequestFileContents:u}){return(0,R.jsx)(D$,{fileDiff:t,diffViewOptions:n,filePathRoot:r,onOpenFileInEditor:i,onOpenFilePreview:a,isCollapsed:o,onToggleCollapsed:(0,L.useCallback)(()=>{l(e)},[e,l]),stickyHeader:!0,isRendering:s,cardRef:(0,L.useCallback)(t=>{c(e,t)},[e,c]),onRequestFileContents:u})});function W4({activePanel:e,canUseGitUi:t,defaultMergeBaseBranch:n,environmentId:r,metadataContent:i,fileTabs:a,fileTabContent:o,isOpen:s,showGitDiffTab:c=!0,onPanelFocus:l,onPanelChange:u,onCollapse:d,onClose:f,workspaceRootPath:p,onOpenFileInEditor:m,onOpenFilePreview:h,renderAsDrawer:g}){let _=a?.find(e=>e.isActive)!==void 0,v=g?`X`:`PanelRight`,{gitDiffDisplayMode:y,handleGitDiffDisplayModeChange:b,handleSecondaryPanelDragging:x,handleSecondaryPanelResize:S,persistedWidthPercent:C,secondaryPanelRef:w,secondaryResizablePanelRef:T}=SLe({isSecondaryPanelOpen:s}),E=!t&&e===`git-diff`?`thread-info`:e,D=E===`git-diff`,{currentGitDiff:O,gitDiffError:k,gitDiffSelectOptions:A,gitDiffSelectValue:j,gitDiffStats:M,hasParsedGitDiffFiles:N,isGitDiffLoading:P,isParsingGitDiffFiles:ee,isPreparingGitDiff:F,onGitDiffSelectionChange:te,onRequestFileContents:ne,parsedGitDiffFileEntries:re,queuedGitDiffFileRenderKeys:ie,setGitDiffFileRef:ae,threadGitDiff:oe,toggleAllGitDiffFilesCollapsed:I,toggleGitDiffFileCollapsed:se}=gLe({environmentId:r,isDiffPanelActive:D,defaultMergeBaseBranch:n}),ce=O.trim().length>0,le=Sg(y4),ue=Sg(b4),de=(0,L.useMemo)(()=>N&&re.every(({key:e})=>le.has(e)),[le,N,re]),fe=gJ(),pe=(0,L.useMemo)(()=>({...zOe,diffStyle:y,themeType:fe}),[y,fe]),me=(0,R.jsxs)(`aside`,{ref:w,"aria-hidden":!s,onFocusCapture:e=>{let t=e.relatedTarget;t instanceof Node&&e.currentTarget.contains(t)||l()},className:B(`flex h-full min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background`,!g&&[`transition-[transform,opacity,background-color]`,H4,s?`opacity-100`:`pointer-events-none translate-x-[8%] opacity-0`]),children:[(0,R.jsxs)(`div`,{className:`bg-background`,children:[(0,R.jsxs)(`div`,{className:`flex h-12 min-w-0 items-center justify-between gap-2 px-4`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1`,role:`tablist`,"aria-label":`Secondary panel views`,children:[(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`sm`,className:`h-7 w-7 shrink-0 rounded-md p-0`,onClick:()=>u(`thread-info`),"aria-label":`Show thread info panel`,"aria-pressed":E===`thread-info`&&!_,title:`Info`,children:(0,R.jsx)(V,{name:`Info`})}),c===!1?null:(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`sm`,className:`h-7 w-7 shrink-0 rounded-md p-0`,onClick:()=>u(`git-diff`),"aria-label":`Show diff panel`,"aria-pressed":D&&!_,title:`Diff`,children:(0,R.jsx)(V,{name:`FileDiff`})}),a&&a.length>0?(0,R.jsx)(`div`,{className:`flex min-w-0 items-center gap-1 overflow-x-auto`,children:a.map(e=>(0,R.jsx)(ALe,{tab:e},e.id))}):null]}),(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:`h-7 w-7 shrink-0 rounded-md p-0`,onClick:f,"aria-label":g?`Close secondary panel`:`Hide secondary panel`,title:g?`Close secondary panel`:`Hide secondary panel`,children:(0,R.jsx)(V,{name:v})})]}),D&&!_?(0,R.jsx)(wLe,{selectionValue:j,selectionOptions:A,onSelectionChange:te,isSelectorDisabled:P||oe===void 0,stats:M,isParsing:ee,areAllFilesCollapsed:de,isCollapseAllDisabled:!N||P,onToggleAllCollapsed:I,displayMode:y,onDisplayModeChange:b}):null]}),(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden bg-background`,children:_?(0,R.jsx)(`div`,{className:B(U4,`pb-3`),children:o??(0,R.jsx)(`p`,{className:`mx-4 rounded-lg border border-dashed border-border/70 bg-background/45 px-3 py-6 text-center text-sm text-muted-foreground`,children:`No file preview content provided.`})}):D?(0,R.jsx)(`div`,{className:B(U4,`px-4 pb-3`),children:F?(0,R.jsx)(OLe,{}):k?(0,R.jsx)(`p`,{className:`rounded-lg border border-destructive/20 bg-destructive/5 px-3 py-2 text-xs text-destructive`,children:k instanceof Error?k.message:`Failed to load git diff`}):oe&&ce?(0,R.jsxs)(R.Fragment,{children:[re.length>0?(0,R.jsxs)(`div`,{className:`space-y-2`,children:[re.map(({key:e,fileDiff:t})=>(0,R.jsx)(kLe,{fileKey:e,fileDiff:t,diffViewOptions:pe,filePathRoot:p,onOpenFileInEditor:m,onOpenFilePreview:h,isCollapsed:le.has(e),isRendering:!ie.has(e)||ue.has(e),setGitDiffFileRef:ae,toggleGitDiffFileCollapsed:se,onRequestFileContents:ne},e)),ee?(0,R.jsx)(`div`,{className:`rounded-lg border border-border/70 bg-background/70 px-3 py-3`,children:(0,R.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,R.jsx)(ov,{className:`h-3 w-52 max-w-full rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-5/6 rounded-sm`})]})}):null]}):(0,R.jsx)(`pre`,{className:`overflow-auto whitespace-pre rounded-lg border border-border/70 bg-background/70 p-3 font-mono text-xs text-foreground`,children:oe.diff}),oe.truncated?(0,R.jsx)(`p`,{className:`pt-2 text-xs text-muted-foreground`,children:`Diff output was truncated for display.`}):null]}):(0,R.jsx)(`p`,{className:`rounded-lg border border-dashed border-border/70 bg-background/45 px-3 py-6 text-center text-sm text-muted-foreground`,children:`No diff to display.`})}):(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col px-4 pb-3`,children:i})})]});return g?me:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(jLe,{isOpen:s,onDragging:x}),(0,R.jsx)(R4.Panel,{ref:T,id:`thread-detail-secondary-panel`,collapsible:!0,collapsedSize:0,defaultSize:s?C:0,minSize:TLe,maxSize:ELe,onCollapse:d,onResize:S,order:2,className:B(`min-w-0 overflow-hidden transition-[flex-grow,flex-basis,opacity]`,H4,s?`opacity-100`:`opacity-0`),children:me})]})}function ALe({tab:e}){let t=e.statusLabel===null?e.filename:`${e.filename} (${e.statusLabel})`;return(0,R.jsx)(z4,{label:e.filename,secondaryLabel:e.statusLabel===null?null:`(${e.statusLabel})`,title:t,isActive:e.isActive,onSelect:e.onSelect,labelMaxWidthClass:`max-w-[160px]`,closeAction:e.isPinned?null:{onClose:e.onClose,closeLabel:`Close ${e.filename}`,closeTooltip:`Close tab`}})}function jLe({isOpen:e,onDragging:t}){let n=Sg(_4);return(0,R.jsx)(R4.PanelResizeHandle,{id:`thread-detail-secondary-panel-handle`,disabled:!e,onDragging:t,className:B(`group relative shrink-0 cursor-col-resize overflow-visible bg-transparent transition-[width,opacity,background-color] before:absolute before:inset-y-0 before:-left-1.5 before:-right-1.5 before:content-['']`,H4,e?`w-px opacity-100`:`pointer-events-none w-0 opacity-0`,n&&`bg-accent/20`),"aria-label":`Resize thread and secondary panels`,children:(0,R.jsx)(`span`,{className:B(`pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-border/70 transition-colors`,n?`bg-accent-foreground/50`:`group-hover:bg-accent-foreground/35`)})})}var G4=`file-tree-container`,K4=`data-file-tree-style`,q4=`data-file-tree-unsafe-css`,MLe=`data-file-tree-scrollbar-measure`,J4=`data-file-tree-scrollbar-gutter-measured`,NLe=`--trees-scrollbar-gutter-measured`,Y4=`header`,X4=`context-menu`,PLe=`context-menu-trigger`,Z4=typeof window>`u`?L.useEffect:L.useLayoutEffect;function FLe(e,t,n){let r=e==null?null:(0,R.jsx)(`div`,{slot:Y4,children:e}),i=t!=null&&n!=null?(0,R.jsx)(`div`,{slot:X4,children:t(n.item,n.context)}):null;return r==null&&i==null?null:(0,R.jsxs)(R.Fragment,{children:[r,i]})}function ILe(e,t){return typeof window>`u`&&t!=null?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t.shadowHtml}}),e]}):(0,R.jsx)(R.Fragment,{children:e})}function LLe(e){let t=e.shadowRoot;return t?.querySelector(`[data-file-tree-id]`)instanceof HTMLElement||t?.querySelector(`[data-file-tree-id]`)instanceof SVGElement?!0:e.querySelector(`template[shadowrootmode="open"]`)instanceof HTMLTemplateElement}function RLe(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 zLe({header:e,id:t,model:n,preloadedData:r,renderContextMenu:i,...a}){let[o,s]=(0,L.useState)(null),[c,l]=(0,L.useState)(null),u=(0,L.useRef)(n.getComposition()),d=(0,L.useRef)(n);d.current!==n&&(d.current=n,u.current=n.getComposition());let f=i!=null,p=(0,L.useCallback)(()=>{s(null)},[]),m=(0,L.useCallback)((e,t)=>{s({context:t,item:e})},[]),h=u.current,g=(0,L.useMemo)(()=>RLe(h,e,f,p,m),[h,p,m,f,e]),_=(0,L.useCallback)(e=>{l(e)},[]);(0,L.useEffect)(()=>{f||s(null)},[f]),Z4(()=>{n.setComposition(g)},[g,n]),Z4(()=>{if(c!=null)return r!=null&&LLe(c)?n.hydrate({fileTreeContainer:c}):n.render({fileTreeContainer:c}),()=>{n.unmount(),n.setComposition(h)}},[h,c,n,r]);let v=ILe(FLe(e,i,o),r),y=t??r?.id,b={"--trees-item-height":`${String(n.getItemHeight())}px`,"--trees-density-override":n.getDensityFactor(),...a.style};return(0,R.jsx)(G4,{...a,id:y,ref:_,style:b,suppressHydrationWarning:r!=null,children:v})}var Q4=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
1489
|
+
`).trim();if(t.length>0)return t.length<=P4?t:`${t.slice(0,P4-1)}...`;let n=F4(e);if(n===1){let t=e.find(e=>e.type===`localImage`||e.type===`localFile`);return t?t.type===`localFile`&&t.name?`Attachment only (${t.name})`:`Attachment only (${HIe(t.path)})`:`Attachment only (1 file)`}return n>1?`Attachment only (${n} files)`:`(empty message)`}function WIe(e){return A0(e)}function GIe({queuedMessages:e,sendDisabled:t,actionDisabled:n,processingMessageId:r,onSendImmediately:i,onEdit:a,onDelete:o}){return e.length===0?null:(0,R.jsxs)(O4,{ariaLabel:`Queued messages`,className:`overflow-hidden`,children:[(0,R.jsx)(`div`,{className:`flex items-center justify-between px-2.5 pb-1 pt-2.5`,children:(0,R.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Queued (`,e.length,`)`]})}),(0,R.jsx)(`ul`,{children:e.map((e,s)=>{let c=UIe(e.content),l=F4(e.content),u=r===e.id;return(0,R.jsx)(`li`,{className:`px-2.5 py-0.5`,children:(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,R.jsx)(`div`,{className:`p-0.5 text-muted-foreground`,children:(0,R.jsx)(V,{name:`CornerDownRight`,className:`size-3.5`})}),(0,R.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1 text-xs leading-4`,children:[(0,R.jsx)(`p`,{className:`min-w-0 truncate text-foreground`,title:c,children:c}),l>0?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`.`}),(0,R.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:l===1?`1 attachment`:`${l} attachments`})]}):null,u?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`.`}),(0,R.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`Sending...`})]}):null]})}),(0,R.jsxs)(`div`,{className:`ml-1 flex shrink-0 items-center gap-1`,children:[(0,R.jsx)(O_,{type:`button`,size:`sm`,variant:`link`,className:`h-auto px-0 pr-1 text-xs text-muted-foreground underline`,disabled:t||u,onClick:()=>i(e.id),children:u?`Sending...`:`Send now`}),(0,R.jsx)(O_,{type:`button`,size:`icon`,variant:`ghost`,className:`size-7 text-muted-foreground`,disabled:n||u,onClick:()=>a(e.id),"aria-label":`Edit queued message ${s+1}`,title:`Edit queued message`,children:(0,R.jsx)(V,{name:`Edit`,className:`size-3.5`})}),(0,R.jsx)(O_,{type:`button`,size:`icon`,variant:`ghost`,className:`size-7 text-muted-foreground hover:text-destructive`,disabled:n||u,onClick:()=>o(e.id),"aria-label":`Delete queued message ${s+1}`,title:`Delete queued message`,children:(0,R.jsx)(V,{name:`Trash2`,className:`size-3.5`})})]})]})},e.id)})})]})}async function I4(e,{successMessage:t=`Copied`,errorMessage:n=`Failed to copy`}={}){if(typeof navigator>`u`||!navigator.clipboard?.writeText)return n&&pL.error(n),!1;try{return await navigator.clipboard.writeText(e),t&&pL.success(t),!0}catch{return n&&pL.error(n),!1}}function KIe({environmentLabel:e,environmentHostLabel:t,environmentHostConnected:n,environmentIcon:r,environmentBranchName:i}){return!e&&n===void 0?null:(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 pr-1.5`,children:[e?(0,R.jsx)(b0,{label:`Environment`,value:(0,R.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,R.jsx)(`span`,{children:e}),t?(0,R.jsxs)(`span`,{className:`hidden text-muted-foreground/60 lg:inline`,children:[`· `,t]}):null,n===void 0?null:(0,R.jsx)(K0,{connected:n,className:`translate-y-px`})]}),leading:r?(0,R.jsx)(V,{name:r,className:`size-4 shrink-0`}):null,className:`h-6 shrink-0`,muted:!0}):n===void 0?null:(0,R.jsx)(K0,{connected:n}),i?(0,R.jsxs)(`button`,{type:`button`,className:`hidden min-w-0 items-center gap-1 rounded-md px-1.5 py-0.5 text-xs text-muted-foreground/75 transition-colors hover:bg-state-hover hover:text-foreground md:flex`,title:`Copy branch name: ${i}`,onClick:()=>{I4(i,{successMessage:`Branch name copied`,errorMessage:`Failed to copy branch name`})},children:[(0,R.jsx)(V,{name:`GitMerge`,className:`size-3.5 shrink-0`}),(0,R.jsx)(`span`,{className:`truncate`,children:i})]}):null]})}function qIe({visible:e,active:t=!1,onClick:n,className:r,ariaLabel:i=`Scroll to latest event`}){return(0,R.jsx)(`div`,{className:B(`flex h-0 items-center justify-center`,r),children:(0,R.jsx)(`button`,{onClick:n,className:B(`z-20 -mt-20 flex size-8 items-center justify-center rounded-full border border-foreground/20 bg-background/80 backdrop-blur-md transition-all duration-200 hover:border-foreground/30 hover:bg-background/90`,e?`translate-y-0 opacity-100`:`pointer-events-none translate-y-2 opacity-0`),"aria-label":i,type:`button`,children:t?(0,R.jsx)(JIe,{}):(0,R.jsx)(V,{name:`ArrowDown`,className:`size-4`})})})}function JIe(){return(0,R.jsxs)(`span`,{className:`flex items-center gap-0.5`,"aria-hidden":!0,children:[(0,R.jsx)(`span`,{className:`size-1 animate-typing-dot rounded-full bg-current [animation-delay:-240ms]`}),(0,R.jsx)(`span`,{className:`size-1 animate-typing-dot rounded-full bg-current [animation-delay:-120ms]`}),(0,R.jsx)(`span`,{className:`size-1 animate-typing-dot rounded-full bg-current`})]})}function YIe({active:e}){let t=q$();return t?(0,R.jsx)(qIe,{visible:!t.isAtBottom,active:e,onClick:t.scrollToBottom}):null}function XIe({onSubmit:e,submission:t,...n}){let r=q$(),i=()=>{e(),r?.scrollToBottom()},a=t?.onModifierSubmit===void 0?void 0:()=>{t.onModifierSubmit?.(),r?.scrollToBottom()},o=t===void 0?void 0:{...t,...a?{onModifierSubmit:a}:{}};return(0,R.jsx)(P0,{...n,onSubmit:i,submission:o})}var L4=68,ZIe=L4+32;function QIe({attachments:e,stack:t,composer:n,environmentSummary:r,contextWindowUsage:i,execution:a,permission:o,mentions:s,zenModeResetKey:c}){let l=n.submitMode,u=l.kind===`queue`,d=l.kind===`ready`||l.kind===`queue`,f=l.kind===`blocked`&&l.reason===`stopping`,p=l.kind===`queue`||l.kind===`stop-only`?l.onStop:void 0,m=p!==void 0,h=(0,L.useRef)(null),g=L0(h),_=n.canSteerSubmit?n.onSteerSubmit:void 0,v=(0,L.useRef)(null),[y,b]=(0,L.useState)(0);(0,L.useLayoutEffect)(()=>{let e=v.current;if(!e)return;let t=e.offsetHeight;b(e=>e===t?e:t)},[t]),(0,L.useEffect)(()=>{let e=v.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(e=>{let t=e[0];t&&b(t.contentRect.height)});return t.observe(e),()=>t.disconnect()},[]);let x=Math.max(L4,ZIe-y);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(YIe,{active:n.threadRuntimeDisplayStatus===`active`}),(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`div`,{ref:v,className:`space-y-2`,children:t}),(0,R.jsx)(XIe,{promptBoxRef:h,voice:g,minHeight:x,value:n.message,onChange:n.onChangeMessage,onSubmit:n.onSubmit,history:n.history,placeholder:n.promptPlaceholder,mentionMenuPlacement:`top`,autoFocus:!0,submission:{onStop:p,isSubmitting:n.isFollowUpSubmitting||f,disabled:!d||n.isFollowUpSubmitting,onModifierSubmit:_,title:u?`Queue follow-up (Enter)`:f?`Stopping run...`:`Submit (Enter)`,isRunning:m,mode:`enter`},mentions:s,attachments:e,zenMode:{layout:`thread`,storageKey:null,resetKey:c,resetOnSubmit:!0},footerStart:(0,R.jsx)(C0,{...a})}),(0,R.jsxs)(`div`,{className:`mt-1 flex min-h-6 items-center justify-between gap-2 pl-[15px] pr-3.5`,children:[(0,R.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-wrap items-center gap-1`,children:r}),(0,R.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,R.jsx)(X0,{value:o.value,options:o.options,onChange:o.onChange,supported:o.supported,className:`h-6`}),i?(0,R.jsx)(FAe,{usage:i}):null]})]})]})]})}function $Ie(e,t){if(e===`created`||e===`provisioning`)return t?`Hiring manager...`:`Creating thread...`;switch(e){case`waiting-for-host`:return`Host daemon disconnected`;case`host-reconnecting`:return`Waiting for host daemon to reconnect...`;case`error`:return`Retry by sending a follow-up message`;case`idle`:case`active`:return t?`Send a message. @ to mention files or threads`:`Ask for follow-up changes. @ to mention files`;default:return jD(e)}}function eLe(e){return e===`active`||e===`host-reconnecting`}function tLe({canUseGitUi:e,composerQueriesEnabled:t,composerQueriesRefetchOnMount:n,composerQueriesStaleTime:r,contextWindowUsage:i,environmentBranchName:a,environmentHostConnected:o,environmentHostLabel:s,environmentIcon:c,environmentLabel:l,isEnvironmentActionPending:u,pendingInteractions:d,onChangedFileClick:f,openThreadDiffPanel:p,projectId:m,workspaceChangedFilesSection:h,workspaceStatusPending:g,contextBannerMergeBase:_,pendingTodos:v,managedBySection:y,managerChildrenSection:b,sendMessage:x,thread:S}){let{data:C}=bje(S.id,{enabled:t,refetchOnMount:n,staleTime:r}),{data:w=[]}=xje(S.id,{enabled:t,refetchOnMount:n,staleTime:r}),{data:T=[]}=Sje(S.id,{enabled:t,refetchOnMount:n,staleTime:r}),E=bNe(),D=xNe(),O=SNe(),k=CNe(),A=_I(),j=d2({projectId:m,threadId:S.id}),M=p2(m,{threadSuggestionMode:S.type===`manager`?`all`:`managers`,currentThreadId:S.id,environmentId:S.environmentId??null}),[N,P]=(0,L.useState)(null),[ee,F]=(0,L.useState)(null),[te,ne]=(0,L.useState)(null),[re,ie]=(0,L.useState)(!1),ae=(0,L.useMemo)(()=>Z0(T),[T]),{selectedProviderId:oe,providerOptions:I,hasMultipleProviders:se,selectedProviderDisplayName:ce,selectedModel:le,setSelectedModel:ue,serviceTier:de,setServiceTier:fe,reasoningLevel:pe,setReasoningLevel:me,permissionMode:he,setPermissionMode:ge,activeModel:_e,modelOptions:ve,reasoningOptions:ye,permissionModeOptions:be,supportsPermissionModeSelection:xe,supportsServiceTier:Se,serviceTierSupportByProvider:Ce}=m0({enabled:t,environmentId:S.environmentId??void 0,scope:`thread`,resetKey:S.id,initialProviderId:S.providerId,initialModel:C?.model,initialServiceTier:C?.serviceTier,initialReasoningLevel:C?.reasoningLevel,initialPermissionMode:C?.permissionMode,initialEnvironmentSelectionValue:S.environmentId??void 0}),we=S.runtime.displayStatus,Te=we===`created`,Ee=we===`provisioning`,De=we===`waiting-for-host`,Oe=S.stopRequestedAt!==null||k.isPending&&k.variables===S.id,ke=n0(d),Ae=ke!==null,je=E.isPending||D.isPending||O.isPending||re,Me=x.isPending||u||E.isPending||re,Ne=Oe?{kind:`blocked`,reason:`stopping`}:Ae?{kind:`blocked`,reason:`pending-interaction`}:Te||Ee?{kind:`blocked`,reason:`provisioning`}:De?{kind:`stop-only`,onStop:()=>k.mutate(S.id)}:we===`active`||we===`host-reconnecting`?{kind:`queue`,onStop:()=>k.mutate(S.id)}:{kind:`ready`},Pe=Oe?`Stopping thread...`:$Ie(we,S.type===`manager`),Fe=(0,L.useMemo)(()=>({text:j.text,attachments:j.attachments}),[j.attachments,j.text]),Ie=(0,L.useMemo)(()=>k0(Fe),[Fe]),Le=Ie.length>0,Re=we===`active`&&Ne.kind===`queue`&&!Me&&!je&&(w.length>0||Le),ze=(0,L.useCallback)(async({input:e,mode:t,model:n,serviceTier:r,reasoningLevel:i,permissionMode:a})=>{if(e.length===0)return;let o=t===`steer`?{}:{...n?{model:n}:{},...r?{serviceTier:r}:{},...i?{reasoningLevel:i}:{},...a?{permissionMode:a}:{}};await x.mutateAsync({id:S.id,input:e,mode:t,...o})},[x,S.id]),Be=(0,L.useCallback)(async e=>{if(e.length===0)return;P(null);let t=[];for(let n of e)try{let e=await A.mutateAsync({projectId:m,file:n});j.addAttachment(e)}catch{t.push(n.name)}t.length>0&&P(`Failed to attach: ${t.join(`, `)}`)},[m,j,A]),Ve=(0,L.useCallback)(async()=>{let e=Fe,t=Ie;if(t.length===0)return;j.clearIfCurrentMatches(e),P(null);let n=eLe(we);try{n?await E.mutateAsync({id:S.id,input:t,model:_e?.model??le,...Se&&de?{serviceTier:de}:{},reasoningLevel:pe,permissionMode:he}):await ze({input:t,mode:`auto`,model:_e?.model??le,...Se&&de?{serviceTier:de}:{},reasoningLevel:pe,permissionMode:he})}catch(t){j.restoreIfEmpty(e),pL.error(JL({error:t,fallbackMessage:n?`Failed to queue message.`:`Failed to send follow-up.`}))}},[_e?.model,E,Fe,Ie,j,pe,he,le,ze,de,Se,S.id,we]),He=(0,L.useCallback)(async()=>{if(!Re)return;let e=Fe,t=Ie;if(!(w.length===0&&t.length===0)){ie(!0),t.length>0&&j.clearIfCurrentMatches(e),P(null);try{for(let e of w)await D.mutateAsync({id:S.id,mode:`steer`,queuedMessageId:e.id});await ze({input:t,mode:`steer`})}catch(t){j.restoreIfEmpty(e),pL.error(JL({error:t,fallbackMessage:`Failed to send steer.`}))}finally{ie(!1)}}},[Re,Fe,Ie,j,w,D,ze,S.id]),Ue=(0,L.useCallback)(e=>{w.find(t=>t.id===e)&&(ne(e),D.mutateAsync({id:S.id,mode:`auto`,queuedMessageId:e}).then(()=>{P(null)}).catch(e=>{pL.error(JL({error:e,fallbackMessage:`Failed to send queued message.`}))}).finally(()=>{ne(t=>t===e?null:t)}))},[w,D,S.id]),We=(0,L.useCallback)(e=>{let t=w.find(t=>t.id===e);t&&(ne(e),O.mutateAsync({id:S.id,queuedMessageId:e}).then(()=>{let e=WIe(t.content);j.setDraft(e),P(null)}).catch(e=>{pL.error(JL({error:e,fallbackMessage:`Failed to edit queued message.`}))}).finally(()=>{ne(t=>t===e?null:t)}))},[O,j,w,S.id]),Ge=(0,L.useCallback)(e=>{ne(e),O.mutateAsync({id:S.id,queuedMessageId:e}).catch(e=>{pL.error(JL({error:e,fallbackMessage:`Failed to delete queued message.`}))}).finally(()=>{ne(t=>t===e?null:t)})},[O,S.id]),Ke=(0,L.useCallback)(e=>{f(e)},[f]);return ke?(0,R.jsx)(DIe,{interaction:ke,threadId:S.id}):(0,R.jsx)(QIe,{attachments:{items:j.attachments,projectId:m,isAttaching:A.isPending,error:N,onAttachFiles:Be,onRemove:j.removeAttachment},stack:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(VIe,{todoSection:S.type===`manager`||!v?null:{pendingTodos:v},archivedSection:S.archivedAt===null?null:{archivedAt:S.archivedAt},managedBySection:y,managerChildrenSection:b,gitSection:h?{changedFiles:h,mergeBase:_,onPromptBannerFileClick:e?Ke:()=>{}}:null,gitSectionPending:g,expandedSection:ee,onToggleSection:e=>{F(t=>t===e?null:e)}}),(0,R.jsx)(GIe,{queuedMessages:w,sendDisabled:!(Ne.kind===`ready`||Ne.kind===`queue`)||Me||je,actionDisabled:je,processingMessageId:te,onSendImmediately:Ue,onEdit:We,onDelete:Ge})]}),composer:{history:{currentDraft:{text:j.text,attachments:j.attachments},entries:ae,onSelectEntry:j.setDraft,resetKey:S.id},isFollowUpSubmitting:Me,message:j.text,onChangeMessage:j.setText,onSteerSubmit:He,onSubmit:Ve,promptPlaceholder:Pe,canSteerSubmit:Re,submitMode:Ne,threadRuntimeDisplayStatus:we},zenModeResetKey:S.id,environmentSummary:l||o!==void 0?(0,R.jsx)(KIe,{environmentLabel:l,environmentHostLabel:s,environmentHostConnected:o,environmentIcon:c,environmentBranchName:a}):null,contextWindowUsage:i??null,execution:{provider:{options:I,selectedId:oe,hasMultiple:se,displayName:ce},model:{active:_e,selected:le,options:ve,onChange:ue},serviceTier:{value:de,onChange:fe,supported:Se,supportByProvider:Ce},reasoning:{value:pe,options:ye,onChange:me}},permission:{value:he,options:be,onChange:ge,supported:xe},mentions:{suggestions:M.suggestions,isLoading:M.isLoading,isError:M.isError,onQueryChange:M.setQuery}})}var R4=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=p();function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if(n!==`default`){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var r=n(t),i=typeof window<`u`,a=t.createContext(null);a.displayName=`PanelGroupContext`;var o={group:`data-panel-group`,groupDirection:`data-panel-group-direction`,groupId:`data-panel-group-id`,panel:`data-panel`,panelCollapsible:`data-panel-collapsible`,panelId:`data-panel-id`,panelSize:`data-panel-size`,resizeHandle:`data-resize-handle`,resizeHandleActive:`data-resize-handle-active`,resizeHandleEnabled:`data-panel-resize-handle-enabled`,resizeHandleId:`data-panel-resize-handle-id`,resizeHandleState:`data-resize-handle-state`},s=10,c=i?t.useLayoutEffect:()=>{},l=r.useId,u=typeof l==`function`?l:()=>null,d=0;function f(e=null){let n=u(),r=t.useRef(e||n||null);return r.current===null&&(r.current=``+ d++),e??r.current}function m({children:e,className:n=``,collapsedSize:r,collapsible:i,defaultSize:s,forwardedRef:l,id:u,maxSize:d,minSize:p,onCollapse:m,onExpand:h,onResize:g,order:_,style:v,tagName:y=`div`,...b}){let x=t.useContext(a);if(x===null)throw Error(`Panel components must be rendered within a PanelGroup container`);let{collapsePanel:S,expandPanel:C,getPanelSize:w,getPanelStyle:T,groupId:E,isPanelCollapsed:D,reevaluatePanelConstraints:O,registerPanel:k,resizePanel:A,unregisterPanel:j}=x,M=f(u),N=t.useRef({callbacks:{onCollapse:m,onExpand:h,onResize:g},constraints:{collapsedSize:r,collapsible:i,defaultSize:s,maxSize:d,minSize:p},id:M,idIsFromProps:u!==void 0,order:_});t.useRef({didLogMissingDefaultSizeWarning:!1}),c(()=>{let{callbacks:e,constraints:t}=N.current,n={...t};N.current.id=M,N.current.idIsFromProps=u!==void 0,N.current.order=_,e.onCollapse=m,e.onExpand=h,e.onResize=g,t.collapsedSize=r,t.collapsible=i,t.defaultSize=s,t.maxSize=d,t.minSize=p,(n.collapsedSize!==t.collapsedSize||n.collapsible!==t.collapsible||n.maxSize!==t.maxSize||n.minSize!==t.minSize)&&O(N.current,n)}),c(()=>{let e=N.current;return k(e),()=>{j(e)}},[_,M,k,j]),t.useImperativeHandle(l,()=>({collapse:()=>{S(N.current)},expand:e=>{C(N.current,e)},getId(){return M},getSize(){return w(N.current)},isCollapsed(){return D(N.current)},isExpanded(){return!D(N.current)},resize:e=>{A(N.current,e)}}),[S,C,w,D,M,A]);let P=T(N.current,s);return t.createElement(y,{...b,children:e,className:n,id:M,style:{...P,...v},[o.groupId]:E,[o.panel]:``,[o.panelCollapsible]:i||void 0,[o.panelId]:M,[o.panelSize]:parseFloat(``+P.flexGrow).toFixed(1)})}var h=t.forwardRef((e,n)=>t.createElement(m,{...e,forwardedRef:n}));m.displayName=`Panel`,h.displayName=`forwardRef(Panel)`;var g;function _(){return g}var v=null,y=!0,b=-1,x=null;function S(e,t){if(t){let e=(t&re)!==0,n=(t&ie)!==0,r=(t&ae)!==0,i=(t&oe)!==0;if(e)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}switch(e){case`horizontal`:return`ew-resize`;case`intersection`:return`move`;case`vertical`:return`ns-resize`}}function C(){x!==null&&(document.head.removeChild(x),v=null,x=null,b=-1)}function w(e,t){if(!y)return;let n=S(e,t);if(v!==n){if(v=n,x===null){x=document.createElement(`style`);let e=_();e&&x.setAttribute(`nonce`,e),document.head.appendChild(x)}if(b>=0){var r;(r=x.sheet)==null||r.removeRule(b)}b=x.sheet?.insertRule(`*{cursor: ${n} !important;}`)??-1}}function T(e){return e.type===`keydown`}function E(e){return e.type.startsWith(`pointer`)}function D(e){return e.type.startsWith(`mouse`)}function O(e){if(E(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(D(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function k(){if(typeof matchMedia==`function`)return matchMedia(`(pointer:coarse)`).matches?`coarse`:`fine`}function A(e,t,n){return n?e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y:e.x<=t.x+t.width&&e.x+e.width>=t.x&&e.y<=t.y+t.height&&e.y+e.height>=t.y}function j(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:te(e),b:te(t)},r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;we(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:F(ee(n.a)),b:F(ee(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var M=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function N(e){let t=getComputedStyle(ne(e)??e).display;return t===`flex`||t===`inline-flex`}function P(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||N(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||M.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function ee(e){let t=e.length;for(;t--;){let n=e[t];if(we(n,`Missing node`),P(n))return n}return null}function F(e){return e&&Number(getComputedStyle(e).zIndex)||0}function te(e){let t=[];for(;e;)t.push(e),e=ne(e);return t}function ne(e){let{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}var re=1,ie=2,ae=4,oe=8,I=k()===`coarse`,se=[],ce=!1,le=new Map,ue=new Map,de=new Set;function fe(e,t,n,r,i){let{ownerDocument:a}=t,o={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:i},s=le.get(a)??0;return le.set(a,s+1),de.add(o),xe(),function(){ue.delete(e),de.delete(o);let t=le.get(a)??1;if(le.set(a,t-1),xe(),t===1&&le.delete(a),se.includes(o)){let e=se.indexOf(o);e>=0&&se.splice(e,1),ye(),i(`up`,!0,null)}}}function pe(e){let{target:t}=e,{x:n,y:r}=O(e);ce=!0,_e({target:t,x:n,y:r}),xe(),se.length>0&&(Se(`down`,e),e.preventDefault(),ge(t)||e.stopImmediatePropagation())}function me(e){let{x:t,y:n}=O(e);if(ce&&e.buttons===0&&(ce=!1,Se(`up`,e)),!ce){let{target:r}=e;_e({target:r,x:t,y:n})}Se(`move`,e),ye(),se.length>0&&e.preventDefault()}function he(e){let{target:t}=e,{x:n,y:r}=O(e);ue.clear(),ce=!1,se.length>0&&(e.preventDefault(),ge(t)||e.stopImmediatePropagation()),Se(`up`,e),_e({target:t,x:n,y:r}),ye(),xe()}function ge(e){let t=e;for(;t;){if(t.hasAttribute(o.resizeHandle))return!0;t=t.parentElement}return!1}function _e({target:e,x:t,y:n}){se.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),de.forEach(e=>{let{element:i,hitAreaMargins:a}=e,o=i.getBoundingClientRect(),{bottom:s,left:c,right:l,top:u}=o,d=I?a.coarse:a.fine;if(t>=c-d&&t<=l+d&&n>=u-d&&n<=s+d){if(r!==null&&document.contains(r)&&i!==r&&!i.contains(r)&&!r.contains(i)&&j(r,i)>0){let e=r,t=!1;for(;e&&!e.contains(i);){if(A(e.getBoundingClientRect(),o,!0)){t=!0;break}e=e.parentElement}if(t)return}se.push(e)}})}function ve(e,t){ue.set(e,t)}function ye(){let e=!1,t=!1;se.forEach(n=>{let{direction:r}=n;r===`horizontal`?e=!0:t=!0});let n=0;ue.forEach(e=>{n|=e}),e&&t?w(`intersection`,n):e?w(`horizontal`,n):t?w(`vertical`,n):C()}var be=new AbortController;function xe(){be.abort(),be=new AbortController;let e={capture:!0,signal:be.signal};de.size&&(ce?(se.length>0&&le.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener(`contextmenu`,he,e),r.addEventListener(`pointerleave`,me,e),r.addEventListener(`pointermove`,me,e))}),window.addEventListener(`pointerup`,he,e),window.addEventListener(`pointercancel`,he,e)):le.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener(`pointerdown`,pe,e),r.addEventListener(`pointermove`,me,e))}))}function Se(e,t){de.forEach(n=>{let{setResizeHandlerState:r}=n;r(e,se.includes(n),t)})}function Ce(){let[e,n]=t.useState(0);return t.useCallback(()=>n(e=>e+1),[])}function we(e,t){if(!e)throw console.error(t),Error(t)}function Te(e,t,n=s){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Ee(e,t,n=s){return Te(e,t,n)===0}function De(e,t,n){return Te(e,t,n)===0}function Oe(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],a=t[r];if(!De(i,a,n))return!1}return!0}function ke({panelConstraints:e,panelIndex:t,size:n}){let r=e[t];we(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,maxSize:o=100,minSize:c=0}=r;if(Te(n,c)<0)if(a){let e=(i+c)/2;n=Te(n,e)<0?i:c}else n=c;return n=Math.min(o,n),n=parseFloat(n.toFixed(s)),n}function Ae({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(De(e,0))return t;let o=[...t],[s,c]=r;we(s!=null,`Invalid first pivot index`),we(c!=null,`Invalid second pivot index`);let l=0;if(a===`keyboard`){{let r=e<0?c:s,i=n[r];we(i,`Panel constraints not found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(we(n!=null,`Previous layout not found for panel index ${r}`),De(n,a)){let t=l-n;Te(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let r=e<0?s:c,i=n[r];we(i,`No panel constraints found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(we(n!=null,`Previous layout not found for panel index ${r}`),De(n,l)){let t=n-a;Te(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}}{let r=e<0?1:-1,i=e<0?c:s,a=0;for(;;){let e=t[i];we(e!=null,`Previous layout not found for panel index ${i}`);let o=ke({panelConstraints:n,panelIndex:i,size:100})-e;if(a+=o,i+=r,i<0||i>=n.length)break}let o=Math.min(Math.abs(e),Math.abs(a));e=e<0?0-o:o}{let r=e<0?s:c;for(;r>=0&&r<n.length;){let i=Math.abs(e)-Math.abs(l),a=t[r];we(a!=null,`Previous layout not found for panel index ${r}`);let s=a-i,c=ke({panelConstraints:n,panelIndex:r,size:s});if(!De(a,c)&&(l+=a-c,o[r]=c,l.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?r--:r++}}if(Oe(i,o))return i;{let r=e<0?c:s,i=t[r];we(i!=null,`Previous layout not found for panel index ${r}`);let a=i+l,u=ke({panelConstraints:n,panelIndex:r,size:a});if(o[r]=u,!De(u,a)){let t=a-u,r=e<0?c:s;for(;r>=0&&r<n.length;){let i=o[r];we(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=ke({panelConstraints:n,panelIndex:r,size:a});if(De(i,s)||(t-=s-i,o[r]=s),De(t,0))break;e>0?r--:r++}}}return De(o.reduce((e,t)=>t+e,0),100)?o:i}function je({layout:e,panelsArray:t,pivotIndices:n}){let r=0,i=100,a=0,o=0,s=n[0];return we(s!=null,`No pivot index found`),t.forEach((e,t)=>{let{constraints:n}=e,{maxSize:c=100,minSize:l=0}=n;t===s?(r=l,i=c):(a+=l,o+=c)}),{valueMax:Math.min(i,100-a),valueMin:Math.max(r,100-o),valueNow:e[s]}}function Me(e,t=document){return Array.from(t.querySelectorAll(`[${o.resizeHandleId}][data-panel-group-id="${e}"]`))}function Ne(e,t,n=document){return Me(e,n).findIndex(e=>e.getAttribute(o.resizeHandleId)===t)??null}function Pe(e,t,n){let r=Ne(e,t,n);return r==null?[-1,-1]:[r,r+1]}function Fe(e,t=document){return t instanceof HTMLElement&&t?.dataset?.panelGroupId==e?t:t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`)||null}function Ie(e,t=document){return t.querySelector(`[${o.resizeHandleId}="${e}"]`)||null}function Le(e,t,n,r=document){let i=Ie(t,r),a=Me(e,r),o=i?a.indexOf(i):-1;return[n[o]?.id??null,n[o+1]?.id??null]}function Re({committedValuesRef:e,eagerValuesRef:n,groupId:r,layout:i,panelDataArray:a,panelGroupElement:s,setLayout:l}){t.useRef({didWarnAboutMissingResizeHandle:!1}),c(()=>{if(!s)return;let e=Me(r,s);for(let t=0;t<a.length-1;t++){let{valueMax:n,valueMin:r,valueNow:o}=je({layout:i,panelsArray:a,pivotIndices:[t,t+1]}),s=e[t];if(s!=null){let e=a[t];we(e,`No panel data found for index "${t}"`),s.setAttribute(`aria-controls`,e.id),s.setAttribute(`aria-valuemax`,``+Math.round(n)),s.setAttribute(`aria-valuemin`,``+Math.round(r)),s.setAttribute(`aria-valuenow`,o==null?``:``+Math.round(o))}}return()=>{e.forEach((e,t)=>{e.removeAttribute(`aria-controls`),e.removeAttribute(`aria-valuemax`),e.removeAttribute(`aria-valuemin`),e.removeAttribute(`aria-valuenow`)})}},[r,i,a,s]),t.useEffect(()=>{if(!s)return;let e=n.current;we(e,`Eager values not found`);let{panelDataArray:t}=e;we(Fe(r,s)!=null,`No group found for id "${r}"`);let a=Me(r,s);we(a,`No resize handles found for group id "${r}"`);let c=a.map(e=>{let n=e.getAttribute(o.resizeHandleId);we(n,`Resize handle element has no handle id attribute`);let[a,c]=Le(r,n,t,s);if(a==null||c==null)return()=>{};let u=e=>{if(!e.defaultPrevented)switch(e.key){case`Enter`:{e.preventDefault();let o=t.findIndex(e=>e.id===a);if(o>=0){let e=t[o];we(e,`No panel data found for index ${o}`);let a=i[o],{collapsedSize:c=0,collapsible:u,minSize:d=0}=e.constraints;if(a!=null&&u){let e=Ae({delta:De(a,c)?d-c:c-a,initialLayout:i,panelConstraints:t.map(e=>e.constraints),pivotIndices:Pe(r,n,s),prevLayout:i,trigger:`keyboard`});i!==e&&l(e)}}break}}};return e.addEventListener(`keydown`,u),()=>{e.removeEventListener(`keydown`,u)}});return()=>{c.forEach(e=>e())}},[s,e,n,r,i,a,l])}function ze(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Be(e,t){let n=e===`horizontal`,{x:r,y:i}=O(t);return n?r:i}function Ve(e,t,n,r,i){let a=n===`horizontal`,s=Ie(t,i);we(s,`No resize handle element found for id "${t}"`);let c=s.getAttribute(o.groupId);we(c,`Resize handle element has no group id attribute`);let{initialCursorPosition:l}=r,u=Be(n,e),d=Fe(c,i);we(d,`No group element found for id "${c}"`);let f=d.getBoundingClientRect(),p=a?f.width:f.height;return(u-l)/p*100}function He(e,t,n,r,i,a){if(T(e)){let t=n===`horizontal`,r=0;r=e.shiftKey?100:i??10;let a=0;switch(e.key){case`ArrowDown`:a=t?0:r;break;case`ArrowLeft`:a=t?-r:0;break;case`ArrowRight`:a=t?r:0;break;case`ArrowUp`:a=t?0:-r;break;case`End`:a=100;break;case`Home`:a=-100;break}return a}else return r==null?0:Ve(e,t,n,r,a)}function Ue({panelDataArray:e}){let t=Array(e.length),n=e.map(e=>e.constraints),r=0,i=100;for(let a=0;a<e.length;a++){let e=n[a];we(e,`Panel constraints not found for index ${a}`);let{defaultSize:o}=e;o!=null&&(r++,t[a]=o,i-=o)}for(let a=0;a<e.length;a++){let o=n[a];we(o,`Panel constraints not found for index ${a}`);let{defaultSize:s}=o;if(s!=null)continue;let c=e.length-r,l=i/c;r++,t[a]=l,i-=l}return t}function We(e,t,n){t.forEach((t,r)=>{let i=e[r];we(i,`Panel data not found for index ${r}`);let{callbacks:a,constraints:o,id:s}=i,{collapsedSize:c=0,collapsible:l}=o,u=n[s];if(u==null||t!==u){n[s]=t;let{onCollapse:e,onExpand:r,onResize:i}=a;i&&i(t,u),l&&(e||r)&&(r&&(u==null||Ee(u,c))&&!Ee(t,c)&&r(),e&&(u==null||!Ee(u,c))&&Ee(t,c)&&e())}})}function Ge(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Ke({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:i,precision:a=3}){let o=n[i],s;return s=o==null?e==null?`1`:e.toPrecision(a):r.length===1?`1`:o.toPrecision(a),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:`hidden`,pointerEvents:t===null?void 0:`none`}}function qe(e,t=10){let n=null;return(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function Je(e){try{if(typeof localStorage<`u`)e.getItem=e=>localStorage.getItem(e),e.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw Error(`localStorage not supported in this environment`)}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function Ye(e){return`react-resizable-panels:${e}`}function Xe(e){return e.map(e=>{let{constraints:t,id:n,idIsFromProps:r,order:i}=e;return r?n:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(`,`)}function Ze(e,t){try{let n=Ye(e),r=t.getItem(n);if(r){let e=JSON.parse(r);if(typeof e==`object`&&e)return e}}catch{}return null}function Qe(e,t,n){return(Ze(e,n)??{})[Xe(t)]??null}function L(e,t,n,r,i){let a=Ye(e),o=Xe(t),s=Ze(e,i)??{};s[o]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(a,JSON.stringify(s))}catch(e){console.error(e)}}function R({layout:e,panelConstraints:t}){let n=[...e],r=n.reduce((e,t)=>e+t,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(e=>`${e}%`).join(`, `)}`);if(!De(r,100)&&n.length>0)for(let e=0;e<t.length;e++){let t=n[e];we(t!=null,`No layout data found for index ${e}`),n[e]=100/r*t}let i=0;for(let e=0;e<t.length;e++){let r=n[e];we(r!=null,`No layout data found for index ${e}`);let a=ke({panelConstraints:t,panelIndex:e,size:r});r!=a&&(i+=r-a,n[e]=a)}if(!De(i,0))for(let e=0;e<t.length;e++){let r=n[e];we(r!=null,`No layout data found for index ${e}`);let a=r+i,o=ke({panelConstraints:t,panelIndex:e,size:a});if(r!==o&&(i-=o-r,n[e]=o,De(i,0)))break}return n}var $e=100,et={getItem:e=>(Je(et),et.getItem(e)),setItem:(e,t)=>{Je(et),et.setItem(e,t)}},tt={};function nt({autoSaveId:e=null,children:n,className:r=``,direction:i,forwardedRef:s,id:l=null,onLayout:u=null,keyboardResizeBy:d=null,storage:p=et,style:m,tagName:h=`div`,...g}){let _=f(l),v=t.useRef(null),[y,b]=t.useState(null),[x,S]=t.useState([]),C=Ce(),w=t.useRef({}),O=t.useRef(new Map),k=t.useRef(0),A=t.useRef({autoSaveId:e,direction:i,dragState:y,id:_,keyboardResizeBy:d,onLayout:u,storage:p}),j=t.useRef({layout:x,panelDataArray:[],panelDataArrayChanged:!1});t.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),t.useImperativeHandle(s,()=>({getId:()=>A.current.id,getLayout:()=>{let{layout:e}=j.current;return e},setLayout:e=>{let{onLayout:t}=A.current,{layout:n,panelDataArray:r}=j.current,i=R({layout:e,panelConstraints:r.map(e=>e.constraints)});ze(n,i)||(S(i),j.current.layout=i,t&&t(i),We(r,i,w.current))}}),[]),c(()=>{A.current.autoSaveId=e,A.current.direction=i,A.current.dragState=y,A.current.id=_,A.current.onLayout=u,A.current.storage=p}),Re({committedValuesRef:A,eagerValuesRef:j,groupId:_,layout:x,panelDataArray:j.current.panelDataArray,setLayout:S,panelGroupElement:v.current}),t.useEffect(()=>{let{panelDataArray:t}=j.current;if(e){if(x.length===0||x.length!==t.length)return;let n=tt[e];n??(n=qe(L,$e),tt[e]=n);let r=[...t],i=new Map(O.current);n(e,r,i,x,p)}},[e,x,p]),t.useEffect(()=>{});let M=t.useCallback(e=>{let{onLayout:t}=A.current,{layout:n,panelDataArray:r}=j.current;if(e.constraints.collapsible){let i=r.map(e=>e.constraints),{collapsedSize:a=0,panelSize:o,pivotIndices:s}=at(r,e,n);if(we(o!=null,`Panel size not found for panel "${e.id}"`),!Ee(o,a)){O.current.set(e.id,o);let c=Ae({delta:it(r,e)===r.length-1?o-a:a-o,initialLayout:n,panelConstraints:i,pivotIndices:s,prevLayout:n,trigger:`imperative-api`});Ge(n,c)||(S(c),j.current.layout=c,t&&t(c),We(r,c,w.current))}}},[]),N=t.useCallback((e,t)=>{let{onLayout:n}=A.current,{layout:r,panelDataArray:i}=j.current;if(e.constraints.collapsible){let a=i.map(e=>e.constraints),{collapsedSize:o=0,panelSize:s=0,minSize:c=0,pivotIndices:l}=at(i,e,r),u=t??c;if(Ee(s,o)){let t=O.current.get(e.id),o=t!=null&&t>=u?t:u,c=Ae({delta:it(i,e)===i.length-1?s-o:o-s,initialLayout:r,panelConstraints:a,pivotIndices:l,prevLayout:r,trigger:`imperative-api`});Ge(r,c)||(S(c),j.current.layout=c,n&&n(c),We(i,c,w.current))}}},[]),P=t.useCallback(e=>{let{layout:t,panelDataArray:n}=j.current,{panelSize:r}=at(n,e,t);return we(r!=null,`Panel size not found for panel "${e.id}"`),r},[]),ee=t.useCallback((e,t)=>{let{panelDataArray:n}=j.current;return Ke({defaultSize:t,dragState:y,layout:x,panelData:n,panelIndex:it(n,e)})},[y,x]),F=t.useCallback(e=>{let{layout:t,panelDataArray:n}=j.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=at(n,e,t);return we(a!=null,`Panel size not found for panel "${e.id}"`),i===!0&&Ee(a,r)},[]),te=t.useCallback(e=>{let{layout:t,panelDataArray:n}=j.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=at(n,e,t);return we(a!=null,`Panel size not found for panel "${e.id}"`),!i||Te(a,r)>0},[]),ne=t.useCallback(e=>{let{panelDataArray:t}=j.current;t.push(e),t.sort((e,t)=>{let n=e.order,r=t.order;return n==null&&r==null?0:n==null?-1:r==null?1:n-r}),j.current.panelDataArrayChanged=!0,C()},[C]);c(()=>{if(j.current.panelDataArrayChanged){j.current.panelDataArrayChanged=!1;let{autoSaveId:e,onLayout:t,storage:n}=A.current,{layout:r,panelDataArray:i}=j.current,a=null;if(e){let t=Qe(e,i,n);t&&(O.current=new Map(Object.entries(t.expandToSizes)),a=t.layout)}a??=Ue({panelDataArray:i});let o=R({layout:a,panelConstraints:i.map(e=>e.constraints)});ze(r,o)||(S(o),j.current.layout=o,t&&t(o),We(i,o,w.current))}}),c(()=>{let e=j.current;return()=>{e.layout=[]}},[]);let I=t.useCallback(e=>{let t=!1,n=v.current;return n&&window.getComputedStyle(n,null).getPropertyValue(`direction`)===`rtl`&&(t=!0),function(n){n.preventDefault();let r=v.current;if(!r)return()=>null;let{direction:i,dragState:a,id:o,keyboardResizeBy:s,onLayout:c}=A.current,{layout:l,panelDataArray:u}=j.current,{initialLayout:d}=a??{},f=Pe(o,e,r),p=He(n,e,i,a,s,r),m=i===`horizontal`;m&&t&&(p=-p);let h=u.map(e=>e.constraints),g=Ae({delta:p,initialLayout:d??l,panelConstraints:h,pivotIndices:f,prevLayout:l,trigger:T(n)?`keyboard`:`mouse-or-touch`}),_=!Ge(l,g);(E(n)||D(n))&&k.current!=p&&(k.current=p,!_&&p!==0?m?ve(e,p<0?re:ie):ve(e,p<0?ae:oe):ve(e,0)),_&&(S(g),j.current.layout=g,c&&c(g),We(u,g,w.current))}},[]),se=t.useCallback((e,t)=>{let{onLayout:n}=A.current,{layout:r,panelDataArray:i}=j.current,a=i.map(e=>e.constraints),{panelSize:o,pivotIndices:s}=at(i,e,r);we(o!=null,`Panel size not found for panel "${e.id}"`);let c=Ae({delta:it(i,e)===i.length-1?o-t:t-o,initialLayout:r,panelConstraints:a,pivotIndices:s,prevLayout:r,trigger:`imperative-api`});Ge(r,c)||(S(c),j.current.layout=c,n&&n(c),We(i,c,w.current))},[]),ce=t.useCallback((e,t)=>{let{layout:n,panelDataArray:r}=j.current,{collapsedSize:i=0,collapsible:a}=t,{collapsedSize:o=0,collapsible:s,maxSize:c=100,minSize:l=0}=e.constraints,{panelSize:u}=at(r,e,n);u!=null&&(a&&s&&Ee(u,i)?Ee(i,o)||se(e,o):u<l?se(e,l):u>c&&se(e,c))},[se]),le=t.useCallback((e,t)=>{let{direction:n}=A.current,{layout:r}=j.current;if(!v.current)return;let i=Ie(e,v.current);we(i,`Drag handle element not found for id "${e}"`);let a=Be(n,t);b({dragHandleId:e,dragHandleRect:i.getBoundingClientRect(),initialCursorPosition:a,initialLayout:r})},[]),ue=t.useCallback(()=>{b(null)},[]),de=t.useCallback(e=>{let{panelDataArray:t}=j.current,n=it(t,e);n>=0&&(t.splice(n,1),delete w.current[e.id],j.current.panelDataArrayChanged=!0,C())},[C]),fe=t.useMemo(()=>({collapsePanel:M,direction:i,dragState:y,expandPanel:N,getPanelSize:P,getPanelStyle:ee,groupId:_,isPanelCollapsed:F,isPanelExpanded:te,reevaluatePanelConstraints:ce,registerPanel:ne,registerResizeHandle:I,resizePanel:se,startDragging:le,stopDragging:ue,unregisterPanel:de,panelGroupElement:v.current}),[M,y,i,N,P,ee,_,F,te,ce,ne,I,se,le,ue,de]),pe={display:`flex`,flexDirection:i===`horizontal`?`row`:`column`,height:`100%`,overflow:`hidden`,width:`100%`};return t.createElement(a.Provider,{value:fe},t.createElement(h,{...g,children:n,className:r,id:l,ref:v,style:{...pe,...m},[o.group]:``,[o.groupDirection]:i,[o.groupId]:_}))}var rt=t.forwardRef((e,n)=>t.createElement(nt,{...e,forwardedRef:n}));nt.displayName=`PanelGroup`,rt.displayName=`forwardRef(PanelGroup)`;function it(e,t){return e.findIndex(e=>e===t||e.id===t.id)}function at(e,t,n){let r=it(e,t),i=r===e.length-1?[r-1,r]:[r,r+1],a=n[r];return{...t.constraints,panelSize:a,pivotIndices:i}}function ot({disabled:e,handleId:n,resizeHandler:r,panelGroupElement:i}){t.useEffect(()=>{if(e||r==null||i==null)return;let t=Ie(n,i);if(t==null)return;let a=e=>{if(!e.defaultPrevented)switch(e.key){case`ArrowDown`:case`ArrowLeft`:case`ArrowRight`:case`ArrowUp`:case`End`:case`Home`:e.preventDefault(),r(e);break;case`F6`:{e.preventDefault();let r=t.getAttribute(o.groupId);we(r,`No group element found for id "${r}"`);let a=Me(r,i),s=Ne(r,n,i);we(s!==null,`No resize element found for id "${n}"`),a[e.shiftKey?s>0?s-1:a.length-1:s+1<a.length?s+1:0].focus();break}}};return t.addEventListener(`keydown`,a),()=>{t.removeEventListener(`keydown`,a)}},[i,e,n,r])}function st({children:e=null,className:n=``,disabled:r=!1,hitAreaMargins:i,id:s,onBlur:l,onClick:u,onDragging:d,onFocus:p,onPointerDown:m,onPointerUp:h,style:g={},tabIndex:_=0,tagName:v=`div`,...y}){let b=t.useRef(null),x=t.useRef({onClick:u,onDragging:d,onPointerDown:m,onPointerUp:h});t.useEffect(()=>{x.current.onClick=u,x.current.onDragging=d,x.current.onPointerDown=m,x.current.onPointerUp=h});let S=t.useContext(a);if(S===null)throw Error(`PanelResizeHandle components must be rendered within a PanelGroup container`);let{direction:C,groupId:w,registerResizeHandle:T,startDragging:E,stopDragging:D,panelGroupElement:O}=S,k=f(s),[A,j]=t.useState(`inactive`),[M,N]=t.useState(!1),[P,ee]=t.useState(null),F=t.useRef({state:A});c(()=>{F.current.state=A}),t.useEffect(()=>{if(r)ee(null);else{let e=T(k);ee(()=>e)}},[r,k,T]);let te=i?.coarse??15,ne=i?.fine??5;t.useEffect(()=>{if(r||P==null)return;let e=b.current;we(e,`Element ref not attached`);let t=!1;return fe(k,e,C,{coarse:te,fine:ne},(e,n,r)=>{if(!n){j(`inactive`);return}switch(e){case`down`:{j(`drag`),t=!1,we(r,`Expected event to be defined for "down" action`),E(k,r);let{onDragging:e,onPointerDown:n}=x.current;e?.(!0),n?.();break}case`move`:{let{state:e}=F.current;t=!0,e!==`drag`&&j(`hover`),we(r,`Expected event to be defined for "move" action`),P(r);break}case`up`:{j(`hover`),D();let{onClick:e,onDragging:n,onPointerUp:r}=x.current;n?.(!1),r?.(),t||e?.();break}}})},[te,C,r,ne,T,k,P,E,D]),ot({disabled:r,handleId:k,resizeHandler:P,panelGroupElement:O});let re={touchAction:`none`,userSelect:`none`};return t.createElement(v,{...y,children:e,className:n,id:s,onBlur:()=>{N(!1),l?.()},onFocus:()=>{N(!0),p?.()},ref:b,role:`separator`,style:{...re,...g},tabIndex:_,[o.groupDirection]:C,[o.groupId]:w,[o.resizeHandle]:``,[o.resizeHandleActive]:A===`drag`?`pointer`:M?`keyboard`:void 0,[o.resizeHandleEnabled]:!r,[o.resizeHandleId]:k,[o.resizeHandleState]:A})}st.displayName=`PanelResizeHandle`,e.Panel=h,e.PanelGroup=rt,e.PanelResizeHandle=st}))(),nLe=`max-w-[180px]`;function z4({label:e,secondaryLabel:t=null,title:n,isActive:r,onSelect:i,labelMaxWidthClass:a=nLe,closeAction:o}){let s=o!==null;return(0,R.jsxs)(`div`,{className:B(`inline-flex h-7 shrink-0 items-center rounded-md text-xs transition-colors`,r?`bg-muted text-foreground`:`text-muted-foreground hover:bg-muted/60`),children:[(0,R.jsxs)(`button`,{type:`button`,onClick:i,"aria-pressed":r,title:n,className:B(`flex h-full min-w-0 items-center rounded-l-md pl-2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,s?`pr-1`:`rounded-r-md pr-2`),children:[(0,R.jsx)(`span`,{className:B(`truncate`,a),children:e}),t?(0,R.jsx)(`span`,{className:`ml-1 shrink-0 text-muted-foreground/80`,children:t}):null]}),o?(0,R.jsx)(`button`,{type:`button`,onClick:o.onClose,disabled:o.isClosing,"aria-label":o.closeLabel,title:o.closeTooltip,className:`mr-1 ml-0.5 inline-flex size-4 shrink-0 items-center justify-center rounded opacity-70 transition-opacity hover:bg-muted-foreground/15 hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-30`,children:o.isClosing?(0,R.jsx)(V,{name:`Spinner`,className:`size-3 animate-spin`}):(0,R.jsx)(V,{name:`X`,className:`size-3`})}):null]})}var rLe=`uncommitted`;function iLe(e,t){if(e===`uncommitted`)return{type:`uncommitted`};if(e)return{type:`commit`,sha:e};if(t)return{type:`all`,mergeBaseBranch:t}}function aLe(e,t={hasUncommittedChanges:!1}){let n={value:`all`,label:`All changes`},r={value:rLe,label:`Uncommitted changes`},i=e.map(e=>({value:e.sha,label:e.subject,monoPrefix:e.shortSha}));return e.length>0||t.hasUncommittedChanges?[n,...t.hasUncommittedChanges?[r]:[],...i]:[n]}function oLe(e,t,n={hasUncommittedChanges:!1}){return e?e===`uncommitted`?!n.hasUncommittedChanges:!t.some(t=>t.sha===e):!1}function sLe(e){let t=e.currentGitDiff.trim().length>0,n=b$(e.currentGitDiff),r=e.parsedGitDiffFileCount>0,i=t&&e.lastParsedGitDiffKey!==n;return{currentGitDiffKey:n,hasCurrentGitDiff:t,hasParsedGitDiffFiles:r,isAwaitingCurrentGitDiffParse:i,isPreparingGitDiff:!r&&(e.isAwaitingPrerequisites||e.isGitDiffLoading||e.isParsingGitDiffFiles||i)}}function cLe({entry:e,expectedFileCount:t}){return t>10?!0:x$(e.fileDiff)===`deleted`}function lLe({bulkCollapsePreference:e,currentCollapsedFileKeys:t,expectedFileCount:n,focusedFileKey:r,parsedGitDiffFileEntries:i,previousFileKeys:a}){if(e===`expanded-all`)return new Set;let o=new Set;for(let s of i){if(r!==null){s.key!==r&&o.add(s.key);continue}if(e===`collapsed-all`){o.add(s.key);continue}if(a.has(s.key)){t.has(s.key)&&o.add(s.key);continue}cLe({entry:s,expectedFileCount:n})&&o.add(s.key)}return o}function uLe(e){let t=b$(e.gitDiff);if(!e.isDiffPanelActive||e.gitDiff.trim().length===0)return{kind:`reset`,gitDiffKey:t,patchChunks:[]};let n=AOe(e.gitDiff);return n.length===0?{kind:`empty`,gitDiffKey:t,patchChunks:[]}:n.length<=24?{kind:`immediate`,gitDiffKey:t,patchChunks:n}:{kind:`batched`,gitDiffKey:t,patchChunks:n}}var B4=150,V4=4,dLe=6,fLe=30,pLe=70;function mLe(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function hLe({environmentId:e,gitDiffIdentity:t,expectedGitDiffFileCount:n,parsedGitDiffFileEntries:r,isDiffPanelActive:i,isParsingGitDiffFiles:a}){let o=Hte((0,L.useCallback)(e=>e(y4),[])),s=Cg(y4),c=Cg(b4),l=(0,L.useRef)(new Map),u=(0,L.useRef)(new Map),d=(0,L.useRef)(`default`),f=(0,L.useRef)(null),p=(0,L.useRef)(new Set),m=(0,L.useRef)(new Set),h=(0,L.useRef)(new Map),g=(0,L.useCallback)(e=>{let t=u.current.get(e);if(t===void 0)return;u.current.delete(e);let n=l.current.get(t);n&&(n.delete(e),n.size===0&&(window.clearTimeout(t),l.current.delete(t)))},[]),_=(0,L.useCallback)(()=>{for(let e of l.current.keys())window.clearTimeout(e);l.current.clear(),u.current.clear()},[]);(0,L.useLayoutEffect)(()=>{_(),d.current=`default`,f.current=null,p.current=new Set,m.current.clear(),s(new Set),c(new Set)},[e,t,_,s,c]),(0,L.useEffect)(()=>()=>{_(),m.current.clear()},[_]);let v=(0,L.useCallback)((e,t)=>{if(e.length===0)return;let n=[],r=new Set;for(let t of e)r.has(t)||(r.add(t),n.push(t));if(n.length===0)return;let i=Math.max(1,Math.min(t?.initialBatchSize??n.length,n.length)),a=Math.max(1,t?.batchSize??n.length),o=Math.max(0,t?.initialDelayMs??B4),s=Math.max(0,t?.batchDelayMs??B4);c(e=>{let t=new Set(e);for(let e of n)t.add(e);return t});for(let e of n)g(e);let d=(e,t)=>{let n=new Set(e),r=0;r=window.setTimeout(()=>{let e=l.current.get(r);if(e){l.current.delete(r);for(let t of e)u.current.delete(t);c(t=>{let n=!1,r=new Set(t);for(let t of e)n=r.delete(t)||n;return n?r:t})}},t),l.current.set(r,n);for(let e of n)u.current.set(e,r)};d(n.slice(0,i),o);let f=0;for(let e=i;e<n.length;e+=a){let t=o+(f+1)*s;d(n.slice(e,e+a),t),f+=1}},[g,c]);(0,L.useLayoutEffect)(()=>{if(!i)return;if(r.length===0&&!a&&n===0){p.current=new Set,m.current.clear(),s(e=>e.size===0?e:new Set),c(e=>e.size===0?e:new Set),_();return}if(r.length===0)return;let e=new Set(r.map(({key:e})=>e));f.current!==null&&!e.has(f.current)&&(f.current=null);for(let t of m.current)e.has(t)||m.current.delete(t);let t=lLe({bulkCollapsePreference:d.current,currentCollapsedFileKeys:o(),expectedFileCount:n,focusedFileKey:f.current,parsedGitDiffFileEntries:r,previousFileKeys:p.current});p.current=e,s(e=>mLe(e,t)?e:t);let l=[];for(let{key:e}of r)m.current.has(e)||(m.current.add(e),t.has(e)||l.push(e));l.length!==0&&v(l,n>10||a||l.length>V4?{initialBatchSize:V4,initialDelayMs:fLe,batchSize:dLe,batchDelayMs:pLe}:void 0)},[_,n,o,i,a,r,v,s,c]);let y=(0,L.useCallback)(e=>{d.current=`default`,f.current=null;let t=o().has(e);if(s(n=>{let r=new Set(n);return t?r.delete(e):r.add(e),r}),t){v([e]);return}g(e),c(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},[g,v,s,c,o]),b=(0,L.useCallback)(e=>{if(r.length===0)return;let t=r.map(({key:e})=>e);if(!t.includes(e))return;d.current=`default`,f.current=e,m.current.add(e);let n=o().has(e);for(let n of t)n!==e&&g(n);s(new Set(t.filter(t=>t!==e))),c(t=>{let n=!1,r=new Set(t);for(let i of t)i!==e&&(n=r.delete(i)||n);return n?r:t}),n&&v([e])},[g,o,r,v,s,c]),x=(0,L.useCallback)(()=>{if(r.length===0)return;let e=r.map(({key:e})=>e),t=o();if(e.every(e=>t.has(e))){d.current=`expanded-all`,f.current=null,s(new Set),v(e);return}d.current=`collapsed-all`,f.current=null,_(),s(new Set(e)),c(new Set)},[_,r,v,s,c,o]),S=(0,L.useCallback)((e,t)=>{if(t){h.current.set(e,t);return}h.current.delete(e)},[]);return{focusGitDiffFile:b,gitDiffFileRefs:h,queuedGitDiffFileRenderKeys:m.current,setGitDiffFileRef:S,toggleAllGitDiffFilesCollapsed:x,toggleGitDiffFileCollapsed:y}}function gLe({environmentId:e,isDiffPanelActive:t,defaultMergeBaseBranch:n}){let r=Sg(x4),i=Sg(S4),a=Cg(S4),o=Sg(y4),s=Sg(b4),c=(0,L.useRef)(null),[l,u]=(0,L.useState)(null),[d,f]=(0,L.useState)([]),[p,m]=(0,L.useState)(0),[h,g]=(0,L.useState)(!1),[_,v]=(0,L.useState)(``),[y,b]=(0,L.useState)(null),x=r??n,S=(0,L.useMemo)(()=>iLe(l,x),[x,l]),C=(0,L.useMemo)(()=>vLe({environmentId:e,target:S}),[e,S]),{data:w}=q2(e??``,x,{enabled:!!e&&!!x&&t}),{data:T,isLoading:E,isPlaceholderData:D,error:O}=NFe(e??``,{enabled:!!e&&t&&S!==void 0,target:S});(0,L.useEffect)(()=>{if(T&&!D){b(e=>e?.requestIdentity===C&&e.response===T?e:{requestIdentity:C,response:T});return}E||b(e=>e?.requestIdentity===C?e:null)},[T,C,E,D]);let k=T&&!D?T:y?.requestIdentity===C?y.response:void 0,A=k?.mergeBaseRef??null,j=(0,L.useMemo)(()=>_Le({environmentId:e,mergeBaseRef:A,target:S}),[A,e,S]),M=k?.diff??``,N=(0,L.useMemo)(()=>IOe(d),[d]),{focusGitDiffFile:P,gitDiffFileRefs:ee,queuedGitDiffFileRenderKeys:F,setGitDiffFileRef:te,toggleAllGitDiffFilesCollapsed:ne,toggleGitDiffFileCollapsed:re}=hLe({environmentId:e,gitDiffIdentity:j,expectedGitDiffFileCount:p,parsedGitDiffFileEntries:N,isDiffPanelActive:t,isParsingGitDiffFiles:h}),ie=sLe({currentGitDiff:M,isAwaitingPrerequisites:t&&!!e&&S===void 0,isGitDiffLoading:E,isParsingGitDiffFiles:h,lastParsedGitDiffKey:_,parsedGitDiffFileCount:N.length});(0,L.useEffect)(()=>{let e=uLe({gitDiff:M,isDiffPanelActive:t});if(e.kind===`reset`){f([]),m(0),g(!1),v(``);return}if(f([]),m(e.patchChunks.length),e.kind===`empty`){g(!1),v(e.gitDiffKey);return}if(e.kind===`immediate`){f(y$(M)),g(!1),v(e.gitDiffKey);return}let n=e.patchChunks,r=!1,i=null,a=0,o=!1,s=()=>{if(r)return;let t=a===0?6:18,c=n.slice(a,a+t);if(c.length===0){g(!1),v(e.gitDiffKey);return}let l=jOe(c);if(!r){if(a+=c.length,f(e=>o?[...e,...l]:l),o=!0,a>=n.length||r){g(!1),v(e.gitDiffKey);return}i=window.setTimeout(s,24)}};return g(!0),s(),()=>{r=!0,i!==null&&window.clearTimeout(i)}},[M,t]),(0,L.useEffect)(()=>{u(null)},[e]),(0,L.useEffect)(()=>{a(null)},[e,a]),(0,L.useEffect)(()=>{i&&u(null)},[i]);let ae=(w?.workingTree.files.length??0)>0;(0,L.useEffect)(()=>{oLe(l,w?.mergeBase?.commits??[],{hasUncommittedChanges:ae})&&u(null)},[w?.mergeBase?.commits,ae,l]),(0,L.useLayoutEffect)(()=>{if(!i||!t){c.current=null;return}let e=N.find(({fileDiff:e})=>LOe(e,i));if(!e){!E&&!h&&!ie.isAwaitingCurrentGitDiffParse&&a(null);return}if(c.current!==i){c.current=i,P(e.key);return}let n=o.has(e.key),r=!F.has(e.key)||s.has(e.key);n||r||(ee.current.get(e.key)?.scrollIntoView({block:`start`,behavior:`instant`}),a(null))},[o,P,ee,ie.isAwaitingCurrentGitDiffParse,t,E,h,s,N,i,F,a]);let oe=(0,L.useMemo)(()=>w?.mergeBase?.commits??[],[w?.mergeBase?.commits]),I=l??`all`,se=(0,L.useMemo)(()=>aLe(oe,{hasUncommittedChanges:ae}),[oe,ae]),ce=(0,L.useMemo)(()=>MOe(h?[]:d,M),[M,h,d]),{hasParsedGitDiffFiles:le,isPreparingGitDiff:ue}=ie,de=(0,L.useCallback)(e=>{u(e===`all`?null:e)},[]),fe=et(),pe=(0,L.useMemo)(()=>bLe(S,A),[S,A]);return{currentGitDiff:M,gitDiffError:O,gitDiffSelectOptions:se,gitDiffSelectValue:I,gitDiffStats:ce,hasParsedGitDiffFiles:le,isGitDiffLoading:E,isParsingGitDiffFiles:h,isPreparingGitDiff:ue,onGitDiffSelectionChange:de,onRequestFileContents:(0,L.useMemo)(()=>{if(!e||pe===void 0)return;let t=e,n=pe,r=yLe(n);return async(e,i)=>{let a=await fe.fetchQuery({queryKey:Tme(t,n.type,r,e,i),queryFn:()=>Bpe(t,n,e,i),staleTime:5e3});return xLe(e,a.content,a.contentEncoding)}},[e,pe,fe]),parsedGitDiffFileEntries:N,queuedGitDiffFileRenderKeys:F,setGitDiffFileRef:te,threadGitDiff:k,toggleAllGitDiffFilesCollapsed:ne,toggleGitDiffFileCollapsed:re}}function _Le({environmentId:e,mergeBaseRef:t,target:n}){let r=e??`none`;if(!n)return`${r}:none`;switch(n.type){case`uncommitted`:return`${r}:uncommitted`;case`branch_committed`:return[r,`branch_committed`,n.mergeBaseBranch,t??`pending`].join(`:`);case`all`:return[r,`all`,n.mergeBaseBranch,t??`pending`].join(`:`);case`commit`:return`${r}:commit:${n.sha}`;default:return n}}function vLe({environmentId:e,target:t}){let n=e??`none`;if(!t)return`${n}:none`;switch(t.type){case`uncommitted`:return`${n}:uncommitted`;case`branch_committed`:return[n,`branch_committed`,t.mergeBaseBranch].join(`:`);case`all`:return[n,`all`,t.mergeBaseBranch].join(`:`);case`commit`:return`${n}:commit:${t.sha}`;default:return t}}function yLe(e){switch(e.type){case`uncommitted`:return null;case`branch_committed`:case`all`:return e.mergeBaseRef;case`commit`:return e.sha;default:return e}}function bLe(e,t){if(e)switch(e.type){case`uncommitted`:return{type:`uncommitted`};case`branch_committed`:return t?{type:`branch_committed`,mergeBaseRef:t}:void 0;case`all`:return t?{type:`all`,mergeBaseRef:t}:void 0;case`commit`:return{type:`commit`,sha:e.sha};default:return e}}function xLe(e,t,n){return n===`utf8`?{name:e,contents:t}:null}var SLe=760;function CLe({isSecondaryPanelOpen:e}){let[t,n]=(0,L.useState)(`unified`),r=Cg(_4),i=Sg(v4),a=Cg(v4),o=(0,L.useRef)(null),s=(0,L.useRef)(null),c=(0,L.useRef)(i),l=(0,L.useRef)(null),u=(0,L.useRef)(!1),d=(0,L.useCallback)(t=>{if(!e||t===void 0)return;let r=t>=SLe,i=l.current,a=i!==null&&i!==r;if(a&&u.current&&(u.current=!1),!u.current||a){let e=r?`split`:`unified`;n(t=>t===e?t:e)}l.current=r},[e,n]),f=(0,L.useRef)(e);return(0,L.useEffect)(()=>{if(f.current===e)return;f.current=e;let t=s.current;t&&(e?(t.expand(c.current),d(o.current?.getBoundingClientRect().width)):t.collapse())},[e,d]),(0,L.useEffect)(()=>{e||(u.current=!1,l.current=null)},[e]),DOe({ref:o,onResize:({width:e})=>{d(e??o.current?.getBoundingClientRect().width)}}),{gitDiffDisplayMode:t,handleGitDiffDisplayModeChange:(0,L.useCallback)(e=>{u.current=!0,n(e)},[n]),handleSecondaryPanelDragging:(0,L.useCallback)(e=>{if(r(e),e){u.current=!1;return}c.current>0&&a(c.current)},[r,a]),handleSecondaryPanelResize:(0,L.useCallback)(e=>{e<=0||(c.current=e)},[]),persistedWidthPercent:i,secondaryPanelRef:o,secondaryResizablePanelRef:s}}function wLe({value:e,options:t,onChange:n,disabled:r}){let i=t.find(t=>t.value===e),a=i?.label??e,o=i?.monoPrefix;return(0,R.jsxs)(oP,{children:[(0,R.jsx)(sP,{asChild:!0,disabled:r,children:(0,R.jsxs)(O_,{type:`button`,variant:`ghost`,size:`sm`,disabled:r,className:B(`h-8 w-full min-w-0 justify-between gap-2 rounded-lg border border-border/70 bg-transparent px-2.5 text-xs font-normal`,r&&`opacity-60`),children:[(0,R.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-2`,children:[o?(0,R.jsx)(`span`,{className:`shrink-0 font-mono text-muted-foreground`,children:o}):null,(0,R.jsx)(`span`,{className:`truncate`,children:a})]}),(0,R.jsx)(V,{name:`ChevronDown`,className:`size-3.5 shrink-0 text-muted-foreground`})]})}),(0,R.jsx)(cP,{align:`start`,className:`min-w-[var(--radix-dropdown-menu-trigger-width)] max-w-[var(--radix-popper-available-width)]`,children:t.map(t=>(0,R.jsxs)(uP,{onSelect:()=>n(t.value),className:`flex items-center justify-between gap-2`,children:[(0,R.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-2`,title:t.monoPrefix?`${t.monoPrefix} ${t.label}`:t.label,children:[t.monoPrefix?(0,R.jsx)(`span`,{className:`shrink-0 font-mono text-muted-foreground`,children:t.monoPrefix}):null,(0,R.jsx)(`span`,{className:`truncate`,children:t.label})]}),(0,R.jsx)(V,{name:`Check`,className:B(N_,t.value===e?`opacity-100`:`opacity-0`)})]},t.value))})]})}function TLe({selectionValue:e,selectionOptions:t,onSelectionChange:n,isSelectorDisabled:r,stats:i,isParsing:a,areAllFilesCollapsed:o,isCollapseAllDisabled:s,onToggleAllCollapsed:c,displayMode:l,onDisplayModeChange:u}){return(0,R.jsx)(`div`,{className:`px-4 pb-3`,children:(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,R.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,R.jsx)(wLe,{value:e,options:t,onChange:n,disabled:r})}),(0,R.jsx)(`span`,{className:`min-w-0 shrink truncate text-xs text-muted-foreground`,title:e4(i),children:t4(i)}),a?(0,R.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground`,children:[(0,R.jsx)(V,{name:`Spinner`,className:`size-3 animate-spin`}),`Parsing`]}):null,(0,R.jsxs)(`div`,{className:`ml-auto flex min-w-0 shrink-0 items-center justify-end gap-1`,children:[(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`sm`,className:`h-7 w-7 rounded-md p-0 text-muted-foreground`,onClick:c,disabled:s,"aria-label":o?`Expand all files`:`Collapse all files`,title:o?`Expand all files`:`Collapse all files`,children:o?(0,R.jsx)(V,{name:`ChevronsDown`,className:`size-3.5`}):(0,R.jsx)(V,{name:`ChevronsUp`,className:`size-3.5`})}),(0,R.jsxs)(`div`,{className:`inline-flex items-center gap-1 rounded-lg border border-border/70 p-0.5`,role:`tablist`,"aria-label":`Diff view mode`,children:[(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`sm`,className:`h-7 w-7 rounded-md p-0 text-muted-foreground`,onClick:()=>u(`unified`),"aria-label":`Stacked diff view`,"aria-pressed":l===`unified`,title:`Stacked diff view`,children:(0,R.jsx)(V,{name:`Rows2`,className:`size-3.5`})}),(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`sm`,className:`h-7 w-7 rounded-md p-0 text-muted-foreground`,onClick:()=>u(`split`),"aria-label":`Split diff view`,"aria-pressed":l===`split`,title:`Split diff view`,children:(0,R.jsx)(V,{name:`Columns2`,className:`size-3.5`})})]})]})]})})}var ELe=24,DLe=70,OLe=3,H4=`duration-[220ms] ease-[cubic-bezier(0.32,0.72,0,1)]`,U4=`min-h-0 flex-1 overflow-x-hidden overflow-y-auto`;function kLe({count:e=OLe}){return(0,R.jsx)(`div`,{className:`space-y-2 pt-2`,children:Array.from({length:e}).map((e,t)=>(0,R.jsxs)(`div`,{className:`rounded-lg border border-border/70 bg-background/70`,children:[(0,R.jsx)(`div`,{className:`border-b border-border/70 bg-card/70 px-3 py-1.5`,children:(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1.5`,children:[(0,R.jsx)(ov,{className:`size-4 shrink-0 rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-48 max-w-full rounded-sm`})]}),(0,R.jsx)(ov,{className:`h-3 w-14 shrink-0 rounded-sm`})]})}),(0,R.jsxs)(`div`,{className:`space-y-1.5 px-2.5 py-2`,children:[(0,R.jsx)(ov,{className:`h-3 w-full rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-[94%] rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-[90%] rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-[86%] rounded-sm`})]})]},`git-diff-skeleton-${t}`))})}var ALe=(0,L.memo)(function({fileKey:e,fileDiff:t,diffViewOptions:n,filePathRoot:r,onOpenFileInEditor:i,onOpenFilePreview:a,isCollapsed:o,isRendering:s,setGitDiffFileRef:c,toggleGitDiffFileCollapsed:l,onRequestFileContents:u}){return(0,R.jsx)(D$,{fileDiff:t,diffViewOptions:n,filePathRoot:r,onOpenFileInEditor:i,onOpenFilePreview:a,isCollapsed:o,onToggleCollapsed:(0,L.useCallback)(()=>{l(e)},[e,l]),stickyHeader:!0,isRendering:s,cardRef:(0,L.useCallback)(t=>{c(e,t)},[e,c]),onRequestFileContents:u})});function W4({activePanel:e,canUseGitUi:t,defaultMergeBaseBranch:n,environmentId:r,metadataContent:i,fileTabs:a,fileTabContent:o,isOpen:s,showGitDiffTab:c=!0,onPanelFocus:l,onPanelChange:u,onCollapse:d,onClose:f,workspaceRootPath:p,onOpenFileInEditor:m,onOpenFilePreview:h,renderAsDrawer:g}){let _=a?.find(e=>e.isActive)!==void 0,v=g?`X`:`PanelRight`,{gitDiffDisplayMode:y,handleGitDiffDisplayModeChange:b,handleSecondaryPanelDragging:x,handleSecondaryPanelResize:S,persistedWidthPercent:C,secondaryPanelRef:w,secondaryResizablePanelRef:T}=CLe({isSecondaryPanelOpen:s}),E=!t&&e===`git-diff`?`thread-info`:e,D=E===`git-diff`,{currentGitDiff:O,gitDiffError:k,gitDiffSelectOptions:A,gitDiffSelectValue:j,gitDiffStats:M,hasParsedGitDiffFiles:N,isGitDiffLoading:P,isParsingGitDiffFiles:ee,isPreparingGitDiff:F,onGitDiffSelectionChange:te,onRequestFileContents:ne,parsedGitDiffFileEntries:re,queuedGitDiffFileRenderKeys:ie,setGitDiffFileRef:ae,threadGitDiff:oe,toggleAllGitDiffFilesCollapsed:I,toggleGitDiffFileCollapsed:se}=gLe({environmentId:r,isDiffPanelActive:D,defaultMergeBaseBranch:n}),ce=O.trim().length>0,le=Sg(y4),ue=Sg(b4),de=(0,L.useMemo)(()=>N&&re.every(({key:e})=>le.has(e)),[le,N,re]),fe=gJ(),pe=(0,L.useMemo)(()=>({...zOe,diffStyle:y,themeType:fe}),[y,fe]),me=(0,R.jsxs)(`aside`,{ref:w,"aria-hidden":!s,onFocusCapture:e=>{let t=e.relatedTarget;t instanceof Node&&e.currentTarget.contains(t)||l()},className:B(`flex h-full min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background`,!g&&[`transition-[transform,opacity,background-color]`,H4,s?`opacity-100`:`pointer-events-none translate-x-[8%] opacity-0`]),children:[(0,R.jsxs)(`div`,{className:`bg-background`,children:[(0,R.jsxs)(`div`,{className:`flex h-12 min-w-0 items-center justify-between gap-2 px-4`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1`,role:`tablist`,"aria-label":`Secondary panel views`,children:[(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`sm`,className:`h-7 w-7 shrink-0 rounded-md p-0`,onClick:()=>u(`thread-info`),"aria-label":`Show thread info panel`,"aria-pressed":E===`thread-info`&&!_,title:`Info`,children:(0,R.jsx)(V,{name:`Info`})}),c===!1?null:(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`sm`,className:`h-7 w-7 shrink-0 rounded-md p-0`,onClick:()=>u(`git-diff`),"aria-label":`Show diff panel`,"aria-pressed":D&&!_,title:`Diff`,children:(0,R.jsx)(V,{name:`FileDiff`})}),a&&a.length>0?(0,R.jsx)(`div`,{className:`flex min-w-0 items-center gap-1 overflow-x-auto`,children:a.map(e=>(0,R.jsx)(jLe,{tab:e},e.id))}):null]}),(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:`h-7 w-7 shrink-0 rounded-md p-0`,onClick:f,"aria-label":g?`Close secondary panel`:`Hide secondary panel`,title:g?`Close secondary panel`:`Hide secondary panel`,children:(0,R.jsx)(V,{name:v})})]}),D&&!_?(0,R.jsx)(TLe,{selectionValue:j,selectionOptions:A,onSelectionChange:te,isSelectorDisabled:P||oe===void 0,stats:M,isParsing:ee,areAllFilesCollapsed:de,isCollapseAllDisabled:!N||P,onToggleAllCollapsed:I,displayMode:y,onDisplayModeChange:b}):null]}),(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden bg-background`,children:_?(0,R.jsx)(`div`,{className:B(U4,`pb-3`),children:o??(0,R.jsx)(`p`,{className:`mx-4 rounded-lg border border-dashed border-border/70 bg-background/45 px-3 py-6 text-center text-sm text-muted-foreground`,children:`No file preview content provided.`})}):D?(0,R.jsx)(`div`,{className:B(U4,`px-4 pb-3`),children:F?(0,R.jsx)(kLe,{}):k?(0,R.jsx)(`p`,{className:`rounded-lg border border-destructive/20 bg-destructive/5 px-3 py-2 text-xs text-destructive`,children:k instanceof Error?k.message:`Failed to load git diff`}):oe&&ce?(0,R.jsxs)(R.Fragment,{children:[re.length>0?(0,R.jsxs)(`div`,{className:`space-y-2`,children:[re.map(({key:e,fileDiff:t})=>(0,R.jsx)(ALe,{fileKey:e,fileDiff:t,diffViewOptions:pe,filePathRoot:p,onOpenFileInEditor:m,onOpenFilePreview:h,isCollapsed:le.has(e),isRendering:!ie.has(e)||ue.has(e),setGitDiffFileRef:ae,toggleGitDiffFileCollapsed:se,onRequestFileContents:ne},e)),ee?(0,R.jsx)(`div`,{className:`rounded-lg border border-border/70 bg-background/70 px-3 py-3`,children:(0,R.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,R.jsx)(ov,{className:`h-3 w-52 max-w-full rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-5/6 rounded-sm`})]})}):null]}):(0,R.jsx)(`pre`,{className:`overflow-auto whitespace-pre rounded-lg border border-border/70 bg-background/70 p-3 font-mono text-xs text-foreground`,children:oe.diff}),oe.truncated?(0,R.jsx)(`p`,{className:`pt-2 text-xs text-muted-foreground`,children:`Diff output was truncated for display.`}):null]}):(0,R.jsx)(`p`,{className:`rounded-lg border border-dashed border-border/70 bg-background/45 px-3 py-6 text-center text-sm text-muted-foreground`,children:`No diff to display.`})}):(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col px-4 pb-3`,children:i})})]});return g?me:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(MLe,{isOpen:s,onDragging:x}),(0,R.jsx)(R4.Panel,{ref:T,id:`thread-detail-secondary-panel`,collapsible:!0,collapsedSize:0,defaultSize:s?C:0,minSize:ELe,maxSize:DLe,onCollapse:d,onResize:S,order:2,className:B(`min-w-0 overflow-hidden transition-[flex-grow,flex-basis,opacity]`,H4,s?`opacity-100`:`opacity-0`),children:me})]})}function jLe({tab:e}){let t=e.statusLabel===null?e.filename:`${e.filename} (${e.statusLabel})`;return(0,R.jsx)(z4,{label:e.filename,secondaryLabel:e.statusLabel===null?null:`(${e.statusLabel})`,title:t,isActive:e.isActive,onSelect:e.onSelect,labelMaxWidthClass:`max-w-[160px]`,closeAction:e.isPinned?null:{onClose:e.onClose,closeLabel:`Close ${e.filename}`,closeTooltip:`Close tab`}})}function MLe({isOpen:e,onDragging:t}){let n=Sg(_4);return(0,R.jsx)(R4.PanelResizeHandle,{id:`thread-detail-secondary-panel-handle`,disabled:!e,onDragging:t,className:B(`group relative shrink-0 cursor-col-resize overflow-visible bg-transparent transition-[width,opacity,background-color] before:absolute before:inset-y-0 before:-left-1.5 before:-right-1.5 before:content-['']`,H4,e?`w-px opacity-100`:`pointer-events-none w-0 opacity-0`,n&&`bg-accent/20`),"aria-label":`Resize thread and secondary panels`,children:(0,R.jsx)(`span`,{className:B(`pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-border/70 transition-colors`,n?`bg-accent-foreground/50`:`group-hover:bg-accent-foreground/35`)})})}var G4=`file-tree-container`,K4=`data-file-tree-style`,q4=`data-file-tree-unsafe-css`,NLe=`data-file-tree-scrollbar-measure`,J4=`data-file-tree-scrollbar-gutter-measured`,PLe=`--trees-scrollbar-gutter-measured`,Y4=`header`,X4=`context-menu`,FLe=`context-menu-trigger`,Z4=typeof window>`u`?L.useEffect:L.useLayoutEffect;function ILe(e,t,n){let r=e==null?null:(0,R.jsx)(`div`,{slot:Y4,children:e}),i=t!=null&&n!=null?(0,R.jsx)(`div`,{slot:X4,children:t(n.item,n.context)}):null;return r==null&&i==null?null:(0,R.jsxs)(R.Fragment,{children:[r,i]})}function LLe(e,t){return typeof window>`u`&&t!=null?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t.shadowHtml}}),e]}):(0,R.jsx)(R.Fragment,{children:e})}function RLe(e){let t=e.shadowRoot;return t?.querySelector(`[data-file-tree-id]`)instanceof HTMLElement||t?.querySelector(`[data-file-tree-id]`)instanceof SVGElement?!0:e.querySelector(`template[shadowrootmode="open"]`)instanceof HTMLTemplateElement}function zLe(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 BLe({header:e,id:t,model:n,preloadedData:r,renderContextMenu:i,...a}){let[o,s]=(0,L.useState)(null),[c,l]=(0,L.useState)(null),u=(0,L.useRef)(n.getComposition()),d=(0,L.useRef)(n);d.current!==n&&(d.current=n,u.current=n.getComposition());let f=i!=null,p=(0,L.useCallback)(()=>{s(null)},[]),m=(0,L.useCallback)((e,t)=>{s({context:t,item:e})},[]),h=u.current,g=(0,L.useMemo)(()=>zLe(h,e,f,p,m),[h,p,m,f,e]),_=(0,L.useCallback)(e=>{l(e)},[]);(0,L.useEffect)(()=>{f||s(null)},[f]),Z4(()=>{n.setComposition(g)},[g,n]),Z4(()=>{if(c!=null)return r!=null&&RLe(c)?n.hydrate({fileTreeContainer:c}):n.render({fileTreeContainer:c}),()=>{n.unmount(),n.setComposition(h)}},[h,c,n,r]);let v=LLe(ILe(e,i,o),r),y=t??r?.id,b={"--trees-item-height":`${String(n.getItemHeight())}px`,"--trees-density-override":n.getDensityFactor(),...a.style};return(0,R.jsx)(G4,{...a,id:y,ref:_,style:b,suppressHydrationWarning:r!=null,children:v})}var Q4=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
1490
1490
|
<symbol id="file-tree-icon-chevron" viewBox="0 0 16 16">
|
|
1491
1491
|
<path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06" fill="currentcolor"/>
|
|
1492
1492
|
</symbol>
|
|
@@ -1503,68 +1503,68 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1503
1503
|
<symbol id="file-tree-icon-ellipsis" viewBox="0 0 16 16">
|
|
1504
1504
|
<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" />
|
|
1505
1505
|
</symbol>
|
|
1506
|
-
</svg>`,
|
|
1506
|
+
</svg>`,VLe=`<symbol id="file-tree-builtin-astro" viewBox="0 0 16 16">
|
|
1507
1507
|
<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"/>
|
|
1508
1508
|
<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"/>
|
|
1509
|
-
</symbol>`,
|
|
1509
|
+
</symbol>`,HLe=`<symbol id="file-tree-builtin-babel" viewBox="0 0 16 16">
|
|
1510
1510
|
<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"/>
|
|
1511
|
-
</symbol>`,
|
|
1511
|
+
</symbol>`,ULe=`<symbol id="file-tree-builtin-bash" viewBox="0 0 16 16">
|
|
1512
1512
|
<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"/>
|
|
1513
1513
|
<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"/>
|
|
1514
|
-
</symbol>`,
|
|
1514
|
+
</symbol>`,WLe=`<symbol id="file-tree-builtin-biome" viewBox="0 0 16 16">
|
|
1515
1515
|
<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"/>
|
|
1516
|
-
</symbol>`,
|
|
1516
|
+
</symbol>`,GLe=`<symbol id="file-tree-builtin-bootstrap" viewBox="0 0 16 16">
|
|
1517
1517
|
<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"/>
|
|
1518
1518
|
<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"/>
|
|
1519
|
-
</symbol>`,
|
|
1519
|
+
</symbol>`,KLe=`<symbol id="file-tree-builtin-browserslist" viewBox="0 0 16 16">
|
|
1520
1520
|
<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"/>
|
|
1521
1521
|
<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"/>
|
|
1522
1522
|
<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"/>
|
|
1523
|
-
</symbol>`,
|
|
1523
|
+
</symbol>`,qLe=`<symbol id="file-tree-builtin-bun" viewBox="0 0 16 16">
|
|
1524
1524
|
<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"/>
|
|
1525
|
-
</symbol>`,
|
|
1525
|
+
</symbol>`,JLe=`<symbol id="file-tree-builtin-claude" viewBox="0 0 16 16">
|
|
1526
1526
|
<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"/>
|
|
1527
|
-
</symbol>`,
|
|
1527
|
+
</symbol>`,YLe=`<symbol id="file-tree-builtin-css" viewBox="0 0 16 16">
|
|
1528
1528
|
<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"/>
|
|
1529
1529
|
<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"/>
|
|
1530
|
-
</symbol>`,
|
|
1530
|
+
</symbol>`,XLe=`<symbol id="file-tree-builtin-database" viewBox="0 0 16 16">
|
|
1531
1531
|
<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"/>
|
|
1532
1532
|
<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"/>
|
|
1533
1533
|
<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"/>
|
|
1534
|
-
</symbol>`,
|
|
1534
|
+
</symbol>`,ZLe=`<symbol id="file-tree-builtin-default" viewBox="0 0 16 16">
|
|
1535
1535
|
<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"/>
|
|
1536
1536
|
<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"/>
|
|
1537
|
-
</symbol>`,
|
|
1537
|
+
</symbol>`,QLe=`<symbol id="file-tree-builtin-docker" viewBox="0 0 16 16">
|
|
1538
1538
|
<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"/>
|
|
1539
1539
|
<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"/>
|
|
1540
|
-
</symbol
|
|
1540
|
+
</symbol>`,$Le=`<symbol id="file-tree-builtin-eslint" viewBox="0 0 16 16">
|
|
1541
1541
|
<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"/>
|
|
1542
1542
|
<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"/>
|
|
1543
|
-
</symbol
|
|
1543
|
+
</symbol>`,eRe=`<symbol id="file-tree-builtin-font" viewBox="0 0 16 16">
|
|
1544
1544
|
<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"/>
|
|
1545
|
-
</symbol>`,
|
|
1545
|
+
</symbol>`,tRe=`<symbol id="file-tree-builtin-git" viewBox="0 0 16 16">
|
|
1546
1546
|
<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"/>
|
|
1547
|
-
</symbol>`,
|
|
1547
|
+
</symbol>`,nRe=`<symbol id="file-tree-builtin-go" viewBox="0 0 16 16">
|
|
1548
1548
|
<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"/>
|
|
1549
|
-
</symbol>`,
|
|
1549
|
+
</symbol>`,rRe=`<symbol id="file-tree-builtin-graphql" viewBox="0 0 16 16">
|
|
1550
1550
|
<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"/>
|
|
1551
|
-
</symbol>`,
|
|
1551
|
+
</symbol>`,iRe=`<symbol id="file-tree-builtin-html" viewBox="0 0 16 16">
|
|
1552
1552
|
<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"/>
|
|
1553
1553
|
<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"/>
|
|
1554
|
-
</symbol>`,
|
|
1554
|
+
</symbol>`,aRe=`<symbol id="file-tree-builtin-image" viewBox="0 0 16 16">
|
|
1555
1555
|
<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"/>
|
|
1556
1556
|
<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"/>
|
|
1557
|
-
</symbol>`,
|
|
1557
|
+
</symbol>`,oRe=`<symbol id="file-tree-builtin-javascript" viewBox="0 0 16 16">
|
|
1558
1558
|
<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"/>
|
|
1559
1559
|
<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"/>
|
|
1560
|
-
</symbol>`,
|
|
1560
|
+
</symbol>`,sRe=`<symbol id="file-tree-builtin-json" viewBox="0 0 16 16">
|
|
1561
1561
|
<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"/>
|
|
1562
|
-
</symbol>`,
|
|
1562
|
+
</symbol>`,cRe=`<symbol id="file-tree-builtin-markdown" viewBox="0 0 16 16">
|
|
1563
1563
|
<path fill="currentColor" d="M1 12V4h2l2 2.5L7 4h2v8H7V7.5l-2 2-2-2V12zm9-3 3 3.5L16 9h-2V4h-2v5z"/>
|
|
1564
|
-
</symbol>`,
|
|
1564
|
+
</symbol>`,lRe=`<symbol id="file-tree-builtin-mcp" viewBox="0 0 16 16">
|
|
1565
1565
|
<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"/>
|
|
1566
1566
|
<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"/>
|
|
1567
|
-
</symbol>`,
|
|
1567
|
+
</symbol>`,uRe=`<symbol id="file-tree-builtin-nextjs" viewBox="0 0 16 16">
|
|
1568
1568
|
<defs>
|
|
1569
1569
|
<linearGradient id="a" x1="4.522" x2="14" y1="3.943" y2="16" gradientUnits="userSpaceOnUse">
|
|
1570
1570
|
<stop stop-color="currentColor"/>
|
|
@@ -1574,82 +1574,82 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1574
1574
|
<path fill="currentColor" d="M3 2h1.522v9.09H3z"/>
|
|
1575
1575
|
<path fill="url(#a)" d="M4.903 2 15 15.075q-.565.5-1.195.925L4.522 3.943z"/>
|
|
1576
1576
|
<path fill="currentColor" d="M12.172 2h-1.508v9.094h1.508z"/>
|
|
1577
|
-
</symbol>`,
|
|
1577
|
+
</symbol>`,dRe=`<symbol id="file-tree-builtin-npm" viewBox="0 0 16 16">
|
|
1578
1578
|
<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"/>
|
|
1579
1579
|
<path fill="currentColor" d="M10.5 13H13V3H3v10h5V5.5h2.5z"/>
|
|
1580
|
-
</symbol>`,
|
|
1580
|
+
</symbol>`,fRe=`<symbol id="file-tree-builtin-oxc" viewBox="0 0 16 16">
|
|
1581
1581
|
<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"/>
|
|
1582
|
-
</symbol>`,
|
|
1582
|
+
</symbol>`,pRe=`<symbol id="file-tree-builtin-postcss" viewBox="0 0 16 16">
|
|
1583
1583
|
<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"/>
|
|
1584
|
-
</symbol>`,
|
|
1584
|
+
</symbol>`,mRe=`<symbol id="file-tree-builtin-prettier" viewBox="0 0 16 16">
|
|
1585
1585
|
<path fill="currentColor" d="M6 12v1H4.93v-1zm1-2v1H2v-1zm6-4v1h-3V6zm-1-4v1H9V2z"/>
|
|
1586
1586
|
<path fill="currentColor" d="M11.5 10v1H8v-1zM5 6v1H2V6zm5-2v1H9V4z" opacity=".8"/>
|
|
1587
1587
|
<path fill="currentColor" d="M6 14v1H2v-1zm-.5-6v1H2V8zM13 4v1h-3V4zM4.93 2v1H2V2z" opacity=".6"/>
|
|
1588
1588
|
<path fill="currentColor" d="M4.93 12v1H2v-1zM13 8v1H9V8zM5.5 4v1H2V4zM9 2v1H4.93V2z" opacity=".4"/>
|
|
1589
|
-
</symbol>`,
|
|
1589
|
+
</symbol>`,hRe=`<symbol id="file-tree-builtin-python" viewBox="0 0 16 16">
|
|
1590
1590
|
<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"/>
|
|
1591
1591
|
<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"/>
|
|
1592
|
-
</symbol>`,
|
|
1592
|
+
</symbol>`,gRe=`<symbol id="file-tree-builtin-react" viewBox="0 0 16 16">
|
|
1593
1593
|
<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"/>
|
|
1594
1594
|
<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"/>
|
|
1595
|
-
</symbol>`,
|
|
1595
|
+
</symbol>`,_Re=`<symbol id="file-tree-builtin-ruby" viewBox="0 0 16 16">
|
|
1596
1596
|
<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"/>
|
|
1597
|
-
</symbol>`,
|
|
1597
|
+
</symbol>`,vRe=`<symbol id="file-tree-builtin-rust" viewBox="0 0 16 16">
|
|
1598
1598
|
<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"/>
|
|
1599
|
-
</symbol>`,
|
|
1599
|
+
</symbol>`,yRe=`<symbol id="file-tree-builtin-sass" viewBox="0 0 16 16">
|
|
1600
1600
|
<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"/>
|
|
1601
|
-
</symbol>`,
|
|
1601
|
+
</symbol>`,bRe=`<symbol id="file-tree-builtin-stylelint" viewBox="0 0 16 16">
|
|
1602
1602
|
<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"/>
|
|
1603
1603
|
<path fill="currentColor" d="M6.5 2.5V4l-2 1.5v-4zm5 3L9.5 4V2.5l2-1zM9 4H7V2.5h2z"/>
|
|
1604
|
-
</symbol>`,
|
|
1604
|
+
</symbol>`,xRe=`<symbol id="file-tree-builtin-svelte" viewBox="0 0 16 16">
|
|
1605
1605
|
<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"/>
|
|
1606
|
-
</symbol>`,
|
|
1606
|
+
</symbol>`,SRe=`<symbol id="file-tree-builtin-svg" viewBox="0 0 16 16">
|
|
1607
1607
|
<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"/>
|
|
1608
1608
|
<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"/>
|
|
1609
|
-
</symbol>`,
|
|
1609
|
+
</symbol>`,CRe=`<symbol id="file-tree-builtin-svgo" viewBox="0 0 16 16">
|
|
1610
1610
|
<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"/>
|
|
1611
1611
|
<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"/>
|
|
1612
|
-
</symbol>`,
|
|
1612
|
+
</symbol>`,wRe=`<symbol id="file-tree-builtin-swift" viewBox="0 0 16 16">
|
|
1613
1613
|
<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"/>
|
|
1614
|
-
</symbol>`,
|
|
1614
|
+
</symbol>`,TRe=`<symbol id="file-tree-builtin-table" viewBox="0 0 16 16">
|
|
1615
1615
|
<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"/>
|
|
1616
1616
|
<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"/>
|
|
1617
|
-
</symbol>`,
|
|
1617
|
+
</symbol>`,ERe=`<symbol id="file-tree-builtin-tailwind" viewBox="0 0 16 16">
|
|
1618
1618
|
<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"/>
|
|
1619
|
-
</symbol>`,
|
|
1619
|
+
</symbol>`,DRe=`<symbol id="file-tree-builtin-terraform" viewBox="0 0 16 16">
|
|
1620
1620
|
<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"/>
|
|
1621
|
-
</symbol>`,
|
|
1621
|
+
</symbol>`,ORe=`<symbol id="file-tree-builtin-text" viewBox="0 0 16 16">
|
|
1622
1622
|
<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"/>
|
|
1623
1623
|
<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"/>
|
|
1624
|
-
</symbol>`,
|
|
1624
|
+
</symbol>`,kRe=`<symbol id="file-tree-builtin-typescript" viewBox="0 0 16 16">
|
|
1625
1625
|
<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"/>
|
|
1626
1626
|
<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"/>
|
|
1627
|
-
</symbol>`,
|
|
1627
|
+
</symbol>`,ARe=`<symbol id="file-tree-builtin-vite" viewBox="0 0 16 16">
|
|
1628
1628
|
<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"/>
|
|
1629
|
-
</symbol>`,
|
|
1629
|
+
</symbol>`,jRe=`<symbol id="file-tree-builtin-vscode" viewBox="0 0 16 16">
|
|
1630
1630
|
<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"/>
|
|
1631
1631
|
<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"/>
|
|
1632
1632
|
<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"/>
|
|
1633
|
-
</symbol>`,
|
|
1633
|
+
</symbol>`,MRe=`<symbol id="file-tree-builtin-vue" viewBox="0 0 16 16">
|
|
1634
1634
|
<path fill="currentColor" d="M9.62 2.25 8 5.02 6.38 2.25H1l7 12 7-12z" opacity=".5"/>
|
|
1635
1635
|
<path fill="currentColor" d="M9.54 2.25 8 4.95l-1.54-2.7H4l4 7 4-7z"/>
|
|
1636
|
-
</symbol>`,
|
|
1636
|
+
</symbol>`,NRe=`<symbol id="file-tree-builtin-wasm" viewBox="0 0 16 16">
|
|
1637
1637
|
<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"/>
|
|
1638
1638
|
<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"/>
|
|
1639
1639
|
<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"/>
|
|
1640
|
-
</symbol>`,
|
|
1640
|
+
</symbol>`,PRe=`<symbol id="file-tree-builtin-webpack" viewBox="0 0 16 16">
|
|
1641
1641
|
<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"/>
|
|
1642
1642
|
<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"/>
|
|
1643
|
-
</symbol>`,
|
|
1643
|
+
</symbol>`,FRe=`<symbol id="file-tree-builtin-yml" viewBox="0 0 16 16">
|
|
1644
1644
|
<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"/>
|
|
1645
|
-
</symbol>`,
|
|
1645
|
+
</symbol>`,IRe=`<symbol id="file-tree-builtin-zig" viewBox="0 0 16 16">
|
|
1646
1646
|
<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"/>
|
|
1647
1647
|
<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"/>
|
|
1648
|
-
</symbol>`,
|
|
1648
|
+
</symbol>`,LRe=[ULe,YLe,XLe,ZLe,eRe,tRe,nRe,iRe,aRe,oRe,sRe,cRe,lRe,hRe,_Re,vRe,wRe,TRe,ORe,kRe,`<symbol id="file-tree-builtin-zip" viewBox="0 0 16 16">
|
|
1649
1649
|
<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"/>
|
|
1650
1650
|
<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"/>
|
|
1651
|
-
</symbol>`],
|
|
1652
|
-
`)}\n</svg>`)}var e3=$4(Q4,
|
|
1651
|
+
</symbol>`],RRe=[VLe,HLe,WLe,GLe,KLe,qLe,JLe,QLe,$Le,rRe,uRe,dRe,fRe,pRe,mRe,gRe,yRe,bRe,xRe,SRe,CRe,ERe,DRe,ARe,jRe,MRe,NRe,PRe,FRe,IRe];function $4(e,t){return t.length===0?e:e.replace(`</svg>`,`\n ${t.join(`
|
|
1652
|
+
`)}\n</svg>`)}var e3=$4(Q4,LRe),zRe={minimal:Q4,standard:e3,complete:$4(e3,RRe)},BRe={".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`},VRe={"7z":`zip`,astro:`astro`,AUTHORS:`text`,avif:`image`,bash:`bash`,bmp:`image`,bz2:`zip`,cfg:`text`,CHANGELOG:`text`,cjs:`javascript`,"code-workspace":`vscode`,conf:`text`,CONTRIBUTORS:`text`,csh:`bash`,css:`css`,csv:`table`,cts:`typescript`,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`,htm:`html`,html:`html`,icns:`image`,ico:`image`,ini:`text`,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`,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`},HRe={jsx:`react`,sass:`sass`,scss:`sass`,tsx:`react`},t3=new Set([`bash`,`css`,`database`,`default`,`font`,`git`,`go`,`html`,`image`,`javascript`,`json`,`markdown`,`mcp`,`python`,`ruby`,`rust`,`swift`,`table`,`text`,`typescript`,`zip`]),URe=new Set([`complete`]);function WRe(e){return zRe[e===`none`?`minimal`:e]}function GRe(e){return`file-tree-builtin-${e}`}function KRe(e){return e!==`none`&&URe.has(e)}function qRe(e,t,n){if(e===`minimal`||e===`none`)return;let r=e===`complete`,i=BRe[t.toLowerCase()];if(i!=null&&(r||t3.has(i)))return i;for(let e of n){if(r){let t=HRe[e];if(t!=null)return t}let t=VRe[e];if(t!=null&&(r||t3.has(t)))return t}return`default`}function JRe(e){return e.spriteSheet!=null||e.remap!=null||e.byFileName!=null||e.byFileExtension!=null||e.byFileNameContains!=null}function n3(e){return e==null?{set:`complete`,colored:!0}:typeof e==`string`?{set:e,colored:!0}:{...e,set:e.set??(JRe(e)?`none`:`complete`),colored:e.colored??!0}}var r3={compact:{itemHeight:24,factor:.8},default:{itemHeight:30,factor:1},relaxed:{itemHeight:36,factor:1.2}};function YRe(e,t){if(typeof e==`number`)return{itemHeight:t??r3.default.itemHeight,factor:e};let n=r3[e??`default`];return{itemHeight:t??n.itemHeight,factor:n.factor}}var i3=r3.default.itemHeight,a3=`@layer base, theme, unsafe;
|
|
1653
1653
|
|
|
1654
1654
|
@layer base {
|
|
1655
1655
|
:host {
|
|
@@ -3295,19 +3295,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3295
3295
|
`,o3=`@layer base, unsafe;`;function s3(e){return`${o3}
|
|
3296
3296
|
@layer base {
|
|
3297
3297
|
${e}
|
|
3298
|
-
}`}function
|
|
3298
|
+
}`}function XRe(e){return`${o3}
|
|
3299
3299
|
@layer unsafe {
|
|
3300
3300
|
${e}
|
|
3301
|
-
}`}var c3=new WeakMap;function XRe(e){let t=c3.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(MLe,`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(),c3.set(e,i),i}function ZRe(e,t){if(!e.isConnected)return;let n=XRe(t);if(n==null)return;let r=t.querySelector(`style[${J4}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(J4,``),t.appendChild(i)),i.textContent=`:host { ${NLe}: ${n}px; }`}var l3;function QRe(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){l3??(l3=new CSSStyleSheet,l3.replaceSync(s3(a3)));let t=!1;try{e.adoptedStyleSheets=[l3],t=!0}catch{}if(t){e.querySelector(`style[${K4}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(K4,``),t.textContent=s3(a3),e.prepend(t)}}function u3(e,t){$Re(e,t),QRe(t),ZRe(e,t)}function $Re(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`});u3(this,e)}}if(customElements.define(G4,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(G4)))e instanceof HTMLElement&&u3(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var d3=5,f3=1<<d3,eze=f3*4;function p3(){return{childIdByNameId:new Map,childIds:[],childPositionById:new Map,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function m3(){return{childIdByNameId:null,childIds:[],childPositionById:null,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function h3(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 g3(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 _3(e,t){e.childPositionById!=null&&e.childPositionById.set(t,e.childIds.length),e.childIds.push(t)}function v3(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 y3(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,S3(e,t)}function b3(e,t,n,r){if(e.totalChildSubtreeNodeCount+=n,e.totalChildVisibleSubtreeCount+=r,e.childVisibleChunkSums==null||r===0)return;let i=g3(e).get(t);if(i===void 0)return;let a=i>>d3;e.childVisibleChunkSums[a]+=r}function x3(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=nze(e,t,a,i);return{...r,childVisibleIndex:n-r.localVisibleIndex}}i-=o,a+=f3}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 tze(e,t,n){let r=0,i=t.childVisibleChunkSums,a=0;if(i!=null){let e=n>>d3;for(let t=0;t<e;t+=1)r+=i[t]??0;a=e<<d3}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 S3(e,t){if(t.childIds.length<eze){t.childVisibleChunkSums=null;return}let n=Math.ceil(t.childIds.length/f3),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>>d3]+=a.visibleSubtreeCount)}t.childVisibleChunkSums=r}function nze(e,t,n,r){let i=Math.min(t.childIds.length,n+f3),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 rze=7,C3=3,w3=1<<C3,T3=4;function E3(e,t,n=0){return e<<T3|n<<C3|t}function D3(e){return e.depthAndFlags>>>T3}function O3(e){return(e.depthAndFlags&w3)>>C3}function k3(e){return(e.depthAndFlags&w3)!==0}function A3(e){return e.depthAndFlags&rze}function j3(e,t){return(A3(e)&t)!==0}function M3(e,t){e.depthAndFlags|=t}function ize(e,t){e.depthAndFlags=E3(t,A3(e),O3(e))}var N3=Symbol(`benchmarkInstrumentation`);function aze(e,t){return t==null||Object.defineProperty(e,N3,{configurable:!0,enumerable:!1,value:t,writable:!1}),e}function P3(e){return e==null?null:e[N3]??null}function F3(e,t,n){return e==null?n():e.measurePhase(t,n)}function I3(e,t,n){!Number.isFinite(n)||e==null||e.setCounter(t,n)}function L3(e){return e>=48&&e<=57}function oze(e){let t=[],n=0,r=0;for(;r<e.length;){for(;r<e.length&&!L3(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&&L3(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 R3(e){let t=e.toLowerCase();return{lowerValue:t,tokens:oze(t)}}function sze(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 z3(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=sze(e.tokens,t.tokens);return n===0?e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1:n}function B3(e,t,n){let r=z3(n(e),n(t));return r===0?e===t?0:e<t?-1:1:r}function cze(e,t){return B3(e,t,R3)}function V3(e,t){return t===e.segments.length-1?+!!e.isDirectory:1}function lze(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=V3(e,r);return a===V3(t,r)?cze(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 uze(e,t){return lze(e,t)}function dze(e,t,n){let r=e=>{let t=n.get(e);if(t!=null)return t;let r=R3(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=V3(e,n);return o===V3(t,n)?B3(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 H3(e,t){let n=e.sortKeyById[t];if(n!==void 0)return n;let r=e.valueById[t],i=R3(r);return e.sortKeyById[t]=i,i}function U3(e={}){return{flattenEmptyDirectories:e.flattenEmptyDirectories!==!1,sort:e.sort??`default`}}function W3(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 G3(e){let{hasTrailingSlash:t,segments:n}=W3(e);return{basename:n[n.length-1]??``,isDirectory:t,path:e,segments:n}}function K3(e){if(e.length===0)return{requiresDirectory:!1,segments:[]};let{hasTrailingSlash:t,segments:n}=W3(e);return{requiresDirectory:t,segments:n}}var q3=``;function J3(){let e=new Map;return e.set(q3,0),{idByValue:e,valueById:[q3],sortKeyById:[R3(q3)]}}function Y3(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 X3(e,t){let n=e.valueById[t];if(n===void 0)throw Error(`Unknown segment ID: ${String(t)}`);return n}var Z3=Symbol(`pathStorePreparedInputKind`);function Q3(e,t){return e[Z3]=t,e}function $3(e){return{basename:e.basename,depth:e.segments.length,isDirectory:e.isDirectory,path:e.path,segments:e.segments}}function e6(e,t,n){return n===`default`?uze(e,t):n($3(e),$3(t))}function fze(){return{depthAndFlags:E3(0,3,1),nameId:0,parentId:0,subtreeNodeCount:1,visibleSubtreeCount:1}}function pze(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 t6(e){return e.isDirectory?e.segments.length:e.segments.length-1}function mze(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 hze(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function gze(e,t={}){return n6(e,t).map(e=>e.path)}function _ze(e,t={}){let n=n6(e,t);return Q3({paths:n.map(e=>e.path),preparedPaths:n},`prepared`)}function vze(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 Q3({paths:e,presortedPaths:e,presortedPathsContainDirectories:n},`presorted`)}function yze(e){let t=e,n=t.preparedPaths;if(t[Z3]===`prepared`&&n!=null)return n;if(!mze(n))throw Error(`preparedInput must come from PathStore.prepareInput()`);return n}function bze(e){let t=e;return t[Z3]===`presorted`&&t.presortedPaths!=null||hze(t.presortedPaths)?t.presortedPaths:null}function xze(e){let t=e;return typeof t.presortedPathsContainDirectories==`boolean`?t.presortedPathsContainDirectories:null}function n6(e,t={}){let n=U3(t),r=P3(t);I3(r,`workload.inputFiles`,e.length);let i=F3(r,`store.preparePathEntries.parse`,()=>e.map(e=>G3(e)));return F3(r,`store.preparePathEntries.sort`,()=>i.sort((e,t)=>e6(e,t,n.sort))),i}var r6=class{directories=new Map;directoryStack=[0];presortedDirectoryNodeIds=[];initialExpandedPathSet;createdDirectoriesAllExpanded=!1;createdDirectoryCount=0;lastPreparedPath=null;nodes=[fze()];options;instrumentation;segmentSortKeyCache=new Map;segmentTable=J3();hasDeferredDirectoryIndexes=!1;constructor(e={}){this.instrumentation=P3(e),this.options=U3(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,p3())}appendPaths(e){return F3(this.instrumentation,`store.builder.appendPaths.parse`,()=>this.appendPreparedPaths(e.map(e=>G3(e))))}appendPreparedPaths(e,t=!0){return this.createdDirectoriesAllExpanded=!1,F3(this.instrumentation,`store.builder.appendPreparedPaths`,()=>{for(let n of e)this.appendPreparedPath(n,t)}),this}appendPresortedPaths(e,t=null){return F3(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:E3(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:E3(r,0,1),nameId:u,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),l++,c[l]=d}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:E3(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=G3(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:E3(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:E3(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=G3(t)),this.hasDeferredDirectoryIndexes=!0}finish(e={}){let t=e.skipSubtreeCountPass===!0;return this.hasDeferredDirectoryIndexes?(F3(this.instrumentation,`store.builder.buildDirectoryIndexes`,()=>this.buildPresortedFinish(t)),this.hasDeferredDirectoryIndexes=!1):t||F3(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`?dze(this.lastPreparedPath,e,this.segmentSortKeyCache):e6(this.lastPreparedPath,e,this.options.sort))>0)throw Error(`Builder input must be sorted before appendPaths(): "${e.path}"`)}let n=this.lastPreparedPath,r=t6(e),i=n==null?0:t6(n),a=n==null?0:pze(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=Y3(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:E3(D3(o)+1,0),nameId:r,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),a?.set(r,s),_3(i,s),s}createFileChildUnchecked(e,t){let n=Y3(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:E3(D3(i)+1,0),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),_3(r,a),a}getOrCreateDirectoryChild(e,t){let n=Y3(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&&!k3(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:E3(D3(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),_3(r,a),this.directories.set(a,p3()),a}createDirectoryChild(e,t){let n=Y3(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:E3(D3(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),_3(r,a),this.directories.set(a,p3()),a}promoteDirectoryToExplicit(e,t){let n=this.nodes[e];if(n===void 0)throw Error(`Unknown directory node ID: ${String(e)}`);if(!k3(n))throw Error(`Path is not a directory: "${t}"`);if(j3(n,1))throw Error(`Duplicate path: "${t}"`);M3(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,m3());let r=-1,i=null;for(let e=1;e<t.length;e++){let a=t[e];if(a==null)continue;if(k3(a)){let t=m3();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;k3(n)&&this.directories.set(t,p3());let r=this.directories.get(n.parentId);r!=null&&(r.childIdByNameId!=null&&r.childIdByNameId.set(n.nameId,t),_3(r,t))}}computeSubtreeCounts(e){let t=this.nodes[e];if(t===void 0)throw Error(`Unknown node ID: ${String(e)}`);if(!k3(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 y3(this.nodes,n),t.subtreeNodeCount=r,t.visibleSubtreeCount=r,r}};function Sze(e,t=`closed`,n=null){let r=wze(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 Cze(){return{affectedAncestorIds:new Set,affectedNodeIds:new Set,events:[]}}function wze(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 i6(e,t){return j3(t,2)||e.defaultExpansion===`open`?!0:e.defaultExpansion===`closed`?!1:D3(t)<=e.defaultExpansion}function a6(e,t,n=e.snapshot.nodes[t]){return n==null||!k3(n)?!1:e.directoriesOpenByDefault&&!e.hasCollapsedDirectoryOverrides?!0:e.collapsedDirectoryIds.has(t)?!1:e.expandedDirectoryIds.has(t)?!0:i6(e,n)}function o6(e,t,n,r=e.snapshot.nodes[t]){if(r==null||!k3(r))return;let i=i6(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 s6(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 c6(e,t){return e.directoryLoadInfoById.get(t)?.state??`loaded`}function Tze(e,t){let n=s6(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 Eze(e,t){let n=s6(e,t);n.activeAttemptId=null,n.errorMessage=null,n.state=`unloaded`}function Dze(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 Oze(e,t,n){return e.directoryLoadInfoById.get(t)?.activeAttemptId===n}function kze(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 Aze(e,t){e.directoryLoadInfoById.delete(t)}function jze(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 Mze(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`add`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function Nze(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`remove`,path:e.path,projectionChanged:e.projectionChanged,recursive:e.recursive,visibleCountDelta:null}}function Pze(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,from:e.from,operation:`move`,projectionChanged:e.projectionChanged,to:e.to,visibleCountDelta:null}}function Fze(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`expand`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function Ize(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`collapse`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function Lze(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`mark-directory-unloaded`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function Rze(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 zze(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 Bze(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 Vze(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 Hze(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 l6(e,t,n){return{...n,visibleCountDelta:g6(e)-t}}function Uze(e,t){let n=g6(e),r=Cze();e.transactionStack.push(r);try{t()}catch(t){throw f6(e,r,!1),t}f6(e,r,!0,g6(e)-n)}function u6(e,t){let n=e.instrumentation;if(n==null){d6(e,t);return}F3(n,`store.events.record`,()=>d6(e,t))}function d6(e,t){let n=e.transactionStack[e.transactionStack.length-1]??null;if(n==null){m6(e,t);return}n.events.push(t),Kze(n,t)}function f6(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?p6(i,t):F3(n,`store.events.batch.merge`,()=>p6(i,t));return}let a=Wze(t,r),o=e.instrumentation;if(o==null){m6(e,a);return}F3(o,`store.events.batch.commit`,()=>m6(e,a))}function Wze(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 Gze(e,t){for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n);for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n)}function p6(e,t){for(let n of t.events)e.events.push(n);Gze(e,t)}function Kze(e,t){for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n);for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n)}function m6(e,t){let n=e.instrumentation;if(n==null){h6(e,t);return}F3(n,`store.events.emit`,()=>h6(e,t))}function h6(e,t){e.listeners.get(t.operation)?.forEach(e=>e(t)),e.listeners.get(`*`)?.forEach(e=>e(t))}function g6(e){return e.snapshot.nodes[e.snapshot.rootId]?.visibleSubtreeCount??0}function _6(e,t){if(e.snapshot.options.flattenEmptyDirectories!==!0)return null;let n=e.snapshot.nodes[t];if(n==null||!k3(n)||j3(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||!k3(a)?null:i}function v6(e,t){let n=t;for(;;){let t=_6(e,n);if(t==null)return n;n=t}}function y6(e,t){let n=[t],r=t;for(;;){let t=_6(e,r);if(t==null)return n;n.push(t),r=t}}function b6(e,t){let n=t==null?e.snapshot.rootId:k6(e,t);return n==null?[]:Jze(e,n)}function x6(e,t){let n=G3(t),r=n.isDirectory?n.segments:n.segments.slice(0,-1),i=R6(e,rBe(e,r)),{createdNodeIds:a,directoryId:o}=Yze(e,r),s=new Set(a),c=o;if(n.isDirectory){let n=M6(e,o);if(j3(n,1))throw Error(`Path already exists: "${t}"`);M3(n,1),e.pathCacheByNodeId.set(o,{path:t,version:e.pathCacheVersion}),s.add(o)}else c=Zze(e,o,n.basename),s.add(c);E6(e,o);let l=R6(e,o);return Mze({affectedAncestorIds:O6(e,c),affectedNodeIds:[...s],path:t,projectionChanged:z6(i,l)})}function S6(e,t,n){let r=k6(e,t);if(r==null)throw Error(`Path does not exist: "${t}"`);let i=M6(e,r);if(j3(i,2))throw Error(`The root node cannot be removed`);if(k3(i)&&j6(e,r).childIds.length>0&&n.recursive!==!0)throw Error(`Cannot remove a non-empty directory without recursive: "${t}"`);let a=i.parentId,o=R6(e,a),s=I6(e,r);P6(e,a,r,i.nameId),L6(e,a),E6(e,a);let c=R6(e,a);return Nze({affectedAncestorIds:O6(e,a),affectedNodeIds:s,path:t,projectionChanged:z6(o,c),recursive:n.recursive===!0})}function C6(e,t,n,r){let i=k6(e,t);if(i==null)throw Error(`Source path does not exist: "${t}"`);let a=M6(e,i);if(j3(a,2))throw Error(`The root node cannot be moved`);let o=r.collision??`error`,s=tBe(e,i,n),c=R6(e,a.parentId),l=R6(e,s.parentId),u=X3(e.snapshot.segmentTable,a.nameId),d=Y3(e.snapshot.segmentTable,s.basename);if(s.parentId===a.parentId&&u===s.basename)return null;if(k3(a)&&aBe(e,i,s.parentId))throw Error(`Cannot move a directory into one of its descendants`);let f=h3(e.snapshot.nodes,j6(e,s.parentId)).get(d),p=s.existingNodeId??f??null;if(p!=null&&p!==i&&nBe(e,p,o,O3(a))===`skip`)return null;let m=a.parentId;P6(e,m,i,a.nameId),a.parentId=s.parentId,a.nameId=d,e.pathCacheByNodeId.delete(i),V6(e,i),N6(e,s.parentId,i),L6(e,m),e.pathCacheVersion++,E6(e,m),s.parentId!==m&&E6(e,s.parentId);let h=R6(e,m),g=R6(e,s.parentId);return Pze({affectedAncestorIds:[...new Set([...O6(e,m),...O6(e,s.parentId)])],affectedNodeIds:[i],from:t,projectionChanged:B6([c,l],[h,g]),to:T6(e,i)})}function qze(e,t){let n=e.pathCacheByNodeId.get(t);return n!=null&&n.version===e.pathCacheVersion?n.path:null}function w6(e,t,n){return e.pathCacheByNodeId.set(t,{path:n,version:e.pathCacheVersion}),n}function T6(e,t){let n=M6(e,t),r=qze(e,t);if(r!=null)return r;if(j3(n,2))return w6(e,t,``);let i=T6(e,n.parentId),a=X3(e.snapshot.segmentTable,n.nameId),o=i.length===0?a:`${i}${a}`;return w6(e,t,k3(n)?`${o}/`:o)}function E6(e,t){let n=e.instrumentation;if(n==null){U6(e,t);return}F3(n,`store.recomputeCountsUpwardFrom`,()=>U6(e,t))}function D6(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||!k3(o)){H6(e,a,o,!0),n.pop();continue}let s=i.get(a);if(s==null||t[1]>=s.childIds.length){H6(e,a,o,!0),n.pop();continue}let c=s.childIds[t[1]++];n.push([c,0])}}function O6(e,t){let n=[],r=t;for(;r!=null;){let t=M6(e,r);if(n.push(r),r===e.snapshot.rootId)break;r=t.parentId}return n}function k6(e,t){if(t.length===0)return e.snapshot.rootId;let n=K3(t);return A6(e,n.segments,n.requiresDirectory)}function A6(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=j6(e,r),a=h3(e.snapshot.nodes,i).get(t);if(a===void 0)return null;r=a}let i=M6(e,r);return n&&!k3(i)?null:r}function j6(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 M6(e,t){let n=e.snapshot.nodes[t];if(n===void 0||j3(n,4))throw Error(`Unknown node ID: ${String(t)}`);return n}function Jze(e,t){let n=e.snapshot.nodes[t];if(n===void 0||j3(n,4))return[];if(!k3(n))return[T6(e,t)];if(j6(e,t).childIds.length===0)return j3(n,1)&&!j3(n,2)?[T6(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||j3(n,4)){i.pop();continue}if(!k3(n)){r.push(T6(e,t.nodeId)),i.pop();continue}let a=j6(e,t.nodeId);if(a.childIds.length===0){j3(n,1)&&!j3(n,2)&&r.push(T6(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 Yze(e,t){let n=[],r=e.snapshot.rootId;for(let i of t){let t=Y3(e.snapshot.segmentTable,i),a=j6(e,r),o=h3(e.snapshot.nodes,a).get(t);if(o!==void 0){if(!k3(M6(e,o)))throw Error(`Cannot create a directory that collides with an existing file: "${i}"`);r=o;continue}r=Xze(e,r,t),n.push(r)}return{createdNodeIds:n,directoryId:r}}function Xze(e,t,n){let r=M6(e,t),i=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:E3(D3(r)+1,0,1),nameId:n,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),e.snapshot.directories.set(i,p3()),N6(e,t,i),e.collapseNewDirectoriesByDefault&&(e.collapsedDirectoryIds.add(i),e.hasCollapsedDirectoryOverrides=!0),e.activeNodeCount++,i}function Zze(e,t,n){let r=Y3(e.snapshot.segmentTable,n),i=j6(e,t);if(h3(e.snapshot.nodes,i).has(r))throw Error(`Path already exists: "${oBe(e,t,n)}"`);let a=M6(e,t),o=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:E3(D3(a)+1,0),nameId:r,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),N6(e,t,o),e.activeNodeCount++,o}function Qze(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}$ze(e,n,o)<0?i=a:r=a+1}return r}function N6(e,t,n){let r=j6(e,t),i=M6(e,n);h3(e.snapshot.nodes,r).set(i.nameId,n),b3(r,n,i.subtreeNodeCount,i.visibleSubtreeCount);let a=Qze(e,r,n);r.childIds.splice(a,0,n),v3(r,a),S3(e.snapshot.nodes,r)}function P6(e,t,n,r){let i=j6(e,t),a=g3(i),o=a.get(n)??-1;h3(e.snapshot.nodes,i).delete(r),a.delete(n);let s=e.snapshot.nodes[n];s!=null&&b3(i,n,-s.subtreeNodeCount,-s.visibleSubtreeCount),o>=0&&(i.childIds.splice(o,1),v3(i,o),S3(e.snapshot.nodes,i))}function $ze(e,t,n){let r=e.snapshot.options.sort;return r===`default`?eBe(e,t,n):r(F6(e,t),F6(e,n))}function eBe(e,t,n){let r=M6(e,t),i=M6(e,n),a=k3(r);if(a!==k3(i))return a?-1:1;let o=z3(H3(e.snapshot.segmentTable,r.nameId),H3(e.snapshot.segmentTable,i.nameId));if(o!==0)return o;let s=X3(e.snapshot.segmentTable,r.nameId),c=X3(e.snapshot.segmentTable,i.nameId);return s===c?t<n?-1:1:s<c?-1:1}function F6(e,t){let n=M6(e,t),r=T6(e,t),i=k3(n),a=i?r.slice(0,-1):r;return{basename:X3(e.snapshot.segmentTable,n.nameId),depth:D3(n),isDirectory:i,path:r,segments:a.length===0?[]:a.split(`/`)}}function tBe(e,t,n){let r=M6(e,t),i=k6(e,n);if(i!=null){let t=M6(e,i);if(k3(t))return{basename:X3(e.snapshot.segmentTable,r.nameId),existingNodeId:null,parentId:i};let a=K3(n).segments;return{basename:a[a.length-1]??``,existingNodeId:i,parentId:t.parentId}}let a=K3(n),o=a.segments[a.segments.length-1]??``,s=a.segments.slice(0,-1),c=s.length===0?e.snapshot.rootId:A6(e,s,!0);if(c==null)throw Error(`Destination parent does not exist: "${n}"`);return{basename:o,existingNodeId:null,parentId:c}}function nBe(e,t,n,r){if(n===`skip`)return`skip`;if(n===`error`)throw Error(`Destination already exists: "${T6(e,t)}"`);let i=M6(e,t);if(O3(i)!==r)throw Error(`replace collision requires the same source and destination kinds`);if(k3(i)&&j6(e,t).childIds.length>0)throw Error(`replace collision does not support non-empty directories`);let a=i.parentId,o=i.nameId;return I6(e,t),P6(e,a,t,o),L6(e,a),E6(e,a),`handled`}function I6(e,t){let n=[],r=[{nodeId:t,visitedChildren:!1}];for(;r.length>0;){let t=r.pop();if(t==null)break;let i=M6(e,t.nodeId);if(t.visitedChildren||!k3(i)){k3(i)&&e.snapshot.directories.delete(t.nodeId),M3(i,4),e.pathCacheByNodeId.delete(t.nodeId),e.collapsedDirectoryIds.delete(t.nodeId)&&(e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0),e.expandedDirectoryIds.delete(t.nodeId),Aze(e,t.nodeId),e.activeNodeCount--,n.push(t.nodeId);continue}r.push({nodeId:t.nodeId,visitedChildren:!0});let a=j6(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 L6(e,t){let n=t;for(;n!=null;){let t=M6(e,n);if(!k3(t)||j3(t,2)||j6(e,n).childIds.length>0)return;M3(t,1),n=t.parentId===n?null:t.parentId}}function rBe(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=h3(e.snapshot.nodes,j6(e,n)).get(t);if(i==null||!k3(M6(e,i)))break;n=i}return n}function R6(e,t){let n=iBe(e,t);if(n==null)return null;let r=v6(e,n),i=M6(e,r),a=n===r?null:y6(e,n).map(t=>T6(e,t));return JSON.stringify({flattenedSegmentPaths:a,hasChildren:j6(e,r).childIds.length>0,path:T6(e,r),terminalKind:O3(i)})}function z6(e,t){return B6([e],[t])}function B6(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 iBe(e,t){let n=t;for(;n!=null;){let t=M6(e,n);if(!k3(t)||j3(t,2))return null;if(!a6(e,n,t))return n;n=t.parentId}return null}function V6(e,t){let n=M6(e,t);if(ize(n,(t===e.snapshot.rootId?-1:D3(M6(e,n.parentId)))+1),!k3(n))return;let r=j6(e,t);for(let t of r.childIds)V6(e,t)}function aBe(e,t,n){let r=n;for(;r!=null;){if(r===t)return!0;let n=M6(e,r);if(r===e.snapshot.rootId)return!1;r=n.parentId}return!1}function H6(e,t,n=M6(e,t),r=!1){let i=e.instrumentation;if(i==null){W6(e,t,n,r);return}F3(i,`store.recomputeNodeCounts`,()=>W6(e,t,n,r))}function U6(e,t){let n=t;for(;n!=null;){let t=M6(e,n),r=t.subtreeNodeCount,i=t.visibleSubtreeCount;if(H6(e,n,t),n===e.snapshot.rootId)return;let a=t.subtreeNodeCount-r,o=t.visibleSubtreeCount-i,s=t.parentId;(a!==0||o!==0)&&b3(j6(e,s),n,a,o),n=s}}function W6(e,t,n,r){if(!k3(n)){n.subtreeNodeCount=1,n.visibleSubtreeCount=1;return}let i=j6(e,t);if(r){let t=e.instrumentation;t==null?y3(e.snapshot.nodes,i):F3(t,`store.recomputeNodeCounts.rebuildChildAggregates`,()=>y3(e.snapshot.nodes,i))}let a=1+i.totalChildSubtreeNodeCount,o=i.totalChildVisibleSubtreeCount;if(n.subtreeNodeCount=a,j3(n,2)){n.visibleSubtreeCount=o;return}n.visibleSubtreeCount=_6(e,t)==null?a6(e,t,n)?1+o:1:o}function oBe(e,t,n){let r=T6(e,t);return r.length===0?n:`${r}${n}`}function G6(e){return e!=null&&!j3(e,4)}function K6(e,t){let n=e.snapshot.nodes[t];return!G6(n)||!k3(n)||j3(n,2)?null:n}function sBe(e){let t=0;for(let[n,r]of e.pathCacheByNodeId)r.version===e.pathCacheVersion&&G6(e.snapshot.nodes[n])&&(t+=1);return t}function cBe(e){return Math.max(0,e.valueById.length-1)}function q6(e){return{activeNodeCount:e.activeNodeCount,cachedPathEntryCount:sBe(e),loadInfoEntryCount:e.directoryLoadInfoById.size,segmentCount:cBe(e.snapshot.segmentTable),totalNodeSlotCount:Math.max(0,e.snapshot.nodes.length-1)}}function lBe(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 J6(e){let t=[],n=[];for(let n of e.collapsedDirectoryIds)K6(e,n)!=null&&t.push(T6(e,n));for(let t of e.expandedDirectoryIds)K6(e,t)!=null&&n.push(T6(e,t));return{collapsedPaths:t,expandedPaths:n}}function Y6(e){let t=[];for(let[n,r]of e.directoryLoadInfoById)K6(e,n)==null||c6(e,n)===`loaded`||t.push({info:{activeAttemptId:null,errorMessage:r.errorMessage,nextAttemptId:r.nextAttemptId,state:r.state},path:T6(e,n)});return t}function X6(e,t){e.collapsedDirectoryIds.clear(),e.hasCollapsedDirectoryOverrides=!1,e.expandedDirectoryIds.clear();for(let n of t.expandedPaths){let t=k6(e,n);t!=null&&o6(e,t,!0,M6(e,t))}for(let n of t.collapsedPaths){let t=k6(e,n);t!=null&&o6(e,t,!1,M6(e,t))}}function Z6(e,t){e.directoryLoadInfoById.clear();for(let n of t){let t=k6(e,n.path);t!=null&&K6(e,t)!=null&&e.directoryLoadInfoById.set(t,{activeAttemptId:null,errorMessage:n.info.errorMessage,nextAttemptId:n.info.nextAttemptId,state:n.info.state})}}function uBe(e){e.pathCacheVersion+=1,e.pathCacheByNodeId.clear(),e.pathCacheByNodeId.set(e.snapshot.rootId,{path:``,version:e.pathCacheVersion})}function dBe(e){let t=e.snapshot.segmentTable,n=J3();for(let r of e.snapshot.nodes)if(G6(r)){if(j3(r,2)){r.nameId=0;continue}r.nameId=Y3(n,X3(t,r.nameId))}e.snapshot.segmentTable=n}function fBe(e){for(let[t,n]of e.snapshot.directories){let r=e.snapshot.nodes[t];if(!G6(r)||!k3(r)){e.snapshot.directories.delete(t);continue}let i=n.childIds.filter(n=>{let r=e.snapshot.nodes[n];return G6(r)&&r.parentId===t});n.childIds=i,n.childIdByNameId=new Map(i.map(t=>[M6(e,t).nameId,t])),n.childPositionById=new Map(i.map((e,t)=>[e,t])),y3(e.snapshot.nodes,n)}}function pBe(e){let t=e.snapshot.nodes.length-1;for(;t>e.snapshot.rootId;){let n=e.snapshot.nodes[t];if(G6(n))break;--t}e.snapshot.nodes.length=t+1}function mBe(e){let t=J6(e),n=Y6(e);F3(e.instrumentation,`store.cleanup.stable.clearPathCaches`,()=>uBe(e)),F3(e.instrumentation,`store.cleanup.stable.rebuildSegmentTable`,()=>dBe(e)),F3(e.instrumentation,`store.cleanup.stable.rebuildDirectoryIndexes`,()=>fBe(e)),F3(e.instrumentation,`store.cleanup.stable.trimTrailingRemovedNodeSlots`,()=>pBe(e)),F3(e.instrumentation,`store.cleanup.stable.restoreExpansionOverrides`,()=>X6(e,t)),F3(e.instrumentation,`store.cleanup.stable.restoreDirectoryLoadInfos`,()=>Z6(e,n)),F3(e.instrumentation,`store.cleanup.stable.recomputeCounts`,()=>D6(e,e.snapshot.rootId))}function hBe(e){let t=J6(e),n=Y6(e),r=F3(e.instrumentation,`store.cleanup.aggressive.listPaths`,()=>b6(e)),i=aze({...e.snapshot.options},e.instrumentation),a=F3(e.instrumentation,`store.cleanup.aggressive.rebuildSnapshot`,()=>{let e=new r6(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,F3(e.instrumentation,`store.cleanup.aggressive.restoreExpansionOverrides`,()=>X6(e,t)),F3(e.instrumentation,`store.cleanup.aggressive.restoreDirectoryLoadInfos`,()=>Z6(e,n)),F3(e.instrumentation,`store.cleanup.aggressive.recomputeCounts`,()=>D6(e,e.snapshot.rootId))}function gBe(e){for(let t of e.directoryLoadInfoById.values())if(t.state===`loading`&&t.activeAttemptId!=null)return!0;return!1}function _Be(e,t){let n=q6(e);t===`stable`?F3(e.instrumentation,`store.cleanup.stable`,()=>mBe(e)):F3(e.instrumentation,`store.cleanup.aggressive`,()=>hBe(e));let r=q6(e);return lBe(t,t===`stable`,n,r)}var vBe=64;function yBe(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 Q6(e){return M6(e,e.snapshot.rootId).visibleSubtreeCount}function $6(e,t,n,r){let i=M6(e,t.terminalNodeId),a=Math.max(1,i.visibleSubtreeCount);return Math.min(r-1,n+a-1)}function bBe(e,t,n,r){return{ancestorPaths:r,index:t.index,posInSet:t.posInSet,row:c8(e,t.cursor),setSize:t.setSize,subtreeEndIndex:$6(e,t.cursor,t.index,n)}}function e8(e,t,n,r,i,a){let o=j6(e,t),{childIndex:s,childVisibleIndex:c,localVisibleIndex:l}=x3(e.snapshot.nodes,o,n),u=o.childIds[s];if(u==null)throw Error(`Visible index ${String(n)} is out of range`);return xBe(e,u,l,r+c,i+1,s,o.childIds.length,a)}function xBe(e,t,n,r,i,a,o,s){if(!k3(M6(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=a8(e,t,i);if(n===0)return{ancestors:s,cursor:c,index:r,posInSet:a,setSize:o};let l=M6(e,c.terminalNodeId);if(!k3(l)||!a6(e,c.terminalNodeId,l))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return e8(e,c.terminalNodeId,n-1,r+1,c.visibleDepth,[...s,{cursor:c,index:r,posInSet:a,setSize:o}])}function SBe(e,t){let n=Q6(e);if(t<0||t>=n)return null;let r=e8(e,e.snapshot.rootId,t,0,-1,[]),i=r.ancestors.map(t=>T6(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=bBe(e,a,n,[...i]);t.push(r),i.push(r.row.path)}return a=t,a},index:r.index,posInSet:r.posInSet,row:c8(e,r.cursor),setSize:r.setSize,subtreeEndIndex:$6(e,r.cursor,r.index,n)}}function CBe(e,t,n){let r=e.instrumentation,i=Q6(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 ABe(e,o+1);let t=[],n=n8(e,a);for(let r=a;r<=o&&n!=null;r++){let r=c8(e,n);t.push(r),n=o8(e,n)}return t}let s=[],c=0,l=0,u=F3(r,`store.getVisibleSlice.selectFirstRow`,()=>n8(e,a));for(let t=a;t<=o&&u!=null;t++){let t=F3(r,`store.getVisibleSlice.materializeRow`,()=>c8(e,u));s.push(t),t.isFlattened&&(c++,l+=t.flattenedSegments?.length??0),u=F3(r,`store.getVisibleSlice.advanceCursor`,()=>o8(e,u))}return I3(r,`workload.visibleRowsRead`,s.length),I3(r,`workload.flattenedRowsRead`,c),I3(r,`workload.flattenedSegmentsRead`,l),s}function t8(e,t=Q6(e)){let n=e.instrumentation;return n==null?s8(e,t):F3(n,`store.getVisibleTreeProjection`,()=>s8(e,t))}function wBe(e){return kBe(t8(e))}function TBe(e,t){let n=k6(e,t);if(n==null||n===e.snapshot.rootId||k3(M6(e,n))&&v6(e,n)!==n)return null;let r=0,i=n,{nodes:a,rootId:o}=e.snapshot;for(;i!==o;){let t=M6(e,i).parentId,n=j6(e,t),s=g3(n).get(i);if(s==null)throw Error(`Child ${String(i)} was not found in its parent index`);if(r+=tze(a,n,s),t!==o){let n=M6(e,t),a=_6(e,t);if(!a6(e,t,n)&&a!==i)return null;v6(e,t)===t&&(r+=1)}i=t}return r}function EBe(e,t){let n=k6(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=M6(e,n);if(!k3(r))throw Error(`Path is not a directory: "${t}"`);return a6(e,n,r)?null:(o6(e,n,!0,r),E6(e,n),Fze({affectedAncestorIds:O6(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0}))}function DBe(e,t){let n=k6(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=M6(e,n);if(!k3(r))throw Error(`Path is not a directory: "${t}"`);return a6(e,n,r)?(o6(e,n,!1,r),E6(e,n),Ize({affectedAncestorIds:O6(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0})):null}function n8(e,t){return t<0||t>=Q6(e)?null:r8(e,e.snapshot.rootId,t,-1)}function r8(e,t,n,r){let i=j6(e,t),a=e.instrumentation,{childIndex:o,localVisibleIndex:s}=a==null?x3(e.snapshot.nodes,i,n):F3(a,`store.getVisibleSlice.selectChildIndex`,()=>x3(e.snapshot.nodes,i,n)),c=i.childIds[o];if(c!=null)return i8(e,c,s,r+1);throw Error(`Visible index ${String(n)} is out of range`)}function i8(e,t,n,r){if(!k3(M6(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=a8(e,t,r);if(n===0)return i;let a=M6(e,i.terminalNodeId);if(!k3(a)||!a6(e,i.terminalNodeId,a))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return r8(e,i.terminalNodeId,n-1,i.visibleDepth)}function a8(e,t,n){return k3(M6(e,t))?e.instrumentation==null?{headNodeId:t,terminalNodeId:v6(e,t),visibleDepth:n}:{headNodeId:t,terminalNodeId:F3(e.instrumentation,`store.getVisibleSlice.flatten.resolveTerminalDirectory`,()=>v6(e,t)),visibleDepth:n}:{headNodeId:t,terminalNodeId:t,visibleDepth:n}}function OBe(e,t){let n=M6(e,t);if(!k3(n))return!0;let r=n.parentId;return r===e.snapshot.rootId?!0:_6(e,r)!==t}function o8(e,t){let n=M6(e,t.terminalNodeId);if(k3(n)){let r=j6(e,t.terminalNodeId);if(a6(e,t.terminalNodeId,n)&&r.childIds.length>0){let n=r.childIds[0];return n==null?null:i8(e,n,0,t.visibleDepth+1)}}let r=t.terminalNodeId,i=t.visibleDepth;for(;;){let t=M6(e,r);if(r===e.snapshot.rootId)return null;let n=t.parentId,a=j6(e,n),o=g3(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 i8(e,s,0,i);OBe(e,r)&&i--,r=n}}function kBe(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 s8(e,t){let n=Array(t),r=new Int32Array(t),i=new Int32Array(t),a=new Int32Array(t),o=new Int32Array(vBe);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=yBe(o,y);let x,S=_;if(k3(v))S=f?v6(e,_):_,x=S===_?`${b}${h[v.nameId]}/`:T6(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&&k3(C)&&a6(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 ABe(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(!k3(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:T6(e,f)};continue}let h=l?v6(e,f):f,g={headNodeId:f,terminalNodeId:h,visibleDepth:m};n[r++]=c8(e,g);let _=i[h];_!=null&&k3(_)&&a6(e,h,_)&&s.push([a.get(h),0,m])}return r<t&&(n.length=r),n}function c8(e,t){let n=M6(e,t.terminalNodeId),r=k3(n)?jBe(e,t):null,i=T6(e,t.terminalNodeId),a=X3(e.snapshot.segmentTable,n.nameId),o=k3(n)&&j6(e,t.terminalNodeId).childIds.length>0,s=t.headNodeId!==t.terminalNodeId,c=e.instrumentation,l=s?c==null?y6(e,t.headNodeId).map(n=>{let r=M6(e,n);return{isTerminal:n===t.terminalNodeId,name:X3(e.snapshot.segmentTable,r.nameId),nodeId:n,path:T6(e,n)}}):F3(c,`store.getVisibleSlice.flatten.collectSegments`,()=>y6(e,t.headNodeId).map(n=>{let r=M6(e,n);return{isTerminal:n===t.terminalNodeId,name:X3(e.snapshot.segmentTable,r.nameId),nodeId:n,path:T6(e,n)}})):void 0;return{depth:t.visibleDepth,flattenedSegments:l,hasChildren:o,id:t.terminalNodeId,isExpanded:k3(n)&&a6(e,t.terminalNodeId,n),isFlattened:s,isLoading:r===`loading`,kind:k3(n)?`directory`:`file`,loadState:r==null||r===`loaded`?void 0:r,name:a,path:i}}function jBe(e,t){if(t.headNodeId===t.terminalNodeId)return c6(e,t.terminalNodeId);let n=y6(e,t.headNodeId),r=!1,i=!1;for(let t of n){let n=c6(e,t);if(n===`loading`)return`loading`;if(n===`error`){i=!0;continue}n===`unloaded`&&(r=!0)}return i?`error`:r?`unloaded`:`loaded`}function MBe(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||!k3(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&&S3(n,i),r.subtreeNodeCount=1+c;let u;if(o&&s===1){let e=n[a[0]];u=e!=null&&k3(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,S3(n,l),c.subtreeNodeCount=1+d,c.visibleSubtreeCount=f}function NBe(e){return e.initialExpansion===`open`&&(e.initialExpandedPaths==null||e.initialExpandedPaths.length===0)}var l8=class e{#e;constructor(e={}){let t=P3(e),n=F3(t,`store.builder.create`,()=>new r6(e));if(e.preparedInput!=null){let t=bze(e.preparedInput);t==null?n.appendPreparedPaths(yze(e.preparedInput),!1):n.appendPresortedPaths(t,xze(e.preparedInput))}else{let r=e.paths??[];e.presorted===!0?n.appendPaths(r):n.appendPreparedPaths(F3(t,`store.preparePathEntries`,()=>n6(r,e)))}let r=F3(t,`store.builder.finish`,()=>n.finish({skipSubtreeCountPass:!0})),i=F3(t,`store.state.detectAllDirectoriesExpanded`,()=>(e.initialExpansion??`closed`)===`closed`&&n.didMatchAllInitialExpandedPaths());this.#e=F3(t,`store.state.create`,()=>Sze(r,i?`open`:e.initialExpansion??`closed`,t)),i&&(this.#e.collapseNewDirectoriesByDefault=!0);let a=i?this.#e.snapshot.directories.size-1:F3(t,`store.state.initializeExpandedPaths`,()=>this.initializeExpandedPaths(e.initialExpandedPaths));i||NBe(e)||(e.initialExpansion??`closed`)===`closed`&&a===this.#e.snapshot.directories.size-1||(e.initialExpandedPaths?.length??0)>0&&F3(t,`store.state.checkAllDirectoriesExpanded`,()=>this.hasAllDirectoriesExpanded())?F3(t,`store.state.initializeOpenVisibleCounts`,()=>MBe(this.#e)):F3(t,`store.state.recomputeCounts`,()=>D6(this.#e,this.#e.snapshot.rootId))}static preparePaths(e,t={}){return gze(e,t)}static prepareInput(e,t={}){return _ze(e,t)}static preparePresortedInput(e){return vze(e)}list(e){return F3(this.#e.instrumentation,`store.list`,()=>b6(this.#e,e))}add(e){F3(this.#e.instrumentation,`store.add`,()=>{let t=Q6(this.#e);u6(this.#e,l6(this.#e,t,x6(this.#e,e)))})}remove(e,t={}){F3(this.#e.instrumentation,`store.remove`,()=>{let n=Q6(this.#e);u6(this.#e,l6(this.#e,n,S6(this.#e,e,t)))})}move(e,t,n={}){F3(this.#e.instrumentation,`store.move`,()=>{let r=Q6(this.#e),i=C6(this.#e,e,t,n);i!=null&&u6(this.#e,l6(this.#e,r,i))})}batch(e){Uze(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});break}})}getVisibleCount(){return F3(this.#e.instrumentation,`store.getVisibleCount`,()=>Q6(this.#e))}getVisibleSlice(e,t){return F3(this.#e.instrumentation,`store.getVisibleSlice`,()=>CBe(this.#e,e,t))}getVisibleRowContext(e){return F3(this.#e.instrumentation,`store.getVisibleRowContext`,()=>SBe(this.#e,e))}getVisibleTreeProjection(){return wBe(this.#e)}getVisibleTreeProjectionData(e){return t8(this.#e,e)}getVisibleIndex(e){return F3(this.#e.instrumentation,`store.getVisibleIndex`,()=>TBe(this.#e,e))}getPathInfo(e){return F3(this.#e.instrumentation,`store.getPathInfo`,()=>{let t=k6(this.#e,e);if(t==null)return null;let n=M6(this.#e,t);return{depth:D3(n),kind:k3(n)?`directory`:`file`,path:T6(this.#e,t)}})}isExpanded(e){return F3(this.#e.instrumentation,`store.isExpanded`,()=>{let t=this.requireDirectoryNodeId(e),n=M6(this.#e,t);return a6(this.#e,t,n)})}expand(e){F3(this.#e.instrumentation,`store.expand`,()=>{let t=Q6(this.#e),n=EBe(this.#e,e);n!=null&&u6(this.#e,l6(this.#e,t,n))})}collapse(e){F3(this.#e.instrumentation,`store.collapse`,()=>{let t=Q6(this.#e),n=DBe(this.#e,e);n!=null&&u6(this.#e,l6(this.#e,t,n))})}on(e,t){return jze(this.#e,e,t)}getDirectoryLoadState(e){let t=this.requireDirectoryNodeId(e);return c6(this.#e,t)}markDirectoryUnloaded(e){F3(this.#e.instrumentation,`store.markDirectoryUnloaded`,()=>{let t=this.requireDirectoryNodeId(e);if(j6(this.#e,t).childIds.length>0)throw Error(`Cannot mark a directory with known children as unloaded: "${e}"`);let n=Q6(this.#e);Eze(this.#e,t),u6(this.#e,l6(this.#e,n,Lze({affectedAncestorIds:O6(this.#e,t),affectedNodeIds:[t],path:e,projectionChanged:this.isDirectoryProjectionVisible(t)})))})}beginChildLoad(e){return F3(this.#e.instrumentation,`store.beginChildLoad`,()=>{let t=this.requireDirectoryNodeId(e),n=Q6(this.#e),r=Tze(this.#e,t);return u6(this.#e,l6(this.#e,n,Rze({affectedAncestorIds:O6(this.#e,t),affectedNodeIds:[t],attemptId:r.attemptId,path:e,projectionChanged:this.isDirectoryProjectionVisible(t),reused:r.reused}))),r})}applyChildPatch(e,t){return F3(this.#e.instrumentation,`store.applyChildPatch`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null||c6(this.#e,n)!==`loading`||!Oze(this.#e,n,e.attemptId))return!1;let r=T6(this.#e,n);this.validateChildPatch(r,t);let i=Q6(this.#e),a=[];for(let e of t.operations){PBe(r,e);let t=Q6(this.#e);switch(e.type){case`add`:a.push(l6(this.#e,t,x6(this.#e,e.path)));break;case`remove`:a.push(l6(this.#e,t,S6(this.#e,e.path,{recursive:e.recursive})));break;case`move`:{let n=C6(this.#e,e.from,e.to,{collision:e.collision});n!=null&&a.push(l6(this.#e,t,n));break}}}let o=a.some(e=>e.projectionChanged)||this.isDirectoryProjectionVisible(n);return u6(this.#e,l6(this.#e,i,zze({affectedAncestorIds:O6(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,childEvents:a,path:T6(this.#e,n),projectionChanged:o}))),!0})}completeChildLoad(e){return F3(this.#e.instrumentation,`store.completeChildLoad`,()=>{let t=this.resolveActiveDirectoryNodeId(e.nodeId);if(t==null)return!1;let n=Q6(this.#e),r=Dze(this.#e,t,e.attemptId);return u6(this.#e,l6(this.#e,n,Bze({affectedAncestorIds:O6(this.#e,t),affectedNodeIds:[t],attemptId:e.attemptId,path:T6(this.#e,t),projectionChanged:this.isDirectoryProjectionVisible(t),stale:!r}))),r})}failChildLoad(e,t){return F3(this.#e.instrumentation,`store.failChildLoad`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null)return!1;let r=Q6(this.#e),i=kze(this.#e,n,e.attemptId,t);return u6(this.#e,l6(this.#e,r,Vze({affectedAncestorIds:O6(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,errorMessage:t,path:T6(this.#e,n),projectionChanged:this.isDirectoryProjectionVisible(n),stale:!i}))),i})}cleanup(e={}){return F3(this.#e.instrumentation,`store.cleanup`,()=>{if(this.#e.transactionStack.length>0)throw Error(`Cleanup cannot run during an open batch or transaction.`);if(gBe(this.#e))throw Error(`Cleanup cannot run while directory loads are active.`);let t=Q6(this.#e),n=_Be(this.#e,e.mode??`stable`);return u6(this.#e,l6(this.#e,t,Hze({...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=j6(this.#e,p).childIds,_=m===d?n[m]??0:0,v=_,y,b=l.get(a)??R3(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=z3(H3(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(!k3(M6(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=M6(this.#e,n);a6(this.#e,n,i)||(o6(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=M6(this.#e,e);if(!a6(this.#e,e,t))return!1}return!0}requireDirectoryNodeId(e){let t=k6(this.#e,e);if(t==null)throw Error(`Path does not exist: "${e}"`);if(!k3(M6(this.#e,t)))throw Error(`Path is not a directory: "${e}"`);return t}resolveActiveDirectoryNodeId(e){try{if(!k3(M6(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=M6(this.#e,t).parentId;if(e!==this.#e.snapshot.rootId){let n=M6(this.#e,e),r=_6(this.#e,e);if(!a6(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 PBe(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}"`);break}}var FBe=e=>e.startsWith(`f::`)?e.slice(3):e;function IBe(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function LBe(e,t){return e===``?t:`${e}/${t}`}function RBe({files:e,path:t,isFolder:n,nextBasename:r}){let i=FBe(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}=IBe(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=LBe(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 zBe(e){return e.endsWith(`/`)}function BBe(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 VBe(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 HBe(e,t){return t.includes(e)?VBe(t):[e]}function UBe(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 u8(e,t){return{draggedPaths:e,target:t}}function d8(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(zBe(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function WBe(e,t){return t.kind===`root`||t.directoryPath==null?BBe(e):t.directoryPath}function GBe(e,t){let n=e.map(e=>{let n=WBe(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}}}var f8=Symbol(`FILE_TREE_RENAME_VIEW`);function p8(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}var KBe=512,qBe=512;function m8(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function h8(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 g8(e){return h8(e).at(-1)??null}function _8(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}var JBe=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},v8=e=>e.toLowerCase();function y8(e){return e.endsWith(`/`)}function YBe(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function b8(e){return e.endsWith(`/`)?e.slice(0,-1):e}function x8(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}function XBe(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 ZBe(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function S8(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 ZBe(e,t.path)?n?e:null:e;case`move`:return XBe(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=S8(r,e,n),r==null)return null;return r}}}function C8(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function QBe(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 w8(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(!QBe(l8.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 T8(e){switch(e.operation){case`add`:return{...C8(e),operation:`add`,path:e.path};case`remove`:return{...C8(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...C8(e),from:e.from,operation:`move`,to:e.to}}}function $Be(e){return{...C8(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>T8(e)),operation:`batch`}}function eVe(e){switch(e.operation){case`add`:case`remove`:case`move`:return T8(e);case`batch`:return $Be(e);default:return null}}function tVe(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=h8(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 nVe(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:tVe(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var rVe=class{#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=new Set;#z=0;#B;#V=0;#H=!1;#U=0;#W;constructor(e){let{dragAndDrop:t,fileTreeSearchMode:n,initialSearchQuery:r,initialSelectedPaths:i,renaming:a,onSearchChange:o,paths:s,preparedInput:c,...l}=e,u=w8({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.#B=this.#se(u.paths,u.preparedInput);let d=i?.map(e=>this.#Ae(e)).filter(e=>e!=null)??[],f=d.at(-1)??null;d.length>0&&(this.#R=new Set(d),this.#L=f,this.#z=1),this.#Oe(f,!1),r!=null&&this.#Se(r,!1),this.#W=this.#Fe()}destroy(){this.#W?.(),this.#W=null,this.#n.clear(),this.#t.clear(),this.#d.clear(),this.#i=null,this.#pe()}focusFirstItem(){this.#ve().length>0&&this.#Me(0)}focusLastItem(){this.#U<=0||(this.#Ne(),this.#Me(this.#U-1))}focusNextItem(){this.#De(1)}focusParentItem(){if(this.#c==null)return;let e=g8(this.#c);if(e==null)return;let t=this.#Y(e);t>=0&&this.#Me(t)}focusPath(e){let t=this.#B.getPathInfo(e)?.path??null;if(t==null)return;this.#Ne();let n=this.#Y(t);n>=0&&this.#Me(n)}focusNearestPath(e){let t=this.resolveNearestVisiblePath(e);if(t==null)return null;let n=this.#Y(t);return n>=0?(this.#Me(n),this.#ve()[n]??t):null}focusPreviousItem(){this.#De(-1)}getFocusedIndex(){return this.#s}getFocusedItem(){return this.#c==null?null:this.#X(this.#c)}getFocusedPath(){return this.#c}resolveNearestVisiblePath(e){let t=this.#ve();if(this.#U===0)return null;if(e==null)return this.#c??t[0]??null;let n=this.#B.getPathInfo(e)?.path??e,r=this.#Y(n);return r>=0?t[r]??n:this.#J(n)??this.#c??t[0]??null}getSelectedPaths(){return[...this.#R]}getSelectionVersion(){return this.#z}getVisibleCount(){return this.#U}getVisibleRows(e,t){if(t<e||this.#U===0)return[];let n=Math.max(0,e),r=Math.min(this.#U-1,t);if(r<n)return[];let i=r-n+1;if(this.#F==null&&!this.#l&&r>=this.#b.length&&i<=qBe){let e=[];for(let t=n;t<=r;t+=1){let n=this.#B.getVisibleRowContext(t);if(n==null)break;e.push(this.#Q(n))}return e}if(!this.#l&&r>=this.#b.length&&this.#Ne(),this.#F!=null){let e=Array.from({length:r-n+1},(e,t)=>this.#ye(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.#B.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.#ye(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.#Z(o,i,a,{ancestorPaths:this.#te(a),path:s})})}return this.#B.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.#Z(e,r,r,{ancestorPaths:this.#te(r),path:i})})}getStickyRowCandidates(e,t){if(this.#F!=null)return null;if(this.#U===0||e<=0||t<=0)return[];let n=[];for(let r=0;r<this.#U;r+=1){let i=e+r*t,a=Math.min(this.#U-1,Math.floor(i/t)),o=this.#$(a,r)??(a>0?this.#$(a-1,r):void 0);if(o==null)break;n.push({row:this.#Q(o),subtreeEndIndex:o.subtreeEndIndex})}return n}getItem(e){let t=this.#B.getPathInfo(e);return t==null?null:this.#X(t.path,t)}selectAllVisiblePaths(){this.#Ne();let e=[...this.#ve()];this.#re(e,this.#c??this.#L)}selectOnlyPath(e){let t=this.#Ae(e);t!=null&&this.#re([t],t)}selectPath(e){let t=this.#Ae(e);t==null||this.#R.has(t)||this.#re([...this.#R,t])}deselectPath(e){let t=this.#Ae(e);t==null||!this.#R.has(t)||this.#re([...this.#R].filter(e=>e!==t))}toggleFocusedSelection(){this.#c!=null&&this.togglePathSelectionFromInput(this.#c)}togglePathSelection(e){let t=this.#Ae(e);if(t!=null){if(this.#R.has(t)){this.deselectPath(t);return}this.selectPath(t)}}togglePathSelectionFromInput(e){let t=this.#Ae(e);if(t!=null){if(this.#R.has(t)){this.#re([...this.#R].filter(e=>e!==t),t);return}this.#re([...this.#R,t],t)}}selectPathRange(e,t){let n=this.#Ae(e);if(n==null)return;this.#Ne();let r=this.#L,i=r==null?-1:this.#be(r),a=this.#be(n);if(i===-1||a===-1){let e=t?[...this.#R,n]:[n];this.#re(e,n);return}let[o,s]=i<=a?[i,a]:[a,i],c=this.#ve().slice(o,s+1),l=t?[...this.#R,...c]:c;this.#re(l,r)}extendSelectionFromFocused(e){if(this.#c==null)return;let t=this.#s;if(t===-1)return;let n=Math.min(this.#U-1,Math.max(0,t+e));if(n===t)return;!this.#l&&n>=this.#b.length&&this.#Ne();let r=this.#ve(),i=r[t]??null,a=r[n]??null;if(i==null||a==null)return;let o=new Set(this.#R);o.has(i)&&o.has(a)?o.delete(i):o.add(a),this.#re([...o],this.#L??i,!1),this.#Me(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.#Ae(e);if(t==null||this.#M!=null&&this.#M.length>0)return!1;let n=this.getSelectedPaths(),r=HBe(t,n);return this.#r.canDrag?.(r)===!1?!1:(n.includes(t)||this.#re([t],t,!1),this.#je(t),this.#i={draggedPaths:r,primaryPath:t,target:null},this.#we(),!0)}setDragTarget(e){let t=this.#i;if(t==null)return;let n=e;if(n!=null){let e=u8(t.draggedPaths,n);(d8(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}UBe(t.target,n)||(this.#i={...t,target:n},this.#we())}cancelDrag(){this.#i!=null&&(this.#i=null,this.#we())}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.#we(),!1;let n=u8(e.draggedPaths,t);if(d8(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#we(),!1;let r=GBe(e.draggedPaths,t);if(r==null)return this.#we(),!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.#B.move(e.from,e.to,{collision:e.collision})}else this.#oe(r.operations),this.#B.batch(r.operations)}catch(e){return this.#we(),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.#B.add(e)}remove(e,t={}){this.#B.remove(e,t)}move(e,t,n={}){this.#B.move(e,t,n)}batch(e){this.#B.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.#Se(e,!0)}openSearch(e=``){this.#Se(e,!0)}closeSearch(){this.#Se(null,!0)}isSearchOpen(){return this.#M!==null}getSearchValue(){return this.#M??``}getSearchMatchingPaths(){return this.#k}focusNextSearchMatch(){this.#xe(1)}focusPreviousSearchMatch(){this.#xe(-1)}startRenaming(e=this.#c??``,t={}){if(!this.#w)return!1;let n=this.#B.getPathInfo(e);if(n==null)return!1;let r=n.path,i=y8(r),a=b8(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of h8(r))this.#B.isExpanded(e)||this.#B.expand(e);return this.#re([r],r,!1),this.#M!=null&&(this.#Se(null,!1),this.#y?.(this.#M)),this.#je(r),this.#T=r,this.#E=YBe(r),this.#D=t.removeIfCanceled??!1,this.#we(),!0}[f8](){return{cancel:()=>{this.#G()},commit:()=>{this.#K()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#q(e)}}}#G(){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,y8(e)?{recursive:!0}:void 0);return}this.#je(e),this.#we()}#K(){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,y8(e)?{recursive:!0}:void 0);return}let t=y8(e),n=RBe({files:this.#B.list(),isFolder:t,nextBasename:this.#E,path:b8(e)});if(this.#T=null,this.#E=``,this.#D=!1,`error`in n){this.#je(e),this.#v?.(n.error),this.#we();return}if(n.sourcePath===n.destinationPath){this.#je(e),this.#we();return}this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(x8(n.sourcePath,t),x8(n.destinationPath,t))}#q(e){this.#T==null||this.#E===e||(this.#E=e,this.#we())}resetPaths(e,t={}){let n=this.#B.list().length,r=this.#U,i=w8({paths:e,preparedInput:t.preparedInput},`resetPaths`,this.#e.sort),a=this.#se(i.paths,i.preparedInput,t.initialExpandedPaths),o=this.#c,s=this.#T,c=this.getSelectedPaths(),l=this.#L;this.#W?.(),this.#B=a,this.#d.clear(),this.#pe();let u=c.map(e=>a.getPathInfo(e)?.path??null).filter(e=>e!=null),d=!m8(this.#R,u);this.#R=new Set(u),d&&(this.#z+=1),this.#L=l==null?null:a.getPathInfo(l)?.path??null,this.#T=s==null?null:a.getPathInfo(s)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#Oe(o,o!=null||u.length>0||this.#L!=null),this.#W=this.#Fe(),this.#we(),this.#Te({canonicalChanged:!0,operation:`reset`,pathCountAfter:i.paths.length,pathCountBefore:n,projectionChanged:!0,usedPreparedInput:t.preparedInput!=null,visibleCountDelta:this.#U-r})}#J(e){this.#Ne();let t=g8(e),n=_8(e,t),r=null,i=null;for(let e of this.#ve()){if(g8(e)!==t)continue;let a=_8(e,t);if(a<n){r=e;continue}if(a>n){i=e;break}}return r??i}#Y(e){let t=this.#be(e);if(t!==-1)return t;let n=h8(e);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t==null)continue;let r=this.#be(t);if(r!==-1)return r}return this.#ve().length>0?0:-1}#X(e,t){let n=this.#d.get(e);if(n!=null)return n;let r=t??this.#B.getPathInfo(e);if(r==null)return null;let i=r.kind===`directory`?this.#ie(r.path):this.#ae(r.path);return this.#d.set(r.path,i),i}#Z(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.#R.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}}#Q(e){return this.#Z(e.row,e.index,e.index,{ancestorPaths:e.ancestorPaths,path:e.row.path,posInSet:e.posInSet,setSize:e.setSize})}#$(e,t){let n=this.#B.getVisibleRowContext(e);return n==null?void 0:n.ancestorRows[t]??(t===n.ancestorRows.length&&n.row.kind===`directory`&&n.row.isExpanded?n:void 0)}#ee(e){let t=this.#a.get(e);if(t!=null)return t;let n=this.#u(e),r=n<0?[]:[...this.#ee(n),n];return this.#a.set(e,r),r}#te(e){let t=this.#o.get(e);if(t!=null)return t;let n=this.#ee(e).map(e=>this.#b[e]??``).filter(e=>e!==``);return this.#o.set(e,n),n}#ne(e){this.#B.collapse(e)}#re(e,t=this.#L,n=!0){let r=[...new Set(e)],i=!m8(this.#R,r),a=this.#L!==t;!i&&!a||(this.#R=new Set(r),this.#L=t,i&&(this.#z+=1),n&&this.#we())}#ie(e){return{collapse:()=>{this.#ne(e)},deselect:()=>{this.deselectPath(e)},expand:()=>{this.#Ee(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!0,isExpanded:()=>this.#B.isExpanded(e),isFocused:()=>this.#c===e,isSelected:()=>this.#R.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)},toggle:()=>{this.#Ie(e)}}}#ae(e){return{deselect:()=>{this.deselectPath(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!1,isFocused:()=>this.#c===e,isSelected:()=>this.#R.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)}}}#oe(e){let t=this.#B.list();this.#se(t).batch(e)}#se(e,t,n){return new l8({...this.#e,paths:e,preparedInput:t??void 0,...n===void 0?{}:{initialExpandedPaths:n}})}#ce(){return this.#h??=this.#B.list(),this.#h}#le(){if(this.#m!=null)return this.#m;let e=new Set;for(let t of this.#ce()){e.add(t);for(let n of h8(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#ue(){return this.#g??=this.#ce().map(v8),this.#g}#de(){return this.#f??=this.#le().filter(e=>e.endsWith(`/`)),this.#f}#fe(){return this.#p??=this.#de().map(v8),this.#p}#pe(){this.#f=null,this.#p=null,this.#m=null,this.#h=null,this.#g=null}#me(){return this.#de().filter(e=>this.#B.isExpanded(e))}#he(e){let t=new Set(this.#j??[]);if(e)for(let e of this.#R)for(let n of h8(e))t.add(n);this.#ge(t)}#ge(e){this.#H=!0;try{for(let t of this.#de()){let n=e.has(t),r=this.#B.isExpanded(t);n&&!r?this.#B.expand(t):!n&&r&&this.#B.collapse(t)}}finally{this.#H=!1}}#_e(){let e=this.#b;if(this.#k=e.filter(e=>this.#O.has(e)),this.#M==null||this.#M.length===0||this.#A!==`hide-non-matches`||this.#O.size===0){this.#F=null,this.#I=null,this.#P=null,this.#U=this.#V;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.#U=n.length}#ve(){return this.#I??this.#b}#ye(e){return this.#F?.[e]??e}#be(e){return this.#P?.get(e)??this.#B.getVisibleIndex(e)??-1}#xe(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)}#Se(e,t){let n=e==null?null:JBe(e),r=this.#M;if(r!==n){if(r==null&&n!=null&&(this.#j=this.#me()),this.#M=n,n==null)this.#he(!0),this.#j=null,this.#O.clear(),this.#N=null,this.#Oe(this.#c,!0);else if(n.length===0)this.#he(!1),this.#O.clear(),this.#N=null,this.#Oe(this.#c,!0);else{let e=this.#Ce();this.#Oe(e,!0)}t&&(this.#y?.(this.#M),this.#we())}}#Ce(){if(this.#M==null||this.#M.length===0)return this.#O.clear(),this.#c;let e=this.#M,t=this.#ce(),n=this.#ue(),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.#de(),s=this.#fe();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 h8(e))l.add(t),c?.add(t)}return this.#ge(l),a??this.#c}#we(){for(let e of this.#t)e()}#Te(e){this.#n.get(e.operation)?.forEach(t=>{t(e)}),this.#n.get(`*`)?.forEach(t=>{t(e)})}#Ee(e){for(let t of h8(e))this.#B.isExpanded(t)||this.#B.expand(t);this.#B.isExpanded(e)||this.#B.expand(e)}#De(e){let t=this.#U;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.#Ne(),this.#Me(r))}#Oe(e,t=!0){let n=this.#B.getVisibleCount();this.#V=n;let r=nVe(this.#B.getVisibleTreeProjectionData(t?void 0:Math.min(n,KBe)),e,t?e=>this.#B.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.#_e(),this.#s=e==null?this.#ve().length>0?0:-1:this.#Y(e),this.#c=this.#s<0?null:this.#ke(this.#s)}#ke(e){return this.#ve()[e]??(this.#F==null?this.#B.getVisibleRowContext(e)?.row.path??null:null)}#Ae(e){return this.#B.getPathInfo(e)?.path??null}#je(e){if(e==null)return;let t=this.#Y(e);t>=0&&this.#Me(t,!1)}#Me(e,t=!0){let n=this.#ke(e);n!=null&&(this.#s===e&&this.#c===n||(this.#s=e,this.#c=n,t&&this.#we()))}#Ne(){this.#l||this.#Oe(this.#c,!0)}#Pe(e){let t=S8(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=S8(this.#c,e,!0),r=[...this.#R].map(t=>S8(t,e)).filter(e=>e!=null).map(e=>this.#B.getPathInfo(e)?.path??null).filter(e=>e!=null),i=S8(this.#L,e),a=i==null?null:this.#B.getPathInfo(i)?.path??null,o=[...new Set(r)];return m8(this.#R,o)||(this.#R=new Set(o),this.#z+=1),this.#L=a,n}#Fe(){return this.#B.on(`*`,e=>{if(this.#H)return;e.canonicalChanged&&(this.#d.clear(),this.#pe()),this.#i!=null&&p8(e)&&(this.#i=null);let t=p8(e)?this.#Pe(e):this.#c,n=this.#M!=null&&this.#M.length>0?this.#Ce():this.#M===``?this.#c:t,r=this.#M!=null||e.operation!==`expand`&&e.operation!==`collapse`;this.#Oe(n,r),this.#we();let i=eVe(e);i!=null&&this.#Te(i)})}#Ie(e){if(this.#B.isExpanded(e)){this.#ne(e);return}this.#Ee(e)}},iVe=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 aVe(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 oVe(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 sVe(e,t){return t?`${e}/`:e}function E8(e,t=null){let n=iVe(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;for(let t of e??[]){let e=aVe(t.path);if(e==null)continue;let n=sVe(e.path,e.isDirectory);r.set(n,t.status),t.status===`ignored`&&e.isDirectory?a.add(n):e.isDirectory&&a.delete(n);for(let t of oVe(e.path))i.add(t)}return{directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}var cVe=e=>e.trim().toLowerCase(),lVe=e=>e.split(`/`).at(-1)??e,uVe=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 D8(e,t){return typeof e==`string`?{name:e,remappedFrom:t}:{...e,remappedFrom:t}}function dVe(e){let t=n3(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(cVe(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 n=lVe(o),s=n.toLowerCase(),c=r.get(s);if(c!=null)return D8(c,e);for(let[t,n]of a)if(s.includes(t))return D8(n,e);let l=uVe(n);for(let t of l){let n=i.get(t);if(n!=null)return D8(n,e)}let u=KRe(t.set,n,l);if(u!=null&&t.set!==`none`)return{name:WRe(u),remappedFrom:e,token:u}}let s=n?.[e];return s==null?{name:e}:D8(s,e)}}}var O8,k8,A8,j8,M8,N8,P8,F8,I8,L8,R8={},z8=[],B8=Array.isArray,V8=z8.slice,H8=Object.assign;function U8(e){e&&e.parentNode&&e.remove()}function W8(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?V8.call(arguments,2):n),G8(e,o,r,i,null)}function G8(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??++k8,__i:-1,__u:0};return i==null&&O8.vnode!=null&&O8.vnode(a),a}function K8(e){return e.children}function q8(e,t){this.props=e,this.context=t,this.__g=0}function J8(e,t){if(t==null)return e.__?J8(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`?J8(e):null}function Y8(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 Y8(e)}}function X8(e){(8&e.__g||!(e.__g|=8)||!A8.push(e)||M8++)&&j8==O8.debounceRendering||((j8=O8.debounceRendering)||queueMicrotask)(fVe)}function fVe(){for(var e,t,n,r,i,a,o,s,c=1;A8.length;)A8.length>c&&A8.sort(N8),e=A8.shift(),c=A8.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=H8({},r)).__v=r.__v+1,O8.vnode&&O8.vnode(n),n5(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??J8(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,i5(a,n,o),n.__e!=i&&Y8(n)));M8=0}function Z8(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||z8,b=t.length;for(c=pVe(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?R8:y[m.__i]||R8,m.__i=f,_=n5(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&o5(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=Q8(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function pVe(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?G8(null,o,null,null,null):B8(o)?G8(K8,{children:o},null,null,null):o.constructor==null&&o.__b>0?G8(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=mVe(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=J8(s)),s5(s,s));return r}function Q8(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=Q8(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=J8(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function mVe(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;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 $8(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function e5(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||$8(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||$8(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(P8,`$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=F8,e.addEventListener(t,a?L8:I8,a)):e.removeEventListener(t,a?L8:I8,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 t5(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=F8++;else if(t.u<n.l)return;return n(O8.event?O8.event(t):t)}}}function n5(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,j,M=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=O8.__b)&&d(t);n:if(typeof M==`function`)try{if(v=t.props,y=`prototype`in M&&M.prototype.render,b=(d=M.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 M(v,x):(t.__c=f=new q8(v,x),f.constructor=M,f.render=gVe),b&&b.sub(f),f.props=v,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&&M.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=H8({},f.__s)),H8(f.__s,M.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&M.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&M.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=O8.__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=H8({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),E=d,d!=null&&d.type===K8&&d.key==null&&(E=a5(d.props.children)),s=Z8(e,B8(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(j=a.length;j--;)U8(a[j]);r5(t)}else t.__e=n.__e,t.__k=n.__k,e.then||r5(t);O8.__e(e,t,n)}else s=t.__e=hVe(n.__e,t,n,r,i,a,o,c,l,u);return(d=O8.diffed)&&d(t),128&t.__u?void 0:s}function r5(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(r5)}function i5(e,t,n){for(var r=0;r<n.length;r++)o5(n[r],n[++r],n[++r]);O8.__c&&O8.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){O8.__e(e,t.__v)}})}function a5(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:B8(e)?e.map(a5):H8({},e)}function hVe(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&&=(O8.__m&&O8.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=V8.call(e.childNodes),v=n.props||R8,!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;e5(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&&!_||e5(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=``),Z8(b==`template`?e.content:e,B8(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&J8(n,0),s,c,l),a!=null)for(u=a.length;u--;)U8(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||e5(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&e5(e,u,g,v[u],i))}return e}function o5(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){O8.__e(e,n)}}function s5(e,t,n){var r,i;if(O8.unmount&&O8.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||o5(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){O8.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&s5(r[i],t,n||typeof e.type!=`function`);n||U8(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function gVe(e,t,n){return this.constructor(e,n)}function c5(e,t){var n,r,i,a;t==document&&(t=document.documentElement),O8.__&&O8.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=W8(K8,null,[e]),i=[],a=[],n5(t,e,r||R8,R8,t.namespaceURI,r?null:t.firstChild?V8.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),i5(i,e,a)}function _Ve(e,t){e.__u|=32,c5(e,t)}O8={__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 M8=0,e}},k8=0,q8.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=H8({},this.state);typeof e==`function`&&(e=e(H8({},n),this.props)),e&&H8(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),X8(this))},q8.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),X8(this))},q8.prototype.render=K8,A8=[],M8=0,N8=function(e,t){return e.__v.__b-t.__v.__b},P8=/(PointerCapture)$|Capture$/i,F8=0,I8=t5(!1),L8=t5(!0);var vVe=0;Array.isArray;function l5(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:--vVe,__i:-1,__u:0,__source:i,__self:a};return O8.vnode&&O8.vnode(l),l}var yVe=16,bVe=16,xVe={};function u5({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}=xVe[e]??{width:yVe,height:bVe},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return l5(`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:l5(`use`,{href:c})})}var d5=e=>{if(e.length<2)return[e,``];let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]},SVe=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:Math.ceil(e.length/2);return[e.slice(0,r),e.slice(r)]},CVe=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)]},wVe=(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)]},TVe=(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)]},EVe=(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 DVe({children:e,marker:t,variant:n=`default`}){"use no memo";return l5(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:l5(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?l5(`span`,{"data-truncate-fade":!0}):t})})}function OVe(e){"use no memo";let{mode:t,children:n}=e;return l5(`div`,{children:[l5(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?l5(`span`,{children:n}):n}),l5(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?l5(`span`,{children:n}):n})]})}function f5({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=l5(OVe,{mode:t,children:e},`content`),o=l5(DVe,{marker:n,mode:t,variant:r},`marker`),s=l5(`div`,{"data-truncate-fill":!0},`fill`);return l5(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:l5(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function p5({children:e,...t}){"use no memo";return l5(f5,{mode:`truncate`,...t,children:e})}function m5({children:e,...t}){"use no memo";return l5(f5,{mode:`fruncate`,...t,children:e})}function kVe({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=l5(p5,{...s,children:t[0]}),l=l5(m5,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return l5(`div`,{className:a,style:o});if(e.length<i)return l5(n===`end`?m5:p5,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=d5:r===`extension`?t=SVe:r===`leaf-path`&&(t=CVe);else if(typeof r==`number`)t=wVe,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=TVe:e===`first`&&(t=EVe)}else typeof r==`function`&&(t=r);t??=d5;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=l5(p5,{...s,..._,children:f}),l=l5(m5,{...s,...v,children:p})}return l5(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[l5(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),l5(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var h5={endIndex:-1,startIndex:-1};function AVe(e,t,n){return Math.min(Math.max(e,t),n)}function g5(e,t){return e<0||t<e?h5:{endIndex:t,startIndex:e}}function _5(e){return e.startIndex<0||e.endIndex<e.startIndex}function jVe(e,t){return _5(e)?0:(e.endIndex-e.startIndex+1)*t}function v5(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function MVe(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function NVe(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 PVe(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 FVe(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 y5(e,t,n){if(e.length===0||t<=0)return[];let r=FVe(e),i=NVe(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=PVe(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 IVe(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=AVe(t.scrollTop,0,o),c=t.stickyRows??y5(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=v5(s,n,t.itemHeight),m=v5(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?h5:g5(m,MVe(u+d,n,t.itemHeight)),y=g+1,b=_5(v)?h5:g5(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=jVe(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:_5(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var LVe={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},RVe={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},zVe=`Contains git status items`;function BVe(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function VVe(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 HVe(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}}function UVe(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 WVe(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}var b5,x5,S5,C5,w5=Object.is,T5=0,E5=[],D5=O8,O5=D5.__b,k5=D5.__r,A5=D5.diffed,j5=D5.__c,M5=D5.unmount,N5=D5.__;function P5(e,t){D5.__h&&D5.__h(x5,e,T5||t),T5=0;var n=x5.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function F5(e){return T5=1,GVe(G5,e)}function GVe(e,t,n){var r=P5(b5++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):G5(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);w5(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=x5,!x5.__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,w5(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};x5.__f=!0;var a=x5.shouldComponentUpdate,o=x5.componentWillUpdate;x5.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)},x5.shouldComponentUpdate=i}return r.__N||r.__}function I5(e,t){var n=P5(b5++,3);!D5.__s&&W5(n.__H,t)&&(n.__=e,n.u=t,x5.__H.__h.push(n))}function L5(e,t){var n=P5(b5++,4);!D5.__s&&W5(n.__H,t)&&(n.__=e,n.u=t,x5.__h.push(n))}function R5(e){return T5=5,z5(function(){return{current:e}},[])}function z5(e,t){var n=P5(b5++,7);return W5(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function B5(e,t){return T5=8,z5(function(){return e},t)}function KVe(){for(var e;e=E5.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(H5),e.__H.__h.forEach(U5),e.__H.__h=[]}catch(t){e.__H.__h=[],D5.__e(t,e.__v)}}D5.__b=function(e){x5=null,O5&&O5(e)},D5.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),N5&&N5(e,t)},D5.__r=function(e){k5&&k5(e),b5=0;var t=(x5=e.__c).__H;t&&(S5===x5?(t.__h=[],x5.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(H5),t.__h.forEach(U5),t.__h=[],b5=0)),S5=x5},D5.diffed=function(e){A5&&A5(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(E5.push(t)!==1&&C5===D5.requestAnimationFrame||((C5=D5.requestAnimationFrame)||qVe)(KVe)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),S5=x5=null},D5.__c=function(e,t){t.some(function(e){try{e.__h.forEach(H5),e.__h=e.__h.filter(function(e){return!e.__||U5(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],D5.__e(n,e.__v)}}),j5&&j5(e,t)},D5.unmount=function(e){M5&&M5(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{H5(e)}catch(e){t=e}}),n.__H=void 0,t&&D5.__e(t,n.__v))};var V5=typeof requestAnimationFrame==`function`;function qVe(e){var t,n=function(){clearTimeout(r),V5&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);V5&&(t=requestAnimationFrame(n))}function H5(e){var t=x5,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),x5=t}function U5(e){var t=x5;e.__c=e.__(),x5=t}function W5(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!w5(t,e[n])})}function G5(e,t){return typeof t==`function`?t(e):t}function K5(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 q5(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 JVe({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return l5(`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 YVe(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:l5(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return l5(K8,{children:[l5(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:l5(p5,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function J5(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function Y5(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function X5(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 Z5({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=IVe(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:X5(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?X5(u,1,t,o):i&&r<=0&&c.length>0?y5(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 XVe=400,Q5=10,$5=40,e7=18;function ZVe(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))?QVe(e,t,n):a instanceof HTMLElement?a:null}function QVe(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 t7(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 n7(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 $Ve(){return navigator.vendor!==`Apple Computer, Inc.`}function eHe(e,t){let n=e-t.top;if(n<$5)return-Math.ceil(($5-Math.max(0,n))/$5*e7);let r=t.bottom-e;return r<$5?Math.ceil(($5-Math.max(0,r))/$5*e7):0}function tHe(e,t){if(e!=null){let t=LVe[e];return t==null?null:{text:t,title:RVe[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:zVe}:null}function nHe(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 r7(e){return e!=null&&`toggle`in e}function i7(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function a7(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function o7(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function rHe(e,t){return e!=null&&e>0?e:t}function iHe(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 aHe(e,t,n,r,i=0){let a=UVe({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a==null?!1:(e.scrollTop=a,!0)}function s7(e,t,n,r,i,a){let o=WVe({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o==null?!1:(e.scrollTop=o,!0)}function c7(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function oHe(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function l7(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function sHe(e,t){return t&&l7(e)||(e.ctrlKey||e.metaKey)&&i7(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var cHe=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function u7(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 lHe(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 uHe(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function dHe(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function d7(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function f7(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 fHe(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 pHe(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 mHe(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=pHe(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 p7(e,t){return{kind:e.kind,name:Y5(e),path:t}}function hHe(e){return e==null?void 0:`${e}__tree`}function m7(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function h7(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function g7(e,t){if(e==null)return null;if(`text`in e)return l5(`span`,{title:e.title,children:e.text});let n=typeof e.icon==`string`?h7(e.icon)?t(e.icon):{name:e.icon}:h7(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return l5(`span`,{title:e.title,children:l5(u5,{...n})})}function _7(e){e!=null&&K5(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function gHe(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=J5(e);return l5(K8,{children:[e.depth>0?l5(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>l5(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,l5(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?l5(u5,{...t(`file-tree-icon-chevron`)}):l5(u5,{...t(`file-tree-icon-file`,u)})}),l5(`div`,{"data-item-section":`content`,children:e.isFlattened?YVe(e,c,a):c??l5(kVe,{minimumLength:5,split:`extension`,children:e.name})}),i?l5(`div`,{"data-item-section":`decoration`,children:r==null?null:g7(r,t)}):null,s?l5(`div`,{"data-item-section":`git`,children:g7(o,t)}):null,n?l5(`div`,{"data-item-section":`action`,children:l?l5(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:l5(u5,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function v7(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:j,onRowClick:M,onKeyDown:N}=e,P=J5(t),{isParked:ee=!1,mode:F=`flow`,style:te}=r,ne=F===`sticky`,re=_?.get(P)??null??nHe(t.ancestorPaths,v,y),ie=t.kind===`directory`&&(b?.has(P)??!1),ae=A(t,P),oe=tHe(re,ie),I=S&&w,se=ae!=null||x||I,ce=I&&T===`always`,le=a.getPath()===P,ue=le?a.getValue():``,de=ne||!le?null:l5(JVe,{ref:D,ariaLabel:`Rename ${Y5(t)}`,isFlattened:t.isFlattened,value:ue,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),fe=gHe(t,k,{actionLaneEnabled:I,customDecoration:ae,decorationLaneEnabled:se,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:oe,gitLaneActive:x,renameInput:de,showDecorativeActionAffordance:ce}),pe={...VVe({ariaLabel:Y5(t),domId:t.isFocused?m7(h,P,ee):void 0,extraStyle:te,features:{actionLaneEnabled:I,contextMenuButtonVisibility:I?T:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:ee,itemHeight:g,mode:F,row:t,state:{containsGitChange:ie,effectiveGitStatus:re,isContextHovered:s===P,isDragTarget:l?.kind===`directory`&&l.directoryPath===P,isDragging:c?.has(P)===!0,isFocusRinged:t.isFocused&&o===P},targetPath:P}),key:n,onContextMenu:S||u?e=>{if(d()){e.preventDefault();return}S&&(e.preventDefault(),E&&(i.focusPath(P),j(t,P,{anchorRect:uHe(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:ne?void 0:()=>{i.focusPath(P)},onKeyDown:ne?void 0:N,ref:e=>{O(P,e)}};return!ne&&le?l5(`div`,{...pe,children:fe}):l5(`button`,{...pe,type:`button`,draggable:u&&!ee,onDragEnd:u&&!ee?p:void 0,onDragStart:u&&!ee?e=>{f(e,t,P)}:void 0,onMouseDown:e=>{if(ne){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!ee?e=>{m(e,t,P)}:void 0,onClick:e=>{M(e,t,P,F)},children:fe})}function _He(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(J5(e))).map((n,r)=>v7(e,n,t.start+r))}function y7({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=i3,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 _=R5(null),v=R5(null),y=R5(!1),b=R5(null),x=R5(null),S=R5(null),C=R5(null),w=R5(null),T=R5(new Map),E=R5(new Map),D=R5(()=>{}),O=R5(null),k=R5(!1),A=R5(null),j=R5(null),M=R5(!1),N=R5(null),P=R5(null),ee=R5(null),F=R5(null),te=R5(null),ne=R5(null),re=R5(null),ie=R5(null),ae=R5(!1),oe=R5(null),I=R5(null),se=R5(null),ce=R5(null),le=z5(()=>new Map,[]),[,ue]=F5(0),[de,fe]=F5(null),[pe,me]=F5(null),[he,ge]=F5(null),[_e,ve]=F5(null),[ye,be]=F5(0),[xe,Se]=F5(null),Ce=R5(xe);Ce.current=xe;let we=R5(null),Te=R5(null),Ee=R5(null),De=R5(null),Oe=R5(null),ke=R5(!1),Ae=()=>{Te.current=null,Ee.current=null,De.current=null},je=(e,t)=>{Te.current=e,Ee.current=null,De.current=t==null?null:{path:e,scrollTop:t}},Me=(e,t)=>{Te.current=null,Ee.current={path:e,viewportOffset:t},De.current=null},Ne=R5(d===`retain`&&t.isSearchOpen()),[Pe,Fe]=F5(p);I5(()=>{p||Fe(!1)},[p]);let Ie=R5(!1),Le=B5(()=>{Ie.current=!0,Fe(e=>e&&!1)},[]),[Re,ze]=F5(()=>Z5({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[Be,Ve]=F5(!1);I5(()=>{Ve(!0)},[]);let He=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,Ue=e?.contextMenu?.triggerMode??(He?`right-click`:`both`),We=Ue===`both`||Ue===`button`,Ge=e?.contextMenu?.buttonVisibility??`when-needed`,Ke=Ue===`both`||Ue===`right-click`;L5(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;Oe.current=t,me(t),ve(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(ke.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 qe=B5((e,t)=>{d7(T.current,e,t)},[]),Je=B5((e,t)=>{d7(E.current,e,t)},[]),Ye=B5(e=>{x.current=e},[]),Xe=B5(e=>f7(e,E.current,T.current),[]),Ze=n!=null||r!=null||i!=null,{resolveIcon:Qe}=z5(()=>dVe(a),[a]),L=t[f8](),R=L.getPath(),$e=R!=null,et=t.isSearchOpen(),tt=t.getSearchValue(),nt=t.getFocusedPath(),rt=t.getFocusedIndex(),it=t.isDragAndDropEnabled(),at=t.getDragSession(),ot=z5(()=>at==null?null:new Set(at.draggedPaths),[at]),st=at?.target??null,ct=at?.primaryPath??null,lt=hHe(o),{overlayHeight:ut,overlayRows:dt,snapshot:ft,visibleRows:pt}=Re,mt=ft.physical.viewportHeight,ht=z5(()=>({end:ft.window.endIndex,start:ft.window.startIndex}),[ft.window.endIndex,ft.window.startIndex]),gt=dt,_t=ft.sticky.rows,vt=ft.physical.totalHeight,yt=ft.sticky.height,bt=z5(()=>new Set(_t.map(e=>J5(e.row))),[_t]),xt=rt>=0&&rt>=ht.start&&rt<=ht.end,St=B5((e,t)=>u?.({item:p7(e,t),row:e})??null,[u]),Ct=B5(e=>K5(e==null?null:T.current.get(e)??null)?!0:K5(S.current),[]),wt=B5(e=>{Ct(t.focusNearestPath(e))},[t,Ct]),Tt=R5(wt);Tt.current=wt;let Et=R5(!0),Dt=R5(()=>{}),Ot=B5((t=!0)=>{let n=Ce.current;n!=null&&(Et.current=Et.current&&t,Se(null),e?.contextMenu?.onClose?.(),Et.current&&wt(n.path))},[e?.contextMenu,wt]);Dt.current=Ot;let kt=B5(e=>{let t=e==null?null:dHe(S.current,e);ge(e=>e===t?e:t)},[]),At=B5((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=Xe(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;je(n,e?.scrollTop??null),k.current=!0,fe(e=>e===n?e:n)}i.focus(),kt(a),Et.current=!0,Se({anchorRect:r?.anchorRect??null,item:p7(e,n),path:n,source:r?.source??`keyboard`})},[t,Xe,kt]),jt=B5(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=o7(e,mt);N.current=rt<0||e==null?null:Math.max(0,Math.min(rt*s-e.scrollTop,Math.max(0,t-s))),M.current=!0}t.startRenaming(e)!==!1&&(ve(`focus`),ue(e=>e+1))}},[t,rt,s,l,mt]),Mt=B5((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=o7(i,mt),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:Z5({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return k.current=!0,s7(i,a,s,l,u,d),D.current(),we.current=n?e:null,!0},[t,s,c,mt,h]),Nt=()=>y.current===!0||ce.current!=null||ae.current===!0,Pt=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),Ft=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},It=()=>{F.current!=null&&(clearTimeout(F.current),F.current=null),ee.current=null},Lt=()=>{ne.current?.remove(),ne.current=null},Rt=()=>{Ft(P.current),P.current=null,te.current=null},zt=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},Bt=()=>{ie.current?.(),ie.current=null,ce.current!=null&&(clearTimeout(ce.current),ce.current=null),ae.current=!1,oe.current=null,se.current=null,I.current!=null&&(I.current.setAttribute(`draggable`,`true`),I.current.style.removeProperty(`touch-action`),I.current=null),Lt(),It(),Rt(),re.current=null},Vt=(e,n)=>{let r=S.current?.getRootNode(),i=t7(ZVe(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},Ht=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){It();return}let r=t.getItem(e.directoryPath),i=r7(r)?r:null;if(i==null||i.isExpanded()){It();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;ee.current!==a&&(It(),ee.current=a,F.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind!==`directory`||n.directoryPath!==e.directoryPath||n.flattenedSegmentPath!==e.flattenedSegmentPath||i.expand()},n))},Ut=()=>{P.current=null;let e=te.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=eHe(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()),Ht(Vt(e.clientX,e.clientY)),P.current=Pt(Ut)},Wt=(e,t)=>{te.current={clientX:e,clientY:t},P.current??=Pt(Ut)},Gt=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(Bt(),Lt(),It(),Rt(),t.startDrag(r)===!1){e.preventDefault();return}if(re.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),$Ve())){let t=n7(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),zt(t),ne.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},Kt=()=>{Lt(),It(),Rt(),re.current=null,t.cancelDrag()},qt=(e,n,r)=>{if(ce.current!=null||ae.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;se.current={clientX:i.clientX,clientY:i.clientY},I.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!ae.current;ce.current!=null&&(clearTimeout(ce.current),ce.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),ie.current===o&&(ie.current=null),t&&(a.setAttribute(`draggable`,`true`),I.current===a&&(I.current=null),se.current=null)},s=e=>{let t=e.touches[0],n=se.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=Q5*Q5||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),ie.current=o,ce.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),I.current===a&&(I.current=null),se.current=null;return}ae.current=!0,I.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),re.current=n;let e=a.getBoundingClientRect(),s=n7(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`}),zt(s),ne.current=s,oe.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=oe.current;n!=null&&ne.current!=null&&(ne.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),Ht(Vt(t.clientX,t.clientY)),Wt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Vt(n.clientX,n.clientY),t.completeDrag(),Bt()},u=()=>{t.cancelDrag(),Bt()};ie.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)},XVe)},Jt=e=>{if(xe!=null){if(e.key===`Escape`){Ot(),e.preventDefault(),e.stopPropagation();return}cHe.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(L.isActive()){if(e.key===`Escape`)L.cancel();else if(e.key===`Enter`)L.commit();else return;ve(`focus`),ue(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){jt(nt??void 0),e.preventDefault(),e.stopPropagation();return}if(et){if(e.key===`Escape`)M.current=!1,N.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=o7(n,mt);N.current=rt<0||n==null?null:Math.max(0,Math.min(rt*s-n.scrollTop,Math.max(0,r-s))),M.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;ve(`focus`),ue(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&a7(e)){t.openSearch(e.key),ue(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=He&&l7(e),r=sHe(e,He),i=r&&S.current!=null?q5(S.current):null,a=r?new Set(fHe(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;je(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=r7(p)?p:null,h=u!=null&&(bt.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=f7(u,E.current,T.current);e==null||n==null?y=!1:At(e,u)}else if((e.ctrlKey||e.metaKey)&&i7(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;ve(`focus`);let b=t.getFocusedPath(),x=b!=null&&(bt.has(b)||a.has(b)),w=g&&b!==u,D=n&&c&&o===u&&b===u;if((h||D)&&b!=null&&(w&&x||D))je(b,v?.scrollTop??null),k.current=!0,fe(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(Me(b,mHe(S.current,v,i,u,s,yt,mt)),k.current=!0,fe(e=>e===b?e:b)):Ae()}ue(e=>e+1),e.preventDefault(),e.stopPropagation()};L5(()=>{if(!(!f||!et)){if(Ne.current){Ne.current=!1;return}K5(w.current)}},[et,f]),L5(()=>{let e=x.current;switch(BVe({hasRenderedInput:e!=null,previousRenamingPath:j.current,renamingPath:R})){case`reset`:j.current=null;return;case`reveal-canonical`:R!=null&&Mt(R,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(we.current=null,j.current=R,K5(e),e.select());return}},[ht.end,ht.start,R,Mt,bt]),L5(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=q5(e)?.dataset.itemPath??null;fe(e=>e===t?e:t)},i=()=>{n(),k.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,q5(e)!=null){r();return}k.current=!1,fe(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),k.current=!1,fe(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;fe(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),L5(()=>{let e=S.current;e!=null&&(ft.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[ft.physical.scrollTop]),L5(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;O.current=o7(n,g);let a=()=>{let e=t.getVisibleCount(),r=rHe(O.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),ze(Z5({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};D.current=a;let o=!1,l=t.subscribe(()=>{o?ue(e=>e+1):o=!0,a()}),u=()=>{ke.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,be(e=>e+1),e=null},50))},d=null,f=()=>{i!=null&&delete i.dataset.overlayReveal,d!=null&&(clearTimeout(d),d=null)},p=()=>{i==null||ke.current===!0||n.scrollTop>0||(i.dataset.overlayReveal=`true`,d!=null&&clearTimeout(d),d=setTimeout(()=>{f()},200))},m=()=>{if(a(),n.scrollTop>0&&f(),Ce.current!=null&&y.current&&Dt.current(),ke.current===!0){y.current=!1;return}me(e=>e==null?e:null),u()},_=()=>{u(),p()},v=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),x=e=>{v.has(e.key)&&_()};n.addEventListener(`scroll`,m,{passive:!0}),n.addEventListener(`wheel`,_,{passive:!0}),n.addEventListener(`touchmove`,_,{passive:!0}),n.addEventListener(`keydown`,x);let w=typeof ResizeObserver<`u`?new ResizeObserver(e=>{O.current=(e[0]==null?null:iHe(e[0]))??o7(n,g),a()}):null;return w?.observe(n),()=>{D.current=()=>{},l(),n.removeEventListener(`scroll`,m),n.removeEventListener(`wheel`,_),n.removeEventListener(`touchmove`,_),n.removeEventListener(`keydown`,x),e!=null&&clearTimeout(e),d!=null&&clearTimeout(d),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,O.current=null,w?.disconnect()}},[t,g,s,c,h]),L5(()=>{He||xe==null||Ot(!1)},[Ot,He,xe]);let Yt=z5(()=>xe==null?null:`${xe.path}::${xe.source}`,[xe]);L5(()=>{if(Yt==null){m?.clearSlotContent(X4);return}let t=Ce.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??lHe(n.getBoundingClientRect()),close:e=>{Dt.current(e?.restoreFocus??!0)},restoreFocus:()=>{Et.current&&Tt.current(Ce.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(X4,i),e?.contextMenu?.onOpen?.(t.item,r),_7(i),queueMicrotask(()=>{i==null||!i.isConnected||document.activeElement===i&&_7(i)}),()=>{m?.clearSlotContent(X4)}},[Yt,e?.contextMenu,m]),L5(()=>{xe!=null&&t.getItem(xe.path)==null&&Ot()},[Ot,xe,t]),L5(()=>{if(xe==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(u7(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&Ot())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),Ot())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[Ot,xe]),L5(()=>{let e=C.current,t=S.current;if(e==null||t==null){A.current=nt;return}let n=nt==null?null:T.current.get(nt)??null,r=q5(t),i=r?.dataset.itemPath??null,a=$e&&x.current===r,o=f&&w.current===r,c=M.current&&!et,l=N.current??0,u=we.current,d=Te.current,p=Ee.current,m=De.current,h=r!=null,g=k.current||h,_=A.current!==nt,v=d!=null&&d===nt&&nt!=null,y=c&&s7(e,rt,s,mt,vt,l),b=u!=null&&u===nt&&s7(e,rt,s,mt,vt,yt),E=p!=null&&p.path===nt&&s7(e,rt,s,mt,vt,p.viewportOffset),O=m!=null&&m.path===nt&&e.scrollTop!==m.scrollTop;if(O&&(e.scrollTop=m.scrollTop),(O||b||E||y||g&&_&&u!==nt&&!v&&aHe(e,rt,s,mt,yt))&&D.current(),!g){A.current=nt;return}if(a){A.current=nt;return}if(o&&!c){A.current=nt;return}if(n==null){c&&rt>=0&&(s7(e,rt,s,mt,vt,l),D.current()),A.current=nt;return}(_||c||u===nt||d===nt||p?.path===nt||m?.path===nt||i==null||i!==nt)&&(K5(n),u===nt&&(we.current=null),d===nt&&(Te.current=null),p?.path===nt&&(Ee.current=null),m?.path===nt&&(De.current=null),M.current=!1,N.current=null),A.current=nt},[t,rt,nt,xt,s,$e,et,ht,mt,f,yt,vt,pt]);let Xt=rt>=0&&rt>=ft.visible.startIndex&&rt<=ft.visible.endIndex,Zt=nt!=null&>.some(e=>J5(e.row)===nt),Qt=Xt||Zt,$t=We&&k.current===!0&&Qt?nt:null,en=_e===`pointer`?pe:null,tn=xe?.path??Oe.current??en??$t??pe,nn=xe?.source===`right-click`;L5(()=>{y.current&&xe==null||kt(Xe(tn))},[xe,Xe,ht,mt,ye,gt,tn,kt,pt]);let rn=B5(e=>{if(y.current||u7(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&&ve(e=>e===`pointer`?e:`pointer`),me(e=>e===i?e:i)},[]),an=B5(()=>{me(null)},[]);L5(()=>{if(!it)return;let e=()=>{Bt(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),Bt(),t.cancelDrag()}},[t,it]);let on=e=>{if(!it||t.getDragSession()==null||ae.current)return;let n=t7(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),Ht(t.getDragSession()?.target??null),Wt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},sn=e=>{if(!it||t.getDragSession()==null||ae.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(It(),Rt(),t.setDragTarget(null))},cn=e=>{!it||t.getDragSession()==null||ae.current||(e.preventDefault(),Vt(e.clientX,e.clientY),t.completeDrag(),Lt(),It(),Rt(),re.current=null)},ln=ft.window.height,un=ft.window.offsetTop,dn=Math.min(0,mt-ln-yt),fn=de===nt||M.current,pn=nt!=null&&fn&&!xt&&rt>=0?pt[rt]??t.getVisibleRows(rt,rt)[0]??null:null,mn=pn==null?null:c7(rt,s,ht,ln),hn=re.current,gn=ct!=null&&hn!=null&&hn.path===ct&&hn.index>=ht.start&&hn.index<=ht.end,_n=ct!=null&&hn!=null&&hn.path===ct&&!gn&&hn.path!==pn?.path?hn:null,vn=_n==null?null:c7(_n.index,s,ht,ln),yn=oHe((rt>=0?pt[rt]??t.getVisibleRows(rt,rt)[0]??null:null)?.ancestorPaths.at(-1)??null),bn=et&&nt!=null?m7(o,nt,!xt):void 0,xn=xe?.path??(et?nt:de),Sn=xe?.path??pe,Cn=Xe(tn),wn=He&&We&&!nn&&!$e&&Cn!=null&&he!=null&&tn!=null,Tn=He&&(wn||xe!=null),En=xe?.anchorRect,Dn=En==null&&Cn!=null&&he!=null&&(xe!=null||wn)?he:null,On=En==null?Dn==null?void 0:{top:`${Dn}px`}:{left:`${En.left}px`,position:`fixed`,right:`auto`,top:`${En.top}px`},kn=nn?{opacity:`0`}:void 0,An=B5((e,n,r,i)=>{let a=t.getItem(r),o=HVe({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:t.isSearchOpen(),mode:i});switch(o.selection.kind){case`range`:t.selectPathRange(r,o.selection.additive);break;case`toggle`:t.togglePathSelectionFromInput(r);break;case`single`:t.selectOnlyPath(r);break}let s=e.currentTarget instanceof HTMLElement?e.currentTarget:null,c=n.index>=ft.visible.startIndex&&n.index<=ft.visible.endIndex,l=i===`flow`&&c&&s!=null&&s.dataset.itemParked!==`true`;a?.focus(),l&&(k.current=!0,fe(e=>e===r?e:r),ve(`focus`)),o.toggleDirectory&&r7(a)&&a.toggle(),o.closeSearch&&t.closeSearch(),o.revealCanonical&&Mt(r,{targetOffset:`sticky-parents`})},[t,ft.visible.endIndex,ft.visible.startIndex,Mt]),jn=()=>{if(y.current||!We||tn==null||Cn==null)return;let e=t.getItem(tn);e!=null&&(kt(Cn),Et.current=!0,Se({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:Cn.getAttribute(`aria-label`)??tn,path:e.getPath()},path:e.getPath(),source:`button`}))},Mn={contextHoverPath:Sn,contextMenuButtonTriggerEnabled:We,contextMenuButtonVisibility:Ge,contextMenuEnabled:He,contextMenuRightClickEnabled:Ke,contextMenuTriggerMode:Ue,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:it,draggedPathSet:ot,dragTarget:st,gitLaneActive:Ze,gitStatusByPath:n,handleRowDragEnd:Kt,handleRowDragStart:Gt,handleRowTouchStart:qt,ignoredGitDirectories:r,ignoredInheritanceCache:le,instanceId:o,itemHeight:s,onKeyDown:Jt,onRowClick:An,openContextMenuForRow:At,registerButton:qe,registerRenameInput:Ye,renameView:L,renderDecorationForRow:St,resolveIcon:Qe,shouldSuppressContextMenu:Nt,visualFocusPath:xn},Nn={...Mn,registerButton:Je};return l5(`div`,{ref:S,id:lt,"data-file-tree-context-menu-button-visibility":He&&We?Ge:void 0,"data-file-tree-context-menu-trigger-mode":He?Ue:void 0,"data-file-tree-has-context-menu-action-lane":He&&We?`true`:void 0,"data-file-tree-has-git-lane":Ze?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:it?sn:void 0,onDragOver:it?on:void 0,onDrop:it?cn:void 0,onKeyDown:Jt,onPointerLeave:He?an:void 0,onPointerOver:He?rn:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[l5(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:yn}}),l5(`slot`,{name:Y4,"data-type":`header-slot`}),f?l5(`div`,{"data-file-tree-search-container":!0,"data-open":et?`true`:`false`,children:l5(`input`,{ref:w,"aria-activedescendant":bn,"aria-controls":lt,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":Pe?`true`:void 0,value:tt,onBlur:()=>{d===`retain`&&!Ie.current||t.closeSearch()},onFocus:Le,onPointerDown:Le,onInput:e=>{Le();let n=e.currentTarget;t.setSearch(n.value)}})}):null,l5(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&Be&>.length>0?l5(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:l5(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${ut}px`},children:gt.map((e,t)=>v7(Nn,e.row,`sticky:${J5(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${gt.length-t}`}}))})}):null,l5(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${vt}px`},children:[l5(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${un}px`}}),l5(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${ln}px`,top:`${dn}px`,bottom:`${dn}px`},children:[_He(Mn,ht,bt),pn!=null&&mn!=null?v7(Mn,pn,`parked:${pn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:ct===pn.path?`none`:void 0,position:`absolute`,right:`0`,top:`${mn}px`}}):null,_n!=null&&vn!=null?v7(Mn,_n,`parked-drag:${_n.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${vn}px`}}):null]})]})]}),He?l5(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":Tn?`true`:`false`,style:On,children:[l5(`button`,{ref:v,type:`button`,"data-type":PLe,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":xe==null?`false`:`true`,"data-visible":wn?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),xe!=null){Ot();return}jn()},tabIndex:-1,style:kn,children:l5(u5,{...Qe(`file-tree-icon-ellipsis`)})}),xe==null?null:l5(`slot`,{name:X4})]}):null,xe==null?null:l5(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),Ot()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),Ot()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var b7={hydrateRoot:(e,t)=>{_Ve(W8(y7,t),e)},renderRoot:(e,t)=>{c5(W8(y7,t),e)},unmountRoot:e=>{c5(null,e)}};function x7(e,t){b7.renderRoot(e,t)}function vHe(e,t){b7.hydrateRoot(e,t)}function yHe(e){b7.unmountRoot(e)}var bHe=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)}}},S7=`__c`,xHe=`__k`,C7=`__d`,w7=`__s`,T7=/[\s\n\\/='"\0<>]/,E7=/^(xlink|xmlns|xml)([A-Z])/,SHe=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,CHe=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,wHe=new Set([`draggable`,`spellcheck`]);function D7(e){e.__g===void 0?e[C7]=!0:e.__g|=8}function THe(e){e.__g===void 0?e[C7]=!1:e.__g&=-9}function O7(e){return e.__g===void 0?!0===e[C7]:!!(8&e.__g)}var EHe=/["&<]/;function k7(e){if(e.length===0||!1===EHe.test(e))return e;for(var t=0,n=0,r=``,i=``;n<e.length;n++){switch(e.charCodeAt(n)){case 34:i=`"`;break;case 38:i=`&`;break;case 60:i=`<`;break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=i,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var A7={},DHe=new Set(`animation-iteration-count.border-image-outset.border-image-slice.border-image-width.box-flex.box-flex-group.box-ordinal-group.column-count.fill-opacity.flex.flex-grow.flex-negative.flex-order.flex-positive.flex-shrink.flood-opacity.font-weight.grid-column.grid-row.line-clamp.line-height.opacity.order.orphans.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.widows.z-index.zoom`.split(`.`)),OHe=/[A-Z]/g;function kHe(e){var t=``;for(var n in e){var r=e[n];if(r!=null&&r!==``){var i=n[0]==`-`?n:A7[n]||(A7[n]=n.replace(OHe,`-$&`).toLowerCase()),a=`;`;typeof r!=`number`||i.startsWith(`--`)||DHe.has(i)||(a=`px;`),t=t+i+`:`+r+a}}return t||void 0}function j7(){this.__d=!0}function AHe(e,t){return{__v:e,context:t,props:e.props,setState:j7,forceUpdate:j7,__d:!0,__h:[]}}function M7(e,t,n){if(!e.s){if(n instanceof jHe){if(!n.s)return void(n.o=M7.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(M7.bind(null,e,t),M7.bind(null,e,2));e.s=t,e.v=n;let r=e.o;r&&r(e)}}var jHe=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,i=this.s;if(i){var a=1&i?t:n;if(a){try{M7(r,1,a(this.v))}catch(e){M7(r,2,e)}return r}return this}return this.o=function(e){try{var i=e.v;1&e.s?M7(r,1,t?t(i):i):n?M7(r,1,n(i)):M7(r,2,i)}catch(e){M7(r,2,e)}},r},e}(),N7,P7,F7,I7,L7={},R7=Array.isArray,z7=Object.assign,B7=``,V7=`<!--$s-->`,H7=`<!--/$s-->`;function U7(e,t){var n,r=e.type,i=!0;return e[S7]?(i=!1,(n=e[S7]).state=n[w7]):n=new r(e.props,t),e[S7]=n,n.__v=e,n.props=e.props,n.context=t,D7(n),n.state??=L7,n[w7]??(n[w7]=n.state),r.getDerivedStateFromProps?n.state=z7({},n.state,r.getDerivedStateFromProps(n.props,n.state)):i&&n.componentWillMount?(n.componentWillMount(),n.state=n[w7]===n.state?n.state:n[w7]):!i&&n.componentWillUpdate&&n.componentWillUpdate(),F7&&F7(e),n.render(n.props,n.state,t)}function W7(e,t,n,r,i,a,o){if(e==null||!0===e||!1===e||e===B7)return B7;var s=typeof e;if(s!=`object`)return s==`function`?B7:s==`string`?k7(e):e+B7;if(R7(e)){var c,l=B7;i[xHe]=e;for(var u=e.length,d=0;d<u;d++){var f=e[d];if(f!=null&&typeof f!=`boolean`){var p,m=W7(f,t,n,r,i,a,o);typeof m==`string`?l+=m:(c||=Array(u),l&&c.push(l),l=B7,R7(m)?(p=c).push.apply(p,m):c.push(m))}}return c?(l&&c.push(l),c):l}if(e.constructor!==void 0)return B7;e.__=i,N7&&N7(e);var h=e.type,g=e.props;if(typeof h==`function`){var _,v,y,b=t;if(h===K8){if(`tpl`in g){for(var x=B7,S=0;S<g.tpl.length;S++)if(x+=g.tpl[S],g.exprs&&S<g.exprs.length){var C=g.exprs[S];if(C==null)continue;typeof C!=`object`||C.constructor!==void 0&&!R7(C)?x+=C:x+=W7(C,t,n,r,e,a,o)}return x}if(`UNSTABLE_comment`in g)return`<!--`+k7(g.UNSTABLE_comment)+`-->`;v=g.children}else{if((_=h.contextType)!=null){var w=t[_.__c];b=w?w.props.value:_.__}var T=h.prototype&&typeof h.prototype.render==`function`;if(T)v=U7(e,b),y=e[S7];else{e[S7]=y=AHe(e,b);for(var E=0;O7(y)&&E++<25;){THe(y),F7&&F7(e);try{v=h.call(y,g,b)}catch(t){throw a&&t&&typeof t.then==`function`&&(e._suspended=!0),t}}D7(y)}if(y.getChildContext!=null&&(t=z7({},t,y.getChildContext())),T&&O8.errorBoundaries&&(h.getDerivedStateFromError||y.componentDidCatch)){v=v!=null&&v.type===K8&&v.key==null&&v.props.tpl==null?v.props.children:v;try{return W7(v,t,n,r,e,a,!1)}catch(i){return h.getDerivedStateFromError&&(y[w7]=h.getDerivedStateFromError(i)),y.componentDidCatch&&y.componentDidCatch(i,L7),O7(y)?(v=U7(e,t),(y=e[S7]).getChildContext!=null&&(t=z7({},t,y.getChildContext())),W7(v=v!=null&&v.type===K8&&v.key==null&&v.props.tpl==null?v.props.children:v,t,n,r,e,a,o)):B7}finally{P7&&P7(e),I7&&I7(e)}}}v=v!=null&&v.type===K8&&v.key==null&&v.props.tpl==null?v.props.children:v;try{var D=W7(v,t,n,r,e,a,o);return P7&&P7(e),O8.unmount&&O8.unmount(e),e._suspended?typeof D==`string`?V7+D+H7:R7(D)?(D.unshift(V7),D.push(H7),D):D.then(function(e){return V7+e+H7}):D}catch(i){if(!a&&o&&o.onError){var O=function i(s){return o.onError(s,e,function(e,s){try{return W7(e,t,n,r,s,a,o)}catch(e){return i(e)}})}(i);if(O!==void 0)return O;var k=O8.__e;return k&&k(i,e),B7}if(!a||!i||typeof i.then!=`function`)throw i;return i.then(function i(){try{var s=W7(v,t,n,r,e,a,o);return e._suspended?V7+s+H7:s}catch(e){if(!e||typeof e.then!=`function`)throw e;return e.then(i)}})}}var A,j=`<`+h,M=B7;for(var N in g){var P=g[N];if(typeof(P=NHe(P)?P.value:P)!=`function`||N===`class`||N===`className`){switch(N){case`children`:A=P;continue;case`key`:case`ref`:case`__self`:case`__source`:continue;case`htmlFor`:if(`for`in g)continue;N=`for`;break;case`className`:if(`class`in g)continue;N=`class`;break;case`defaultChecked`:N=`checked`;break;case`defaultSelected`:N=`selected`;break;case`defaultValue`:case`value`:switch(N=`value`,h){case`textarea`:A=P;continue;case`select`:r=P;continue;case`option`:r!=P||`selected`in g||(j+=` selected`)}break;case`dangerouslySetInnerHTML`:M=P&&P.__html;continue;case`style`:typeof P==`object`&&(P=kHe(P));break;case`acceptCharset`:N=`accept-charset`;break;case`httpEquiv`:N=`http-equiv`;break;default:if(E7.test(N))N=N.replace(E7,`$1:$2`).toLowerCase();else{if(T7.test(N))continue;N[4]!==`-`&&!wHe.has(N)||P==null?n?CHe.test(N)&&(N=N===`panose1`?`panose-1`:N.replace(/([A-Z])/g,`-$1`).toLowerCase()):SHe.test(N)&&(N=N.toLowerCase()):P+=B7}}P!=null&&!1!==P&&(j=!0===P||P===B7?j+` `+N:j+` `+N+`="`+(typeof P==`string`?k7(P):P+B7)+`"`)}}if(T7.test(h))throw Error(h+` is not a valid HTML tag name in `+j+`>`);if(M||(typeof A==`string`?M=k7(A):A!=null&&!1!==A&&!0!==A&&(M=W7(A,t,h===`svg`||h!==`foreignObject`&&n,r,e,a,o))),P7&&P7(e),I7&&I7(e),!M&&MHe.has(h))return j+`/>`;var ee=`</`+h+`>`,F=j+`>`;return R7(M)?[F].concat(M,[ee]):typeof M==`string`?F+M+ee:[F,M,ee]}var MHe=new Set([`area`,`base`,`br`,`col`,`command`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`]);function NHe(e){return typeof e==`object`&&!!e&&typeof e.peek==`function`&&`value`in e}var G7=0;function PHe(e){return e!=null&&e.length>0?e:(G7+=1,`pst_ft_${G7}`)}function FHe({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??i3)}function K7(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 q7(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 J7(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var IHe=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new bHe;#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=PHe(a),this.#p=E8(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=JRe(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new rVe({...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&&(yHe(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()}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)}focusNearestPath(e){return this.#t.focusNearestPath(e)}add(e){this.#t.add(e)}batch(e){this.#t.batch(e)}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){this.#t.resetPaths(e,t)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),x7(t.wrapper,this.#w()))}setGitStatus(e){this.#p=E8(e,this.#p);let t=this.#T();t!=null&&x7(t.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),x7(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),vHe(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),x7(r,this.#w())}#C(){return{initialViewportHeight:FHe({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(Y4,e());return}this.#l.setSlotHtml(Y4,this.#e?.header?.html??null)}#k(e){let t=J7(e).find(e=>q7(e)),n=K7(URe(n3(this.#m).set));n!=null&&(t!=null&&t.outerHTML===n.outerHTML||(t==null?e.prepend(n):t.replaceWith(n)))}#A(e){let t=J7(e),n=t.find(e=>q7(e)),r=t.filter(e=>e!==n),i=n3(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=K7(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=n3(this.#m);t.colored&&GRe(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${q4}]`);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(q4,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=YRe(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 u3(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 LHe(e){let t=(0,L.useRef)(null);return t.current??=new IHe(e),(0,L.useEffect)(()=>{let e=t.current;return()=>{e?.cleanUp(),t.current=null}},[]),{model:t.current}}var RHe={"--trees-accent-override":`var(--ring)`,"--trees-bg-muted-override":`color-mix(in srgb, var(--muted) 45%, transparent)`,"--trees-bg-override":`transparent`,"--trees-border-color-override":`var(--border)`,"--trees-fg-muted-override":`var(--muted-foreground)`,"--trees-fg-override":`var(--foreground)`,"--trees-focus-ring-color-override":`var(--ring)`,"--trees-font-family-override":`var(--font-sans)`,"--trees-font-size-override":`var(--text-sm)`,"--trees-item-margin-x-override":`0`,"--trees-padding-inline-override":`0`,"--trees-scrollbar-thumb-override":`color-mix(in srgb, var(--muted-foreground) 35%, transparent)`,"--trees-selected-bg-override":`color-mix(in srgb, var(--accent) 65%, transparent)`,"--trees-selected-fg-override":`var(--foreground)`,"--trees-selected-focused-border-color-override":`var(--ring)`,height:`100%`};function zHe({controller:e,filesError:t,isFilesLoading:n}){let{closeSearch:r,filteredFiles:i,isSearchOpen:a,loadedFiles:o,model:s,searchQuery:c,setSearchQuery:l}=e,u=gJ(),d=(0,L.useRef)(null);(0,L.useEffect)(()=>{a&&d.current?.focus()},[a]);let f=(0,L.useMemo)(()=>({...RHe,colorScheme:u}),[u]),p;return p=t?(0,R.jsx)(hP,{message:t.message,messageClassName:`text-destructive`}):n&&o.length===0?(0,R.jsx)(hP,{icon:`Spinner`,message:`Loading files...`,iconClassName:`animate-spin`}):o.length===0?(0,R.jsx)(hP,{message:`No files yet.`}):i.length===0?(0,R.jsx)(hP,{message:`No files match search.`}):(0,R.jsx)(zLe,{"aria-label":`Thread storage file tree`,className:`block h-full min-h-0`,model:s,style:f}),(0,R.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-1`,children:[a?(0,R.jsxs)(`div`,{className:`flex h-7 shrink-0 items-center gap-2`,children:[(0,R.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,R.jsx)(V,{name:`Search`,className:`pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground`}),(0,R.jsx)(Z_,{ref:d,"aria-label":`Search files`,className:`h-7 pl-7 pr-2 text-xs focus-visible:ring-0`,placeholder:`Search files`,value:c,onChange:e=>l(e.target.value),onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),r())}})]}),(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:`h-7 w-7 shrink-0 rounded-md p-0 text-muted-foreground`,"aria-label":`Close search`,onClick:r,children:(0,R.jsx)(V,{name:`X`,className:`size-3.5`})})]}):null,(0,R.jsx)(`div`,{className:`min-h-0 flex-1`,children:p})]})}function BHe(e){return e?.type===`standard`&&e.parentThreadId===null}function Y7({currentThreadId:e,isManagerThread:t,managerThreads:n,parentThreadDisplayName:r,parentThreadId:i}){if(!e||t)return[];let a=[{value:`none`,label:`None`}],o=new Set([`none`]),s=(t,n)=>{!t||t===e||o.has(t)||(o.add(t),a.push({value:t,label:n}))};s(i??void 0,r??`Manager`);for(let e of n)s(e.id,e.title?.trim()?e.title:`Manager`);return a}function VHe({thread:e,projectId:t,parentThreadDisplayName:n,managerThreads:r,canAssignToManager:i,canTakeOverThread:a,updateThreadPending:o,onAssignManager:s,defaultOpen:c}){let l=e.type===`manager`,u=e.parentThreadId??void 0,d=(0,L.useMemo)(()=>Y7({currentThreadId:e.id,isManagerThread:l,managerThreads:r,parentThreadDisplayName:n,parentThreadId:u}),[l,r,n,u,e.id]),f=u??`none`,p=d.find(e=>e.value===f)?.label;return l||!u&&!i&&!a?null:(0,R.jsx)(Z2,{label:`Manager`,valueClassName:`min-w-0`,children:u?(0,R.jsxs)(`div`,{className:`inline-flex max-w-full min-w-0 items-center gap-1 text-xs text-foreground`,children:[(0,R.jsx)(Ih,{to:`/projects/${t}/threads/${u}`,className:`min-w-0 truncate text-xs text-foreground no-underline transition-[text-decoration-color] duration-150 hover:underline hover:underline-offset-2`,children:p??`Manager`}),(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:`size-3.5 shrink-0 rounded-full p-0 text-muted-foreground hover:bg-transparent hover:text-foreground [&_svg]:size-3`,disabled:o,onClick:()=>{s(null)},"aria-label":`Unassign manager`,children:(0,R.jsx)(V,{name:`X`})})]}):(0,R.jsxs)(oP,{defaultOpen:c,children:[(0,R.jsx)(sP,{asChild:!0,children:(0,R.jsxs)(`div`,{role:`button`,tabIndex:o||d.length<=1&&f===`none`?-1:0,className:`inline-flex w-fit max-w-full min-w-0 items-center gap-1 rounded-md px-0 text-xs leading-tight text-foreground outline-none ring-sidebar-ring transition-colors hover:text-foreground focus-visible:ring-2`,children:[(0,R.jsx)(`span`,{className:`min-w-0 truncate text-xs text-foreground`,children:p??`None`}),(0,R.jsx)(V,{name:`ChevronDown`,className:`size-3.5 shrink-0 text-muted-foreground`})]})}),(0,R.jsxs)(cP,{align:`start`,className:`min-w-40 max-w-72`,children:[(0,R.jsx)(fP,{children:`Assign to manager`}),d.map(e=>(0,R.jsxs)(uP,{onSelect:()=>{s(e.value===`none`?null:e.value)},className:`flex items-center justify-between gap-3`,children:[(0,R.jsx)(`span`,{className:`truncate`,title:e.label,children:e.label}),(0,R.jsx)(V,{name:`Check`,className:f===e.value?B(`opacity-100`,j_):B(`opacity-0`,j_)})]},e.value))]})]})})}function HHe({thread:e}){return e.type===`manager`?(0,R.jsx)(Z2,{label:`Kind`,valueClassName:`min-w-0 truncate`,children:`Manager`}):null}function UHe({environmentHost:e,environment:t,environmentIsLocal:n}){if(!e)return null;let r=t?n:void 0,i=e.status===`connected`;return(0,R.jsx)(Z2,{label:`Host`,valueClassName:`min-w-0 truncate`,children:(0,R.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`truncate`,children:e.name}),r?(0,R.jsx)(H0,{}):null,(0,R.jsx)(K0,{connected:i})]})})}function WHe({thread:e,environment:t,environmentHost:n,environmentIsLocal:r}){return e.type===`manager`||!t?null:(0,R.jsx)(Z2,{label:`Environment`,valueClassName:`min-w-0 truncate`,children:MD({environment:t,isLocalHost:r,hostName:n?.name}).modeLabel})}function GHe(e){return e.isWorktree||e.workspaceProvisionType===`managed-worktree`}function KHe({thread:e,environment:t}){return e.type===`manager`||!t?.path||!GHe(t)?null:(0,R.jsx)(Z2,{label:`Worktree path`,valueClassName:`min-w-0`,children:(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`min-w-0 truncate`,title:t.path,children:t.path}),(0,R.jsx)(vB,{text:t.path,label:`Copy worktree path`,className:`size-5 shrink-0`,iconClassName:`size-3.5`})]})})}function qHe({thread:e,workspaceStatus:t}){let n=t?.branch.currentBranch??null,[r,i]=(0,L.useState)(!1);(0,L.useEffect)(()=>{if(!r)return;let e=window.setTimeout(()=>{i(!1)},2e3);return()=>window.clearTimeout(e)},[r]);let a=(0,L.useCallback)(async()=>{n&&await I4(n,{successMessage:`Branch name copied`,errorMessage:`Failed to copy branch name`})&&i(!0)},[n]);return e.type===`manager`||!n?null:(0,R.jsx)(Z2,{label:`Branch`,valueClassName:`min-w-0 truncate`,children:(0,R.jsxs)(`button`,{type:`button`,className:`inline-flex max-w-full items-center gap-1.5 rounded-md text-left text-foreground transition-colors hover:text-foreground/80`,onClick:()=>{a()},"aria-label":`Copy branch name`,title:`Copy branch name`,children:[(0,R.jsx)(`span`,{className:`truncate`,children:n}),r?(0,R.jsx)(V,{name:`Check`,className:`size-3.5 shrink-0 text-muted-foreground`}):(0,R.jsx)(V,{name:`Copy`,className:`size-3.5 shrink-0 text-muted-foreground`})]})})}function JHe({thread:e,workspaceStatus:t,selectedMergeBaseBranch:n,mergeBaseBranchOptions:r,isLoadingMergeBaseBranchOptions:i,onMergeBaseBranchChange:a,defaultOpen:o}){let s=n??t?.mergeBase?.mergeBaseBranch??t?.branch.defaultBranch,c=s,l=(0,L.useMemo)(()=>R0({mergeBaseBranch:c,mergeBaseBranchOptions:r}),[c,r]),u=!!(s||t?.branch.defaultBranch),d=t?.branch.currentBranch!=null&&t.branch.currentBranch===t.branch.defaultBranch,f=u&&!!c&&!d;return e.type===`manager`||!f?null:(0,R.jsx)(Z2,{label:`Merge base`,valueClassName:`min-w-0 truncate`,children:c&&l.length>0&&c?(0,R.jsx)(B0,{value:c,options:l,variant:`minimal`,loading:i,onChange:a,className:`max-w-full`,defaultOpen:o}):c})}function YHe({thread:e,environment:t,workspaceStatus:n,workspaceStatusError:r,selectedMergeBaseBranch:i}){let a=e.type!==`manager`,o=t?.status===`destroyed`;if(!(a&&(n||r||o)&&!(e.archivedAt!=null&&t?.managed!==!0)))return null;let s=i??n?.mergeBase?.mergeBaseBranch??n?.branch.defaultBranch,c=g4(n,{mergeBaseBranch:s,showBranchComparison:!!(s||n?.branch.defaultBranch),error:r,workspaceDeleted:o}),l=n?.workingTree.state===`untracked`?`text-muted-foreground`:`text-foreground`;return(0,R.jsx)(Z2,{label:`Git status`,align:`start`,valueClassName:`min-w-0`,children:(0,R.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-2 whitespace-nowrap`,title:`${c.label} ${c.summary}`,children:[(0,R.jsx)(`span`,{className:B(`shrink-0 font-medium`,l),children:c.label}),(0,R.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,children:c.summaryContent})]})})}function XHe({thread:e}){let t=IL(),n=t.isPending&&t.variables?.id===e.id,r=(0,L.useCallback)(()=>{t.mutate({id:e.id})},[e.id,t]);return e.archivedAt==null?null:(0,R.jsx)(Z2,{label:`Archived`,valueClassName:`min-w-0 truncate`,children:(0,R.jsx)(_2,{isPending:n,onUnarchive:r,threadType:e.type})})}function ZHe({thread:e,workspaceStatus:t,onChangedFileClick:n}){let r=e.type!==`manager`,i=n4(t);return!r||i===null?null:(0,R.jsx)(Z2,{label:i.label??`Changed files`,orientation:`vertical`,className:`min-h-0 flex-1`,valueClassName:`min-h-0 flex-1`,children:(0,R.jsx)(r4,{files:i.files,className:`h-full`,onFileClick:n?e=>n({file:e,section:i}):void 0})})}function QHe({controller:e,filesError:t,isFilesLoading:n}){let{isSearchOpen:r,openSearch:i}=e;return(0,R.jsx)(Z2,{orientation:`vertical`,className:`min-h-0 flex-1`,valueClassName:`min-h-0 flex-1 overflow-hidden`,labelClassName:`flex items-center justify-between gap-2`,label:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{children:`Manager workspace`}),r?null:(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:`h-5 w-5 shrink-0 rounded-md p-0 text-muted-foreground`,"aria-label":`Search files`,onClick:i,children:(0,R.jsx)(V,{name:`Search`,className:`size-3.5`})})]}),children:(0,R.jsx)(zHe,{controller:e,filesError:t,isFilesLoading:n})})}function $He({thread:e,parentThreadDisplayName:t,environment:n,workspaceStatus:r,workspaceStatusError:i}){let a=e.type===`manager`,o=e.parentThreadId??void 0,s=!a,c=n?.status===`destroyed`,l=s&&(!!r||!!i||c)&&!(e.archivedAt!=null&&n?.managed!==!0),u=r?.branch.currentBranch??null,d=n4(r);return!!(a||o||!a&&n||!a&&u||l||s&&d!==null||e.archivedAt!=null||t&&o)}function X7({hasFlexibleHeight:e,children:t}){return(0,R.jsx)(X2,{className:B(`h-full min-h-0 rounded-none border-0 bg-transparent px-0 py-0`,e?`flex-1`:`shrink-0`),children:t})}function eUe(e){let{thread:t,projectId:n,parentThreadDisplayName:r,managerThreads:i,canAssignToManager:a,canTakeOverThread:o,environmentHost:s,environmentIsLocal:c,environment:l,workspaceStatus:u,workspaceStatusError:d,selectedMergeBaseBranch:f,mergeBaseBranchOptions:p,isLoadingMergeBaseBranchOptions:m,updateThreadPending:h,storage:g,onAssignManager:_,onMergeBaseBranchChange:v,onChangedFileClick:y}=e;return(0,R.jsxs)(X7,{hasFlexibleHeight:g!==void 0||t.type!==`manager`&&n4(u)!==null,children:[(0,R.jsx)(HHe,{thread:t}),(0,R.jsx)(VHe,{thread:t,projectId:n,parentThreadDisplayName:r,managerThreads:i,canAssignToManager:a,canTakeOverThread:o,updateThreadPending:h,onAssignManager:_}),(0,R.jsx)(UHe,{environmentHost:s,environment:l,environmentIsLocal:c}),(0,R.jsx)(WHe,{thread:t,environment:l,environmentHost:s,environmentIsLocal:c}),(0,R.jsx)(KHe,{thread:t,environment:l}),(0,R.jsx)(qHe,{thread:t,workspaceStatus:u}),(0,R.jsx)(JHe,{thread:t,workspaceStatus:u,selectedMergeBaseBranch:f,mergeBaseBranchOptions:p,isLoadingMergeBaseBranchOptions:m,onMergeBaseBranchChange:v}),(0,R.jsx)(YHe,{thread:t,environment:l,workspaceStatus:u,workspaceStatusError:d,selectedMergeBaseBranch:f}),(0,R.jsx)(XHe,{thread:t}),(0,R.jsx)(ZHe,{thread:t,workspaceStatus:u,onChangedFileClick:y}),g?(0,R.jsx)(QHe,{...g}):null]})}function tUe({children:e,className:t}){return(0,R.jsx)(`div`,{className:B(`flex min-w-0 flex-col gap-1`,t),children:e})}function nUe({stopRequestedAt:e,threadId:t}){return{id:`${t}:pending-stop:${e}`,threadId:t,turnId:null,sourceSeqStart:0,sourceSeqEnd:0,startedAt:e,createdAt:e,kind:`system`,systemKind:`operation`,operationKind:`thread-interrupted`,title:`Stop requested`,detail:null,status:`pending`,completedAt:null}}function rUe(e,t){return e.some(e=>e.kind===`system`&&e.systemKind===`operation`&&e.operationKind===`thread-interrupted`&&e.createdAt>=t)}function iUe({rows:e,stopRequestedAt:t,threadId:n}){return(0,L.useMemo)(()=>t===null||rUe(e,t)?e:[...e,nUe({stopRequestedAt:t,threadId:n})],[e,t,n])}function aUe({activeThinking:e,footer:t,hasOlderTimelineRows:n,header:r,hostConnectionNotice:i,isLoadingOlderTimelineRows:a,isThreadTimelinePending:o,timelineError:s,loadingTurnSummaryIds:c,erroredTurnSummaryIds:l,onLoadOlderRows:u,onLoadTurnSummaryRows:d,onOpenLocalFileLink:f,onTitleAction:p,projectId:m,showOngoingIndicator:h,ongoingIndicatorLabel:g,stopRequestedAt:_,timelineRows:v,threadId:y,threadRuntimeDisplayStatus:b,turnSummaryRowsIdentity:x,turnSummaryRowsById:S,unreadDividerPlacement:C,workspaceRootPath:w}){let T=gJ(),E=e!==null&&g===void 0,D=e?.text.trim()??``,O=E&&D.length>0?e?.text:void 0,k=E&&e?e.id:g??`working`,A=iUe({rows:v,stopRequestedAt:_,threadId:y});return(0,R.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col overflow-hidden`,children:[r,(0,R.jsx)(c0,{scrollBehavior:`bottom-anchor`,shellClassName:`!mx-0 !mt-0 md:!mx-0 md:!mt-0`,contentClassName:`min-h-full gap-2 pt-4`,footerClassName:`chat-prompt-box`,footer:t,children:(0,R.jsxs)(tUe,{className:`flex-1`,children:[n&&!o&&!s?(0,R.jsx)(oUe,{isLoadingOlderTimelineRows:a,onLoadOlderRows:u}):null,o?(0,R.jsx)(sUe,{}):s?(0,R.jsx)(f1,{label:`Failed to load timeline`,className:`mt-6 text-destructive`}):A.length>0?(0,R.jsx)(d1,{loadingTurnSummaryIds:c,erroredTurnSummaryIds:l,onLoadTurnSummaryRows:d,onOpenLocalFileLink:f,onTitleAction:p,projectId:m,resolveUserAttachmentImageSrc:j0,themeType:T,timelineRows:A,threadRuntimeDisplayStatus:b,turnSummaryRowsIdentity:x,turnSummaryRowsById:S,unreadDividerPlacement:C,workspaceRootPath:w}):null,i?(0,R.jsx)(f1,{label:i.label,className:i.tone===`error`?`mt-4 text-destructive`:`mt-4`}):null,(0,R.jsx)(Tke,{visible:h,children:(0,R.jsx)(fAe,{details:O,isThinking:E,label:g},k)})]})},y)]})}function oUe({isLoadingOlderTimelineRows:e,onLoadOlderRows:t}){let n=q$();return(0,R.jsx)(`div`,{className:`flex justify-center pt-2 mb-3`,children:(0,R.jsxs)(O_,{type:`button`,variant:`outline`,size:`sm`,onClick:(0,L.useCallback)(()=>{n?.captureScrollAnchor(),t()},[n,t]),disabled:e,children:[(0,R.jsx)(V,{name:`ChevronUp`,"aria-hidden":`true`}),e?`Loading older messages...`:`Load older messages`]})})}function sUe(){let[e,t]=(0,L.useState)(!1);return(0,L.useEffect)(()=>{let e=window.setTimeout(()=>t(!0),200);return()=>window.clearTimeout(e)},[]),e?(0,R.jsx)(f1,{label:`Loading thread...`,className:`mt-6`}):null}var cUe=100,Z7=`duration-[220ms] ease-[cubic-bezier(0.32,0.72,0,1)]`;function lUe({footer:e,header:t,isMetadataLoading:n,isSecondaryPanelOpen:r,metadata:i,onTerminalPanelResize:a,secondaryPanel:o,terminalPanel:s,terminalPanelHeightPercent:c,terminalPanelOpen:l,timeline:u}){let d=E_(),f=Sg(v4),p=(0,L.useRef)(null),m=(0,L.useRef)(c),h=(0,L.useRef)(!1);(0,L.useEffect)(()=>{if(!h.current){h.current=!0;return}let e=p.current;e&&(l?e.expand(m.current):e.collapse())},[l]);let g=(0,L.useCallback)(e=>{e<=0||(m.current=e,a(e))},[a]),_=$He(i)?(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:(0,R.jsx)(eUe,{...i})}):n?(0,R.jsx)(fUe,{}):(0,R.jsx)(`div`,{className:`pt-1 text-sm text-muted-foreground`,children:`No thread details available.`}),v=d?null:(0,R.jsx)(W4,{...o,renderAsDrawer:!1,metadataContent:_}),y=d?(0,R.jsx)(W4,{...o,renderAsDrawer:!0,metadataContent:_}):null;return(0,R.jsxs)(`div`,{className:`-mx-4 -mb-4 -mt-4 flex h-full min-h-0 min-w-0 flex-1 flex-col overflow-hidden md:-mx-5 md:-mb-5 md:-mt-5`,children:[(0,R.jsxs)(R4.PanelGroup,{direction:`vertical`,className:`h-full w-full min-w-0`,children:[(0,R.jsx)(R4.Panel,{id:`thread-detail-main-panel`,defaultSize:l?100-c:100,minSize:30,order:1,className:`min-w-0 overflow-hidden`,children:(0,R.jsxs)(R4.PanelGroup,{direction:`horizontal`,className:`h-full w-full min-w-0`,children:[(0,R.jsx)(R4.Panel,{id:`thread-detail-timeline-panel`,defaultSize:r&&!d?100-f:cUe,minSize:30,order:1,className:`min-w-0 overflow-hidden`,children:(0,R.jsx)(aUe,{...u,footer:e,header:t})}),v]})}),s?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(uUe,{isOpen:l}),(0,R.jsx)(R4.Panel,{ref:p,id:`thread-detail-terminal-panel`,collapsible:!0,collapsedSize:0,defaultSize:l?c:0,minSize:18,maxSize:70,order:2,onResize:g,className:B(`min-h-0 min-w-0 overflow-hidden transition-[flex-grow,flex-basis,opacity]`,Z7,l?`opacity-100`:`opacity-0`),children:s})]}):null]}),d?(0,R.jsx)(rP,{open:r,onOpenChange:e=>{e||o.onClose()},srLabel:`Thread details`,contentClassName:`h-[92dvh] max-h-[92dvh]`,handleOnly:!0,children:(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:y})}):null]})}function uUe({isOpen:e}){return(0,R.jsx)(R4.PanelResizeHandle,{id:`thread-detail-terminal-panel-handle`,disabled:!e,className:B(`group relative shrink-0 cursor-row-resize overflow-visible bg-transparent transition-[height,opacity,background-color]`,Z7,`before:absolute before:-inset-y-1.5 before:inset-x-0 before:content-['']`,e?`h-px opacity-100`:`pointer-events-none h-0 opacity-0`),"aria-label":`Resize thread and terminal panels`,children:(0,R.jsx)(`span`,{className:`pointer-events-none absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-border/70 transition-colors group-hover:bg-accent-foreground/35`})})}var dUe=[`w-40`,`w-28`,`w-36`,`w-24`];function fUe(){return(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:(0,R.jsx)(X7,{hasFlexibleHeight:!1,children:dUe.map((e,t)=>(0,R.jsxs)(`div`,{className:`grid grid-cols-[var(--detail-label-width,96px)_minmax(0,1fr)] items-center gap-x-3 py-0.5`,children:[(0,R.jsx)(ov,{className:`h-3 w-14 rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 ${e} max-w-full rounded-sm`})]},t))})})}function Q7(e){return e!==void 0&&e.length>0}function pUe({activePanel:e,closePersistedPanel:t,isCompactViewport:n,openPersistedDiffFile:r,openPersistedDiffPanel:i,openPersistedPanel:a,threadId:o,togglePersistedPanel:s}){let[c,l]=(0,L.useState)(null);(0,L.useEffect)(()=>{l(null)},[o]),(0,L.useEffect)(()=>{n||l(null)},[n]);let u=(0,L.useCallback)(()=>{Q7(o)&&l(o)},[o]),d=(0,L.useCallback)(()=>{l(e=>e===o?null:e)},[o]),f=Q7(o)&&c===o,p=n?f:e!==null,m=(0,L.useCallback)(e=>{a(e),n&&u()},[n,u,a]),h=(0,L.useCallback)(()=>{i(),n&&u()},[n,u,i]),g=(0,L.useCallback)(e=>{r(e),n&&u()},[n,u,r]),_=(0,L.useCallback)(()=>{if(n){d();return}t()},[d,t,n]),v=(0,L.useCallback)(()=>{if(!n){s();return}if(f){d();return}u()},[d,n,f,u,s]);return(0,L.useMemo)(()=>({closePanel:_,isOpen:p,openDiffFile:g,openDiffPanel:h,openPanel:m,togglePanel:v}),[_,p,g,h,m,v])}function mUe({activePath:e,fileListEnabled:t=!0,fileListOptions:n=iO,filePreviewEnabled:r=!0,threadId:i,threadType:a}){let o=a===`manager`,{data:s,isLoading:c,error:l}=wje(i??``,n,{enabled:o&&t}),{data:u,isLoading:d,error:f}=Tje(i??``,e,{enabled:o&&r&&e!==null});return{isThreadStorageFilePreviewLoading:d,isThreadStorageFilesLoading:c,threadStorageFilePreview:u,threadStorageFilePreviewError:f,threadStorageFilesError:l,threadStorageFiles:s,threadStorageRootPath:s?.storageRootPath??null}}var hUe=new Set([`md`,`mdx`,`markdown`]),gUe={"--diffs-font-size":`12px`,"--diffs-line-height":`18px`,"--diffs-gap-block":`16px`},_Ue={"--md-content-w":`100cqi`};function $7(e){let t=e.split(`.`).pop()?.toLowerCase();return t!==void 0&&hUe.has(t)}function e9({state:e,path:t,copyPath:n=null,onOpenInEditor:r,statusLabel:i=null}){let a=e.kind===`ready`&&$7(e.file.name),[o,s]=(0,L.useState)(`preview`);return(0,L.useEffect)(()=>{s(`preview`)},[t]),(0,R.jsxs)(`div`,{className:`@container/page`,style:_Ue,children:[(0,R.jsx)(yUe,{path:t,copyPath:n,onOpenInEditor:r,statusLabel:i,markdownMode:a?o:null,onMarkdownModeChange:s}),(0,R.jsx)(vUe,{state:e,path:t,markdownMode:a?o:`preview`})]})}function vUe({state:e,path:t,markdownMode:n}){return e.kind===`loading`?(0,R.jsx)(SUe,{}):e.kind===`empty`?(0,R.jsx)(r9,{message:`Empty file.`}):e.kind===`not-found`?(0,R.jsx)(r9,{message:`File not found.`,role:`alert`}):e.kind===`manager-status-pending`?(0,R.jsx)(r9,{message:`Manager hasn't written a status yet.`}):e.kind===`error`?(0,R.jsx)(r9,{message:e.message??`Failed to load file`,role:e.message===void 0?`alert`:void 0}):e.kind===`image`?(0,R.jsx)(xUe,{url:e.url,alt:t}):$7(e.file.name)&&n===`preview`?(0,R.jsx)(bUe,{file:e.file}):(0,R.jsx)(CUe,{file:e.file,lineNumber:e.lineNumber??null})}function yUe({path:e,copyPath:t,onOpenInEditor:n,statusLabel:r,markdownMode:i,onMarkdownModeChange:a}){return(0,R.jsxs)(`div`,{className:`sticky top-0 z-10`,children:[(0,R.jsxs)(`div`,{className:`flex h-9 items-center gap-2 border-b border-border/70 bg-background px-4`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,children:[(0,R.jsx)(m$,{className:`min-w-0 font-mono text-xs font-medium leading-5 text-foreground`,title:e,children:e}),r===null?null:(0,R.jsxs)(`span`,{className:`shrink-0 text-xs leading-5 text-muted-foreground`,children:[`(`,r,`)`]}),t===null?null:(0,R.jsx)(vB,{text:t,label:`Copy file path`,className:`shrink-0 rounded-md hover:bg-state-hover hover:text-foreground`}),n?(0,R.jsx)(`button`,{type:`button`,onClick:()=>n(e),"aria-label":`Open in editor`,title:`Open in editor`,className:`inline-flex size-5 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:(0,R.jsx)(V,{name:`ExternalLink`,"aria-hidden":!0,className:`size-3`})}):null]}),i===null?null:(0,R.jsxs)(`div`,{className:`ml-auto inline-flex shrink-0 items-center gap-0.5 rounded-md border border-border/70 p-0.5`,role:`tablist`,"aria-label":`Markdown view mode`,children:[(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`sm`,className:`h-5 rounded-sm px-2 text-xs text-muted-foreground`,onClick:()=>a(`preview`),"aria-pressed":i===`preview`,title:`Rendered preview`,children:`Preview`}),(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`sm`,className:`h-5 rounded-sm px-2 text-xs text-muted-foreground`,onClick:()=>a(`source`),"aria-pressed":i===`source`,title:`Markdown source`,children:`Raw`})]})]}),(0,R.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-x-0 top-full h-4 bg-gradient-to-b from-background to-transparent`})]})}function bUe({file:e}){return(0,R.jsx)(`div`,{className:`px-4 pt-4`,children:(0,R.jsx)(bJ,{allowHtml:!0,content:e.contents})})}function xUe({url:e,alt:t}){return(0,R.jsx)(`div`,{className:`pt-4`,children:(0,R.jsx)(`img`,{src:e,alt:t,className:`block max-h-[34rem] w-full object-contain`})})}function t9(e){let t=e.querySelectorAll(`[data-file-preview-target-line]`);for(let e of t)e.removeAttribute(`data-file-preview-target-line`),e.removeAttribute(`data-selected-line`)}function n9(e,t){let n=e.querySelectorAll(`[data-line="${t}"]`);for(let e of n)if(e instanceof HTMLElement&&e.dataset.lineIndex!==void 0)return e;for(let e of n)if(e instanceof HTMLElement)return e;return null}function SUe(){return(0,R.jsxs)(`div`,{className:`space-y-2 px-4 pt-4`,"aria-busy":!0,children:[(0,R.jsx)(ov,{className:`h-3 w-3/4 rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-full rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-5/6 rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-2/3 rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-full rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-3/5 rounded-sm`})]})}function r9({message:e,role:t}){return(0,R.jsx)(`p`,{role:t,className:`mx-4 mt-4 rounded-lg border border-dashed border-border/70 bg-background/45 px-3 py-6 text-center text-sm text-muted-foreground`,children:e})}function CUe({file:e,lineNumber:t}){let n=gJ(),r=(0,L.useRef)(null),i=(0,L.useMemo)(()=>({themeType:n,overflow:`scroll`,disableFileHeader:!0,enableLineSelection:t!==null}),[t,n]),a=(0,L.useMemo)(()=>t===null?null:{start:t,end:t},[t]);return(0,L.useEffect)(()=>{let e=r.current,n=null,i=null,a=0;function o(){n=window.requestAnimationFrame(s),i=window.setTimeout(s,16)}function s(){let e=r.current;if(!e||(t9(e),t9(e.ownerDocument.body),t===null))return;let n=n9(e,t)??n9(e.ownerDocument.body,t);if(n){n.setAttribute(`data-file-preview-target-line`,``),n.setAttribute(`data-selected-line`,`single`),n.scrollIntoView?.({block:`center`});return}a+=1,a<8&&o()}return s(),()=>{e&&(t9(e),t9(e.ownerDocument.body)),n!==null&&window.cancelAnimationFrame(n),i!==null&&window.clearTimeout(i)}},[e.contents,e.name,t]),(0,R.jsx)(`div`,{ref:r,style:gUe,"data-file-preview-line-number":t??void 0,children:(0,R.jsx)(Kp,{file:e,options:i,selectedLines:a})})}var i9=`STATUS.md`;function a9({activePath:e,copyPath:t=null,error:n,filePreview:r,isLoading:i,lineNumber:a=null,onOpenInEditor:o,pendingNotFoundPath:s,statusLabel:c=null}){if(n){let r=n instanceof JD&&n.status===404;return r&&e===s?(0,R.jsx)(e9,{path:e,copyPath:t,onOpenInEditor:o,statusLabel:c,state:{kind:`manager-status-pending`}}):(0,R.jsx)(e9,{path:e,copyPath:t,onOpenInEditor:o,statusLabel:c,state:{kind:r?`not-found`:`error`}})}return i||!r||r.path!==e?(0,R.jsx)(e9,{path:e,copyPath:t,onOpenInEditor:o,statusLabel:c,state:{kind:`loading`}}):r.kind===`text`?r.content.length===0?(0,R.jsx)(e9,{path:e,copyPath:t,onOpenInEditor:o,statusLabel:c,state:{kind:`empty`}}):(0,R.jsx)(e9,{path:e,copyPath:t,onOpenInEditor:o,statusLabel:c,state:{kind:`ready`,lineNumber:a,file:{name:r.name??e,contents:r.content}}}):r.kind===`image`?(0,R.jsx)(e9,{path:e,copyPath:t,onOpenInEditor:o,statusLabel:c,state:{kind:`image`,url:r.url}}):(0,R.jsx)(e9,{path:e,copyPath:t,onOpenInEditor:o,statusLabel:c,state:{kind:`error`,message:`Preview not available for ${r.mimeType}.`}})}function wUe({activePath:e,copyPath:t,error:n,filePreview:r,isLoading:i,lineNumber:a,onOpenInEditor:o}){return(0,R.jsx)(a9,{activePath:e,copyPath:t,error:n,filePreview:r,isLoading:i,lineNumber:a,onOpenInEditor:o,pendingNotFoundPath:i9})}var TUe=[];function EUe(e){let t=new Set;for(let n of e){let e=n.split(`/`).filter(e=>e.length>0),r=``;for(let n of e.slice(0,-1))r=`${r}${n}/`,t.add(r)}return Array.from(t)}function DUe({files:e,onSelectPath:t,selectedPath:n}){let[r,i]=(0,L.useState)(!1),[a,o]=(0,L.useState)(``),s=e??TUe,c=(0,L.useMemo)(()=>{let e=a.trim().toLowerCase();return e.length===0?s:s.filter(t=>t.path.toLowerCase().includes(e))},[s,a]),l=(0,L.useMemo)(()=>c.map(e=>e.path),[c]),u=(0,L.useMemo)(()=>new Set(l),[l]),d=(0,L.useRef)(u),f=(0,L.useRef)(t),p=(0,L.useRef)(!1);(0,L.useEffect)(()=>{d.current=u},[u]),(0,L.useEffect)(()=>{f.current=t},[t]);let{model:m}=LHe({density:`compact`,initialExpansion:`closed`,onSelectionChange:(0,L.useCallback)(e=>{if(p.current)return;let t=e[0];!t||!d.current.has(t)||f.current(t)},[]),paths:[],search:!1}),h=a.trim().length>0,g=(0,L.useMemo)(()=>h?EUe(l):[],[h,l]);(0,L.useEffect)(()=>{m.resetPaths(l,{initialExpandedPaths:g})},[g,l,m]),(0,L.useEffect)(()=>{let e=m.getSelectedPaths(),t=n!==null&&u.has(n);if(!(t?e.length===1&&e[0]===n:e.length===0)){p.current=!0;try{for(let r of e)t&&r===n||m.getItem(r)?.deselect();t&&m.getItem(n)?.select()}finally{p.current=!1}}},[u,m,n]);let _=(0,L.useCallback)(()=>{i(!0)},[]);return{closeSearch:(0,L.useCallback)(()=>{i(!1),o(``)},[]),filteredFiles:c,isSearchOpen:r,loadedFiles:s,model:m,openSearch:_,searchQuery:a,setSearchQuery:o}}function OUe(e,t){let n=e.find(e=>e.path===t.path);return n?n.lineNumber===t.lineNumber&&VD(n.source,t.source)&&n.statusLabel===t.statusLabel?e:e.map(e=>e.path===t.path?t:e):[...e,t]}function kUe(e,t){let n=e.filter(e=>e.path!==t);return n.length===e.length?e:n}function AUe(e,t){let n=e.filter(e=>e!==t);return n.length===e.length?e:n}function jUe(e,t){let n=e.find(e=>e.path===t.path);return n?n.lineNumber===t.lineNumber?e:e.map(e=>e.path===t.path?t:e):[...e,t]}function MUe(e,t){let n=e.filter(e=>e.path!==t);return n.length===e.length?e:n}function o9(e){return{type:`workspace`,path:e}}function s9(e){return{type:`storage`,path:e}}function c9(e){return{type:`host-file`,path:e}}function l9(e,t){return{...e,fileTabs:t}}function NUe({threadId:e,environmentId:t,threadType:n,storageFiles:r}){let i=L2(e),a=R2(e),o=z2(e),s=n!==void 0,c=n===`manager`,l=s?t??null:void 0;(0,L.useEffect)(()=>{s&&a(e=>A2({isManagerThread:c,state:e}))},[c,s,a]),(0,L.useEffect)(()=>{s&&a(e=>BPe({environmentId:l,state:e}))},[s,l,a]),(0,L.useEffect)(()=>{c&&a(e=>{let t=A2({isManagerThread:c,state:e});if(t.fileTabs.storage[0]===`STATUS.md`&&t.fileTabs.active!==null)return t;let n=[i9,...t.fileTabs.storage.filter(e=>e!==i9)];return l9(t,{...t.fileTabs,storage:n,active:t.fileTabs.active??s9(`STATUS.md`)})})},[c,a]),(0,L.useEffect)(()=>{!s||!r||a(e=>VPe({isManagerThread:c,pinnedStorageFilePath:i9,state:e,storageFiles:r}))},[c,s,r,a]);let u=(0,L.useCallback)(({lineNumber:e,path:t,source:n,statusLabel:r})=>{l!==void 0&&(a(i=>{let a=OUe(i.fileTabs.workspace,{lineNumber:e,path:t,source:n,statusLabel:r}),o=i.fileTabs.active?.type===`workspace`&&i.fileTabs.active.path===t;return i.environmentId===l&&a===i.fileTabs.workspace&&o?i:l9({...i,environmentId:l},{...i.fileTabs,workspace:a,active:o9(t)})}),o(`thread-info`))},[l,o,a]),d=(0,L.useCallback)(e=>{a(t=>{let n=kUe(t.fileTabs.workspace,e);return n===t.fileTabs.workspace?t:l9(t,{...t.fileTabs,workspace:n,active:t.fileTabs.active?.type===`workspace`&&t.fileTabs.active.path===e?null:t.fileTabs.active})})},[a]),f=(0,L.useCallback)(e=>{a(t=>!t.fileTabs.workspace.some(t=>t.path===e)||t.fileTabs.active?.type===`workspace`&&t.fileTabs.active.path===e?t:l9(t,{...t.fileTabs,active:o9(e)}))},[a]),p=(0,L.useCallback)(e=>{c&&a(t=>{let n=t.fileTabs.storage.includes(e)?t.fileTabs.storage:[...t.fileTabs.storage,e];return n===t.fileTabs.storage&&t.fileTabs.active?.type===`storage`&&t.fileTabs.active.path===e?t:l9(t,{...t.fileTabs,storage:n,active:s9(e)})})},[c,a]),m=(0,L.useCallback)(({lineNumber:t,path:n})=>{e&&(a(e=>{let r=jUe(e.fileTabs.hostFiles,{lineNumber:t,path:n}),i=e.fileTabs.active?.type===`host-file`&&e.fileTabs.active.path===n;return r===e.fileTabs.hostFiles&&i?e:l9(e,{...e.fileTabs,hostFiles:r,active:c9(n)})}),o(`thread-info`))},[o,e,a]),h=(0,L.useCallback)(e=>{a(t=>{let n=MUe(t.fileTabs.hostFiles,e);return n===t.fileTabs.hostFiles?t:l9(t,{...t.fileTabs,hostFiles:n,active:t.fileTabs.active?.type===`host-file`&&t.fileTabs.active.path===e?null:t.fileTabs.active})})},[a]),g=(0,L.useCallback)(e=>{a(t=>!t.fileTabs.hostFiles.some(t=>t.path===e)||t.fileTabs.active?.type===`host-file`&&t.fileTabs.active.path===e?t:l9(t,{...t.fileTabs,active:c9(e)}))},[a]),_=(0,L.useCallback)(e=>{!c||e===`STATUS.md`||a(t=>{let n=AUe(t.fileTabs.storage,e);return n===t.fileTabs.storage?t:l9(t,{...t.fileTabs,storage:n,active:t.fileTabs.active?.type===`storage`&&t.fileTabs.active.path===e?null:t.fileTabs.active})})},[c,a]),v=(0,L.useCallback)(e=>{c&&a(t=>!t.fileTabs.storage.includes(e)||t.fileTabs.active?.type===`storage`&&t.fileTabs.active.path===e?t:l9(t,{...t.fileTabs,active:s9(e)}))},[c,a]),y=(0,L.useCallback)(()=>{a(zPe)},[a]),b=l!==void 0&&i.environmentId===l,x=b?i.fileTabs.workspace:[],S=b?LPe(i):null,C=c?j2(i):null,w=RPe(i),T=c?i.fileTabs.storage:[];return{activateHostFileTab:g,activateStorageFileTab:v,activateWorkspaceFileTab:f,activeHostFileLineNumber:w?.lineNumber??null,activeHostFilePath:w?.path??null,activeStorageFilePath:C,activeWorkspaceFileLineNumber:S?.lineNumber??null,activeWorkspaceFilePath:S?.path??null,activeWorkspaceFileSource:S?.source??null,activeWorkspaceFileStatusLabel:S?.statusLabel??null,clearActiveFileTabs:y,closeHostFileTab:h,closeStorageFileTab:_,closeWorkspaceFileTab:d,openHostFile:m,openHostFileTabs:i.fileTabs.hostFiles,openStorageFile:p,openStorageFilePaths:T,openWorkspaceFile:u,openWorkspaceFileTabs:x}}function u9(e){return e??void 0}function PUe({previousStateKey:e,nextStateKey:t,persistedMergeBaseBranch:n,selectedMergeBaseBranch:r,updatePending:i}){return e===t?i?!1:r!==u9(n):!0}function FUe({environment:e,mergeBaseBranchOptions:t,selectedMergeBaseBranch:n,setSelectedMergeBaseBranch:r,thread:i,updateEnvironment:a,workspaceStatus:o}){let s=(0,L.useRef)(void 0),c=e?.id??i?.id,l=a.isPending&&a.variables?.id===e?.id;(0,L.useEffect)(()=>{PUe({previousStateKey:s.current,nextStateKey:c,persistedMergeBaseBranch:e?.mergeBaseBranch,selectedMergeBaseBranch:n,updatePending:l})&&(s.current=c,r(u9(e?.mergeBaseBranch)))},[e?.mergeBaseBranch,l,c,n,r]);let u=n??o?.mergeBase?.mergeBaseBranch??o?.branch.defaultBranch,d=!!(u||o?.branch.defaultBranch),f=u,p=(0,L.useMemo)(()=>R0({mergeBaseBranch:f,mergeBaseBranchOptions:t}),[f,t]),m=o?.branch.currentBranch!=null&&o.branch.currentBranch===o.branch.defaultBranch,h=d&&!!f&&!m;return{canSelectMergeBase:!!(h&&f&&p.length>0),effectiveMergeBaseBranch:u,handleMergeBaseBranchChange:(0,L.useCallback)(t=>{if(!e||!i?.environmentId)return;let n=t.trim(),s=o?.branch.defaultBranch.trim(),c=n.length>0&&n!==s?n:null,l=e.mergeBaseBranch;r(n),c!==l&&a.mutate({id:e.id,mergeBaseBranch:c},{onError:t=>{r(e.mergeBaseBranch??void 0),pL.error(JL({error:t,fallbackMessage:`Failed to update merge base branch.`}))}})},[e,r,i?.environmentId,a,o?.branch.defaultBranch]),showBranchComparisonUi:d,showMergeBase:h,mergeBaseBranch:f,mergeBaseCandidates:p}}var d9=s((e=>{e.__esModule=!0,e.extend=a,e.indexOf=l,e.escapeExpression=u,e.isEmpty=d,e.createFrame=f,e.blockParams=p,e.appendContextPath=m;var t={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"`":```,"=":`=`},n=/[&<>"'`=]/g,r=/[&<>"'`=]/;function i(e){return t[e]}function a(e){for(var t=1;t<arguments.length;t++)for(var n in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e}var o=Object.prototype.toString;e.toString=o;var s=function(e){return typeof e==`function`};s(/x/)&&(e.isFunction=s=function(e){return typeof e==`function`&&o.call(e)===`[object Function]`}),e.isFunction=s;var c=Array.isArray||function(e){return e&&typeof e==`object`?o.call(e)===`[object Array]`:!1};e.isArray=c;function l(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function u(e){if(typeof e!=`string`){if(e&&e.toHTML)return e.toHTML();if(e==null)return``;if(!e)return e+``;e=``+e}return r.test(e)?e.replace(n,i):e}function d(e){return!e&&e!==0?!0:!!(c(e)&&e.length===0)}function f(e){var t=a({},e);return t._parent=e,t}function p(e,t){return e.path=t,e}function m(e,t){return(e?e+`.`:``)+t}})),f9=s(((e,t)=>{e.__esModule=!0;var n=[`description`,`fileName`,`lineNumber`,`endLineNumber`,`message`,`name`,`number`,`stack`];function r(e,t){var i=t&&t.loc,a=void 0,o=void 0,s=void 0,c=void 0;i&&(a=i.start.line,o=i.end.line,s=i.start.column,c=i.end.column,e+=` - `+a+`:`+s);for(var l=Error.prototype.constructor.call(this,e),u=0;u<n.length;u++)this[n[u]]=l[n[u]];Error.captureStackTrace&&Error.captureStackTrace(this,r);try{i&&(this.lineNumber=a,this.endLineNumber=o,Object.defineProperty?(Object.defineProperty(this,`column`,{value:s,enumerable:!0}),Object.defineProperty(this,`endColumn`,{value:c,enumerable:!0})):(this.column=s,this.endColumn=c))}catch{}}r.prototype=Error(),e.default=r,t.exports=e.default})),IUe=s(((e,t)=>{e.__esModule=!0;var n=d9();e.default=function(e){e.registerHelper(`blockHelperMissing`,function(t,r){var i=r.inverse,a=r.fn;if(t===!0)return a(this);if(t===!1||t==null)return i(this);if(n.isArray(t))return t.length>0?(r.ids&&=[r.name],e.helpers.each(t,r)):i(this);if(r.data&&r.ids){var o=n.createFrame(r.data);o.contextPath=n.appendContextPath(r.data.contextPath,r.name),r={data:o}}return a(t,r)})},t.exports=e.default})),LUe=s(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=d9(),i=n(f9());e.default=function(e){e.registerHelper(`each`,function(e,t){if(!t)throw new i.default(`Must pass iterator to #each`);var n=t.fn,a=t.inverse,o=0,s=``,c=void 0,l=void 0;t.data&&t.ids&&(l=r.appendContextPath(t.data.contextPath,t.ids[0])+`.`),r.isFunction(e)&&(e=e.call(this)),t.data&&(c=r.createFrame(t.data));function u(t,i,a){c&&(c.key=t,c.index=i,c.first=i===0,c.last=!!a,l&&(c.contextPath=l+t)),s+=n(e[t],{data:c,blockParams:r.blockParams([e[t],t],[l+t,null])})}if(e&&typeof e==`object`)if(r.isArray(e))for(var d=e.length;o<d;o++)o in e&&u(o,o,o===e.length-1);else if(typeof Symbol==`function`&&e[Symbol.iterator]){for(var f=[],p=e[Symbol.iterator](),m=p.next();!m.done;m=p.next())f.push(m.value);e=f;for(var d=e.length;o<d;o++)u(o,o,o===e.length-1)}else (function(){var t=void 0;Object.keys(e).forEach(function(e){t!==void 0&&u(t,o-1),t=e,o++}),t!==void 0&&u(t,o-1,!0)})();return o===0&&(s=a(this)),s})},t.exports=e.default})),RUe=s(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=n(f9());e.default=function(e){e.registerHelper(`helperMissing`,function(){if(arguments.length!==1)throw new r.default(`Missing helper: "`+arguments[arguments.length-1].name+`"`)})},t.exports=e.default})),zUe=s(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=d9(),i=n(f9());e.default=function(e){e.registerHelper(`if`,function(e,t){if(arguments.length!=2)throw new i.default(`#if requires exactly one argument`);return r.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||r.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper(`unless`,function(t,n){if(arguments.length!=2)throw new i.default(`#unless requires exactly one argument`);return e.helpers.if.call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})})},t.exports=e.default})),BUe=s(((e,t)=>{e.__esModule=!0,e.default=function(e){e.registerHelper(`log`,function(){for(var t=[void 0],n=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)t.push(arguments[r]);var i=1;n.hash.level==null?n.data&&n.data.level!=null&&(i=n.data.level):i=n.hash.level,t[0]=i,e.log.apply(e,t)})},t.exports=e.default})),VUe=s(((e,t)=>{e.__esModule=!0,e.default=function(e){e.registerHelper(`lookup`,function(e,t,n){return e&&n.lookupProperty(e,t)})},t.exports=e.default})),HUe=s(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=d9(),i=n(f9());e.default=function(e){e.registerHelper(`with`,function(e,t){if(arguments.length!=2)throw new i.default(`#with requires exactly one argument`);r.isFunction(e)&&(e=e.call(this));var n=t.fn;if(r.isEmpty(e))return t.inverse(this);var a=t.data;return t.data&&t.ids&&(a=r.createFrame(t.data),a.contextPath=r.appendContextPath(t.data.contextPath,t.ids[0])),n(e,{data:a,blockParams:r.blockParams([e],[a&&a.contextPath])})})},t.exports=e.default})),p9=s((e=>{e.__esModule=!0,e.registerDefaultHelpers=l,e.moveHelperToHooks=u;function t(e){return e&&e.__esModule?e:{default:e}}var n=t(IUe()),r=t(LUe()),i=t(RUe()),a=t(zUe()),o=t(BUe()),s=t(VUe()),c=t(HUe());function l(e){n.default(e),r.default(e),i.default(e),a.default(e),o.default(e),s.default(e),c.default(e)}function u(e,t,n){e.helpers[t]&&(e.hooks[t]=e.helpers[t],n||delete e.helpers[t])}})),UUe=s(((e,t)=>{e.__esModule=!0;var n=d9();e.default=function(e){e.registerDecorator(`inline`,function(e,t,r,i){var a=e;return t.partials||(t.partials={},a=function(i,a){var o=r.partials;r.partials=n.extend({},o,t.partials);var s=e(i,a);return r.partials=o,s}),t.partials[i.args[0]]=i.fn,a})},t.exports=e.default})),WUe=s((e=>{e.__esModule=!0,e.registerDefaultDecorators=r;function t(e){return e&&e.__esModule?e:{default:e}}var n=t(UUe());function r(e){n.default(e)}})),m9=s(((e,t)=>{e.__esModule=!0;var n=d9(),r={methodMap:[`debug`,`info`,`warn`,`error`],level:`info`,lookupLevel:function(e){if(typeof e==`string`){var t=n.indexOf(r.methodMap,e.toLowerCase());e=t>=0?t:parseInt(e,10)}return e},log:function(e){if(e=r.lookupLevel(e),typeof console<`u`&&r.lookupLevel(r.level)<=e){var t=r.methodMap[e];console[t]||(t=`log`);var n=[...arguments].slice(1);console[t].apply(console,n)}}};e.default=r,t.exports=e.default})),GUe=s((e=>{e.__esModule=!0,e.createNewLookupObject=n;var t=d9();function n(){var e=[...arguments];return t.extend.apply(void 0,[Object.create(null)].concat(e))}})),h9=s((e=>{e.__esModule=!0,e.createProtoAccessControl=a,e.resultIsAllowed=o,e.resetLoggedProperties=l;function t(e){return e&&e.__esModule?e:{default:e}}var n=GUe(),r=t(m9()),i=Object.create(null);function a(e){var t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var r=Object.create(null);return r.__proto__=!1,{properties:{whitelist:n.createNewLookupObject(r,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:n.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}function o(e,t,n){return s(typeof e==`function`?t.methods:t.properties,n)}function s(e,t){return e.whitelist[t]===void 0?e.defaultValue===void 0?(c(t),!1):e.defaultValue:e.whitelist[t]===!0}function c(e){i[e]!==!0&&(i[e]=!0,r.default.log(`error`,`Handlebars: Access has been denied to resolve the property "`+e+`" because it is not an "own property" of its parent.
|
|
3301
|
+
}`}var c3=new WeakMap;function ZRe(e){let t=c3.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(NLe,`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(),c3.set(e,i),i}function QRe(e,t){if(!e.isConnected)return;let n=ZRe(t);if(n==null)return;let r=t.querySelector(`style[${J4}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(J4,``),t.appendChild(i)),i.textContent=`:host { ${PLe}: ${n}px; }`}var l3;function $Re(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){l3??(l3=new CSSStyleSheet,l3.replaceSync(s3(a3)));let t=!1;try{e.adoptedStyleSheets=[l3],t=!0}catch{}if(t){e.querySelector(`style[${K4}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(K4,``),t.textContent=s3(a3),e.prepend(t)}}function u3(e,t){eze(e,t),$Re(t),QRe(e,t)}function eze(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`});u3(this,e)}}if(customElements.define(G4,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(G4)))e instanceof HTMLElement&&u3(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var d3=5,f3=1<<d3,tze=f3*4;function p3(){return{childIdByNameId:new Map,childIds:[],childPositionById:new Map,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function m3(){return{childIdByNameId:null,childIds:[],childPositionById:null,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function h3(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 g3(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 _3(e,t){e.childPositionById!=null&&e.childPositionById.set(t,e.childIds.length),e.childIds.push(t)}function v3(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 y3(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,S3(e,t)}function b3(e,t,n,r){if(e.totalChildSubtreeNodeCount+=n,e.totalChildVisibleSubtreeCount+=r,e.childVisibleChunkSums==null||r===0)return;let i=g3(e).get(t);if(i===void 0)return;let a=i>>d3;e.childVisibleChunkSums[a]+=r}function x3(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=rze(e,t,a,i);return{...r,childVisibleIndex:n-r.localVisibleIndex}}i-=o,a+=f3}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 nze(e,t,n){let r=0,i=t.childVisibleChunkSums,a=0;if(i!=null){let e=n>>d3;for(let t=0;t<e;t+=1)r+=i[t]??0;a=e<<d3}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 S3(e,t){if(t.childIds.length<tze){t.childVisibleChunkSums=null;return}let n=Math.ceil(t.childIds.length/f3),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>>d3]+=a.visibleSubtreeCount)}t.childVisibleChunkSums=r}function rze(e,t,n,r){let i=Math.min(t.childIds.length,n+f3),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 ize=7,C3=3,w3=1<<C3,T3=4;function E3(e,t,n=0){return e<<T3|n<<C3|t}function D3(e){return e.depthAndFlags>>>T3}function O3(e){return(e.depthAndFlags&w3)>>C3}function k3(e){return(e.depthAndFlags&w3)!==0}function A3(e){return e.depthAndFlags&ize}function j3(e,t){return(A3(e)&t)!==0}function M3(e,t){e.depthAndFlags|=t}function aze(e,t){e.depthAndFlags=E3(t,A3(e),O3(e))}var N3=Symbol(`benchmarkInstrumentation`);function oze(e,t){return t==null||Object.defineProperty(e,N3,{configurable:!0,enumerable:!1,value:t,writable:!1}),e}function P3(e){return e==null?null:e[N3]??null}function F3(e,t,n){return e==null?n():e.measurePhase(t,n)}function I3(e,t,n){!Number.isFinite(n)||e==null||e.setCounter(t,n)}function L3(e){return e>=48&&e<=57}function sze(e){let t=[],n=0,r=0;for(;r<e.length;){for(;r<e.length&&!L3(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&&L3(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 R3(e){let t=e.toLowerCase();return{lowerValue:t,tokens:sze(t)}}function cze(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 z3(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=cze(e.tokens,t.tokens);return n===0?e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1:n}function B3(e,t,n){let r=z3(n(e),n(t));return r===0?e===t?0:e<t?-1:1:r}function lze(e,t){return B3(e,t,R3)}function V3(e,t){return t===e.segments.length-1?+!!e.isDirectory:1}function uze(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=V3(e,r);return a===V3(t,r)?lze(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 dze(e,t){return uze(e,t)}function fze(e,t,n){let r=e=>{let t=n.get(e);if(t!=null)return t;let r=R3(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=V3(e,n);return o===V3(t,n)?B3(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 H3(e,t){let n=e.sortKeyById[t];if(n!==void 0)return n;let r=e.valueById[t],i=R3(r);return e.sortKeyById[t]=i,i}function U3(e={}){return{flattenEmptyDirectories:e.flattenEmptyDirectories!==!1,sort:e.sort??`default`}}function W3(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 G3(e){let{hasTrailingSlash:t,segments:n}=W3(e);return{basename:n[n.length-1]??``,isDirectory:t,path:e,segments:n}}function K3(e){if(e.length===0)return{requiresDirectory:!1,segments:[]};let{hasTrailingSlash:t,segments:n}=W3(e);return{requiresDirectory:t,segments:n}}var q3=``;function J3(){let e=new Map;return e.set(q3,0),{idByValue:e,valueById:[q3],sortKeyById:[R3(q3)]}}function Y3(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 X3(e,t){let n=e.valueById[t];if(n===void 0)throw Error(`Unknown segment ID: ${String(t)}`);return n}var Z3=Symbol(`pathStorePreparedInputKind`);function Q3(e,t){return e[Z3]=t,e}function $3(e){return{basename:e.basename,depth:e.segments.length,isDirectory:e.isDirectory,path:e.path,segments:e.segments}}function e6(e,t,n){return n===`default`?dze(e,t):n($3(e),$3(t))}function pze(){return{depthAndFlags:E3(0,3,1),nameId:0,parentId:0,subtreeNodeCount:1,visibleSubtreeCount:1}}function mze(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 t6(e){return e.isDirectory?e.segments.length:e.segments.length-1}function hze(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 gze(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function _ze(e,t={}){return n6(e,t).map(e=>e.path)}function vze(e,t={}){let n=n6(e,t);return Q3({paths:n.map(e=>e.path),preparedPaths:n},`prepared`)}function yze(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 Q3({paths:e,presortedPaths:e,presortedPathsContainDirectories:n},`presorted`)}function bze(e){let t=e,n=t.preparedPaths;if(t[Z3]===`prepared`&&n!=null)return n;if(!hze(n))throw Error(`preparedInput must come from PathStore.prepareInput()`);return n}function xze(e){let t=e;return t[Z3]===`presorted`&&t.presortedPaths!=null||gze(t.presortedPaths)?t.presortedPaths:null}function Sze(e){let t=e;return typeof t.presortedPathsContainDirectories==`boolean`?t.presortedPathsContainDirectories:null}function n6(e,t={}){let n=U3(t),r=P3(t);I3(r,`workload.inputFiles`,e.length);let i=F3(r,`store.preparePathEntries.parse`,()=>e.map(e=>G3(e)));return F3(r,`store.preparePathEntries.sort`,()=>i.sort((e,t)=>e6(e,t,n.sort))),i}var r6=class{directories=new Map;directoryStack=[0];presortedDirectoryNodeIds=[];initialExpandedPathSet;createdDirectoriesAllExpanded=!1;createdDirectoryCount=0;lastPreparedPath=null;nodes=[pze()];options;instrumentation;segmentSortKeyCache=new Map;segmentTable=J3();hasDeferredDirectoryIndexes=!1;constructor(e={}){this.instrumentation=P3(e),this.options=U3(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,p3())}appendPaths(e){return F3(this.instrumentation,`store.builder.appendPaths.parse`,()=>this.appendPreparedPaths(e.map(e=>G3(e))))}appendPreparedPaths(e,t=!0){return this.createdDirectoriesAllExpanded=!1,F3(this.instrumentation,`store.builder.appendPreparedPaths`,()=>{for(let n of e)this.appendPreparedPath(n,t)}),this}appendPresortedPaths(e,t=null){return F3(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:E3(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:E3(r,0,1),nameId:u,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),l++,c[l]=d}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:E3(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=G3(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:E3(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:E3(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=G3(t)),this.hasDeferredDirectoryIndexes=!0}finish(e={}){let t=e.skipSubtreeCountPass===!0;return this.hasDeferredDirectoryIndexes?(F3(this.instrumentation,`store.builder.buildDirectoryIndexes`,()=>this.buildPresortedFinish(t)),this.hasDeferredDirectoryIndexes=!1):t||F3(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`?fze(this.lastPreparedPath,e,this.segmentSortKeyCache):e6(this.lastPreparedPath,e,this.options.sort))>0)throw Error(`Builder input must be sorted before appendPaths(): "${e.path}"`)}let n=this.lastPreparedPath,r=t6(e),i=n==null?0:t6(n),a=n==null?0:mze(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=Y3(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:E3(D3(o)+1,0),nameId:r,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),a?.set(r,s),_3(i,s),s}createFileChildUnchecked(e,t){let n=Y3(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:E3(D3(i)+1,0),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),_3(r,a),a}getOrCreateDirectoryChild(e,t){let n=Y3(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&&!k3(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:E3(D3(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),_3(r,a),this.directories.set(a,p3()),a}createDirectoryChild(e,t){let n=Y3(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:E3(D3(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),_3(r,a),this.directories.set(a,p3()),a}promoteDirectoryToExplicit(e,t){let n=this.nodes[e];if(n===void 0)throw Error(`Unknown directory node ID: ${String(e)}`);if(!k3(n))throw Error(`Path is not a directory: "${t}"`);if(j3(n,1))throw Error(`Duplicate path: "${t}"`);M3(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,m3());let r=-1,i=null;for(let e=1;e<t.length;e++){let a=t[e];if(a==null)continue;if(k3(a)){let t=m3();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;k3(n)&&this.directories.set(t,p3());let r=this.directories.get(n.parentId);r!=null&&(r.childIdByNameId!=null&&r.childIdByNameId.set(n.nameId,t),_3(r,t))}}computeSubtreeCounts(e){let t=this.nodes[e];if(t===void 0)throw Error(`Unknown node ID: ${String(e)}`);if(!k3(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 y3(this.nodes,n),t.subtreeNodeCount=r,t.visibleSubtreeCount=r,r}};function Cze(e,t=`closed`,n=null){let r=Tze(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 wze(){return{affectedAncestorIds:new Set,affectedNodeIds:new Set,events:[]}}function Tze(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 i6(e,t){return j3(t,2)||e.defaultExpansion===`open`?!0:e.defaultExpansion===`closed`?!1:D3(t)<=e.defaultExpansion}function a6(e,t,n=e.snapshot.nodes[t]){return n==null||!k3(n)?!1:e.directoriesOpenByDefault&&!e.hasCollapsedDirectoryOverrides?!0:e.collapsedDirectoryIds.has(t)?!1:e.expandedDirectoryIds.has(t)?!0:i6(e,n)}function o6(e,t,n,r=e.snapshot.nodes[t]){if(r==null||!k3(r))return;let i=i6(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 s6(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 c6(e,t){return e.directoryLoadInfoById.get(t)?.state??`loaded`}function Eze(e,t){let n=s6(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 Dze(e,t){let n=s6(e,t);n.activeAttemptId=null,n.errorMessage=null,n.state=`unloaded`}function Oze(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 kze(e,t,n){return e.directoryLoadInfoById.get(t)?.activeAttemptId===n}function Aze(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 jze(e,t){e.directoryLoadInfoById.delete(t)}function Mze(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 Nze(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`add`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function Pze(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`remove`,path:e.path,projectionChanged:e.projectionChanged,recursive:e.recursive,visibleCountDelta:null}}function Fze(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,from:e.from,operation:`move`,projectionChanged:e.projectionChanged,to:e.to,visibleCountDelta:null}}function Ize(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`expand`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function Lze(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`collapse`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function Rze(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`mark-directory-unloaded`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function zze(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 Bze(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 Vze(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 Hze(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 Uze(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 l6(e,t,n){return{...n,visibleCountDelta:g6(e)-t}}function Wze(e,t){let n=g6(e),r=wze();e.transactionStack.push(r);try{t()}catch(t){throw f6(e,r,!1),t}f6(e,r,!0,g6(e)-n)}function u6(e,t){let n=e.instrumentation;if(n==null){d6(e,t);return}F3(n,`store.events.record`,()=>d6(e,t))}function d6(e,t){let n=e.transactionStack[e.transactionStack.length-1]??null;if(n==null){m6(e,t);return}n.events.push(t),qze(n,t)}function f6(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?p6(i,t):F3(n,`store.events.batch.merge`,()=>p6(i,t));return}let a=Gze(t,r),o=e.instrumentation;if(o==null){m6(e,a);return}F3(o,`store.events.batch.commit`,()=>m6(e,a))}function Gze(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 Kze(e,t){for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n);for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n)}function p6(e,t){for(let n of t.events)e.events.push(n);Kze(e,t)}function qze(e,t){for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n);for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n)}function m6(e,t){let n=e.instrumentation;if(n==null){h6(e,t);return}F3(n,`store.events.emit`,()=>h6(e,t))}function h6(e,t){e.listeners.get(t.operation)?.forEach(e=>e(t)),e.listeners.get(`*`)?.forEach(e=>e(t))}function g6(e){return e.snapshot.nodes[e.snapshot.rootId]?.visibleSubtreeCount??0}function _6(e,t){if(e.snapshot.options.flattenEmptyDirectories!==!0)return null;let n=e.snapshot.nodes[t];if(n==null||!k3(n)||j3(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||!k3(a)?null:i}function v6(e,t){let n=t;for(;;){let t=_6(e,n);if(t==null)return n;n=t}}function y6(e,t){let n=[t],r=t;for(;;){let t=_6(e,r);if(t==null)return n;n.push(t),r=t}}function b6(e,t){let n=t==null?e.snapshot.rootId:k6(e,t);return n==null?[]:Yze(e,n)}function x6(e,t){let n=G3(t),r=n.isDirectory?n.segments:n.segments.slice(0,-1),i=R6(e,iBe(e,r)),{createdNodeIds:a,directoryId:o}=Xze(e,r),s=new Set(a),c=o;if(n.isDirectory){let n=M6(e,o);if(j3(n,1))throw Error(`Path already exists: "${t}"`);M3(n,1),e.pathCacheByNodeId.set(o,{path:t,version:e.pathCacheVersion}),s.add(o)}else c=Qze(e,o,n.basename),s.add(c);E6(e,o);let l=R6(e,o);return Nze({affectedAncestorIds:O6(e,c),affectedNodeIds:[...s],path:t,projectionChanged:z6(i,l)})}function S6(e,t,n){let r=k6(e,t);if(r==null)throw Error(`Path does not exist: "${t}"`);let i=M6(e,r);if(j3(i,2))throw Error(`The root node cannot be removed`);if(k3(i)&&j6(e,r).childIds.length>0&&n.recursive!==!0)throw Error(`Cannot remove a non-empty directory without recursive: "${t}"`);let a=i.parentId,o=R6(e,a),s=I6(e,r);P6(e,a,r,i.nameId),L6(e,a),E6(e,a);let c=R6(e,a);return Pze({affectedAncestorIds:O6(e,a),affectedNodeIds:s,path:t,projectionChanged:z6(o,c),recursive:n.recursive===!0})}function C6(e,t,n,r){let i=k6(e,t);if(i==null)throw Error(`Source path does not exist: "${t}"`);let a=M6(e,i);if(j3(a,2))throw Error(`The root node cannot be moved`);let o=r.collision??`error`,s=nBe(e,i,n),c=R6(e,a.parentId),l=R6(e,s.parentId),u=X3(e.snapshot.segmentTable,a.nameId),d=Y3(e.snapshot.segmentTable,s.basename);if(s.parentId===a.parentId&&u===s.basename)return null;if(k3(a)&&oBe(e,i,s.parentId))throw Error(`Cannot move a directory into one of its descendants`);let f=h3(e.snapshot.nodes,j6(e,s.parentId)).get(d),p=s.existingNodeId??f??null;if(p!=null&&p!==i&&rBe(e,p,o,O3(a))===`skip`)return null;let m=a.parentId;P6(e,m,i,a.nameId),a.parentId=s.parentId,a.nameId=d,e.pathCacheByNodeId.delete(i),V6(e,i),N6(e,s.parentId,i),L6(e,m),e.pathCacheVersion++,E6(e,m),s.parentId!==m&&E6(e,s.parentId);let h=R6(e,m),g=R6(e,s.parentId);return Fze({affectedAncestorIds:[...new Set([...O6(e,m),...O6(e,s.parentId)])],affectedNodeIds:[i],from:t,projectionChanged:B6([c,l],[h,g]),to:T6(e,i)})}function Jze(e,t){let n=e.pathCacheByNodeId.get(t);return n!=null&&n.version===e.pathCacheVersion?n.path:null}function w6(e,t,n){return e.pathCacheByNodeId.set(t,{path:n,version:e.pathCacheVersion}),n}function T6(e,t){let n=M6(e,t),r=Jze(e,t);if(r!=null)return r;if(j3(n,2))return w6(e,t,``);let i=T6(e,n.parentId),a=X3(e.snapshot.segmentTable,n.nameId),o=i.length===0?a:`${i}${a}`;return w6(e,t,k3(n)?`${o}/`:o)}function E6(e,t){let n=e.instrumentation;if(n==null){U6(e,t);return}F3(n,`store.recomputeCountsUpwardFrom`,()=>U6(e,t))}function D6(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||!k3(o)){H6(e,a,o,!0),n.pop();continue}let s=i.get(a);if(s==null||t[1]>=s.childIds.length){H6(e,a,o,!0),n.pop();continue}let c=s.childIds[t[1]++];n.push([c,0])}}function O6(e,t){let n=[],r=t;for(;r!=null;){let t=M6(e,r);if(n.push(r),r===e.snapshot.rootId)break;r=t.parentId}return n}function k6(e,t){if(t.length===0)return e.snapshot.rootId;let n=K3(t);return A6(e,n.segments,n.requiresDirectory)}function A6(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=j6(e,r),a=h3(e.snapshot.nodes,i).get(t);if(a===void 0)return null;r=a}let i=M6(e,r);return n&&!k3(i)?null:r}function j6(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 M6(e,t){let n=e.snapshot.nodes[t];if(n===void 0||j3(n,4))throw Error(`Unknown node ID: ${String(t)}`);return n}function Yze(e,t){let n=e.snapshot.nodes[t];if(n===void 0||j3(n,4))return[];if(!k3(n))return[T6(e,t)];if(j6(e,t).childIds.length===0)return j3(n,1)&&!j3(n,2)?[T6(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||j3(n,4)){i.pop();continue}if(!k3(n)){r.push(T6(e,t.nodeId)),i.pop();continue}let a=j6(e,t.nodeId);if(a.childIds.length===0){j3(n,1)&&!j3(n,2)&&r.push(T6(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 Xze(e,t){let n=[],r=e.snapshot.rootId;for(let i of t){let t=Y3(e.snapshot.segmentTable,i),a=j6(e,r),o=h3(e.snapshot.nodes,a).get(t);if(o!==void 0){if(!k3(M6(e,o)))throw Error(`Cannot create a directory that collides with an existing file: "${i}"`);r=o;continue}r=Zze(e,r,t),n.push(r)}return{createdNodeIds:n,directoryId:r}}function Zze(e,t,n){let r=M6(e,t),i=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:E3(D3(r)+1,0,1),nameId:n,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),e.snapshot.directories.set(i,p3()),N6(e,t,i),e.collapseNewDirectoriesByDefault&&(e.collapsedDirectoryIds.add(i),e.hasCollapsedDirectoryOverrides=!0),e.activeNodeCount++,i}function Qze(e,t,n){let r=Y3(e.snapshot.segmentTable,n),i=j6(e,t);if(h3(e.snapshot.nodes,i).has(r))throw Error(`Path already exists: "${sBe(e,t,n)}"`);let a=M6(e,t),o=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:E3(D3(a)+1,0),nameId:r,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),N6(e,t,o),e.activeNodeCount++,o}function $ze(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}eBe(e,n,o)<0?i=a:r=a+1}return r}function N6(e,t,n){let r=j6(e,t),i=M6(e,n);h3(e.snapshot.nodes,r).set(i.nameId,n),b3(r,n,i.subtreeNodeCount,i.visibleSubtreeCount);let a=$ze(e,r,n);r.childIds.splice(a,0,n),v3(r,a),S3(e.snapshot.nodes,r)}function P6(e,t,n,r){let i=j6(e,t),a=g3(i),o=a.get(n)??-1;h3(e.snapshot.nodes,i).delete(r),a.delete(n);let s=e.snapshot.nodes[n];s!=null&&b3(i,n,-s.subtreeNodeCount,-s.visibleSubtreeCount),o>=0&&(i.childIds.splice(o,1),v3(i,o),S3(e.snapshot.nodes,i))}function eBe(e,t,n){let r=e.snapshot.options.sort;return r===`default`?tBe(e,t,n):r(F6(e,t),F6(e,n))}function tBe(e,t,n){let r=M6(e,t),i=M6(e,n),a=k3(r);if(a!==k3(i))return a?-1:1;let o=z3(H3(e.snapshot.segmentTable,r.nameId),H3(e.snapshot.segmentTable,i.nameId));if(o!==0)return o;let s=X3(e.snapshot.segmentTable,r.nameId),c=X3(e.snapshot.segmentTable,i.nameId);return s===c?t<n?-1:1:s<c?-1:1}function F6(e,t){let n=M6(e,t),r=T6(e,t),i=k3(n),a=i?r.slice(0,-1):r;return{basename:X3(e.snapshot.segmentTable,n.nameId),depth:D3(n),isDirectory:i,path:r,segments:a.length===0?[]:a.split(`/`)}}function nBe(e,t,n){let r=M6(e,t),i=k6(e,n);if(i!=null){let t=M6(e,i);if(k3(t))return{basename:X3(e.snapshot.segmentTable,r.nameId),existingNodeId:null,parentId:i};let a=K3(n).segments;return{basename:a[a.length-1]??``,existingNodeId:i,parentId:t.parentId}}let a=K3(n),o=a.segments[a.segments.length-1]??``,s=a.segments.slice(0,-1),c=s.length===0?e.snapshot.rootId:A6(e,s,!0);if(c==null)throw Error(`Destination parent does not exist: "${n}"`);return{basename:o,existingNodeId:null,parentId:c}}function rBe(e,t,n,r){if(n===`skip`)return`skip`;if(n===`error`)throw Error(`Destination already exists: "${T6(e,t)}"`);let i=M6(e,t);if(O3(i)!==r)throw Error(`replace collision requires the same source and destination kinds`);if(k3(i)&&j6(e,t).childIds.length>0)throw Error(`replace collision does not support non-empty directories`);let a=i.parentId,o=i.nameId;return I6(e,t),P6(e,a,t,o),L6(e,a),E6(e,a),`handled`}function I6(e,t){let n=[],r=[{nodeId:t,visitedChildren:!1}];for(;r.length>0;){let t=r.pop();if(t==null)break;let i=M6(e,t.nodeId);if(t.visitedChildren||!k3(i)){k3(i)&&e.snapshot.directories.delete(t.nodeId),M3(i,4),e.pathCacheByNodeId.delete(t.nodeId),e.collapsedDirectoryIds.delete(t.nodeId)&&(e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0),e.expandedDirectoryIds.delete(t.nodeId),jze(e,t.nodeId),e.activeNodeCount--,n.push(t.nodeId);continue}r.push({nodeId:t.nodeId,visitedChildren:!0});let a=j6(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 L6(e,t){let n=t;for(;n!=null;){let t=M6(e,n);if(!k3(t)||j3(t,2)||j6(e,n).childIds.length>0)return;M3(t,1),n=t.parentId===n?null:t.parentId}}function iBe(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=h3(e.snapshot.nodes,j6(e,n)).get(t);if(i==null||!k3(M6(e,i)))break;n=i}return n}function R6(e,t){let n=aBe(e,t);if(n==null)return null;let r=v6(e,n),i=M6(e,r),a=n===r?null:y6(e,n).map(t=>T6(e,t));return JSON.stringify({flattenedSegmentPaths:a,hasChildren:j6(e,r).childIds.length>0,path:T6(e,r),terminalKind:O3(i)})}function z6(e,t){return B6([e],[t])}function B6(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 aBe(e,t){let n=t;for(;n!=null;){let t=M6(e,n);if(!k3(t)||j3(t,2))return null;if(!a6(e,n,t))return n;n=t.parentId}return null}function V6(e,t){let n=M6(e,t);if(aze(n,(t===e.snapshot.rootId?-1:D3(M6(e,n.parentId)))+1),!k3(n))return;let r=j6(e,t);for(let t of r.childIds)V6(e,t)}function oBe(e,t,n){let r=n;for(;r!=null;){if(r===t)return!0;let n=M6(e,r);if(r===e.snapshot.rootId)return!1;r=n.parentId}return!1}function H6(e,t,n=M6(e,t),r=!1){let i=e.instrumentation;if(i==null){W6(e,t,n,r);return}F3(i,`store.recomputeNodeCounts`,()=>W6(e,t,n,r))}function U6(e,t){let n=t;for(;n!=null;){let t=M6(e,n),r=t.subtreeNodeCount,i=t.visibleSubtreeCount;if(H6(e,n,t),n===e.snapshot.rootId)return;let a=t.subtreeNodeCount-r,o=t.visibleSubtreeCount-i,s=t.parentId;(a!==0||o!==0)&&b3(j6(e,s),n,a,o),n=s}}function W6(e,t,n,r){if(!k3(n)){n.subtreeNodeCount=1,n.visibleSubtreeCount=1;return}let i=j6(e,t);if(r){let t=e.instrumentation;t==null?y3(e.snapshot.nodes,i):F3(t,`store.recomputeNodeCounts.rebuildChildAggregates`,()=>y3(e.snapshot.nodes,i))}let a=1+i.totalChildSubtreeNodeCount,o=i.totalChildVisibleSubtreeCount;if(n.subtreeNodeCount=a,j3(n,2)){n.visibleSubtreeCount=o;return}n.visibleSubtreeCount=_6(e,t)==null?a6(e,t,n)?1+o:1:o}function sBe(e,t,n){let r=T6(e,t);return r.length===0?n:`${r}${n}`}function G6(e){return e!=null&&!j3(e,4)}function K6(e,t){let n=e.snapshot.nodes[t];return!G6(n)||!k3(n)||j3(n,2)?null:n}function cBe(e){let t=0;for(let[n,r]of e.pathCacheByNodeId)r.version===e.pathCacheVersion&&G6(e.snapshot.nodes[n])&&(t+=1);return t}function lBe(e){return Math.max(0,e.valueById.length-1)}function q6(e){return{activeNodeCount:e.activeNodeCount,cachedPathEntryCount:cBe(e),loadInfoEntryCount:e.directoryLoadInfoById.size,segmentCount:lBe(e.snapshot.segmentTable),totalNodeSlotCount:Math.max(0,e.snapshot.nodes.length-1)}}function uBe(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 J6(e){let t=[],n=[];for(let n of e.collapsedDirectoryIds)K6(e,n)!=null&&t.push(T6(e,n));for(let t of e.expandedDirectoryIds)K6(e,t)!=null&&n.push(T6(e,t));return{collapsedPaths:t,expandedPaths:n}}function Y6(e){let t=[];for(let[n,r]of e.directoryLoadInfoById)K6(e,n)==null||c6(e,n)===`loaded`||t.push({info:{activeAttemptId:null,errorMessage:r.errorMessage,nextAttemptId:r.nextAttemptId,state:r.state},path:T6(e,n)});return t}function X6(e,t){e.collapsedDirectoryIds.clear(),e.hasCollapsedDirectoryOverrides=!1,e.expandedDirectoryIds.clear();for(let n of t.expandedPaths){let t=k6(e,n);t!=null&&o6(e,t,!0,M6(e,t))}for(let n of t.collapsedPaths){let t=k6(e,n);t!=null&&o6(e,t,!1,M6(e,t))}}function Z6(e,t){e.directoryLoadInfoById.clear();for(let n of t){let t=k6(e,n.path);t!=null&&K6(e,t)!=null&&e.directoryLoadInfoById.set(t,{activeAttemptId:null,errorMessage:n.info.errorMessage,nextAttemptId:n.info.nextAttemptId,state:n.info.state})}}function dBe(e){e.pathCacheVersion+=1,e.pathCacheByNodeId.clear(),e.pathCacheByNodeId.set(e.snapshot.rootId,{path:``,version:e.pathCacheVersion})}function fBe(e){let t=e.snapshot.segmentTable,n=J3();for(let r of e.snapshot.nodes)if(G6(r)){if(j3(r,2)){r.nameId=0;continue}r.nameId=Y3(n,X3(t,r.nameId))}e.snapshot.segmentTable=n}function pBe(e){for(let[t,n]of e.snapshot.directories){let r=e.snapshot.nodes[t];if(!G6(r)||!k3(r)){e.snapshot.directories.delete(t);continue}let i=n.childIds.filter(n=>{let r=e.snapshot.nodes[n];return G6(r)&&r.parentId===t});n.childIds=i,n.childIdByNameId=new Map(i.map(t=>[M6(e,t).nameId,t])),n.childPositionById=new Map(i.map((e,t)=>[e,t])),y3(e.snapshot.nodes,n)}}function mBe(e){let t=e.snapshot.nodes.length-1;for(;t>e.snapshot.rootId;){let n=e.snapshot.nodes[t];if(G6(n))break;--t}e.snapshot.nodes.length=t+1}function hBe(e){let t=J6(e),n=Y6(e);F3(e.instrumentation,`store.cleanup.stable.clearPathCaches`,()=>dBe(e)),F3(e.instrumentation,`store.cleanup.stable.rebuildSegmentTable`,()=>fBe(e)),F3(e.instrumentation,`store.cleanup.stable.rebuildDirectoryIndexes`,()=>pBe(e)),F3(e.instrumentation,`store.cleanup.stable.trimTrailingRemovedNodeSlots`,()=>mBe(e)),F3(e.instrumentation,`store.cleanup.stable.restoreExpansionOverrides`,()=>X6(e,t)),F3(e.instrumentation,`store.cleanup.stable.restoreDirectoryLoadInfos`,()=>Z6(e,n)),F3(e.instrumentation,`store.cleanup.stable.recomputeCounts`,()=>D6(e,e.snapshot.rootId))}function gBe(e){let t=J6(e),n=Y6(e),r=F3(e.instrumentation,`store.cleanup.aggressive.listPaths`,()=>b6(e)),i=oze({...e.snapshot.options},e.instrumentation),a=F3(e.instrumentation,`store.cleanup.aggressive.rebuildSnapshot`,()=>{let e=new r6(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,F3(e.instrumentation,`store.cleanup.aggressive.restoreExpansionOverrides`,()=>X6(e,t)),F3(e.instrumentation,`store.cleanup.aggressive.restoreDirectoryLoadInfos`,()=>Z6(e,n)),F3(e.instrumentation,`store.cleanup.aggressive.recomputeCounts`,()=>D6(e,e.snapshot.rootId))}function _Be(e){for(let t of e.directoryLoadInfoById.values())if(t.state===`loading`&&t.activeAttemptId!=null)return!0;return!1}function vBe(e,t){let n=q6(e);t===`stable`?F3(e.instrumentation,`store.cleanup.stable`,()=>hBe(e)):F3(e.instrumentation,`store.cleanup.aggressive`,()=>gBe(e));let r=q6(e);return uBe(t,t===`stable`,n,r)}var yBe=64;function bBe(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 Q6(e){return M6(e,e.snapshot.rootId).visibleSubtreeCount}function $6(e,t,n,r){let i=M6(e,t.terminalNodeId),a=Math.max(1,i.visibleSubtreeCount);return Math.min(r-1,n+a-1)}function xBe(e,t,n,r){return{ancestorPaths:r,index:t.index,posInSet:t.posInSet,row:c8(e,t.cursor),setSize:t.setSize,subtreeEndIndex:$6(e,t.cursor,t.index,n)}}function e8(e,t,n,r,i,a){let o=j6(e,t),{childIndex:s,childVisibleIndex:c,localVisibleIndex:l}=x3(e.snapshot.nodes,o,n),u=o.childIds[s];if(u==null)throw Error(`Visible index ${String(n)} is out of range`);return SBe(e,u,l,r+c,i+1,s,o.childIds.length,a)}function SBe(e,t,n,r,i,a,o,s){if(!k3(M6(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=a8(e,t,i);if(n===0)return{ancestors:s,cursor:c,index:r,posInSet:a,setSize:o};let l=M6(e,c.terminalNodeId);if(!k3(l)||!a6(e,c.terminalNodeId,l))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return e8(e,c.terminalNodeId,n-1,r+1,c.visibleDepth,[...s,{cursor:c,index:r,posInSet:a,setSize:o}])}function CBe(e,t){let n=Q6(e);if(t<0||t>=n)return null;let r=e8(e,e.snapshot.rootId,t,0,-1,[]),i=r.ancestors.map(t=>T6(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=xBe(e,a,n,[...i]);t.push(r),i.push(r.row.path)}return a=t,a},index:r.index,posInSet:r.posInSet,row:c8(e,r.cursor),setSize:r.setSize,subtreeEndIndex:$6(e,r.cursor,r.index,n)}}function wBe(e,t,n){let r=e.instrumentation,i=Q6(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 jBe(e,o+1);let t=[],n=n8(e,a);for(let r=a;r<=o&&n!=null;r++){let r=c8(e,n);t.push(r),n=o8(e,n)}return t}let s=[],c=0,l=0,u=F3(r,`store.getVisibleSlice.selectFirstRow`,()=>n8(e,a));for(let t=a;t<=o&&u!=null;t++){let t=F3(r,`store.getVisibleSlice.materializeRow`,()=>c8(e,u));s.push(t),t.isFlattened&&(c++,l+=t.flattenedSegments?.length??0),u=F3(r,`store.getVisibleSlice.advanceCursor`,()=>o8(e,u))}return I3(r,`workload.visibleRowsRead`,s.length),I3(r,`workload.flattenedRowsRead`,c),I3(r,`workload.flattenedSegmentsRead`,l),s}function t8(e,t=Q6(e)){let n=e.instrumentation;return n==null?s8(e,t):F3(n,`store.getVisibleTreeProjection`,()=>s8(e,t))}function TBe(e){return ABe(t8(e))}function EBe(e,t){let n=k6(e,t);if(n==null||n===e.snapshot.rootId||k3(M6(e,n))&&v6(e,n)!==n)return null;let r=0,i=n,{nodes:a,rootId:o}=e.snapshot;for(;i!==o;){let t=M6(e,i).parentId,n=j6(e,t),s=g3(n).get(i);if(s==null)throw Error(`Child ${String(i)} was not found in its parent index`);if(r+=nze(a,n,s),t!==o){let n=M6(e,t),a=_6(e,t);if(!a6(e,t,n)&&a!==i)return null;v6(e,t)===t&&(r+=1)}i=t}return r}function DBe(e,t){let n=k6(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=M6(e,n);if(!k3(r))throw Error(`Path is not a directory: "${t}"`);return a6(e,n,r)?null:(o6(e,n,!0,r),E6(e,n),Ize({affectedAncestorIds:O6(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0}))}function OBe(e,t){let n=k6(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=M6(e,n);if(!k3(r))throw Error(`Path is not a directory: "${t}"`);return a6(e,n,r)?(o6(e,n,!1,r),E6(e,n),Lze({affectedAncestorIds:O6(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0})):null}function n8(e,t){return t<0||t>=Q6(e)?null:r8(e,e.snapshot.rootId,t,-1)}function r8(e,t,n,r){let i=j6(e,t),a=e.instrumentation,{childIndex:o,localVisibleIndex:s}=a==null?x3(e.snapshot.nodes,i,n):F3(a,`store.getVisibleSlice.selectChildIndex`,()=>x3(e.snapshot.nodes,i,n)),c=i.childIds[o];if(c!=null)return i8(e,c,s,r+1);throw Error(`Visible index ${String(n)} is out of range`)}function i8(e,t,n,r){if(!k3(M6(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=a8(e,t,r);if(n===0)return i;let a=M6(e,i.terminalNodeId);if(!k3(a)||!a6(e,i.terminalNodeId,a))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return r8(e,i.terminalNodeId,n-1,i.visibleDepth)}function a8(e,t,n){return k3(M6(e,t))?e.instrumentation==null?{headNodeId:t,terminalNodeId:v6(e,t),visibleDepth:n}:{headNodeId:t,terminalNodeId:F3(e.instrumentation,`store.getVisibleSlice.flatten.resolveTerminalDirectory`,()=>v6(e,t)),visibleDepth:n}:{headNodeId:t,terminalNodeId:t,visibleDepth:n}}function kBe(e,t){let n=M6(e,t);if(!k3(n))return!0;let r=n.parentId;return r===e.snapshot.rootId?!0:_6(e,r)!==t}function o8(e,t){let n=M6(e,t.terminalNodeId);if(k3(n)){let r=j6(e,t.terminalNodeId);if(a6(e,t.terminalNodeId,n)&&r.childIds.length>0){let n=r.childIds[0];return n==null?null:i8(e,n,0,t.visibleDepth+1)}}let r=t.terminalNodeId,i=t.visibleDepth;for(;;){let t=M6(e,r);if(r===e.snapshot.rootId)return null;let n=t.parentId,a=j6(e,n),o=g3(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 i8(e,s,0,i);kBe(e,r)&&i--,r=n}}function ABe(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 s8(e,t){let n=Array(t),r=new Int32Array(t),i=new Int32Array(t),a=new Int32Array(t),o=new Int32Array(yBe);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=bBe(o,y);let x,S=_;if(k3(v))S=f?v6(e,_):_,x=S===_?`${b}${h[v.nameId]}/`:T6(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&&k3(C)&&a6(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 jBe(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(!k3(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:T6(e,f)};continue}let h=l?v6(e,f):f,g={headNodeId:f,terminalNodeId:h,visibleDepth:m};n[r++]=c8(e,g);let _=i[h];_!=null&&k3(_)&&a6(e,h,_)&&s.push([a.get(h),0,m])}return r<t&&(n.length=r),n}function c8(e,t){let n=M6(e,t.terminalNodeId),r=k3(n)?MBe(e,t):null,i=T6(e,t.terminalNodeId),a=X3(e.snapshot.segmentTable,n.nameId),o=k3(n)&&j6(e,t.terminalNodeId).childIds.length>0,s=t.headNodeId!==t.terminalNodeId,c=e.instrumentation,l=s?c==null?y6(e,t.headNodeId).map(n=>{let r=M6(e,n);return{isTerminal:n===t.terminalNodeId,name:X3(e.snapshot.segmentTable,r.nameId),nodeId:n,path:T6(e,n)}}):F3(c,`store.getVisibleSlice.flatten.collectSegments`,()=>y6(e,t.headNodeId).map(n=>{let r=M6(e,n);return{isTerminal:n===t.terminalNodeId,name:X3(e.snapshot.segmentTable,r.nameId),nodeId:n,path:T6(e,n)}})):void 0;return{depth:t.visibleDepth,flattenedSegments:l,hasChildren:o,id:t.terminalNodeId,isExpanded:k3(n)&&a6(e,t.terminalNodeId,n),isFlattened:s,isLoading:r===`loading`,kind:k3(n)?`directory`:`file`,loadState:r==null||r===`loaded`?void 0:r,name:a,path:i}}function MBe(e,t){if(t.headNodeId===t.terminalNodeId)return c6(e,t.terminalNodeId);let n=y6(e,t.headNodeId),r=!1,i=!1;for(let t of n){let n=c6(e,t);if(n===`loading`)return`loading`;if(n===`error`){i=!0;continue}n===`unloaded`&&(r=!0)}return i?`error`:r?`unloaded`:`loaded`}function NBe(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||!k3(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&&S3(n,i),r.subtreeNodeCount=1+c;let u;if(o&&s===1){let e=n[a[0]];u=e!=null&&k3(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,S3(n,l),c.subtreeNodeCount=1+d,c.visibleSubtreeCount=f}function PBe(e){return e.initialExpansion===`open`&&(e.initialExpandedPaths==null||e.initialExpandedPaths.length===0)}var l8=class e{#e;constructor(e={}){let t=P3(e),n=F3(t,`store.builder.create`,()=>new r6(e));if(e.preparedInput!=null){let t=xze(e.preparedInput);t==null?n.appendPreparedPaths(bze(e.preparedInput),!1):n.appendPresortedPaths(t,Sze(e.preparedInput))}else{let r=e.paths??[];e.presorted===!0?n.appendPaths(r):n.appendPreparedPaths(F3(t,`store.preparePathEntries`,()=>n6(r,e)))}let r=F3(t,`store.builder.finish`,()=>n.finish({skipSubtreeCountPass:!0})),i=F3(t,`store.state.detectAllDirectoriesExpanded`,()=>(e.initialExpansion??`closed`)===`closed`&&n.didMatchAllInitialExpandedPaths());this.#e=F3(t,`store.state.create`,()=>Cze(r,i?`open`:e.initialExpansion??`closed`,t)),i&&(this.#e.collapseNewDirectoriesByDefault=!0);let a=i?this.#e.snapshot.directories.size-1:F3(t,`store.state.initializeExpandedPaths`,()=>this.initializeExpandedPaths(e.initialExpandedPaths));i||PBe(e)||(e.initialExpansion??`closed`)===`closed`&&a===this.#e.snapshot.directories.size-1||(e.initialExpandedPaths?.length??0)>0&&F3(t,`store.state.checkAllDirectoriesExpanded`,()=>this.hasAllDirectoriesExpanded())?F3(t,`store.state.initializeOpenVisibleCounts`,()=>NBe(this.#e)):F3(t,`store.state.recomputeCounts`,()=>D6(this.#e,this.#e.snapshot.rootId))}static preparePaths(e,t={}){return _ze(e,t)}static prepareInput(e,t={}){return vze(e,t)}static preparePresortedInput(e){return yze(e)}list(e){return F3(this.#e.instrumentation,`store.list`,()=>b6(this.#e,e))}add(e){F3(this.#e.instrumentation,`store.add`,()=>{let t=Q6(this.#e);u6(this.#e,l6(this.#e,t,x6(this.#e,e)))})}remove(e,t={}){F3(this.#e.instrumentation,`store.remove`,()=>{let n=Q6(this.#e);u6(this.#e,l6(this.#e,n,S6(this.#e,e,t)))})}move(e,t,n={}){F3(this.#e.instrumentation,`store.move`,()=>{let r=Q6(this.#e),i=C6(this.#e,e,t,n);i!=null&&u6(this.#e,l6(this.#e,r,i))})}batch(e){Wze(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});break}})}getVisibleCount(){return F3(this.#e.instrumentation,`store.getVisibleCount`,()=>Q6(this.#e))}getVisibleSlice(e,t){return F3(this.#e.instrumentation,`store.getVisibleSlice`,()=>wBe(this.#e,e,t))}getVisibleRowContext(e){return F3(this.#e.instrumentation,`store.getVisibleRowContext`,()=>CBe(this.#e,e))}getVisibleTreeProjection(){return TBe(this.#e)}getVisibleTreeProjectionData(e){return t8(this.#e,e)}getVisibleIndex(e){return F3(this.#e.instrumentation,`store.getVisibleIndex`,()=>EBe(this.#e,e))}getPathInfo(e){return F3(this.#e.instrumentation,`store.getPathInfo`,()=>{let t=k6(this.#e,e);if(t==null)return null;let n=M6(this.#e,t);return{depth:D3(n),kind:k3(n)?`directory`:`file`,path:T6(this.#e,t)}})}isExpanded(e){return F3(this.#e.instrumentation,`store.isExpanded`,()=>{let t=this.requireDirectoryNodeId(e),n=M6(this.#e,t);return a6(this.#e,t,n)})}expand(e){F3(this.#e.instrumentation,`store.expand`,()=>{let t=Q6(this.#e),n=DBe(this.#e,e);n!=null&&u6(this.#e,l6(this.#e,t,n))})}collapse(e){F3(this.#e.instrumentation,`store.collapse`,()=>{let t=Q6(this.#e),n=OBe(this.#e,e);n!=null&&u6(this.#e,l6(this.#e,t,n))})}on(e,t){return Mze(this.#e,e,t)}getDirectoryLoadState(e){let t=this.requireDirectoryNodeId(e);return c6(this.#e,t)}markDirectoryUnloaded(e){F3(this.#e.instrumentation,`store.markDirectoryUnloaded`,()=>{let t=this.requireDirectoryNodeId(e);if(j6(this.#e,t).childIds.length>0)throw Error(`Cannot mark a directory with known children as unloaded: "${e}"`);let n=Q6(this.#e);Dze(this.#e,t),u6(this.#e,l6(this.#e,n,Rze({affectedAncestorIds:O6(this.#e,t),affectedNodeIds:[t],path:e,projectionChanged:this.isDirectoryProjectionVisible(t)})))})}beginChildLoad(e){return F3(this.#e.instrumentation,`store.beginChildLoad`,()=>{let t=this.requireDirectoryNodeId(e),n=Q6(this.#e),r=Eze(this.#e,t);return u6(this.#e,l6(this.#e,n,zze({affectedAncestorIds:O6(this.#e,t),affectedNodeIds:[t],attemptId:r.attemptId,path:e,projectionChanged:this.isDirectoryProjectionVisible(t),reused:r.reused}))),r})}applyChildPatch(e,t){return F3(this.#e.instrumentation,`store.applyChildPatch`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null||c6(this.#e,n)!==`loading`||!kze(this.#e,n,e.attemptId))return!1;let r=T6(this.#e,n);this.validateChildPatch(r,t);let i=Q6(this.#e),a=[];for(let e of t.operations){FBe(r,e);let t=Q6(this.#e);switch(e.type){case`add`:a.push(l6(this.#e,t,x6(this.#e,e.path)));break;case`remove`:a.push(l6(this.#e,t,S6(this.#e,e.path,{recursive:e.recursive})));break;case`move`:{let n=C6(this.#e,e.from,e.to,{collision:e.collision});n!=null&&a.push(l6(this.#e,t,n));break}}}let o=a.some(e=>e.projectionChanged)||this.isDirectoryProjectionVisible(n);return u6(this.#e,l6(this.#e,i,Bze({affectedAncestorIds:O6(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,childEvents:a,path:T6(this.#e,n),projectionChanged:o}))),!0})}completeChildLoad(e){return F3(this.#e.instrumentation,`store.completeChildLoad`,()=>{let t=this.resolveActiveDirectoryNodeId(e.nodeId);if(t==null)return!1;let n=Q6(this.#e),r=Oze(this.#e,t,e.attemptId);return u6(this.#e,l6(this.#e,n,Vze({affectedAncestorIds:O6(this.#e,t),affectedNodeIds:[t],attemptId:e.attemptId,path:T6(this.#e,t),projectionChanged:this.isDirectoryProjectionVisible(t),stale:!r}))),r})}failChildLoad(e,t){return F3(this.#e.instrumentation,`store.failChildLoad`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null)return!1;let r=Q6(this.#e),i=Aze(this.#e,n,e.attemptId,t);return u6(this.#e,l6(this.#e,r,Hze({affectedAncestorIds:O6(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,errorMessage:t,path:T6(this.#e,n),projectionChanged:this.isDirectoryProjectionVisible(n),stale:!i}))),i})}cleanup(e={}){return F3(this.#e.instrumentation,`store.cleanup`,()=>{if(this.#e.transactionStack.length>0)throw Error(`Cleanup cannot run during an open batch or transaction.`);if(_Be(this.#e))throw Error(`Cleanup cannot run while directory loads are active.`);let t=Q6(this.#e),n=vBe(this.#e,e.mode??`stable`);return u6(this.#e,l6(this.#e,t,Uze({...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=j6(this.#e,p).childIds,_=m===d?n[m]??0:0,v=_,y,b=l.get(a)??R3(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=z3(H3(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(!k3(M6(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=M6(this.#e,n);a6(this.#e,n,i)||(o6(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=M6(this.#e,e);if(!a6(this.#e,e,t))return!1}return!0}requireDirectoryNodeId(e){let t=k6(this.#e,e);if(t==null)throw Error(`Path does not exist: "${e}"`);if(!k3(M6(this.#e,t)))throw Error(`Path is not a directory: "${e}"`);return t}resolveActiveDirectoryNodeId(e){try{if(!k3(M6(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=M6(this.#e,t).parentId;if(e!==this.#e.snapshot.rootId){let n=M6(this.#e,e),r=_6(this.#e,e);if(!a6(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 FBe(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}"`);break}}var IBe=e=>e.startsWith(`f::`)?e.slice(3):e;function LBe(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function RBe(e,t){return e===``?t:`${e}/${t}`}function zBe({files:e,path:t,isFolder:n,nextBasename:r}){let i=IBe(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}=LBe(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=RBe(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 BBe(e){return e.endsWith(`/`)}function VBe(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 HBe(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 UBe(e,t){return t.includes(e)?HBe(t):[e]}function WBe(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 u8(e,t){return{draggedPaths:e,target:t}}function d8(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(BBe(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function GBe(e,t){return t.kind===`root`||t.directoryPath==null?VBe(e):t.directoryPath}function KBe(e,t){let n=e.map(e=>{let n=GBe(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}}}var f8=Symbol(`FILE_TREE_RENAME_VIEW`);function p8(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}var qBe=512,JBe=512;function m8(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function h8(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 g8(e){return h8(e).at(-1)??null}function _8(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}var YBe=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},v8=e=>e.toLowerCase();function y8(e){return e.endsWith(`/`)}function XBe(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function b8(e){return e.endsWith(`/`)?e.slice(0,-1):e}function x8(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}function ZBe(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 QBe(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function S8(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 QBe(e,t.path)?n?e:null:e;case`move`:return ZBe(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=S8(r,e,n),r==null)return null;return r}}}function C8(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function $Be(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 w8(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(!$Be(l8.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 T8(e){switch(e.operation){case`add`:return{...C8(e),operation:`add`,path:e.path};case`remove`:return{...C8(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...C8(e),from:e.from,operation:`move`,to:e.to}}}function eVe(e){return{...C8(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>T8(e)),operation:`batch`}}function tVe(e){switch(e.operation){case`add`:case`remove`:case`move`:return T8(e);case`batch`:return eVe(e);default:return null}}function nVe(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=h8(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 rVe(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:nVe(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var iVe=class{#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=new Set;#z=0;#B;#V=0;#H=!1;#U=0;#W;constructor(e){let{dragAndDrop:t,fileTreeSearchMode:n,initialSearchQuery:r,initialSelectedPaths:i,renaming:a,onSearchChange:o,paths:s,preparedInput:c,...l}=e,u=w8({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.#B=this.#se(u.paths,u.preparedInput);let d=i?.map(e=>this.#Ae(e)).filter(e=>e!=null)??[],f=d.at(-1)??null;d.length>0&&(this.#R=new Set(d),this.#L=f,this.#z=1),this.#Oe(f,!1),r!=null&&this.#Se(r,!1),this.#W=this.#Fe()}destroy(){this.#W?.(),this.#W=null,this.#n.clear(),this.#t.clear(),this.#d.clear(),this.#i=null,this.#pe()}focusFirstItem(){this.#ve().length>0&&this.#Me(0)}focusLastItem(){this.#U<=0||(this.#Ne(),this.#Me(this.#U-1))}focusNextItem(){this.#De(1)}focusParentItem(){if(this.#c==null)return;let e=g8(this.#c);if(e==null)return;let t=this.#Y(e);t>=0&&this.#Me(t)}focusPath(e){let t=this.#B.getPathInfo(e)?.path??null;if(t==null)return;this.#Ne();let n=this.#Y(t);n>=0&&this.#Me(n)}focusNearestPath(e){let t=this.resolveNearestVisiblePath(e);if(t==null)return null;let n=this.#Y(t);return n>=0?(this.#Me(n),this.#ve()[n]??t):null}focusPreviousItem(){this.#De(-1)}getFocusedIndex(){return this.#s}getFocusedItem(){return this.#c==null?null:this.#X(this.#c)}getFocusedPath(){return this.#c}resolveNearestVisiblePath(e){let t=this.#ve();if(this.#U===0)return null;if(e==null)return this.#c??t[0]??null;let n=this.#B.getPathInfo(e)?.path??e,r=this.#Y(n);return r>=0?t[r]??n:this.#J(n)??this.#c??t[0]??null}getSelectedPaths(){return[...this.#R]}getSelectionVersion(){return this.#z}getVisibleCount(){return this.#U}getVisibleRows(e,t){if(t<e||this.#U===0)return[];let n=Math.max(0,e),r=Math.min(this.#U-1,t);if(r<n)return[];let i=r-n+1;if(this.#F==null&&!this.#l&&r>=this.#b.length&&i<=JBe){let e=[];for(let t=n;t<=r;t+=1){let n=this.#B.getVisibleRowContext(t);if(n==null)break;e.push(this.#Q(n))}return e}if(!this.#l&&r>=this.#b.length&&this.#Ne(),this.#F!=null){let e=Array.from({length:r-n+1},(e,t)=>this.#ye(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.#B.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.#ye(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.#Z(o,i,a,{ancestorPaths:this.#te(a),path:s})})}return this.#B.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.#Z(e,r,r,{ancestorPaths:this.#te(r),path:i})})}getStickyRowCandidates(e,t){if(this.#F!=null)return null;if(this.#U===0||e<=0||t<=0)return[];let n=[];for(let r=0;r<this.#U;r+=1){let i=e+r*t,a=Math.min(this.#U-1,Math.floor(i/t)),o=this.#$(a,r)??(a>0?this.#$(a-1,r):void 0);if(o==null)break;n.push({row:this.#Q(o),subtreeEndIndex:o.subtreeEndIndex})}return n}getItem(e){let t=this.#B.getPathInfo(e);return t==null?null:this.#X(t.path,t)}selectAllVisiblePaths(){this.#Ne();let e=[...this.#ve()];this.#re(e,this.#c??this.#L)}selectOnlyPath(e){let t=this.#Ae(e);t!=null&&this.#re([t],t)}selectPath(e){let t=this.#Ae(e);t==null||this.#R.has(t)||this.#re([...this.#R,t])}deselectPath(e){let t=this.#Ae(e);t==null||!this.#R.has(t)||this.#re([...this.#R].filter(e=>e!==t))}toggleFocusedSelection(){this.#c!=null&&this.togglePathSelectionFromInput(this.#c)}togglePathSelection(e){let t=this.#Ae(e);if(t!=null){if(this.#R.has(t)){this.deselectPath(t);return}this.selectPath(t)}}togglePathSelectionFromInput(e){let t=this.#Ae(e);if(t!=null){if(this.#R.has(t)){this.#re([...this.#R].filter(e=>e!==t),t);return}this.#re([...this.#R,t],t)}}selectPathRange(e,t){let n=this.#Ae(e);if(n==null)return;this.#Ne();let r=this.#L,i=r==null?-1:this.#be(r),a=this.#be(n);if(i===-1||a===-1){let e=t?[...this.#R,n]:[n];this.#re(e,n);return}let[o,s]=i<=a?[i,a]:[a,i],c=this.#ve().slice(o,s+1),l=t?[...this.#R,...c]:c;this.#re(l,r)}extendSelectionFromFocused(e){if(this.#c==null)return;let t=this.#s;if(t===-1)return;let n=Math.min(this.#U-1,Math.max(0,t+e));if(n===t)return;!this.#l&&n>=this.#b.length&&this.#Ne();let r=this.#ve(),i=r[t]??null,a=r[n]??null;if(i==null||a==null)return;let o=new Set(this.#R);o.has(i)&&o.has(a)?o.delete(i):o.add(a),this.#re([...o],this.#L??i,!1),this.#Me(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.#Ae(e);if(t==null||this.#M!=null&&this.#M.length>0)return!1;let n=this.getSelectedPaths(),r=UBe(t,n);return this.#r.canDrag?.(r)===!1?!1:(n.includes(t)||this.#re([t],t,!1),this.#je(t),this.#i={draggedPaths:r,primaryPath:t,target:null},this.#we(),!0)}setDragTarget(e){let t=this.#i;if(t==null)return;let n=e;if(n!=null){let e=u8(t.draggedPaths,n);(d8(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}WBe(t.target,n)||(this.#i={...t,target:n},this.#we())}cancelDrag(){this.#i!=null&&(this.#i=null,this.#we())}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.#we(),!1;let n=u8(e.draggedPaths,t);if(d8(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#we(),!1;let r=KBe(e.draggedPaths,t);if(r==null)return this.#we(),!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.#B.move(e.from,e.to,{collision:e.collision})}else this.#oe(r.operations),this.#B.batch(r.operations)}catch(e){return this.#we(),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.#B.add(e)}remove(e,t={}){this.#B.remove(e,t)}move(e,t,n={}){this.#B.move(e,t,n)}batch(e){this.#B.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.#Se(e,!0)}openSearch(e=``){this.#Se(e,!0)}closeSearch(){this.#Se(null,!0)}isSearchOpen(){return this.#M!==null}getSearchValue(){return this.#M??``}getSearchMatchingPaths(){return this.#k}focusNextSearchMatch(){this.#xe(1)}focusPreviousSearchMatch(){this.#xe(-1)}startRenaming(e=this.#c??``,t={}){if(!this.#w)return!1;let n=this.#B.getPathInfo(e);if(n==null)return!1;let r=n.path,i=y8(r),a=b8(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of h8(r))this.#B.isExpanded(e)||this.#B.expand(e);return this.#re([r],r,!1),this.#M!=null&&(this.#Se(null,!1),this.#y?.(this.#M)),this.#je(r),this.#T=r,this.#E=XBe(r),this.#D=t.removeIfCanceled??!1,this.#we(),!0}[f8](){return{cancel:()=>{this.#G()},commit:()=>{this.#K()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#q(e)}}}#G(){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,y8(e)?{recursive:!0}:void 0);return}this.#je(e),this.#we()}#K(){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,y8(e)?{recursive:!0}:void 0);return}let t=y8(e),n=zBe({files:this.#B.list(),isFolder:t,nextBasename:this.#E,path:b8(e)});if(this.#T=null,this.#E=``,this.#D=!1,`error`in n){this.#je(e),this.#v?.(n.error),this.#we();return}if(n.sourcePath===n.destinationPath){this.#je(e),this.#we();return}this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(x8(n.sourcePath,t),x8(n.destinationPath,t))}#q(e){this.#T==null||this.#E===e||(this.#E=e,this.#we())}resetPaths(e,t={}){let n=this.#B.list().length,r=this.#U,i=w8({paths:e,preparedInput:t.preparedInput},`resetPaths`,this.#e.sort),a=this.#se(i.paths,i.preparedInput,t.initialExpandedPaths),o=this.#c,s=this.#T,c=this.getSelectedPaths(),l=this.#L;this.#W?.(),this.#B=a,this.#d.clear(),this.#pe();let u=c.map(e=>a.getPathInfo(e)?.path??null).filter(e=>e!=null),d=!m8(this.#R,u);this.#R=new Set(u),d&&(this.#z+=1),this.#L=l==null?null:a.getPathInfo(l)?.path??null,this.#T=s==null?null:a.getPathInfo(s)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#Oe(o,o!=null||u.length>0||this.#L!=null),this.#W=this.#Fe(),this.#we(),this.#Te({canonicalChanged:!0,operation:`reset`,pathCountAfter:i.paths.length,pathCountBefore:n,projectionChanged:!0,usedPreparedInput:t.preparedInput!=null,visibleCountDelta:this.#U-r})}#J(e){this.#Ne();let t=g8(e),n=_8(e,t),r=null,i=null;for(let e of this.#ve()){if(g8(e)!==t)continue;let a=_8(e,t);if(a<n){r=e;continue}if(a>n){i=e;break}}return r??i}#Y(e){let t=this.#be(e);if(t!==-1)return t;let n=h8(e);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t==null)continue;let r=this.#be(t);if(r!==-1)return r}return this.#ve().length>0?0:-1}#X(e,t){let n=this.#d.get(e);if(n!=null)return n;let r=t??this.#B.getPathInfo(e);if(r==null)return null;let i=r.kind===`directory`?this.#ie(r.path):this.#ae(r.path);return this.#d.set(r.path,i),i}#Z(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.#R.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}}#Q(e){return this.#Z(e.row,e.index,e.index,{ancestorPaths:e.ancestorPaths,path:e.row.path,posInSet:e.posInSet,setSize:e.setSize})}#$(e,t){let n=this.#B.getVisibleRowContext(e);return n==null?void 0:n.ancestorRows[t]??(t===n.ancestorRows.length&&n.row.kind===`directory`&&n.row.isExpanded?n:void 0)}#ee(e){let t=this.#a.get(e);if(t!=null)return t;let n=this.#u(e),r=n<0?[]:[...this.#ee(n),n];return this.#a.set(e,r),r}#te(e){let t=this.#o.get(e);if(t!=null)return t;let n=this.#ee(e).map(e=>this.#b[e]??``).filter(e=>e!==``);return this.#o.set(e,n),n}#ne(e){this.#B.collapse(e)}#re(e,t=this.#L,n=!0){let r=[...new Set(e)],i=!m8(this.#R,r),a=this.#L!==t;!i&&!a||(this.#R=new Set(r),this.#L=t,i&&(this.#z+=1),n&&this.#we())}#ie(e){return{collapse:()=>{this.#ne(e)},deselect:()=>{this.deselectPath(e)},expand:()=>{this.#Ee(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!0,isExpanded:()=>this.#B.isExpanded(e),isFocused:()=>this.#c===e,isSelected:()=>this.#R.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)},toggle:()=>{this.#Ie(e)}}}#ae(e){return{deselect:()=>{this.deselectPath(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!1,isFocused:()=>this.#c===e,isSelected:()=>this.#R.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)}}}#oe(e){let t=this.#B.list();this.#se(t).batch(e)}#se(e,t,n){return new l8({...this.#e,paths:e,preparedInput:t??void 0,...n===void 0?{}:{initialExpandedPaths:n}})}#ce(){return this.#h??=this.#B.list(),this.#h}#le(){if(this.#m!=null)return this.#m;let e=new Set;for(let t of this.#ce()){e.add(t);for(let n of h8(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#ue(){return this.#g??=this.#ce().map(v8),this.#g}#de(){return this.#f??=this.#le().filter(e=>e.endsWith(`/`)),this.#f}#fe(){return this.#p??=this.#de().map(v8),this.#p}#pe(){this.#f=null,this.#p=null,this.#m=null,this.#h=null,this.#g=null}#me(){return this.#de().filter(e=>this.#B.isExpanded(e))}#he(e){let t=new Set(this.#j??[]);if(e)for(let e of this.#R)for(let n of h8(e))t.add(n);this.#ge(t)}#ge(e){this.#H=!0;try{for(let t of this.#de()){let n=e.has(t),r=this.#B.isExpanded(t);n&&!r?this.#B.expand(t):!n&&r&&this.#B.collapse(t)}}finally{this.#H=!1}}#_e(){let e=this.#b;if(this.#k=e.filter(e=>this.#O.has(e)),this.#M==null||this.#M.length===0||this.#A!==`hide-non-matches`||this.#O.size===0){this.#F=null,this.#I=null,this.#P=null,this.#U=this.#V;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.#U=n.length}#ve(){return this.#I??this.#b}#ye(e){return this.#F?.[e]??e}#be(e){return this.#P?.get(e)??this.#B.getVisibleIndex(e)??-1}#xe(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)}#Se(e,t){let n=e==null?null:YBe(e),r=this.#M;if(r!==n){if(r==null&&n!=null&&(this.#j=this.#me()),this.#M=n,n==null)this.#he(!0),this.#j=null,this.#O.clear(),this.#N=null,this.#Oe(this.#c,!0);else if(n.length===0)this.#he(!1),this.#O.clear(),this.#N=null,this.#Oe(this.#c,!0);else{let e=this.#Ce();this.#Oe(e,!0)}t&&(this.#y?.(this.#M),this.#we())}}#Ce(){if(this.#M==null||this.#M.length===0)return this.#O.clear(),this.#c;let e=this.#M,t=this.#ce(),n=this.#ue(),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.#de(),s=this.#fe();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 h8(e))l.add(t),c?.add(t)}return this.#ge(l),a??this.#c}#we(){for(let e of this.#t)e()}#Te(e){this.#n.get(e.operation)?.forEach(t=>{t(e)}),this.#n.get(`*`)?.forEach(t=>{t(e)})}#Ee(e){for(let t of h8(e))this.#B.isExpanded(t)||this.#B.expand(t);this.#B.isExpanded(e)||this.#B.expand(e)}#De(e){let t=this.#U;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.#Ne(),this.#Me(r))}#Oe(e,t=!0){let n=this.#B.getVisibleCount();this.#V=n;let r=rVe(this.#B.getVisibleTreeProjectionData(t?void 0:Math.min(n,qBe)),e,t?e=>this.#B.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.#_e(),this.#s=e==null?this.#ve().length>0?0:-1:this.#Y(e),this.#c=this.#s<0?null:this.#ke(this.#s)}#ke(e){return this.#ve()[e]??(this.#F==null?this.#B.getVisibleRowContext(e)?.row.path??null:null)}#Ae(e){return this.#B.getPathInfo(e)?.path??null}#je(e){if(e==null)return;let t=this.#Y(e);t>=0&&this.#Me(t,!1)}#Me(e,t=!0){let n=this.#ke(e);n!=null&&(this.#s===e&&this.#c===n||(this.#s=e,this.#c=n,t&&this.#we()))}#Ne(){this.#l||this.#Oe(this.#c,!0)}#Pe(e){let t=S8(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=S8(this.#c,e,!0),r=[...this.#R].map(t=>S8(t,e)).filter(e=>e!=null).map(e=>this.#B.getPathInfo(e)?.path??null).filter(e=>e!=null),i=S8(this.#L,e),a=i==null?null:this.#B.getPathInfo(i)?.path??null,o=[...new Set(r)];return m8(this.#R,o)||(this.#R=new Set(o),this.#z+=1),this.#L=a,n}#Fe(){return this.#B.on(`*`,e=>{if(this.#H)return;e.canonicalChanged&&(this.#d.clear(),this.#pe()),this.#i!=null&&p8(e)&&(this.#i=null);let t=p8(e)?this.#Pe(e):this.#c,n=this.#M!=null&&this.#M.length>0?this.#Ce():this.#M===``?this.#c:t,r=this.#M!=null||e.operation!==`expand`&&e.operation!==`collapse`;this.#Oe(n,r),this.#we();let i=tVe(e);i!=null&&this.#Te(i)})}#Ie(e){if(this.#B.isExpanded(e)){this.#ne(e);return}this.#Ee(e)}},aVe=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 oVe(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 sVe(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 cVe(e,t){return t?`${e}/`:e}function E8(e,t=null){let n=aVe(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;for(let t of e??[]){let e=oVe(t.path);if(e==null)continue;let n=cVe(e.path,e.isDirectory);r.set(n,t.status),t.status===`ignored`&&e.isDirectory?a.add(n):e.isDirectory&&a.delete(n);for(let t of sVe(e.path))i.add(t)}return{directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}var lVe=e=>e.trim().toLowerCase(),uVe=e=>e.split(`/`).at(-1)??e,dVe=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 D8(e,t){return typeof e==`string`?{name:e,remappedFrom:t}:{...e,remappedFrom:t}}function fVe(e){let t=n3(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(lVe(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 n=uVe(o),s=n.toLowerCase(),c=r.get(s);if(c!=null)return D8(c,e);for(let[t,n]of a)if(s.includes(t))return D8(n,e);let l=dVe(n);for(let t of l){let n=i.get(t);if(n!=null)return D8(n,e)}let u=qRe(t.set,n,l);if(u!=null&&t.set!==`none`)return{name:GRe(u),remappedFrom:e,token:u}}let s=n?.[e];return s==null?{name:e}:D8(s,e)}}}var O8,k8,A8,j8,M8,N8,P8,F8,I8,L8,R8={},z8=[],B8=Array.isArray,V8=z8.slice,H8=Object.assign;function U8(e){e&&e.parentNode&&e.remove()}function W8(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?V8.call(arguments,2):n),G8(e,o,r,i,null)}function G8(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??++k8,__i:-1,__u:0};return i==null&&O8.vnode!=null&&O8.vnode(a),a}function K8(e){return e.children}function q8(e,t){this.props=e,this.context=t,this.__g=0}function J8(e,t){if(t==null)return e.__?J8(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`?J8(e):null}function Y8(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 Y8(e)}}function X8(e){(8&e.__g||!(e.__g|=8)||!A8.push(e)||M8++)&&j8==O8.debounceRendering||((j8=O8.debounceRendering)||queueMicrotask)(pVe)}function pVe(){for(var e,t,n,r,i,a,o,s,c=1;A8.length;)A8.length>c&&A8.sort(N8),e=A8.shift(),c=A8.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=H8({},r)).__v=r.__v+1,O8.vnode&&O8.vnode(n),n5(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??J8(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,i5(a,n,o),n.__e!=i&&Y8(n)));M8=0}function Z8(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||z8,b=t.length;for(c=mVe(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?R8:y[m.__i]||R8,m.__i=f,_=n5(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&o5(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=Q8(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function mVe(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?G8(null,o,null,null,null):B8(o)?G8(K8,{children:o},null,null,null):o.constructor==null&&o.__b>0?G8(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=hVe(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=J8(s)),s5(s,s));return r}function Q8(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=Q8(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=J8(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function hVe(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;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 $8(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function e5(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||$8(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||$8(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(P8,`$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=F8,e.addEventListener(t,a?L8:I8,a)):e.removeEventListener(t,a?L8:I8,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 t5(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=F8++;else if(t.u<n.l)return;return n(O8.event?O8.event(t):t)}}}function n5(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,j,M=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=O8.__b)&&d(t);n:if(typeof M==`function`)try{if(v=t.props,y=`prototype`in M&&M.prototype.render,b=(d=M.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 M(v,x):(t.__c=f=new q8(v,x),f.constructor=M,f.render=_Ve),b&&b.sub(f),f.props=v,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&&M.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=H8({},f.__s)),H8(f.__s,M.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&M.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&M.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=O8.__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=H8({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),E=d,d!=null&&d.type===K8&&d.key==null&&(E=a5(d.props.children)),s=Z8(e,B8(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(j=a.length;j--;)U8(a[j]);r5(t)}else t.__e=n.__e,t.__k=n.__k,e.then||r5(t);O8.__e(e,t,n)}else s=t.__e=gVe(n.__e,t,n,r,i,a,o,c,l,u);return(d=O8.diffed)&&d(t),128&t.__u?void 0:s}function r5(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(r5)}function i5(e,t,n){for(var r=0;r<n.length;r++)o5(n[r],n[++r],n[++r]);O8.__c&&O8.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){O8.__e(e,t.__v)}})}function a5(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:B8(e)?e.map(a5):H8({},e)}function gVe(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&&=(O8.__m&&O8.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=V8.call(e.childNodes),v=n.props||R8,!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;e5(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&&!_||e5(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=``),Z8(b==`template`?e.content:e,B8(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&J8(n,0),s,c,l),a!=null)for(u=a.length;u--;)U8(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||e5(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&e5(e,u,g,v[u],i))}return e}function o5(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){O8.__e(e,n)}}function s5(e,t,n){var r,i;if(O8.unmount&&O8.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||o5(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){O8.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&s5(r[i],t,n||typeof e.type!=`function`);n||U8(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function _Ve(e,t,n){return this.constructor(e,n)}function c5(e,t){var n,r,i,a;t==document&&(t=document.documentElement),O8.__&&O8.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=W8(K8,null,[e]),i=[],a=[],n5(t,e,r||R8,R8,t.namespaceURI,r?null:t.firstChild?V8.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),i5(i,e,a)}function vVe(e,t){e.__u|=32,c5(e,t)}O8={__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 M8=0,e}},k8=0,q8.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=H8({},this.state);typeof e==`function`&&(e=e(H8({},n),this.props)),e&&H8(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),X8(this))},q8.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),X8(this))},q8.prototype.render=K8,A8=[],M8=0,N8=function(e,t){return e.__v.__b-t.__v.__b},P8=/(PointerCapture)$|Capture$/i,F8=0,I8=t5(!1),L8=t5(!0);var yVe=0;Array.isArray;function l5(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:--yVe,__i:-1,__u:0,__source:i,__self:a};return O8.vnode&&O8.vnode(l),l}var bVe=16,xVe=16,SVe={};function u5({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}=SVe[e]??{width:bVe,height:xVe},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return l5(`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:l5(`use`,{href:c})})}var d5=e=>{if(e.length<2)return[e,``];let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]},CVe=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:Math.ceil(e.length/2);return[e.slice(0,r),e.slice(r)]},wVe=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)]},TVe=(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)]},EVe=(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)]},DVe=(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 OVe({children:e,marker:t,variant:n=`default`}){"use no memo";return l5(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:l5(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?l5(`span`,{"data-truncate-fade":!0}):t})})}function kVe(e){"use no memo";let{mode:t,children:n}=e;return l5(`div`,{children:[l5(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?l5(`span`,{children:n}):n}),l5(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?l5(`span`,{children:n}):n})]})}function f5({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=l5(kVe,{mode:t,children:e},`content`),o=l5(OVe,{marker:n,mode:t,variant:r},`marker`),s=l5(`div`,{"data-truncate-fill":!0},`fill`);return l5(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:l5(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function p5({children:e,...t}){"use no memo";return l5(f5,{mode:`truncate`,...t,children:e})}function m5({children:e,...t}){"use no memo";return l5(f5,{mode:`fruncate`,...t,children:e})}function AVe({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=l5(p5,{...s,children:t[0]}),l=l5(m5,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return l5(`div`,{className:a,style:o});if(e.length<i)return l5(n===`end`?m5:p5,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=d5:r===`extension`?t=CVe:r===`leaf-path`&&(t=wVe);else if(typeof r==`number`)t=TVe,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=EVe:e===`first`&&(t=DVe)}else typeof r==`function`&&(t=r);t??=d5;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=l5(p5,{...s,..._,children:f}),l=l5(m5,{...s,...v,children:p})}return l5(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[l5(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),l5(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var h5={endIndex:-1,startIndex:-1};function jVe(e,t,n){return Math.min(Math.max(e,t),n)}function g5(e,t){return e<0||t<e?h5:{endIndex:t,startIndex:e}}function _5(e){return e.startIndex<0||e.endIndex<e.startIndex}function MVe(e,t){return _5(e)?0:(e.endIndex-e.startIndex+1)*t}function v5(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function NVe(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function PVe(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 FVe(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 IVe(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 y5(e,t,n){if(e.length===0||t<=0)return[];let r=IVe(e),i=PVe(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=FVe(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 LVe(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=jVe(t.scrollTop,0,o),c=t.stickyRows??y5(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=v5(s,n,t.itemHeight),m=v5(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?h5:g5(m,NVe(u+d,n,t.itemHeight)),y=g+1,b=_5(v)?h5:g5(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=MVe(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:_5(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var RVe={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},zVe={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},BVe=`Contains git status items`;function VVe(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function HVe(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 UVe(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}}function WVe(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 GVe(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}var b5,x5,S5,C5,w5=Object.is,T5=0,E5=[],D5=O8,O5=D5.__b,k5=D5.__r,A5=D5.diffed,j5=D5.__c,M5=D5.unmount,N5=D5.__;function P5(e,t){D5.__h&&D5.__h(x5,e,T5||t),T5=0;var n=x5.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function F5(e){return T5=1,KVe(G5,e)}function KVe(e,t,n){var r=P5(b5++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):G5(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);w5(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=x5,!x5.__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,w5(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};x5.__f=!0;var a=x5.shouldComponentUpdate,o=x5.componentWillUpdate;x5.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)},x5.shouldComponentUpdate=i}return r.__N||r.__}function I5(e,t){var n=P5(b5++,3);!D5.__s&&W5(n.__H,t)&&(n.__=e,n.u=t,x5.__H.__h.push(n))}function L5(e,t){var n=P5(b5++,4);!D5.__s&&W5(n.__H,t)&&(n.__=e,n.u=t,x5.__h.push(n))}function R5(e){return T5=5,z5(function(){return{current:e}},[])}function z5(e,t){var n=P5(b5++,7);return W5(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function B5(e,t){return T5=8,z5(function(){return e},t)}function qVe(){for(var e;e=E5.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(H5),e.__H.__h.forEach(U5),e.__H.__h=[]}catch(t){e.__H.__h=[],D5.__e(t,e.__v)}}D5.__b=function(e){x5=null,O5&&O5(e)},D5.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),N5&&N5(e,t)},D5.__r=function(e){k5&&k5(e),b5=0;var t=(x5=e.__c).__H;t&&(S5===x5?(t.__h=[],x5.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(H5),t.__h.forEach(U5),t.__h=[],b5=0)),S5=x5},D5.diffed=function(e){A5&&A5(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(E5.push(t)!==1&&C5===D5.requestAnimationFrame||((C5=D5.requestAnimationFrame)||JVe)(qVe)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),S5=x5=null},D5.__c=function(e,t){t.some(function(e){try{e.__h.forEach(H5),e.__h=e.__h.filter(function(e){return!e.__||U5(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],D5.__e(n,e.__v)}}),j5&&j5(e,t)},D5.unmount=function(e){M5&&M5(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{H5(e)}catch(e){t=e}}),n.__H=void 0,t&&D5.__e(t,n.__v))};var V5=typeof requestAnimationFrame==`function`;function JVe(e){var t,n=function(){clearTimeout(r),V5&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);V5&&(t=requestAnimationFrame(n))}function H5(e){var t=x5,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),x5=t}function U5(e){var t=x5;e.__c=e.__(),x5=t}function W5(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!w5(t,e[n])})}function G5(e,t){return typeof t==`function`?t(e):t}function K5(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 q5(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 YVe({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return l5(`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 XVe(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:l5(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return l5(K8,{children:[l5(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:l5(p5,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function J5(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function Y5(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function X5(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 Z5({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=LVe(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:X5(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?X5(u,1,t,o):i&&r<=0&&c.length>0?y5(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 ZVe=400,Q5=10,$5=40,e7=18;function QVe(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))?$Ve(e,t,n):a instanceof HTMLElement?a:null}function $Ve(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 t7(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 n7(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 eHe(){return navigator.vendor!==`Apple Computer, Inc.`}function tHe(e,t){let n=e-t.top;if(n<$5)return-Math.ceil(($5-Math.max(0,n))/$5*e7);let r=t.bottom-e;return r<$5?Math.ceil(($5-Math.max(0,r))/$5*e7):0}function nHe(e,t){if(e!=null){let t=RVe[e];return t==null?null:{text:t,title:zVe[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:BVe}:null}function rHe(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 r7(e){return e!=null&&`toggle`in e}function i7(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function iHe(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function a7(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function aHe(e,t){return e!=null&&e>0?e:t}function oHe(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 sHe(e,t,n,r,i=0){let a=WVe({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a==null?!1:(e.scrollTop=a,!0)}function o7(e,t,n,r,i,a){let o=GVe({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o==null?!1:(e.scrollTop=o,!0)}function s7(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function cHe(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function c7(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function lHe(e,t){return t&&c7(e)||(e.ctrlKey||e.metaKey)&&i7(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var uHe=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function l7(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 dHe(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 fHe(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function pHe(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function u7(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function d7(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 mHe(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 hHe(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 gHe(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=hHe(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 f7(e,t){return{kind:e.kind,name:Y5(e),path:t}}function _He(e){return e==null?void 0:`${e}__tree`}function p7(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function m7(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function h7(e,t){if(e==null)return null;if(`text`in e)return l5(`span`,{title:e.title,children:e.text});let n=typeof e.icon==`string`?m7(e.icon)?t(e.icon):{name:e.icon}:m7(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return l5(`span`,{title:e.title,children:l5(u5,{...n})})}function g7(e){e!=null&&K5(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function vHe(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=J5(e);return l5(K8,{children:[e.depth>0?l5(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>l5(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,l5(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?l5(u5,{...t(`file-tree-icon-chevron`)}):l5(u5,{...t(`file-tree-icon-file`,u)})}),l5(`div`,{"data-item-section":`content`,children:e.isFlattened?XVe(e,c,a):c??l5(AVe,{minimumLength:5,split:`extension`,children:e.name})}),i?l5(`div`,{"data-item-section":`decoration`,children:r==null?null:h7(r,t)}):null,s?l5(`div`,{"data-item-section":`git`,children:h7(o,t)}):null,n?l5(`div`,{"data-item-section":`action`,children:l?l5(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:l5(u5,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function _7(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:j,onRowClick:M,onKeyDown:N}=e,P=J5(t),{isParked:ee=!1,mode:F=`flow`,style:te}=r,ne=F===`sticky`,re=_?.get(P)??null??rHe(t.ancestorPaths,v,y),ie=t.kind===`directory`&&(b?.has(P)??!1),ae=A(t,P),oe=nHe(re,ie),I=S&&w,se=ae!=null||x||I,ce=I&&T===`always`,le=a.getPath()===P,ue=le?a.getValue():``,de=ne||!le?null:l5(YVe,{ref:D,ariaLabel:`Rename ${Y5(t)}`,isFlattened:t.isFlattened,value:ue,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),fe=vHe(t,k,{actionLaneEnabled:I,customDecoration:ae,decorationLaneEnabled:se,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:oe,gitLaneActive:x,renameInput:de,showDecorativeActionAffordance:ce}),pe={...HVe({ariaLabel:Y5(t),domId:t.isFocused?p7(h,P,ee):void 0,extraStyle:te,features:{actionLaneEnabled:I,contextMenuButtonVisibility:I?T:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:ee,itemHeight:g,mode:F,row:t,state:{containsGitChange:ie,effectiveGitStatus:re,isContextHovered:s===P,isDragTarget:l?.kind===`directory`&&l.directoryPath===P,isDragging:c?.has(P)===!0,isFocusRinged:t.isFocused&&o===P},targetPath:P}),key:n,onContextMenu:S||u?e=>{if(d()){e.preventDefault();return}S&&(e.preventDefault(),E&&(i.focusPath(P),j(t,P,{anchorRect:fHe(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:ne?void 0:()=>{i.focusPath(P)},onKeyDown:ne?void 0:N,ref:e=>{O(P,e)}};return!ne&&le?l5(`div`,{...pe,children:fe}):l5(`button`,{...pe,type:`button`,draggable:u&&!ee,onDragEnd:u&&!ee?p:void 0,onDragStart:u&&!ee?e=>{f(e,t,P)}:void 0,onMouseDown:e=>{if(ne){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!ee?e=>{m(e,t,P)}:void 0,onClick:e=>{M(e,t,P,F)},children:fe})}function yHe(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(J5(e))).map((n,r)=>_7(e,n,t.start+r))}function v7({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=i3,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 _=R5(null),v=R5(null),y=R5(!1),b=R5(null),x=R5(null),S=R5(null),C=R5(null),w=R5(null),T=R5(new Map),E=R5(new Map),D=R5(()=>{}),O=R5(null),k=R5(!1),A=R5(null),j=R5(null),M=R5(!1),N=R5(null),P=R5(null),ee=R5(null),F=R5(null),te=R5(null),ne=R5(null),re=R5(null),ie=R5(null),ae=R5(!1),oe=R5(null),I=R5(null),se=R5(null),ce=R5(null),le=z5(()=>new Map,[]),[,ue]=F5(0),[de,fe]=F5(null),[pe,me]=F5(null),[he,ge]=F5(null),[_e,ve]=F5(null),[ye,be]=F5(0),[xe,Se]=F5(null),Ce=R5(xe);Ce.current=xe;let we=R5(null),Te=R5(null),Ee=R5(null),De=R5(null),Oe=R5(null),ke=R5(!1),Ae=()=>{Te.current=null,Ee.current=null,De.current=null},je=(e,t)=>{Te.current=e,Ee.current=null,De.current=t==null?null:{path:e,scrollTop:t}},Me=(e,t)=>{Te.current=null,Ee.current={path:e,viewportOffset:t},De.current=null},Ne=R5(d===`retain`&&t.isSearchOpen()),[Pe,Fe]=F5(p);I5(()=>{p||Fe(!1)},[p]);let Ie=R5(!1),Le=B5(()=>{Ie.current=!0,Fe(e=>e&&!1)},[]),[Re,ze]=F5(()=>Z5({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[Be,Ve]=F5(!1);I5(()=>{Ve(!0)},[]);let He=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,Ue=e?.contextMenu?.triggerMode??(He?`right-click`:`both`),We=Ue===`both`||Ue===`button`,Ge=e?.contextMenu?.buttonVisibility??`when-needed`,Ke=Ue===`both`||Ue===`right-click`;L5(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;Oe.current=t,me(t),ve(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(ke.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 qe=B5((e,t)=>{u7(T.current,e,t)},[]),Je=B5((e,t)=>{u7(E.current,e,t)},[]),Ye=B5(e=>{x.current=e},[]),Xe=B5(e=>d7(e,E.current,T.current),[]),Ze=n!=null||r!=null||i!=null,{resolveIcon:Qe}=z5(()=>fVe(a),[a]),L=t[f8](),R=L.getPath(),$e=R!=null,et=t.isSearchOpen(),tt=t.getSearchValue(),nt=t.getFocusedPath(),rt=t.getFocusedIndex(),it=t.isDragAndDropEnabled(),at=t.getDragSession(),ot=z5(()=>at==null?null:new Set(at.draggedPaths),[at]),st=at?.target??null,ct=at?.primaryPath??null,lt=_He(o),{overlayHeight:ut,overlayRows:dt,snapshot:ft,visibleRows:pt}=Re,mt=ft.physical.viewportHeight,ht=z5(()=>({end:ft.window.endIndex,start:ft.window.startIndex}),[ft.window.endIndex,ft.window.startIndex]),gt=dt,_t=ft.sticky.rows,vt=ft.physical.totalHeight,yt=ft.sticky.height,bt=z5(()=>new Set(_t.map(e=>J5(e.row))),[_t]),xt=rt>=0&&rt>=ht.start&&rt<=ht.end,St=B5((e,t)=>u?.({item:f7(e,t),row:e})??null,[u]),Ct=B5(e=>K5(e==null?null:T.current.get(e)??null)?!0:K5(S.current),[]),wt=B5(e=>{Ct(t.focusNearestPath(e))},[t,Ct]),Tt=R5(wt);Tt.current=wt;let Et=R5(!0),Dt=R5(()=>{}),Ot=B5((t=!0)=>{let n=Ce.current;n!=null&&(Et.current=Et.current&&t,Se(null),e?.contextMenu?.onClose?.(),Et.current&&wt(n.path))},[e?.contextMenu,wt]);Dt.current=Ot;let kt=B5(e=>{let t=e==null?null:pHe(S.current,e);ge(e=>e===t?e:t)},[]),At=B5((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=Xe(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;je(n,e?.scrollTop??null),k.current=!0,fe(e=>e===n?e:n)}i.focus(),kt(a),Et.current=!0,Se({anchorRect:r?.anchorRect??null,item:f7(e,n),path:n,source:r?.source??`keyboard`})},[t,Xe,kt]),jt=B5(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=a7(e,mt);N.current=rt<0||e==null?null:Math.max(0,Math.min(rt*s-e.scrollTop,Math.max(0,t-s))),M.current=!0}t.startRenaming(e)!==!1&&(ve(`focus`),ue(e=>e+1))}},[t,rt,s,l,mt]),Mt=B5((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=a7(i,mt),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:Z5({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return k.current=!0,o7(i,a,s,l,u,d),D.current(),we.current=n?e:null,!0},[t,s,c,mt,h]),Nt=()=>y.current===!0||ce.current!=null||ae.current===!0,Pt=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),Ft=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},It=()=>{F.current!=null&&(clearTimeout(F.current),F.current=null),ee.current=null},Lt=()=>{ne.current?.remove(),ne.current=null},Rt=()=>{Ft(P.current),P.current=null,te.current=null},zt=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},Bt=()=>{ie.current?.(),ie.current=null,ce.current!=null&&(clearTimeout(ce.current),ce.current=null),ae.current=!1,oe.current=null,se.current=null,I.current!=null&&(I.current.setAttribute(`draggable`,`true`),I.current.style.removeProperty(`touch-action`),I.current=null),Lt(),It(),Rt(),re.current=null},Vt=(e,n)=>{let r=S.current?.getRootNode(),i=t7(QVe(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},Ht=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){It();return}let r=t.getItem(e.directoryPath),i=r7(r)?r:null;if(i==null||i.isExpanded()){It();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;ee.current!==a&&(It(),ee.current=a,F.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind!==`directory`||n.directoryPath!==e.directoryPath||n.flattenedSegmentPath!==e.flattenedSegmentPath||i.expand()},n))},Ut=()=>{P.current=null;let e=te.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=tHe(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()),Ht(Vt(e.clientX,e.clientY)),P.current=Pt(Ut)},Wt=(e,t)=>{te.current={clientX:e,clientY:t},P.current??=Pt(Ut)},Gt=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(Bt(),Lt(),It(),Rt(),t.startDrag(r)===!1){e.preventDefault();return}if(re.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),eHe())){let t=n7(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),zt(t),ne.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},Kt=()=>{Lt(),It(),Rt(),re.current=null,t.cancelDrag()},qt=(e,n,r)=>{if(ce.current!=null||ae.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;se.current={clientX:i.clientX,clientY:i.clientY},I.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!ae.current;ce.current!=null&&(clearTimeout(ce.current),ce.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),ie.current===o&&(ie.current=null),t&&(a.setAttribute(`draggable`,`true`),I.current===a&&(I.current=null),se.current=null)},s=e=>{let t=e.touches[0],n=se.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=Q5*Q5||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),ie.current=o,ce.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),I.current===a&&(I.current=null),se.current=null;return}ae.current=!0,I.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),re.current=n;let e=a.getBoundingClientRect(),s=n7(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`}),zt(s),ne.current=s,oe.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=oe.current;n!=null&&ne.current!=null&&(ne.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),Ht(Vt(t.clientX,t.clientY)),Wt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Vt(n.clientX,n.clientY),t.completeDrag(),Bt()},u=()=>{t.cancelDrag(),Bt()};ie.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)},ZVe)},Jt=e=>{if(xe!=null){if(e.key===`Escape`){Ot(),e.preventDefault(),e.stopPropagation();return}uHe.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(L.isActive()){if(e.key===`Escape`)L.cancel();else if(e.key===`Enter`)L.commit();else return;ve(`focus`),ue(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){jt(nt??void 0),e.preventDefault(),e.stopPropagation();return}if(et){if(e.key===`Escape`)M.current=!1,N.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=a7(n,mt);N.current=rt<0||n==null?null:Math.max(0,Math.min(rt*s-n.scrollTop,Math.max(0,r-s))),M.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;ve(`focus`),ue(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&iHe(e)){t.openSearch(e.key),ue(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=He&&c7(e),r=lHe(e,He),i=r&&S.current!=null?q5(S.current):null,a=r?new Set(mHe(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;je(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=r7(p)?p:null,h=u!=null&&(bt.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=d7(u,E.current,T.current);e==null||n==null?y=!1:At(e,u)}else if((e.ctrlKey||e.metaKey)&&i7(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;ve(`focus`);let b=t.getFocusedPath(),x=b!=null&&(bt.has(b)||a.has(b)),w=g&&b!==u,D=n&&c&&o===u&&b===u;if((h||D)&&b!=null&&(w&&x||D))je(b,v?.scrollTop??null),k.current=!0,fe(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(Me(b,gHe(S.current,v,i,u,s,yt,mt)),k.current=!0,fe(e=>e===b?e:b)):Ae()}ue(e=>e+1),e.preventDefault(),e.stopPropagation()};L5(()=>{if(!(!f||!et)){if(Ne.current){Ne.current=!1;return}K5(w.current)}},[et,f]),L5(()=>{let e=x.current;switch(VVe({hasRenderedInput:e!=null,previousRenamingPath:j.current,renamingPath:R})){case`reset`:j.current=null;return;case`reveal-canonical`:R!=null&&Mt(R,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(we.current=null,j.current=R,K5(e),e.select());return}},[ht.end,ht.start,R,Mt,bt]),L5(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=q5(e)?.dataset.itemPath??null;fe(e=>e===t?e:t)},i=()=>{n(),k.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,q5(e)!=null){r();return}k.current=!1,fe(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),k.current=!1,fe(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;fe(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),L5(()=>{let e=S.current;e!=null&&(ft.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[ft.physical.scrollTop]),L5(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;O.current=a7(n,g);let a=()=>{let e=t.getVisibleCount(),r=aHe(O.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),ze(Z5({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};D.current=a;let o=!1,l=t.subscribe(()=>{o?ue(e=>e+1):o=!0,a()}),u=()=>{ke.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,be(e=>e+1),e=null},50))},d=null,f=()=>{i!=null&&delete i.dataset.overlayReveal,d!=null&&(clearTimeout(d),d=null)},p=()=>{i==null||ke.current===!0||n.scrollTop>0||(i.dataset.overlayReveal=`true`,d!=null&&clearTimeout(d),d=setTimeout(()=>{f()},200))},m=()=>{if(a(),n.scrollTop>0&&f(),Ce.current!=null&&y.current&&Dt.current(),ke.current===!0){y.current=!1;return}me(e=>e==null?e:null),u()},_=()=>{u(),p()},v=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),x=e=>{v.has(e.key)&&_()};n.addEventListener(`scroll`,m,{passive:!0}),n.addEventListener(`wheel`,_,{passive:!0}),n.addEventListener(`touchmove`,_,{passive:!0}),n.addEventListener(`keydown`,x);let w=typeof ResizeObserver<`u`?new ResizeObserver(e=>{O.current=(e[0]==null?null:oHe(e[0]))??a7(n,g),a()}):null;return w?.observe(n),()=>{D.current=()=>{},l(),n.removeEventListener(`scroll`,m),n.removeEventListener(`wheel`,_),n.removeEventListener(`touchmove`,_),n.removeEventListener(`keydown`,x),e!=null&&clearTimeout(e),d!=null&&clearTimeout(d),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,O.current=null,w?.disconnect()}},[t,g,s,c,h]),L5(()=>{He||xe==null||Ot(!1)},[Ot,He,xe]);let Yt=z5(()=>xe==null?null:`${xe.path}::${xe.source}`,[xe]);L5(()=>{if(Yt==null){m?.clearSlotContent(X4);return}let t=Ce.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??dHe(n.getBoundingClientRect()),close:e=>{Dt.current(e?.restoreFocus??!0)},restoreFocus:()=>{Et.current&&Tt.current(Ce.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(X4,i),e?.contextMenu?.onOpen?.(t.item,r),g7(i),queueMicrotask(()=>{i==null||!i.isConnected||document.activeElement===i&&g7(i)}),()=>{m?.clearSlotContent(X4)}},[Yt,e?.contextMenu,m]),L5(()=>{xe!=null&&t.getItem(xe.path)==null&&Ot()},[Ot,xe,t]),L5(()=>{if(xe==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(l7(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&Ot())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),Ot())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[Ot,xe]),L5(()=>{let e=C.current,t=S.current;if(e==null||t==null){A.current=nt;return}let n=nt==null?null:T.current.get(nt)??null,r=q5(t),i=r?.dataset.itemPath??null,a=$e&&x.current===r,o=f&&w.current===r,c=M.current&&!et,l=N.current??0,u=we.current,d=Te.current,p=Ee.current,m=De.current,h=r!=null,g=k.current||h,_=A.current!==nt,v=d!=null&&d===nt&&nt!=null,y=c&&o7(e,rt,s,mt,vt,l),b=u!=null&&u===nt&&o7(e,rt,s,mt,vt,yt),E=p!=null&&p.path===nt&&o7(e,rt,s,mt,vt,p.viewportOffset),O=m!=null&&m.path===nt&&e.scrollTop!==m.scrollTop;if(O&&(e.scrollTop=m.scrollTop),(O||b||E||y||g&&_&&u!==nt&&!v&&sHe(e,rt,s,mt,yt))&&D.current(),!g){A.current=nt;return}if(a){A.current=nt;return}if(o&&!c){A.current=nt;return}if(n==null){c&&rt>=0&&(o7(e,rt,s,mt,vt,l),D.current()),A.current=nt;return}(_||c||u===nt||d===nt||p?.path===nt||m?.path===nt||i==null||i!==nt)&&(K5(n),u===nt&&(we.current=null),d===nt&&(Te.current=null),p?.path===nt&&(Ee.current=null),m?.path===nt&&(De.current=null),M.current=!1,N.current=null),A.current=nt},[t,rt,nt,xt,s,$e,et,ht,mt,f,yt,vt,pt]);let Xt=rt>=0&&rt>=ft.visible.startIndex&&rt<=ft.visible.endIndex,Zt=nt!=null&>.some(e=>J5(e.row)===nt),Qt=Xt||Zt,$t=We&&k.current===!0&&Qt?nt:null,en=_e===`pointer`?pe:null,tn=xe?.path??Oe.current??en??$t??pe,nn=xe?.source===`right-click`;L5(()=>{y.current&&xe==null||kt(Xe(tn))},[xe,Xe,ht,mt,ye,gt,tn,kt,pt]);let rn=B5(e=>{if(y.current||l7(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&&ve(e=>e===`pointer`?e:`pointer`),me(e=>e===i?e:i)},[]),an=B5(()=>{me(null)},[]);L5(()=>{if(!it)return;let e=()=>{Bt(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),Bt(),t.cancelDrag()}},[t,it]);let on=e=>{if(!it||t.getDragSession()==null||ae.current)return;let n=t7(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),Ht(t.getDragSession()?.target??null),Wt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},sn=e=>{if(!it||t.getDragSession()==null||ae.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(It(),Rt(),t.setDragTarget(null))},cn=e=>{!it||t.getDragSession()==null||ae.current||(e.preventDefault(),Vt(e.clientX,e.clientY),t.completeDrag(),Lt(),It(),Rt(),re.current=null)},ln=ft.window.height,un=ft.window.offsetTop,dn=Math.min(0,mt-ln-yt),fn=de===nt||M.current,pn=nt!=null&&fn&&!xt&&rt>=0?pt[rt]??t.getVisibleRows(rt,rt)[0]??null:null,mn=pn==null?null:s7(rt,s,ht,ln),hn=re.current,gn=ct!=null&&hn!=null&&hn.path===ct&&hn.index>=ht.start&&hn.index<=ht.end,_n=ct!=null&&hn!=null&&hn.path===ct&&!gn&&hn.path!==pn?.path?hn:null,vn=_n==null?null:s7(_n.index,s,ht,ln),yn=cHe((rt>=0?pt[rt]??t.getVisibleRows(rt,rt)[0]??null:null)?.ancestorPaths.at(-1)??null),bn=et&&nt!=null?p7(o,nt,!xt):void 0,xn=xe?.path??(et?nt:de),Sn=xe?.path??pe,Cn=Xe(tn),wn=He&&We&&!nn&&!$e&&Cn!=null&&he!=null&&tn!=null,Tn=He&&(wn||xe!=null),En=xe?.anchorRect,Dn=En==null&&Cn!=null&&he!=null&&(xe!=null||wn)?he:null,On=En==null?Dn==null?void 0:{top:`${Dn}px`}:{left:`${En.left}px`,position:`fixed`,right:`auto`,top:`${En.top}px`},kn=nn?{opacity:`0`}:void 0,An=B5((e,n,r,i)=>{let a=t.getItem(r),o=UVe({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:t.isSearchOpen(),mode:i});switch(o.selection.kind){case`range`:t.selectPathRange(r,o.selection.additive);break;case`toggle`:t.togglePathSelectionFromInput(r);break;case`single`:t.selectOnlyPath(r);break}let s=e.currentTarget instanceof HTMLElement?e.currentTarget:null,c=n.index>=ft.visible.startIndex&&n.index<=ft.visible.endIndex,l=i===`flow`&&c&&s!=null&&s.dataset.itemParked!==`true`;a?.focus(),l&&(k.current=!0,fe(e=>e===r?e:r),ve(`focus`)),o.toggleDirectory&&r7(a)&&a.toggle(),o.closeSearch&&t.closeSearch(),o.revealCanonical&&Mt(r,{targetOffset:`sticky-parents`})},[t,ft.visible.endIndex,ft.visible.startIndex,Mt]),jn=()=>{if(y.current||!We||tn==null||Cn==null)return;let e=t.getItem(tn);e!=null&&(kt(Cn),Et.current=!0,Se({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:Cn.getAttribute(`aria-label`)??tn,path:e.getPath()},path:e.getPath(),source:`button`}))},Mn={contextHoverPath:Sn,contextMenuButtonTriggerEnabled:We,contextMenuButtonVisibility:Ge,contextMenuEnabled:He,contextMenuRightClickEnabled:Ke,contextMenuTriggerMode:Ue,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:it,draggedPathSet:ot,dragTarget:st,gitLaneActive:Ze,gitStatusByPath:n,handleRowDragEnd:Kt,handleRowDragStart:Gt,handleRowTouchStart:qt,ignoredGitDirectories:r,ignoredInheritanceCache:le,instanceId:o,itemHeight:s,onKeyDown:Jt,onRowClick:An,openContextMenuForRow:At,registerButton:qe,registerRenameInput:Ye,renameView:L,renderDecorationForRow:St,resolveIcon:Qe,shouldSuppressContextMenu:Nt,visualFocusPath:xn},Nn={...Mn,registerButton:Je};return l5(`div`,{ref:S,id:lt,"data-file-tree-context-menu-button-visibility":He&&We?Ge:void 0,"data-file-tree-context-menu-trigger-mode":He?Ue:void 0,"data-file-tree-has-context-menu-action-lane":He&&We?`true`:void 0,"data-file-tree-has-git-lane":Ze?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:it?sn:void 0,onDragOver:it?on:void 0,onDrop:it?cn:void 0,onKeyDown:Jt,onPointerLeave:He?an:void 0,onPointerOver:He?rn:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[l5(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:yn}}),l5(`slot`,{name:Y4,"data-type":`header-slot`}),f?l5(`div`,{"data-file-tree-search-container":!0,"data-open":et?`true`:`false`,children:l5(`input`,{ref:w,"aria-activedescendant":bn,"aria-controls":lt,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":Pe?`true`:void 0,value:tt,onBlur:()=>{d===`retain`&&!Ie.current||t.closeSearch()},onFocus:Le,onPointerDown:Le,onInput:e=>{Le();let n=e.currentTarget;t.setSearch(n.value)}})}):null,l5(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&Be&>.length>0?l5(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:l5(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${ut}px`},children:gt.map((e,t)=>_7(Nn,e.row,`sticky:${J5(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${gt.length-t}`}}))})}):null,l5(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${vt}px`},children:[l5(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${un}px`}}),l5(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${ln}px`,top:`${dn}px`,bottom:`${dn}px`},children:[yHe(Mn,ht,bt),pn!=null&&mn!=null?_7(Mn,pn,`parked:${pn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:ct===pn.path?`none`:void 0,position:`absolute`,right:`0`,top:`${mn}px`}}):null,_n!=null&&vn!=null?_7(Mn,_n,`parked-drag:${_n.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${vn}px`}}):null]})]})]}),He?l5(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":Tn?`true`:`false`,style:On,children:[l5(`button`,{ref:v,type:`button`,"data-type":FLe,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":xe==null?`false`:`true`,"data-visible":wn?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),xe!=null){Ot();return}jn()},tabIndex:-1,style:kn,children:l5(u5,{...Qe(`file-tree-icon-ellipsis`)})}),xe==null?null:l5(`slot`,{name:X4})]}):null,xe==null?null:l5(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),Ot()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),Ot()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var y7={hydrateRoot:(e,t)=>{vVe(W8(v7,t),e)},renderRoot:(e,t)=>{c5(W8(v7,t),e)},unmountRoot:e=>{c5(null,e)}};function b7(e,t){y7.renderRoot(e,t)}function bHe(e,t){y7.hydrateRoot(e,t)}function xHe(e){y7.unmountRoot(e)}var SHe=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)}}},x7=`__c`,CHe=`__k`,S7=`__d`,C7=`__s`,w7=/[\s\n\\/='"\0<>]/,T7=/^(xlink|xmlns|xml)([A-Z])/,wHe=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,THe=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,EHe=new Set([`draggable`,`spellcheck`]);function E7(e){e.__g===void 0?e[S7]=!0:e.__g|=8}function DHe(e){e.__g===void 0?e[S7]=!1:e.__g&=-9}function D7(e){return e.__g===void 0?!0===e[S7]:!!(8&e.__g)}var OHe=/["&<]/;function O7(e){if(e.length===0||!1===OHe.test(e))return e;for(var t=0,n=0,r=``,i=``;n<e.length;n++){switch(e.charCodeAt(n)){case 34:i=`"`;break;case 38:i=`&`;break;case 60:i=`<`;break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=i,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var k7={},kHe=new Set(`animation-iteration-count.border-image-outset.border-image-slice.border-image-width.box-flex.box-flex-group.box-ordinal-group.column-count.fill-opacity.flex.flex-grow.flex-negative.flex-order.flex-positive.flex-shrink.flood-opacity.font-weight.grid-column.grid-row.line-clamp.line-height.opacity.order.orphans.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.widows.z-index.zoom`.split(`.`)),AHe=/[A-Z]/g;function jHe(e){var t=``;for(var n in e){var r=e[n];if(r!=null&&r!==``){var i=n[0]==`-`?n:k7[n]||(k7[n]=n.replace(AHe,`-$&`).toLowerCase()),a=`;`;typeof r!=`number`||i.startsWith(`--`)||kHe.has(i)||(a=`px;`),t=t+i+`:`+r+a}}return t||void 0}function A7(){this.__d=!0}function MHe(e,t){return{__v:e,context:t,props:e.props,setState:A7,forceUpdate:A7,__d:!0,__h:[]}}function j7(e,t,n){if(!e.s){if(n instanceof NHe){if(!n.s)return void(n.o=j7.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(j7.bind(null,e,t),j7.bind(null,e,2));e.s=t,e.v=n;let r=e.o;r&&r(e)}}var NHe=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,i=this.s;if(i){var a=1&i?t:n;if(a){try{j7(r,1,a(this.v))}catch(e){j7(r,2,e)}return r}return this}return this.o=function(e){try{var i=e.v;1&e.s?j7(r,1,t?t(i):i):n?j7(r,1,n(i)):j7(r,2,i)}catch(e){j7(r,2,e)}},r},e}(),M7,N7,P7,F7,I7={},L7=Array.isArray,R7=Object.assign,z7=``,B7=`<!--$s-->`,V7=`<!--/$s-->`;function H7(e,t){var n,r=e.type,i=!0;return e[x7]?(i=!1,(n=e[x7]).state=n[C7]):n=new r(e.props,t),e[x7]=n,n.__v=e,n.props=e.props,n.context=t,E7(n),n.state??=I7,n[C7]??(n[C7]=n.state),r.getDerivedStateFromProps?n.state=R7({},n.state,r.getDerivedStateFromProps(n.props,n.state)):i&&n.componentWillMount?(n.componentWillMount(),n.state=n[C7]===n.state?n.state:n[C7]):!i&&n.componentWillUpdate&&n.componentWillUpdate(),P7&&P7(e),n.render(n.props,n.state,t)}function U7(e,t,n,r,i,a,o){if(e==null||!0===e||!1===e||e===z7)return z7;var s=typeof e;if(s!=`object`)return s==`function`?z7:s==`string`?O7(e):e+z7;if(L7(e)){var c,l=z7;i[CHe]=e;for(var u=e.length,d=0;d<u;d++){var f=e[d];if(f!=null&&typeof f!=`boolean`){var p,m=U7(f,t,n,r,i,a,o);typeof m==`string`?l+=m:(c||=Array(u),l&&c.push(l),l=z7,L7(m)?(p=c).push.apply(p,m):c.push(m))}}return c?(l&&c.push(l),c):l}if(e.constructor!==void 0)return z7;e.__=i,M7&&M7(e);var h=e.type,g=e.props;if(typeof h==`function`){var _,v,y,b=t;if(h===K8){if(`tpl`in g){for(var x=z7,S=0;S<g.tpl.length;S++)if(x+=g.tpl[S],g.exprs&&S<g.exprs.length){var C=g.exprs[S];if(C==null)continue;typeof C!=`object`||C.constructor!==void 0&&!L7(C)?x+=C:x+=U7(C,t,n,r,e,a,o)}return x}if(`UNSTABLE_comment`in g)return`<!--`+O7(g.UNSTABLE_comment)+`-->`;v=g.children}else{if((_=h.contextType)!=null){var w=t[_.__c];b=w?w.props.value:_.__}var T=h.prototype&&typeof h.prototype.render==`function`;if(T)v=H7(e,b),y=e[x7];else{e[x7]=y=MHe(e,b);for(var E=0;D7(y)&&E++<25;){DHe(y),P7&&P7(e);try{v=h.call(y,g,b)}catch(t){throw a&&t&&typeof t.then==`function`&&(e._suspended=!0),t}}E7(y)}if(y.getChildContext!=null&&(t=R7({},t,y.getChildContext())),T&&O8.errorBoundaries&&(h.getDerivedStateFromError||y.componentDidCatch)){v=v!=null&&v.type===K8&&v.key==null&&v.props.tpl==null?v.props.children:v;try{return U7(v,t,n,r,e,a,!1)}catch(i){return h.getDerivedStateFromError&&(y[C7]=h.getDerivedStateFromError(i)),y.componentDidCatch&&y.componentDidCatch(i,I7),D7(y)?(v=H7(e,t),(y=e[x7]).getChildContext!=null&&(t=R7({},t,y.getChildContext())),U7(v=v!=null&&v.type===K8&&v.key==null&&v.props.tpl==null?v.props.children:v,t,n,r,e,a,o)):z7}finally{N7&&N7(e),F7&&F7(e)}}}v=v!=null&&v.type===K8&&v.key==null&&v.props.tpl==null?v.props.children:v;try{var D=U7(v,t,n,r,e,a,o);return N7&&N7(e),O8.unmount&&O8.unmount(e),e._suspended?typeof D==`string`?B7+D+V7:L7(D)?(D.unshift(B7),D.push(V7),D):D.then(function(e){return B7+e+V7}):D}catch(i){if(!a&&o&&o.onError){var O=function i(s){return o.onError(s,e,function(e,s){try{return U7(e,t,n,r,s,a,o)}catch(e){return i(e)}})}(i);if(O!==void 0)return O;var k=O8.__e;return k&&k(i,e),z7}if(!a||!i||typeof i.then!=`function`)throw i;return i.then(function i(){try{var s=U7(v,t,n,r,e,a,o);return e._suspended?B7+s+V7:s}catch(e){if(!e||typeof e.then!=`function`)throw e;return e.then(i)}})}}var A,j=`<`+h,M=z7;for(var N in g){var P=g[N];if(typeof(P=FHe(P)?P.value:P)!=`function`||N===`class`||N===`className`){switch(N){case`children`:A=P;continue;case`key`:case`ref`:case`__self`:case`__source`:continue;case`htmlFor`:if(`for`in g)continue;N=`for`;break;case`className`:if(`class`in g)continue;N=`class`;break;case`defaultChecked`:N=`checked`;break;case`defaultSelected`:N=`selected`;break;case`defaultValue`:case`value`:switch(N=`value`,h){case`textarea`:A=P;continue;case`select`:r=P;continue;case`option`:r!=P||`selected`in g||(j+=` selected`)}break;case`dangerouslySetInnerHTML`:M=P&&P.__html;continue;case`style`:typeof P==`object`&&(P=jHe(P));break;case`acceptCharset`:N=`accept-charset`;break;case`httpEquiv`:N=`http-equiv`;break;default:if(T7.test(N))N=N.replace(T7,`$1:$2`).toLowerCase();else{if(w7.test(N))continue;N[4]!==`-`&&!EHe.has(N)||P==null?n?THe.test(N)&&(N=N===`panose1`?`panose-1`:N.replace(/([A-Z])/g,`-$1`).toLowerCase()):wHe.test(N)&&(N=N.toLowerCase()):P+=z7}}P!=null&&!1!==P&&(j=!0===P||P===z7?j+` `+N:j+` `+N+`="`+(typeof P==`string`?O7(P):P+z7)+`"`)}}if(w7.test(h))throw Error(h+` is not a valid HTML tag name in `+j+`>`);if(M||(typeof A==`string`?M=O7(A):A!=null&&!1!==A&&!0!==A&&(M=U7(A,t,h===`svg`||h!==`foreignObject`&&n,r,e,a,o))),N7&&N7(e),F7&&F7(e),!M&&PHe.has(h))return j+`/>`;var ee=`</`+h+`>`,F=j+`>`;return L7(M)?[F].concat(M,[ee]):typeof M==`string`?F+M+ee:[F,M,ee]}var PHe=new Set([`area`,`base`,`br`,`col`,`command`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`]);function FHe(e){return typeof e==`object`&&!!e&&typeof e.peek==`function`&&`value`in e}var W7=0;function IHe(e){return e!=null&&e.length>0?e:(W7+=1,`pst_ft_${W7}`)}function LHe({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??i3)}function G7(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 K7(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 q7(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var RHe=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new SHe;#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=IHe(a),this.#p=E8(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=YRe(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new iVe({...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&&(xHe(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()}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)}focusNearestPath(e){return this.#t.focusNearestPath(e)}add(e){this.#t.add(e)}batch(e){this.#t.batch(e)}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){this.#t.resetPaths(e,t)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),b7(t.wrapper,this.#w()))}setGitStatus(e){this.#p=E8(e,this.#p);let t=this.#T();t!=null&&b7(t.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),b7(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),bHe(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),b7(r,this.#w())}#C(){return{initialViewportHeight:LHe({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(Y4,e());return}this.#l.setSlotHtml(Y4,this.#e?.header?.html??null)}#k(e){let t=q7(e).find(e=>K7(e)),n=G7(WRe(n3(this.#m).set));n!=null&&(t!=null&&t.outerHTML===n.outerHTML||(t==null?e.prepend(n):t.replaceWith(n)))}#A(e){let t=q7(e),n=t.find(e=>K7(e)),r=t.filter(e=>e!==n),i=n3(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=G7(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=n3(this.#m);t.colored&&KRe(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${q4}]`);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(q4,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=XRe(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 u3(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 zHe(e){let t=(0,L.useRef)(null);return t.current??=new RHe(e),(0,L.useEffect)(()=>{let e=t.current;return()=>{e?.cleanUp(),t.current=null}},[]),{model:t.current}}var BHe={"--trees-accent-override":`var(--ring)`,"--trees-bg-muted-override":`color-mix(in srgb, var(--muted) 45%, transparent)`,"--trees-bg-override":`transparent`,"--trees-border-color-override":`var(--border)`,"--trees-fg-muted-override":`var(--muted-foreground)`,"--trees-fg-override":`var(--foreground)`,"--trees-focus-ring-color-override":`var(--ring)`,"--trees-font-family-override":`var(--font-sans)`,"--trees-font-size-override":`var(--text-sm)`,"--trees-item-margin-x-override":`0`,"--trees-padding-inline-override":`0`,"--trees-scrollbar-thumb-override":`color-mix(in srgb, var(--muted-foreground) 35%, transparent)`,"--trees-selected-bg-override":`color-mix(in srgb, var(--accent) 65%, transparent)`,"--trees-selected-fg-override":`var(--foreground)`,"--trees-selected-focused-border-color-override":`var(--ring)`,height:`100%`};function VHe({controller:e,filesError:t,isFilesLoading:n}){let{closeSearch:r,filteredFiles:i,isSearchOpen:a,loadedFiles:o,model:s,searchQuery:c,setSearchQuery:l}=e,u=gJ(),d=(0,L.useRef)(null);(0,L.useEffect)(()=>{a&&d.current?.focus()},[a]);let f=(0,L.useMemo)(()=>({...BHe,colorScheme:u}),[u]),p;return p=t?(0,R.jsx)(hP,{message:t.message,messageClassName:`text-destructive`}):n&&o.length===0?(0,R.jsx)(hP,{icon:`Spinner`,message:`Loading files...`,iconClassName:`animate-spin`}):o.length===0?(0,R.jsx)(hP,{message:`No files yet.`}):i.length===0?(0,R.jsx)(hP,{message:`No files match search.`}):(0,R.jsx)(BLe,{"aria-label":`Thread storage file tree`,className:`block h-full min-h-0`,model:s,style:f}),(0,R.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-1`,children:[a?(0,R.jsxs)(`div`,{className:`flex h-7 shrink-0 items-center gap-2`,children:[(0,R.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,R.jsx)(V,{name:`Search`,className:`pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground`}),(0,R.jsx)(Z_,{ref:d,"aria-label":`Search files`,className:`h-7 pl-7 pr-2 text-xs focus-visible:ring-0`,placeholder:`Search files`,value:c,onChange:e=>l(e.target.value),onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),r())}})]}),(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:`h-7 w-7 shrink-0 rounded-md p-0 text-muted-foreground`,"aria-label":`Close search`,onClick:r,children:(0,R.jsx)(V,{name:`X`,className:`size-3.5`})})]}):null,(0,R.jsx)(`div`,{className:`min-h-0 flex-1`,children:p})]})}function HHe(e){return e?.type===`standard`&&e.parentThreadId===null}function J7({currentThreadId:e,isManagerThread:t,managerThreads:n,parentThreadDisplayName:r,parentThreadId:i}){if(!e||t)return[];let a=[{value:`none`,label:`None`}],o=new Set([`none`]),s=(t,n)=>{!t||t===e||o.has(t)||(o.add(t),a.push({value:t,label:n}))};s(i??void 0,r??`Manager`);for(let e of n)s(e.id,e.title?.trim()?e.title:`Manager`);return a}function UHe({thread:e,projectId:t,parentThreadDisplayName:n,managerThreads:r,canAssignToManager:i,canTakeOverThread:a,updateThreadPending:o,onAssignManager:s,defaultOpen:c}){let l=e.type===`manager`,u=e.parentThreadId??void 0,d=(0,L.useMemo)(()=>J7({currentThreadId:e.id,isManagerThread:l,managerThreads:r,parentThreadDisplayName:n,parentThreadId:u}),[l,r,n,u,e.id]),f=u??`none`,p=d.find(e=>e.value===f)?.label;return l||!u&&!i&&!a?null:(0,R.jsx)(Z2,{label:`Manager`,valueClassName:`min-w-0`,children:u?(0,R.jsxs)(`div`,{className:`inline-flex max-w-full min-w-0 items-center gap-1 text-xs text-foreground`,children:[(0,R.jsx)(Ih,{to:`/projects/${t}/threads/${u}`,className:`min-w-0 truncate text-xs text-foreground no-underline transition-[text-decoration-color] duration-150 hover:underline hover:underline-offset-2`,children:p??`Manager`}),(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:`size-3.5 shrink-0 rounded-full p-0 text-muted-foreground hover:bg-transparent hover:text-foreground [&_svg]:size-3`,disabled:o,onClick:()=>{s(null)},"aria-label":`Unassign manager`,children:(0,R.jsx)(V,{name:`X`})})]}):(0,R.jsxs)(oP,{defaultOpen:c,children:[(0,R.jsx)(sP,{asChild:!0,children:(0,R.jsxs)(`div`,{role:`button`,tabIndex:o||d.length<=1&&f===`none`?-1:0,className:`inline-flex w-fit max-w-full min-w-0 items-center gap-1 rounded-md px-0 text-xs leading-tight text-foreground outline-none ring-sidebar-ring transition-colors hover:text-foreground focus-visible:ring-2`,children:[(0,R.jsx)(`span`,{className:`min-w-0 truncate text-xs text-foreground`,children:p??`None`}),(0,R.jsx)(V,{name:`ChevronDown`,className:`size-3.5 shrink-0 text-muted-foreground`})]})}),(0,R.jsxs)(cP,{align:`start`,className:`min-w-40 max-w-72`,children:[(0,R.jsx)(fP,{children:`Assign to manager`}),d.map(e=>(0,R.jsxs)(uP,{onSelect:()=>{s(e.value===`none`?null:e.value)},className:`flex items-center justify-between gap-3`,children:[(0,R.jsx)(`span`,{className:`truncate`,title:e.label,children:e.label}),(0,R.jsx)(V,{name:`Check`,className:f===e.value?B(`opacity-100`,j_):B(`opacity-0`,j_)})]},e.value))]})]})})}function WHe({thread:e}){return e.type===`manager`?(0,R.jsx)(Z2,{label:`Kind`,valueClassName:`min-w-0 truncate`,children:`Manager`}):null}function GHe({environmentHost:e,environment:t,environmentIsLocal:n}){if(!e)return null;let r=t?n:void 0,i=e.status===`connected`;return(0,R.jsx)(Z2,{label:`Host`,valueClassName:`min-w-0 truncate`,children:(0,R.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`truncate`,children:e.name}),r?(0,R.jsx)(H0,{}):null,(0,R.jsx)(K0,{connected:i})]})})}function KHe({thread:e,environment:t,environmentHost:n,environmentIsLocal:r}){return e.type===`manager`||!t?null:(0,R.jsx)(Z2,{label:`Environment`,valueClassName:`min-w-0 truncate`,children:MD({environment:t,isLocalHost:r,hostName:n?.name}).modeLabel})}function qHe(e){return e.isWorktree||e.workspaceProvisionType===`managed-worktree`}function JHe({thread:e,environment:t}){return e.type===`manager`||!t?.path||!qHe(t)?null:(0,R.jsx)(Z2,{label:`Worktree path`,valueClassName:`min-w-0`,children:(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`min-w-0 truncate`,title:t.path,children:t.path}),(0,R.jsx)(vB,{text:t.path,label:`Copy worktree path`,className:`size-5 shrink-0`,iconClassName:`size-3.5`})]})})}function YHe({thread:e,workspaceStatus:t}){let n=t?.branch.currentBranch??null,[r,i]=(0,L.useState)(!1);(0,L.useEffect)(()=>{if(!r)return;let e=window.setTimeout(()=>{i(!1)},2e3);return()=>window.clearTimeout(e)},[r]);let a=(0,L.useCallback)(async()=>{n&&await I4(n,{successMessage:`Branch name copied`,errorMessage:`Failed to copy branch name`})&&i(!0)},[n]);return e.type===`manager`||!n?null:(0,R.jsx)(Z2,{label:`Branch`,valueClassName:`min-w-0 truncate`,children:(0,R.jsxs)(`button`,{type:`button`,className:`inline-flex max-w-full items-center gap-1.5 rounded-md text-left text-foreground transition-colors hover:text-foreground/80`,onClick:()=>{a()},"aria-label":`Copy branch name`,title:`Copy branch name`,children:[(0,R.jsx)(`span`,{className:`truncate`,children:n}),r?(0,R.jsx)(V,{name:`Check`,className:`size-3.5 shrink-0 text-muted-foreground`}):(0,R.jsx)(V,{name:`Copy`,className:`size-3.5 shrink-0 text-muted-foreground`})]})})}function XHe({thread:e,workspaceStatus:t,selectedMergeBaseBranch:n,mergeBaseBranchOptions:r,isLoadingMergeBaseBranchOptions:i,onMergeBaseBranchChange:a,defaultOpen:o}){let s=n??t?.mergeBase?.mergeBaseBranch??t?.branch.defaultBranch,c=s,l=(0,L.useMemo)(()=>R0({mergeBaseBranch:c,mergeBaseBranchOptions:r}),[c,r]),u=!!(s||t?.branch.defaultBranch),d=t?.branch.currentBranch!=null&&t.branch.currentBranch===t.branch.defaultBranch,f=u&&!!c&&!d;return e.type===`manager`||!f?null:(0,R.jsx)(Z2,{label:`Merge base`,valueClassName:`min-w-0 truncate`,children:c&&l.length>0&&c?(0,R.jsx)(B0,{value:c,options:l,variant:`minimal`,loading:i,onChange:a,className:`max-w-full`,defaultOpen:o}):c})}function ZHe({thread:e,environment:t,workspaceStatus:n,workspaceStatusError:r,selectedMergeBaseBranch:i}){let a=e.type!==`manager`,o=t?.status===`destroyed`;if(!(a&&(n||r||o)&&!(e.archivedAt!=null&&t?.managed!==!0)))return null;let s=i??n?.mergeBase?.mergeBaseBranch??n?.branch.defaultBranch,c=g4(n,{mergeBaseBranch:s,showBranchComparison:!!(s||n?.branch.defaultBranch),error:r,workspaceDeleted:o}),l=n?.workingTree.state===`untracked`?`text-muted-foreground`:`text-foreground`;return(0,R.jsx)(Z2,{label:`Git status`,align:`start`,valueClassName:`min-w-0`,children:(0,R.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-2 whitespace-nowrap`,title:`${c.label} ${c.summary}`,children:[(0,R.jsx)(`span`,{className:B(`shrink-0 font-medium`,l),children:c.label}),(0,R.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,children:c.summaryContent})]})})}function QHe({thread:e}){let t=IL(),n=t.isPending&&t.variables?.id===e.id,r=(0,L.useCallback)(()=>{t.mutate({id:e.id})},[e.id,t]);return e.archivedAt==null?null:(0,R.jsx)(Z2,{label:`Archived`,valueClassName:`min-w-0 truncate`,children:(0,R.jsx)(_2,{isPending:n,onUnarchive:r,threadType:e.type})})}function $He({thread:e,workspaceStatus:t,onChangedFileClick:n}){let r=e.type!==`manager`,i=n4(t);return!r||i===null?null:(0,R.jsx)(Z2,{label:i.label??`Changed files`,orientation:`vertical`,className:`min-h-0 flex-1`,valueClassName:`min-h-0 flex-1`,children:(0,R.jsx)(r4,{files:i.files,className:`h-full`,onFileClick:n?e=>n({file:e,section:i}):void 0})})}function eUe({controller:e,filesError:t,isFilesLoading:n}){let{isSearchOpen:r,openSearch:i}=e;return(0,R.jsx)(Z2,{orientation:`vertical`,className:`min-h-0 flex-1`,valueClassName:`min-h-0 flex-1 overflow-hidden`,labelClassName:`flex items-center justify-between gap-2`,label:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{children:`Manager workspace`}),r?null:(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:`h-5 w-5 shrink-0 rounded-md p-0 text-muted-foreground`,"aria-label":`Search files`,onClick:i,children:(0,R.jsx)(V,{name:`Search`,className:`size-3.5`})})]}),children:(0,R.jsx)(VHe,{controller:e,filesError:t,isFilesLoading:n})})}function tUe({thread:e,parentThreadDisplayName:t,environment:n,workspaceStatus:r,workspaceStatusError:i}){let a=e.type===`manager`,o=e.parentThreadId??void 0,s=!a,c=n?.status===`destroyed`,l=s&&(!!r||!!i||c)&&!(e.archivedAt!=null&&n?.managed!==!0),u=r?.branch.currentBranch??null,d=n4(r);return!!(a||o||!a&&n||!a&&u||l||s&&d!==null||e.archivedAt!=null||t&&o)}function Y7({hasFlexibleHeight:e,children:t}){return(0,R.jsx)(X2,{className:B(`h-full min-h-0 rounded-none border-0 bg-transparent px-0 py-0`,e?`flex-1`:`shrink-0`),children:t})}function nUe(e){let{thread:t,projectId:n,parentThreadDisplayName:r,managerThreads:i,canAssignToManager:a,canTakeOverThread:o,environmentHost:s,environmentIsLocal:c,environment:l,workspaceStatus:u,workspaceStatusError:d,selectedMergeBaseBranch:f,mergeBaseBranchOptions:p,isLoadingMergeBaseBranchOptions:m,updateThreadPending:h,storage:g,onAssignManager:_,onMergeBaseBranchChange:v,onChangedFileClick:y}=e;return(0,R.jsxs)(Y7,{hasFlexibleHeight:g!==void 0||t.type!==`manager`&&n4(u)!==null,children:[(0,R.jsx)(WHe,{thread:t}),(0,R.jsx)(UHe,{thread:t,projectId:n,parentThreadDisplayName:r,managerThreads:i,canAssignToManager:a,canTakeOverThread:o,updateThreadPending:h,onAssignManager:_}),(0,R.jsx)(GHe,{environmentHost:s,environment:l,environmentIsLocal:c}),(0,R.jsx)(KHe,{thread:t,environment:l,environmentHost:s,environmentIsLocal:c}),(0,R.jsx)(JHe,{thread:t,environment:l}),(0,R.jsx)(YHe,{thread:t,workspaceStatus:u}),(0,R.jsx)(XHe,{thread:t,workspaceStatus:u,selectedMergeBaseBranch:f,mergeBaseBranchOptions:p,isLoadingMergeBaseBranchOptions:m,onMergeBaseBranchChange:v}),(0,R.jsx)(ZHe,{thread:t,environment:l,workspaceStatus:u,workspaceStatusError:d,selectedMergeBaseBranch:f}),(0,R.jsx)(QHe,{thread:t}),(0,R.jsx)($He,{thread:t,workspaceStatus:u,onChangedFileClick:y}),g?(0,R.jsx)(eUe,{...g}):null]})}function rUe({children:e,className:t}){return(0,R.jsx)(`div`,{className:B(`flex min-w-0 flex-col gap-1`,t),children:e})}function iUe({stopRequestedAt:e,threadId:t}){return{id:`${t}:pending-stop:${e}`,threadId:t,turnId:null,sourceSeqStart:0,sourceSeqEnd:0,startedAt:e,createdAt:e,kind:`system`,systemKind:`operation`,operationKind:`thread-interrupted`,title:`Stop requested`,detail:null,status:`pending`,completedAt:null}}function aUe(e,t){return e.some(e=>e.kind===`system`&&e.systemKind===`operation`&&e.operationKind===`thread-interrupted`&&e.createdAt>=t)}function oUe({rows:e,stopRequestedAt:t,threadId:n}){return(0,L.useMemo)(()=>t===null||aUe(e,t)?e:[...e,iUe({stopRequestedAt:t,threadId:n})],[e,t,n])}function sUe({activeThinking:e,footer:t,hasOlderTimelineRows:n,header:r,hostConnectionNotice:i,isLoadingOlderTimelineRows:a,isThreadTimelinePending:o,timelineError:s,loadingTurnSummaryIds:c,erroredTurnSummaryIds:l,onLoadOlderRows:u,onLoadTurnSummaryRows:d,onOpenLocalFileLink:f,onTitleAction:p,projectId:m,showOngoingIndicator:h,ongoingIndicatorLabel:g,stopRequestedAt:_,timelineRows:v,threadId:y,threadRuntimeDisplayStatus:b,turnSummaryRowsIdentity:x,turnSummaryRowsById:S,unreadDividerPlacement:C,workspaceRootPath:w}){let T=gJ(),E=e!==null&&g===void 0,D=e?.text.trim()??``,O=E&&D.length>0?e?.text:void 0,k=E&&e?e.id:g??`working`,A=oUe({rows:v,stopRequestedAt:_,threadId:y});return(0,R.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col overflow-hidden`,children:[r,(0,R.jsx)(c0,{scrollBehavior:`bottom-anchor`,shellClassName:`!mx-0 !mt-0 md:!mx-0 md:!mt-0`,contentClassName:`min-h-full gap-2 pt-4`,footerClassName:`chat-prompt-box`,footer:t,children:(0,R.jsxs)(rUe,{className:`flex-1`,children:[n&&!o&&!s?(0,R.jsx)(cUe,{isLoadingOlderTimelineRows:a,onLoadOlderRows:u}):null,o?(0,R.jsx)(lUe,{}):s?(0,R.jsx)(f1,{label:`Failed to load timeline`,className:`mt-6 text-destructive`}):A.length>0?(0,R.jsx)(d1,{loadingTurnSummaryIds:c,erroredTurnSummaryIds:l,onLoadTurnSummaryRows:d,onOpenLocalFileLink:f,onTitleAction:p,projectId:m,resolveUserAttachmentImageSrc:j0,themeType:T,timelineRows:A,threadRuntimeDisplayStatus:b,turnSummaryRowsIdentity:x,turnSummaryRowsById:S,unreadDividerPlacement:C,workspaceRootPath:w}):null,i?(0,R.jsx)(f1,{label:i.label,className:i.tone===`error`?`mt-4 text-destructive`:`mt-4`}):null,(0,R.jsx)(Tke,{visible:h,children:(0,R.jsx)(fAe,{details:O,isThinking:E,label:g},k)})]})},y)]})}function cUe({isLoadingOlderTimelineRows:e,onLoadOlderRows:t}){let n=q$();return(0,R.jsx)(`div`,{className:`flex justify-center pt-2 mb-3`,children:(0,R.jsxs)(O_,{type:`button`,variant:`outline`,size:`sm`,onClick:(0,L.useCallback)(()=>{n?.captureScrollAnchor(),t()},[n,t]),disabled:e,children:[(0,R.jsx)(V,{name:`ChevronUp`,"aria-hidden":`true`}),e?`Loading older messages...`:`Load older messages`]})})}function lUe(){let[e,t]=(0,L.useState)(!1);return(0,L.useEffect)(()=>{let e=window.setTimeout(()=>t(!0),200);return()=>window.clearTimeout(e)},[]),e?(0,R.jsx)(f1,{label:`Loading thread...`,className:`mt-6`}):null}var uUe=100,X7=`duration-[220ms] ease-[cubic-bezier(0.32,0.72,0,1)]`;function dUe({footer:e,header:t,isMetadataLoading:n,isSecondaryPanelOpen:r,metadata:i,onTerminalPanelResize:a,secondaryPanel:o,terminalPanel:s,terminalPanelHeightPercent:c,terminalPanelOpen:l,timeline:u}){let d=E_(),f=Sg(v4),p=(0,L.useRef)(null),m=(0,L.useRef)(c),h=(0,L.useRef)(!1);(0,L.useEffect)(()=>{if(!h.current){h.current=!0;return}let e=p.current;e&&(l?e.expand(m.current):e.collapse())},[l]);let g=(0,L.useCallback)(e=>{e<=0||(m.current=e,a(e))},[a]),_=tUe(i)?(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:(0,R.jsx)(nUe,{...i})}):n?(0,R.jsx)(mUe,{}):(0,R.jsx)(`div`,{className:`pt-1 text-sm text-muted-foreground`,children:`No thread details available.`}),v=d?null:(0,R.jsx)(W4,{...o,renderAsDrawer:!1,metadataContent:_}),y=d?(0,R.jsx)(W4,{...o,renderAsDrawer:!0,metadataContent:_}):null;return(0,R.jsxs)(`div`,{className:`-mx-4 -mb-4 -mt-4 flex h-full min-h-0 min-w-0 flex-1 flex-col overflow-hidden md:-mx-5 md:-mb-5 md:-mt-5`,children:[(0,R.jsxs)(R4.PanelGroup,{direction:`vertical`,className:`h-full w-full min-w-0`,children:[(0,R.jsx)(R4.Panel,{id:`thread-detail-main-panel`,defaultSize:l?100-c:100,minSize:30,order:1,className:`min-w-0 overflow-hidden`,children:(0,R.jsxs)(R4.PanelGroup,{direction:`horizontal`,className:`h-full w-full min-w-0`,children:[(0,R.jsx)(R4.Panel,{id:`thread-detail-timeline-panel`,defaultSize:r&&!d?100-f:uUe,minSize:30,order:1,className:`min-w-0 overflow-hidden`,children:(0,R.jsx)(sUe,{...u,footer:e,header:t})}),v]})}),s?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(fUe,{isOpen:l}),(0,R.jsx)(R4.Panel,{ref:p,id:`thread-detail-terminal-panel`,collapsible:!0,collapsedSize:0,defaultSize:l?c:0,minSize:18,maxSize:70,order:2,onResize:g,className:B(`min-h-0 min-w-0 overflow-hidden transition-[flex-grow,flex-basis,opacity]`,X7,l?`opacity-100`:`opacity-0`),children:s})]}):null]}),d?(0,R.jsx)(rP,{open:r,onOpenChange:e=>{e||o.onClose()},srLabel:`Thread details`,contentClassName:`h-[92dvh] max-h-[92dvh]`,handleOnly:!0,children:(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:y})}):null]})}function fUe({isOpen:e}){return(0,R.jsx)(R4.PanelResizeHandle,{id:`thread-detail-terminal-panel-handle`,disabled:!e,className:B(`group relative shrink-0 cursor-row-resize overflow-visible bg-transparent transition-[height,opacity,background-color]`,X7,`before:absolute before:-inset-y-1.5 before:inset-x-0 before:content-['']`,e?`h-px opacity-100`:`pointer-events-none h-0 opacity-0`),"aria-label":`Resize thread and terminal panels`,children:(0,R.jsx)(`span`,{className:`pointer-events-none absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-border/70 transition-colors group-hover:bg-accent-foreground/35`})})}var pUe=[`w-40`,`w-28`,`w-36`,`w-24`];function mUe(){return(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:(0,R.jsx)(Y7,{hasFlexibleHeight:!1,children:pUe.map((e,t)=>(0,R.jsxs)(`div`,{className:`grid grid-cols-[var(--detail-label-width,96px)_minmax(0,1fr)] items-center gap-x-3 py-0.5`,children:[(0,R.jsx)(ov,{className:`h-3 w-14 rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 ${e} max-w-full rounded-sm`})]},t))})})}function Z7(e){return e!==void 0&&e.length>0}function hUe({activePanel:e,closePersistedPanel:t,isCompactViewport:n,openPersistedDiffFile:r,openPersistedDiffPanel:i,openPersistedPanel:a,threadId:o,togglePersistedPanel:s}){let[c,l]=(0,L.useState)(null);(0,L.useEffect)(()=>{l(null)},[o]),(0,L.useEffect)(()=>{n||l(null)},[n]);let u=(0,L.useCallback)(()=>{Z7(o)&&l(o)},[o]),d=(0,L.useCallback)(()=>{l(e=>e===o?null:e)},[o]),f=Z7(o)&&c===o,p=n?f:e!==null,m=(0,L.useCallback)(e=>{a(e),n&&u()},[n,u,a]),h=(0,L.useCallback)(()=>{i(),n&&u()},[n,u,i]),g=(0,L.useCallback)(e=>{r(e),n&&u()},[n,u,r]),_=(0,L.useCallback)(()=>{if(n){d();return}t()},[d,t,n]),v=(0,L.useCallback)(()=>{if(!n){s();return}if(f){d();return}u()},[d,n,f,u,s]);return(0,L.useMemo)(()=>({closePanel:_,isOpen:p,openDiffFile:g,openDiffPanel:h,openPanel:m,togglePanel:v}),[_,p,g,h,m,v])}function gUe({activePath:e,fileListEnabled:t=!0,fileListOptions:n=iO,filePreviewEnabled:r=!0,threadId:i,threadType:a}){let o=a===`manager`,{data:s,isLoading:c,error:l}=wje(i??``,n,{enabled:o&&t}),{data:u,isLoading:d,error:f}=Tje(i??``,e,{enabled:o&&r&&e!==null});return{isThreadStorageFilePreviewLoading:d,isThreadStorageFilesLoading:c,threadStorageFilePreview:u,threadStorageFilePreviewError:f,threadStorageFilesError:l,threadStorageFiles:s,threadStorageRootPath:s?.storageRootPath??null}}var _Ue=new Set([`md`,`mdx`,`markdown`]),vUe={"--diffs-font-size":`12px`,"--diffs-line-height":`18px`,"--diffs-gap-block":`16px`},yUe={"--md-content-w":`100cqi`};function Q7(e){let t=e.split(`.`).pop()?.toLowerCase();return t!==void 0&&_Ue.has(t)}function $7({state:e,path:t,copyPath:n=null,onOpenInEditor:r,statusLabel:i=null}){let a=e.kind===`ready`&&Q7(e.file.name),[o,s]=(0,L.useState)(`preview`);return(0,L.useEffect)(()=>{s(`preview`)},[t]),(0,R.jsxs)(`div`,{className:`@container/page`,style:yUe,children:[(0,R.jsx)(xUe,{path:t,copyPath:n,onOpenInEditor:r,statusLabel:i,markdownMode:a?o:null,onMarkdownModeChange:s}),(0,R.jsx)(bUe,{state:e,path:t,markdownMode:a?o:`preview`})]})}function bUe({state:e,path:t,markdownMode:n}){return e.kind===`loading`?(0,R.jsx)(wUe,{}):e.kind===`empty`?(0,R.jsx)(n9,{message:`Empty file.`}):e.kind===`not-found`?(0,R.jsx)(n9,{message:`File not found.`,role:`alert`}):e.kind===`manager-status-pending`?(0,R.jsx)(n9,{message:`Manager hasn't written a status yet.`}):e.kind===`error`?(0,R.jsx)(n9,{message:e.message??`Failed to load file`,role:e.message===void 0?`alert`:void 0}):e.kind===`image`?(0,R.jsx)(CUe,{url:e.url,alt:t}):Q7(e.file.name)&&n===`preview`?(0,R.jsx)(SUe,{file:e.file}):(0,R.jsx)(TUe,{file:e.file,lineNumber:e.lineNumber??null})}function xUe({path:e,copyPath:t,onOpenInEditor:n,statusLabel:r,markdownMode:i,onMarkdownModeChange:a}){return(0,R.jsxs)(`div`,{className:`sticky top-0 z-10`,children:[(0,R.jsxs)(`div`,{className:`flex h-9 items-center gap-2 border-b border-border/70 bg-background px-4`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,children:[(0,R.jsx)(m$,{className:`min-w-0 font-mono text-xs font-medium leading-5 text-foreground`,title:e,children:e}),r===null?null:(0,R.jsxs)(`span`,{className:`shrink-0 text-xs leading-5 text-muted-foreground`,children:[`(`,r,`)`]}),t===null?null:(0,R.jsx)(vB,{text:t,label:`Copy file path`,className:`shrink-0 rounded-md hover:bg-state-hover hover:text-foreground`}),n?(0,R.jsx)(`button`,{type:`button`,onClick:()=>n(e),"aria-label":`Open in editor`,title:`Open in editor`,className:`inline-flex size-5 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:(0,R.jsx)(V,{name:`ExternalLink`,"aria-hidden":!0,className:`size-3`})}):null]}),i===null?null:(0,R.jsxs)(`div`,{className:`ml-auto inline-flex shrink-0 items-center gap-0.5 rounded-md border border-border/70 p-0.5`,role:`tablist`,"aria-label":`Markdown view mode`,children:[(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`sm`,className:`h-5 rounded-sm px-2 text-xs text-muted-foreground`,onClick:()=>a(`preview`),"aria-pressed":i===`preview`,title:`Rendered preview`,children:`Preview`}),(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`sm`,className:`h-5 rounded-sm px-2 text-xs text-muted-foreground`,onClick:()=>a(`source`),"aria-pressed":i===`source`,title:`Markdown source`,children:`Raw`})]})]}),(0,R.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-x-0 top-full h-4 bg-gradient-to-b from-background to-transparent`})]})}function SUe({file:e}){return(0,R.jsx)(`div`,{className:`px-4 pt-4`,children:(0,R.jsx)(bJ,{allowHtml:!0,content:e.contents})})}function CUe({url:e,alt:t}){return(0,R.jsx)(`div`,{className:`pt-4`,children:(0,R.jsx)(`img`,{src:e,alt:t,className:`block max-h-[34rem] w-full object-contain`})})}function e9(e){let t=e.querySelectorAll(`[data-file-preview-target-line]`);for(let e of t)e.removeAttribute(`data-file-preview-target-line`),e.removeAttribute(`data-selected-line`)}function t9(e,t){let n=e.querySelectorAll(`[data-line="${t}"]`);for(let e of n)if(e instanceof HTMLElement&&e.dataset.lineIndex!==void 0)return e;for(let e of n)if(e instanceof HTMLElement)return e;return null}function wUe(){return(0,R.jsxs)(`div`,{className:`space-y-2 px-4 pt-4`,"aria-busy":!0,children:[(0,R.jsx)(ov,{className:`h-3 w-3/4 rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-full rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-5/6 rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-2/3 rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-full rounded-sm`}),(0,R.jsx)(ov,{className:`h-3 w-3/5 rounded-sm`})]})}function n9({message:e,role:t}){return(0,R.jsx)(`p`,{role:t,className:`mx-4 mt-4 rounded-lg border border-dashed border-border/70 bg-background/45 px-3 py-6 text-center text-sm text-muted-foreground`,children:e})}function TUe({file:e,lineNumber:t}){let n=gJ(),r=(0,L.useRef)(null),i=(0,L.useMemo)(()=>({themeType:n,overflow:`scroll`,disableFileHeader:!0,enableLineSelection:t!==null}),[t,n]),a=(0,L.useMemo)(()=>t===null?null:{start:t,end:t},[t]);return(0,L.useEffect)(()=>{let e=r.current,n=null,i=null,a=0;function o(){n=window.requestAnimationFrame(s),i=window.setTimeout(s,16)}function s(){let e=r.current;if(!e||(e9(e),e9(e.ownerDocument.body),t===null))return;let n=t9(e,t)??t9(e.ownerDocument.body,t);if(n){n.setAttribute(`data-file-preview-target-line`,``),n.setAttribute(`data-selected-line`,`single`),n.scrollIntoView?.({block:`center`});return}a+=1,a<8&&o()}return s(),()=>{e&&(e9(e),e9(e.ownerDocument.body)),n!==null&&window.cancelAnimationFrame(n),i!==null&&window.clearTimeout(i)}},[e.contents,e.name,t]),(0,R.jsx)(`div`,{ref:r,style:vUe,"data-file-preview-line-number":t??void 0,children:(0,R.jsx)(Kp,{file:e,options:i,selectedLines:a})})}var r9=`STATUS.md`;function i9({activePath:e,copyPath:t=null,error:n,filePreview:r,isLoading:i,lineNumber:a=null,onOpenInEditor:o,pendingNotFoundPath:s,statusLabel:c=null}){if(n){let r=n instanceof JD&&n.status===404;return r&&e===s?(0,R.jsx)($7,{path:e,copyPath:t,onOpenInEditor:o,statusLabel:c,state:{kind:`manager-status-pending`}}):(0,R.jsx)($7,{path:e,copyPath:t,onOpenInEditor:o,statusLabel:c,state:{kind:r?`not-found`:`error`}})}return i||!r||r.path!==e?(0,R.jsx)($7,{path:e,copyPath:t,onOpenInEditor:o,statusLabel:c,state:{kind:`loading`}}):r.kind===`text`?r.content.length===0?(0,R.jsx)($7,{path:e,copyPath:t,onOpenInEditor:o,statusLabel:c,state:{kind:`empty`}}):(0,R.jsx)($7,{path:e,copyPath:t,onOpenInEditor:o,statusLabel:c,state:{kind:`ready`,lineNumber:a,file:{name:r.name??e,contents:r.content}}}):r.kind===`image`?(0,R.jsx)($7,{path:e,copyPath:t,onOpenInEditor:o,statusLabel:c,state:{kind:`image`,url:r.url}}):(0,R.jsx)($7,{path:e,copyPath:t,onOpenInEditor:o,statusLabel:c,state:{kind:`error`,message:`Preview not available for ${r.mimeType}.`}})}function EUe({activePath:e,copyPath:t,error:n,filePreview:r,isLoading:i,lineNumber:a,onOpenInEditor:o}){return(0,R.jsx)(i9,{activePath:e,copyPath:t,error:n,filePreview:r,isLoading:i,lineNumber:a,onOpenInEditor:o,pendingNotFoundPath:r9})}var DUe=[];function OUe(e){let t=new Set;for(let n of e){let e=n.split(`/`).filter(e=>e.length>0),r=``;for(let n of e.slice(0,-1))r=`${r}${n}/`,t.add(r)}return Array.from(t)}function kUe({files:e,onSelectPath:t,selectedPath:n}){let[r,i]=(0,L.useState)(!1),[a,o]=(0,L.useState)(``),s=e??DUe,c=(0,L.useMemo)(()=>{let e=a.trim().toLowerCase();return e.length===0?s:s.filter(t=>t.path.toLowerCase().includes(e))},[s,a]),l=(0,L.useMemo)(()=>c.map(e=>e.path),[c]),u=(0,L.useMemo)(()=>new Set(l),[l]),d=(0,L.useRef)(u),f=(0,L.useRef)(t),p=(0,L.useRef)(!1);(0,L.useEffect)(()=>{d.current=u},[u]),(0,L.useEffect)(()=>{f.current=t},[t]);let{model:m}=zHe({density:`compact`,initialExpansion:`closed`,onSelectionChange:(0,L.useCallback)(e=>{if(p.current)return;let t=e[0];!t||!d.current.has(t)||f.current(t)},[]),paths:[],search:!1}),h=a.trim().length>0,g=(0,L.useMemo)(()=>h?OUe(l):[],[h,l]);(0,L.useEffect)(()=>{m.resetPaths(l,{initialExpandedPaths:g})},[g,l,m]),(0,L.useEffect)(()=>{let e=m.getSelectedPaths(),t=n!==null&&u.has(n);if(!(t?e.length===1&&e[0]===n:e.length===0)){p.current=!0;try{for(let r of e)t&&r===n||m.getItem(r)?.deselect();t&&m.getItem(n)?.select()}finally{p.current=!1}}},[u,m,n]);let _=(0,L.useCallback)(()=>{i(!0)},[]);return{closeSearch:(0,L.useCallback)(()=>{i(!1),o(``)},[]),filteredFiles:c,isSearchOpen:r,loadedFiles:s,model:m,openSearch:_,searchQuery:a,setSearchQuery:o}}function AUe(e,t){let n=e.find(e=>e.path===t.path);return n?n.lineNumber===t.lineNumber&&VD(n.source,t.source)&&n.statusLabel===t.statusLabel?e:e.map(e=>e.path===t.path?t:e):[...e,t]}function jUe(e,t){let n=e.filter(e=>e.path!==t);return n.length===e.length?e:n}function MUe(e,t){let n=e.filter(e=>e!==t);return n.length===e.length?e:n}function NUe(e,t){let n=e.find(e=>e.path===t.path);return n?n.lineNumber===t.lineNumber?e:e.map(e=>e.path===t.path?t:e):[...e,t]}function PUe(e,t){let n=e.filter(e=>e.path!==t);return n.length===e.length?e:n}function a9(e){return{type:`workspace`,path:e}}function o9(e){return{type:`storage`,path:e}}function s9(e){return{type:`host-file`,path:e}}function c9(e,t){return{...e,fileTabs:t}}function FUe({threadId:e,environmentId:t,threadType:n,storageFiles:r}){let i=L2(e),a=R2(e),o=z2(e),s=n!==void 0,c=n===`manager`,l=s?t??null:void 0;(0,L.useEffect)(()=>{s&&a(e=>A2({isManagerThread:c,state:e}))},[c,s,a]),(0,L.useEffect)(()=>{s&&a(e=>BPe({environmentId:l,state:e}))},[s,l,a]),(0,L.useEffect)(()=>{c&&a(e=>{let t=A2({isManagerThread:c,state:e});if(t.fileTabs.storage[0]===`STATUS.md`&&t.fileTabs.active!==null)return t;let n=[r9,...t.fileTabs.storage.filter(e=>e!==r9)];return c9(t,{...t.fileTabs,storage:n,active:t.fileTabs.active??o9(`STATUS.md`)})})},[c,a]),(0,L.useEffect)(()=>{!s||!r||a(e=>VPe({isManagerThread:c,pinnedStorageFilePath:r9,state:e,storageFiles:r}))},[c,s,r,a]);let u=(0,L.useCallback)(({lineNumber:e,path:t,source:n,statusLabel:r})=>{l!==void 0&&(a(i=>{let a=AUe(i.fileTabs.workspace,{lineNumber:e,path:t,source:n,statusLabel:r}),o=i.fileTabs.active?.type===`workspace`&&i.fileTabs.active.path===t;return i.environmentId===l&&a===i.fileTabs.workspace&&o?i:c9({...i,environmentId:l},{...i.fileTabs,workspace:a,active:a9(t)})}),o(`thread-info`))},[l,o,a]),d=(0,L.useCallback)(e=>{a(t=>{let n=jUe(t.fileTabs.workspace,e);return n===t.fileTabs.workspace?t:c9(t,{...t.fileTabs,workspace:n,active:t.fileTabs.active?.type===`workspace`&&t.fileTabs.active.path===e?null:t.fileTabs.active})})},[a]),f=(0,L.useCallback)(e=>{a(t=>!t.fileTabs.workspace.some(t=>t.path===e)||t.fileTabs.active?.type===`workspace`&&t.fileTabs.active.path===e?t:c9(t,{...t.fileTabs,active:a9(e)}))},[a]),p=(0,L.useCallback)(e=>{c&&a(t=>{let n=t.fileTabs.storage.includes(e)?t.fileTabs.storage:[...t.fileTabs.storage,e];return n===t.fileTabs.storage&&t.fileTabs.active?.type===`storage`&&t.fileTabs.active.path===e?t:c9(t,{...t.fileTabs,storage:n,active:o9(e)})})},[c,a]),m=(0,L.useCallback)(({lineNumber:t,path:n})=>{e&&(a(e=>{let r=NUe(e.fileTabs.hostFiles,{lineNumber:t,path:n}),i=e.fileTabs.active?.type===`host-file`&&e.fileTabs.active.path===n;return r===e.fileTabs.hostFiles&&i?e:c9(e,{...e.fileTabs,hostFiles:r,active:s9(n)})}),o(`thread-info`))},[o,e,a]),h=(0,L.useCallback)(e=>{a(t=>{let n=PUe(t.fileTabs.hostFiles,e);return n===t.fileTabs.hostFiles?t:c9(t,{...t.fileTabs,hostFiles:n,active:t.fileTabs.active?.type===`host-file`&&t.fileTabs.active.path===e?null:t.fileTabs.active})})},[a]),g=(0,L.useCallback)(e=>{a(t=>!t.fileTabs.hostFiles.some(t=>t.path===e)||t.fileTabs.active?.type===`host-file`&&t.fileTabs.active.path===e?t:c9(t,{...t.fileTabs,active:s9(e)}))},[a]),_=(0,L.useCallback)(e=>{!c||e===`STATUS.md`||a(t=>{let n=MUe(t.fileTabs.storage,e);return n===t.fileTabs.storage?t:c9(t,{...t.fileTabs,storage:n,active:t.fileTabs.active?.type===`storage`&&t.fileTabs.active.path===e?null:t.fileTabs.active})})},[c,a]),v=(0,L.useCallback)(e=>{c&&a(t=>!t.fileTabs.storage.includes(e)||t.fileTabs.active?.type===`storage`&&t.fileTabs.active.path===e?t:c9(t,{...t.fileTabs,active:o9(e)}))},[c,a]),y=(0,L.useCallback)(()=>{a(zPe)},[a]),b=l!==void 0&&i.environmentId===l,x=b?i.fileTabs.workspace:[],S=b?LPe(i):null,C=c?j2(i):null,w=RPe(i),T=c?i.fileTabs.storage:[];return{activateHostFileTab:g,activateStorageFileTab:v,activateWorkspaceFileTab:f,activeHostFileLineNumber:w?.lineNumber??null,activeHostFilePath:w?.path??null,activeStorageFilePath:C,activeWorkspaceFileLineNumber:S?.lineNumber??null,activeWorkspaceFilePath:S?.path??null,activeWorkspaceFileSource:S?.source??null,activeWorkspaceFileStatusLabel:S?.statusLabel??null,clearActiveFileTabs:y,closeHostFileTab:h,closeStorageFileTab:_,closeWorkspaceFileTab:d,openHostFile:m,openHostFileTabs:i.fileTabs.hostFiles,openStorageFile:p,openStorageFilePaths:T,openWorkspaceFile:u,openWorkspaceFileTabs:x}}function l9(e){return e??void 0}function IUe({previousStateKey:e,nextStateKey:t,persistedMergeBaseBranch:n,selectedMergeBaseBranch:r,updatePending:i}){return e===t?i?!1:r!==l9(n):!0}function LUe({environment:e,mergeBaseBranchOptions:t,selectedMergeBaseBranch:n,setSelectedMergeBaseBranch:r,thread:i,updateEnvironment:a,workspaceStatus:o}){let s=(0,L.useRef)(void 0),c=e?.id??i?.id,l=a.isPending&&a.variables?.id===e?.id;(0,L.useEffect)(()=>{IUe({previousStateKey:s.current,nextStateKey:c,persistedMergeBaseBranch:e?.mergeBaseBranch,selectedMergeBaseBranch:n,updatePending:l})&&(s.current=c,r(l9(e?.mergeBaseBranch)))},[e?.mergeBaseBranch,l,c,n,r]);let u=n??o?.mergeBase?.mergeBaseBranch??o?.branch.defaultBranch,d=!!(u||o?.branch.defaultBranch),f=u,p=(0,L.useMemo)(()=>R0({mergeBaseBranch:f,mergeBaseBranchOptions:t}),[f,t]),m=o?.branch.currentBranch!=null&&o.branch.currentBranch===o.branch.defaultBranch,h=d&&!!f&&!m;return{canSelectMergeBase:!!(h&&f&&p.length>0),effectiveMergeBaseBranch:u,handleMergeBaseBranchChange:(0,L.useCallback)(t=>{if(!e||!i?.environmentId)return;let n=t.trim(),s=o?.branch.defaultBranch.trim(),c=n.length>0&&n!==s?n:null,l=e.mergeBaseBranch;r(n),c!==l&&a.mutate({id:e.id,mergeBaseBranch:c},{onError:t=>{r(e.mergeBaseBranch??void 0),pL.error(JL({error:t,fallbackMessage:`Failed to update merge base branch.`}))}})},[e,r,i?.environmentId,a,o?.branch.defaultBranch]),showBranchComparisonUi:d,showMergeBase:h,mergeBaseBranch:f,mergeBaseCandidates:p}}var u9=s((e=>{e.__esModule=!0,e.extend=a,e.indexOf=l,e.escapeExpression=u,e.isEmpty=d,e.createFrame=f,e.blockParams=p,e.appendContextPath=m;var t={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"`":```,"=":`=`},n=/[&<>"'`=]/g,r=/[&<>"'`=]/;function i(e){return t[e]}function a(e){for(var t=1;t<arguments.length;t++)for(var n in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e}var o=Object.prototype.toString;e.toString=o;var s=function(e){return typeof e==`function`};s(/x/)&&(e.isFunction=s=function(e){return typeof e==`function`&&o.call(e)===`[object Function]`}),e.isFunction=s;var c=Array.isArray||function(e){return e&&typeof e==`object`?o.call(e)===`[object Array]`:!1};e.isArray=c;function l(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function u(e){if(typeof e!=`string`){if(e&&e.toHTML)return e.toHTML();if(e==null)return``;if(!e)return e+``;e=``+e}return r.test(e)?e.replace(n,i):e}function d(e){return!e&&e!==0?!0:!!(c(e)&&e.length===0)}function f(e){var t=a({},e);return t._parent=e,t}function p(e,t){return e.path=t,e}function m(e,t){return(e?e+`.`:``)+t}})),d9=s(((e,t)=>{e.__esModule=!0;var n=[`description`,`fileName`,`lineNumber`,`endLineNumber`,`message`,`name`,`number`,`stack`];function r(e,t){var i=t&&t.loc,a=void 0,o=void 0,s=void 0,c=void 0;i&&(a=i.start.line,o=i.end.line,s=i.start.column,c=i.end.column,e+=` - `+a+`:`+s);for(var l=Error.prototype.constructor.call(this,e),u=0;u<n.length;u++)this[n[u]]=l[n[u]];Error.captureStackTrace&&Error.captureStackTrace(this,r);try{i&&(this.lineNumber=a,this.endLineNumber=o,Object.defineProperty?(Object.defineProperty(this,`column`,{value:s,enumerable:!0}),Object.defineProperty(this,`endColumn`,{value:c,enumerable:!0})):(this.column=s,this.endColumn=c))}catch{}}r.prototype=Error(),e.default=r,t.exports=e.default})),RUe=s(((e,t)=>{e.__esModule=!0;var n=u9();e.default=function(e){e.registerHelper(`blockHelperMissing`,function(t,r){var i=r.inverse,a=r.fn;if(t===!0)return a(this);if(t===!1||t==null)return i(this);if(n.isArray(t))return t.length>0?(r.ids&&=[r.name],e.helpers.each(t,r)):i(this);if(r.data&&r.ids){var o=n.createFrame(r.data);o.contextPath=n.appendContextPath(r.data.contextPath,r.name),r={data:o}}return a(t,r)})},t.exports=e.default})),zUe=s(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=u9(),i=n(d9());e.default=function(e){e.registerHelper(`each`,function(e,t){if(!t)throw new i.default(`Must pass iterator to #each`);var n=t.fn,a=t.inverse,o=0,s=``,c=void 0,l=void 0;t.data&&t.ids&&(l=r.appendContextPath(t.data.contextPath,t.ids[0])+`.`),r.isFunction(e)&&(e=e.call(this)),t.data&&(c=r.createFrame(t.data));function u(t,i,a){c&&(c.key=t,c.index=i,c.first=i===0,c.last=!!a,l&&(c.contextPath=l+t)),s+=n(e[t],{data:c,blockParams:r.blockParams([e[t],t],[l+t,null])})}if(e&&typeof e==`object`)if(r.isArray(e))for(var d=e.length;o<d;o++)o in e&&u(o,o,o===e.length-1);else if(typeof Symbol==`function`&&e[Symbol.iterator]){for(var f=[],p=e[Symbol.iterator](),m=p.next();!m.done;m=p.next())f.push(m.value);e=f;for(var d=e.length;o<d;o++)u(o,o,o===e.length-1)}else (function(){var t=void 0;Object.keys(e).forEach(function(e){t!==void 0&&u(t,o-1),t=e,o++}),t!==void 0&&u(t,o-1,!0)})();return o===0&&(s=a(this)),s})},t.exports=e.default})),BUe=s(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=n(d9());e.default=function(e){e.registerHelper(`helperMissing`,function(){if(arguments.length!==1)throw new r.default(`Missing helper: "`+arguments[arguments.length-1].name+`"`)})},t.exports=e.default})),VUe=s(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=u9(),i=n(d9());e.default=function(e){e.registerHelper(`if`,function(e,t){if(arguments.length!=2)throw new i.default(`#if requires exactly one argument`);return r.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||r.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper(`unless`,function(t,n){if(arguments.length!=2)throw new i.default(`#unless requires exactly one argument`);return e.helpers.if.call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})})},t.exports=e.default})),HUe=s(((e,t)=>{e.__esModule=!0,e.default=function(e){e.registerHelper(`log`,function(){for(var t=[void 0],n=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)t.push(arguments[r]);var i=1;n.hash.level==null?n.data&&n.data.level!=null&&(i=n.data.level):i=n.hash.level,t[0]=i,e.log.apply(e,t)})},t.exports=e.default})),UUe=s(((e,t)=>{e.__esModule=!0,e.default=function(e){e.registerHelper(`lookup`,function(e,t,n){return e&&n.lookupProperty(e,t)})},t.exports=e.default})),WUe=s(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=u9(),i=n(d9());e.default=function(e){e.registerHelper(`with`,function(e,t){if(arguments.length!=2)throw new i.default(`#with requires exactly one argument`);r.isFunction(e)&&(e=e.call(this));var n=t.fn;if(r.isEmpty(e))return t.inverse(this);var a=t.data;return t.data&&t.ids&&(a=r.createFrame(t.data),a.contextPath=r.appendContextPath(t.data.contextPath,t.ids[0])),n(e,{data:a,blockParams:r.blockParams([e],[a&&a.contextPath])})})},t.exports=e.default})),f9=s((e=>{e.__esModule=!0,e.registerDefaultHelpers=l,e.moveHelperToHooks=u;function t(e){return e&&e.__esModule?e:{default:e}}var n=t(RUe()),r=t(zUe()),i=t(BUe()),a=t(VUe()),o=t(HUe()),s=t(UUe()),c=t(WUe());function l(e){n.default(e),r.default(e),i.default(e),a.default(e),o.default(e),s.default(e),c.default(e)}function u(e,t,n){e.helpers[t]&&(e.hooks[t]=e.helpers[t],n||delete e.helpers[t])}})),GUe=s(((e,t)=>{e.__esModule=!0;var n=u9();e.default=function(e){e.registerDecorator(`inline`,function(e,t,r,i){var a=e;return t.partials||(t.partials={},a=function(i,a){var o=r.partials;r.partials=n.extend({},o,t.partials);var s=e(i,a);return r.partials=o,s}),t.partials[i.args[0]]=i.fn,a})},t.exports=e.default})),KUe=s((e=>{e.__esModule=!0,e.registerDefaultDecorators=r;function t(e){return e&&e.__esModule?e:{default:e}}var n=t(GUe());function r(e){n.default(e)}})),p9=s(((e,t)=>{e.__esModule=!0;var n=u9(),r={methodMap:[`debug`,`info`,`warn`,`error`],level:`info`,lookupLevel:function(e){if(typeof e==`string`){var t=n.indexOf(r.methodMap,e.toLowerCase());e=t>=0?t:parseInt(e,10)}return e},log:function(e){if(e=r.lookupLevel(e),typeof console<`u`&&r.lookupLevel(r.level)<=e){var t=r.methodMap[e];console[t]||(t=`log`);var n=[...arguments].slice(1);console[t].apply(console,n)}}};e.default=r,t.exports=e.default})),qUe=s((e=>{e.__esModule=!0,e.createNewLookupObject=n;var t=u9();function n(){var e=[...arguments];return t.extend.apply(void 0,[Object.create(null)].concat(e))}})),m9=s((e=>{e.__esModule=!0,e.createProtoAccessControl=a,e.resultIsAllowed=o,e.resetLoggedProperties=l;function t(e){return e&&e.__esModule?e:{default:e}}var n=qUe(),r=t(p9()),i=Object.create(null);function a(e){var t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var r=Object.create(null);return r.__proto__=!1,{properties:{whitelist:n.createNewLookupObject(r,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:n.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}function o(e,t,n){return s(typeof e==`function`?t.methods:t.properties,n)}function s(e,t){return e.whitelist[t]===void 0?e.defaultValue===void 0?(c(t),!1):e.defaultValue:e.whitelist[t]===!0}function c(e){i[e]!==!0&&(i[e]=!0,r.default.log(`error`,`Handlebars: Access has been denied to resolve the property "`+e+`" because it is not an "own property" of its parent.
|
|
3302
3302
|
You can add a runtime option to disable the check or this warning:
|
|
3303
|
-
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function l(){Object.keys(i).forEach(function(e){delete i[e]})}})),
|
|
3303
|
+
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function l(){Object.keys(i).forEach(function(e){delete i[e]})}})),h9=s((e=>{e.__esModule=!0,e.HandlebarsEnvironment=l;function t(e){return e&&e.__esModule?e:{default:e}}var n=u9(),r=t(d9()),i=f9(),a=KUe(),o=t(p9()),s=m9();e.VERSION=`4.7.8`,e.COMPILER_REVISION=8,e.LAST_COMPATIBLE_COMPILER_REVISION=7,e.REVISION_CHANGES={1:`<= 1.0.rc.2`,2:`== 1.0.0-rc.3`,3:`== 1.0.0-rc.4`,4:`== 1.x.x`,5:`== 2.0.0-alpha.x`,6:`>= 2.0.0-beta.1`,7:`>= 4.0.0 <4.3.0`,8:`>= 4.3.0`};var c=`[object Object]`;function l(e,t,n){this.helpers=e||{},this.partials=t||{},this.decorators=n||{},i.registerDefaultHelpers(this),a.registerDefaultDecorators(this)}l.prototype={constructor:l,logger:o.default,log:o.default.log,registerHelper:function(e,t){if(n.toString.call(e)===c){if(t)throw new r.default(`Arg not supported with multiple helpers`);n.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(n.toString.call(e)===c)n.extend(this.partials,e);else{if(t===void 0)throw new r.default(`Attempting to register a partial called "`+e+`" as undefined`);this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(n.toString.call(e)===c){if(t)throw new r.default(`Arg not supported with multiple decorators`);n.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){s.resetLoggedProperties()}},e.log=o.default.log,e.createFrame=n.createFrame,e.logger=o.default})),JUe=s(((e,t)=>{e.__esModule=!0;function n(e){this.string=e}n.prototype.toString=n.prototype.toHTML=function(){return``+this.string},e.default=n,t.exports=e.default})),YUe=s((e=>{e.__esModule=!0,e.wrapHelper=t;function t(e,t){return typeof e==`function`?function(){var n=arguments[arguments.length-1];return arguments[arguments.length-1]=t(n),e.apply(this,arguments)}:e}})),XUe=s((e=>{e.__esModule=!0,e.checkRevision=l,e.template=u,e.wrapProgram=d,e.resolvePartial=f,e.invokePartial=p,e.noop=m;function t(e){return e&&e.__esModule?e:{default:e}}function n(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}var r=n(u9()),i=t(d9()),a=h9(),o=f9(),s=YUe(),c=m9();function l(e){var t=e&&e[0]||1,n=a.COMPILER_REVISION;if(!(t>=a.LAST_COMPATIBLE_COMPILER_REVISION&&t<=a.COMPILER_REVISION))if(t<a.LAST_COMPATIBLE_COMPILER_REVISION){var r=a.REVISION_CHANGES[n],o=a.REVISION_CHANGES[t];throw new i.default(`Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (`+r+`) or downgrade your runtime to an older version (`+o+`).`)}else throw new i.default(`Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (`+e[1]+`).`)}function u(e,t){if(!t)throw new i.default(`No environment passed to template`);if(!e||!e.main)throw new i.default(`Unknown template object: `+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var n=e.compiler&&e.compiler[0]===7;function a(n,a,o){o.hash&&(a=r.extend({},a,o.hash),o.ids&&(o.ids[0]=!0)),n=t.VM.resolvePartial.call(this,n,a,o);var s=r.extend({},o,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),c=t.VM.invokePartial.call(this,n,a,s);if(c==null&&t.compile&&(o.partials[o.name]=t.compile(n,e.compilerOptions,t),c=o.partials[o.name](a,s)),c!=null){if(o.indent){for(var l=c.split(`
|
|
3304
3304
|
`),u=0,d=l.length;u<d&&!(!l[u]&&u+1===d);u++)l[u]=o.indent+l[u];c=l.join(`
|
|
3305
|
-
`)}return c}else throw new i.default(`The partial `+o.name+` could not be compiled when running in runtime-only mode`)}var s={strict:function(e,t,n){if(!e||!(t in e))throw new i.default(`"`+t+`" not defined in `+e,{loc:n});return s.lookupProperty(e,t)},lookupProperty:function(e,t){var n=e[t];if(n==null||Object.prototype.hasOwnProperty.call(e,t)||c.resultIsAllowed(n,s.protoAccessControl,t))return n},lookup:function(e,t){for(var n=e.length,r=0;r<n;r++)if((e[r]&&s.lookupProperty(e[r],t))!=null)return e[r][t]},lambda:function(e,t){return typeof e==`function`?e.call(t):e},escapeExpression:r.escapeExpression,invokePartial:a,fn:function(t){var n=e[t];return n.decorator=e[t+`_d`],n},programs:[],program:function(e,t,n,r,i){var a=this.programs[e],o=this.fn(e);return t||i||r||n?a=d(this,e,o,t,n,r,i):a||=this.programs[e]=d(this,e,o),a},data:function(e,t){for(;e&&t--;)e=e._parent;return e},mergeIfNeeded:function(e,t){var n=e||t;return e&&t&&e!==t&&(n=r.extend({},t,e)),n},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function l(t){var n=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],r=n.data;l._setup(n),!n.partial&&e.useData&&(r=h(t,r));var i=void 0,a=e.useBlockParams?[]:void 0;e.useDepths&&(i=n.depths?t==n.depths[0]?n.depths:[t].concat(n.depths):[t]);function o(t){return``+e.main(s,t,s.helpers,s.partials,r,a,i)}return o=g(e.main,o,s,n.depths||[],r,a),o(t,n)}return l.isTop=!0,l._setup=function(i){if(i.partial)s.protoAccessControl=i.protoAccessControl,s.helpers=i.helpers,s.partials=i.partials,s.decorators=i.decorators,s.hooks=i.hooks;else{var a=r.extend({},t.helpers,i.helpers);_(a,s),s.helpers=a,e.usePartial&&(s.partials=s.mergeIfNeeded(i.partials,t.partials)),(e.usePartial||e.useDecorators)&&(s.decorators=r.extend({},t.decorators,i.decorators)),s.hooks={},s.protoAccessControl=c.createProtoAccessControl(i);var l=i.allowCallsToHelperMissing||n;o.moveHelperToHooks(s,`helperMissing`,l),o.moveHelperToHooks(s,`blockHelperMissing`,l)}},l._child=function(t,n,r,a){if(e.useBlockParams&&!r)throw new i.default(`must pass block params`);if(e.useDepths&&!a)throw new i.default(`must pass parent depths`);return d(s,t,e[t],n,0,r,a)},l}function d(e,t,n,r,i,a,o){function s(t){var i=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],s=o;return o&&t!=o[0]&&!(t===e.nullContext&&o[0]===null)&&(s=[t].concat(o)),n(e,t,e.helpers,e.partials,i.data||r,a&&[i.blockParams].concat(a),s)}return s=g(n,s,e,o,r,a),s.program=t,s.depth=o?o.length:0,s.blockParams=i||0,s}function f(e,t,n){return e?!e.call&&!n.name&&(n.name=e,e=n.partials[e]):e=n.name===`@partial-block`?n.data[`partial-block`]:n.partials[n.name],e}function p(e,t,n){var o=n.data&&n.data[`partial-block`];n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var s=void 0;if(n.fn&&n.fn!==m&&(function(){n.data=a.createFrame(n.data);var e=n.fn;s=n.data[`partial-block`]=function(t){var n=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return n.data=a.createFrame(n.data),n.data[`partial-block`]=o,e(t,n)},e.partials&&(n.partials=r.extend({},n.partials,e.partials))})(),e===void 0&&s&&(e=s),e===void 0)throw new i.default(`The partial `+n.name+` could not be found`);if(e instanceof Function)return e(t,n)}function m(){return``}function h(e,t){return(!t||!(`root`in t))&&(t=t?a.createFrame(t):{},t.root=e),t}function g(e,t,n,i,a,o){if(e.decorator){var s={};t=e.decorator(t,s,n,i&&i[0],a,o,i),r.extend(t,s)}return t}function _(e,t){Object.keys(e).forEach(function(n){var r=e[n];e[n]=v(r,t)})}function v(e,t){var n=t.lookupProperty;return s.wrapHelper(e,function(e){return r.extend({lookupProperty:n},e)})}})),_9=s(((e,t)=>{e.__esModule=!0,e.default=function(e){(function(){typeof globalThis!=`object`&&(Object.prototype.__defineGetter__(`__magic__`,function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var t=globalThis.Handlebars;e.noConflict=function(){return globalThis.Handlebars===e&&(globalThis.Handlebars=t),e}},t.exports=e.default})),YUe=s(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}function r(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}var i=r(g9()),a=n(KUe()),o=n(f9()),s=r(d9()),c=r(JUe()),l=n(_9());function u(){var e=new i.HandlebarsEnvironment;return s.extend(e,i),e.SafeString=a.default,e.Exception=o.default,e.Utils=s,e.escapeExpression=s.escapeExpression,e.VM=c,e.template=function(t){return c.template(t,e)},e}var d=u();d.create=u,l.default(d),d.default=d,e.default=d,t.exports=e.default})),v9=s(((e,t)=>{e.__esModule=!0;var n={helpers:{helperExpression:function(e){return e.type===`SubExpression`||(e.type===`MustacheStatement`||e.type===`BlockStatement`)&&!!(e.params&&e.params.length||e.hash)},scopedId:function(e){return/^\.|this\b/.test(e.original)},simpleId:function(e){return e.parts.length===1&&!n.helpers.scopedId(e)&&!e.depth}}};e.default=n,t.exports=e.default})),XUe=s(((e,t)=>{e.__esModule=!0,e.default=(function(){var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:`error`,5:`EOF`,14:`COMMENT`,15:`CONTENT`,18:`END_RAW_BLOCK`,19:`OPEN_RAW_BLOCK`,23:`CLOSE_RAW_BLOCK`,29:`OPEN_BLOCK`,33:`CLOSE`,34:`OPEN_INVERSE`,39:`OPEN_INVERSE_CHAIN`,44:`INVERSE`,47:`OPEN_ENDBLOCK`,48:`OPEN`,51:`OPEN_UNESCAPED`,54:`CLOSE_UNESCAPED`,55:`OPEN_PARTIAL`,60:`OPEN_PARTIAL_BLOCK`,65:`OPEN_SEXPR`,68:`CLOSE_SEXPR`,72:`ID`,73:`EQUALS`,75:`OPEN_BLOCK_PARAMS`,77:`CLOSE_BLOCK_PARAMS`,80:`STRING`,81:`NUMBER`,82:`BOOLEAN`,83:`UNDEFINED`,84:`NULL`,85:`DATA`,87:`SEP`},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=r.prepareProgram(a[s]);break;case 3:this.$=a[s];break;case 4:this.$=a[s];break;case 5:this.$=a[s];break;case 6:this.$=a[s];break;case 7:this.$=a[s];break;case 8:this.$=a[s];break;case 9:this.$={type:`CommentStatement`,value:r.stripComment(a[s]),strip:r.stripFlags(a[s],a[s]),loc:r.locInfo(this._$)};break;case 10:this.$={type:`ContentStatement`,original:a[s],value:a[s],loc:r.locInfo(this._$)};break;case 11:this.$=r.prepareRawBlock(a[s-2],a[s-1],a[s],this._$);break;case 12:this.$={path:a[s-3],params:a[s-2],hash:a[s-1]};break;case 13:this.$=r.prepareBlock(a[s-3],a[s-2],a[s-1],a[s],!1,this._$);break;case 14:this.$=r.prepareBlock(a[s-3],a[s-2],a[s-1],a[s],!0,this._$);break;case 15:this.$={open:a[s-5],path:a[s-4],params:a[s-3],hash:a[s-2],blockParams:a[s-1],strip:r.stripFlags(a[s-5],a[s])};break;case 16:this.$={path:a[s-4],params:a[s-3],hash:a[s-2],blockParams:a[s-1],strip:r.stripFlags(a[s-5],a[s])};break;case 17:this.$={path:a[s-4],params:a[s-3],hash:a[s-2],blockParams:a[s-1],strip:r.stripFlags(a[s-5],a[s])};break;case 18:this.$={strip:r.stripFlags(a[s-1],a[s-1]),program:a[s]};break;case 19:var c=r.prepareBlock(a[s-2],a[s-1],a[s],a[s],!1,this._$),l=r.prepareProgram([c],a[s-1].loc);l.chained=!0,this.$={strip:a[s-2].strip,program:l,chain:!0};break;case 20:this.$=a[s];break;case 21:this.$={path:a[s-1],strip:r.stripFlags(a[s-2],a[s])};break;case 22:this.$=r.prepareMustache(a[s-3],a[s-2],a[s-1],a[s-4],r.stripFlags(a[s-4],a[s]),this._$);break;case 23:this.$=r.prepareMustache(a[s-3],a[s-2],a[s-1],a[s-4],r.stripFlags(a[s-4],a[s]),this._$);break;case 24:this.$={type:`PartialStatement`,name:a[s-3],params:a[s-2],hash:a[s-1],indent:``,strip:r.stripFlags(a[s-4],a[s]),loc:r.locInfo(this._$)};break;case 25:this.$=r.preparePartialBlock(a[s-2],a[s-1],a[s],this._$);break;case 26:this.$={path:a[s-3],params:a[s-2],hash:a[s-1],strip:r.stripFlags(a[s-4],a[s])};break;case 27:this.$=a[s];break;case 28:this.$=a[s];break;case 29:this.$={type:`SubExpression`,path:a[s-3],params:a[s-2],hash:a[s-1],loc:r.locInfo(this._$)};break;case 30:this.$={type:`Hash`,pairs:a[s],loc:r.locInfo(this._$)};break;case 31:this.$={type:`HashPair`,key:r.id(a[s-2]),value:a[s],loc:r.locInfo(this._$)};break;case 32:this.$=r.id(a[s-1]);break;case 33:this.$=a[s];break;case 34:this.$=a[s];break;case 35:this.$={type:`StringLiteral`,value:a[s],original:a[s],loc:r.locInfo(this._$)};break;case 36:this.$={type:`NumberLiteral`,value:Number(a[s]),original:Number(a[s]),loc:r.locInfo(this._$)};break;case 37:this.$={type:`BooleanLiteral`,value:a[s]===`true`,original:a[s]===`true`,loc:r.locInfo(this._$)};break;case 38:this.$={type:`UndefinedLiteral`,original:void 0,value:void 0,loc:r.locInfo(this._$)};break;case 39:this.$={type:`NullLiteral`,original:null,value:null,loc:r.locInfo(this._$)};break;case 40:this.$=a[s];break;case 41:this.$=a[s];break;case 42:this.$=r.preparePath(!0,a[s],this._$);break;case 43:this.$=r.preparePath(!1,a[s],this._$);break;case 44:a[s-2].push({part:r.id(a[s]),original:a[s],separator:a[s-1]}),this.$=a[s-2];break;case 45:this.$=[{part:r.id(a[s]),original:a[s]}];break;case 46:this.$=[];break;case 47:a[s-1].push(a[s]);break;case 48:this.$=[];break;case 49:a[s-1].push(a[s]);break;case 50:this.$=[];break;case 51:a[s-1].push(a[s]);break;case 58:this.$=[];break;case 59:a[s-1].push(a[s]);break;case 64:this.$=[];break;case 65:a[s-1].push(a[s]);break;case 70:this.$=[];break;case 71:a[s-1].push(a[s]);break;case 78:this.$=[];break;case 79:a[s-1].push(a[s]);break;case 82:this.$=[];break;case 83:a[s-1].push(a[s]);break;case 86:this.$=[];break;case 87:a[s-1].push(a[s]);break;case 90:this.$=[];break;case 91:a[s-1].push(a[s]);break;case 94:this.$=[];break;case 95:a[s-1].push(a[s]);break;case 98:this.$=[a[s]];break;case 99:a[s-1].push(a[s]);break;case 100:this.$=[a[s]];break;case 101:a[s-1].push(a[s]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(e,t){throw Error(e)},parse:function(e){var t=this,n=[0],r=[null],i=[],a=this.table,o=``,s=0,c=0,l=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,this.lexer.yylloc===void 0&&(this.lexer.yylloc={});var u=this.lexer.yylloc;i.push(u);var d=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError==`function`&&(this.parseError=this.yy.parseError);function f(){var e=t.lexer.lex()||1;return typeof e!=`number`&&(e=t.symbols_[e]||e),e}for(var p,m,h,g,_,v={},y,b,x,S;;){if(h=n[n.length-1],this.defaultActions[h]?g=this.defaultActions[h]:(p??=f(),g=a[h]&&a[h][p]),g===void 0||!g.length||!g[0]){var C=``;if(!l){for(y in S=[],a[h])this.terminals_[y]&&y>2&&S.push(`'`+this.terminals_[y]+`'`);C=this.lexer.showPosition?`Parse error on line `+(s+1)+`:
|
|
3305
|
+
`)}return c}else throw new i.default(`The partial `+o.name+` could not be compiled when running in runtime-only mode`)}var s={strict:function(e,t,n){if(!e||!(t in e))throw new i.default(`"`+t+`" not defined in `+e,{loc:n});return s.lookupProperty(e,t)},lookupProperty:function(e,t){var n=e[t];if(n==null||Object.prototype.hasOwnProperty.call(e,t)||c.resultIsAllowed(n,s.protoAccessControl,t))return n},lookup:function(e,t){for(var n=e.length,r=0;r<n;r++)if((e[r]&&s.lookupProperty(e[r],t))!=null)return e[r][t]},lambda:function(e,t){return typeof e==`function`?e.call(t):e},escapeExpression:r.escapeExpression,invokePartial:a,fn:function(t){var n=e[t];return n.decorator=e[t+`_d`],n},programs:[],program:function(e,t,n,r,i){var a=this.programs[e],o=this.fn(e);return t||i||r||n?a=d(this,e,o,t,n,r,i):a||=this.programs[e]=d(this,e,o),a},data:function(e,t){for(;e&&t--;)e=e._parent;return e},mergeIfNeeded:function(e,t){var n=e||t;return e&&t&&e!==t&&(n=r.extend({},t,e)),n},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function l(t){var n=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],r=n.data;l._setup(n),!n.partial&&e.useData&&(r=h(t,r));var i=void 0,a=e.useBlockParams?[]:void 0;e.useDepths&&(i=n.depths?t==n.depths[0]?n.depths:[t].concat(n.depths):[t]);function o(t){return``+e.main(s,t,s.helpers,s.partials,r,a,i)}return o=g(e.main,o,s,n.depths||[],r,a),o(t,n)}return l.isTop=!0,l._setup=function(i){if(i.partial)s.protoAccessControl=i.protoAccessControl,s.helpers=i.helpers,s.partials=i.partials,s.decorators=i.decorators,s.hooks=i.hooks;else{var a=r.extend({},t.helpers,i.helpers);_(a,s),s.helpers=a,e.usePartial&&(s.partials=s.mergeIfNeeded(i.partials,t.partials)),(e.usePartial||e.useDecorators)&&(s.decorators=r.extend({},t.decorators,i.decorators)),s.hooks={},s.protoAccessControl=c.createProtoAccessControl(i);var l=i.allowCallsToHelperMissing||n;o.moveHelperToHooks(s,`helperMissing`,l),o.moveHelperToHooks(s,`blockHelperMissing`,l)}},l._child=function(t,n,r,a){if(e.useBlockParams&&!r)throw new i.default(`must pass block params`);if(e.useDepths&&!a)throw new i.default(`must pass parent depths`);return d(s,t,e[t],n,0,r,a)},l}function d(e,t,n,r,i,a,o){function s(t){var i=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],s=o;return o&&t!=o[0]&&!(t===e.nullContext&&o[0]===null)&&(s=[t].concat(o)),n(e,t,e.helpers,e.partials,i.data||r,a&&[i.blockParams].concat(a),s)}return s=g(n,s,e,o,r,a),s.program=t,s.depth=o?o.length:0,s.blockParams=i||0,s}function f(e,t,n){return e?!e.call&&!n.name&&(n.name=e,e=n.partials[e]):e=n.name===`@partial-block`?n.data[`partial-block`]:n.partials[n.name],e}function p(e,t,n){var o=n.data&&n.data[`partial-block`];n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var s=void 0;if(n.fn&&n.fn!==m&&(function(){n.data=a.createFrame(n.data);var e=n.fn;s=n.data[`partial-block`]=function(t){var n=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return n.data=a.createFrame(n.data),n.data[`partial-block`]=o,e(t,n)},e.partials&&(n.partials=r.extend({},n.partials,e.partials))})(),e===void 0&&s&&(e=s),e===void 0)throw new i.default(`The partial `+n.name+` could not be found`);if(e instanceof Function)return e(t,n)}function m(){return``}function h(e,t){return(!t||!(`root`in t))&&(t=t?a.createFrame(t):{},t.root=e),t}function g(e,t,n,i,a,o){if(e.decorator){var s={};t=e.decorator(t,s,n,i&&i[0],a,o,i),r.extend(t,s)}return t}function _(e,t){Object.keys(e).forEach(function(n){var r=e[n];e[n]=v(r,t)})}function v(e,t){var n=t.lookupProperty;return s.wrapHelper(e,function(e){return r.extend({lookupProperty:n},e)})}})),g9=s(((e,t)=>{e.__esModule=!0,e.default=function(e){(function(){typeof globalThis!=`object`&&(Object.prototype.__defineGetter__(`__magic__`,function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var t=globalThis.Handlebars;e.noConflict=function(){return globalThis.Handlebars===e&&(globalThis.Handlebars=t),e}},t.exports=e.default})),ZUe=s(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}function r(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}var i=r(h9()),a=n(JUe()),o=n(d9()),s=r(u9()),c=r(XUe()),l=n(g9());function u(){var e=new i.HandlebarsEnvironment;return s.extend(e,i),e.SafeString=a.default,e.Exception=o.default,e.Utils=s,e.escapeExpression=s.escapeExpression,e.VM=c,e.template=function(t){return c.template(t,e)},e}var d=u();d.create=u,l.default(d),d.default=d,e.default=d,t.exports=e.default})),_9=s(((e,t)=>{e.__esModule=!0;var n={helpers:{helperExpression:function(e){return e.type===`SubExpression`||(e.type===`MustacheStatement`||e.type===`BlockStatement`)&&!!(e.params&&e.params.length||e.hash)},scopedId:function(e){return/^\.|this\b/.test(e.original)},simpleId:function(e){return e.parts.length===1&&!n.helpers.scopedId(e)&&!e.depth}}};e.default=n,t.exports=e.default})),QUe=s(((e,t)=>{e.__esModule=!0,e.default=(function(){var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:`error`,5:`EOF`,14:`COMMENT`,15:`CONTENT`,18:`END_RAW_BLOCK`,19:`OPEN_RAW_BLOCK`,23:`CLOSE_RAW_BLOCK`,29:`OPEN_BLOCK`,33:`CLOSE`,34:`OPEN_INVERSE`,39:`OPEN_INVERSE_CHAIN`,44:`INVERSE`,47:`OPEN_ENDBLOCK`,48:`OPEN`,51:`OPEN_UNESCAPED`,54:`CLOSE_UNESCAPED`,55:`OPEN_PARTIAL`,60:`OPEN_PARTIAL_BLOCK`,65:`OPEN_SEXPR`,68:`CLOSE_SEXPR`,72:`ID`,73:`EQUALS`,75:`OPEN_BLOCK_PARAMS`,77:`CLOSE_BLOCK_PARAMS`,80:`STRING`,81:`NUMBER`,82:`BOOLEAN`,83:`UNDEFINED`,84:`NULL`,85:`DATA`,87:`SEP`},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=r.prepareProgram(a[s]);break;case 3:this.$=a[s];break;case 4:this.$=a[s];break;case 5:this.$=a[s];break;case 6:this.$=a[s];break;case 7:this.$=a[s];break;case 8:this.$=a[s];break;case 9:this.$={type:`CommentStatement`,value:r.stripComment(a[s]),strip:r.stripFlags(a[s],a[s]),loc:r.locInfo(this._$)};break;case 10:this.$={type:`ContentStatement`,original:a[s],value:a[s],loc:r.locInfo(this._$)};break;case 11:this.$=r.prepareRawBlock(a[s-2],a[s-1],a[s],this._$);break;case 12:this.$={path:a[s-3],params:a[s-2],hash:a[s-1]};break;case 13:this.$=r.prepareBlock(a[s-3],a[s-2],a[s-1],a[s],!1,this._$);break;case 14:this.$=r.prepareBlock(a[s-3],a[s-2],a[s-1],a[s],!0,this._$);break;case 15:this.$={open:a[s-5],path:a[s-4],params:a[s-3],hash:a[s-2],blockParams:a[s-1],strip:r.stripFlags(a[s-5],a[s])};break;case 16:this.$={path:a[s-4],params:a[s-3],hash:a[s-2],blockParams:a[s-1],strip:r.stripFlags(a[s-5],a[s])};break;case 17:this.$={path:a[s-4],params:a[s-3],hash:a[s-2],blockParams:a[s-1],strip:r.stripFlags(a[s-5],a[s])};break;case 18:this.$={strip:r.stripFlags(a[s-1],a[s-1]),program:a[s]};break;case 19:var c=r.prepareBlock(a[s-2],a[s-1],a[s],a[s],!1,this._$),l=r.prepareProgram([c],a[s-1].loc);l.chained=!0,this.$={strip:a[s-2].strip,program:l,chain:!0};break;case 20:this.$=a[s];break;case 21:this.$={path:a[s-1],strip:r.stripFlags(a[s-2],a[s])};break;case 22:this.$=r.prepareMustache(a[s-3],a[s-2],a[s-1],a[s-4],r.stripFlags(a[s-4],a[s]),this._$);break;case 23:this.$=r.prepareMustache(a[s-3],a[s-2],a[s-1],a[s-4],r.stripFlags(a[s-4],a[s]),this._$);break;case 24:this.$={type:`PartialStatement`,name:a[s-3],params:a[s-2],hash:a[s-1],indent:``,strip:r.stripFlags(a[s-4],a[s]),loc:r.locInfo(this._$)};break;case 25:this.$=r.preparePartialBlock(a[s-2],a[s-1],a[s],this._$);break;case 26:this.$={path:a[s-3],params:a[s-2],hash:a[s-1],strip:r.stripFlags(a[s-4],a[s])};break;case 27:this.$=a[s];break;case 28:this.$=a[s];break;case 29:this.$={type:`SubExpression`,path:a[s-3],params:a[s-2],hash:a[s-1],loc:r.locInfo(this._$)};break;case 30:this.$={type:`Hash`,pairs:a[s],loc:r.locInfo(this._$)};break;case 31:this.$={type:`HashPair`,key:r.id(a[s-2]),value:a[s],loc:r.locInfo(this._$)};break;case 32:this.$=r.id(a[s-1]);break;case 33:this.$=a[s];break;case 34:this.$=a[s];break;case 35:this.$={type:`StringLiteral`,value:a[s],original:a[s],loc:r.locInfo(this._$)};break;case 36:this.$={type:`NumberLiteral`,value:Number(a[s]),original:Number(a[s]),loc:r.locInfo(this._$)};break;case 37:this.$={type:`BooleanLiteral`,value:a[s]===`true`,original:a[s]===`true`,loc:r.locInfo(this._$)};break;case 38:this.$={type:`UndefinedLiteral`,original:void 0,value:void 0,loc:r.locInfo(this._$)};break;case 39:this.$={type:`NullLiteral`,original:null,value:null,loc:r.locInfo(this._$)};break;case 40:this.$=a[s];break;case 41:this.$=a[s];break;case 42:this.$=r.preparePath(!0,a[s],this._$);break;case 43:this.$=r.preparePath(!1,a[s],this._$);break;case 44:a[s-2].push({part:r.id(a[s]),original:a[s],separator:a[s-1]}),this.$=a[s-2];break;case 45:this.$=[{part:r.id(a[s]),original:a[s]}];break;case 46:this.$=[];break;case 47:a[s-1].push(a[s]);break;case 48:this.$=[];break;case 49:a[s-1].push(a[s]);break;case 50:this.$=[];break;case 51:a[s-1].push(a[s]);break;case 58:this.$=[];break;case 59:a[s-1].push(a[s]);break;case 64:this.$=[];break;case 65:a[s-1].push(a[s]);break;case 70:this.$=[];break;case 71:a[s-1].push(a[s]);break;case 78:this.$=[];break;case 79:a[s-1].push(a[s]);break;case 82:this.$=[];break;case 83:a[s-1].push(a[s]);break;case 86:this.$=[];break;case 87:a[s-1].push(a[s]);break;case 90:this.$=[];break;case 91:a[s-1].push(a[s]);break;case 94:this.$=[];break;case 95:a[s-1].push(a[s]);break;case 98:this.$=[a[s]];break;case 99:a[s-1].push(a[s]);break;case 100:this.$=[a[s]];break;case 101:a[s-1].push(a[s]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(e,t){throw Error(e)},parse:function(e){var t=this,n=[0],r=[null],i=[],a=this.table,o=``,s=0,c=0,l=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,this.lexer.yylloc===void 0&&(this.lexer.yylloc={});var u=this.lexer.yylloc;i.push(u);var d=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError==`function`&&(this.parseError=this.yy.parseError);function f(){var e=t.lexer.lex()||1;return typeof e!=`number`&&(e=t.symbols_[e]||e),e}for(var p,m,h,g,_,v={},y,b,x,S;;){if(h=n[n.length-1],this.defaultActions[h]?g=this.defaultActions[h]:(p??=f(),g=a[h]&&a[h][p]),g===void 0||!g.length||!g[0]){var C=``;if(!l){for(y in S=[],a[h])this.terminals_[y]&&y>2&&S.push(`'`+this.terminals_[y]+`'`);C=this.lexer.showPosition?`Parse error on line `+(s+1)+`:
|
|
3306
3306
|
`+this.lexer.showPosition()+`
|
|
3307
3307
|
Expecting `+S.join(`, `)+`, got '`+(this.terminals_[p]||p)+`'`:`Parse error on line `+(s+1)+`: Unexpected `+(p==1?`end of input`:`'`+(this.terminals_[p]||p)+`'`),this.parseError(C,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:u,expected:S})}}if(g[0]instanceof Array&&g.length>1)throw Error(`Parse Error: multiple actions possible at state: `+h+`, token: `+p);switch(g[0]){case 1:n.push(p),r.push(this.lexer.yytext),i.push(this.lexer.yylloc),n.push(g[1]),p=null,m?(p=m,m=null):(c=this.lexer.yyleng,o=this.lexer.yytext,s=this.lexer.yylineno,u=this.lexer.yylloc,l>0&&l--);break;case 2:if(b=this.productions_[g[1]][1],v.$=r[r.length-b],v._$={first_line:i[i.length-(b||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(b||1)].first_column,last_column:i[i.length-1].last_column},d&&(v._$.range=[i[i.length-(b||1)].range[0],i[i.length-1].range[1]]),_=this.performAction.call(v,o,c,s,this.yy,g[1],r,i),_!==void 0)return _;b&&(n=n.slice(0,-1*b*2),r=r.slice(0,-1*b),i=i.slice(0,-1*b)),n.push(this.productions_[g[1]][0]),r.push(v.$),i.push(v._$),x=a[n[n.length-2]][n[n.length-1]],n.push(x);break;case 3:return!0}}return!0}};e.lexer=(function(){var e={EOF:1,parseError:function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this},more:function(){return this._more=!0,this},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},showPosition:function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
3308
3308
|
`+t+`^`},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r,i;this._more||(this.yytext=``,this.match=``);for(var a=this._currentRules(),o=0;o<a.length&&(n=this._input.match(this.rules[a[o]]),!(n&&(!t||n[0].length>t[0].length)&&(t=n,r=o,!this.options.flex)));o++);return t?(i=t[0].match(/(?:\r\n?|\n).*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,a[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e||void 0):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
3309
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},lex:function(){var e=this.next();return e===void 0?this.lex():e},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)}};return e.options={},e.performAction=function(e,t,n,r){function i(e,n){return t.yytext=t.yytext.substring(e,t.yyleng-n+e)}switch(n){case 0:if(t.yytext.slice(-2)===`\\\\`?(i(0,1),this.begin(`mu`)):t.yytext.slice(-1)===`\\`?(i(0,1),this.begin(`emu`)):this.begin(`mu`),t.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin(`raw`),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]===`raw`?15:(i(5,9),`END_RAW_BLOCK`);case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin(`raw`),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(t.yytext),this.popState(),this.begin(`com`);break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return t.yytext=i(1,2).replace(/\\"/g,`"`),80;case 32:return t.yytext=i(1,2).replace(/\\'/g,`'`),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return t.yytext=t.yytext.replace(/\\([\\\]])/g,`$1`),72;case 43:return`INVALID`;case 44:return 5}},e.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],e.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},e})();function t(){this.yy={}}return t.prototype=e,e.Parser=t,new t})(),t.exports=e.default})),y9=s(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=n(f9());function i(){this.parents=[]}i.prototype={constructor:i,mutating:!1,acceptKey:function(e,t){var n=this.accept(e[t]);if(this.mutating){if(n&&!i.prototype[n.type])throw new r.default(`Unexpected node type "`+n.type+`" found when accepting `+t+` on `+e.type);e[t]=n}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new r.default(e.type+` requires `+t)},acceptArray:function(e){for(var t=0,n=e.length;t<n;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),t--,n--)},accept:function(e){if(e){if(!this[e.type])throw new r.default(`Unknown type: `+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var t=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||t)return t;if(t!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:a,Decorator:a,BlockStatement:o,DecoratorBlock:o,PartialStatement:s,PartialBlockStatement:function(e){s.call(this,e),this.acceptKey(e,`program`)},ContentStatement:function(){},CommentStatement:function(){},SubExpression:a,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(e){this.acceptArray(e.pairs)},HashPair:function(e){this.acceptRequired(e,`value`)}};function a(e){this.acceptRequired(e,`path`),this.acceptArray(e.params),this.acceptKey(e,`hash`)}function o(e){a.call(this,e),this.acceptKey(e,`program`),this.acceptKey(e,`inverse`)}function s(e){this.acceptRequired(e,`name`),this.acceptArray(e.params),this.acceptKey(e,`hash`)}e.default=i,t.exports=e.default})),ZUe=s(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=n(y9());function i(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}i.prototype=new r.default,i.prototype.Program=function(e){var t=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var r=e.body,i=0,l=r.length;i<l;i++){var u=r[i],d=this.accept(u);if(d){var f=a(r,i,n),p=o(r,i,n),m=d.openStandalone&&f,h=d.closeStandalone&&p,g=d.inlineStandalone&&f&&p;d.close&&s(r,i,!0),d.open&&c(r,i,!0),t&&g&&(s(r,i),c(r,i)&&u.type===`PartialStatement`&&(u.indent=/([ \t]+$)/.exec(r[i-1].original)[1])),t&&m&&(s((u.program||u.inverse).body),c(r,i)),t&&h&&(s(r,i),c((u.inverse||u.program).body))}}return e},i.prototype.BlockStatement=i.prototype.DecoratorBlock=i.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,n=e.program&&e.inverse,r=n,i=n;if(n&&n.chained)for(r=n.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var l={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:o(t.body),closeStandalone:a((r||t).body)};if(e.openStrip.close&&s(t.body,null,!0),n){var u=e.inverseStrip;u.open&&c(t.body,null,!0),u.close&&s(r.body,null,!0),e.closeStrip.open&&c(i.body,null,!0),!this.options.ignoreStandalone&&a(t.body)&&o(r.body)&&(c(t.body),s(r.body))}else e.closeStrip.open&&c(t.body,null,!0);return l},i.prototype.Decorator=i.prototype.MustacheStatement=function(e){return e.strip},i.prototype.PartialStatement=i.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function a(e,t,n){t===void 0&&(t=e.length);var r=e[t-1],i=e[t-2];if(!r)return n;if(r.type===`ContentStatement`)return(i||!n?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(r.original)}function o(e,t,n){t===void 0&&(t=-1);var r=e[t+1],i=e[t+2];if(!r)return n;if(r.type===`ContentStatement`)return(i||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original)}function s(e,t,n){var r=e[t==null?0:t+1];if(!(!r||r.type!==`ContentStatement`||!n&&r.rightStripped)){var i=r.value;r.value=r.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,``),r.rightStripped=r.value!==i}}function c(e,t,n){var r=e[t==null?e.length-1:t-1];if(!(!r||r.type!==`ContentStatement`||!n&&r.leftStripped)){var i=r.value;return r.value=r.value.replace(n?/\s+$/:/[ \t]+$/,``),r.leftStripped=r.value!==i,r.leftStripped}}e.default=i,t.exports=e.default})),QUe=s((e=>{e.__esModule=!0,e.SourceLocation=i,e.id=a,e.stripFlags=o,e.stripComment=s,e.preparePath=c,e.prepareMustache=l,e.prepareRawBlock=u,e.prepareBlock=d,e.prepareProgram=f,e.preparePartialBlock=p;function t(e){return e&&e.__esModule?e:{default:e}}var n=t(f9());function r(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var r={loc:e.path.loc};throw new n.default(e.path.original+` doesn't match `+t,r)}}function i(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}}function a(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}function o(e,t){return{open:e.charAt(2)===`~`,close:t.charAt(t.length-3)===`~`}}function s(e){return e.replace(/^\{\{~?!-?-?/,``).replace(/-?-?~?\}\}$/,``)}function c(e,t,r){r=this.locInfo(r);for(var i=e?`@`:``,a=[],o=0,s=0,c=t.length;s<c;s++){var l=t[s].part,u=t[s].original!==l;if(i+=(t[s].separator||``)+l,!u&&(l===`..`||l===`.`||l===`this`)){if(a.length>0)throw new n.default(`Invalid path: `+i,{loc:r});l===`..`&&o++}else a.push(l)}return{type:`PathExpression`,data:e,depth:o,parts:a,original:i,loc:r}}function l(e,t,n,r,i,a){var o=r.charAt(3)||r.charAt(2),s=o!==`{`&&o!==`&`;return{type:/\*/.test(r)?`Decorator`:`MustacheStatement`,path:e,params:t,hash:n,escaped:s,strip:i,loc:this.locInfo(a)}}function u(e,t,n,i){r(e,n),i=this.locInfo(i);var a={type:`Program`,body:t,strip:{},loc:i};return{type:`BlockStatement`,path:e.path,params:e.params,hash:e.hash,program:a,openStrip:{},inverseStrip:{},closeStrip:{},loc:i}}function d(e,t,i,a,o,s){a&&a.path&&r(e,a);var c=/\*/.test(e.open);t.blockParams=e.blockParams;var l=void 0,u=void 0;if(i){if(c)throw new n.default(`Unexpected inverse block on decorator`,i);i.chain&&(i.program.body[0].closeStrip=a.strip),u=i.strip,l=i.program}return o&&(o=l,l=t,t=o),{type:c?`DecoratorBlock`:`BlockStatement`,path:e.path,params:e.params,hash:e.hash,program:t,inverse:l,openStrip:e.strip,inverseStrip:u,closeStrip:a&&a.strip,loc:this.locInfo(s)}}function f(e,t){if(!t&&e.length){var n=e[0].loc,r=e[e.length-1].loc;n&&r&&(t={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:`Program`,body:e,strip:{},loc:t}}function p(e,t,n,i){return r(e,n),{type:`PartialBlockStatement`,name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:n&&n.strip,loc:this.locInfo(i)}}})),$Ue=s((e=>{e.__esModule=!0,e.parseWithoutProcessing=c,e.parse=l;function t(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}var r=n(XUe()),i=n(ZUe()),a=t(QUe()),o=d9();e.parser=r.default;var s={};o.extend(s,a);function c(e,t){return e.type===`Program`?e:(r.default.yy=s,s.locInfo=function(e){return new s.SourceLocation(t&&t.srcName,e)},r.default.parse(e))}function l(e,t){var n=c(e,t);return new i.default(t).accept(n)}})),eWe=s((e=>{e.__esModule=!0,e.Compiler=o,e.precompile=s,e.compile=c;function t(e){return e&&e.__esModule?e:{default:e}}var n=t(f9()),r=d9(),i=t(v9()),a=[].slice;function o(){}o.prototype={compiler:o,equals:function(e){var t=this.opcodes.length;if(e.opcodes.length!==t)return!1;for(var n=0;n<t;n++){var r=this.opcodes[n],i=e.opcodes[n];if(r.opcode!==i.opcode||!l(r.args,i.args))return!1}t=this.children.length;for(var n=0;n<t;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,t){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=t,this.stringParams=t.stringParams,this.trackIds=t.trackIds,t.blockParams=t.blockParams||[],t.knownHelpers=r.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},t.knownHelpers),this.accept(e)},compileProgram:function(e){var t=new this.compiler().compile(e,this.options),n=this.guid++;return this.usePartial=this.usePartial||t.usePartial,this.children[n]=t,this.useDepths=this.useDepths||t.useDepths,n},accept:function(e){if(!this[e.type])throw new n.default(`Unknown type: `+e.type,e);this.sourceNode.unshift(e);var t=this[e.type](e);return this.sourceNode.shift(),t},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var t=e.body,n=t.length,r=0;r<n;r++)this.accept(t[r]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){u(e);var t=e.program,n=e.inverse;t&&=this.compileProgram(t),n&&=this.compileProgram(n);var r=this.classifySexpr(e);r===`helper`?this.helperSexpr(e,t,n):r===`simple`?(this.simpleSexpr(e),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),this.opcode(`emptyHash`),this.opcode(`blockValue`,e.path.original)):(this.ambiguousSexpr(e,t,n),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),this.opcode(`emptyHash`),this.opcode(`ambiguousBlockValue`)),this.opcode(`append`)},DecoratorBlock:function(e){var t=e.program&&this.compileProgram(e.program),n=this.setupFullMustacheParams(e,t,void 0),r=e.path;this.useDecorators=!0,this.opcode(`registerDecorator`,n.length,r.original)},PartialStatement:function(e){this.usePartial=!0;var t=e.program;t&&=this.compileProgram(e.program);var r=e.params;if(r.length>1)throw new n.default(`Unsupported number of partial arguments: `+r.length,e);r.length||(this.options.explicitPartialContext?this.opcode(`pushLiteral`,`undefined`):r.push({type:`PathExpression`,parts:[],depth:0}));var i=e.name.original,a=e.name.type===`SubExpression`;a&&this.accept(e.name),this.setupFullMustacheParams(e,t,void 0,!0);var o=e.indent||``;this.options.preventIndent&&o&&(this.opcode(`appendContent`,o),o=``),this.opcode(`invokePartial`,a,i,o),this.opcode(`append`)},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode(`appendEscaped`):this.opcode(`append`)},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode(`appendContent`,e.value)},CommentStatement:function(){},SubExpression:function(e){u(e);var t=this.classifySexpr(e);t===`simple`?this.simpleSexpr(e):t===`helper`?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,t,n){var r=e.path,i=r.parts[0],a=t!=null||n!=null;this.opcode(`getContext`,r.depth),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),r.strict=!0,this.accept(r),this.opcode(`invokeAmbiguous`,i,a)},simpleSexpr:function(e){var t=e.path;t.strict=!0,this.accept(t),this.opcode(`resolvePossibleLambda`)},helperSexpr:function(e,t,r){var a=this.setupFullMustacheParams(e,t,r),o=e.path,s=o.parts[0];if(this.options.knownHelpers[s])this.opcode(`invokeKnownHelper`,a.length,s);else if(this.options.knownHelpersOnly)throw new n.default(`You specified knownHelpersOnly, but used the unknown helper `+s,e);else o.strict=!0,o.falsy=!0,this.accept(o),this.opcode(`invokeHelper`,a.length,o.original,i.default.helpers.simpleId(o))},PathExpression:function(e){this.addDepth(e.depth),this.opcode(`getContext`,e.depth);var t=e.parts[0],n=i.default.helpers.scopedId(e),r=!e.depth&&!n&&this.blockParamIndex(t);r?this.opcode(`lookupBlockParam`,r,e.parts):t?e.data?(this.options.data=!0,this.opcode(`lookupData`,e.depth,e.parts,e.strict)):this.opcode(`lookupOnContext`,e.parts,e.falsy,e.strict,n):this.opcode(`pushContext`)},StringLiteral:function(e){this.opcode(`pushString`,e.value)},NumberLiteral:function(e){this.opcode(`pushLiteral`,e.value)},BooleanLiteral:function(e){this.opcode(`pushLiteral`,e.value)},UndefinedLiteral:function(){this.opcode(`pushLiteral`,`undefined`)},NullLiteral:function(){this.opcode(`pushLiteral`,`null`)},Hash:function(e){var t=e.pairs,n=0,r=t.length;for(this.opcode(`pushHash`);n<r;n++)this.pushParam(t[n].value);for(;n--;)this.opcode(`assignToHash`,t[n].key);this.opcode(`popHash`)},opcode:function(e){this.opcodes.push({opcode:e,args:a.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var t=i.default.helpers.simpleId(e.path),n=t&&!!this.blockParamIndex(e.path.parts[0]),r=!n&&i.default.helpers.helperExpression(e),a=!n&&(r||t);if(a&&!r){var o=e.path.parts[0],s=this.options;s.knownHelpers[o]?r=!0:s.knownHelpersOnly&&(a=!1)}return r?`helper`:a?`ambiguous`:`simple`},pushParams:function(e){for(var t=0,n=e.length;t<n;t++)this.pushParam(e[t])},pushParam:function(e){var t=e.value==null?e.original||``:e.value;if(this.stringParams)t.replace&&(t=t.replace(/^(\.?\.\/)*/g,``).replace(/\//g,`.`)),e.depth&&this.addDepth(e.depth),this.opcode(`getContext`,e.depth||0),this.opcode(`pushStringParam`,t,e.type),e.type===`SubExpression`&&this.accept(e);else{if(this.trackIds){var n=void 0;if(e.parts&&!i.default.helpers.scopedId(e)&&!e.depth&&(n=this.blockParamIndex(e.parts[0])),n){var r=e.parts.slice(1).join(`.`);this.opcode(`pushId`,`BlockParam`,n,r)}else t=e.original||t,t.replace&&(t=t.replace(/^this(?:\.|$)/,``).replace(/^\.\//,``).replace(/^\.$/,``)),this.opcode(`pushId`,e.type,t)}this.accept(e)}},setupFullMustacheParams:function(e,t,n,r){var i=e.params;return this.pushParams(i),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),e.hash?this.accept(e.hash):this.opcode(`emptyHash`,r),i},blockParamIndex:function(e){for(var t=0,n=this.options.blockParams.length;t<n;t++){var i=this.options.blockParams[t],a=i&&r.indexOf(i,e);if(i&&a>=0)return[t,a]}}};function s(e,t,r){if(e==null||typeof e!=`string`&&e.type!==`Program`)throw new n.default(`You must pass a string or Handlebars AST to Handlebars.precompile. You passed `+e);t||={},`data`in t||(t.data=!0),t.compat&&(t.useDepths=!0);var i=r.parse(e,t),a=new r.Compiler().compile(i,t);return new r.JavaScriptCompiler().compile(a,t)}function c(e,t,i){if(t===void 0&&(t={}),e==null||typeof e!=`string`&&e.type!==`Program`)throw new n.default(`You must pass a string or Handlebars AST to Handlebars.compile. You passed `+e);t=r.extend({},t),`data`in t||(t.data=!0),t.compat&&(t.useDepths=!0);var a=void 0;function o(){var n=i.parse(e,t),r=new i.Compiler().compile(n,t),a=new i.JavaScriptCompiler().compile(r,t,void 0,!0);return i.template(a)}function s(e,t){return a||=o(),a.call(this,e,t)}return s._setup=function(e){return a||=o(),a._setup(e)},s._child=function(e,t,n,r){return a||=o(),a._child(e,t,n,r)},s}function l(e,t){if(e===t)return!0;if(r.isArray(e)&&r.isArray(t)&&e.length===t.length){for(var n=0;n<e.length;n++)if(!l(e[n],t[n]))return!1;return!0}}function u(e){if(!e.path.parts){var t=e.path;e.path={type:`PathExpression`,data:!1,depth:0,parts:[t.original+``],original:t.original+``,loc:t.loc}}}})),tWe=s((e=>{var t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``);e.encode=function(e){if(0<=e&&e<t.length)return t[e];throw TypeError(`Must be between 0 and 63: `+e)},e.decode=function(e){var t=65,n=90,r=97,i=122,a=48;return t<=e&&e<=n?e-t:r<=e&&e<=i?e-r+26:a<=e&&e<=57?e-a+52:e==43?62:e==47?63:-1}})),b9=s((e=>{var t=tWe(),n=5,r=1<<n,i=r-1,a=r;function o(e){return e<0?(-e<<1)+1:(e<<1)+0}function s(e){var t=(e&1)==1,n=e>>1;return t?-n:n}e.encode=function(e){var r=``,s,c=o(e);do s=c&i,c>>>=n,c>0&&(s|=a),r+=t.encode(s);while(c>0);return r},e.decode=function(e,r,o){var c=e.length,l=0,u=0,d,f;do{if(r>=c)throw Error(`Expected more digits in base 64 VLQ value.`);if(f=t.decode(e.charCodeAt(r++)),f===-1)throw Error(`Invalid base64 digit: `+e.charAt(r-1));d=!!(f&a),f&=i,l+=f<<u,u+=n}while(d);o.value=s(l),o.rest=r}})),x9=s((e=>{function t(e,t,n){if(t in e)return e[t];if(arguments.length===3)return n;throw Error(`"`+t+`" is a required argument.`)}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function i(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}e.urlParse=i;function a(e){var t=``;return e.scheme&&(t+=e.scheme+`:`),t+=`//`,e.auth&&(t+=e.auth+`@`),e.host&&(t+=e.host),e.port&&(t+=`:`+e.port),e.path&&(t+=e.path),t}e.urlGenerate=a;function o(t){var n=t,r=i(t);if(r){if(!r.path)return t;n=r.path}for(var o=e.isAbsolute(n),s=n.split(/\/+/),c,l=0,u=s.length-1;u>=0;u--)c=s[u],c===`.`?s.splice(u,1):c===`..`?l++:l>0&&(c===``?(s.splice(u+1,l),l=0):(s.splice(u,2),l--));return n=s.join(`/`),n===``&&(n=o?`/`:`.`),r?(r.path=n,a(r)):n}e.normalize=o;function s(e,t){e===``&&(e=`.`),t===``&&(t=`.`);var n=i(t),s=i(e);if(s&&(e=s.path||`/`),n&&!n.scheme)return s&&(n.scheme=s.scheme),a(n);if(n||t.match(r))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var c=t.charAt(0)===`/`?t:o(e.replace(/\/+$/,``)+`/`+t);return s?(s.path=c,a(s)):c}e.join=s,e.isAbsolute=function(e){return e.charAt(0)===`/`||n.test(e)};function c(e,t){e===``&&(e=`.`),e=e.replace(/\/$/,``);for(var n=0;t.indexOf(e+`/`)!==0;){var r=e.lastIndexOf(`/`);if(r<0||(e=e.slice(0,r),e.match(/^([^\/]+:\/)?\/*$/)))return t;++n}return Array(n+1).join(`../`)+t.substr(e.length+1)}e.relative=c;var l=function(){return!(`__proto__`in Object.create(null))}();function u(e){return e}function d(e){return p(e)?`$`+e:e}e.toSetString=l?u:d;function f(e){return p(e)?e.slice(1):e}e.fromSetString=l?u:f;function p(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var n=t-10;n>=0;n--)if(e.charCodeAt(n)!==36)return!1;return!0}function m(e,t,n){var r=g(e.source,t.source);return r!==0||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0||n)||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=e.generatedLine-t.generatedLine,r!==0)?r:g(e.name,t.name)}e.compareByOriginalPositions=m;function h(e,t,n){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0||n)||(r=g(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:g(e.name,t.name)}e.compareByGeneratedPositionsDeflated=h;function g(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function _(e,t){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=g(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:g(e.name,t.name)}e.compareByGeneratedPositionsInflated=_;function v(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,``))}e.parseSourceMapInput=v;function y(e,t,n){if(t||=``,e&&(e[e.length-1]!==`/`&&t[0]!==`/`&&(e+=`/`),t=e+t),n){var r=i(n);if(!r)throw Error(`sourceMapURL could not be parsed`);if(r.path){var c=r.path.lastIndexOf(`/`);c>=0&&(r.path=r.path.substring(0,c+1))}t=s(a(r),t)}return o(t)}e.computeSourceURL=y})),S9=s((e=>{var t=x9(),n=Object.prototype.hasOwnProperty,r=typeof Map<`u`;function i(){this._array=[],this._set=r?new Map:Object.create(null)}i.fromArray=function(e,t){for(var n=new i,r=0,a=e.length;r<a;r++)n.add(e[r],t);return n},i.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},i.prototype.add=function(e,i){var a=r?e:t.toSetString(e),o=r?this.has(e):n.call(this._set,a),s=this._array.length;(!o||i)&&this._array.push(e),o||(r?this._set.set(e,s):this._set[a]=s)},i.prototype.has=function(e){if(r)return this._set.has(e);var i=t.toSetString(e);return n.call(this._set,i)},i.prototype.indexOf=function(e){if(r){var i=this._set.get(e);if(i>=0)return i}else{var a=t.toSetString(e);if(n.call(this._set,a))return this._set[a]}throw Error(`"`+e+`" is not in the set.`)},i.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw Error(`No element indexed by `+e)},i.prototype.toArray=function(){return this._array.slice()},e.ArraySet=i})),nWe=s((e=>{var t=x9();function n(e,n){var r=e.generatedLine,i=n.generatedLine,a=e.generatedColumn,o=n.generatedColumn;return i>r||i==r&&o>=a||t.compareByGeneratedPositionsInflated(e,n)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},r.prototype.add=function(e){n(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},r.prototype.toArray=function(){return this._sorted||=(this._array.sort(t.compareByGeneratedPositionsInflated),!0),this._array},e.MappingList=r})),C9=s((e=>{var t=b9(),n=x9(),r=S9().ArraySet,i=nWe().MappingList;function a(e){e||={},this._file=n.getArg(e,`file`,null),this._sourceRoot=n.getArg(e,`sourceRoot`,null),this._skipValidation=n.getArg(e,`skipValidation`,!1),this._sources=new r,this._names=new r,this._mappings=new i,this._sourcesContents=null}a.prototype._version=3,a.fromSourceMap=function(e){var t=e.sourceRoot,r=new a({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var i={generated:{line:e.generatedLine,column:e.generatedColumn}};e.source!=null&&(i.source=e.source,t!=null&&(i.source=n.relative(t,i.source)),i.original={line:e.originalLine,column:e.originalColumn},e.name!=null&&(i.name=e.name)),r.addMapping(i)}),e.sources.forEach(function(i){var a=i;t!==null&&(a=n.relative(t,i)),r._sources.has(a)||r._sources.add(a);var o=e.sourceContentFor(i);o!=null&&r.setSourceContent(i,o)}),r},a.prototype.addMapping=function(e){var t=n.getArg(e,`generated`),r=n.getArg(e,`original`,null),i=n.getArg(e,`source`,null),a=n.getArg(e,`name`,null);this._skipValidation||this._validateMapping(t,r,i,a),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),a!=null&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:a})},a.prototype.setSourceContent=function(e,t){var r=e;this._sourceRoot!=null&&(r=n.relative(this._sourceRoot,r)),t==null?this._sourcesContents&&(delete this._sourcesContents[n.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null)):(this._sourcesContents||=Object.create(null),this._sourcesContents[n.toSetString(r)]=t)},a.prototype.applySourceMap=function(e,t,i){var a=t;if(t==null){if(e.file==null)throw Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);a=e.file}var o=this._sourceRoot;o!=null&&(a=n.relative(o,a));var s=new r,c=new r;this._mappings.unsortedForEach(function(t){if(t.source===a&&t.originalLine!=null){var r=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});r.source!=null&&(t.source=r.source,i!=null&&(t.source=n.join(i,t.source)),o!=null&&(t.source=n.relative(o,t.source)),t.originalLine=r.line,t.originalColumn=r.column,r.name!=null&&(t.name=r.name))}var l=t.source;l!=null&&!s.has(l)&&s.add(l);var u=t.name;u!=null&&!c.has(u)&&c.add(u)},this),this._sources=s,this._names=c,e.sources.forEach(function(t){var r=e.sourceContentFor(t);r!=null&&(i!=null&&(t=n.join(i,t)),o!=null&&(t=n.relative(o,t)),this.setSourceContent(t,r))},this)},a.prototype._validateMapping=function(e,t,n,r){if(t&&typeof t.line!=`number`&&typeof t.column!=`number`)throw Error(`original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.`);if(!(e&&`line`in e&&`column`in e&&e.line>0&&e.column>=0&&!t&&!n&&!r)&&!(e&&`line`in e&&`column`in e&&t&&`line`in t&&`column`in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw Error(`Invalid mapping: `+JSON.stringify({generated:e,source:n,original:t,name:r}))},a.prototype._serializeMappings=function(){for(var e=0,r=1,i=0,a=0,o=0,s=0,c=``,l,u,d,f,p=this._mappings.toArray(),m=0,h=p.length;m<h;m++){if(u=p[m],l=``,u.generatedLine!==r)for(e=0;u.generatedLine!==r;)l+=`;`,r++;else if(m>0){if(!n.compareByGeneratedPositionsInflated(u,p[m-1]))continue;l+=`,`}l+=t.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(f=this._sources.indexOf(u.source),l+=t.encode(f-s),s=f,l+=t.encode(u.originalLine-1-a),a=u.originalLine-1,l+=t.encode(u.originalColumn-i),i=u.originalColumn,u.name!=null&&(d=this._names.indexOf(u.name),l+=t.encode(d-o),o=d)),c+=l}return c},a.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;t!=null&&(e=n.relative(t,e));var r=n.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},a.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},a.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=a})),rWe=s((e=>{e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(n,r,i,a,o,s){var c=Math.floor((r-n)/2)+n,l=o(i,a[c],!0);return l===0?c:l>0?r-c>1?t(c,r,i,a,o,s):s==e.LEAST_UPPER_BOUND?r<a.length?r:-1:c:c-n>1?t(n,c,i,a,o,s):s==e.LEAST_UPPER_BOUND?c:n<0?-1:n}e.search=function(n,r,i,a){if(r.length===0)return-1;var o=t(-1,r.length,n,r,i,a||e.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&i(r[o],r[o-1],!0)===0;)--o;return o}})),iWe=s((e=>{function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return Math.round(e+Math.random()*(t-e))}function r(e,i,a,o){if(a<o){var s=n(a,o),c=a-1;t(e,s,o);for(var l=e[o],u=a;u<o;u++)i(e[u],l)<=0&&(c+=1,t(e,c,u));t(e,c+1,u);var d=c+1;r(e,i,a,d-1),r(e,i,d+1,o)}}e.quickSort=function(e,t){r(e,t,0,e.length-1)}})),aWe=s((e=>{var t=x9(),n=rWe(),r=S9().ArraySet,i=b9(),a=iWe().quickSort;function o(e,n){var r=e;return typeof e==`string`&&(r=t.parseSourceMapInput(e)),r.sections==null?new s(r,n):new l(r,n)}o.fromSourceMap=function(e,t){return s.fromSourceMap(e,t)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,`_generatedMappings`,{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,`_originalMappings`,{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return n===`;`||n===`,`},o.prototype._parseMappings=function(e,t){throw Error(`Subclasses must implement _parseMappings`)},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(e,n,r){var i=n||null,a=r||o.GENERATED_ORDER,s;switch(a){case o.GENERATED_ORDER:s=this._generatedMappings;break;case o.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw Error(`Unknown order of iteration.`)}var c=this.sourceRoot;s.map(function(e){var n=e.source===null?null:this._sources.at(e.source);return n=t.computeSourceURL(c,n,this._sourceMapURL),{source:n,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}},this).forEach(e,i)},o.prototype.allGeneratedPositionsFor=function(e){var r=t.getArg(e,`line`),i={source:t.getArg(e,`source`),originalLine:r,originalColumn:t.getArg(e,`column`,0)};if(i.source=this._findSourceIndex(i.source),i.source<0)return[];var a=[],o=this._findMapping(i,this._originalMappings,`originalLine`,`originalColumn`,t.compareByOriginalPositions,n.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(e.column===void 0)for(var c=s.originalLine;s&&s.originalLine===c;)a.push({line:t.getArg(s,`generatedLine`,null),column:t.getArg(s,`generatedColumn`,null),lastColumn:t.getArg(s,`lastGeneratedColumn`,null)}),s=this._originalMappings[++o];else for(var l=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==l;)a.push({line:t.getArg(s,`generatedLine`,null),column:t.getArg(s,`generatedColumn`,null),lastColumn:t.getArg(s,`lastGeneratedColumn`,null)}),s=this._originalMappings[++o]}return a},e.SourceMapConsumer=o;function s(e,n){var i=e;typeof e==`string`&&(i=t.parseSourceMapInput(e));var a=t.getArg(i,`version`),o=t.getArg(i,`sources`),s=t.getArg(i,`names`,[]),c=t.getArg(i,`sourceRoot`,null),l=t.getArg(i,`sourcesContent`,null),u=t.getArg(i,`mappings`),d=t.getArg(i,`file`,null);if(a!=this._version)throw Error(`Unsupported version: `+a);c&&=t.normalize(c),o=o.map(String).map(t.normalize).map(function(e){return c&&t.isAbsolute(c)&&t.isAbsolute(e)?t.relative(c,e):e}),this._names=r.fromArray(s.map(String),!0),this._sources=r.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(e){return t.computeSourceURL(c,e,n)}),this.sourceRoot=c,this.sourcesContent=l,this._mappings=u,this._sourceMapURL=n,this.file=d}s.prototype=Object.create(o.prototype),s.prototype.consumer=o,s.prototype._findSourceIndex=function(e){var n=e;if(this.sourceRoot!=null&&(n=t.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1},s.fromSourceMap=function(e,n){var i=Object.create(s.prototype),o=i._names=r.fromArray(e._names.toArray(),!0),l=i._sources=r.fromArray(e._sources.toArray(),!0);i.sourceRoot=e._sourceRoot,i.sourcesContent=e._generateSourcesContent(i._sources.toArray(),i.sourceRoot),i.file=e._file,i._sourceMapURL=n,i._absoluteSources=i._sources.toArray().map(function(e){return t.computeSourceURL(i.sourceRoot,e,n)});for(var u=e._mappings.toArray().slice(),d=i.__generatedMappings=[],f=i.__originalMappings=[],p=0,m=u.length;p<m;p++){var h=u[p],g=new c;g.generatedLine=h.generatedLine,g.generatedColumn=h.generatedColumn,h.source&&(g.source=l.indexOf(h.source),g.originalLine=h.originalLine,g.originalColumn=h.originalColumn,h.name&&(g.name=o.indexOf(h.name)),f.push(g)),d.push(g)}return a(i.__originalMappings,t.compareByOriginalPositions),i},s.prototype._version=3,Object.defineProperty(s.prototype,`sources`,{get:function(){return this._absoluteSources.slice()}});function c(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}s.prototype._parseMappings=function(e,n){for(var r=1,o=0,s=0,l=0,u=0,d=0,f=e.length,p=0,m={},h={},g=[],_=[],v,y,b,x,S;p<f;)if(e.charAt(p)===`;`)r++,p++,o=0;else if(e.charAt(p)===`,`)p++;else{for(v=new c,v.generatedLine=r,x=p;x<f&&!this._charIsMappingSeparator(e,x);x++);if(y=e.slice(p,x),b=m[y],b)p+=y.length;else{for(b=[];p<x;)i.decode(e,p,h),S=h.value,p=h.rest,b.push(S);if(b.length===2)throw Error(`Found a source, but no line and column`);if(b.length===3)throw Error(`Found a source and line, but no column`);m[y]=b}v.generatedColumn=o+b[0],o=v.generatedColumn,b.length>1&&(v.source=u+b[1],u+=b[1],v.originalLine=s+b[2],s=v.originalLine,v.originalLine+=1,v.originalColumn=l+b[3],l=v.originalColumn,b.length>4&&(v.name=d+b[4],d+=b[4])),_.push(v),typeof v.originalLine==`number`&&g.push(v)}a(_,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=_,a(g,t.compareByOriginalPositions),this.__originalMappings=g},s.prototype._findMapping=function(e,t,r,i,a,o){if(e[r]<=0)throw TypeError(`Line must be greater than or equal to 1, got `+e[r]);if(e[i]<0)throw TypeError(`Column must be greater than or equal to 0, got `+e[i]);return n.search(e,t,a,o)},s.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},s.prototype.originalPositionFor=function(e){var n={generatedLine:t.getArg(e,`line`),generatedColumn:t.getArg(e,`column`)},r=this._findMapping(n,this._generatedMappings,`generatedLine`,`generatedColumn`,t.compareByGeneratedPositionsDeflated,t.getArg(e,`bias`,o.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===n.generatedLine){var a=t.getArg(i,`source`,null);a!==null&&(a=this._sources.at(a),a=t.computeSourceURL(this.sourceRoot,a,this._sourceMapURL));var s=t.getArg(i,`name`,null);return s!==null&&(s=this._names.at(s)),{source:a,line:t.getArg(i,`originalLine`,null),column:t.getArg(i,`originalColumn`,null),name:s}}}return{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1},s.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var i=e;this.sourceRoot!=null&&(i=t.relative(this.sourceRoot,i));var a;if(this.sourceRoot!=null&&(a=t.urlParse(this.sourceRoot))){var o=i.replace(/^file:\/\//,``);if(a.scheme==`file`&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!a.path||a.path==`/`)&&this._sources.has(`/`+i))return this.sourcesContent[this._sources.indexOf(`/`+i)]}if(n)return null;throw Error(`"`+i+`" is not in the SourceMap.`)},s.prototype.generatedPositionFor=function(e){var n=t.getArg(e,`source`);if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:t.getArg(e,`line`),originalColumn:t.getArg(e,`column`)},i=this._findMapping(r,this._originalMappings,`originalLine`,`originalColumn`,t.compareByOriginalPositions,t.getArg(e,`bias`,o.GREATEST_LOWER_BOUND));if(i>=0){var a=this._originalMappings[i];if(a.source===r.source)return{line:t.getArg(a,`generatedLine`,null),column:t.getArg(a,`generatedColumn`,null),lastColumn:t.getArg(a,`lastGeneratedColumn`,null)}}return{line:null,column:null,lastColumn:null}},e.BasicSourceMapConsumer=s;function l(e,n){var i=e;typeof e==`string`&&(i=t.parseSourceMapInput(e));var a=t.getArg(i,`version`),s=t.getArg(i,`sections`);if(a!=this._version)throw Error(`Unsupported version: `+a);this._sources=new r,this._names=new r;var c={line:-1,column:0};this._sections=s.map(function(e){if(e.url)throw Error(`Support for url field in sections not implemented.`);var r=t.getArg(e,`offset`),i=t.getArg(r,`line`),a=t.getArg(r,`column`);if(i<c.line||i===c.line&&a<c.column)throw Error(`Section offsets must be ordered and non-overlapping.`);return c=r,{generatedOffset:{generatedLine:i+1,generatedColumn:a+1},consumer:new o(t.getArg(e,`map`),n)}})}l.prototype=Object.create(o.prototype),l.prototype.constructor=o,l.prototype._version=3,Object.defineProperty(l.prototype,`sources`,{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),l.prototype.originalPositionFor=function(e){var r={generatedLine:t.getArg(e,`line`),generatedColumn:t.getArg(e,`column`)},i=n.search(r,this._sections,function(e,t){return e.generatedLine-t.generatedOffset.generatedLine||e.generatedColumn-t.generatedOffset.generatedColumn}),a=this._sections[i];return a?a.consumer.originalPositionFor({line:r.generatedLine-(a.generatedOffset.generatedLine-1),column:r.generatedColumn-(a.generatedOffset.generatedLine===r.generatedLine?a.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},l.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n].consumer.sourceContentFor(e,!0);if(r)return r}if(t)return null;throw Error(`"`+e+`" is not in the SourceMap.`)},l.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(r.consumer._findSourceIndex(t.getArg(e,`source`))!==-1){var i=r.consumer.generatedPositionFor(e);if(i)return{line:i.line+(r.generatedOffset.generatedLine-1),column:i.column+(r.generatedOffset.generatedLine===i.line?r.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},l.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var c=o[s],l=i.consumer._sources.at(c.source);l=t.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var u=null;c.name&&(u=i.consumer._names.at(c.name),this._names.add(u),u=this._names.indexOf(u));var d={source:l,generatedLine:c.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:c.generatedColumn+(i.generatedOffset.generatedLine===c.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:c.originalLine,originalColumn:c.originalColumn,name:u};this.__generatedMappings.push(d),typeof d.originalLine==`number`&&this.__originalMappings.push(d)}a(this.__generatedMappings,t.compareByGeneratedPositionsDeflated),a(this.__originalMappings,t.compareByOriginalPositions)},e.IndexedSourceMapConsumer=l})),oWe=s((e=>{var t=C9().SourceMapGenerator,n=x9(),r=/(\r?\n)/,i=10,a=`$$$isSourceNode$$$`;function o(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=n??null,this.name=i??null,this[a]=!0,r!=null&&this.add(r)}o.fromStringWithSourceMap=function(e,t,i){var a=new o,s=e.split(r),c=0,l=function(){return e()+(e()||``);function e(){return c<s.length?s[c++]:void 0}},u=1,d=0,f=null;return t.eachMapping(function(e){if(f!==null)if(u<e.generatedLine)p(f,l()),u++,d=0;else{var t=s[c]||``,n=t.substr(0,e.generatedColumn-d);s[c]=t.substr(e.generatedColumn-d),d=e.generatedColumn,p(f,n),f=e;return}for(;u<e.generatedLine;)a.add(l()),u++;if(d<e.generatedColumn){var t=s[c]||``;a.add(t.substr(0,e.generatedColumn)),s[c]=t.substr(e.generatedColumn),d=e.generatedColumn}f=e},this),c<s.length&&(f&&p(f,l()),a.add(s.splice(c).join(``))),t.sources.forEach(function(e){var r=t.sourceContentFor(e);r!=null&&(i!=null&&(e=n.join(i,e)),a.setSourceContent(e,r))}),a;function p(e,t){if(e===null||e.source===void 0)a.add(t);else{var r=i?n.join(i,e.source):e.source;a.add(new o(e.originalLine,e.originalColumn,r,t,e.name))}}},o.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else if(e[a]||typeof e==`string`)e&&this.children.push(e);else throw TypeError(`Expected a SourceNode, string, or an array of SourceNodes and strings. Got `+e);return this},o.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else if(e[a]||typeof e==`string`)this.children.unshift(e);else throw TypeError(`Expected a SourceNode, string, or an array of SourceNodes and strings. Got `+e);return this},o.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)t=this.children[n],t[a]?t.walk(e):t!==``&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},o.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},o.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[a]?n.replaceRight(e,t):typeof n==`string`?this.children[this.children.length-1]=n.replace(e,t):this.children.push(``.replace(e,t)),this},o.prototype.setSourceContent=function(e,t){this.sourceContents[n.toSetString(e)]=t},o.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][a]&&this.children[t].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),t=0,r=i.length;t<r;t++)e(n.fromSetString(i[t]),this.sourceContents[i[t]])},o.prototype.toString=function(){var e=``;return this.walk(function(t){e+=t}),e},o.prototype.toStringWithSourceMap=function(e){var n={code:``,line:1,column:0},r=new t(e),a=!1,o=null,s=null,c=null,l=null;return this.walk(function(e,t){n.code+=e,t.source!==null&&t.line!==null&&t.column!==null?((o!==t.source||s!==t.line||c!==t.column||l!==t.name)&&r.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name}),o=t.source,s=t.line,c=t.column,l=t.name,a=!0):a&&=(r.addMapping({generated:{line:n.line,column:n.column}}),o=null,!1);for(var u=0,d=e.length;u<d;u++)e.charCodeAt(u)===i?(n.line++,n.column=0,u+1===d?(o=null,a=!1):a&&r.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name})):n.column++}),this.walkSourceContents(function(e,t){r.setSourceContent(e,t)}),{code:n.code,map:r}},e.SourceNode=o})),sWe=s((e=>{e.SourceMapGenerator=C9().SourceMapGenerator,e.SourceMapConsumer=aWe().SourceMapConsumer,e.SourceNode=oWe().SourceNode})),cWe=s(((e,t)=>{e.__esModule=!0;var n=d9(),r=void 0;try{(typeof define!=`function`||!define.amd)&&(r=sWe().SourceNode)}catch{}r||(r=function(e,t,n,r){this.src=``,r&&this.add(r)},r.prototype={add:function(e){n.isArray(e)&&(e=e.join(``)),this.src+=e},prepend:function(e){n.isArray(e)&&(e=e.join(``)),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function i(e,t,r){if(n.isArray(e)){for(var i=[],a=0,o=e.length;a<o;a++)i.push(t.wrap(e[a],r));return i}else if(typeof e==`boolean`||typeof e==`number`)return e+``;return e}function a(e){this.srcFile=e,this.source=[]}a.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,t){this.source.unshift(this.wrap(e,t))},push:function(e,t){this.source.push(this.wrap(e,t))},merge:function(){var e=this.empty();return this.each(function(t){e.add([` `,t,`
|
|
3310
|
-
`])}),e},each:function(e){for(var t=0,n=this.source.length;t<n;t++)e(this.source[t])},empty:function(){var e=this.currentLocation||{start:{}};return new r(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var t=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof r?e:(e=i(e,this,t),new r(t.start.line,t.start.column,this.srcFile,e))},functionCall:function(e,t,n){return n=this.generateList(n),this.wrap([e,t?`.`+t+`(`:`(`,n,`)`])},quotedString:function(e){return`"`+(e+``).replace(/\\/g,`\\\\`).replace(/"/g,`\\"`).replace(/\n/g,`\\n`).replace(/\r/g,`\\r`).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)+`"`},objectLiteral:function(e){var t=this,n=[];Object.keys(e).forEach(function(r){var a=i(e[r],t);a!==`undefined`&&n.push([t.quotedString(r),`:`,a])});var r=this.generateList(n);return r.prepend(`{`),r.add(`}`),r},generateList:function(e){for(var t=this.empty(),n=0,r=e.length;n<r;n++)n&&t.add(`,`),t.add(i(e[n],this));return t},generateArray:function(e){var t=this.generateList(e);return t.prepend(`[`),t.add(`]`),t}},e.default=a,t.exports=e.default})),
|
|
3309
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},lex:function(){var e=this.next();return e===void 0?this.lex():e},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)}};return e.options={},e.performAction=function(e,t,n,r){function i(e,n){return t.yytext=t.yytext.substring(e,t.yyleng-n+e)}switch(n){case 0:if(t.yytext.slice(-2)===`\\\\`?(i(0,1),this.begin(`mu`)):t.yytext.slice(-1)===`\\`?(i(0,1),this.begin(`emu`)):this.begin(`mu`),t.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin(`raw`),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]===`raw`?15:(i(5,9),`END_RAW_BLOCK`);case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin(`raw`),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(t.yytext),this.popState(),this.begin(`com`);break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return t.yytext=i(1,2).replace(/\\"/g,`"`),80;case 32:return t.yytext=i(1,2).replace(/\\'/g,`'`),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return t.yytext=t.yytext.replace(/\\([\\\]])/g,`$1`),72;case 43:return`INVALID`;case 44:return 5}},e.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],e.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},e})();function t(){this.yy={}}return t.prototype=e,e.Parser=t,new t})(),t.exports=e.default})),v9=s(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=n(d9());function i(){this.parents=[]}i.prototype={constructor:i,mutating:!1,acceptKey:function(e,t){var n=this.accept(e[t]);if(this.mutating){if(n&&!i.prototype[n.type])throw new r.default(`Unexpected node type "`+n.type+`" found when accepting `+t+` on `+e.type);e[t]=n}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new r.default(e.type+` requires `+t)},acceptArray:function(e){for(var t=0,n=e.length;t<n;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),t--,n--)},accept:function(e){if(e){if(!this[e.type])throw new r.default(`Unknown type: `+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var t=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||t)return t;if(t!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:a,Decorator:a,BlockStatement:o,DecoratorBlock:o,PartialStatement:s,PartialBlockStatement:function(e){s.call(this,e),this.acceptKey(e,`program`)},ContentStatement:function(){},CommentStatement:function(){},SubExpression:a,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(e){this.acceptArray(e.pairs)},HashPair:function(e){this.acceptRequired(e,`value`)}};function a(e){this.acceptRequired(e,`path`),this.acceptArray(e.params),this.acceptKey(e,`hash`)}function o(e){a.call(this,e),this.acceptKey(e,`program`),this.acceptKey(e,`inverse`)}function s(e){this.acceptRequired(e,`name`),this.acceptArray(e.params),this.acceptKey(e,`hash`)}e.default=i,t.exports=e.default})),$Ue=s(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=n(v9());function i(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}i.prototype=new r.default,i.prototype.Program=function(e){var t=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var r=e.body,i=0,l=r.length;i<l;i++){var u=r[i],d=this.accept(u);if(d){var f=a(r,i,n),p=o(r,i,n),m=d.openStandalone&&f,h=d.closeStandalone&&p,g=d.inlineStandalone&&f&&p;d.close&&s(r,i,!0),d.open&&c(r,i,!0),t&&g&&(s(r,i),c(r,i)&&u.type===`PartialStatement`&&(u.indent=/([ \t]+$)/.exec(r[i-1].original)[1])),t&&m&&(s((u.program||u.inverse).body),c(r,i)),t&&h&&(s(r,i),c((u.inverse||u.program).body))}}return e},i.prototype.BlockStatement=i.prototype.DecoratorBlock=i.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,n=e.program&&e.inverse,r=n,i=n;if(n&&n.chained)for(r=n.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var l={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:o(t.body),closeStandalone:a((r||t).body)};if(e.openStrip.close&&s(t.body,null,!0),n){var u=e.inverseStrip;u.open&&c(t.body,null,!0),u.close&&s(r.body,null,!0),e.closeStrip.open&&c(i.body,null,!0),!this.options.ignoreStandalone&&a(t.body)&&o(r.body)&&(c(t.body),s(r.body))}else e.closeStrip.open&&c(t.body,null,!0);return l},i.prototype.Decorator=i.prototype.MustacheStatement=function(e){return e.strip},i.prototype.PartialStatement=i.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function a(e,t,n){t===void 0&&(t=e.length);var r=e[t-1],i=e[t-2];if(!r)return n;if(r.type===`ContentStatement`)return(i||!n?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(r.original)}function o(e,t,n){t===void 0&&(t=-1);var r=e[t+1],i=e[t+2];if(!r)return n;if(r.type===`ContentStatement`)return(i||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original)}function s(e,t,n){var r=e[t==null?0:t+1];if(!(!r||r.type!==`ContentStatement`||!n&&r.rightStripped)){var i=r.value;r.value=r.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,``),r.rightStripped=r.value!==i}}function c(e,t,n){var r=e[t==null?e.length-1:t-1];if(!(!r||r.type!==`ContentStatement`||!n&&r.leftStripped)){var i=r.value;return r.value=r.value.replace(n?/\s+$/:/[ \t]+$/,``),r.leftStripped=r.value!==i,r.leftStripped}}e.default=i,t.exports=e.default})),eWe=s((e=>{e.__esModule=!0,e.SourceLocation=i,e.id=a,e.stripFlags=o,e.stripComment=s,e.preparePath=c,e.prepareMustache=l,e.prepareRawBlock=u,e.prepareBlock=d,e.prepareProgram=f,e.preparePartialBlock=p;function t(e){return e&&e.__esModule?e:{default:e}}var n=t(d9());function r(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var r={loc:e.path.loc};throw new n.default(e.path.original+` doesn't match `+t,r)}}function i(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}}function a(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}function o(e,t){return{open:e.charAt(2)===`~`,close:t.charAt(t.length-3)===`~`}}function s(e){return e.replace(/^\{\{~?!-?-?/,``).replace(/-?-?~?\}\}$/,``)}function c(e,t,r){r=this.locInfo(r);for(var i=e?`@`:``,a=[],o=0,s=0,c=t.length;s<c;s++){var l=t[s].part,u=t[s].original!==l;if(i+=(t[s].separator||``)+l,!u&&(l===`..`||l===`.`||l===`this`)){if(a.length>0)throw new n.default(`Invalid path: `+i,{loc:r});l===`..`&&o++}else a.push(l)}return{type:`PathExpression`,data:e,depth:o,parts:a,original:i,loc:r}}function l(e,t,n,r,i,a){var o=r.charAt(3)||r.charAt(2),s=o!==`{`&&o!==`&`;return{type:/\*/.test(r)?`Decorator`:`MustacheStatement`,path:e,params:t,hash:n,escaped:s,strip:i,loc:this.locInfo(a)}}function u(e,t,n,i){r(e,n),i=this.locInfo(i);var a={type:`Program`,body:t,strip:{},loc:i};return{type:`BlockStatement`,path:e.path,params:e.params,hash:e.hash,program:a,openStrip:{},inverseStrip:{},closeStrip:{},loc:i}}function d(e,t,i,a,o,s){a&&a.path&&r(e,a);var c=/\*/.test(e.open);t.blockParams=e.blockParams;var l=void 0,u=void 0;if(i){if(c)throw new n.default(`Unexpected inverse block on decorator`,i);i.chain&&(i.program.body[0].closeStrip=a.strip),u=i.strip,l=i.program}return o&&(o=l,l=t,t=o),{type:c?`DecoratorBlock`:`BlockStatement`,path:e.path,params:e.params,hash:e.hash,program:t,inverse:l,openStrip:e.strip,inverseStrip:u,closeStrip:a&&a.strip,loc:this.locInfo(s)}}function f(e,t){if(!t&&e.length){var n=e[0].loc,r=e[e.length-1].loc;n&&r&&(t={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:`Program`,body:e,strip:{},loc:t}}function p(e,t,n,i){return r(e,n),{type:`PartialBlockStatement`,name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:n&&n.strip,loc:this.locInfo(i)}}})),tWe=s((e=>{e.__esModule=!0,e.parseWithoutProcessing=c,e.parse=l;function t(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}var r=n(QUe()),i=n($Ue()),a=t(eWe()),o=u9();e.parser=r.default;var s={};o.extend(s,a);function c(e,t){return e.type===`Program`?e:(r.default.yy=s,s.locInfo=function(e){return new s.SourceLocation(t&&t.srcName,e)},r.default.parse(e))}function l(e,t){var n=c(e,t);return new i.default(t).accept(n)}})),nWe=s((e=>{e.__esModule=!0,e.Compiler=o,e.precompile=s,e.compile=c;function t(e){return e&&e.__esModule?e:{default:e}}var n=t(d9()),r=u9(),i=t(_9()),a=[].slice;function o(){}o.prototype={compiler:o,equals:function(e){var t=this.opcodes.length;if(e.opcodes.length!==t)return!1;for(var n=0;n<t;n++){var r=this.opcodes[n],i=e.opcodes[n];if(r.opcode!==i.opcode||!l(r.args,i.args))return!1}t=this.children.length;for(var n=0;n<t;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,t){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=t,this.stringParams=t.stringParams,this.trackIds=t.trackIds,t.blockParams=t.blockParams||[],t.knownHelpers=r.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},t.knownHelpers),this.accept(e)},compileProgram:function(e){var t=new this.compiler().compile(e,this.options),n=this.guid++;return this.usePartial=this.usePartial||t.usePartial,this.children[n]=t,this.useDepths=this.useDepths||t.useDepths,n},accept:function(e){if(!this[e.type])throw new n.default(`Unknown type: `+e.type,e);this.sourceNode.unshift(e);var t=this[e.type](e);return this.sourceNode.shift(),t},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var t=e.body,n=t.length,r=0;r<n;r++)this.accept(t[r]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){u(e);var t=e.program,n=e.inverse;t&&=this.compileProgram(t),n&&=this.compileProgram(n);var r=this.classifySexpr(e);r===`helper`?this.helperSexpr(e,t,n):r===`simple`?(this.simpleSexpr(e),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),this.opcode(`emptyHash`),this.opcode(`blockValue`,e.path.original)):(this.ambiguousSexpr(e,t,n),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),this.opcode(`emptyHash`),this.opcode(`ambiguousBlockValue`)),this.opcode(`append`)},DecoratorBlock:function(e){var t=e.program&&this.compileProgram(e.program),n=this.setupFullMustacheParams(e,t,void 0),r=e.path;this.useDecorators=!0,this.opcode(`registerDecorator`,n.length,r.original)},PartialStatement:function(e){this.usePartial=!0;var t=e.program;t&&=this.compileProgram(e.program);var r=e.params;if(r.length>1)throw new n.default(`Unsupported number of partial arguments: `+r.length,e);r.length||(this.options.explicitPartialContext?this.opcode(`pushLiteral`,`undefined`):r.push({type:`PathExpression`,parts:[],depth:0}));var i=e.name.original,a=e.name.type===`SubExpression`;a&&this.accept(e.name),this.setupFullMustacheParams(e,t,void 0,!0);var o=e.indent||``;this.options.preventIndent&&o&&(this.opcode(`appendContent`,o),o=``),this.opcode(`invokePartial`,a,i,o),this.opcode(`append`)},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode(`appendEscaped`):this.opcode(`append`)},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode(`appendContent`,e.value)},CommentStatement:function(){},SubExpression:function(e){u(e);var t=this.classifySexpr(e);t===`simple`?this.simpleSexpr(e):t===`helper`?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,t,n){var r=e.path,i=r.parts[0],a=t!=null||n!=null;this.opcode(`getContext`,r.depth),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),r.strict=!0,this.accept(r),this.opcode(`invokeAmbiguous`,i,a)},simpleSexpr:function(e){var t=e.path;t.strict=!0,this.accept(t),this.opcode(`resolvePossibleLambda`)},helperSexpr:function(e,t,r){var a=this.setupFullMustacheParams(e,t,r),o=e.path,s=o.parts[0];if(this.options.knownHelpers[s])this.opcode(`invokeKnownHelper`,a.length,s);else if(this.options.knownHelpersOnly)throw new n.default(`You specified knownHelpersOnly, but used the unknown helper `+s,e);else o.strict=!0,o.falsy=!0,this.accept(o),this.opcode(`invokeHelper`,a.length,o.original,i.default.helpers.simpleId(o))},PathExpression:function(e){this.addDepth(e.depth),this.opcode(`getContext`,e.depth);var t=e.parts[0],n=i.default.helpers.scopedId(e),r=!e.depth&&!n&&this.blockParamIndex(t);r?this.opcode(`lookupBlockParam`,r,e.parts):t?e.data?(this.options.data=!0,this.opcode(`lookupData`,e.depth,e.parts,e.strict)):this.opcode(`lookupOnContext`,e.parts,e.falsy,e.strict,n):this.opcode(`pushContext`)},StringLiteral:function(e){this.opcode(`pushString`,e.value)},NumberLiteral:function(e){this.opcode(`pushLiteral`,e.value)},BooleanLiteral:function(e){this.opcode(`pushLiteral`,e.value)},UndefinedLiteral:function(){this.opcode(`pushLiteral`,`undefined`)},NullLiteral:function(){this.opcode(`pushLiteral`,`null`)},Hash:function(e){var t=e.pairs,n=0,r=t.length;for(this.opcode(`pushHash`);n<r;n++)this.pushParam(t[n].value);for(;n--;)this.opcode(`assignToHash`,t[n].key);this.opcode(`popHash`)},opcode:function(e){this.opcodes.push({opcode:e,args:a.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var t=i.default.helpers.simpleId(e.path),n=t&&!!this.blockParamIndex(e.path.parts[0]),r=!n&&i.default.helpers.helperExpression(e),a=!n&&(r||t);if(a&&!r){var o=e.path.parts[0],s=this.options;s.knownHelpers[o]?r=!0:s.knownHelpersOnly&&(a=!1)}return r?`helper`:a?`ambiguous`:`simple`},pushParams:function(e){for(var t=0,n=e.length;t<n;t++)this.pushParam(e[t])},pushParam:function(e){var t=e.value==null?e.original||``:e.value;if(this.stringParams)t.replace&&(t=t.replace(/^(\.?\.\/)*/g,``).replace(/\//g,`.`)),e.depth&&this.addDepth(e.depth),this.opcode(`getContext`,e.depth||0),this.opcode(`pushStringParam`,t,e.type),e.type===`SubExpression`&&this.accept(e);else{if(this.trackIds){var n=void 0;if(e.parts&&!i.default.helpers.scopedId(e)&&!e.depth&&(n=this.blockParamIndex(e.parts[0])),n){var r=e.parts.slice(1).join(`.`);this.opcode(`pushId`,`BlockParam`,n,r)}else t=e.original||t,t.replace&&(t=t.replace(/^this(?:\.|$)/,``).replace(/^\.\//,``).replace(/^\.$/,``)),this.opcode(`pushId`,e.type,t)}this.accept(e)}},setupFullMustacheParams:function(e,t,n,r){var i=e.params;return this.pushParams(i),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),e.hash?this.accept(e.hash):this.opcode(`emptyHash`,r),i},blockParamIndex:function(e){for(var t=0,n=this.options.blockParams.length;t<n;t++){var i=this.options.blockParams[t],a=i&&r.indexOf(i,e);if(i&&a>=0)return[t,a]}}};function s(e,t,r){if(e==null||typeof e!=`string`&&e.type!==`Program`)throw new n.default(`You must pass a string or Handlebars AST to Handlebars.precompile. You passed `+e);t||={},`data`in t||(t.data=!0),t.compat&&(t.useDepths=!0);var i=r.parse(e,t),a=new r.Compiler().compile(i,t);return new r.JavaScriptCompiler().compile(a,t)}function c(e,t,i){if(t===void 0&&(t={}),e==null||typeof e!=`string`&&e.type!==`Program`)throw new n.default(`You must pass a string or Handlebars AST to Handlebars.compile. You passed `+e);t=r.extend({},t),`data`in t||(t.data=!0),t.compat&&(t.useDepths=!0);var a=void 0;function o(){var n=i.parse(e,t),r=new i.Compiler().compile(n,t),a=new i.JavaScriptCompiler().compile(r,t,void 0,!0);return i.template(a)}function s(e,t){return a||=o(),a.call(this,e,t)}return s._setup=function(e){return a||=o(),a._setup(e)},s._child=function(e,t,n,r){return a||=o(),a._child(e,t,n,r)},s}function l(e,t){if(e===t)return!0;if(r.isArray(e)&&r.isArray(t)&&e.length===t.length){for(var n=0;n<e.length;n++)if(!l(e[n],t[n]))return!1;return!0}}function u(e){if(!e.path.parts){var t=e.path;e.path={type:`PathExpression`,data:!1,depth:0,parts:[t.original+``],original:t.original+``,loc:t.loc}}}})),rWe=s((e=>{var t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``);e.encode=function(e){if(0<=e&&e<t.length)return t[e];throw TypeError(`Must be between 0 and 63: `+e)},e.decode=function(e){var t=65,n=90,r=97,i=122,a=48;return t<=e&&e<=n?e-t:r<=e&&e<=i?e-r+26:a<=e&&e<=57?e-a+52:e==43?62:e==47?63:-1}})),y9=s((e=>{var t=rWe(),n=5,r=1<<n,i=r-1,a=r;function o(e){return e<0?(-e<<1)+1:(e<<1)+0}function s(e){var t=(e&1)==1,n=e>>1;return t?-n:n}e.encode=function(e){var r=``,s,c=o(e);do s=c&i,c>>>=n,c>0&&(s|=a),r+=t.encode(s);while(c>0);return r},e.decode=function(e,r,o){var c=e.length,l=0,u=0,d,f;do{if(r>=c)throw Error(`Expected more digits in base 64 VLQ value.`);if(f=t.decode(e.charCodeAt(r++)),f===-1)throw Error(`Invalid base64 digit: `+e.charAt(r-1));d=!!(f&a),f&=i,l+=f<<u,u+=n}while(d);o.value=s(l),o.rest=r}})),b9=s((e=>{function t(e,t,n){if(t in e)return e[t];if(arguments.length===3)return n;throw Error(`"`+t+`" is a required argument.`)}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function i(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}e.urlParse=i;function a(e){var t=``;return e.scheme&&(t+=e.scheme+`:`),t+=`//`,e.auth&&(t+=e.auth+`@`),e.host&&(t+=e.host),e.port&&(t+=`:`+e.port),e.path&&(t+=e.path),t}e.urlGenerate=a;function o(t){var n=t,r=i(t);if(r){if(!r.path)return t;n=r.path}for(var o=e.isAbsolute(n),s=n.split(/\/+/),c,l=0,u=s.length-1;u>=0;u--)c=s[u],c===`.`?s.splice(u,1):c===`..`?l++:l>0&&(c===``?(s.splice(u+1,l),l=0):(s.splice(u,2),l--));return n=s.join(`/`),n===``&&(n=o?`/`:`.`),r?(r.path=n,a(r)):n}e.normalize=o;function s(e,t){e===``&&(e=`.`),t===``&&(t=`.`);var n=i(t),s=i(e);if(s&&(e=s.path||`/`),n&&!n.scheme)return s&&(n.scheme=s.scheme),a(n);if(n||t.match(r))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var c=t.charAt(0)===`/`?t:o(e.replace(/\/+$/,``)+`/`+t);return s?(s.path=c,a(s)):c}e.join=s,e.isAbsolute=function(e){return e.charAt(0)===`/`||n.test(e)};function c(e,t){e===``&&(e=`.`),e=e.replace(/\/$/,``);for(var n=0;t.indexOf(e+`/`)!==0;){var r=e.lastIndexOf(`/`);if(r<0||(e=e.slice(0,r),e.match(/^([^\/]+:\/)?\/*$/)))return t;++n}return Array(n+1).join(`../`)+t.substr(e.length+1)}e.relative=c;var l=function(){return!(`__proto__`in Object.create(null))}();function u(e){return e}function d(e){return p(e)?`$`+e:e}e.toSetString=l?u:d;function f(e){return p(e)?e.slice(1):e}e.fromSetString=l?u:f;function p(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var n=t-10;n>=0;n--)if(e.charCodeAt(n)!==36)return!1;return!0}function m(e,t,n){var r=g(e.source,t.source);return r!==0||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0||n)||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=e.generatedLine-t.generatedLine,r!==0)?r:g(e.name,t.name)}e.compareByOriginalPositions=m;function h(e,t,n){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0||n)||(r=g(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:g(e.name,t.name)}e.compareByGeneratedPositionsDeflated=h;function g(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function _(e,t){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=g(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:g(e.name,t.name)}e.compareByGeneratedPositionsInflated=_;function v(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,``))}e.parseSourceMapInput=v;function y(e,t,n){if(t||=``,e&&(e[e.length-1]!==`/`&&t[0]!==`/`&&(e+=`/`),t=e+t),n){var r=i(n);if(!r)throw Error(`sourceMapURL could not be parsed`);if(r.path){var c=r.path.lastIndexOf(`/`);c>=0&&(r.path=r.path.substring(0,c+1))}t=s(a(r),t)}return o(t)}e.computeSourceURL=y})),x9=s((e=>{var t=b9(),n=Object.prototype.hasOwnProperty,r=typeof Map<`u`;function i(){this._array=[],this._set=r?new Map:Object.create(null)}i.fromArray=function(e,t){for(var n=new i,r=0,a=e.length;r<a;r++)n.add(e[r],t);return n},i.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},i.prototype.add=function(e,i){var a=r?e:t.toSetString(e),o=r?this.has(e):n.call(this._set,a),s=this._array.length;(!o||i)&&this._array.push(e),o||(r?this._set.set(e,s):this._set[a]=s)},i.prototype.has=function(e){if(r)return this._set.has(e);var i=t.toSetString(e);return n.call(this._set,i)},i.prototype.indexOf=function(e){if(r){var i=this._set.get(e);if(i>=0)return i}else{var a=t.toSetString(e);if(n.call(this._set,a))return this._set[a]}throw Error(`"`+e+`" is not in the set.`)},i.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw Error(`No element indexed by `+e)},i.prototype.toArray=function(){return this._array.slice()},e.ArraySet=i})),iWe=s((e=>{var t=b9();function n(e,n){var r=e.generatedLine,i=n.generatedLine,a=e.generatedColumn,o=n.generatedColumn;return i>r||i==r&&o>=a||t.compareByGeneratedPositionsInflated(e,n)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},r.prototype.add=function(e){n(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},r.prototype.toArray=function(){return this._sorted||=(this._array.sort(t.compareByGeneratedPositionsInflated),!0),this._array},e.MappingList=r})),S9=s((e=>{var t=y9(),n=b9(),r=x9().ArraySet,i=iWe().MappingList;function a(e){e||={},this._file=n.getArg(e,`file`,null),this._sourceRoot=n.getArg(e,`sourceRoot`,null),this._skipValidation=n.getArg(e,`skipValidation`,!1),this._sources=new r,this._names=new r,this._mappings=new i,this._sourcesContents=null}a.prototype._version=3,a.fromSourceMap=function(e){var t=e.sourceRoot,r=new a({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var i={generated:{line:e.generatedLine,column:e.generatedColumn}};e.source!=null&&(i.source=e.source,t!=null&&(i.source=n.relative(t,i.source)),i.original={line:e.originalLine,column:e.originalColumn},e.name!=null&&(i.name=e.name)),r.addMapping(i)}),e.sources.forEach(function(i){var a=i;t!==null&&(a=n.relative(t,i)),r._sources.has(a)||r._sources.add(a);var o=e.sourceContentFor(i);o!=null&&r.setSourceContent(i,o)}),r},a.prototype.addMapping=function(e){var t=n.getArg(e,`generated`),r=n.getArg(e,`original`,null),i=n.getArg(e,`source`,null),a=n.getArg(e,`name`,null);this._skipValidation||this._validateMapping(t,r,i,a),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),a!=null&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:a})},a.prototype.setSourceContent=function(e,t){var r=e;this._sourceRoot!=null&&(r=n.relative(this._sourceRoot,r)),t==null?this._sourcesContents&&(delete this._sourcesContents[n.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null)):(this._sourcesContents||=Object.create(null),this._sourcesContents[n.toSetString(r)]=t)},a.prototype.applySourceMap=function(e,t,i){var a=t;if(t==null){if(e.file==null)throw Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);a=e.file}var o=this._sourceRoot;o!=null&&(a=n.relative(o,a));var s=new r,c=new r;this._mappings.unsortedForEach(function(t){if(t.source===a&&t.originalLine!=null){var r=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});r.source!=null&&(t.source=r.source,i!=null&&(t.source=n.join(i,t.source)),o!=null&&(t.source=n.relative(o,t.source)),t.originalLine=r.line,t.originalColumn=r.column,r.name!=null&&(t.name=r.name))}var l=t.source;l!=null&&!s.has(l)&&s.add(l);var u=t.name;u!=null&&!c.has(u)&&c.add(u)},this),this._sources=s,this._names=c,e.sources.forEach(function(t){var r=e.sourceContentFor(t);r!=null&&(i!=null&&(t=n.join(i,t)),o!=null&&(t=n.relative(o,t)),this.setSourceContent(t,r))},this)},a.prototype._validateMapping=function(e,t,n,r){if(t&&typeof t.line!=`number`&&typeof t.column!=`number`)throw Error(`original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.`);if(!(e&&`line`in e&&`column`in e&&e.line>0&&e.column>=0&&!t&&!n&&!r)&&!(e&&`line`in e&&`column`in e&&t&&`line`in t&&`column`in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw Error(`Invalid mapping: `+JSON.stringify({generated:e,source:n,original:t,name:r}))},a.prototype._serializeMappings=function(){for(var e=0,r=1,i=0,a=0,o=0,s=0,c=``,l,u,d,f,p=this._mappings.toArray(),m=0,h=p.length;m<h;m++){if(u=p[m],l=``,u.generatedLine!==r)for(e=0;u.generatedLine!==r;)l+=`;`,r++;else if(m>0){if(!n.compareByGeneratedPositionsInflated(u,p[m-1]))continue;l+=`,`}l+=t.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(f=this._sources.indexOf(u.source),l+=t.encode(f-s),s=f,l+=t.encode(u.originalLine-1-a),a=u.originalLine-1,l+=t.encode(u.originalColumn-i),i=u.originalColumn,u.name!=null&&(d=this._names.indexOf(u.name),l+=t.encode(d-o),o=d)),c+=l}return c},a.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;t!=null&&(e=n.relative(t,e));var r=n.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},a.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},a.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=a})),aWe=s((e=>{e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(n,r,i,a,o,s){var c=Math.floor((r-n)/2)+n,l=o(i,a[c],!0);return l===0?c:l>0?r-c>1?t(c,r,i,a,o,s):s==e.LEAST_UPPER_BOUND?r<a.length?r:-1:c:c-n>1?t(n,c,i,a,o,s):s==e.LEAST_UPPER_BOUND?c:n<0?-1:n}e.search=function(n,r,i,a){if(r.length===0)return-1;var o=t(-1,r.length,n,r,i,a||e.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&i(r[o],r[o-1],!0)===0;)--o;return o}})),oWe=s((e=>{function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return Math.round(e+Math.random()*(t-e))}function r(e,i,a,o){if(a<o){var s=n(a,o),c=a-1;t(e,s,o);for(var l=e[o],u=a;u<o;u++)i(e[u],l)<=0&&(c+=1,t(e,c,u));t(e,c+1,u);var d=c+1;r(e,i,a,d-1),r(e,i,d+1,o)}}e.quickSort=function(e,t){r(e,t,0,e.length-1)}})),sWe=s((e=>{var t=b9(),n=aWe(),r=x9().ArraySet,i=y9(),a=oWe().quickSort;function o(e,n){var r=e;return typeof e==`string`&&(r=t.parseSourceMapInput(e)),r.sections==null?new s(r,n):new l(r,n)}o.fromSourceMap=function(e,t){return s.fromSourceMap(e,t)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,`_generatedMappings`,{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,`_originalMappings`,{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return n===`;`||n===`,`},o.prototype._parseMappings=function(e,t){throw Error(`Subclasses must implement _parseMappings`)},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(e,n,r){var i=n||null,a=r||o.GENERATED_ORDER,s;switch(a){case o.GENERATED_ORDER:s=this._generatedMappings;break;case o.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw Error(`Unknown order of iteration.`)}var c=this.sourceRoot;s.map(function(e){var n=e.source===null?null:this._sources.at(e.source);return n=t.computeSourceURL(c,n,this._sourceMapURL),{source:n,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}},this).forEach(e,i)},o.prototype.allGeneratedPositionsFor=function(e){var r=t.getArg(e,`line`),i={source:t.getArg(e,`source`),originalLine:r,originalColumn:t.getArg(e,`column`,0)};if(i.source=this._findSourceIndex(i.source),i.source<0)return[];var a=[],o=this._findMapping(i,this._originalMappings,`originalLine`,`originalColumn`,t.compareByOriginalPositions,n.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(e.column===void 0)for(var c=s.originalLine;s&&s.originalLine===c;)a.push({line:t.getArg(s,`generatedLine`,null),column:t.getArg(s,`generatedColumn`,null),lastColumn:t.getArg(s,`lastGeneratedColumn`,null)}),s=this._originalMappings[++o];else for(var l=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==l;)a.push({line:t.getArg(s,`generatedLine`,null),column:t.getArg(s,`generatedColumn`,null),lastColumn:t.getArg(s,`lastGeneratedColumn`,null)}),s=this._originalMappings[++o]}return a},e.SourceMapConsumer=o;function s(e,n){var i=e;typeof e==`string`&&(i=t.parseSourceMapInput(e));var a=t.getArg(i,`version`),o=t.getArg(i,`sources`),s=t.getArg(i,`names`,[]),c=t.getArg(i,`sourceRoot`,null),l=t.getArg(i,`sourcesContent`,null),u=t.getArg(i,`mappings`),d=t.getArg(i,`file`,null);if(a!=this._version)throw Error(`Unsupported version: `+a);c&&=t.normalize(c),o=o.map(String).map(t.normalize).map(function(e){return c&&t.isAbsolute(c)&&t.isAbsolute(e)?t.relative(c,e):e}),this._names=r.fromArray(s.map(String),!0),this._sources=r.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(e){return t.computeSourceURL(c,e,n)}),this.sourceRoot=c,this.sourcesContent=l,this._mappings=u,this._sourceMapURL=n,this.file=d}s.prototype=Object.create(o.prototype),s.prototype.consumer=o,s.prototype._findSourceIndex=function(e){var n=e;if(this.sourceRoot!=null&&(n=t.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1},s.fromSourceMap=function(e,n){var i=Object.create(s.prototype),o=i._names=r.fromArray(e._names.toArray(),!0),l=i._sources=r.fromArray(e._sources.toArray(),!0);i.sourceRoot=e._sourceRoot,i.sourcesContent=e._generateSourcesContent(i._sources.toArray(),i.sourceRoot),i.file=e._file,i._sourceMapURL=n,i._absoluteSources=i._sources.toArray().map(function(e){return t.computeSourceURL(i.sourceRoot,e,n)});for(var u=e._mappings.toArray().slice(),d=i.__generatedMappings=[],f=i.__originalMappings=[],p=0,m=u.length;p<m;p++){var h=u[p],g=new c;g.generatedLine=h.generatedLine,g.generatedColumn=h.generatedColumn,h.source&&(g.source=l.indexOf(h.source),g.originalLine=h.originalLine,g.originalColumn=h.originalColumn,h.name&&(g.name=o.indexOf(h.name)),f.push(g)),d.push(g)}return a(i.__originalMappings,t.compareByOriginalPositions),i},s.prototype._version=3,Object.defineProperty(s.prototype,`sources`,{get:function(){return this._absoluteSources.slice()}});function c(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}s.prototype._parseMappings=function(e,n){for(var r=1,o=0,s=0,l=0,u=0,d=0,f=e.length,p=0,m={},h={},g=[],_=[],v,y,b,x,S;p<f;)if(e.charAt(p)===`;`)r++,p++,o=0;else if(e.charAt(p)===`,`)p++;else{for(v=new c,v.generatedLine=r,x=p;x<f&&!this._charIsMappingSeparator(e,x);x++);if(y=e.slice(p,x),b=m[y],b)p+=y.length;else{for(b=[];p<x;)i.decode(e,p,h),S=h.value,p=h.rest,b.push(S);if(b.length===2)throw Error(`Found a source, but no line and column`);if(b.length===3)throw Error(`Found a source and line, but no column`);m[y]=b}v.generatedColumn=o+b[0],o=v.generatedColumn,b.length>1&&(v.source=u+b[1],u+=b[1],v.originalLine=s+b[2],s=v.originalLine,v.originalLine+=1,v.originalColumn=l+b[3],l=v.originalColumn,b.length>4&&(v.name=d+b[4],d+=b[4])),_.push(v),typeof v.originalLine==`number`&&g.push(v)}a(_,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=_,a(g,t.compareByOriginalPositions),this.__originalMappings=g},s.prototype._findMapping=function(e,t,r,i,a,o){if(e[r]<=0)throw TypeError(`Line must be greater than or equal to 1, got `+e[r]);if(e[i]<0)throw TypeError(`Column must be greater than or equal to 0, got `+e[i]);return n.search(e,t,a,o)},s.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},s.prototype.originalPositionFor=function(e){var n={generatedLine:t.getArg(e,`line`),generatedColumn:t.getArg(e,`column`)},r=this._findMapping(n,this._generatedMappings,`generatedLine`,`generatedColumn`,t.compareByGeneratedPositionsDeflated,t.getArg(e,`bias`,o.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===n.generatedLine){var a=t.getArg(i,`source`,null);a!==null&&(a=this._sources.at(a),a=t.computeSourceURL(this.sourceRoot,a,this._sourceMapURL));var s=t.getArg(i,`name`,null);return s!==null&&(s=this._names.at(s)),{source:a,line:t.getArg(i,`originalLine`,null),column:t.getArg(i,`originalColumn`,null),name:s}}}return{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1},s.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var i=e;this.sourceRoot!=null&&(i=t.relative(this.sourceRoot,i));var a;if(this.sourceRoot!=null&&(a=t.urlParse(this.sourceRoot))){var o=i.replace(/^file:\/\//,``);if(a.scheme==`file`&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!a.path||a.path==`/`)&&this._sources.has(`/`+i))return this.sourcesContent[this._sources.indexOf(`/`+i)]}if(n)return null;throw Error(`"`+i+`" is not in the SourceMap.`)},s.prototype.generatedPositionFor=function(e){var n=t.getArg(e,`source`);if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:t.getArg(e,`line`),originalColumn:t.getArg(e,`column`)},i=this._findMapping(r,this._originalMappings,`originalLine`,`originalColumn`,t.compareByOriginalPositions,t.getArg(e,`bias`,o.GREATEST_LOWER_BOUND));if(i>=0){var a=this._originalMappings[i];if(a.source===r.source)return{line:t.getArg(a,`generatedLine`,null),column:t.getArg(a,`generatedColumn`,null),lastColumn:t.getArg(a,`lastGeneratedColumn`,null)}}return{line:null,column:null,lastColumn:null}},e.BasicSourceMapConsumer=s;function l(e,n){var i=e;typeof e==`string`&&(i=t.parseSourceMapInput(e));var a=t.getArg(i,`version`),s=t.getArg(i,`sections`);if(a!=this._version)throw Error(`Unsupported version: `+a);this._sources=new r,this._names=new r;var c={line:-1,column:0};this._sections=s.map(function(e){if(e.url)throw Error(`Support for url field in sections not implemented.`);var r=t.getArg(e,`offset`),i=t.getArg(r,`line`),a=t.getArg(r,`column`);if(i<c.line||i===c.line&&a<c.column)throw Error(`Section offsets must be ordered and non-overlapping.`);return c=r,{generatedOffset:{generatedLine:i+1,generatedColumn:a+1},consumer:new o(t.getArg(e,`map`),n)}})}l.prototype=Object.create(o.prototype),l.prototype.constructor=o,l.prototype._version=3,Object.defineProperty(l.prototype,`sources`,{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),l.prototype.originalPositionFor=function(e){var r={generatedLine:t.getArg(e,`line`),generatedColumn:t.getArg(e,`column`)},i=n.search(r,this._sections,function(e,t){return e.generatedLine-t.generatedOffset.generatedLine||e.generatedColumn-t.generatedOffset.generatedColumn}),a=this._sections[i];return a?a.consumer.originalPositionFor({line:r.generatedLine-(a.generatedOffset.generatedLine-1),column:r.generatedColumn-(a.generatedOffset.generatedLine===r.generatedLine?a.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},l.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n].consumer.sourceContentFor(e,!0);if(r)return r}if(t)return null;throw Error(`"`+e+`" is not in the SourceMap.`)},l.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(r.consumer._findSourceIndex(t.getArg(e,`source`))!==-1){var i=r.consumer.generatedPositionFor(e);if(i)return{line:i.line+(r.generatedOffset.generatedLine-1),column:i.column+(r.generatedOffset.generatedLine===i.line?r.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},l.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var c=o[s],l=i.consumer._sources.at(c.source);l=t.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var u=null;c.name&&(u=i.consumer._names.at(c.name),this._names.add(u),u=this._names.indexOf(u));var d={source:l,generatedLine:c.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:c.generatedColumn+(i.generatedOffset.generatedLine===c.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:c.originalLine,originalColumn:c.originalColumn,name:u};this.__generatedMappings.push(d),typeof d.originalLine==`number`&&this.__originalMappings.push(d)}a(this.__generatedMappings,t.compareByGeneratedPositionsDeflated),a(this.__originalMappings,t.compareByOriginalPositions)},e.IndexedSourceMapConsumer=l})),cWe=s((e=>{var t=S9().SourceMapGenerator,n=b9(),r=/(\r?\n)/,i=10,a=`$$$isSourceNode$$$`;function o(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=n??null,this.name=i??null,this[a]=!0,r!=null&&this.add(r)}o.fromStringWithSourceMap=function(e,t,i){var a=new o,s=e.split(r),c=0,l=function(){return e()+(e()||``);function e(){return c<s.length?s[c++]:void 0}},u=1,d=0,f=null;return t.eachMapping(function(e){if(f!==null)if(u<e.generatedLine)p(f,l()),u++,d=0;else{var t=s[c]||``,n=t.substr(0,e.generatedColumn-d);s[c]=t.substr(e.generatedColumn-d),d=e.generatedColumn,p(f,n),f=e;return}for(;u<e.generatedLine;)a.add(l()),u++;if(d<e.generatedColumn){var t=s[c]||``;a.add(t.substr(0,e.generatedColumn)),s[c]=t.substr(e.generatedColumn),d=e.generatedColumn}f=e},this),c<s.length&&(f&&p(f,l()),a.add(s.splice(c).join(``))),t.sources.forEach(function(e){var r=t.sourceContentFor(e);r!=null&&(i!=null&&(e=n.join(i,e)),a.setSourceContent(e,r))}),a;function p(e,t){if(e===null||e.source===void 0)a.add(t);else{var r=i?n.join(i,e.source):e.source;a.add(new o(e.originalLine,e.originalColumn,r,t,e.name))}}},o.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else if(e[a]||typeof e==`string`)e&&this.children.push(e);else throw TypeError(`Expected a SourceNode, string, or an array of SourceNodes and strings. Got `+e);return this},o.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else if(e[a]||typeof e==`string`)this.children.unshift(e);else throw TypeError(`Expected a SourceNode, string, or an array of SourceNodes and strings. Got `+e);return this},o.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)t=this.children[n],t[a]?t.walk(e):t!==``&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},o.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},o.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[a]?n.replaceRight(e,t):typeof n==`string`?this.children[this.children.length-1]=n.replace(e,t):this.children.push(``.replace(e,t)),this},o.prototype.setSourceContent=function(e,t){this.sourceContents[n.toSetString(e)]=t},o.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][a]&&this.children[t].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),t=0,r=i.length;t<r;t++)e(n.fromSetString(i[t]),this.sourceContents[i[t]])},o.prototype.toString=function(){var e=``;return this.walk(function(t){e+=t}),e},o.prototype.toStringWithSourceMap=function(e){var n={code:``,line:1,column:0},r=new t(e),a=!1,o=null,s=null,c=null,l=null;return this.walk(function(e,t){n.code+=e,t.source!==null&&t.line!==null&&t.column!==null?((o!==t.source||s!==t.line||c!==t.column||l!==t.name)&&r.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name}),o=t.source,s=t.line,c=t.column,l=t.name,a=!0):a&&=(r.addMapping({generated:{line:n.line,column:n.column}}),o=null,!1);for(var u=0,d=e.length;u<d;u++)e.charCodeAt(u)===i?(n.line++,n.column=0,u+1===d?(o=null,a=!1):a&&r.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name})):n.column++}),this.walkSourceContents(function(e,t){r.setSourceContent(e,t)}),{code:n.code,map:r}},e.SourceNode=o})),lWe=s((e=>{e.SourceMapGenerator=S9().SourceMapGenerator,e.SourceMapConsumer=sWe().SourceMapConsumer,e.SourceNode=cWe().SourceNode})),uWe=s(((e,t)=>{e.__esModule=!0;var n=u9(),r=void 0;try{(typeof define!=`function`||!define.amd)&&(r=lWe().SourceNode)}catch{}r||(r=function(e,t,n,r){this.src=``,r&&this.add(r)},r.prototype={add:function(e){n.isArray(e)&&(e=e.join(``)),this.src+=e},prepend:function(e){n.isArray(e)&&(e=e.join(``)),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function i(e,t,r){if(n.isArray(e)){for(var i=[],a=0,o=e.length;a<o;a++)i.push(t.wrap(e[a],r));return i}else if(typeof e==`boolean`||typeof e==`number`)return e+``;return e}function a(e){this.srcFile=e,this.source=[]}a.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,t){this.source.unshift(this.wrap(e,t))},push:function(e,t){this.source.push(this.wrap(e,t))},merge:function(){var e=this.empty();return this.each(function(t){e.add([` `,t,`
|
|
3310
|
+
`])}),e},each:function(e){for(var t=0,n=this.source.length;t<n;t++)e(this.source[t])},empty:function(){var e=this.currentLocation||{start:{}};return new r(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var t=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof r?e:(e=i(e,this,t),new r(t.start.line,t.start.column,this.srcFile,e))},functionCall:function(e,t,n){return n=this.generateList(n),this.wrap([e,t?`.`+t+`(`:`(`,n,`)`])},quotedString:function(e){return`"`+(e+``).replace(/\\/g,`\\\\`).replace(/"/g,`\\"`).replace(/\n/g,`\\n`).replace(/\r/g,`\\r`).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)+`"`},objectLiteral:function(e){var t=this,n=[];Object.keys(e).forEach(function(r){var a=i(e[r],t);a!==`undefined`&&n.push([t.quotedString(r),`:`,a])});var r=this.generateList(n);return r.prepend(`{`),r.add(`}`),r},generateList:function(e){for(var t=this.empty(),n=0,r=e.length;n<r;n++)n&&t.add(`,`),t.add(i(e[n],this));return t},generateArray:function(e){var t=this.generateList(e);return t.prepend(`[`),t.add(`]`),t}},e.default=a,t.exports=e.default})),dWe=s(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=h9(),i=n(d9()),a=u9(),o=n(uWe());function s(e){this.value=e}function c(){}c.prototype={nameLookup:function(e,t){return this.internalNameLookup(e,t)},depthedLookup:function(e){return[this.aliasable(`container.lookup`),`(depths, `,JSON.stringify(e),`)`]},compilerInfo:function(){var e=r.COMPILER_REVISION;return[e,r.REVISION_CHANGES[e]]},appendToBuffer:function(e,t,n){return a.isArray(e)||(e=[e]),e=this.source.wrap(e,t),this.environment.isSimple?[`return `,e,`;`]:n?[`buffer += `,e,`;`]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString(``)},internalNameLookup:function(e,t){return this.lookupPropertyFunctionIsUsed=!0,[`lookupProperty(`,e,`,`,JSON.stringify(t),`)`]},lookupPropertyFunctionIsUsed:!1,compile:function(e,t,n,r){this.environment=e,this.options=t,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!r,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,t),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var a=e.opcodes,o=void 0,s=void 0,c=void 0,l=void 0;for(c=0,l=a.length;c<l;c++)o=a[c],this.source.currentLocation=o.loc,s||=o.loc,this[o.opcode].apply(this,o.args);if(this.source.currentLocation=s,this.pushSource(``),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new i.default(`Compile completed with content left on stack`);this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend([`var decorators = container.decorators, `,this.lookupPropertyFunctionVarDeclaration(),`;
|
|
3311
3311
|
`]),this.decorators.push(`return fn;`),r?this.decorators=Function.apply(this,[`fn`,`props`,`container`,`depth0`,`data`,`blockParams`,`depths`,this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
|
|
3312
3312
|
`),this.decorators.push(`}
|
|
3313
3313
|
`),this.decorators=this.decorators.merge()));var u=this.createFunctionContext(r);if(this.isChild)return u;var d={compiler:this.compilerInfo(),main:u};this.decorators&&(d.main_d=this.decorators,d.useDecorators=!0);var f=this.context,p=f.programs,m=f.decorators;for(c=0,l=p.length;c<l;c++)p[c]&&(d[c]=p[c],m[c]&&(d[c+`_d`]=m[c],d.useDecorators=!0));return this.environment.usePartial&&(d.usePartial=!0),this.options.data&&(d.useData=!0),this.useDepths&&(d.useDepths=!0),this.useBlockParams&&(d.useBlockParams=!0),this.options.compat&&(d.compat=!0),r?d.compilerOptions=this.options:(d.compiler=JSON.stringify(d.compiler),this.source.currentLocation={start:{line:1,column:0}},d=this.objectLiteral(d),t.srcName?(d=d.toStringWithSourceMap({file:t.destName}),d.map=d.map&&d.map.toString()):d=d.toString()),d},preamble:function(){this.lastContext=0,this.source=new o.default(this.options.srcName),this.decorators=new o.default(this.options.srcName)},createFunctionContext:function(e){var t=this,n=``,r=this.stackVars.concat(this.registers.list);r.length>0&&(n+=`, `+r.join(`, `));var i=0;Object.keys(this.aliases).forEach(function(e){var r=t.aliases[e];r.children&&r.referenceCount>1&&(n+=`, alias`+ ++i+`=`+e,r.children[0]=`alias`+i)}),this.lookupPropertyFunctionIsUsed&&(n+=`, `+this.lookupPropertyFunctionVarDeclaration());var a=[`container`,`depth0`,`helpers`,`partials`,`data`];(this.useBlockParams||this.useDepths)&&a.push(`blockParams`),this.useDepths&&a.push(`depths`);var o=this.mergeSource(n);return e?(a.push(o),Function.apply(this,a)):this.source.wrap([`function(`,a.join(`,`),`) {
|
|
@@ -3317,7 +3317,7 @@ Expecting `+S.join(`, `)+`, got '`+(this.terminals_[p]||p)+`'`:`Parse error on l
|
|
|
3317
3317
|
return parent[propertyName];
|
|
3318
3318
|
}
|
|
3319
3319
|
return undefined
|
|
3320
|
-
}`},blockValue:function(e){var t=this.aliasable(`container.hooks.blockHelperMissing`),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var r=this.popStack();n.splice(1,0,r),this.push(this.source.functionCall(t,`call`,n))},ambiguousBlockValue:function(){var e=this.aliasable(`container.hooks.blockHelperMissing`),t=[this.contextName(0)];this.setupHelperArgs(``,0,t,!0),this.flushInline();var n=this.topStack();t.splice(1,0,n),this.pushSource([`if (!`,this.lastHelper,`) { `,n,` = `,this.source.functionCall(e,`call`,t),`}`])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(e){return[` != null ? `,e,` : ""`]}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource([`if (`,e,` != null) { `,this.appendToBuffer(e,void 0,!0),` }`]),this.environment.isSimple&&this.pushSource([`else { `,this.appendToBuffer(`''`,void 0,!0),` }`])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable(`container.escapeExpression`),`(`,this.popStack(),`)`]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,t,n,r){var i=0;!r&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[i++])):this.pushContext(),this.resolvePath(`context`,e,i,t,n)},lookupBlockParam:function(e,t){this.useBlockParams=!0,this.push([`blockParams[`,e[0],`][`,e[1],`]`]),this.resolvePath(`context`,t,1)},lookupData:function(e,t,n){e?this.pushStackLiteral(`container.data(data, `+e+`)`):this.pushStackLiteral(`data`),this.resolvePath(`data`,t,0,!0,n)},resolvePath:function(e,t,n,r,i){var a=this;if(this.options.strict||this.options.assumeObjects){this.push(l(this.options.strict&&i,this,t,n,e));return}for(var o=t.length;n<o;n++)this.replaceStack(function(i){var o=a.nameLookup(i,t[n],e);return r?[` && `,o]:[` != null ? `,o,` : `,i]})},resolvePossibleLambda:function(){this.push([this.aliasable(`container.lambda`),`(`,this.popStack(),`, `,this.contextName(0),`)`])},pushStringParam:function(e,t){this.pushContext(),this.pushString(t),t!==`SubExpression`&&(typeof e==`string`?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push(`{}`),this.stringParams&&(this.push(`{}`),this.push(`{}`)),this.pushStackLiteral(e?`undefined`:`{}`)},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e==null?this.pushStackLiteral(null):this.pushStackLiteral(this.programExpression(e))},registerDecorator:function(e,t){var n=this.nameLookup(`decorators`,t,`decorator`),r=this.setupHelperArgs(t,e);this.decorators.push([`fn = `,this.decorators.functionCall(n,``,[`fn`,`props`,`container`,r]),` || fn;`])},invokeHelper:function(e,t,n){var r=this.popStack(),i=this.setupHelper(e,t),a=[];n&&a.push(i.name),a.push(r),this.options.strict||a.push(this.aliasable(`container.hooks.helperMissing`));var o=[`(`,this.itemsSeparatedBy(a,`||`),`)`],s=this.source.functionCall(o,`call`,i.callParams);this.push(s)},itemsSeparatedBy:function(e,t){var n=[];n.push(e[0]);for(var r=1;r<e.length;r++)n.push(t,e[r]);return n},invokeKnownHelper:function(e,t){var n=this.setupHelper(e,t);this.push(this.source.functionCall(n.name,`call`,n.callParams))},invokeAmbiguous:function(e,t){this.useRegister(`helper`);var n=this.popStack();this.emptyHash();var r=this.setupHelper(0,e,t),i=[`(`,`(helper = `,this.lastHelper=this.nameLookup(`helpers`,e,`helper`),` || `,n,`)`];this.options.strict||(i[0]=`(helper = `,i.push(` != null ? helper : `,this.aliasable(`container.hooks.helperMissing`))),this.push([`(`,i,r.paramsInit?[`),(`,r.paramsInit]:[],`),`,`(typeof helper === `,this.aliasable(`"function"`),` ? `,this.source.functionCall(`helper`,`call`,r.callParams),` : helper))`])},invokePartial:function(e,t,n){var r=[],i=this.setupParams(t,1,r);e&&(t=this.popStack(),delete i.name),n&&(i.indent=JSON.stringify(n)),i.helpers=`helpers`,i.partials=`partials`,i.decorators=`container.decorators`,e?r.unshift(t):r.unshift(this.nameLookup(`partials`,t,`partial`)),this.options.compat&&(i.depths=`depths`),i=this.objectLiteral(i),r.push(i),this.push(this.source.functionCall(`container.invokePartial`,``,r))},assignToHash:function(e){var t=this.popStack(),n=void 0,r=void 0,i=void 0;this.trackIds&&(i=this.popStack()),this.stringParams&&(r=this.popStack(),n=this.popStack());var a=this.hash;n&&(a.contexts[e]=n),r&&(a.types[e]=r),i&&(a.ids[e]=i),a.values[e]=t},pushId:function(e,t,n){e===`BlockParam`?this.pushStackLiteral(`blockParams[`+t[0]+`].path[`+t[1]+`]`+(n?` + `+JSON.stringify(`.`+n):``)):e===`PathExpression`?this.pushString(t):e===`SubExpression`?this.pushStackLiteral(`true`):this.pushStackLiteral(`null`)},compiler:c,compileChildren:function(e,t){for(var n=e.children,r=void 0,i=void 0,a=0,o=n.length;a<o;a++){r=n[a],i=new this.compiler;var s=this.matchExistingProgram(r);if(s==null){this.context.programs.push(``);var c=this.context.programs.length;r.index=c,r.name=`program`+c,this.context.programs[c]=i.compile(r,t,this.context,!this.precompile),this.context.decorators[c]=i.decorators,this.context.environments[c]=r,this.useDepths=this.useDepths||i.useDepths,this.useBlockParams=this.useBlockParams||i.useBlockParams,r.useDepths=this.useDepths,r.useBlockParams=this.useBlockParams}else r.index=s.index,r.name=`program`+s.index,this.useDepths=this.useDepths||s.useDepths,this.useBlockParams=this.useBlockParams||s.useBlockParams}},matchExistingProgram:function(e){for(var t=0,n=this.context.environments.length;t<n;t++){var r=this.context.environments[t];if(r&&r.equals(e))return r}},programExpression:function(e){var t=this.environment.children[e],n=[t.index,`data`,t.blockParams];return(this.useBlockParams||this.useDepths)&&n.push(`blockParams`),this.useDepths&&n.push(`depths`),`container.program(`+n.join(`, `)+`)`},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof s||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new s(e))},pushSource:function(e){this.pendingContent&&=(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),void 0),e&&this.source.push(e)},replaceStack:function(e){var t=[`(`],n=void 0,r=void 0,a=void 0;if(!this.isInline())throw new i.default(`replaceStack on non-inline`);var o=this.popStack(!0);if(o instanceof s)n=[o.value],t=[`(`,n],a=!0;else{r=!0;var c=this.incrStack();t=[`((`,this.push(c),` = `,o,`)`],n=this.topStack()}var l=e.call(this,n);a||this.popStack(),r&&this.stackSlot--,this.push(t.concat(l,`)`))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push(`stack`+this.stackSlot),this.topStackName()},topStackName:function(){return`stack`+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var t=0,n=e.length;t<n;t++){var r=e[t];if(r instanceof s)this.compileStack.push(r);else{var i=this.incrStack();this.pushSource([i,` = `,r,`;`]),this.compileStack.push(i)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var t=this.isInline(),n=(t?this.inlineStack:this.compileStack).pop();if(!e&&n instanceof s)return n.value;if(!t){if(!this.stackSlot)throw new i.default(`Invalid stack pop`);this.stackSlot--}return n},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,t=e[e.length-1];return t instanceof s?t.value:t},contextName:function(e){return this.useDepths&&e?`depths[`+e+`]`:`depth`+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var t=this.aliases[e];return t?(t.referenceCount++,t):(t=this.aliases[e]=this.source.wrap(e),t.aliasable=!0,t.referenceCount=1,t)},setupHelper:function(e,t,n){var r=[];return{params:r,paramsInit:this.setupHelperArgs(t,e,r,n),name:this.nameLookup(`helpers`,t,`helper`),callParams:[this.aliasable(this.contextName(0)+` != null ? `+this.contextName(0)+` : (container.nullContext || {})`)].concat(r)}},setupParams:function(e,t,n){var r={},i=[],a=[],o=[],s=!n,c=void 0;s&&(n=[]),r.name=this.quotedString(e),r.hash=this.popStack(),this.trackIds&&(r.hashIds=this.popStack()),this.stringParams&&(r.hashTypes=this.popStack(),r.hashContexts=this.popStack());var l=this.popStack(),u=this.popStack();(u||l)&&(r.fn=u||`container.noop`,r.inverse=l||`container.noop`);for(var d=t;d--;)c=this.popStack(),n[d]=c,this.trackIds&&(o[d]=this.popStack()),this.stringParams&&(a[d]=this.popStack(),i[d]=this.popStack());return s&&(r.args=this.source.generateArray(n)),this.trackIds&&(r.ids=this.source.generateArray(o)),this.stringParams&&(r.types=this.source.generateArray(a),r.contexts=this.source.generateArray(i)),this.options.data&&(r.data=`data`),this.useBlockParams&&(r.blockParams=`blockParams`),r},setupHelperArgs:function(e,t,n,r){var i=this.setupParams(e,t,n);return i.loc=JSON.stringify(this.source.currentLocation),i=this.objectLiteral(i),r?(this.useRegister(`options`),n.push(`options`),[`options=`,i]):n?(n.push(i),``):i}},(function(){for(var e=`break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false`.split(` `),t=c.RESERVED_WORDS={},n=0,r=e.length;n<r;n++)t[e[n]]=!0})(),c.isValidJavaScriptVariableName=function(e){return!c.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)};function l(e,t,n,r,i){var a=t.popStack(),o=n.length;for(e&&o--;r<o;r++)a=t.nameLookup(a,n[r],i);return e?[t.aliasable(`container.strict`),`(`,a,`, `,t.quotedString(n[r]),`, `,JSON.stringify(t.source.currentLocation),` )`]:a}e.default=c,t.exports=e.default})),w9=u(s(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=n(YUe()),i=n(v9()),a=$Ue(),o=eWe(),s=n(lWe()),c=n(y9()),l=n(_9()),u=r.default.create;function d(){var e=u();return e.compile=function(t,n){return o.compile(t,n,e)},e.precompile=function(t,n){return o.precompile(t,n,e)},e.AST=i.default,e.Compiler=o.Compiler,e.JavaScriptCompiler=s.default,e.Parser=a.parser,e.parse=a.parse,e.parseWithoutProcessing=a.parseWithoutProcessing,e}var f=d();f.create=d,l.default(f),f.Visitor=c.default,f.default=f,e.default=f,t.exports=e.default}))(),1),T9=[{id:`agentThreadMessage`,body:`[bb message from thread:{{senderThreadId}}; reply with \`bb thread tell {{senderThreadId}} "<your response>"\`]
|
|
3320
|
+
}`},blockValue:function(e){var t=this.aliasable(`container.hooks.blockHelperMissing`),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var r=this.popStack();n.splice(1,0,r),this.push(this.source.functionCall(t,`call`,n))},ambiguousBlockValue:function(){var e=this.aliasable(`container.hooks.blockHelperMissing`),t=[this.contextName(0)];this.setupHelperArgs(``,0,t,!0),this.flushInline();var n=this.topStack();t.splice(1,0,n),this.pushSource([`if (!`,this.lastHelper,`) { `,n,` = `,this.source.functionCall(e,`call`,t),`}`])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(e){return[` != null ? `,e,` : ""`]}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource([`if (`,e,` != null) { `,this.appendToBuffer(e,void 0,!0),` }`]),this.environment.isSimple&&this.pushSource([`else { `,this.appendToBuffer(`''`,void 0,!0),` }`])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable(`container.escapeExpression`),`(`,this.popStack(),`)`]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,t,n,r){var i=0;!r&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[i++])):this.pushContext(),this.resolvePath(`context`,e,i,t,n)},lookupBlockParam:function(e,t){this.useBlockParams=!0,this.push([`blockParams[`,e[0],`][`,e[1],`]`]),this.resolvePath(`context`,t,1)},lookupData:function(e,t,n){e?this.pushStackLiteral(`container.data(data, `+e+`)`):this.pushStackLiteral(`data`),this.resolvePath(`data`,t,0,!0,n)},resolvePath:function(e,t,n,r,i){var a=this;if(this.options.strict||this.options.assumeObjects){this.push(l(this.options.strict&&i,this,t,n,e));return}for(var o=t.length;n<o;n++)this.replaceStack(function(i){var o=a.nameLookup(i,t[n],e);return r?[` && `,o]:[` != null ? `,o,` : `,i]})},resolvePossibleLambda:function(){this.push([this.aliasable(`container.lambda`),`(`,this.popStack(),`, `,this.contextName(0),`)`])},pushStringParam:function(e,t){this.pushContext(),this.pushString(t),t!==`SubExpression`&&(typeof e==`string`?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push(`{}`),this.stringParams&&(this.push(`{}`),this.push(`{}`)),this.pushStackLiteral(e?`undefined`:`{}`)},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e==null?this.pushStackLiteral(null):this.pushStackLiteral(this.programExpression(e))},registerDecorator:function(e,t){var n=this.nameLookup(`decorators`,t,`decorator`),r=this.setupHelperArgs(t,e);this.decorators.push([`fn = `,this.decorators.functionCall(n,``,[`fn`,`props`,`container`,r]),` || fn;`])},invokeHelper:function(e,t,n){var r=this.popStack(),i=this.setupHelper(e,t),a=[];n&&a.push(i.name),a.push(r),this.options.strict||a.push(this.aliasable(`container.hooks.helperMissing`));var o=[`(`,this.itemsSeparatedBy(a,`||`),`)`],s=this.source.functionCall(o,`call`,i.callParams);this.push(s)},itemsSeparatedBy:function(e,t){var n=[];n.push(e[0]);for(var r=1;r<e.length;r++)n.push(t,e[r]);return n},invokeKnownHelper:function(e,t){var n=this.setupHelper(e,t);this.push(this.source.functionCall(n.name,`call`,n.callParams))},invokeAmbiguous:function(e,t){this.useRegister(`helper`);var n=this.popStack();this.emptyHash();var r=this.setupHelper(0,e,t),i=[`(`,`(helper = `,this.lastHelper=this.nameLookup(`helpers`,e,`helper`),` || `,n,`)`];this.options.strict||(i[0]=`(helper = `,i.push(` != null ? helper : `,this.aliasable(`container.hooks.helperMissing`))),this.push([`(`,i,r.paramsInit?[`),(`,r.paramsInit]:[],`),`,`(typeof helper === `,this.aliasable(`"function"`),` ? `,this.source.functionCall(`helper`,`call`,r.callParams),` : helper))`])},invokePartial:function(e,t,n){var r=[],i=this.setupParams(t,1,r);e&&(t=this.popStack(),delete i.name),n&&(i.indent=JSON.stringify(n)),i.helpers=`helpers`,i.partials=`partials`,i.decorators=`container.decorators`,e?r.unshift(t):r.unshift(this.nameLookup(`partials`,t,`partial`)),this.options.compat&&(i.depths=`depths`),i=this.objectLiteral(i),r.push(i),this.push(this.source.functionCall(`container.invokePartial`,``,r))},assignToHash:function(e){var t=this.popStack(),n=void 0,r=void 0,i=void 0;this.trackIds&&(i=this.popStack()),this.stringParams&&(r=this.popStack(),n=this.popStack());var a=this.hash;n&&(a.contexts[e]=n),r&&(a.types[e]=r),i&&(a.ids[e]=i),a.values[e]=t},pushId:function(e,t,n){e===`BlockParam`?this.pushStackLiteral(`blockParams[`+t[0]+`].path[`+t[1]+`]`+(n?` + `+JSON.stringify(`.`+n):``)):e===`PathExpression`?this.pushString(t):e===`SubExpression`?this.pushStackLiteral(`true`):this.pushStackLiteral(`null`)},compiler:c,compileChildren:function(e,t){for(var n=e.children,r=void 0,i=void 0,a=0,o=n.length;a<o;a++){r=n[a],i=new this.compiler;var s=this.matchExistingProgram(r);if(s==null){this.context.programs.push(``);var c=this.context.programs.length;r.index=c,r.name=`program`+c,this.context.programs[c]=i.compile(r,t,this.context,!this.precompile),this.context.decorators[c]=i.decorators,this.context.environments[c]=r,this.useDepths=this.useDepths||i.useDepths,this.useBlockParams=this.useBlockParams||i.useBlockParams,r.useDepths=this.useDepths,r.useBlockParams=this.useBlockParams}else r.index=s.index,r.name=`program`+s.index,this.useDepths=this.useDepths||s.useDepths,this.useBlockParams=this.useBlockParams||s.useBlockParams}},matchExistingProgram:function(e){for(var t=0,n=this.context.environments.length;t<n;t++){var r=this.context.environments[t];if(r&&r.equals(e))return r}},programExpression:function(e){var t=this.environment.children[e],n=[t.index,`data`,t.blockParams];return(this.useBlockParams||this.useDepths)&&n.push(`blockParams`),this.useDepths&&n.push(`depths`),`container.program(`+n.join(`, `)+`)`},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof s||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new s(e))},pushSource:function(e){this.pendingContent&&=(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),void 0),e&&this.source.push(e)},replaceStack:function(e){var t=[`(`],n=void 0,r=void 0,a=void 0;if(!this.isInline())throw new i.default(`replaceStack on non-inline`);var o=this.popStack(!0);if(o instanceof s)n=[o.value],t=[`(`,n],a=!0;else{r=!0;var c=this.incrStack();t=[`((`,this.push(c),` = `,o,`)`],n=this.topStack()}var l=e.call(this,n);a||this.popStack(),r&&this.stackSlot--,this.push(t.concat(l,`)`))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push(`stack`+this.stackSlot),this.topStackName()},topStackName:function(){return`stack`+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var t=0,n=e.length;t<n;t++){var r=e[t];if(r instanceof s)this.compileStack.push(r);else{var i=this.incrStack();this.pushSource([i,` = `,r,`;`]),this.compileStack.push(i)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var t=this.isInline(),n=(t?this.inlineStack:this.compileStack).pop();if(!e&&n instanceof s)return n.value;if(!t){if(!this.stackSlot)throw new i.default(`Invalid stack pop`);this.stackSlot--}return n},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,t=e[e.length-1];return t instanceof s?t.value:t},contextName:function(e){return this.useDepths&&e?`depths[`+e+`]`:`depth`+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var t=this.aliases[e];return t?(t.referenceCount++,t):(t=this.aliases[e]=this.source.wrap(e),t.aliasable=!0,t.referenceCount=1,t)},setupHelper:function(e,t,n){var r=[];return{params:r,paramsInit:this.setupHelperArgs(t,e,r,n),name:this.nameLookup(`helpers`,t,`helper`),callParams:[this.aliasable(this.contextName(0)+` != null ? `+this.contextName(0)+` : (container.nullContext || {})`)].concat(r)}},setupParams:function(e,t,n){var r={},i=[],a=[],o=[],s=!n,c=void 0;s&&(n=[]),r.name=this.quotedString(e),r.hash=this.popStack(),this.trackIds&&(r.hashIds=this.popStack()),this.stringParams&&(r.hashTypes=this.popStack(),r.hashContexts=this.popStack());var l=this.popStack(),u=this.popStack();(u||l)&&(r.fn=u||`container.noop`,r.inverse=l||`container.noop`);for(var d=t;d--;)c=this.popStack(),n[d]=c,this.trackIds&&(o[d]=this.popStack()),this.stringParams&&(a[d]=this.popStack(),i[d]=this.popStack());return s&&(r.args=this.source.generateArray(n)),this.trackIds&&(r.ids=this.source.generateArray(o)),this.stringParams&&(r.types=this.source.generateArray(a),r.contexts=this.source.generateArray(i)),this.options.data&&(r.data=`data`),this.useBlockParams&&(r.blockParams=`blockParams`),r},setupHelperArgs:function(e,t,n,r){var i=this.setupParams(e,t,n);return i.loc=JSON.stringify(this.source.currentLocation),i=this.objectLiteral(i),r?(this.useRegister(`options`),n.push(`options`),[`options=`,i]):n?(n.push(i),``):i}},(function(){for(var e=`break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false`.split(` `),t=c.RESERVED_WORDS={},n=0,r=e.length;n<r;n++)t[e[n]]=!0})(),c.isValidJavaScriptVariableName=function(e){return!c.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)};function l(e,t,n,r,i){var a=t.popStack(),o=n.length;for(e&&o--;r<o;r++)a=t.nameLookup(a,n[r],i);return e?[t.aliasable(`container.strict`),`(`,a,`, `,t.quotedString(n[r]),`, `,JSON.stringify(t.source.currentLocation),` )`]:a}e.default=c,t.exports=e.default})),C9=u(s(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=n(ZUe()),i=n(_9()),a=tWe(),o=nWe(),s=n(dWe()),c=n(v9()),l=n(g9()),u=r.default.create;function d(){var e=u();return e.compile=function(t,n){return o.compile(t,n,e)},e.precompile=function(t,n){return o.precompile(t,n,e)},e.AST=i.default,e.Compiler=o.Compiler,e.JavaScriptCompiler=s.default,e.Parser=a.parser,e.parse=a.parse,e.parseWithoutProcessing=a.parseWithoutProcessing,e}var f=d();f.create=d,l.default(f),f.Visitor=c.default,f.default=f,e.default=f,t.exports=e.default}))(),1),w9=[{id:`agentThreadMessage`,body:`[bb message from thread:{{senderThreadId}}; reply with \`bb thread tell {{senderThreadId}} "<your response>"\`]
|
|
3321
3321
|
|
|
3322
3322
|
{{messageText}}`,fileName:`agent-thread-message.md`,kind:`prompt`,title:`Agent Thread Message`,summary:`Wraps a bb CLI message from one agent thread to another.`,intent:`Tell the receiving agent which thread sent the message and how to reply.`,editingNotes:`Keep the response command in the prefix so standard agent instructions do not need special cross-thread message guidance.`,variables:{senderThreadId:`The thread ID that sent the message.`,messageText:`The original message text sent by the agent.`}},{id:`bbGuideEnvironments`,body:`Environment commands
|
|
3323
3323
|
|
|
@@ -3586,4 +3586,4 @@ Git reported: {{errorMessage}}.
|
|
|
3586
3586
|
{{/if}}`,fileName:`thread-operation-squash-merge-commit-failure-follow-up.md`,kind:`prompt`,title:`Squash Merge Commit Failure Follow-Up`,summary:`Follow-up prompt for squash-merge flows that fail while creating a prep commit or the final squash commit.`,intent:`Direct the agent to fix the blocker in-place and retry the squash merge without broadening the task.`,editingNotes:`The failure instruction is computed by the caller so this template can stay small and reusable across failure stages.`,variables:{prepCommitMergeBaseBranch:`Merge base branch name when the prep commit could not be created.`,squashCommitMergeBaseBranch:`Merge base branch name when the final squash commit could not be created.`,errorMessage:`Optional git error surfaced to the agent.`}},{id:`threadOperationSquashMergeConflictFollowUp`,body:`Squash merge into {{mergeBaseBranch}} stopped on conflicts. Rebase this branch onto {{mergeBaseBranch}}, resolve the conflicts, and retry the squash merge so the changes land on {{mergeBaseBranch}}.
|
|
3587
3587
|
{{#if conflictFiles}}
|
|
3588
3588
|
Conflicted files: {{conflictFiles}}.
|
|
3589
|
-
{{/if}}`,fileName:`thread-operation-squash-merge-conflict-follow-up.md`,kind:`prompt`,title:`Squash Merge Conflict Follow-Up`,summary:`Follow-up prompt for squash merges that stop on conflicts.`,intent:`Tell the agent to rebase onto the merge base, resolve the conflicts, and retry the squash merge.`,editingNotes:`Keep this concise and procedural. Conflict file details are optional context and should stay additive.`,variables:{mergeBaseBranch:`Merge base branch name shown to the agent.`,conflictFiles:`Optional comma-separated file list.`}}];function uWe(e){return T9.some(t=>t.id===e)}function dWe(){let e=T9.map(e=>{if(!uWe(e.id))throw Error(`Unknown generated template id: ${e.id}`);return[e.id,{...e,id:e.id,kind:e.kind}]});return Object.fromEntries(e)}var E9=dWe(),D9=!1;function fWe(){if(!D9){for(let e of Object.values(E9))w9.default.registerPartial(e.id,e.body);D9=!0}}var O9=new Map;function pWe(e){let t=O9.get(e);if(t)return t;let n=w9.default.compile(E9[e].body,{noEscape:!0});return O9.set(e,n),n}function k9(e,t){return fWe(),pWe(e)(t).trim()}function mWe(e,t){let n=t?.conflictFiles?.filter(e=>e.trim().length>0)??[];return k9(`threadOperationSquashMergeConflictFollowUp`,{mergeBaseBranch:e.options.mergeBaseBranch.trim(),conflictFiles:n.length>0?n.join(`, `):void 0})}function hWe(e,t){let n=e.options.mergeBaseBranch.trim(),r=t.errorMessage?.trim()||void 0;switch(t.stage){case`prep_commit`:return k9(`threadOperationSquashMergeCommitFailureFollowUp`,{prepCommitMergeBaseBranch:n,errorMessage:r});case`squash_commit`:return k9(`threadOperationSquashMergeCommitFailureFollowUp`,{squashCommitMergeBaseBranch:n,errorMessage:r});default:return jD(t.stage)}}function gWe(e){return k9(`threadOperationCommitFailureFollowUp`,{errorMessage:e?.errorMessage?.trim()||void 0})}var _We=7;function A9(e){if(!(e instanceof JD)||typeof e.body!=`object`||e.body===null||!(`details`in e.body))return;let t=gD.safeParse(e.body.details);return t.success?t.data:void 0}function vWe(e){switch(e.kind){case`commit_failed`:return e.errorMessage;case`squash_merge_conflict`:return e.conflictFiles.length>0?`Conflicts: ${e.conflictFiles.join(`, `)}`:void 0;case`squash_merge_commit_failed`:return e.errorMessage;default:return}}function yWe({error:e,mergeBaseBranch:t}){let n=A9(e);if(n)switch(n.kind){case`commit_failed`:return[{type:`text`,text:gWe({errorMessage:n.errorMessage})}];case`squash_merge_conflict`:return t?[{type:`text`,text:mWe({action:`squash_merge`,options:{mergeBaseBranch:t}},{conflictFiles:n.conflictFiles})}]:void 0;case`squash_merge_commit_failed`:return t?[{type:`text`,text:hWe({action:`squash_merge`,options:{mergeBaseBranch:t}},{stage:n.stage,errorMessage:n.errorMessage})}]:void 0;default:return}}function bWe({error:e,mergeBaseBranch:t}){let n=A9(e);return{message:(n?vWe(n):void 0)??JL({error:e,fallbackMessage:`Failed to start git action.`}),askAgentInput:yWe({error:e,mergeBaseBranch:t})}}function xWe(e){switch(e){case`commit`:return`Commit created`;case`squash_merge`:return`Squash merge completed`;default:return e}}function SWe(e){switch(e){case`commit`:return`Commit failed`;case`squash_merge`:return`Squash merge failed`;default:return e}}function CWe({commitSha:e,commitSubject:t}){return`${e.slice(0,_We)} · ${t}`}function j9({response:e,toastId:t}){pL.success(xWe(e.action),{id:t,description:CWe({commitSha:e.commitSha,commitSubject:e.commitSubject})})}function M9({action:e,error:t,mergeBaseBranch:n,onAskAgentToFix:r,threadId:i,toastId:a}){let o=bWe({error:t,mergeBaseBranch:n}),s=o.askAgentInput,c=SWe(e),l=o.message===c?void 0:o.message;pL.error(c,{id:a,...l?{description:l}:{},...s?{action:{label:`Ask agent to fix`,onClick:()=>r({input:s,threadId:i})}}:{}})}function wWe({environment:e,requestEnvironmentAction:t,sendMessage:n,thread:r,workspaceStatus:i}){let a=vI(),o=i?.workingTree,s=i?.mergeBase,c=r?.type!==`manager`,l=r?.archivedAt!=null,u=e?.managed===!1,d=(0,L.useMemo)(()=>{if(!r||!c||!i||l)return[];let t=[],n=o?.hasUncommittedChanges===!0,a=s?.hasCommittedUnmergedChanges===!0;return u?(n&&t.push({target:{kind:`commit`},label:`Commit`}),t):(e?.managed&&(n&&t.push({target:{kind:`commit`},label:`Commit`}),(n||a)&&t.push({target:{kind:n?`commit_and_squash_merge`:`squash_merge`},label:`Squash merge`})),t)},[c,e?.managed,l,u,r,s?.hasCommittedUnmergedChanges,i,o?.hasUncommittedChanges]),f=(0,L.useCallback)(async({input:e,threadId:t})=>{if(n.isPending)return;let r=pL.loading(`Sending message...`);try{await n.mutateAsync({id:t,input:e,mode:`auto`}),pL.success(`Message sent to agent`,{id:r})}catch(e){pL.error(`Failed to message agent`,{id:r,description:JL({error:e,fallbackMessage:`Message was not sent.`})})}},[n]);return{handleAskAgentToFixGitAction:f,handleCommitThread:(0,L.useCallback)(async()=>{let e=r?.environmentId;if(!r||!e)return;let n=r.id,i=pL.loading(`Creating commit...`);try{let n=await t.mutateAsync({id:e,action:`commit`});if(n.action!==`commit`)throw Error(`Expected commit action response.`);j9({response:n,toastId:i})}catch(e){M9({action:`commit`,error:e,onAskAgentToFix:e=>void f(e),threadId:n,toastId:i})}},[f,t,r]),handleSquashMergeThread:(0,L.useCallback)(async({mergeBaseBranch:e})=>{let n=r?.environmentId;if(!r||!n)return;let i=r.id,a=pL.loading(`Squash merging...`);try{let r=await t.mutateAsync({id:n,action:`squash_merge`,options:{mergeBaseBranch:e}});if(r.action!==`squash_merge`)throw Error(`Expected squash merge action response.`);j9({response:r,toastId:a})}catch(t){M9({action:`squash_merge`,error:t,onAskAgentToFix:e=>void f(e),mergeBaseBranch:e,threadId:i,toastId:a})}},[f,t,r]),isThreadGitActionPending:t.isPending,threadGitActionDialog:a,threadHeaderGitActions:d}}function TWe({markThreadRead:e,thread:t}){let n=(0,L.useRef)(new Set);(0,L.useEffect)(()=>{if(!t||$I(t))return;let r=`${t.id}:${t.latestAttentionAt}`;n.current.has(r)||(n.current.add(r),e.mutate(t.id,{onError:()=>{n.current.delete(r)}}))},[e,t])}function EWe(e){return e.lastReadAt===null?{kind:`before-first`}:e.lastReadAt<e.latestAttentionAt?{kind:`after-cutoff`,cutoffAt:e.lastReadAt}:null}function DWe({routeThreadId:e,thread:t,useStandardManagerTimeline:n}){let[r,i]=(0,L.useState)(null),a=t?.id,o=t?.lastReadAt,s=t?.latestAttentionAt,c=t?.type;return(0,L.useEffect)(()=>{if(a===void 0||o===void 0||s===void 0||c===void 0||e!==a||c!==`manager`||n){i(null);return}let t={id:a,lastReadAt:o,latestAttentionAt:s,type:c};i(e=>e?.threadId===a&&e.attentionAt===s?o===null?{attentionAt:s,placement:{kind:`before-first`},threadId:a}:e:{attentionAt:s,placement:EWe(t),threadId:a})},[e,a,o,s,c,n]),a===void 0||e!==a||c!==`manager`||n||r?.threadId!==a||r.attentionAt!==s?null:r.placement}function OWe({managerTimelineView:e,threadId:t}){return`${t}:${e??`default`}`}function N9({latestRows:e,olderCursor:t,surfaceKey:n}){return{olderCursor:t,rows:[...e],surfaceKey:n}}function kWe({left:e,right:t}){return e===null||t===null?e===t:e.anchorSeq===t.anchorSeq&&e.anchorId===t.anchorId}function P9(e,t){let n=new Set(e.map(e=>e.id));for(let r of t)n.has(r.id)||(n.add(r.id),e.push(r))}function AWe({loadedRows:e,olderRows:t}){let n=[];return P9(n,t),P9(n,e),n}function F9({latestRows:e,loadedRows:t}){if(t.length===0)return{hasLatestOverlap:!1,rows:[...e]};let n=new Set(e.map(e=>e.id)),r=t.findIndex(e=>n.has(e.id));if(r===-1){let n=[...t];return P9(n,e),{hasLatestOverlap:!1,rows:n}}return{hasLatestOverlap:!0,rows:[...t.slice(0,r),...e]}}function jWe({current:e,latestTimeline:t,surfaceKey:n}){if(e.surfaceKey!==n||e.rows.length===0&&e.olderCursor===null)return N9({latestRows:t.rows,olderCursor:t.timelinePage.olderCursor,surfaceKey:n});let r=F9({latestRows:t.rows,loadedRows:e.rows});return{...e,olderCursor:e.olderCursor,rows:r.rows}}function MWe({current:e,latestTimeline:t,surfaceKey:n}){if(e.surfaceKey!==n)return N9({latestRows:t.rows,olderCursor:t.timelinePage.olderCursor,surfaceKey:n});let r=F9({latestRows:t.rows,loadedRows:e.rows});return{olderCursor:t.timelinePage.olderCursor,rows:r.rows,surfaceKey:n}}function NWe(e){return e instanceof JD&&e.status===400&&e.code===`invalid_request`}function PWe({managerTimelineView:e,threadId:t}){let n=Dje(t,{refetchOnMount:`always`,managerTimelineView:e}),r=OWe({managerTimelineView:e,threadId:t}),[i,a]=(0,L.useState)(()=>N9({latestRows:[],olderCursor:null,surfaceKey:r})),[o,s]=(0,L.useState)(!1),c=n.data;(0,L.useEffect)(()=>{if(!c){a(e=>e.surfaceKey===r?e:N9({latestRows:[],olderCursor:null,surfaceKey:r}));return}a(e=>jWe({current:e,latestTimeline:c,surfaceKey:r}))},[c,r]);let l=n.refetch,u=i.surfaceKey===r?i.olderCursor:null,d=u!==null,f=(0,L.useCallback)(async()=>{if(!(!u||!t||o)){s(!0);try{let n=await rO({beforeCursor:u,id:t,managerTimelineView:e});a(e=>e.surfaceKey===r?{olderCursor:kWe({left:e.olderCursor,right:u})?n.timelinePage.olderCursor:e.olderCursor,rows:AWe({loadedRows:e.rows,olderRows:n.rows}),surfaceKey:r}:e)}catch(e){if(!(e instanceof Error)||!NWe(e))throw e;let t=(await l()).data??c;a(e=>e.surfaceKey===r?t?MWe({current:e,latestTimeline:t,surfaceKey:r}):{...e,olderCursor:null}:e)}finally{s(!1)}}},[o,c,e,u,l,r,t]);return{activeThinking:c?.activeThinking??null,contextWindowUsage:c?.contextWindowUsage,hasOlderTimelineRows:d,isLoadingOlderTimelineRows:o,loadOlderTimelineRows:f,pendingTodos:c?.pendingTodos??null,timelineError:n.error,timelineLoading:n.isLoading,timelineRows:i.surfaceKey===r&&i.rows.length>0?i.rows:c?.rows??[]}}function I9(e){if(!e.rootPath||!e.canOpenPreferredTarget)return;let t=e.rootPath;return n=>{e.openInPreferredTarget({lineNumber:null,path:_$({path:n,rootPath:t})})}}function FWe(e){return e.file.status===`A`||e.file.status===`??`?{kind:`preview`,source:{kind:`working-tree`},statusLabel:null}:e.file.status===`D`?e.section.kind===`committed`?e.section.mergeBaseRef?{kind:`preview`,source:{kind:`merge-base`,ref:e.section.mergeBaseRef},statusLabel:`deleted`}:{kind:`diff`}:{kind:`preview`,source:{kind:`head`},statusLabel:`deleted`}:{kind:`diff`}}function L9(e){return e.threadEnvironmentIsLocal?e.environment?.path??null:null}function IWe(e){return!e.canOpenWorkspace||!e.hasWorkspaceOpenTargets?null:L9({environment:e.environment,threadEnvironmentIsLocal:e.threadEnvironmentIsLocal})}var R9=`/auth/callback`,z9=`/settings`,B9=`/projects/:projectId`,V9=`/projects/:projectId/managers/new`,H9=`/projects/:projectId/settings`,U9=`/projects/:projectId/archived`,W9=`/projects/:projectId/threads/:threadId`,LWe=[`/`,R9,z9,B9,V9,H9,U9,W9],RWe=`Thread file links are only available when the thread has an environment.`,zWe=`Thread file links must use absolute file paths.`;function BWe(e){return LWe.some(t=>Sm(t,e)!==null)}function G9(e){if(!e.startsWith(`/`))return null;let t=[];for(let n of e.split(`/`))if(!(n.length===0||n===`.`)){if(n===`..`){t.length>0&&t.pop();continue}t.push(n)}return t.length===0?`/`:`/${t.join(`/`)}`}function VWe(e){let t=G9(e.workspaceRootPath);if(!t)return null;let n=G9(e.linkPath);return!n||!HWe({candidatePath:n,workspaceRootPath:t})||n===t?null:{path:n,relativePath:t===`/`?n.slice(1):n.slice(t.length+1),workspaceRootPath:t}}function HWe(e){return e.workspaceRootPath===`/`?e.candidatePath.startsWith(`/`):e.candidatePath===e.workspaceRootPath||e.candidatePath.startsWith(`${e.workspaceRootPath}/`)}function UWe(e){if(BWe(e.link.path))return{kind:`app-route`};let t=G9(e.link.path);if(!t)return{description:zWe,kind:`error`};let n=e.workspaceRootPath===null?null:VWe({linkPath:t,workspaceRootPath:e.workspaceRootPath});return n?{kind:`open-workspace-path`,request:{lineNumber:e.link.lineNumber,path:n.path,relativePath:n.relativePath,workspaceRootPath:n.workspaceRootPath}}:e.hostFileLinksAvailable?{kind:`open-host-path`,request:{lineNumber:e.link.lineNumber,path:t}}:{description:RWe,kind:`error`}}function WWe({terminalId:e,threadId:t}){return`/ws/threads/${encodeURIComponent(t)}/terminals/${encodeURIComponent(e)}`}function GWe(e){let t=WWe(e);if(typeof __BB_DEV_WS_URL__==`string`){let e=new URL(__BB_DEV_WS_URL__);return e.pathname=t,e.search=``,e.hash=``,e.toString()}return`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}${t}`}var KWe=`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace`;function qWe(e,t){let n=getComputedStyle(document.documentElement).getPropertyValue(t).trim();if(n)return e.style.color=n,getComputedStyle(e).color}function K9(){if(typeof document>`u`)return{};let e=document.createElement(`span`);e.style.position=`absolute`,e.style.visibility=`hidden`,e.style.pointerEvents=`none`,document.body.appendChild(e);let t=t=>qWe(e,t),n={background:t(`--background`),foreground:t(`--foreground`),cursor:t(`--foreground`),cursorAccent:t(`--background`),selectionBackground:t(`--muted`),black:t(`--ansi-0`),red:t(`--ansi-1`),green:t(`--ansi-2`),yellow:t(`--ansi-3`),blue:t(`--ansi-4`),magenta:t(`--ansi-5`),cyan:t(`--ansi-6`),white:t(`--ansi-7`),brightBlack:t(`--ansi-8`),brightRed:t(`--ansi-9`),brightGreen:t(`--ansi-10`),brightYellow:t(`--ansi-11`),brightBlue:t(`--ansi-12`),brightMagenta:t(`--ansi-13`),brightCyan:t(`--ansi-14`),brightWhite:t(`--ansi-15`)};return e.remove(),n}function JWe(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n)}function YWe(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e+=1)n[e]=t.charCodeAt(e);return new TextDecoder().decode(n)}function q9({socket:e,terminal:t}){e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({type:`resize`,cols:t.cols,rows:t.rows}))}function J9({terminal:e,text:t}){e.write(`\r\n\x1b[2m${t}\x1b[0m\r\n`)}function XWe({isReplay:e,replayWriteState:t,terminal:n,text:r}){if(!e){n.write(r);return}t.suppressedWriteCount+=1,n.write(r,()=>{--t.suppressedWriteCount})}function ZWe({message:e,replayNextSeq:t,replayWriteState:n,setReplayNextSeq:r,terminal:i}){switch(e.type){case`attached`:r(e.nextSeq);return;case`pong`:case`session-updated`:return;case`output`:XWe({isReplay:t!==null&&e.chunk.seq<t,replayWriteState:n,terminal:i,text:YWe(e.chunk.dataBase64)});return;case`error`:J9({terminal:i,text:`Terminal error: ${e.message}`});return;case`exited`:J9({terminal:i,text:e.session.exitCode===null?`Terminal exited`:`Terminal exited with code ${e.session.exitCode}`});return}}function QWe({onTitleChange:e,onUserInput:t,session:n,threadId:r}){let i=(0,L.useRef)(null),a=(0,L.useRef)(null),o=(0,L.useRef)(e),s=(0,L.useRef)(t),c=gJ();return o.current=e,s.current=t,(0,L.useEffect)(()=>{let e=i.current;if(!e)return;let t=!1,c=null,l=null,u=null,d=null,f={suppressedWriteCount:0},p=null;async function m(e){let[{Terminal:i},{FitAddon:m},{WebLinksAddon:h}]=await Promise.all([z(()=>import(`./xterm-CCMwI7sy.js`),[]),z(()=>import(`./addon-fit-aSh7YPML.js`),[]),z(()=>import(`./addon-web-links-3MKUhX9m.js`),[])]);if(t)return;l=new i({allowProposedApi:!1,convertEol:!0,cursorBlink:!0,fontFamily:KWe,fontSize:12,scrollback:1e4,theme:K9()}),a.current=l,u=new m,l.loadAddon(u),l.loadAddon(new h),l.open(e),u.fit(),c=new WebSocket(GWe({terminalId:n.id,threadId:r}));let g=c,_=l;g.onopen=()=>{q9({socket:g,terminal:_})},g.onmessage=e=>{if(typeof e.data!=`string`)return;let t;try{t=JSON.parse(e.data)}catch{return}let n=Qde.safeParse(t);n.success&&ZWe({message:n.data,replayNextSeq:d,replayWriteState:f,setReplayNextSeq:e=>{d=e},terminal:_})},g.onclose=()=>{t||J9({terminal:_,text:`Terminal connection closed`})},_.onData(e=>{f.suppressedWriteCount>0||g.readyState===WebSocket.OPEN&&(s.current?.(),g.send(JSON.stringify({type:`input`,dataBase64:JWe(e)})))}),_.onTitleChange(e=>{f.suppressedWriteCount>0||o.current?.(e)}),p=new ResizeObserver(()=>{!u||!l||!c||(u.fit(),q9({socket:c,terminal:l}))}),p.observe(e)}return m(e).catch(n=>{t||(e.textContent=n instanceof Error?n.message:String(n))}),()=>{t=!0,p?.disconnect(),c?.close(),l?.dispose(),a.current=null}},[n.id,r]),(0,L.useEffect)(()=>{let e=a.current;e&&(e.options.theme=K9())},[c]),(0,R.jsx)(`div`,{ref:i,className:`h-full min-h-0 w-full overflow-hidden bg-background p-2`})}var $We=100,eGe=30,tGe=[],Y9=200,X9=3,nGe=250;function rGe(e){return e.status!==`exited`}function iGe({title:e}){let t=e.trim();if(!t)return null;let n=aGe({title:t});return n===null?t.slice(0,Y9):sGe({path:n.path}).slice(0,Y9)}function aGe({title:e}){let t=/^[^@\s:]+@[^:\s]+:(.+)$/u.exec(e)?.[1];return!t||!oGe({path:t})?null:{path:t}}function oGe({path:e}){return e===`~`||e===`.`||e.startsWith(`~/`)||e.startsWith(`/`)||e.startsWith(`./`)}function sGe({path:e}){if(e===`/`||e===`~`||e===`.`)return e;let t=e.split(`/`).filter(e=>e.length>0);return t.length<=X9?e:`.../${t.slice(-X9).join(`/`)}`}function cGe(e,t){return t&&e.some(e=>e.id===t)?t:e[0]?.id??null}function Z9(e){switch(e.status){case`starting`:return`starting`;case`running`:return`running`;case`disconnected`:return`disconnected`;case`exited`:return`exited`}}function lGe({canCreateTerminal:e,threadId:t}){let n=W2(t),r=G2(t),i=xFe(t),a=(0,L.useRef)(new Set),o=(0,L.useRef)(new Set),s=(0,L.useRef)(n.isOpen),c=(0,L.useRef)(null),l=(0,L.useRef)(null),[u,d]=(0,L.useState)(!1),f=u4(t,{enabled:n.isOpen}),p=cIe(),m=uIe(),h=lIe(),g=f.data?.sessions??tGe,_=(0,L.useMemo)(()=>g.filter(rGe),[g]),v=(0,L.useMemo)(()=>cGe(_,n.activeTerminalId),[n.activeTerminalId,_]),y=_.find(e=>e.id===v)??null;(0,L.useEffect)(()=>{n.activeTerminalId!==v&&r(e=>({...e,activeTerminalId:v}))},[v,n.activeTerminalId,r]),(0,L.useEffect)(()=>{let e=s.current;if(s.current=n.isOpen,!n.isOpen){d(!1);return}e||d(!0)},[n.isOpen]),(0,L.useEffect)(()=>()=>{l.current!==null&&window.clearTimeout(l.current)},[]);let b=(0,L.useCallback)(()=>{!e||p.isPending||p.mutate({threadId:t,cols:$We,rows:eGe},{onSuccess:e=>{r(t=>({...t,activeTerminalId:e.id}))}})},[e,p,t,r]);(0,L.useEffect)(()=>{if(u){if(!n.isOpen||!e||f.error){d(!1);return}if(!(p.isPending||f.isLoading)){if(_.length>0){d(!1);return}d(!1),b()}}},[e,p.isPending,n.isOpen,u,b,f.error,f.isLoading,_.length]),(0,L.useEffect)(()=>{if(!n.isOpen)for(let e of _)e.lastUserInputAt!==null||a.current.has(e.id)||o.current.has(e.id)||(o.current.add(e.id),m.mutate({mode:`if-clean`,threadId:t,terminalId:e.id},{onSettled:()=>{o.current.delete(e.id)}}))},[m,n.isOpen,t,_]);let x=(0,L.useCallback)(()=>{b()},[b]),S=(0,L.useCallback)(e=>{r(t=>({...t,activeTerminalId:e,isOpen:!0}))},[r]),C=(0,L.useCallback)(e=>{m.mutate({mode:`force`,threadId:t,terminalId:e},{onSuccess:()=>{a.current.delete(e),o.current.delete(e)}})},[m,t]),w=(0,L.useCallback)(()=>{v&&a.current.add(v)},[v]),T=(0,L.useCallback)(e=>{if(!y||y.status!==`running`)return;let n=iGe({title:e});if(!n||n===y.title)return;let r={terminalId:y.id,title:n},i=c.current;i!==null&&i.terminalId===r.terminalId&&i.title===r.title||(c.current=r,l.current!==null&&window.clearTimeout(l.current),l.current=window.setTimeout(()=>{l.current=null,h.mutate({threadId:t,terminalId:r.terminalId,title:r.title},{onSettled:()=>{let e=c.current;e!==null&&e.terminalId===r.terminalId&&e.title===r.title&&(c.current=null)}})},nGe))},[y,h,t]),E=p.isPending||e&&n.isOpen&&u,D=E?`Starting terminal...`:`No terminals`,O=E?e?`Starting terminal...`:`Terminals unavailable.`:`No terminals`,k=_,A=f.isLoading||k.length===0&&E,j=y?y.status===`running`?(0,R.jsx)(QWe,{onTitleChange:T,onUserInput:w,session:y,threadId:t}):(0,R.jsxs)(`div`,{className:`flex h-full items-center justify-center px-4 text-center text-sm text-muted-foreground`,children:[`Terminal `,Z9(y),`.`]}):(0,R.jsx)(`div`,{className:`flex h-full items-center justify-center px-4 text-center text-sm text-muted-foreground`,children:O});return(0,R.jsxs)(`section`,{"aria-label":`Thread terminals`,className:`flex h-full min-h-0 min-w-0 flex-col bg-background`,children:[(0,R.jsxs)(`div`,{className:`flex h-10 min-h-10 items-center gap-2 bg-background px-3`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1 overflow-x-auto`,role:`tablist`,"aria-label":`Terminal sessions`,children:[f.isLoading?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(ov,{className:`h-6 w-28 shrink-0 rounded-md`}),(0,R.jsx)(ov,{className:`h-6 w-24 shrink-0 rounded-md`})]}):k.length>0?k.map(e=>(0,R.jsx)(uGe,{session:e,isActive:e.id===v,isClosing:m.isPending&&m.variables?.terminalId===e.id,onSelect:()=>S(e.id),onClose:()=>C(e.id)},e.id)):A?(0,R.jsx)(`p`,{className:`shrink-0 text-xs text-muted-foreground`,children:D}):null,(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:`h-7 w-7 shrink-0 rounded-md p-0 text-muted-foreground`,disabled:!e||p.isPending,onClick:x,"aria-label":`New terminal`,title:`New terminal`,children:p.isPending?(0,R.jsx)(V,{name:`Spinner`,className:`size-3.5 animate-spin`}):(0,R.jsx)(V,{name:`Plus`,className:`size-3.5`})})]}),(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:`h-7 w-7 shrink-0 rounded-md p-0 text-muted-foreground`,onClick:()=>i(!1),"aria-label":`Close terminal panel`,title:`Close terminal panel`,children:(0,R.jsx)(V,{name:`X`,className:`size-3.5`})})]}),(0,R.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden bg-background`,children:f.error?(0,R.jsx)(`div`,{className:`flex h-full items-center justify-center px-4 text-center text-sm text-destructive`,children:`Failed to load terminals.`}):j})]})}function uGe({isActive:e,isClosing:t,onClose:n,onSelect:r,session:i}){let a=Z9(i);return(0,R.jsx)(z4,{label:i.title,secondaryLabel:i.status===`running`?null:a,title:`${i.title} (${a})`,isActive:e,onSelect:r,closeAction:{onClose:n,closeLabel:`Close ${i.title}`,closeTooltip:`Close terminal`,isClosing:t}})}var dGe=[];function fGe(e){let t=e.runtime.displayStatus;return t!==`host-reconnecting`&&t!==`waiting-for-host`?null:{label:t===`host-reconnecting`?`Host daemon disconnected. Waiting for reconnection...`:`Host daemon disconnected`,tone:t===`host-reconnecting`?`pending`:`error`}}function pGe(){let{projectId:e,threadId:t}=eh();ZPe(t),QPe(t),bFe(t);let n=L2(t),r=W2(t),i=n.activePanel,a=E_(),o=tFe(t),s=t0(t??``),c=s.isSuccess||s.isError,l=SFe(t),u=G2(t),{data:d,isFetching:f,isLoadingError:p,isPlaceholderData:m,error:h}=e0(t??``,{enabled:c,refetchOnMount:s.isSuccess?!0:`always`}),g=AD({hasResolvedData:d!==void 0&&!m,isFetching:s.isFetching||f,isLoadingError:p}),_=yje(d?.id??``,{enabled:g.status===`ready`&&!!d?.id,environmentId:d?.environmentId??void 0}),v=_.isSuccess||_.isError,y=_.isSuccess?1e4:void 0,{data:b}=e0(d?.parentThreadId??``),{data:x=[]}=Cje(d?.id??``,{enabled:v,refetchOnMount:_.isSuccess?!1:`always`,staleTime:y}),S=n0(x)!==null,C=d?.type===`manager`,w=d?.type===`standard`,[T,E]=gIe(),D=C&&T,O=D?`standard`:void 0,k=DWe({routeThreadId:t,thread:d,useStandardManagerTimeline:D}),[A,j]=(0,L.useState)(!1),M=i!==null,N=M&&C,{isThreadStorageFilePreviewLoading:P,isThreadStorageFilesLoading:ee,threadStorageFilePreview:F,threadStorageFilePreviewError:te,threadStorageFiles:ne,threadStorageFilesError:re,threadStorageRootPath:ie}=mUe({activePath:C?j2(n):null,fileListEnabled:N,filePreviewEnabled:M,threadId:t,threadType:d?.type}),{activateHostFileTab:ae,activateStorageFileTab:oe,activateWorkspaceFileTab:I,activeHostFileLineNumber:se,activeHostFilePath:ce,activeStorageFilePath:le,activeWorkspaceFileLineNumber:ue,activeWorkspaceFilePath:de,activeWorkspaceFileSource:fe,activeWorkspaceFileStatusLabel:pe,clearActiveFileTabs:me,closeHostFileTab:he,closeStorageFileTab:ge,closeWorkspaceFileTab:_e,openHostFile:ve,openHostFileTabs:ye,openStorageFile:be,openStorageFilePaths:xe,openWorkspaceFile:Se,openWorkspaceFileTabs:Ce}=NUe({threadId:t,environmentId:d?.environmentId,threadType:d?.type,storageFiles:ne?.files}),we=DUe({files:ne?.files,onSelectPath:be,selectedPath:le}),Te=(0,L.useCallback)(e=>{C&&E(e)},[C,E]),Ee=BHe(d),De=g.status===`ready`&&Ee,Oe=$1({archived:!1,projectId:e,type:`manager`},{enabled:De}).data??dGe,{activeThinking:ke,contextWindowUsage:Ae,hasOlderTimelineRows:je,isLoadingOlderTimelineRows:Me,loadOlderTimelineRows:Ne,pendingTodos:Pe,timelineError:Fe,timelineLoading:Ie,timelineRows:Le}=PWe({managerTimelineView:O,threadId:t??``}),Re=yNe(),ze=CFe(),Be=RL(),Ve=wFe(),He=PL(),Ue=Sg(Zhe),We=u4(t??``,{enabled:Ue}),Ge=(0,L.useMemo)(()=>We.data?.sessions.filter(e=>e.status!==`exited`).length??0,[We.data]),Ke=(0,L.useMemo)(()=>d?fGe(d):null,[d]),qe=AFe(d?.environmentId,{enabled:c,staleTime:5e3}),Je=qe.data,Ye=Je?.mergeBaseBranch??Je?.defaultBranch??void 0,{data:Xe,error:Ze,isLoading:Qe}=MFe(d?.environmentId,de,fe),{data:$e,error:et,isLoading:tt}=Eje(d?.id??``,d?.environmentId,ce,{enabled:M&&ce!==null}),{closeThreadSecondaryPanel:nt,defaultMergeBaseBranch:rt,isLoadingMergeBaseBranchOptions:it,mergeBaseBranchOptions:at,openDiffFile:ot,openThreadDiffPanel:st,openThreadSecondaryPanel:ct,selectedMergeBaseBranch:lt,setSelectedMergeBaseBranch:ut,toggleThreadSecondaryPanel:dt}=vIe({clearActiveFileTabs:me,defaultMergeBaseBranch:Ye,environmentId:w?d?.environmentId??void 0:void 0,mergeBaseBranchOptionsEnabled:A,threadId:t}),{closePanel:ft,isOpen:pt,openDiffFile:mt,openDiffPanel:ht,openPanel:gt,togglePanel:_t}=pUe({activePanel:i,closePersistedPanel:nt,isCompactViewport:a,openPersistedDiffFile:ot,openPersistedDiffPanel:st,openPersistedPanel:ct,threadId:t,togglePersistedPanel:dt});(0,L.useEffect)(()=>{j(!1)},[d?.environmentId]);let vt=(0,L.useCallback)(e=>{e&&j(!0)},[]),yt=(0,L.useCallback)(e=>{me(),gt(e)},[me,gt]),bt=(0,L.useCallback)(e=>{let t=Math.round(e);u(e=>e.panelHeightPercent===t?e:{...e,panelHeightPercent:t})},[u]),xt=(0,L.useCallback)(e=>{let t=FWe(e);if(t.kind===`preview`){Se({lineNumber:null,path:e.file.path,source:t.source,statusLabel:t.statusLabel});return}mt(e.file.path)},[mt,Se]),St=(0,L.useMemo)(()=>{let e=Ce.map(e=>({id:`workspace:${e.path}`,filename:e.path.split(`/`).at(-1)??e.path,isActive:e.path===de,statusLabel:e.statusLabel,onSelect:()=>I(e.path),onClose:()=>_e(e.path)})),t=C?xe.map(e=>({id:`storage:${e}`,filename:e.split(`/`).at(-1)??e,isActive:e===le,isPinned:e===i9,statusLabel:null,onSelect:()=>oe(e),onClose:()=>ge(e)})):[],n=ye.map(e=>({id:`host-file:${e.path}`,filename:e.path.split(`/`).at(-1)??e.path,isActive:e.path===ce,statusLabel:null,onSelect:()=>ae(e.path),onClose:()=>he(e.path)})),r=[...e,...n,...t];return r.length>0?r:void 0},[ae,oe,I,ce,le,de,he,ge,_e,C,ye,xe,Ce]),Ct=lt??Ye,wt=q2(d?.environmentId,Ct,{enabled:w&&Je!==void 0}),Tt=wt.data,Et=wt.error,Dt=Et?void 0:Tt??void 0,Ot=Dt?.workingTree,kt=Dt?.branch,At=(0,L.useMemo)(()=>n4(Dt),[Dt]),{isLocalHost:jt}=iA(),Mt=Je?jt(Je.hostId):!1,Nt=L9({environment:Je,threadEnvironmentIsLocal:Mt}),{canOpenPreferredTarget:Pt,openPathInPreferredTarget:Ft,openPathInTarget:It,preferredTarget:Lt,workspaceOpenTargets:Rt}=aIe({enabled:Mt}),zt=s.isSuccess&&s.data.environment!==void 0&&s.data.environment!==null&&s.data.host===null,{data:Bt}=rNe(Je?.hostId,{enabled:!zt}),Vt=$1({archived:!1,projectId:e,parentThreadId:d?.id},{enabled:C&&!!d?.id}),Ht=(0,L.useMemo)(()=>{if(!d?.parentThreadId)return null;let t=`/projects/${e}/threads/${d.parentThreadId}`;return b===void 0?{managerName:`Manager ${d.parentThreadId.slice(0,8)}`,href:t}:b.type!==`manager`||b.archivedAt!==null||b.deletedAt!==null||b.projectId!==d.projectId?null:{managerName:ZI(b),href:t}},[b,e,d?.parentThreadId,d?.projectId]),Ut=(0,L.useMemo)(()=>{if(!C)return null;let t=(Vt.data??[]).filter(e=>NIe(e.runtime.displayStatus)).map(t=>({id:t.id,title:ZI(t),href:`/projects/${e}/threads/${t.id}`}));return t.length===0?null:{items:t}},[C,Vt.data,e]),Wt=Ie&&Le.length===0,{erroredTurnSummaryIds:Gt,handleLoadTurnSummaryRows:Kt,loadingTurnSummaryIds:qt,turnSummaryRowsById:Jt}=wIe({managerTimelineView:O,timelineRows:Le,threadId:t});TWe({markThreadRead:Be,thread:d});let{effectiveMergeBaseBranch:Yt,handleMergeBaseBranchChange:Xt,showBranchComparisonUi:Zt,showMergeBase:Qt,mergeBaseBranch:$t}=FUe({environment:Je,mergeBaseBranchOptions:at,selectedMergeBaseBranch:lt,setSelectedMergeBaseBranch:ut,thread:d,updateEnvironment:Ve,workspaceStatus:Dt}),en=wWe({environment:Je,requestEnvironmentAction:ze,sendMessage:Re,thread:d,workspaceStatus:Dt}),tn=d?.parentThreadId,nn=b?.title&&b.title.trim().length>0?b.title:tn,rn=(0,L.useMemo)(()=>Y7({currentThreadId:d?.id,isManagerThread:C,managerThreads:Oe,parentThreadDisplayName:nn,parentThreadId:tn}),[C,Oe,nn,tn,d?.id]),an=(0,L.useCallback)(e=>{!d||He.isPending||He.mutate({id:d.id,parentThreadId:e})},[d,He]),on=(0,L.useCallback)(e=>{let t=UWe({hostFileLinksAvailable:d?.environmentId!==null&&d?.environmentId!==void 0,link:e,workspaceRootPath:Nt});return t.kind===`app-route`?!1:t.kind===`error`?(pL.error(`Failed to open file locally`,{description:t.description}),!0):t.kind===`open-workspace-path`?(Se({lineNumber:t.request.lineNumber,path:t.request.relativePath,source:{kind:`working-tree`},statusLabel:null}),!0):(ve({lineNumber:t.request.lineNumber,path:t.request.path}),!0)},[Nt,ve,Se,d?.environmentId]),sn=(0,L.useCallback)(e=>{switch(e.kind){case`open-file-diff`:return C?null:()=>{mt(e.path)};default:return _R(e.kind)}},[C,mt]);if(!e||!t)return(0,R.jsx)(c0,{contentClassName:`min-h-full items-center justify-center`,children:(0,R.jsx)(`p`,{className:`py-12 text-center text-sm text-destructive`,children:`Not found`})});if(g.status===`loading`)return(0,R.jsx)(c0,{contentClassName:`min-h-full items-center justify-center`,children:(0,R.jsx)(`p`,{className:`py-12 text-center text-sm text-muted-foreground`,children:`Loading...`})});if(!d||d.projectId!==e)return(0,R.jsx)(c0,{contentClassName:`min-h-full items-center justify-center`,children:(0,R.jsx)(`p`,{className:`py-12 text-center text-sm text-destructive`,children:h?`Failed to load thread.`:`Not found`})});let cn=`${d.id}:${O??`default`}`,ln=rn.some(e=>e.value!==`none`),un=Ee&&ln,dn=d.type===`standard`&&!!d.parentThreadId,fn=Je?MD({environment:Je,isLocalHost:Mt,hostName:Bt?.name}):void 0,pn=fn?mR(fn.workspaceDisplayKind):null,mn=Yt,hn=kt?.currentBranch??void 0,gn=Je?.status===`destroyed`,_n=Ue&&d.environmentId!==null&&Je?.status===`ready`,vn=g4(Dt,{mergeBaseBranch:$t,showBranchComparison:Zt,error:Et,workspaceDeleted:gn}),yn=ZI(d),bn=(0,R.jsx)(lR,{thread:d,triggerClassName:J1,align:`end`,viewerToggleLabel:C?`Use standard timeline`:void 0,viewerToggleChecked:C?D:void 0,onViewerToggleCheckedChange:C?Te:void 0}),xn=IWe({canOpenWorkspace:Pt,environment:Je,hasWorkspaceOpenTargets:Rt.length>0,threadEnvironmentIsLocal:Mt}),Sn=xn&&Lt?(0,R.jsx)(QFe,{preferredTarget:Lt,targets:Rt,onOpenPreferredTarget:async()=>{await Ft({lineNumber:null,path:xn})},onOpenTarget:async e=>{await It({lineNumber:null,path:xn,rememberTarget:!0,targetId:e})}}):void 0,Cn=(0,R.jsx)(EIe,{actionsMenu:bn,isManagedThread:!!tn,isManagerThread:C,isSecondaryPanelOpen:pt,activeTerminalCount:Ge,isTerminalPanelOpen:Ue&&r.isOpen,isThreadGitActionPending:en.isThreadGitActionPending,onOpenThreadGitAction:en.threadGitActionDialog.onOpen,onToggleSecondaryPanel:_t,onToggleTerminalPanel:l,showTerminalPanelToggle:Ue,threadHeaderGitActions:en.threadHeaderGitActions,threadTitle:yn,workspaceOpenButton:Sn}),wn=(0,R.jsx)(tLe,{canUseGitUi:w,contextWindowUsage:Ae,environmentBranchName:hn,environmentHostConnected:Bt&&!Mt?Bt.status===`connected`:void 0,environmentIcon:pn??void 0,environmentLabel:fn?.modeLabel,environmentHostLabel:fn?.location===`remote`?fn.hostLabel??void 0:void 0,isEnvironmentActionPending:ze.isPending,composerQueriesEnabled:v,composerQueriesRefetchOnMount:_.isSuccess?!1:`always`,composerQueriesStaleTime:y,onChangedFileClick:xt,openThreadDiffPanel:ht,projectId:e,workspaceChangedFilesSection:w?At:null,workspaceStatusPending:w&&(qe.isLoading||wt.isLoading),contextBannerMergeBase:w&&Qt&&mn?{branch:mn,options:at,optionsLoading:it,onChange:Xt,onPickerOpenChange:vt}:null,sendMessage:Re,pendingInteractions:x,pendingTodos:Pe,managedBySection:Ht,managerChildrenSection:Ut,thread:d}),Tn=d.type===`manager`?{controller:we,filesError:re,isFilesLoading:ee}:void 0,En=I9({rootPath:Nt,canOpenPreferredTarget:Pt,openInPreferredTarget:Ft}),Dn=I9({rootPath:Mt?ie:null,canOpenPreferredTarget:Pt,openInPreferredTarget:Ft}),On=Mt&&Pt?e=>{Ft({lineNumber:se,path:e})}:void 0,kn=de?v$({path:de,rootPath:Je?.path}):null,An=le?v$({path:le,rootPath:ie}):null,jn=de?(0,R.jsx)(a9,{activePath:de,copyPath:kn,error:Ze,filePreview:Xe,isLoading:Qe,lineNumber:ue,onOpenInEditor:En,statusLabel:pe}):ce?(0,R.jsx)(a9,{activePath:ce,error:et,filePreview:$e,isLoading:tt,lineNumber:se,onOpenInEditor:On,statusLabel:null}):le?(0,R.jsx)(wUe,{activePath:le,copyPath:An,error:te,filePreview:F,isLoading:P,onOpenInEditor:Dn}):void 0;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(lUe,{footer:wn,header:Cn,isMetadataLoading:qe.isLoading,isSecondaryPanelOpen:pt,metadata:{thread:d,projectId:e,parentThreadDisplayName:nn??null,managerThreads:Oe,canAssignToManager:un,canTakeOverThread:dn,environmentHost:Bt??null,environmentIsLocal:Mt,environment:Je??null,workspaceStatus:Dt,workspaceStatusError:Et??null,selectedMergeBaseBranch:lt,mergeBaseBranchOptions:at,isLoadingMergeBaseBranchOptions:it,updateThreadPending:He.isPending||Ve.isPending,storage:Tn,onAssignManager:an,onMergeBaseBranchChange:Xt,onChangedFileClick:w?xt:void 0},secondaryPanel:{activePanel:i,canUseGitUi:w,defaultMergeBaseBranch:rt,environmentId:d.environmentId??void 0,workspaceRootPath:Je?.path,fileTabs:St,fileTabContent:jn,isOpen:pt,onClose:ft,onCollapse:ft,onOpenFileInEditor:En,onOpenFilePreview:e=>{Se({lineNumber:null,path:e,source:{kind:`working-tree`},statusLabel:null})},onPanelFocus:o,onPanelChange:yt,showGitDiffTab:w},terminalPanel:Ue?(0,R.jsx)(lGe,{canCreateTerminal:_n,threadId:d.id}):void 0,terminalPanelHeightPercent:r.panelHeightPercent,terminalPanelOpen:Ue&&r.isOpen,onTerminalPanelResize:bt,timeline:{activeThinking:ke,hasOlderTimelineRows:je,hostConnectionNotice:Ke,isLoadingOlderTimelineRows:Me,isThreadTimelinePending:Wt,timelineError:!!Fe,loadingTurnSummaryIds:qt,erroredTurnSummaryIds:Gt,onLoadOlderRows:Ne,onLoadTurnSummaryRows:Kt,onOpenLocalFileLink:on,onTitleAction:sn,projectId:e,showOngoingIndicator:d.stopRequestedAt===null&&(d.runtime.displayStatus===`active`||d.runtime.displayStatus===`host-reconnecting`)&&!Wt,ongoingIndicatorLabel:S?`Waiting for approval`:d.runtime.displayStatus===`host-reconnecting`?`Waiting for reconnection`:void 0,timelineRows:Le,stopRequestedAt:d.stopRequestedAt,threadId:d.id,threadRuntimeDisplayStatus:d.runtime.displayStatus,turnSummaryRowsIdentity:cn,turnSummaryRowsById:Jt,unreadDividerPlacement:k,workspaceRootPath:Je?.path??void 0}}),w?(0,R.jsx)(LFe,{target:en.threadGitActionDialog.target,branchName:hn,gitStatusDisplay:vn,changedFiles:Ot?.files,threadId:d.id,threadType:d.type,showMergeBaseDetails:Zt,mergeBaseBranch:Yt,mergeBaseBranchOptions:at,mergeBaseBranchOptionsLoading:it,onMergeBaseBranchChange:Zt?Xt:void 0,onOpenChange:e=>{e||en.threadGitActionDialog.onClose()},onCommit:en.handleCommitThread,onSquashMerge:en.handleSquashMergeThread}):null]})}function mGe(e){let t=new Map,n=TE({debounceMs:e.debounceMs,maxWaitMs:e.maxWaitMs,onFlush:()=>{t.size!==0&&(e.flushChangedEnvironmentIds(Array.from(t.entries()).map(([e,t])=>({changeKinds:Array.from(t),environmentId:e}))),t.clear())}});return{dispose:()=>{n.dispose(),t.clear()},markChanged:(e,r)=>{let i=t.get(e);i||(i=new Set,t.set(e,i));for(let e of r)i.add(e);n.schedule()}}}var hGe=50,gGe=200,_Ge=250,vGe=500;function yGe(e,t){return e?t?Array.from(new Set([...e,...t])):e:t}function bGe(e,t){let n=yGe(e?.eventTypes,t.eventTypes),r=t.hasPendingInteraction??e?.hasPendingInteraction,i=t.projectId??e?.projectId,a={};return n&&(a.eventTypes=n),r!==void 0&&(a.hasPendingInteraction=r),i!==void 0&&(a.projectId=i),a}function xGe(){return{changedThreadKinds:new Map,globalChangeKinds:new Set,metadataByThreadId:new Map}}function Q9(e){e.changedThreadKinds.clear(),e.globalChangeKinds.clear(),e.metadataByThreadId.clear()}function SGe({environmentId:e,queryClient:t}){let n=new Set;for(let[,r]of t.getQueriesData({queryKey:HO()}))r?.environmentId===e&&n.add(r.id);for(let{data:r}of QP(t,{queryKey:RO()}))for(let t of ZP(r))t.environmentId===e&&n.add(t.id);return Array.from(n)}function CGe({changes:e,state:t,threadId:n}){let r=t.changedThreadKinds.get(n);r||(r=new Set,t.changedThreadKinds.set(n,r));for(let t of e)r.add(t)}function wGe(e,t){for(let n of t.globalChangeKinds)dF({context:{eventTypes:void 0,hasPendingInteraction:void 0,projectId:void 0,queryClient:e,threadId:void 0},handlers:lF[n].dirty});for(let[n,r]of t.changedThreadKinds){let i=t.metadataByThreadId.get(n);for(let t of r)dF({context:{hasPendingInteraction:i?.hasPendingInteraction,eventTypes:i?.eventTypes,projectId:i?.projectId,queryClient:e,threadId:n},handlers:lF[t].dirty})}Q9(t)}function TGe(e,t){if(t.entity===`thread`){if(t.id){CGe({changes:t.changes,state:e,threadId:t.id}),t.metadata&&e.metadataByThreadId.set(t.id,bGe(e.metadataByThreadId.get(t.id),t.metadata));return}for(let n of t.changes)e.globalChangeKinds.add(n)}}function EGe({changeKinds:e,environmentId:t,queryClient:n}){for(let r of e)dF({context:{environmentId:t,getCachedThreadIdsForEnvironment:()=>SGe({environmentId:t,queryClient:n}),queryClient:n},handlers:Hye[r].dirty})}function DGe({queryClient:e}){let t=xGe(),n=TE({debounceMs:hGe,maxWaitMs:gGe,onFlush:()=>wGe(e,t)}),r=mGe({debounceMs:_Ge,flushChangedEnvironmentIds:t=>{for(let{changeKinds:n,environmentId:r}of t)EGe({changeKinds:n,environmentId:r,queryClient:e})},maxWaitMs:vGe});return{dispose:()=>{n.dispose(),r.dispose(),Q9(t)},handleChanged:i=>{switch(i.entity){case`thread`:TGe(t,i),fF(i.changes)?n.flush():n.schedule();break;case`environment`:i.id&&r.markChanged(i.id,i.changes);break;case`host`:for(let t of i.changes)dF({context:{queryClient:e},handlers:Wye[t].dirty});break;case`project`:for(let t of i.changes)dF({context:{projectId:i.id,queryClient:e},handlers:Uye[t].dirty});break;case`system`:for(let t of i.changes)dF({context:{queryClient:e},handlers:Gye[t].dirty});break;default:jD(i)}},handleConnected:({reconnected:t})=>{if(t){aI({queryClient:e});return}oI({queryClient:e})}}}function OGe(){let e=et();(0,L.useEffect)(()=>{let t=DGe({queryClient:e}),n=TD.onConnected(t.handleConnected),r=TD.onChanged(t.handleChanged);return TD.connect(),TD.subscribe(`thread`),TD.subscribe(`project`),TD.subscribe(`environment`),TD.subscribe(`host`),TD.subscribe(`system`),()=>{t.dispose(),n(),r(),TD.unsubscribe(`thread`),TD.unsubscribe(`project`),TD.unsubscribe(`environment`),TD.unsubscribe(`host`),TD.unsubscribe(`system`)}},[e])}function kGe(){return(0,R.jsx)(Rje,{children:(0,R.jsxs)(mh,{children:[(0,R.jsx)(fh,{path:`/`,element:(0,R.jsx)(Wje,{})}),(0,R.jsx)(fh,{path:z9,element:(0,R.jsx)(oPe,{})}),null,(0,R.jsx)(fh,{path:B9,element:(0,R.jsx)(PNe,{})}),(0,R.jsx)(fh,{path:V9,element:(0,R.jsx)(HNe,{})}),(0,R.jsx)(fh,{path:H9,element:(0,R.jsx)(dPe,{})}),(0,R.jsx)(fh,{path:U9,element:(0,R.jsx)(KNe,{})}),(0,R.jsx)(fh,{path:W9,element:(0,R.jsx)(pGe,{})}),(0,R.jsx)(fh,{path:`*`,element:(0,R.jsx)(dh,{to:`/`,replace:!0})})]})})}function AGe(){return OGe(),(0,R.jsx)(lje,{children:(0,R.jsxs)(mh,{children:[(0,R.jsx)(fh,{path:R9,element:(0,R.jsx)(Bje,{})}),(0,R.jsx)(fh,{path:`*`,element:(0,R.jsx)(kGe,{})})]})})}function jGe(e){return(0,R.jsx)(kL,{...e})}function MGe(e){return(0,R.jsx)(jGe,{theme:gJ(),...e})}var NGe=8,$9=1;function PGe(){let e=typeof navigator<`u`?navigator.hardwareConcurrency:void 0;return e===void 0||e<=2?$9:Math.max($9,Math.min(NGe,e-1))}function FGe(){return new Worker(new URL(`/assets/worker-portable-CA4_6zkQ.js`,``+import.meta.url),{name:`pierre-diffs-worker`})}function IGe(e={}){let t=e.defaultOptions,n=e.showMutationErrorToasts??!0;return new Xe({mutationCache:new Ue({onError:(e,t,r,i)=>{if(!n)return;let a=qL(i.meta);a.showErrorToast!==!1&&XL({error:e,fallbackMessage:a.errorMessage??`Request failed.`})}}),defaultOptions:{...t,queries:{staleTime:2e3,refetchOnWindowFocus:!0,retry:0,...t?.queries}}})}var LGe=IGe();YEe(),(0,xs.createRoot)(document.getElementById(`root`)).render((0,R.jsx)(L.StrictMode,{children:(0,R.jsxs)(tt,{client:LGe,children:[(0,R.jsx)(op,{poolOptions:{workerFactory:FGe,poolSize:PGe()},highlighterOptions:{},children:(0,R.jsx)(Nh,{children:(0,R.jsx)(AGe,{})})}),(0,R.jsx)(MGe,{position:`bottom-right`})]})}));export{c as t};
|
|
3589
|
+
{{/if}}`,fileName:`thread-operation-squash-merge-conflict-follow-up.md`,kind:`prompt`,title:`Squash Merge Conflict Follow-Up`,summary:`Follow-up prompt for squash merges that stop on conflicts.`,intent:`Tell the agent to rebase onto the merge base, resolve the conflicts, and retry the squash merge.`,editingNotes:`Keep this concise and procedural. Conflict file details are optional context and should stay additive.`,variables:{mergeBaseBranch:`Merge base branch name shown to the agent.`,conflictFiles:`Optional comma-separated file list.`}}];function fWe(e){return w9.some(t=>t.id===e)}function pWe(){let e=w9.map(e=>{if(!fWe(e.id))throw Error(`Unknown generated template id: ${e.id}`);return[e.id,{...e,id:e.id,kind:e.kind}]});return Object.fromEntries(e)}var T9=pWe(),E9=!1;function mWe(){if(!E9){for(let e of Object.values(T9))C9.default.registerPartial(e.id,e.body);E9=!0}}var D9=new Map;function hWe(e){let t=D9.get(e);if(t)return t;let n=C9.default.compile(T9[e].body,{noEscape:!0});return D9.set(e,n),n}function O9(e,t){return mWe(),hWe(e)(t).trim()}function gWe(e,t){let n=t?.conflictFiles?.filter(e=>e.trim().length>0)??[];return O9(`threadOperationSquashMergeConflictFollowUp`,{mergeBaseBranch:e.options.mergeBaseBranch.trim(),conflictFiles:n.length>0?n.join(`, `):void 0})}function _We(e,t){let n=e.options.mergeBaseBranch.trim(),r=t.errorMessage?.trim()||void 0;switch(t.stage){case`prep_commit`:return O9(`threadOperationSquashMergeCommitFailureFollowUp`,{prepCommitMergeBaseBranch:n,errorMessage:r});case`squash_commit`:return O9(`threadOperationSquashMergeCommitFailureFollowUp`,{squashCommitMergeBaseBranch:n,errorMessage:r});default:return jD(t.stage)}}function vWe(e){return O9(`threadOperationCommitFailureFollowUp`,{errorMessage:e?.errorMessage?.trim()||void 0})}var yWe=7;function k9(e){if(!(e instanceof JD)||typeof e.body!=`object`||e.body===null||!(`details`in e.body))return;let t=gD.safeParse(e.body.details);return t.success?t.data:void 0}function bWe(e){switch(e.kind){case`commit_failed`:return e.errorMessage;case`squash_merge_conflict`:return e.conflictFiles.length>0?`Conflicts: ${e.conflictFiles.join(`, `)}`:void 0;case`squash_merge_commit_failed`:return e.errorMessage;default:return}}function xWe({error:e,mergeBaseBranch:t}){let n=k9(e);if(n)switch(n.kind){case`commit_failed`:return[{type:`text`,text:vWe({errorMessage:n.errorMessage})}];case`squash_merge_conflict`:return t?[{type:`text`,text:gWe({action:`squash_merge`,options:{mergeBaseBranch:t}},{conflictFiles:n.conflictFiles})}]:void 0;case`squash_merge_commit_failed`:return t?[{type:`text`,text:_We({action:`squash_merge`,options:{mergeBaseBranch:t}},{stage:n.stage,errorMessage:n.errorMessage})}]:void 0;default:return}}function SWe({error:e,mergeBaseBranch:t}){let n=k9(e);return{message:(n?bWe(n):void 0)??JL({error:e,fallbackMessage:`Failed to start git action.`}),askAgentInput:xWe({error:e,mergeBaseBranch:t})}}function CWe(e){switch(e){case`commit`:return`Commit created`;case`squash_merge`:return`Squash merge completed`;default:return e}}function wWe(e){switch(e){case`commit`:return`Commit failed`;case`squash_merge`:return`Squash merge failed`;default:return e}}function TWe({commitSha:e,commitSubject:t}){return`${e.slice(0,yWe)} · ${t}`}function A9({response:e,toastId:t}){pL.success(CWe(e.action),{id:t,description:TWe({commitSha:e.commitSha,commitSubject:e.commitSubject})})}function j9({action:e,error:t,mergeBaseBranch:n,onAskAgentToFix:r,threadId:i,toastId:a}){let o=SWe({error:t,mergeBaseBranch:n}),s=o.askAgentInput,c=wWe(e),l=o.message===c?void 0:o.message;pL.error(c,{id:a,...l?{description:l}:{},...s?{action:{label:`Ask agent to fix`,onClick:()=>r({input:s,threadId:i})}}:{}})}function EWe({environment:e,requestEnvironmentAction:t,sendMessage:n,thread:r,workspaceStatus:i}){let a=vI(),o=i?.workingTree,s=i?.mergeBase,c=r?.type!==`manager`,l=r?.archivedAt!=null,u=e?.managed===!1,d=(0,L.useMemo)(()=>{if(!r||!c||!i||l)return[];let t=[],n=o?.hasUncommittedChanges===!0,a=s?.hasCommittedUnmergedChanges===!0;return u?(n&&t.push({target:{kind:`commit`},label:`Commit`}),t):(e?.managed&&(n&&t.push({target:{kind:`commit`},label:`Commit`}),(n||a)&&t.push({target:{kind:n?`commit_and_squash_merge`:`squash_merge`},label:`Squash merge`})),t)},[c,e?.managed,l,u,r,s?.hasCommittedUnmergedChanges,i,o?.hasUncommittedChanges]),f=(0,L.useCallback)(async({input:e,threadId:t})=>{if(n.isPending)return;let r=pL.loading(`Sending message...`);try{await n.mutateAsync({id:t,input:e,mode:`auto`}),pL.success(`Message sent to agent`,{id:r})}catch(e){pL.error(`Failed to message agent`,{id:r,description:JL({error:e,fallbackMessage:`Message was not sent.`})})}},[n]);return{handleAskAgentToFixGitAction:f,handleCommitThread:(0,L.useCallback)(async()=>{let e=r?.environmentId;if(!r||!e)return;let n=r.id,i=pL.loading(`Creating commit...`);try{let n=await t.mutateAsync({id:e,action:`commit`});if(n.action!==`commit`)throw Error(`Expected commit action response.`);A9({response:n,toastId:i})}catch(e){j9({action:`commit`,error:e,onAskAgentToFix:e=>void f(e),threadId:n,toastId:i})}},[f,t,r]),handleSquashMergeThread:(0,L.useCallback)(async({mergeBaseBranch:e})=>{let n=r?.environmentId;if(!r||!n)return;let i=r.id,a=pL.loading(`Squash merging...`);try{let r=await t.mutateAsync({id:n,action:`squash_merge`,options:{mergeBaseBranch:e}});if(r.action!==`squash_merge`)throw Error(`Expected squash merge action response.`);A9({response:r,toastId:a})}catch(t){j9({action:`squash_merge`,error:t,onAskAgentToFix:e=>void f(e),mergeBaseBranch:e,threadId:i,toastId:a})}},[f,t,r]),isThreadGitActionPending:t.isPending,threadGitActionDialog:a,threadHeaderGitActions:d}}function DWe({markThreadRead:e,thread:t}){let n=(0,L.useRef)(new Set);(0,L.useEffect)(()=>{if(!t||$I(t))return;let r=`${t.id}:${t.latestAttentionAt}`;n.current.has(r)||(n.current.add(r),e.mutate(t.id,{onError:()=>{n.current.delete(r)}}))},[e,t])}function OWe(e){return e.lastReadAt===null?{kind:`before-first`}:e.lastReadAt<e.latestAttentionAt?{kind:`after-cutoff`,cutoffAt:e.lastReadAt}:null}function kWe({routeThreadId:e,thread:t,useStandardManagerTimeline:n}){let[r,i]=(0,L.useState)(null),a=t?.id,o=t?.lastReadAt,s=t?.latestAttentionAt,c=t?.type;return(0,L.useEffect)(()=>{if(a===void 0||o===void 0||s===void 0||c===void 0||e!==a||c!==`manager`||n){i(null);return}let t={id:a,lastReadAt:o,latestAttentionAt:s,type:c};i(e=>e?.threadId===a&&e.attentionAt===s?o===null?{attentionAt:s,placement:{kind:`before-first`},threadId:a}:e:{attentionAt:s,placement:OWe(t),threadId:a})},[e,a,o,s,c,n]),a===void 0||e!==a||c!==`manager`||n||r?.threadId!==a||r.attentionAt!==s?null:r.placement}function AWe({managerTimelineView:e,threadId:t}){return`${t}:${e??`default`}`}function M9({latestRows:e,olderCursor:t,surfaceKey:n}){return{olderCursor:t,rows:[...e],surfaceKey:n}}function jWe({left:e,right:t}){return e===null||t===null?e===t:e.anchorSeq===t.anchorSeq&&e.anchorId===t.anchorId}function N9(e,t){let n=new Set(e.map(e=>e.id));for(let r of t)n.has(r.id)||(n.add(r.id),e.push(r))}function MWe({loadedRows:e,olderRows:t}){let n=[];return N9(n,t),N9(n,e),n}function P9({latestRows:e,loadedRows:t}){if(t.length===0)return{hasLatestOverlap:!1,rows:[...e]};let n=new Set(e.map(e=>e.id)),r=t.findIndex(e=>n.has(e.id));if(r===-1){let n=[...t];return N9(n,e),{hasLatestOverlap:!1,rows:n}}return{hasLatestOverlap:!0,rows:[...t.slice(0,r),...e]}}function NWe({current:e,latestTimeline:t,surfaceKey:n}){if(e.surfaceKey!==n||e.rows.length===0&&e.olderCursor===null)return M9({latestRows:t.rows,olderCursor:t.timelinePage.olderCursor,surfaceKey:n});let r=P9({latestRows:t.rows,loadedRows:e.rows});return{...e,olderCursor:e.olderCursor,rows:r.rows}}function PWe({current:e,latestTimeline:t,surfaceKey:n}){if(e.surfaceKey!==n)return M9({latestRows:t.rows,olderCursor:t.timelinePage.olderCursor,surfaceKey:n});let r=P9({latestRows:t.rows,loadedRows:e.rows});return{olderCursor:t.timelinePage.olderCursor,rows:r.rows,surfaceKey:n}}function FWe(e){return e instanceof JD&&e.status===400&&e.code===`invalid_request`}function IWe({managerTimelineView:e,threadId:t}){let n=Dje(t,{refetchOnMount:`always`,managerTimelineView:e}),r=AWe({managerTimelineView:e,threadId:t}),[i,a]=(0,L.useState)(()=>M9({latestRows:[],olderCursor:null,surfaceKey:r})),[o,s]=(0,L.useState)(!1),c=n.data;(0,L.useEffect)(()=>{if(!c){a(e=>e.surfaceKey===r?e:M9({latestRows:[],olderCursor:null,surfaceKey:r}));return}a(e=>NWe({current:e,latestTimeline:c,surfaceKey:r}))},[c,r]);let l=n.refetch,u=i.surfaceKey===r?i.olderCursor:null,d=u!==null,f=(0,L.useCallback)(async()=>{if(!(!u||!t||o)){s(!0);try{let n=await rO({beforeCursor:u,id:t,managerTimelineView:e});a(e=>e.surfaceKey===r?{olderCursor:jWe({left:e.olderCursor,right:u})?n.timelinePage.olderCursor:e.olderCursor,rows:MWe({loadedRows:e.rows,olderRows:n.rows}),surfaceKey:r}:e)}catch(e){if(!(e instanceof Error)||!FWe(e))throw e;let t=(await l()).data??c;a(e=>e.surfaceKey===r?t?PWe({current:e,latestTimeline:t,surfaceKey:r}):{...e,olderCursor:null}:e)}finally{s(!1)}}},[o,c,e,u,l,r,t]);return{activeThinking:c?.activeThinking??null,contextWindowUsage:c?.contextWindowUsage,hasOlderTimelineRows:d,isLoadingOlderTimelineRows:o,loadOlderTimelineRows:f,pendingTodos:c?.pendingTodos??null,timelineError:n.error,timelineLoading:n.isLoading,timelineRows:i.surfaceKey===r&&i.rows.length>0?i.rows:c?.rows??[]}}function F9(e){if(!e.rootPath||!e.canOpenPreferredTarget)return;let t=e.rootPath;return n=>{e.openInPreferredTarget({lineNumber:null,path:_$({path:n,rootPath:t})})}}function LWe(e){return e.file.status===`A`||e.file.status===`??`?{kind:`preview`,source:{kind:`working-tree`},statusLabel:null}:e.file.status===`D`?e.section.kind===`committed`?e.section.mergeBaseRef?{kind:`preview`,source:{kind:`merge-base`,ref:e.section.mergeBaseRef},statusLabel:`deleted`}:{kind:`diff`}:{kind:`preview`,source:{kind:`head`},statusLabel:`deleted`}:{kind:`diff`}}function I9(e){return e.threadEnvironmentIsLocal?e.environment?.path??null:null}function RWe(e){return!e.canOpenWorkspace||!e.hasWorkspaceOpenTargets?null:I9({environment:e.environment,threadEnvironmentIsLocal:e.threadEnvironmentIsLocal})}var L9=`/auth/callback`,R9=`/settings`,z9=`/projects/:projectId`,B9=`/projects/:projectId/managers/new`,V9=`/projects/:projectId/settings`,H9=`/projects/:projectId/archived`,U9=`/projects/:projectId/threads/:threadId`,zWe=[`/`,L9,R9,z9,B9,V9,H9,U9],BWe=`Thread file links are only available when the thread has an environment.`,VWe=`Thread file links must use absolute file paths.`;function HWe(e){return zWe.some(t=>Sm(t,e)!==null)}function W9(e){if(!e.startsWith(`/`))return null;let t=[];for(let n of e.split(`/`))if(!(n.length===0||n===`.`)){if(n===`..`){t.length>0&&t.pop();continue}t.push(n)}return t.length===0?`/`:`/${t.join(`/`)}`}function UWe(e){let t=W9(e.workspaceRootPath);if(!t)return null;let n=W9(e.linkPath);return!n||!WWe({candidatePath:n,workspaceRootPath:t})||n===t?null:{path:n,relativePath:t===`/`?n.slice(1):n.slice(t.length+1),workspaceRootPath:t}}function WWe(e){return e.workspaceRootPath===`/`?e.candidatePath.startsWith(`/`):e.candidatePath===e.workspaceRootPath||e.candidatePath.startsWith(`${e.workspaceRootPath}/`)}function GWe(e){if(HWe(e.link.path))return{kind:`app-route`};let t=W9(e.link.path);if(!t)return{description:VWe,kind:`error`};let n=e.workspaceRootPath===null?null:UWe({linkPath:t,workspaceRootPath:e.workspaceRootPath});return n?{kind:`open-workspace-path`,request:{lineNumber:e.link.lineNumber,path:n.path,relativePath:n.relativePath,workspaceRootPath:n.workspaceRootPath}}:e.hostFileLinksAvailable?{kind:`open-host-path`,request:{lineNumber:e.link.lineNumber,path:t}}:{description:BWe,kind:`error`}}function KWe({terminalId:e,threadId:t}){return`/ws/threads/${encodeURIComponent(t)}/terminals/${encodeURIComponent(e)}`}function qWe(e){let t=KWe(e);if(typeof __BB_DEV_WS_URL__==`string`){let e=new URL(__BB_DEV_WS_URL__);return e.pathname=t,e.search=``,e.hash=``,e.toString()}return`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}${t}`}var JWe=`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace`;function YWe(e,t){let n=getComputedStyle(document.documentElement).getPropertyValue(t).trim();if(n)return e.style.color=n,getComputedStyle(e).color}function G9(){if(typeof document>`u`)return{};let e=document.createElement(`span`);e.style.position=`absolute`,e.style.visibility=`hidden`,e.style.pointerEvents=`none`,document.body.appendChild(e);let t=t=>YWe(e,t),n={background:t(`--background`),foreground:t(`--foreground`),cursor:t(`--foreground`),cursorAccent:t(`--background`),selectionBackground:t(`--muted`),black:t(`--ansi-0`),red:t(`--ansi-1`),green:t(`--ansi-2`),yellow:t(`--ansi-3`),blue:t(`--ansi-4`),magenta:t(`--ansi-5`),cyan:t(`--ansi-6`),white:t(`--ansi-7`),brightBlack:t(`--ansi-8`),brightRed:t(`--ansi-9`),brightGreen:t(`--ansi-10`),brightYellow:t(`--ansi-11`),brightBlue:t(`--ansi-12`),brightMagenta:t(`--ansi-13`),brightCyan:t(`--ansi-14`),brightWhite:t(`--ansi-15`)};return e.remove(),n}function XWe(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n)}function ZWe(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e+=1)n[e]=t.charCodeAt(e);return new TextDecoder().decode(n)}function K9({socket:e,terminal:t}){e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({type:`resize`,cols:t.cols,rows:t.rows}))}function q9({terminal:e,text:t}){e.write(`\r\n\x1b[2m${t}\x1b[0m\r\n`)}function QWe({isReplay:e,replayWriteState:t,terminal:n,text:r}){if(!e){n.write(r);return}t.suppressedWriteCount+=1,n.write(r,()=>{--t.suppressedWriteCount})}function $We({message:e,replayNextSeq:t,replayWriteState:n,setReplayNextSeq:r,terminal:i}){switch(e.type){case`attached`:r(e.nextSeq);return;case`pong`:case`session-updated`:return;case`output`:QWe({isReplay:t!==null&&e.chunk.seq<t,replayWriteState:n,terminal:i,text:ZWe(e.chunk.dataBase64)});return;case`error`:q9({terminal:i,text:`Terminal error: ${e.message}`});return;case`exited`:q9({terminal:i,text:e.session.exitCode===null?`Terminal exited`:`Terminal exited with code ${e.session.exitCode}`});return}}function eGe({onTitleChange:e,onUserInput:t,session:n,threadId:r}){let i=(0,L.useRef)(null),a=(0,L.useRef)(null),o=(0,L.useRef)(e),s=(0,L.useRef)(t),c=gJ();return o.current=e,s.current=t,(0,L.useEffect)(()=>{let e=i.current;if(!e)return;let t=!1,c=null,l=null,u=null,d=null,f={suppressedWriteCount:0},p=null;async function m(e){let[{Terminal:i},{FitAddon:m},{WebLinksAddon:h}]=await Promise.all([z(()=>import(`./xterm-CCMwI7sy.js`),[]),z(()=>import(`./addon-fit-aSh7YPML.js`),[]),z(()=>import(`./addon-web-links-3MKUhX9m.js`),[])]);if(t)return;l=new i({allowProposedApi:!1,convertEol:!0,cursorBlink:!0,fontFamily:JWe,fontSize:12,scrollback:1e4,theme:G9()}),a.current=l,u=new m,l.loadAddon(u),l.loadAddon(new h),l.open(e),u.fit(),c=new WebSocket(qWe({terminalId:n.id,threadId:r}));let g=c,_=l;g.onopen=()=>{K9({socket:g,terminal:_})},g.onmessage=e=>{if(typeof e.data!=`string`)return;let t;try{t=JSON.parse(e.data)}catch{return}let n=Qde.safeParse(t);n.success&&$We({message:n.data,replayNextSeq:d,replayWriteState:f,setReplayNextSeq:e=>{d=e},terminal:_})},g.onclose=()=>{t||q9({terminal:_,text:`Terminal connection closed`})},_.onData(e=>{f.suppressedWriteCount>0||g.readyState===WebSocket.OPEN&&(s.current?.(),g.send(JSON.stringify({type:`input`,dataBase64:XWe(e)})))}),_.onTitleChange(e=>{f.suppressedWriteCount>0||o.current?.(e)}),p=new ResizeObserver(()=>{!u||!l||!c||(u.fit(),K9({socket:c,terminal:l}))}),p.observe(e)}return m(e).catch(n=>{t||(e.textContent=n instanceof Error?n.message:String(n))}),()=>{t=!0,p?.disconnect(),c?.close(),l?.dispose(),a.current=null}},[n.id,r]),(0,L.useEffect)(()=>{let e=a.current;e&&(e.options.theme=G9())},[c]),(0,R.jsx)(`div`,{ref:i,className:`h-full min-h-0 w-full overflow-hidden bg-background p-2`})}var tGe=100,nGe=30,rGe=[],J9=200,Y9=3,iGe=250;function aGe(e){return e.status!==`exited`}function oGe({title:e}){let t=e.trim();if(!t)return null;let n=sGe({title:t});return n===null?t.slice(0,J9):lGe({path:n.path}).slice(0,J9)}function sGe({title:e}){let t=/^[^@\s:]+@[^:\s]+:(.+)$/u.exec(e)?.[1];return!t||!cGe({path:t})?null:{path:t}}function cGe({path:e}){return e===`~`||e===`.`||e.startsWith(`~/`)||e.startsWith(`/`)||e.startsWith(`./`)}function lGe({path:e}){if(e===`/`||e===`~`||e===`.`)return e;let t=e.split(`/`).filter(e=>e.length>0);return t.length<=Y9?e:`.../${t.slice(-Y9).join(`/`)}`}function uGe(e,t){return t&&e.some(e=>e.id===t)?t:e[0]?.id??null}function X9(e){switch(e.status){case`starting`:return`starting`;case`running`:return`running`;case`disconnected`:return`disconnected`;case`exited`:return`exited`}}function dGe({canCreateTerminal:e,threadId:t}){let n=W2(t),r=G2(t),i=xFe(t),a=(0,L.useRef)(new Set),o=(0,L.useRef)(new Set),s=(0,L.useRef)(n.isOpen),c=(0,L.useRef)(null),l=(0,L.useRef)(null),[u,d]=(0,L.useState)(!1),f=u4(t,{enabled:n.isOpen}),p=cIe(),m=uIe(),h=lIe(),g=f.data?.sessions??rGe,_=(0,L.useMemo)(()=>g.filter(aGe),[g]),v=(0,L.useMemo)(()=>uGe(_,n.activeTerminalId),[n.activeTerminalId,_]),y=_.find(e=>e.id===v)??null;(0,L.useEffect)(()=>{n.activeTerminalId!==v&&r(e=>({...e,activeTerminalId:v}))},[v,n.activeTerminalId,r]),(0,L.useEffect)(()=>{let e=s.current;if(s.current=n.isOpen,!n.isOpen){d(!1);return}e||d(!0)},[n.isOpen]),(0,L.useEffect)(()=>()=>{l.current!==null&&window.clearTimeout(l.current)},[]);let b=(0,L.useCallback)(()=>{!e||p.isPending||p.mutate({threadId:t,cols:tGe,rows:nGe},{onSuccess:e=>{r(t=>({...t,activeTerminalId:e.id}))}})},[e,p,t,r]);(0,L.useEffect)(()=>{if(u){if(!n.isOpen||!e||f.error){d(!1);return}if(!(p.isPending||f.isLoading)){if(_.length>0){d(!1);return}d(!1),b()}}},[e,p.isPending,n.isOpen,u,b,f.error,f.isLoading,_.length]),(0,L.useEffect)(()=>{if(!n.isOpen)for(let e of _)e.lastUserInputAt!==null||a.current.has(e.id)||o.current.has(e.id)||(o.current.add(e.id),m.mutate({mode:`if-clean`,threadId:t,terminalId:e.id},{onSettled:()=>{o.current.delete(e.id)}}))},[m,n.isOpen,t,_]);let x=(0,L.useCallback)(()=>{b()},[b]),S=(0,L.useCallback)(e=>{r(t=>({...t,activeTerminalId:e,isOpen:!0}))},[r]),C=(0,L.useCallback)(e=>{m.mutate({mode:`force`,threadId:t,terminalId:e},{onSuccess:()=>{a.current.delete(e),o.current.delete(e)}})},[m,t]),w=(0,L.useCallback)(()=>{v&&a.current.add(v)},[v]),T=(0,L.useCallback)(e=>{if(!y||y.status!==`running`)return;let n=oGe({title:e});if(!n||n===y.title)return;let r={terminalId:y.id,title:n},i=c.current;i!==null&&i.terminalId===r.terminalId&&i.title===r.title||(c.current=r,l.current!==null&&window.clearTimeout(l.current),l.current=window.setTimeout(()=>{l.current=null,h.mutate({threadId:t,terminalId:r.terminalId,title:r.title},{onSettled:()=>{let e=c.current;e!==null&&e.terminalId===r.terminalId&&e.title===r.title&&(c.current=null)}})},iGe))},[y,h,t]),E=p.isPending||e&&n.isOpen&&u,D=E?`Starting terminal...`:`No terminals`,O=E?e?`Starting terminal...`:`Terminals unavailable.`:`No terminals`,k=_,A=f.isLoading||k.length===0&&E,j=y?y.status===`running`?(0,R.jsx)(eGe,{onTitleChange:T,onUserInput:w,session:y,threadId:t}):(0,R.jsxs)(`div`,{className:`flex h-full items-center justify-center px-4 text-center text-sm text-muted-foreground`,children:[`Terminal `,X9(y),`.`]}):(0,R.jsx)(`div`,{className:`flex h-full items-center justify-center px-4 text-center text-sm text-muted-foreground`,children:O});return(0,R.jsxs)(`section`,{"aria-label":`Thread terminals`,className:`flex h-full min-h-0 min-w-0 flex-col bg-background`,children:[(0,R.jsxs)(`div`,{className:`flex h-10 min-h-10 items-center gap-2 bg-background px-3`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1 overflow-x-auto`,role:`tablist`,"aria-label":`Terminal sessions`,children:[f.isLoading?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(ov,{className:`h-6 w-28 shrink-0 rounded-md`}),(0,R.jsx)(ov,{className:`h-6 w-24 shrink-0 rounded-md`})]}):k.length>0?k.map(e=>(0,R.jsx)(fGe,{session:e,isActive:e.id===v,isClosing:m.isPending&&m.variables?.terminalId===e.id,onSelect:()=>S(e.id),onClose:()=>C(e.id)},e.id)):A?(0,R.jsx)(`p`,{className:`shrink-0 text-xs text-muted-foreground`,children:D}):null,(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:`h-7 w-7 shrink-0 rounded-md p-0 text-muted-foreground`,disabled:!e||p.isPending,onClick:x,"aria-label":`New terminal`,title:`New terminal`,children:p.isPending?(0,R.jsx)(V,{name:`Spinner`,className:`size-3.5 animate-spin`}):(0,R.jsx)(V,{name:`Plus`,className:`size-3.5`})})]}),(0,R.jsx)(O_,{type:`button`,variant:`ghost`,size:`icon`,className:`h-7 w-7 shrink-0 rounded-md p-0 text-muted-foreground`,onClick:()=>i(!1),"aria-label":`Close terminal panel`,title:`Close terminal panel`,children:(0,R.jsx)(V,{name:`X`,className:`size-3.5`})})]}),(0,R.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden bg-background`,children:f.error?(0,R.jsx)(`div`,{className:`flex h-full items-center justify-center px-4 text-center text-sm text-destructive`,children:`Failed to load terminals.`}):j})]})}function fGe({isActive:e,isClosing:t,onClose:n,onSelect:r,session:i}){let a=X9(i);return(0,R.jsx)(z4,{label:i.title,secondaryLabel:i.status===`running`?null:a,title:`${i.title} (${a})`,isActive:e,onSelect:r,closeAction:{onClose:n,closeLabel:`Close ${i.title}`,closeTooltip:`Close terminal`,isClosing:t}})}var pGe=[];function mGe(e){let t=e.runtime.displayStatus;return t!==`host-reconnecting`&&t!==`waiting-for-host`?null:{label:t===`host-reconnecting`?`Host daemon disconnected. Waiting for reconnection...`:`Host daemon disconnected`,tone:t===`host-reconnecting`?`pending`:`error`}}function hGe(){let{projectId:e,threadId:t}=eh();ZPe(t),QPe(t),bFe(t);let n=L2(t),r=W2(t),i=n.activePanel,a=E_(),o=tFe(t),s=t0(t??``),c=s.isSuccess||s.isError,l=SFe(t),u=G2(t),{data:d,isFetching:f,isLoadingError:p,isPlaceholderData:m,error:h}=e0(t??``,{enabled:c,refetchOnMount:s.isSuccess?!0:`always`}),g=AD({hasResolvedData:d!==void 0&&!m,isFetching:s.isFetching||f,isLoadingError:p}),_=yje(d?.id??``,{enabled:g.status===`ready`&&!!d?.id,environmentId:d?.environmentId??void 0}),v=_.isSuccess||_.isError,y=_.isSuccess?1e4:void 0,{data:b}=e0(d?.parentThreadId??``),{data:x=[]}=Cje(d?.id??``,{enabled:v,refetchOnMount:_.isSuccess?!1:`always`,staleTime:y}),S=n0(x)!==null,C=d?.type===`manager`,w=d?.type===`standard`,[T,E]=gIe(),D=C&&T,O=D?`standard`:void 0,k=kWe({routeThreadId:t,thread:d,useStandardManagerTimeline:D}),[A,j]=(0,L.useState)(!1),M=i!==null,N=M&&C,{isThreadStorageFilePreviewLoading:P,isThreadStorageFilesLoading:ee,threadStorageFilePreview:F,threadStorageFilePreviewError:te,threadStorageFiles:ne,threadStorageFilesError:re,threadStorageRootPath:ie}=gUe({activePath:C?j2(n):null,fileListEnabled:N,filePreviewEnabled:M,threadId:t,threadType:d?.type}),{activateHostFileTab:ae,activateStorageFileTab:oe,activateWorkspaceFileTab:I,activeHostFileLineNumber:se,activeHostFilePath:ce,activeStorageFilePath:le,activeWorkspaceFileLineNumber:ue,activeWorkspaceFilePath:de,activeWorkspaceFileSource:fe,activeWorkspaceFileStatusLabel:pe,clearActiveFileTabs:me,closeHostFileTab:he,closeStorageFileTab:ge,closeWorkspaceFileTab:_e,openHostFile:ve,openHostFileTabs:ye,openStorageFile:be,openStorageFilePaths:xe,openWorkspaceFile:Se,openWorkspaceFileTabs:Ce}=FUe({threadId:t,environmentId:d?.environmentId,threadType:d?.type,storageFiles:ne?.files}),we=kUe({files:ne?.files,onSelectPath:be,selectedPath:le}),Te=(0,L.useCallback)(e=>{C&&E(e)},[C,E]),Ee=HHe(d),De=g.status===`ready`&&Ee,Oe=$1({archived:!1,projectId:e,type:`manager`},{enabled:De}).data??pGe,{activeThinking:ke,contextWindowUsage:Ae,hasOlderTimelineRows:je,isLoadingOlderTimelineRows:Me,loadOlderTimelineRows:Ne,pendingTodos:Pe,timelineError:Fe,timelineLoading:Ie,timelineRows:Le}=IWe({managerTimelineView:O,threadId:t??``}),Re=yNe(),ze=CFe(),Be=RL(),Ve=wFe(),He=PL(),Ue=Sg(Zhe),We=u4(t??``,{enabled:Ue}),Ge=(0,L.useMemo)(()=>We.data?.sessions.filter(e=>e.status!==`exited`).length??0,[We.data]),Ke=(0,L.useMemo)(()=>d?mGe(d):null,[d]),qe=AFe(d?.environmentId,{enabled:c,staleTime:5e3}),Je=qe.data,Ye=Je?.mergeBaseBranch??Je?.defaultBranch??void 0,{data:Xe,error:Ze,isLoading:Qe}=MFe(d?.environmentId,de,fe),{data:$e,error:et,isLoading:tt}=Eje(d?.id??``,d?.environmentId,ce,{enabled:M&&ce!==null}),{closeThreadSecondaryPanel:nt,defaultMergeBaseBranch:rt,isLoadingMergeBaseBranchOptions:it,mergeBaseBranchOptions:at,openDiffFile:ot,openThreadDiffPanel:st,openThreadSecondaryPanel:ct,selectedMergeBaseBranch:lt,setSelectedMergeBaseBranch:ut,toggleThreadSecondaryPanel:dt}=vIe({clearActiveFileTabs:me,defaultMergeBaseBranch:Ye,environmentId:w?d?.environmentId??void 0:void 0,mergeBaseBranchOptionsEnabled:A,threadId:t}),{closePanel:ft,isOpen:pt,openDiffFile:mt,openDiffPanel:ht,openPanel:gt,togglePanel:_t}=hUe({activePanel:i,closePersistedPanel:nt,isCompactViewport:a,openPersistedDiffFile:ot,openPersistedDiffPanel:st,openPersistedPanel:ct,threadId:t,togglePersistedPanel:dt});(0,L.useEffect)(()=>{j(!1)},[d?.environmentId]);let vt=(0,L.useCallback)(e=>{e&&j(!0)},[]),yt=(0,L.useCallback)(e=>{me(),gt(e)},[me,gt]),bt=(0,L.useCallback)(e=>{let t=Math.round(e);u(e=>e.panelHeightPercent===t?e:{...e,panelHeightPercent:t})},[u]),xt=(0,L.useCallback)(e=>{let t=LWe(e);if(t.kind===`preview`){Se({lineNumber:null,path:e.file.path,source:t.source,statusLabel:t.statusLabel});return}mt(e.file.path)},[mt,Se]),St=(0,L.useMemo)(()=>{let e=Ce.map(e=>({id:`workspace:${e.path}`,filename:e.path.split(`/`).at(-1)??e.path,isActive:e.path===de,statusLabel:e.statusLabel,onSelect:()=>I(e.path),onClose:()=>_e(e.path)})),t=C?xe.map(e=>({id:`storage:${e}`,filename:e.split(`/`).at(-1)??e,isActive:e===le,isPinned:e===r9,statusLabel:null,onSelect:()=>oe(e),onClose:()=>ge(e)})):[],n=ye.map(e=>({id:`host-file:${e.path}`,filename:e.path.split(`/`).at(-1)??e.path,isActive:e.path===ce,statusLabel:null,onSelect:()=>ae(e.path),onClose:()=>he(e.path)})),r=[...e,...n,...t];return r.length>0?r:void 0},[ae,oe,I,ce,le,de,he,ge,_e,C,ye,xe,Ce]),Ct=lt??Ye,wt=q2(d?.environmentId,Ct,{enabled:w&&Je!==void 0}),Tt=wt.data,Et=wt.error,Dt=Et?void 0:Tt??void 0,Ot=Dt?.workingTree,kt=Dt?.branch,At=(0,L.useMemo)(()=>n4(Dt),[Dt]),{isLocalHost:jt}=iA(),Mt=Je?jt(Je.hostId):!1,Nt=I9({environment:Je,threadEnvironmentIsLocal:Mt}),{canOpenPreferredTarget:Pt,openPathInPreferredTarget:Ft,openPathInTarget:It,preferredTarget:Lt,workspaceOpenTargets:Rt}=aIe({enabled:Mt}),zt=s.isSuccess&&s.data.environment!==void 0&&s.data.environment!==null&&s.data.host===null,{data:Bt}=rNe(Je?.hostId,{enabled:!zt}),Vt=$1({archived:!1,projectId:e,parentThreadId:d?.id},{enabled:C&&!!d?.id}),Ht=(0,L.useMemo)(()=>{if(!d?.parentThreadId)return null;let t=`/projects/${e}/threads/${d.parentThreadId}`;return b===void 0?{managerName:`Manager ${d.parentThreadId.slice(0,8)}`,href:t}:b.type!==`manager`||b.archivedAt!==null||b.deletedAt!==null||b.projectId!==d.projectId?null:{managerName:ZI(b),href:t}},[b,e,d?.parentThreadId,d?.projectId]),Ut=(0,L.useMemo)(()=>{if(!C)return null;let t=(Vt.data??[]).filter(e=>NIe(e.runtime.displayStatus)).map(t=>({id:t.id,title:ZI(t),href:`/projects/${e}/threads/${t.id}`}));return t.length===0?null:{items:t}},[C,Vt.data,e]),Wt=Ie&&Le.length===0,{erroredTurnSummaryIds:Gt,handleLoadTurnSummaryRows:Kt,loadingTurnSummaryIds:qt,turnSummaryRowsById:Jt}=wIe({managerTimelineView:O,timelineRows:Le,threadId:t});DWe({markThreadRead:Be,thread:d});let{effectiveMergeBaseBranch:Yt,handleMergeBaseBranchChange:Xt,showBranchComparisonUi:Zt,showMergeBase:Qt,mergeBaseBranch:$t}=LUe({environment:Je,mergeBaseBranchOptions:at,selectedMergeBaseBranch:lt,setSelectedMergeBaseBranch:ut,thread:d,updateEnvironment:Ve,workspaceStatus:Dt}),en=EWe({environment:Je,requestEnvironmentAction:ze,sendMessage:Re,thread:d,workspaceStatus:Dt}),tn=d?.parentThreadId,nn=b?.title&&b.title.trim().length>0?b.title:tn,rn=(0,L.useMemo)(()=>J7({currentThreadId:d?.id,isManagerThread:C,managerThreads:Oe,parentThreadDisplayName:nn,parentThreadId:tn}),[C,Oe,nn,tn,d?.id]),an=(0,L.useCallback)(e=>{!d||He.isPending||He.mutate({id:d.id,parentThreadId:e})},[d,He]),on=(0,L.useCallback)(e=>{let t=GWe({hostFileLinksAvailable:d?.environmentId!==null&&d?.environmentId!==void 0,link:e,workspaceRootPath:Nt});return t.kind===`app-route`?!1:t.kind===`error`?(pL.error(`Failed to open file locally`,{description:t.description}),!0):t.kind===`open-workspace-path`?(Se({lineNumber:t.request.lineNumber,path:t.request.relativePath,source:{kind:`working-tree`},statusLabel:null}),!0):(ve({lineNumber:t.request.lineNumber,path:t.request.path}),!0)},[Nt,ve,Se,d?.environmentId]),sn=(0,L.useCallback)(e=>{switch(e.kind){case`open-file-diff`:return C?null:()=>{mt(e.path)};default:return _R(e.kind)}},[C,mt]);if(!e||!t)return(0,R.jsx)(c0,{contentClassName:`min-h-full items-center justify-center`,children:(0,R.jsx)(`p`,{className:`py-12 text-center text-sm text-destructive`,children:`Not found`})});if(g.status===`loading`)return(0,R.jsx)(c0,{contentClassName:`min-h-full items-center justify-center`,children:(0,R.jsx)(`p`,{className:`py-12 text-center text-sm text-muted-foreground`,children:`Loading...`})});if(!d||d.projectId!==e)return(0,R.jsx)(c0,{contentClassName:`min-h-full items-center justify-center`,children:(0,R.jsx)(`p`,{className:`py-12 text-center text-sm text-destructive`,children:h?`Failed to load thread.`:`Not found`})});let cn=`${d.id}:${O??`default`}`,ln=rn.some(e=>e.value!==`none`),un=Ee&&ln,dn=d.type===`standard`&&!!d.parentThreadId,fn=Je?MD({environment:Je,isLocalHost:Mt,hostName:Bt?.name}):void 0,pn=fn?mR(fn.workspaceDisplayKind):null,mn=Yt,hn=kt?.currentBranch??void 0,gn=Je?.status===`destroyed`,_n=Ue&&d.environmentId!==null&&Je?.status===`ready`,vn=g4(Dt,{mergeBaseBranch:$t,showBranchComparison:Zt,error:Et,workspaceDeleted:gn}),yn=ZI(d),bn=(0,R.jsx)(lR,{thread:d,triggerClassName:J1,align:`end`,viewerToggleLabel:C?`Use standard timeline`:void 0,viewerToggleChecked:C?D:void 0,onViewerToggleCheckedChange:C?Te:void 0}),xn=RWe({canOpenWorkspace:Pt,environment:Je,hasWorkspaceOpenTargets:Rt.length>0,threadEnvironmentIsLocal:Mt}),Sn=xn&&Lt?(0,R.jsx)(QFe,{preferredTarget:Lt,targets:Rt,onOpenPreferredTarget:async()=>{await Ft({lineNumber:null,path:xn})},onOpenTarget:async e=>{await It({lineNumber:null,path:xn,rememberTarget:!0,targetId:e})}}):void 0,Cn=(0,R.jsx)(EIe,{actionsMenu:bn,isManagedThread:!!tn,isManagerThread:C,isSecondaryPanelOpen:pt,activeTerminalCount:Ge,isTerminalPanelOpen:Ue&&r.isOpen,isThreadGitActionPending:en.isThreadGitActionPending,onOpenThreadGitAction:en.threadGitActionDialog.onOpen,onToggleSecondaryPanel:_t,onToggleTerminalPanel:l,showTerminalPanelToggle:Ue,threadHeaderGitActions:en.threadHeaderGitActions,threadTitle:yn,workspaceOpenButton:Sn}),wn=(0,R.jsx)(tLe,{canUseGitUi:w,contextWindowUsage:Ae,environmentBranchName:hn,environmentHostConnected:Bt&&!Mt?Bt.status===`connected`:void 0,environmentIcon:pn??void 0,environmentLabel:fn?.modeLabel,environmentHostLabel:fn?.location===`remote`?fn.hostLabel??void 0:void 0,isEnvironmentActionPending:ze.isPending,composerQueriesEnabled:v,composerQueriesRefetchOnMount:_.isSuccess?!1:`always`,composerQueriesStaleTime:y,onChangedFileClick:xt,openThreadDiffPanel:ht,projectId:e,workspaceChangedFilesSection:w?At:null,workspaceStatusPending:w&&(qe.isLoading||wt.isLoading),contextBannerMergeBase:w&&Qt&&mn?{branch:mn,options:at,optionsLoading:it,onChange:Xt,onPickerOpenChange:vt}:null,sendMessage:Re,pendingInteractions:x,pendingTodos:Pe,managedBySection:Ht,managerChildrenSection:Ut,thread:d}),Tn=d.type===`manager`?{controller:we,filesError:re,isFilesLoading:ee}:void 0,En=F9({rootPath:Nt,canOpenPreferredTarget:Pt,openInPreferredTarget:Ft}),Dn=F9({rootPath:Mt?ie:null,canOpenPreferredTarget:Pt,openInPreferredTarget:Ft}),On=Mt&&Pt?e=>{Ft({lineNumber:se,path:e})}:void 0,kn=de?v$({path:de,rootPath:Je?.path}):null,An=le?v$({path:le,rootPath:ie}):null,jn=de?(0,R.jsx)(i9,{activePath:de,copyPath:kn,error:Ze,filePreview:Xe,isLoading:Qe,lineNumber:ue,onOpenInEditor:En,statusLabel:pe}):ce?(0,R.jsx)(i9,{activePath:ce,error:et,filePreview:$e,isLoading:tt,lineNumber:se,onOpenInEditor:On,statusLabel:null}):le?(0,R.jsx)(EUe,{activePath:le,copyPath:An,error:te,filePreview:F,isLoading:P,onOpenInEditor:Dn}):void 0;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(dUe,{footer:wn,header:Cn,isMetadataLoading:qe.isLoading,isSecondaryPanelOpen:pt,metadata:{thread:d,projectId:e,parentThreadDisplayName:nn??null,managerThreads:Oe,canAssignToManager:un,canTakeOverThread:dn,environmentHost:Bt??null,environmentIsLocal:Mt,environment:Je??null,workspaceStatus:Dt,workspaceStatusError:Et??null,selectedMergeBaseBranch:lt,mergeBaseBranchOptions:at,isLoadingMergeBaseBranchOptions:it,updateThreadPending:He.isPending||Ve.isPending,storage:Tn,onAssignManager:an,onMergeBaseBranchChange:Xt,onChangedFileClick:w?xt:void 0},secondaryPanel:{activePanel:i,canUseGitUi:w,defaultMergeBaseBranch:rt,environmentId:d.environmentId??void 0,workspaceRootPath:Je?.path,fileTabs:St,fileTabContent:jn,isOpen:pt,onClose:ft,onCollapse:ft,onOpenFileInEditor:En,onOpenFilePreview:e=>{Se({lineNumber:null,path:e,source:{kind:`working-tree`},statusLabel:null})},onPanelFocus:o,onPanelChange:yt,showGitDiffTab:w},terminalPanel:Ue?(0,R.jsx)(dGe,{canCreateTerminal:_n,threadId:d.id}):void 0,terminalPanelHeightPercent:r.panelHeightPercent,terminalPanelOpen:Ue&&r.isOpen,onTerminalPanelResize:bt,timeline:{activeThinking:ke,hasOlderTimelineRows:je,hostConnectionNotice:Ke,isLoadingOlderTimelineRows:Me,isThreadTimelinePending:Wt,timelineError:!!Fe,loadingTurnSummaryIds:qt,erroredTurnSummaryIds:Gt,onLoadOlderRows:Ne,onLoadTurnSummaryRows:Kt,onOpenLocalFileLink:on,onTitleAction:sn,projectId:e,showOngoingIndicator:d.stopRequestedAt===null&&(d.runtime.displayStatus===`active`||d.runtime.displayStatus===`host-reconnecting`)&&!Wt,ongoingIndicatorLabel:S?`Waiting for approval`:d.runtime.displayStatus===`host-reconnecting`?`Waiting for reconnection`:void 0,timelineRows:Le,stopRequestedAt:d.stopRequestedAt,threadId:d.id,threadRuntimeDisplayStatus:d.runtime.displayStatus,turnSummaryRowsIdentity:cn,turnSummaryRowsById:Jt,unreadDividerPlacement:k,workspaceRootPath:Je?.path??void 0}}),w?(0,R.jsx)(LFe,{target:en.threadGitActionDialog.target,branchName:hn,gitStatusDisplay:vn,changedFiles:Ot?.files,threadId:d.id,threadType:d.type,showMergeBaseDetails:Zt,mergeBaseBranch:Yt,mergeBaseBranchOptions:at,mergeBaseBranchOptionsLoading:it,onMergeBaseBranchChange:Zt?Xt:void 0,onOpenChange:e=>{e||en.threadGitActionDialog.onClose()},onCommit:en.handleCommitThread,onSquashMerge:en.handleSquashMergeThread}):null]})}function gGe(e){let t=new Map,n=TE({debounceMs:e.debounceMs,maxWaitMs:e.maxWaitMs,onFlush:()=>{t.size!==0&&(e.flushChangedEnvironmentIds(Array.from(t.entries()).map(([e,t])=>({changeKinds:Array.from(t),environmentId:e}))),t.clear())}});return{dispose:()=>{n.dispose(),t.clear()},markChanged:(e,r)=>{let i=t.get(e);i||(i=new Set,t.set(e,i));for(let e of r)i.add(e);n.schedule()}}}var _Ge=50,vGe=200,yGe=250,bGe=500;function xGe(e,t){return e?t?Array.from(new Set([...e,...t])):e:t}function SGe(e,t){let n=xGe(e?.eventTypes,t.eventTypes),r=t.hasPendingInteraction??e?.hasPendingInteraction,i=t.projectId??e?.projectId,a={};return n&&(a.eventTypes=n),r!==void 0&&(a.hasPendingInteraction=r),i!==void 0&&(a.projectId=i),a}function CGe(){return{changedThreadKinds:new Map,globalChangeKinds:new Set,metadataByThreadId:new Map}}function Z9(e){e.changedThreadKinds.clear(),e.globalChangeKinds.clear(),e.metadataByThreadId.clear()}function wGe({environmentId:e,queryClient:t}){let n=new Set;for(let[,r]of t.getQueriesData({queryKey:HO()}))r?.environmentId===e&&n.add(r.id);for(let{data:r}of QP(t,{queryKey:RO()}))for(let t of ZP(r))t.environmentId===e&&n.add(t.id);return Array.from(n)}function TGe({changes:e,state:t,threadId:n}){let r=t.changedThreadKinds.get(n);r||(r=new Set,t.changedThreadKinds.set(n,r));for(let t of e)r.add(t)}function Q9(e,t){for(let n of t.globalChangeKinds)dF({context:{eventTypes:void 0,hasPendingInteraction:void 0,projectId:void 0,queryClient:e,threadId:void 0},handlers:lF[n].dirty});for(let[n,r]of t.changedThreadKinds){let i=t.metadataByThreadId.get(n);for(let t of r)dF({context:{hasPendingInteraction:i?.hasPendingInteraction,eventTypes:i?.eventTypes,projectId:i?.projectId,queryClient:e,threadId:n},handlers:lF[t].dirty})}Z9(t)}function EGe(e,t){if(t.entity===`thread`){if(t.id){TGe({changes:t.changes,state:e,threadId:t.id}),t.metadata&&e.metadataByThreadId.set(t.id,SGe(e.metadataByThreadId.get(t.id),t.metadata));return}for(let n of t.changes)e.globalChangeKinds.add(n)}}function DGe({changeKinds:e,environmentId:t,queryClient:n}){for(let r of e)dF({context:{environmentId:t,getCachedThreadIdsForEnvironment:()=>wGe({environmentId:t,queryClient:n}),queryClient:n},handlers:Hye[r].dirty})}function OGe({queryClient:e}){let t=CGe(),n=TE({debounceMs:_Ge,maxWaitMs:vGe,onFlush:()=>Q9(e,t)}),r=gGe({debounceMs:yGe,flushChangedEnvironmentIds:t=>{for(let{changeKinds:n,environmentId:r}of t)DGe({changeKinds:n,environmentId:r,queryClient:e})},maxWaitMs:bGe});return{dispose:()=>{n.dispose(),r.dispose(),Z9(t)},handleChanged:i=>{switch(i.entity){case`thread`:EGe(t,i),fF(i.changes)?n.flush():n.schedule();break;case`environment`:i.id&&r.markChanged(i.id,i.changes);break;case`host`:for(let t of i.changes)dF({context:{queryClient:e},handlers:Wye[t].dirty});break;case`project`:for(let t of i.changes)dF({context:{projectId:i.id,queryClient:e},handlers:Uye[t].dirty});break;case`system`:for(let t of i.changes)dF({context:{queryClient:e},handlers:Gye[t].dirty});break;default:jD(i)}},handleConnected:({reconnected:t})=>{if(t){aI({queryClient:e});return}oI({queryClient:e})}}}function kGe(){let e=et();(0,L.useEffect)(()=>{let t=OGe({queryClient:e}),n=TD.onConnected(t.handleConnected),r=TD.onChanged(t.handleChanged);return TD.connect(),TD.subscribe(`thread`),TD.subscribe(`project`),TD.subscribe(`environment`),TD.subscribe(`host`),TD.subscribe(`system`),()=>{t.dispose(),n(),r(),TD.unsubscribe(`thread`),TD.unsubscribe(`project`),TD.unsubscribe(`environment`),TD.unsubscribe(`host`),TD.unsubscribe(`system`)}},[e])}function AGe(){return(0,R.jsx)(Rje,{children:(0,R.jsxs)(mh,{children:[(0,R.jsx)(fh,{path:`/`,element:(0,R.jsx)(Wje,{})}),(0,R.jsx)(fh,{path:R9,element:(0,R.jsx)(oPe,{})}),null,(0,R.jsx)(fh,{path:z9,element:(0,R.jsx)(PNe,{})}),(0,R.jsx)(fh,{path:B9,element:(0,R.jsx)(HNe,{})}),(0,R.jsx)(fh,{path:V9,element:(0,R.jsx)(dPe,{})}),(0,R.jsx)(fh,{path:H9,element:(0,R.jsx)(KNe,{})}),(0,R.jsx)(fh,{path:U9,element:(0,R.jsx)(hGe,{})}),(0,R.jsx)(fh,{path:`*`,element:(0,R.jsx)(dh,{to:`/`,replace:!0})})]})})}function jGe(){return kGe(),(0,R.jsx)(lje,{children:(0,R.jsxs)(mh,{children:[(0,R.jsx)(fh,{path:L9,element:(0,R.jsx)(Bje,{})}),(0,R.jsx)(fh,{path:`*`,element:(0,R.jsx)(AGe,{})})]})})}function MGe(e){return(0,R.jsx)(kL,{...e})}function NGe(e){return(0,R.jsx)(MGe,{theme:gJ(),...e})}var PGe=8,$9=1;function FGe(){let e=typeof navigator<`u`?navigator.hardwareConcurrency:void 0;return e===void 0||e<=2?$9:Math.max($9,Math.min(PGe,e-1))}function IGe(){return new Worker(new URL(`/assets/worker-portable-CA4_6zkQ.js`,``+import.meta.url),{name:`pierre-diffs-worker`})}function LGe(e={}){let t=e.defaultOptions,n=e.showMutationErrorToasts??!0;return new Xe({mutationCache:new Ue({onError:(e,t,r,i)=>{if(!n)return;let a=qL(i.meta);a.showErrorToast!==!1&&XL({error:e,fallbackMessage:a.errorMessage??`Request failed.`})}}),defaultOptions:{...t,queries:{staleTime:2e3,refetchOnWindowFocus:!0,retry:0,...t?.queries}}})}var RGe=LGe();YEe(),(0,xs.createRoot)(document.getElementById(`root`)).render((0,R.jsx)(L.StrictMode,{children:(0,R.jsxs)(tt,{client:RGe,children:[(0,R.jsx)(op,{poolOptions:{workerFactory:IGe,poolSize:FGe()},highlighterOptions:{},children:(0,R.jsx)(Nh,{children:(0,R.jsx)(jGe,{})})}),(0,R.jsx)(NGe,{position:`bottom-right`})]})}));export{c as t};
|