polydiff 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -78
- package/bin/polydiff.mjs +6 -1
- package/dist/assets/{angular-html-ezhpupwN.js → angular-html-CuY3NJLL.js} +1 -1
- package/dist/assets/{angular-ts-DGkBU2Ac.js → angular-ts-BDh1RZYf.js} +1 -1
- package/dist/assets/{apl-CUGT4nIi.js → apl-KPu8rCXV.js} +1 -1
- package/dist/assets/{astro-C6f9OliD.js → astro-72tHa2bK.js} +1 -1
- package/dist/assets/{blade-71nbYGOJ.js → blade-B08Ed9CC.js} +1 -1
- package/dist/assets/{c-Bpp83vUT.js → c-pmDVWfbr.js} +1 -1
- package/dist/assets/{chapel-ASdwSMh4.js → chapel-DTMrcQk9.js} +1 -1
- package/dist/assets/{cobol-DNxuGELk.js → cobol-DssqnRQR.js} +1 -1
- package/dist/assets/{coffee-CTyXBUCJ.js → coffee-puUCaTOh.js} +1 -1
- package/dist/assets/{cpp-CzJZfqV4.js → cpp-B00qz5Tz.js} +1 -1
- package/dist/assets/{crystal-BfqQdHxV.js → crystal-DdUhmtlz.js} +1 -1
- package/dist/assets/{css-DlfMUpGK.js → css-DdBt4g-L.js} +1 -1
- package/dist/assets/{edge-ZaCA-9tU.js → edge-wKB7GaL7.js} +1 -1
- package/dist/assets/{elixir-GeIrO3JP.js → elixir-CoUoL5if.js} +1 -1
- package/dist/assets/{elm-BetcOCtl.js → elm-BpacrXsx.js} +1 -1
- package/dist/assets/{erb-Dru309ol.js → erb-CmniU5LH.js} +1 -1
- package/dist/assets/{git-rebase-DJIWyVXc.js → git-rebase-BQwO3P_x.js} +1 -1
- package/dist/assets/{glimmer-js-DIqXjYAY.js → glimmer-js-D80XjabP.js} +1 -1
- package/dist/assets/{glimmer-ts-pnunO5g0.js → glimmer-ts-CBtTX2IX.js} +1 -1
- package/dist/assets/{glsl-DWspuWDC.js → glsl-CSw0t__s.js} +1 -1
- package/dist/assets/{graphql-DjZ79Z4P.js → graphql-GmhNcJY1.js} +1 -1
- package/dist/assets/{hack-iafWRwwB.js → hack-BN6_-gPF.js} +1 -1
- package/dist/assets/{haml-o-Lgpxml.js → haml-C-9uneX4.js} +1 -1
- package/dist/assets/{handlebars-C8OUH7g6.js → handlebars-B-pRY8ns.js} +1 -1
- package/dist/assets/{html-CJzu28V2.js → html-DODfN5LV.js} +1 -1
- package/dist/assets/{html-derivative-Cb8okpVc.js → html-derivative-DHoyv7C9.js} +1 -1
- package/dist/assets/{http-ttaoWHS4.js → http-CfIfxUzC.js} +1 -1
- package/dist/assets/{hurl-DzAr45rI.js → hurl-Dqw3E-pP.js} +1 -1
- package/dist/assets/index-BrUK8kiM.css +1 -0
- package/dist/assets/{index-CGIYnoUG.js → index-DJIvM4fl.js} +74 -61
- package/dist/assets/{java-B9M8FiDh.js → java-ByFZtOuN.js} +1 -1
- package/dist/assets/{javascript-DsgDiit9.js → javascript-Cv3Bb7x5.js} +1 -1
- package/dist/assets/{jinja-BpB_f_L5.js → jinja-CN84y3P4.js} +1 -1
- package/dist/assets/{jison-BBboHJLm.js → jison-BuuK_RGg.js} +1 -1
- package/dist/assets/{json-CjLBqelG.js → json-BoiexH4T.js} +1 -1
- package/dist/assets/{jsx-B86puyK5.js → jsx-BvfQ8jeh.js} +1 -1
- package/dist/assets/{julia-Dx4irgay.js → julia-1r0EfmCp.js} +1 -1
- package/dist/assets/{just-BaU8BkWf.js → just-DqUqshX-.js} +1 -1
- package/dist/assets/{latex-OCFtPaVb.js → latex-BkKbkIFu.js} +1 -1
- package/dist/assets/{liquid-B-HSosSR.js → liquid-B0Un207U.js} +1 -1
- package/dist/assets/{lua-DmtpgLJe.js → lua-Bl_cKsxk.js} +1 -1
- package/dist/assets/{marko-DLvj6HlY.js → marko-BwrAvE0q.js} +1 -1
- package/dist/assets/{mdc-CLlpDeEH.js → mdc-B6X8cMMc.js} +1 -1
- package/dist/assets/{nginx-B6eJiJtn.js → nginx-CjxuSsJx.js} +1 -1
- package/dist/assets/{nim-BjTTIyjo.js → nim-D03lwHZj.js} +1 -1
- package/dist/assets/{org-BbxkHpL7.js → org-C1R3vpZ4.js} +1 -1
- package/dist/assets/{perl-7YBielDt.js → perl-wiJ_vlgw.js} +1 -1
- package/dist/assets/{php--KPClthN.js → php-DT1VRzZJ.js} +1 -1
- package/dist/assets/{pug-C7XMl1L8.js → pug-CuPeIvWI.js} +1 -1
- package/dist/assets/{qml-CN9HGHWl.js → qml-JELGKId0.js} +1 -1
- package/dist/assets/{r-BR7Z2WHy.js → r-CfwIuA9b.js} +1 -1
- package/dist/assets/{razor-C6ePkXhR.js → razor-ht43Cjj_.js} +1 -1
- package/dist/assets/{regexp-4j9D_ZJm.js → regexp-ChbFql5B.js} +1 -1
- package/dist/assets/{rst-DnVZxVCG.js → rst-DDWCVx6d.js} +1 -1
- package/dist/assets/{ruby-CcELT3hw.js → ruby-DTs1j30u.js} +1 -1
- package/dist/assets/{sas-C0OZEEpB.js → sas-Dg1iUxli.js} +1 -1
- package/dist/assets/{scss-CsORv0BP.js → scss-MEhDo76e.js} +1 -1
- package/dist/assets/{shellscript-BTztjGqL.js → shellscript-BWPZk-_l.js} +1 -1
- package/dist/assets/{shellsession-Cl0t6nbx.js → shellsession-D3PybQcl.js} +1 -1
- package/dist/assets/{soy-Dlpwi8rU.js → soy-27Ke2jtk.js} +1 -1
- package/dist/assets/{sql-Dea5cDqJ.js → sql-DP0Xrh29.js} +1 -1
- package/dist/assets/{stata-CI6WIEjb.js → stata-zGYQLyse.js} +1 -1
- package/dist/assets/{surrealql-CMQ8lmEG.js → surrealql-lazC2XG7.js} +1 -1
- package/dist/assets/{svelte-CL7YYnWK.js → svelte-Dvi0J-fD.js} +1 -1
- package/dist/assets/{templ-BeZbGaJP.js → templ-BUGTJfa1.js} +1 -1
- package/dist/assets/{tex-BSS8Q45r.js → tex-DjMRRtvH.js} +1 -1
- package/dist/assets/{ts-tags-BBdnNf-a.js → ts-tags-DdUpc0MF.js} +1 -1
- package/dist/assets/{tsx-c1m_nKLG.js → tsx-DPDbwtDb.js} +1 -1
- package/dist/assets/{twig-psqnv4mB.js → twig-COSP5TPJ.js} +1 -1
- package/dist/assets/{typescript-ByR3P8c1.js → typescript-4K9I1sRn.js} +1 -1
- package/dist/assets/{typst-Dg-RDIXz.js → typst-C2csS2q0.js} +1 -1
- package/dist/assets/{vue-DbsvoIfv.js → vue-SOudwJbE.js} +1 -1
- package/dist/assets/{vue-html-n7sDnKkW.js → vue-html-CqJapUfv.js} +1 -1
- package/dist/assets/{vue-vine-CUhVSAxO.js → vue-vine-D-YtLVo4.js} +1 -1
- package/dist/assets/{xml-mUdjR8gR.js → xml-OPeMWw8Y.js} +1 -1
- package/dist/assets/{xsl-vKBVy2ER.js → xsl-DXO_qC3I.js} +1 -1
- package/dist/assets/{yaml-BGDRkaBQ.js → yaml-Cl7qwHwz.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +5 -4
- package/server/db.mjs +23 -6
- package/server/git.mjs +6 -6
- package/dist/assets/index-BzbDgOIS.css +0 -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-CuY3NJLL.js","assets/html-DODfN5LV.js","assets/javascript-Cv3Bb7x5.js","assets/css-DdBt4g-L.js","assets/angular-ts-BDh1RZYf.js","assets/scss-MEhDo76e.js","assets/apl-KPu8rCXV.js","assets/xml-OPeMWw8Y.js","assets/java-ByFZtOuN.js","assets/json-BoiexH4T.js","assets/astro-72tHa2bK.js","assets/typescript-4K9I1sRn.js","assets/postcss-BXeXVLqQ.js","assets/tsx-DPDbwtDb.js","assets/blade-B08Ed9CC.js","assets/html-derivative-DHoyv7C9.js","assets/sql-DP0Xrh29.js","assets/bsl-_VjlB9mv.js","assets/sdbl-bTVj8UrX.js","assets/cairo-DLTphjLi.js","assets/python-gzcpVVnB.js","assets/chapel-DTMrcQk9.js","assets/c-pmDVWfbr.js","assets/cobol-DssqnRQR.js","assets/coffee-puUCaTOh.js","assets/cpp-B00qz5Tz.js","assets/regexp-ChbFql5B.js","assets/glsl-CSw0t__s.js","assets/crystal-DdUhmtlz.js","assets/shellscript-BWPZk-_l.js","assets/edge-wKB7GaL7.js","assets/elixir-CoUoL5if.js","assets/elm-BpacrXsx.js","assets/erb-CmniU5LH.js","assets/ruby-DTs1j30u.js","assets/haml-C-9uneX4.js","assets/graphql-GmhNcJY1.js","assets/jsx-BvfQ8jeh.js","assets/lua-Bl_cKsxk.js","assets/yaml-Cl7qwHwz.js","assets/erlang-Cphh6RMH.js","assets/markdown-BYOwaDjH.js","assets/fortran-fixed-form-DEKoE2YW.js","assets/fortran-free-form-CYNrtFtB.js","assets/fsharp-D13ZGOAj.js","assets/gdresource-xMC7jr7x.js","assets/gdshader-CBce3t8t.js","assets/gdscript-DYvRD3hg.js","assets/git-commit-BSykSTBG.js","assets/diff-woXpYk--.js","assets/git-rebase-BQwO3P_x.js","assets/glimmer-js-D80XjabP.js","assets/glimmer-ts-CBtTX2IX.js","assets/hack-BN6_-gPF.js","assets/handlebars-B-pRY8ns.js","assets/http-CfIfxUzC.js","assets/hurl-Dqw3E-pP.js","assets/csv-Dx-8-gkx.js","assets/hxml-Dcm88srW.js","assets/haxe-C8oCnwJJ.js","assets/jinja-CN84y3P4.js","assets/jison-BuuK_RGg.js","assets/julia-1r0EfmCp.js","assets/r-CfwIuA9b.js","assets/just-DqUqshX-.js","assets/perl-wiJ_vlgw.js","assets/latex-BkKbkIFu.js","assets/tex-DjMRRtvH.js","assets/liquid-B0Un207U.js","assets/marko-BwrAvE0q.js","assets/less-DVTAwKKz.js","assets/mdc-B6X8cMMc.js","assets/nextflow-BJtWHP5T.js","assets/nextflow-groovy-DJMQeKeT.js","assets/nginx-CjxuSsJx.js","assets/nim-D03lwHZj.js","assets/org-C1R3vpZ4.js","assets/clojure-DqKBuwfJ.js","assets/csharp-oqKa8noW.js","assets/dart-CnvKMtbv.js","assets/docker-IyjqRm3v.js","assets/go-rLFTqkRN.js","assets/groovy-CacY0gHj.js","assets/ini-B5eOa1yu.js","assets/make-Dixweg8N.js","assets/objective-c-D1A_Heim.js","assets/ocaml-O90oeIOV.js","assets/php-DT1VRzZJ.js","assets/vb-DOwzaHZ0.js","assets/raku-B3gFvitq.js","assets/rust-Cfkwpbl8.js","assets/scala-BiFt_7mu.js","assets/zig-CMLA9XwU.js","assets/xsl-DXO_qC3I.js","assets/pug-CuPeIvWI.js","assets/qml-JELGKId0.js","assets/razor-ht43Cjj_.js","assets/rst-DDWCVx6d.js","assets/cmake-Bj61d0ZC.js","assets/sas-Dg1iUxli.js","assets/shaderlab-TOUzSsQk.js","assets/hlsl-Cvrh5tZx.js","assets/shellsession-D3PybQcl.js","assets/soy-27Ke2jtk.js","assets/sparql-D_iOobhT.js","assets/turtle-ByJddavk.js","assets/stata-zGYQLyse.js","assets/surrealql-lazC2XG7.js","assets/svelte-Dvi0J-fD.js","assets/templ-BUGTJfa1.js","assets/ts-tags-DdUpc0MF.js","assets/twig-COSP5TPJ.js","assets/typst-C2csS2q0.js","assets/bat-qdxAdBWQ.js","assets/bibtex-Ci_nEsc7.js","assets/jsonc-CYpm1nAK.js","assets/log-BNLmms1o.js","assets/powershell-CCSX75yM.js","assets/swift-CyEgAFGc.js","assets/system-verilog-Dh5ihWbf.js","assets/verilog-B2gwz-sJ.js","assets/vue-SOudwJbE.js","assets/vue-html-CqJapUfv.js","assets/vue-vine-D-YtLVo4.js","assets/stylus-B6D30XZt.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)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.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`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(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 P(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,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(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 F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function I(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var L=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)};function R(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,L)}catch(e){L(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function z(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else R(z.bind(null,e))}var B={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=B,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=z,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=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.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 D(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)E.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 D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:I}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=R,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),d=o(((e,t)=>{t.exports=u()})),f=o((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}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();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`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(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.browser=function(e){return{$$typeof:o,_reason:e}},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 c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.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=u(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=u(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,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority: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=u(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=u(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,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority: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 l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),h=o(((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=m()})),g=o((e=>{var t=p(),n=d(),r=h();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){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e: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 f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function m(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&m(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),k=Symbol.for(`react.transitional.element`),A=Symbol.for(`react.portal`),j=Symbol.for(`react.fragment`),M=Symbol.for(`react.strict_mode`),N=Symbol.for(`react.profiler`),P=Symbol.for(`react.consumer`),F=Symbol.for(`react.context`),I=Symbol.for(`react.forward_ref`),L=Symbol.for(`react.suspense`),R=Symbol.for(`react.suspense_list`),z=Symbol.for(`react.memo`),B=Symbol.for(`react.lazy`),V=Symbol.for(`react.activity`),H=Symbol.for(`react.legacy_hidden`),U=Symbol.for(`react.memo_cache_sentinel`),ee=Symbol.for(`react.view_transition`),te=Symbol.for(`react.recoverable`),ne=Symbol.iterator;function W(e){return typeof e!=`object`||!e?null:(e=ne&&e[ne]||e[`@@iterator`],typeof e==`function`?e:null)}var re=Symbol.for(`react.client.reference`);function ie(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===re?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case j:return`Fragment`;case N:return`Profiler`;case M:return`StrictMode`;case L:return`Suspense`;case R:return`SuspenseList`;case V:return`Activity`;case ee:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case A:return`Portal`;case F:return e.displayName||`Context`;case P:return(e._context.displayName||`Context`)+`.Consumer`;case I:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case z:return t=e.displayName||null,t===null?ie(e.type)||`Memo`:t;case B:t=e._payload,e=e._init;try{return ie(e(t))}catch{}}return null}var ae=Array.isArray,G=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},ce=[],le=-1;function ue(e){return{current:e}}function de(e){0>le||(e.current=ce[le],ce[le]=null,le--)}function fe(e,t){le++,ce[le]=e.current,e.current=t}var pe=ue(null),me=ue(null),he=ue(null),ge=ue(null);function _e(e,t){switch(fe(he,t),fe(me,e),fe(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fp(t),e=pp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}de(pe),fe(pe,e)}function ve(){de(pe),de(me),de(he)}function ye(e){var t=e.memoizedState;t!==null&&(lh._currentValue=t.memoizedState,fe(ge,e)),t=pe.current;var n=pp(t,e.type);t!==n&&(fe(me,e),fe(pe,n))}function be(e){me.current===e&&(de(pe),de(me)),ge.current===e&&(de(ge),lh._currentValue=se)}var xe,Se;function Ce(e){if(xe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);xe=t&&t[1]||``,Se=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+xe+e+Se}var we=!1;function Te(e,t){if(!e||we)return``;we=!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}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}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(`
|
|
@@ -7,7 +7,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
|
7
7
|
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{we=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ce(n):``}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return Ce(e.type);case 16:return Ce(`Lazy`);case 13:return e.child!==t&&t!==null?Ce(`Suspense Fallback`):Ce(`Suspense`);case 19:return Ce(`SuspenseList`);case 0:case 15:return Te(e.type,!1);case 11:return Te(e.type.render,!1);case 1:return Te(e.type,!0);case 31:return Ce(`Activity`);case 30:return Ce(`ViewTransition`);default:return``}}function De(e){try{var t=``,n=null;do t+=Ee(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
8
|
Error generating stack: `+e.message+`
|
|
9
9
|
`+e.stack}}var Oe=Object.prototype.hasOwnProperty,ke=t.unstable_scheduleCallback,Ae=t.unstable_cancelCallback,je=t.unstable_shouldYield,Me=t.unstable_requestPaint,Ne=t.unstable_now,Pe=t.unstable_getCurrentPriorityLevel,Fe=t.unstable_ImmediatePriority,Ie=t.unstable_UserBlockingPriority,Le=t.unstable_NormalPriority,Re=t.unstable_LowPriority,ze=t.unstable_IdlePriority,Be=t.log,Ve=t.unstable_setDisableYieldValue,He=null,K=null;function Ue(e){if(typeof Be==`function`&&Ve(e),K&&typeof K.setStrictMode==`function`)try{K.setStrictMode(He,e)}catch{}}var We=Math.clz32?Math.clz32:qe,Ge=Math.log,Ke=Math.LN2;function qe(e){return e>>>=0,e===0?32:31-(Ge(e)/Ke|0)|0}var Je=256,Ye=262144,Xe=4194304;function Ze(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Qe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ze(n))):i=Ze(o):i=Ze(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ze(n))):i=Ze(o)):i=Ze(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function $e(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function et(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-We(n),i=1<<r;t|=e[r],n&=~i}return t}function tt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nt(){var e=Xe;return Xe<<=1,!(Xe&62914560)&&(Xe=4194304),e}function rt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function it(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function at(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-We(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ot(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ot(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-We(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function st(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-We(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ct(e,t){var n=t&-t;return n=n&42?1:lt(n),(n&(e.suspendedLanes|t))===0?n:0}function lt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ut(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function dt(){var e=oe.p;return e===0?(e=window.event,e===void 0?32:Th(e.type)):e}function ft(e,t){var n=oe.p;try{return oe.p=e,t()}finally{oe.p=n}}var pt=Math.random().toString(36).slice(2),mt=`__reactFiber$`+pt,ht=`__reactProps$`+pt,gt=`__reactContainer$`+pt,q=`__reactEvents$`+pt,_t=`__reactListeners$`+pt,vt=`__reactHandles$`+pt,yt=`__reactResources$`+pt,bt=`__reactMarker$`+pt,xt=`__reactLoad$`+pt;function St(e){delete e[mt],delete e[ht],delete e[_t],delete e[vt]}function Ct(e){var t;if(t=e[mt])return t;for(var n=e.parentNode;n;){if(t=n[gt]||n[mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mm(e);e!==null;){if(n=e[mt])return n;e=mm(e)}return t}e=n,n=e.parentNode}return null}function wt(e){if(e=e[mt]||e[gt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Tt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Et(e){var t=e[yt];return t||=e[yt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Dt(e){e[bt]=!0}function Ot(e){e[xt]=void 0}var kt=new Set,At={};function jt(e,t){Mt(e,t),Mt(e+`Capture`,t)}function Mt(e,t){for(At[e]=t,e=0;e<t.length;e++)kt.add(t[e])}var Nt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Pt={},Ft={};function It(e){return Oe.call(Ft,e)?!0:Oe.call(Pt,e)?!1:Nt.test(e)?Ft[e]=!0:(Pt[e]=!0,!1)}var Lt=!1;function Rt(){var e=Lt;return Lt=!1,e}function zt(e,t,n){if(It(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Bt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Vt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Ht(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ut(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Wt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Gt(e){if(!e._valueTracker){var t=Ut(e)?`checked`:`value`;e._valueTracker=Wt(e,t,``+e[t])}}function Kt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ut(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var qt=/[\n"\\]/g;function Jt(e){return e.replace(qt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Yt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Ht(t)):e.value!==``+Ht(t)&&(e.value=``+Ht(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Zt(e,Ht(n)):o===`number`&&e.value==t?Zt(e,Ht(e.value)):Zt(e,Ht(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Ht(s):e.removeAttribute(`name`)}function Xt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Gt(e);return}n=n==null?``:``+Ht(n),t=t==null?n:``+Ht(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Gt(e)}function Zt(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function Qt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Ht(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function $t(e,t,n){if(t!=null&&(t=``+Ht(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Ht(n)}function J(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ae(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Ht(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Gt(e)}function en(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var tn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Y(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||tn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function nn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Lt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(Y(e,a,r),Lt=!0)}else for(var o in t)t.hasOwnProperty(o)&&Y(e,o,t[o])}function rn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var an=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),on=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function sn(e){return on.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function cn(){}var ln=null;function un(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dn=null,fn=null;function pn(e){var t=wt(e);if(t&&(e=t.stateNode)){var n=e[ht]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Yt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Jt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ht]||null;if(!a)throw Error(i(90));Yt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Kt(r)}break a;case`textarea`:$t(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Qt(e,!!n.multiple,t,!1)}}}var mn=!1;function hn(e,t,n){if(mn)return e(t,n);mn=!0;try{return e(t)}finally{if(mn=!1,(dn!==null||fn!==null)&&(zd(),dn&&(t=dn,e=fn,fn=dn=null,pn(t),e)))for(t=0;t<e.length;t++)pn(e[t])}}function gn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ht]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var _n=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),vn=!1;if(_n)try{var yn={};Object.defineProperty(yn,"passive",{get:function(){vn=!0}}),window.addEventListener(`test`,yn,yn),window.removeEventListener(`test`,yn,yn)}catch{vn=!1}var X=null,bn=null,xn=null;function Sn(){if(xn)return xn;var e,t=bn,n=t.length,r,i=`value`in X?X.value:X.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return xn=i.slice(e,1<r?1-r:void 0)}function Cn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function wn(){return!0}function Tn(){return!1}function En(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?wn:Tn,this.isPropagationStopped=Tn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=wn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=wn)},persist:function(){},isPersistent:wn}),t}var Dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},On=En(Dn),kn=D({},Dn,{view:0,detail:0}),An=En(kn),jn,Mn,Nn,Pn=D({},kn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Nn&&(Nn&&e.type===`mousemove`?(jn=e.screenX-Nn.screenX,Mn=e.screenY-Nn.screenY):Mn=jn=0,Nn=e),jn)},movementY:function(e){return`movementY`in e?e.movementY:Mn}}),Fn=En(Pn),In=En(D({},Pn,{dataTransfer:0})),Ln=En(D({},kn,{relatedTarget:0})),Rn=En(D({},Dn,{animationName:0,elapsedTime:0,pseudoElement:0})),zn=En(D({},Dn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Bn=En(D({},Dn,{data:0})),Vn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Hn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Un={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Wn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Un[e])?!!t[e]:!1}function Gn(){return Wn}var Kn=En(D({},kn,{key:function(e){if(e.key){var t=Vn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Cn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Hn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gn,charCode:function(e){return e.type===`keypress`?Cn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Cn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),qn=En(D({},Pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Jn=En(D({},Dn,{submitter:0})),Yn=En(D({},kn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gn})),Xn=En(D({},Dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Zn=En(D({},Pn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Qn=En(D({},Dn,{newState:0,oldState:0,source:0})),$n=[9,13,27,32],er=_n&&`CompositionEvent`in window,tr=null;_n&&`documentMode`in document&&(tr=document.documentMode);var nr=_n&&`TextEvent`in window&&!tr,rr=_n&&(!er||tr&&8<tr&&11>=tr),ir=` `,ar=!1;function or(e,t){switch(e){case`keyup`:return $n.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function sr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var cr=!1;function lr(e,t){switch(e){case`compositionend`:return sr(t);case`keypress`:return t.which===32?(ar=!0,ir):null;case`textInput`:return e=t.data,e===ir&&ar?null:e;default:return null}}function ur(e,t){if(cr)return e===`compositionend`||!er&&or(e,t)?(e=Sn(),xn=bn=X=null,cr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return rr&&t.locale!==`ko`?null:t.data;default:return null}}var dr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!dr[e.type]:t===`textarea`}function pr(e,t,n,r){dn?fn?fn.push(r):fn=[r]:dn=r,t=Yf(t,`onChange`),0<t.length&&(n=new On(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var mr=null,hr=null;function gr(e){Vf(e,0)}function _r(e){if(Kt(Tt(e)))return e}function vr(e,t){if(e===`change`)return t}var yr=!1;if(_n){var br;if(_n){var xr=`oninput`in document;if(!xr){var Sr=document.createElement(`div`);Sr.setAttribute(`oninput`,`return;`),xr=typeof Sr.oninput==`function`}br=xr}else br=!1;yr=br&&(!document.documentMode||9<document.documentMode)}function Cr(){mr&&(mr.detachEvent(`onpropertychange`,wr),hr=mr=null)}function wr(e){if(e.propertyName===`value`&&_r(hr)){var t=[];pr(t,hr,e,un(e)),hn(gr,t)}}function Tr(e,t,n){e===`focusin`?(Cr(),mr=t,hr=n,mr.attachEvent(`onpropertychange`,wr)):e===`focusout`&&Cr()}function Er(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return _r(hr)}function Dr(e,t){if(e===`click`)return _r(t)}function Or(e,t){if(e===`input`||e===`change`)return _r(t)}function kr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ar=typeof Object.is==`function`?Object.is:kr;function jr(e,t){if(Ar(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Oe.call(t,i)||!Ar(e[i],t[i]))return!1}return!0}function Mr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Nr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Pr(e,t){var n=Nr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Nr(n)}}function Fr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ir(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Mr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mr(e.document)}return t}function Lr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Rr=_n&&`documentMode`in document&&11>=document.documentMode,zr=null,Br=null,Vr=null,Hr=!1;function Ur(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hr||zr==null||zr!==Mr(r)||(r=zr,`selectionStart`in r&&Lr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Vr&&jr(Vr,r)||(Vr=r,r=Yf(Br,`onSelect`),0<r.length&&(t=new On(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=zr)))}function Wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Gr={animationend:Wr(`Animation`,`AnimationEnd`),animationiteration:Wr(`Animation`,`AnimationIteration`),animationstart:Wr(`Animation`,`AnimationStart`),transitionrun:Wr(`Transition`,`TransitionRun`),transitionstart:Wr(`Transition`,`TransitionStart`),transitioncancel:Wr(`Transition`,`TransitionCancel`),transitionend:Wr(`Transition`,`TransitionEnd`)},Kr={},qr={};_n&&(qr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Gr.animationend.animation,delete Gr.animationiteration.animation,delete Gr.animationstart.animation),`TransitionEvent`in window||delete Gr.transitionend.transition);function Jr(e){if(Kr[e])return Kr[e];if(!Gr[e])return e;var t=Gr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in qr)return Kr[e]=t[n];return e}var Yr=Jr(`animationend`),Xr=Jr(`animationiteration`),Zr=Jr(`animationstart`),Qr=Jr(`transitionrun`),$r=Jr(`transitionstart`),ei=Jr(`transitioncancel`),ti=Jr(`transitionend`),ni=new Map,ri=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);ri.push(`scrollEnd`);function ii(e,t){ni.set(e,t),jt(t,[e])}var ai=0;function oi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=bd.identifierPrefix;var n=ai++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function si(e){if(e==null||typeof e==`string`)return e;var t=null,n=Od;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function ci(e,t){return e=si(e),t=si(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var li=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)},ui=[],di=0,fi=0;function pi(){for(var e=di,t=fi=di=0;t<e;){var n=ui[t];ui[t++]=null;var r=ui[t];ui[t++]=null;var i=ui[t];ui[t++]=null;var a=ui[t];if(ui[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&_i(n,i,a)}}function mi(e,t,n,r){ui[di++]=e,ui[di++]=t,ui[di++]=n,ui[di++]=r,fi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function hi(e,t,n,r){return mi(e,t,n,r),vi(e)}function gi(e,t){return mi(e,null,null,t),vi(e)}function _i(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-We(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function vi(e){if(50<kd)throw kd=0,Ad=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var yi={};function bi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xi(e,t,n,r){return new bi(e,t,n,r)}function Si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ci(e,t){var n=e.alternate;return n===null?(n=xi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function wi(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ti(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Si(r)&&(s=1);else if(typeof r==`string`)s=Ym(e,n,pe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case V:return e=xi(31,n,t,a),e.elementType=V,e.lanes=o,e;case j:return Ei(n.children,a,o,t);case M:s=8,a|=24;break;case N:return e=xi(12,n,t,a|2),e.elementType=N,e.lanes=o,e;case L:return e=xi(13,n,t,a),e.elementType=L,e.lanes=o,e;case R:return e=xi(19,n,t,a),e.elementType=R,e.lanes=o,e;case H:case ee:return e=a|32,e=xi(30,n,t,e),e.elementType=ee,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case F:s=10;break a;case P:s=9;break a;case I:s=11;break a;case z:s=14;break a;case B:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=xi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ei(e,t,n,r){return e=xi(7,e,r,t),e.lanes=n,e}function Di(e,t,n){return e=xi(6,e,null,t),e.lanes=n,e}function Oi(e){var t=xi(18,null,null,0);return t.stateNode=e,t}function ki(e,t,n){return t=xi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ai=new WeakMap;function ji(e,t){if(typeof e==`object`&&e){var n=Ai.get(e);return n===void 0?(t={value:e,source:t,stack:De(t)},Ai.set(e,t),t):n}return{value:e,source:t,stack:De(t)}}var Mi=[],Ni=0,Pi=null,Fi=0,Ii=[],Li=0,Ri=null,zi=1,Bi=``;function Vi(e,t){Mi[Ni++]=Fi,Mi[Ni++]=Pi,Pi=e,Fi=t}function Hi(e,t,n){Ii[Li++]=zi,Ii[Li++]=Bi,Ii[Li++]=Ri,Ri=e;var r=zi;e=Bi;var i=32-We(r)-1;r&=~(1<<i),n+=1;var a=32-We(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,zi=1<<32-We(t)+i|n<<i|r,Bi=a+e}else zi=1<<a|n<<i|r,Bi=e}function Ui(e){e.return!==null&&(Vi(e,1),Hi(e,1,0))}function Wi(e){for(;e===Pi;)Pi=Mi[--Ni],Mi[Ni]=null,Fi=Mi[--Ni],Mi[Ni]=null;for(;e===Ri;)Ri=Ii[--Li],Ii[Li]=null,Bi=Ii[--Li],Ii[Li]=null,zi=Ii[--Li],Ii[Li]=null}function Gi(e,t){Ii[Li++]=zi,Ii[Li++]=Bi,Ii[Li++]=Ri,zi=t.id,Bi=t.overflow,Ri=e}var Ki=null,qi=null,Ji=!1,Yi=null,Xi=!1,Zi=Error(i(519));function Qi(e){throw ia(ji(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Zi}function $i(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[mt]=e,t[ht]=r,n){case`dialog`:Hf(`cancel`,t),Hf(`close`,t);break;case`iframe`:case`object`:case`embed`:Hf(`load`,t);break;case`video`:case`audio`:for(n=0;n<zf.length;n++)Hf(zf[n],t);break;case`source`:Hf(`error`,t);break;case`img`:case`image`:case`link`:Hf(`error`,t),Hf(`load`,t);break;case`details`:Hf(`toggle`,t);break;case`input`:Hf(`invalid`,t),Xt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Hf(`invalid`,t);break;case`textarea`:Hf(`invalid`,t),J(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||tp(t.textContent,n)?(r.popover!=null&&(Hf(`beforetoggle`,t),Hf(`toggle`,t)),r.onScroll!=null&&Hf(`scroll`,t),r.onScrollEnd!=null&&Hf(`scrollend`,t),r.onClick!=null&&(t.onclick=cn),t=!0):t=!1,t||Qi(e,!0)}function ea(e){for(Ki=e.return;Ki;)switch(Ki.tag){case 5:case 31:case 13:Xi=!1;return;case 27:case 3:Xi=!0;return;default:Ki=Ki.return}}function ta(e){if(e!==Ki)return!1;if(!Ji)return ea(e),Ji=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||hp(e.type,e.memoizedProps)),n=!n),n&&qi&&Qi(e),ea(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));qi=pm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));qi=pm(e)}else t===27?(t=qi,wp(e.type)?(e=fm,fm=null,qi=e):qi=t):qi=Ki?dm(e.stateNode.nextSibling):null;return!0}function na(){qi=Ki=null,Ji=!1}function ra(){var e=Yi;return e!==null&&(fd===null?fd=e:fd.push.apply(fd,e),Yi=null),e}function ia(e){Yi===null?Yi=[e]:Yi.push(e)}var aa=ue(null),oa=null,sa=null;function ca(e,t,n){fe(aa,t._currentValue),t._currentValue=n}function la(e){e._currentValue=aa.current,de(aa)}function ua(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function da(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ua(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ua(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ua(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function fa(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Ar(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ge.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[lh]:e.push(lh))}a=a.return}return e!==null&&da(t,e,n,r),t.flags|=262144,e!==null}function pa(e){for(e=e.firstContext;e!==null;){if(!Ar(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ma(e){oa=e,sa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ha(e){return _a(oa,e)}function ga(e,t){return oa===null&&ma(e),_a(e,t)}function _a(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},sa===null){if(e===null)throw Error(i(308));sa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else sa=sa.next=t;return n}var va=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ya=t.unstable_scheduleCallback,ba=t.unstable_NormalPriority,xa={$$typeof:F,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sa(){return{controller:new va,data:new Map,refCount:0}}function Ca(e){e.refCount--,e.refCount===0&&ya(ba,function(){e.controller.abort()})}function wa(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Ta=null;function Ea(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Da=null,Oa=0,ka=0,Aa=null;function ja(e,t){if(Da===null){var n=Da=[];Oa=0,ka=Pf(),Aa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Oa++,t.then(Ma,Ma),t}function Ma(){if(--Oa===0&&(Ta=null,Da!==null)){Aa!==null&&(Aa.status=`fulfilled`);var e=Da;Da=null,ka=0,Aa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Na(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Pa=G.S;G.S=function(e,t){if(hd=Ne(),typeof t==`object`&&t&&typeof t.then==`function`&&ja(e,t),Ta!==null)for(var n=bf;n!==null;)wa(n,Ta),n=n.next;if(n=e.types,n!==null){for(var r=bf;r!==null;)wa(r,n),r=r.next;if(ka!==0){r=Ta,r===null&&(r=Ta=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Pa!==null&&Pa(e,t)};var Fa=ue(null);function Ia(){var e=Fa.current;return e===null?Xu.pooledCache:e}function La(e,t){t===null?fe(Fa,Fa.current):fe(Fa,t.pool)}function Ra(){var e=Ia();return e===null?null:{parent:xa._currentValue,pool:e}}var za=Error(i(460)),Ba=Error(i(474)),Va=Error(i(542)),Ha={then:function(){}};function Ua(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(cn,cn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ja(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(cn,cn);else{if(e=Xu,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ja(e),e}throw Ka=t,za}}function Ga(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ka=e,za):e}}var Ka=null;function qa(){if(Ka===null)throw Error(i(459));var e=Ka;return Ka=null,e}function Ja(e){if(e===za||e===Va)throw Error(i(483))}var Ya=null,Xa=0;function Za(e){var t=Xa;return Xa+=1,Ya===null&&(Ya=[]),Wa(Ya,e,t)}function Qa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function $a(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function eo(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Ci(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Di(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===j?(e=d(e,t,n.props.children,r,n.key),Qa(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===B&&Ga(i)===t.type)?(t=a(t,n.props),Qa(t,n),t.return=e,t):(t=Ti(n.type,n.key,n.props,null,e.mode,r),Qa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ki(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ei(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=Ti(t.type,t.key,t.props,null,e.mode,n),Qa(n,t),n.return=e,n;case A:return t=ki(t,e.mode,n),t.return=e,t;case B:return t=Ga(t),f(e,t,n)}if(ae(t)||W(t))return t=Ei(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Za(t),n);if(t.$$typeof===F)return f(e,ga(e,t),n);$a(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case k:return n.key===i?l(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null;case B:return n=Ga(n),p(e,t,n,r)}if(ae(n)||W(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Za(n),r);if(n.$$typeof===F)return p(e,t,ga(e,n),r);$a(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case k:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case A:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case B:return r=Ga(r),m(e,t,n,r,i)}if(ae(r)||W(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Za(r),i);if(r.$$typeof===F)return m(e,t,n,ga(t,r),i);$a(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ji&&Vi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ji&&Vi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ji&&Vi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ji&&Vi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ji&&Vi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ji&&Vi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===j&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===j){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),Qa(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===B&&Ga(l)===r.type){n(e,r.sibling),c=a(r,o.props),Qa(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===j?(c=Ei(o.props.children,e.mode,c,o.key),Qa(c,o),c.return=e,e=c):(c=Ti(o.type,o.key,o.props,null,e.mode,c),Qa(c,o),c.return=e,e=c)}return s(e);case A:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=ki(o,e.mode,c),c.return=e,e=c}return s(e);case B:return o=Ga(o),_(e,r,o,c)}if(ae(o))return h(e,r,o,c);if(W(o)){if(l=W(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,Za(o),c);if(o.$$typeof===F)return _(e,r,ga(e,o),c);$a(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Xa=0;var i=_(e,t,n,r);return Ya=null,i}catch(t){if(t===za||t===Va)throw t;var a=xi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var to=eo(!0),no=eo(!1),ro=!1;function io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ao(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function oo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function so(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Yu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=vi(e),_i(e,null,n),t}return mi(e,r,t,n),vi(e)}function co(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}function lo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var uo=!1;function fo(){if(uo){var e=Aa;if(e!==null)throw e}}function po(e,t,n,r){uo=!1;var i=e.updateQueue;ro=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Qu&f)===f:(r&f)===f){f!==0&&f===ka&&(uo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:ro=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),od|=o,e.lanes=o,e.memoizedState=d}}function mo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function ho(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)mo(n[e],t)}var go=ue(null),_o=ue(0);function vo(e,t){e=id,fe(_o,e),fe(go,t),id=e|t.baseLanes}function yo(){fe(_o,id),fe(go,go.current)}function bo(){id=_o.current,de(go),de(_o)}var xo=ue(null),So=null;function Co(e){var t=e.alternate;fe(Oo,Oo.current&1),fe(xo,e),So===null&&(t===null||go.current!==null||t.memoizedState!==null)&&(So=e)}function wo(e){fe(Oo,Oo.current),fe(xo,e),So===null&&(So=e)}function To(e){e.tag===22?(fe(Oo,Oo.current),fe(xo,e),So===null&&(So=e)):Eo()}function Eo(){fe(Oo,Oo.current),fe(xo,xo.current)}function Do(e){de(xo),So===e&&(So=null),de(Oo)}var Oo=ue(0);function ko(e,t){fe(xo,xo.current),fe(Oo,t)}function Ao(e){de(Oo),de(xo),So===e&&(So=null)}function jo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||cm(n)||lm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Mo=0,No=null,Po=null,Fo=null,Io=!1,Lo=!1,Ro=!1,zo=0,Bo=0,Vo=null,Ho=0;function Uo(){throw Error(i(321))}function Wo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ar(e[n],t[n]))return!1;return!0}function Go(e,t,n,r,i,a){return Mo=a,No=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?cc:lc,Ro=!1,a=n(r,i),Ro=!1,Lo&&(a=qo(t,n,r,i)),Ko(e),a}function Ko(e){G.H=sc;var t=Po!==null&&Po.next!==null;if(Mo=0,Fo=Po=No=null,Io=!1,Bo=0,Vo=null,t)throw Error(i(300));e===null||Ec||(e=e.dependencies,e!==null&&pa(e)&&(Ec=!0))}function qo(e,t,n,r){No=e;var a=0;do{if(Lo&&(Vo=null),Bo=0,Lo=!1,25<=a)throw Error(i(301));if(a+=1,Fo=Po=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}G.H=uc,o=t(n,r)}while(Lo);return o}function Jo(){var e=G.H,t=e.useState()[0];return t=typeof t.then==`function`?ts(t):t,e=e.useState()[0],(Po===null?null:Po.memoizedState)!==e&&(No.flags|=1024),t}function Yo(){var e=zo!==0;return zo=0,e}function Xo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Zo(e){if(Io){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Io=!1}Mo=0,Fo=Po=No=null,Lo=!1,Bo=zo=0,Vo=null}function Qo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fo===null?No.memoizedState=Fo=e:Fo=Fo.next=e,Fo}function $o(){if(Po===null){var e=No.alternate;e=e===null?null:e.memoizedState}else e=Po.next;var t=Fo===null?No.memoizedState:Fo.next;if(t!==null)Fo=t,Po=e;else{if(e===null)throw No.alternate===null?Error(i(467)):Error(i(310));Po=e,e={memoizedState:Po.memoizedState,baseState:Po.baseState,baseQueue:Po.baseQueue,queue:Po.queue,next:null},Fo===null?No.memoizedState=Fo=e:Fo=Fo.next=e}return Fo}function es(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ts(e){var t=Bo;return Bo+=1,Vo===null&&(Vo=[]),e=Wa(Vo,e,t),t=No,(Fo===null?t.memoizedState:Fo.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?cc:lc),e}function ns(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ts(e);if(e.$$typeof===te)return;if(e.$$typeof===F)return ha(e)}throw Error(i(438,String(e)))}function rs(e){var t=null,n=No.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=No.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=es(),No.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=U;return t.index++,n}function is(e,t){return typeof t==`function`?t(e):t}function as(e){return os($o(),Po,e)}function os(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Mo&f)===f:(Qu&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ka&&(d=!0);else if((Mo&p)===p){u=u.next,p===ka&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,No.lanes|=p,od|=p;f=u.action,Ro&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,No.lanes|=f,od|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Ar(o,e.memoizedState)&&(Ec=!0,d&&(n=Aa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ss(e){var t=$o(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Ar(o,t.memoizedState)||(Ec=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function cs(e,t,n){var r=No,a=$o(),o=Ji;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Ar((Po||a).memoizedState,n);if(s&&(a.memoizedState=n,Ec=!0),a=a.queue,Ns(ds.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Fo!==null&&!!(Fo.memoizedState.tag&1),Os(e?9:8,{destroy:void 0},us.bind(null,r,a,n,t),null),e){if(r.flags|=2048,Xu===null)throw Error(i(349));o||Mo&127||ls(r,t,n)}return n}function ls(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=No.updateQueue,t===null?(t=es(),No.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function us(e,t,n,r){t.value=n,t.getSnapshot=r,fs(t)&&ps(e)}function ds(e,t,n){return n(function(){fs(t)&&ps(e)})}function fs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ar(e,n)}catch{return!0}}function ps(e){var t=gi(e,2);t!==null&&Pd(t,e,2)}function ms(e){var t=Qo();if(typeof e==`function`){var n=e;if(e=n(),Ro){Ue(!0);try{n()}finally{Ue(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:e},t}function hs(e,t,n,r){return e.baseState=n,os(e,Po,typeof r==`function`?r:is)}function gs(e,t,n,r,a){if(ic(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};G.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,_s(t,o)):(o.next=n.next,t.pending=n.next=o)}}function _s(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=G.T,o={};o.types=a===null?null:a.types,G.T=o;try{var s=n(i,r),c=G.S;c!==null&&c(o,s),vs(e,t,s)}catch(n){bs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),G.T=a}}else try{a=n(i,r),vs(e,t,a)}catch(n){bs(e,t,n)}}function vs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ys(e,t,n)},function(n){return bs(e,t,n)}):ys(e,t,n)}function ys(e,t,n){t.status=`fulfilled`,t.value=n,xs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,_s(e,n)))}function bs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,xs(t),t=t.next;while(t!==r)}e.action=null}function xs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ss(e,t){return t}function Cs(e,t){if(Ji){var n=Xu.formState;if(n!==null){a:{var r=No;if(Ji){if(qi){b:{for(var i=qi,a=Xi;i.nodeType!==8;){if(!a){i=null;break b}if(i=dm(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){qi=dm(i.nextSibling),r=i.data===`F!`;break a}}Qi(r)}r=!1}r&&(t=n[0])}}return n=Qo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ss,lastRenderedState:t},n.queue=r,n=tc.bind(null,No,r),r.dispatch=n,r=ms(!1),a=rc.bind(null,No,!1,r.queue),r=Qo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=gs.bind(null,No,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ws(e){return Ts($o(),Po,e)}function Ts(e,t,n){if(t=os(e,t,Ss)[0],e=as(is)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ts(t)}catch(e){throw e===za?Va:e}else r=t;t=$o();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(No.flags|=2048,Os(9,{destroy:void 0},Es.bind(null,i,n),null)),[r,a,e]}function Es(e,t){e.action=t}function Ds(e){var t=$o(),n=Po;if(n!==null)return Ts(t,n,e);$o(),t=t.memoizedState,n=$o();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=No.updateQueue,t===null&&(t=es(),No.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ks(){return $o().memoizedState}function As(e,t,n,r){var i=Qo();No.flags|=e,i.memoizedState=Os(1|t,{destroy:void 0},n,r===void 0?null:r)}function js(e,t,n,r){var i=$o();r=r===void 0?null:r;var a=i.memoizedState.inst;Po!==null&&r!==null&&Wo(r,Po.memoizedState.deps)?i.memoizedState=Os(t,a,n,r):(No.flags|=e,i.memoizedState=Os(1|t,a,n,r))}function Ms(e,t){As(8390656,8,e,t)}function Ns(e,t){js(2048,8,e,t)}function Ps(e){No.flags|=4;var t=No.updateQueue;if(t===null)t=es(),No.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Fs(e){var t=$o().memoizedState;return Ps({ref:t,nextImpl:e}),function(){if(Yu&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Is(e,t){return js(4,2,e,t)}function Ls(e,t){return js(4,4,e,t)}function Rs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function zs(e,t,n){n=n==null?null:n.concat([e]),js(4,4,Rs.bind(null,t,e),n)}function Bs(){}function Vs(e,t){var n=$o();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Wo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Hs(e,t){var n=$o();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Wo(t,r[1]))return r[0];if(r=e(),Ro){Ue(!0);try{e()}finally{Ue(!1)}}return n.memoizedState=[r,t],r}function Us(e,t,n){return n===void 0||Mo&1073741824&&!(Qu&261930)?e.memoizedState=t:(e.memoizedState=n,e=Md(),No.lanes|=e,od|=e,n)}function Ws(e,t,n,r){return Ar(n,t)?n:go.current===null?!(Mo&106)||Mo&1073741824&&!(Qu&261930)?(Ec=!0,e.memoizedState=n):(e=Md(),No.lanes|=e,od|=e,t):(e=Us(e,n,r),Ar(e,t)||(Ec=!0),e)}function Gs(e,t,n,r,i){var a=oe.p;oe.p=a!==0&&8>a?a:8;var o=G.T,s={};s.types=o===null?null:o.types,G.T=s,rc(e,!1,t,n);try{var c=i(),l=G.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?nc(e,t,Na(c,r),jd(e)):nc(e,t,r,jd(e))}catch(n){nc(e,t,{then:function(){},status:`rejected`,reason:n},jd())}finally{oe.p=a,o!==null&&s.types!==null&&(o.types=s.types),G.T=o}}function Ks(){}function qs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Js(e).queue;Gs(e,a,t,se,n===null?Ks:function(){return Ys(e),n(r)})}function Js(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:se},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ys(e){var t=Js(e);t.next===null&&(t=e.alternate.memoizedState),nc(e,t.next.queue,{},jd())}function Xs(){return ha(lh)}function Zs(){return $o().memoizedState}function Qs(){return $o().memoizedState}function $s(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=jd();e=oo(n);var r=so(t,e,n);r!==null&&(Pd(r,t,n),co(r,t,n)),t={cache:Sa()},e.payload=t;return}t=t.return}}function ec(e,t,n){var r=jd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ic(e)?ac(t,n):(n=hi(e,t,n,r),n!==null&&(Pd(n,e,r),oc(n,t,r)))}function tc(e,t,n){nc(e,t,n,jd())}function nc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ic(e))ac(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Ar(s,o))return mi(e,t,i,0),Xu===null&&pi(),!1}catch{}if(n=hi(e,t,i,r),n!==null)return Pd(n,e,r),oc(n,t,r),!0}return!1}function rc(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ic(e)){if(t)throw Error(i(479))}else t=hi(e,n,r,2),t!==null&&Pd(t,e,2)}function ic(e){var t=e.alternate;return e===No||t!==null&&t===No}function ac(e,t){Lo=Io=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function oc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}var sc={readContext:ha,use:ns,useCallback:Uo,useContext:Uo,useEffect:Uo,useImperativeHandle:Uo,useLayoutEffect:Uo,useInsertionEffect:Uo,useMemo:Uo,useReducer:Uo,useRef:Uo,useState:Uo,useDebugValue:Uo,useDeferredValue:Uo,useTransition:Uo,useSyncExternalStore:Uo,useId:Uo,useHostTransitionStatus:Uo,useFormState:Uo,useActionState:Uo,useOptimistic:Uo,useMemoCache:Uo,useCacheRefresh:Uo,useEffectEvent:Uo},cc={readContext:ha,use:ns,useCallback:function(e,t){return Qo().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:Ms,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),As(4194308,4,Rs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return As(4194308,4,e,t)},useInsertionEffect:function(e,t){As(4,2,e,t)},useMemo:function(e,t){var n=Qo();t=t===void 0?null:t;var r=e();if(Ro){Ue(!0);try{e()}finally{Ue(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Qo();if(n!==void 0){var i=n(t);if(Ro){Ue(!0);try{n(t)}finally{Ue(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ec.bind(null,No,e),[r.memoizedState,e]},useRef:function(e){var t=Qo();return e={current:e},t.memoizedState=e},useState:function(e){e=ms(e);var t=e.queue,n=tc.bind(null,No,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Bs,useDeferredValue:function(e,t){return Us(Qo(),e,t)},useTransition:function(){var e=ms(!1);return e=Gs.bind(null,No,e.queue,!0,!1),Qo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=No,a=Qo();if(Ji){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Xu===null)throw Error(i(349));Qu&127||ls(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ms(ds.bind(null,r,o,e),[e]),r.flags|=2048,Os(9,{destroy:void 0},us.bind(null,r,o,n,t),null),n},useId:function(){var e=Qo(),t=Xu.identifierPrefix;if(Ji){var n=Bi,r=zi;n=(r&~(1<<32-We(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=zo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Ho++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Xs,useFormState:Cs,useActionState:Cs,useOptimistic:function(e){var t=Qo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=rc.bind(null,No,!0,n),n.dispatch=t,[e,t]},useMemoCache:rs,useCacheRefresh:function(){return Qo().memoizedState=$s.bind(null,No)},useEffectEvent:function(e){var t=Qo(),n={impl:e};return t.memoizedState=n,function(){if(Yu&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},lc={readContext:ha,use:ns,useCallback:Vs,useContext:ha,useEffect:Ns,useImperativeHandle:zs,useInsertionEffect:Is,useLayoutEffect:Ls,useMemo:Hs,useReducer:as,useRef:ks,useState:function(){return as(is)},useDebugValue:Bs,useDeferredValue:function(e,t){return Ws($o(),Po.memoizedState,e,t)},useTransition:function(){var e=as(is)[0],t=$o().memoizedState;return[typeof e==`boolean`?e:ts(e),t]},useSyncExternalStore:cs,useId:Zs,useHostTransitionStatus:Xs,useFormState:ws,useActionState:ws,useOptimistic:function(e,t){return hs($o(),Po,e,t)},useMemoCache:rs,useCacheRefresh:Qs,useEffectEvent:Fs},uc={readContext:ha,use:ns,useCallback:Vs,useContext:ha,useEffect:Ns,useImperativeHandle:zs,useInsertionEffect:Is,useLayoutEffect:Ls,useMemo:Hs,useReducer:ss,useRef:ks,useState:function(){return ss(is)},useDebugValue:Bs,useDeferredValue:function(e,t){var n=$o();return Po===null?Us(n,e,t):Ws(n,Po.memoizedState,e,t)},useTransition:function(){var e=ss(is)[0],t=$o().memoizedState;return[typeof e==`boolean`?e:ts(e),t]},useSyncExternalStore:cs,useId:Zs,useHostTransitionStatus:Xs,useFormState:Ds,useActionState:Ds,useOptimistic:function(e,t){var n=$o();return Po===null?(n.baseState=e,[e,n.queue.dispatch]):hs(n,Po,e,t)},useMemoCache:rs,useCacheRefresh:Qs,useEffectEvent:Fs};function dc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=jd(),i=oo(r);i.payload=t,n!=null&&(i.callback=n),t=so(e,i,r),t!==null&&(Pd(t,e,r),co(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=jd(),i=oo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=so(e,i,r),t!==null&&(Pd(t,e,r),co(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=jd(),r=oo(n);r.tag=2,t!=null&&(r.callback=t),t=so(e,r,n),t!==null&&(Pd(t,e,n),co(t,e,n))}};function pc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!jr(n,r)||!jr(i,a):!0}function mc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&fc.enqueueReplaceState(t,t.state,null)}function hc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function gc(e){li(e)}function _c(e){console.error(e)}function vc(e){li(e)}function yc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function bc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function xc(e,t,n){return n=oo(n),n.tag=3,n.payload={element:null},n.callback=function(){yc(e,t)},n}function Sc(e){return e=oo(e),e.tag=3,e}function Cc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){bc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){bc(t,n,r),typeof i!=`function`&&(vd===null?vd=new Set([this]):vd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function wc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&fa(t,n,a,!0),n=xo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return So===null?Kd():n.alternate===null&&ad===0&&(ad=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ha?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),hf(e,r,a)),!1;case 22:return n.flags|=65536,r===Ha?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),hf(e,r,a)),!1}throw Error(i(435,n.tag))}return hf(e,r,a),Kd(),!1}if(Ji)return t=xo.current,t===null?(r!==Zi&&(t=Error(i(423),{cause:r}),ia(ji(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ji(r,n),a=xc(e.stateNode,r,a),lo(e,a),ad!==4&&(ad=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Zi&&(e=Error(i(422),{cause:r}),ia(ji(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=ji(o,n),dd===null?dd=[o]:dd.push(o),ad!==4&&(ad=2),t===null)return!0;r=ji(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=xc(n.stateNode,r,e),lo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(vd===null||!vd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Sc(a),Cc(a,e,n,r),lo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Tc=Error(i(461)),Ec=!1;function Dc(e,t,n,r){t.child=e===null?no(t,null,n,r):to(t,e.child,n,r)}function Oc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ma(t),r=Go(e,t,n,o,a,i),s=Yo(),e!==null&&!Ec?(Xo(e,t,i),nl(e,t,i)):(Ji&&s&&Ui(t),t.flags|=1,Dc(e,t,r,i),t.child)}function kc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Ac(e,t,a,r,i)):(e=Ti(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!rl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?jr:n,n(o,r)&&e.ref===t.ref)return nl(e,t,i)}return t.flags|=1,e=Ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function Ac(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(jr(a,r)&&e.ref===t.ref){if(Ec=!1,t.pendingProps=r=a,rl(e,i))e.flags&131072&&(Ec=!0);else return t.lanes=e.lanes,nl(e,t,i)}}return Rc(e,t,n,r,i)}function jc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Nc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&La(t,a===null?null:a.cachePool),a===null?yo():vo(t,a),To(t);else return r=t.lanes=536870912,Nc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&La(t,null),yo(),Eo()):(La(t,a.cachePool),vo(t,a),Eo(),t.memoizedState=null);return Dc(e,t,i,n),t.child}function Mc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Nc(e,t,n,r,i){var a=Ia();return a=a===null?null:{parent:xa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&La(t,null),yo(),To(t),e!==null&&fa(e,t,r,!0),t.childLanes=i,null}function Pc(e,t){return t=qc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Fc(e,t,n){return to(t,e.child,null,n),e=Pc(t,t.pendingProps),e.flags|=2,Do(t),t.memoizedState=null,e}function Ic(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(Ji){if(r.mode===`hidden`)return e=Pc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Mc(null,e);if(wo(t),(e=qi)?(e=sm(e,Xi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri===null?null:{id:zi,overflow:Bi},retryLane:536870912,hydrationErrors:null},n=Oi(e),n.return=t,t.child=n,Ki=t,qi=null)):e=null,e===null)throw Qi(t);return t.lanes=536870912,null}return Pc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(wo(t),a){if(t.flags&256)t.flags&=-257,t=Fc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Ec||fa(e,t,n,!1),a=(n&e.childLanes)!==0,Ec||a){if(go.current===null){if(r=Xu,r!==null&&(s=ct(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,gi(e,s),Pd(r,e,s),Tc;Kd()}t=Fc(e,t,n)}else e=o.treeContext,qi=dm(s.nextSibling),Ki=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Gi(t,e),t=Pc(t,r),t.flags|=134221824;return t}return e=Ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Lc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Rc(e,t,n,r,i){return ma(t),n=Go(e,t,n,r,void 0,i),r=Yo(),e!==null&&!Ec?(Xo(e,t,i),nl(e,t,i)):(Ji&&r&&Ui(t),t.flags|=1,Dc(e,t,n,i),t.child)}function zc(e,t,n,r,i,a){return ma(t),t.updateQueue=null,n=qo(t,r,n,i),Ko(e),r=Yo(),e!==null&&!Ec?(Xo(e,t,a),nl(e,t,a)):(Ji&&r&&Ui(t),t.flags|=1,Dc(e,t,n,a),t.child)}function Bc(e,t,n,r,i){if(ma(t),t.stateNode===null){var a=yi,o=n.contextType;typeof o==`object`&&o&&(a=ha(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=fc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},io(t),o=n.contextType,a.context=typeof o==`object`&&o?ha(o):yi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(dc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&fc.enqueueReplaceState(a,a.state,null),po(t,r,a,i),fo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=hc(n,s);a.props=c;var l=a.context,u=n.contextType;o=yi,typeof u==`object`&&u&&(o=ha(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&mc(t,a,r,o),ro=!1;var f=t.memoizedState;a.state=f,po(t,r,a,i),fo(),l=t.memoizedState,s||f!==l||ro?(typeof d==`function`&&(dc(t,n,d,r),l=t.memoizedState),(c=ro||pc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,ao(e,t),o=t.memoizedProps,u=hc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=yi,typeof l==`object`&&l&&(c=ha(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&mc(t,a,r,c),ro=!1,f=t.memoizedState,a.state=f,po(t,r,a,i),fo();var p=t.memoizedState;o!==d||f!==p||ro||e!==null&&e.dependencies!==null&&pa(e.dependencies)?(typeof s==`function`&&(dc(t,n,s,r),p=t.memoizedState),(u=ro||pc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&pa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Lc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=to(t,e.child,null,i),t.child=to(t,null,n,i)):Dc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=nl(e,t,i),e}function Vc(e,t,n,r){return na(),t.flags|=256,Dc(e,t,n,r),t.child}var Hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Uc(e){return{baseLanes:e,cachePool:Ra()}}function Wc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ld),e}function Gc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Oo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(Ji){if(i?Co(t):Eo(),(e=qi)?(e=sm(e,Xi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri===null?null:{id:zi,overflow:Bi},retryLane:536870912,hydrationErrors:null},n=Oi(e),n.return=t,t.child=n,Ki=t,qi=null)):e=null,e===null)throw Qi(t);return t.lanes=lm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Eo(),i=t.mode,a=qc({mode:`hidden`,children:a},i),r=Ei(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Uc(n),r.childLanes=Wc(e,o,n),t.memoizedState=Hc,Mc(null,r)):(Co(t),Kc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return Yc(e,t,a,o,r,c,s,n)}return i?(Eo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Ci(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Ei(i,a,n,null),i.flags|=2):i=Ci(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Mc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Uc(n):(a=i.cachePool,a===null?a=Ra():(s=xa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Wc(e,o,n),t.memoizedState=Hc,Mc(e.child,r)):(Co(t),n=e.child,e=n.sibling,n=Ci(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Kc(e,t){return t=qc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function qc(e,t){return e=xi(22,e,null,t),e.lanes=0,e}function Jc(e,t,n){return to(t,e.child,null,n),e=Kc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Yc(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Co(t),t.flags&=-257,Jc(e,t,c)):t.memoizedState===null?(Eo(),o=a.fallback,s=t.mode,a=qc({mode:`visible`,children:a.children},s),o=Ei(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,to(t,e.child,null,c),a=t.child,a.memoizedState=Uc(c),a.childLanes=Wc(e,r,c),t.memoizedState=Hc,Mc(null,a)):(Eo(),t.child=e.child,t.flags|=128,null);if(Co(t),lm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ia({value:a,source:null,stack:null})),Jc(e,t,c)}if(Ec||fa(e,t,c,!1),r=(c&e.childLanes)!==0,Ec||r){if(go.current!==null)return Jc(e,t,c);if(r=Xu,r!==null&&(a=ct(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,gi(e,a),Pd(r,e,a),Tc;return cm(o)||Kd(),Jc(e,t,c)}return cm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,qi=dm(o.nextSibling),Ki=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Gi(t,e),t=Kc(t,a.children),t.flags|=134221824,t)}function Xc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ua(e.return,t,n)}function Zc(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&jo(n)===null&&(t=e),e=e.sibling}return t}function Qc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function $c(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function el(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Oo.current;if(t.flags&128)return ko(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,ko(t,o),i===`backwards`&&e!==null?($c(e),Dc(e,t,r,n),$c(e)):Dc(e,t,r,n),r=Ji?Fi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Xc(e,n,t);else if(e.tag===19)Xc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=Zc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,$c(t)),Qc(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&jo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Qc(t,!0,n,null,a,r);break;case`together`:Qc(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=Zc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Qc(t,!1,i,n,a,r)}return t.child}function tl(e,t,n){var r=t.pendingProps;return ca(t,t.type,r.value),Dc(e,t,r.children,n),t.child}function nl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),od|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(fa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function rl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&pa(e)))}function il(e,t,n){switch(t.tag){case 3:_e(t,t.stateNode.containerInfo),ca(t,xa,e.memoizedState.cache),na();break;case 27:case 5:ye(t);break;case 4:_e(t,t.stateNode.containerInfo);break;case 10:ca(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,wo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Co(t),t.flags|=128,null;r=fa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Gc(e,t,n):(Co(t),e=nl(e,t,n),e===null?null:e.sibling)}Co(t);break;case 19:if(t.flags&128)return el(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(fa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return el(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ko(t,Oo.current),r)break;return null;case 22:return t.lanes=0,jc(e,t,n,t.pendingProps);case 24:ca(t,xa,e.memoizedState.cache)}return nl(e,t,n)}function al(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Ec=!0;else{if(!rl(e,n)&&!(t.flags&128))return Ec=!1,il(e,t,n);Ec=!!(e.flags&131072)}}else Ec=!1,Ji&&t.flags&1048576&&Hi(t,Fi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ga(t.elementType),t.type=e,typeof e==`function`)Si(e)?(r=hc(e,r),t.tag=1,t=Bc(null,t,e,r,n)):(t.tag=0,t=Rc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===I){t.tag=11,t=Oc(null,t,e,r,n);break a}if(a===z){t.tag=14,t=kc(null,t,e,r,n);break a}if(a===F){t.tag=10,t.type=e,t=tl(null,t,n);break a}}throw t=ie(e)||e,Error(i(306,t,``))}}return t;case 0:return Rc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=hc(r,t.pendingProps),Bc(e,t,r,a,n);case 3:a:{if(_e(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,ao(e,t),po(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ca(t,xa,r),r!==o.cache&&da(t,[xa],n,!0),fo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Vc(e,t,r,n);break a}if(r!==a){a=ji(Error(i(424)),t),ia(a),t=Vc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(qi=dm(e.firstChild),Ki=t,Ji=!0,Yi=null,Xi=!0,n=no(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(na(),r===a){t=nl(e,t,n);break a}Dc(e,t,r,n)}t=t.child}return t;case 26:return Lc(e,t),e===null?(n=Fm(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ji||(t.stateNode=mp(t.type,t.pendingProps,he.current,t)):t.memoizedState=Fm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ye(t),e===null&&Ji&&(r=t.stateNode=_m(t.type,t.pendingProps,he.current),Ki=t,Xi=!0,a=qi,wp(t.type)?(fm=a,qi=dm(r.firstChild)):qi=a),Dc(e,t,t.pendingProps.children,n),Lc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ji&&((a=r=qi)&&(r=am(r,t.type,t.pendingProps,Xi),r===null?a=!1:(t.stateNode=r,Ki=t,qi=dm(r.firstChild),Xi=!1,a=!0)),a||Qi(t)),ye(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,hp(a,o)?r=null:s!==null&&hp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Go(e,t,Jo,null,null,n),lh._currentValue=a),Lc(e,t),Dc(e,t,r,n),t.child;case 6:return e===null&&Ji&&((e=n=qi)&&(n=om(n,t.pendingProps,Xi),n===null?e=!1:(t.stateNode=n,Ki=t,qi=null,e=!0)),e||Qi(t)),null;case 13:return Gc(e,t,n);case 4:return _e(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=to(t,null,r,n):Dc(e,t,r,n),t.child;case 11:return Oc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Lc(e,t),Dc(e,t,r,n),t.child;case 8:return Dc(e,t,t.pendingProps.children,n),t.child;case 12:return Dc(e,t,t.pendingProps.children,n),t.child;case 10:return tl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,ma(t),a=ha(a),r=r(a),t.flags|=1,Dc(e,t,r,n),t.child;case 14:return kc(e,t,t.type,t.pendingProps,n);case 15:return Ac(e,t,t.type,t.pendingProps,n);case 19:return el(e,t,n);case 31:return Ic(e,t,n);case 22:return jc(e,t,n,t.pendingProps);case 24:return ma(t),r=ha(xa),e===null?(a=Ia(),a===null&&(a=Xu,o=Sa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},io(t),ca(t,xa,a)):((e.lanes&n)!==0&&(ao(e,t),po(t,null,null,n),fo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ca(t,xa,r),r!==a.cache&&da(t,[xa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ca(t,xa,r))),Dc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:Ji&&Ui(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Lc(e,t),Dc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function ol(e){e.flags|=4}function sl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Xm(t,r):Xm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Ud())e.flags|=8192;else throw Ka=Ha,Ba}}else e.flags&=-16777217}function cl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Zm(t)){if(Ud())e.flags|=8192;else throw Ka=Ha,Ba}}function ll(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:nt(),e.lanes|=t,ud|=t)}function ul(e,t){if(!Ji)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function dl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function fl(e,t,n){var r=t.pendingProps;switch(Wi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dl(t),null;case 1:return dl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),la(xa),ve(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ta(t)?ol(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ra())),dl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(ol(t),o===null?(dl(t),sl(t,a,null,r,n)):(dl(t),cl(t,o))):o?o===e.memoizedState?(dl(t),t.flags&=-16777217):(ol(t),dl(t),cl(t,o)):(e=e.memoizedProps,e!==r&&ol(t),dl(t),sl(t,a,e,r,n)),null;case 27:if(be(t),n=he.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ol(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return dl(t),t.subtreeFlags&=-33554433,null}e=pe.current,ta(t)?$i(t,e):(e=_m(a,r,n),t.stateNode=e,ol(t))}return dl(t),t.subtreeFlags&=-33554433,null;case 5:if(be(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ol(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return dl(t),t.subtreeFlags&=-33554433,null}if(o=pe.current,ta(t))$i(t,o);else{var s=dp(he.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[mt]=t,o[ht]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(ip(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&ol(t)}}return dl(t),t.subtreeFlags&=-33554433,sl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ol(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=he.current,ta(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[mt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||tp(e.nodeValue,n)),e||Qi(t,!0)}else e=dp(e).createTextNode(r),e[mt]=t,t.stateNode=e}return dl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ta(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[mt]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;dl(t),e=!1}else n=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Do(t),t):(Do(t),null);if(t.flags&128)throw Error(i(558))}return dl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ta(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[mt]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;dl(t),a=!1}else a=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Do(t),t):(Do(t),null)}return Do(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ll(t,t.updateQueue),dl(t),null);case 4:return ve(),e===null&&Gf(t.stateNode.containerInfo),t.flags|=67108864,dl(t),null;case 10:return la(t.type),dl(t),null;case 19:if(Ao(t),r=t.memoizedState,r===null)return dl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)ul(r,!1);else{if(ad!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=jo(e),o!==null){for(t.flags|=128,ul(r,!1),e=o.updateQueue,t.updateQueue=e,ll(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)wi(n,e),n=n.sibling;return ko(t,Oo.current&1|2),Ji&&Vi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ne()>gd&&(t.flags|=128,a=!0,ul(r,!1),t.lanes=4194304)}}else{if(!a){if(e=jo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ll(t,e),ul(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!Ji)return dl(t),null}else 2*Ne()-r.renderingStartTime>gd&&n!==536870912&&(t.flags|=128,a=!0,ul(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ne(),e.sibling=null,o=Oo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||Ji?ko(t,o):(n=o,fe(xo,t),fe(Oo,n),So===null&&(So=t)),Ji&&Vi(t,r.treeForkCount),e}return dl(t),null;case 22:case 23:return Do(t),bo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(dl(t),t.subtreeFlags&6&&(t.flags|=8192)):dl(t),n=t.updateQueue,n!==null&&ll(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&de(Fa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),la(xa),dl(t),null;case 25:return null;case 30:return t.flags|=33554432,dl(t),null}throw Error(i(156,t.tag))}function pl(e,t){switch(Wi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return la(xa),ve(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return be(t),null;case 31:if(t.memoizedState!==null){if(Do(t),t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Do(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ao(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ve(),null;case 10:return la(t.type),null;case 22:case 23:return Do(t),bo(),e!==null&&de(Fa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return la(xa),null;case 25:return null;default:return null}}function ml(e,t){switch(Wi(t),t.tag){case 3:la(xa),ve();break;case 26:case 27:case 5:be(t);break;case 4:ve();break;case 31:t.memoizedState!==null&&Do(t);break;case 13:Do(t);break;case 19:Ao(t);break;case 10:la(t.type);break;case 22:case 23:Do(t),bo(),e!==null&&de(Fa);break;case 24:la(xa)}}function hl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){mf(t,t.return,e)}}function gl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){mf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){mf(t,t.return,e)}}function _l(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ho(t,n)}catch(t){mf(e,e.return,t)}}}function vl(e,t,n){n.props=hc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){mf(e,t,n)}}function yl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=oi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Ip(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Lp(e);m(e.child,!1,em,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){mf(e,t,n)}}function bl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){mf(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){mf(e,t,n)}else n.current=null}}function xl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)nm(e.stateNode,t[n])}function Sl(e){for(var t=e.return;t!==null&&(Tl(t)&&nm(e.stateNode,t.stateNode),!wl(t));)t=t.return}function Cl(e){for(var t=e.return;t!==null&&(Tl(t)&&rm(e.stateNode,t.stateNode),!wl(t));)t=t.return}function wl(e){return e.tag===5||e.tag===3||e.tag===27}function Tl(e){return e&&e.tag===7&&e.stateNode!==null}function El(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){mf(e,e.return,t)}}function Dl(e,t,n){try{var r=e.stateNode;op(r,e.type,n,t),r[ht]=t}catch(t){mf(e,e.return,t)}}function Ol(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wp(e.type)||e.tag===4}function kl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Ol(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&wp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Al(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cn)),xl(e,r),Lt=!0;else if(i!==4&&(i===27&&(xl(e,r),r=null,wp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Al(e,t,n,r),e=e.sibling;e!==null;)Al(e,t,n,r),e=e.sibling}function jl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),xl(e,r),Lt=!0;else if(i!==4&&(i===27&&(xl(e,r),r=null,wp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(jl(e,t,n,r),e=e.sibling;e!==null;)jl(e,t,n,r),e=e.sibling}function Ml(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);ip(t,r,n),t[mt]=e,t[ht]=n}catch(t){mf(e,e.return,t)}}var Nl=!1,Pl=null;function Fl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Nl=!0)}var Il=null;function Ll(){var e=Il;return Il=null,e}var Rl=0;function zl(e,t,n,r,i){return Rl=0,Bl(e.child,t,n,r,i)}function Bl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Ap(o);r.push(s),s.view&&(a=!0)}else a||Ap(o).view&&(a=!0);Nl=!0,Dp(o,Rl===0?t:t+`_`+Rl,n),Rl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Bl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Vl(e,t){for(;e!==null;)e.tag===5?Op(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Vl(e.child,t)),e=e.sibling}function Hl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Hl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=ci(t.default,t.share),t!==`none`&&(zl(e,n,t,null,!1)||Vl(e.child,!1))}e=e.sibling}}function Ul(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=oi(r,n),a=ci(r.default,n.paired?r.share:r.enter);a===`none`?Hl(e):zl(e,i,a,null,!1)?(Hl(e),n.paired||t||Nd(e,r.onEnter)):Vl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Ul(e,t),e=e.sibling;else Hl(e)}function Wl(e){if(Pl!==null&&Pl.size!==0){var t=Pl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=ci(n.default,n.share);if(a!==`none`&&(zl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Nd(e,n.onShare)):Vl(e.child,!1)),t.delete(r),t.size===0)break}}}Wl(e)}e=e.sibling}}}function Gl(e){if(e.tag===30){var t=e.memoizedProps,n=oi(t,e.stateNode),r=Pl===null?void 0:Pl.get(n),i=ci(t.default,r===void 0?t.exit:t.share);i!==`none`&&(zl(e,n,i,null,!1)?r===void 0?Nd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Pl.delete(n),Nd(e,t.onShare)):Vl(e.child,!1)),Pl!==null&&Wl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Gl(e),e=e.sibling;else Pl!==null&&Wl(e)}function Kl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=oi(t,e.stateNode);t=ci(t.default,t.update),e.flags&=-5,t!==`none`&&zl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Kl(e);e=e.sibling}}function ql(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Vl(e.child,!1))}ql(e)}e=e.sibling}}function Jl(e){if(e.tag===30)e.stateNode.paired=null,Vl(e.child,!1),ql(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Jl(e),e=e.sibling;else ql(e)}function Yl(e){for(e=e.child;e!==null;)e.tag===30?Vl(e.child,!1):e.subtreeFlags&33554432&&Yl(e),e=e.sibling}function Xl(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Rl<a.length){var l=a[Rl],u=Ap(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Dp(c,Rl===0?n:n+`_`+Rl,i),s&&e.flags&4||(Il===null&&(Il=[]),Il.push(c,Rl===0?r:r+`_`+Rl,t.memoizedProps)),Rl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:Xl(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function Zl(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=oi(n,r),a=ci(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(jp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Rl=0,i=Xl(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Nd(e,n.onUpdate))}else e.subtreeFlags&33554432&&Zl(e,t);e=e.sibling}}var Ql=!1,$l=!1,eu=!1,tu=!1,nu=typeof WeakSet==`function`?WeakSet:Set,ru=null,iu=!1,au=!1,ou=!1,su=!1;function cu(e,t,n){if(e=e.containerInfo,lp=vh,e=Ir(e),Lr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(up={focusedElem:e,selectionRange:r},vh=!1,n=(n&335544064)===n,ru=t,t=n?9270:1024;ru!==null;){if(e=ru,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Gl(r[a]);if(e.alternate===null&&e.flags&2)n&&Fl(e),lu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Gl(r),lu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Fl(e),lu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,ru=r):(n&&Kl(e),lu(n))}}Pl=null}function lu(e){for(;ru!==null;){var t=ru,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=hc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){mf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)im(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:im(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=oi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=ci(a.default,a.update),a!==`none`&&zl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,ru=r;break}ru=t.return}}function uu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Au(e,n),r&4&&hl(5,n);break;case 1:if(Au(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){mf(n,n.return,e)}else{var i=hc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){mf(n,n.return,e)}}}r&64&&_l(n),r&512&&yl(n,n.return);break;case 3:if(Au(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{ho(e,t)}catch(e){mf(n,n.return,e)}}break;case 27:t===null&&r&4&&Ml(n);case 26:case 5:Au(e,n),t===null&&r&4&&El(n),r&512&&yl(n,n.return);break;case 12:Au(e,n);break;case 31:Au(e,n),r&4&&yu(e,n);break;case 13:Au(e,n),r&4&&bu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=_f.bind(null,n),um(e,n))));break;case 22:if(r=n.memoizedState!==null||Ql,!r){var a=t!==null&&t.memoizedState!==null||$l;t=Ql,i=$l,Ql=r,($l=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Mu(e,n,r)):Au(e,n),Ql=t,$l=i}break;case 30:Au(e,n),r&512&&yl(n,n.return);break;case 7:r&512&&yl(n,n.return);default:Au(e,n)}}function du(e,t){for(e=e.child;e!==null;)fu(e,t),e=e.sibling}function fu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){mf(e,e.return,t)}pu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Lt=!0}catch(t){mf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Ep(s,!0):Ep(e.stateNode,!1)}catch(t){mf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&du(e,t);break;default:du(e,t)}}function pu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:fu(n,r);break a;case 22:n.memoizedState===null&&pu(n,r);break a;default:pu(n,r)}}e=e.sibling}}function mu(e){var t=e.alternate;t!==null&&(e.alternate=null,mu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&St(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var hu=null,gu=!1;function _u(e,t,n){for(n=n.child;n!==null;)vu(e,t,n),n=n.sibling}function vu(e,t,n){if(K&&typeof K.onCommitFiberUnmount==`function`)try{K.onCommitFiberUnmount(He,n)}catch{}switch(n.tag){case 26:$l||bl(n,t),_u(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!$l&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:$l||bl(n,t),Cl(n);var r=hu,i=gu;wp(n.type)&&(hu=n.stateNode,gu=!1),_u(e,t,n),vm(n.stateNode,n.type,n.memoizedProps),hu=r,gu=i;break;case 5:$l||bl(n,t),Cl(n);case 6:if(n.tag===6&&Cl(n),r=hu,i=gu,hu=null,_u(e,t,n),hu=r,gu=i,hu!==null){if(gu)try{(hu.nodeType===9?hu.body:hu.nodeName===`HTML`?hu.ownerDocument.body:hu).removeChild(n.stateNode),Lt=!0}catch(e){mf(n,t,e)}else try{hu.removeChild(n.stateNode),Lt=!0}catch(e){mf(n,t,e)}}break;case 18:hu!==null&&(gu?(e=hu,Tp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Uh(e)):Tp(hu,n.stateNode));break;case 4:r=hu,i=gu,hu=n.stateNode.containerInfo,gu=!0,_u(e,t,n),hu=r,gu=i;break;case 0:case 11:case 14:case 15:gl(2,n,t),$l||gl(4,n,t),_u(e,t,n);break;case 1:$l||(bl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&vl(n,t,r)),_u(e,t,n);break;case 21:_u(e,t,n);break;case 22:$l=(r=$l)||n.memoizedState!==null,_u(e,t,n),$l=r;break;case 30:bl(n,t),_u(e,t,n);break;case 7:$l||bl(n,t),_u(e,t,n);break;default:_u(e,t,n)}}function yu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Uh(e)}catch(e){mf(t,t.return,e)}}}function bu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Uh(e)}catch(e){mf(t,t.return,e)}}function xu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new nu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new nu),t;default:throw Error(i(435,e.tag))}}function Su(e,t){var n=xu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=vf.bind(null,e,t);t.then(r,r)}})}function Cu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(wp(l.type)){hu=l.stateNode,gu=!1;break a}break;case 5:hu=l.stateNode,gu=!1;break a;case 3:case 4:hu=l.stateNode.containerInfo,gu=!0;break a}l=l.return}if(hu===null)throw Error(i(160));vu(s,c,o),hu=null,gu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Tu(t,e,n),t=t.sibling}var wu=null;function Tu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Cu(t,e,n),Eu(e),a&4&&(gl(3,e,e.return),hl(3,e),gl(5,e,e.return));break;case 1:Cu(t,e,n),Eu(e),a&512&&($l||r===null||bl(r,r.return)),a&64&&Ql&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=wu,Cu(t,e,n),Eu(e),a&512&&($l||r===null||bl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(Ql)e.stateNode=mp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[bt]||r[mt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),ip(r,t,n),r[mt]=e,Dt(r),t=r;break a;case`link`:if(o=qm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),ip(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=qm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),ip(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[mt]=e,Dt(r),t=r}e.stateNode=t}}else Ql||Jm(o,e.type,e.stateNode)}else e.stateNode=Hm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Dl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||$l||t.parentNode.removeChild(t)):a.count--,n===null?Ql||Jm(o,e.type,e.stateNode):Hm(o,n,e.memoizedProps))}break;case 27:Cu(t,e,n),Eu(e),a&512&&($l||r===null||bl(r,r.return)),r!==null&&a&4&&Dl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=eu,eu=!1,Cu(t,e,n),eu=o,Eu(e),a&512&&($l||r===null||bl(r,r.return)),e.flags&32){t=e.stateNode;try{en(t,``),Lt=!0}catch(t){mf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Dl(e,t,r===null?t:r.memoizedProps)),a&1024&&(tu=!0);break;case 6:if(Cu(t,e,n),Eu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Lt=!0}catch(t){mf(e,e.return,t)}}break;case 3:if(Lt=!1,Km=null,o=wu,wu=Sm(t.containerInfo),Cu(t,e,n),wu=o,Eu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Uh(t.containerInfo)}catch(t){mf(e,e.return,t)}tu&&(tu=!1,Du(e)),Lt=!1;break;case 4:a=eu,eu=Ql,r=Rt(),o=wu,wu=Sm(e.stateNode.containerInfo),Cu(t,e,n),Eu(e),wu=o,Lt&&au&&(ou=!0),Lt=r,eu=a;break;case 12:Cu(t,e,n),Eu(e);break;case 31:Cu(t,e,n),Eu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Su(e,t)));break;case 13:Cu(t,e,n),Eu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(md=Ne()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Su(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=Ql,l=$l,u=eu;Ql=c||o,eu=u||o,$l=l||s,Cu(t,e,n),$l=l,eu=u,Ql=c,Eu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||Ql||$l||(t=s||$l,n=Ql,r=$l,Ql=o||Ql,$l=t,ju(e,2),Ql=n,$l=r),!o&&eu||du(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Su(e,n))));break;case 19:Cu(t,e,n),Eu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Su(e,t)));break;case 30:a&512&&($l||r===null||bl(r,r.return)),a=Rt(),o=au,s=(n&335544064)===n,c=e.memoizedProps,au=s&&ci(c.default,c.update)!==`none`,Cu(t,e,n),Eu(e),s&&r!==null&&Lt&&(e.flags|=4),au=o,Lt=a;break;case 21:break;case 7:a&512&&($l||r===null||bl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Cu(t,e,n),Eu(e)}}function Eu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Ol(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Tl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(wl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;jl(e,kl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(en(l,``),n.flags&=-33),jl(e,kl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Al(e,kl(e),u,s);break;default:throw Error(i(161))}}catch(t){mf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Du(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Du(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,vh=!0,t.reset(),vh=!1),e=e.sibling}}function Ou(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)ku(t,e),t=t.sibling;else Zl(t,!1)}function ku(e,t){var n=e.alternate;if(n===null)Ul(e,!1);else switch(e.tag){case 3:if(su=iu=!1,Ll(),Ou(t,e),!iu&&!ou){if(e=Il,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Op(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),su=!0}Il=null;break;case 5:Ou(t,e);break;case 4:r=iu,iu=!1,Ou(t,e),iu&&(ou=!0),iu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Ou(t,e):Ul(e,!1));break;case 30:r=iu,i=Ll(),iu=!1,Ou(t,e),iu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=oi(a,o),o=oi(n.memoizedProps,o);var s=ci(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Rl=0,t=Xl(e,n,t,o,s,a,!0),Rl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Nd(e,e.memoizedProps.onUpdate),Il=i):i!==null&&(i.push.apply(i,Il),Il=i),iu=e.flags&32?!0:r;break;default:Ou(t,e)}}function Au(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)uu(e,t.alternate,t),t=t.sibling}function ju(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:gl(4,n,n.return),ju(n,r);break;case 1:bl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&vl(n,n.return,i),ju(n,r);break;case 27:r&2&&vm(n.stateNode,n.type,n.memoizedProps);case 5:bl(n,n.return),n.tag!==5&&n.tag!==27||Cl(n),ju(n,r);break;case 6:Cl(n);break;case 26:bl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||$l||i.parentNode.removeChild(i),ju(n,r);break;case 22:n.memoizedState===null&&ju(n,r);break;case 30:bl(n,n.return),ju(n,r);break;case 7:bl(n,n.return);default:ju(n,r)}e=e.sibling}}function Mu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Mu(i,a,n),hl(4,a);break;case 1:if(Mu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){mf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)mo(l[i],c)}catch(e){mf(r,r.return,e)}}s&&o&64&&_l(a),yl(a,a.return);break;case 27:n&2&&Ml(a);case 5:a.tag!==5&&a.tag!==27||Sl(a),Mu(i,a,n),s&&r===null&&o&4&&El(a),yl(a,a.return);break;case 6:Sl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||Ql||Jm(Sm(c.ownerDocument),a.type,c),Mu(i,a,n),s&&r===null&&o&4&&El(a),yl(a,a.return);break;case 12:Mu(i,a,n);break;case 31:Mu(i,a,n),s&&o&4&&yu(i,a);break;case 13:Mu(i,a,n),s&&o&4&&bu(i,a);break;case 22:a.memoizedState===null&&Mu(i,a,n),yl(a,a.return);break;case 30:Mu(i,a,n),yl(a,a.return);break;case 7:yl(a,a.return);default:Mu(i,a,n)}t=t.sibling}}function Nu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ca(n))}function Pu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e))}function Fu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Iu(e,t,n,r),t=t.sibling;else i&&Yl(t)}function Iu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Jl(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Fu(e,t,n,r),a&2048&&hl(9,t);break;case 1:Fu(e,t,n,r);break;case 3:Fu(e,t,n,r),i&&su&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Ca(a)));break;case 12:if(a&2048){Fu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){mf(t,t.return,e)}}else Fu(e,t,n,r);break;case 31:Fu(e,t,n,r);break;case 13:Fu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&Jl(t),o._visibility&2?Fu(e,t,n,r):(o._visibility|=2,Lu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&Jl(s),o._visibility&2?Fu(e,t,n,r):Ru(e,t)),a&2048&&Nu(s,t);break;case 24:Fu(e,t,n,r),a&2048&&Pu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Vl(a.child,!0),Vl(t.child,!0))),Fu(e,t,n,r);break;default:Fu(e,t,n,r)}}function Lu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Lu(a,o,s,c,i),hl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Lu(a,o,s,c,i)):u._visibility&2?Lu(a,o,s,c,i):Ru(a,o),i&&l&2048&&Nu(o.alternate,o);break;case 24:Lu(a,o,s,c,i),i&&l&2048&&Pu(o.alternate,o);break;default:Lu(a,o,s,c,i)}t=t.sibling}}function Ru(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ru(n,r),i&2048&&Nu(r.alternate,r);break;case 24:Ru(n,r),i&2048&&Pu(r.alternate,r);break;default:Ru(n,r)}t=t.sibling}}var zu=8192;function Bu(e,t,n){if(e.subtreeFlags&zu)for(e=e.child;e!==null;)Vu(e,t,n),e=e.sibling}function Vu(e,t,n){switch(e.tag){case 26:Bu(e,t,n),e.flags&zu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&$m(n,e)):eh(n,wu,e.memoizedState,e.memoizedProps));break;case 5:Bu(e,t,n),e.flags&zu&&(e=e.stateNode,(t&335544128)===t&&$m(n,e));break;case 3:case 4:var r=wu;wu=Sm(e.stateNode.containerInfo),Bu(e,t,n),wu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=zu,zu=16777216,Bu(e,t,n),zu=r):Bu(e,t,n));break;case 30:if((e.flags&zu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Pl===null&&(Pl=new Map),Pl.set(r,i)}Bu(e,t,n);break;default:Bu(e,t,n)}}function Hu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Uu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ru=r,Ku(r,e)}Hu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Wu(e),e=e.sibling}function Wu(e){switch(e.tag){case 0:case 11:case 15:Uu(e),e.flags&2048&&gl(9,e,e.return);break;case 3:Uu(e);break;case 12:Uu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Gu(e)):Uu(e);break;default:Uu(e)}}function Gu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ru=r,Ku(r,e)}Hu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:gl(8,t,t.return),Gu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Gu(t));break;default:Gu(t)}e=e.sibling}}function Ku(e,t){for(;ru!==null;){var n=ru;switch(n.tag){case 0:case 11:case 15:gl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ru=r;else a:for(n=e;ru!==null;){r=ru;var i=r.sibling,a=r.return;if(mu(r),r===n){ru=null;break a}if(i!==null){i.return=a,ru=i;break a}ru=a}}}var qu={getCacheForType:function(e){var t=ha(xa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ha(xa).controller.signal}},Ju=typeof WeakMap==`function`?WeakMap:Map,Yu=0,Xu=null,Zu=null,Qu=0,$u=0,ed=null,td=!1,nd=!1,rd=!1,id=0,ad=0,od=0,sd=0,cd=0,ld=0,ud=0,dd=null,fd=null,pd=!1,md=0,hd=0,gd=1/0,_d=null,vd=null,yd=0,bd=null,xd=null,Sd=0,Cd=0,wd=null,Td=null,Ed=null,Dd=null,Od=null,kd=0,Ad=null;function jd(){return Yu&2&&Qu!==0?Qu&-Qu:G.T===null?dt():Pf()}function Md(){if(ld===0){if(!(Qu&536870912)||Ji){var e=Ye;Ye<<=1,!(Ye&3932160)&&(Ye=262144),ld=e}else ld=536870912}return e=xo.current,e!==null&&(e.flags|=32),ld}function Nd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Ip(oi(e.memoizedProps,n))),Dd===null&&(Dd=[]),Dd.push(t.bind(null,r))}}function Pd(e,t,n){(e===Xu&&($u===2||$u===9)||e.cancelPendingCommit!==null)&&(Vd(e,0),Rd(e,Qu,ld,!1)),it(e,n),(!(Yu&2)||e!==Xu)&&(e===Xu&&(!(Yu&2)&&(sd|=n),ad===4&&Rd(e,Qu,ld,!1)),Ef(e))}function Fd(e,t,n){if(Yu&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||$e(e,t),a=r?Yd(e,t):qd(e,t,!0),o=r;do{if(a===0){nd&&!r&&Rd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Ld(n)){a=qd(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=dd;var l=c.current.memoizedState.isDehydrated;if(l&&(Vd(c,s).flags|=256),s=qd(c,s,!1),s!==2&&s!==6){if(rd&&!l){c.errorRecoveryDisabledLanes|=o,sd|=o,a=4;break a}o=fd,fd=a,o!==null&&(fd===null?fd=o:fd.push.apply(fd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Vd(e,0),Rd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Rd(r,t,ld,!td);break a;case 2:fd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=md+300-Ne(),10<a)){if(Rd(r,t,ld,!td),Qe(r,0,!0)!==0)break a;Sd=t,r.timeoutHandle=vp(Id.bind(null,r,n,fd,_d,pd,t,ld,sd,ud,td,o,`Throttled`,-0,0),a);break a}Id(r,n,fd,_d,pd,t,ld,sd,ud,td,o,null,-0,0)}break}while(1);Ef(e)}function Id(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;if(d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:cn},Pl=null,Vu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=ih.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?md-Ne():(a&4194048)===a?hd-Ne():0,m=nh(d,m),m!==null)){Sd=a,e.cancelPendingCommit=m(nf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Rd(e,a,o,!l);return}nf(e,t,a,n,r,i,o,s,c,l,u,d)}function Ld(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ar(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Rd(e,t,n,r){t=et(e,t),t&=~cd,t&=~sd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-We(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ot(e,n,t)}function zd(){return Yu&6?!0:(Df(0,!1),!1)}function Bd(){if(Zu!==null){if($u===0)var e=Zu.return;else e=Zu,sa=oa=null,Zo(e),Ya=null,Xa=0,e=Zu;for(;e!==null;)ml(e.alternate,e),e=e.return;Zu=null}}function Vd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,yp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Sd=0,Bd(),Xu=e,Zu=n=Ci(e.current,null),Qu=t,$u=0,ed=null,td=!1,nd=$e(e,t),rd=!1,ud=ld=cd=sd=od=ad=0,fd=dd=null,pd=!1,id=et(e,t),pi(),n}function Hd(e,t){No=null,G.H=sc,t===za||t===Va?(t=qa(),$u=3):t===Ba?(t=qa(),$u=4):$u=t===Tc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ed=t,Zu===null&&(ad=1,yc(e,ji(t,e.current)))}function Ud(){var e=xo.current;return e===null?!0:(Qu&4194048)===Qu?So===null:(Qu&62914560)===Qu||Qu&536870912?e===So:!1}function Wd(){var e=G.H;return G.H=sc,e===null?sc:e}function Gd(){var e=G.A;return G.A=qu,e}function Kd(){ad=4,td||(Qu&4194048)!==Qu&&xo.current!==null||(nd=!0),!(od&134217727)&&!(sd&134217727)||Xu===null||Rd(Xu,Qu,ld,!1)}function qd(e,t,n){var r=Yu;Yu|=2;var i=Wd(),a=Gd();(Xu!==e||Qu!==t)&&(_d=null,Vd(e,t)),t=!1;var o=ad;a:do try{if($u!==0&&Zu!==null){var s=Zu,c=ed;switch($u){case 8:Bd(),o=6;break a;case 3:case 2:case 9:case 6:xo.current===null&&(t=!0);var l=$u;if($u=0,ed=null,$d(e,s,c,l),n&&nd){o=0;break a}break;default:l=$u,$u=0,ed=null,$d(e,s,c,l)}}Jd(),o=ad;break}catch(t){Hd(e,t)}while(1);return t&&e.shellSuspendCounter++,sa=oa=null,Yu=r,G.H=i,G.A=a,Zu===null&&(Xu=null,Qu=0,pi()),o}function Jd(){for(;Zu!==null;)Zd(Zu)}function Yd(e,t){var n=Yu;Yu|=2;var r=Wd(),a=Gd();Xu!==e||Qu!==t?(_d=null,gd=Ne()+500,Vd(e,t)):nd=$e(e,t);a:do try{if($u!==0&&Zu!==null){t=Zu;var o=ed;b:switch($u){case 1:$u=0,ed=null,$d(e,t,o,1);break;case 2:case 9:if(Ua(o)){$u=0,ed=null,Qd(t);break}t=function(){$u!==2&&$u!==9||Xu!==e||($u=7),Ef(e)},o.then(t,t);break a;case 3:$u=7;break a;case 4:$u=5;break a;case 7:Ua(o)?($u=0,ed=null,Qd(t)):($u=0,ed=null,$d(e,t,o,7));break;case 5:var s=null;switch(Zu.tag){case 26:s=Zu.memoizedState;case 5:case 27:var c=Zu;if(s?Zm(s):c.stateNode.complete){$u=0,ed=null;var l=c.sibling;if(l!==null)Zu=l;else{var u=c.return;u===null?Zu=null:(Zu=u,ef(u))}break b}}$u=0,ed=null,$d(e,t,o,5);break;case 6:$u=0,ed=null,$d(e,t,o,6);break;case 8:Bd(),ad=6;break a;default:throw Error(i(462))}}Xd();break}catch(t){Hd(e,t)}while(1);return sa=oa=null,G.H=r,G.A=a,Yu=n,Zu===null?(Xu=null,Qu=0,pi(),ad):0}function Xd(){for(;Zu!==null&&!je();)Zd(Zu)}function Zd(e){var t=al(e.alternate,e,id);e.memoizedProps=e.pendingProps,t===null?ef(e):Zu=t}function Qd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=zc(n,t,t.pendingProps,t.type,void 0,Qu);break;case 11:t=zc(n,t,t.pendingProps,t.type.render,t.ref,Qu);break;case 5:Zo(t);var r=t;r===Ki&&(Ji?(ea(r),r.tag===5&&r.stateNode!=null&&(qi=r.stateNode)):(ea(r),Ji=!0));default:ml(n,t),t=Zu=wi(t,id),t=al(n,t,id)}e.memoizedProps=e.pendingProps,t===null?ef(e):Zu=t}function $d(e,t,n,r){sa=oa=null,Zo(t),Ya=null,Xa=0;var i=t.return;try{if(wc(e,i,t,n,Qu)){ad=1,yc(e,ji(n,e.current)),Zu=null;return}}catch(t){if(i!==null)throw Zu=i,t;ad=1,yc(e,ji(n,e.current)),Zu=null;return}t.flags&32768?(Ji||r===1?e=!0:nd||Qu&536870912?e=!1:(td=e=!0,(r===2||r===9||r===3||r===6)&&(r=xo.current,r!==null&&r.tag===13&&(r.flags|=16384))),tf(t,e)):ef(t)}function ef(e){var t=e;do{if(t.flags&32768){tf(t,td);return}e=t.return;var n=fl(t.alternate,t,id);if(n!==null){Zu=n;return}if(t=t.sibling,t!==null){Zu=t;return}Zu=t=e}while(t!==null);ad===0&&(ad=5)}function tf(e,t){do{var n=pl(e.alternate,e);if(n!==null){n.flags&=32767,Zu=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Zu=e;return}Zu=e=n}while(e!==null);ad=6,Zu=null}function nf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do df();while(yd!==0);if(Yu&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===Xu&&(Zu=Xu=null,Qu=0),xd=t,bd=e,Sd=n,wd=a,Td=r,rf(e,t,n,s,c,l,f)}}function rf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Cd=s,s|=fi,at(e,n,s,r,i,a),Dd=null,(n&335544064)===n?(Od=Ea(e),r=10262):(Od=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,yf(Le,function(){return ff(),null})):(e.callbackNode=null,e.callbackPriority=0),Nl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=G.T,G.T=null,i=oe.p,oe.p=2,a=Yu,Yu|=4;try{cu(e,t,n)}finally{Yu=a,oe.p=i,G.T=r}}yd=1,Nl?Ed=Pp(o,e.containerInfo,Od,sf,cf,of,lf,ff,af,null,null):(sf(),cf(),lf())}function af(e){if(yd!==0){var t=bd.onRecoverableError;t(e,{componentStack:null})}}function of(){yd===3&&(yd=0,ku(xd,bd),yd=4)}function sf(){if(yd===1){yd=0;var e=bd,t=xd,n=Sd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=G.T,G.T=null;var i=oe.p;oe.p=2;var a=Yu;Yu|=4;try{au=ou=!1,Tu(t,e,n),n=up;var o=Ir(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Fr(s.ownerDocument.documentElement,s)){if(c!==null&&Lr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Pr(s,h),v=Pr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}vh=!!lp,up=lp=null}finally{Yu=a,oe.p=i,G.T=r}}e.current=t,yd=2}}function cf(){if(yd===2){yd=0;var e=bd,t=xd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=G.T,G.T=null;var r=oe.p;oe.p=2;var i=Yu;Yu|=4;try{uu(e,t.alternate,t)}finally{Yu=i,oe.p=r,G.T=n}}yd=3}}function lf(){if(yd===4||yd===3){yd=0;var e=Ed;Ed=null,Me();var t=bd,n=xd,r=Sd,i=Td,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?yd=5:(yd=0,xd=bd=null,uf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(vd=null),ut(r),n=n.stateNode,K&&typeof K.onCommitFiberRoot==`function`)try{K.onCommitFiberRoot(He,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=G.T,a=oe.p,oe.p=2,G.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{G.T=n,oe.p=a}}if(i=Dd,o=Od,Od=null,i!==null&&(Dd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Sd&3&&df(),Ef(t),a=t.pendingLanes,r&261930&&a&42?t===Ad?kd++:(kd=0,Ad=t):(kd=0,Ad=null),Df(0,!1)}}function uf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ca(t)))}function df(){return Ed!==null&&(Ed.skipTransition(),Ed=null),sf(),cf(),lf(),ff()}function ff(){if(yd!==5)return!1;var e=bd,t=Cd;Cd=0;var n=ut(Sd),r=G.T,a=oe.p;try{oe.p=32>n?32:n,G.T=null,n=wd,wd=null;var o=bd,s=Sd;if(yd=0,xd=bd=null,Sd=0,Yu&6)throw Error(i(331));var c=Yu;if(Yu|=4,Wu(o.current),Iu(o,o.current,s,n),Yu=c,Df(0,!1),K&&typeof K.onPostCommitFiberRoot==`function`)try{K.onPostCommitFiberRoot(He,o)}catch{}return!0}finally{oe.p=a,G.T=r,uf(e,t)}}function pf(e,t,n){t=ji(n,t),t=xc(e.stateNode,t,2),e=so(e,t,2),e!==null&&(it(e,2),Ef(e))}function mf(e,t,n){if(e.tag===3)pf(e,e,n);else for(;t!==null;){if(t.tag===3){pf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(vd===null||!vd.has(r))){e=ji(n,e),n=Sc(2),r=so(t,n,2),r!==null&&(Cc(n,r,t,e),it(r,2),Ef(r));break}}t=t.return}}function hf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ju;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(rd=!0,i.add(n),e=gf.bind(null,e,t,n),t.then(e,e))}function gf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Xu===e&&(Qu&n)===n&&(ad===4||ad===3&&(Qu&62914560)===Qu&&300>Ne()-md?Yu&2?cd|=n:Vd(e,0):cd|=n,ud===Qu&&(ud=0)),Ef(e)}function Z(e,t){t===0&&(t=nt()),e=gi(e,t),e!==null&&(it(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Z(e,n)}function vf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Z(e,n)}function yf(e,t){return ke(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-We(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=Qu,a=Qe(r,r===Xu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||$e(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&_p()&&(e=Tf);for(var t=Ne(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}yd!==0&&yd!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-We(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=tt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Xu,n=Qu,n=Qe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&($u===2||$u===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ae(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||$e(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ae(r),ut(n)){case 2:case 8:n=Ie;break;case 32:n=Le;break;case 268435456:n=ze;break;default:n=Le}return r=jf.bind(null,e),n=ke(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ae(r),e.callbackPriority=2,e.callbackNode=null,2}function jf(e,t){if(yd!==0&&yd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(df()&&e.callbackNode!==n)return null;var r=Qu;return r=Qe(e,e===Xu?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Fd(e,r,t),Af(e,Ne()),e.callbackNode!=null&&e.callbackNode===n?jf.bind(null,e):null)}function Mf(e,t){if(df())return null;Fd(e,t,!0)}function Nf(){Sp(function(){Yu&6?ke(Fe,Of):kf()})}function Pf(){if(Tf===0){var e=ka;e===0&&(e=Je,Je<<=1,!(Je&261888)&&(Je=256)),Tf=e}return Tf}function Ff(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:sn(e)}function If(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Ff((i[ht]||null).action),o=r.submitter;o&&(t=(t=o[ht]||null)?Ff(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new On(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Tf!==0){var e=new FormData(i,o);qs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),qs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Lf=0;Lf<ri.length;Lf++){var Rf=ri[Lf];ii(Rf.toLowerCase(),`on`+(Rf[0].toUpperCase()+Rf.slice(1)))}ii(Yr,`onAnimationEnd`),ii(Xr,`onAnimationIteration`),ii(Zr,`onAnimationStart`),ii(`dblclick`,`onDoubleClick`),ii(`focusin`,`onFocus`),ii(`focusout`,`onBlur`),ii(Qr,`onTransitionRun`),ii($r,`onTransitionStart`),ii(ei,`onTransitionCancel`),ii(ti,`onTransitionEnd`),Mt(`onMouseEnter`,[`mouseout`,`mouseover`]),Mt(`onMouseLeave`,[`mouseout`,`mouseover`]),Mt(`onPointerEnter`,[`pointerout`,`pointerover`]),Mt(`onPointerLeave`,[`pointerout`,`pointerover`]),jt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),jt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),jt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),jt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),jt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),jt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var zf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Bf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(zf));function Vf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){li(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){li(e)}i.currentTarget=null,a=c}}}}function Hf(e,t){var n=t[q];n===void 0&&(n=t[q]=new Set);var r=e+`__bubble`;n.has(r)||(Kf(t,e,2,!1),n.add(r))}function Uf(e,t,n){var r=0;t&&(r|=4),Kf(n,e,r,t)}var Wf=`_reactListening`+Math.random().toString(36).slice(2);function Gf(e){if(!e[Wf]){e[Wf]=!0,kt.forEach(function(t){t!==`selectionchange`&&(Bf.has(t)||Uf(t,!1,e),Uf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wf]||(t[Wf]=!0,Uf(`selectionchange`,!1,t))}}function Kf(e,t,n,r){switch(Th(t)){case 2:var i=yh;break;case 8:i=bh;break;default:i=xh}n=i.bind(null,t,n,e),i=void 0,!vn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function qf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Ct(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}hn(function(){var r=a,i=un(n),s=[];a:{var c=ni.get(e);if(c!==void 0){var l=On,u=e;switch(e){case`keypress`:if(Cn(n)===0)break a;case`keydown`:case`keyup`:l=Kn;break;case`focusin`:u=`focus`,l=Ln;break;case`focusout`:u=`blur`,l=Ln;break;case`beforeblur`:case`afterblur`:l=Ln;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Fn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=In;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Yn;break;case Yr:case Xr:case Zr:l=Rn;break;case ti:l=Xn;break;case`scroll`:case`scrollend`:l=An;break;case`wheel`:l=Zn;break;case`copy`:case`cut`:case`paste`:l=zn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=qn;break;case`submit`:l=Jn;break;case`toggle`:case`beforetoggle`:l=Qn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=gn(m,p),g!=null&&d.push(Jf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==ln&&(u=n.relatedTarget||n.fromElement)&&(Ct(u)||u[gt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Ct(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Fn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=qn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Tt(c),h=l==null?u:Tt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Ct(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Xf):null,c!==null&&Zf(s,u,c,d,!1),l!==null&&f!==null&&Zf(s,f,l,d,!0)))}a:{if(c=r?Tt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=vr;else if(fr(c)){if(yr)_=Or;else{_=Er;var v=Tr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&rn(r.elementType)&&(_=vr):_=Dr;if(_&&=_(e,r)){pr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Tt(r):window,e){case`focusin`:(fr(v)||v.contentEditable===`true`)&&(zr=v,Br=r,Vr=null);break;case`focusout`:Vr=Br=zr=null;break;case`mousedown`:Hr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Hr=!1,Ur(s,n,i);break;case`selectionchange`:if(Rr)break;case`keydown`:case`keyup`:Ur(s,n,i)}var y;if(er)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else cr?or(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(rr&&n.locale!==`ko`&&(cr||b!==`onCompositionStart`?b===`onCompositionEnd`&&cr&&(y=Sn()):(X=i,bn=`value`in X?X.value:X.textContent,cr=!0)),v=Yf(r,b),0<v.length&&(b=new Bn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=sr(n),y!==null&&(b.data=y)))),(y=nr?lr(e,n):ur(e,n))&&(b=Yf(r,`onBeforeInput`),0<b.length&&(v=new Bn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),If(s,e,r,n,i)}Vf(s,t)})}function Jf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=gn(e,n),i!=null&&r.unshift(Jf(e,i,a)),i=gn(e,t),i!=null&&r.push(Jf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Xf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Zf(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=gn(n,a),l!=null&&o.unshift(Jf(n,l,c))):i||(l=gn(n,a),l!=null&&o.push(Jf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Qf=/\r\n?/g,$f=/\u0000|\uFFFD/g;function ep(e){return(typeof e==`string`?e:``+e).replace(Qf,`
|
|
10
|
-
`).replace($f,``)}function tp(e,t){return t=ep(t),ep(e)===t}function np(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||en(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&en(e,``+r);else return;break;case`className`:Bt(e,`class`,r);break;case`tabIndex`:Bt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Bt(e,n,r);break;case`style`:nn(e,r,o);return;case`data`:if(t!==`object`){Bt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=sn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&np(e,t,`name`,a.name,a,null),np(e,t,`formEncType`,a.formEncType,a,null),np(e,t,`formMethod`,a.formMethod,a,null),np(e,t,`formTarget`,a.formTarget,a,null)):(np(e,t,`encType`,a.encType,a,null),np(e,t,`method`,a.method,a,null),np(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=sn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=cn);return;case`onScroll`:r!=null&&Hf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Hf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=sn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Hf(`beforetoggle`,e),Hf(`toggle`,e),zt(e,`popover`,r);break;case`xlinkActuate`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:zt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=an.get(n)||n,zt(e,n,r);else return}Lt=!0}function rp(e,t,n,r,a,o){switch(n){case`style`:nn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)en(e,r);else if(typeof r==`number`||typeof r==`bigint`)en(e,``+r);else return;break;case`onScroll`:r!=null&&Hf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Hf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=cn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!At.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[ht]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Lt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):zt(e,n,r)}return}Lt=!0}function ip(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Hf(`error`,e),Hf(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:np(e,t,o,s,n,null)}}a&&np(e,t,`srcSet`,n.srcSet,n,null),r&&np(e,t,`src`,n.src,n,null);return;case`input`:Hf(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:np(e,t,r,d,n,null)}}Xt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Hf(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:np(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Qt(e,!!r,n,!0):Qt(e,!!r,t,!1);return;case`textarea`:for(s in Hf(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:np(e,t,s,c,n,null)}J(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:np(e,t,l,r,n,null)}return;case`dialog`:Hf(`beforetoggle`,e),Hf(`toggle`,e),Hf(`cancel`,e),Hf(`close`,e);break;case`iframe`:case`object`:Hf(`load`,e);break;case`video`:case`audio`:for(r=0;r<zf.length;r++)Hf(zf[r],e);break;case`image`:Hf(`error`,e),Hf(`load`,e);break;case`details`:Hf(`toggle`,e);break;case`embed`:case`source`:case`link`:Hf(`error`,e),Hf(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:np(e,t,u,r,n,null)}return;default:if(rn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&rp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&np(e,t,c,r,n,null))}var ap={};function op(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||np(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Lt=!0),o=m;break;case`name`:m!==f&&(Lt=!0),a=m;break;case`checked`:m!==f&&(Lt=!0),u=m;break;case`defaultChecked`:m!==f&&(Lt=!0),d=m;break;case`value`:m!==f&&(Lt=!0),s=m;break;case`defaultValue`:m!==f&&(Lt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&np(e,t,p,m,r,f)}}Yt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||np(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Lt=!0),p=o;break;case`defaultValue`:o!==l&&(Lt=!0),c=o;break;case`multiple`:o!==l&&(Lt=!0),s=o;default:o!==l&&np(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Qt(e,!!n,n?[]:``,!1):Qt(e,!!n,t,!0)):Qt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:np(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Lt=!0),p=a;break;case`defaultValue`:a!==o&&(Lt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&np(e,t,s,a,r,o)}$t(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:np(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Lt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:np(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&np(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:np(e,t,u,p,r,m)}return;default:if(rn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&rp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||rp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&np(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||np(e,t,f,p,r,m)}function sp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function cp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&sp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&sp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var lp=null,up=null;function dp(e){return e.nodeType===9?e:e.ownerDocument}function fp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function pp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function mp(e,t,n,r){return n=dp(n).createElement(e),n[mt]=r,n[ht]=t,ip(n,e,t),Dt(n),n}function hp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var gp=null;function _p(){var e=window.event;return e&&e.type===`popstate`?e!==gp&&(gp=e,!0):(gp=null,!1)}var vp=typeof setTimeout==`function`?setTimeout:void 0,yp=typeof clearTimeout==`function`?clearTimeout:void 0,bp=typeof Promise==`function`?Promise:void 0,xp=typeof requestAnimationFrame==`function`?requestAnimationFrame:vp,Sp=typeof queueMicrotask==`function`?queueMicrotask:bp===void 0?vp:function(e){return bp.resolve(null).then(e).catch(Cp)};function Cp(e){setTimeout(function(){throw e})}function wp(e){return e===`head`}function Tp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Uh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)ym(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,ym(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[bt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&ym(e.ownerDocument.body)}n=i}while(n);Uh(t)}function Ep(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Dp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Op(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function kp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Ap(e){return kp(e.getBoundingClientRect(),getComputedStyle(e),e)}function jp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return kp(t,n,e)}function Mp(e){return e.documentElement.clientHeight}function Np(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Pp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Mp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Qm(f),u>th){s.length=o;break}f=new Promise(Np.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Fp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Fp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Fp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Fp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Ip(e){return{name:e,group:new Fp(`group`,e),imagePair:new Fp(`image-pair`,e),old:new Fp(`old`,e),new:new Fp(`new`,e)}}function Lp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Lp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Hp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Bp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,Rp,e,s,r)}this._eventListeners=a}};function Rp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Lp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Hp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Bp(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,zp,e,n,i),r.splice(t,1),a!==null&&a()}};function zp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Bp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Vp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Hp(e,t,n,r){if(e.length===0)return-1;r=Vp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Vp(a.optionsOrUseCapture)===r)return i}return-1}Lp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Bp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Bp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Lp.prototype.focus=function(e){m(this._fragmentFiber.child,!0,Up,e,void 0,void 0)};function Up(e,t){return e.tag!==6&&(e=b(e),hm(e,t))}Lp.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,Wp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Up(t[n],e);n--);};function Wp(e,t){return t.push(e),!1}Lp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=dp(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,Gp,e,void 0,void 0))};function Gp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Lp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,Kp,e,void 0,void 0)};function Kp(e,t){return e.tag!==6&&(e=b(e),t.observe(e),!1)}Lp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,qp,e,void 0,void 0);for(var n=t=0;n<Jp.length;n++){var r=Jp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Jp[t++]=r}Jp.length=t}};function qp(e,t){return e.tag!==6&&(e=b(e),t.unobserve(e),!1)}var Jp=[],Yp=!1;function Xp(e,t,n){Jp.push({fragmentInstance:e,observer:t,instance:n}),Yp||(Yp=!0,gm(function(){Yp=!1;var e=Jp;Jp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Lp.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,Zp,e,void 0,void 0),e};function Zp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Lp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Lp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,Wp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Qp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Qp(e,t,n,r,i){var a=Ct(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(m(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(m(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function $p(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Lp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,Wp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),$p(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),$p(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function em(e,t){return e=b(e),tm(e,t),!1}function tm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function nm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Jp.length;i++){var a=Jp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Jp[r++]=a)}Jp.length=r,n.observe(e)}),tm(e,t))}function rm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Xp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function im(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:im(n),St(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function am(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[bt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=dm(e.nextSibling),e===null)break}return null}function om(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=dm(e.nextSibling),e===null))return null;return e}function sm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=dm(e.nextSibling),e===null))return null;return e}function cm(e){return e.data===`$?`||e.data===`$~`}function lm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function um(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function dm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var fm=null;function pm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return dm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function hm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function gm(e){xp(function(){xp(function(t){return e(t)})})}function _m(e,t,n){switch(t=dp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function vm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&np(e,t,r,null,ap,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===cn&&(e.onclick=null),St(e)}function ym(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);St(e)}var bm=new Map,xm=new Set;function Sm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Cm=oe.d;oe.d={f:wm,r:Tm,D:Om,C:km,L:Am,m:jm,X:Nm,S:Mm,M:Pm};function wm(){var e=Cm.f(),t=zd();return e||t}function Tm(e){var t=wt(e);t!==null&&t.tag===5&&t.type===`form`?Ys(t):Cm.r(e)}var Em=typeof document>`u`?null:document;function Dm(e,t,n){var r=Em;if(r&&typeof t==`string`&&t){var i=Jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),xm.has(i)||(xm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),ip(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Om(e){Cm.D(e),Dm(`dns-prefetch`,e,null)}function km(e,t){Cm.C(e,t),Dm(`preconnect`,e,t)}function Am(e,t,n){Cm.L(e,t,n);var r=Em;if(r&&e&&t){var i=`link[rel="preload"][as="`+Jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Jt(n.imageSizes)+`"]`)):i+=`[href="`+Jt(e)+`"]`;var a=i;switch(t){case`style`:a=Im(e);break;case`script`:a=Bm(e)}if(!(bm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),bm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Lm(a))||t===`script`&&r.querySelector(Vm(a))))){var o=r.createElement(`link`);ip(o,`link`,e),t===`style`&&(o[xt]=!0,o.onload=o.onerror=function(){Ot(o)}),Dt(o),r.head.appendChild(o)}}}function jm(e,t){Cm.m(e,t);var n=Em;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Jt(r)+`"][href="`+Jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Bm(e)}if(!bm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),bm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Vm(a)))return}r=n.createElement(`link`),ip(r,`link`,e),Dt(r),n.head.appendChild(r)}}}function Mm(e,t,n){Cm.S(e,t,n);var r=Em;if(r&&e){var i=Et(r).hoistableStyles,a=Im(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Lm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=bm.get(a))&&Wm(e,n);var c=o=r.createElement(`link`);Dt(c),ip(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Um(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Nm(e,t){Cm.X(e,t);var n=Em;if(n&&e){var r=Et(n).hoistableScripts,i=Bm(e),a=r.get(i);a||(a=n.querySelector(Vm(i)),a||(e=D({src:e,async:!0},t),(t=bm.get(i))&&Gm(e,t),a=n.createElement(`script`),Dt(a),ip(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pm(e,t){Cm.M(e,t);var n=Em;if(n&&e){var r=Et(n).hoistableScripts,i=Bm(e),a=r.get(i);a||(a=n.querySelector(Vm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=bm.get(i))&&Gm(e,t),a=n.createElement(`script`),Dt(a),ip(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Fm(e,t,n,r){var a=(a=he.current)?Sm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Im(n.href),t=Et(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Im(n.href);var o=Et(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Lm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=bm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},bm.set(e,o)),zm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Bm(n),t=Et(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Im(e){return`href="`+Jt(e)+`"`}function Lm(e){return`link[rel="stylesheet"][`+e+`]`}function Rm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function zm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[xt]){r.loading=1;return}}else t=e.createElement(`link`),t[xt]=!0,t.onload=t.onerror=Ot.bind(null,t),ip(t,`link`,n),Dt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Bm(e){return`[src="`+Jt(e)+`"]`}function Vm(e){return`script[async]`+e}function Hm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Jt(n.href)+`"]`);if(r)return t.instance=r,Dt(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Dt(r),ip(r,`style`,a),Um(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Im(n.href);var o=e.querySelector(Lm(a));if(o)return t.state.loading|=4,t.instance=o,Dt(o),o;r=Rm(n),(a=bm.get(a))&&Wm(r,a),o=(e.ownerDocument||e).createElement(`link`),Dt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ip(o,`link`,r),t.state.loading|=4,Um(o,n.precedence,e),t.instance=o;case`script`:return o=Bm(n.src),(a=e.querySelector(Vm(o)))?(t.instance=a,Dt(a),a):(r=n,(a=bm.get(o))&&(r=D({},n),Gm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Dt(a),ip(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Um(r,n.precedence,e));return t.instance}function Um(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Wm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Gm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Km=null;function qm(e,t,n){if(Km===null){var r=new Map,i=Km=new Map;i.set(n,r)}else i=Km,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[bt]||a[mt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Jm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Ym(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Xm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Zm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Qm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function $m(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Qm(t),e.suspenseyImages.push(t)),e=ah.bind(e),t.decode().then(e,e))}function eh(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Im(r.href),a=t.querySelector(Lm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ih.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Dt(a);return}a=t.ownerDocument||t,r=Rm(r),(i=bm.get(i))&&Wm(r,i),a=a.createElement(`link`),Dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),ip(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ih.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var th=0;function nh(e,t){return e.stylesheets&&e.count===0&&sh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&th===0&&(th=62500*cp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>th?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)sh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ih(){this.count--,rh(this)}function ah(){this.imgCount--,rh(this)}var oh=null;function sh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oh=new Map,t.forEach(ch,e),oh=null,ih.call(e))}function ch(e,t){if(!(t.state.loading&4)){var n=oh.get(e);if(n)var r=n.get(null);else{n=new Map,oh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ih.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var lh={$$typeof:F,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function uh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=rt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rt(0),this.hiddenUpdates=rt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function dh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new uh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=xi(3,null,null,t),e.current=a,a.stateNode=e,t=Sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},io(a),e}function fh(e){return e?(e=yi,e):yi}function ph(e,t,n,r,i,a){i=fh(i),r.context===null?r.context=i:r.pendingContext=i,r=oo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=so(e,r,t),n!==null&&(Pd(n,e,t),co(n,e,t))}function mh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hh(e,t){mh(e,t),(e=e.alternate)&&mh(e,t)}function gh(e){if(e.tag===13||e.tag===31){var t=gi(e,67108864);t!==null&&Pd(t,e,67108864),hh(e,67108864)}}function _h(e){if(e.tag===13||e.tag===31){var t=jd();t=lt(t);var n=gi(e,t);n!==null&&Pd(n,e,t),hh(e,t)}}var vh=!0;function yh(e,t,n,r){var i=G.T;G.T=null;var a=oe.p;try{oe.p=2,xh(e,t,n,r)}finally{oe.p=a,G.T=i}}function bh(e,t,n,r){var i=G.T;G.T=null;var a=oe.p;try{oe.p=8,xh(e,t,n,r)}finally{oe.p=a,G.T=i}}function xh(e,t,n,r){if(vh){var i=Sh(r);if(i===null)qf(e,t,r,Ch,n),Nh(e,r);else if(Fh(i,e,t,n,r))r.stopPropagation();else if(Nh(e,r),t&4&&-1<Mh.indexOf(e)){for(;i!==null;){var a=wt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ze(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-We(o);s.entanglements[1]|=c,o&=~c}Ef(a),!(Yu&6)&&(gd=Ne()+500,Df(0,!1))}}break;case 31:case 13:s=gi(a,2),s!==null&&Pd(s,a,2),zd(),hh(a,2)}if(a=Sh(r),a===null&&qf(e,t,r,Ch,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else qf(e,t,r,null,n)}}function Sh(e){return e=un(e),wh(e)}var Ch=null;function wh(e){if(Ch=null,e=Ct(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ch=e,null}function Th(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Pe()){case Fe:return 2;case Ie:return 8;case Le:case Re:return 32;case ze:return 268435456;default:return 32}default:return 32}}var Eh=!1,Dh=null,Oh=null,kh=null,Ah=new Map,Q=new Map,jh=[],Mh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Nh(e,t){switch(e){case`focusin`:case`focusout`:Dh=null;break;case`dragenter`:case`dragleave`:Oh=null;break;case`mouseover`:case`mouseout`:kh=null;break;case`pointerover`:case`pointerout`:Ah.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Q.delete(t.pointerId)}}function Ph(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=wt(t),t!==null&&gh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Fh(e,t,n,r,i){switch(t){case`focusin`:return Dh=Ph(Dh,e,t,n,r,i),!0;case`dragenter`:return Oh=Ph(Oh,e,t,n,r,i),!0;case`mouseover`:return kh=Ph(kh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ah.set(a,Ph(Ah.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Q.set(a,Ph(Q.get(a)||null,e,t,n,r,i)),!0}return!1}function Ih(e){var t=Ct(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ft(e.priority,function(){_h(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ft(e.priority,function(){_h(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Lh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ln=r,n.target.dispatchEvent(r),ln=null}else return t=wt(n),t!==null&&gh(t),e.blockedOn=n,!1;t.shift()}return!0}function Rh(e,t,n){Lh(e)&&n.delete(t)}function zh(){Eh=!1,Dh!==null&&Lh(Dh)&&(Dh=null),Oh!==null&&Lh(Oh)&&(Oh=null),kh!==null&&Lh(kh)&&(kh=null),Ah.forEach(Rh),Q.forEach(Rh)}function Bh(e,n){e.blockedOn===n&&(e.blockedOn=null,Eh||(Eh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,zh)))}var Vh=null;function Hh(e){Vh!==e&&(Vh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Vh===e&&(Vh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(wh(r||n)===null)continue;break}var a=wt(n);a!==null&&(e.splice(t,3),t-=3,qs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Uh(e){function t(t){return Bh(t,e)}Dh!==null&&Bh(Dh,e),Oh!==null&&Bh(Oh,e),kh!==null&&Bh(kh,e),Ah.forEach(t),Q.forEach(t);for(var n=0;n<jh.length;n++){var r=jh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<jh.length&&(n=jh[0],n.blockedOn===null);)Ih(n),n.blockedOn===null&&jh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ht]||null;if(typeof a==`function`)o||Hh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ht]||null)s=o.formAction;else if(wh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Hh(n)}}}function Wh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Gh(e){this._internalRoot=e}Kh.prototype.render=Gh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ph(n,jd(),e,t,null,null)},Kh.prototype.unmount=Gh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ph(e.current,2,null,e,null,null),zd(),t[gt]=null}};function Kh(e){this._internalRoot=e}Kh.prototype.unstable_scheduleHydration=function(e){if(e){var t=dt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<jh.length&&t!==0&&t<jh[n].priority;n++);jh.splice(n,0,e),n===0&&Ih(e)}};var qh=n.version;if(qh!==`19.3.0`)throw Error(i(527,qh,`19.3.0`));oe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Jh={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:G,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Yh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yh.isDisabled&&Yh.supportsFiber)try{He=Yh.inject(Jh),K=Yh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=gc,s=_c,c=vc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=dh(e,1,!1,null,null,n,r,null,o,s,c,Wh),e[gt]=t.current,Gf(e),new Gh(t)}})),_=o(((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=o((e=>{var t=d().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;e.c=function(e){return t.H.useMemoCache(e)}})),y=o(((e,t)=>{t.exports=v()})),b=l(d(),1),x={};function S(e,t){let n=b.useRef(x);return n.current===x&&(n.current=e(t)),n}var C=[],w=void 0;function T(){return w}function E(e){C.push(e)}function D(e){let t=(t,n)=>{let r=S(k).current,i;try{w=r;for(let e of C)e.before(r);i=e(t,n);for(let e of C)e.after(r);r.didInitialize=!0}finally{w=void 0}return i};return t.displayName=e.displayName||e.name,t}function O(e){return b.forwardRef(D(e))}function k(){return{didInitialize:!1}}function A(){}var j=Object.freeze([]),M=Object.freeze({}),N=typeof document<`u`?b.useLayoutEffect:()=>{};function P(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var F=P(`https://base-ui.com/production-error`,`Base UI`),I=b.createContext(void 0);function L(e){let t=b.useContext(I);if(t===void 0&&!e)throw Error(F(72));return t}function R(e){b.useEffect(e,j)}var z=0,B=class e{static create(){return new e}currentId=z;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=z,t()},e)}isStarted(){return this.currentId!==z}clear=()=>{this.currentId!==z&&(clearTimeout(this.currentId),this.currentId=z)};disposeEffect=()=>this.clear};function V(){let e=S(B.create).current;return R(e.disposeEffect),e}function H(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:U,platform:ee,maxTouchPoints:te}=H(),ne=U.toLowerCase(),W=ee.toLowerCase(),re=/^i(os$|p)/.test(W)||W===`macintel`&&te>1,ie=`android`,ae=W===ie||ne.includes(ie),G=!re&&W.startsWith(`mac`);W.startsWith(`win`),!ae&&/^(linux|chrome os)/.test(W);var oe=G||re,se=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`),ce=!se&&ne.includes(`firefox`);!se&&ne.includes(`chrom`);var le=oe,ue=/jsdom|happydom/.test(ne);function de(e){e.preventDefault(),e.stopPropagation()}function fe(e){return`nativeEvent`in e}function pe(e){return e.pointerType===``&&e.isTrusted?!0:ae&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function me(e){return ue?!1:!ae&&e.width===0&&e.height===0||ae&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function he(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function ge(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function _e(){return typeof window<`u`}function ve(e){return xe(e)?(e.nodeName||``).toLowerCase():`#document`}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function be(e){return((xe(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function xe(e){return _e()?e instanceof Node||e instanceof ye(e).Node:!1}function Se(e){return _e()?e instanceof Element||e instanceof ye(e).Element:!1}function Ce(e){return _e()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function we(e){return!_e()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function Te(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Ie(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Ee(e){return/^(table|td|th)$/.test(ve(e))}function De(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Oe=/transform|translate|scale|rotate|perspective|filter/,ke=/paint|layout|strict|content/,Ae=e=>!!e&&e!==`none`,je;function Me(e){let t=Se(e)?Ie(e):e;return Ae(t.transform)||Ae(t.translate)||Ae(t.scale)||Ae(t.rotate)||Ae(t.perspective)||!Pe()&&(Ae(t.backdropFilter)||Ae(t.filter))||Oe.test(t.willChange||``)||ke.test(t.contain||``)}function Ne(e){let t=Re(e);for(;Ce(t)&&!Fe(t);){if(Me(t))return t;if(De(t))return null;t=Re(t)}return null}function Pe(){return je??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),je}function Fe(e){return/^(html|body|#document)$/.test(ve(e))}function Ie(e){return ye(e).getComputedStyle(e)}function Le(e){return Se(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Re(e){if(ve(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||we(e)&&e.host||be(e);return we(t)?t.host:t}function ze(e){let t=Re(e);return Fe(t)?(e.ownerDocument||e).body:Ce(t)&&Te(t)?t:ze(t)}function Be(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ze(e),i=r===e.ownerDocument?.body,a=ye(r);if(i){let e=Ve(a);return t.concat(a,a.visualViewport||[],Te(r)?r:[],e&&n?Be(e):[])}return t.concat(r,Be(r,[],n))}function Ve(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function He(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function K(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&we(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ue(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var We=`data-base-ui-focusable`,Ge=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,Ke=`ArrowLeft`,qe=`ArrowRight`,Je=`ArrowUp`,Ye=`ArrowDown`,Xe=`data-starting-style`,Ze=`data-ending-style`,Qe={[Xe]:``},$e={[Ze]:``},et={transitionStatus(e){return e===`starting`?Qe:e===`ending`?$e:null}},tt=`data-open`,nt=`data-closed`,rt=`data-anchor-hidden`,it=`data-popup-open`,at=`data-pressed`,ot={[it]:``},st={[it]:``,[at]:``},ct={[tt]:``},lt={[nt]:``},ut={[rt]:``},dt={open(e){return e?ot:null}},ft={open(e){return e?st:null}},pt={open(e){return e?ct:lt},anchorHidden(e){return e?ut:null}},mt={...pt,...et},ht=`data-trigger-disabled`;function gt(e,t){if(!Se(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(ht);for(let[,e]of t.entries())if(K(e,n))return!e.hasAttribute(ht);return!1}function q(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function _t(e){return e.matches(`html,body`)}function vt(e){return Ce(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function yt(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Ge}`)!=null}function bt(e){return e?e.getAttribute(`role`)===`combobox`&&vt(e):!1}function xt(e){if(!e||ue)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function St(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Ct(e,t){return t!=null&&!he(t)?0:typeof e==`function`?e():e}function wt(e,t,n){let r=Ct(e,n);return typeof r==`number`?r:r?.[t]}function Tt(e){return typeof e==`function`?e():e}function Et(e,t){return t||e===`click`||e===`mousedown`}function Dt(e){return e?.includes(`mouse`)&&e!==`mousedown`}var Ot=`none`,kt=`trigger-press`,At=`trigger-hover`,jt=`trigger-focus`,Mt=`outside-press`,Nt=`item-press`,Pt=`close-press`,Ft=`increment-press`,It=`decrement-press`,Lt=`input-change`,Rt=`input-clear`,zt=`input-blur`,Bt=`input-paste`,Vt=`input-press`,Ht=`focus-out`,Ut=`escape-key`,Wt=`list-navigation`,Gt=`keyboard`,Kt=`pointer`,qt=`wheel`,Jt=`cancel-open`,Yt=`sibling-open`,Xt=`disabled`,Zt=`missing`,Qt=`initial`,$t=`imperative-action`;function J(e,t,n,r){let i=!1,a=!1,o=r??M;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function en(e,t,n){let r=n??M;return{reason:e,event:t??new Event(`base-ui`),...r}}var tn=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Y=o(((e,t)=>{t.exports=tn()}))(),nn=b.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new B,currentIdRef:{current:null},currentContextRef:{current:null}});function rn(e,t){e.current=t.current}function an(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=b.useRef(n),a=b.useRef(n),o=b.useRef(null),s=b.useRef(null),c=V();return N(()=>{if(a.current=n,!o.current){i.current=n;return}i.current={open:wt(i.current,`open`),close:wt(n,`close`)}},[n,o,i,a]),(0,Y.jsx)(nn.Provider,{value:b.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function on(e,t={open:!1}){let{open:n}=t,r=`rootStore`in e?e.rootStore:e,i=r.useState(`floatingId`),{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:u,timeout:d}=b.useContext(nn),[f,p]=b.useState(!1),m=b.useRef(n);return N(()=>{m.current=n},[n]),N(()=>{function e(){l.current?.setIsInstantPhase(!1),a.current=null,l.current=null,o.current=c.current,d.clear()}if(a.current&&!n&&a.current===i){if(p(!1),s){let t=i;return d.start(s,()=>{r.select(`open`)||a.current&&a.current!==t||e()}),()=>{(m.current||a.current!==t)&&d.clear()}}e()}},[n,i,a,o,s,c,l,d,r]),N(()=>{if(!n)return;let e=l.current,t=a.current;d.clear(),l.current={onOpenChange:r.setOpen,setIsInstantPhase:p},a.current=i,o.current={open:0,close:wt(c.current,`close`)},t!==null&&t!==i?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,J(Ot))):(p(!1),e?.setIsInstantPhase(!1))},[n,i,r,a,o,c,l,d]),N(()=>()=>{if(a.current===i){if(l.current=null,!m.current)return;a.current=null,rn(o,c),d.clear()}},[l,a,o,i,c,d]),b.useMemo(()=>({activeIdRef:a,hasProvider:u,delayRef:o,isInstantPhase:f}),[a,u,o,f])}function sn(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function cn(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function ln(e,t,n,r){let i=S(dn).current;return fn(i,e,t,n,r)&&mn(i,[e,t,n,r]),i.callback}function un(e){let t=S(dn).current;return pn(t,e)&&mn(t,e),t.callback}function dn(){return{callback:null,cleanup:null,refs:[]}}function fn(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function pn(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function mn(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}function hn(e){let t=S(gn,e).current;return t.next=e,N(t.effect),t}function gn(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var _n={...b},vn=_n.useInsertionEffect,yn=vn&&vn!==_n.useLayoutEffect?vn:e=>e();function X(e){let t=S(bn).current;return t.next=e,yn(t.effect),t.trampoline}function bn(){let e={next:void 0,callback:xn,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function xn(){}var Sn=null;globalThis.requestAnimationFrame;var Cn=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},wn=class e{static create(){return new e}static request(e){return Cn.request(e)}static cancel(e){return Cn.cancel(e)}currentId=Sn;request(e){this.cancel(),this.currentId=Cn.request(()=>{this.currentId=Sn,e()})}cancel=()=>{this.currentId!==Sn&&(Cn.cancel(this.currentId),this.currentId=Sn)};disposeEffect=()=>this.cancel};function Tn(){let e=S(wn.create).current;return R(e.disposeEffect),e}function En(e){return e?.ownerDocument||document}var Dn={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},On={...Dn,position:`fixed`,top:0,left:0},kn={...Dn,position:`absolute`},An=b.forwardRef(function(e,t){let[n,r]=b.useState();N(()=>{le&&se&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,Y.jsx)(`span`,{...e,ref:t,style:On,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),jn=Math.min,Mn=Math.max,Nn=Math.round,Pn=Math.floor,Fn=e=>({x:e,y:e}),In={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Ln(e,t,n){return Mn(e,jn(t,n))}function Rn(e,t){return typeof e==`function`?e(t):e}function zn(e){return e.split(`-`)[0]}function Bn(e){return e.split(`-`)[1]}function Vn(e){return e===`x`?`y`:`x`}function Hn(e){return e===`y`?`height`:`width`}function Un(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Wn(e){return Vn(Un(e))}function Gn(e,t,n){n===void 0&&(n=!1);let r=Bn(e),i=Wn(e),a=Hn(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=er(o)),[o,er(o)]}function Kn(e){let t=er(e);return[qn(e),t,qn(t)]}function qn(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Jn=[`left`,`right`],Yn=[`right`,`left`],Xn=[`top`,`bottom`],Zn=[`bottom`,`top`];function Qn(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Yn:Jn:t?Jn:Yn;case`left`:case`right`:return t?Xn:Zn;default:return[]}}function $n(e,t,n,r){let i=Bn(e),a=Qn(zn(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(qn)))),a}function er(e){let t=zn(e);return In[t]+e.slice(t.length)}function tr(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function nr(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:tr(e)}function rr(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ir(e,t,n){return Math.floor(e/t)!==n}function ar(e,t){return t<0||t>=e.length}function or(e,t){return cr(e.current,{disabledIndices:t})}function sr(e,t){return cr(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function cr(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&ur(e,a,r));return a}function lr(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===`ArrowUp`?p=`up`:t.key===`ArrowDown`&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=e.closest(`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h<e.length,y=_||o,b=o=>{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f<n.length;f+=1,o+=d){if(o<0||o>=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1),r=i(t,u,n[o][e]??n[o][0]);o=a[r]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!ur(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=Pn(l/y)+1;for(let t=u-n+i,c=0;c<o;c+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!ur(e,r,s))return r}};d&&de(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=cr(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-y<c||f<0)){let e=u%y,n=l%y,r=l-(n-e);f=n===e?l:n>e?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=cr(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}ar(e,f)&&(f=u)}if(n===`both`){let n=Pn(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(d&&de(t),u%o===o-1?r&&(f=cr(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=cr(e,{startingIndex:u,disabledIndices:s}),r&&ir(f,o,n)&&(f=cr(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),ir(f,o,n)&&(f=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(d&&de(t),u%o===0?r&&(f=cr(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=cr(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&ir(f,o,n)&&(f=cr(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),ir(f,o,n)&&(f=u));let c=Pn(l/o)===n;ar(e,f)&&(r&&c?(f=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:cr(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function ur(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!fr(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function dr(e){return e.visibility===`hidden`||e.visibility===`collapse`}function fr(e,t=e?Ie(e):null){return!e||!e.isConnected||!t||dr(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var pr=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function mr(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return we(n)?n.host:null}function hr(e){for(let t of Array.from(e.children))if(ve(t)===`summary`)return t;return null}function gr(e,t){let n=hr(t);return!!n&&(e===n||K(n,e))}function _r(e){let t=e?ve(e):``;return e!=null&&e.matches(pr)&&(t!==`summary`||e.parentElement!=null&&ve(e.parentElement)===`details`&&hr(e.parentElement)===e)&&(t!==`details`||hr(e)==null)&&(t!==`input`||e.type!==`hidden`)}function vr(e){if(!_r(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=mr(t)){let n=t!==e,r=ve(t)===`slot`;if(t.hasAttribute(`inert`)||n&&ve(t)===`details`&&!t.open&&!gr(e,t)||t.hasAttribute(`hidden`)||!r&&!yr(t,n))return!1}return!0}function yr(e,t){let n=Ie(e);return t?n.display!==`none`:fr(e,n)}function br(e){let t=e.tabIndex;if(t<0){let t=ve(e);if(t===`details`||t===`audio`||t===`video`||Ce(e)&&e.isContentEditable)return 0}return t}function xr(e){if(ve(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Sr(e,t){let n=xr(e);if(!n)return!0;let r=t.find(e=>{let t=xr(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=xr(e);return t?.name===n.name&&t.form===n.form})===n}function Cr(e){if(Ce(e)&&ve(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Ce(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function wr(e,t){Cr(e).forEach(e=>{_r(e)&&t.push(e),wr(e,t)})}function Tr(e,t,n){Cr(e).forEach(e=>{Ce(e)&&e.matches(t)&&n.push(e),Tr(e,t,n)})}function Er(e){return vr(e)&&br(e)>=0}function Dr(e){let t=[];return wr(e,t),t.filter(vr)}function Or(e){let t=Dr(e);return t.filter(e=>br(e)>=0&&Sr(e,t))}function kr(e,t){let n=Or(e),r=n.length;if(r===0)return;let i=He(En(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Ar(e){return kr(En(e).body,1)||e}function jr(e){return kr(En(e).body,-1)||e}function Mr(e,t){if(!e)return null;let n=Or(En(e).body),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function Nr(e){return Mr(e,1)}function Pr(e){return Mr(e,-1)}function Fr(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!K(n,r)}function Ir(e){Or(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Lr(e){let t=[];Tr(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Rr(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Rr(e,t.id,n)])}function zr(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Br(e){return`data-base-ui-${e}`}var Vr=0;function Hr(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Vr);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),A;let o=requestAnimationFrame(a);return Vr=o,()=>{Vr===o&&(cancelAnimationFrame(o),Vr=0)}}var Ur={inert:new WeakMap,"aria-hidden":new WeakMap},Wr=`data-base-ui-inert`,Gr={inert:new WeakSet,"aria-hidden":new WeakSet},Kr=new WeakMap,qr=0;function Jr(e){return Gr[e]}function Yr(e){return e?we(e)?e.host:Yr(e.parentNode):null}var Xr=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Yr(t);return e.contains(n)?n:null}).filter(e=>e!=null),Zr=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Qr=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{ve(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function $r(e,t,n,r,{mark:i=!0}){let a=null;r?a=`inert`:n&&(a=`aria-hidden`);let o=null,s=null,c=Xr(t,e),l=i?Qr(t,Zr(c),new Set(c)):[],u=[],d=[];if(a){let e=Ur[a],n=Jr(a);s=n,o=e;let r=Xr(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=c.concat(r);Qr(t,Zr(i),new Set(i)).forEach(t=>{let r=t.getAttribute(a),i=r!==null&&r!==`false`,o=(e.get(t)||0)+1;e.set(t,o),u.push(t),o===1&&i&&n.add(t),i||t.setAttribute(a,a===`inert`?``:`true`)})}return i&&l.forEach(e=>{let t=(Kr.get(e)||0)+1;Kr.set(e,t),d.push(e),t===1&&e.setAttribute(Wr,``)}),qr+=1,()=>{o&&u.forEach(e=>{let t=(o.get(e)||0)-1;o.set(e,t),t||(!s?.has(e)&&a&&e.removeAttribute(a),s?.delete(e))}),i&&d.forEach(e=>{let t=(Kr.get(e)||0)-1;Kr.set(e,t),t||e.removeAttribute(Wr)}),--qr,qr||(Ur.inert=new WeakMap,Ur[`aria-hidden`]=new WeakMap,Gr.inert=new WeakSet,Gr[`aria-hidden`]=new WeakSet,Kr=new WeakMap)}}function ei(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0}=t,a=En(e[0]).body;return $r(e,a,n,r,{mark:i})}var ti=0;function ni(e,t=`mui`){let[n,r]=b.useState(e),i=e||n;return b.useEffect(()=>{n??(ti+=1,r(`${t}-${ti}`))},[n,t]),i}var ri=_n.useId;function ii(e,t){if(ri!==void 0){let n=ri();return e??(t?`${t}-${n}`:n)}return ni(e,t)}var ai=19;function oi(e){return ai>=e}function si(e){if(!b.isValidElement(e))return null;let t=e,n=t.props;return(oi(19)?n?.ref:t.ref)??null}function ci(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function li(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function ui(e,t){return typeof e==`function`?e(t):e}function di(e,t){return typeof e==`function`?e(t):e}var fi={};function pi(e,t,n,r,i){if(!n&&!r&&!i&&!e)return hi(t);let a=hi(e);return t&&(a=gi(a,t)),n&&(a=gi(a,n)),r&&(a=gi(a,r)),i&&(a=gi(a,i)),a}function mi(e){if(e.length===0)return fi;if(e.length===1)return hi(e[0]);let t=hi(e[0]);for(let n=1;n<e.length;n+=1)t=gi(t,e[n]);return t}function hi(e){return bi(e)?{...xi(e,fi)}:_i(e)}function gi(e,t){return bi(t)?xi(t,e):vi(e,t)}function _i(e){let t={...e};for(let e in t){let n=t[e];yi(e,n)&&(t[e]=Ci(n))}return t}function vi(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=ci(e.style,r);break;case`className`:e[n]=Ti(e.className,r);break;default:e[n]=yi(n,r)?Si(e[n],r):r}}return e}function yi(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function bi(e){return typeof e==`function`}function xi(e,t){return bi(e)?e(t):e??fi}function Si(e,t){return t?e?(...n)=>{let r=n[0];if(Ei(r)){let i=r;wi(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:Ci(t):e}function Ci(e){return e&&((...t)=>{let n=t[0];return Ei(n)&&wi(n),e(...t)})}function wi(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ti(e,t){return t?e?t+` `+e:t:e}function Ei(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function Di(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=ji(r));let i=Oi(t,n,r);if(n.enabled===!1)return null;let a=n.state??M;return Mi(e,r,i,a)}function Oi(e,t,n){let{className:r,style:i}=e,{state:a=M,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?ui(r,a):void 0,d=l?di(i,a):void 0,f=l?li(a,c):M,p=l&&s?ki(s):void 0,m=l?ci(f,p)??{}:M;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?un([m.ref,si(n),...o]):ln(m.ref,si(n),o):ln(null,null)),l?(u!==void 0&&(m.className=Ti(m.className,u)),d!==void 0&&(m.style=ci(m.style,d)),m):M}function ki(e){return Array.isArray(e)?mi(e):pi(void 0,e)}var Ai=Symbol.for(`react.lazy`);function ji(e){if(e?.$$typeof!==Ai)return e;let t=b.Children.toArray(e)[0];return b.isValidElement(t)?t:e}function Mi(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=pi(n,t.props);return e.ref=n.ref,b.cloneElement(t,e)}if(e&&typeof e==`string`)return Ni(e,n);throw Error(F(8))}function Ni(e,t){return e===`button`?(0,b.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,b.createElement)(`img`,{alt:``,...t,key:t.key}):b.createElement(e,t)}var Pi={style:{transition:`none`}},Fi=`data-base-ui-click-trigger`,Ii={fallbackAxisSide:`none`},Li={fallbackAxisSide:`end`},Ri={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},zi=l(h(),1),Bi=b.createContext(null),Vi=()=>b.useContext(Bi),Hi=Br(`portal`);function Ui(e={}){let{ref:t,container:n,componentProps:r=M,elementProps:i}=e,a=ii(),o=Vi()?.portalNode,[s,c]=b.useState(null),[l,u]=b.useState(null),d=X(e=>{e!==null&&u(e)}),f=b.useRef(null);N(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(xe(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=Di(`div`,r,{ref:[t,d],props:[{id:a,[Hi]:``},i]}),m=s&&p?zi.createPortal(p,s):null;return{node:l,nodeId:b.isValidElement(p)?p.props.id:void 0,subtree:m}}var Wi=b.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=Ui({container:o,ref:t,componentProps:e,elementProps:c}),f=b.useRef(null),p=b.useRef(null),m=b.useRef(null),h=b.useRef(null),[g,_]=b.useState(null),v=b.useRef(!1),y=g?.modal,x=g?.open,S=!!g&&!g.modal&&g.open&&!!l;b.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&Fr(e)&&(e.type===`focusin`?v.current&&=(Lr(l),!1):(Ir(l),v.current=!0))}return cn(sn(l,`focusin`,e,!0),sn(l,`focusout`,e,!0))},[l,y]),N(()=>{l&&x===!0&&v.current&&(Lr(l),v.current=!1)},[x,l]);let C=b.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,Y.jsxs)(b.Fragment,{children:[d,(0,Y.jsxs)(Bi.Provider,{value:C,children:[S&&l&&(0,Y.jsx)(An,{"data-type":`outside`,ref:f,onFocus:e=>{Fr(e,l)?m.current?.focus():jr(g?g.domReference:null)?.focus()}}),S&&l&&(0,Y.jsx)(`span`,{role:s,"aria-owns":u,style:Ri}),l&&zi.createPortal(a,l),S&&l&&(0,Y.jsx)(An,{"data-type":`outside`,ref:p,onFocus:e=>{Fr(e,l)?h.current?.focus():(Ar(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,J(`focus-out`,e.nativeEvent)))}})]})]})});function Gi(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Ki=class{nodesRef={current:[]};events=Gi();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},qi=b.createContext(null),Ji=b.createContext(null),Yi=()=>b.useContext(qi)?.id||null,Xi=e=>{let t=b.useContext(Ji);return e??t};function Zi(e){let t=ii(),n=Xi(e),r=Yi();return N(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Qi(e){let{children:t,id:n}=e,r=Yi();return(0,Y.jsx)(qi.Provider,{value:b.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function $i(e){let{children:t,externalTree:n}=e,r=S(()=>n??new Ki).current;return(0,Y.jsx)(Ji.Provider,{value:r,children:t})}function ea(e){return e==null?e:`current`in e?e.current:e}function ta(e,t){let n=ye(Ue(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var na=20,ra=[];function ia(){ra=ra.filter(e=>e.deref()?.isConnected)}function aa(e){ia(),e&&ve(e)!==`body`&&(ra.push(new WeakRef(e)),ra.length>na&&(ra=ra.slice(-20)))}function oa(){return ia(),ra[ra.length-1]?.deref()}function sa(e){return e?Er(e)?e:Or(e)[0]||e:null}function ca(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=Dr(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Er(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function la(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:x}=h.context,S=X(()=>x.current.floatingContext?.nodeId),C=i===!1,w=bt(_)&&C,T=hn(i),E=hn(a),D=hn(l),O=hn(g),k=Xi(p),A=Vi(),j=b.useRef(!1),M=b.useRef(!1),P=b.useRef(!1),F=b.useRef(null),I=b.useRef(``),L=b.useRef(``),R=b.useRef(null),z=b.useRef(null),B=ln(R,f,A?.beforeInsideRef),H=ln(z,A?.afterInsideRef),U=V(),ee=V(),te=Tn(),ne=A!=null,W=St(v),re=X((e=W)=>e?Or(e):[]),ie=X(()=>m?.().filter(e=>e!=null)??[]);b.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&K(W,He(En(W)))&&re().length===0&&!w&&de(e)}return sn(En(W),`keydown`,e)},[r,W,s,w,re]),b.useEffect(()=>{if(r||!g)return;let e=En(W);function t(){P.current=!1}function n(e){let t=Ue(e),n=ie(),r=K(v,t)||K(_,t)||K(A?.portalNode,t)||n.some(e=>e===t||K(e,t));P.current=!r,L.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(M.current=!0,ee.start(0,()=>{M.current=!1}))}function i(){L.current=`keyboard`}return cn(sn(e,`pointerdown`,n,!0),sn(e,`pointerup`,t,!0),sn(e,`pointercancel`,t,!0),sn(e,`keydown`,i,!0),t)},[r,v,_,W,g,A,ee,ie]),b.useEffect(()=>{if(r||!c)return;let e=En(W);function t(){M.current=!0,ee.start(0,()=>{M.current=!1})}function n(e){let t=Ue(e);Er(t)&&(F.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=Ue(t);s&&n==null&&i!=null&&K(v,i)&&aa(i),queueMicrotask(()=>{let a=S(),c=h.context.triggerElements,l=ie(),f=n?.hasAttribute(Br(`focus-guard`))&&[R.current,z.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,ea(d),ea(u)].includes(n),p=!(K(_,n)||K(v,n)||K(n,v)||K(A?.portalNode,n)||l.some(e=>e===n||K(e,n))||c.hasMatchingElement(e=>K(e,n))||f||k&&(Rr(k.nodesRef.current,a).find(e=>K(e.context?.elements.floating,n)||K(e.context?.elements.domReference,n))||zr(k.nodesRef.current,a).find(e=>[e.context?.elements.floating,St(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&W&&ca(W),o&&r!==_&&!fr(i)&&He(e)===e.body){if(Ce(W)&&(W.focus(),o===`popup`)){te.request(()=>{W.focus()});return}let e=re(),t=F.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||W;Ce(n)&&n.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(w||!s)&&n&&p&&!M.current&&(w||n!==oa())&&(j.current=!0,h.setOpen(!1,J(Ht,t)))})}function a(){P.current||(x.current.insideReactTree=!0,U.start(0,()=>{x.current.insideReactTree=!1}))}let l=Ce(_)?_:null;if(v||l)return cn(l&&sn(l,`focusout`,i),l&&sn(l,`pointerdown`,t),v&&sn(v,`focusin`,n),v&&sn(v,`focusout`,i),v&&A&&sn(v,`focusout`,a,!0))},[r,_,v,W,s,k,A,h,c,o,re,w,S,x,U,ee,te,u,d,ie]),b.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${Br(`portal`)}]`)||[]),t=(k?zr(k.nodesRef.current,S()):[]).find(e=>bt(e.context?.elements.domReference||null))?.context?.elements.domReference,n=ei([v,...e,R.current,z.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...ie(),t,ea(d),ea(u),w?_:null].filter(e=>e!=null),{ariaHidden:s||w,mark:!1}),i=ei([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,A,w,k,S,u,d,ie]),N(()=>{if(!g||r||!Ce(W))return;I.current=``,L.current=``;let e=En(W),t=He(e);queueMicrotask(()=>{let n=T.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||K(W,t))return;let i=null,a=()=>(i??=re(W),i[0]||W),o;o=r===!0||r===null?a():ea(r),o||=a();let s=K(W,He(e));Hr(o,{preventScroll:o===W,shouldFocus(){if(!O.current)return!1;if(s)return!0;let t=He(e);return!(t!==o&&K(W,t))}})})},[r,g,W,re,T,D,O]),N(()=>{if(r||!W)return;let e=En(W),t=He(e),n=D.current==null;aa(t);function i(e){if(e.open||(I.current=ta(e.nativeEvent,L.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(j.current=!0),e.reason===`outside-press`){if(e.nested)j.current=!1;else if(pe(e.nativeEvent)||me(e.nativeEvent))j.current=!1;else{let e=!1;En(W).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}}y.on(`openchange`,i);function a(e){let r=E.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&ve(t)!==`body`?t:null,s=n?o||a:a||o;return s||=oa()||null,typeof i==`boolean`?s:ea(i)||s||null}return()=>{y.off(`openchange`,i);let t=He(e),n=ie(),r=K(v,t)||n.some(e=>e===t||K(e,t))||k&&Rr(k.nodesRef.current,S(),!1).some(e=>K(e.context?.elements.floating,t)),o=E.current,s=I.current,c=a(s);queueMicrotask(()=>{let n=sa(c),i=typeof o!=`boolean`;if(o&&!j.current&&Ce(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}j.current=!1})}},[r,v,W,E,D,y,k,_,S,ie]),N(()=>{if(!se||g||!v)return;let e=He(En(v));Ce(e)&&vt(e)&&K(v,e)&&e.blur()},[g,v]),N(()=>{if(!r&&A)return A.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,s,g,h,c,_]),N(()=>{if(!r&&W)return ca(W),()=>{queueMicrotask(ia)}},[r,W]);let ae=!r&&(!s||!w)&&(ne||s);return(0,Y.jsxs)(b.Fragment,{children:[ae&&(0,Y.jsx)(An,{"data-type":`inside`,ref:B,onFocus:e=>{if(s){let e=re();Hr(e[e.length-1])}else A?.portalNode&&(j.current=!1,Fr(e,A.portalNode)?Ar(_)?.focus():ea(d??A.beforeOutsideRef)?.focus())}}),n,ae&&(0,Y.jsx)(An,{"data-type":`inside`,ref:H,onFocus:e=>{s?Hr(re()[0]):A?.portalNode&&(c&&(j.current=!0),Fr(e,A.portalNode)?jr(_)?.focus():ea(u??A.afterOutsideRef)?.focus())}})]})}function ua(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=kt}=t,l=`rootStore`in e?e.rootStore:e,u=l.context.dataRef,d=b.useRef(void 0),f=Tn(),p=V(),m=b.useMemo(()=>{function e(e,t,n,r){let i=J(c,t,n);e&&r===`touch`&&s>0?p.start(s,()=>{l.setOpen(!0,i)}):l.setOpen(e,i)}function t(e,t,n){let r=u.current.openEvent,a=l.select(`domReferenceElement`)!==t;return e&&a||!e||!i?!0:r&&o?!n(r.type):!1}return{onPointerDown(e){d.current=he(e.pointerType,!0)&&me(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(n){let i=d.current,o=n.nativeEvent,s=l.select(`open`);if(n.button!==0||r===`click`||he(i,!0)&&a)return;let c=t(s,n.currentTarget,e=>e===`click`||e===`mousedown`),u=Ue(o);if(vt(u)){e(c,o,u,i);return}let p=n.currentTarget;f.request(()=>{e(c,o,p,i)})},onClick(n){if(r===`mousedown-only`)return;let i=d.current;if(r===`mousedown`&&i){d.current=void 0;return}he(i,!0)&&a||e(t(l.select(`open`),n.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),n.nativeEvent,n.currentTarget,i)},onKeyDown(){d.current=void 0}}},[u,r,a,c,l,o,i,f,p,s]);return b.useMemo(()=>n?{reference:m}:M,[n,m])}function da(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function fa(e){return e!=null&&e.clientX!=null}function pa(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=`rootStore`in e?e.rootStore:e,a=i.useState(`open`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.context.dataRef,l=b.useRef(!1),u=b.useRef(null),[d,f]=b.useState(),[p,m]=b.useState([]),h=X(e=>{i.set(`positionReference`,e)}),g=X((e,t,n)=>{l.current||(!c.current.openEvent||fa(c.current.openEvent))&&i.set(`positionReference`,da(n??s,{x:e,y:t,axis:r,dataRef:c,pointerType:d}))}),_=X(e=>{a?u.current||(g(e.clientX,e.clientY,e.currentTarget),m([])):g(e.clientX,e.clientY,e.currentTarget)}),v=he(d)?o:a;b.useEffect(()=>{if(!n){h(s);return}if(!v)return;function e(){u.current?.(),u.current=null}let t=ye(o);function r(t){let n=Ue(t);K(o,n)?e():g(t.clientX,t.clientY)}return!c.current.openEvent||fa(c.current.openEvent)?u.current=sn(t,`mousemove`,r):h(s),e},[v,n,o,c,s,i,g,h,p]),b.useEffect(()=>()=>{i.set(`positionReference`,null)},[i]),b.useEffect(()=>{n&&!o&&(l.current=!1)},[n,o]),b.useEffect(()=>{!n&&a&&(l.current=!0)},[n,a]);let y=b.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:_,onMouseEnter:_}},[_]);return b.useMemo(()=>n?{reference:y,trigger:y}:{},[n,y])}function ma(){return!1}function ha(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function ga(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=ma,bubbles:s,externalTree:c}=t,l=`rootStore`in e?e.rootStore:e,u=l.useState(`open`),d=l.useState(`floatingElement`),{dataRef:f,events:p}=l.context,m=Xi(c),h=X(typeof i==`function`?i:()=>!1),g=typeof i==`function`?h:i,_=g!==!1,v=X(()=>a),{escapeKey:y,outsidePress:x}=ha(s),S=b.useRef(!1),C=b.useRef(!1),w=b.useRef(!1),T=b.useRef(!1),E=b.useRef(!1),D=b.useRef(``),O=b.useRef(null),k=V(),A=V(),j=X(()=>{A.clear(),f.current.insideReactTree=!1}),M=X(e=>{let t=f.current.floatingContext?.nodeId;return(m?Rr(m.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),N=X(e=>q(e,l.select(`floatingElement`))||q(e,l.select(`domReferenceElement`))),P=X(e=>{o()&&l.setOpen(!1,J(kt,e.nativeEvent))}),F=X(e=>{if(!u||!n||!r||e.key!==`Escape`||E.current||!y&&M(`__escapeKeyBubbles`))return;let t=J(Ut,fe(e)?e.nativeEvent:e);l.setOpen(!1,t),t.isCanceled||e.preventDefault(),!y&&!t.isPropagationAllowed&&e.stopPropagation()}),I=X(()=>{f.current.insideReactTree=!0,A.start(0,j)}),L=X(e=>{if(!u||!n||e.button!==0)return;let t=Ue(e.nativeEvent);K(l.select(`floatingElement`),t)&&(S.current||(S.current=!0,C.current=!1))}),R=X(e=>{u&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&S.current&&(C.current=!0)});b.useEffect(()=>{function e(e){e.open||(T.current=!1)}return p.on(`openchange`,e),()=>{p.off(`openchange`,e)}},[p]),b.useEffect(()=>{if(!u||!n)return u||(T.current=!1),j;f.current.__escapeKeyBubbles=y,f.current.__outsidePressBubbles=x;let e=new B,t=new B,i=En(d);function a(){e.clear(),E.current=!0}function o(){e.start(se?5:0,()=>{E.current=!1})}function s(){w.current=!0,t.start(0,()=>{w.current=!1})}function c(){S.current=!1,C.current=!1}function p(){let e=D.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function h(e){let t=p();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function b(e){let t=f.current.floatingContext?.nodeId,n=m&&Rr(m.nodesRef.current,t).some(t=>q(e,t.context?.elements.floating));return N(e)||n}function A(e){if(h(e)){e.type!==`click`&&!N(e)&&(t.clear(),w.current=!1),j();return}if(f.current.insideReactTree){j();return}let n=Ue(e),r=`[${Br(`inert`)}]`,i=Se(n)?n.getRootNode():null,a=Array.from((we(i)?i:En(l.select(`floatingElement`))).querySelectorAll(r)),o=l.context.triggerElements;if(n&&(o.hasElement(n)||o.hasMatchingElement(e=>K(e,n))))return;let s=Se(n)?n:null;for(;s&&!Fe(s);){let e=Re(s);if(Fe(e)||!Se(e))break;s=e}if(!(a.length&&Se(n)&&!_t(n)&&!K(n,l.select(`floatingElement`))&&a.every(e=>!K(s,e)))){if(Ce(n)&&!(`touches`in e)){let t=Fe(n),r=Ie(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!b(e)){if(p()===`intentional`){if(e.detail!==0&&!pe(e)&&!T.current)return;if(w.current){t.clear(),w.current=!1;return}}(typeof g!=`function`||g(e))&&(M(`__outsidePressBubbles`)||(l.setOpen(!1,J(Mt,e)),j()))}}}function P(e){p()===`sloppy`&&e.pointerType!==`touch`&&l.select(`open`)&&n&&!N(e)&&A(e)}function I(e){if(p()!==`sloppy`||!l.select(`open`)||!n||N(e))return;let t=e.touches[0];t&&(O.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},k.start(1e3,()=>{O.current&&(O.current.dismissOnTouchEnd=!1,O.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=Ue(e);if(!n)return;let r=sn(n,e.type,()=>{t(e),r()})}function R(e){D.current=`touch`,L(e,I)}function z(e){k.clear(),e.type===`pointerdown`&&(e.button===0&&(T.current=!0),D.current=e.pointerType),(e.type!==`mousedown`||!O.current||O.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?P(e):A(e)})}function V(e){if(e.type===`pointercancel`&&(T.current=!1),!S.current)return;let n=C.current;if(c(),p()===`intentional`){if(e.type===`pointercancel`){n&&s();return}if(!b(e)){if(n){s();return}(typeof g!=`function`||g(e))&&(t.clear(),w.current=!0,j())}}}function H(e){if(p()!==`sloppy`||!O.current||N(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-O.current.startX),r=Math.abs(t.clientY-O.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(O.current.dismissOnTouchEnd=!0),i>10&&(A(e),k.clear(),O.current=null)}function U(e){L(e,H)}function ee(e){p()===`sloppy`&&O.current&&!N(e)&&(O.current.dismissOnTouchEnd&&A(e),k.clear(),O.current=null)}function te(e){L(e,ee)}let ne=cn(r&&cn(sn(i,`keydown`,F),sn(i,`compositionstart`,a),sn(i,`compositionend`,o)),_&&cn(sn(i,`click`,z,!0),sn(i,`pointerdown`,z,!0),sn(i,`pointerup`,V,!0),sn(i,`pointercancel`,V,!0),sn(i,`mousedown`,z,!0),sn(i,`mouseup`,V,!0),sn(i,`touchstart`,R,{capture:!0,passive:!0}),sn(i,`touchmove`,U,{capture:!0,passive:!0}),sn(i,`touchend`,te,{capture:!0,passive:!0})));return()=>{ne(),e.clear(),t.clear(),c(),w.current=!1,j()}},[f,d,r,_,g,u,n,y,x,F,j,v,M,N,m,l,k]);let z=b.useMemo(()=>({onKeyDown:F,onPointerDown:P,onClick:P}),[F,P]),H=b.useMemo(()=>({onKeyDown:F,onPointerDown:R,onMouseDown:R,onClickCapture:I,onMouseDownCapture(e){I(),L(e)},onPointerDownCapture(e){I(),L(e)},onMouseUpCapture:I,onTouchEndCapture:I,onTouchMoveCapture:I}),[F,I,L,R]);return b.useMemo(()=>n?{reference:z,floating:H,trigger:z}:{},[n,z,H])}function _a(e,t,n){let{reference:r,floating:i}=e,a=Un(t),o=Wn(t),s=Hn(o),c=zn(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Bn(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function va(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Rn(t,e),p=nr(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=rr(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=rr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ya=50,ba=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:va},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=_a(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ya&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=_a(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},xa=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Rn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=zn(r),_=Un(o),v=zn(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[er(o)]:Kn(o)),x=p!==`none`;!d&&x&&b.push(...$n(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Gn(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Un(t)||T.every(e=>Un(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Un(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},Sa=new Set([`left`,`top`]);async function Ca(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=zn(n),s=Bn(n),c=Un(n)===`y`,l=Sa.has(o)?-1:1,u=a&&c?-1:1,d=Rn(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var wa=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ca(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Ta=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Rn(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Un(i),p=Vn(f),m=u[p],h=u[f],g=(e,t)=>Ln(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Ea=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Rn(e,t),u={x:n,y:r},d=Un(i),f=Vn(d),p=u[f],m=u[d],h=Rn(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Sa.has(zn(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Da=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Rn(e,t),c=await i.detectOverflow(t,s),l=zn(n),u=Bn(n),d=Un(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=jn(p-c[m],g),y=jn(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Mn(c.left,c.right):S=p-2*Mn(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Oa(e){let t=Ie(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ce(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Nn(n)!==a||Nn(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ka(e){return Se(e)?e:e.contextElement}function Aa(e){let t=ka(e);if(!Ce(t))return Fn(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Oa(t),o=(a?Nn(n.width):n.width)/r,s=(a?Nn(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var ja=Fn(0);function Ma(e){let t=ye(e);return!Pe()||!t.visualViewport?ja:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Na(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===ye(e)}function Pa(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ka(e),o=Fn(1);t&&(r?Se(r)&&(o=Aa(r)):o=Aa(e));let s=Na(a,n,r)?Ma(a):Fn(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=ye(a),t=Se(r)?ye(r):r,n=e,i=Ve(n);for(;i&&t!==n;){let e=Aa(i),t=i.getBoundingClientRect(),r=Ie(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=ye(i),i=Ve(n)}}return rr({width:u,height:d,x:c,y:l})}function Fa(e,t){let n=Le(e).scrollLeft;return t?t.left+n:Pa(be(e)).left+n}function Ia(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Fa(e,n),y:n.top+t.scrollTop}}function La(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=be(r),s=t?De(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Fn(1),u=Fn(0),d=Ce(r);if((d||!a)&&((ve(r)!==`body`||Te(o))&&(c=Le(r)),d)){let e=Pa(r);l=Aa(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ia(o,c):Fn(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Ra(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function za(e){let t=Le(e),n=e.ownerDocument.body,r=Mn(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Mn(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Fa(e),o=-t.scrollTop;return Ie(n).direction===`rtl`&&(a+=Mn(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Ba=25;function Va(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=ye(e),a=be(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Pe()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Fa(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Ba&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Ha(e,t){let n=Pa(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Aa(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ua(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Va(e,n,t);else if(t===`document`)r=za(be(e));else if(Se(t))r=Ha(t,n);else{let n=Ma(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return rr(r)}function Wa(e,t){let n=t.get(e);if(n)return n;let r=Be(e,[],!1).filter(e=>Se(e)&&ve(e)!==`body`),i=null,a=Ie(e).position===`fixed`,o=a?Re(e):e;for(;Se(o)&&!Fe(o);){let e=Ie(o),t=Me(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Re(o)}return t.set(e,r),r}function Ga(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?De(t)?[]:Wa(t,this._c):[].concat(n),r],o=Ua(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ua(t,a[e],i);s=Mn(n.top,s),c=jn(n.right,c),l=jn(n.bottom,l),u=Mn(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ka(e){let{width:t,height:n}=Oa(e);return{width:t,height:n}}function qa(e,t,n){let r=Ce(t),i=be(t),a=n===`fixed`,o=Pa(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Fn(0);if((r||!a)&&((ve(t)!==`body`||Te(i))&&(s=Le(t)),r)){let e=Pa(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Fa(i));let l=i&&!r&&!a?Ia(i,s):Fn(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Ja(e){return Ie(e).position===`static`}function Ya(e,t){if(!Ce(e)||Ie(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return be(e)===n&&(n=n.ownerDocument.body),n}function Xa(e,t){let n=ye(e);if(De(e))return n;if(!Ce(e)){let t=Re(e);for(;t&&!Fe(t);){if(Se(t)&&!Ja(t))return t;t=Re(t)}return n}let r=Ya(e,t);for(;r&&Ee(r)&&Ja(r);)r=Ya(r,t);return r&&Fe(r)&&Ja(r)&&!Me(r)?n:r||Ne(e)||n}var Za=async function(e){let t=this.getOffsetParent||Xa,n=this.getDimensions,r=await n(e.floating);return{reference:qa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Qa(e){return Ie(e).direction===`rtl`}var $a={convertOffsetParentRelativeRectToViewportRelativeRect:La,getDocumentElement:be,getClippingRect:Ga,getOffsetParent:Xa,getElementRects:Za,getClientRects:Ra,getDimensions:Ka,getScale:Aa,isElement:Se,isRTL:Qa};function eo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function to(e,t,n){let r=null,i,a=be(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Pn(d),h=Pn(a.clientWidth-(u+f)),g=Pn(a.clientHeight-(d+p)),_=Pn(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Mn(0,jn(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!eo(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=ye(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function no(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=ka(e),u=i||a?[...l?Be(l):[],...t?Be(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?to(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Pa(e):null;c&&g();function g(){let t=Pa(e);h&&!eo(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var ro=wa,io=Ta,ao=xa,oo=Da,so=Ea,co=(e,t,n)=>{let r=new Map,i=n??{},a={...$a,...i.platform,_c:r};return ba(e,t,{...i,platform:a})},lo=typeof document<`u`?b.useLayoutEffect:function(){};function uo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!uo(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!uo(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function fo(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function po(e,t){let n=fo(e);return Math.round(t*n)/n}function mo(e){let t=b.useRef(e);return lo(()=>{t.current=e}),t}function ho(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=b.useState(r);uo(f,r)||p(r);let[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),y=b.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=b.useRef(null),w=b.useRef(null),T=b.useRef(u),E=c!=null,D=mo(c),O=mo(i),k=mo(l),A=b.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),co(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!uo(T.current,t)&&(T.current=t,zi.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);lo(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=b.useRef(!1);lo(()=>(j.current=!0,()=>{j.current=!1}),[]),lo(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=b.useMemo(()=>({reference:C,floating:w,setReference:v,setFloating:y}),[v,y]),N=b.useMemo(()=>({reference:x,floating:S}),[x,S]),P=b.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=po(N.floating,u.x),r=po(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...fo(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var go=(e,t)=>{let n=ro(e);return{name:n.name,fn:n.fn,options:[e,t]}},_o=(e,t)=>{let n=io(e);return{name:n.name,fn:n.fn,options:[e,t]}},vo=(e,t)=>({fn:so(e).fn,options:[e,t]}),yo=(e,t)=>{let n=ao(e);return{name:n.name,fn:n.fn,options:[e,t]}},bo=(e,t)=>{let n=oo(e);return{name:n.name,fn:n.fn,options:[e,t]}},xo=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),So=o(((e,t)=>{t.exports=xo()})),Co=o((e=>{var t=d(),n=So();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),wo=o(((e,t)=>{t.exports=Co()})),To=So(),Eo=wo(),Do=oi(19)?Ao:jo;function Oo(e,t,n,r,i){return Do(e,t,n,r,i)}function ko(e,t,n,r,i){let a=b.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,To.useSyncExternalStore)(e.subscribe,a,a)}E({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,To.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Ao(e,t,n,r,i){let a=T();if(!a)return ko(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function jo(e,t,n,r,i){return(0,Eo.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Mo=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Oo(this,e,t,n,r)}},No=class extends Mo{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){b.useDebugValue(e);let n=this;N(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;N(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;N(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){b.useDebugValue(e);let n=this,r=t!==void 0;N(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return b.useDebugValue(e),Oo(this,this.selectors[e],t,n,r)}useContextCallback(e,t){b.useDebugValue(e);let n=X(t??A);this.context[e]=n}useStateSetter(e){let t=b.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}};function Po(){let[,e]=b.useState({});return b.useCallback(()=>{e({})},[])}var Fo={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},Io=class extends No{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Gi(),nested:n,triggerElements:i},Fo),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&ge(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Lo(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=o,f=b.useRef(null);r===void 0&&f.current===null&&(f.current=new Io({open:s,transitionStatus:void 0,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:d,floatingId:i,syncOnly:!0,nested:a}));let p=r??f.current;return t.useSyncedValue(`floatingId`,i),N(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};Se(c)&&(e.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(e.positionReference=c),p.update(e)},[s,i,c,l,p]),p.context.onOpenChange=d,p.context.nested=a,p}function Ro(e,t=!1,n=!1,r=!1){let[i,a]=b.useState(e&&t?`idle`:void 0),[o,s]=b.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),N(()=>{if(!e&&o&&i!==`ending`&&n){let e=wn.request(()=>{a(`ending`)});return()=>{wn.cancel(e)}}},[e,o,i,n]),N(()=>{if(!e||t)return;let n=wn.request(()=>{a(void 0)});return()=>{wn.cancel(n)}},[t,e]),N(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=wn.request(()=>{a(`idle`)});return()=>{wn.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}var zo=null;function Bo(e){if(!zo){let e=[];zo=e,queueMicrotask(()=>{zo=null,zi.flushSync(()=>{for(let t of e)t()})})}zo.push(e)}function Vo(e,t=!1,n=!1){let r=Tn();return X((i,a=null)=>{r.cancel();let o=ea(e);if(o==null)return;let s=o,c=()=>{if(!n){zi.flushSync(i);return}Bo(()=>{a?.aborted||i()})};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()},()=>{if(!a?.aborted){if(s.getAnimations().some(e=>e.pending||e.playState!==`finished`)){l();return}c()}})}if(t){let e=Xe;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function Ho(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=X(a),s=Vo(r,n,i);b.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}var Uo={tabIndex:-1,[We]:``};function Wo(e){return t=>t!==`touch`||e.current}function Go(e,t=!1){let n=ii(),r=Yi()!=null,i=S(()=>e(n,r)).current;return Lo({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function Ko({handle:e,store:t}){return N(()=>e.attachStore(t),[e,t]),null}function qo(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function Jo(e,t){let n=b.useRef(null);return X(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),qo(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),qo(t))})}function Yo(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s}}function Xo(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function Zo(e,t,n,r={}){let i=n.reason,a=i===At,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=Xo(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=Yo(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?zi.flushSync(l):l()}function Qo(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=Jo(e,n),o=X(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e);return}if(a==null&&i){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=X(e=>{a(e),e&&o(e)});return N(()=>(s(t.current),()=>s(null)),[s,t,n,e]),N(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function $o(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=b.useRef(null),i=e.useState(`open`);N(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=J(Ot);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function es(e,t,n,r){let{mounted:i,setMounted:a,transitionStatus:o}=Ro(e,!1,!1,r),s=t.useState(`preventUnmountingOnClose`),c=!e&&s;t.useSyncedValues({mounted:i,transitionStatus:o,preventUnmountingOnClose:c});let l=X(()=>{a(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return Ho({enabled:i&&!e&&!c,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:o}}function ts(e,t){e.useSyncedValues(t),N(()=>()=>{e.update({activeTriggerProps:M,inactiveTriggerProps:M,popupProps:M})},[e])}function ns(e,t){N(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),N(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var rs=class{constructor(){this.idMap=new Map}add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}};function is(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Io({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:M,inactiveTriggerProps:M,popupProps:M}}var as=e=>e.triggerIdProp??e.activeTriggerId,os=e=>e.openProp??e.open,ss=e=>(e.popupElement?.id??e.floatingId)||void 0;function cs(e,t){return t!==void 0&&os(e)&&as(e)===t}function ls(e,t){return cs(e,t)?!0:t!==void 0&&os(e)&&as(e)==null&&e.triggerCount===1}var us={open:os,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:as,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:ss,isTriggerActive:(e,t)=>t!==void 0&&as(e)===t,isOpenedByTrigger:(e,t)=>cs(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&as(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>ls(e,t)?ss(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function ds(e){let t=b.useCallback(t=>e===void 0?A:e.subscribeStore(t),[e]),n=b.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,To.useSyncExternalStore)(t,n,()=>e?.serverStore)}function fs(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=ii(),a=Yi()!=null,o=S(()=>new Io({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new rs,floatingId:i,syncOnly:!1,nested:a})).current;return N(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=Se(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function ps(e){return ms(e,e.rootContext)}function ms(e,t){let{nodeId:n,externalTree:r}=e,i=t.useState(`referenceElement`),a=t.useState(`floatingElement`),o=t.useState(`domReferenceElement`),s=t.useState(`open`),c=t.useState(`floatingId`),[l,u]=b.useState(null),[d,f]=b.useState(void 0),[p,m]=b.useState(void 0),h=b.useRef(null),g=Xi(r),_=b.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),v=ho({...e,elements:{..._,...l&&{reference:l}}}),y=Se(d)?d:null,x=p===void 0?t.state.floatingElement:p;t.useSyncedValue(`referenceElement`,d??null),t.useSyncedValue(`domReferenceElement`,d===void 0?o:y),t.useSyncedValue(`floatingElement`,x);let S=b.useCallback(e=>{let t=Se(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),v.refs.setReference(t)},[v.refs]),C=b.useCallback(e=>{(Se(e)||e===null)&&(h.current=e,f(e)),(Se(v.refs.reference.current)||v.refs.reference.current===null||e!==null&&!Se(e))&&v.refs.setReference(e)},[v.refs,f]),w=b.useCallback(e=>{m(e),v.refs.setFloating(e)},[v.refs]),T=b.useMemo(()=>({...v.refs,setReference:C,setFloating:w,setPositionReference:S,domReference:h}),[v.refs,C,w,S]),E=b.useMemo(()=>({...v.elements,domReference:o}),[v.elements,o]),D=b.useMemo(()=>({...v,dataRef:t.context.dataRef,open:s,onOpenChange:t.setOpen,events:t.context.events,floatingId:c,refs:T,elements:E,nodeId:n,rootStore:t}),[v,T,E,n,t,s,c]);return N(()=>{o&&(h.current=o)},[o]),N(()=>{t.context.dataRef.current.floatingContext=D;let e=g?.nodesRef.current.find(e=>e.id===n);e&&(e.context=D)}),b.useMemo(()=>({...v,context:D,refs:T,elements:E,rootStore:t}),[v,T,E,D,t])}var hs=G&&se;function gs(e,t={}){let{enabled:n=!0,delay:r}=t,i=`rootStore`in e?e.rootStore:e,{events:a,dataRef:o}=i.context,s=b.useRef(!1),c=b.useRef(null),l=b.useRef(!0),u=V();b.useEffect(()=>{let e=i.select(`domReferenceElement`);if(!n)return;let t=ye(e);function r(){let e=i.select(`domReferenceElement`);!i.select(`open`)&&Ce(e)&&e===He(En(e))&&(s.current=!0,c.current=e)}function a(){l.current=!0}function o(){l.current=!1}return cn(sn(t,`blur`,r),hs&&sn(t,`keydown`,a,!0),hs&&sn(t,`pointerdown`,o,!0))},[i,n]),b.useEffect(()=>{if(!n)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=i.select(`domReferenceElement`);Se(e)&&(c.current=e,s.current=!0)}}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[a,n,i]);let d=b.useMemo(()=>{function e(){s.current=!1,c.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(s.current){if(c.current===n)return;e()}let a=Ue(t.nativeEvent);if(Se(a)){if(hs&&!t.relatedTarget){if(!l.current&&!vt(a))return}else if(!xt(a))return}let o=gt(t.relatedTarget,i.context.triggerElements),{nativeEvent:d,currentTarget:f}=t,p=typeof r==`function`?r():r;if(i.select(`open`)&&o||p===0||p===void 0){i.setOpen(!0,J(jt,d,f));return}u.start(p,()=>{s.current||i.setOpen(!0,J(jt,d,f))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,a=Se(n)&&n.hasAttribute(Br(`focus-guard`))&&n.getAttribute(`data-type`)===`outside`;u.start(0,()=>{let e=i.select(`domReferenceElement`),t=He(En(e));(n||t!==e)&&(K(o.current.floatingContext?.refs.floating.current,t)||K(e,t)||a||gt(n??t,i.context.triggerElements)||i.setOpen(!1,J(jt,r)))})}}},[o,r,i,u]);return b.useMemo(()=>n?{reference:d,trigger:d}:{},[n,d])}var _s=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new B,this.restTimeout=new B,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},vs=new WeakMap;function ys(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&vs.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),vs.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function bs(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=vs.get(n);a&&a!==e&&ys(a),ys(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,vs.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function xs(e){let t=e.context.dataRef.current,n=S(()=>t.hoverInteractionState??_s.create()).current;return t.hoverInteractionState||=n,R(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Ss(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=`rootStore`in e?e.rootStore:e,o=a.useState(`open`),s=a.useState(`floatingElement`),c=a.useState(`domReferenceElement`),{dataRef:l}=a.context,u=Xi(),d=Yi(),f=xs(a),p=V(),m=X(()=>Et(l.current.openEvent?.type,f.interactedInside)),h=X(()=>Dt(l.current.openEvent?.type)),g=X(()=>{ys(f)});N(()=>{o||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[o,f,g]),b.useEffect(()=>g,[g]),N(()=>{if(n&&o&&f.handleCloseOptions?.blockPointerEvents&&h()&&Se(c)&&s){let e=c,t=s,n=En(s),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=f.pointerEventsScopeElement===t?null:f.pointerEventsScopeElement,a=r===t?null:r,o=f.handleCloseOptions?.getScope?.()??i??a??e.closest(`[data-rootownerid]`)??n.body;return bs(f,{scopeElement:o,referenceElement:e,floatingElement:t}),()=>{g()}}},[n,o,c,s,f,h,u,d,g]),b.useEffect(()=>{if(!n)return;function e(){return!!(u&&d&&Rr(u.nodesRef.current,d).length>0)}function t(e){let t=wt(r,`close`,f.pointerType),n=()=>{a.setOpen(!1,J(At,e)),u?.events.emit(`floating.closed`,e)};t?f.openChangeTimeout.start(t,n):(f.openChangeTimeout.clear(),n())}function o(e){let t=Ue(e);if(!yt(t)){f.interactedInside=!1;return}f.interactedInside=t?.closest(`[aria-haspopup]`)!=null}function c(){f.openChangeTimeout.clear(),p.clear(),u?.events.off(`floating.closed`,v),g()}function _(n){if(e()&&u){u.events.on(`floating.closed`,v);return}if(gt(n.relatedTarget,a.context.triggerElements))return;let r=l.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(u&&r&&Se(o)&&Rr(u.nodesRef.current,r,!1).some(e=>K(e.context?.elements.floating,o)))){if(f.handler){f.handler(n);return}g(),h()&&!m()&&t(n)}}function v(t){u&&d&&!e()&&p.start(0,()=>{u.events.off(`floating.closed`,v),a.setOpen(!1,J(At,t)),u.events.emit(`floating.closed`,t)})}let y=s;return cn(y&&sn(y,`mouseenter`,c),y&&sn(y,`mouseleave`,_),y&&sn(y,`pointerdown`,o,!0),()=>{u?.events.off(`floating.closed`,v)})},[n,s,a,l,r,i,h,m,g,f,u,d,p])}var Cs={current:null};function ws(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=Cs,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,h=`rootStore`in e?e.rootStore:e,{dataRef:g,events:_}=h.context,v=Xi(l),y=xs(h),x=b.useRef(!1),S=hn(i),C=hn(r),w=hn(o),T=hn(n),E=hn(p),D=hn(f),O=X(()=>Et(g.current.openEvent?.type,y.interactedInside)),k=X(()=>E.current?.()!==!1),A=X((e,t,n)=>{let r=h.context.triggerElements;if(r.hasElement(t))return!e||!K(e,t);if(!Se(n))return!1;let i=n;return r.hasMatchingElement(e=>K(e,i))&&(!e||!K(e,i))}),j=X(()=>{y.handler&&=(En(h.select(`domReferenceElement`)).removeEventListener(`mousemove`,y.handler),void 0)}),M=X(()=>{ys(y)});return u&&(y.handleCloseOptions=i?.__options),b.useEffect(()=>j,[j]),b.useEffect(()=>{if(!n)return;function e(e){e.open?x.current=!1:(x.current=e.reason===At,j(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}return _.on(`openchange`,e),()=>{_.off(`openchange`,e)}},[n,_,y,j]),b.useEffect(()=>{if(!n)return;function e(e,t=!0){let n=wt(C.current,`close`,y.pointerType);n?y.openChangeTimeout.start(n,()=>{h.setOpen(!1,J(At,e)),v?.events.emit(`floating.closed`,e)}):t&&(y.openChangeTimeout.clear(),h.setOpen(!1,J(At,e)),v?.events.emit(`floating.closed`,e))}let t=c.current??(u?h.select(`domReferenceElement`):null);if(!Se(t))return;function r(e){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,a&&!he(y.pointerType))return;let t=Tt(w.current),n=wt(C.current,`open`,y.pointerType),r=Ue(e),i=e.currentTarget??null,o=h.select(`domReferenceElement`),s=i;if(Se(r)&&!h.context.triggerElements.hasElement(r)){for(let e of h.context.triggerElements.elements())if(K(e,r)){s=e;break}}Se(i)&&Se(o)&&!h.context.triggerElements.hasElement(i)&&K(i,o)&&(s=o);let c=s!=null&&A(o,s,r),l=h.select(`open`),u=D.current?.()??h.select(`transitionStatus`)===`ending`,d=!l&&u&&x.current,f=!c&&Se(s)&&Se(o)&&K(o,s)&&d,p=t>0&&!n,m=c&&(l||d)||f,g=!l||c;if(m){k()&&h.setOpen(!0,J(At,e,s));return}p||(n?y.openChangeTimeout.start(n,()=>{g&&k()&&h.setOpen(!0,J(At,e,s))}):g&&k()&&h.setOpen(!0,J(At,e,s)))}function i(t){if(O()){M();return}j();let n=En(h.select(`domReferenceElement`));y.restTimeout.clear(),y.restTimeoutPending=!1;let r=g.current.floatingContext??d?.();if(!gt(t.relatedTarget,h.context.triggerElements)){if(S.current&&r){h.select(`open`)||y.openChangeTimeout.clear();let i=c.current;y.handler=S.current({...r,tree:v,x:t.clientX,y:t.clientY,onClose(){M(),j(),T.current&&!O()&&i===h.select(`domReferenceElement`)&&e(t,!0)}}),n.addEventListener(`mousemove`,y.handler),y.handler(t);return}(y.pointerType!==`touch`||!K(h.select(`floatingElement`),t.relatedTarget))&&e(t)}}function o(e){K(t,e.relatedTarget)||(y.openChangeTimeout.clear(),y.restTimeout.clear(),y.restTimeoutPending=!1)}let l=m?sn(t,`mouseout`,o):void 0;return s?cn(sn(t,`mousemove`,r,{once:!0}),sn(t,`mouseenter`,r),sn(t,`mouseleave`,i),l):cn(sn(t,`mouseenter`,r),sn(t,`mouseleave`,i),l)},[j,M,g,C,h,n,S,y,u,A,O,a,s,w,c,v,T,d,D,k,m]),b.useMemo(()=>{if(!n)return;function e(e){y.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,r=h.select(`domReferenceElement`),i=h.select(`open`),o=A(r,n,e.target);if(a&&!he(y.pointerType))return;if(i&&o&&y.handleCloseOptions?.blockPointerEvents){let e=h.select(`floatingElement`);if(e){let t=y.handleCloseOptions?.getScope?.()??n.ownerDocument.body;bs(y,{scopeElement:t,referenceElement:n,floatingElement:e})}}let s=Tt(w.current);if(i&&!o||s===0||!o&&y.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;y.restTimeout.clear();function c(){if(y.restTimeoutPending=!1,O())return;let e=h.select(`open`);!y.blockMouseMove&&(!e||o)&&k()&&h.setOpen(!0,J(At,t,n))}y.pointerType===`touch`?zi.flushSync(()=>{c()}):o&&i?c():(y.restTimeoutPending=!0,y.restTimeout.start(s,c))}}},[n,y,O,A,a,h,w,k])}var Ts=`Escape`;function Es(e){return se&&e.movementX===0&&e.movementY===0}function Ds(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Os(e,t){return Ds(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function ks(e,t,n){return Ds(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function As(e,t,n){return Ds(t,n?e===Ke:e===qe,e===Ye)}function js(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===Ts:Ds(t,n?e===qe:e===Ke,e===Je)}function Ms(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,parentOrientation:_,id:v,resetOnPointerLeave:y=!0,externalTree:x,grid:S}=t,C=S!=null,w=`rootStore`in e?e.rootStore:e,T=w.useState(`open`),E=w.useState(`floatingElement`),D=w.useState(`domReferenceElement`),O=w.context.dataRef,k=St(E),A=bt(D),j=hn(k),M=Yi(),P=Xi(x),F=b.useRef(f),I=b.useRef(o??-1),L=b.useRef(null),R=b.useRef(!0),z=X(e=>{i(I.current===-1?null:I.current,e)}),B=b.useRef(!!E),V=b.useRef(T),H=b.useRef(!1),U=b.useRef(!1),ee=b.useRef(null),te=hn(h),ne=hn(T),W=hn(o),re=hn(y),ie=Tn(),ae=Tn(),G=X(()=>{function e(e){d?P?.events.emit(`virtualfocus`,e):ee.current=Hr(e,{sync:H.current,preventScroll:!0})}let t=n.current[I.current],r=U.current;t&&e(t),(H.current?e=>e():e=>ie.request(e))(()=>{let i=n.current[I.current]||t;i&&(t||e(i),fe&&(r||!R.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});N(()=>{O.current.orientation=g},[O,g]),N(()=>{a&&(T&&E?(I.current=o??-1,F.current&&o!=null&&(U.current=!0,z())):B.current&&(I.current=-1,z()))},[a,T,E,o,z]),N(()=>{if(a){if(!T){H.current=!1;return}if(E){if(r==null){if(H.current=!1,W.current!=null)return;if(B.current&&(I.current=-1,G()),(!V.current||!B.current)&&F.current&&(L.current!=null||F.current===!0&&L.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>ae.request(e):queueMicrotask)(t),e+=1):(I.current=L.current==null||ks(L.current,g,u)||l?or(n):sr(n),L.current=null,z())};t()}}else ar(n.current,r)||(I.current=r,G(),U.current=!1)}}},[a,T,E,r,W,l,n,g,u,z,G,ae]),N(()=>{if(!a||E||!P||d||!B.current)return;let e=P.nodesRef.current,t=e.find(e=>e.id===M)?.context?.elements.floating,n=He(En(D??t??null)),r=e.some(e=>e.context&&K(e.context.elements.floating,n));t&&!r&&R.current&&t.focus({preventScroll:!0})},[a,E,D,P,M,d]),N(()=>{V.current=T,B.current=!!E}),N(()=>{T||(L.current=null,F.current=f)},[T,f]);let oe=r!=null,se=X(e=>{if(!ne.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(I.current!==t||r!==t)&&(I.current=t,z(e))}),ce=X(()=>_??P?.nodesRef.current.find(e=>e.id===M)?.context?.dataRef?.current.orientation),le=X(()=>or(n,te.current)),ue=X(e=>{if(R.current=!1,H.current=!0,e.which===229||!ne.current&&e.currentTarget===j.current)return;if(l&&js(e.key,g,u,C)){Os(e.key,ce())||de(e),w.setOpen(!1,J(Wt,e.nativeEvent)),Ce(D)&&(d?P?.events.emit(`virtualfocus`,D):D.focus());return}let t=I.current,r=or(n,h),i=sr(n,h);if(A||(e.key===`Home`&&(de(e),I.current=r,z(e)),e.key===`End`&&(de(e),I.current=i,z(e))),S!=null){let t=S(e,I.current,n,g,c,u,h,r,i);if(t!=null&&(I.current=t,z(e)),g===`both`)return}if(Os(e.key,g)){if(de(e),T&&!d&&He(e.currentTarget.ownerDocument)===e.currentTarget){I.current=ks(e.key,g,u)?r:i,z(e);return}ks(e.key,g,u)?c?t>=i?s&&t!==n.current.length?I.current=-1:(H.current=!1,I.current=r):I.current=cr(n.current,{startingIndex:t,disabledIndices:h}):I.current=Math.min(i,cr(n.current,{startingIndex:t,disabledIndices:h})):c?t<=r?s&&t!==-1?I.current=n.current.length:(H.current=!1,I.current=i):I.current=cr(n.current,{startingIndex:t,decrement:!0,disabledIndices:h}):I.current=Math.max(r,cr(n.current,{startingIndex:t,decrement:!0,disabledIndices:h})),ar(n.current,I.current)&&(I.current=-1),z(e)}}),fe=b.useMemo(()=>({onFocus(e){H.current=!0,se(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){Es(e)||(H.current=!0,U.current=!1,p&&se(e))},onPointerLeave(e){if(!ne.current||!R.current||e.pointerType===`touch`)return;H.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&re.current&&(ee.current?.(),ee.current=null,I.current=-1,z(e),!d)){let e=j.current,t=He(En(e));e&&K(e,t)&&e.focus({preventScroll:!0})}}}),[se,ne,j,p,n,z,re,d]),he=b.useMemo(()=>d&&T&&oe&&{"aria-activedescendant":`${v}-${r}`},[d,T,oe,v,r]),ge=b.useMemo(()=>({...A?{}:he,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&T&&!d){let t=Ue(e.nativeEvent);if(t&&!K(j.current,t))return;de(e),w.setOpen(!1,J(Ht,e.nativeEvent)),Ce(D)&&D.focus();return}ue(e)},onPointerMove(e){Es(e)||(R.current=!0)}}),[he,ue,j,A,w,T,d,D]),_e=b.useMemo(()=>{function e(e){w.setOpen(!0,J(Wt,e.nativeEvent,e.currentTarget))}function t(e){f===`auto`&&pe(e.nativeEvent)&&(F.current=!d)}function n(e){F.current=f,f===`auto`&&me(e.nativeEvent)&&(F.current=!0)}return{onKeyDown(t){let n=w.select(`open`);R.current=!1;let r=t.key.startsWith(`Arrow`),i=As(t.key,ce(),u),a=Os(t.key,g),o=(l?i:a)||t.key===`Enter`||t.key.trim()===``;if(d&&n)return ue(t);if(n||m||!r){if(o){let e=Os(t.key,ce());L.current=l&&e?null:t.key}if(l){i&&(de(t),n?(I.current=le(),z(t)):e(t));return}a&&(W.current!=null&&(I.current=W.current),de(t),!n&&m?e(t):ue(t),n&&z(t))}},onFocus(e){w.select(`open`)&&!d&&(I.current=-1,z(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[ue,f,le,l,z,w,m,g,ce,u,W,d]),ve=b.useMemo(()=>({...he,..._e}),[he,_e]);return b.useMemo(()=>a?{reference:ve,floating:ge,item:fe,trigger:_e}:{},[a,ve,ge,_e,fe])}function Ns(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=`rootStore`in e?e.rootStore:e,f=d.useState(`open`),p=V(),m=b.useRef(``),h=b.useRef(u??i??-1),g=b.useRef(null),_=X(e=>{function t(e){return r?.current[e]}function c(e){let n=t(e);return n&&!fr(n)||n?.matches(`:disabled`)?!1:o==null||!ur(j,e,o)}function d(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&c(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(de(e),s?.(!0)),m.current.length>0&&m.current[0]!==` `&&d(_,m.current)===-1&&e.key!==` `&&s?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(de(e),s?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&c(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,s?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=d(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,s?.(!1)):(a?.(b),g.current=b)}),v=X(e=>{let t=e.relatedTarget,n=d.select(`domReferenceElement`),r=d.select(`floatingElement`);K(n,t)||K(r,t)||(p.clear(),m.current=``,h.current=g.current,s?.(!1))});N(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``))},[f,u,p]);let y=b.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return b.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var Ps=.1,Fs=Ps*Ps,Is=.5;function Ls(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Rs(e,t,n,r,i,a,o,s,c,l){let u=!1;return Ls(e,t,n,r,i,a)&&(u=!u),Ls(e,t,i,a,o,s)&&(u=!u),Ls(e,t,o,s,c,l)&&(u=!u),Ls(e,t,c,l,n,r)&&(u=!u),u}function zs(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Bs(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Vs(e={}){let{blockPointerEvents:t=!1}=e,n=new B,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Fs;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=Ue(r),g=r.type===`mouseleave`,_=K(u,h),v=K(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&Se(r.relatedTarget)&&K(u,r.relatedTarget))return;function y(){return!!(s&&Rr(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=Bs(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Bs(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Bs(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Bs(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!zs(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?Is/2:Is*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Is+1,o=C||T?S.bottom-Is:S.top,s=C?T?S.bottom-Is:S.top:S.bottom-Is;M=Rs(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Is/2:Is*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Is,o=C||T?S.top+Is:S.bottom,s=C?T?S.top+Is:S.bottom:S.top+Is;M=Rs(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Is/2:Is*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Is+1,o=w||E?S.right-Is:S.left,s=w?E?S.right-Is:S.left:S.right-Is;M=Rs(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Is/2:Is*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Is,o=w||E?S.left+Is:S.right,s=w?E?S.left+Is:S.right:S.left+Is;M=Rs(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}var Hs={...us,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},Us=class extends No{constructor(e,t,n){let r=new rs;super(Ws(e,r,t,n),Gs(r),Hs)}setOpen=(e,t)=>{Zo(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,J(kt,e))}};function Ws(e,t,n,r=!1){return{...is(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function Gs(e){return{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var Ks=D(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=Go((e,t)=>new Us({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),$o(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:x}=es(h,p),S=p.useState(`isInstantPhase`),C=p.useState(`instantType`),w=p.useState(`lastOpenChangeReason`),T=b.useRef(null);N(()=>{m&&t&&p.setOpen(!1,J(Xt))},[m,t,p]),N(()=>{x===`ending`&&w===`none`||x!==`ending`&&S?(C!==`delay`&&(T.current=C),p.set(`instantType`,`delay`)):T.current!==null&&(p.set(`instantType`,T.current),T.current=null)},[x,S,w,C,p]),N(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),b.useImperativeHandle(o,()=>({unmount:y,close:()=>p.setOpen(!1,J($t))}),[y,p]);let E=h||_||!t&&a!==`none`;return(0,Y.jsxs)(I.Provider,{value:p,children:[l&&(0,Y.jsx)(Ko,{handle:l,store:p}),E&&(0,Y.jsx)(qs,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function qs({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=ga(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=pa(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=b.useMemo(()=>pi(a.reference,i.reference),[a.reference,i.reference]);return ts(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??M}),null}function Js(e){return ii(e,`base-ui`)}var Ys=b.createContext(void 0);function Xs(){return b.useContext(Ys)}var Zs=`data-base-ui-tooltip-trigger`;function Qs(e){if(`composedPath`in e){let t=e.composedPath();for(let e=0;e<t.length;e+=1){let n=t[e];if(Se(n))return n}}let t=e.target;return Se(t)?t:null}function $s(e){let t=e;for(;t;){let e=t.closest(`[${Zs}]`);if(e)return e;let n=t.getRootNode();t=`host`in n&&Se(n.host)?n.host:null}return null}var ec=O(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=L(!0),m=ds(a)??p;if(!m)throw Error(F(82));let h=Js(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=b.useRef(null),x=u??0,{registerTrigger:S,isMountedByThisTrigger:C}=Qo(h,y,m,{payload:o,closeOnClick:l,closeDelay:x}),w=Xs(),{activeIdRef:T,delayRef:E,isInstantPhase:D,hasProvider:O}=on(v,{open:_}),k=xs(v);m.useSyncedValue(`isInstantPhase`,D);let A=m.useState(`disabled`),j=s??A,M=hn(j),N=m.useState(`trackCursorAxis`),P=m.useState(`disableHoverablePopup`),I=b.useRef(!1),R=V(),z=b.useRef(void 0);function B(){return O&&T.current!=null?0:c??w??600}function H(e){let t=y.current;if(!t||!e)return!1;let n=$s(e);return n!==null&&n!==t&&K(t,n)}function U(e){let t=H(e);return I.current=t,t&&(k.openChangeTimeout.clear(),k.restTimeout.clear(),k.restTimeoutPending=!1,R.clear()),t}let ee=ws(v,{enabled:!j,mouseOnly:!0,move:!1,handleClose:!P&&N!==`both`?Vs():null,restMs:B,delay(){return u==null&&O?{close:wt(E.current,`close`)}:{close:x}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!I.current}}),te=gs(v,{enabled:!j}).reference,ne=e=>{let t=I.current,n=Qs(e),r=U(n),i=y.current,a=i&&n&&K(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`){m.setOpen(!1,J(At,e));return}if(t&&!r&&a&&!M.current&&!m.select(`open`)&&i&&he(z.current)){let t=()=>{!I.current&&!M.current&&!m.select(`open`)&&m.setOpen(!0,J(At,e,i))},n=B();n===0?(R.clear(),t()):R.start(n,t)}},W=m.useState(`triggerProps`,C);return Di(`button`,e,{state:{open:_},ref:[t,S,y],props:[ee,te,C||N!==`none`?W:void 0,{onMouseOver(e){ne(e.nativeEvent)},onFocus(e){H(Qs(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){I.current=!1,R.clear(),z.current=void 0},onPointerEnter(e){z.current=e.pointerType},onPointerDown(e){z.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[ht]:j?``:void 0,[Zs]:j?void 0:``},f],stateAttributesMapping:dt})}),tc=b.createContext(void 0);function nc(){let e=b.useContext(tc);if(e===void 0)throw Error(F(70));return e}var rc=b.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=Ui({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,Y.jsxs)(b.Fragment,{children:[l,c&&zi.createPortal(n,c)]})}),ic=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return L().useState(`mounted`)||n?(0,Y.jsx)(tc.Provider,{value:n,children:(0,Y.jsx)(rc,{ref:t,...r})}):null}),ac=b.createContext(void 0);function oc(){let e=b.useContext(ac);if(e===void 0)throw Error(F(71));return e}var sc=b.createContext(void 0);function cc(){return b.useContext(sc)?.direction??`ltr`}var lc=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=Rn(e,t)||{};if(l==null)return{};let f=nr(u),p={x:n,y:r},m=Wn(i),h=Hn(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=Ln(k,j,A),N=!c.arrow&&Bn(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),uc=(e,t)=>{let{name:n,fn:r}=lc(e);return{name:n,fn:r,options:[e,t]}},dc={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},fc={sideX:`left`,sideY:`top`},pc=`--available-width`,mc=`--available-height`,hc=`--anchor-width`,gc=`--anchor-height`,_c=`--transform-origin`,vc=pc,yc=mc;function bc(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function xc(e,t,n){let{rects:r,placement:i}=e;return{side:bc(t,zn(i),n),align:Bn(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Sc(e){return Cc(e,ps)}function Cc(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:v,nodeId:y,adaptiveOrigin:x,lazyFlip:S=!1,externalTree:C}=e,[w,T]=b.useState(null);!g&&w!==null&&T(null);let E=_.side||`flip`,D=_.align||`flip`,O=_.fallbackAxisSide||`end`,k=v?.crossAxis??!1,A=v?.rootBoundary,j=typeof n==`function`?n:void 0,M=X(j),P=j?M:n,F=hn(n),I=hn(g),L=cc()===`rtl`,R=w||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":L?`left`:`right`,"inline-start":L?`right`:`left`}[i],z=o===`center`?R:`${R}-${o}`,B=l;typeof B==`number`?B={top:B,right:B,bottom:B,left:B}:B&&={top:B.top||0,right:B.right||0,bottom:B.bottom||0,left:B.left||0};let V=+(i===`bottom`),H=+(i===`top`),U=+(i===`right`),ee=+(i===`left`),te={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:B},ne=b.useRef(null),W=hn(a),re=hn(s),ie=typeof a==`function`?0:a,ae=typeof s==`function`?0:s,G=[];p&&G.push(p),G.push(go(e=>{let t=xc(e,i,L),n=typeof W.current==`function`?W.current(t):W.current,r=typeof re.current==`function`?re.current(t):re.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[ie,ae,L,i]));let oe=D===`none`&&E!==`shift`,se=!oe&&(u||k||E===`shift`),ce=E===`none`?null:yo({...te,padding:{top:B.top+1+V,right:B.right+1+ee,bottom:B.bottom+1+H,left:B.left+1+U},mainAxis:!k&&E===`flip`,crossAxis:D===`flip`&&`alignment`,fallbackAxisSideDirection:O}),le=oe?null:_o({...te,rootBoundary:A,mainAxis:D!==`none`,crossAxis:se,limiter:u||k?void 0:vo(e=>{if(!ne.current)return{};let{width:t,height:n}=ne.current.getBoundingClientRect(),r=Un(zn(e.placement)),i=r===`y`?t:n,a=r===`y`?B.left+B.right:B.top+B.bottom;return{offset:i/2+a/2}})},[te,u,k,A,B,D]);E===`shift`||D===`shift`||o===`center`?G.push(le,ce):G.push(ce,le),G.push(bo({...te,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!I.current)return;let i=e.style;i.setProperty(vc,`${t}px`),i.setProperty(yc,`${n}px`);let a=ye(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(hc,`${u}px`),i.setProperty(gc,`${d}px`)}}),uc(e=>({element:ne.current||En(e.elements.floating).createElement(`div`),padding:ne.current?d:0,offsetParent:`floating`}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=zn(r),u=Bn(r),d=Un(l)===`y`,f=ne.current,p=typeof a==`function`?a(xc(e,i,L)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return se&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(_c,d?`${m} ${h}`:`${h} ${m}`),{}}},dc,x),N(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let ue=b.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:de,elements:fe,x:pe,y:me,middlewareData:he,update:ge,placement:_e,context:ve,isPositioned:be,floatingStyles:xe}=t({rootContext:h,open:m?g:void 0,placement:z,middleware:G,strategy:r,whileElementsMounted:m?void 0:(...e)=>no(...e,ue),nodeId:y,externalTree:C}),{sideX:Se,sideY:Ce}=he.adaptiveOrigin||fc,we=be?r:`fixed`,Te=b.useMemo(()=>{let e;return e=be?x?{position:we,[Se]:pe,[Ce]:me}:{...xe,position:we}:{position:we,top:0,left:0},e[vc]=`100vw`,e[yc]=`100vh`,be||(e.opacity=0),e},[x,we,Se,pe,Ce,me,xe,be]),Ee=b.useRef(null);N(()=>{if(!g)return;let e=F.current,t=typeof e==`function`?e():e,n=(wc(t)?t.current:t)||null;n!==Ee.current&&(de.setPositionReference(n),Ee.current=n)},[g,de,P,F]),b.useEffect(()=>{if(!g)return;let e=F.current;typeof e!=`function`&&wc(e)&&e.current!==Ee.current&&(de.setPositionReference(e.current),Ee.current=e.current)},[g,de,P,F]),b.useEffect(()=>{if(m&&g&&fe.reference&&fe.floating)return no(fe.reference,fe.floating,ge,ue)},[m,g,fe,ge,ue]);let De=zn(_e),Oe=bc(i,De,L),ke=Bn(_e)||`center`,Ae=!!he.hide?.referenceHidden;N(()=>{S&&g&&be&&De!==R&&T(De)},[S,g,be,De,R]);let je=b.useMemo(()=>({position:`absolute`,top:he.arrow?.y,left:he.arrow?.x}),[he.arrow]),Me=he.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:Te,arrowStyles:je,arrowRef:ne,arrowUncentered:Me,side:Oe,align:ke,physicalSide:De,anchorHidden:Ae,refs:de,context:ve,isPositioned:be,update:ge}),[Te,je,ne,Me,Oe,ke,De,Ae,de,ve,be,ge])}function wc(e){return e!=null&&`current`in e}function Tc(e){return e===`starting`?Pi:M}function Ec(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),Di(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},Tc(r),i],stateAttributesMapping:pt})}var Dc=b.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Li,style:g,..._}=e,v=L(),y=nc(),x=v.useState(`open`),S=v.useState(`mounted`),C=v.useState(`trackCursorAxis`),w=v.useState(`disableHoverablePopup`),T=v.useState(`floatingRootContext`),E=v.useState(`instantType`),D=v.useState(`transitionStatus`),O=Sc({anchor:i,positionMethod:a,floatingRootContext:T,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`adaptiveOrigin`)}),k=Ec(e,b.useMemo(()=>({open:x,side:O.side,align:O.align,anchorHidden:O.anchorHidden,instant:C===`none`?E:`tracking-cursor`}),[x,O.side,O.align,O.anchorHidden,C,E]),{styles:O.positionerStyles,transitionStatus:D,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!S,inert:!x||C===`both`||w});return(0,Y.jsx)(ac.Provider,{value:O,children:k})}),Oc=b.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=L(),{side:s,align:c}=oc(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);Ho({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),Ss(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return Di(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[Uo,f,Tc(d),a],stateAttributesMapping:mt})}),kc=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=b.useMemo(()=>({open:t,close:n}),[t,n]);return(0,Y.jsx)(Ys.Provider,{value:t,children:(0,Y.jsx)(an,{delay:i,timeoutMs:r,children:e.children})})};function Ac(e){return oi(19)?e:e?`true`:void 0}function jc({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=b.useRef(e!==void 0),[a,o]=b.useState(t);return[i&&e!==void 0?e:a,b.useCallback(e=>{i||o(e)},[])]}var Mc=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Nc(){return b.useContext(Mc)}function Pc(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=X(i),[,o]=b.useState(!1),s=S(Ic).current,c=S(Fc).current,l=b.useRef(0),u=b.useRef(!0),d=b.useRef(null),f=b.useRef(null),p=X(()=>{u.current||(u.current=!0,o(e=>!e))}),m=X((e,t)=>{c.set(e,t),p()}),h=X(e=>{c.delete(e),p()}),g=X(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function _(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!zc(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&Bc(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=Rc(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let v=X(()=>{let[e,t]=Lc(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});_(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});N(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),N(()=>{u.current&&v()}),N(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let y=X(e=>(s.add(e),()=>{s.delete(e)})),x=b.useMemo(()=>({register:m,unregister:h,subscribeMapChange:y,nextIndexRef:l}),[m,h,y,l]);return(0,Y.jsx)(Mc.Provider,{value:x,children:t})}function Fc(){return new Map}function Ic(){return new Set}function Lc(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>Bc(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function Rc(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function zc(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function Bc(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function Vc(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var Hc=`ArrowUp`,Uc=`ArrowDown`,Wc=`ArrowLeft`,Gc=`ArrowRight`,Kc=new Set([Hc,Uc,Wc,Gc,`Home`,`End`]),qc=[`Shift`,`Control`,`Alt`,`Meta`];function Jc(e){return Ce(e)&&e.tagName===`INPUT`}function Yc(e){return!!(Jc(e)&&e.selectionStart!=null||Ce(e)&&e.tagName===`TEXTAREA`)}function Xc(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=Zc(e,t,`left`),a=Qc(e),o=Qc(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=Zc(e,t,`top`),r=Qc(e),i=Qc(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function Zc(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function Qc(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var $c=`data-composite-item-active`;function el(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:c,enableHomeAndEndKeys:l=!1,stopEventPropagation:u,disabledIndices:d,modifierKeys:f=j}=e,[p,m]=b.useState(0),h=r!=null,g=b.useRef(null),_=ln(g,c),v=b.useRef([]),y=b.useRef(!1),x=b.useRef(null),S=o??p,C=X((e,t=!1)=>{if(x.current=v.current[e]??null,(s??m)(e),t){let t=v.current[e];Xc(g.current,t,a,n)}}),w=X(e=>{if(e.size===0)return;if(y.current){let e=v.current,t=e.indexOf(x.current);if(t===-1){let t=e[S];!t||ur(e,S,d)?C(tl(e,d)):x.current=t}else t!==S&&C(t);return}y.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)C(i);else if(ur(t,S,d)){let e=cr(t,{disabledIndices:d});ar(t,e)||C(e)}Xc(g.current,r,a,n)});N(()=>{if(d==null||o!=null||!y.current)return;let e=v.current;if(ur(e,S,d)){let t=cr(e,{disabledIndices:d});ar(e,t)||C(t)}},[d,o,S,v,C]);let T=X((e,t,n)=>i?i(e,t,n,v):n),E=X(e=>{let o=e.key===`Home`||e.key===`End`;if(!Kc.has(e.key)||!l&&o||nl(e,f)||!g.current)return;let s=a===`rtl`,c=s?Wc:Gc,p=s?Gc:Wc,m=n===`vertical`?Uc:c,_=n===`vertical`?Hc:p,y=Ue(e.nativeEvent);if(y!=null&&Yc(y)&&!Vc(y)){let t=y.selectionStart,n=y.selectionEnd,r=y.value;if(t==null||e.shiftKey||t!==n||e.key!==_&&t<r.length||e.key!==m&&t>0)return}let b=S,x=or(v,d),w=sr(v,d);r!=null&&(b=r({disabledIndices:d,elementsRef:v,event:e,highlightedIndex:S,loopFocus:t,maxIndex:w,minIndex:x,onLoop:T,orientation:n,rtl:s}));let E=n!==`vertical`&&e.key===c||n!==`horizontal`&&e.key===`ArrowDown`,D=n!==`vertical`&&e.key===p||n!==`horizontal`&&e.key===`ArrowUp`;l&&(e.key===`Home`?b=x:e.key===`End`&&(b=w)),b===S&&(E||D)&&(t&&b===w&&E?(b=x,i&&(b=i(e,S,b,v))):t&&b===x&&D?(b=w,i&&(b=i(e,S,b,v))):b=cr(v.current,{startingIndex:b,decrement:D,disabledIndices:d})),b!==S&&!ar(v.current,b)&&(u&&e.stopPropagation(),(h||o||E||D)&&e.preventDefault(),C(b,!0),queueMicrotask(()=>{v.current[b]?.focus()}))});return{props:{ref:_,onFocus(e){let t=g.current,n=Ue(e.nativeEvent);t&&n!=null&&Yc(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:E},highlightedIndex:S,onHighlightedIndexChange:C,elementsRef:v,onMapChange:w,relayKeyboardEvent:E}}function tl(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i&&!ur(e,r,t)){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function nl(e,t){for(let n of qc)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}var rl=b.createContext(void 0);function il(e=!1){let t=b.useContext(rl);if(t===void 0&&!e)throw Error(F(16));return t}function al(e){let{render:t,className:n,style:r,refs:i=j,props:a=j,state:o=M,stateAttributesMapping:s,highlightedIndex:c,onHighlightedIndexChange:l,orientation:u,grid:d,loopFocus:f,onLoop:p,enableHomeAndEndKeys:m,onMapChange:h,stopEventPropagation:g=!0,rootRef:_,disabledIndices:v,modifierKeys:y,highlightItemOnHover:x=!1,tag:S=`div`,...C}=e,{props:w,highlightedIndex:T,onHighlightedIndexChange:E,elementsRef:D,onMapChange:O,relayKeyboardEvent:k}=el({grid:d,loopFocus:f,onLoop:p,orientation:u,highlightedIndex:c,onHighlightedIndexChange:l,rootRef:_,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:cc(),disabledIndices:v,modifierKeys:y}),A=Di(S,e,{state:o,ref:i,props:[w,...a,C],stateAttributesMapping:s}),N=b.useMemo(()=>({highlightedIndex:T,onHighlightedIndexChange:E,highlightItemOnHover:x,relayKeyboardEvent:k}),[T,E,x,k]);return(0,Y.jsx)(rl.Provider,{value:N,children:(0,Y.jsx)(Pc,{elementsRef:D,onMapChange:e=>{h?.(e),O(e)},children:A})})}var ol=b.createContext(void 0);function sl(e){let t=b.useContext(ol);if(t===void 0&&!e)throw Error(F(69));return t}var cl=b.createContext(void 0);function ll(){return b.useContext(cl)}var ul=b.createContext(void 0);function dl(){return b.useContext(ul)}var fl=b.forwardRef(function(e,t){let{defaultValue:n,disabled:r=!1,loopFocus:i=!0,onValueChange:a,orientation:o=`horizontal`,multiple:s=!1,value:c,className:l,render:u,style:d,...f}=e,p=sl(!0),m=ll(),h=n??j,g=c!==void 0||n!==void 0,_=(p?.disabled??!1)||(m?.disabled??!1)||r,[v,y]=jc({controlled:c,default:h,name:`ToggleGroup`,state:`value`}),x=X((e,t,n)=>{let r;s?(r=v.slice(),t?r.push(e):r.splice(v.indexOf(e),1)):r=t?[e]:[],a?.(r,n),!n.isCanceled&&y(r)}),S={disabled:_,multiple:s,orientation:o},C=b.useMemo(()=>({disabled:_,setGroupValue:x,value:v,isValueInitialized:g}),[_,x,v,g]),w={role:`group`},T=Di(`div`,e,{enabled:!!p,state:S,ref:t,props:[w,f]});return(0,Y.jsx)(ul.Provider,{value:C,children:p?T:(0,Y.jsx)(al,{render:u,className:l,style:d,state:S,refs:[t],props:[w,f],loopFocus:i,enableHomeAndEndKeys:!0,orientation:o})})});function pl(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:b.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function ml(e,t,{detail:n=0}={}){e.dispatchEvent(new(ye(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function hl(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=b.useRef(null),s=il(!0),c=a??s!==void 0,{props:l}=pl({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=b.useCallback(()=>{let e=o.current;gl(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return N(u,[u]),{getButtonProps:b.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return pi({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(wi(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=gl(r),s=!i&&_l(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),ml(r,e));return}if(!l||i||!d&&!u){n&&s&&d&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),ml(r,e)))},onKeyUp(e){if(!t){if(wi(e),a?.(e),e.target===e.currentTarget&&i&&c&&gl(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),ml(e.currentTarget,e))}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:X(e=>{o.current=e,u()})}}function gl(e){return Ce(e)&&e.tagName===`BUTTON`}function _l(e){return Ce(e)&&e.tagName===`A`&&!!e.href}function vl(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=Nc(),u=b.useRef(-1),[d,f]=b.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=b.useRef(null),h=b.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return N(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}function yl(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=il(),{ref:i,index:a}=vl(e),o=n===a,s=b.useRef(null),c=ln(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}function bl(e){let{render:t,className:n,style:r,state:i=M,props:a=j,refs:o=j,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=yl({metadata:s});return Di(l,e,{state:i,ref:[f,...o],props:[d,...a,u],stateAttributesMapping:c})}var xl=b.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:i=!1,form:a,onPressedChange:o,pressed:s,render:c,type:l,value:u,nativeButton:d=!0,style:f,...p}=e,m=Js(u||void 0),h=dl(),g=h?.value??[],_=(i||h?.disabled)??!1,[v,y]=jc({controlled:h?m!==void 0&&g.indexOf(m)>-1:s,default:r,name:`Toggle`,state:`pressed`}),{getButtonProps:x,buttonRef:S}=hl({disabled:_,native:d}),C={disabled:_,pressed:v},w=[S,t],T=[{"aria-pressed":v,onClick(e){let t=!v,n=J(Ot,e.nativeEvent);o?.(t,n),!n.isCanceled&&(m&&h?.setGroupValue?.(m,t,n),!n.isCanceled&&y(t))}},p,x],E=Di(`button`,e,{enabled:!h,state:C,ref:w,props:T}),D=b.useMemo(()=>({disabled:_,focusableWhenDisabled:!1}),[_]);return h?(0,Y.jsx)(bl,{tag:`button`,render:c,className:n,style:f,metadata:D,state:C,refs:w,props:T}):E}),Sl=b.createContext(void 0);function Cl(e){let t=b.useContext(Sl);if(!e&&t===void 0)throw Error(F(27));return t}var wl=b.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=Cl(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return Di(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:mt,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),Tl=b.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=Cl(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=hl({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,J(Pt,e.nativeEvent))}return Di(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),El=b.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Cl(),c=Js(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),Di(`p`,e,{ref:t,props:[{id:c},o]})}),Dl=b.createContext(void 0);function Ol(){let e=b.useContext(Dl);if(e===void 0)throw Error(F(26));return e}var kl=`--nested-dialogs`,Al=`data-nested-dialog-open`,jl={...pt,...et,nestedDialogOpen(e){return e?{[Al]:``}:null}},Ml=b.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=Cl(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`);Ol(),Ho({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let C=o===void 0?Wo(c.context.popupRef):o,w=g>0,T=c.useStateSetter(`popupElement`),E=Di(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...Uo,hidden:!m,onKeyDown(e){Kc.has(e.key)&&e.stopPropagation()},style:{[kl]:g}},s],ref:[t,c.context.popupRef,T],stateAttributesMapping:jl});return(0,Y.jsx)(la,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:E})}),Nl=b.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,Y.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),Pl=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=Cl(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,Y.jsx)(Dl.Provider,{value:n,children:(0,Y.jsxs)(Wi,{ref:t,...r,children:[a&&o===!0&&(0,Y.jsx)(Nl,{ref:i.context.internalBackdropRef,inert:Ac(!s)}),e.children]})}):null}),Fl={},Il={},Ll=``;function Rl(e,t){return Te(e)?e:t}function zl(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Rl(t,n)).overflowY)}function Bl(e){if(typeof document>`u`)return!1;let t=En(e);return ye(t).innerWidth-t.documentElement.clientWidth>0}function Vl(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=En(e),n=t.documentElement,r=t.body,i=Rl(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Hl(e){let t=En(e),n=t.documentElement,r=t.body,i=Rl(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Ul(e){let t=En(e),n=t.documentElement,r=t.body,i=ye(n),a=0,o=0,s=!1,c=wn.create();if(se&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Fl={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Ll=n.style.scrollBehavior,Il={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Rl(n,r);if(s=Vl(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,Fl),Object.assign(r.style,Il),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Ll)}function d(){u(),c.request(l)}l();let f=sn(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Wl=new class{lockCount=0;restore=null;timeoutLock=B.create();timeoutUnlock=B.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=En(e),n=t.documentElement,r=t.body,i=ye(n);if(zl(i,n,r)){let t=new i.MutationObserver(()=>{zl(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=re||!Bl(e);this.restore=a?Hl(e):Ul(e)}};function Gl(e=!0,t=null){N(()=>{if(e)return Wl.acquire(t)},[e,t])}function Kl({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`disablePointerDismissal`),a=e.useState(`modal`),o=e.useState(`popupElement`),s=e.useState(`floatingRootContext`),[c,l]=b.useState(0),[u,d]=b.useState(0),f=c===0,p=ga(s,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:a===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=Ue(t);if(f&&!i){if(a){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||K(n,o)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:f});return Gl(r&&a===!0,o),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{l(e),d(t)}),N(()=>(t?.onNestedDialogOpen&&(r?t.onNestedDialogOpen(c+1,u+ +!!n):t.onNestedDialogOpen(0,0)),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,c,u,t]),ts(e,{activeTriggerProps:p.reference,inactiveTriggerProps:p.trigger,popupProps:p.floating,nestedOpenDialogCount:c,nestedOpenDrawerCount:u}),null}var ql={...us,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},Jl=class extends No{constructor(e,t,n){let r=new rs,i=Yl(e,r,t,n);super(i,Xl(r),ql)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),!t.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(Yo(this.state,e,t.trigger)))}};function Yl(e,t,n,r=!1){return{...is(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function Xl(e){return{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function Zl(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=Cl(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},x=Go((e,t)=>new Jl({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y},e,t),!0);x.useControlledProp(`openProp`,r),x.useControlledProp(`triggerIdProp`,d),x.useSyncedValues(y),x.useContextCallback(`onOpenChange`,a),x.useContextCallback(`onOpenChangeComplete`,o);let S=x.useState(`open`),C=x.useState(`mounted`),w=x.useState(`payload`);ns(x,S),$o(x);let{forceUnmount:T}=es(S,x);b.useImperativeHandle(l,()=>({unmount:T,close:()=>x.setOpen(!1,J($t))}),[T,x]);let E=S||C;return(0,Y.jsxs)(Sl.Provider,{value:x,children:[u&&(0,Y.jsx)(Ko,{handle:u,store:x}),E&&(0,Y.jsx)(Kl,{store:x,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:w}):n]})}var Ql=D(function(e){return Zl(`dialog`,e)}),$l=b.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Cl(),c=Js(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),Di(`h2`,e,{ref:t,props:[{id:c},o]})});function eu(e){let t=b.useRef(``),n=b.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:b.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function tu(e,t){let n=b.useRef(e),r=X(t);N(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function nu(e,t){let{onClick:n,onPointerDown:r}=eu(X((n,r)=>{(typeof e==`function`?e():e)||t(r||(re?`touch`:``))}));return b.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function ru(e){let[t,n]=b.useState(null),r=nu(e,n);return tu(e,t=>{t&&!e&&n(null)}),b.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var iu=O(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,payload:c,handle:l,...u}=e,d=Cl(!0),f=ds(l)??d;if(!f)throw Error(F(79));let p=Js(s),m=f.useState(`floatingRootContext`),h=f.useState(`isOpenedByTrigger`,p),g=f.useState(`triggerPopupId`,p),_=b.useRef(null),{registerTrigger:v,isMountedByThisTrigger:y}=Qo(p,_,f,{payload:c}),{getButtonProps:x,buttonRef:S}=hl({disabled:a,native:o}),C=ua(m),w=nu(()=>f.select(`open`),e=>{f.set(`openMethod`,e)}),T={disabled:a,open:h},E=f.useState(`triggerProps`,y);return Di(`button`,e,{state:T,ref:[S,t,v,_],props:[C.reference,E,w,{[Fi]:``,id:p,"aria-haspopup":`dialog`,"aria-expanded":h,"aria-controls":g},u,x],stateAttributesMapping:dt})}),au=b.createContext(void 0);function ou(){let e=b.useContext(au);if(e===void 0)throw Error(F(64));return e}var su=`data-activation-direction`,cu={tabActivationDirection:e=>({[su]:e})},lu=b.forwardRef(function(e,t){let{className:n,defaultValue:r=0,onValueChange:i,orientation:a=`horizontal`,render:o,value:s,style:c,...l}=e,u=e.defaultValue!==void 0,d=b.useRef([]),[f,p]=b.useState(()=>new Map),[m,h]=jc({controlled:s,default:r,name:`Tabs`,state:`value`}),g=s!==void 0,[_,v]=b.useState(()=>new Map),y=b.useRef(void 0),x=b.useCallback(e=>uu(_,e),[_]),[S,C]=b.useState(()=>({previousValue:m,tabActivationDirection:`none`})),{previousValue:w,tabActivationDirection:T}=S,E=T,D=!1;w!==m&&(E=du(w,m,a,_),D=w!=null&&m!=null&&x(m)==null);let O=D?w:m,k=w!==O||T!==E;N(()=>{k&&C({previousValue:O,tabActivationDirection:E})},[O,k,E]);let A=X((e,t)=>{t.activationDirection=du(m,e,a,_),i?.(e,t),!t.isCanceled&&h(e)}),j=X((e,t)=>{i?.(e,J(t,void 0,void 0,{activationDirection:`none`}))}),M=X((e,t)=>(p(n=>{let r=new Map(n);return r.set(e,t),r}),()=>{p(n=>{if(n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})})),P=b.useCallback(e=>f.get(e),[f]),F=b.useCallback(e=>{for(let t of _.values())if(e===t.value)return t.id},[_]),I=b.useMemo(()=>({getTabElementBySelectedValue:x,getTabIdByPanelValue:F,getTabPanelIdByValue:P,onValueChange:A,orientation:a,registerMountedTabPanel:M,setTabMap:v,tabActivationDirection:E,value:m}),[x,F,P,A,a,M,v,E,m]),L=b.useMemo(()=>{for(let e of _.values())if(e.value===m)return e},[_,m]),R=b.useMemo(()=>{for(let e of _.values())if(!e.disabled)return e.value},[_]),z=b.useRef(!u),B=b.useRef(r),V=b.useRef(u),H=b.useRef(!1);N(()=>{if(g)return;function e(e,t){h(e),C({previousValue:e,tabActivationDirection:`none`}),j(e,t),z.current=!1}if(_.size===0){H.current&&m!==null&&!y.current?.isConnected&&e(null,Zt);return}H.current=!0,y.current=_.keys().next().value;let t=L?.disabled,n=L==null&&m!==null;if(!t&&m===B.current&&(V.current=!1),V.current&&t&&m===B.current)return;let r=z.current;if(t||n){let n=R??null;if(m===n){z.current=!1;return}let i=Zt;r?i=Qt:t&&(i=Xt),e(n,i);return}r&&L!=null&&(j(m,Qt),z.current=!1)},[R,g,j,L,h,_,m]);let U=Di(`div`,e,{state:{orientation:a,tabActivationDirection:E},ref:t,props:l,stateAttributesMapping:cu});return(0,Y.jsx)(au.Provider,{value:I,children:(0,Y.jsx)(Pc,{elementsRef:d,children:U})})});function uu(e,t){for(let[n,r]of e.entries())if(t===r.value)return n;return null}function du(e,t,n,r){if(e==null||t==null)return`none`;let[i,a,o]=n===`horizontal`?[`left`,`left`,`right`]:[`top`,`up`,`down`],s=uu(r,e),c=uu(r,t);if(s==null||c==null)return s!==c&&(typeof e==`number`||typeof e==`string`)&&typeof e==typeof t?t>e?o:a:`none`;let l=s.getBoundingClientRect()[i],u=c.getBoundingClientRect()[i];return u<l?a:u>l?o:`none`}var fu=b.createContext(void 0);function pu(){let e=b.useContext(fu);if(e===void 0)throw Error(F(65));return e}var mu=b.forwardRef(function(e,t){let{className:n,disabled:r=!1,render:i,value:a,id:o,nativeButton:s=!0,style:c,...l}=e,{value:u,getTabPanelIdByValue:d,onValueChange:f,orientation:p,tabActivationDirection:m}=ou(),{activateOnFocus:h,registerTabResizeObserverElement:g,tabsListElement:_}=pu(),{highlightedIndex:v,onHighlightedIndexChange:y}=il(),x=Js(o),{compositeProps:S,compositeRef:C,index:w}=yl({metadata:b.useMemo(()=>({disabled:r,id:x,value:a}),[r,x,a])}),T=a===u,E=b.useRef(!1),D=b.useRef(null),O=X(e=>{D.current?.(),D.current=e?g(e):null});N(()=>{if(E.current){E.current=!1;return}if(!(T&&w>-1&&v!==w))return;let e=_;if(e!=null){let t=He(En(e));if(t&&K(e,t))return}r||y(w)},[T,w,v,y,r,_]);let{getButtonProps:k,buttonRef:A}=hl({disabled:r,native:s,focusableWhenDisabled:!0}),j=d(a),M=b.useRef(!1),P=b.useRef(!1);function F(e){f(a,J(Ot,e.nativeEvent,void 0,{activationDirection:`none`}))}function I(e){T||r||F(e)}function L(e){T||r||h&&(!M.current||P.current)&&F(e)}function R(e){if(T||r)return;M.current=!0,P.current=e.button===0;let t=En(e.currentTarget);function n(){M.current=!1,P.current=!1,t.removeEventListener(`pointerup`,n),t.removeEventListener(`pointercancel`,n)}t.addEventListener(`pointerup`,n),t.addEventListener(`pointercancel`,n)}return Di(`button`,e,{state:{disabled:r,active:T,orientation:p,tabActivationDirection:m},ref:[t,A,C,O],props:[S,{role:`tab`,"aria-controls":j,"aria-selected":T,id:x,onClick:I,onFocus:L,onPointerDown:R,[$c]:T?``:void 0,onKeyDownCapture(){E.current=!0}},l,k],stateAttributesMapping:cu})}),hu=`data-index`,gu={...cu,...et},_u=b.forwardRef(function(e,t){let{className:n,value:r,render:i,keepMounted:a=!1,style:o,...s}=e,{value:c,getTabIdByPanelValue:l,orientation:u,tabActivationDirection:d,registerMountedTabPanel:f}=ou(),p=Js(),{ref:m,index:h}=vl(),g=r===c,{mounted:_,transitionStatus:v,setMounted:y}=Ro(g),x=!_,S=l(r),C={hidden:x,orientation:u,tabActivationDirection:d,transitionStatus:v},w=b.useRef(null),T=Di(`div`,e,{state:C,ref:[t,m,w],props:[{"aria-labelledby":S,hidden:x,id:p,role:`tabpanel`,tabIndex:g?0:-1,inert:Ac(!g),[hu]:h},s],stateAttributesMapping:gu});return Ho({open:g,ref:w,onComplete(){g||y(!1)}}),N(()=>{if(!(p==null||x&&!a))return f(r,p)},[x,a,r,p,f]),a||_?T:null}),vu=b.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,style:o,...s}=e,{orientation:c,setTabMap:l,tabActivationDirection:u}=ou(),[d,f]=b.useState(0),[p,m]=b.useState(null),h=b.useRef(new Set),g=b.useRef(new Set),_=b.useRef(null);N(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{h.current.forEach(e=>{e()})});return _.current=e,p&&e.observe(p),g.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),_.current=null}},[p]);let v=X(e=>(h.current.add(e),()=>{h.current.delete(e)})),y=X(e=>(g.current.add(e),_.current?.observe(e),()=>{g.current.delete(e),_.current?.unobserve(e)})),x={orientation:c,tabActivationDirection:u},S={"aria-orientation":c===`vertical`?`vertical`:void 0,role:`tablist`},C=b.useMemo(()=>({activateOnFocus:n,registerIndicatorUpdateListener:v,registerTabResizeObserverElement:y,tabsListElement:p}),[n,v,y,p]);return(0,Y.jsx)(fu.Provider,{value:C,children:(0,Y.jsx)(al,{render:a,className:r,style:o,state:x,refs:[t,m],props:[S,s],stateAttributesMapping:cu,highlightedIndex:d,enableHomeAndEndKeys:!0,loopFocus:i,orientation:c,onHighlightedIndexChange:f,onMapChange:l,disabledIndices:j})})}),yu=b.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return Di(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})}),bu=b.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=hl({disabled:i,focusableWhenDisabled:a,native:o});return Di(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})}),xu=b.createContext(void 0);function Su(e=!0){let t=b.useContext(xu);if(t===void 0&&!e)throw Error(F(25));return t}var Cu=b.createContext(void 0);function wu(e){let t=b.useContext(Cu);if(t===void 0&&!e)throw Error(F(33));return t}var Tu=b.createContext(void 0);function Eu(e){let t=b.useContext(Tu);if(t===void 0&&!e)throw Error(F(36));return t}function Du(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,{events:l}=a.useState(`floatingTreeRoot`),u=a.useState(`open`),d=Su(!0),f=d!==void 0;return b.useMemo(()=>({id:r,role:`menuitem`,tabIndex:u&&n?0:-1,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&l.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&l.emit(`close`,{domEvent:e,reason:Nt})},onMouseUp(e){if(d){let t=d.initialCursorPointRef.current;if(d.initialCursorPointRef.current=null,f&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||f&&!G&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!f||e.button===2)&&c.type===`regular-item`&&ml(s.current,e,{detail:1})}}),[t,n,r,l,i,u,a,o,s,d,f,c])}var Ou={type:`regular-item`};function ku(e){let{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,u=b.useRef(null),{getButtonProps:d,buttonRef:f}=hl({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=Du({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=b.useCallback(e=>pi(p,{onMouseEnter(){c.type===`submenu-trigger`&&c.setActive()}},e,d),[p,d,c]),h=ln(u,f);return b.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var Au=b.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,d=vl({guess:!0,label:a}),f=wu(!0),p=Js(i),{store:m}=Eu(),h=m.useState(`disabled`),g=s||h,_=m.useState(`isActive`,d.index),v=m.useState(`itemProps`),{getItemProps:y,itemRef:b}=ku({closeOnClick:c,disabled:g,highlighted:_,id:p,store:m,nativeButton:o,nodeId:f?.context.nodeId,itemMetadata:Ou});return Di(`div`,e,{state:{disabled:g,highlighted:_},props:[v,u,y],ref:[b,t,d.ref]})}),ju=b.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s}=Eu(),{side:c,align:l}=wu(),u=sl(!0)!=null,d=s.useState(`open`),f=s.useState(`transitionStatus`),p=s.useState(`popupProps`),m=s.useState(`mounted`),h=s.useState(`instantType`),g=s.useState(`activeTriggerElement`),_=s.useState(`parent`),v=s.useState(`lastOpenChangeReason`),y=s.useState(`rootId`),x=s.useState(`floatingRootContext`),S=s.useState(`floatingTreeRoot`),C=s.useState(`closeDelay`),w=s.useState(`hoverEnabled`),T=s.useState(`disabled`),E=s.useState(`openMethod`),D=_.type===`context-menu`;Ho({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),b.useEffect(()=>{function e(e){s.setOpen(!1,J(e.reason,e.domEvent))}return S.events.on(`close`,e),()=>{S.events.off(`close`,e)}},[S.events,s]),Ss(x,{enabled:w&&!T&&!D&&_.type!==`menubar`,closeDelay:C});let O=s.useStateSetter(`popupElement`),k=Di(`div`,e,{state:{transitionStatus:f,side:c,align:l,open:d,nested:_.type===`menu`,instant:h},ref:[t,s.context.popupRef,O],stateAttributesMapping:mt,props:[p,{onKeyDown(e){u&&Kc.has(e.key)&&e.stopPropagation()}},Tc(f),o,{"data-rootownerid":y}]}),A=_.type===void 0||D;return(g||_.type===`menubar`&&v!==`outside-press`)&&(A=!0),(0,Y.jsx)(la,{context:x,openInteractionType:E,modal:D,disabled:!m,returnFocus:a===void 0?A:a,initialFocus:_.type!==`menu`,restoreFocus:!0,externalTree:_.type===`menubar`?void 0:S,previousFocusableElement:g,nextFocusableElement:_.type===void 0?s.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:_.type===void 0?s.context.beforeContentFocusGuardRef:void 0,children:k})}),Mu=b.createContext(void 0);function Nu(){let e=b.useContext(Mu);if(e===void 0)throw Error(F(32));return e}var Pu=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i,parent:a}=Eu();if(!(i.useState(`mounted`)||n))return null;let o=a.type===`menu`||a.type===`menubar`?`group`:void 0;return(0,Y.jsx)(Mu.Provider,{value:n,children:(0,Y.jsx)(Wi,{ref:t,...r,portalOwnerRole:o})})}),Fu=20;function Iu(e,t,n,r){let[i,a]=b.useState(!1);N(()=>{if(!e||!t||n==null){a(!1);return}let r=En(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-Fu)},[e,t,n]),Gl(e&&(!t||i),r)}var Lu=b.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Ii,style:g,..._}=e,{store:v}=Eu(),y=Nu(),x=Su(!0),S=v.useState(`parent`),C=v.useState(`floatingRootContext`),w=v.useState(`floatingTreeRoot`),T=v.useState(`mounted`),E=v.useState(`open`),D=v.useState(`modal`),O=v.useState(`openMethod`),k=v.useState(`activeTriggerElement`),A=v.useState(`transitionStatus`),j=v.useState(`positionerElement`),M=v.useState(`instantType`),P=v.useState(`adaptiveOrigin`),F=v.useState(`lastOpenChangeReason`),I=v.useState(`floatingNodeId`),L=v.useState(`floatingParentNodeId`),R=C.useState(`domReferenceElement`),z=b.useRef(null),B=Vo(j),H=n,U=c,ee=l,te=s,ne=h;S.type===`context-menu`&&(H=n??S.context?.anchor,te??=`start`,!o&&te!==`center`&&(ee=e.alignOffset??2,U=e.sideOffset??-5));let W=o,re=te;S.type===`menu`?(W??=`inline-end`,re??=`start`,ne=e.collisionAvoidance??Li):S.type===`menubar`&&(W??=S.context.orientation===`vertical`?`inline-end`:`bottom`,re??=`start`);let ie=S.type===`context-menu`,ae=Sc({anchor:H,floatingRootContext:C,positionMethod:x?`fixed`:r,mounted:T,side:W,sideOffset:U,align:re,alignOffset:ee,arrowPadding:ie?0:f,collisionBoundary:u,collisionPadding:d,sticky:p,nodeId:I,keepMounted:y,disableAnchorTracking:m,collisionAvoidance:ne,shift:ie?{crossAxis:!(`side`in ne&&ne.side===`flip`),rootBoundary:`layoutViewport`}:void 0,externalTree:w,adaptiveOrigin:P});b.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===I&&v.set(`hoverEnabled`,!1),e.nodeId!==I&&e.parentNodeId===v.select(`floatingParentNodeId`)&&v.setOpen(!1,J(Yt)))}return w.events.on(`menuopenchange`,e),()=>{w.events.off(`menuopenchange`,e)}},[v,w.events,I]),b.useEffect(()=>{if(v.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==v.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;v.setOpen(!1,J(t))}return w.events.on(`menuopenchange`,e),()=>{w.events.off(`menuopenchange`,e)}},[w.events,v]);let G=V();b.useEffect(()=>{E||G.clear()},[E,G]),b.useEffect(()=>{function e(e){if(E&&e.nodeId===v.select(`floatingParentNodeId`)){if(e.target&&k&&k!==e.target){let e=v.select(`closeDelay`);e>0?G.isStarted()||G.start(e,()=>{v.setOpen(!1,J(Yt))}):v.setOpen(!1,J(Yt))}else G.clear()}}return w.events.on(`itemhover`,e),()=>{w.events.off(`itemhover`,e)}},[w.events,E,k,v,G]),b.useEffect(()=>{let e={open:E,nodeId:I,parentNodeId:L,reason:v.select(`lastOpenChangeReason`)};w.events.emit(`menuopenchange`,e)},[w.events,E,v,I,L]),N(()=>{let e=R,t=z.current;if(e&&(z.current=e),t&&e&&e!==t){v.set(`instantType`,void 0);let e=new AbortController;return B(()=>{v.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[R,B,v]);let oe={open:E,side:ae.side,align:ae.align,anchorHidden:ae.anchorHidden,nested:S.type===`menu`,instant:M},se=S.type===`menubar`&&S.context.modal;Iu(E&&(se||D&&F!==`trigger-hover`),O===`touch`,j,k);let ce=Ec(e,oe,{styles:ae.positionerStyles,transitionStatus:A,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!T,inert:!E}),le=T&&S.type!==`menu`&&(S.type!==`menubar`&&D&&F!==`trigger-hover`||S.type===`menubar`&&S.context.modal),ue=null;return S.type===`menubar`?ue=S.context.contentElement:S.type===void 0&&(ue=k),(0,Y.jsxs)(Cu.Provider,{value:ae,children:[le&&(0,Y.jsx)(Nl,{ref:S.type===`context-menu`||S.type===`nested-context-menu`?S.context.internalBackdropRef:null,inert:Ac(!E),cutout:ue}),(0,Y.jsx)(Qi,{id:I,children:(0,Y.jsx)(Pc,{elementsRef:v.context.itemDomElements,labelsRef:v.context.itemLabels,children:ce})})]})}),Ru=b.createContext(null);function zu(e){let t=b.useContext(Ru);if(t===null&&!e)throw Error(F(5));return t}var Bu={...us,disabled:e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0),openMethod:e=>e.openMethod,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId,activeIndex:e=>e.activeIndex,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)}},Vu=class extends No{constructor(e,t,n=!1){let r=new rs,i=Uu(r,t,n,e);super(i,Hu(r),Bu),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);(t!==i||n!==a||r!==o)&&(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}unsubscribeParentListener=null};function Hu(e){return{positionerRef:b.createRef(),popupRef:b.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function Uu(e,t,n=!1,r){return{...is(e,t,n),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Ki,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:M,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var Wu=b.createContext(void 0);function Gu(){return b.useContext(Wu)}var Ku=D(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,defaultOpen:a=!1,disabled:o=!1,modal:s,loopFocus:c=!0,orientation:l=`vertical`,actionsRef:u,closeParentOnEsc:d=!1,handle:f,triggerId:p,defaultTriggerId:m=null,highlightItemOnHover:h=!0}=e,g=Su(!0),_=Eu(!0),v=zu(!0),y=Gu(),x=b.useMemo(()=>y&&_?{type:`menu`,store:_.store}:v?{type:`menubar`,context:v}:g&&!_?{type:`context-menu`,context:g}:{type:void 0},[g,_,v,y]),C=ii(),w=ii(),T=Yi(),E=x.type===`menu`?x.store:void 0,D=(n??a)&&E?.state.transitionStatus===`starting`,O=S(()=>D?E?.state.instantType:void 0).current,k=qu({open:a,openProp:n,activeTriggerId:m,triggerIdProp:p,parent:x,disabled:o,highlightItemOnHover:h,modal:x.type===void 0?s:void 0,rootId:C,instantType:O},w,T!=null);k.useControlledProp(`openProp`,n),k.useControlledProp(`triggerIdProp`,p),k.useContextCallback(`onOpenChangeComplete`,i);let A=k.useState(`floatingTreeRoot`),P=Zi(A),F=k.useState(`open`),I=k.useState(`activeTriggerElement`),L=k.useState(`positionerElement`),R=k.useState(`hoverEnabled`),z=k.useState(`disabled`),B=k.useState(`lastOpenChangeReason`),H=k.useState(`parent`),U=k.useState(`activeIndex`),ee=k.useState(`payload`),te=k.useState(`floatingParentNodeId`),ne=b.useRef(null),W=b.useRef(H.type!==`context-menu`),re=V(),ie=b.useRef(!0),ae=V(),G=te!=null,{openMethod:oe,triggerProps:se}=ru(F);k.useSyncedValues({disabled:o,highlightItemOnHover:h,modal:H.type===void 0?s:void 0,openMethod:oe,rootId:C}),$o(k);let{forceUnmount:ce,transitionStatus:le}=es(F,k,()=>{k.set(`allowMouseEnter`,!1)},D),ue=Vo(k.context.popupRef);b.useEffect(()=>{if(O===void 0)return;let e=()=>{k.state.instantType===O&&k.set(`instantType`,void 0)};if(!F){e();return}if(le!==void 0)return;if(k.context.popupRef.current==null){e();return}let t=new AbortController;return ue(e,t.signal),()=>{t.abort()}},[O,F,le,ue,k]),N(()=>{g&&!_?k.update({parent:{type:`context-menu`,context:g},floatingNodeId:P,floatingParentNodeId:T}):_&&k.update({floatingNodeId:P,floatingParentNodeId:T})},[g,_,P,T,k]),b.useEffect(()=>{if(F||(ne.current=null),H.type===`context-menu`){if(!F){re.clear(),W.current=!1;return}re.start(500,()=>{W.current=!0})}},[re,F,H.type]),N(()=>{!F&&!R&&k.set(`hoverEnabled`,!0)},[F,R,k]);let de=X((e,t)=>{let n=t.reason;if(!e&&!k.select(`open`)||F===e&&t.trigger===I&&B===n)return;let i=Xo(t);if(!e&&t.trigger==null&&(t.trigger=I??void 0),r?.(e,t),t.isCanceled)return;k.state.floatingRootContext.dispatchOpenChange(e,t);let a=t.event;if(e===!1&&a?.type===`click`&&a.pointerType===`touch`&&!ie.current)return;e&&n===`trigger-focus`?(ie.current=!1,ae.start(300,()=>{ie.current=!0})):(ie.current=!0,ae.clear());let o=(n===`trigger-press`||n===`item-press`)&&a.detail===0,s=!e&&(n===`escape-key`||n==null);ne.current=t.event;let c=Yo(k.state,e,t.trigger,i());c.openChangeReason=n,c.instantType=H.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?`group`:o||s?o?`click`:`dismiss`:void 0,k.update(c)}),fe=Lo({popupStore:k,floatingRootContext:k.state.floatingRootContext,floatingId:w,nested:T!=null,onOpenChange:de}),pe=fe.context.events;N(()=>{let e=({open:e,eventDetails:t})=>de(e,t);return pe.on(`setOpen`,e),()=>{pe?.off(`setOpen`,e)}},[pe,de]);let me=b.useCallback(()=>{k.setOpen(!1,J($t))},[k]);b.useImperativeHandle(u,()=>({unmount:ce,close:me}),[ce,me]);let he;H.type===`context-menu`&&(he=H.context),b.useImperativeHandle(he?.positionerRef,()=>L,[L]),b.useImperativeHandle(he?.actionsRef,()=>({setOpen:de}),[de]);let ge=ga(fe,{enabled:!z,bubbles:{escapeKey:d&&H.type===`menu`},outsidePress(){return H.type!==`context-menu`||ne.current?.type===`contextmenu`||W.current},externalTree:G?A:void 0}),_e=cc(),ve=b.useCallback(e=>{k.select(`activeIndex`)!==e&&k.set(`activeIndex`,e)},[k]),ye=Ms(fe,{enabled:!z,listRef:k.context.itemDomElements,activeIndex:U,nested:H.type!==void 0,loopFocus:c,orientation:l,parentOrientation:H.type===`menubar`?H.context.orientation:void 0,rtl:_e===`rtl`,disabledIndices:j,onNavigate:ve,openOnArrowKeyDown:H.type!==`context-menu`,externalTree:G?A:void 0,focusItemOnHover:h}),be=b.useCallback(e=>{k.context.typingRef.current=e},[k]),xe=Ns(fe,{enabled:!z,listRef:k.context.itemLabels,elementsRef:k.context.itemDomElements,activeIndex:U,resetMs:500,onMatch:e=>{F&&e!==U&&k.set(`activeIndex`,e)},onTyping:be}),Se=b.useMemo(()=>{let e=pi(xe.reference,ye.reference,ge.reference,{onMouseMove(){k.set(`allowMouseEnter`,!0)}},se);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=F,e},[k,xe.reference,ye.reference,ge.reference,se,F]),Ce=b.useMemo(()=>{let e=pi(ye.trigger,ge.trigger,se);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[ye.trigger,ge.trigger,se]);S(()=>(k.update({inactiveTriggerProps:Ce}),null)),ts(k,{floatingRootContext:fe,activeTriggerProps:Se,inactiveTriggerProps:Ce,popupProps:b.useMemo(()=>pi(Uo,{id:w,role:`menu`,"aria-orientation":l===`horizontal`?`horizontal`:void 0,"aria-labelledby":I?.id,onMouseMove(){k.set(`allowMouseEnter`,!0),H.type===`menu`&&k.set(`hoverEnabled`,!1)},onClick(){k.select(`hoverEnabled`)&&k.set(`hoverEnabled`,!1)},onKeyDown(e){let t=k.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},xe.floating,ye.floating,ge.floating),[I,w,l,H.type,k,xe.floating,ye.floating,ge.floating]),itemProps:ye.item??M});let we=b.useMemo(()=>({store:k,parent:x}),[k,x]),Te=(0,Y.jsxs)(Tu.Provider,{value:we,children:[f&&(0,Y.jsx)(Ko,{handle:f,store:k}),typeof t==`function`?t({payload:ee}):t]});return H.type===void 0||H.type===`context-menu`?(0,Y.jsx)($i,{externalTree:A,children:Te}):Te});function qu(e,t,n){return S(()=>new Vu(e,t,n)).current}var Ju=5;function Yu(e,t){let n=Xu(t);return e.clientX>=n.left-Ju&&e.clientX<=n.right+Ju&&e.clientY>=n.top-Ju&&e.clientY<=n.bottom+Ju}function Xu(e){let t=e.getBoundingClientRect(),n=ye(e);if(ue)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function Zu(e){if(Ce(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!Fe(e))return Zu(Re(e))}function Qu(e,t){let n=b.useRef(null);function r(t){zi.flushSync(()=>{e.setOpen(!1,J(Ht,t.nativeEvent,t.currentTarget))}),Pr(n.current)?.focus()}function i(n){let r=e.select(`positionerElement`);if(r&&Fr(n,r))e.context.beforeContentFocusGuardRef.current?.focus();else{zi.flushSync(()=>{e.setOpen(!1,J(Ht,n.nativeEvent,n.currentTarget))});let i=Nr(e.context.triggerFocusTargetRef.current||t.current);for(;i!==null&&K(r,i);){let e=i;if(i=Ar(i),i===e)break}i?.focus()}}return{preFocusGuardRef:n,handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function $u(e){let[t,n]=b.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=b.useRef(null),i=b.useRef(null),a=b.useRef(null),o=b.useRef(null),s=b.useRef(!0),c=b.useRef(null),l=ii(),u=b.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:o,allowMouseUpTriggerRef:s,initialCursorPointRef:c,rootId:l}),[t,l]);return(0,Y.jsx)(xu.Provider,{value:u,children:(0,Y.jsx)(Tu.Provider,{value:void 0,children:(0,Y.jsx)(Ku,{...e})})})}var ed=500,td=b.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{setAnchor:o,actionsRef:s,internalBackdropRef:c,backdropRef:l,positionerRef:u,allowMouseUpTriggerRef:d,initialCursorPointRef:f,rootId:p}=Su(!1),{store:m}=Eu(!1),h=m.useState(`open`),g=m.useState(`disabled`),_=b.useRef(null),v=b.useRef(null),y=V(),x=V(),S=b.useRef(!1),C=b.useRef(null);function w(e,t,n){let r=n.type.startsWith(`touch`);f.current={x:e,y:t},o({getBoundingClientRect(){return DOMRect.fromRect({width:r?10:0,height:r?10:0,x:e,y:t})}}),S.current=!1,s.current?.setOpen(!0,J(kt,n)),x.start(ed,()=>{S.current=!0})}function T(e){if(g)return;d.current=!0,de(e),w(e.clientX,e.clientY,e.nativeEvent);let t=En(_.current);C.current?.abort();let n=new AbortController;C.current=n,t.addEventListener(`mouseup`,e=>{if(d.current=!1,!S.current)return;x.clear(),S.current=!1;let t=Ue(e);K(u.current,t)||p&&t&&Zu(t)===p||s.current?.setOpen(!1,J(Jt,e))},{once:!0,signal:n.signal})}function E(){y.clear(),v.current=null}function D(e){if(g){E();return}if(d.current=!1,e.touches.length!==1){E();return}e.stopPropagation();let t=e.touches[0],n={x:t.clientX,y:t.clientY};v.current=n,y.start(ed,()=>{w(n.x,n.y,e.nativeEvent)})}function O(e){if(e.touches.length!==1){E();return}if(y.isStarted()&&v.current){let t=e.touches[0],n=Math.abs(t.clientX-v.current.x),r=Math.abs(t.clientY-v.current.y);(n>10||r>10)&&E()}}return b.useEffect(()=>()=>{C.current?.abort()},[]),b.useEffect(()=>{function e(e){if(g)return;let t=Ue(e);(K(_.current,t)||K(c.current,t)||K(l.current,t))&&e.preventDefault()}return sn(En(_.current),`contextmenu`,e)},[l,g,c]),Di(`div`,e,{state:{open:h},ref:[_,t],props:[{onContextMenu:T,onTouchStart:D,onTouchMove:O,onTouchEnd:E,onTouchCancel:E,style:{WebkitTouchCallout:`none`}},a],stateAttributesMapping:ft})}),nd=Lu;function rd(e){let t=(0,b.useRef)(e);return(0,b.useInsertionEffect)(()=>void(t.current=e)),(0,b.useCallback)((...e)=>t.current(...e),[])}var id=(0,b.createContext)(void 0);function ad(){return(0,b.useContext)(id)}var od={position:`absolute`,top:0,bottom:0,textAlign:`center`,whiteSpace:`normal`,touchAction:`none`},sd={display:`contents`};function cd(){return null}var ld=`diffs-container`,ud=/(?=^From [a-f0-9]+ .+$)/m,dd=/(?=^diff --git)/gm,fd=/(?<=\n)/,pd=/^(---|\+\+\+)\s+([^\t\r\n]+)/,md=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,hd=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,gd=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,_d=`header-prefix`,vd=`header-filename-suffix`,yd=`header-metadata`,bd=`header-custom`,xd={dark:`pierre-dark`,light:`pierre-light`},Sd=`data-theme-css`,Cd=`data-unsafe-css`,wd=`data-diffs-scrollbar-measure`,Td=`--diffs-scrollbar-gutter-measured`,Ed=1e5,Dd={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...Dd});var Od=Object.freeze({fromStart:0,fromEnd:0}),kd={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Ad={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function jd(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}function Md({hunkIndex:e,lineIndex:t,conflictIndex:n}){return`merge-conflict-action-${e}-${t}-${n}`}function Nd(e,t){return e-(t===0?0:1)}function Pd(e,t){return Nd(e,t)+t}function Fd(e,t){let n=t.hunks[e.hunkIndex];if(n!=null)return{hunkIndex:e.hunkIndex,lineIndex:Id(n,e.startContentIndex)}}function Id(e,t){let n=e.unifiedLineStart;for(let r=0;r<t;r++){let t=e.hunkContent[r];n+=t.type===`context`?t.lines:t.deletions+t.additions}return n}function Ld({fileDiff:e,actions:t,renderCustomHeader:n,renderHeaderPrefix:r,renderHeaderFilenameSuffix:i,renderHeaderMetadata:a,renderAnnotation:o,renderGutterUtility:s,renderMergeConflictUtility:c,lineAnnotations:l,getHoveredLine:u,getInstance:d,getAnnotationSlotName:f=jd}){let p=n?.(e),m=r?.(e),h=i?.(e),g=a?.(e);return(0,Y.jsxs)(Y.Fragment,{children:[p==null?(0,Y.jsxs)(Y.Fragment,{children:[m!=null&&(0,Y.jsx)(`div`,{slot:`header-prefix`,children:m}),h!=null&&(0,Y.jsx)(`div`,{slot:`header-filename-suffix`,children:h}),g!=null&&(0,Y.jsx)(`div`,{slot:`header-metadata`,children:g})]}):(0,Y.jsx)(`div`,{slot:bd,children:p}),o!=null&&l?.map((e,t)=>(0,Y.jsx)(`div`,{slot:f(e),children:o(e)},t)),t!=null&&c!=null&&d!=null&&t.map(t=>{if(t==null)return;let n=Rd(t,e);return(0,Y.jsx)(`div`,{slot:n,style:sd,children:c(t,d)},n)}),s!=null&&(0,Y.jsx)(`div`,{slot:`gutter-utility-slot`,style:od,children:s(u)})]})}function Rd(e,t){let n=Fd(e,t);return n==null?void 0:Md({hunkIndex:n.hunkIndex,lineIndex:n.lineIndex,conflictIndex:e.conflictIndex})}var zd=new Map,Bd=new Map,Vd=new Map,Hd=new Set;function Ud(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!Hd.has(t))return!1;return!0}function Wd(e=xd){let t=[];return typeof e==`string`?t.push(e):(t.push(e.dark),t.push(e.light)),t}var Gd=new Set;function Kd(e){let t=[],n=new Set;for(let r of qd(e.themes)){let e=Xd(r)?r.getThemes():[r];for(let r of e){if(n.has(r.name))throw Error(`Theme collection already contains theme "${r.name}"`);n.add(r.name),t.push(r)}}let r=Object.freeze([...t]),i=Object.freeze(r.filter(e=>e.colorScheme===`light`)),a=Object.freeze(r.filter(e=>e.colorScheme===`dark`)),o=new Map(r.map(e=>[e.name,e])),s=Object.freeze(r.map(e=>e.name)),c=Object.freeze(i.map(e=>e.name)),l=Object.freeze(a.map(e=>e.name));function u(e){if(e==null)return r;let{colorScheme:t,collection:n}=e;return n==null?t===`light`?i:t===`dark`?a:r:r.filter(e=>e.collection===n?t==null||e.colorScheme===t:!1)}return{getTheme(e){return o.get(e)},getThemes(e){return u(e)},getThemeNames(e){return e?.collection==null?e?.colorScheme===`light`?c:e?.colorScheme===`dark`?l:s:u(e).map(e=>e.name)},hasTheme(e){return o.has(e)},orderBy(e){return Kd({themes:r.map((e,t)=>({descriptor:e,index:t})).sort((t,n)=>{let r=e(t.descriptor,n.descriptor);return r===0?t.index-n.index:r}).map(e=>e.descriptor)})},pick(e){let t=[],n=new Set;for(let r of e){if(n.has(r))throw Error(`Theme collection pick already includes theme "${r}"`);n.add(r);let e=o.get(r);if(e==null)throw Error(`Theme collection does not contain theme "${r}"`);t.push(e)}return Kd({themes:t})},registerInto(e){for(let t of r)e.registerThemeIfAbsent(t.name,t.load)}}}function qd(e){return Jd(e)?[e]:e}function Jd(e){return Xd(e)||Yd(e)}function Yd(e){return typeof e.name==`string`&&typeof e.load==`function`}function Xd(e){return typeof e.getThemes==`function`}function Zd(e){return typeof e==`object`&&e&&`default`in e?e.default:e}var Qd=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name=`DuplicateThemeError`}},$d=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name=`UnregisteredThemeError`}},ef=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name=`UnresolvedThemeError`}};function tf(){let e=new Map,t=new Map,n=new Map,r=0;function i(t,n){if(e.has(t))throw new Qd(t);e.set(t,n)}function a(t,n){return!e.has(t)&&(e.set(t,n),!0)}function o(t){return e.has(t)}function s(i){let a=t.get(i);if(a!==void 0)return Promise.resolve(a);let o=n.get(i);if(o!==void 0)return o;let s=e.get(i);if(s===void 0)return Promise.reject(new $d(i));let c=r,l=s().then(e=>{let a=Zd(e);return c===r&&t.set(i,a),n.get(i)===l&&n.delete(i),a}).catch(e=>{throw n.get(i)===l&&n.delete(i),e});return n.set(i,l),l}function c(e){return Promise.all(e.map(e=>s(e)))}function l(e,n){t.set(e,n)}function u(e){for(let[t,n]of e)l(t,n)}function d(e){return t.get(e)}function f(e){let n=[];for(let r of e){let e=t.get(r);if(e===void 0)throw new ef(r);n.push(e)}return n}function p(e){return t.has(e)}function m(e){for(let n of e)if(!t.has(n))return!1;return!0}function h(e){let n=t.get(e);return n===void 0?s(e):n}function g(){r++,t.clear(),n.clear()}return{clearResolvedThemes:g,getResolvedOrResolveTheme:h,getResolvedTheme:d,getResolvedThemes:f,hasRegisteredTheme:o,hasResolvedTheme:p,hasResolvedThemes:m,registerTheme:i,registerThemeIfAbsent:a,resolveTheme:s,resolveThemes:c,seedResolvedTheme:l,seedResolvedThemes:u}}var nf=tf();function rf(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let e;if(typeof n==`string`){if(e=nf.getResolvedTheme(n),e==null)throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,nf.getResolvedTheme(n)??nf.seedResolvedTheme(n,e);Gd.has(n)||(Gd.add(n),t.loadThemeSync(e))}}function af(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(Hd.has(n.name))continue;let e=zd.get(n.name);e??(e=n,zd.set(n.name,e)),Hd.add(e.name),t.loadLanguageSync(e.data)}}function of(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var sf=Object.defineProperty,cf=Object.getOwnPropertyDescriptor,lf=Object.getOwnPropertyNames,uf=Object.prototype.hasOwnProperty,df=(e,t)=>{let n={};for(var r in e)sf(n,r,{get:e[r],enumerable:!0});return t||sf(n,Symbol.toStringTag,{value:`Module`}),n},ff=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=lf(t),a=0,o=i.length,s;a<o;a++)s=i[a],!uf.call(e,s)&&s!==n&&sf(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=cf(t,s))||r.enumerable});return e},pf=(e,t,n)=>(ff(e,t,`default`),n&&ff(n,t,`default`)),mf=`modulepreload`,hf=function(e){return`/`+e},gf={},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}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=hf(t,n),t=s(t),t in gf)return;gf[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:mf,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}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)})},_f=[{id:`abap`,name:`ABAP`,import:(()=>Z(()=>import(`./abap-CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>Z(()=>import(`./actionscript-3-Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>Z(()=>import(`./ada-C5qYipkI.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>Z(()=>import(`./ahk-CA9gdOdF.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>Z(()=>import(`./ahk2-_6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>Z(()=>import(`./angular-html-ezhpupwN.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>Z(()=>import(`./angular-ts-DGkBU2Ac.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>Z(()=>import(`./apache-U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>Z(()=>import(`./apex-KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>Z(()=>import(`./apl-CUGT4nIi.js`),__vite__mapDeps([6,2,3,1,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>Z(()=>import(`./applescript-CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>Z(()=>import(`./ara-4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>Z(()=>import(`./asciidoc-SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>Z(()=>import(`./asm-Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>Z(()=>import(`./astro-C6f9OliD.js`),__vite__mapDeps([10,2,3,9,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>Z(()=>import(`./awk-BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>Z(()=>import(`./ballerina-B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>Z(()=>import(`./bat-qdxAdBWQ.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>Z(()=>import(`./beancount-D-usSTwE.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>Z(()=>import(`./berry-DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>Z(()=>import(`./bibtex-Ci_nEsc7.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>Z(()=>import(`./bicep-CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>Z(()=>import(`./bird2-CYIUgYqB.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>Z(()=>import(`./blade-71nbYGOJ.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>Z(()=>import(`./bsl-_VjlB9mv.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>Z(()=>import(`./c-Bpp83vUT.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>Z(()=>import(`./c3-D0apG41V.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>Z(()=>import(`./cadence-CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>Z(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([19,20])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>Z(()=>import(`./chapel-ASdwSMh4.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>Z(()=>import(`./clarity-CtfBBspg.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>Z(()=>import(`./clojure-DqKBuwfJ.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>Z(()=>import(`./cmake-Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>Z(()=>import(`./cobol-DNxuGELk.js`),__vite__mapDeps([23,1,2,3,8])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>Z(()=>import(`./codeowners-C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>Z(()=>import(`./codeql-oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>Z(()=>import(`./coffee-CTyXBUCJ.js`),__vite__mapDeps([24,2])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>Z(()=>import(`./common-lisp-Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>Z(()=>import(`./coq-DuBRPxYg.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>Z(()=>import(`./cpp-CzJZfqV4.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22])))},{id:`crystal`,name:`Crystal`,import:(()=>Z(()=>import(`./crystal-BfqQdHxV.js`),__vite__mapDeps([28,2,3,1,16,22,29])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>Z(()=>import(`./csharp-oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>Z(()=>import(`./css-DlfMUpGK.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>Z(()=>import(`./csv-Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>Z(()=>import(`./cue-CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>Z(()=>import(`./cypher-ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>Z(()=>import(`./d-qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>Z(()=>import(`./dart-CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>Z(()=>import(`./dax-BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>Z(()=>import(`./desktop-Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>Z(()=>import(`./diff-woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>Z(()=>import(`./docker-IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>Z(()=>import(`./dotenv-_5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>Z(()=>import(`./dream-maker-DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>Z(()=>import(`./edge-ZaCA-9tU.js`),__vite__mapDeps([30,1,2,3,11,15])))},{id:`elixir`,name:`Elixir`,import:(()=>Z(()=>import(`./elixir-GeIrO3JP.js`),__vite__mapDeps([31,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>Z(()=>import(`./elm-BetcOCtl.js`),__vite__mapDeps([32,27,22])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>Z(()=>import(`./emacs-lisp-c_oH4hRZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>Z(()=>import(`./erb-Dru309ol.js`),__vite__mapDeps([33,1,2,3,34,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>Z(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>Z(()=>import(`./fennel-DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>Z(()=>import(`./fish-BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>Z(()=>import(`./fluent-C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>Z(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>Z(()=>import(`./fortran-free-form-CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>Z(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>Z(()=>import(`./gdresource-xMC7jr7x.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>Z(()=>import(`./gdscript-DYvRD3hg.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>Z(()=>import(`./gdshader-CBce3t8t.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>Z(()=>import(`./genie-CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>Z(()=>import(`./gherkin-DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>Z(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>Z(()=>import(`./git-rebase-DJIWyVXc.js`),__vite__mapDeps([50,29])))},{id:`gleam`,name:`Gleam`,import:(()=>Z(()=>import(`./gleam-CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>Z(()=>import(`./glimmer-js-DIqXjYAY.js`),__vite__mapDeps([51,2,3,1,11])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>Z(()=>import(`./glimmer-ts-pnunO5g0.js`),__vite__mapDeps([52,2,3,1,11])))},{id:`glsl`,name:`GLSL`,import:(()=>Z(()=>import(`./glsl-DWspuWDC.js`).then(e=>e.n),__vite__mapDeps([27,22])))},{id:`gn`,name:`GN`,import:(()=>Z(()=>import(`./gn-ilITqXS6.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>Z(()=>import(`./gnuplot-7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>Z(()=>import(`./go-rLFTqkRN.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>Z(()=>import(`./graphql-DjZ79Z4P.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37])))},{id:`groovy`,name:`Groovy`,import:(()=>Z(()=>import(`./groovy-CacY0gHj.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>Z(()=>import(`./hack-iafWRwwB.js`),__vite__mapDeps([53,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>Z(()=>import(`./haml-o-Lgpxml.js`).then(e=>e.n),__vite__mapDeps([35,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>Z(()=>import(`./handlebars-C8OUH7g6.js`),__vite__mapDeps([54,2,3,1,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>Z(()=>import(`./haskell-D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>Z(()=>import(`./haxe-C8oCnwJJ.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>Z(()=>import(`./hcl-Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>Z(()=>import(`./hjson-CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>Z(()=>import(`./hlsl-Cvrh5tZx.js`),[]))},{id:`html`,name:`HTML`,import:(()=>Z(()=>import(`./html-CJzu28V2.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>Z(()=>import(`./html-derivative-Cb8okpVc.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>Z(()=>import(`./http-ttaoWHS4.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37])))},{id:`hurl`,name:`Hurl`,import:(()=>Z(()=>import(`./hurl-DzAr45rI.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37])))},{id:`hxml`,name:`HXML`,import:(()=>Z(()=>import(`./hxml-Dcm88srW.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>Z(()=>import(`./hy-CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>Z(()=>import(`./imba-DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>Z(()=>import(`./ini-B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>Z(()=>import(`./java-B9M8FiDh.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>Z(()=>import(`./javascript-DsgDiit9.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>Z(()=>import(`./jinja-BpB_f_L5.js`),__vite__mapDeps([60,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>Z(()=>import(`./jison-BBboHJLm.js`),__vite__mapDeps([61,2])))},{id:`json`,name:`JSON`,import:(()=>Z(()=>import(`./json-CjLBqelG.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>Z(()=>import(`./json5-BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>Z(()=>import(`./jsonc-CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>Z(()=>import(`./jsonl-CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>Z(()=>import(`./jsonnet-CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>Z(()=>import(`./jssm-DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>Z(()=>import(`./jsx-B86puyK5.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>Z(()=>import(`./julia-Dx4irgay.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>Z(()=>import(`./just-BaU8BkWf.js`),__vite__mapDeps([64,2,11,20,29,34,3,1,7,8,16,22,25,26,27,35,36,13,37,38,39,65])))},{id:`kdl`,name:`KDL`,import:(()=>Z(()=>import(`./kdl-CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>Z(()=>import(`./kotlin-DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>Z(()=>import(`./kusto-C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>Z(()=>import(`./latex-OCFtPaVb.js`),__vite__mapDeps([66,67,63])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>Z(()=>import(`./lean-CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>Z(()=>import(`./less-DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>Z(()=>import(`./liquid-B-HSosSR.js`),__vite__mapDeps([68,2,3,1,9])))},{id:`llvm`,name:`LLVM IR`,import:(()=>Z(()=>import(`./llvm-DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>Z(()=>import(`./log-BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>Z(()=>import(`./logo-Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>Z(()=>import(`./lua-DmtpgLJe.js`).then(e=>e.n),__vite__mapDeps([38,22])))},{id:`luau`,name:`Luau`,import:(()=>Z(()=>import(`./luau-C2pBCSgt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>Z(()=>import(`./make-Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>Z(()=>import(`./markdown-BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>Z(()=>import(`./marko-DLvj6HlY.js`),__vite__mapDeps([69,3,5,11,70])))},{id:`matlab`,name:`MATLAB`,import:(()=>Z(()=>import(`./matlab-D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>Z(()=>import(`./mdc-CLlpDeEH.js`),__vite__mapDeps([71,15,1,2,3,39,41])))},{id:`mdx`,name:`MDX`,import:(()=>Z(()=>import(`./mdx-DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>Z(()=>import(`./mermaid-BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>Z(()=>import(`./mipsasm-BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>Z(()=>import(`./mojo-fg40_ntQ.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>Z(()=>import(`./moonbit-DgjMoLWr.js`),[]))},{id:`move`,name:`Move`,import:(()=>Z(()=>import(`./move-BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>Z(()=>import(`./narrat-_X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>Z(()=>import(`./nextflow-BJtWHP5T.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>Z(()=>import(`./nextflow-groovy-DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>Z(()=>import(`./nginx-B6eJiJtn.js`),__vite__mapDeps([74,38,22])))},{id:`nim`,name:`Nim`,import:(()=>Z(()=>import(`./nim-BjTTIyjo.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41])))},{id:`nix`,name:`Nix`,import:(()=>Z(()=>import(`./nix-IvuFDN5E.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>Z(()=>import(`./nsis-CjNLYCLg.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>Z(()=>import(`./nushell-DHYfO66s.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>Z(()=>import(`./objective-c-D1A_Heim.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>Z(()=>import(`./objective-cpp-BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>Z(()=>import(`./ocaml-O90oeIOV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>Z(()=>import(`./odin-B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>Z(()=>import(`./openscad-BUDT5pXO.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>Z(()=>import(`./org-BbxkHpL7.js`),__vite__mapDeps([76,2,3,1,5,8,7,9,11,13,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,48,50,81,82,83,63,65,66,67,70,84,75,85,86,87,88,89,90,91,92,93])))},{id:`pascal`,name:`Pascal`,import:(()=>Z(()=>import(`./pascal-4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>Z(()=>import(`./perl-7YBielDt.js`),__vite__mapDeps([65,2,3,1,7,8,16])))},{id:`php`,name:`PHP`,import:(()=>Z(()=>import(`./php--KPClthN.js`),__vite__mapDeps([87,2,3,1,7,8,9,16])))},{id:`pkl`,name:`Pkl`,import:(()=>Z(()=>import(`./pkl-ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>Z(()=>import(`./plsql-DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>Z(()=>import(`./po-BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>Z(()=>import(`./polar-C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>Z(()=>import(`./postcss-BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>Z(()=>import(`./powerquery-DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>Z(()=>import(`./powershell-CCSX75yM.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>Z(()=>import(`./prisma-DMgNhnYS.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>Z(()=>import(`./prolog-iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>Z(()=>import(`./proto-DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>Z(()=>import(`./pug-C7XMl1L8.js`),__vite__mapDeps([94,2,3,1])))},{id:`puppet`,name:`Puppet`,import:(()=>Z(()=>import(`./puppet-CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>Z(()=>import(`./purescript-9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>Z(()=>import(`./python-gzcpVVnB.js`),[]))},{id:`qml`,name:`QML`,import:(()=>Z(()=>import(`./qml-CN9HGHWl.js`),__vite__mapDeps([95,2])))},{id:`qmldir`,name:`QML Directory`,import:(()=>Z(()=>import(`./qmldir-DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>Z(()=>import(`./qss-Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>Z(()=>import(`./r-BR7Z2WHy.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>Z(()=>import(`./racket-DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>Z(()=>import(`./raku-B3gFvitq.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>Z(()=>import(`./razor-C6ePkXhR.js`),__vite__mapDeps([96,1,2,3,78])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>Z(()=>import(`./rbs-C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>Z(()=>import(`./reg-CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>Z(()=>import(`./regexp-4j9D_ZJm.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>Z(()=>import(`./rel-BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>Z(()=>import(`./riscv-Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>Z(()=>import(`./ron-VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>Z(()=>import(`./rosmsg-CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>Z(()=>import(`./rst-DnVZxVCG.js`),__vite__mapDeps([97,2,15,1,3,20,98,25,26,27,22,29,39,34,7,8,16,35,36,11,13,37,38])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>Z(()=>import(`./ruby-CcELT3hw.js`),__vite__mapDeps([34,2,3,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>Z(()=>import(`./rust-Cfkwpbl8.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>Z(()=>import(`./sas-C0OZEEpB.js`),__vite__mapDeps([99,16])))},{id:`sass`,name:`Sass`,import:(()=>Z(()=>import(`./sass-DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>Z(()=>import(`./scala-BiFt_7mu.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>Z(()=>import(`./scheme-DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>Z(()=>import(`./scss-CsORv0BP.js`).then(e=>e.n),__vite__mapDeps([5,3])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>Z(()=>import(`./sdbl-bTVj8UrX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>Z(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([100,101])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>Z(()=>import(`./shellscript-BTztjGqL.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>Z(()=>import(`./shellsession-Cl0t6nbx.js`),__vite__mapDeps([102,29])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>Z(()=>import(`./smalltalk-BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>Z(()=>import(`./smithy-Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>Z(()=>import(`./solidity-Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>Z(()=>import(`./soy-Dlpwi8rU.js`),__vite__mapDeps([103,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>Z(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([104,105])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>Z(()=>import(`./splunk-BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>Z(()=>import(`./sql-Dea5cDqJ.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>Z(()=>import(`./ssh-config-BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>Z(()=>import(`./stata-CI6WIEjb.js`),__vite__mapDeps([106,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>Z(()=>import(`./stylus-B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>Z(()=>import(`./surrealql-CMQ8lmEG.js`),__vite__mapDeps([107,2])))},{id:`svelte`,name:`Svelte`,import:(()=>Z(()=>import(`./svelte-CL7YYnWK.js`),__vite__mapDeps([108,2,3,11,12])))},{id:`swift`,name:`Swift`,import:(()=>Z(()=>import(`./swift-CyEgAFGc.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>Z(()=>import(`./system-verilog-Dh5ihWbf.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>Z(()=>import(`./systemd-BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>Z(()=>import(`./talonscript-CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>Z(()=>import(`./tasl-DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>Z(()=>import(`./tcl-CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>Z(()=>import(`./templ-BeZbGaJP.js`),__vite__mapDeps([109,2,3,81])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>Z(()=>import(`./terraform-DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>Z(()=>import(`./tex-BSS8Q45r.js`).then(e=>e.n),__vite__mapDeps([67,63])))},{id:`toml`,name:`TOML`,import:(()=>Z(()=>import(`./toml-CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>Z(()=>import(`./ts-tags-BBdnNf-a.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22])))},{id:`tsv`,name:`TSV`,import:(()=>Z(()=>import(`./tsv-sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>Z(()=>import(`./tsx-c1m_nKLG.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>Z(()=>import(`./turtle-ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>Z(()=>import(`./twig-psqnv4mB.js`),__vite__mapDeps([111,2,3,5,20,34,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39,87,9])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>Z(()=>import(`./typescript-ByR3P8c1.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>Z(()=>import(`./typespec-BRdr0IET.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>Z(()=>import(`./typst-Dg-RDIXz.js`),__vite__mapDeps([112,2,3,1,5,8,7,9,11,13,113,114,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,44,48,50,81,82,54,83,115,63,62,65,66,67,70,116,84,85,87,88,89,90,91,93,117,94,118,119,111,120])))},{id:`v`,name:`V`,import:(()=>Z(()=>import(`./v-DBj4K9d_.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>Z(()=>import(`./vala-zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>Z(()=>import(`./vb-DOwzaHZ0.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>Z(()=>import(`./verilog-B2gwz-sJ.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>Z(()=>import(`./vhdl-BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>Z(()=>import(`./viml-DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>Z(()=>import(`./vue-DbsvoIfv.js`),__vite__mapDeps([121,2,3,1,9,11,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>Z(()=>import(`./vue-html-n7sDnKkW.js`),__vite__mapDeps([122,2])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>Z(()=>import(`./vue-vine-CUhVSAxO.js`),__vite__mapDeps([123,2,3,5,12,70,124])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>Z(()=>import(`./vyper-CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>Z(()=>import(`./wasm-ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>Z(()=>import(`./wenyan-C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>Z(()=>import(`./wgsl-BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>Z(()=>import(`./wikitext-ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>Z(()=>import(`./wit-DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>Z(()=>import(`./wolfram-DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>Z(()=>import(`./xml-mUdjR8gR.js`).then(e=>e.n),__vite__mapDeps([7,8])))},{id:`xsl`,name:`XSL`,import:(()=>Z(()=>import(`./xsl-vKBVy2ER.js`),__vite__mapDeps([93,7,8])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>Z(()=>import(`./yaml-BGDRkaBQ.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>Z(()=>import(`./zenscript-BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>Z(()=>import(`./zig-CMLA9XwU.js`),[]))}],vf=Object.fromEntries(_f.map(e=>[e.id,e.import])),yf=Object.fromEntries(_f.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),bf={...vf,...yf},xf=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>Z(()=>import(`./andromeeda-vGVdxbeo.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>Z(()=>import(`./aurora-x-CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>Z(()=>import(`./ayu-dark-DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>Z(()=>import(`./ayu-light-C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>Z(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>Z(()=>import(`./catppuccin-frappe-C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>Z(()=>import(`./catppuccin-latte-CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>Z(()=>import(`./catppuccin-macchiato-R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>Z(()=>import(`./catppuccin-mocha-DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>Z(()=>import(`./dark-plus-Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>Z(()=>import(`./dracula-BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>Z(()=>import(`./dracula-soft-5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>Z(()=>import(`./everforest-dark-sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>Z(()=>import(`./everforest-light-Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-default-DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>Z(()=>import(`./github-light-EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>Z(()=>import(`./github-light-default-BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>Z(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>Z(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>Z(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>Z(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>Z(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>Z(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>Z(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>Z(()=>import(`./horizon-CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>Z(()=>import(`./horizon-bright-DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>Z(()=>import(`./houston-CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>Z(()=>import(`./kanagawa-dragon-Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>Z(()=>import(`./kanagawa-lotus-BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>Z(()=>import(`./kanagawa-wave-BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>Z(()=>import(`./laserwave-C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>Z(()=>import(`./light-plus-DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-Bm3Qr25_.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-darker-2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>Z(()=>import(`./material-theme-lighter-uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>Z(()=>import(`./min-dark-BSWPekZh.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>Z(()=>import(`./min-light-DDpmG2fV.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>Z(()=>import(`./monokai-B_bV9PQ9.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>Z(()=>import(`./night-owl-DhmEMT88.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>Z(()=>import(`./night-owl-light-eJ-hLW7d.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>Z(()=>import(`./nord-Cb4Vim4T.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>Z(()=>import(`./one-dark-pro-CLwyXe_n.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>Z(()=>import(`./one-light-D7Lr4KcI.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>Z(()=>import(`./plastic-DQwYfKfQ.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>Z(()=>import(`./poimandres-DRFjx7u4.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>Z(()=>import(`./red-DX1BQOs8.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>Z(()=>import(`./rose-pine-aMsaMD1D.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>Z(()=>import(`./rose-pine-dawn-8PwUyIlP.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>Z(()=>import(`./rose-pine-moon-DO-qXg-I.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>Z(()=>import(`./slack-dark-DnToyrRv.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>Z(()=>import(`./slack-ochin-B2OO5cIa.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>Z(()=>import(`./snazzy-light-4G7pJPwS.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>Z(()=>import(`./solarized-dark-UdsmMDCL.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>Z(()=>import(`./solarized-light-C1IUL_tW.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>Z(()=>import(`./synthwave-84-nFMaYfgc.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>Z(()=>import(`./tokyo-night-oM2G3aXe.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>Z(()=>import(`./vesper-DdrHHSXu.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>Z(()=>import(`./vitesse-black-fwtXNY1n.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>Z(()=>import(`./vitesse-dark-BZCL-v6S.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>Z(()=>import(`./vitesse-light-VbXTXTou.js`),[]))}].map(e=>[e.id,e.import])),Sf=s({createOnigurumaEngine:()=>Xf,getDefaultWasmLoader:()=>Yf,loadWasm:()=>Uf,setDefaultWasmLoader:()=>Jf}),Cf=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function wf(){return 2147483648}function Tf(){return typeof performance<`u`?performance.now():Date.now()}var Ef=(e,t)=>e+(t-e%t)%t;async function Df(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=wf();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,Ef(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:Tf,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 Of=Object.defineProperty,kf=(e,t,n)=>t in e?Of(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Af=(e,t,n)=>kf(e,typeof t==`symbol`?t:t+``,n),jf=null;function Mf(e){throw new Cf(e.UTF8ToString(e.getLastOnigError()))}var Nf=class e{constructor(t){Af(this,`utf16Length`),Af(this,`utf8Length`),Af(this,`utf16Value`),Af(this,`utf8Value`),Af(this,`utf16OffsetToUtf8`),Af(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Pf=class e{constructor(t){if(Af(this,`id`,++e.LAST_ID),Af(this,`_onigBinding`),Af(this,`content`),Af(this,`utf16Length`),Af(this,`utf8Length`),Af(this,`utf16OffsetToUtf8`),Af(this,`utf8OffsetToUtf16`),Af(this,`ptr`),!jf)throw new Cf(`Must invoke loadWasm first.`);this._onigBinding=jf,this.content=t;let n=new Nf(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=jf.omalloc(1e4),e._sharedPtrInUse=!0,jf.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(jf)}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)}};Af(Pf,`LAST_ID`,0),Af(Pf,`_sharedPtr`,0),Af(Pf,`_sharedPtrInUse`,!1);var Ff=Pf,If=class{constructor(e){if(Af(this,`_onigBinding`),Af(this,`_ptr`),!jf)throw new Cf(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Nf(e[r]);t[r]=i.createString(jf),n[r]=i.utf8Length}let r=jf.omalloc(4*e.length);jf.HEAPU32.set(t,r/4);let i=jf.omalloc(4*e.length);jf.HEAPU32.set(n,i/4);let a=jf.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)jf.ofree(t[n]);jf.ofree(i),jf.ofree(r),a===0&&Mf(jf),this._onigBinding=jf,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 Ff(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 Lf(e){return typeof e.instantiator==`function`}function Rf(e){return typeof e.default==`function`}function zf(e){return e.data!==void 0}function Bf(e){return typeof Response<`u`&&e instanceof Response}function Vf(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 Hf;function Uf(e){if(Hf)return Hf;async function t(){jf=await Df(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Lf(n)?n=await n.instantiator(t):Rf(n)?n=await n.default(t):(zf(n)&&(n=n.data),Bf(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Gf(n)(t):await Kf(n)(t):Vf(n)||n instanceof WebAssembly.Module?n=await Wf(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Wf(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Hf=t(),Hf}function Wf(e){return t=>WebAssembly.instantiate(e,t)}function Gf(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Kf(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var qf;function Jf(e){qf=e}function Yf(){return qf}async function Xf(e){return e&&await Uf(e),{createScanner(e){return new If(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Ff(e)}}}var Zf=df({});pf(Zf,Sf);var Qf=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function $f(e){return ep(e)}function ep(e){return Array.isArray(e)?tp(e):e instanceof RegExp?e:typeof e==`object`?np(e):e}function tp(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=ep(e[n]);return t}function np(e){let t={};for(let n in e)t[n]=ep(e[n]);return t}function rp(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function ip(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?ip(e.substring(0,e.length-1)):e.substr(~t+1)}var ap=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,op=class{static hasCaptures(e){return e!==null&&(ap.lastIndex=0,ap.test(e))}static replaceCaptures(e,t,n){return e.replace(ap,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function sp(e,t){return e<t?-1:+(e>t)}function cp(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=sp(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function lp(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function up(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var dp=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},fp=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(_p(e),t)}static createFromParsedTheme(e,t){return bp(e,t)}_cachedMatchRoot=new dp(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>mp(e.parent,t.parentScopes));return n?new gp(n.fontStyle,n.foreground,n.background):null}},pp=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function mp(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!hp(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function hp(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var gp=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function _p(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&lp(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&lp(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new vp(l,u,e,o,s,c)}}return n}var vp=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},yp=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(yp||{});function bp(e,t){e.sort((e,t)=>{let n=sp(e.scope,t.scope);return n!==0||(n=cp(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new xp(t),o=new gp(n,a.getId(r),a.getId(i)),s=new wp(new Cp(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new fp(a,o,s)}var xp=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Sp=Object.freeze([]),Cp=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Sp,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},wp=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),Cp.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(cp(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Cp(e,t,n,r,i))}},Tp=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Dp(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function Ep(e){return e}function Dp(e){return e}function Op(e,t){let n=[],r=Ap(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(kp(i)){let e=[];do e.push(i),i=r.next();while(kp(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function kp(e){return!!e&&!!e.match(/[\w\.:]+/)}function Ap(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function jp(e){typeof e.dispose==`function`&&e.dispose()}var Mp=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Np=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Pp=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Fp=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Mp(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Pp;for(let n of e)Ip(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Mp){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function Ip(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof Mp?Rp({baseGrammar:a,selfGrammar:i},r):Lp(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new Mp(e))}function Lp(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];zp([r],t,n)}}function Rp(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&zp(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&zp(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function zp(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?rp({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&zp(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Gp(i);switch(a.kind){case 0:Rp({...t,selfGrammar:t.baseGrammar},n);break;case 1:Rp(t,n);break;case 2:Lp(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?Lp(a.ruleName,i,n):Rp(i,n)}else a.kind===4?n.add(new Np(a.scopeName,a.ruleName)):n.add(new Mp(a.scopeName))}}}var Bp=class{kind=0},Vp=class{kind=1},Hp=class{constructor(e){this.ruleName=e}kind=2},Up=class{constructor(e){this.scopeName=e}kind=3},Wp=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Gp(e){if(e===`$base`)return new Bp;if(e===`$self`)return new Vp;let t=e.indexOf(`#`);return t===-1?new Up(e):t===0?new Hp(e.substring(1)):new Wp(e.substring(0,t),e.substring(t+1))}var Kp=/\\(\d+)/,qp=/\\(\d+)/g,Jp=-1,Yp=-2;function Xp(e){return e}function Zp(e){return e}var Qp=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=op.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=op.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${ip(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:op.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:op.replaceCaptures(this._contentName,e,t)}},$p=class extends Qp{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},em=class extends Qp{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new am(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new om,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},tm=class extends Qp{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new om,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},nm=class extends Qp{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new am(i,this.id),this.beginCaptures=a,this._end=new am(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new om;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},rm=class extends Qp{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new am(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new am(o,Yp),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new om;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new om,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},im=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new $p(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new em(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=rp({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new tm(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new rm(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new nm(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Gp(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof tm||e instanceof nm||e instanceof rm)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},am=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&Kp.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return qp.lastIndex=0,this.source.replace(qp,(e,t)=>up(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},om=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new sm(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new sm(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},sm=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
10
|
+
`).replace($f,``)}function tp(e,t){return t=ep(t),ep(e)===t}function np(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||en(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&en(e,``+r);else return;break;case`className`:Bt(e,`class`,r);break;case`tabIndex`:Bt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Bt(e,n,r);break;case`style`:nn(e,r,o);return;case`data`:if(t!==`object`){Bt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=sn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&np(e,t,`name`,a.name,a,null),np(e,t,`formEncType`,a.formEncType,a,null),np(e,t,`formMethod`,a.formMethod,a,null),np(e,t,`formTarget`,a.formTarget,a,null)):(np(e,t,`encType`,a.encType,a,null),np(e,t,`method`,a.method,a,null),np(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=sn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=cn);return;case`onScroll`:r!=null&&Hf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Hf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=sn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Hf(`beforetoggle`,e),Hf(`toggle`,e),zt(e,`popover`,r);break;case`xlinkActuate`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:zt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=an.get(n)||n,zt(e,n,r);else return}Lt=!0}function rp(e,t,n,r,a,o){switch(n){case`style`:nn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)en(e,r);else if(typeof r==`number`||typeof r==`bigint`)en(e,``+r);else return;break;case`onScroll`:r!=null&&Hf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Hf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=cn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!At.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[ht]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Lt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):zt(e,n,r)}return}Lt=!0}function ip(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Hf(`error`,e),Hf(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:np(e,t,o,s,n,null)}}a&&np(e,t,`srcSet`,n.srcSet,n,null),r&&np(e,t,`src`,n.src,n,null);return;case`input`:Hf(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:np(e,t,r,d,n,null)}}Xt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Hf(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:np(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Qt(e,!!r,n,!0):Qt(e,!!r,t,!1);return;case`textarea`:for(s in Hf(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:np(e,t,s,c,n,null)}J(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:np(e,t,l,r,n,null)}return;case`dialog`:Hf(`beforetoggle`,e),Hf(`toggle`,e),Hf(`cancel`,e),Hf(`close`,e);break;case`iframe`:case`object`:Hf(`load`,e);break;case`video`:case`audio`:for(r=0;r<zf.length;r++)Hf(zf[r],e);break;case`image`:Hf(`error`,e),Hf(`load`,e);break;case`details`:Hf(`toggle`,e);break;case`embed`:case`source`:case`link`:Hf(`error`,e),Hf(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:np(e,t,u,r,n,null)}return;default:if(rn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&rp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&np(e,t,c,r,n,null))}var ap={};function op(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||np(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Lt=!0),o=m;break;case`name`:m!==f&&(Lt=!0),a=m;break;case`checked`:m!==f&&(Lt=!0),u=m;break;case`defaultChecked`:m!==f&&(Lt=!0),d=m;break;case`value`:m!==f&&(Lt=!0),s=m;break;case`defaultValue`:m!==f&&(Lt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&np(e,t,p,m,r,f)}}Yt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||np(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Lt=!0),p=o;break;case`defaultValue`:o!==l&&(Lt=!0),c=o;break;case`multiple`:o!==l&&(Lt=!0),s=o;default:o!==l&&np(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Qt(e,!!n,n?[]:``,!1):Qt(e,!!n,t,!0)):Qt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:np(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Lt=!0),p=a;break;case`defaultValue`:a!==o&&(Lt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&np(e,t,s,a,r,o)}$t(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:np(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Lt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:np(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&np(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:np(e,t,u,p,r,m)}return;default:if(rn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&rp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||rp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&np(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||np(e,t,f,p,r,m)}function sp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function cp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&sp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&sp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var lp=null,up=null;function dp(e){return e.nodeType===9?e:e.ownerDocument}function fp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function pp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function mp(e,t,n,r){return n=dp(n).createElement(e),n[mt]=r,n[ht]=t,ip(n,e,t),Dt(n),n}function hp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var gp=null;function _p(){var e=window.event;return e&&e.type===`popstate`?e!==gp&&(gp=e,!0):(gp=null,!1)}var vp=typeof setTimeout==`function`?setTimeout:void 0,yp=typeof clearTimeout==`function`?clearTimeout:void 0,bp=typeof Promise==`function`?Promise:void 0,xp=typeof requestAnimationFrame==`function`?requestAnimationFrame:vp,Sp=typeof queueMicrotask==`function`?queueMicrotask:bp===void 0?vp:function(e){return bp.resolve(null).then(e).catch(Cp)};function Cp(e){setTimeout(function(){throw e})}function wp(e){return e===`head`}function Tp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Uh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)ym(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,ym(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[bt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&ym(e.ownerDocument.body)}n=i}while(n);Uh(t)}function Ep(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Dp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Op(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function kp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Ap(e){return kp(e.getBoundingClientRect(),getComputedStyle(e),e)}function jp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return kp(t,n,e)}function Mp(e){return e.documentElement.clientHeight}function Np(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Pp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Mp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Qm(f),u>th){s.length=o;break}f=new Promise(Np.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Fp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Fp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Fp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Fp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Ip(e){return{name:e,group:new Fp(`group`,e),imagePair:new Fp(`image-pair`,e),old:new Fp(`old`,e),new:new Fp(`new`,e)}}function Lp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Lp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Hp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Bp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,Rp,e,s,r)}this._eventListeners=a}};function Rp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Lp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Hp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Bp(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,zp,e,n,i),r.splice(t,1),a!==null&&a()}};function zp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Bp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Vp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Hp(e,t,n,r){if(e.length===0)return-1;r=Vp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Vp(a.optionsOrUseCapture)===r)return i}return-1}Lp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Bp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Bp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Lp.prototype.focus=function(e){m(this._fragmentFiber.child,!0,Up,e,void 0,void 0)};function Up(e,t){return e.tag!==6&&(e=b(e),hm(e,t))}Lp.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,Wp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Up(t[n],e);n--);};function Wp(e,t){return t.push(e),!1}Lp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=dp(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,Gp,e,void 0,void 0))};function Gp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Lp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,Kp,e,void 0,void 0)};function Kp(e,t){return e.tag!==6&&(e=b(e),t.observe(e),!1)}Lp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,qp,e,void 0,void 0);for(var n=t=0;n<Jp.length;n++){var r=Jp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Jp[t++]=r}Jp.length=t}};function qp(e,t){return e.tag!==6&&(e=b(e),t.unobserve(e),!1)}var Jp=[],Yp=!1;function Xp(e,t,n){Jp.push({fragmentInstance:e,observer:t,instance:n}),Yp||(Yp=!0,gm(function(){Yp=!1;var e=Jp;Jp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Lp.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,Zp,e,void 0,void 0),e};function Zp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Lp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Lp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,Wp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Qp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Qp(e,t,n,r,i){var a=Ct(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(m(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(m(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function $p(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Lp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,Wp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),$p(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),$p(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function em(e,t){return e=b(e),tm(e,t),!1}function tm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function nm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Jp.length;i++){var a=Jp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Jp[r++]=a)}Jp.length=r,n.observe(e)}),tm(e,t))}function rm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Xp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function im(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:im(n),St(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function am(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[bt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=dm(e.nextSibling),e===null)break}return null}function om(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=dm(e.nextSibling),e===null))return null;return e}function sm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=dm(e.nextSibling),e===null))return null;return e}function cm(e){return e.data===`$?`||e.data===`$~`}function lm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function um(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function dm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var fm=null;function pm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return dm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function hm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function gm(e){xp(function(){xp(function(t){return e(t)})})}function _m(e,t,n){switch(t=dp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function vm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&np(e,t,r,null,ap,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===cn&&(e.onclick=null),St(e)}function ym(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);St(e)}var bm=new Map,xm=new Set;function Sm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Cm=oe.d;oe.d={f:wm,r:Tm,D:Om,C:km,L:Am,m:jm,X:Nm,S:Mm,M:Pm};function wm(){var e=Cm.f(),t=zd();return e||t}function Tm(e){var t=wt(e);t!==null&&t.tag===5&&t.type===`form`?Ys(t):Cm.r(e)}var Em=typeof document>`u`?null:document;function Dm(e,t,n){var r=Em;if(r&&typeof t==`string`&&t){var i=Jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),xm.has(i)||(xm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),ip(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Om(e){Cm.D(e),Dm(`dns-prefetch`,e,null)}function km(e,t){Cm.C(e,t),Dm(`preconnect`,e,t)}function Am(e,t,n){Cm.L(e,t,n);var r=Em;if(r&&e&&t){var i=`link[rel="preload"][as="`+Jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Jt(n.imageSizes)+`"]`)):i+=`[href="`+Jt(e)+`"]`;var a=i;switch(t){case`style`:a=Im(e);break;case`script`:a=Bm(e)}if(!(bm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),bm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Lm(a))||t===`script`&&r.querySelector(Vm(a))))){var o=r.createElement(`link`);ip(o,`link`,e),t===`style`&&(o[xt]=!0,o.onload=o.onerror=function(){Ot(o)}),Dt(o),r.head.appendChild(o)}}}function jm(e,t){Cm.m(e,t);var n=Em;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Jt(r)+`"][href="`+Jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Bm(e)}if(!bm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),bm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Vm(a)))return}r=n.createElement(`link`),ip(r,`link`,e),Dt(r),n.head.appendChild(r)}}}function Mm(e,t,n){Cm.S(e,t,n);var r=Em;if(r&&e){var i=Et(r).hoistableStyles,a=Im(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Lm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=bm.get(a))&&Wm(e,n);var c=o=r.createElement(`link`);Dt(c),ip(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Um(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Nm(e,t){Cm.X(e,t);var n=Em;if(n&&e){var r=Et(n).hoistableScripts,i=Bm(e),a=r.get(i);a||(a=n.querySelector(Vm(i)),a||(e=D({src:e,async:!0},t),(t=bm.get(i))&&Gm(e,t),a=n.createElement(`script`),Dt(a),ip(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pm(e,t){Cm.M(e,t);var n=Em;if(n&&e){var r=Et(n).hoistableScripts,i=Bm(e),a=r.get(i);a||(a=n.querySelector(Vm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=bm.get(i))&&Gm(e,t),a=n.createElement(`script`),Dt(a),ip(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Fm(e,t,n,r){var a=(a=he.current)?Sm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Im(n.href),t=Et(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Im(n.href);var o=Et(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Lm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=bm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},bm.set(e,o)),zm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Bm(n),t=Et(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Im(e){return`href="`+Jt(e)+`"`}function Lm(e){return`link[rel="stylesheet"][`+e+`]`}function Rm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function zm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[xt]){r.loading=1;return}}else t=e.createElement(`link`),t[xt]=!0,t.onload=t.onerror=Ot.bind(null,t),ip(t,`link`,n),Dt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Bm(e){return`[src="`+Jt(e)+`"]`}function Vm(e){return`script[async]`+e}function Hm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Jt(n.href)+`"]`);if(r)return t.instance=r,Dt(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Dt(r),ip(r,`style`,a),Um(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Im(n.href);var o=e.querySelector(Lm(a));if(o)return t.state.loading|=4,t.instance=o,Dt(o),o;r=Rm(n),(a=bm.get(a))&&Wm(r,a),o=(e.ownerDocument||e).createElement(`link`),Dt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ip(o,`link`,r),t.state.loading|=4,Um(o,n.precedence,e),t.instance=o;case`script`:return o=Bm(n.src),(a=e.querySelector(Vm(o)))?(t.instance=a,Dt(a),a):(r=n,(a=bm.get(o))&&(r=D({},n),Gm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Dt(a),ip(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Um(r,n.precedence,e));return t.instance}function Um(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Wm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Gm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Km=null;function qm(e,t,n){if(Km===null){var r=new Map,i=Km=new Map;i.set(n,r)}else i=Km,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[bt]||a[mt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Jm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Ym(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Xm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Zm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Qm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function $m(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Qm(t),e.suspenseyImages.push(t)),e=ah.bind(e),t.decode().then(e,e))}function eh(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Im(r.href),a=t.querySelector(Lm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ih.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Dt(a);return}a=t.ownerDocument||t,r=Rm(r),(i=bm.get(i))&&Wm(r,i),a=a.createElement(`link`),Dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),ip(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ih.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var th=0;function nh(e,t){return e.stylesheets&&e.count===0&&sh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&th===0&&(th=62500*cp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>th?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)sh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ih(){this.count--,rh(this)}function ah(){this.imgCount--,rh(this)}var oh=null;function sh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oh=new Map,t.forEach(ch,e),oh=null,ih.call(e))}function ch(e,t){if(!(t.state.loading&4)){var n=oh.get(e);if(n)var r=n.get(null);else{n=new Map,oh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ih.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var lh={$$typeof:F,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function uh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=rt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rt(0),this.hiddenUpdates=rt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function dh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new uh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=xi(3,null,null,t),e.current=a,a.stateNode=e,t=Sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},io(a),e}function fh(e){return e?(e=yi,e):yi}function ph(e,t,n,r,i,a){i=fh(i),r.context===null?r.context=i:r.pendingContext=i,r=oo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=so(e,r,t),n!==null&&(Pd(n,e,t),co(n,e,t))}function mh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hh(e,t){mh(e,t),(e=e.alternate)&&mh(e,t)}function gh(e){if(e.tag===13||e.tag===31){var t=gi(e,67108864);t!==null&&Pd(t,e,67108864),hh(e,67108864)}}function _h(e){if(e.tag===13||e.tag===31){var t=jd();t=lt(t);var n=gi(e,t);n!==null&&Pd(n,e,t),hh(e,t)}}var vh=!0;function yh(e,t,n,r){var i=G.T;G.T=null;var a=oe.p;try{oe.p=2,xh(e,t,n,r)}finally{oe.p=a,G.T=i}}function bh(e,t,n,r){var i=G.T;G.T=null;var a=oe.p;try{oe.p=8,xh(e,t,n,r)}finally{oe.p=a,G.T=i}}function xh(e,t,n,r){if(vh){var i=Sh(r);if(i===null)qf(e,t,r,Ch,n),Nh(e,r);else if(Fh(i,e,t,n,r))r.stopPropagation();else if(Nh(e,r),t&4&&-1<Mh.indexOf(e)){for(;i!==null;){var a=wt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ze(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-We(o);s.entanglements[1]|=c,o&=~c}Ef(a),!(Yu&6)&&(gd=Ne()+500,Df(0,!1))}}break;case 31:case 13:s=gi(a,2),s!==null&&Pd(s,a,2),zd(),hh(a,2)}if(a=Sh(r),a===null&&qf(e,t,r,Ch,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else qf(e,t,r,null,n)}}function Sh(e){return e=un(e),wh(e)}var Ch=null;function wh(e){if(Ch=null,e=Ct(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ch=e,null}function Th(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Pe()){case Fe:return 2;case Ie:return 8;case Le:case Re:return 32;case ze:return 268435456;default:return 32}default:return 32}}var Eh=!1,Dh=null,Oh=null,kh=null,Ah=new Map,Q=new Map,jh=[],Mh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Nh(e,t){switch(e){case`focusin`:case`focusout`:Dh=null;break;case`dragenter`:case`dragleave`:Oh=null;break;case`mouseover`:case`mouseout`:kh=null;break;case`pointerover`:case`pointerout`:Ah.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Q.delete(t.pointerId)}}function Ph(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=wt(t),t!==null&&gh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Fh(e,t,n,r,i){switch(t){case`focusin`:return Dh=Ph(Dh,e,t,n,r,i),!0;case`dragenter`:return Oh=Ph(Oh,e,t,n,r,i),!0;case`mouseover`:return kh=Ph(kh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ah.set(a,Ph(Ah.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Q.set(a,Ph(Q.get(a)||null,e,t,n,r,i)),!0}return!1}function Ih(e){var t=Ct(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ft(e.priority,function(){_h(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ft(e.priority,function(){_h(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Lh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ln=r,n.target.dispatchEvent(r),ln=null}else return t=wt(n),t!==null&&gh(t),e.blockedOn=n,!1;t.shift()}return!0}function Rh(e,t,n){Lh(e)&&n.delete(t)}function zh(){Eh=!1,Dh!==null&&Lh(Dh)&&(Dh=null),Oh!==null&&Lh(Oh)&&(Oh=null),kh!==null&&Lh(kh)&&(kh=null),Ah.forEach(Rh),Q.forEach(Rh)}function Bh(e,n){e.blockedOn===n&&(e.blockedOn=null,Eh||(Eh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,zh)))}var Vh=null;function Hh(e){Vh!==e&&(Vh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Vh===e&&(Vh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(wh(r||n)===null)continue;break}var a=wt(n);a!==null&&(e.splice(t,3),t-=3,qs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Uh(e){function t(t){return Bh(t,e)}Dh!==null&&Bh(Dh,e),Oh!==null&&Bh(Oh,e),kh!==null&&Bh(kh,e),Ah.forEach(t),Q.forEach(t);for(var n=0;n<jh.length;n++){var r=jh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<jh.length&&(n=jh[0],n.blockedOn===null);)Ih(n),n.blockedOn===null&&jh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ht]||null;if(typeof a==`function`)o||Hh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ht]||null)s=o.formAction;else if(wh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Hh(n)}}}function Wh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Gh(e){this._internalRoot=e}Kh.prototype.render=Gh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ph(n,jd(),e,t,null,null)},Kh.prototype.unmount=Gh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ph(e.current,2,null,e,null,null),zd(),t[gt]=null}};function Kh(e){this._internalRoot=e}Kh.prototype.unstable_scheduleHydration=function(e){if(e){var t=dt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<jh.length&&t!==0&&t<jh[n].priority;n++);jh.splice(n,0,e),n===0&&Ih(e)}};var qh=n.version;if(qh!==`19.3.0`)throw Error(i(527,qh,`19.3.0`));oe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Jh={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:G,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Yh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yh.isDisabled&&Yh.supportsFiber)try{He=Yh.inject(Jh),K=Yh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=gc,s=_c,c=vc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=dh(e,1,!1,null,null,n,r,null,o,s,c,Wh),e[gt]=t.current,Gf(e),new Gh(t)}})),_=o(((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=o((e=>{var t=d().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;e.c=function(e){return t.H.useMemoCache(e)}})),y=o(((e,t)=>{t.exports=v()})),b=l(d(),1),x={};function S(e,t){let n=b.useRef(x);return n.current===x&&(n.current=e(t)),n}var C=[],w=void 0;function T(){return w}function E(e){C.push(e)}function D(e){let t=(t,n)=>{let r=S(k).current,i;try{w=r;for(let e of C)e.before(r);i=e(t,n);for(let e of C)e.after(r);r.didInitialize=!0}finally{w=void 0}return i};return t.displayName=e.displayName||e.name,t}function O(e){return b.forwardRef(D(e))}function k(){return{didInitialize:!1}}function A(){}var j=Object.freeze([]),M=Object.freeze({}),N=typeof document<`u`?b.useLayoutEffect:()=>{};function P(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var F=P(`https://base-ui.com/production-error`,`Base UI`),I=b.createContext(void 0);function L(e){let t=b.useContext(I);if(t===void 0&&!e)throw Error(F(72));return t}function R(e){b.useEffect(e,j)}var z=0,B=class e{static create(){return new e}currentId=z;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=z,t()},e)}isStarted(){return this.currentId!==z}clear=()=>{this.currentId!==z&&(clearTimeout(this.currentId),this.currentId=z)};disposeEffect=()=>this.clear};function V(){let e=S(B.create).current;return R(e.disposeEffect),e}function H(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:U,platform:ee,maxTouchPoints:te}=H(),ne=U.toLowerCase(),W=ee.toLowerCase(),re=/^i(os$|p)/.test(W)||W===`macintel`&&te>1,ie=`android`,ae=W===ie||ne.includes(ie),G=!re&&W.startsWith(`mac`);W.startsWith(`win`),!ae&&/^(linux|chrome os)/.test(W);var oe=G||re,se=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`),ce=!se&&ne.includes(`firefox`);!se&&ne.includes(`chrom`);var le=oe,ue=/jsdom|happydom/.test(ne);function de(e){e.preventDefault(),e.stopPropagation()}function fe(e){return`nativeEvent`in e}function pe(e){return e.pointerType===``&&e.isTrusted?!0:ae&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function me(e){return ue?!1:!ae&&e.width===0&&e.height===0||ae&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function he(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function ge(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function _e(){return typeof window<`u`}function ve(e){return xe(e)?(e.nodeName||``).toLowerCase():`#document`}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function be(e){return((xe(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function xe(e){return _e()?e instanceof Node||e instanceof ye(e).Node:!1}function Se(e){return _e()?e instanceof Element||e instanceof ye(e).Element:!1}function Ce(e){return _e()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function we(e){return!_e()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function Te(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Ie(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Ee(e){return/^(table|td|th)$/.test(ve(e))}function De(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Oe=/transform|translate|scale|rotate|perspective|filter/,ke=/paint|layout|strict|content/,Ae=e=>!!e&&e!==`none`,je;function Me(e){let t=Se(e)?Ie(e):e;return Ae(t.transform)||Ae(t.translate)||Ae(t.scale)||Ae(t.rotate)||Ae(t.perspective)||!Pe()&&(Ae(t.backdropFilter)||Ae(t.filter))||Oe.test(t.willChange||``)||ke.test(t.contain||``)}function Ne(e){let t=Re(e);for(;Ce(t)&&!Fe(t);){if(Me(t))return t;if(De(t))return null;t=Re(t)}return null}function Pe(){return je??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),je}function Fe(e){return/^(html|body|#document)$/.test(ve(e))}function Ie(e){return ye(e).getComputedStyle(e)}function Le(e){return Se(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Re(e){if(ve(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||we(e)&&e.host||be(e);return we(t)?t.host:t}function ze(e){let t=Re(e);return Fe(t)?(e.ownerDocument||e).body:Ce(t)&&Te(t)?t:ze(t)}function Be(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ze(e),i=r===e.ownerDocument?.body,a=ye(r);if(i){let e=Ve(a);return t.concat(a,a.visualViewport||[],Te(r)?r:[],e&&n?Be(e):[])}return t.concat(r,Be(r,[],n))}function Ve(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function He(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function K(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&we(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ue(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var We=`data-base-ui-focusable`,Ge=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,Ke=`ArrowLeft`,qe=`ArrowRight`,Je=`ArrowUp`,Ye=`ArrowDown`,Xe=`data-starting-style`,Ze=`data-ending-style`,Qe={[Xe]:``},$e={[Ze]:``},et={transitionStatus(e){return e===`starting`?Qe:e===`ending`?$e:null}},tt=`data-open`,nt=`data-closed`,rt=`data-anchor-hidden`,it=`data-popup-open`,at=`data-pressed`,ot={[it]:``},st={[it]:``,[at]:``},ct={[tt]:``},lt={[nt]:``},ut={[rt]:``},dt={open(e){return e?ot:null}},ft={open(e){return e?st:null}},pt={open(e){return e?ct:lt},anchorHidden(e){return e?ut:null}},mt={...pt,...et},ht=`data-trigger-disabled`;function gt(e,t){if(!Se(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(ht);for(let[,e]of t.entries())if(K(e,n))return!e.hasAttribute(ht);return!1}function q(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function _t(e){return e.matches(`html,body`)}function vt(e){return Ce(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function yt(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Ge}`)!=null}function bt(e){return e?e.getAttribute(`role`)===`combobox`&&vt(e):!1}function xt(e){if(!e||ue)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function St(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Ct(e,t){return t!=null&&!he(t)?0:typeof e==`function`?e():e}function wt(e,t,n){let r=Ct(e,n);return typeof r==`number`?r:r?.[t]}function Tt(e){return typeof e==`function`?e():e}function Et(e,t){return t||e===`click`||e===`mousedown`}function Dt(e){return e?.includes(`mouse`)&&e!==`mousedown`}var Ot=`none`,kt=`trigger-press`,At=`trigger-hover`,jt=`trigger-focus`,Mt=`outside-press`,Nt=`item-press`,Pt=`close-press`,Ft=`increment-press`,It=`decrement-press`,Lt=`input-change`,Rt=`input-clear`,zt=`input-blur`,Bt=`input-paste`,Vt=`input-press`,Ht=`focus-out`,Ut=`escape-key`,Wt=`list-navigation`,Gt=`keyboard`,Kt=`pointer`,qt=`wheel`,Jt=`cancel-open`,Yt=`sibling-open`,Xt=`disabled`,Zt=`missing`,Qt=`initial`,$t=`imperative-action`;function J(e,t,n,r){let i=!1,a=!1,o=r??M;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function en(e,t,n){let r=n??M;return{reason:e,event:t??new Event(`base-ui`),...r}}var tn=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Y=o(((e,t)=>{t.exports=tn()}))(),nn=b.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new B,currentIdRef:{current:null},currentContextRef:{current:null}});function rn(e,t){e.current=t.current}function an(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=b.useRef(n),a=b.useRef(n),o=b.useRef(null),s=b.useRef(null),c=V();return N(()=>{if(a.current=n,!o.current){i.current=n;return}i.current={open:wt(i.current,`open`),close:wt(n,`close`)}},[n,o,i,a]),(0,Y.jsx)(nn.Provider,{value:b.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function on(e,t={open:!1}){let{open:n}=t,r=`rootStore`in e?e.rootStore:e,i=r.useState(`floatingId`),{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:u,timeout:d}=b.useContext(nn),[f,p]=b.useState(!1),m=b.useRef(n);return N(()=>{m.current=n},[n]),N(()=>{function e(){l.current?.setIsInstantPhase(!1),a.current=null,l.current=null,o.current=c.current,d.clear()}if(a.current&&!n&&a.current===i){if(p(!1),s){let t=i;return d.start(s,()=>{r.select(`open`)||a.current&&a.current!==t||e()}),()=>{(m.current||a.current!==t)&&d.clear()}}e()}},[n,i,a,o,s,c,l,d,r]),N(()=>{if(!n)return;let e=l.current,t=a.current;d.clear(),l.current={onOpenChange:r.setOpen,setIsInstantPhase:p},a.current=i,o.current={open:0,close:wt(c.current,`close`)},t!==null&&t!==i?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,J(Ot))):(p(!1),e?.setIsInstantPhase(!1))},[n,i,r,a,o,c,l,d]),N(()=>()=>{if(a.current===i){if(l.current=null,!m.current)return;a.current=null,rn(o,c),d.clear()}},[l,a,o,i,c,d]),b.useMemo(()=>({activeIdRef:a,hasProvider:u,delayRef:o,isInstantPhase:f}),[a,u,o,f])}function sn(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function cn(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function ln(e,t,n,r){let i=S(dn).current;return fn(i,e,t,n,r)&&mn(i,[e,t,n,r]),i.callback}function un(e){let t=S(dn).current;return pn(t,e)&&mn(t,e),t.callback}function dn(){return{callback:null,cleanup:null,refs:[]}}function fn(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function pn(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function mn(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}function hn(e){let t=S(gn,e).current;return t.next=e,N(t.effect),t}function gn(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var _n={...b},vn=_n.useInsertionEffect,yn=vn&&vn!==_n.useLayoutEffect?vn:e=>e();function X(e){let t=S(bn).current;return t.next=e,yn(t.effect),t.trampoline}function bn(){let e={next:void 0,callback:xn,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function xn(){}var Sn=null;globalThis.requestAnimationFrame;var Cn=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},wn=class e{static create(){return new e}static request(e){return Cn.request(e)}static cancel(e){return Cn.cancel(e)}currentId=Sn;request(e){this.cancel(),this.currentId=Cn.request(()=>{this.currentId=Sn,e()})}cancel=()=>{this.currentId!==Sn&&(Cn.cancel(this.currentId),this.currentId=Sn)};disposeEffect=()=>this.cancel};function Tn(){let e=S(wn.create).current;return R(e.disposeEffect),e}function En(e){return e?.ownerDocument||document}var Dn={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},On={...Dn,position:`fixed`,top:0,left:0},kn={...Dn,position:`absolute`},An=b.forwardRef(function(e,t){let[n,r]=b.useState();N(()=>{le&&se&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,Y.jsx)(`span`,{...e,ref:t,style:On,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),jn=Math.min,Mn=Math.max,Nn=Math.round,Pn=Math.floor,Fn=e=>({x:e,y:e}),In={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Ln(e,t,n){return Mn(e,jn(t,n))}function Rn(e,t){return typeof e==`function`?e(t):e}function zn(e){return e.split(`-`)[0]}function Bn(e){return e.split(`-`)[1]}function Vn(e){return e===`x`?`y`:`x`}function Hn(e){return e===`y`?`height`:`width`}function Un(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Wn(e){return Vn(Un(e))}function Gn(e,t,n){n===void 0&&(n=!1);let r=Bn(e),i=Wn(e),a=Hn(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=er(o)),[o,er(o)]}function Kn(e){let t=er(e);return[qn(e),t,qn(t)]}function qn(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Jn=[`left`,`right`],Yn=[`right`,`left`],Xn=[`top`,`bottom`],Zn=[`bottom`,`top`];function Qn(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Yn:Jn:t?Jn:Yn;case`left`:case`right`:return t?Xn:Zn;default:return[]}}function $n(e,t,n,r){let i=Bn(e),a=Qn(zn(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(qn)))),a}function er(e){let t=zn(e);return In[t]+e.slice(t.length)}function tr(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function nr(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:tr(e)}function rr(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ir(e,t,n){return Math.floor(e/t)!==n}function ar(e,t){return t<0||t>=e.length}function or(e,t){return cr(e.current,{disabledIndices:t})}function sr(e,t){return cr(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function cr(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&ur(e,a,r));return a}function lr(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===`ArrowUp`?p=`up`:t.key===`ArrowDown`&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=e.closest(`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h<e.length,y=_||o,b=o=>{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f<n.length;f+=1,o+=d){if(o<0||o>=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1),r=i(t,u,n[o][e]??n[o][0]);o=a[r]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!ur(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=Pn(l/y)+1;for(let t=u-n+i,c=0;c<o;c+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!ur(e,r,s))return r}};d&&de(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=cr(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-y<c||f<0)){let e=u%y,n=l%y,r=l-(n-e);f=n===e?l:n>e?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=cr(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}ar(e,f)&&(f=u)}if(n===`both`){let n=Pn(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(d&&de(t),u%o===o-1?r&&(f=cr(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=cr(e,{startingIndex:u,disabledIndices:s}),r&&ir(f,o,n)&&(f=cr(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),ir(f,o,n)&&(f=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(d&&de(t),u%o===0?r&&(f=cr(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=cr(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&ir(f,o,n)&&(f=cr(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),ir(f,o,n)&&(f=u));let c=Pn(l/o)===n;ar(e,f)&&(r&&c?(f=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:cr(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function ur(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!fr(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function dr(e){return e.visibility===`hidden`||e.visibility===`collapse`}function fr(e,t=e?Ie(e):null){return!e||!e.isConnected||!t||dr(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var pr=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function mr(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return we(n)?n.host:null}function hr(e){for(let t of Array.from(e.children))if(ve(t)===`summary`)return t;return null}function gr(e,t){let n=hr(t);return!!n&&(e===n||K(n,e))}function _r(e){let t=e?ve(e):``;return e!=null&&e.matches(pr)&&(t!==`summary`||e.parentElement!=null&&ve(e.parentElement)===`details`&&hr(e.parentElement)===e)&&(t!==`details`||hr(e)==null)&&(t!==`input`||e.type!==`hidden`)}function vr(e){if(!_r(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=mr(t)){let n=t!==e,r=ve(t)===`slot`;if(t.hasAttribute(`inert`)||n&&ve(t)===`details`&&!t.open&&!gr(e,t)||t.hasAttribute(`hidden`)||!r&&!yr(t,n))return!1}return!0}function yr(e,t){let n=Ie(e);return t?n.display!==`none`:fr(e,n)}function br(e){let t=e.tabIndex;if(t<0){let t=ve(e);if(t===`details`||t===`audio`||t===`video`||Ce(e)&&e.isContentEditable)return 0}return t}function xr(e){if(ve(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Sr(e,t){let n=xr(e);if(!n)return!0;let r=t.find(e=>{let t=xr(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=xr(e);return t?.name===n.name&&t.form===n.form})===n}function Cr(e){if(Ce(e)&&ve(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Ce(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function wr(e,t){Cr(e).forEach(e=>{_r(e)&&t.push(e),wr(e,t)})}function Tr(e,t,n){Cr(e).forEach(e=>{Ce(e)&&e.matches(t)&&n.push(e),Tr(e,t,n)})}function Er(e){return vr(e)&&br(e)>=0}function Dr(e){let t=[];return wr(e,t),t.filter(vr)}function Or(e){let t=Dr(e);return t.filter(e=>br(e)>=0&&Sr(e,t))}function kr(e,t){let n=Or(e),r=n.length;if(r===0)return;let i=He(En(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Ar(e){return kr(En(e).body,1)||e}function jr(e){return kr(En(e).body,-1)||e}function Mr(e,t){if(!e)return null;let n=Or(En(e).body),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function Nr(e){return Mr(e,1)}function Pr(e){return Mr(e,-1)}function Fr(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!K(n,r)}function Ir(e){Or(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Lr(e){let t=[];Tr(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Rr(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Rr(e,t.id,n)])}function zr(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Br(e){return`data-base-ui-${e}`}var Vr=0;function Hr(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Vr);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),A;let o=requestAnimationFrame(a);return Vr=o,()=>{Vr===o&&(cancelAnimationFrame(o),Vr=0)}}var Ur={inert:new WeakMap,"aria-hidden":new WeakMap},Wr=`data-base-ui-inert`,Gr={inert:new WeakSet,"aria-hidden":new WeakSet},Kr=new WeakMap,qr=0;function Jr(e){return Gr[e]}function Yr(e){return e?we(e)?e.host:Yr(e.parentNode):null}var Xr=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Yr(t);return e.contains(n)?n:null}).filter(e=>e!=null),Zr=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Qr=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{ve(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function $r(e,t,n,r,{mark:i=!0}){let a=null;r?a=`inert`:n&&(a=`aria-hidden`);let o=null,s=null,c=Xr(t,e),l=i?Qr(t,Zr(c),new Set(c)):[],u=[],d=[];if(a){let e=Ur[a],n=Jr(a);s=n,o=e;let r=Xr(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=c.concat(r);Qr(t,Zr(i),new Set(i)).forEach(t=>{let r=t.getAttribute(a),i=r!==null&&r!==`false`,o=(e.get(t)||0)+1;e.set(t,o),u.push(t),o===1&&i&&n.add(t),i||t.setAttribute(a,a===`inert`?``:`true`)})}return i&&l.forEach(e=>{let t=(Kr.get(e)||0)+1;Kr.set(e,t),d.push(e),t===1&&e.setAttribute(Wr,``)}),qr+=1,()=>{o&&u.forEach(e=>{let t=(o.get(e)||0)-1;o.set(e,t),t||(!s?.has(e)&&a&&e.removeAttribute(a),s?.delete(e))}),i&&d.forEach(e=>{let t=(Kr.get(e)||0)-1;Kr.set(e,t),t||e.removeAttribute(Wr)}),--qr,qr||(Ur.inert=new WeakMap,Ur[`aria-hidden`]=new WeakMap,Gr.inert=new WeakSet,Gr[`aria-hidden`]=new WeakSet,Kr=new WeakMap)}}function ei(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0}=t,a=En(e[0]).body;return $r(e,a,n,r,{mark:i})}var ti=0;function ni(e,t=`mui`){let[n,r]=b.useState(e),i=e||n;return b.useEffect(()=>{n??(ti+=1,r(`${t}-${ti}`))},[n,t]),i}var ri=_n.useId;function ii(e,t){if(ri!==void 0){let n=ri();return e??(t?`${t}-${n}`:n)}return ni(e,t)}var ai=19;function oi(e){return ai>=e}function si(e){if(!b.isValidElement(e))return null;let t=e,n=t.props;return(oi(19)?n?.ref:t.ref)??null}function ci(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function li(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function ui(e,t){return typeof e==`function`?e(t):e}function di(e,t){return typeof e==`function`?e(t):e}var fi={};function pi(e,t,n,r,i){if(!n&&!r&&!i&&!e)return hi(t);let a=hi(e);return t&&(a=gi(a,t)),n&&(a=gi(a,n)),r&&(a=gi(a,r)),i&&(a=gi(a,i)),a}function mi(e){if(e.length===0)return fi;if(e.length===1)return hi(e[0]);let t=hi(e[0]);for(let n=1;n<e.length;n+=1)t=gi(t,e[n]);return t}function hi(e){return bi(e)?{...xi(e,fi)}:_i(e)}function gi(e,t){return bi(t)?xi(t,e):vi(e,t)}function _i(e){let t={...e};for(let e in t){let n=t[e];yi(e,n)&&(t[e]=Ci(n))}return t}function vi(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=ci(e.style,r);break;case`className`:e[n]=Ti(e.className,r);break;default:e[n]=yi(n,r)?Si(e[n],r):r}}return e}function yi(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function bi(e){return typeof e==`function`}function xi(e,t){return bi(e)?e(t):e??fi}function Si(e,t){return t?e?(...n)=>{let r=n[0];if(Ei(r)){let i=r;wi(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:Ci(t):e}function Ci(e){return e&&((...t)=>{let n=t[0];return Ei(n)&&wi(n),e(...t)})}function wi(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ti(e,t){return t?e?t+` `+e:t:e}function Ei(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function Di(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=ji(r));let i=Oi(t,n,r);if(n.enabled===!1)return null;let a=n.state??M;return Mi(e,r,i,a)}function Oi(e,t,n){let{className:r,style:i}=e,{state:a=M,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?ui(r,a):void 0,d=l?di(i,a):void 0,f=l?li(a,c):M,p=l&&s?ki(s):void 0,m=l?ci(f,p)??{}:M;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?un([m.ref,si(n),...o]):ln(m.ref,si(n),o):ln(null,null)),l?(u!==void 0&&(m.className=Ti(m.className,u)),d!==void 0&&(m.style=ci(m.style,d)),m):M}function ki(e){return Array.isArray(e)?mi(e):pi(void 0,e)}var Ai=Symbol.for(`react.lazy`);function ji(e){if(e?.$$typeof!==Ai)return e;let t=b.Children.toArray(e)[0];return b.isValidElement(t)?t:e}function Mi(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=pi(n,t.props);return e.ref=n.ref,b.cloneElement(t,e)}if(e&&typeof e==`string`)return Ni(e,n);throw Error(F(8))}function Ni(e,t){return e===`button`?(0,b.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,b.createElement)(`img`,{alt:``,...t,key:t.key}):b.createElement(e,t)}var Pi={style:{transition:`none`}},Fi=`data-base-ui-click-trigger`,Ii={fallbackAxisSide:`none`},Li={fallbackAxisSide:`end`},Ri={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},zi=l(h(),1),Bi=b.createContext(null),Vi=()=>b.useContext(Bi),Hi=Br(`portal`);function Ui(e={}){let{ref:t,container:n,componentProps:r=M,elementProps:i}=e,a=ii(),o=Vi()?.portalNode,[s,c]=b.useState(null),[l,u]=b.useState(null),d=X(e=>{e!==null&&u(e)}),f=b.useRef(null);N(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(xe(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=Di(`div`,r,{ref:[t,d],props:[{id:a,[Hi]:``},i]}),m=s&&p?zi.createPortal(p,s):null;return{node:l,nodeId:b.isValidElement(p)?p.props.id:void 0,subtree:m}}var Wi=b.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=Ui({container:o,ref:t,componentProps:e,elementProps:c}),f=b.useRef(null),p=b.useRef(null),m=b.useRef(null),h=b.useRef(null),[g,_]=b.useState(null),v=b.useRef(!1),y=g?.modal,x=g?.open,S=!!g&&!g.modal&&g.open&&!!l;b.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&Fr(e)&&(e.type===`focusin`?v.current&&=(Lr(l),!1):(Ir(l),v.current=!0))}return cn(sn(l,`focusin`,e,!0),sn(l,`focusout`,e,!0))},[l,y]),N(()=>{l&&x===!0&&v.current&&(Lr(l),v.current=!1)},[x,l]);let C=b.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,Y.jsxs)(b.Fragment,{children:[d,(0,Y.jsxs)(Bi.Provider,{value:C,children:[S&&l&&(0,Y.jsx)(An,{"data-type":`outside`,ref:f,onFocus:e=>{Fr(e,l)?m.current?.focus():jr(g?g.domReference:null)?.focus()}}),S&&l&&(0,Y.jsx)(`span`,{role:s,"aria-owns":u,style:Ri}),l&&zi.createPortal(a,l),S&&l&&(0,Y.jsx)(An,{"data-type":`outside`,ref:p,onFocus:e=>{Fr(e,l)?h.current?.focus():(Ar(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,J(`focus-out`,e.nativeEvent)))}})]})]})});function Gi(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Ki=class{nodesRef={current:[]};events=Gi();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},qi=b.createContext(null),Ji=b.createContext(null),Yi=()=>b.useContext(qi)?.id||null,Xi=e=>{let t=b.useContext(Ji);return e??t};function Zi(e){let t=ii(),n=Xi(e),r=Yi();return N(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Qi(e){let{children:t,id:n}=e,r=Yi();return(0,Y.jsx)(qi.Provider,{value:b.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function $i(e){let{children:t,externalTree:n}=e,r=S(()=>n??new Ki).current;return(0,Y.jsx)(Ji.Provider,{value:r,children:t})}function ea(e){return e==null?e:`current`in e?e.current:e}function ta(e,t){let n=ye(Ue(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var na=20,ra=[];function ia(){ra=ra.filter(e=>e.deref()?.isConnected)}function aa(e){ia(),e&&ve(e)!==`body`&&(ra.push(new WeakRef(e)),ra.length>na&&(ra=ra.slice(-20)))}function oa(){return ia(),ra[ra.length-1]?.deref()}function sa(e){return e?Er(e)?e:Or(e)[0]||e:null}function ca(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=Dr(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Er(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function la(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:x}=h.context,S=X(()=>x.current.floatingContext?.nodeId),C=i===!1,w=bt(_)&&C,T=hn(i),E=hn(a),D=hn(l),O=hn(g),k=Xi(p),A=Vi(),j=b.useRef(!1),M=b.useRef(!1),P=b.useRef(!1),F=b.useRef(null),I=b.useRef(``),L=b.useRef(``),R=b.useRef(null),z=b.useRef(null),B=ln(R,f,A?.beforeInsideRef),H=ln(z,A?.afterInsideRef),U=V(),ee=V(),te=Tn(),ne=A!=null,W=St(v),re=X((e=W)=>e?Or(e):[]),ie=X(()=>m?.().filter(e=>e!=null)??[]);b.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&K(W,He(En(W)))&&re().length===0&&!w&&de(e)}return sn(En(W),`keydown`,e)},[r,W,s,w,re]),b.useEffect(()=>{if(r||!g)return;let e=En(W);function t(){P.current=!1}function n(e){let t=Ue(e),n=ie(),r=K(v,t)||K(_,t)||K(A?.portalNode,t)||n.some(e=>e===t||K(e,t));P.current=!r,L.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(M.current=!0,ee.start(0,()=>{M.current=!1}))}function i(){L.current=`keyboard`}return cn(sn(e,`pointerdown`,n,!0),sn(e,`pointerup`,t,!0),sn(e,`pointercancel`,t,!0),sn(e,`keydown`,i,!0),t)},[r,v,_,W,g,A,ee,ie]),b.useEffect(()=>{if(r||!c)return;let e=En(W);function t(){M.current=!0,ee.start(0,()=>{M.current=!1})}function n(e){let t=Ue(e);Er(t)&&(F.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=Ue(t);s&&n==null&&i!=null&&K(v,i)&&aa(i),queueMicrotask(()=>{let a=S(),c=h.context.triggerElements,l=ie(),f=n?.hasAttribute(Br(`focus-guard`))&&[R.current,z.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,ea(d),ea(u)].includes(n),p=!(K(_,n)||K(v,n)||K(n,v)||K(A?.portalNode,n)||l.some(e=>e===n||K(e,n))||c.hasMatchingElement(e=>K(e,n))||f||k&&(Rr(k.nodesRef.current,a).find(e=>K(e.context?.elements.floating,n)||K(e.context?.elements.domReference,n))||zr(k.nodesRef.current,a).find(e=>[e.context?.elements.floating,St(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&W&&ca(W),o&&r!==_&&!fr(i)&&He(e)===e.body){if(Ce(W)&&(W.focus(),o===`popup`)){te.request(()=>{W.focus()});return}let e=re(),t=F.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||W;Ce(n)&&n.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(w||!s)&&n&&p&&!M.current&&(w||n!==oa())&&(j.current=!0,h.setOpen(!1,J(Ht,t)))})}function a(){P.current||(x.current.insideReactTree=!0,U.start(0,()=>{x.current.insideReactTree=!1}))}let l=Ce(_)?_:null;if(v||l)return cn(l&&sn(l,`focusout`,i),l&&sn(l,`pointerdown`,t),v&&sn(v,`focusin`,n),v&&sn(v,`focusout`,i),v&&A&&sn(v,`focusout`,a,!0))},[r,_,v,W,s,k,A,h,c,o,re,w,S,x,U,ee,te,u,d,ie]),b.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${Br(`portal`)}]`)||[]),t=(k?zr(k.nodesRef.current,S()):[]).find(e=>bt(e.context?.elements.domReference||null))?.context?.elements.domReference,n=ei([v,...e,R.current,z.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...ie(),t,ea(d),ea(u),w?_:null].filter(e=>e!=null),{ariaHidden:s||w,mark:!1}),i=ei([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,A,w,k,S,u,d,ie]),N(()=>{if(!g||r||!Ce(W))return;I.current=``,L.current=``;let e=En(W),t=He(e);queueMicrotask(()=>{let n=T.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||K(W,t))return;let i=null,a=()=>(i??=re(W),i[0]||W),o;o=r===!0||r===null?a():ea(r),o||=a();let s=K(W,He(e));Hr(o,{preventScroll:o===W,shouldFocus(){if(!O.current)return!1;if(s)return!0;let t=He(e);return!(t!==o&&K(W,t))}})})},[r,g,W,re,T,D,O]),N(()=>{if(r||!W)return;let e=En(W),t=He(e),n=D.current==null;aa(t);function i(e){if(e.open||(I.current=ta(e.nativeEvent,L.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(j.current=!0),e.reason===`outside-press`){if(e.nested)j.current=!1;else if(pe(e.nativeEvent)||me(e.nativeEvent))j.current=!1;else{let e=!1;En(W).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}}y.on(`openchange`,i);function a(e){let r=E.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&ve(t)!==`body`?t:null,s=n?o||a:a||o;return s||=oa()||null,typeof i==`boolean`?s:ea(i)||s||null}return()=>{y.off(`openchange`,i);let t=He(e),n=ie(),r=K(v,t)||n.some(e=>e===t||K(e,t))||k&&Rr(k.nodesRef.current,S(),!1).some(e=>K(e.context?.elements.floating,t)),o=E.current,s=I.current,c=a(s);queueMicrotask(()=>{let n=sa(c),i=typeof o!=`boolean`;if(o&&!j.current&&Ce(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}j.current=!1})}},[r,v,W,E,D,y,k,_,S,ie]),N(()=>{if(!se||g||!v)return;let e=He(En(v));Ce(e)&&vt(e)&&K(v,e)&&e.blur()},[g,v]),N(()=>{if(!r&&A)return A.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,s,g,h,c,_]),N(()=>{if(!r&&W)return ca(W),()=>{queueMicrotask(ia)}},[r,W]);let ae=!r&&(!s||!w)&&(ne||s);return(0,Y.jsxs)(b.Fragment,{children:[ae&&(0,Y.jsx)(An,{"data-type":`inside`,ref:B,onFocus:e=>{if(s){let e=re();Hr(e[e.length-1])}else A?.portalNode&&(j.current=!1,Fr(e,A.portalNode)?Ar(_)?.focus():ea(d??A.beforeOutsideRef)?.focus())}}),n,ae&&(0,Y.jsx)(An,{"data-type":`inside`,ref:H,onFocus:e=>{s?Hr(re()[0]):A?.portalNode&&(c&&(j.current=!0),Fr(e,A.portalNode)?jr(_)?.focus():ea(u??A.afterOutsideRef)?.focus())}})]})}function ua(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=kt}=t,l=`rootStore`in e?e.rootStore:e,u=l.context.dataRef,d=b.useRef(void 0),f=Tn(),p=V(),m=b.useMemo(()=>{function e(e,t,n,r){let i=J(c,t,n);e&&r===`touch`&&s>0?p.start(s,()=>{l.setOpen(!0,i)}):l.setOpen(e,i)}function t(e,t,n){let r=u.current.openEvent,a=l.select(`domReferenceElement`)!==t;return e&&a||!e||!i?!0:r&&o?!n(r.type):!1}return{onPointerDown(e){d.current=he(e.pointerType,!0)&&me(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(n){let i=d.current,o=n.nativeEvent,s=l.select(`open`);if(n.button!==0||r===`click`||he(i,!0)&&a)return;let c=t(s,n.currentTarget,e=>e===`click`||e===`mousedown`),u=Ue(o);if(vt(u)){e(c,o,u,i);return}let p=n.currentTarget;f.request(()=>{e(c,o,p,i)})},onClick(n){if(r===`mousedown-only`)return;let i=d.current;if(r===`mousedown`&&i){d.current=void 0;return}he(i,!0)&&a||e(t(l.select(`open`),n.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),n.nativeEvent,n.currentTarget,i)},onKeyDown(){d.current=void 0}}},[u,r,a,c,l,o,i,f,p,s]);return b.useMemo(()=>n?{reference:m}:M,[n,m])}function da(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function fa(e){return e!=null&&e.clientX!=null}function pa(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=`rootStore`in e?e.rootStore:e,a=i.useState(`open`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.context.dataRef,l=b.useRef(!1),u=b.useRef(null),[d,f]=b.useState(),[p,m]=b.useState([]),h=X(e=>{i.set(`positionReference`,e)}),g=X((e,t,n)=>{l.current||(!c.current.openEvent||fa(c.current.openEvent))&&i.set(`positionReference`,da(n??s,{x:e,y:t,axis:r,dataRef:c,pointerType:d}))}),_=X(e=>{a?u.current||(g(e.clientX,e.clientY,e.currentTarget),m([])):g(e.clientX,e.clientY,e.currentTarget)}),v=he(d)?o:a;b.useEffect(()=>{if(!n){h(s);return}if(!v)return;function e(){u.current?.(),u.current=null}let t=ye(o);function r(t){let n=Ue(t);K(o,n)?e():g(t.clientX,t.clientY)}return!c.current.openEvent||fa(c.current.openEvent)?u.current=sn(t,`mousemove`,r):h(s),e},[v,n,o,c,s,i,g,h,p]),b.useEffect(()=>()=>{i.set(`positionReference`,null)},[i]),b.useEffect(()=>{n&&!o&&(l.current=!1)},[n,o]),b.useEffect(()=>{!n&&a&&(l.current=!0)},[n,a]);let y=b.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:_,onMouseEnter:_}},[_]);return b.useMemo(()=>n?{reference:y,trigger:y}:{},[n,y])}function ma(){return!1}function ha(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function ga(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=ma,bubbles:s,externalTree:c}=t,l=`rootStore`in e?e.rootStore:e,u=l.useState(`open`),d=l.useState(`floatingElement`),{dataRef:f,events:p}=l.context,m=Xi(c),h=X(typeof i==`function`?i:()=>!1),g=typeof i==`function`?h:i,_=g!==!1,v=X(()=>a),{escapeKey:y,outsidePress:x}=ha(s),S=b.useRef(!1),C=b.useRef(!1),w=b.useRef(!1),T=b.useRef(!1),E=b.useRef(!1),D=b.useRef(``),O=b.useRef(null),k=V(),A=V(),j=X(()=>{A.clear(),f.current.insideReactTree=!1}),M=X(e=>{let t=f.current.floatingContext?.nodeId;return(m?Rr(m.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),N=X(e=>q(e,l.select(`floatingElement`))||q(e,l.select(`domReferenceElement`))),P=X(e=>{o()&&l.setOpen(!1,J(kt,e.nativeEvent))}),F=X(e=>{if(!u||!n||!r||e.key!==`Escape`||E.current||!y&&M(`__escapeKeyBubbles`))return;let t=J(Ut,fe(e)?e.nativeEvent:e);l.setOpen(!1,t),t.isCanceled||e.preventDefault(),!y&&!t.isPropagationAllowed&&e.stopPropagation()}),I=X(()=>{f.current.insideReactTree=!0,A.start(0,j)}),L=X(e=>{if(!u||!n||e.button!==0)return;let t=Ue(e.nativeEvent);K(l.select(`floatingElement`),t)&&(S.current||(S.current=!0,C.current=!1))}),R=X(e=>{u&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&S.current&&(C.current=!0)});b.useEffect(()=>{function e(e){e.open||(T.current=!1)}return p.on(`openchange`,e),()=>{p.off(`openchange`,e)}},[p]),b.useEffect(()=>{if(!u||!n)return u||(T.current=!1),j;f.current.__escapeKeyBubbles=y,f.current.__outsidePressBubbles=x;let e=new B,t=new B,i=En(d);function a(){e.clear(),E.current=!0}function o(){e.start(se?5:0,()=>{E.current=!1})}function s(){w.current=!0,t.start(0,()=>{w.current=!1})}function c(){S.current=!1,C.current=!1}function p(){let e=D.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function h(e){let t=p();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function b(e){let t=f.current.floatingContext?.nodeId,n=m&&Rr(m.nodesRef.current,t).some(t=>q(e,t.context?.elements.floating));return N(e)||n}function A(e){if(h(e)){e.type!==`click`&&!N(e)&&(t.clear(),w.current=!1),j();return}if(f.current.insideReactTree){j();return}let n=Ue(e),r=`[${Br(`inert`)}]`,i=Se(n)?n.getRootNode():null,a=Array.from((we(i)?i:En(l.select(`floatingElement`))).querySelectorAll(r)),o=l.context.triggerElements;if(n&&(o.hasElement(n)||o.hasMatchingElement(e=>K(e,n))))return;let s=Se(n)?n:null;for(;s&&!Fe(s);){let e=Re(s);if(Fe(e)||!Se(e))break;s=e}if(!(a.length&&Se(n)&&!_t(n)&&!K(n,l.select(`floatingElement`))&&a.every(e=>!K(s,e)))){if(Ce(n)&&!(`touches`in e)){let t=Fe(n),r=Ie(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!b(e)){if(p()===`intentional`){if(e.detail!==0&&!pe(e)&&!T.current)return;if(w.current){t.clear(),w.current=!1;return}}(typeof g!=`function`||g(e))&&(M(`__outsidePressBubbles`)||(l.setOpen(!1,J(Mt,e)),j()))}}}function P(e){p()===`sloppy`&&e.pointerType!==`touch`&&l.select(`open`)&&n&&!N(e)&&A(e)}function I(e){if(p()!==`sloppy`||!l.select(`open`)||!n||N(e))return;let t=e.touches[0];t&&(O.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},k.start(1e3,()=>{O.current&&(O.current.dismissOnTouchEnd=!1,O.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=Ue(e);if(!n)return;let r=sn(n,e.type,()=>{t(e),r()})}function R(e){D.current=`touch`,L(e,I)}function z(e){k.clear(),e.type===`pointerdown`&&(e.button===0&&(T.current=!0),D.current=e.pointerType),(e.type!==`mousedown`||!O.current||O.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?P(e):A(e)})}function V(e){if(e.type===`pointercancel`&&(T.current=!1),!S.current)return;let n=C.current;if(c(),p()===`intentional`){if(e.type===`pointercancel`){n&&s();return}if(!b(e)){if(n){s();return}(typeof g!=`function`||g(e))&&(t.clear(),w.current=!0,j())}}}function H(e){if(p()!==`sloppy`||!O.current||N(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-O.current.startX),r=Math.abs(t.clientY-O.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(O.current.dismissOnTouchEnd=!0),i>10&&(A(e),k.clear(),O.current=null)}function U(e){L(e,H)}function ee(e){p()===`sloppy`&&O.current&&!N(e)&&(O.current.dismissOnTouchEnd&&A(e),k.clear(),O.current=null)}function te(e){L(e,ee)}let ne=cn(r&&cn(sn(i,`keydown`,F),sn(i,`compositionstart`,a),sn(i,`compositionend`,o)),_&&cn(sn(i,`click`,z,!0),sn(i,`pointerdown`,z,!0),sn(i,`pointerup`,V,!0),sn(i,`pointercancel`,V,!0),sn(i,`mousedown`,z,!0),sn(i,`mouseup`,V,!0),sn(i,`touchstart`,R,{capture:!0,passive:!0}),sn(i,`touchmove`,U,{capture:!0,passive:!0}),sn(i,`touchend`,te,{capture:!0,passive:!0})));return()=>{ne(),e.clear(),t.clear(),c(),w.current=!1,j()}},[f,d,r,_,g,u,n,y,x,F,j,v,M,N,m,l,k]);let z=b.useMemo(()=>({onKeyDown:F,onPointerDown:P,onClick:P}),[F,P]),H=b.useMemo(()=>({onKeyDown:F,onPointerDown:R,onMouseDown:R,onClickCapture:I,onMouseDownCapture(e){I(),L(e)},onPointerDownCapture(e){I(),L(e)},onMouseUpCapture:I,onTouchEndCapture:I,onTouchMoveCapture:I}),[F,I,L,R]);return b.useMemo(()=>n?{reference:z,floating:H,trigger:z}:{},[n,z,H])}function _a(e,t,n){let{reference:r,floating:i}=e,a=Un(t),o=Wn(t),s=Hn(o),c=zn(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Bn(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function va(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Rn(t,e),p=nr(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=rr(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=rr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ya=50,ba=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:va},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=_a(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ya&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=_a(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},xa=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Rn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=zn(r),_=Un(o),v=zn(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[er(o)]:Kn(o)),x=p!==`none`;!d&&x&&b.push(...$n(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Gn(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Un(t)||T.every(e=>Un(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Un(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},Sa=new Set([`left`,`top`]);async function Ca(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=zn(n),s=Bn(n),c=Un(n)===`y`,l=Sa.has(o)?-1:1,u=a&&c?-1:1,d=Rn(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var wa=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ca(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Ta=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Rn(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Un(i),p=Vn(f),m=u[p],h=u[f],g=(e,t)=>Ln(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Ea=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Rn(e,t),u={x:n,y:r},d=Un(i),f=Vn(d),p=u[f],m=u[d],h=Rn(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Sa.has(zn(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Da=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Rn(e,t),c=await i.detectOverflow(t,s),l=zn(n),u=Bn(n),d=Un(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=jn(p-c[m],g),y=jn(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Mn(c.left,c.right):S=p-2*Mn(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Oa(e){let t=Ie(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ce(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Nn(n)!==a||Nn(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ka(e){return Se(e)?e:e.contextElement}function Aa(e){let t=ka(e);if(!Ce(t))return Fn(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Oa(t),o=(a?Nn(n.width):n.width)/r,s=(a?Nn(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var ja=Fn(0);function Ma(e){let t=ye(e);return!Pe()||!t.visualViewport?ja:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Na(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===ye(e)}function Pa(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ka(e),o=Fn(1);t&&(r?Se(r)&&(o=Aa(r)):o=Aa(e));let s=Na(a,n,r)?Ma(a):Fn(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=ye(a),t=Se(r)?ye(r):r,n=e,i=Ve(n);for(;i&&t!==n;){let e=Aa(i),t=i.getBoundingClientRect(),r=Ie(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=ye(i),i=Ve(n)}}return rr({width:u,height:d,x:c,y:l})}function Fa(e,t){let n=Le(e).scrollLeft;return t?t.left+n:Pa(be(e)).left+n}function Ia(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Fa(e,n),y:n.top+t.scrollTop}}function La(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=be(r),s=t?De(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Fn(1),u=Fn(0),d=Ce(r);if((d||!a)&&((ve(r)!==`body`||Te(o))&&(c=Le(r)),d)){let e=Pa(r);l=Aa(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ia(o,c):Fn(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Ra(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function za(e){let t=Le(e),n=e.ownerDocument.body,r=Mn(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Mn(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Fa(e),o=-t.scrollTop;return Ie(n).direction===`rtl`&&(a+=Mn(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Ba=25;function Va(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=ye(e),a=be(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Pe()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Fa(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Ba&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Ha(e,t){let n=Pa(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Aa(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ua(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Va(e,n,t);else if(t===`document`)r=za(be(e));else if(Se(t))r=Ha(t,n);else{let n=Ma(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return rr(r)}function Wa(e,t){let n=t.get(e);if(n)return n;let r=Be(e,[],!1).filter(e=>Se(e)&&ve(e)!==`body`),i=null,a=Ie(e).position===`fixed`,o=a?Re(e):e;for(;Se(o)&&!Fe(o);){let e=Ie(o),t=Me(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Re(o)}return t.set(e,r),r}function Ga(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?De(t)?[]:Wa(t,this._c):[].concat(n),r],o=Ua(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ua(t,a[e],i);s=Mn(n.top,s),c=jn(n.right,c),l=jn(n.bottom,l),u=Mn(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ka(e){let{width:t,height:n}=Oa(e);return{width:t,height:n}}function qa(e,t,n){let r=Ce(t),i=be(t),a=n===`fixed`,o=Pa(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Fn(0);if((r||!a)&&((ve(t)!==`body`||Te(i))&&(s=Le(t)),r)){let e=Pa(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Fa(i));let l=i&&!r&&!a?Ia(i,s):Fn(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Ja(e){return Ie(e).position===`static`}function Ya(e,t){if(!Ce(e)||Ie(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return be(e)===n&&(n=n.ownerDocument.body),n}function Xa(e,t){let n=ye(e);if(De(e))return n;if(!Ce(e)){let t=Re(e);for(;t&&!Fe(t);){if(Se(t)&&!Ja(t))return t;t=Re(t)}return n}let r=Ya(e,t);for(;r&&Ee(r)&&Ja(r);)r=Ya(r,t);return r&&Fe(r)&&Ja(r)&&!Me(r)?n:r||Ne(e)||n}var Za=async function(e){let t=this.getOffsetParent||Xa,n=this.getDimensions,r=await n(e.floating);return{reference:qa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Qa(e){return Ie(e).direction===`rtl`}var $a={convertOffsetParentRelativeRectToViewportRelativeRect:La,getDocumentElement:be,getClippingRect:Ga,getOffsetParent:Xa,getElementRects:Za,getClientRects:Ra,getDimensions:Ka,getScale:Aa,isElement:Se,isRTL:Qa};function eo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function to(e,t,n){let r=null,i,a=be(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Pn(d),h=Pn(a.clientWidth-(u+f)),g=Pn(a.clientHeight-(d+p)),_=Pn(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Mn(0,jn(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!eo(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=ye(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function no(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=ka(e),u=i||a?[...l?Be(l):[],...t?Be(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?to(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Pa(e):null;c&&g();function g(){let t=Pa(e);h&&!eo(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var ro=wa,io=Ta,ao=xa,oo=Da,so=Ea,co=(e,t,n)=>{let r=new Map,i=n??{},a={...$a,...i.platform,_c:r};return ba(e,t,{...i,platform:a})},lo=typeof document<`u`?b.useLayoutEffect:function(){};function uo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!uo(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!uo(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function fo(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function po(e,t){let n=fo(e);return Math.round(t*n)/n}function mo(e){let t=b.useRef(e);return lo(()=>{t.current=e}),t}function ho(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=b.useState(r);uo(f,r)||p(r);let[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),y=b.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=b.useRef(null),w=b.useRef(null),T=b.useRef(u),E=c!=null,D=mo(c),O=mo(i),k=mo(l),A=b.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),co(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!uo(T.current,t)&&(T.current=t,zi.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);lo(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=b.useRef(!1);lo(()=>(j.current=!0,()=>{j.current=!1}),[]),lo(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=b.useMemo(()=>({reference:C,floating:w,setReference:v,setFloating:y}),[v,y]),N=b.useMemo(()=>({reference:x,floating:S}),[x,S]),P=b.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=po(N.floating,u.x),r=po(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...fo(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var go=(e,t)=>{let n=ro(e);return{name:n.name,fn:n.fn,options:[e,t]}},_o=(e,t)=>{let n=io(e);return{name:n.name,fn:n.fn,options:[e,t]}},vo=(e,t)=>({fn:so(e).fn,options:[e,t]}),yo=(e,t)=>{let n=ao(e);return{name:n.name,fn:n.fn,options:[e,t]}},bo=(e,t)=>{let n=oo(e);return{name:n.name,fn:n.fn,options:[e,t]}},xo=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),So=o(((e,t)=>{t.exports=xo()})),Co=o((e=>{var t=d(),n=So();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),wo=o(((e,t)=>{t.exports=Co()})),To=So(),Eo=wo(),Do=oi(19)?Ao:jo;function Oo(e,t,n,r,i){return Do(e,t,n,r,i)}function ko(e,t,n,r,i){let a=b.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,To.useSyncExternalStore)(e.subscribe,a,a)}E({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,To.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Ao(e,t,n,r,i){let a=T();if(!a)return ko(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function jo(e,t,n,r,i){return(0,Eo.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Mo=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Oo(this,e,t,n,r)}},No=class extends Mo{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){b.useDebugValue(e);let n=this;N(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;N(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;N(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){b.useDebugValue(e);let n=this,r=t!==void 0;N(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return b.useDebugValue(e),Oo(this,this.selectors[e],t,n,r)}useContextCallback(e,t){b.useDebugValue(e);let n=X(t??A);this.context[e]=n}useStateSetter(e){let t=b.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}};function Po(){let[,e]=b.useState({});return b.useCallback(()=>{e({})},[])}var Fo={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},Io=class extends No{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Gi(),nested:n,triggerElements:i},Fo),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&ge(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Lo(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=o,f=b.useRef(null);r===void 0&&f.current===null&&(f.current=new Io({open:s,transitionStatus:void 0,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:d,floatingId:i,syncOnly:!0,nested:a}));let p=r??f.current;return t.useSyncedValue(`floatingId`,i),N(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};Se(c)&&(e.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(e.positionReference=c),p.update(e)},[s,i,c,l,p]),p.context.onOpenChange=d,p.context.nested=a,p}function Ro(e,t=!1,n=!1,r=!1){let[i,a]=b.useState(e&&t?`idle`:void 0),[o,s]=b.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),N(()=>{if(!e&&o&&i!==`ending`&&n){let e=wn.request(()=>{a(`ending`)});return()=>{wn.cancel(e)}}},[e,o,i,n]),N(()=>{if(!e||t)return;let n=wn.request(()=>{a(void 0)});return()=>{wn.cancel(n)}},[t,e]),N(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=wn.request(()=>{a(`idle`)});return()=>{wn.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}var zo=null;function Bo(e){if(!zo){let e=[];zo=e,queueMicrotask(()=>{zo=null,zi.flushSync(()=>{for(let t of e)t()})})}zo.push(e)}function Vo(e,t=!1,n=!1){let r=Tn();return X((i,a=null)=>{r.cancel();let o=ea(e);if(o==null)return;let s=o,c=()=>{if(!n){zi.flushSync(i);return}Bo(()=>{a?.aborted||i()})};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()},()=>{if(!a?.aborted){if(s.getAnimations().some(e=>e.pending||e.playState!==`finished`)){l();return}c()}})}if(t){let e=Xe;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function Ho(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=X(a),s=Vo(r,n,i);b.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}var Uo={tabIndex:-1,[We]:``};function Wo(e){return t=>t!==`touch`||e.current}function Go(e,t=!1){let n=ii(),r=Yi()!=null,i=S(()=>e(n,r)).current;return Lo({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function Ko({handle:e,store:t}){return N(()=>e.attachStore(t),[e,t]),null}function qo(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function Jo(e,t){let n=b.useRef(null);return X(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),qo(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),qo(t))})}function Yo(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s}}function Xo(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function Zo(e,t,n,r={}){let i=n.reason,a=i===At,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=Xo(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=Yo(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?zi.flushSync(l):l()}function Qo(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=Jo(e,n),o=X(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e);return}if(a==null&&i){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=X(e=>{a(e),e&&o(e)});return N(()=>(s(t.current),()=>s(null)),[s,t,n,e]),N(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function $o(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=b.useRef(null),i=e.useState(`open`);N(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=J(Ot);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function es(e,t,n,r){let{mounted:i,setMounted:a,transitionStatus:o}=Ro(e,!1,!1,r),s=t.useState(`preventUnmountingOnClose`),c=!e&&s;t.useSyncedValues({mounted:i,transitionStatus:o,preventUnmountingOnClose:c});let l=X(()=>{a(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return Ho({enabled:i&&!e&&!c,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:o}}function ts(e,t){e.useSyncedValues(t),N(()=>()=>{e.update({activeTriggerProps:M,inactiveTriggerProps:M,popupProps:M})},[e])}function ns(e,t){N(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),N(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var rs=class{constructor(){this.idMap=new Map}add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}};function is(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Io({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:M,inactiveTriggerProps:M,popupProps:M}}var as=e=>e.triggerIdProp??e.activeTriggerId,os=e=>e.openProp??e.open,ss=e=>(e.popupElement?.id??e.floatingId)||void 0;function cs(e,t){return t!==void 0&&os(e)&&as(e)===t}function ls(e,t){return cs(e,t)?!0:t!==void 0&&os(e)&&as(e)==null&&e.triggerCount===1}var us={open:os,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:as,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:ss,isTriggerActive:(e,t)=>t!==void 0&&as(e)===t,isOpenedByTrigger:(e,t)=>cs(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&as(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>ls(e,t)?ss(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function ds(e){let t=b.useCallback(t=>e===void 0?A:e.subscribeStore(t),[e]),n=b.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,To.useSyncExternalStore)(t,n,()=>e?.serverStore)}function fs(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=ii(),a=Yi()!=null,o=S(()=>new Io({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new rs,floatingId:i,syncOnly:!1,nested:a})).current;return N(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=Se(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function ps(e){return ms(e,e.rootContext)}function ms(e,t){let{nodeId:n,externalTree:r}=e,i=t.useState(`referenceElement`),a=t.useState(`floatingElement`),o=t.useState(`domReferenceElement`),s=t.useState(`open`),c=t.useState(`floatingId`),[l,u]=b.useState(null),[d,f]=b.useState(void 0),[p,m]=b.useState(void 0),h=b.useRef(null),g=Xi(r),_=b.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),v=ho({...e,elements:{..._,...l&&{reference:l}}}),y=Se(d)?d:null,x=p===void 0?t.state.floatingElement:p;t.useSyncedValue(`referenceElement`,d??null),t.useSyncedValue(`domReferenceElement`,d===void 0?o:y),t.useSyncedValue(`floatingElement`,x);let S=b.useCallback(e=>{let t=Se(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),v.refs.setReference(t)},[v.refs]),C=b.useCallback(e=>{(Se(e)||e===null)&&(h.current=e,f(e)),(Se(v.refs.reference.current)||v.refs.reference.current===null||e!==null&&!Se(e))&&v.refs.setReference(e)},[v.refs,f]),w=b.useCallback(e=>{m(e),v.refs.setFloating(e)},[v.refs]),T=b.useMemo(()=>({...v.refs,setReference:C,setFloating:w,setPositionReference:S,domReference:h}),[v.refs,C,w,S]),E=b.useMemo(()=>({...v.elements,domReference:o}),[v.elements,o]),D=b.useMemo(()=>({...v,dataRef:t.context.dataRef,open:s,onOpenChange:t.setOpen,events:t.context.events,floatingId:c,refs:T,elements:E,nodeId:n,rootStore:t}),[v,T,E,n,t,s,c]);return N(()=>{o&&(h.current=o)},[o]),N(()=>{t.context.dataRef.current.floatingContext=D;let e=g?.nodesRef.current.find(e=>e.id===n);e&&(e.context=D)}),b.useMemo(()=>({...v,context:D,refs:T,elements:E,rootStore:t}),[v,T,E,D,t])}var hs=G&&se;function gs(e,t={}){let{enabled:n=!0,delay:r}=t,i=`rootStore`in e?e.rootStore:e,{events:a,dataRef:o}=i.context,s=b.useRef(!1),c=b.useRef(null),l=b.useRef(!0),u=V();b.useEffect(()=>{let e=i.select(`domReferenceElement`);if(!n)return;let t=ye(e);function r(){let e=i.select(`domReferenceElement`);!i.select(`open`)&&Ce(e)&&e===He(En(e))&&(s.current=!0,c.current=e)}function a(){l.current=!0}function o(){l.current=!1}return cn(sn(t,`blur`,r),hs&&sn(t,`keydown`,a,!0),hs&&sn(t,`pointerdown`,o,!0))},[i,n]),b.useEffect(()=>{if(!n)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=i.select(`domReferenceElement`);Se(e)&&(c.current=e,s.current=!0)}}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[a,n,i]);let d=b.useMemo(()=>{function e(){s.current=!1,c.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(s.current){if(c.current===n)return;e()}let a=Ue(t.nativeEvent);if(Se(a)){if(hs&&!t.relatedTarget){if(!l.current&&!vt(a))return}else if(!xt(a))return}let o=gt(t.relatedTarget,i.context.triggerElements),{nativeEvent:d,currentTarget:f}=t,p=typeof r==`function`?r():r;if(i.select(`open`)&&o||p===0||p===void 0){i.setOpen(!0,J(jt,d,f));return}u.start(p,()=>{s.current||i.setOpen(!0,J(jt,d,f))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,a=Se(n)&&n.hasAttribute(Br(`focus-guard`))&&n.getAttribute(`data-type`)===`outside`;u.start(0,()=>{let e=i.select(`domReferenceElement`),t=He(En(e));(n||t!==e)&&(K(o.current.floatingContext?.refs.floating.current,t)||K(e,t)||a||gt(n??t,i.context.triggerElements)||i.setOpen(!1,J(jt,r)))})}}},[o,r,i,u]);return b.useMemo(()=>n?{reference:d,trigger:d}:{},[n,d])}var _s=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new B,this.restTimeout=new B,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},vs=new WeakMap;function ys(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&vs.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),vs.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function bs(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=vs.get(n);a&&a!==e&&ys(a),ys(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,vs.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function xs(e){let t=e.context.dataRef.current,n=S(()=>t.hoverInteractionState??_s.create()).current;return t.hoverInteractionState||=n,R(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Ss(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=`rootStore`in e?e.rootStore:e,o=a.useState(`open`),s=a.useState(`floatingElement`),c=a.useState(`domReferenceElement`),{dataRef:l}=a.context,u=Xi(),d=Yi(),f=xs(a),p=V(),m=X(()=>Et(l.current.openEvent?.type,f.interactedInside)),h=X(()=>Dt(l.current.openEvent?.type)),g=X(()=>{ys(f)});N(()=>{o||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[o,f,g]),b.useEffect(()=>g,[g]),N(()=>{if(n&&o&&f.handleCloseOptions?.blockPointerEvents&&h()&&Se(c)&&s){let e=c,t=s,n=En(s),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=f.pointerEventsScopeElement===t?null:f.pointerEventsScopeElement,a=r===t?null:r,o=f.handleCloseOptions?.getScope?.()??i??a??e.closest(`[data-rootownerid]`)??n.body;return bs(f,{scopeElement:o,referenceElement:e,floatingElement:t}),()=>{g()}}},[n,o,c,s,f,h,u,d,g]),b.useEffect(()=>{if(!n)return;function e(){return!!(u&&d&&Rr(u.nodesRef.current,d).length>0)}function t(e){let t=wt(r,`close`,f.pointerType),n=()=>{a.setOpen(!1,J(At,e)),u?.events.emit(`floating.closed`,e)};t?f.openChangeTimeout.start(t,n):(f.openChangeTimeout.clear(),n())}function o(e){let t=Ue(e);if(!yt(t)){f.interactedInside=!1;return}f.interactedInside=t?.closest(`[aria-haspopup]`)!=null}function c(){f.openChangeTimeout.clear(),p.clear(),u?.events.off(`floating.closed`,v),g()}function _(n){if(e()&&u){u.events.on(`floating.closed`,v);return}if(gt(n.relatedTarget,a.context.triggerElements))return;let r=l.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(u&&r&&Se(o)&&Rr(u.nodesRef.current,r,!1).some(e=>K(e.context?.elements.floating,o)))){if(f.handler){f.handler(n);return}g(),h()&&!m()&&t(n)}}function v(t){u&&d&&!e()&&p.start(0,()=>{u.events.off(`floating.closed`,v),a.setOpen(!1,J(At,t)),u.events.emit(`floating.closed`,t)})}let y=s;return cn(y&&sn(y,`mouseenter`,c),y&&sn(y,`mouseleave`,_),y&&sn(y,`pointerdown`,o,!0),()=>{u?.events.off(`floating.closed`,v)})},[n,s,a,l,r,i,h,m,g,f,u,d,p])}var Cs={current:null};function ws(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=Cs,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,h=`rootStore`in e?e.rootStore:e,{dataRef:g,events:_}=h.context,v=Xi(l),y=xs(h),x=b.useRef(!1),S=hn(i),C=hn(r),w=hn(o),T=hn(n),E=hn(p),D=hn(f),O=X(()=>Et(g.current.openEvent?.type,y.interactedInside)),k=X(()=>E.current?.()!==!1),A=X((e,t,n)=>{let r=h.context.triggerElements;if(r.hasElement(t))return!e||!K(e,t);if(!Se(n))return!1;let i=n;return r.hasMatchingElement(e=>K(e,i))&&(!e||!K(e,i))}),j=X(()=>{y.handler&&=(En(h.select(`domReferenceElement`)).removeEventListener(`mousemove`,y.handler),void 0)}),M=X(()=>{ys(y)});return u&&(y.handleCloseOptions=i?.__options),b.useEffect(()=>j,[j]),b.useEffect(()=>{if(!n)return;function e(e){e.open?x.current=!1:(x.current=e.reason===At,j(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}return _.on(`openchange`,e),()=>{_.off(`openchange`,e)}},[n,_,y,j]),b.useEffect(()=>{if(!n)return;function e(e,t=!0){let n=wt(C.current,`close`,y.pointerType);n?y.openChangeTimeout.start(n,()=>{h.setOpen(!1,J(At,e)),v?.events.emit(`floating.closed`,e)}):t&&(y.openChangeTimeout.clear(),h.setOpen(!1,J(At,e)),v?.events.emit(`floating.closed`,e))}let t=c.current??(u?h.select(`domReferenceElement`):null);if(!Se(t))return;function r(e){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,a&&!he(y.pointerType))return;let t=Tt(w.current),n=wt(C.current,`open`,y.pointerType),r=Ue(e),i=e.currentTarget??null,o=h.select(`domReferenceElement`),s=i;if(Se(r)&&!h.context.triggerElements.hasElement(r)){for(let e of h.context.triggerElements.elements())if(K(e,r)){s=e;break}}Se(i)&&Se(o)&&!h.context.triggerElements.hasElement(i)&&K(i,o)&&(s=o);let c=s!=null&&A(o,s,r),l=h.select(`open`),u=D.current?.()??h.select(`transitionStatus`)===`ending`,d=!l&&u&&x.current,f=!c&&Se(s)&&Se(o)&&K(o,s)&&d,p=t>0&&!n,m=c&&(l||d)||f,g=!l||c;if(m){k()&&h.setOpen(!0,J(At,e,s));return}p||(n?y.openChangeTimeout.start(n,()=>{g&&k()&&h.setOpen(!0,J(At,e,s))}):g&&k()&&h.setOpen(!0,J(At,e,s)))}function i(t){if(O()){M();return}j();let n=En(h.select(`domReferenceElement`));y.restTimeout.clear(),y.restTimeoutPending=!1;let r=g.current.floatingContext??d?.();if(!gt(t.relatedTarget,h.context.triggerElements)){if(S.current&&r){h.select(`open`)||y.openChangeTimeout.clear();let i=c.current;y.handler=S.current({...r,tree:v,x:t.clientX,y:t.clientY,onClose(){M(),j(),T.current&&!O()&&i===h.select(`domReferenceElement`)&&e(t,!0)}}),n.addEventListener(`mousemove`,y.handler),y.handler(t);return}(y.pointerType!==`touch`||!K(h.select(`floatingElement`),t.relatedTarget))&&e(t)}}function o(e){K(t,e.relatedTarget)||(y.openChangeTimeout.clear(),y.restTimeout.clear(),y.restTimeoutPending=!1)}let l=m?sn(t,`mouseout`,o):void 0;return s?cn(sn(t,`mousemove`,r,{once:!0}),sn(t,`mouseenter`,r),sn(t,`mouseleave`,i),l):cn(sn(t,`mouseenter`,r),sn(t,`mouseleave`,i),l)},[j,M,g,C,h,n,S,y,u,A,O,a,s,w,c,v,T,d,D,k,m]),b.useMemo(()=>{if(!n)return;function e(e){y.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,r=h.select(`domReferenceElement`),i=h.select(`open`),o=A(r,n,e.target);if(a&&!he(y.pointerType))return;if(i&&o&&y.handleCloseOptions?.blockPointerEvents){let e=h.select(`floatingElement`);if(e){let t=y.handleCloseOptions?.getScope?.()??n.ownerDocument.body;bs(y,{scopeElement:t,referenceElement:n,floatingElement:e})}}let s=Tt(w.current);if(i&&!o||s===0||!o&&y.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;y.restTimeout.clear();function c(){if(y.restTimeoutPending=!1,O())return;let e=h.select(`open`);!y.blockMouseMove&&(!e||o)&&k()&&h.setOpen(!0,J(At,t,n))}y.pointerType===`touch`?zi.flushSync(()=>{c()}):o&&i?c():(y.restTimeoutPending=!0,y.restTimeout.start(s,c))}}},[n,y,O,A,a,h,w,k])}var Ts=`Escape`;function Es(e){return se&&e.movementX===0&&e.movementY===0}function Ds(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Os(e,t){return Ds(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function ks(e,t,n){return Ds(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function As(e,t,n){return Ds(t,n?e===Ke:e===qe,e===Ye)}function js(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===Ts:Ds(t,n?e===qe:e===Ke,e===Je)}function Ms(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,parentOrientation:_,id:v,resetOnPointerLeave:y=!0,externalTree:x,grid:S}=t,C=S!=null,w=`rootStore`in e?e.rootStore:e,T=w.useState(`open`),E=w.useState(`floatingElement`),D=w.useState(`domReferenceElement`),O=w.context.dataRef,k=St(E),A=bt(D),j=hn(k),M=Yi(),P=Xi(x),F=b.useRef(f),I=b.useRef(o??-1),L=b.useRef(null),R=b.useRef(!0),z=X(e=>{i(I.current===-1?null:I.current,e)}),B=b.useRef(!!E),V=b.useRef(T),H=b.useRef(!1),U=b.useRef(!1),ee=b.useRef(null),te=hn(h),ne=hn(T),W=hn(o),re=hn(y),ie=Tn(),ae=Tn(),G=X(()=>{function e(e){d?P?.events.emit(`virtualfocus`,e):ee.current=Hr(e,{sync:H.current,preventScroll:!0})}let t=n.current[I.current],r=U.current;t&&e(t),(H.current?e=>e():e=>ie.request(e))(()=>{let i=n.current[I.current]||t;i&&(t||e(i),fe&&(r||!R.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});N(()=>{O.current.orientation=g},[O,g]),N(()=>{a&&(T&&E?(I.current=o??-1,F.current&&o!=null&&(U.current=!0,z())):B.current&&(I.current=-1,z()))},[a,T,E,o,z]),N(()=>{if(a){if(!T){H.current=!1;return}if(E){if(r==null){if(H.current=!1,W.current!=null)return;if(B.current&&(I.current=-1,G()),(!V.current||!B.current)&&F.current&&(L.current!=null||F.current===!0&&L.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>ae.request(e):queueMicrotask)(t),e+=1):(I.current=L.current==null||ks(L.current,g,u)||l?or(n):sr(n),L.current=null,z())};t()}}else ar(n.current,r)||(I.current=r,G(),U.current=!1)}}},[a,T,E,r,W,l,n,g,u,z,G,ae]),N(()=>{if(!a||E||!P||d||!B.current)return;let e=P.nodesRef.current,t=e.find(e=>e.id===M)?.context?.elements.floating,n=He(En(D??t??null)),r=e.some(e=>e.context&&K(e.context.elements.floating,n));t&&!r&&R.current&&t.focus({preventScroll:!0})},[a,E,D,P,M,d]),N(()=>{V.current=T,B.current=!!E}),N(()=>{T||(L.current=null,F.current=f)},[T,f]);let oe=r!=null,se=X(e=>{if(!ne.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(I.current!==t||r!==t)&&(I.current=t,z(e))}),ce=X(()=>_??P?.nodesRef.current.find(e=>e.id===M)?.context?.dataRef?.current.orientation),le=X(()=>or(n,te.current)),ue=X(e=>{if(R.current=!1,H.current=!0,e.which===229||!ne.current&&e.currentTarget===j.current)return;if(l&&js(e.key,g,u,C)){Os(e.key,ce())||de(e),w.setOpen(!1,J(Wt,e.nativeEvent)),Ce(D)&&(d?P?.events.emit(`virtualfocus`,D):D.focus());return}let t=I.current,r=or(n,h),i=sr(n,h);if(A||(e.key===`Home`&&(de(e),I.current=r,z(e)),e.key===`End`&&(de(e),I.current=i,z(e))),S!=null){let t=S(e,I.current,n,g,c,u,h,r,i);if(t!=null&&(I.current=t,z(e)),g===`both`)return}if(Os(e.key,g)){if(de(e),T&&!d&&He(e.currentTarget.ownerDocument)===e.currentTarget){I.current=ks(e.key,g,u)?r:i,z(e);return}ks(e.key,g,u)?c?t>=i?s&&t!==n.current.length?I.current=-1:(H.current=!1,I.current=r):I.current=cr(n.current,{startingIndex:t,disabledIndices:h}):I.current=Math.min(i,cr(n.current,{startingIndex:t,disabledIndices:h})):c?t<=r?s&&t!==-1?I.current=n.current.length:(H.current=!1,I.current=i):I.current=cr(n.current,{startingIndex:t,decrement:!0,disabledIndices:h}):I.current=Math.max(r,cr(n.current,{startingIndex:t,decrement:!0,disabledIndices:h})),ar(n.current,I.current)&&(I.current=-1),z(e)}}),fe=b.useMemo(()=>({onFocus(e){H.current=!0,se(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){Es(e)||(H.current=!0,U.current=!1,p&&se(e))},onPointerLeave(e){if(!ne.current||!R.current||e.pointerType===`touch`)return;H.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&re.current&&(ee.current?.(),ee.current=null,I.current=-1,z(e),!d)){let e=j.current,t=He(En(e));e&&K(e,t)&&e.focus({preventScroll:!0})}}}),[se,ne,j,p,n,z,re,d]),he=b.useMemo(()=>d&&T&&oe&&{"aria-activedescendant":`${v}-${r}`},[d,T,oe,v,r]),ge=b.useMemo(()=>({...A?{}:he,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&T&&!d){let t=Ue(e.nativeEvent);if(t&&!K(j.current,t))return;de(e),w.setOpen(!1,J(Ht,e.nativeEvent)),Ce(D)&&D.focus();return}ue(e)},onPointerMove(e){Es(e)||(R.current=!0)}}),[he,ue,j,A,w,T,d,D]),_e=b.useMemo(()=>{function e(e){w.setOpen(!0,J(Wt,e.nativeEvent,e.currentTarget))}function t(e){f===`auto`&&pe(e.nativeEvent)&&(F.current=!d)}function n(e){F.current=f,f===`auto`&&me(e.nativeEvent)&&(F.current=!0)}return{onKeyDown(t){let n=w.select(`open`);R.current=!1;let r=t.key.startsWith(`Arrow`),i=As(t.key,ce(),u),a=Os(t.key,g),o=(l?i:a)||t.key===`Enter`||t.key.trim()===``;if(d&&n)return ue(t);if(n||m||!r){if(o){let e=Os(t.key,ce());L.current=l&&e?null:t.key}if(l){i&&(de(t),n?(I.current=le(),z(t)):e(t));return}a&&(W.current!=null&&(I.current=W.current),de(t),!n&&m?e(t):ue(t),n&&z(t))}},onFocus(e){w.select(`open`)&&!d&&(I.current=-1,z(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[ue,f,le,l,z,w,m,g,ce,u,W,d]),ve=b.useMemo(()=>({...he,..._e}),[he,_e]);return b.useMemo(()=>a?{reference:ve,floating:ge,item:fe,trigger:_e}:{},[a,ve,ge,_e,fe])}function Ns(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=`rootStore`in e?e.rootStore:e,f=d.useState(`open`),p=V(),m=b.useRef(``),h=b.useRef(u??i??-1),g=b.useRef(null),_=X(e=>{function t(e){return r?.current[e]}function c(e){let n=t(e);return n&&!fr(n)||n?.matches(`:disabled`)?!1:o==null||!ur(j,e,o)}function d(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&c(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(de(e),s?.(!0)),m.current.length>0&&m.current[0]!==` `&&d(_,m.current)===-1&&e.key!==` `&&s?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(de(e),s?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&c(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,s?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=d(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,s?.(!1)):(a?.(b),g.current=b)}),v=X(e=>{let t=e.relatedTarget,n=d.select(`domReferenceElement`),r=d.select(`floatingElement`);K(n,t)||K(r,t)||(p.clear(),m.current=``,h.current=g.current,s?.(!1))});N(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``))},[f,u,p]);let y=b.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return b.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var Ps=.1,Fs=Ps*Ps,Is=.5;function Ls(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Rs(e,t,n,r,i,a,o,s,c,l){let u=!1;return Ls(e,t,n,r,i,a)&&(u=!u),Ls(e,t,i,a,o,s)&&(u=!u),Ls(e,t,o,s,c,l)&&(u=!u),Ls(e,t,c,l,n,r)&&(u=!u),u}function zs(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Bs(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Vs(e={}){let{blockPointerEvents:t=!1}=e,n=new B,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Fs;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=Ue(r),g=r.type===`mouseleave`,_=K(u,h),v=K(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&Se(r.relatedTarget)&&K(u,r.relatedTarget))return;function y(){return!!(s&&Rr(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=Bs(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Bs(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Bs(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Bs(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!zs(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?Is/2:Is*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Is+1,o=C||T?S.bottom-Is:S.top,s=C?T?S.bottom-Is:S.top:S.bottom-Is;M=Rs(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Is/2:Is*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Is,o=C||T?S.top+Is:S.bottom,s=C?T?S.top+Is:S.bottom:S.top+Is;M=Rs(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Is/2:Is*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Is+1,o=w||E?S.right-Is:S.left,s=w?E?S.right-Is:S.left:S.right-Is;M=Rs(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Is/2:Is*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Is,o=w||E?S.left+Is:S.right,s=w?E?S.left+Is:S.right:S.left+Is;M=Rs(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}var Hs={...us,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},Us=class extends No{constructor(e,t,n){let r=new rs;super(Ws(e,r,t,n),Gs(r),Hs)}setOpen=(e,t)=>{Zo(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,J(kt,e))}};function Ws(e,t,n,r=!1){return{...is(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function Gs(e){return{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var Ks=D(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=Go((e,t)=>new Us({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),$o(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:x}=es(h,p),S=p.useState(`isInstantPhase`),C=p.useState(`instantType`),w=p.useState(`lastOpenChangeReason`),T=b.useRef(null);N(()=>{m&&t&&p.setOpen(!1,J(Xt))},[m,t,p]),N(()=>{x===`ending`&&w===`none`||x!==`ending`&&S?(C!==`delay`&&(T.current=C),p.set(`instantType`,`delay`)):T.current!==null&&(p.set(`instantType`,T.current),T.current=null)},[x,S,w,C,p]),N(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),b.useImperativeHandle(o,()=>({unmount:y,close:()=>p.setOpen(!1,J($t))}),[y,p]);let E=h||_||!t&&a!==`none`;return(0,Y.jsxs)(I.Provider,{value:p,children:[l&&(0,Y.jsx)(Ko,{handle:l,store:p}),E&&(0,Y.jsx)(qs,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function qs({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=ga(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=pa(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=b.useMemo(()=>pi(a.reference,i.reference),[a.reference,i.reference]);return ts(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??M}),null}function Js(e){return ii(e,`base-ui`)}var Ys=b.createContext(void 0);function Xs(){return b.useContext(Ys)}var Zs=`data-base-ui-tooltip-trigger`;function Qs(e){if(`composedPath`in e){let t=e.composedPath();for(let e=0;e<t.length;e+=1){let n=t[e];if(Se(n))return n}}let t=e.target;return Se(t)?t:null}function $s(e){let t=e;for(;t;){let e=t.closest(`[${Zs}]`);if(e)return e;let n=t.getRootNode();t=`host`in n&&Se(n.host)?n.host:null}return null}var ec=O(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=L(!0),m=ds(a)??p;if(!m)throw Error(F(82));let h=Js(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=b.useRef(null),x=u??0,{registerTrigger:S,isMountedByThisTrigger:C}=Qo(h,y,m,{payload:o,closeOnClick:l,closeDelay:x}),w=Xs(),{activeIdRef:T,delayRef:E,isInstantPhase:D,hasProvider:O}=on(v,{open:_}),k=xs(v);m.useSyncedValue(`isInstantPhase`,D);let A=m.useState(`disabled`),j=s??A,M=hn(j),N=m.useState(`trackCursorAxis`),P=m.useState(`disableHoverablePopup`),I=b.useRef(!1),R=V(),z=b.useRef(void 0);function B(){return O&&T.current!=null?0:c??w??600}function H(e){let t=y.current;if(!t||!e)return!1;let n=$s(e);return n!==null&&n!==t&&K(t,n)}function U(e){let t=H(e);return I.current=t,t&&(k.openChangeTimeout.clear(),k.restTimeout.clear(),k.restTimeoutPending=!1,R.clear()),t}let ee=ws(v,{enabled:!j,mouseOnly:!0,move:!1,handleClose:!P&&N!==`both`?Vs():null,restMs:B,delay(){return u==null&&O?{close:wt(E.current,`close`)}:{close:x}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!I.current}}),te=gs(v,{enabled:!j}).reference,ne=e=>{let t=I.current,n=Qs(e),r=U(n),i=y.current,a=i&&n&&K(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`){m.setOpen(!1,J(At,e));return}if(t&&!r&&a&&!M.current&&!m.select(`open`)&&i&&he(z.current)){let t=()=>{!I.current&&!M.current&&!m.select(`open`)&&m.setOpen(!0,J(At,e,i))},n=B();n===0?(R.clear(),t()):R.start(n,t)}},W=m.useState(`triggerProps`,C);return Di(`button`,e,{state:{open:_},ref:[t,S,y],props:[ee,te,C||N!==`none`?W:void 0,{onMouseOver(e){ne(e.nativeEvent)},onFocus(e){H(Qs(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){I.current=!1,R.clear(),z.current=void 0},onPointerEnter(e){z.current=e.pointerType},onPointerDown(e){z.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[ht]:j?``:void 0,[Zs]:j?void 0:``},f],stateAttributesMapping:dt})}),tc=b.createContext(void 0);function nc(){let e=b.useContext(tc);if(e===void 0)throw Error(F(70));return e}var rc=b.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=Ui({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,Y.jsxs)(b.Fragment,{children:[l,c&&zi.createPortal(n,c)]})}),ic=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return L().useState(`mounted`)||n?(0,Y.jsx)(tc.Provider,{value:n,children:(0,Y.jsx)(rc,{ref:t,...r})}):null}),ac=b.createContext(void 0);function oc(){let e=b.useContext(ac);if(e===void 0)throw Error(F(71));return e}var sc=b.createContext(void 0);function cc(){return b.useContext(sc)?.direction??`ltr`}var lc=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=Rn(e,t)||{};if(l==null)return{};let f=nr(u),p={x:n,y:r},m=Wn(i),h=Hn(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=Ln(k,j,A),N=!c.arrow&&Bn(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),uc=(e,t)=>{let{name:n,fn:r}=lc(e);return{name:n,fn:r,options:[e,t]}},dc={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},fc={sideX:`left`,sideY:`top`},pc=`--available-width`,mc=`--available-height`,hc=`--anchor-width`,gc=`--anchor-height`,_c=`--transform-origin`,vc=pc,yc=mc;function bc(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function xc(e,t,n){let{rects:r,placement:i}=e;return{side:bc(t,zn(i),n),align:Bn(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Sc(e){return Cc(e,ps)}function Cc(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:v,nodeId:y,adaptiveOrigin:x,lazyFlip:S=!1,externalTree:C}=e,[w,T]=b.useState(null);!g&&w!==null&&T(null);let E=_.side||`flip`,D=_.align||`flip`,O=_.fallbackAxisSide||`end`,k=v?.crossAxis??!1,A=v?.rootBoundary,j=typeof n==`function`?n:void 0,M=X(j),P=j?M:n,F=hn(n),I=hn(g),L=cc()===`rtl`,R=w||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":L?`left`:`right`,"inline-start":L?`right`:`left`}[i],z=o===`center`?R:`${R}-${o}`,B=l;typeof B==`number`?B={top:B,right:B,bottom:B,left:B}:B&&={top:B.top||0,right:B.right||0,bottom:B.bottom||0,left:B.left||0};let V=+(i===`bottom`),H=+(i===`top`),U=+(i===`right`),ee=+(i===`left`),te={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:B},ne=b.useRef(null),W=hn(a),re=hn(s),ie=typeof a==`function`?0:a,ae=typeof s==`function`?0:s,G=[];p&&G.push(p),G.push(go(e=>{let t=xc(e,i,L),n=typeof W.current==`function`?W.current(t):W.current,r=typeof re.current==`function`?re.current(t):re.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[ie,ae,L,i]));let oe=D===`none`&&E!==`shift`,se=!oe&&(u||k||E===`shift`),ce=E===`none`?null:yo({...te,padding:{top:B.top+1+V,right:B.right+1+ee,bottom:B.bottom+1+H,left:B.left+1+U},mainAxis:!k&&E===`flip`,crossAxis:D===`flip`&&`alignment`,fallbackAxisSideDirection:O}),le=oe?null:_o({...te,rootBoundary:A,mainAxis:D!==`none`,crossAxis:se,limiter:u||k?void 0:vo(e=>{if(!ne.current)return{};let{width:t,height:n}=ne.current.getBoundingClientRect(),r=Un(zn(e.placement)),i=r===`y`?t:n,a=r===`y`?B.left+B.right:B.top+B.bottom;return{offset:i/2+a/2}})},[te,u,k,A,B,D]);E===`shift`||D===`shift`||o===`center`?G.push(le,ce):G.push(ce,le),G.push(bo({...te,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!I.current)return;let i=e.style;i.setProperty(vc,`${t}px`),i.setProperty(yc,`${n}px`);let a=ye(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(hc,`${u}px`),i.setProperty(gc,`${d}px`)}}),uc(e=>({element:ne.current||En(e.elements.floating).createElement(`div`),padding:ne.current?d:0,offsetParent:`floating`}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=zn(r),u=Bn(r),d=Un(l)===`y`,f=ne.current,p=typeof a==`function`?a(xc(e,i,L)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return se&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(_c,d?`${m} ${h}`:`${h} ${m}`),{}}},dc,x),N(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let ue=b.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:de,elements:fe,x:pe,y:me,middlewareData:he,update:ge,placement:_e,context:ve,isPositioned:be,floatingStyles:xe}=t({rootContext:h,open:m?g:void 0,placement:z,middleware:G,strategy:r,whileElementsMounted:m?void 0:(...e)=>no(...e,ue),nodeId:y,externalTree:C}),{sideX:Se,sideY:Ce}=he.adaptiveOrigin||fc,we=be?r:`fixed`,Te=b.useMemo(()=>{let e;return e=be?x?{position:we,[Se]:pe,[Ce]:me}:{...xe,position:we}:{position:we,top:0,left:0},e[vc]=`100vw`,e[yc]=`100vh`,be||(e.opacity=0),e},[x,we,Se,pe,Ce,me,xe,be]),Ee=b.useRef(null);N(()=>{if(!g)return;let e=F.current,t=typeof e==`function`?e():e,n=(wc(t)?t.current:t)||null;n!==Ee.current&&(de.setPositionReference(n),Ee.current=n)},[g,de,P,F]),b.useEffect(()=>{if(!g)return;let e=F.current;typeof e!=`function`&&wc(e)&&e.current!==Ee.current&&(de.setPositionReference(e.current),Ee.current=e.current)},[g,de,P,F]),b.useEffect(()=>{if(m&&g&&fe.reference&&fe.floating)return no(fe.reference,fe.floating,ge,ue)},[m,g,fe,ge,ue]);let De=zn(_e),Oe=bc(i,De,L),ke=Bn(_e)||`center`,Ae=!!he.hide?.referenceHidden;N(()=>{S&&g&&be&&De!==R&&T(De)},[S,g,be,De,R]);let je=b.useMemo(()=>({position:`absolute`,top:he.arrow?.y,left:he.arrow?.x}),[he.arrow]),Me=he.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:Te,arrowStyles:je,arrowRef:ne,arrowUncentered:Me,side:Oe,align:ke,physicalSide:De,anchorHidden:Ae,refs:de,context:ve,isPositioned:be,update:ge}),[Te,je,ne,Me,Oe,ke,De,Ae,de,ve,be,ge])}function wc(e){return e!=null&&`current`in e}function Tc(e){return e===`starting`?Pi:M}function Ec(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),Di(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},Tc(r),i],stateAttributesMapping:pt})}var Dc=b.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Li,style:g,..._}=e,v=L(),y=nc(),x=v.useState(`open`),S=v.useState(`mounted`),C=v.useState(`trackCursorAxis`),w=v.useState(`disableHoverablePopup`),T=v.useState(`floatingRootContext`),E=v.useState(`instantType`),D=v.useState(`transitionStatus`),O=Sc({anchor:i,positionMethod:a,floatingRootContext:T,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`adaptiveOrigin`)}),k=Ec(e,b.useMemo(()=>({open:x,side:O.side,align:O.align,anchorHidden:O.anchorHidden,instant:C===`none`?E:`tracking-cursor`}),[x,O.side,O.align,O.anchorHidden,C,E]),{styles:O.positionerStyles,transitionStatus:D,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!S,inert:!x||C===`both`||w});return(0,Y.jsx)(ac.Provider,{value:O,children:k})}),Oc=b.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=L(),{side:s,align:c}=oc(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);Ho({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),Ss(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return Di(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[Uo,f,Tc(d),a],stateAttributesMapping:mt})}),kc=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=b.useMemo(()=>({open:t,close:n}),[t,n]);return(0,Y.jsx)(Ys.Provider,{value:t,children:(0,Y.jsx)(an,{delay:i,timeoutMs:r,children:e.children})})};function Ac(e){return oi(19)?e:e?`true`:void 0}function jc({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=b.useRef(e!==void 0),[a,o]=b.useState(t);return[i&&e!==void 0?e:a,b.useCallback(e=>{i||o(e)},[])]}var Mc=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Nc(){return b.useContext(Mc)}function Pc(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=X(i),[,o]=b.useState(!1),s=S(Ic).current,c=S(Fc).current,l=b.useRef(0),u=b.useRef(!0),d=b.useRef(null),f=b.useRef(null),p=X(()=>{u.current||(u.current=!0,o(e=>!e))}),m=X((e,t)=>{c.set(e,t),p()}),h=X(e=>{c.delete(e),p()}),g=X(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function _(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!zc(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&Bc(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=Rc(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let v=X(()=>{let[e,t]=Lc(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});_(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});N(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),N(()=>{u.current&&v()}),N(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let y=X(e=>(s.add(e),()=>{s.delete(e)})),x=b.useMemo(()=>({register:m,unregister:h,subscribeMapChange:y,nextIndexRef:l}),[m,h,y,l]);return(0,Y.jsx)(Mc.Provider,{value:x,children:t})}function Fc(){return new Map}function Ic(){return new Set}function Lc(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>Bc(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function Rc(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function zc(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function Bc(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function Vc(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var Hc=`ArrowUp`,Uc=`ArrowDown`,Wc=`ArrowLeft`,Gc=`ArrowRight`,Kc=new Set([Hc,Uc,Wc,Gc,`Home`,`End`]),qc=[`Shift`,`Control`,`Alt`,`Meta`];function Jc(e){return Ce(e)&&e.tagName===`INPUT`}function Yc(e){return!!(Jc(e)&&e.selectionStart!=null||Ce(e)&&e.tagName===`TEXTAREA`)}function Xc(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=Zc(e,t,`left`),a=Qc(e),o=Qc(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=Zc(e,t,`top`),r=Qc(e),i=Qc(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function Zc(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function Qc(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var $c=`data-composite-item-active`;function el(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:c,enableHomeAndEndKeys:l=!1,stopEventPropagation:u,disabledIndices:d,modifierKeys:f=j}=e,[p,m]=b.useState(0),h=r!=null,g=b.useRef(null),_=ln(g,c),v=b.useRef([]),y=b.useRef(!1),x=b.useRef(null),S=o??p,C=X((e,t=!1)=>{if(x.current=v.current[e]??null,(s??m)(e),t){let t=v.current[e];Xc(g.current,t,a,n)}}),w=X(e=>{if(e.size===0)return;if(y.current){let e=v.current,t=e.indexOf(x.current);if(t===-1){let t=e[S];!t||ur(e,S,d)?C(tl(e,d)):x.current=t}else t!==S&&C(t);return}y.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)C(i);else if(ur(t,S,d)){let e=cr(t,{disabledIndices:d});ar(t,e)||C(e)}Xc(g.current,r,a,n)});N(()=>{if(d==null||o!=null||!y.current)return;let e=v.current;if(ur(e,S,d)){let t=cr(e,{disabledIndices:d});ar(e,t)||C(t)}},[d,o,S,v,C]);let T=X((e,t,n)=>i?i(e,t,n,v):n),E=X(e=>{let o=e.key===`Home`||e.key===`End`;if(!Kc.has(e.key)||!l&&o||nl(e,f)||!g.current)return;let s=a===`rtl`,c=s?Wc:Gc,p=s?Gc:Wc,m=n===`vertical`?Uc:c,_=n===`vertical`?Hc:p,y=Ue(e.nativeEvent);if(y!=null&&Yc(y)&&!Vc(y)){let t=y.selectionStart,n=y.selectionEnd,r=y.value;if(t==null||e.shiftKey||t!==n||e.key!==_&&t<r.length||e.key!==m&&t>0)return}let b=S,x=or(v,d),w=sr(v,d);r!=null&&(b=r({disabledIndices:d,elementsRef:v,event:e,highlightedIndex:S,loopFocus:t,maxIndex:w,minIndex:x,onLoop:T,orientation:n,rtl:s}));let E=n!==`vertical`&&e.key===c||n!==`horizontal`&&e.key===`ArrowDown`,D=n!==`vertical`&&e.key===p||n!==`horizontal`&&e.key===`ArrowUp`;l&&(e.key===`Home`?b=x:e.key===`End`&&(b=w)),b===S&&(E||D)&&(t&&b===w&&E?(b=x,i&&(b=i(e,S,b,v))):t&&b===x&&D?(b=w,i&&(b=i(e,S,b,v))):b=cr(v.current,{startingIndex:b,decrement:D,disabledIndices:d})),b!==S&&!ar(v.current,b)&&(u&&e.stopPropagation(),(h||o||E||D)&&e.preventDefault(),C(b,!0),queueMicrotask(()=>{v.current[b]?.focus()}))});return{props:{ref:_,onFocus(e){let t=g.current,n=Ue(e.nativeEvent);t&&n!=null&&Yc(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:E},highlightedIndex:S,onHighlightedIndexChange:C,elementsRef:v,onMapChange:w,relayKeyboardEvent:E}}function tl(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i&&!ur(e,r,t)){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function nl(e,t){for(let n of qc)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}var rl=b.createContext(void 0);function il(e=!1){let t=b.useContext(rl);if(t===void 0&&!e)throw Error(F(16));return t}function al(e){let{render:t,className:n,style:r,refs:i=j,props:a=j,state:o=M,stateAttributesMapping:s,highlightedIndex:c,onHighlightedIndexChange:l,orientation:u,grid:d,loopFocus:f,onLoop:p,enableHomeAndEndKeys:m,onMapChange:h,stopEventPropagation:g=!0,rootRef:_,disabledIndices:v,modifierKeys:y,highlightItemOnHover:x=!1,tag:S=`div`,...C}=e,{props:w,highlightedIndex:T,onHighlightedIndexChange:E,elementsRef:D,onMapChange:O,relayKeyboardEvent:k}=el({grid:d,loopFocus:f,onLoop:p,orientation:u,highlightedIndex:c,onHighlightedIndexChange:l,rootRef:_,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:cc(),disabledIndices:v,modifierKeys:y}),A=Di(S,e,{state:o,ref:i,props:[w,...a,C],stateAttributesMapping:s}),N=b.useMemo(()=>({highlightedIndex:T,onHighlightedIndexChange:E,highlightItemOnHover:x,relayKeyboardEvent:k}),[T,E,x,k]);return(0,Y.jsx)(rl.Provider,{value:N,children:(0,Y.jsx)(Pc,{elementsRef:D,onMapChange:e=>{h?.(e),O(e)},children:A})})}var ol=b.createContext(void 0);function sl(e){let t=b.useContext(ol);if(t===void 0&&!e)throw Error(F(69));return t}var cl=b.createContext(void 0);function ll(){return b.useContext(cl)}var ul=b.createContext(void 0);function dl(){return b.useContext(ul)}var fl=b.forwardRef(function(e,t){let{defaultValue:n,disabled:r=!1,loopFocus:i=!0,onValueChange:a,orientation:o=`horizontal`,multiple:s=!1,value:c,className:l,render:u,style:d,...f}=e,p=sl(!0),m=ll(),h=n??j,g=c!==void 0||n!==void 0,_=(p?.disabled??!1)||(m?.disabled??!1)||r,[v,y]=jc({controlled:c,default:h,name:`ToggleGroup`,state:`value`}),x=X((e,t,n)=>{let r;s?(r=v.slice(),t?r.push(e):r.splice(v.indexOf(e),1)):r=t?[e]:[],a?.(r,n),!n.isCanceled&&y(r)}),S={disabled:_,multiple:s,orientation:o},C=b.useMemo(()=>({disabled:_,setGroupValue:x,value:v,isValueInitialized:g}),[_,x,v,g]),w={role:`group`},T=Di(`div`,e,{enabled:!!p,state:S,ref:t,props:[w,f]});return(0,Y.jsx)(ul.Provider,{value:C,children:p?T:(0,Y.jsx)(al,{render:u,className:l,style:d,state:S,refs:[t],props:[w,f],loopFocus:i,enableHomeAndEndKeys:!0,orientation:o})})});function pl(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:b.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function ml(e,t,{detail:n=0}={}){e.dispatchEvent(new(ye(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function hl(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=b.useRef(null),s=il(!0),c=a??s!==void 0,{props:l}=pl({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=b.useCallback(()=>{let e=o.current;gl(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return N(u,[u]),{getButtonProps:b.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return pi({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(wi(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=gl(r),s=!i&&_l(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),ml(r,e));return}if(!l||i||!d&&!u){n&&s&&d&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),ml(r,e)))},onKeyUp(e){if(!t){if(wi(e),a?.(e),e.target===e.currentTarget&&i&&c&&gl(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),ml(e.currentTarget,e))}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:X(e=>{o.current=e,u()})}}function gl(e){return Ce(e)&&e.tagName===`BUTTON`}function _l(e){return Ce(e)&&e.tagName===`A`&&!!e.href}function vl(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=Nc(),u=b.useRef(-1),[d,f]=b.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=b.useRef(null),h=b.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return N(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}function yl(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=il(),{ref:i,index:a}=vl(e),o=n===a,s=b.useRef(null),c=ln(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}function bl(e){let{render:t,className:n,style:r,state:i=M,props:a=j,refs:o=j,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=yl({metadata:s});return Di(l,e,{state:i,ref:[f,...o],props:[d,...a,u],stateAttributesMapping:c})}var xl=b.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:i=!1,form:a,onPressedChange:o,pressed:s,render:c,type:l,value:u,nativeButton:d=!0,style:f,...p}=e,m=Js(u||void 0),h=dl(),g=h?.value??[],_=(i||h?.disabled)??!1,[v,y]=jc({controlled:h?m!==void 0&&g.indexOf(m)>-1:s,default:r,name:`Toggle`,state:`pressed`}),{getButtonProps:x,buttonRef:S}=hl({disabled:_,native:d}),C={disabled:_,pressed:v},w=[S,t],T=[{"aria-pressed":v,onClick(e){let t=!v,n=J(Ot,e.nativeEvent);o?.(t,n),!n.isCanceled&&(m&&h?.setGroupValue?.(m,t,n),!n.isCanceled&&y(t))}},p,x],E=Di(`button`,e,{enabled:!h,state:C,ref:w,props:T}),D=b.useMemo(()=>({disabled:_,focusableWhenDisabled:!1}),[_]);return h?(0,Y.jsx)(bl,{tag:`button`,render:c,className:n,style:f,metadata:D,state:C,refs:w,props:T}):E}),Sl=b.createContext(void 0);function Cl(e){let t=b.useContext(Sl);if(!e&&t===void 0)throw Error(F(27));return t}var wl=b.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=Cl(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return Di(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:mt,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),Tl=b.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=Cl(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=hl({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,J(Pt,e.nativeEvent))}return Di(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),El=b.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Cl(),c=Js(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),Di(`p`,e,{ref:t,props:[{id:c},o]})}),Dl=b.createContext(void 0);function Ol(){let e=b.useContext(Dl);if(e===void 0)throw Error(F(26));return e}var kl=`--nested-dialogs`,Al=`data-nested-dialog-open`,jl={...pt,...et,nestedDialogOpen(e){return e?{[Al]:``}:null}},Ml=b.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=Cl(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`);Ol(),Ho({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let C=o===void 0?Wo(c.context.popupRef):o,w=g>0,T=c.useStateSetter(`popupElement`),E=Di(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...Uo,hidden:!m,onKeyDown(e){Kc.has(e.key)&&e.stopPropagation()},style:{[kl]:g}},s],ref:[t,c.context.popupRef,T],stateAttributesMapping:jl});return(0,Y.jsx)(la,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:E})}),Nl=b.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,Y.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),Pl=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=Cl(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,Y.jsx)(Dl.Provider,{value:n,children:(0,Y.jsxs)(Wi,{ref:t,...r,children:[a&&o===!0&&(0,Y.jsx)(Nl,{ref:i.context.internalBackdropRef,inert:Ac(!s)}),e.children]})}):null}),Fl={},Il={},Ll=``;function Rl(e,t){return Te(e)?e:t}function zl(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Rl(t,n)).overflowY)}function Bl(e){if(typeof document>`u`)return!1;let t=En(e);return ye(t).innerWidth-t.documentElement.clientWidth>0}function Vl(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=En(e),n=t.documentElement,r=t.body,i=Rl(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Hl(e){let t=En(e),n=t.documentElement,r=t.body,i=Rl(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Ul(e){let t=En(e),n=t.documentElement,r=t.body,i=ye(n),a=0,o=0,s=!1,c=wn.create();if(se&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Fl={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Ll=n.style.scrollBehavior,Il={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Rl(n,r);if(s=Vl(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,Fl),Object.assign(r.style,Il),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Ll)}function d(){u(),c.request(l)}l();let f=sn(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Wl=new class{lockCount=0;restore=null;timeoutLock=B.create();timeoutUnlock=B.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=En(e),n=t.documentElement,r=t.body,i=ye(n);if(zl(i,n,r)){let t=new i.MutationObserver(()=>{zl(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=re||!Bl(e);this.restore=a?Hl(e):Ul(e)}};function Gl(e=!0,t=null){N(()=>{if(e)return Wl.acquire(t)},[e,t])}function Kl({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`disablePointerDismissal`),a=e.useState(`modal`),o=e.useState(`popupElement`),s=e.useState(`floatingRootContext`),[c,l]=b.useState(0),[u,d]=b.useState(0),f=c===0,p=ga(s,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:a===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=Ue(t);if(f&&!i){if(a){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||K(n,o)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:f});return Gl(r&&a===!0,o),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{l(e),d(t)}),N(()=>(t?.onNestedDialogOpen&&(r?t.onNestedDialogOpen(c+1,u+ +!!n):t.onNestedDialogOpen(0,0)),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,c,u,t]),ts(e,{activeTriggerProps:p.reference,inactiveTriggerProps:p.trigger,popupProps:p.floating,nestedOpenDialogCount:c,nestedOpenDrawerCount:u}),null}var ql={...us,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},Jl=class extends No{constructor(e,t,n){let r=new rs,i=Yl(e,r,t,n);super(i,Xl(r),ql)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),!t.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(Yo(this.state,e,t.trigger)))}};function Yl(e,t,n,r=!1){return{...is(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function Xl(e){return{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function Zl(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=Cl(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},x=Go((e,t)=>new Jl({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y},e,t),!0);x.useControlledProp(`openProp`,r),x.useControlledProp(`triggerIdProp`,d),x.useSyncedValues(y),x.useContextCallback(`onOpenChange`,a),x.useContextCallback(`onOpenChangeComplete`,o);let S=x.useState(`open`),C=x.useState(`mounted`),w=x.useState(`payload`);ns(x,S),$o(x);let{forceUnmount:T}=es(S,x);b.useImperativeHandle(l,()=>({unmount:T,close:()=>x.setOpen(!1,J($t))}),[T,x]);let E=S||C;return(0,Y.jsxs)(Sl.Provider,{value:x,children:[u&&(0,Y.jsx)(Ko,{handle:u,store:x}),E&&(0,Y.jsx)(Kl,{store:x,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:w}):n]})}var Ql=D(function(e){return Zl(`dialog`,e)}),$l=b.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Cl(),c=Js(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),Di(`h2`,e,{ref:t,props:[{id:c},o]})});function eu(e){let t=b.useRef(``),n=b.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:b.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function tu(e,t){let n=b.useRef(e),r=X(t);N(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function nu(e,t){let{onClick:n,onPointerDown:r}=eu(X((n,r)=>{(typeof e==`function`?e():e)||t(r||(re?`touch`:``))}));return b.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function ru(e){let[t,n]=b.useState(null),r=nu(e,n);return tu(e,t=>{t&&!e&&n(null)}),b.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var iu=O(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,payload:c,handle:l,...u}=e,d=Cl(!0),f=ds(l)??d;if(!f)throw Error(F(79));let p=Js(s),m=f.useState(`floatingRootContext`),h=f.useState(`isOpenedByTrigger`,p),g=f.useState(`triggerPopupId`,p),_=b.useRef(null),{registerTrigger:v,isMountedByThisTrigger:y}=Qo(p,_,f,{payload:c}),{getButtonProps:x,buttonRef:S}=hl({disabled:a,native:o}),C=ua(m),w=nu(()=>f.select(`open`),e=>{f.set(`openMethod`,e)}),T={disabled:a,open:h},E=f.useState(`triggerProps`,y);return Di(`button`,e,{state:T,ref:[S,t,v,_],props:[C.reference,E,w,{[Fi]:``,id:p,"aria-haspopup":`dialog`,"aria-expanded":h,"aria-controls":g},u,x],stateAttributesMapping:dt})}),au=b.createContext(void 0);function ou(){let e=b.useContext(au);if(e===void 0)throw Error(F(64));return e}var su=`data-activation-direction`,cu={tabActivationDirection:e=>({[su]:e})},lu=b.forwardRef(function(e,t){let{className:n,defaultValue:r=0,onValueChange:i,orientation:a=`horizontal`,render:o,value:s,style:c,...l}=e,u=e.defaultValue!==void 0,d=b.useRef([]),[f,p]=b.useState(()=>new Map),[m,h]=jc({controlled:s,default:r,name:`Tabs`,state:`value`}),g=s!==void 0,[_,v]=b.useState(()=>new Map),y=b.useRef(void 0),x=b.useCallback(e=>uu(_,e),[_]),[S,C]=b.useState(()=>({previousValue:m,tabActivationDirection:`none`})),{previousValue:w,tabActivationDirection:T}=S,E=T,D=!1;w!==m&&(E=du(w,m,a,_),D=w!=null&&m!=null&&x(m)==null);let O=D?w:m,k=w!==O||T!==E;N(()=>{k&&C({previousValue:O,tabActivationDirection:E})},[O,k,E]);let A=X((e,t)=>{t.activationDirection=du(m,e,a,_),i?.(e,t),!t.isCanceled&&h(e)}),j=X((e,t)=>{i?.(e,J(t,void 0,void 0,{activationDirection:`none`}))}),M=X((e,t)=>(p(n=>{let r=new Map(n);return r.set(e,t),r}),()=>{p(n=>{if(n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})})),P=b.useCallback(e=>f.get(e),[f]),F=b.useCallback(e=>{for(let t of _.values())if(e===t.value)return t.id},[_]),I=b.useMemo(()=>({getTabElementBySelectedValue:x,getTabIdByPanelValue:F,getTabPanelIdByValue:P,onValueChange:A,orientation:a,registerMountedTabPanel:M,setTabMap:v,tabActivationDirection:E,value:m}),[x,F,P,A,a,M,v,E,m]),L=b.useMemo(()=>{for(let e of _.values())if(e.value===m)return e},[_,m]),R=b.useMemo(()=>{for(let e of _.values())if(!e.disabled)return e.value},[_]),z=b.useRef(!u),B=b.useRef(r),V=b.useRef(u),H=b.useRef(!1);N(()=>{if(g)return;function e(e,t){h(e),C({previousValue:e,tabActivationDirection:`none`}),j(e,t),z.current=!1}if(_.size===0){H.current&&m!==null&&!y.current?.isConnected&&e(null,Zt);return}H.current=!0,y.current=_.keys().next().value;let t=L?.disabled,n=L==null&&m!==null;if(!t&&m===B.current&&(V.current=!1),V.current&&t&&m===B.current)return;let r=z.current;if(t||n){let n=R??null;if(m===n){z.current=!1;return}let i=Zt;r?i=Qt:t&&(i=Xt),e(n,i);return}r&&L!=null&&(j(m,Qt),z.current=!1)},[R,g,j,L,h,_,m]);let U=Di(`div`,e,{state:{orientation:a,tabActivationDirection:E},ref:t,props:l,stateAttributesMapping:cu});return(0,Y.jsx)(au.Provider,{value:I,children:(0,Y.jsx)(Pc,{elementsRef:d,children:U})})});function uu(e,t){for(let[n,r]of e.entries())if(t===r.value)return n;return null}function du(e,t,n,r){if(e==null||t==null)return`none`;let[i,a,o]=n===`horizontal`?[`left`,`left`,`right`]:[`top`,`up`,`down`],s=uu(r,e),c=uu(r,t);if(s==null||c==null)return s!==c&&(typeof e==`number`||typeof e==`string`)&&typeof e==typeof t?t>e?o:a:`none`;let l=s.getBoundingClientRect()[i],u=c.getBoundingClientRect()[i];return u<l?a:u>l?o:`none`}var fu=b.createContext(void 0);function pu(){let e=b.useContext(fu);if(e===void 0)throw Error(F(65));return e}var mu=b.forwardRef(function(e,t){let{className:n,disabled:r=!1,render:i,value:a,id:o,nativeButton:s=!0,style:c,...l}=e,{value:u,getTabPanelIdByValue:d,onValueChange:f,orientation:p,tabActivationDirection:m}=ou(),{activateOnFocus:h,registerTabResizeObserverElement:g,tabsListElement:_}=pu(),{highlightedIndex:v,onHighlightedIndexChange:y}=il(),x=Js(o),{compositeProps:S,compositeRef:C,index:w}=yl({metadata:b.useMemo(()=>({disabled:r,id:x,value:a}),[r,x,a])}),T=a===u,E=b.useRef(!1),D=b.useRef(null),O=X(e=>{D.current?.(),D.current=e?g(e):null});N(()=>{if(E.current){E.current=!1;return}if(!(T&&w>-1&&v!==w))return;let e=_;if(e!=null){let t=He(En(e));if(t&&K(e,t))return}r||y(w)},[T,w,v,y,r,_]);let{getButtonProps:k,buttonRef:A}=hl({disabled:r,native:s,focusableWhenDisabled:!0}),j=d(a),M=b.useRef(!1),P=b.useRef(!1);function F(e){f(a,J(Ot,e.nativeEvent,void 0,{activationDirection:`none`}))}function I(e){T||r||F(e)}function L(e){T||r||h&&(!M.current||P.current)&&F(e)}function R(e){if(T||r)return;M.current=!0,P.current=e.button===0;let t=En(e.currentTarget);function n(){M.current=!1,P.current=!1,t.removeEventListener(`pointerup`,n),t.removeEventListener(`pointercancel`,n)}t.addEventListener(`pointerup`,n),t.addEventListener(`pointercancel`,n)}return Di(`button`,e,{state:{disabled:r,active:T,orientation:p,tabActivationDirection:m},ref:[t,A,C,O],props:[S,{role:`tab`,"aria-controls":j,"aria-selected":T,id:x,onClick:I,onFocus:L,onPointerDown:R,[$c]:T?``:void 0,onKeyDownCapture(){E.current=!0}},l,k],stateAttributesMapping:cu})}),hu=`data-index`,gu={...cu,...et},_u=b.forwardRef(function(e,t){let{className:n,value:r,render:i,keepMounted:a=!1,style:o,...s}=e,{value:c,getTabIdByPanelValue:l,orientation:u,tabActivationDirection:d,registerMountedTabPanel:f}=ou(),p=Js(),{ref:m,index:h}=vl(),g=r===c,{mounted:_,transitionStatus:v,setMounted:y}=Ro(g),x=!_,S=l(r),C={hidden:x,orientation:u,tabActivationDirection:d,transitionStatus:v},w=b.useRef(null),T=Di(`div`,e,{state:C,ref:[t,m,w],props:[{"aria-labelledby":S,hidden:x,id:p,role:`tabpanel`,tabIndex:g?0:-1,inert:Ac(!g),[hu]:h},s],stateAttributesMapping:gu});return Ho({open:g,ref:w,onComplete(){g||y(!1)}}),N(()=>{if(!(p==null||x&&!a))return f(r,p)},[x,a,r,p,f]),a||_?T:null}),vu=b.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,style:o,...s}=e,{orientation:c,setTabMap:l,tabActivationDirection:u}=ou(),[d,f]=b.useState(0),[p,m]=b.useState(null),h=b.useRef(new Set),g=b.useRef(new Set),_=b.useRef(null);N(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{h.current.forEach(e=>{e()})});return _.current=e,p&&e.observe(p),g.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),_.current=null}},[p]);let v=X(e=>(h.current.add(e),()=>{h.current.delete(e)})),y=X(e=>(g.current.add(e),_.current?.observe(e),()=>{g.current.delete(e),_.current?.unobserve(e)})),x={orientation:c,tabActivationDirection:u},S={"aria-orientation":c===`vertical`?`vertical`:void 0,role:`tablist`},C=b.useMemo(()=>({activateOnFocus:n,registerIndicatorUpdateListener:v,registerTabResizeObserverElement:y,tabsListElement:p}),[n,v,y,p]);return(0,Y.jsx)(fu.Provider,{value:C,children:(0,Y.jsx)(al,{render:a,className:r,style:o,state:x,refs:[t,m],props:[S,s],stateAttributesMapping:cu,highlightedIndex:d,enableHomeAndEndKeys:!0,loopFocus:i,orientation:c,onHighlightedIndexChange:f,onMapChange:l,disabledIndices:j})})}),yu=b.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return Di(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})}),bu=b.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=hl({disabled:i,focusableWhenDisabled:a,native:o});return Di(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})}),xu=b.createContext(void 0);function Su(e=!0){let t=b.useContext(xu);if(t===void 0&&!e)throw Error(F(25));return t}var Cu=b.createContext(void 0);function wu(e){let t=b.useContext(Cu);if(t===void 0&&!e)throw Error(F(33));return t}var Tu=b.createContext(void 0);function Eu(e){let t=b.useContext(Tu);if(t===void 0&&!e)throw Error(F(36));return t}function Du(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,{events:l}=a.useState(`floatingTreeRoot`),u=a.useState(`open`),d=Su(!0),f=d!==void 0;return b.useMemo(()=>({id:r,role:`menuitem`,tabIndex:u&&n?0:-1,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&l.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&l.emit(`close`,{domEvent:e,reason:Nt})},onMouseUp(e){if(d){let t=d.initialCursorPointRef.current;if(d.initialCursorPointRef.current=null,f&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||f&&!G&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!f||e.button===2)&&c.type===`regular-item`&&ml(s.current,e,{detail:1})}}),[t,n,r,l,i,u,a,o,s,d,f,c])}var Ou={type:`regular-item`};function ku(e){let{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,u=b.useRef(null),{getButtonProps:d,buttonRef:f}=hl({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=Du({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=b.useCallback(e=>pi(p,{onMouseEnter(){c.type===`submenu-trigger`&&c.setActive()}},e,d),[p,d,c]),h=ln(u,f);return b.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var Au=b.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,d=vl({guess:!0,label:a}),f=wu(!0),p=Js(i),{store:m}=Eu(),h=m.useState(`disabled`),g=s||h,_=m.useState(`isActive`,d.index),v=m.useState(`itemProps`),{getItemProps:y,itemRef:b}=ku({closeOnClick:c,disabled:g,highlighted:_,id:p,store:m,nativeButton:o,nodeId:f?.context.nodeId,itemMetadata:Ou});return Di(`div`,e,{state:{disabled:g,highlighted:_},props:[v,u,y],ref:[b,t,d.ref]})}),ju=b.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s}=Eu(),{side:c,align:l}=wu(),u=sl(!0)!=null,d=s.useState(`open`),f=s.useState(`transitionStatus`),p=s.useState(`popupProps`),m=s.useState(`mounted`),h=s.useState(`instantType`),g=s.useState(`activeTriggerElement`),_=s.useState(`parent`),v=s.useState(`lastOpenChangeReason`),y=s.useState(`rootId`),x=s.useState(`floatingRootContext`),S=s.useState(`floatingTreeRoot`),C=s.useState(`closeDelay`),w=s.useState(`hoverEnabled`),T=s.useState(`disabled`),E=s.useState(`openMethod`),D=_.type===`context-menu`;Ho({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),b.useEffect(()=>{function e(e){s.setOpen(!1,J(e.reason,e.domEvent))}return S.events.on(`close`,e),()=>{S.events.off(`close`,e)}},[S.events,s]),Ss(x,{enabled:w&&!T&&!D&&_.type!==`menubar`,closeDelay:C});let O=s.useStateSetter(`popupElement`),k=Di(`div`,e,{state:{transitionStatus:f,side:c,align:l,open:d,nested:_.type===`menu`,instant:h},ref:[t,s.context.popupRef,O],stateAttributesMapping:mt,props:[p,{onKeyDown(e){u&&Kc.has(e.key)&&e.stopPropagation()}},Tc(f),o,{"data-rootownerid":y}]}),A=_.type===void 0||D;return(g||_.type===`menubar`&&v!==`outside-press`)&&(A=!0),(0,Y.jsx)(la,{context:x,openInteractionType:E,modal:D,disabled:!m,returnFocus:a===void 0?A:a,initialFocus:_.type!==`menu`,restoreFocus:!0,externalTree:_.type===`menubar`?void 0:S,previousFocusableElement:g,nextFocusableElement:_.type===void 0?s.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:_.type===void 0?s.context.beforeContentFocusGuardRef:void 0,children:k})}),Mu=b.createContext(void 0);function Nu(){let e=b.useContext(Mu);if(e===void 0)throw Error(F(32));return e}var Pu=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i,parent:a}=Eu();if(!(i.useState(`mounted`)||n))return null;let o=a.type===`menu`||a.type===`menubar`?`group`:void 0;return(0,Y.jsx)(Mu.Provider,{value:n,children:(0,Y.jsx)(Wi,{ref:t,...r,portalOwnerRole:o})})}),Fu=20;function Iu(e,t,n,r){let[i,a]=b.useState(!1);N(()=>{if(!e||!t||n==null){a(!1);return}let r=En(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-Fu)},[e,t,n]),Gl(e&&(!t||i),r)}var Lu=b.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Ii,style:g,..._}=e,{store:v}=Eu(),y=Nu(),x=Su(!0),S=v.useState(`parent`),C=v.useState(`floatingRootContext`),w=v.useState(`floatingTreeRoot`),T=v.useState(`mounted`),E=v.useState(`open`),D=v.useState(`modal`),O=v.useState(`openMethod`),k=v.useState(`activeTriggerElement`),A=v.useState(`transitionStatus`),j=v.useState(`positionerElement`),M=v.useState(`instantType`),P=v.useState(`adaptiveOrigin`),F=v.useState(`lastOpenChangeReason`),I=v.useState(`floatingNodeId`),L=v.useState(`floatingParentNodeId`),R=C.useState(`domReferenceElement`),z=b.useRef(null),B=Vo(j),H=n,U=c,ee=l,te=s,ne=h;S.type===`context-menu`&&(H=n??S.context?.anchor,te??=`start`,!o&&te!==`center`&&(ee=e.alignOffset??2,U=e.sideOffset??-5));let W=o,re=te;S.type===`menu`?(W??=`inline-end`,re??=`start`,ne=e.collisionAvoidance??Li):S.type===`menubar`&&(W??=S.context.orientation===`vertical`?`inline-end`:`bottom`,re??=`start`);let ie=S.type===`context-menu`,ae=Sc({anchor:H,floatingRootContext:C,positionMethod:x?`fixed`:r,mounted:T,side:W,sideOffset:U,align:re,alignOffset:ee,arrowPadding:ie?0:f,collisionBoundary:u,collisionPadding:d,sticky:p,nodeId:I,keepMounted:y,disableAnchorTracking:m,collisionAvoidance:ne,shift:ie?{crossAxis:!(`side`in ne&&ne.side===`flip`),rootBoundary:`layoutViewport`}:void 0,externalTree:w,adaptiveOrigin:P});b.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===I&&v.set(`hoverEnabled`,!1),e.nodeId!==I&&e.parentNodeId===v.select(`floatingParentNodeId`)&&v.setOpen(!1,J(Yt)))}return w.events.on(`menuopenchange`,e),()=>{w.events.off(`menuopenchange`,e)}},[v,w.events,I]),b.useEffect(()=>{if(v.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==v.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;v.setOpen(!1,J(t))}return w.events.on(`menuopenchange`,e),()=>{w.events.off(`menuopenchange`,e)}},[w.events,v]);let G=V();b.useEffect(()=>{E||G.clear()},[E,G]),b.useEffect(()=>{function e(e){if(E&&e.nodeId===v.select(`floatingParentNodeId`)){if(e.target&&k&&k!==e.target){let e=v.select(`closeDelay`);e>0?G.isStarted()||G.start(e,()=>{v.setOpen(!1,J(Yt))}):v.setOpen(!1,J(Yt))}else G.clear()}}return w.events.on(`itemhover`,e),()=>{w.events.off(`itemhover`,e)}},[w.events,E,k,v,G]),b.useEffect(()=>{let e={open:E,nodeId:I,parentNodeId:L,reason:v.select(`lastOpenChangeReason`)};w.events.emit(`menuopenchange`,e)},[w.events,E,v,I,L]),N(()=>{let e=R,t=z.current;if(e&&(z.current=e),t&&e&&e!==t){v.set(`instantType`,void 0);let e=new AbortController;return B(()=>{v.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[R,B,v]);let oe={open:E,side:ae.side,align:ae.align,anchorHidden:ae.anchorHidden,nested:S.type===`menu`,instant:M},se=S.type===`menubar`&&S.context.modal;Iu(E&&(se||D&&F!==`trigger-hover`),O===`touch`,j,k);let ce=Ec(e,oe,{styles:ae.positionerStyles,transitionStatus:A,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!T,inert:!E}),le=T&&S.type!==`menu`&&(S.type!==`menubar`&&D&&F!==`trigger-hover`||S.type===`menubar`&&S.context.modal),ue=null;return S.type===`menubar`?ue=S.context.contentElement:S.type===void 0&&(ue=k),(0,Y.jsxs)(Cu.Provider,{value:ae,children:[le&&(0,Y.jsx)(Nl,{ref:S.type===`context-menu`||S.type===`nested-context-menu`?S.context.internalBackdropRef:null,inert:Ac(!E),cutout:ue}),(0,Y.jsx)(Qi,{id:I,children:(0,Y.jsx)(Pc,{elementsRef:v.context.itemDomElements,labelsRef:v.context.itemLabels,children:ce})})]})}),Ru=b.createContext(null);function zu(e){let t=b.useContext(Ru);if(t===null&&!e)throw Error(F(5));return t}var Bu={...us,disabled:e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0),openMethod:e=>e.openMethod,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId,activeIndex:e=>e.activeIndex,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)}},Vu=class extends No{constructor(e,t,n=!1){let r=new rs,i=Uu(r,t,n,e);super(i,Hu(r),Bu),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);(t!==i||n!==a||r!==o)&&(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}unsubscribeParentListener=null};function Hu(e){return{positionerRef:b.createRef(),popupRef:b.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function Uu(e,t,n=!1,r){return{...is(e,t,n),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Ki,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:M,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var Wu=b.createContext(void 0);function Gu(){return b.useContext(Wu)}var Ku=D(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,defaultOpen:a=!1,disabled:o=!1,modal:s,loopFocus:c=!0,orientation:l=`vertical`,actionsRef:u,closeParentOnEsc:d=!1,handle:f,triggerId:p,defaultTriggerId:m=null,highlightItemOnHover:h=!0}=e,g=Su(!0),_=Eu(!0),v=zu(!0),y=Gu(),x=b.useMemo(()=>y&&_?{type:`menu`,store:_.store}:v?{type:`menubar`,context:v}:g&&!_?{type:`context-menu`,context:g}:{type:void 0},[g,_,v,y]),C=ii(),w=ii(),T=Yi(),E=x.type===`menu`?x.store:void 0,D=(n??a)&&E?.state.transitionStatus===`starting`,O=S(()=>D?E?.state.instantType:void 0).current,k=qu({open:a,openProp:n,activeTriggerId:m,triggerIdProp:p,parent:x,disabled:o,highlightItemOnHover:h,modal:x.type===void 0?s:void 0,rootId:C,instantType:O},w,T!=null);k.useControlledProp(`openProp`,n),k.useControlledProp(`triggerIdProp`,p),k.useContextCallback(`onOpenChangeComplete`,i);let A=k.useState(`floatingTreeRoot`),P=Zi(A),F=k.useState(`open`),I=k.useState(`activeTriggerElement`),L=k.useState(`positionerElement`),R=k.useState(`hoverEnabled`),z=k.useState(`disabled`),B=k.useState(`lastOpenChangeReason`),H=k.useState(`parent`),U=k.useState(`activeIndex`),ee=k.useState(`payload`),te=k.useState(`floatingParentNodeId`),ne=b.useRef(null),W=b.useRef(H.type!==`context-menu`),re=V(),ie=b.useRef(!0),ae=V(),G=te!=null,{openMethod:oe,triggerProps:se}=ru(F);k.useSyncedValues({disabled:o,highlightItemOnHover:h,modal:H.type===void 0?s:void 0,openMethod:oe,rootId:C}),$o(k);let{forceUnmount:ce,transitionStatus:le}=es(F,k,()=>{k.set(`allowMouseEnter`,!1)},D),ue=Vo(k.context.popupRef);b.useEffect(()=>{if(O===void 0)return;let e=()=>{k.state.instantType===O&&k.set(`instantType`,void 0)};if(!F){e();return}if(le!==void 0)return;if(k.context.popupRef.current==null){e();return}let t=new AbortController;return ue(e,t.signal),()=>{t.abort()}},[O,F,le,ue,k]),N(()=>{g&&!_?k.update({parent:{type:`context-menu`,context:g},floatingNodeId:P,floatingParentNodeId:T}):_&&k.update({floatingNodeId:P,floatingParentNodeId:T})},[g,_,P,T,k]),b.useEffect(()=>{if(F||(ne.current=null),H.type===`context-menu`){if(!F){re.clear(),W.current=!1;return}re.start(500,()=>{W.current=!0})}},[re,F,H.type]),N(()=>{!F&&!R&&k.set(`hoverEnabled`,!0)},[F,R,k]);let de=X((e,t)=>{let n=t.reason;if(!e&&!k.select(`open`)||F===e&&t.trigger===I&&B===n)return;let i=Xo(t);if(!e&&t.trigger==null&&(t.trigger=I??void 0),r?.(e,t),t.isCanceled)return;k.state.floatingRootContext.dispatchOpenChange(e,t);let a=t.event;if(e===!1&&a?.type===`click`&&a.pointerType===`touch`&&!ie.current)return;e&&n===`trigger-focus`?(ie.current=!1,ae.start(300,()=>{ie.current=!0})):(ie.current=!0,ae.clear());let o=(n===`trigger-press`||n===`item-press`)&&a.detail===0,s=!e&&(n===`escape-key`||n==null);ne.current=t.event;let c=Yo(k.state,e,t.trigger,i());c.openChangeReason=n,c.instantType=H.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?`group`:o||s?o?`click`:`dismiss`:void 0,k.update(c)}),fe=Lo({popupStore:k,floatingRootContext:k.state.floatingRootContext,floatingId:w,nested:T!=null,onOpenChange:de}),pe=fe.context.events;N(()=>{let e=({open:e,eventDetails:t})=>de(e,t);return pe.on(`setOpen`,e),()=>{pe?.off(`setOpen`,e)}},[pe,de]);let me=b.useCallback(()=>{k.setOpen(!1,J($t))},[k]);b.useImperativeHandle(u,()=>({unmount:ce,close:me}),[ce,me]);let he;H.type===`context-menu`&&(he=H.context),b.useImperativeHandle(he?.positionerRef,()=>L,[L]),b.useImperativeHandle(he?.actionsRef,()=>({setOpen:de}),[de]);let ge=ga(fe,{enabled:!z,bubbles:{escapeKey:d&&H.type===`menu`},outsidePress(){return H.type!==`context-menu`||ne.current?.type===`contextmenu`||W.current},externalTree:G?A:void 0}),_e=cc(),ve=b.useCallback(e=>{k.select(`activeIndex`)!==e&&k.set(`activeIndex`,e)},[k]),ye=Ms(fe,{enabled:!z,listRef:k.context.itemDomElements,activeIndex:U,nested:H.type!==void 0,loopFocus:c,orientation:l,parentOrientation:H.type===`menubar`?H.context.orientation:void 0,rtl:_e===`rtl`,disabledIndices:j,onNavigate:ve,openOnArrowKeyDown:H.type!==`context-menu`,externalTree:G?A:void 0,focusItemOnHover:h}),be=b.useCallback(e=>{k.context.typingRef.current=e},[k]),xe=Ns(fe,{enabled:!z,listRef:k.context.itemLabels,elementsRef:k.context.itemDomElements,activeIndex:U,resetMs:500,onMatch:e=>{F&&e!==U&&k.set(`activeIndex`,e)},onTyping:be}),Se=b.useMemo(()=>{let e=pi(xe.reference,ye.reference,ge.reference,{onMouseMove(){k.set(`allowMouseEnter`,!0)}},se);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=F,e},[k,xe.reference,ye.reference,ge.reference,se,F]),Ce=b.useMemo(()=>{let e=pi(ye.trigger,ge.trigger,se);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[ye.trigger,ge.trigger,se]);S(()=>(k.update({inactiveTriggerProps:Ce}),null)),ts(k,{floatingRootContext:fe,activeTriggerProps:Se,inactiveTriggerProps:Ce,popupProps:b.useMemo(()=>pi(Uo,{id:w,role:`menu`,"aria-orientation":l===`horizontal`?`horizontal`:void 0,"aria-labelledby":I?.id,onMouseMove(){k.set(`allowMouseEnter`,!0),H.type===`menu`&&k.set(`hoverEnabled`,!1)},onClick(){k.select(`hoverEnabled`)&&k.set(`hoverEnabled`,!1)},onKeyDown(e){let t=k.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},xe.floating,ye.floating,ge.floating),[I,w,l,H.type,k,xe.floating,ye.floating,ge.floating]),itemProps:ye.item??M});let we=b.useMemo(()=>({store:k,parent:x}),[k,x]),Te=(0,Y.jsxs)(Tu.Provider,{value:we,children:[f&&(0,Y.jsx)(Ko,{handle:f,store:k}),typeof t==`function`?t({payload:ee}):t]});return H.type===void 0||H.type===`context-menu`?(0,Y.jsx)($i,{externalTree:A,children:Te}):Te});function qu(e,t,n){return S(()=>new Vu(e,t,n)).current}var Ju=5;function Yu(e,t){let n=Xu(t);return e.clientX>=n.left-Ju&&e.clientX<=n.right+Ju&&e.clientY>=n.top-Ju&&e.clientY<=n.bottom+Ju}function Xu(e){let t=e.getBoundingClientRect(),n=ye(e);if(ue)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function Zu(e){if(Ce(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!Fe(e))return Zu(Re(e))}function Qu(e,t){let n=b.useRef(null);function r(t){zi.flushSync(()=>{e.setOpen(!1,J(Ht,t.nativeEvent,t.currentTarget))}),Pr(n.current)?.focus()}function i(n){let r=e.select(`positionerElement`);if(r&&Fr(n,r))e.context.beforeContentFocusGuardRef.current?.focus();else{zi.flushSync(()=>{e.setOpen(!1,J(Ht,n.nativeEvent,n.currentTarget))});let i=Nr(e.context.triggerFocusTargetRef.current||t.current);for(;i!==null&&K(r,i);){let e=i;if(i=Ar(i),i===e)break}i?.focus()}}return{preFocusGuardRef:n,handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function $u(e){let[t,n]=b.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=b.useRef(null),i=b.useRef(null),a=b.useRef(null),o=b.useRef(null),s=b.useRef(!0),c=b.useRef(null),l=ii(),u=b.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:o,allowMouseUpTriggerRef:s,initialCursorPointRef:c,rootId:l}),[t,l]);return(0,Y.jsx)(xu.Provider,{value:u,children:(0,Y.jsx)(Tu.Provider,{value:void 0,children:(0,Y.jsx)(Ku,{...e})})})}var ed=500,td=b.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{setAnchor:o,actionsRef:s,internalBackdropRef:c,backdropRef:l,positionerRef:u,allowMouseUpTriggerRef:d,initialCursorPointRef:f,rootId:p}=Su(!1),{store:m}=Eu(!1),h=m.useState(`open`),g=m.useState(`disabled`),_=b.useRef(null),v=b.useRef(null),y=V(),x=V(),S=b.useRef(!1),C=b.useRef(null);function w(e,t,n){let r=n.type.startsWith(`touch`);f.current={x:e,y:t},o({getBoundingClientRect(){return DOMRect.fromRect({width:r?10:0,height:r?10:0,x:e,y:t})}}),S.current=!1,s.current?.setOpen(!0,J(kt,n)),x.start(ed,()=>{S.current=!0})}function T(e){if(g)return;d.current=!0,de(e),w(e.clientX,e.clientY,e.nativeEvent);let t=En(_.current);C.current?.abort();let n=new AbortController;C.current=n,t.addEventListener(`mouseup`,e=>{if(d.current=!1,!S.current)return;x.clear(),S.current=!1;let t=Ue(e);K(u.current,t)||p&&t&&Zu(t)===p||s.current?.setOpen(!1,J(Jt,e))},{once:!0,signal:n.signal})}function E(){y.clear(),v.current=null}function D(e){if(g){E();return}if(d.current=!1,e.touches.length!==1){E();return}e.stopPropagation();let t=e.touches[0],n={x:t.clientX,y:t.clientY};v.current=n,y.start(ed,()=>{w(n.x,n.y,e.nativeEvent)})}function O(e){if(e.touches.length!==1){E();return}if(y.isStarted()&&v.current){let t=e.touches[0],n=Math.abs(t.clientX-v.current.x),r=Math.abs(t.clientY-v.current.y);(n>10||r>10)&&E()}}return b.useEffect(()=>()=>{C.current?.abort()},[]),b.useEffect(()=>{function e(e){if(g)return;let t=Ue(e);(K(_.current,t)||K(c.current,t)||K(l.current,t))&&e.preventDefault()}return sn(En(_.current),`contextmenu`,e)},[l,g,c]),Di(`div`,e,{state:{open:h},ref:[_,t],props:[{onContextMenu:T,onTouchStart:D,onTouchMove:O,onTouchEnd:E,onTouchCancel:E,style:{WebkitTouchCallout:`none`}},a],stateAttributesMapping:ft})}),nd=Lu;function rd(e){let t=(0,b.useRef)(e);return(0,b.useInsertionEffect)(()=>void(t.current=e)),(0,b.useCallback)((...e)=>t.current(...e),[])}var id=(0,b.createContext)(void 0);function ad(){return(0,b.useContext)(id)}var od={position:`absolute`,top:0,bottom:0,textAlign:`center`,whiteSpace:`normal`,touchAction:`none`},sd={display:`contents`};function cd(){return null}var ld=`diffs-container`,ud=/(?=^From [a-f0-9]+ .+$)/m,dd=/(?=^diff --git)/gm,fd=/(?<=\n)/,pd=/^(---|\+\+\+)\s+([^\t\r\n]+)/,md=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,hd=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,gd=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,_d=`header-prefix`,vd=`header-filename-suffix`,yd=`header-metadata`,bd=`header-custom`,xd={dark:`pierre-dark`,light:`pierre-light`},Sd=`data-theme-css`,Cd=`data-unsafe-css`,wd=`data-diffs-scrollbar-measure`,Td=`--diffs-scrollbar-gutter-measured`,Ed=1e5,Dd={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...Dd});var Od=Object.freeze({fromStart:0,fromEnd:0}),kd={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Ad={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function jd(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}function Md({hunkIndex:e,lineIndex:t,conflictIndex:n}){return`merge-conflict-action-${e}-${t}-${n}`}function Nd(e,t){return e-(t===0?0:1)}function Pd(e,t){return Nd(e,t)+t}function Fd(e,t){let n=t.hunks[e.hunkIndex];if(n!=null)return{hunkIndex:e.hunkIndex,lineIndex:Id(n,e.startContentIndex)}}function Id(e,t){let n=e.unifiedLineStart;for(let r=0;r<t;r++){let t=e.hunkContent[r];n+=t.type===`context`?t.lines:t.deletions+t.additions}return n}function Ld({fileDiff:e,actions:t,renderCustomHeader:n,renderHeaderPrefix:r,renderHeaderFilenameSuffix:i,renderHeaderMetadata:a,renderAnnotation:o,renderGutterUtility:s,renderMergeConflictUtility:c,lineAnnotations:l,getHoveredLine:u,getInstance:d,getAnnotationSlotName:f=jd}){let p=n?.(e),m=r?.(e),h=i?.(e),g=a?.(e);return(0,Y.jsxs)(Y.Fragment,{children:[p==null?(0,Y.jsxs)(Y.Fragment,{children:[m!=null&&(0,Y.jsx)(`div`,{slot:`header-prefix`,children:m}),h!=null&&(0,Y.jsx)(`div`,{slot:`header-filename-suffix`,children:h}),g!=null&&(0,Y.jsx)(`div`,{slot:`header-metadata`,children:g})]}):(0,Y.jsx)(`div`,{slot:bd,children:p}),o!=null&&l?.map((e,t)=>(0,Y.jsx)(`div`,{slot:f(e),children:o(e)},t)),t!=null&&c!=null&&d!=null&&t.map(t=>{if(t==null)return;let n=Rd(t,e);return(0,Y.jsx)(`div`,{slot:n,style:sd,children:c(t,d)},n)}),s!=null&&(0,Y.jsx)(`div`,{slot:`gutter-utility-slot`,style:od,children:s(u)})]})}function Rd(e,t){let n=Fd(e,t);return n==null?void 0:Md({hunkIndex:n.hunkIndex,lineIndex:n.lineIndex,conflictIndex:e.conflictIndex})}var zd=new Map,Bd=new Map,Vd=new Map,Hd=new Set;function Ud(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!Hd.has(t))return!1;return!0}function Wd(e=xd){let t=[];return typeof e==`string`?t.push(e):(t.push(e.dark),t.push(e.light)),t}var Gd=new Set;function Kd(e){let t=[],n=new Set;for(let r of qd(e.themes)){let e=Xd(r)?r.getThemes():[r];for(let r of e){if(n.has(r.name))throw Error(`Theme collection already contains theme "${r.name}"`);n.add(r.name),t.push(r)}}let r=Object.freeze([...t]),i=Object.freeze(r.filter(e=>e.colorScheme===`light`)),a=Object.freeze(r.filter(e=>e.colorScheme===`dark`)),o=new Map(r.map(e=>[e.name,e])),s=Object.freeze(r.map(e=>e.name)),c=Object.freeze(i.map(e=>e.name)),l=Object.freeze(a.map(e=>e.name));function u(e){if(e==null)return r;let{colorScheme:t,collection:n}=e;return n==null?t===`light`?i:t===`dark`?a:r:r.filter(e=>e.collection===n?t==null||e.colorScheme===t:!1)}return{getTheme(e){return o.get(e)},getThemes(e){return u(e)},getThemeNames(e){return e?.collection==null?e?.colorScheme===`light`?c:e?.colorScheme===`dark`?l:s:u(e).map(e=>e.name)},hasTheme(e){return o.has(e)},orderBy(e){return Kd({themes:r.map((e,t)=>({descriptor:e,index:t})).sort((t,n)=>{let r=e(t.descriptor,n.descriptor);return r===0?t.index-n.index:r}).map(e=>e.descriptor)})},pick(e){let t=[],n=new Set;for(let r of e){if(n.has(r))throw Error(`Theme collection pick already includes theme "${r}"`);n.add(r);let e=o.get(r);if(e==null)throw Error(`Theme collection does not contain theme "${r}"`);t.push(e)}return Kd({themes:t})},registerInto(e){for(let t of r)e.registerThemeIfAbsent(t.name,t.load)}}}function qd(e){return Jd(e)?[e]:e}function Jd(e){return Xd(e)||Yd(e)}function Yd(e){return typeof e.name==`string`&&typeof e.load==`function`}function Xd(e){return typeof e.getThemes==`function`}function Zd(e){return typeof e==`object`&&e&&`default`in e?e.default:e}var Qd=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name=`DuplicateThemeError`}},$d=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name=`UnregisteredThemeError`}},ef=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name=`UnresolvedThemeError`}};function tf(){let e=new Map,t=new Map,n=new Map,r=0;function i(t,n){if(e.has(t))throw new Qd(t);e.set(t,n)}function a(t,n){return!e.has(t)&&(e.set(t,n),!0)}function o(t){return e.has(t)}function s(i){let a=t.get(i);if(a!==void 0)return Promise.resolve(a);let o=n.get(i);if(o!==void 0)return o;let s=e.get(i);if(s===void 0)return Promise.reject(new $d(i));let c=r,l=s().then(e=>{let a=Zd(e);return c===r&&t.set(i,a),n.get(i)===l&&n.delete(i),a}).catch(e=>{throw n.get(i)===l&&n.delete(i),e});return n.set(i,l),l}function c(e){return Promise.all(e.map(e=>s(e)))}function l(e,n){t.set(e,n)}function u(e){for(let[t,n]of e)l(t,n)}function d(e){return t.get(e)}function f(e){let n=[];for(let r of e){let e=t.get(r);if(e===void 0)throw new ef(r);n.push(e)}return n}function p(e){return t.has(e)}function m(e){for(let n of e)if(!t.has(n))return!1;return!0}function h(e){let n=t.get(e);return n===void 0?s(e):n}function g(){r++,t.clear(),n.clear()}return{clearResolvedThemes:g,getResolvedOrResolveTheme:h,getResolvedTheme:d,getResolvedThemes:f,hasRegisteredTheme:o,hasResolvedTheme:p,hasResolvedThemes:m,registerTheme:i,registerThemeIfAbsent:a,resolveTheme:s,resolveThemes:c,seedResolvedTheme:l,seedResolvedThemes:u}}var nf=tf();function rf(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let e;if(typeof n==`string`){if(e=nf.getResolvedTheme(n),e==null)throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,nf.getResolvedTheme(n)??nf.seedResolvedTheme(n,e);Gd.has(n)||(Gd.add(n),t.loadThemeSync(e))}}function af(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(Hd.has(n.name))continue;let e=zd.get(n.name);e??(e=n,zd.set(n.name,e)),Hd.add(e.name),t.loadLanguageSync(e.data)}}function of(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var sf=Object.defineProperty,cf=Object.getOwnPropertyDescriptor,lf=Object.getOwnPropertyNames,uf=Object.prototype.hasOwnProperty,df=(e,t)=>{let n={};for(var r in e)sf(n,r,{get:e[r],enumerable:!0});return t||sf(n,Symbol.toStringTag,{value:`Module`}),n},ff=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=lf(t),a=0,o=i.length,s;a<o;a++)s=i[a],!uf.call(e,s)&&s!==n&&sf(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=cf(t,s))||r.enumerable});return e},pf=(e,t,n)=>(ff(e,t,`default`),n&&ff(n,t,`default`)),mf=`modulepreload`,hf=function(e){return`/`+e},gf={},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}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=hf(t,n),t=s(t),t in gf)return;gf[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:mf,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}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)})},_f=[{id:`abap`,name:`ABAP`,import:(()=>Z(()=>import(`./abap-CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>Z(()=>import(`./actionscript-3-Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>Z(()=>import(`./ada-C5qYipkI.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>Z(()=>import(`./ahk-CA9gdOdF.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>Z(()=>import(`./ahk2-_6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>Z(()=>import(`./angular-html-CuY3NJLL.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>Z(()=>import(`./angular-ts-BDh1RZYf.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>Z(()=>import(`./apache-U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>Z(()=>import(`./apex-KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>Z(()=>import(`./apl-KPu8rCXV.js`),__vite__mapDeps([6,2,3,1,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>Z(()=>import(`./applescript-CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>Z(()=>import(`./ara-4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>Z(()=>import(`./asciidoc-SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>Z(()=>import(`./asm-Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>Z(()=>import(`./astro-72tHa2bK.js`),__vite__mapDeps([10,2,3,9,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>Z(()=>import(`./awk-BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>Z(()=>import(`./ballerina-B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>Z(()=>import(`./bat-qdxAdBWQ.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>Z(()=>import(`./beancount-D-usSTwE.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>Z(()=>import(`./berry-DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>Z(()=>import(`./bibtex-Ci_nEsc7.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>Z(()=>import(`./bicep-CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>Z(()=>import(`./bird2-CYIUgYqB.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>Z(()=>import(`./blade-B08Ed9CC.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>Z(()=>import(`./bsl-_VjlB9mv.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>Z(()=>import(`./c-pmDVWfbr.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>Z(()=>import(`./c3-D0apG41V.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>Z(()=>import(`./cadence-CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>Z(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([19,20])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>Z(()=>import(`./chapel-DTMrcQk9.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>Z(()=>import(`./clarity-CtfBBspg.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>Z(()=>import(`./clojure-DqKBuwfJ.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>Z(()=>import(`./cmake-Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>Z(()=>import(`./cobol-DssqnRQR.js`),__vite__mapDeps([23,1,2,3,8])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>Z(()=>import(`./codeowners-C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>Z(()=>import(`./codeql-oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>Z(()=>import(`./coffee-puUCaTOh.js`),__vite__mapDeps([24,2])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>Z(()=>import(`./common-lisp-Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>Z(()=>import(`./coq-DuBRPxYg.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>Z(()=>import(`./cpp-B00qz5Tz.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22])))},{id:`crystal`,name:`Crystal`,import:(()=>Z(()=>import(`./crystal-DdUhmtlz.js`),__vite__mapDeps([28,2,3,1,16,22,29])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>Z(()=>import(`./csharp-oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>Z(()=>import(`./css-DdBt4g-L.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>Z(()=>import(`./csv-Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>Z(()=>import(`./cue-CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>Z(()=>import(`./cypher-ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>Z(()=>import(`./d-qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>Z(()=>import(`./dart-CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>Z(()=>import(`./dax-BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>Z(()=>import(`./desktop-Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>Z(()=>import(`./diff-woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>Z(()=>import(`./docker-IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>Z(()=>import(`./dotenv-_5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>Z(()=>import(`./dream-maker-DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>Z(()=>import(`./edge-wKB7GaL7.js`),__vite__mapDeps([30,1,2,3,11,15])))},{id:`elixir`,name:`Elixir`,import:(()=>Z(()=>import(`./elixir-CoUoL5if.js`),__vite__mapDeps([31,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>Z(()=>import(`./elm-BpacrXsx.js`),__vite__mapDeps([32,27,22])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>Z(()=>import(`./emacs-lisp-c_oH4hRZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>Z(()=>import(`./erb-CmniU5LH.js`),__vite__mapDeps([33,1,2,3,34,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>Z(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>Z(()=>import(`./fennel-DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>Z(()=>import(`./fish-BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>Z(()=>import(`./fluent-C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>Z(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>Z(()=>import(`./fortran-free-form-CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>Z(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>Z(()=>import(`./gdresource-xMC7jr7x.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>Z(()=>import(`./gdscript-DYvRD3hg.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>Z(()=>import(`./gdshader-CBce3t8t.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>Z(()=>import(`./genie-CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>Z(()=>import(`./gherkin-DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>Z(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>Z(()=>import(`./git-rebase-BQwO3P_x.js`),__vite__mapDeps([50,29])))},{id:`gleam`,name:`Gleam`,import:(()=>Z(()=>import(`./gleam-CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>Z(()=>import(`./glimmer-js-D80XjabP.js`),__vite__mapDeps([51,2,3,1,11])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>Z(()=>import(`./glimmer-ts-CBtTX2IX.js`),__vite__mapDeps([52,2,3,1,11])))},{id:`glsl`,name:`GLSL`,import:(()=>Z(()=>import(`./glsl-CSw0t__s.js`).then(e=>e.n),__vite__mapDeps([27,22])))},{id:`gn`,name:`GN`,import:(()=>Z(()=>import(`./gn-ilITqXS6.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>Z(()=>import(`./gnuplot-7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>Z(()=>import(`./go-rLFTqkRN.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>Z(()=>import(`./graphql-GmhNcJY1.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37])))},{id:`groovy`,name:`Groovy`,import:(()=>Z(()=>import(`./groovy-CacY0gHj.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>Z(()=>import(`./hack-BN6_-gPF.js`),__vite__mapDeps([53,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>Z(()=>import(`./haml-C-9uneX4.js`).then(e=>e.n),__vite__mapDeps([35,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>Z(()=>import(`./handlebars-B-pRY8ns.js`),__vite__mapDeps([54,2,3,1,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>Z(()=>import(`./haskell-D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>Z(()=>import(`./haxe-C8oCnwJJ.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>Z(()=>import(`./hcl-Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>Z(()=>import(`./hjson-CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>Z(()=>import(`./hlsl-Cvrh5tZx.js`),[]))},{id:`html`,name:`HTML`,import:(()=>Z(()=>import(`./html-DODfN5LV.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>Z(()=>import(`./html-derivative-DHoyv7C9.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>Z(()=>import(`./http-CfIfxUzC.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37])))},{id:`hurl`,name:`Hurl`,import:(()=>Z(()=>import(`./hurl-Dqw3E-pP.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37])))},{id:`hxml`,name:`HXML`,import:(()=>Z(()=>import(`./hxml-Dcm88srW.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>Z(()=>import(`./hy-CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>Z(()=>import(`./imba-DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>Z(()=>import(`./ini-B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>Z(()=>import(`./java-ByFZtOuN.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>Z(()=>import(`./javascript-Cv3Bb7x5.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>Z(()=>import(`./jinja-CN84y3P4.js`),__vite__mapDeps([60,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>Z(()=>import(`./jison-BuuK_RGg.js`),__vite__mapDeps([61,2])))},{id:`json`,name:`JSON`,import:(()=>Z(()=>import(`./json-BoiexH4T.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>Z(()=>import(`./json5-BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>Z(()=>import(`./jsonc-CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>Z(()=>import(`./jsonl-CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>Z(()=>import(`./jsonnet-CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>Z(()=>import(`./jssm-DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>Z(()=>import(`./jsx-BvfQ8jeh.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>Z(()=>import(`./julia-1r0EfmCp.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>Z(()=>import(`./just-DqUqshX-.js`),__vite__mapDeps([64,2,11,20,29,34,3,1,7,8,16,22,25,26,27,35,36,13,37,38,39,65])))},{id:`kdl`,name:`KDL`,import:(()=>Z(()=>import(`./kdl-CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>Z(()=>import(`./kotlin-DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>Z(()=>import(`./kusto-C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>Z(()=>import(`./latex-BkKbkIFu.js`),__vite__mapDeps([66,67,63])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>Z(()=>import(`./lean-CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>Z(()=>import(`./less-DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>Z(()=>import(`./liquid-B0Un207U.js`),__vite__mapDeps([68,2,3,1,9])))},{id:`llvm`,name:`LLVM IR`,import:(()=>Z(()=>import(`./llvm-DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>Z(()=>import(`./log-BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>Z(()=>import(`./logo-Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>Z(()=>import(`./lua-Bl_cKsxk.js`).then(e=>e.n),__vite__mapDeps([38,22])))},{id:`luau`,name:`Luau`,import:(()=>Z(()=>import(`./luau-C2pBCSgt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>Z(()=>import(`./make-Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>Z(()=>import(`./markdown-BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>Z(()=>import(`./marko-BwrAvE0q.js`),__vite__mapDeps([69,3,5,11,70])))},{id:`matlab`,name:`MATLAB`,import:(()=>Z(()=>import(`./matlab-D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>Z(()=>import(`./mdc-B6X8cMMc.js`),__vite__mapDeps([71,15,1,2,3,39,41])))},{id:`mdx`,name:`MDX`,import:(()=>Z(()=>import(`./mdx-DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>Z(()=>import(`./mermaid-BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>Z(()=>import(`./mipsasm-BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>Z(()=>import(`./mojo-fg40_ntQ.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>Z(()=>import(`./moonbit-DgjMoLWr.js`),[]))},{id:`move`,name:`Move`,import:(()=>Z(()=>import(`./move-BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>Z(()=>import(`./narrat-_X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>Z(()=>import(`./nextflow-BJtWHP5T.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>Z(()=>import(`./nextflow-groovy-DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>Z(()=>import(`./nginx-CjxuSsJx.js`),__vite__mapDeps([74,38,22])))},{id:`nim`,name:`Nim`,import:(()=>Z(()=>import(`./nim-D03lwHZj.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41])))},{id:`nix`,name:`Nix`,import:(()=>Z(()=>import(`./nix-IvuFDN5E.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>Z(()=>import(`./nsis-CjNLYCLg.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>Z(()=>import(`./nushell-DHYfO66s.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>Z(()=>import(`./objective-c-D1A_Heim.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>Z(()=>import(`./objective-cpp-BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>Z(()=>import(`./ocaml-O90oeIOV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>Z(()=>import(`./odin-B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>Z(()=>import(`./openscad-BUDT5pXO.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>Z(()=>import(`./org-C1R3vpZ4.js`),__vite__mapDeps([76,2,3,1,5,8,7,9,11,13,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,48,50,81,82,83,63,65,66,67,70,84,75,85,86,87,88,89,90,91,92,93])))},{id:`pascal`,name:`Pascal`,import:(()=>Z(()=>import(`./pascal-4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>Z(()=>import(`./perl-wiJ_vlgw.js`),__vite__mapDeps([65,2,3,1,7,8,16])))},{id:`php`,name:`PHP`,import:(()=>Z(()=>import(`./php-DT1VRzZJ.js`),__vite__mapDeps([87,2,3,1,7,8,9,16])))},{id:`pkl`,name:`Pkl`,import:(()=>Z(()=>import(`./pkl-ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>Z(()=>import(`./plsql-DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>Z(()=>import(`./po-BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>Z(()=>import(`./polar-C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>Z(()=>import(`./postcss-BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>Z(()=>import(`./powerquery-DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>Z(()=>import(`./powershell-CCSX75yM.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>Z(()=>import(`./prisma-DMgNhnYS.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>Z(()=>import(`./prolog-iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>Z(()=>import(`./proto-DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>Z(()=>import(`./pug-CuPeIvWI.js`),__vite__mapDeps([94,2,3,1])))},{id:`puppet`,name:`Puppet`,import:(()=>Z(()=>import(`./puppet-CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>Z(()=>import(`./purescript-9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>Z(()=>import(`./python-gzcpVVnB.js`),[]))},{id:`qml`,name:`QML`,import:(()=>Z(()=>import(`./qml-JELGKId0.js`),__vite__mapDeps([95,2])))},{id:`qmldir`,name:`QML Directory`,import:(()=>Z(()=>import(`./qmldir-DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>Z(()=>import(`./qss-Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>Z(()=>import(`./r-CfwIuA9b.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>Z(()=>import(`./racket-DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>Z(()=>import(`./raku-B3gFvitq.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>Z(()=>import(`./razor-ht43Cjj_.js`),__vite__mapDeps([96,1,2,3,78])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>Z(()=>import(`./rbs-C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>Z(()=>import(`./reg-CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>Z(()=>import(`./regexp-ChbFql5B.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>Z(()=>import(`./rel-BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>Z(()=>import(`./riscv-Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>Z(()=>import(`./ron-VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>Z(()=>import(`./rosmsg-CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>Z(()=>import(`./rst-DDWCVx6d.js`),__vite__mapDeps([97,2,15,1,3,20,98,25,26,27,22,29,39,34,7,8,16,35,36,11,13,37,38])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>Z(()=>import(`./ruby-DTs1j30u.js`),__vite__mapDeps([34,2,3,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>Z(()=>import(`./rust-Cfkwpbl8.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>Z(()=>import(`./sas-Dg1iUxli.js`),__vite__mapDeps([99,16])))},{id:`sass`,name:`Sass`,import:(()=>Z(()=>import(`./sass-DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>Z(()=>import(`./scala-BiFt_7mu.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>Z(()=>import(`./scheme-DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>Z(()=>import(`./scss-MEhDo76e.js`).then(e=>e.n),__vite__mapDeps([5,3])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>Z(()=>import(`./sdbl-bTVj8UrX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>Z(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([100,101])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>Z(()=>import(`./shellscript-BWPZk-_l.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>Z(()=>import(`./shellsession-D3PybQcl.js`),__vite__mapDeps([102,29])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>Z(()=>import(`./smalltalk-BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>Z(()=>import(`./smithy-Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>Z(()=>import(`./solidity-Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>Z(()=>import(`./soy-27Ke2jtk.js`),__vite__mapDeps([103,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>Z(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([104,105])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>Z(()=>import(`./splunk-BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>Z(()=>import(`./sql-DP0Xrh29.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>Z(()=>import(`./ssh-config-BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>Z(()=>import(`./stata-zGYQLyse.js`),__vite__mapDeps([106,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>Z(()=>import(`./stylus-B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>Z(()=>import(`./surrealql-lazC2XG7.js`),__vite__mapDeps([107,2])))},{id:`svelte`,name:`Svelte`,import:(()=>Z(()=>import(`./svelte-Dvi0J-fD.js`),__vite__mapDeps([108,2,3,11,12])))},{id:`swift`,name:`Swift`,import:(()=>Z(()=>import(`./swift-CyEgAFGc.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>Z(()=>import(`./system-verilog-Dh5ihWbf.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>Z(()=>import(`./systemd-BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>Z(()=>import(`./talonscript-CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>Z(()=>import(`./tasl-DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>Z(()=>import(`./tcl-CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>Z(()=>import(`./templ-BUGTJfa1.js`),__vite__mapDeps([109,2,3,81])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>Z(()=>import(`./terraform-DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>Z(()=>import(`./tex-DjMRRtvH.js`).then(e=>e.n),__vite__mapDeps([67,63])))},{id:`toml`,name:`TOML`,import:(()=>Z(()=>import(`./toml-CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>Z(()=>import(`./ts-tags-DdUpc0MF.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22])))},{id:`tsv`,name:`TSV`,import:(()=>Z(()=>import(`./tsv-sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>Z(()=>import(`./tsx-DPDbwtDb.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>Z(()=>import(`./turtle-ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>Z(()=>import(`./twig-COSP5TPJ.js`),__vite__mapDeps([111,2,3,5,20,34,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39,87,9])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>Z(()=>import(`./typescript-4K9I1sRn.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>Z(()=>import(`./typespec-BRdr0IET.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>Z(()=>import(`./typst-C2csS2q0.js`),__vite__mapDeps([112,2,3,1,5,8,7,9,11,13,113,114,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,44,48,50,81,82,54,83,115,63,62,65,66,67,70,116,84,85,87,88,89,90,91,93,117,94,118,119,111,120])))},{id:`v`,name:`V`,import:(()=>Z(()=>import(`./v-DBj4K9d_.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>Z(()=>import(`./vala-zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>Z(()=>import(`./vb-DOwzaHZ0.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>Z(()=>import(`./verilog-B2gwz-sJ.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>Z(()=>import(`./vhdl-BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>Z(()=>import(`./viml-DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>Z(()=>import(`./vue-SOudwJbE.js`),__vite__mapDeps([121,2,3,1,9,11,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>Z(()=>import(`./vue-html-CqJapUfv.js`),__vite__mapDeps([122,2])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>Z(()=>import(`./vue-vine-D-YtLVo4.js`),__vite__mapDeps([123,2,3,5,12,70,124])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>Z(()=>import(`./vyper-CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>Z(()=>import(`./wasm-ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>Z(()=>import(`./wenyan-C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>Z(()=>import(`./wgsl-BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>Z(()=>import(`./wikitext-ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>Z(()=>import(`./wit-DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>Z(()=>import(`./wolfram-DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>Z(()=>import(`./xml-OPeMWw8Y.js`).then(e=>e.n),__vite__mapDeps([7,8])))},{id:`xsl`,name:`XSL`,import:(()=>Z(()=>import(`./xsl-DXO_qC3I.js`),__vite__mapDeps([93,7,8])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>Z(()=>import(`./yaml-Cl7qwHwz.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>Z(()=>import(`./zenscript-BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>Z(()=>import(`./zig-CMLA9XwU.js`),[]))}],vf=Object.fromEntries(_f.map(e=>[e.id,e.import])),yf=Object.fromEntries(_f.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),bf={...vf,...yf},xf=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>Z(()=>import(`./andromeeda-vGVdxbeo.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>Z(()=>import(`./aurora-x-CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>Z(()=>import(`./ayu-dark-DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>Z(()=>import(`./ayu-light-C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>Z(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>Z(()=>import(`./catppuccin-frappe-C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>Z(()=>import(`./catppuccin-latte-CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>Z(()=>import(`./catppuccin-macchiato-R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>Z(()=>import(`./catppuccin-mocha-DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>Z(()=>import(`./dark-plus-Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>Z(()=>import(`./dracula-BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>Z(()=>import(`./dracula-soft-5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>Z(()=>import(`./everforest-dark-sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>Z(()=>import(`./everforest-light-Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-default-DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>Z(()=>import(`./github-light-EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>Z(()=>import(`./github-light-default-BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>Z(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>Z(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>Z(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>Z(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>Z(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>Z(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>Z(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>Z(()=>import(`./horizon-CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>Z(()=>import(`./horizon-bright-DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>Z(()=>import(`./houston-CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>Z(()=>import(`./kanagawa-dragon-Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>Z(()=>import(`./kanagawa-lotus-BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>Z(()=>import(`./kanagawa-wave-BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>Z(()=>import(`./laserwave-C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>Z(()=>import(`./light-plus-DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-Bm3Qr25_.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-darker-2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>Z(()=>import(`./material-theme-lighter-uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>Z(()=>import(`./min-dark-BSWPekZh.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>Z(()=>import(`./min-light-DDpmG2fV.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>Z(()=>import(`./monokai-B_bV9PQ9.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>Z(()=>import(`./night-owl-DhmEMT88.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>Z(()=>import(`./night-owl-light-eJ-hLW7d.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>Z(()=>import(`./nord-Cb4Vim4T.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>Z(()=>import(`./one-dark-pro-CLwyXe_n.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>Z(()=>import(`./one-light-D7Lr4KcI.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>Z(()=>import(`./plastic-DQwYfKfQ.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>Z(()=>import(`./poimandres-DRFjx7u4.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>Z(()=>import(`./red-DX1BQOs8.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>Z(()=>import(`./rose-pine-aMsaMD1D.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>Z(()=>import(`./rose-pine-dawn-8PwUyIlP.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>Z(()=>import(`./rose-pine-moon-DO-qXg-I.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>Z(()=>import(`./slack-dark-DnToyrRv.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>Z(()=>import(`./slack-ochin-B2OO5cIa.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>Z(()=>import(`./snazzy-light-4G7pJPwS.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>Z(()=>import(`./solarized-dark-UdsmMDCL.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>Z(()=>import(`./solarized-light-C1IUL_tW.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>Z(()=>import(`./synthwave-84-nFMaYfgc.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>Z(()=>import(`./tokyo-night-oM2G3aXe.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>Z(()=>import(`./vesper-DdrHHSXu.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>Z(()=>import(`./vitesse-black-fwtXNY1n.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>Z(()=>import(`./vitesse-dark-BZCL-v6S.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>Z(()=>import(`./vitesse-light-VbXTXTou.js`),[]))}].map(e=>[e.id,e.import])),Sf=s({createOnigurumaEngine:()=>Xf,getDefaultWasmLoader:()=>Yf,loadWasm:()=>Uf,setDefaultWasmLoader:()=>Jf}),Cf=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function wf(){return 2147483648}function Tf(){return typeof performance<`u`?performance.now():Date.now()}var Ef=(e,t)=>e+(t-e%t)%t;async function Df(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=wf();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,Ef(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:Tf,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 Of=Object.defineProperty,kf=(e,t,n)=>t in e?Of(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Af=(e,t,n)=>kf(e,typeof t==`symbol`?t:t+``,n),jf=null;function Mf(e){throw new Cf(e.UTF8ToString(e.getLastOnigError()))}var Nf=class e{constructor(t){Af(this,`utf16Length`),Af(this,`utf8Length`),Af(this,`utf16Value`),Af(this,`utf8Value`),Af(this,`utf16OffsetToUtf8`),Af(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Pf=class e{constructor(t){if(Af(this,`id`,++e.LAST_ID),Af(this,`_onigBinding`),Af(this,`content`),Af(this,`utf16Length`),Af(this,`utf8Length`),Af(this,`utf16OffsetToUtf8`),Af(this,`utf8OffsetToUtf16`),Af(this,`ptr`),!jf)throw new Cf(`Must invoke loadWasm first.`);this._onigBinding=jf,this.content=t;let n=new Nf(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=jf.omalloc(1e4),e._sharedPtrInUse=!0,jf.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(jf)}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)}};Af(Pf,`LAST_ID`,0),Af(Pf,`_sharedPtr`,0),Af(Pf,`_sharedPtrInUse`,!1);var Ff=Pf,If=class{constructor(e){if(Af(this,`_onigBinding`),Af(this,`_ptr`),!jf)throw new Cf(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Nf(e[r]);t[r]=i.createString(jf),n[r]=i.utf8Length}let r=jf.omalloc(4*e.length);jf.HEAPU32.set(t,r/4);let i=jf.omalloc(4*e.length);jf.HEAPU32.set(n,i/4);let a=jf.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)jf.ofree(t[n]);jf.ofree(i),jf.ofree(r),a===0&&Mf(jf),this._onigBinding=jf,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 Ff(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 Lf(e){return typeof e.instantiator==`function`}function Rf(e){return typeof e.default==`function`}function zf(e){return e.data!==void 0}function Bf(e){return typeof Response<`u`&&e instanceof Response}function Vf(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 Hf;function Uf(e){if(Hf)return Hf;async function t(){jf=await Df(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Lf(n)?n=await n.instantiator(t):Rf(n)?n=await n.default(t):(zf(n)&&(n=n.data),Bf(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Gf(n)(t):await Kf(n)(t):Vf(n)||n instanceof WebAssembly.Module?n=await Wf(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Wf(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Hf=t(),Hf}function Wf(e){return t=>WebAssembly.instantiate(e,t)}function Gf(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Kf(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var qf;function Jf(e){qf=e}function Yf(){return qf}async function Xf(e){return e&&await Uf(e),{createScanner(e){return new If(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Ff(e)}}}var Zf=df({});pf(Zf,Sf);var Qf=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function $f(e){return ep(e)}function ep(e){return Array.isArray(e)?tp(e):e instanceof RegExp?e:typeof e==`object`?np(e):e}function tp(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=ep(e[n]);return t}function np(e){let t={};for(let n in e)t[n]=ep(e[n]);return t}function rp(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function ip(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?ip(e.substring(0,e.length-1)):e.substr(~t+1)}var ap=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,op=class{static hasCaptures(e){return e!==null&&(ap.lastIndex=0,ap.test(e))}static replaceCaptures(e,t,n){return e.replace(ap,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function sp(e,t){return e<t?-1:+(e>t)}function cp(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=sp(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function lp(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function up(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var dp=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},fp=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(_p(e),t)}static createFromParsedTheme(e,t){return bp(e,t)}_cachedMatchRoot=new dp(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>mp(e.parent,t.parentScopes));return n?new gp(n.fontStyle,n.foreground,n.background):null}},pp=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function mp(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!hp(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function hp(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var gp=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function _p(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&lp(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&lp(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new vp(l,u,e,o,s,c)}}return n}var vp=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},yp=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(yp||{});function bp(e,t){e.sort((e,t)=>{let n=sp(e.scope,t.scope);return n!==0||(n=cp(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new xp(t),o=new gp(n,a.getId(r),a.getId(i)),s=new wp(new Cp(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new fp(a,o,s)}var xp=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Sp=Object.freeze([]),Cp=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Sp,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},wp=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),Cp.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(cp(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Cp(e,t,n,r,i))}},Tp=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Dp(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function Ep(e){return e}function Dp(e){return e}function Op(e,t){let n=[],r=Ap(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(kp(i)){let e=[];do e.push(i),i=r.next();while(kp(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function kp(e){return!!e&&!!e.match(/[\w\.:]+/)}function Ap(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function jp(e){typeof e.dispose==`function`&&e.dispose()}var Mp=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Np=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Pp=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Fp=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Mp(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Pp;for(let n of e)Ip(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Mp){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function Ip(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof Mp?Rp({baseGrammar:a,selfGrammar:i},r):Lp(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new Mp(e))}function Lp(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];zp([r],t,n)}}function Rp(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&zp(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&zp(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function zp(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?rp({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&zp(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Gp(i);switch(a.kind){case 0:Rp({...t,selfGrammar:t.baseGrammar},n);break;case 1:Rp(t,n);break;case 2:Lp(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?Lp(a.ruleName,i,n):Rp(i,n)}else a.kind===4?n.add(new Np(a.scopeName,a.ruleName)):n.add(new Mp(a.scopeName))}}}var Bp=class{kind=0},Vp=class{kind=1},Hp=class{constructor(e){this.ruleName=e}kind=2},Up=class{constructor(e){this.scopeName=e}kind=3},Wp=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Gp(e){if(e===`$base`)return new Bp;if(e===`$self`)return new Vp;let t=e.indexOf(`#`);return t===-1?new Up(e):t===0?new Hp(e.substring(1)):new Wp(e.substring(0,t),e.substring(t+1))}var Kp=/\\(\d+)/,qp=/\\(\d+)/g,Jp=-1,Yp=-2;function Xp(e){return e}function Zp(e){return e}var Qp=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=op.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=op.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${ip(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:op.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:op.replaceCaptures(this._contentName,e,t)}},$p=class extends Qp{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},em=class extends Qp{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new am(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new om,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},tm=class extends Qp{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new om,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},nm=class extends Qp{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new am(i,this.id),this.beginCaptures=a,this._end=new am(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new om;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},rm=class extends Qp{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new am(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new am(o,Yp),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new om;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new om,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},im=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new $p(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new em(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=rp({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new tm(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new rm(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new nm(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Gp(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof tm||e instanceof nm||e instanceof rm)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},am=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&Kp.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return qp.lastIndex=0,this.source.replace(qp,(e,t)=>up(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},om=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new sm(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new sm(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},sm=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
11
11
|
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},cm=class{constructor(e,t){this.languageId=e,this.tokenType=t}},lm=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new cm(e,8),this._embeddedLanguagesMatcher=new um(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new cm(0,0);_getBasicScopeAttributes=new dp(e=>new cm(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},um=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>up(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var dm=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function fm(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=pm(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new dm(i,!0);f()}return new dm(i,!1);function f(){let o=mm(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===Jp){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),ym(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof nm){let r=o;ym(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof rm){let r=o;ym(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(ym(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function pm(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof rm&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=vm(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==Yp){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),ym(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function mm(e,t,n,r,i,a){let o=hm(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=gm(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function hm(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=_m(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function gm(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=_m(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function _m(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function vm(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function ym(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));fm(e,p,n&&d.start===0,d.start,f,i,!1,0),jp(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new bm(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var bm=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function xm(e,t,n,r,i,a,o,s){return new Tm(e,t,n,r,i,a,o,s)}function Sm(e,t,n,r,i){let a=Op(t,Cm),o=im.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function Cm(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(wm(t[r],e))return n=r+1,!0;return!1})}function wm(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var Tm=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new lm(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Em(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=Op(e,Cm);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)Sm(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&Sm(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(Xp(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[Zp(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Em(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=im.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Om.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=Tp.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?Dm.createRootAndLookUpScopeName(a,r,this):Dm.createRoot(`unknown`,r),t=new Om(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
12
12
|
`;let a=this.createOnigString(e),o=a.content.length,s=new Am(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=fm(this,a,i,0,t,s,!0,r);return jp(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Em(e,t){return e=$f(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Dm=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=pp.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new pp(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new pp(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(1)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Tp.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},Om=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?Dm.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(1)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:Zp(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=Dm.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,Xp(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Dm.fromExtension(r,n.contentNameScopesList))}},km=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):Op(e,Cm).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>Op(e,Cm).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Am=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=Tp.set(n,0,Ep(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=Tp.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},jm=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,xm(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},Mm=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new jm(fp.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(fp.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new km(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new Fp(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},Nm=Om.NULL;function Pm(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 Fm(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Im(e){return Array.isArray(e)?e:[e]}async function Lm(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function Rm(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function zm(e){return e===`ansi`||Rm(e)}function Bm(e){return e===`none`}function Vm(e){return Bm(e)}var Hm=/(\r?\n)/g;function Um(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(Hm),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var Wm={light:`#333333`,dark:`#bbbbbb`},Gm={light:`#fffffe`,dark:`#1e1e1e`},Km=`__shiki_resolved`;function qm(e){if(e?.[Km])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`?Wm.light:Wm.dark,n||=t.type===`light`?Gm.light:Gm.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,Km,{enumerable:!1,writable:!1,value:!0}),t}async function Jm(e){return[...new Set((await Promise.all(e.filter(e=>!zm(e)).map(async e=>await Lm(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function Ym(e){return(await Promise.all(e.map(async e=>Vm(e)?null:qm(await Lm(e))))).filter(e=>!!e)}function Xm(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 Qf(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var Zm=class extends Mm{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=qm(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=fp.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Xm(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new Qf(`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))}},Qm=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}},$m=0;function eh(e){$m+=1,e.warnings!==!1&&$m>=10&&$m%10==0&&console.warn(`[Shiki] ${$m} 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 Qf("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(qm),i=new Zm(new Qm(e.engine,n),r,n,e.langAlias),a;function o(t){return Xm(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new Qf(`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 Qf(`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 Jm(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await Ym(e))}function g(){if(t)throw new Qf(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--$m)}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 th(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Ym(e.themes||[]),Jm(e.langs||[]),e.engine]);return eh({...e,themes:t,langs:n,engine:r})}var nh=new WeakMap;function rh(e,t){nh.set(e,t)}function ih(e){return nh.get(e)}var ah=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(Im(n).map(e=>[e,Nm])),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 oh(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function oh(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 sh(e,t){if(!(e instanceof ah))throw new Qf(`Invalid grammar state`);return e.getInternalStack(t)}var ch=/,/,lh=/ /;function uh(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(Rm(e.resolveLangAlias(n.lang||`text`))||Bm(r))return Um(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new Qf(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new Qf(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return fh(t,o,i,a,n)}function dh(...e){if(e.length===2)return ih(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(Rm(i)||Bm(a))throw new Qf(`Plain language does not have grammar state`);if(i===`ansi`)throw new Qf(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new ah(ph(n,c,o,s,r).stateStack,c.name,o.name)}function fh(e,t,n,r,i){let a=ph(e,t,n,r,i),o=new ah(a.stateStack,t.name,n.name);return rh(a.tokens,o),a.tokens}function ph(e,t,n,r,i){let a=Pm(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=Um(e),u=i.grammarState?sh(i.grammarState,n.name)??Nm:i.grammarContextCode==null?Nm:ph(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=Fm(r[Tp.getForeground(s)],a),u=Tp.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=Tp.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(ch).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(lh))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?mh(t.scopes):hh(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function mh(e){return e.map(e=>({scopeName:e}))}function hh(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:vh(e,i,t.slice(0,r))}}return n}function gh(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function _h(e,t,n){if(!gh(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)gh(e[r],n[i])&&--r,--i;return r===-1}function vh(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(_h(e,t,n)){r.push(a);break}return r}function yh(e,t,n,r=uh){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:ih(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=bh(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new ah(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&rh(s,c),s}function bh(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var xh=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Sh=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Sh.prototype.normal={},Sh.prototype.property={},Sh.prototype.space=void 0;function Ch(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Sh(n,r,t)}function wh(e){return e.toLowerCase()}var Th=class{constructor(e,t){this.attribute=t,this.property=e}};Th.prototype.attribute=``,Th.prototype.booleanish=!1,Th.prototype.boolean=!1,Th.prototype.commaOrSpaceSeparated=!1,Th.prototype.commaSeparated=!1,Th.prototype.defined=!1,Th.prototype.mustUseProperty=!1,Th.prototype.number=!1,Th.prototype.overloadedBoolean=!1,Th.prototype.property=``,Th.prototype.spaceSeparated=!1,Th.prototype.space=void 0;var Eh=s({boolean:()=>Oh,booleanish:()=>kh,commaOrSpaceSeparated:()=>Nh,commaSeparated:()=>Mh,number:()=>Q,overloadedBoolean:()=>Ah,spaceSeparated:()=>jh}),Dh=0,Oh=Ph(),kh=Ph(),Ah=Ph(),Q=Ph(),jh=Ph(),Mh=Ph(),Nh=Ph();function Ph(){return 2**++Dh}var Fh=Object.keys(Eh),Ih=class extends Th{constructor(e,t,n,r){let i=-1;if(super(e,t),Lh(this,`space`,r),typeof n==`number`)for(;++i<Fh.length;){let e=Fh[i];Lh(this,Fh[i],(n&Eh[e])===Eh[e])}}};Ih.prototype.defined=!0;function Lh(e,t,n){n&&(e[t]=n)}function Rh(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Ih(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[wh(r)]=r,n[wh(a.attribute)]=r}return new Sh(t,n,e.space)}var zh=Rh({properties:{ariaActiveDescendant:null,ariaAtomic:kh,ariaAutoComplete:null,ariaBusy:kh,ariaChecked:kh,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:jh,ariaCurrent:null,ariaDescribedBy:jh,ariaDetails:null,ariaDisabled:kh,ariaDropEffect:jh,ariaErrorMessage:null,ariaExpanded:kh,ariaFlowTo:jh,ariaGrabbed:kh,ariaHasPopup:null,ariaHidden:kh,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:jh,ariaLevel:Q,ariaLive:null,ariaModal:kh,ariaMultiLine:kh,ariaMultiSelectable:kh,ariaOrientation:null,ariaOwns:jh,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:kh,ariaReadOnly:kh,ariaRelevant:null,ariaRequired:kh,ariaRoleDescription:jh,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:kh,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Bh(e,t){return t in e?e[t]:t}function Vh(e,t){return Bh(e,t.toLowerCase())}var Hh=Rh({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Mh,acceptCharset:jh,accessKey:jh,action:null,allow:null,allowFullScreen:Oh,allowPaymentRequest:Oh,allowUserMedia:Oh,alpha:Oh,alt:null,as:null,async:Oh,autoCapitalize:null,autoComplete:jh,autoFocus:Oh,autoPlay:Oh,blocking:jh,capture:null,charSet:null,checked:Oh,cite:null,className:jh,closedBy:null,colorSpace:null,cols:Q,colSpan:Q,command:null,commandFor:null,content:null,contentEditable:kh,controls:Oh,controlsList:jh,coords:Q|Mh,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Oh,defer:Oh,dir:null,dirName:null,disabled:Oh,download:Ah,draggable:kh,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Oh,formTarget:null,headers:jh,height:Q,hidden:Ah,high:Q,href:null,hrefLang:null,htmlFor:jh,httpEquiv:jh,id:null,imageSizes:null,imageSrcSet:null,inert:Oh,inputMode:null,integrity:null,is:null,isMap:Oh,itemId:null,itemProp:jh,itemRef:jh,itemScope:Oh,itemType:jh,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Oh,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Oh,muted:Oh,name:null,nonce:null,noModule:Oh,noValidate:Oh,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Oh,optimum:Q,pattern:null,ping:jh,placeholder:null,playsInline:Oh,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Oh,referrerPolicy:null,rel:jh,required:Oh,reversed:Oh,rows:Q,rowSpan:Q,sandbox:jh,scope:null,scoped:Oh,seamless:Oh,selected:Oh,shadowRootClonable:Oh,shadowRootCustomElementRegistry:Oh,shadowRootDelegatesFocus:Oh,shadowRootMode:null,shadowRootSerializable:Oh,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:kh,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:Oh,useMap:null,value:kh,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:jh,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Oh,declare:Oh,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Oh,noHref:Oh,noShade:Oh,noWrap:Oh,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:kh,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Oh,disablePictureInPicture:Oh,disableRemotePlayback:Oh,exportParts:Mh,part:jh,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:Vh}),Uh=Rh({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Nh,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:jh,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:Oh,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Mh,g2:Mh,glyphName:Mh,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:Nh,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:jh,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Nh,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Nh,rev:Nh,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Nh,requiredFeatures:Nh,requiredFonts:Nh,requiredFormats:Nh,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:Nh,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Nh,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Nh,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Bh}),Wh=Rh({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Gh=Rh({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Vh}),Kh=Rh({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),qh=/[A-Z]/g,Jh=/-[a-z]/g,Yh=/^data[-\w.:]+$/i;function Xh(e,t){let n=wh(t),r=t,i=Th;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Yh.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Jh,Qh);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Jh.test(e)){let n=e.replace(qh,Zh);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Ih}return new i(r,t)}function Zh(e){return`-`+e.toLowerCase()}function Qh(e){return e.charAt(1).toUpperCase()}var $h=Ch([zh,Hh,Wh,Gh,Kh],`html`),eg=Ch([zh,Uh,Wh,Gh,Kh],`svg`),tg={}.hasOwnProperty;function ng(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&tg.call(t,e)){let n=String(t[e]);i=tg.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var rg=/["&'<>`]/g,ig=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ag=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,og=/[|\\{}()[\]^$+*?.]/g,sg=new WeakMap;function cg(e,t){return e=e.replace(t.subset?lg(t.subset):rg,r),t.subset||t.escapeOnly?e:e.replace(ig,n).replace(ag,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function lg(e){let t=sg.get(e);return t||(t=ug(e),sg.set(e,t)),t}function ug(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(og,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var dg=/[\dA-Fa-f]/;function fg(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!dg.test(String.fromCharCode(t))?r:r+`;`}var pg=/\d/;function mg(e,t,n){let r=`&#`+String(e);return n&&t&&!pg.test(String.fromCharCode(t))?r:r+`;`}var hg=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),gg={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},_g=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],vg={}.hasOwnProperty,yg={},bg;for(bg in gg)vg.call(gg,bg)&&(yg[gg[bg]]=bg);var xg=/[^\dA-Za-z]/;function Sg(e,t,n,r){let i=String.fromCharCode(e);if(vg.call(yg,i)){let e=yg[i],a=`&`+e;return n&&hg.includes(e)&&!_g.includes(e)&&(!r||t&&t!==61&&xg.test(String.fromCharCode(t)))?a:a+`;`}return``}function Cg(e,t,n){let r=fg(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Sg(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=mg(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function wg(e,t){return cg(e,Object.assign({format:Cg},t))}var Tg=/^>|^->|<!--|-->|--!>|<!-$/g,Eg=[`>`],Dg=[`<`,`>`];function Og(e,t,n,r){return r.settings.bogusComments?`<?`+wg(e.value,Object.assign({},r.settings.characterReferences,{subset:Eg}))+`>`:`<!--`+e.value.replace(Tg,i)+`-->`;function i(e){return wg(e,Object.assign({},r.settings.characterReferences,{subset:Dg}))}}function kg(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function Ag(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function jg(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function Mg(e){return e.join(` `).trim()}var Ng=/[ \t\n\f\r]/g;function Pg(e){return typeof e==`object`?e.type===`text`&&Fg(e.value):Fg(e)}function Fg(e){return e.replace(Ng,``)===``}var Ig=zg(1),Lg=zg(-1),Rg=[];function zg(e){return t;function t(t,n,r){let i=t?t.children:Rg,a=(n||0)+e,o=i[a];if(!r)for(;o&&Pg(o);)a+=e,o=i[a];return o}}var Bg={}.hasOwnProperty;function Vg(e){return t;function t(t,n,r){return Bg.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Hg=Vg({body:Gg,caption:Ug,colgroup:Ug,dd:Yg,dt:Jg,head:Ug,html:Wg,li:qg,optgroup:Zg,option:Qg,p:Kg,rp:Xg,rt:Xg,tbody:e_,td:r_,tfoot:t_,th:r_,thead:$g,tr:n_});function Ug(e,t,n){let r=Ig(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&Pg(r.value.charAt(0)))}function Wg(e,t,n){let r=Ig(n,t);return!r||r.type!==`comment`}function Gg(e,t,n){let r=Ig(n,t);return!r||r.type!==`comment`}function Kg(e,t,n){let r=Ig(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function qg(e,t,n){let r=Ig(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Jg(e,t,n){let r=Ig(n,t);return!(!r||r.type!==`element`||r.tagName!==`dt`&&r.tagName!==`dd`)}function Yg(e,t,n){let r=Ig(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function Xg(e,t,n){let r=Ig(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Zg(e,t,n){let r=Ig(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Qg(e,t,n){let r=Ig(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function $g(e,t,n){let r=Ig(n,t);return!(!r||r.type!==`element`||r.tagName!==`tbody`&&r.tagName!==`tfoot`)}function e_(e,t,n){let r=Ig(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function t_(e,t,n){return!Ig(n,t)}function n_(e,t,n){let r=Ig(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function r_(e,t,n){let r=Ig(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var i_=Vg({body:s_,colgroup:c_,head:o_,html:a_,tbody:l_});function a_(e){let t=Ig(e,-1);return!t||t.type!==`comment`}function o_(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function s_(e){let t=Ig(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&Pg(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function c_(e,t,n){let r=Lg(n,t),i=Ig(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Hg(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function l_(e,t,n){let r=Lg(n,t),i=Ig(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Hg(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var u_={name:[[`
|
|
13
13
|
\f\r &/=>`.split(``),`
|
|
@@ -1532,7 +1532,7 @@ From `)}function UD(e){let t=WD(e);for(let e=0;e<t.length;e++)t[e]=kD(t[e]);retu
|
|
|
1532
1532
|
diff --git`)}function rO(e,t){if(e.length===0)return[``];let n=`\n${t}`,r=e.startsWith(t)?0:iO(e,n,0);if(r===-1)return[e];let i=[];r>0&&i.push(e.slice(0,r));let a=r;for(;;){let t=iO(e,n,a+1);if(t===-1)break;i.push(e.slice(a,t)),a=t}return i.push(e.slice(a)),i}function iO(e,t,n){let r=e.indexOf(t,n);return r===-1?-1:r+1}function aO(e){return e==null?e:kD(e)}function oO(e){return e===` `?`context`:e===`\\`?`metadata`:e===`+`?`addition`:`deletion`}function sO(e){let t=e.slice(1);return kD(t===``?`
|
|
1533
1533
|
`:t)}function cO(e,t,n){return e===`change`?{type:`change`,additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:`context`,lines:0,additionLineIndex:n,deletionLineIndex:t}}var lO=`/dev/null`;function uO(e,t,n,r=!1){if(e===null&&t===null)throw Error(`parseDiffFromFile: You must pass oldFile, newFile, or both`);let i=e??dO(),a=t??dO(),o=zD(Ww(i.name,a.name,i.contents,a.contents,i.header,a.header,n),{cacheKey:(()=>{let n=e?.cacheKey,r=t?.cacheKey;return n!=null&&r!=null?fD(`diff`,n,r):void 0})(),oldFile:i,newFile:a,throwOnError:r});if(o==null)throw Error(`parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?`);e===null?(o.type=`new`,o.prevName=void 0):t===null&&(o.type=`deleted`,o.prevName=void 0);let s=t?.lang??(t===null?e?.lang:void 0);return s!=null&&(o.lang=s),o}function dO(){return{name:lO,contents:``}}var fO=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&=(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,!1)}setup(e,t,n){if(t==null||n==null)for(let r of e.children??[])r instanceof HTMLElement&&(`deletions`in r.dataset?t=r:`additions`in r.dataset&&(n=r));if(n==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener(`scroll`,this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener(`scroll`,this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function pO(e,t){let n=uO({name:e.prevName??e.name,contents:e.deletionLines.join(``)},{name:e.name,contents:e.additionLines.join(``),lang:e.lang},t);return{hunks:n.hunks,splitLineCount:n.splitLineCount,unifiedLineCount:n.unifiedLineCount,additionLines:n.additionLines,deletionLines:n.deletionLines,type:n.type}}function mO(e,t){let n=Math.max(e,1),r=Array.from({length:n},(e,t)=>`${` `.repeat(t+1)}\n`).join(``);return r===t&&(r=Array.from({length:n},(e,t)=>`\u0000${` `.repeat(t)}\n`).join(``)),r}function hO(e){for(let t of e)if(t.trim().length>0)return!1;return!0}function gO(e,t){return t.length>0&&t.length<e.deletionLines.length&&hO(t)}function _O(e,t,n){let r=e.deletionLines.join(``),i=mO(t.length,r),a=uO({name:e.prevName??e.name,contents:r},{name:e.name,contents:i,lang:e.lang},n);return{hunks:a.hunks,splitLineCount:a.splitLineCount,unifiedLineCount:a.unifiedLineCount,additionLines:t,deletionLines:a.deletionLines,type:a.type}}function vO(e,t){return _O(e,[``],t)}function yO(e,t){if(e.additionLines.length===0)return vO(e,t);if(gO(e,e.additionLines))return _O(e,e.additionLines,t);let n=e.additionLines,r=pO(e,t);return xO(r,n),r}function bO(e){return e.length>1&&e.at(-1)===``}function xO(e,t){if(!bO(t))return;let n=t.length-e.additionLines.length;if(n<=0)return;let r=e.additionLines.length,i=e.hunks.at(-1);if(i!=null&&Pd(i.additionStart,i.additionCount)===r){for(let a of i.hunkContent)if(a.type===`change`&&a.additions<a.deletions&&a.additionLineIndex+a.additions===r){e.additionLines=t,a.additions+=n,i.additionCount+=n,i.additionLines+=n,jO(e);return}}}function SO(e,t,n){if(e.isPartial||e.deletionLines.length!==e.additionLines.length)return CO(e,pO(e,n));let r=Array.from(t);if(r.length===0)return CO(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type});for(let t of r){let r=e.additionLines[t],i=e.deletionLines[t];if(r==null||i==null||pw(r)===pw(i))return CO(e,pO(e,n))}let i=wO(e,r);if(i.size===0)return CO(e,pO(e,n));for(let t of i)if(!EO(e,t,n))return CO(e,pO(e,n));return jO(e),YC(e)?CO(e,pO(e,n)):CO(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type})}function CO(e,t){return Object.assign(e,t),t}function wO(e,t){let n=new Set;for(let r of t){let t=TO(e,r);if(t==null)return new Set;n.add(t)}return n}function TO(e,t){for(let[n,r]of e.hunks.entries()){let e=r.additionLineIndex+r.additionCount;if(t>=r.additionLineIndex&&t<e)return n}}function EO(e,t,n){let r=e.hunks[t];if(r==null)return!1;let i=e.deletionLines.slice(r.deletionLineIndex,r.deletionLineIndex+r.deletionCount),a=e.additionLines.slice(r.additionLineIndex,r.additionLineIndex+r.additionCount),o=uO({name:e.prevName??e.name,contents:i.join(``)},{name:e.name,contents:a.join(``),lang:e.lang},{...n,context:0}),s=o.hunks[0];return s==null||o.hunks.length!==1?!1:(OO(r,s),DO(e,t),!0)}function DO(e,t){let n=e.hunks[t];if(n==null)return;if(t!==e.hunks.length-1){n.noEOFCRAdditions=!1,n.noEOFCRDeletions=!1;return}let r=e.additionLines.at(-1),i=e.deletionLines.at(-1);n.noEOFCRAdditions=r!=null&&r!==``&&!r.endsWith(`
|
|
1534
1534
|
`),n.noEOFCRDeletions=i!=null&&i!==``&&!i.endsWith(`
|
|
1535
|
-
`)}function OO(e,t){let n=e.additionLineIndex,r=e.deletionLineIndex;e.hunkContent=t.hunkContent.map(e=>kO(e,n,r)),e.additionLineIndex=n+t.additionLineIndex,e.additionStart+=t.additionLineIndex,e.additionCount=t.additionCount,e.additionLines=t.additionLines,t.deletionLineIndex>=0&&(e.deletionLineIndex=r+t.deletionLineIndex,e.deletionStart+=t.deletionLineIndex),e.deletionCount=t.deletionCount,e.deletionLines=t.deletionLines,e.noEOFCRAdditions=t.noEOFCRAdditions,e.noEOFCRDeletions=t.noEOFCRDeletions,AO(e)}function kO(e,t,n){return{...e,additionLineIndex:e.additionLineIndex+t,deletionLineIndex:e.deletionLineIndex+n}}function AO(e){let t=0,n=0;for(let r of e.hunkContent)r.type===`context`?(t+=r.lines,n+=r.lines):(t+=Math.max(r.additions,r.deletions),n+=r.additions+r.deletions);e.splitLineCount=t,e.unifiedLineCount=n}function jO(e){let t=0,n=0,r=0;for(let i of e.hunks)i.collapsedBefore=Math.max(Nd(i.additionStart,i.additionCount)-r,0),i.splitLineStart=t+i.collapsedBefore,i.unifiedLineStart=n+i.collapsedBefore,AO(i),t+=i.collapsedBefore+i.splitLineCount,n+=i.collapsedBefore+i.unifiedLineCount,r=Pd(i.additionStart,i.additionCount);if(e.hunks.length>0){let r=e.hunks[e.hunks.length-1],i=Math.max(e.additionLines.length-Pd(r.additionStart,r.additionCount),0);t+=i,n+=i}e.splitLineCount=t,e.unifiedLineCount=n}var MO=new WeakMap;function NO(e){return e.length>1&&e[e.length-1]===``?e.slice(0,-1):e}function PO(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r++;let i=e.length,a=t.length;for(;i>r&&a>r&&e[i-1]===t[a-1];)i--,a--;if(r!==i||r!==a)return{start:r,deletionEnd:i,additionEnd:a}}function FO(e,t){let n=e.hunks,r=e.additionLines,i=NO(r),a=i===r?e:{...e,additionLines:i},o=GO(n,WO(a,t),e.deletionLines.length),s=JO(a,o);if(e.additionLines=i,e.hunks=s,e.editSessionDirty=!0,ik(e),xO(e,r),ZO(n,e.hunks))return{regions:o.map(e=>e.previousSpan)}}function IO(e,t,n,r){let i=Array.from(new Set(t)).filter(t=>t>=0&&t<e.additionLines.length).sort((e,t)=>e-t);if(i.length===0)return;let{hunks:a}=e,o,s=0;for(let t of i){for(;s<a.length;){let e=a[s];if(t<ek(e)+e.additionCount)break;s++}let r=a[s],i=r==null?void 0:ek(r);if(i==null||t<i||o!=null&&o!==s)return FO(e,n);o=s}if(o!=null){if(LO(e,i,o,r,n)){e.editSessionDirty=!0;return}return FO(e,n)}}function LO(e,t,n,r,i){if(r==null||i?.ignoreWhitespace===!0||i?.stripTrailingCr===!0)return!1;let a=RO(e),o=e.hunks[n];if(o.hunkContent.some(zO))return!1;for(let n of t){let t=r.get(n),i=e.additionLines[n];if(t==null||i==null||a.has(t)||a.has(i))return!1;let s=!1;for(let e of o.hunkContent)if(e.type===`change`&&e.additions===e.deletions&&n>=e.additionLineIndex&&n<e.additionLineIndex+e.additions){s=!0;break}if(!s)return!1}return!0}function RO(e){let t=MO.get(e);if(t?.lines===e.deletionLines)return t.set;let n=new Set(e.deletionLines);return MO.set(e,{lines:e.deletionLines,set:n}),n}function zO(e){return e?.type===`change`&&(e.additions===0||e.deletions===0)}function BO(e,t){let n=new Map,{regions:r}=t;for(let t=0;t<=r.length;t++){let i=r[t-1],a=r[t],o=t===0?e.get(0):i==null?void 0:e.get(i.lastIndex+1),s=a==null?void 0:e.get(a.firstIndex),c=o?.fromStart??0,l=s?.fromEnd??0;(c>0||l>0)&&n.set(t,{fromStart:c,fromEnd:l})}return n}function VO(e,t,n){let r=[];if(e.isPartial)return r;for(let[i,a]of e.hunks.entries()){let o=JC({isPartial:e.isPartial,rangeSize:a.collapsedBefore,expandedHunks:t,hunkIndex:i,collapsedContextThreshold:n});if(o.rangeSize<=n)continue;let s=tk(a),c=s-o.rangeSize;o.fromStart>0&&r.push([c,c+o.fromStart]),o.fromEnd>0&&r.push([s-o.fromEnd,s])}let i=ZC({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`captureExpansionAnchors`});if(i!=null&&i.fromStart>0&&i.rangeSize>n){let t=e.hunks[e.hunks.length-1],n=tk(t)+t.deletionCount;r.push([n,n+i.fromStart])}return r}function HO(e,t){let n=new Map;if(t.length===0)return n;let r=(e,r,i)=>{if(i<=r)return;let a=0,o=0;for(let[e,n]of t)n<=r||e>=i||(e<=r&&(a=Math.max(a,Math.min(n,i)-r)),n>=i&&(o=Math.max(o,i-Math.max(e,r))));(a>0||o>0)&&n.set(e,{fromStart:a,fromEnd:o})};for(let[t,n]of e.hunks.entries()){let e=tk(n);r(t,e-Math.max(n.collapsedBefore,0),e)}let i=e.hunks[e.hunks.length-1];return i!=null&&!e.isPartial&&e.deletionLines.length>0&&r(e.hunks.length,tk(i)+i.deletionCount,e.deletionLines.length),n}function UO(e,t){return e.editSessionDirty===!0&&(delete e.editSessionDirty,Object.assign(e,e.additionLines.length<=1&&e.additionLines.join(``)===``?pO(e,t):yO(e,t)),!0)}function WO(e,t){if(PO(e.deletionLines,e.additionLines)==null)return[];let n=uO({name:e.prevName??e.name,contents:e.deletionLines.join(``)},{name:e.name,contents:e.additionLines.join(``),lang:e.lang},t),r=[],i=0,a=0;for(let e of n.hunks){let t=e.additionCount>0?e.additionLineIndex-i:e.deletionLineIndex-a;i+=t,a+=t;for(let t of e.hunkContent){if(t.type===`context`){i+=t.lines,a+=t.lines;continue}let e=kO(t,0,0);e.additions===0&&(e.additionLineIndex=i),e.deletions===0&&(e.deletionLineIndex=a),r.push(e),i+=e.additions,a+=e.deletions}}return r}function GO(e,t,n){let r=e.map((e,t)=>{let n=tk(e);return{deletionStart:n,deletionEnd:n+e.deletionCount,blocks:[],previousSpan:{firstIndex:t,lastIndex:t}}}),i=[],a=0;for(let e of t){let t=e.deletionLineIndex,o=t+e.deletions;for(;a<r.length&&r[a].deletionEnd<t;)i.push(r[a]),a++;let s=i.length>0&&KO(t,o,i[i.length-1])?i.pop():void 0;for(;a<r.length&&r[a].deletionStart<=o;)s=qO(s,r[a]),a++;if(s==null){let c=t,l=o;if((e.deletions===0||e.additions===0)&&n>e.deletions){let e=i[i.length-1]?.deletionEnd??0,s=r[a]?.deletionStart??n;t>e?c--:o<s&&l++}s={deletionStart:c,deletionEnd:l,blocks:[],previousSpan:void 0}}s.deletionStart=Math.min(s.deletionStart,t),s.deletionEnd=Math.max(s.deletionEnd,o),s.blocks.push(e),i.push(s)}for(;a<r.length;)i.push(r[a]),a++;return i}function KO(e,t,n){return e<=n.deletionEnd&&t>=n.deletionStart}function qO(e,t){return e==null?t:(e.deletionStart=Math.min(e.deletionStart,t.deletionStart),e.deletionEnd=Math.max(e.deletionEnd,t.deletionEnd),e.blocks.push(...t.blocks),t.previousSpan!=null&&(e.previousSpan??={...t.previousSpan},e.previousSpan.firstIndex=Math.min(e.previousSpan.firstIndex,t.previousSpan.firstIndex),e.previousSpan.lastIndex=Math.max(e.previousSpan.lastIndex,t.previousSpan.lastIndex)),e)}function JO(e,t){let n=[],r=0,i=0;for(let a of t){let t=a.deletionStart-r;if(t<0)throw Error(`buildRegionHunks: overlapping old-side regions`);r+=t,i+=t;let o=i,s=[];for(let e of a.blocks){let t=e.deletionLineIndex-r,n=e.additionLineIndex-i;if(t<0||t!==n)throw Error(`buildRegionHunks: canonical block context mismatch`);XO(s,t,i,r),r+=t,i+=n,s.push({...e}),r+=e.deletions,i+=e.additions}let c=a.deletionEnd-r;if(c<0)throw Error(`buildRegionHunks: block exceeds its old-side region`);XO(s,c,i,r),r+=c,i+=c,n.push(YO(e,{additionStart:o,additionEnd:i,deletionStart:a.deletionStart,deletionEnd:a.deletionEnd},s))}if(e.deletionLines.length-r!==e.additionLines.length-i)throw Error(`buildRegionHunks: trailing context mismatch`);return n}function YO(e,t,n){let r=t.additionEnd-t.additionStart,i=t.deletionEnd-t.deletionStart,a=0,o=0;for(let e of n)e.type===`change`&&(a+=e.additions,o+=e.deletions);let s={collapsedBefore:0,additionStart:nk(t.additionStart,r),additionCount:r,additionLines:a,additionLineIndex:rk(t.additionStart,r),deletionStart:nk(t.deletionStart,i),deletionCount:i,deletionLines:o,deletionLineIndex:rk(t.deletionStart,i),hunkContent:n,hunkSpecs:`@@ -${nk(t.deletionStart,i)},${i} +${nk(t.additionStart,r)},${r} @@`,splitLineStart:0,splitLineCount:0,unifiedLineStart:0,unifiedLineCount:0,noEOFCRAdditions:!1,noEOFCRDeletions:!1};return AO(s),s}function XO(e,t,n,r){t>0&&e.push({type:`context`,lines:t,additionLineIndex:n,deletionLineIndex:r})}function ZO(e,t){if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(tk(r)!==tk(i)||r.deletionCount!==i.deletionCount||ek(r)!==ek(i)||r.additionCount!==i.additionCount||r.splitLineCount!==i.splitLineCount||!QO(r,i))return!0}return!1}function QO(e,t){let n=$O(e),r=$O(t);for(;;){let e=n.next(),t=r.next();if(e.done===!0||t.done===!0)return e.done===t.done;if(e.value[0]!==t.value[0]||e.value[1]!==t.value[1])return!1}}function*$O(e){for(let t of e.hunkContent){if(t.type===`context`){for(let e=0;e<t.lines;e++)yield[t.deletionLineIndex+e,t.additionLineIndex+e];continue}let e=Math.max(t.deletions,t.additions);for(let n=0;n<e;n++)yield[n<t.deletions?t.deletionLineIndex+n:void 0,n<t.additions?t.additionLineIndex+n:void 0]}}function ek(e){return Nd(e.additionStart,e.additionCount)}function tk(e){return Nd(e.deletionStart,e.deletionCount)}function nk(e,t){return t===0?e:e+1}function rk(e,t){return t===0?e-1:e}function ik(e){jO(e);for(let t=0;t<e.hunks.length;t++)DO(e,t)}function ak(e){return eC({tagName:`div`,properties:{"data-content-buffer":``,"data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function ok(e){return eC({tagName:`div`,children:[eC({tagName:`span`,children:[$S(`No newline at end of file`)]})],properties:{"data-no-newline":``,"data-line-type":e,"data-column-content":``}})}function sk(e){return eC({tagName:`div`,children:[tC({name:e===`both`?`diffs-icon-expand-all`:`diffs-icon-expand`,properties:{"data-icon":``}})],properties:{role:`button`,"data-expand-button":``,"data-expand-both":e===`both`?``:void 0,"data-expand-up":e===`up`?``:void 0,"data-expand-down":e===`down`?``:void 0}})}function ck({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:i,isFirstHunk:a,isLastHunk:o}){let s=0,c=[];if(e===`metadata`&&t!=null&&c.push(eC({tagName:`div`,children:[$S(t)],properties:{"data-separator-wrapper":``}})),(e===`line-info`||e===`line-info-basic`)&&t!=null){let e=[];n!=null&&(r?(a||(e.push(sk(`up`)),s++),o||(e.push(sk(`down`)),s++)):(e.push(sk(!a&&!o?`both`:a?`down`:`up`)),s++)),e.push(eC({tagName:`div`,children:[eC({tagName:`span`,children:[$S(t)],properties:{"data-unmodified-lines":``}})],properties:{"data-separator-content":``}})),r&&n!=null&&e.push(eC({tagName:`div`,children:[$S(`Expand all`)],properties:{role:`button`,"data-expand-button":``,"data-expand-all-button":``}})),c.push(eC({tagName:`div`,children:e,properties:{"data-separator-wrapper":``,"data-separator-multi-button":s>1?``:void 0}}))}return e===`custom`&&i!=null&&c.push(eC({tagName:`slot`,properties:{name:i}})),eC({tagName:`div`,children:c,properties:{"data-separator":c.length===0?`simple`:e,"data-expand-index":n,"data-separator-first":a?``:void 0,"data-separator-last":o?``:void 0}})}function lk(e,t){return`hunk-separator-${e}-${t}`}function uk(e){let t=e.at(-1);return t==null?0:Math.max(Pd(t.additionStart,t.additionCount),Pd(t.deletionStart,t.deletionCount))}var dk=-1,fk=class{options;annotationSlotName;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++dk}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLangs=[`text`];renderCache;pendingHighlightResult;pendingStructuralRows;editSessionActive=!1;constructor(e={theme:xd},t=jd,n,r){this.options=e,this.annotationSlotName=t,this.onRenderUpdate=n,this.workerManager=r,r?.isWorkingPool()!==!0&&(this.highlighter=sS(e.theme??xd)?PS():void 0)}cleanUp(){this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this),this.endEditSession()}beginEditSession(e,t){let{editSessionActive:n,renderCache:r}=this;if(this.editSessionActive=!0,n||(this.pendingHighlightResult=void 0),this.diff=e,!e.isPartial&&e.additionLines.length===0){Object.assign(e,vO(e,this.options.parseDiffOptions)),this.markEditSessionPass(e),this.clearRenderCache();return}if(r==null||n&&r.diff===e)return;let{options:i}=this.getRenderOptions(e),a=r.diff===e,o=t!=null&&RC(r.diff,t),{result:s}=r;if(!r.highlighted||s==null||!BC(r.options,i)||!a&&!o){this.clearRenderCache();return}a||(this.renderCache={diff:e,options:i,highlighted:!0,result:{...s,code:{...s.code,additionLines:[...s.code.additionLines]}},renderRange:r.renderRange})}endEditSession(){this.editSessionActive=!1,this.pendingHighlightResult=void 0}editorRenderReady(){return this.renderCache?.options.useTokenTransformer===!0&&this.renderCache.highlighted&&this.renderCache.result!=null}refreshHighlightedResult(){let{diff:e,renderCache:t,workerManager:n}=this;return e==null||t==null||!RC(t.diff,e)||VC(e)||Tk(e,this.getTokenizeMaxLength())?Promise.resolve():!this.editSessionActive&&n?.isWorkingPool()===!0&&e.cacheKey!=null?(n.evictDiffFromCache(e.cacheKey),n.primeDiffHighlightCache(e).then(()=>{this.applyRefreshedResult(e,n.getDiffResultCache(e))}).catch(e=>this.onHighlightError(e))):this.asyncHighlight(e).then(t=>this.applyRefreshedResult(e,t)).catch(e=>this.onHighlightError(e))}applyRefreshedResult(e,t){let{diff:n,renderCache:r}=this;if(t==null||n==null||r==null||!RC(n,e)||!RC(r.diff,e)||this.editSessionActive)return;let{options:i}=this.getRenderOptions(n);BC(i,t.options)&&(this.pendingHighlightResult={diff:n,options:t.options,highlighted:!0,result:t.result},this.onRenderUpdate?.())}get diffCache(){return this.renderCache?.diff??this.diff}clearRenderCache(){this.renderCache=void 0,this.pendingHighlightResult=void 0,this.pendingStructuralRows=void 0}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){let r={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t===`up`||t===`both`)&&(r.fromStart+=n),(t===`down`||t===`both`)&&(r.fromEnd+=n),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,r)}getExpandedHunk(e){return this.expandedHunks.get(e)??Od}getExpandedHunksMap(){return this.expandedHunks}setExpandedHunksMap(e){this.expandedHunks=e}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(let t of e){let e=(()=>{switch(t.side){case`deletions`:return this.deletionAnnotations;case`additions`:return this.additionAnnotations}})(),n=e[t.lineNumber]??[];e[t.lineNumber]=n,n.push(t)}}updateRenderCache(e,t,n=!1){this.pendingStructuralRows=void 0;let{renderCache:r}=this;if(r==null)return!1;let{result:i,diff:a}=r;if(i==null)return!1;if(a.isPartial)throw Error(`Could not update render cache for partial diff`);let o=i.code.additionLines,s=this.pendingStructuralRows=n?new Map:void 0,c=[],l=new Map;for(let[t,n]of e){let e=o[t]?.properties??{},r=n.map(e=>e[2]).join(``),i=t<a.additionLines.length,u=i?a.additionLines[t]??``:``,d=pw(u);s==null&&i&&(a.additionLines[t]=gE(u,r),d!==r&&(c.push(t),l.set(t,u)));let f={type:`element`,tagName:`div`,properties:{"data-line":e[`data-line`]??t+1,"data-line-index":e[`data-line-index`]??t,"data-line-type":e[`data-line-type`]??`context`},children:n.map(([e,t,n])=>e===0&&t===``?n===``?{type:`element`,tagName:`br`,properties:{},children:[]}:{type:`text`,value:n}:{type:`element`,tagName:`span`,properties:{"data-char":e,style:`color:${t};`},children:[{type:`text`,value:n}]})};s==null?o[t]=f:s.set(t,f)}let u=!1;if(c.length>0){if(this.editSessionActive){if(a.additionLines.length<=1&&a.additionLines.join(``)===``)this.applyRecomputePreservingSessionType(a,vO(a,this.options.parseDiffOptions)),u=!0;else if(gO(a,a.additionLines))this.applyRecomputePreservingSessionType(a,_O(a,a.additionLines,this.options.parseDiffOptions)),u=!0;else{let e=IO(a,c,this.options.parseDiffOptions,l);this.applyExpansionRemap(e),u=e!=null}}else Object.assign(a,SO(a,c,this.options.parseDiffOptions))}return i.baseThemeType=t,r.isDirty=!0,u}applyExpansionRemap(e){e!=null&&(this.expandedHunks=BO(this.expandedHunks,e))}applyDocumentChange(e){let{pendingStructuralRows:t,renderCache:n}=this;if(this.pendingStructuralRows=void 0,n==null)return;let{diff:r,result:i}=n;if(i==null)return;if(r.isPartial)throw Error(`Could not apply document change for partial diff`);let{additionLines:a}=r;if(r.additionLines=Ck(e),i.code.additionLines=xk(a,r.additionLines,i.code.additionLines,e),r.additionLines.length<=1&&r.additionLines.join(``)===``?(this.applyRecomputePreservingSessionType(r,vO(r,this.options.parseDiffOptions)),i.code.additionLines[0]=Sk(0,e.getLineText(0))):this.editSessionActive?this.applySessionDocumentChange(r):Object.assign(r,yO(r,this.options.parseDiffOptions)),t!=null)for(let[e,n]of t)e<i.code.additionLines.length&&(i.code.additionLines[e]=n);n.isDirty=!0}applySessionDocumentChange(e){let{parseDiffOptions:t}=this.options,n=e.additionLines;if(gO(e,n)){this.applyRecomputePreservingSessionType(e,_O(e,n,t));return}this.applyExpansionRemap(FO(e,t))}applyRecomputePreservingSessionType(e,t){let n=this.editSessionActive?e.type:void 0;Object.assign(e,t),n!=null&&(e.type=n),this.markEditSessionPass(e)}markEditSessionPass(e){this.editSessionActive&&(e.editSessionDirty=!0)}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e,contentProperties:{"data-line-type":e}}}getSplitLineDecoration({side:e,type:t}){let n=t===`change`?e===`deletions`?`change-deletion`:`change-addition`:t;return{gutterLineType:n,contentProperties:{"data-line-type":n}}}createAnnotationElement=e=>_E(e);getOptionsWithDefaults(){let{diffIndicators:e=`bars`,diffStyle:t=`split`,disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:i=!1,disableVirtualizationBuffers:a=!1,collapsed:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=1,expansionLineCount:l=100,hunkSeparators:u=`line-info`,lineDiffType:d=`word-alt`,maxLineDiffLength:f=1e3,overflow:p=`scroll`,stickyHeader:m=!1,theme:h=xd,headerRenderMode:g=`default`,tokenizeMaxLineLength:_=1e3,tokenizeMaxLength:v=Ed,useTokenTransformer:y=!1,useCSSClasses:b=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:i,disableVirtualizationBuffers:a,collapsed:o,expandUnchanged:s,collapsedContextThreshold:c,expansionLineCount:l,hunkSeparators:u,lineDiffType:d,maxLineDiffLength:f,overflow:p,stickyHeader:m,theme:this.workerManager?.getDiffRenderOptions().theme??h,headerRenderMode:g,tokenizeMaxLineLength:_,tokenizeMaxLength:v,useTokenTransformer:y,useCSSClasses:b}}async initializeHighlighter(){return this.highlighter=await NS(TE(this.computedLangs,{theme:this.getLocalHighlightTheme(),preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter})),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;let{options:t}=this.getRenderOptions(e),n=Tk(e,this.getTokenizeMaxLength()),r=this.workerManager?.getDiffResultCache(e);r!=null&&!BC(t,r.options)&&(r=void 0),this.renderCache??={diff:e,hydrated:!0,highlighted:!n&&!VC(e),options:t,result:n?void 0:r?.result,renderRange:void 0},!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter??(this.computedLangs=wk(e),this.initializeHighlighter())}getLocalHighlightTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??xd}getEffectiveCodeOptions(){let e=this.workerManager?.isWorkingPool()===!0?this.workerManager.getDiffRenderOptions():void 0;return{theme:this.getLocalHighlightTheme(),tokenizeMaxLineLength:e?.tokenizeMaxLineLength??this.options.tokenizeMaxLineLength}}getRenderOptions(e){let t=(()=>{if(this.workerManager?.isWorkingPool()===!0){let e=this.workerManager.getDiffRenderOptions();return this.editSessionActive&&e.useTokenTransformer!==!0?{...e,useTokenTransformer:!0}:e}let{theme:e,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}=this.getOptionsWithDefaults();return{theme:e,useTokenTransformer:this.editSessionActive||this.options.useTokenTransformer===!0,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}})();this.getOptionsWithDefaults();let{renderCache:n}=this;return n?.result==null||!RC(e,n.diff)||!BC(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getDiffForNextRender(e){let{options:t}=this.getRenderOptions(e);if(this.getReadyRenderResult(e,t)!=null||this.renderCache==null)return e;if(RC(this.renderCache.diff,e))return this.renderCache.diff;let n=!(e.additionLines.length>0||e.deletionLines.length>0)||VC(e)||Tk(e,this.getTokenizeMaxLength());return this.canRenderDiff(e,t,n)?e:this.renderCache.diff}canRenderDiff(e,t,n){let{renderCache:r}=this;return r==null||RC(r.diff,e)?!0:n?r.result==null&&r.hydrated!==!0||this.workerManager?.isWorkingPool()===!0||this.highlighter!=null&&sS(t.theme):r.result==null&&r.hydrated!==!0?!0:!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0?!r.highlighted:this.highlighter!=null&&sS(t.theme)}renderDiff(e=this.diff,t=kd){if(this.diff=e,e==null){this.pendingHighlightResult=void 0;return}let{expandUnchanged:n,collapsedContextThreshold:r}=this.getOptionsWithDefaults(),{options:i,forceHighlight:a}=this.getRenderOptions(e),o=this.getReadyRenderResult(e,i);this.pendingHighlightResult=void 0,o!=null&&(this.renderCache={...o,diff:e,renderRange:void 0},a=!1),this.renderCache??={diff:e,highlighted:!1,options:i,result:void 0,renderRange:void 0};let s=e.additionLines.length>0||e.deletionLines.length>0,c=!s||VC(e)||Tk(e,this.getTokenizeMaxLength()),l=this.canRenderDiff(e,i,c),u=!RC(e,this.renderCache.diff),d=!hE(this.renderCache.renderRange,t);if(!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0){let o=this.renderCache.result==null&&this.renderCache.highlighted&&!c&&!u&&EE(t);l&&!o&&(c||this.renderCache.result==null||!this.renderCache.highlighted&&(u||d))&&(this.renderCache.diff=e,this.renderCache.options=i,this.renderCache.highlighted=!1,(this.renderCache.result==null||u||d||a)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,EE(t)||n?!0:this.expandedHunks,r)),this.renderCache.renderRange=t),!c&&s&&(!this.renderCache.highlighted||a)&&this.workerManager.highlightDiffAST(this,e)}else{this.computedLangs=wk(e),this.highlighter??=PS();let t=this.highlighter!=null&&sS(i.theme),n=this.highlighter!=null&&Ud(this.computedLangs),r=!c&&n;if(l&&this.highlighter!=null&&t&&(a||c||!this.renderCache.highlighted&&r||this.renderCache.result==null)){let{result:t,options:i}=this.renderDiffWithHighlighter(e,this.highlighter,c||!n);this.renderCache={diff:e,options:i,highlighted:r,result:t,renderRange:void 0}}(!t||!c&&!n)&&this.asyncHighlight(e).then(({result:t,options:n})=>{this.applyHighlightResult(e,t,n,!c)})}return this.renderCache.result==null?void 0:this.processDiffResult(this.renderCache.diff,t,this.renderCache.result)}async asyncRender(e,t=kd){this.diff=e;let{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){let{diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o}=this.getOptionsWithDefaults();return CE({type:`diff`,diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e){let t=Tk(e,this.getTokenizeMaxLength());this.computedLangs=t?[`text`]:wk(e);let n=this.highlighter!=null&&sS(this.getLocalHighlightTheme()),r=t||this.highlighter!=null&&Ud(this.computedLangs);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,n=!1){let{options:r}=this.getRenderOptions(e),{collapsedContextThreshold:i}=this.getOptionsWithDefaults(),a=Yw(e,t,r,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:i});if(this.editSessionActive&&e.additionLines.length===1&&e.additionLines[0]===``&&a.code.additionLines[0]==null){let t;if(ow({diff:e,diffStyle:`both`,expandedHunks:n?!0:void 0,collapsedContextThreshold:i,callback:({additionLine:e})=>{if(e?.lineIndex===0)return t=e,!0}}),t==null)throw Error(`DiffHunksRenderer: missing empty addition line`);a.code.additionLines[0]=Sk(0,``,t.unifiedLineIndex,t.splitLineIndex)}return{result:a,options:r}}onHighlightSuccess(e,t,n,r=!0){this.editSessionActive||this.applyHighlightResult(e,t,n,r)}applyHighlightResult(e,t,n,r=!0){let{diff:i,renderCache:a}=this;i!=null&&a!=null&&RC(i,e)&&BC(n,this.getRenderOptions(i).options)&&(a.result!=null&&a.highlighted&&BC(a.options,n)&&RC(a.diff,i)||(this.pendingHighlightResult={diff:i,options:n,highlighted:r,result:t},this.onRenderUpdate?.()))}getMatchingWorkerResultCache(e,t){if(this.editSessionActive)return;let n=this.workerManager?.getDiffResultCache(e);if(n!=null&&BC(t,n.options))return n}getReadyRenderResult(e,t){let{pendingHighlightResult:n}=this;if(n!=null&&RC(n.diff,e)&&BC(n.options,t))return n;let r=this.getMatchingWorkerResultCache(e,t);if(!(r==null||this.hasHighlightedRenderCache(e,t)))return{diff:e,highlighted:!0,...r}}hasHighlightedRenderCache(e,t){let{renderCache:n}=this;return n?.result!=null&&n.highlighted&&RC(e,n.diff)&&BC(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){let{diffStyle:a,disableFileHeader:o,expandUnchanged:s,expansionLineCount:c,collapsedContextThreshold:l,hunkSeparators:u}=this.getOptionsWithDefaults(),d=this.renderCache?.isDirty??!1,f=a===`unified`,p=Ek(e,this.options.loadDiffFiles!=null),m=!e.isPartial||p,h=[],g=[],_=[],v=[],{additionLines:y,deletionLines:b}=n,x={rowCount:0,hunkSeparators:u,additionsContentAST:h,deletionsContentAST:g,unifiedContentAST:_,unifiedGutterAST:rC(),deletionsGutterAST:rC(),additionsGutterAST:rC(),expansionLineCount:c,hunkData:v,incrementRowCount(e=1){x.rowCount+=e},pushToGutter(e,t){switch(e){case`unified`:x.unifiedGutterAST.children.push(t);break;case`deletions`:x.deletionsGutterAST.children.push(t);break;case`additions`:x.additionsGutterAST.children.push(t)}}},S=XC({fileDiff:e,errorPrefix:`DiffHunksRenderer.processDiffResult`}),C={size:0,side:void 0,increment(){this.size+=1},flush(){if(a!==`unified`){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side===`additions`?(x.pushToGutter(`additions`,aC(void 0,`buffer`,this.size)),h?.push(ak(this.size))):(x.pushToGutter(`deletions`,aC(void 0,`buffer`,this.size)),g?.push(ak(this.size))),this.size=0,this.side=void 0}}},w=(e,t,n,r,i)=>{x.pushToGutter(e,iC(t,n,r,i))};function T(e){C.flush(),a===`unified`?vk(`unified`,e,x):(vk(`deletions`,e,x),vk(`additions`,e,x))}this.pushFileLevelAnnotations(e,a,t,x),ow({diff:e,diffStyle:a,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:s?!0:this.expandedHunks,collapsedContextThreshold:l,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,additionLine:o,deletionLine:s,type:c})=>{let l=s==null?o.splitLineIndex:s.splitLineIndex,f=o==null?s.unifiedLineIndex:o.unifiedLineIndex;a===`split`&&c!==`change`&&C.flush(),r>0&&T({hunkIndex:t,collapsedLines:r,rangeSize:Math.max(n?.collapsedBefore??0,0),hunkSpecs:n?.hunkSpecs,isFirstHunk:t===0,isLastHunk:!1,isExpandable:m});let h=a===`unified`?f:l,g={type:c,hunkIndex:t,lineIndex:h,unifiedLineIndex:f,splitLineIndex:l,deletionLine:s,additionLine:o};if(a===`unified`){let n=this.getUnifiedInjectedRowsForLine?.(g);n?.before!=null&&hk(n.before,x);let r=s==null?void 0:b[s.lineIndex],i=o==null?void 0:y[o.lineIndex];if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let a=c===`change`?o==null?`change-deletion`:`change-addition`:c,u=this.getUnifiedLineDecoration({type:c,lineType:a,additionLineIndex:o?.lineIndex,deletionLineIndex:s?.lineIndex});w(`unified`,u.gutterLineType,o==null?s.lineNumber:o.lineNumber,`${f},${l}`,u.gutterProperties),i==null?r!=null&&(r=yk(r,u.contentProperties,d&&s!=null?{"data-line":s.lineNumber,"data-line-index":`${f},${l}`}:void 0)):i=yk(i,u.contentProperties,d&&o!=null?{"data-line":o.lineNumber,"data-line-index":`${f},${l}`}:void 0),_k({diffStyle:`unified`,type:c,deletionLine:r,additionLine:i,unifiedSpan:this.getAnnotations(`unified`,s?.lineNumber,o?.lineNumber,t,h),createAnnotationElement:e=>this.createAnnotationElement(e),context:x}),n?.after!=null&&hk(n.after,x)}else{let n=this.getSplitInjectedRowsForLine?.(g);n?.before!=null&&gk(n.before,x,C);let r=s==null?void 0:b[s.lineIndex],i=o==null?void 0:y[o.lineIndex],a=this.getSplitLineDecoration({side:`deletions`,type:c,lineIndex:s?.lineIndex}),u=this.getSplitLineDecoration({side:`additions`,type:c,lineIndex:o?.lineIndex});if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let f=(()=>{if(c===`change`){if(i==null)return`additions`;if(r==null)return`deletions`}})();f==null?c===`change`&&C.flush():(C.side!=null&&C.side!==f&&C.flush(),C.side=f,C.increment());let p=this.getAnnotations(`split`,s?.lineNumber,o?.lineNumber,t,h);if(p!=null&&C.size>0&&C.flush(),s!=null){let e=yk(r,a.contentProperties,d?{"data-line":s.lineNumber,"data-line-index":`${s.unifiedLineIndex},${l}`}:void 0);w(`deletions`,a.gutterLineType,s.lineNumber,`${s.unifiedLineIndex},${l}`,a.gutterProperties),e!=null&&(r=e)}if(o!=null){let e=yk(i,u.contentProperties,d?{"data-line":o.lineNumber,"data-line-index":`${o.unifiedLineIndex},${l}`}:void 0);w(`additions`,u.gutterLineType,o.lineNumber,`${o.unifiedLineIndex},${l}`,u.gutterProperties),e!=null&&(i=e)}_k({diffStyle:`split`,type:c,additionLine:i,deletionLine:r,...p,createAnnotationElement:e=>this.createAnnotationElement(e),context:x}),n?.after!=null&&gk(n.after,x,C)}let _=a===`split`&&n!=null&&l===n.splitLineStart+n.splitLineCount-1,v=t===e.hunks.length-1&&n!=null&&(a===`split`?l===n.splitLineStart+n.splitLineCount-1:f===n.unifiedLineStart+n.unifiedLineCount-1),E=_?n.noEOFCRDeletions:!1,D=_?n.noEOFCRAdditions:!1,O=(s?.noEOFCR??!1)||E,k=(o?.noEOFCR??!1)||D;if(k||O){if(a===`split`&&C.flush(),O){let e=c===`context`||c===`context-expanded`?c:`change-deletion`;a===`unified`?(x.unifiedContentAST.push(ok(e)),x.pushToGutter(`unified`,aC(e,`metadata`,1))):(x.deletionsContentAST.push(ok(e)),x.pushToGutter(`deletions`,aC(e,`metadata`,1)),k||(x.pushToGutter(`additions`,aC(void 0,`buffer`,1)),x.additionsContentAST.push(ak(1))))}if(k){let e=c===`context`||c===`context-expanded`?c:`change-addition`;a===`unified`?(x.unifiedContentAST.push(ok(e)),x.pushToGutter(`unified`,aC(e,`metadata`,1))):(x.additionsContentAST.push(ok(e)),x.pushToGutter(`additions`,aC(e,`metadata`,1)),O||(x.pushToGutter(`deletions`,aC(void 0,`buffer`,1)),x.deletionsContentAST.push(ak(1))))}x.incrementRowCount(1)}u!==`simple`&&u!==`metadata`&&(i>0||v&&p)&&T({hunkIndex:c===`context-expanded`?t:t+1,collapsedLines:v&&p?`unknown`:i,rangeSize:S,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:m}),x.incrementRowCount(1)}}),a===`split`&&C.flush();let E=Math.max(uk(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),D=t.bufferBefore>0||t.bufferAfter>0,O=!f&&e.type!==`deleted`,k=!f&&e.type!==`new`,A=x.rowCount>0||D;h=O&&A?h:void 0,g=k&&A?g:void 0,_=f&&A?_:void 0;let j=this.createPreElement(g!=null&&h!=null,E);return{fileDiff:e,unifiedGutterAST:f&&A?x.unifiedGutterAST.children:void 0,unifiedContentAST:_,deletionsGutterAST:k&&A?x.deletionsGutterAST.children:void 0,deletionsContentAST:g,additionsGutterAST:O&&A?x.additionsGutterAST.children:void 0,additionsContentAST:h,hunkData:v,preNode:j,themeStyles:r,baseThemeType:i,headerElement:o?void 0:this.renderHeader(e),totalLines:E,rowCount:x.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:``}}renderCodeAST(e,t){let n=e===`unified`?t.unifiedGutterAST:e===`deletions`?t.deletionsGutterAST:t.additionsGutterAST,r=e===`unified`?t.unifiedContentAST:e===`deletions`?t.deletionsContentAST:t.additionsContentAST;if(n==null||r==null)return;let i=rC(n);return i.properties.style=`grid-row: span ${t.rowCount}`,[i,vE(r,t.rowCount)]}renderFullAST(e,t=[]){let n=this.getOptionsWithDefaults().hunkSeparators===`line-info`,r=this.renderCodeAST(`unified`,e);if(r!=null)return t.push(eC({tagName:`code`,children:r,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-unified":``}})),{...e.preNode,children:t};let i=this.renderCodeAST(`deletions`,e);i!=null&&t.push(eC({tagName:`code`,children:i,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-deletions":``}}));let a=this.renderCodeAST(`additions`,e);return a!=null&&t.push(eC({tagName:`code`,children:a,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-additions":``}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return w_(this.renderFullAST(e,t))}renderPartialHTML(e,t){return w_(t==null?e:eC({tagName:`code`,children:e,properties:{"data-code":``,"data-container-size":this.getOptionsWithDefaults().hunkSeparators===`line-info`?``:void 0,[`data-${t}`]:``}}))}pushFileLevelAnnotations(e,t,n,r){if(!IT(n))return;let i=e.type===`new`?[]:this.getAnnotationNames(FT(this.deletionAnnotations)),a=e.type===`deleted`?[]:this.getAnnotationNames(FT(this.additionAnnotations));if(i.length===0&&a.length===0)return;let{createAnnotationElement:o}=this;if(t===`unified`){_k({diffStyle:t,type:`context`,unifiedSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i.concat(a)},createAnnotationElement:o,context:r});return}_k({diffStyle:t,type:`context`,deletionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i},additionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:a},createAnnotationElement:o,context:r})}getAnnotations(e,t,n,r,i){let a={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(t!=null)for(let e of this.deletionAnnotations[t]??[])a.annotations.push(this.annotationSlotName(e));let o={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(n!=null)for(let t of this.additionAnnotations[n]??[])(e===`unified`?a:o).annotations.push(this.annotationSlotName(t));if(e===`unified`)return a.annotations.length>0?a:void 0;if(o.annotations.length!==0||a.annotations.length!==0)return{deletionSpan:a,additionSpan:o}}getAnnotationNames(e){return e?.map(e=>this.annotationSlotName(e))??[]}renderHeader(e){let{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return bE({fileOrDiff:e,mode:t,stickyHeader:n})}},pk=new Intl.PluralRules(`en-US`);function mk(e){return`${e} unmodified line${pk.select(e)===`one`?``:`s`}`}function hk(e,t){for(let n of e)t.unifiedContentAST.push(n.content),t.pushToGutter(`unified`,n.gutter),t.incrementRowCount(1)}function gk(e,t,n){for(let{deletion:r,addition:i}of e){if(r==null&&i==null)continue;let e=r!=null&&i!=null?void 0:r==null?`deletions`:`additions`;(e==null||n.side!==e)&&n.flush(),r!=null&&(t.deletionsContentAST.push(r.content),t.pushToGutter(`deletions`,r.gutter)),i!=null&&(t.additionsContentAST.push(i.content),t.pushToGutter(`additions`,i.gutter)),e!=null&&(n.side=e,n.increment()),t.incrementRowCount(1)}}function _k({diffStyle:e,type:t,deletionLine:n,additionLine:r,unifiedSpan:i,deletionSpan:a,additionSpan:o,createAnnotationElement:s,context:c}){let l=!1;if(e===`unified`){if(r==null?n!=null&&c.unifiedContentAST.push(n):c.unifiedContentAST.push(r),i!=null){let e=t===`change`?n==null?`change-addition`:`change-deletion`:t;c.unifiedContentAST.push(s(i)),c.pushToGutter(`unified`,aC(e,`annotation`,1)),l=!0}}else if(e===`split`){if(n!=null&&c.deletionsContentAST.push(n),r!=null&&c.additionsContentAST.push(r),a!=null){let e=t===`change`?n==null?`context`:`change-deletion`:t;c.deletionsContentAST.push(s(a)),c.pushToGutter(`deletions`,aC(e,`annotation`,1)),l=!0}if(o!=null){let e=t===`change`?r==null?`context`:`change-addition`:t;c.additionsContentAST.push(s(o)),c.pushToGutter(`additions`,aC(e,`annotation`,1)),l=!0}}l&&c.incrementRowCount(1)}function vk(e,{hunkIndex:t,collapsedLines:n,rangeSize:r,hunkSpecs:i,isFirstHunk:a,isLastHunk:o,isExpandable:s},c){if(typeof n==`number`&&n<=0)return;let l=e===`unified`?c.unifiedContentAST:e===`deletions`?c.deletionsContentAST:c.additionsContentAST;if(c.hunkSeparators===`metadata`){i!=null&&(c.pushToGutter(e,ck({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),l.push(ck({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1));return}if(c.hunkSeparators===`simple`){t>0&&(c.pushToGutter(e,ck({type:`simple`,isFirstHunk:a,isLastHunk:!1})),l.push(ck({type:`simple`,isFirstHunk:a,isLastHunk:!1})),e!==`additions`&&c.incrementRowCount(1));return}let u=lk(e,t),d=r>c.expansionLineCount,f=s?t:void 0,p=typeof n==`number`?mk(n):`More unchanged context may be available`;c.pushToGutter(e,ck({type:c.hunkSeparators,content:p,expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),l.push(ck({type:c.hunkSeparators,content:p,expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1),c.hunkData.push({slotName:u,hunkIndex:t,lines:typeof n==`number`?n:0,lineCountKnown:typeof n==`number`,type:e,expandable:s?{up:!a,down:!o,chunked:d}:void 0})}function yk(e,t,n){return e==null||e.type!==`element`||t==null&&n==null?e:{...e,properties:{...e.properties,...t,...n}}}function bk(e){return e.length>0&&e[e.length-1]===``?e.length-1:e.length}function xk(e,t,n,r){let i=bk(e),a=bk(t),o=Math.min(i,a),s=0;for(;s<o&&e[s]===t[s];)s++;let c=0;for(;c<o-s&&e[i-1-c]===t[a-1-c];)c++;let l=Array(t.length);for(let e=0;e<s;e++)l[e]=n[e];for(let e=0;e<c;e++)l[a-1-e]=n[i-1-e];i<e.length&&a<t.length&&(l[t.length-1]=n[e.length-1]);for(let e=s;e<t.length;e++)l[e]??=Sk(e,r.getLineText(e));return l}function Sk(e,t,n=e,r=e){return{type:`element`,tagName:`div`,properties:{"data-line":e+1,"data-line-index":`${n},${r}`,"data-line-type":`context`},children:[{type:`element`,tagName:`span`,properties:{"data-char":0},children:[{type:`text`,value:t}]}]}}function Ck(e){let t=[];for(let n=0;n<e.lineCount;n++)t.push(e.getLineText(n,!0));return t}function wk(e){if(e.lang!=null)return[e.lang];let t=HS(e.prevName??e.name),n=HS(e.name);return t===n?[n]:[t,n]}function Tk(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function Ek(e,t){return e.isPartial&&t&&(e.type===`change`||e.type===`rename-changed`)}function Dk(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function Ok(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.lineCountKnown===t.lineCountKnown&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}function kk(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:YE(e),tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators==`function`?`custom`:e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,loadDiffFiles:e?.loadDiffFiles,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`}}function Ak(e){return e.isPartial&&(e.type===`change`||e.type===`rename-changed`||e.type===`rename-pure`)}function jk(e){let t={...e};return delete t.cacheKey,t}function Mk(e,t){if(e.isPartial||t.isPartial)throw Error(`FileDiff.shouldResetEditorForExternalDiff: diffs must be fully hydrated`);let n=e.lang??HS(e.name),r=t.lang??HS(t.name),i=e.type!==`new`,a=t.type!==`new`;return e.name!==t.name||n!==r||i!==a||e.deletionLines.length!==t.deletionLines.length||e.deletionLines.some((e,n)=>e!==t.deletionLines[n])}function Nk(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function Pk(e,t){let{oldFile:n}=e;return n==null?t.type===`new`:t.type!==`new`&&n.name===(t.prevName??t.name)&&Nk(n.lines,t.deletionLines)}var Fk=-1,Ik=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++Fk}`;type=`file-diff`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerFilenameSuffix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;editSession;renderedDiff;renderRange;pendingFiles;appliedPreAttributes;headerCache={lastRenderedHTML:void 0,html:void 0,fileDiff:void 0};lastRowCount;mounted=!1;enabled=!0;editor;refreshViewTimeout;lineStateRefreshPending=!1;deferredSelectedLines;deferredEditorActiveLine;constructor(e={theme:xd},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new sE,this.scrollSyncManager=new fO,this.interactionManager=new BT(`diff`,VT(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`||e.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??xd}getHunksRendererOptions(e){return kk(e)}createHunksRenderer(e){return new fk(this.getHunksRendererOptions(e),this.getAnnotationSlotName,this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t=`additions`)=>this.getLineIndexForDiff(this.getDiffForLineIndex(),e,t);getDiffForLineIndex(){return this.getRenderedDiff()}getLineIndexForDiff(e,t,n){if(e==null)return;let r=e.hunks.at(-1),i,a;hunkIterator:for(let o of e.hunks){let e=n===`deletions`?o.deletionStart:o.additionStart,s=n===`deletions`?o.deletionCount:o.additionCount,c=Nd(e,s)+1,l=o.splitLineStart,u=o.unifiedLineStart;if(t<c){let e=c-t;i=Math.max(u-e,0),a=Math.max(l-e,0);break hunkIterator}if(t>=c+s){if(o===r){let e=t-(c+s);i=u+o.unifiedLineCount+e,a=l+o.splitLineCount+e;break hunkIterator}continue}for(let e of o.hunkContent)if(e.type===`context`){if(t<c+e.lines){let e=t-c;a=l+e,i=u+e;break hunkIterator}c+=e.lines,l+=e.lines,u+=e.lines}else{let r=n===`deletions`?e.deletions:e.additions;if(t<c+r){let r=t-c;i=u+(n===`additions`?e.deletions:0)+r,a=l+r;break hunkIterator}c+=r,l+=Math.max(e.deletions,e.additions),u+=e.deletions+e.additions}break hunkIterator}if(i!=null&&a!=null)return[i,a]}setOptions(e){e!=null&&(this.options=e,this.clearReusableHeader(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(VT(this.options,typeof this.options.hunkSeparators==`function`||(this.options.hunkSeparators??`line-info`)===`line-info`||this.options.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??`system`)!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if(typeof this.options.theme==`string`||this.fileContainer==null||this.appliedThemeCSS==null)return!1;let t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType!==t&&(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!IS(this.appliedThemeCSS.theme,this.getTheme())}getHoveredLine=()=>this.interactionManager.getHoveredLine();getAnnotationSlotName=e=>JE(this.editSession?.annotations,e,jd);getLatestAnnotations(){return this.editSession?.annotations?.current??this.lineAnnotations}isNewAnnotations(e){let t=this.editSession?.annotations;return e===this.lineAnnotations?!1:t==null||e!==t.provided&&e!==t.current}setLineAnnotations(e){let t=this.editSession?.annotations;if(t==null){this.lineAnnotations=e;return}this.isNewAnnotations(e)&&(this.lineAnnotations=e,qE(t,e,jd))}syncEditSessionAnnotationsFromEditor(e){let t=this.editSession?.annotations;return t==null||e===t.current?!1:(t.current=e,this.hunksRenderer.setLineAnnotations(e),this.renderAnnotations(),!0)}canPartiallyRender(e,t,n){return!(e||t||n||typeof this.options.hunkSeparators==`function`)}setSelectedLines(e,t){this.lineStateRefreshPending?this.deferredSelectedLines=[e,t]:this.interactionManager.setSelection(e,t)}setEditorActiveLine(e,t){this.lineStateRefreshPending?this.deferredEditorActiveLine=[e,t]:this.interactionManager.setEditorActiveLine(e,{lineNumberOnly:t?.lineNumberOnly,side:t?.side??`additions`})}flushDeferredLineState(){let{deferredEditorActiveLine:e,deferredSelectedLines:t}=this;this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,e!=null&&this.setEditorActiveLine(...e),t!=null&&this.interactionManager.setSelection(...t)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}let{diffStyle:e=`split`,overflow:t=`scroll`}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:t===`wrap`,columnVariables:this.shouldApplyColumnVariables(t)?`apply`:`measure`}),t===`scroll`&&e===`split`?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}shouldApplyColumnVariables(e){return typeof this.options.hunkSeparators==`function`||e===`scroll`&&(this.getLatestAnnotations().length>0||this.pre?.hasAttribute(`data-has-merge-conflict`)===!0)}getCodeScrollLeft(){return Math.max(this.codeUnified?.scrollLeft??0,this.codeDeletions?.scrollLeft??0,this.codeAdditions?.scrollLeft??0)}setCodeScrollLeft(e){this.codeUnified!=null&&(this.codeUnified.scrollLeft=e),this.codeAdditions!=null&&(this.codeAdditions.scrollLeft=e),this.codeDeletions!=null&&(this.codeDeletions.scrollLeft=e)}__getEffectiveCodeOptions(){return{...this.options,...this.hunksRenderer.getEffectiveCodeOptions()}}cleanUp(e=!1){let{editor:t}=this;DT(this.handleEditSessionRender),this.emitPostRender(!0),t?.cleanUp(e?`recycle`:`discard`),e||(this.editor=void 0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,e||(this.pendingFiles=void 0),this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,e||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder?.remove(),this.placeHolder=void 0,this.headerCache.lastRenderedHTML=void 0,e||this.clearReusableHeader(),this.errorWrapper?.remove(),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.editSession=void 0,this.renderedDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate({fileContainer:e,prerenderedHTML:t,preventEmit:n=!1,lineAnnotations:r,fileDiff:i,...a}){if(!this.enabled)throw Error(`FileDiff.hydrate: attempting to call hydrate after cleaned up`);if(this.fileContainer!=null)throw Error(`FileDiff.hydrate: hydrate can only be called before the instance has rendered or hydrated`);let o=cD(a,`FileDiff.hydrate`),s=o?.oldFile,c=o?.newFile;this.hydrateElements(e,t);let l=this.editor!=null;l||Vk(this.pre,zk({fileDiff:i,oldFile:s,newFile:c}),this.options.collapsed)||Hk(this.headerElement,Bk({fileDiff:i,oldFile:s,newFile:c}),this.options.disableFileHeader)?this.render({...a,fileContainer:e,lineAnnotations:r,fileDiff:i,forceRender:l||a.forceRender,preventEmit:!0}):this.hydrationSetup({fileDiff:i,lineAnnotations:r,...o}),n||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),nD(e,t);for(let t of e.shadowRoot?.children??[]){if(t instanceof SVGElement){this.spriteSVG=t;continue}if(t instanceof HTMLElement){if(t instanceof HTMLPreElement){this.pre=t;for(let e of t.children)e instanceof HTMLElement&&e.tagName.toLowerCase()===`code`&&(`deletions`in e.dataset&&(this.codeDeletions=e),`additions`in e.dataset&&(this.codeAdditions=e),`unified`in e.dataset&&(this.codeUnified=e));continue}if(`diffsHeader`in t.dataset){this.headerElement=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-theme-css`)){this.themeCSSStyle=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-unsafe-css`)){this.unsafeCSSStyle=t,this.appliedUnsafeCSS=t.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute(`data-dehydrated`)),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:r}){this.lineAnnotations=r??this.lineAnnotations,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(t!==void 0&&n!==void 0?uO(t,n,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderedDiff=this.fileDiff,this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.loadFilesIfNecessary(),this.rerender()};loadFilesIfNecessary(){let{fileDiff:e,options:{loadDiffFiles:t}}=this;if(e==null||t==null||!Ak(e)||this.pendingFiles?.fileDiff===e)return;let n=this.loadFilesForDiff(e,t),r=this.pendingFiles={fileDiff:e,promise:n};r.promise=n.finally(()=>{this.pendingFiles===r&&(this.pendingFiles=void 0)})}async loadFilesForDiff(e,t){try{let n=await t(e);if(!this.enabled||this.fileDiff!==e)return;await this.handleFilesLoaded(e,n)}catch(e){if(this.options.disableErrorHandling===!0)throw e;console.error(e)}}async handleFilesLoaded(e,t){if(this.fileDiff===e&&e.isPartial){if(mD(`merge`,e,t),this.setHydratedState(t),this.startHydratedEditSession(e)){this.rerender();return}await iD(()=>this.primeHighlightCache(e)),this.enabled&&this.fileDiff===e&&this.rerender()}}startHydratedEditSession(e){if(e.isPartial)throw Error(`FileDiff.startHydratedEditSession: diffs cannot be partial for editing`);if(this.fileDiff!==e)return!1;let{editor:t}=this;return this.editSession?.outgoingDiff==null?t==null||this.editSession!=null?!1:(this.installEditSession(e,t.__getDocumentContents(Lk(e)),t.__getDocumentSessionState()),!0):(this.installEditSession(e),!0)}updateExternalDiff(e,t){if(RC(this.fileDiff,e))return!1;let n=this.editSession?.outgoingDiff??this.editSession?.diff;return this.fileDiff=e,n==null?this.editor!=null&&(e.isPartial?this.loadFilesIfNecessary():this.installEditSession(e,this.editor.__getDocumentContents(Lk(e)),this.editor.__getDocumentSessionState())):(e.isPartial?this.loadFilesIfNecessary():this.installEditSession(e),this.editSession!=null&&(this.editSession.outgoingDiff=n)),this.editSession?.annotations!=null&&t!=null&&(this.lineAnnotations=t,this.editSession.annotations=KE(t,jd,this.editSession.annotations)),!0}installEditSession(e,t,n){let r=e.additionLines.join(``),i=t==null?void 0:pD(t.contents),a=n!=null&&Pk(n,e);if(n!=null&&!a)throw Error(`FileDiff: retained session cannot resume against a different old file`);if(t!=null&&t.contents!==r&&!a)throw Error(`FileDiff: retained edits are missing their diff session state`);let o=t==null||t.name===e.name&&t.lang===e.lang&&t.contents===r,s=jk(e);t!=null&&i!=null&&!o&&(s.name=t.name,s.lang=t.lang),a&&n!=null&&i!=null&&(s.additionLines=i,s.type=n.type,s.hunks=n.hunks,s.editSessionDirty=!0,jO(s)),this.editSession={diff:s,annotations:this.editSession?.annotations??KE(this.lineAnnotations,jd),outgoingDiff:this.editSession?.outgoingDiff},this.hunksRenderer.beginEditSession(s,o&&!a?e:void 0)}setHydratedState(e){this.deletionFile=e.oldFile,this.additionFile=e.newFile,this.workerManager?.cleanUpTasks(this.hunksRenderer),this.hunksRenderer.clearRenderCache()}render({fileDiff:e,deferManagers:t=!1,forceRender:n=!1,preventEmit:r=!1,lineAnnotations:i,fileContainer:a,containerWrapper:o,renderRange:s,...c}){if(!this.enabled)throw Error(`FileDiff.render: attempting to call render after cleaned up`);let l=cD(c,`FileDiff.render`),u=l?.oldFile,d=l?.newFile;this.editor?.__postponeBgTokenizeToNextFrame();let{collapsed:f=!1,themeType:p=`system`,expandUnchanged:m=!1}=this.options,h=f?void 0:s,g=this.hasThemeChanged(),_=l!=null,v=_&&(!Rk(u,this.deletionFile)||!Rk(d,this.additionFile)),y=e!=null&&!RC(e,this.fileDiff),b=i!=null&&(i.length>0||this.getLatestAnnotations().length>0)&&this.isNewAnnotations(i);if(!f&&hE(h,this.renderRange)&&!n&&!b&&!g&&(e!=null&&!y||e==null&&!v)){let e=this.applyCachedThemeState(p);return e&&this.finalizeRender(),e}let x;e==null&&_&&(v||this.fileDiff==null)&&(x=uO(l.oldFile,l.newFile,this.options.parseDiffOptions));let{renderRange:S}=this;this.renderRange=h,_?(this.deletionFile=u,this.additionFile=d):e!=null&&(this.deletionFile=void 0,this.additionFile=void 0),e!=null&&y?this.updateExternalDiff(e,i):x!=null&&(y=!0,this.updateExternalDiff(x,i)),y&&this.clearReusableHeader(),i!=null&&this.setLineAnnotations(i);let C=this.getLatestDiff();if(C==null)return!1;C.editSessionDirty===!0&&this.shouldSelfHealEditSession()&&(UO(C,this.options.parseDiffOptions),this.hunksRenderer.refreshHighlightedResult()),m&&this.loadFilesIfNecessary(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.getLatestAnnotations());let{disableErrorHandling:w=!1,disableFileHeader:T=!1}=this.options;if(T&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.headerCache.lastRenderedHTML=void 0),this.clearHeaderSlots()),a=this.getOrCreateFileContainer(a,o),this.applyCachedThemeState(p),f){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let e=this.hunksRenderer.renderDiff(C,Ad);e!=null&&this.applyThemeState(a,e.themeStyles,p,e.baseThemeType),e?.headerElement!=null&&this.applyHeaderToDOM(e.headerElement,a,e.fileDiff),this.renderSeparators([]),this.renderedDiff=e?.fileDiff??C,this.injectUnsafeCSS()}catch(e){if(w)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return this.finalizeRender(),r||this.emitPostRender(),!0}try{let e=this.getOrCreatePreNode(a);if(!(this.canPartiallyRender(n,b,v||y||g||!RC(this.renderedDiff,C))&&this.applyPartialRender({fileDiff:C,previousRenderRange:S,renderRange:h}))){let t=this.hunksRenderer.renderDiff(C,h);if(t==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.isWorkingPool()&&this.workerManager.initialize().catch(()=>{}).then(()=>this.rerender()),!1;this.applyThemeState(a,t.themeStyles,p,t.baseThemeType),t.headerElement!=null&&this.applyHeaderToDOM(t.headerElement,a,t.fileDiff),t.additionsContentAST!=null||t.deletionsContentAST!=null||t.unifiedContentAST!=null?this.applyHunksToDOM(e,t):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(t.hunkData),this.renderedDiff=t.fileDiff}this.applyBuffers(e,h),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,t||this.flushManagers(),this.finalizeRender(),this.editor!=null&&this.syncRenderViewToEditor()}catch(e){if(w)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return r||this.emitPostRender(),!0}finalizeRender(){}emitPostRender(e=!1){let{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;this.options.onPostRender?.(t,this,`unmount`);return}if(t==null)return;let r=this.mounted?`update`:`mount`;this.mounted=!0,n?.(t,this,r)}getLatestDiff(e=this.fileDiff){return this.editSession?.diff??e}getRenderedDiff(){return this.renderedDiff}syncRenderViewToEditor(){let{editor:e,fileContainer:t}=this,n=this.getLatestAnnotations(),r=this.computeEditorRenderRange(this.renderRange),i=this.getLatestDiff();if(e==null||t==null||i==null||i.isPartial)return;let a=a=>{if(!this.enabled||this.editor!==e||this.fileContainer!==t||this.getLatestDiff()!==i)return;let o=this.editSession?.outgoingDiff,s=this.fileDiff,c=o!=null&&s!=null&&o!==i,l=c?Mk(o,s):!1;e.__syncRenderView({highlighter:a,fileContainer:t,fileDiff:i,lineAnnotations:n,renderRange:r,externalDocument:c,resetHistory:l})},o=this.getTheme(),s=i.lang??HS(i.name),c=PS({theme:o,lang:s});c==null?NS({themes:Wd(o),langs:[`text`,s],preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter}).then(a):a(c)}computeEditorRenderRange(e){let t=this.getLatestDiff();if(e==null||t==null||EE(e))return e;let{diffStyle:n=`split`,expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a,o;return ow({diff:t,diffStyle:n,startingLine:e.startingLine,totalLines:e.totalLines,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,callback:({additionLine:e})=>{e!=null&&(a??=e.lineNumber,o=e.lineNumber)}}),a==null||o==null?{...e,startingLine:0,totalLines:0}:{...e,startingLine:a-1,totalLines:o-a+1}}__acknowledgeDocumentUpdate(){this.editSession!=null&&(this.editSession.outgoingDiff=void 0)}__acceptEditorChange(e){let{lineAnnotations:t}=e;t!=null&&this.syncEditSessionAnnotationsFromEditor(t)}emitEditChange(e){let{onEditChange:t}=this.options;t?.(e)}__captureDocumentSessionState(e=!0){let{fileDiff:t,editSession:{diff:n,outgoingDiff:r}={}}=this;if(r!=null&&t!=null){if(!t.isPartial&&Mk(r,t))return;n=r}if(!(n==null||n.isPartial))return{diffSession:{oldFile:n.type===`new`?null:{name:n.prevName??n.name,lines:e?[...n.deletionLines]:n.deletionLines},type:n.type,hunks:e?lD(n.hunks):n.hunks},hasChanges:n.editSessionDirty===!0}}__attachEditor(e){if(this.type!==`file-diff`)throw Error(`FileDiff.__attachEditor: cannot attach an editor to a "${this.type}" diff`);if(this.editor!=null)throw Error(`FileDiff.__attachEditor: an editor is already attached`);let t=()=>{this.editor=void 0,this.finishEditSession()};try{return this.resumeEditorRendering(e),t}catch(e){throw t(),e}}__resumeEditor(e){if(this.editor!==e)throw Error(`FileDiff.__resumeEditor: editor association changed`);this.resumeEditorRendering(e)}resumeEditorRendering(e){let{fileDiff:t}=this,n=this.editSession?.outgoingDiff;n!=null&&t!=null&&!t.isPartial&&this.editSession?.diff===n&&this.installEditSession(t);let r=this.editSession==null&&t!=null&&!t.isPartial?t:void 0;r==null?this.editSession!=null&&this.hunksRenderer.beginEditSession(this.editSession.diff):this.installEditSession(r,e.__getDocumentContents(Lk(r)),e.__getDocumentSessionState()),this.editor=e,this.fileDiff?.isPartial===!0&&this.loadFilesIfNecessary();let i=this.editSession?.diff;this.hunksRenderer.editorRenderReady()?(i!=null&&this.hunksRenderer.diffCache===i&&(this.renderedDiff=i),this.syncRenderViewToEditor()):this.rerender()}finishEditSession(){this.hunksRenderer.endEditSession(),this.finalizeEditSessionHunks()}__completeEditSession(e,t){this.settleEditSession(t===`install`,e)}settleEditSession(e,t){let{editSession:n,fileDiff:r,lineAnnotations:i}=this;if(n==null||r==null)return;let{diff:a,annotations:o}=n;if(this.editor!=null)throw Error(`FileDiff.__completeEditSession: detach the editor before completing the session`);this.hunksRenderer.endEditSession(),this.finalizeEditSessionHunks();let s=o?.current,c,l=null,u=null,d=!1,f;if(t==null)throw Error(`FileDiff.__completeEditSession: editor is required for completion`);let p=uD(a),m={name:p.name,contents:p.additionLines.join(``)};p.lang!=null&&(m.lang=p.lang);let h={fileDiff:p,editor:t,originalFileDiff:r,oldFile:p.type===`new`?null:{name:p.prevName??p.name,contents:p.deletionLines.join(``)},newFile:m,lineAnnotations:s,originalLineAnnotations:i};Object.freeze(h);try{if(t.__emitEditComplete(h),this.options.onEditComplete?.(h)===`accept`){if(p.cacheKey!=null&&p.cacheKey===r.cacheKey)throw Error(`FileDiff.__completeEditSession: an accepted diff must not reuse the replaced diff cacheKey`);c=p,l=h.oldFile,u=h.newFile}}catch(e){d=!0,f=e}if(e&&c!=null&&(this.fileDiff=c,this.additionFile!=null&&(this.deletionFile=l,this.additionFile=u),s!=null&&(this.lineAnnotations=s)),this.editSession=void 0,e&&this.fileContainer!=null&&this.rerender(),d)throw f}finalizeEditSessionHunks(){let e=this.getLatestDiff();if(e==null||e.editSessionDirty!==!0)return!1;let{collapsedContextThreshold:t=1}=this.options,n=VO(e,this.hunksRenderer.getExpandedHunksMap(),t);return UO(e,this.options.parseDiffOptions),this.hunksRenderer.setExpandedHunksMap(HO(e,n)),this.hunksRenderer.refreshHighlightedResult(),this.escalateEditSessionRender(),!0}applyDocumentChange(e,t){let n=this.editSession?.diff;if(n==null)throw Error(`FileDiff.applyDocumentChange: requires an active edit session`);this.detachAdditionLines(),this.hunksRenderer.beginEditSession(n),this.hunksRenderer.applyDocumentChange(e),t!=null&&this.syncEditSessionAnnotationsFromEditor(t),this.rerender(),this.interactionManager.setSelectionDirty()}updateRenderCache(e,t,n={}){let r=this.editSession?.diff;if(r==null)throw Error(`FileDiff.updateRenderCache: requires an active edit session`);this.detachAdditionLines(),this.hunksRenderer.beginEditSession(r);let{shouldRefreshDiffsView:i,lineCountChangeInFlight:a}=n;if(this.hunksRenderer.updateRenderCache(e,t,a)){this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!0,this.escalateEditSessionRender();return}i===!0&&(this.refreshViewTimeout!=null&&clearTimeout(this.refreshViewTimeout),this.lineStateRefreshPending=!0,this.refreshViewTimeout=setTimeout(()=>{this.refreshViewTimeout=void 0,this.options.diffStyle===`split`?this.refreshSplitDiffView():this.refreshUnifiedDiffView(),this.flushDeferredLineState()},150))}detachAdditionLines(){let e=this.editSession?.diff,{fileDiff:t}=this;e!=null&&(e.additionLines===t?.additionLines||e.additionLines===e.deletionLines)&&(e.additionLines=[...e.additionLines])}isLineRenderable(e){let t=this.getRenderedDiff();if(t==null)return!0;let{expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options;return QC({fileDiff:t,lineNumber:e,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r})}getNearestRenderableLine(e,t){let n=this.getRenderedDiff();if(n==null)return e;let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options;return $C({fileDiff:n,lineNumber:e,direction:t,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i})}revealLine(e){let t=this.getRenderedDiff(),{expandUnchanged:n=!1,collapsedContextThreshold:r=1,expansionLineCount:i=100}=this.options;if(t==null||t.isPartial||n)return!1;let a=this.hunksRenderer.getExpandedHunksMap();for(let[n,o]of t.hunks.entries()){let[s,c]=qC(o);if(e<s){let c=JC({isPartial:t.isPartial,rangeSize:o.collapsedBefore,expandedHunks:a,hunkIndex:n,collapsedContextThreshold:r}),l=s-c.rangeSize;if(c.renderAll||e<l+c.fromStart||e>=s-c.fromEnd)return!1;let u=e-(l+c.fromStart)+1,d=s-c.fromEnd-e;return u<=d?this.expandHunk(n,`up`,u+i):this.expandHunk(n,`down`,d+i),!0}if(e<c)return!1}let o=ZC({fileDiff:t,hunkIndex:t.hunks.length-1,expandedHunks:a,collapsedContextThreshold:r,errorPrefix:`FileDiff.revealLine`});if(o==null||o.renderAll)return!1;let s=t.hunks[t.hunks.length-1],[,c]=qC(s);return e<c+o.fromStart||e>=c+o.rangeSize?!1:(this.expandHunk(t.hunks.length,`up`,e-(c+o.fromStart)+1+i),!0)}shouldSelfHealEditSession(){return this.editor==null}escalateEditSessionRender(){ET(this.handleEditSessionRender)}handleEditSessionRender=()=>{this.rerender(),this.flushDeferredLineState()};removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:`open`});this.placeHolder=document.createElement(`div`),this.placeHolder.dataset.placeholder=``,e.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty(`height`,`${e}px`),!0}async primeHighlightCache(e=this.fileDiff){let{workerManager:t}=this;if(e==null||t==null||!t.isWorkingPool()||e.cacheKey==null||VC(e))return;let n=this.options.tokenizeMaxLength??1e5;Math.max(e.additionLines.length,e.deletionLines.length)>n||await t.primeDiffHighlightCache(e).catch(e=>{console.error(e)})}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.headerCache.lastRenderedHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(e){let{hunkSeparators:t}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof t!=`function`){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();return}let n=new Map(this.separatorCache);for(let r of e){let e=r.slotName,i=this.separatorCache.get(e);if(i==null||!Ok(r,i.hunkData)){i?.element.remove();let n=document.createElement(`div`);n.style.display=`contents`,n.slot=r.slotName;let a=t(r,this);a!=null&&n.appendChild(a),this.fileContainer.appendChild(n),i={element:n,hunkData:r},this.separatorCache.set(e,i)}n.delete(e)}for(let[e,{element:t}]of n.entries())this.separatorCache.delete(e),t.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderAnnotation:t}=this.options,n=this.getLatestAnnotations();if(t!=null&&n.length>0)for(let[r,i]of n.entries()){let n=this.getAnnotationSlotName(i),a=`${r}-${n}`,o=this.annotationCache.get(a);if(o==null||!Dk(i,o.annotation)){o?.element.remove();let e=t(i);if(e==null)continue;o={element:jE(n),annotation:i},o.element.appendChild(e),this.fileContainer.appendChild(o.element),this.annotationCache.set(a,o)}e.delete(a)}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=ME();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){let{fileContainer:n}=this,r=e??n??document.createElement(`diffs-container`),i=n!==r;return n!=null&&i&&this.editor?.__captureFocusForDOMReplacement(),i&&this.emitPostRender(!0),this.fileContainer=r,n!=null&&i&&(this.headerCache.lastRenderedHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),i&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){let{shadowRoot:t}=e;if(t!=null)for(let e of t.children)e instanceof SVGElement?this.spriteSVG??=e:jT(e)&&e.hasAttribute(`data-theme-css`)?(this.themeCSSStyle??=e,this.hasAdoptedThemeCSS=!0):jT(e)&&e.hasAttribute(`data-unsafe-css`)&&(this.unsafeCSSStyle??=e,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});if(this.spriteSVG==null){let e=document.createElement(`div`);e.innerHTML=DE;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});return this.pre==null?(this.pre=document.createElement(`pre`),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(this.editor?.__captureFocusForDOMReplacement(),t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(let t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute(`data-unified`)?this.codeUnified=t:t.hasAttribute(`data-deletions`)?this.codeDeletions=t:t.hasAttribute(`data-additions`)&&(this.codeAdditions=t))}applyHeaderToDOM(e,t,n){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let{headerCache:{fileDiff:r,html:i,lastRenderedHTML:a}}=this,o=(n!==this.editSession?.diff&&RC(r,n)?i:void 0)??w_(e);if(this.headerCache.html=o,this.headerCache.fileDiff=n,o!==a){let e=document.createElement(`div`);e.innerHTML=o;let n=e.firstElementChild;if(!(n instanceof HTMLElement))return;this.headerElement==null?t.shadowRoot?.prepend(n):t.shadowRoot?.replaceChild(n,this.headerElement),this.headerElement=n,this.headerCache.lastRenderedHTML=o}if(this.isContainerManaged)return;let{renderCustomHeader:s,renderHeaderPrefix:c,renderHeaderFilenameSuffix:l,renderHeaderMetadata:u}=this.options;if(s!=null){let e=s(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,bd,e),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0;return}let d=c?.(n)??void 0,f=l?.(n)??void 0,p=u?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,_d,d),this.headerFilenameSuffix=this.upsertHeaderSlotElement(t,this.headerFilenameSuffix,vd,f),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,yd,p),this.headerCustom?.remove(),this.headerCustom=void 0}clearReusableHeader(){this.headerCache.html=void 0,this.headerCache.fileDiff=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,r){if(r==null){t?.remove();return}let i=t??this.createHeaderSlotElement(n);return t??e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement(`div`);return t.slot=e,t}injectUnsafeCSS(){let{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===``){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}(this.unsafeCSSStyle?.parentNode!==t||this.appliedUnsafeCSS!==e)&&(this.unsafeCSSStyle??=NE(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=BE(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n,o=this.getTheme(),s=typeof o==`string`?o:{...o},c=FE(i);if(this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a&&this.appliedThemeCSS.scrollbarGutter===c){this.appliedThemeCSS.theme=s;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===i){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c};return}this.themeCSSStyle=QE({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:VE(t,a,c)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c}}hydrateMeasuredScrollbar(){let e=this.fileContainer?.shadowRoot;e!=null&&this.themeCSSStyle!=null&&(this.themeCSSStyle.textContent=HE(this.themeCSSStyle.textContent??``,FE(e)))}shouldGuardRebuildScroll(){return this.editor!=null&&tD()}applyHunksToDOM(e,t){this.shouldGuardRebuildScroll()?ZE(e,()=>this.replaceCodeColumns(e,t)):this.replaceCodeColumns(e,t)}applyCodeColumnsInPlace(e,t,n){let r=this.getColumnPair(e);if(r==null)return!1;let i=Uk(t[0]),a=Uk(t[1]);return i==null||a==null?!1:(r.gutter.innerHTML=w_(i),r.content.innerHTML=w_(a),n!==this.lastRowCount&&(r.gutter.style.setProperty(`grid-row`,`span ${n}`),r.content.style.setProperty(`grid-row`,`span ${n}`)),!0)}replaceCodeColumns(e,t){let{overflow:n=`scroll`}=this.options,r=(this.options.hunkSeparators??`line-info`)===`line-info`,i=n===`wrap`?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let a=!1,o=[],s=this.hunksRenderer.renderCodeAST(`unified`,t),c=this.hunksRenderer.renderCodeAST(`deletions`,t),l=this.hunksRenderer.renderCodeAST(`additions`,t);this.editor?.__captureFocusForDOMReplacement(),s==null?c!=null||l!=null?(c==null?(this.codeDeletions?.remove(),this.codeDeletions=void 0):(a=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=XE({code:this.codeDeletions,columnType:`deletions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeDeletions,c,t.rowCount)||(this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(c)),o.push(this.codeDeletions)),l==null?(this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=a||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=XE({code:this.codeAdditions,columnType:`additions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeAdditions,l,t.rowCount)||(this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(l)),o.push(this.codeAdditions))):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=XE({code:this.codeUnified,columnType:`unified`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeUnified,s,t.rowCount)||(this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(s)),o.push(this.codeUnified)),o.length===0?e.textContent=``:a&&e.replaceChildren(...o),this.lastRowCount=t.rowCount}applyPartialRender({fileDiff:e,previousRenderRange:t,renderRange:n}){let{pre:r,codeUnified:i,codeAdditions:a,codeDeletions:o,options:{diffStyle:s=`split`}}=this;if(r==null||t==null||n==null||!Number.isFinite(t.totalLines)||!Number.isFinite(n.totalLines)||this.lastRowCount==null)return!1;let c=this.getCodeColumns(s,i,o,a);if(c==null)return!1;let l=t.startingLine,u=n.startingLine,d=l+t.totalLines,f=u+n.totalLines,p=Math.max(l,u),m=Math.min(d,f);if(m<=p)return!1;let h=Math.max(0,p-l),g=Math.max(0,d-m),_=this.trimColumns({columns:c,trimStart:h,trimEnd:g,previousStart:l,overlapStart:p,overlapEnd:m,diffStyle:s});if(_<0)throw Error(`FileDiff.applyPartialRender: failed to trim to overlap`);if(this.lastRowCount<_)throw Error(`FileDiff.applyPartialRender: trimmed beyond DOM row count`);let v=this.lastRowCount-_,y=(t,n)=>{if(!(n<=0))return this.hunksRenderer.renderDiff(e,{startingLine:t,totalLines:n,bufferBefore:0,bufferAfter:0})},b=y(u,Math.max(p-u,0));if(b==null&&u<p)return!1;let x=y(m,Math.max(f-m,0));if(x==null&&f>m)return!1;let S=(e,t)=>{if(e!=null){if(s===`unified`&&!Array.isArray(c))this.insertPartialHTML(s,c,e,t);else if(s===`split`&&Array.isArray(c))this.insertPartialHTML(s,c,e,t);else throw Error(`FileDiff.applyPartialRender.applyChunk: invalid chunk application`);v+=e.rowCount,this.renderedDiff=e.fileDiff}};return this.cleanupErrorWrapper(),S(b,`afterbegin`),S(x,`beforeend`),this.lastRowCount!==v&&(this.applyRowSpan(s,c,v),this.lastRowCount=v),!0}insertPartialHTML(e,t,n,r){if(e===`unified`&&!Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`unified`,n);this.renderPartialColumn(t,e,r)}else if(e===`split`&&Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`deletions`,n),i=this.hunksRenderer.renderCodeAST(`additions`,n);this.renderPartialColumn(t[0],e,r),this.renderPartialColumn(t[1],i,r)}else throw Error(`FileDiff.insertPartialHTML: Invalid argument composition`)}refreshSplitDiffView(){let e=this.getLatestDiff();if(this.options.diffStyle!==`split`||e==null)return;let t=this.hunksRenderer.renderDiff(e,this.renderRange);if(t==null)return;let n=this.getCodeColumns(`split`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(!Array.isArray(n))return;let r=(e,n)=>{if(n==null)return;let r=this.hunksRenderer.renderCodeAST(e,t),i=Uk(r?.[0]),a=Uk(r?.[1]);for(let[e,t]of[[n.gutter,i],[n.content,a]])if(t!=null&&e.childElementCount===t.length)for(let n=0;n<t.length;n++){let r=e.children[n],i=t[n].properties[`data-line-type`];i!=null&&r.dataset.lineType!==i&&(r.dataset.lineType=i)}};r(`deletions`,n[0]),r(`additions`,n[1]),this.renderedDiff=t.fileDiff}refreshUnifiedDiffView(){let e=this.getLatestDiff();if(this.options.diffStyle!==`unified`||e==null)return;let t=this.hunksRenderer.renderDiff(e,this.renderRange);if(t==null)return;let n=this.getCodeColumns(`unified`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(n==null||Array.isArray(n))return;let r=this.hunksRenderer.renderCodeAST(`unified`,t),i=Uk(r?.[0]),a=Uk(r?.[1]),o=()=>{for(let[e,t]of[[n.gutter,i],[n.content,a]])t!=null&&(e.innerHTML=w_(t));t.rowCount!==this.lastRowCount&&(this.applyRowSpan(`unified`,n,t.rowCount),this.lastRowCount=t.rowCount),this.renderedDiff=t.fileDiff};this.shouldGuardRebuildScroll()?ZE(this.pre,o):o(),this.renderSeparators(t.hunkData),this.managersDirty=!0,this.flushManagers(),this.syncRenderViewToEditor()}renderPartialColumn(e,t,n){if(e==null||t==null)return;let r=Uk(t[0]),i=Uk(t[1]);if(r==null||i==null)throw Error(`FileDiff.insertPartialHTML: Unexpected AST structure`);let a=i.at(0);n===`beforeend`&&a?.type===`element`&&typeof a.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(a.properties[`data-buffer-size`],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],r,i,!0);let o=i.at(-1);n===`afterbegin`&&o?.type===`element`&&typeof o.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(o.properties[`data-buffer-size`],e.content.children[0],e.gutter.children[0],r,i,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i))}mergeBuffersIfNecessary(e,t,n,r,i,a){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;let o=this.getBufferSize(t.dataset);o!=null&&(a?(r.shift(),i.shift()):(r.pop(),i.pop()),this.updateBufferSize(t,o+e),this.updateBufferSize(n,o+e))}applyRowSpan(e,t,n){let r=e=>{e!=null&&(e.gutter.style.setProperty(`grid-row`,`span ${n}`),e.content.style.setProperty(`grid-row`,`span ${n}`))};if(e===`unified`&&!Array.isArray(t))r(t);else if(e===`split`&&Array.isArray(t))r(t[0]),r(t[1]);else throw Error(`dun fuuuuked up`)}trimColumnRows(e,t,n){let r=0,i=0,a=0,o=!1,s=n>=0;if(e==null)return 0;let c=Array.from(e.content.children),l=Array.from(e.gutter.children);if(c.length!==l.length)throw Error(`FileDiff.trimColumnRows: columns do not match`);for(;a<c.length&&!(t<=0&&!s&&!o);){let e=l[a],u=c[a];if(a++,!(e instanceof HTMLElement)||!(u instanceof HTMLElement))throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: invalid row elements`);if(o&&(o=!1,e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset||e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset)){e.remove(),u.remove(),i++;continue}if(`lineIndex`in e.dataset&&`lineIndex`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),t>0&&(t--,t===0&&(o=!0)),i++),r++;continue}if(`separator`in e.dataset&&`separator`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`buffer`&&`contentBuffer`in u.dataset){let a=this.getBufferSize(u.dataset);if(a==null)throw Error(`FileDiff.trimColumnRows: invalid element`);if(t>0){let n=Math.min(t,a),r=a-n;r>0?(this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=n):(e.remove(),u.remove(),i+=a),t-=n,t===0&&r===0&&(o=!0)}else if(s){let t=r,o=r+a-1;if(n<=t)e.remove(),u.remove(),i+=a;else if(n<=o){let t=o-n+1,r=a-t;this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=t}}r+=a;continue}throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: unknown row elements`)}return i}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:r,previousStart:i,trimEnd:a,trimStart:o}){let s=Math.max(0,r-i),c=n-i;if(c<0)throw Error(`FileDiff.trimColumns: overlap ends before previous`);let l=o>0,u=a>0;if(!l&&!u)return 0;let d=l?s:0,f=u?c:-1;if(t===`unified`&&!Array.isArray(e))return this.trimColumnRows(e,d,f);if(t===`split`&&Array.isArray(e)){let t=this.trimColumnRows(e[0],d,f),n=this.trimColumnRows(e[1],d,f);if(e[0]!=null&&e[1]!=null&&t!==n)throw Error(`FileDiff.trimColumns: split columns out of sync`);return e[0]==null?n:t}throw console.error({diffStyle:t,columns:e}),Error(`FileDiff.trimColumns: Invalid columns for diffType`)}getBufferSize(e){let t=Number.parseInt(e?.bufferSize??``,10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty(`grid-row`,`span ${t}`),e.style.setProperty(`min-height`,`calc(${t} * 1lh)`)}getColumnPair(e){if(e==null)return;let t=e.children[0],n=e.children[1];if(t instanceof HTMLElement&&n instanceof HTMLElement&&t.dataset.gutter!=null&&n.dataset.content!=null)return{gutter:t,content:n}}getCodeColumns(e,t,n,r){if(e===`unified`)return this.getColumnPair(t);{let e=this.getColumnPair(n),t=this.getColumnPair(r);return e!=null||t!=null?[e,t]:void 0}}updateBuffers(e){this.pre!=null&&this.applyBuffers(this.pre,e)}applyBuffers(e,t){if(t==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore??(this.bufferBefore=document.createElement(`div`),this.bufferBefore.dataset.virtualizerBuffer=`before`,e.before(this.bufferBefore)),this.bufferBefore.style.setProperty(`height`,`${t.bufferBefore}px`),this.bufferBefore.style.setProperty(`contain`,`strict`)):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter??(this.bufferAfter=document.createElement(`div`),this.bufferAfter.dataset.virtualizerBuffer=`after`,e.after(this.bufferAfter)),this.bufferAfter.style.setProperty(`height`,`${t.bufferAfter}px`),this.bufferAfter.style.setProperty(`contain`,`strict`)):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:r},i){let{diffIndicators:a=`bars`,disableBackground:o=!1,disableLineNumbers:s=!1,overflow:c=`scroll`,diffStyle:l=`split`}=this.options,u={type:`diff`,diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:l!==`unified`&&t!=null&&n!=null,totalLines:r,customProperties:i};OE(u,this.appliedPreAttributes)||(rD(e,u),this.appliedPreAttributes=u)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let n=t.shadowRoot??t.attachShadow({mode:`open`});this.errorWrapper??=document.createElement(`div`),this.errorWrapper.dataset.errorWrapper=``,this.errorWrapper.textContent=``,n.appendChild(this.errorWrapper);let r=document.createElement(`div`);r.dataset.errorMessage=``,r.innerText=e.message,this.errorWrapper.appendChild(r);let i=document.createElement(`pre`);i.dataset.errorStack=``,i.innerText=e.stack??`No Error Stack`,this.errorWrapper.appendChild(i)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function Lk(e){return{name:e.name,lang:e.lang,contents:e.additionLines.join(``)}}function Rk(e,t){return e==null||t==null?e==null&&t==null:zC(e,t)}function zk({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function Bk({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function Vk(e,t,n=!1){return!n&&e==null&&t}function Hk(e,t,n=!1){return e==null&&t&&!n}function Uk(e){if(e!=null&&e.type===`element`)return e.children??[]}var Wk=3e3,Gk=new Map,Kk=-1,qk=class extends Ik{__id=`little-virtualized-file-diff:${++Kk}`;renderType=`virtualized`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0,fileAnnotationHeight:0,ghostTextRows:Gk,ghostTextRowsByIndex:new Map};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;pendingHydratedDiff;pendingExpansions;pendingRender;constructor(e,t,n,r,i=!1){super(e,r,i),this.virtualizer=t,this.metrics=HC(n)}setMetrics(e,t=!1){let n=HC(e);(t||!xT(this.metrics,n))&&(this.metrics=n,this.resetLayoutCache({includeEstimatedHeights:!0}))}setLineAnnotations(e){this.syncLineAnnotations(e)&&this.resetLayoutCache({includeEstimatedHeights:!1})}syncLineAnnotations(e){return e==null||!this.isNewAnnotations(e)||e.length===0&&this.getLatestAnnotations().length===0?!1:(super.setLineAnnotations(e),!0)}syncEditSessionAnnotationsFromEditor(e){return super.syncEditSessionAnnotationsFromEditor(e)?(this.resetLayoutCache({includeEstimatedHeights:!1}),!0):!1}setFileAnnotationHeight(e){let t=this.cache.fileAnnotationHeight;return e!==t&&(this.cache.fileAnnotationHeight=e,this.cache.measuredHeightDeltaTotal+=e-t,!0)}hasFileAnnotations(e){let t=this.getLatestAnnotations();return PT(t)?t.some(t=>t.lineNumber===0?e.type===`new`?t.side===`additions`:e.type!==`deleted`||t.side===`deletions`:!1):!1}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){let t=e?2:1;return this.metrics.lineHeight*t}setOptions(e){if(this.isAdvancedMode())throw Error(`VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.`);if(e==null)return;let{options:t}=this,n=!ST(t,e),r=n&&tA(t,e);super.setOptions(e),r&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:nA(t,e)}),n&&(this.forceRenderOverride=!0),n&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,r)}setThemeType(e){if(this.isAdvancedMode())throw Error(`VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.`);super.setThemeType(e)}resetLayoutCache({forceSimpleRecompute:e=!1,includeEstimatedHeights:t=!1,resetRenderRange:n=!0}={}){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal=0,this.cache.ghostTextRows=Gk,this.cache.ghostTextRowsByIndex.size>0&&this.cache.ghostTextRowsByIndex.clear(),this.invalidateDerivedLayoutCache(t,n),e&&this.isSimpleMode()&&this.computeApproximateSize()}invalidateDerivedLayoutCache(e,t=!0){this.layoutDirty=!0,this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),e&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&t&&(this.renderRange=void 0)}applyGhostTextRows(e,t){let{cache:{heightDeltas:n,ghostTextRows:r,ghostTextRowsByIndex:i},metrics:{lineHeight:a}}=this;if(r===t)return!1;let o=this.getDiffStyle(),s=new Map;for(let[n,r]of t){let t=this.getLineIndexForDiff(e,n+1,`additions`);t!=null&&s.set(o===`split`?t[1]:t[0],r)}let c=!1;for(let e of new Set([...i.keys(),...s.keys()])){let t=((s.get(e)??0)-(i.get(e)??0))*a;if(t===0)continue;let r=(n.get(e)??0)+t;r===0?n.delete(e):n.set(e,r),this.cache.measuredHeightDeltaTotal+=t,c=!0}return this.cache.ghostTextRows=t,this.cache.ghostTextRowsByIndex=s,c}reconcileHeights(){let e=!1,{options:{overflow:t=`scroll`},cache:{ghostTextRowsByIndex:n},metrics:{lineHeight:r}}=this,i=this.getRenderedDiff();if(this.fileContainer==null||i==null)return this.height!==0&&(e=!0),this.height=0,e;this.top=this.getVirtualizedTop(),e=this.applyGhostTextRows(i,this.editor?.__getGhostTextRows()??Gk);let a=this.getLatestAnnotations();if(t===`scroll`&&a.length===0&&!this.isResizeDebuggingEnabled())return e&&this.computeApproximateSize(!0),e;let o=this.getDiffStyle(),s=o===`split`?[this.codeDeletions,this.codeAdditions]:[this.codeUnified],c=this.hasFileAnnotations(i);if(this.renderRange!=null&&c&&IT(this.renderRange)){let t=Jk(s)??0;this.setFileAnnotationHeight(t)&&(e=!0)}else!c&&this.setFileAnnotationHeight(0)&&(e=!0);for(let t of s){if(t==null)continue;let i=t.children[1];if(!(i instanceof HTMLElement))continue;let a=o===`split`&&t===this.codeDeletions;for(let t of i.children){if(!(t instanceof HTMLElement))continue;let i=t.dataset.lineIndex;if(i==null)continue;let s=oA(i,o),c=n.get(s)??0;if(a&&c>0)continue;let l=t.getBoundingClientRect().height+c*r,u=!1;t.nextElementSibling instanceof HTMLElement&&(`lineAnnotation`in t.nextElementSibling.dataset||`noNewline`in t.nextElementSibling.dataset)&&(`noNewline`in t.nextElementSibling.dataset&&(u=!0),l+=t.nextElementSibling.getBoundingClientRect().height);let d=this.getEstimatedLineHeight(u),f=this.cache.heightDeltas.get(s)??0,p=l-d;p!==f&&(e=!0,this.cache.measuredHeightDeltaTotal+=p-f,p===0?this.cache.heightDeltas.delete(s):this.cache.heightDeltas.set(s,p))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer!=null&&(e&&(this.top=this.getVirtualizedTop()),this.render());flushManagers(){super.flushManagers(),this.lineStateRefreshPending&&this.flushDeferredLineState()}updateCodeViewLayout(e,t,n,r){let i=!1,a=!1,{pendingExpansions:o,pendingHydratedDiff:s,options:{collapsed:c=!1}}=this;if(s!=null&&(this.pendingHydratedDiff=void 0,s.expectedDiff===e&&(Object.assign(e,s.nextDiff),this.setHydratedState(s.files),this.startHydratedEditSession(e),this.forceRenderOverride=!0,i=!0,a=!0)),o!=null){this.pendingExpansions=void 0;for(let{hunkIndex:e,direction:t,expansionLineCountOverride:n}of o)this.hunksRenderer.expandHunk(e,t,n),this.forceRenderOverride=!0,a=!0}let l=this.updateExternalDiff(e,r),{pendingRenderDiff:u,layoutDiffChanged:d,renderedDiffChanged:f,annotationsChanged:p}=this.updatePendingRender(e,r);return!this.forceRenderOverride&&(l||f||p)&&(this.forceRenderOverride=!0),(n?.resetDiffLayoutCache===!0||d||p)&&(i=!0),(d||n?.resetDiffLayoutCache===!0&&n.includeEstimatedDiffHeights)&&(a=!0),n?.metrics!=null&&(this.metrics=HC(n.metrics),i=!0,a=!0),this.currentCollapsed!==c&&(this.currentCollapsed=c,i=!0),i?this.resetLayoutCache({includeEstimatedHeights:a}):a&&this.invalidateDerivedLayoutCache(!0),this.top=t,this.computeApproximateSize(!1,u),this.height}getLinePosition(e,t=`additions`){let n=this.getLayoutDiff();if(n==null||e<1)return;let r=this.getLineIndexForDiff(n,e,t);if(r==null)return;let{disableFileHeader:i=!1,expandUnchanged:a=!1,collapsed:o=!1,collapsedContextThreshold:s=1}=this.options,c=this.getDiffStyle(),l=this.getHunkSeparatorType(),u=c===`split`?r[1]:r[0];this.approximateLayoutCheckpoints(n);let d=UC(this.metrics,i),f=this.getLayoutCheckpointBeforeLineIndex(u),p=f?.top??d+this.cache.fileAnnotationHeight;if(o)return{top:d,height:0};let m;return ow({diff:n,diffStyle:c,startingLine:f?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s,callback:({hunkIndex:e,hunk:t,collapsedBefore:n,collapsedAfter:r,deletionLine:i,additionLine:a})=>{let o=c===`split`?a?.splitLineIndex??i?.splitLineIndex:a?.unifiedLineIndex??i?.unifiedLineIndex;if(o==null)throw Error(`VirtualizedFileDiff.getLinePosition: missing line index data`);if(n>0){let r=iw({type:l,metrics:this.metrics,hunkIndex:e,hunkSpecs:t?.hunkSpecs});if(r!=null){if(p+=r.gapBefore,u>=o-n&&u<o)return m={top:p,height:r.height},!0;p+=r.height+r.gapAfter}}let s=this.getLineHeight(o,(a?.noEOFCR??!1)||(i?.noEOFCR??!1));if(o===u)return m={top:p,height:s},!0;if(p+=s,r>0){let e=aw({type:l,metrics:this.metrics});if(e!=null){if(u>o&&u<=o+r)return m={top:p+e.gapBefore,height:e.height},!0;p+=e.totalHeight}}return!1}}),m}getEditorViewport(){return this.virtualizer.type===`simple`?this.virtualizer.getRoot():this.virtualizer.getContainerElement()}getNumericScrollAnchor(e){let t=this.getLayoutDiff();if(t==null)return;let{disableFileHeader:n=!1,expandUnchanged:r=!1,collapsed:i=!1,collapsedContextThreshold:a=1}=this.options;if(i)return;let o=this.getDiffStyle(),s=this.getHunkSeparatorType();this.approximateLayoutCheckpoints(t);let c=this.getLayoutCheckpointBeforeTop(e),l=c?.top??UC(this.metrics,n)+this.cache.fileAnnotationHeight,u;return ow({diff:t,diffStyle:o,startingLine:c?.renderedLineIndex??0,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:a,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,deletionLine:a,additionLine:c})=>{let d=o===`split`?c?.splitLineIndex??a?.splitLineIndex:c?.unifiedLineIndex??a?.unifiedLineIndex;if(d==null)throw Error(`VirtualizedFileDiff.getNumericScrollAnchor: missing line index data`);if(r>0){let e=iw({type:s,metrics:this.metrics,hunkIndex:t,hunkSpecs:n?.hunkSpecs});e!=null&&(l+=e.totalHeight)}if(l>=e&&(a==null?c!=null&&(u={lineNumber:c.lineNumber,side:`additions`,top:l}):u={lineNumber:a.lineNumber,side:`deletions`,top:l},u!=null))return!0;let f=this.getLineHeight(d,(c?.noEOFCR??!1)||(a?.noEOFCR??!1));if(l+=f,i>0){let e=aw({type:s,metrics:this.metrics});e!=null&&(l+=e.totalHeight)}return!1}}),u}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){let t=this.getLayoutDiff();if(this.top==null||t==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};let n=e==null?this.renderRange:this.computeRenderRangeFromWindow(t,this.top,e);if(n==null)return;let{bufferBefore:r,bufferAfter:i,totalLines:a}=n,o=0;if(a===0){let t=e??this.virtualizer.getWindowSpecs();this.top<t.top&&(o=i)}return{topOffset:this.top+r+o,height:this.height-(r+i)}}cleanUp(e=!1){let t=this.cache.ghostTextRows.size>0;t&&(this.layoutDirty=!0);let n=e&&this.isAdvancedMode()&&this.fileContainer!=null&&(t||!RC(this.getRenderedDiff(),this.getLatestDiff()));this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||(this.resetLayoutCache({includeEstimatedHeights:!0}),this.pendingExpansions=void 0,this.pendingHydratedDiff=void 0),this.pendingRender=void 0,this.isSetup=!1,super.cleanUp(e),n&&this.virtualizer.instanceChanged(this,!0)}expandHunk=(e,t,n)=>{this.fileDiff!=null&&(this.isAdvancedMode()?(this.pendingExpansions??=[],this.pendingExpansions.push({hunkIndex:e,direction:t,expansionLineCountOverride:n})):(this.hunksRenderer.expandHunk(e,t,n),this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()),this.loadFilesIfNecessary(),this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))};async handleFilesLoaded(e,t){if(this.fileDiff===e&&e.isPartial){if(this.isAdvancedMode()){let n=mD(`clone`,e,t);if(await iD(()=>this.primeHighlightCache(n)),!this.enabled||this.fileDiff!==e)return;this.pendingHydratedDiff={expectedDiff:e,nextDiff:n,files:t}}else{if(mD(`merge`,e,t),this.setHydratedState(t),!this.startHydratedEditSession(e)&&(await iD(()=>this.primeHighlightCache(e)),!this.enabled||this.fileDiff!==e))return;this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}}loadFilesIfNecessary(){if(this.pendingHydratedDiff!=null){if(this.pendingHydratedDiff.expectedDiff===this.fileDiff)return;this.pendingHydratedDiff=void 0}super.loadFilesIfNecessary()}isLineRenderable(e){if(super.isLineRenderable(e))return!0;let{pendingExpansions:t}=this,n=this.getRenderedDiff();if(t==null||t.length===0||n==null)return!1;let{expansionLineCount:r=100,collapsedContextThreshold:i=1}=this.options,a=new Map(this.hunksRenderer.getExpandedHunksMap());for(let e of t){let t={...a.get(e.hunkIndex)??{fromStart:0,fromEnd:0}},n=e.expansionLineCountOverride??r;(e.direction===`up`||e.direction===`both`)&&(t.fromStart+=n),(e.direction===`down`||e.direction===`both`)&&(t.fromEnd+=n),a.set(e.hunkIndex,t)}return QC({fileDiff:n,lineNumber:e,expandedHunks:a,collapsedContextThreshold:i})}invalidateEditSessionLayout(){this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1}),this.isSimpleMode()||this.computeApproximateSize(!0),this.getSimpleVirtualizer()?.requestHeightReconcile(this)}escalateEditSessionRender(){this.invalidateEditSessionLayout(),this.enabled&&this.fileDiff!=null&&(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))}shouldSelfHealEditSession(){return!this.isAdvancedMode()&&super.shouldSelfHealEditSession()}setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){if(!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null)return;let e=this.getLatestDiff(),t=e==null?void 0:this.hunksRenderer.getDiffForNextRender(e);this.isSimpleMode()&&(this.pendingRender=void 0),this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!RC(this.getRenderedDiff(),t))}syncGhostTextRows(){let e=this.getAdvancedVirtualizer();e==null?this.getSimpleVirtualizer()?.requestHeightReconcile(this):(e.capturePendingLayoutAnchor(),this.layoutDirty=!0,e.instanceChanged(this,!0))}applyDocumentChange(e,t,n=!1){let{renderRange:r}=this;this.getAdvancedVirtualizer()?.capturePendingLayoutAnchor(),super.applyDocumentChange(e,t),this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1});let i=this.getRenderedDiff();if(!this.isSimpleMode())this.computeApproximateSize(!0);else if(n&&r!=null&&i!=null){let e=this.virtualizer.getWindowSpecs(),t=this.computeRenderRangeFromWindow(i,this.top??0,e);t.bufferAfter!==r.bufferAfter&&this.updateBuffers(t)}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}computeApproximateSize(e=!1,t=this.getLayoutDiff()){let n=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!n)return;let r=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,t==null){this.layoutDirty=!1;return}this.applyGhostTextRows(t,this.editor?.__getGhostTextRows()??Gk);let{disableFileHeader:i=!1,collapsed:a=!1}=this.options,o=UC(this.metrics,i);if(this.height+=o,a){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight(t)+this.cache.measuredHeightDeltaTotal,n&&!r&&this.validateComputedHeight(t),this.layoutDirty=!1}getLayoutDiff(){return this.pendingRender?.diff??this.getRenderedDiff()}getActiveEstimatedHeight(e=this.getLayoutDiff()){this.ensureEstimatedDiffHeights(e);let t=this.getDiffStyle()===`split`?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(t==null)throw Error(`VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height`);return t}ensureEstimatedDiffHeights(e=this.getLayoutDiff()){if(e==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;let{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options,{splitHeight:i,unifiedHeight:a}=aD({fileDiff:e,metrics:this.metrics,disableFileHeader:t,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:n,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r,canHydratePartialDiff:rA(e,this.options.loadDiffFiles!=null)});this.cache.estimatedSplitHeight=i,this.cache.estimatedUnifiedHeight=a}validateComputedHeight(e=this.getLayoutDiff()){if(this.fileContainer==null||e==null)return;let t=this.fileContainer.getBoundingClientRect();t.height===this.height?console.log(`VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT`):console.log(`VirtualizedFileDiff.computeApproximateSize: computed height doesnt match`,{name:e.name,elementHeight:t.height,computedHeight:this.height})}render({fileContainer:e,fileDiff:t,forceRender:n=!1,lineAnnotations:r,...i}={}){let a=cD(i,`VirtualizedFileDiff.render`),o=a!=null,s=a?.oldFile,c=a?.newFile,l=o&&(!aA(s,this.deletionFile)||!aA(c,this.additionFile)),u=t??this.fileDiff;t==null&&o&&(l||this.fileDiff==null)&&(u=uO(a.oldFile,a.newFile,this.options.parseDiffOptions));let{forceRenderOverride:d,isSetup:f}=this;this.forceRenderOverride=void 0;let p=u!=null&&!RC(this.fileDiff,u),m=p||l;if(e=this.getOrCreateFileContainer(e),u==null)return console.error(`VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data`),!1;p&&this.updateExternalDiff(u,r);let{pendingRenderDiff:h,layoutDiffChanged:g,renderedDiffChanged:_,annotationsChanged:v}=this.pendingRender!=null&&this.pendingRender.latestDiff===(this.getLatestDiff(u)??u)?{pendingRenderDiff:this.pendingRender.diff,layoutDiffChanged:!1,renderedDiffChanged:!1,annotationsChanged:!1}:this.updatePendingRender(u,r);if((v||g)&&this.resetLayoutCache({includeEstimatedHeights:g}),f)this.top??=this.getVirtualizedTop(),g&&(this.getSimpleVirtualizer()?.markDOMDirty(),this.computeApproximateSize(!1,h));else{this.computeApproximateSize(!1,h);let t=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(t==null)throw Error(`VirtualizedFileDiff.render: simple virtualizer is not available`);t.connect(e,this),this.isVisible=t.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode()&&(!m||!f))return a!=null&&(this.deletionFile=s,this.additionFile=c),p&&this.clearReusableHeader(),this.pendingRender=void 0,this.renderPlaceholder(this.height);let y=this.virtualizer.getWindowSpecs(),b=this.top??0,x=this.computeRenderRangeFromWindow(h,b,y);return super.render({fileDiff:u,fileContainer:e,renderRange:x,lineAnnotations:r,forceRender:(d??n)||v||_||p,...a,...i})}finalizeRender(){if(this.getRenderedDiff()!==this.pendingRender?.diff)throw Error(`VirtualizedFileDiff.render: rendered a different diff than its prepared layout`);this.pendingRender=void 0,this.isSimpleMode()&&this.getSimpleVirtualizer()?.requestHeightReconcile(this)}updatePendingRender(e,t){let n=this.getLatestDiff(e)??e,r=this.getRenderedDiff(),{pendingRender:i}=this,a=i?.diff??r,o=this.hunksRenderer.getDiffForNextRender(n);return this.pendingRender={latestDiff:n,diff:o},{pendingRenderDiff:o,annotationsChanged:this.syncLineAnnotations(t),layoutDiffChanged:!RC(a,o),renderedDiffChanged:!RC(r,o)}}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}shouldGuardRebuildScroll(){return!1}isSimpleMode(){return this.virtualizer.type===`simple`}isAdvancedMode(){return this.virtualizer.type===`advanced`}getVirtualizedTop(){return this.virtualizer.type===`advanced`?this.virtualizer.getLocalTopForInstance(this):this.fileContainer==null?0:this.virtualizer.getOffsetInScrollContainer(this.fileContainer)}getSimpleVirtualizer(){return this.virtualizer.type===`simple`?this.virtualizer:void 0}getAdvancedVirtualizer(){return this.virtualizer.type===`advanced`?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??`split`}getHunkSeparatorType(){return iA(this.options.hunkSeparators)}approximateLayoutCheckpoints(e){if(!this.layoutDirty&&this.cache.checkpoints.length>0||e.hunks.length===0||this.options.collapsed===!0)return;let{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options,i=e.hunks.length-1,a=rA(e,this.options.loadDiffFiles!=null),o=this.getDiffStyle(),s=this.getHunkSeparatorType(),c=n?!0:this.hunksRenderer.getExpandedHunksMap(),l=Yk(this.cache.heightDeltas),u=UC(this.metrics,t)+this.cache.fileAnnotationHeight,d=0,f=({rowCount:e,startLineIndex:t,preSeparatorHeight:n=0,postSeparatorHeight:r=0,metadataOffsets:i=[]})=>{if(e<=0)return;let a=d,o=d+e,s=Qk(a);for(;s<o;){let e=s-a,r=u+(e>0?n:0)+e*this.metrics.lineHeight+$k(i,e)*this.metrics.lineHeight+Xk(l,t,t+e);this.cache.checkpoints.push({renderedLineIndex:s,lineIndex:t+e,top:r}),s+=Wk}u+=n+e*this.metrics.lineHeight+i.length*this.metrics.lineHeight+Xk(l,t,t+e)+r,d=o};for(let t=0;t<e.hunks.length;t++){let n=e.hunks[t];if(n==null)throw Error(`VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index`);let l=JC({isPartial:e.isPartial,rangeSize:n.collapsedBefore,expandedHunks:c,hunkIndex:t,collapsedContextThreshold:r}),u=l.collapsedLines>0?iw({type:s,metrics:this.metrics,hunkIndex:t,hunkSpecs:n.hunkSpecs})?.totalHeight??0:0;f({rowCount:l.fromStart,startLineIndex:(o===`split`?n.splitLineStart:n.unifiedLineStart)-l.rangeSize});let d=u;f({rowCount:l.fromEnd,startLineIndex:(o===`split`?n.splitLineStart:n.unifiedLineStart)-l.fromEnd,preSeparatorHeight:d}),l.fromEnd>0&&(d=0);let p=t===i?ZC({fileDiff:e,hunkIndex:t,expandedHunks:c,collapsedContextThreshold:r,errorPrefix:`VirtualizedFileDiff`}):void 0,m=p!=null&&p.collapsedLines>0||t===i&&a?aw({type:s,metrics:this.metrics})?.totalHeight??0:0,h=p==null?0:p.fromStart+p.fromEnd,g=o===`split`?n.splitLineCount:n.unifiedLineCount,_=o===`split`?n.splitLineStart:n.unifiedLineStart;f({rowCount:g,startLineIndex:_,preSeparatorHeight:d,postSeparatorHeight:h===0?m:0,metadataOffsets:eA({diffStyle:o,hunk:n,rowCount:g})}),p!=null&&h>0&&f({rowCount:h,startLineIndex:_+g,postSeparatorHeight:m})}this.cache.totalLines=d}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,r;for(;t<=n;){let i=t+n>>1,a=this.cache.checkpoints[i];if(a==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);a.lineIndex<=e?(r=a,t=i+1):n=i-1}return r}getLayoutCheckpointBeforeTop(e,t){let n=0,r=this.cache.checkpoints.length-1,i=-1;for(;n<=r;){let t=n+r>>1,a=this.cache.checkpoints[t];if(a==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);a.top<=e?(i=t,n=t+1):r=t-1}if(t==null)return i>=0?this.cache.checkpoints[i]:void 0;for(let e=i;e>=0;e--){let n=this.cache.checkpoints[e];if(n==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);if(n.renderedLineIndex%t===0)return n}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(let r of e.hunks)n+=t===`split`?r.splitLineCount:r.unifiedLineCount;return n}let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a=r?!0:this.hunksRenderer.getExpandedHunksMap();for(let[r,o]of e.hunks.entries()){let s=t===`split`?o.splitLineCount:o.unifiedLineCount;n+=s;let c=Math.max(o.collapsedBefore,0),{fromStart:l,fromEnd:u,renderAll:d}=JC({isPartial:e.isPartial,rangeSize:c,expandedHunks:a,hunkIndex:r,collapsedContextThreshold:i});c>0&&(n+=d?c:l+u)}let o=ZC({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:a,collapsedContextThreshold:i,errorPrefix:`VirtualizedFileDiff`});return o!=null&&(n+=o.fromStart+o.fromEnd),n}getLayoutLineCount(e,t){let n=this.getExpandedLineCount(e,t),r=t===`split`?e.splitLineCount:e.unifiedLineCount;return Math.max(n,r,e.additionLines.length,e.deletionLines.length,this.cache.totalLines)}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){let{disableFileHeader:i=!1,expandUnchanged:a=!1,collapsedContextThreshold:o=1}=this.options,{hunkLineCount:s,lineHeight:c}=this.metrics,l=this.getDiffStyle(),u=this.getHunkSeparatorType(),d=rA(e,this.options.loadDiffFiles!=null),f=this.height,p=this.getLayoutLineCount(e,l),m=UC(this.metrics,i),h=e.hunks.length>0?GC(this.metrics):0,{fileAnnotationHeight:g}=this.cache,_=m+g,v=Math.max(0,f-m-g-h),y=this.hasFileAnnotations(e),b=t+m,x=g>0&&y&&b<r&&b+g>n;if(t<n-f||t>r)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-m-h};if(p<=s||e.hunks.length===0)return{startingLine:0,totalLines:s,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(e),p=this.getLayoutLineCount(e,l);let S=Math.ceil(Math.max(r-n,0)/c),C=Math.ceil(S/s)*s+s,w=C/s,T=w,E=[],D=(n+r)/2,O=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-C*c*2),s),k=t+(O?.top??_),A=O?.renderedLineIndex??0,j,M,N;if(ow({diff:e,diffStyle:l,startingLine:O?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:i,hunk:a,collapsedBefore:o,collapsedAfter:c,deletionLine:f,additionLine:p})=>{let m=p==null?f.splitLineIndex:p.splitLineIndex,h=p==null?f.unifiedLineIndex:p.unifiedLineIndex,g=(p?.noEOFCR??!1)||(f?.noEOFCR??!1),v=i===e.hunks.length-1&&a!=null&&(l===`split`?m===a.splitLineStart+a.splitLineCount-1:h===a.unifiedLineStart+a.unifiedLineCount-1),y=(o>0?iw({type:u,metrics:this.metrics,hunkIndex:i,hunkSpecs:a?.hunkSpecs}):void 0)?.totalHeight??0;k+=y;let b=A%s===0,x=Math.floor(A/s);if(b&&(E[x]=k-(t+_+y),N!=null)){if(N<=0)return!0;N--}let S=this.getLineHeight(l===`split`?m:h,g);if(k>n-S&&k<r&&(j??=x),M==null&&k+S>D&&(M=x),N==null&&k>=r&&b&&(N=T),A++,k+=S,c>0||v&&d){let e=aw({type:u,metrics:this.metrics});e!=null&&(k<r&&k+e.totalHeight>n&&(j??=x),M==null&&k+e.totalHeight>D&&(M=x),k+=e.totalHeight)}return!1}}),j==null){if(x)j=0,M=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-m-h}}M??=j;let P=Math.round(M-w/2),F=Math.max(0,Math.ceil(p/s)-w),I=Math.max(0,Math.min(P,F)),L=I*s,R=P<0?C+P*s:C,z=E[I]??0,B=L===0?0:g+z,V=I+R/s,H=V<E.length?v-E[V]:v-(k-t-_);return{startingLine:L,totalLines:R,bufferBefore:B,bufferAfter:Math.max(0,H)}}};function Jk(e){let t;for(let n of e){if(n==null)continue;let e=n.children[1];if(e instanceof HTMLElement)for(let n of e.children)n instanceof HTMLElement&&n.dataset.lineAnnotation===NT&&(t=Math.max(t??0,n.getBoundingClientRect().height))}return t}function Yk(e){let t=Array.from(e).sort((e,t)=>e[0]-t[0]),n=[],r=[0],i=0;for(let[e,a]of t)n.push(e),i+=a,r.push(i);return{lineIndexes:n,prefixTotals:r}}function Xk({lineIndexes:e,prefixTotals:t},n,r){if(n>=r||e.length===0)return 0;let i=Zk(e,n);return(t[Zk(e,r)]??0)-(t[i]??0)}function Zk(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>1,a=e[i];if(a==null)throw Error(`VirtualizedFileDiff: invalid prefix index`);a<t?n=i+1:r=i}return n}function Qk(e){return Math.ceil(e/Wk)*Wk}function $k(e,t){let n=0;for(let r of e)r<t&&n++;return n}function eA({diffStyle:e,hunk:t,rowCount:n}){if(n<=0||!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return[];let r=t.hunkContent.at(-1);if(r==null)return[];if(r.type===`context`)return[n-1];let i=Math.max(r.deletions,r.additions),a=r.deletions+r.additions;if(e===`split`)return i>0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[n-1]:[];let o=[],s=n-a;return r.deletions>0&&t.noEOFCRDeletions&&o.push(s+r.deletions-1),r.additions>0&&t.noEOFCRAdditions&&o.push(n-1),o}function tA(e,t){return(e.diffStyle??`split`)!==(t.diffStyle??`split`)||(e.overflow??`scroll`)!==(t.overflow??`scroll`)||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.diffIndicators??`bars`)!==(t.diffIndicators??`bars`)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||!!e.loadDiffFiles!=!!t.loadDiffFiles||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)||e.unsafeCSS!==t.unsafeCSS}function nA(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||!!e.loadDiffFiles!=!!t.loadDiffFiles||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function rA(e,t){return e.isPartial&&t&&(e.type===`change`||e.type===`rename-changed`)}function iA(e){return typeof e==`function`?`custom`:e??`line-info`}function aA(e,t){return e==null||t==null?e==null&&t==null:zC(e,t)}function oA(e,t){let[n,r]=e.split(`,`).map(Number);return t===`split`?r:n}function sA(e,t){return typeof window>`u`&&t!=null?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t}}),e]}):(0,Y.jsx)(Y.Fragment,{children:e})}function cA(e,t){return e==null||t==null?e===t:e.top===t.top&&e.bottom===t.bottom}var lA=1e3,uA=lA*4,dA=[0,1e-6,.99999,1],fA={overscrollSize:lA,intersectionObserverMargin:uA,resizeDebugging:!1},pA=0,mA=-1,hA=class e{static __STOP=!1;static __lastScrollPosition=0;__id=`virtualizer-${++mA}`;config;type=`simple`;intersectionObserver;scrollTop=0;height=0;scrollHeight=0;windowSpecs={top:0,bottom:0};root;contentContainer;resizeObserver;observers=new Map;visibleInstances=new Map;visibleInstancesDirty=!1;instancesChanged=new Set;reconcileQueue=new Set;scrollDirty=!0;heightDirty=!0;scrollHeightDirty=!0;renderedObservers=0;connectQueue=new Map;constructor(e){this.config={...fA,...e}}setup(t,n){if(this.root==null){this.root=t,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:dA,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),t instanceof Document?this.setupWindow():this.setupElement(n),window.__INSTANCE=this,window.__TOGGLE=()=>{e.__STOP?(e.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:e.__lastScrollPosition}),ET(this.computeRenderRangeAndEmit)):(e.__lastScrollPosition=this.getScrollTop(),e.__STOP=!0)};for(let[e,t]of this.connectQueue.entries())this.connect(e,t);this.connectQueue.clear(),this.markDOMDirty(),ET(this.computeRenderRangeAndEmit)}}instanceChanged(e,t){this.instancesChanged.add(e),t&&this.markDOMDirty(),ET(this.computeRenderRangeAndEmit)}requestHeightReconcile(e){this.reconcileQueue.add(e),ET(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=AT({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}getRoot(){return this.root}isInstanceVisible(e,t){let n=this.getScrollTop(),r=this.getHeight(),i=this.config.intersectionObserverMargin,a=n-i,o=n+r+i;return!(e<a-t||e>o)}handleContainerResize=e=>{if(this.root==null)return;let t=!1;for(let n of e){let e=n.borderBoxSize[0].blockSize;this.root instanceof Document?e!==this.scrollHeight&&(this.scrollHeightDirty=!0,t=!0,this.config.resizeDebugging&&(console.log(`Virtualizer: content size change`,this.__id,{sizeChange:e-pA,newSize:e}),pA=e)):n.target===this.root?e!==this.height&&(this.heightDirty=!0,t=!0):n.target===this.contentContainer&&(this.scrollHeightDirty=!0,t=!0,this.config.resizeDebugging&&(console.log(`Virtualizer: scroller size change`,this.__id,{sizeChange:e-pA,newSize:e}),pA=e))}t&&ET(this.computeRenderRangeAndEmit)};setupWindow(){if(this.root==null||!(this.root instanceof Document))throw Error(`Virtualizer.setupWindow: Invalid setup method`);window.addEventListener(`scroll`,this.handleWindowScroll,{passive:!0}),window.addEventListener(`resize`,this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(e){if(this.root==null||this.root instanceof Document)throw Error(`Virtualizer.setupElement: Invalid setup method`);this.root.addEventListener(`scroll`,this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),e??=this.root.firstElementChild??void 0,e instanceof HTMLElement&&(this.contentContainer=e,this.resizeObserver?.observe(e))}cleanUp(){DT(this.computeRenderRangeAndEmit),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener(`scroll`,this.handleElementScroll),window.removeEventListener(`scroll`,this.handleWindowScroll),window.removeEventListener(`resize`,this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.reconcileQueue.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.scrollHeightDirty=!0}getOffsetInScrollContainer(e){return this.getScrollTop()+gA(e,this.getScrollContainerElement())}connect(e,t){if(this.observers.has(e))throw Error(`Virtualizer.connect: instance is already connected...`);return this.intersectionObserver==null?this.connectQueue.set(e,t):(this.intersectionObserver.observe(e),this.observers.set(e,t),this.instancesChanged.add(t),this.markDOMDirty(),ET(this.computeRenderRangeAndEmit)),()=>this.disconnect(e)}disconnect(e){let t=this.observers.get(e);this.connectQueue.delete(e),t!=null&&(this.intersectionObserver?.unobserve(e),this.observers.delete(e),this.instancesChanged.delete(t),this.reconcileQueue.delete(t),this.visibleInstances.delete(e)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),ET(this.computeRenderRangeAndEmit))}handleWindowResize=()=>{e.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,ET(this.computeRenderRangeAndEmit))};handleWindowScroll=()=>{!e.__STOP&&this.root!=null&&this.root instanceof Document&&(this.scrollDirty=!0,ET(this.computeRenderRangeAndEmit))};handleElementScroll=()=>{e.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,ET(this.computeRenderRangeAndEmit))};computeRenderRangeAndEmit=()=>{if(e.__STOP)return;let t=this.heightDirty||this.scrollHeightDirty,n=this.instancesChanged.size>0;if(this.instancesChanged.size===0){let e=AT({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!t&&cA(this.windowSpecs,e)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.reconcileQueue.size===0)return;this.windowSpecs=e}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;let r=this.getScrollAnchor(this.height),i=new Set;for(let e of t?this.observers.values():this.visibleInstances.values())e.onRender(t)&&i.add(e);for(let e of this.instancesChanged)i.has(e)||e.onRender(t)&&i.add(e);this.scrollFix(r);for(let e of i)this.reconcileQueue.delete(e),e.reconcileHeights();for(let e of this.reconcileQueue)e.reconcileHeights()&&(n=!0);this.reconcileQueue.clear(),n||=this.instancesChanged.size>0,n&&this.markDOMDirty(),(n||t)&&ET(this.computeRenderRangeAndEmit),i.clear(),this.instancesChanged.clear()};scrollFix(e){if(e==null)return;let t=this.getScrollContainerElement(),{lineIndex:n,lineOffset:r,fileElement:i,fileOffset:a,fileTypeOffset:o}=e;if(n!=null&&r!=null){let e=i.shadowRoot?.querySelector(`[data-line][data-line-index="${n}"]`);if(e instanceof HTMLElement){let n=gA(e,t);if(n!==r){let e=n-r;this.applyScrollFix(e)}return}}let s=gA(i,t);if(o===`top`)s!==a&&this.applyScrollFix(s-a);else{let e=s+i.getBoundingClientRect().height;e!==a&&this.applyScrollFix(e-a)}}applyScrollFix(e){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+e,behavior:`instant`}):this.root.scrollTo({top:this.root.scrollTop+e,behavior:`instant`}),this.markDOMDirty()}getScrollAnchor(e){let t=this.getScrollContainerElement(),n;for(let[r]of this.visibleInstances.entries()){let i=gA(r,t),a=i+r.offsetHeight,o,s;a<=0?(o=a,s=`bottom`):(o=i,s=`top`);let c,l;if(a>0&&i<e)for(let e of r.shadowRoot?.querySelectorAll(`[data-line][data-line-index]`)??[]){if(!(e instanceof HTMLElement))continue;let n=e.dataset.lineIndex;if(n==null)continue;let r=gA(e,t);if(!(r<0)){c=n,l=r;break}}if(n?.lineOffset!=null&&l==null)continue;let u=!1;(n==null||l!=null&&(n.lineOffset==null||l<n.lineOffset)||l==null&&n.lineOffset==null&&(o>=0&&(n.fileOffset<0||o<n.fileOffset)||o<0&&n.fileOffset<0&&o>n.fileOffset))&&(u=!0),u&&(n={fileElement:r,fileTypeOffset:s,fileOffset:o,lineIndex:c,lineOffset:l})}return n}handleIntersectionChange=e=>{this.scrollDirty=!0;for(let{target:t,isIntersecting:n}of e){if(!(t instanceof HTMLElement))throw Error(`Virtualizer.handleIntersectionChange: target not an HTMLElement`);let e=this.observers.get(t);e!=null&&(n&&!this.visibleInstances.has(t)?(e.setVisibility(!0),this.visibleInstances.set(t,e),this.visibleInstancesDirty=!0):!n&&this.visibleInstances.has(t)&&(e.setVisibility(!1),this.visibleInstances.delete(t),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&ET(this.computeRenderRangeAndEmit)};getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let e=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return e=this.clampScrollTop(e),this.scrollTop=e,e}scrollTo({top:e,behavior:t=`auto`}){let{root:n}=this;if(n==null)return;let r=this.clampScrollTop(e);n instanceof Document?window.scrollTo({top:r,behavior:t}):n.scrollTo({top:r,behavior:t}),this.scrollDirty=!0,ET(this.computeRenderRangeAndEmit)}clampScrollTop(e){return Math.max(0,Math.min(e,this.getScrollHeight()-this.getHeight()))}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}};function gA(e,t){let n=e.getBoundingClientRect(),r=t?.getBoundingClientRect().top??0;return n.top-r}var _A=(0,b.createContext)(void 0);function vA({children:e,config:t,className:n,style:r,contentClassName:i,contentStyle:a}){let[o]=(0,b.useState)(()=>typeof window<`u`?new hA(t):void 0),s=(0,b.useCallback)(e=>{e==null?o?.cleanUp():o?.setup(e)},[o]);return(0,Y.jsx)(_A.Provider,{value:o,children:(0,Y.jsx)(`div`,{className:n,style:r,ref:s,children:(0,Y.jsx)(`div`,{className:i,style:a,children:e})})})}function yA(){return(0,b.useContext)(_A)}var bA=typeof window>`u`?b.useEffect:b.useLayoutEffect;function xA({fileDiff:e,oldFile:t,newFile:n,options:r,editorOptions:i,editStateKey:a,lineAnnotations:o,selectedLines:s,prerenderedHTML:c,metrics:l,hasGutterRenderUtility:u,hasCustomHeader:d,disableWorkerPool:f,edit:p,onEditChange:m,onEditComplete:h}){let g=yA(),_=s!==void 0,v=(0,b.useContext)(vT),y=ad(),x=rd(e=>m?.(e)),S=m==null?void 0:x,C=(0,b.useRef)(null),w=rd(r=>{let i=h?.(r)??`reject`;return i===`accept`&&(C.current={fileDiff:{installed:r.fileDiff,stale:r.originalFileDiff},filePair:e==null?{fileDiff:r.fileDiff,installed:{oldFile:r.oldFile,newFile:r.newFile},stale:{oldFile:t??null,newFile:n??null}}:null,annotations:{installed:r.lineAnnotations,stale:r.originalLineAnnotations}}),i}),T=h==null?void 0:w,E=SA({acceptedCache:C,fileDiff:e,newFile:n,oldFile:t,parseDiffOptions:r?.parseDiffOptions}),D=(0,b.useRef)(null),O=(0,b.useRef)(null),k=rd(()=>{if(y==null)throw Error(`FileDiff: EditContext is not attached`);return y(`file-diff`,i??{},a)}),A=rd(e=>{if(e!=null){if(D.current!=null)throw Error(`useFileDiffInstance: An instance should not already exist when a node is created`);g==null?D.current=new Ik(TA({controlledSelection:_,hasCustomHeader:d,hasGutterRenderUtility:u,onEditChange:S,onEditComplete:T,options:r}),f?void 0:v,!0):D.current=new qk(TA({controlledSelection:_,hasCustomHeader:d,hasGutterRenderUtility:u,onEditChange:S,onEditComplete:T,options:r}),g,l,f?void 0:v,!0),p&&O.current==null&&(O.current=EA(D.current,k)),D.current.hydrate({fileDiff:E,fileContainer:e,lineAnnotations:o,prerenderedHTML:c})}else{if(D.current==null)throw Error(`useFileDiffInstance: A FileDiff instance should exist when unmounting`);D.current.cleanUp(),D.current=null,O.current=null}});return bA(()=>{let{current:e}=D;if(e==null)return;let t=TA({controlledSelection:_,hasCustomHeader:d,hasGutterRenderUtility:u,onEditChange:S,onEditComplete:T,options:r}),n=t!==void 0&&!ST(e.options,t);if(e.setOptions(t),!p&&O.current!=null){let{current:e}=O;O.current=null,e()}let i=wA(E,o,C);e.render({forceRender:n,fileDiff:i.fileDiff,lineAnnotations:i.lineAnnotations}),s!==void 0&&e.setSelectedLines(s),p&&O.current==null&&(O.current=EA(e,k))}),{fileDiff:E,ref:A,getHoveredLine:(0,b.useCallback)(()=>D.current?.getHoveredLine(),[]),getAnnotationSlotName:(0,b.useCallback)(e=>D.current?.getAnnotationSlotName(e)??jd(e),[])}}function SA({acceptedCache:e,fileDiff:t,newFile:n,oldFile:r,parseDiffOptions:i}){return(0,b.useMemo)(()=>{if(t!=null)return t;let{current:a}=e,o=a?.filePair;if(a!=null&&o!=null){if(CA(r,n,o.stale)||CA(r,n,o.installed))return o.fileDiff;a.filePair=null}return uO(r??null,n??null,i)},[e,t,r,n,i])}function CA(e,t,n){return MT(e??void 0,n.oldFile??void 0)&&MT(t??void 0,n.newFile??void 0)}function wA(e,t,n){let{current:r}=n;if(r==null)return{fileDiff:e,lineAnnotations:t};let{fileDiff:i,annotations:a}=r,o=e;i!=null&&(RC(e,i.stale)?o=i.installed:r.fileDiff=null);let s=t;return a!=null&&(t===a.stale?s=a.installed:r.annotations=null),r.fileDiff==null&&r.annotations==null&&r.filePair==null&&(n.current=null),{fileDiff:o,lineAnnotations:s}}function TA({options:e,controlledSelection:t,hasCustomHeader:n,hasGutterRenderUtility:r,onEditChange:i,onEditComplete:a}){return t||r||n||i!=null||a!=null?{...e,controlledSelection:t,renderCustomHeader:n?cd:e?.renderCustomHeader,renderGutterUtility:r?cd:e?.renderGutterUtility,onEditChange:i,onEditComplete:a}:e}function EA(e,t){let n=t();try{return n.edit(e)}catch(e){throw n.cleanUp(),e}}function DA({fileDiff:e,options:t,editorOptions:n,editStateKey:r,metrics:i,lineAnnotations:a,selectedLines:o,className:s,style:c,prerenderedHTML:l,renderAnnotation:u,renderCustomHeader:d,renderHeaderPrefix:f,renderHeaderFilenameSuffix:p,renderHeaderMetadata:m,renderGutterUtility:h,disableWorkerPool:g=!1,edit:_=!1,onEditChange:v,onEditComplete:y}){let{ref:b,getHoveredLine:x,getAnnotationSlotName:S}=xA({fileDiff:e,options:t,editorOptions:n,editStateKey:r,metrics:i,lineAnnotations:a,selectedLines:o,prerenderedHTML:l,hasGutterRenderUtility:h!=null,hasCustomHeader:d!=null,disableWorkerPool:g,edit:_,onEditChange:v,onEditComplete:y}),C=Ld({fileDiff:e,renderCustomHeader:d,renderHeaderPrefix:f,renderHeaderFilenameSuffix:p,renderHeaderMetadata:m,renderAnnotation:u,renderGutterUtility:h,lineAnnotations:a,getHoveredLine:x,getAnnotationSlotName:S});return(0,Y.jsx)(ld,{ref:b,className:s,style:c,children:sA(C,l)})}var OA=_(),kA=y();function AA(e){return new Worker(`/assets/worker-ChAoQz0Q.js`,{name:e?.name})}var jA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z`}))]]),MA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M204,32V176a12,12,0,0,1-12,12H77l27.52,27.51a12,12,0,0,1-17,17l-48-48a12,12,0,0,1,0-17l48-48a12,12,0,1,1,17,17L77,164H180V32a12,12,0,0,1,24,0Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M96,128v96L48,176Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M192,24a8,8,0,0,0-8,8V168H104V128a8,8,0,0,0-13.66-5.66l-48,48a8,8,0,0,0,0,11.32l48,48A8,8,0,0,0,104,224V184h88a8,8,0,0,0,8-8V32A8,8,0,0,0,192,24ZM88,204.69,59.31,176,88,147.31Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M200,32V176a8,8,0,0,1-8,8H104v40a8,8,0,0,1-13.66,5.66l-48-48a8,8,0,0,1,0-11.32l48-48A8,8,0,0,1,104,128v40h80V32a8,8,0,0,1,16,0Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M198,32V176a6,6,0,0,1-6,6H62.49l37.75,37.76a6,6,0,1,1-8.48,8.48l-48-48a6,6,0,0,1,0-8.48l48-48a6,6,0,1,1,8.48,8.48L62.49,170H186V32a6,6,0,0,1,12,0Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M200,32V176a8,8,0,0,1-8,8H67.31l34.35,34.34a8,8,0,0,1-11.32,11.32l-48-48a8,8,0,0,1,0-11.32l48-48a8,8,0,0,1,11.32,11.32L67.31,168H184V32a8,8,0,0,1,16,0Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M196,32V176a4,4,0,0,1-4,4H57.66l41.17,41.17a4,4,0,0,1-5.66,5.66l-48-48a4,4,0,0,1,0-5.66l48-48a4,4,0,1,1,5.66,5.66L57.66,172H188V32a4,4,0,0,1,8,0Z`}))]]),NA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,128l-72,72V56Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M221.66,122.34l-72-72A8,8,0,0,0,136,56v64H40a8,8,0,0,0,0,16h96v64a8,8,0,0,0,13.66,5.66l72-72A8,8,0,0,0,221.66,122.34ZM152,180.69V75.31L204.69,128Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M221.66,133.66l-72,72A8,8,0,0,1,136,200V136H40a8,8,0,0,1,0-16h96V56a8,8,0,0,1,13.66-5.66l72,72A8,8,0,0,1,221.66,133.66Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M220.24,132.24l-72,72a6,6,0,0,1-8.48-8.48L201.51,134H40a6,6,0,0,1,0-12H201.51L139.76,60.24a6,6,0,0,1,8.48-8.48l72,72A6,6,0,0,1,220.24,132.24Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z`}))]]),PA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z`}))]]),FA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM119.51,96.49a12,12,0,0,0,17,0l32-32a12,12,0,0,0-17-17L140,59V16a12,12,0,0,0-24,0V59L104.49,47.51a12,12,0,0,0-17,17Zm17,63a12,12,0,0,0-17,0l-32,32a12,12,0,0,0,17,17L116,197v43a12,12,0,0,0,24,0V197l11.51,11.52a12,12,0,0,0,17-17Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,32V224a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V32A16,16,0,0,1,56,16H200A16,16,0,0,1,216,32Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM122.34,101.66a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32L136,76.69V16a8,8,0,0,0-16,0V76.69L101.66,58.34A8,8,0,0,0,90.34,69.66Zm11.32,52.68a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L120,179.31V240a8,8,0,0,0,16,0V179.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M90.34,69.66A8,8,0,0,1,96,56h24V16a8,8,0,0,1,16,0V56h24a8,8,0,0,1,5.66,13.66l-32,32a8,8,0,0,1-11.32,0Zm43.32,84.68a8,8,0,0,0-11.32,0l-32,32A8,8,0,0,0,96,200h24v40a8,8,0,0,0,16,0V200h24a8,8,0,0,0,5.66-13.66ZM216,120H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128Zm-98.24-27.76a6,6,0,0,0,8.48,0l32-32a6,6,0,0,0-8.48-8.48L134,81.51V16a6,6,0,0,0-12,0V81.51L100.24,59.76a6,6,0,0,0-8.48,8.48Zm8.48,55.52a6,6,0,0,0-8.48,0l-32,32a6,6,0,0,0,8.48,8.48L122,174.49V240a6,6,0,0,0,12,0V174.49l21.76,21.75a6,6,0,0,0,8.48-8.48Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM122.34,101.66a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32L136,76.69V16a8,8,0,0,0-16,0V76.69L101.66,58.34A8,8,0,0,0,90.34,69.66Zm11.32,52.68a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L120,179.31V240a8,8,0,0,0,16,0V179.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128ZM125.17,98.83a4,4,0,0,0,5.66,0l32-32a4,4,0,1,0-5.66-5.66L132,86.34V16a4,4,0,0,0-8,0V86.34L98.83,61.17a4,4,0,0,0-5.66,5.66Zm5.66,58.34a4,4,0,0,0-5.66,0l-32,32a4,4,0,0,0,5.66,5.66L124,169.66V240a4,4,0,0,0,8,0V169.66l25.17,25.17a4,4,0,0,0,5.66-5.66Z`}))]]),IA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM104.49,56.48,116,45V88a12,12,0,0,0,24,0V45l11.51,11.51a12,12,0,0,0,17-17l-32-32a12,12,0,0,0-17,0l-32,32a12,12,0,0,0,17,17Zm47,143L140,211V168a12,12,0,0,0-24,0v43l-11.51-11.52a12,12,0,0,0-17,17l32,32a12,12,0,0,0,17,0l32-32a12,12,0,0,0-17-17Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,32V224a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V32A16,16,0,0,1,56,16H200A16,16,0,0,1,216,32Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM101.66,53.66,120,35.31V96a8,8,0,0,0,16,0V35.31l18.34,18.35a8,8,0,0,0,11.32-11.32l-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32Zm52.68,148.68L136,220.69V160a8,8,0,0,0-16,0v60.69l-18.34-18.35a8,8,0,0,0-11.32,11.32l32,32a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M88.61,51.06a8,8,0,0,1,1.73-8.72l32-32a8,8,0,0,1,11.32,0l32,32A8,8,0,0,1,160,56H136V96a8,8,0,0,1-16,0V56H96A8,8,0,0,1,88.61,51.06ZM216,120H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Zm-56,80H136V160a8,8,0,0,0-16,0v40H96a8,8,0,0,0-5.66,13.66l32,32a8,8,0,0,0,11.32,0l32-32A8,8,0,0,0,160,200Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128ZM100.24,52.24,122,30.49V96a6,6,0,0,0,12,0V30.49l21.76,21.75a6,6,0,0,0,8.48-8.48l-32-32a6,6,0,0,0-8.48,0l-32,32a6,6,0,0,0,8.48,8.48Zm55.52,151.52L134,225.51V160a6,6,0,0,0-12,0v65.51l-21.76-21.75a6,6,0,0,0-8.48,8.48l32,32a6,6,0,0,0,8.48,0l32-32a6,6,0,0,0-8.48-8.48Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM101.66,53.66,120,35.31V96a8,8,0,0,0,16,0V35.31l18.34,18.35a8,8,0,0,0,11.32-11.32l-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32Zm52.68,148.68L136,220.69V160a8,8,0,0,0-16,0v60.69l-18.34-18.35a8,8,0,0,0-11.32,11.32l32,32a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128ZM98.83,50.83,124,25.66V96a4,4,0,0,0,8,0V25.66l25.17,25.17a4,4,0,1,0,5.66-5.66l-32-32a4,4,0,0,0-5.66,0l-32,32a4,4,0,0,0,5.66,5.66Zm58.34,154.34L132,230.34V160a4,4,0,0,0-8,0v70.34L98.83,205.17a4,4,0,0,0-5.66,5.66l32,32a4,4,0,0,0,5.66,0l32-32a4,4,0,0,0-5.66-5.66Z`}))]]),LA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,96l-80,80L48,96Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z`}))]]),RA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M176,128,96,208V48Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z`}))]]),zA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M80,176h96l-48,48ZM128,32,80,80h96Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z`}))]]),BA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z`}))]]),VA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]]),HA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M100,28H64A20,20,0,0,0,44,48V208a20,20,0,0,0,20,20h36a20,20,0,0,0,20-20V48A20,20,0,0,0,100,28ZM96,204H68V52H96ZM192,28H156a20,20,0,0,0-20,20V208a20,20,0,0,0,20,20h36a20,20,0,0,0,20-20V48A20,20,0,0,0,192,28Zm-4,176H160V52h28Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M112,48V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8h40A8,8,0,0,1,112,48Zm80-8H152a8,8,0,0,0-8,8V208a8,8,0,0,0,8,8h40a8,8,0,0,0,8-8V48A8,8,0,0,0,192,40Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M104,32H64A16,16,0,0,0,48,48V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,104,32Zm0,176H64V48h40ZM192,32H152a16,16,0,0,0-16,16V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,192,32Zm0,176H152V48h40Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M120,48V208a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V48A16,16,0,0,1,64,32h40A16,16,0,0,1,120,48Zm72-16H152a16,16,0,0,0-16,16V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,192,32Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M104,34H64A14,14,0,0,0,50,48V208a14,14,0,0,0,14,14h40a14,14,0,0,0,14-14V48A14,14,0,0,0,104,34Zm2,174a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2h40a2,2,0,0,1,2,2ZM192,34H152a14,14,0,0,0-14,14V208a14,14,0,0,0,14,14h40a14,14,0,0,0,14-14V48A14,14,0,0,0,192,34Zm2,174a2,2,0,0,1-2,2H152a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2h40a2,2,0,0,1,2,2Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M104,32H64A16,16,0,0,0,48,48V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,104,32Zm0,176H64V48h40ZM192,32H152a16,16,0,0,0-16,16V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,192,32Zm0,176H152V48h40Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M104,36H64A12,12,0,0,0,52,48V208a12,12,0,0,0,12,12h40a12,12,0,0,0,12-12V48A12,12,0,0,0,104,36Zm4,172a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4h40a4,4,0,0,1,4,4ZM192,36H152a12,12,0,0,0-12,12V208a12,12,0,0,0,12,12h40a12,12,0,0,0,12-12V48A12,12,0,0,0,192,36Zm4,172a4,4,0,0,1-4,4H152a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4h40a4,4,0,0,1,4,4Z`}))]]),UA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,40V168H168V88H88V40Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z`}))]]),WA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M180.49,143.51a12,12,0,0,1,0,17l-24,24a12,12,0,0,1-17-17L155,152l-15.52-15.51a12,12,0,1,1,17-17Zm-64-24a12,12,0,0,0-17,0l-24,24a12,12,0,0,0,0,17l24,24a12,12,0,0,0,17-17L101,152l15.52-15.51A12,12,0,0,0,116.49,119.51ZM220,88V216a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88ZM160,57V80h23Zm36,155V104H148a12,12,0,0,1-12-12V44H60V212Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,88H152V32Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M181.66,146.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32Zm-72-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L91.31,152l18.35-18.34A8,8,0,0,0,109.66,122.34ZM216,88V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm40,136V96H152a8,8,0,0,1-8-8V40H56V216H200Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34Zm-104,88a8,8,0,0,1-11.32,11.32l-24-24a8,8,0,0,1,0-11.32l24-24a8,8,0,0,1,11.32,11.32L91.31,152Zm72-12.68-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32l24,24A8,8,0,0,1,181.66,157.66ZM152,88V44l44,44Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M180.24,147.76a6,6,0,0,1,0,8.48l-24,24a6,6,0,0,1-8.48-8.48L167.51,152l-19.75-19.76a6,6,0,1,1,8.48-8.48Zm-72-24a6,6,0,0,0-8.48,0l-24,24a6,6,0,0,0,0,8.48l24,24a6,6,0,1,0,8.48-8.48L88.49,152l19.75-19.76A6,6,0,0,0,108.24,123.76ZM214,88V216a14,14,0,0,1-14,14H56a14,14,0,0,1-14-14V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88Zm-56-6h35.52L158,46.48Zm44,134V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2V216a2,2,0,0,0,2,2H200A2,2,0,0,0,202,216Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M181.66,146.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32Zm-72-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L91.31,152l18.35-18.34A8,8,0,0,0,109.66,122.34ZM216,88V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm40,136V96H152a8,8,0,0,1-8-8V40H56V216H200Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M178.83,149.17a4,4,0,0,1,0,5.66l-24,24a4,4,0,0,1-5.66-5.66L170.34,152l-21.17-21.17a4,4,0,1,1,5.66-5.66Zm-72-24a4,4,0,0,0-5.66,0l-24,24a4,4,0,0,0,0,5.66l24,24a4,4,0,1,0,5.66-5.66L85.66,152l21.17-21.17A4,4,0,0,0,106.83,125.17ZM212,88V216a12,12,0,0,1-12,12H56a12,12,0,0,1-12-12V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-56-4h42.34L156,41.65Zm48,132V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H200A4,4,0,0,0,204,216Z`}))]]),GA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M248.23,112.31A20,20,0,0,0,232,104H220V88a20,20,0,0,0-20-20H132L105.34,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V208a12,12,0,0,0,12,12H211.1a12,12,0,0,0,11.33-8l28.49-81.47.06-.17A20,20,0,0,0,248.23,112.31ZM92,68l28.8,21.6A12,12,0,0,0,128,92h68v12H69.77a20,20,0,0,0-18.94,13.58L44,137.15V68ZM202.59,196H48.89l23.72-68H226.37Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,88v24H69.77a8,8,0,0,0-7.59,5.47L32,208V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h72A8,8,0,0,1,208,88Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M243.36,111.81A14,14,0,0,0,232,106H214V88a14,14,0,0,0-14-14H130L101.74,52.8a14.06,14.06,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V208a6,6,0,0,0,6,6H211.1a6,6,0,0,0,5.69-4.1l28.49-85.47A14,14,0,0,0,243.36,111.81ZM40,62H93.34a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h72a2,2,0,0,1,2,2v18H69.77a14,14,0,0,0-13.28,9.57L38,171V64A2,2,0,0,1,40,62Zm193.9,58.63L206.78,202H40.33l27.54-82.63a2,2,0,0,1,1.9-1.37H232a2,2,0,0,1,1.9,2.63Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M241.72,113a11.88,11.88,0,0,0-9.73-5H212V88a12,12,0,0,0-12-12H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V208a4,4,0,0,0,4,4H211.09a4,4,0,0,0,3.79-2.74l28.49-85.47A11.86,11.86,0,0,0,241.72,113ZM40,60H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h72a4,4,0,0,1,4,4v20H69.76a12,12,0,0,0-11.38,8.21L36,183.35V64A4,4,0,0,1,40,60Zm195.78,61.26L208.2,204H37.55L66,118.74A4,4,0,0,1,69.76,116H232a4,4,0,0,1,3.79,5.26Z`}))]]),KA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228,56H160L133.33,36a20.12,20.12,0,0,0-12-4H76A20,20,0,0,0,56,52V72H36A20,20,0,0,0,16,92V204a20,20,0,0,0,20,20H188.89A19.13,19.13,0,0,0,208,204.89V184h20.89A19.13,19.13,0,0,0,248,164.89V76A20,20,0,0,0,228,56ZM184,200H40V96H80l28.8,21.6A12,12,0,0,0,116,120h68Zm40-40H208V116a20,20,0,0,0-20-20H120L93.33,76a20.12,20.12,0,0,0-12-4H80V56h40l28.8,21.6A12,12,0,0,0,156,80h68Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M232,80v88.89a7.11,7.11,0,0,1-7.11,7.11H200V112a8,8,0,0,0-8-8H120L90.13,81.6a8,8,0,0,0-4.8-1.6H64V56a8,8,0,0,1,8-8h45.33a8,8,0,0,1,4.8,1.6L152,72h72A8,8,0,0,1,232,80Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M224,64H154.67L126.93,43.2a16.12,16.12,0,0,0-9.6-3.2H72A16,16,0,0,0,56,56V72H40A16,16,0,0,0,24,88V200a16,16,0,0,0,16,16H192.89A15.13,15.13,0,0,0,208,200.89V184h16.89A15.13,15.13,0,0,0,240,168.89V80A16,16,0,0,0,224,64ZM192,200H40V88H85.33l29.87,22.4A8,8,0,0,0,120,112h72Zm32-32H208V112a16,16,0,0,0-16-16H122.67L94.93,75.2a16.12,16.12,0,0,0-9.6-3.2H72V56h45.33L147.2,78.4A8,8,0,0,0,152,80h72Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,64H154.67L126.93,43.2a16.12,16.12,0,0,0-9.6-3.2H72A16,16,0,0,0,56,56V72H40A16,16,0,0,0,24,88V200a16,16,0,0,0,16,16H192.89A15.13,15.13,0,0,0,208,200.89V184h16.89A15.13,15.13,0,0,0,240,168.89V80A16,16,0,0,0,224,64Zm0,104H208V112a16,16,0,0,0-16-16H122.67L94.93,75.2a16.12,16.12,0,0,0-9.6-3.2H72V56h45.33L147.2,78.4A8,8,0,0,0,152,80h72Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,66H154L125.73,44.8a14,14,0,0,0-8.4-2.8H72A14,14,0,0,0,58,56V74H40A14,14,0,0,0,26,88V200a14,14,0,0,0,14,14H192.89A13.12,13.12,0,0,0,206,200.89V182h18.89A13.12,13.12,0,0,0,238,168.89V80A14,14,0,0,0,224,66ZM194,200.89a1.11,1.11,0,0,1-1.11,1.11H40a2,2,0,0,1-2-2V88a2,2,0,0,1,2-2H85.33a2,2,0,0,1,1.2.4l29.87,22.4A6,6,0,0,0,120,110h72a2,2,0,0,1,2,2Zm32-32a1.11,1.11,0,0,1-1.11,1.11H206V112a14,14,0,0,0-14-14H122L93.73,76.8a14,14,0,0,0-8.4-2.8H70V56a2,2,0,0,1,2-2h45.33a2,2,0,0,1,1.2.4L148.4,76.8A6,6,0,0,0,152,78h72a2,2,0,0,1,2,2Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,64H154.67L126.93,43.2a16.12,16.12,0,0,0-9.6-3.2H72A16,16,0,0,0,56,56V72H40A16,16,0,0,0,24,88V200a16,16,0,0,0,16,16H192.89A15.13,15.13,0,0,0,208,200.89V184h16.89A15.13,15.13,0,0,0,240,168.89V80A16,16,0,0,0,224,64ZM192,200H40V88H85.33l29.87,22.4A8,8,0,0,0,120,112h72Zm32-32H208V112a16,16,0,0,0-16-16H122.67L94.93,75.2a16.12,16.12,0,0,0-9.6-3.2H72V56h45.33L147.2,78.4A8,8,0,0,0,152,80h72Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,68H153.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H72A12,12,0,0,0,60,56V76H40A12,12,0,0,0,28,88V200a12,12,0,0,0,12,12H192.89A11.12,11.12,0,0,0,204,200.89V180h20.89A11.12,11.12,0,0,0,236,168.89V80A12,12,0,0,0,224,68ZM196,200.89a3.12,3.12,0,0,1-3.11,3.11H40a4,4,0,0,1-4-4V88a4,4,0,0,1,4-4H85.33a4,4,0,0,1,2.4.8l29.87,22.4a4,4,0,0,0,2.4.8h72a4,4,0,0,1,4,4Zm32-32a3.12,3.12,0,0,1-3.11,3.11H204V112a12,12,0,0,0-12-12H121.33L92.53,78.4a12.05,12.05,0,0,0-7.2-2.4H68V56a4,4,0,0,1,4-4h45.33a4,4,0,0,1,2.4.8L149.6,75.2a4,4,0,0,0,2.4.8h72a4,4,0,0,1,4,4Z`}))]]),qA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm113.86-49.57A12,12,0,0,0,236,98.34L208.21,82.49l-.11-31.31a12,12,0,0,0-4.25-9.12,116,116,0,0,0-38-21.41,12,12,0,0,0-9.68.89L128,37.27,99.83,21.53a12,12,0,0,0-9.7-.9,116.06,116.06,0,0,0-38,21.47,12,12,0,0,0-4.24,9.1l-.14,31.34L20,98.35a12,12,0,0,0-5.85,8.11,110.7,110.7,0,0,0,0,43.11A12,12,0,0,0,20,157.66l27.82,15.85.11,31.31a12,12,0,0,0,4.25,9.12,116,116,0,0,0,38,21.41,12,12,0,0,0,9.68-.89L128,218.73l28.14,15.74a12,12,0,0,0,9.7.9,116.06,116.06,0,0,0,38-21.47,12,12,0,0,0,4.24-9.1l.14-31.34,27.81-15.81a12,12,0,0,0,5.85-8.11A110.7,110.7,0,0,0,241.86,106.43Zm-22.63,33.18-26.88,15.28a11.94,11.94,0,0,0-4.55,4.59c-.54,1-1.11,1.93-1.7,2.88a12,12,0,0,0-1.83,6.31L184.13,199a91.83,91.83,0,0,1-21.07,11.87l-27.15-15.19a12,12,0,0,0-5.86-1.53h-.29c-1.14,0-2.3,0-3.44,0a12.08,12.08,0,0,0-6.14,1.51L93,210.82A92.27,92.27,0,0,1,71.88,199l-.11-30.24a12,12,0,0,0-1.83-6.32c-.58-.94-1.16-1.91-1.7-2.88A11.92,11.92,0,0,0,63.7,155L36.8,139.63a86.53,86.53,0,0,1,0-23.24l26.88-15.28a12,12,0,0,0,4.55-4.58c.54-1,1.11-1.94,1.7-2.89a12,12,0,0,0,1.83-6.31L71.87,57A91.83,91.83,0,0,1,92.94,45.17l27.15,15.19a11.92,11.92,0,0,0,6.15,1.52c1.14,0,2.3,0,3.44,0a12.08,12.08,0,0,0,6.14-1.51L163,45.18A92.27,92.27,0,0,1,184.12,57l.11,30.24a12,12,0,0,0,1.83,6.32c.58.94,1.16,1.91,1.7,2.88A11.92,11.92,0,0,0,192.3,101l26.9,15.33A86.53,86.53,0,0,1,219.23,139.61Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M230.1,108.76,198.25,90.62c-.64-1.16-1.31-2.29-2-3.41l-.12-36A104.61,104.61,0,0,0,162,32L130,49.89c-1.34,0-2.69,0-4,0L94,32A104.58,104.58,0,0,0,59.89,51.25l-.16,36c-.7,1.12-1.37,2.26-2,3.41l-31.84,18.1a99.15,99.15,0,0,0,0,38.46l31.85,18.14c.64,1.16,1.31,2.29,2,3.41l.12,36A104.61,104.61,0,0,0,94,224l32-17.87c1.34,0,2.69,0,4,0L162,224a104.58,104.58,0,0,0,34.08-19.25l.16-36c.7-1.12,1.37-2.26,2-3.41l31.84-18.1A99.15,99.15,0,0,0,230.1,108.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm109.94-52.79a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A111.92,111.92,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.63a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21Zm-15,34.91-28.57,16.25a8,8,0,0,0-3,3c-.58,1-1.19,2.06-1.81,3.06a7.94,7.94,0,0,0-1.22,4.21l-.15,32.25a95.89,95.89,0,0,1-25.37,14.3L134,199.13a8,8,0,0,0-3.91-1h-.19c-1.21,0-2.43,0-3.64,0a8.1,8.1,0,0,0-4.1,1l-28.84,16.1A96,96,0,0,1,67.88,201l-.11-32.2a8,8,0,0,0-1.22-4.22c-.62-1-1.23-2-1.8-3.06a8.09,8.09,0,0,0-3-3.06l-28.6-16.29a90.49,90.49,0,0,1,0-28.26L61.67,97.63a8,8,0,0,0,3-3c.58-1,1.19-2.06,1.81-3.06a7.94,7.94,0,0,0,1.22-4.21l.15-32.25a95.89,95.89,0,0,1,25.37-14.3L122,56.87a8,8,0,0,0,4.1,1c1.21,0,2.43,0,3.64,0a8,8,0,0,0,4.1-1l28.84-16.1A96,96,0,0,1,188.12,55l.11,32.2a8,8,0,0,0,1.22,4.22c.62,1,1.23,2,1.8,3.06a8.09,8.09,0,0,0,3,3.06l28.6,16.29A90.49,90.49,0,0,1,222.9,142.12Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M237.94,107.21a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A111.92,111.92,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.63a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Zm108-54.4a6,6,0,0,0-2.92-4L202.64,86.22l-.42-.71L202.1,51.2A6,6,0,0,0,200,46.64a110.12,110.12,0,0,0-36.07-20.31,6,6,0,0,0-4.84.45L128.46,43.86h-1L96.91,26.76a6,6,0,0,0-4.86-.44A109.92,109.92,0,0,0,56,46.68a6,6,0,0,0-2.12,4.55l-.16,34.34c-.14.23-.28.47-.41.71L22.91,103.57A6,6,0,0,0,20,107.62a104.81,104.81,0,0,0,0,40.78,6,6,0,0,0,2.92,4l30.42,17.33.42.71.12,34.31A6,6,0,0,0,56,209.36a110.12,110.12,0,0,0,36.07,20.31,6,6,0,0,0,4.84-.45l30.61-17.08h1l30.56,17.1A6.09,6.09,0,0,0,162,230a5.83,5.83,0,0,0,1.93-.32,109.92,109.92,0,0,0,36-20.36,6,6,0,0,0,2.12-4.55l.16-34.34c.14-.23.28-.47.41-.71l30.42-17.29a6,6,0,0,0,2.92-4.05A104.81,104.81,0,0,0,236,107.6Zm-11.25,35.79L195.32,160.1a6.07,6.07,0,0,0-2.28,2.3c-.59,1-1.21,2.11-1.86,3.14a6,6,0,0,0-.91,3.16l-.16,33.21a98.15,98.15,0,0,1-27.52,15.53L133,200.88a6,6,0,0,0-2.93-.77h-.14c-1.24,0-2.5,0-3.74,0a6,6,0,0,0-3.07.76L93.45,217.43a98,98,0,0,1-27.56-15.49l-.12-33.17a6,6,0,0,0-.91-3.16c-.64-1-1.27-2.08-1.86-3.14a6,6,0,0,0-2.27-2.3L31.3,143.4a93,93,0,0,1,0-30.79L60.68,95.9A6.07,6.07,0,0,0,63,93.6c.59-1,1.21-2.11,1.86-3.14a6,6,0,0,0,.91-3.16l.16-33.21A98.15,98.15,0,0,1,93.41,38.56L123,55.12a5.81,5.81,0,0,0,3.07.76c1.24,0,2.5,0,3.74,0a6,6,0,0,0,3.07-.76l29.65-16.56a98,98,0,0,1,27.56,15.49l.12,33.17a6,6,0,0,0,.91,3.16c.64,1,1.27,2.08,1.86,3.14a6,6,0,0,0,2.27,2.3L224.7,112.6A93,93,0,0,1,224.73,143.39Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm109.94-52.79a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A112.1,112.1,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.62a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21Zm-15,34.91-28.57,16.25a8,8,0,0,0-3,3c-.58,1-1.19,2.06-1.81,3.06a7.94,7.94,0,0,0-1.22,4.21l-.15,32.25a95.89,95.89,0,0,1-25.37,14.3L134,199.13a8,8,0,0,0-3.91-1h-.19c-1.21,0-2.43,0-3.64,0a8.08,8.08,0,0,0-4.1,1l-28.84,16.1A96,96,0,0,1,67.88,201l-.11-32.2a8,8,0,0,0-1.22-4.22c-.62-1-1.23-2-1.8-3.06a8.09,8.09,0,0,0-3-3.06l-28.6-16.29a90.49,90.49,0,0,1,0-28.26L61.67,97.63a8,8,0,0,0,3-3c.58-1,1.19-2.06,1.81-3.06a7.94,7.94,0,0,0,1.22-4.21l.15-32.25a95.89,95.89,0,0,1,25.37-14.3L122,56.87a8,8,0,0,0,4.1,1c1.21,0,2.43,0,3.64,0a8.08,8.08,0,0,0,4.1-1l28.84-16.1A96,96,0,0,1,188.12,55l.11,32.2a8,8,0,0,0,1.22,4.22c.62,1,1.23,2,1.8,3.06a8.09,8.09,0,0,0,3,3.06l28.6,16.29A90.49,90.49,0,0,1,222.9,142.12Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm106-56a4,4,0,0,0-2-2.7l-30.89-17.6q-.47-.82-1-1.62L200.1,51.2a3.94,3.94,0,0,0-1.42-3,107.8,107.8,0,0,0-35.41-19.94,4,4,0,0,0-3.23.29L129,45.87h-2l-31-17.36a4,4,0,0,0-3.23-.3,108.05,108.05,0,0,0-35.39,20,4,4,0,0,0-1.41,3l-.16,34.9-1,1.62L23.9,105.3A4,4,0,0,0,22,108a102.76,102.76,0,0,0,0,40,4,4,0,0,0,1.95,2.7l30.89,17.6q.47.83,1,1.62l.12,34.87a3.94,3.94,0,0,0,1.42,3,107.8,107.8,0,0,0,35.41,19.94,4,4,0,0,0,3.23-.29L127,210.13h2l31,17.36a4,4,0,0,0,3.23.3,108.05,108.05,0,0,0,35.39-20,4,4,0,0,0,1.41-3l.16-34.9,1-1.62L232.1,150.7a4,4,0,0,0,2-2.71A102.76,102.76,0,0,0,234,108Zm-7.48,36.67L196.3,161.84a4,4,0,0,0-1.51,1.53c-.61,1.09-1.25,2.17-1.91,3.24a3.92,3.92,0,0,0-.61,2.1l-.16,34.15a99.8,99.8,0,0,1-29.7,16.77l-30.4-17a4.06,4.06,0,0,0-2-.51H130c-1.28,0-2.57,0-3.84,0a4.1,4.1,0,0,0-2.05.51l-30.45,17A100.23,100.23,0,0,1,63.89,202.9l-.12-34.12a3.93,3.93,0,0,0-.61-2.11c-.66-1-1.3-2.14-1.91-3.23a4,4,0,0,0-1.51-1.53L29.49,144.68a94.78,94.78,0,0,1,0-33.34L59.7,94.16a4,4,0,0,0,1.51-1.53c.61-1.09,1.25-2.17,1.91-3.23a4,4,0,0,0,.61-2.11l.16-34.15a99.8,99.8,0,0,1,29.7-16.77l30.4,17a4.1,4.1,0,0,0,2.05.51c1.28,0,2.57,0,3.84,0a4,4,0,0,0,2.05-.51l30.45-17A100.23,100.23,0,0,1,192.11,53.1l.12,34.12a3.93,3.93,0,0,0,.61,2.11c.66,1,1.3,2.14,1.91,3.23a4,4,0,0,0,1.51,1.53l30.25,17.23A94.78,94.78,0,0,1,226.54,144.66Z`}))]]),JA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M236,64a36,36,0,1,0-48,33.94V112a4,4,0,0,1-4,4H96a27.8,27.8,0,0,0-4,.29V97.94a36,36,0,1,0-24,0v60.12a36,36,0,1,0,24,0V144a4,4,0,0,1,4-4h88a28,28,0,0,0,28-28V97.94A36.07,36.07,0,0,0,236,64ZM80,52A12,12,0,1,1,68,64,12,12,0,0,1,80,52Zm0,152a12,12,0,1,1,12-12A12,12,0,0,1,80,204ZM200,76a12,12,0,1,1,12-12A12,12,0,0,1,200,76Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,64a24,24,0,1,1-24-24A24,24,0,0,1,224,64Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M232,64a32,32,0,1,0-40,31v17a8,8,0,0,1-8,8H96a23.84,23.84,0,0,0-8,1.38V95a32,32,0,1,0-16,0v66a32,32,0,1,0,16,0V144a8,8,0,0,1,8-8h88a24,24,0,0,0,24-24V95A32.06,32.06,0,0,0,232,64ZM64,64A16,16,0,1,1,80,80,16,16,0,0,1,64,64ZM96,192a16,16,0,1,1-16-16A16,16,0,0,1,96,192ZM200,80a16,16,0,1,1,16-16A16,16,0,0,1,200,80Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M232,64a32,32,0,1,0-40,31v17a8,8,0,0,1-8,8H96a23.84,23.84,0,0,0-8,1.38V95a32,32,0,1,0-16,0v66a32,32,0,1,0,16,0V144a8,8,0,0,1,8-8h88a24,24,0,0,0,24-24V95A32.06,32.06,0,0,0,232,64ZM64,64A16,16,0,1,1,80,80,16,16,0,0,1,64,64ZM96,192a16,16,0,1,1-16-16A16,16,0,0,1,96,192Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M230,64a30,30,0,1,0-36,29.4V112a10,10,0,0,1-10,10H96a21.84,21.84,0,0,0-10,2.42v-31a30,30,0,1,0-12,0v69.2a30,30,0,1,0,12,0V144a10,10,0,0,1,10-10h88a22,22,0,0,0,22-22V93.4A30.05,30.05,0,0,0,230,64ZM62,64A18,18,0,1,1,80,82,18,18,0,0,1,62,64ZM98,192a18,18,0,1,1-18-18A18,18,0,0,1,98,192ZM200,82a18,18,0,1,1,18-18A18,18,0,0,1,200,82Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M232,64a32,32,0,1,0-40,31v17a8,8,0,0,1-8,8H96a23.84,23.84,0,0,0-8,1.38V95a32,32,0,1,0-16,0v66a32,32,0,1,0,16,0V144a8,8,0,0,1,8-8h88a24,24,0,0,0,24-24V95A32.06,32.06,0,0,0,232,64ZM64,64A16,16,0,1,1,80,80,16,16,0,0,1,64,64ZM96,192a16,16,0,1,1-16-16A16,16,0,0,1,96,192ZM200,80a16,16,0,1,1,16-16A16,16,0,0,1,200,80Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228,64a28,28,0,1,0-32,27.71V112a12,12,0,0,1-12,12H96a19.91,19.91,0,0,0-12,4V91.71a28,28,0,1,0-8,0v72.58a28,28,0,1,0,8,0V144a12,12,0,0,1,12-12h88a20,20,0,0,0,20-20V91.71A28,28,0,0,0,228,64ZM60,64A20,20,0,1,1,80,84,20,20,0,0,1,60,64Zm40,128a20,20,0,1,1-20-20A20,20,0,0,1,100,192ZM200,84a20,20,0,1,1,20-20A20,20,0,0,1,200,84Z`}))]]),YA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M112,148a12,12,0,0,0-12,12v19L69.17,148.2A4,4,0,0,1,68,145.37V97.94a36,36,0,1,0-24,0v47.43a27.81,27.81,0,0,0,8.2,19.8L83,196H64a12,12,0,0,0,0,24h48a12,12,0,0,0,12-12V160A12,12,0,0,0,112,148ZM56,52A12,12,0,1,1,44,64,12,12,0,0,1,56,52ZM212,158.06V110.63a27.81,27.81,0,0,0-8.2-19.8L173,60h19a12,12,0,0,0,0-24H144a12,12,0,0,0-12,12V96a12,12,0,0,0,24,0V77l30.83,30.83a4,4,0,0,1,1.17,2.83v47.43a36,36,0,1,0,24,0ZM200,204a12,12,0,1,1,12-12A12,12,0,0,1,200,204Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M80,64A24,24,0,1,1,56,40,24,24,0,0,1,80,64ZM200,168a24,24,0,1,0,24,24A24,24,0,0,0,200,168Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M112,152a8,8,0,0,0-8,8v28.69L66.34,151A8,8,0,0,1,64,145.37V95a32,32,0,1,0-16,0v50.38a23.85,23.85,0,0,0,7,17L92.69,200H64a8,8,0,0,0,0,16h48a8,8,0,0,0,8-8V160A8,8,0,0,0,112,152ZM40,64A16,16,0,1,1,56,80,16,16,0,0,1,40,64Zm168,97V110.63a23.85,23.85,0,0,0-7-17L163.31,56H192a8,8,0,0,0,0-16H144a8,8,0,0,0-8,8V96a8,8,0,0,0,16,0V67.31L189.66,105a8,8,0,0,1,2.34,5.66V161a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,200,208Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M118.18,213.08c-.11.14-.24.27-.36.4l-.16.18-.17.15a4.83,4.83,0,0,1-.42.37,3.92,3.92,0,0,1-.32.25l-.3.22-.38.23a2.91,2.91,0,0,1-.3.17l-.37.19-.34.15-.36.13a2.84,2.84,0,0,1-.38.13l-.36.1c-.14,0-.26.07-.4.09l-.42.07-.35.05a7,7,0,0,1-.79,0H64a8,8,0,0,1,0-16H92.69L55,162.34a23.85,23.85,0,0,1-7-17V95a32,32,0,1,1,16,0v50.38A8,8,0,0,0,66.34,151L104,188.69V160a8,8,0,0,1,16,0v48a7,7,0,0,1,0,.8c0,.11,0,.21,0,.32s0,.3-.07.46a2.83,2.83,0,0,1-.09.37c0,.13-.06.26-.1.39s-.08.23-.12.35l-.14.39-.15.31c-.06.13-.12.27-.19.4s-.11.18-.16.28l-.24.39-.21.28ZM208,161V110.63a23.85,23.85,0,0,0-7-17L163.31,56H192a8,8,0,0,0,0-16H143.82l-.6,0c-.14,0-.28,0-.41.06l-.37,0-.43.11-.33.08-.4.14-.34.13-.35.16-.36.18a3.14,3.14,0,0,0-.31.18c-.12.07-.25.14-.36.22a3.55,3.55,0,0,0-.31.23,3.81,3.81,0,0,0-.32.24c-.15.12-.28.24-.42.37l-.17.15-.16.18c-.12.13-.25.26-.36.4l-.26.35-.21.28-.24.39c-.05.1-.11.19-.16.28s-.13.27-.19.4l-.15.31-.14.39c0,.12-.09.23-.12.35s-.07.26-.1.39a2.83,2.83,0,0,0-.09.37c0,.16,0,.31-.07.46s0,.21-.05.32a7,7,0,0,0,0,.8V96a8,8,0,0,0,16,0V67.31L189.66,105a8,8,0,0,1,2.34,5.66V161a32,32,0,1,0,16,0Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M112,154a6,6,0,0,0-6,6v33.52L64.93,152.44A9.93,9.93,0,0,1,62,145.37v-52a30,30,0,1,0-12,0v52a21.88,21.88,0,0,0,6.44,15.56L97.52,202H64a6,6,0,0,0,0,12h48a6,6,0,0,0,6-6V160A6,6,0,0,0,112,154ZM38,64A18,18,0,1,1,56,82,18,18,0,0,1,38,64Zm168,98.6v-52a21.88,21.88,0,0,0-6.44-15.56L158.48,54H192a6,6,0,0,0,0-12H144a6,6,0,0,0-6,6V96a6,6,0,0,0,12,0V62.48l41.07,41.08a9.93,9.93,0,0,1,2.93,7.07v52a30,30,0,1,0,12,0ZM200,210a18,18,0,1,1,18-18A18,18,0,0,1,200,210Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M112,152a8,8,0,0,0-8,8v28.69L66.34,151A8,8,0,0,1,64,145.37V95a32,32,0,1,0-16,0v50.38a23.85,23.85,0,0,0,7,17L92.69,200H64a8,8,0,0,0,0,16h48a8,8,0,0,0,8-8V160A8,8,0,0,0,112,152ZM40,64A16,16,0,1,1,56,80,16,16,0,0,1,40,64Zm168,97V110.63a23.85,23.85,0,0,0-7-17L163.31,56H192a8,8,0,0,0,0-16H144a8,8,0,0,0-8,8V96a8,8,0,0,0,16,0V67.31L189.66,105a8,8,0,0,1,2.34,5.66V161a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,200,208Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M112,156a4,4,0,0,0-4,4v38.34L63.51,153.86A12,12,0,0,1,60,145.37V91.71a28,28,0,1,0-8,0v53.66a19.85,19.85,0,0,0,5.86,14.14L102.34,204H64a4,4,0,0,0,0,8h48a4,4,0,0,0,4-4V160A4,4,0,0,0,112,156ZM36,64A20,20,0,1,1,56,84,20,20,0,0,1,36,64ZM204,164.29V110.63a19.85,19.85,0,0,0-5.86-14.14L153.66,52H192a4,4,0,0,0,0-8H144a4,4,0,0,0-4,4V96a4,4,0,0,0,8,0V57.66l44.49,44.48a12,12,0,0,1,3.51,8.49v53.66a28,28,0,1,0,8,0ZM200,212a20,20,0,1,1,20-20A20,20,0,0,1,200,212Z`}))]]),XA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),ZA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H72a8,8,0,0,1,0-16H184a8,8,0,0,1,0,16Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128Z`}))]]),QA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z`}))]]),$A=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm52-84a12,12,0,0,1-12,12H140v28a12,12,0,0,1-24,0V140H88a12,12,0,0,1,0-24h28V88a12,12,0,0,1,24,0v28h28A12,12,0,0,1,180,128Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32A8,8,0,0,1,176,128Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.13,104.13,0,0,0,128,24Zm40,112H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32a8,8,0,0,1,0,16Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm46-90a6,6,0,0,1-6,6H134v34a6,6,0,0,1-12,0V134H88a6,6,0,0,1,0-12h34V88a6,6,0,0,1,12,0v34h34A6,6,0,0,1,174,128Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32A8,8,0,0,1,176,128Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm44-92a4,4,0,0,1-4,4H132v36a4,4,0,0,1-8,0V132H88a4,4,0,0,1,0-8h36V88a4,4,0,0,1,8,0v36h36A4,4,0,0,1,172,128Z`}))]]),ej=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,136H48a20,20,0,0,0-20,20v36a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V156A20,20,0,0,0,208,136Zm-4,52H52V160H204Zm4-144H48A20,20,0,0,0,28,64v36a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm-4,52H52V68H204Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,152v40a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8H208A8,8,0,0,1,216,152Zm-8-96H48a8,8,0,0,0-8,8v40a8,8,0,0,0,8,8H208a8,8,0,0,0,8-8V64A8,8,0,0,0,208,56Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M208,136H48a16,16,0,0,0-16,16v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V152A16,16,0,0,0,208,136Zm0,56H48V152H208v40Zm0-144H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Zm0,56H48V64H208v40Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,152v40a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V152a16,16,0,0,1,16-16H208A16,16,0,0,1,224,152ZM208,48H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,138H48a14,14,0,0,0-14,14v40a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V152A14,14,0,0,0,208,138Zm2,54a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2ZM208,50H48A14,14,0,0,0,34,64v40a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V64A14,14,0,0,0,208,50Zm2,54a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,136H48a16,16,0,0,0-16,16v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V152A16,16,0,0,0,208,136Zm0,56H48V152H208v40Zm0-144H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Zm0,56H48V64H208v40Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,140H48a12,12,0,0,0-12,12v40a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V152A12,12,0,0,0,208,140Zm4,52a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4ZM208,52H48A12,12,0,0,0,36,64v40a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V64A12,12,0,0,0,208,52Zm4,52a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z`}))]]),tj=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60H76V196H44ZM212,196H100V60H212Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M88,48V208H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H88V56H216V200Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM38,200V56a2,2,0,0,1,2-2H82V202H40A2,2,0,0,1,38,200Zm180,0a2,2,0,0,1-2,2H94V54H216a2,2,0,0,1,2,2Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM36,200V56a4,4,0,0,1,4-4H84V204H40A4,4,0,0,1,36,200Zm184,0a4,4,0,0,1-4,4H92V52H216a4,4,0,0,1,4,4Z`}))]]),nj=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M40,92H70.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24H137.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24Zm64-24A12,12,0,1,1,92,80,12,12,0,0,1,104,68Zm112,96H201.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24h94.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24Zm-48,24a12,12,0,1,1,12-12A12,12,0,0,1,168,188Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,80a24,24,0,1,1-24-24A24,24,0,0,1,128,80Zm40,72a24,24,0,1,0,24,24A24,24,0,0,0,168,152Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M32,80a8,8,0,0,1,8-8H77.17a28,28,0,0,1,53.66,0H216a8,8,0,0,1,0,16H130.83a28,28,0,0,1-53.66,0H40A8,8,0,0,1,32,80Zm184,88H194.83a28,28,0,0,0-53.66,0H40a8,8,0,0,0,0,16H141.17a28,28,0,0,0,53.66,0H216a8,8,0,0,0,0-16Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M40,86H74.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12H133.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12Zm64-24A18,18,0,1,1,86,80,18,18,0,0,1,104,62ZM216,170H197.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12h98.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12Zm-48,24a18,18,0,1,1,18-18A18,18,0,0,1,168,194Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M40,84H76.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8H131.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8Zm64-24A20,20,0,1,1,84,80,20,20,0,0,1,104,60ZM216,172H195.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8H140.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8Zm-48,24a20,20,0,1,1,20-20A20,20,0,0,1,168,196Z`}))]]),rj=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z`}))]]),ij=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M168.49,104.49,145,128l23.52,23.51a12,12,0,0,1-17,17L128,145l-23.51,23.52a12,12,0,0,1-17-17L111,128,87.51,104.49a12,12,0,0,1,17-17L128,111l23.51-23.52a12,12,0,0,1,17,17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,130.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M164.24,100.24,136.48,128l27.76,27.76a6,6,0,1,1-8.48,8.48L128,136.48l-27.76,27.76a6,6,0,0,1-8.48-8.48L119.52,128,91.76,100.24a6,6,0,0,1,8.48-8.48L128,119.52l27.76-27.76a6,6,0,0,1,8.48,8.48ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M162.83,98.83,133.66,128l29.17,29.17a4,4,0,0,1-5.66,5.66L128,133.66,98.83,162.83a4,4,0,0,1-5.66-5.66L122.34,128,93.17,98.83a4,4,0,0,1,5.66-5.66L128,122.34l29.17-29.17a4,4,0,1,1,5.66,5.66ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]]),aj=(0,b.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),oj=b.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=b.useContext(aj);return b.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&b.createElement(`title`,null,n),s,c.get(a??f))});oj.displayName=`IconBase`;var sj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:jA}));sj.displayName=`ArrowCounterClockwiseIcon`;var cj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:MA}));cj.displayName=`ArrowElbowDownLeftIcon`;var lj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:NA}));lj.displayName=`ArrowRightIcon`;var uj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:PA}));uj.displayName=`ArrowsClockwiseIcon`;var dj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:FA}));dj.displayName=`ArrowsInLineVerticalIcon`;var fj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:IA}));fj.displayName=`ArrowsOutLineVerticalIcon`;var pj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:LA}));pj.displayName=`CaretDownIcon`;var mj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:RA}));mj.displayName=`CaretRightIcon`;var hj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:zA}));hj.displayName=`CaretUpDownIcon`;var gj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:BA}));gj.displayName=`CheckIcon`;var _j=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:VA}));_j.displayName=`CheckCircleIcon`;var vj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:HA}));vj.displayName=`ColumnsIcon`;var yj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:UA}));yj.displayName=`CopyIcon`;var bj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:WA}));bj.displayName=`FileCodeIcon`;var xj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:GA}));xj.displayName=`FolderOpenIcon`;var Sj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:KA}));Sj.displayName=`FoldersIcon`;var Cj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:qA}));Cj.displayName=`GearSixIcon`;var wj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:JA}));wj.displayName=`GitBranchIcon`;var Tj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:YA}));Tj.displayName=`GitDiffIcon`;var Ej=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:XA}));Ej.displayName=`MagnifyingGlassIcon`;var Dj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:ZA}));Dj.displayName=`MinusIcon`;var Oj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:QA}));Oj.displayName=`PlusIcon`;var kj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:$A}));kj.displayName=`PlusCircleIcon`;var Aj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:ej}));Aj.displayName=`RowsIcon`;var jj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:tj}));jj.displayName=`SidebarSimpleIcon`;var Mj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:nj}));Mj.displayName=`SlidersHorizontalIcon`;var Nj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:rj}));Nj.displayName=`WarningCircleIcon`;var Pj=b.forwardRef((e,t)=>b.createElement(oj,{ref:t,...e,weights:ij}));Pj.displayName=`XCircleIcon`;function Fj(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=jc({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=Ro(a,!0,!0),u=Js(),[d,f]=b.useState(),p=d===null?void 0:d??u,m=X(e=>{let t=!a,n=J(kt,e.nativeEvent);r(t,n),!n.isCanceled&&o(t)});return b.useMemo(()=>({defaultPanelId:u,disabled:i,handleTrigger:m,mounted:s,open:a,panelId:p,setMounted:c,setOpen:o,setPanelIdState:f,transitionStatus:l}),[u,i,m,s,a,p,c,o,f,l])}var Ij=b.createContext(void 0);function Lj(){let e=b.useContext(Ij);if(e===void 0)throw Error(F(15));return e}var Rj=`data-open`,zj=`data-closed`,Bj=Xe,Vj=`data-panel-open`,Hj={[Rj]:``},Uj={[zj]:``},Wj={open(e){return e?{[Vj]:``}:null}},Gj={open(e){return e?Hj:Uj},...et},Kj=b.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c,...l}=e,u=X(o),d=Fj({open:s,defaultOpen:i,onOpenChange:u,disabled:a}),f=b.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),p=b.useMemo(()=>({...d,onOpenChange:u,state:f}),[d,u,f]),m=Di(`div`,e,{state:f,ref:t,props:l,stateAttributesMapping:Gj});return(0,Y.jsx)(Ij.Provider,{value:p,children:m})}),qj={...Wj,...et},Jj=b.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=Lj(),{className:s,disabled:c=o,render:l,nativeButton:u=!0,style:d,...f}=e,{getButtonProps:p,buttonRef:m}=hl({disabled:c,focusableWhenDisabled:!0,native:u});return Di(`button`,e,{state:a,ref:[t,m],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},f,p],stateAttributesMapping:qj})}),Yj={height:void 0,width:void 0};function Xj(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:o,open:s,setMounted:c,setOpen:l,transitionStatus:u}=e,d=b.useRef(null),f=b.useRef(null),[p,m]=b.useState(Yj),h=b.useRef(Yj),g=b.useRef(!1),_=b.useRef(s),v=b.useRef(!1),[y,x]=b.useState(!1),S=b.useRef(null),C=ln(t,d),w=hn(s),T=Vo(d),E=!s&&!a,D=y?`idle`:u,O=s&&(_.current||v.current),k=!s&&a&&f.current===`css-animation`&&p.height===void 0&&p.width===void 0?h.current:p,A=n&&E&&f.current!==`css-animation`,j=X((e,t=!0)=>{t&&(h.current=e),m(e)}),M=X(()=>{S.current?.(),S.current=null}),P=X(e=>{M(),S.current=()=>{S.current=null,e()}}),F=X(()=>{s&&a&&f.current===`css-animation`&&(v.current=!0)});N(()=>{y&&u!==`starting`&&x(!1)},[y,u]),b.useEffect(()=>()=>{F(),M()},[F,M]),N(()=>{let e=d.current;if(!e)return;!s&&S.current&&M();let t=Qj(e,O);if(f.current=t,s&&u===`idle`&&_.current&&t===`css-animation`){h.current=Zj(e);return}if(s&&u===`starting`){let n=g.current;if(g.current=!1,t===`none`){j(Zj(e)),x(!0);return}if(t===`css-transition`){let t=tM(e);if(j(Zj(e)),!n)return t;let r=eM(e,`transition-duration`,`0s`);return P(r),x(!0),t}j(Zj(e));let r=eM(e,`animation-name`,`none`);if(!n){r();return}let i=eM(e,`animation-duration`,`0s`);r(),P(i),x(!0);return}if(!s&&a&&(u===`idle`||u===`starting`)){if(_.current=!1,v.current=!1,t===`none`){j(Yj,!1),c(!1);return}j(Zj(e));return}if(u!==`ending`)return;if(t===`none`){c(!1);return}let n=Zj(e);if(!(n.height>0||n.width>0)){c(!1);return}j(n),t===`css-animation`&&eM(e,`animation-name`,`none`)()},[a,s,M,j,c,P,O,u]),Ho({enabled:s&&a&&D===`idle`,open:!0,ref:d,onComplete(){s&&j(Yj,!1)}}),b.useEffect(()=>{if(s||!a||D!==`ending`||!d.current)return;let e=new AbortController,t=-1;function n(){w.current||(c(!1),j(Yj,!1))}return t=wn.request(()=>{T(n,e.signal)}),()=>{wn.cancel(t),e.abort()}},[w,a,s,D,T,j,c]),N(()=>{let e=d.current;e&&n&&E&&e.setAttribute(`hidden`,`until-found`)},[E,n]),b.useEffect(function(){let e=d.current;if(!e)return;function t(e){let t=J(Ot,e);o(!0,t),!t.isCanceled&&(g.current=!0,l(!0))}return sn(e,`beforematch`,t)},[o,l]);let I=i||n||a||s;return{height:k.height,props:{...A?{[Bj]:``}:void 0,hidden:E,id:r},ref:C,shouldPreventOpenAnimation:O,shouldRender:I,transitionStatus:D,width:k.width}}function Zj(e){return{height:e.scrollHeight,width:e.scrollWidth}}function Qj(e,t){let n=ye(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&$j(n.animationDuration),i=$j(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function $j(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function eM(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===``){e.style.removeProperty(t);return}e.style.setProperty(t,r,i)}}function tM(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{if(n===``){e.style.removeProperty(t);return}e.style.setProperty(t,n)})}let r=wn.request(n);return()=>{wn.cancel(r),n()}}var nM=`--collapsible-panel-height`,rM=`--collapsible-panel-width`,iM=b.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s,...c}=e,{defaultPanelId:l,mounted:u,onOpenChange:d,open:f,setMounted:p,setPanelIdState:m,setOpen:h,state:g,transitionStatus:_}=Lj(),v=r??!1,y=i??!1,b=o||void 0,x=b??l;N(()=>(m(e=>b??(e===null?void 0:e)),()=>{m(e=>e===b?null:e)}),[b,m]);let{height:S,props:C,ref:w,shouldPreventOpenAnimation:T,shouldRender:E,transitionStatus:D,width:O}=Xj({externalRef:t,hiddenUntilFound:v,id:x,keepMounted:y,mounted:u,onOpenChange:d,open:f,setMounted:p,setOpen:h,transitionStatus:_}),k={...g,transitionStatus:D},A=di(s,k),j=Di(`div`,{...e,style:void 0},{state:k,ref:w,props:[C,{style:{[nM]:S===void 0?`auto`:`${S}px`,[rM]:O===void 0?`auto`:`${O}px`}},c,A?{style:A}:void 0,T?{style:{animationName:`none`}}:void 0],stateAttributesMapping:Gj});return E?j:null}),aM=`data-valid`,oM=`data-invalid`,sM={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},cM={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},lM={disabled:!1,...cM},uM={valid(e){return e===null?null:e?{[aM]:``}:{[oM]:``}}},dM={invalid:void 0,name:void 0,validityData:{state:sM,errors:[],error:``,value:``,initialValue:null},setValidityData:A,disabled:void 0,setTouched:A,setDirty:A,setFilled:A,setFocused:A,validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:lM,registerFieldControl:A,validation:{getValidationProps:(e,t=M)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:A,getInputControl:()=>null,commit:async()=>{},change:A}},fM=b.createContext(dM);function pM(e=!0){let t=b.useContext(fM);if(t.setValidityData===A&&!e)throw Error(F(28));return t}var mM=b.createContext(void 0);function hM(e=!1){let t=b.useContext(mM);if(!t&&!e)throw Error(F(86));return t}var gM=b.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:A,validationMode:`onSubmit`,submitCountRef:{current:0}});function _M(){return b.useContext(gM)}var vM=b.createContext({controlId:void 0,registerControlId:A,resetControlId:A,labelId:void 0,setLabelId:A,messageIds:[],setMessageIds:A,getDescriptionProps:e=>e});function yM(){return b.useContext(vM)}function bM(e,t,n,r=!0,i){let[a,o]=b.useState(),s=Js(i?`${i}-label`:void 0),c=e??t??a;return N(()=>{let i=e||t||!r?void 0:xM(n.current,s);a!==i&&o(i)}),c}function xM(e,t){let n=SM(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function SM(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}function CM(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=yM(),o=Js(),s=S(()=>Symbol()),c=b.useRef(!1),l=b.useRef(!1),u=X(()=>{c.current&&i!==A&&(c.current=!1,i(s.current,void 0))});return N(()=>{if(!n||i===A){u();return}let e;if(t!==void 0)l.current=!0,e=t;else if(l.current)e=o;else{a();return}if(e===void 0){u();return}c.current=!0,i(s.current,e)},[t,n,i,a,o,s,u]),N(()=>u,[u]),(n?r:void 0)??t??o}function wM(e,t){let n=Js(e);return N(()=>(t(n),()=>{t(e=>e===n?void 0:e)}),[n,t]),n}function TM(e={}){let{id:t,fallbackControlId:n,native:r=!1,setLabelId:i,focusControl:a}=e,{controlId:o,setLabelId:s}=yM(),c=wM(t,X(e=>{s(e),i?.(e)})),l=o??n;function u(e){if(a){a(e,l);return}if(!l)return;let t=En(e.currentTarget).getElementById(l);Ce(t)&&EM(t)}function d(e){Ue(e.nativeEvent)?.closest(`button,input,select,textarea`)||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),!r&&u(e))}return r?{id:c,htmlFor:l,onMouseDown:d}:{id:c,onClick:d,onPointerDown(e){e.preventDefault()}}}function EM(e){e.focus({focusVisible:!0})}var DM=b.createContext({disabled:!1});function OM(){return b.useContext(DM)}function kM(e,t,n,r,i=!0,a){let{registerFieldControl:o}=pM(),s=S(()=>Symbol());N(()=>{let c=s.current;if(!i){o(c,void 0);return}o(c,{controlRef:e,getValue:r,id:t,name:a,value:n})},[e,i,r,t,a,o,s,n]),N(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var AM=b.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFocused:y,setFilled:x,validationMode:S,validation:C}=pM(),{clearErrors:w,elementRef:T,submitCountRef:E}=_M(),D=h||s,O=m??a,k={...p,disabled:D},{labelId:A}=yM(),j=CM({id:i}),[M]=jc({controlled:o,default:l,name:`FieldControl`,state:`value`}),P=o!==void 0,F=P?M:void 0,I=F==null?void 0:String(F),L=X(()=>C.inputRef.current?.value);kM(C.inputRef,j,I,L,!D,a),N(()=>{let e=I??C.inputRef.current?.value;e!==void 0&&x(e!==``)},[I,C.inputRef,x]),tu(I,()=>{I!==void 0&&(w(O),_(I!==(v.initialValue??``)),C.change(I))});let R=b.useRef(null),z=V();return N(()=>{u&&R.current===He(En(R.current))&&y(!0)},[u,y]),Di(`input`,e,{ref:[t,R],state:k,props:[{id:j,disabled:D,name:O,ref:C.inputRef,"aria-labelledby":A,autoFocus:u,...P?{value:F}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=J(Ot,e.nativeEvent);c?.(t,n),!P&&(_(t!==(v.initialValue??``)),x(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(w(O),C.change(t)))},onFocus(){y(!0)},onBlur(e){if(g(!0),y(!1),S===`onBlur`){let t=e.currentTarget.value;C.commit(t),P&&queueMicrotask(()=>{let e=C.inputRef.current?.value;e!==void 0&&e!==t&&e!==(v.initialValue??``)&&C.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===T.current&&!e.defaultPrevented){let t=e.currentTarget,n=E.current;z.start(0,()=>{E.current===n&&C.commit(t.value)})}else C.commit(t)}}},f,e=>C.getValidationProps(D,e)],stateAttributesMapping:uM})}),jM=b.forwardRef(function(e,t){return(0,Y.jsx)(AM,{ref:t,...e})}),MM=`file-tree-container`,NM=`data-file-tree-style`,PM=`data-file-tree-unsafe-css`,FM=`data-file-tree-scrollbar-measure`,IM=`data-file-tree-scrollbar-gutter-measured`,LM=`--trees-scrollbar-gutter-measured`,RM=`header`,zM=`context-menu`,BM=`context-menu-trigger`,VM=typeof window>`u`?b.useEffect:b.useLayoutEffect;function HM(e,t,n){let r=e==null?null:(0,Y.jsx)(`div`,{slot:RM,children:e}),i=t!=null&&n!=null?(0,Y.jsx)(`div`,{slot:zM,children:t(n.item,n.context)}):null;return r==null&&i==null?null:(0,Y.jsxs)(Y.Fragment,{children:[r,i]})}function UM(e,t){return typeof window>`u`&&t!=null?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t.shadowHtml}}),e]}):(0,Y.jsx)(Y.Fragment,{children:e})}function WM(e){let t=e.shadowRoot;return t?.querySelector(`[data-file-tree-id]`)instanceof HTMLElement||t?.querySelector(`[data-file-tree-id]`)instanceof SVGElement||e.querySelector(`template[shadowrootmode="open"]`)instanceof HTMLTemplateElement}function GM(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 KM({header:e,id:t,model:n,preloadedData:r,renderContextMenu:i,...a}){let[o,s]=(0,b.useState)(null),[c,l]=(0,b.useState)(null),u=(0,b.useRef)(n.getComposition()),d=(0,b.useRef)(n);d.current!==n&&(d.current=n,u.current=n.getComposition());let f=i!=null,p=(0,b.useCallback)(()=>{s(null)},[]),m=(0,b.useCallback)((e,t)=>{s({context:t,item:e})},[]),h=u.current,g=(0,b.useMemo)(()=>GM(h,e,f,p,m),[h,p,m,f,e]),_=(0,b.useCallback)(e=>{l(e)},[]);(0,b.useEffect)(()=>{f||s(null)},[f]),VM(()=>{n.setComposition(g)},[g,n]),VM(()=>{if(c!=null)return r!=null&&WM(c)?n.hydrate({fileTreeContainer:c}):n.render({fileTreeContainer:c}),()=>{n.unmount(),n.setComposition(h)}},[h,c,n,r]);let v=UM(HM(e,i,o),r),y=t??r?.id,x={"--trees-item-height":`${String(n.getItemHeight())}px`,"--trees-density-override":n.getDensityFactor(),...a.style};return(0,Y.jsx)(MM,{...a,id:y,ref:_,style:x,suppressHydrationWarning:r!=null,children:v})}var qM=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
1535
|
+
`)}function OO(e,t){let n=e.additionLineIndex,r=e.deletionLineIndex;e.hunkContent=t.hunkContent.map(e=>kO(e,n,r)),e.additionLineIndex=n+t.additionLineIndex,e.additionStart+=t.additionLineIndex,e.additionCount=t.additionCount,e.additionLines=t.additionLines,t.deletionLineIndex>=0&&(e.deletionLineIndex=r+t.deletionLineIndex,e.deletionStart+=t.deletionLineIndex),e.deletionCount=t.deletionCount,e.deletionLines=t.deletionLines,e.noEOFCRAdditions=t.noEOFCRAdditions,e.noEOFCRDeletions=t.noEOFCRDeletions,AO(e)}function kO(e,t,n){return{...e,additionLineIndex:e.additionLineIndex+t,deletionLineIndex:e.deletionLineIndex+n}}function AO(e){let t=0,n=0;for(let r of e.hunkContent)r.type===`context`?(t+=r.lines,n+=r.lines):(t+=Math.max(r.additions,r.deletions),n+=r.additions+r.deletions);e.splitLineCount=t,e.unifiedLineCount=n}function jO(e){let t=0,n=0,r=0;for(let i of e.hunks)i.collapsedBefore=Math.max(Nd(i.additionStart,i.additionCount)-r,0),i.splitLineStart=t+i.collapsedBefore,i.unifiedLineStart=n+i.collapsedBefore,AO(i),t+=i.collapsedBefore+i.splitLineCount,n+=i.collapsedBefore+i.unifiedLineCount,r=Pd(i.additionStart,i.additionCount);if(e.hunks.length>0){let r=e.hunks[e.hunks.length-1],i=Math.max(e.additionLines.length-Pd(r.additionStart,r.additionCount),0);t+=i,n+=i}e.splitLineCount=t,e.unifiedLineCount=n}var MO=new WeakMap;function NO(e){return e.length>1&&e[e.length-1]===``?e.slice(0,-1):e}function PO(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r++;let i=e.length,a=t.length;for(;i>r&&a>r&&e[i-1]===t[a-1];)i--,a--;if(r!==i||r!==a)return{start:r,deletionEnd:i,additionEnd:a}}function FO(e,t){let n=e.hunks,r=e.additionLines,i=NO(r),a=i===r?e:{...e,additionLines:i},o=GO(n,WO(a,t),e.deletionLines.length),s=JO(a,o);if(e.additionLines=i,e.hunks=s,e.editSessionDirty=!0,ik(e),xO(e,r),ZO(n,e.hunks))return{regions:o.map(e=>e.previousSpan)}}function IO(e,t,n,r){let i=Array.from(new Set(t)).filter(t=>t>=0&&t<e.additionLines.length).sort((e,t)=>e-t);if(i.length===0)return;let{hunks:a}=e,o,s=0;for(let t of i){for(;s<a.length;){let e=a[s];if(t<ek(e)+e.additionCount)break;s++}let r=a[s],i=r==null?void 0:ek(r);if(i==null||t<i||o!=null&&o!==s)return FO(e,n);o=s}if(o!=null){if(LO(e,i,o,r,n)){e.editSessionDirty=!0;return}return FO(e,n)}}function LO(e,t,n,r,i){if(r==null||i?.ignoreWhitespace===!0||i?.stripTrailingCr===!0)return!1;let a=RO(e),o=e.hunks[n];if(o.hunkContent.some(zO))return!1;for(let n of t){let t=r.get(n),i=e.additionLines[n];if(t==null||i==null||a.has(t)||a.has(i))return!1;let s=!1;for(let e of o.hunkContent)if(e.type===`change`&&e.additions===e.deletions&&n>=e.additionLineIndex&&n<e.additionLineIndex+e.additions){s=!0;break}if(!s)return!1}return!0}function RO(e){let t=MO.get(e);if(t?.lines===e.deletionLines)return t.set;let n=new Set(e.deletionLines);return MO.set(e,{lines:e.deletionLines,set:n}),n}function zO(e){return e?.type===`change`&&(e.additions===0||e.deletions===0)}function BO(e,t){let n=new Map,{regions:r}=t;for(let t=0;t<=r.length;t++){let i=r[t-1],a=r[t],o=t===0?e.get(0):i==null?void 0:e.get(i.lastIndex+1),s=a==null?void 0:e.get(a.firstIndex),c=o?.fromStart??0,l=s?.fromEnd??0;(c>0||l>0)&&n.set(t,{fromStart:c,fromEnd:l})}return n}function VO(e,t,n){let r=[];if(e.isPartial)return r;for(let[i,a]of e.hunks.entries()){let o=JC({isPartial:e.isPartial,rangeSize:a.collapsedBefore,expandedHunks:t,hunkIndex:i,collapsedContextThreshold:n});if(o.rangeSize<=n)continue;let s=tk(a),c=s-o.rangeSize;o.fromStart>0&&r.push([c,c+o.fromStart]),o.fromEnd>0&&r.push([s-o.fromEnd,s])}let i=ZC({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`captureExpansionAnchors`});if(i!=null&&i.fromStart>0&&i.rangeSize>n){let t=e.hunks[e.hunks.length-1],n=tk(t)+t.deletionCount;r.push([n,n+i.fromStart])}return r}function HO(e,t){let n=new Map;if(t.length===0)return n;let r=(e,r,i)=>{if(i<=r)return;let a=0,o=0;for(let[e,n]of t)n<=r||e>=i||(e<=r&&(a=Math.max(a,Math.min(n,i)-r)),n>=i&&(o=Math.max(o,i-Math.max(e,r))));(a>0||o>0)&&n.set(e,{fromStart:a,fromEnd:o})};for(let[t,n]of e.hunks.entries()){let e=tk(n);r(t,e-Math.max(n.collapsedBefore,0),e)}let i=e.hunks[e.hunks.length-1];return i!=null&&!e.isPartial&&e.deletionLines.length>0&&r(e.hunks.length,tk(i)+i.deletionCount,e.deletionLines.length),n}function UO(e,t){return e.editSessionDirty===!0&&(delete e.editSessionDirty,Object.assign(e,e.additionLines.length<=1&&e.additionLines.join(``)===``?pO(e,t):yO(e,t)),!0)}function WO(e,t){if(PO(e.deletionLines,e.additionLines)==null)return[];let n=uO({name:e.prevName??e.name,contents:e.deletionLines.join(``)},{name:e.name,contents:e.additionLines.join(``),lang:e.lang},t),r=[],i=0,a=0;for(let e of n.hunks){let t=e.additionCount>0?e.additionLineIndex-i:e.deletionLineIndex-a;i+=t,a+=t;for(let t of e.hunkContent){if(t.type===`context`){i+=t.lines,a+=t.lines;continue}let e=kO(t,0,0);e.additions===0&&(e.additionLineIndex=i),e.deletions===0&&(e.deletionLineIndex=a),r.push(e),i+=e.additions,a+=e.deletions}}return r}function GO(e,t,n){let r=e.map((e,t)=>{let n=tk(e);return{deletionStart:n,deletionEnd:n+e.deletionCount,blocks:[],previousSpan:{firstIndex:t,lastIndex:t}}}),i=[],a=0;for(let e of t){let t=e.deletionLineIndex,o=t+e.deletions;for(;a<r.length&&r[a].deletionEnd<t;)i.push(r[a]),a++;let s=i.length>0&&KO(t,o,i[i.length-1])?i.pop():void 0;for(;a<r.length&&r[a].deletionStart<=o;)s=qO(s,r[a]),a++;if(s==null){let c=t,l=o;if((e.deletions===0||e.additions===0)&&n>e.deletions){let e=i[i.length-1]?.deletionEnd??0,s=r[a]?.deletionStart??n;t>e?c--:o<s&&l++}s={deletionStart:c,deletionEnd:l,blocks:[],previousSpan:void 0}}s.deletionStart=Math.min(s.deletionStart,t),s.deletionEnd=Math.max(s.deletionEnd,o),s.blocks.push(e),i.push(s)}for(;a<r.length;)i.push(r[a]),a++;return i}function KO(e,t,n){return e<=n.deletionEnd&&t>=n.deletionStart}function qO(e,t){return e==null?t:(e.deletionStart=Math.min(e.deletionStart,t.deletionStart),e.deletionEnd=Math.max(e.deletionEnd,t.deletionEnd),e.blocks.push(...t.blocks),t.previousSpan!=null&&(e.previousSpan??={...t.previousSpan},e.previousSpan.firstIndex=Math.min(e.previousSpan.firstIndex,t.previousSpan.firstIndex),e.previousSpan.lastIndex=Math.max(e.previousSpan.lastIndex,t.previousSpan.lastIndex)),e)}function JO(e,t){let n=[],r=0,i=0;for(let a of t){let t=a.deletionStart-r;if(t<0)throw Error(`buildRegionHunks: overlapping old-side regions`);r+=t,i+=t;let o=i,s=[];for(let e of a.blocks){let t=e.deletionLineIndex-r,n=e.additionLineIndex-i;if(t<0||t!==n)throw Error(`buildRegionHunks: canonical block context mismatch`);XO(s,t,i,r),r+=t,i+=n,s.push({...e}),r+=e.deletions,i+=e.additions}let c=a.deletionEnd-r;if(c<0)throw Error(`buildRegionHunks: block exceeds its old-side region`);XO(s,c,i,r),r+=c,i+=c,n.push(YO(e,{additionStart:o,additionEnd:i,deletionStart:a.deletionStart,deletionEnd:a.deletionEnd},s))}if(e.deletionLines.length-r!==e.additionLines.length-i)throw Error(`buildRegionHunks: trailing context mismatch`);return n}function YO(e,t,n){let r=t.additionEnd-t.additionStart,i=t.deletionEnd-t.deletionStart,a=0,o=0;for(let e of n)e.type===`change`&&(a+=e.additions,o+=e.deletions);let s={collapsedBefore:0,additionStart:nk(t.additionStart,r),additionCount:r,additionLines:a,additionLineIndex:rk(t.additionStart,r),deletionStart:nk(t.deletionStart,i),deletionCount:i,deletionLines:o,deletionLineIndex:rk(t.deletionStart,i),hunkContent:n,hunkSpecs:`@@ -${nk(t.deletionStart,i)},${i} +${nk(t.additionStart,r)},${r} @@`,splitLineStart:0,splitLineCount:0,unifiedLineStart:0,unifiedLineCount:0,noEOFCRAdditions:!1,noEOFCRDeletions:!1};return AO(s),s}function XO(e,t,n,r){t>0&&e.push({type:`context`,lines:t,additionLineIndex:n,deletionLineIndex:r})}function ZO(e,t){if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(tk(r)!==tk(i)||r.deletionCount!==i.deletionCount||ek(r)!==ek(i)||r.additionCount!==i.additionCount||r.splitLineCount!==i.splitLineCount||!QO(r,i))return!0}return!1}function QO(e,t){let n=$O(e),r=$O(t);for(;;){let e=n.next(),t=r.next();if(e.done===!0||t.done===!0)return e.done===t.done;if(e.value[0]!==t.value[0]||e.value[1]!==t.value[1])return!1}}function*$O(e){for(let t of e.hunkContent){if(t.type===`context`){for(let e=0;e<t.lines;e++)yield[t.deletionLineIndex+e,t.additionLineIndex+e];continue}let e=Math.max(t.deletions,t.additions);for(let n=0;n<e;n++)yield[n<t.deletions?t.deletionLineIndex+n:void 0,n<t.additions?t.additionLineIndex+n:void 0]}}function ek(e){return Nd(e.additionStart,e.additionCount)}function tk(e){return Nd(e.deletionStart,e.deletionCount)}function nk(e,t){return t===0?e:e+1}function rk(e,t){return t===0?e-1:e}function ik(e){jO(e);for(let t=0;t<e.hunks.length;t++)DO(e,t)}function ak(e){return eC({tagName:`div`,properties:{"data-content-buffer":``,"data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function ok(e){return eC({tagName:`div`,children:[eC({tagName:`span`,children:[$S(`No newline at end of file`)]})],properties:{"data-no-newline":``,"data-line-type":e,"data-column-content":``}})}function sk(e){return eC({tagName:`div`,children:[tC({name:e===`both`?`diffs-icon-expand-all`:`diffs-icon-expand`,properties:{"data-icon":``}})],properties:{role:`button`,"data-expand-button":``,"data-expand-both":e===`both`?``:void 0,"data-expand-up":e===`up`?``:void 0,"data-expand-down":e===`down`?``:void 0}})}function ck({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:i,isFirstHunk:a,isLastHunk:o}){let s=0,c=[];if(e===`metadata`&&t!=null&&c.push(eC({tagName:`div`,children:[$S(t)],properties:{"data-separator-wrapper":``}})),(e===`line-info`||e===`line-info-basic`)&&t!=null){let e=[];n!=null&&(r?(a||(e.push(sk(`up`)),s++),o||(e.push(sk(`down`)),s++)):(e.push(sk(!a&&!o?`both`:a?`down`:`up`)),s++)),e.push(eC({tagName:`div`,children:[eC({tagName:`span`,children:[$S(t)],properties:{"data-unmodified-lines":``}})],properties:{"data-separator-content":``}})),r&&n!=null&&e.push(eC({tagName:`div`,children:[$S(`Expand all`)],properties:{role:`button`,"data-expand-button":``,"data-expand-all-button":``}})),c.push(eC({tagName:`div`,children:e,properties:{"data-separator-wrapper":``,"data-separator-multi-button":s>1?``:void 0}}))}return e===`custom`&&i!=null&&c.push(eC({tagName:`slot`,properties:{name:i}})),eC({tagName:`div`,children:c,properties:{"data-separator":c.length===0?`simple`:e,"data-expand-index":n,"data-separator-first":a?``:void 0,"data-separator-last":o?``:void 0}})}function lk(e,t){return`hunk-separator-${e}-${t}`}function uk(e){let t=e.at(-1);return t==null?0:Math.max(Pd(t.additionStart,t.additionCount),Pd(t.deletionStart,t.deletionCount))}var dk=-1,fk=class{options;annotationSlotName;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++dk}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLangs=[`text`];renderCache;pendingHighlightResult;pendingStructuralRows;editSessionActive=!1;constructor(e={theme:xd},t=jd,n,r){this.options=e,this.annotationSlotName=t,this.onRenderUpdate=n,this.workerManager=r,r?.isWorkingPool()!==!0&&(this.highlighter=sS(e.theme??xd)?PS():void 0)}cleanUp(){this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this),this.endEditSession()}beginEditSession(e,t){let{editSessionActive:n,renderCache:r}=this;if(this.editSessionActive=!0,n||(this.pendingHighlightResult=void 0),this.diff=e,!e.isPartial&&e.additionLines.length===0){Object.assign(e,vO(e,this.options.parseDiffOptions)),this.markEditSessionPass(e),this.clearRenderCache();return}if(r==null||n&&r.diff===e)return;let{options:i}=this.getRenderOptions(e),a=r.diff===e,o=t!=null&&RC(r.diff,t),{result:s}=r;if(!r.highlighted||s==null||!BC(r.options,i)||!a&&!o){this.clearRenderCache();return}a||(this.renderCache={diff:e,options:i,highlighted:!0,result:{...s,code:{...s.code,additionLines:[...s.code.additionLines]}},renderRange:r.renderRange})}endEditSession(){this.editSessionActive=!1,this.pendingHighlightResult=void 0}editorRenderReady(){return this.renderCache?.options.useTokenTransformer===!0&&this.renderCache.highlighted&&this.renderCache.result!=null}refreshHighlightedResult(){let{diff:e,renderCache:t,workerManager:n}=this;return e==null||t==null||!RC(t.diff,e)||VC(e)||Tk(e,this.getTokenizeMaxLength())?Promise.resolve():!this.editSessionActive&&n?.isWorkingPool()===!0&&e.cacheKey!=null?(n.evictDiffFromCache(e.cacheKey),n.primeDiffHighlightCache(e).then(()=>{this.applyRefreshedResult(e,n.getDiffResultCache(e))}).catch(e=>this.onHighlightError(e))):this.asyncHighlight(e).then(t=>this.applyRefreshedResult(e,t)).catch(e=>this.onHighlightError(e))}applyRefreshedResult(e,t){let{diff:n,renderCache:r}=this;if(t==null||n==null||r==null||!RC(n,e)||!RC(r.diff,e)||this.editSessionActive)return;let{options:i}=this.getRenderOptions(n);BC(i,t.options)&&(this.pendingHighlightResult={diff:n,options:t.options,highlighted:!0,result:t.result},this.onRenderUpdate?.())}get diffCache(){return this.renderCache?.diff??this.diff}clearRenderCache(){this.renderCache=void 0,this.pendingHighlightResult=void 0,this.pendingStructuralRows=void 0}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){let r={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t===`up`||t===`both`)&&(r.fromStart+=n),(t===`down`||t===`both`)&&(r.fromEnd+=n),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,r)}getExpandedHunk(e){return this.expandedHunks.get(e)??Od}getExpandedHunksMap(){return this.expandedHunks}setExpandedHunksMap(e){this.expandedHunks=e}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(let t of e){let e=(()=>{switch(t.side){case`deletions`:return this.deletionAnnotations;case`additions`:return this.additionAnnotations}})(),n=e[t.lineNumber]??[];e[t.lineNumber]=n,n.push(t)}}updateRenderCache(e,t,n=!1){this.pendingStructuralRows=void 0;let{renderCache:r}=this;if(r==null)return!1;let{result:i,diff:a}=r;if(i==null)return!1;if(a.isPartial)throw Error(`Could not update render cache for partial diff`);let o=i.code.additionLines,s=this.pendingStructuralRows=n?new Map:void 0,c=[],l=new Map;for(let[t,n]of e){let e=o[t]?.properties??{},r=n.map(e=>e[2]).join(``),i=t<a.additionLines.length,u=i?a.additionLines[t]??``:``,d=pw(u);s==null&&i&&(a.additionLines[t]=gE(u,r),d!==r&&(c.push(t),l.set(t,u)));let f={type:`element`,tagName:`div`,properties:{"data-line":e[`data-line`]??t+1,"data-line-index":e[`data-line-index`]??t,"data-line-type":e[`data-line-type`]??`context`},children:n.map(([e,t,n])=>e===0&&t===``?n===``?{type:`element`,tagName:`br`,properties:{},children:[]}:{type:`text`,value:n}:{type:`element`,tagName:`span`,properties:{"data-char":e,style:`color:${t};`},children:[{type:`text`,value:n}]})};s==null?o[t]=f:s.set(t,f)}let u=!1;if(c.length>0){if(this.editSessionActive){if(a.additionLines.length<=1&&a.additionLines.join(``)===``)this.applyRecomputePreservingSessionType(a,vO(a,this.options.parseDiffOptions)),u=!0;else if(gO(a,a.additionLines))this.applyRecomputePreservingSessionType(a,_O(a,a.additionLines,this.options.parseDiffOptions)),u=!0;else{let e=IO(a,c,this.options.parseDiffOptions,l);this.applyExpansionRemap(e),u=e!=null}}else Object.assign(a,SO(a,c,this.options.parseDiffOptions))}return i.baseThemeType=t,r.isDirty=!0,u}applyExpansionRemap(e){e!=null&&(this.expandedHunks=BO(this.expandedHunks,e))}applyDocumentChange(e){let{pendingStructuralRows:t,renderCache:n}=this;if(this.pendingStructuralRows=void 0,n==null)return;let{diff:r,result:i}=n;if(i==null)return;if(r.isPartial)throw Error(`Could not apply document change for partial diff`);let{additionLines:a}=r;if(r.additionLines=Ck(e),i.code.additionLines=xk(a,r.additionLines,i.code.additionLines,e),r.additionLines.length<=1&&r.additionLines.join(``)===``?(this.applyRecomputePreservingSessionType(r,vO(r,this.options.parseDiffOptions)),i.code.additionLines[0]=Sk(0,e.getLineText(0))):this.editSessionActive?this.applySessionDocumentChange(r):Object.assign(r,yO(r,this.options.parseDiffOptions)),t!=null)for(let[e,n]of t)e<i.code.additionLines.length&&(i.code.additionLines[e]=n);n.isDirty=!0}applySessionDocumentChange(e){let{parseDiffOptions:t}=this.options,n=e.additionLines;if(gO(e,n)){this.applyRecomputePreservingSessionType(e,_O(e,n,t));return}this.applyExpansionRemap(FO(e,t))}applyRecomputePreservingSessionType(e,t){let n=this.editSessionActive?e.type:void 0;Object.assign(e,t),n!=null&&(e.type=n),this.markEditSessionPass(e)}markEditSessionPass(e){this.editSessionActive&&(e.editSessionDirty=!0)}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e,contentProperties:{"data-line-type":e}}}getSplitLineDecoration({side:e,type:t}){let n=t===`change`?e===`deletions`?`change-deletion`:`change-addition`:t;return{gutterLineType:n,contentProperties:{"data-line-type":n}}}createAnnotationElement=e=>_E(e);getOptionsWithDefaults(){let{diffIndicators:e=`bars`,diffStyle:t=`split`,disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:i=!1,disableVirtualizationBuffers:a=!1,collapsed:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=1,expansionLineCount:l=100,hunkSeparators:u=`line-info`,lineDiffType:d=`word-alt`,maxLineDiffLength:f=1e3,overflow:p=`scroll`,stickyHeader:m=!1,theme:h=xd,headerRenderMode:g=`default`,tokenizeMaxLineLength:_=1e3,tokenizeMaxLength:v=Ed,useTokenTransformer:y=!1,useCSSClasses:b=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:i,disableVirtualizationBuffers:a,collapsed:o,expandUnchanged:s,collapsedContextThreshold:c,expansionLineCount:l,hunkSeparators:u,lineDiffType:d,maxLineDiffLength:f,overflow:p,stickyHeader:m,theme:this.workerManager?.getDiffRenderOptions().theme??h,headerRenderMode:g,tokenizeMaxLineLength:_,tokenizeMaxLength:v,useTokenTransformer:y,useCSSClasses:b}}async initializeHighlighter(){return this.highlighter=await NS(TE(this.computedLangs,{theme:this.getLocalHighlightTheme(),preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter})),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;let{options:t}=this.getRenderOptions(e),n=Tk(e,this.getTokenizeMaxLength()),r=this.workerManager?.getDiffResultCache(e);r!=null&&!BC(t,r.options)&&(r=void 0),this.renderCache??={diff:e,hydrated:!0,highlighted:!n&&!VC(e),options:t,result:n?void 0:r?.result,renderRange:void 0},!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter??(this.computedLangs=wk(e),this.initializeHighlighter())}getLocalHighlightTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??xd}getEffectiveCodeOptions(){let e=this.workerManager?.isWorkingPool()===!0?this.workerManager.getDiffRenderOptions():void 0;return{theme:this.getLocalHighlightTheme(),tokenizeMaxLineLength:e?.tokenizeMaxLineLength??this.options.tokenizeMaxLineLength}}getRenderOptions(e){let t=(()=>{if(this.workerManager?.isWorkingPool()===!0){let e=this.workerManager.getDiffRenderOptions();return this.editSessionActive&&e.useTokenTransformer!==!0?{...e,useTokenTransformer:!0}:e}let{theme:e,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}=this.getOptionsWithDefaults();return{theme:e,useTokenTransformer:this.editSessionActive||this.options.useTokenTransformer===!0,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}})();this.getOptionsWithDefaults();let{renderCache:n}=this;return n?.result==null||!RC(e,n.diff)||!BC(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getDiffForNextRender(e){let{options:t}=this.getRenderOptions(e);if(this.getReadyRenderResult(e,t)!=null||this.renderCache==null)return e;if(RC(this.renderCache.diff,e))return this.renderCache.diff;let n=!(e.additionLines.length>0||e.deletionLines.length>0)||VC(e)||Tk(e,this.getTokenizeMaxLength());return this.canRenderDiff(e,t,n)?e:this.renderCache.diff}canRenderDiff(e,t,n){let{renderCache:r}=this;return r==null||RC(r.diff,e)?!0:n?r.result==null&&r.hydrated!==!0||this.workerManager?.isWorkingPool()===!0||this.highlighter!=null&&sS(t.theme):r.result==null&&r.hydrated!==!0?!0:!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0?!r.highlighted:this.highlighter!=null&&sS(t.theme)}renderDiff(e=this.diff,t=kd){if(this.diff=e,e==null){this.pendingHighlightResult=void 0;return}let{expandUnchanged:n,collapsedContextThreshold:r}=this.getOptionsWithDefaults(),{options:i,forceHighlight:a}=this.getRenderOptions(e),o=this.getReadyRenderResult(e,i);this.pendingHighlightResult=void 0,o!=null&&(this.renderCache={...o,diff:e,renderRange:void 0},a=!1),this.renderCache??={diff:e,highlighted:!1,options:i,result:void 0,renderRange:void 0};let s=e.additionLines.length>0||e.deletionLines.length>0,c=!s||VC(e)||Tk(e,this.getTokenizeMaxLength()),l=this.canRenderDiff(e,i,c),u=!RC(e,this.renderCache.diff),d=!hE(this.renderCache.renderRange,t);if(!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0){let o=this.renderCache.result==null&&this.renderCache.highlighted&&!c&&!u&&EE(t);l&&!o&&(c||this.renderCache.result==null||!this.renderCache.highlighted&&(u||d))&&(this.renderCache.diff=e,this.renderCache.options=i,this.renderCache.highlighted=!1,(this.renderCache.result==null||u||d||a)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,EE(t)||n?!0:this.expandedHunks,r)),this.renderCache.renderRange=t),!c&&s&&(!this.renderCache.highlighted||a)&&this.workerManager.highlightDiffAST(this,e)}else{this.computedLangs=wk(e),this.highlighter??=PS();let t=this.highlighter!=null&&sS(i.theme),n=this.highlighter!=null&&Ud(this.computedLangs),r=!c&&n;if(l&&this.highlighter!=null&&t&&(a||c||!this.renderCache.highlighted&&r||this.renderCache.result==null)){let{result:t,options:i}=this.renderDiffWithHighlighter(e,this.highlighter,c||!n);this.renderCache={diff:e,options:i,highlighted:r,result:t,renderRange:void 0}}(!t||!c&&!n)&&this.asyncHighlight(e).then(({result:t,options:n})=>{this.applyHighlightResult(e,t,n,!c)})}return this.renderCache.result==null?void 0:this.processDiffResult(this.renderCache.diff,t,this.renderCache.result)}async asyncRender(e,t=kd){this.diff=e;let{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){let{diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o}=this.getOptionsWithDefaults();return CE({type:`diff`,diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e){let t=Tk(e,this.getTokenizeMaxLength());this.computedLangs=t?[`text`]:wk(e);let n=this.highlighter!=null&&sS(this.getLocalHighlightTheme()),r=t||this.highlighter!=null&&Ud(this.computedLangs);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,n=!1){let{options:r}=this.getRenderOptions(e),{collapsedContextThreshold:i}=this.getOptionsWithDefaults(),a=Yw(e,t,r,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:i});if(this.editSessionActive&&e.additionLines.length===1&&e.additionLines[0]===``&&a.code.additionLines[0]==null){let t;if(ow({diff:e,diffStyle:`both`,expandedHunks:n?!0:void 0,collapsedContextThreshold:i,callback:({additionLine:e})=>{if(e?.lineIndex===0)return t=e,!0}}),t==null)throw Error(`DiffHunksRenderer: missing empty addition line`);a.code.additionLines[0]=Sk(0,``,t.unifiedLineIndex,t.splitLineIndex)}return{result:a,options:r}}onHighlightSuccess(e,t,n,r=!0){this.editSessionActive||this.applyHighlightResult(e,t,n,r)}applyHighlightResult(e,t,n,r=!0){let{diff:i,renderCache:a}=this;i!=null&&a!=null&&RC(i,e)&&BC(n,this.getRenderOptions(i).options)&&(a.result!=null&&a.highlighted&&BC(a.options,n)&&RC(a.diff,i)||(this.pendingHighlightResult={diff:i,options:n,highlighted:r,result:t},this.onRenderUpdate?.()))}getMatchingWorkerResultCache(e,t){if(this.editSessionActive)return;let n=this.workerManager?.getDiffResultCache(e);if(n!=null&&BC(t,n.options))return n}getReadyRenderResult(e,t){let{pendingHighlightResult:n}=this;if(n!=null&&RC(n.diff,e)&&BC(n.options,t))return n;let r=this.getMatchingWorkerResultCache(e,t);if(!(r==null||this.hasHighlightedRenderCache(e,t)))return{diff:e,highlighted:!0,...r}}hasHighlightedRenderCache(e,t){let{renderCache:n}=this;return n?.result!=null&&n.highlighted&&RC(e,n.diff)&&BC(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){let{diffStyle:a,disableFileHeader:o,expandUnchanged:s,expansionLineCount:c,collapsedContextThreshold:l,hunkSeparators:u}=this.getOptionsWithDefaults(),d=this.renderCache?.isDirty??!1,f=a===`unified`,p=Ek(e,this.options.loadDiffFiles!=null),m=!e.isPartial||p,h=[],g=[],_=[],v=[],{additionLines:y,deletionLines:b}=n,x={rowCount:0,hunkSeparators:u,additionsContentAST:h,deletionsContentAST:g,unifiedContentAST:_,unifiedGutterAST:rC(),deletionsGutterAST:rC(),additionsGutterAST:rC(),expansionLineCount:c,hunkData:v,incrementRowCount(e=1){x.rowCount+=e},pushToGutter(e,t){switch(e){case`unified`:x.unifiedGutterAST.children.push(t);break;case`deletions`:x.deletionsGutterAST.children.push(t);break;case`additions`:x.additionsGutterAST.children.push(t)}}},S=XC({fileDiff:e,errorPrefix:`DiffHunksRenderer.processDiffResult`}),C={size:0,side:void 0,increment(){this.size+=1},flush(){if(a!==`unified`){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side===`additions`?(x.pushToGutter(`additions`,aC(void 0,`buffer`,this.size)),h?.push(ak(this.size))):(x.pushToGutter(`deletions`,aC(void 0,`buffer`,this.size)),g?.push(ak(this.size))),this.size=0,this.side=void 0}}},w=(e,t,n,r,i)=>{x.pushToGutter(e,iC(t,n,r,i))};function T(e){C.flush(),a===`unified`?vk(`unified`,e,x):(vk(`deletions`,e,x),vk(`additions`,e,x))}this.pushFileLevelAnnotations(e,a,t,x),ow({diff:e,diffStyle:a,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:s?!0:this.expandedHunks,collapsedContextThreshold:l,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,additionLine:o,deletionLine:s,type:c})=>{let l=s==null?o.splitLineIndex:s.splitLineIndex,f=o==null?s.unifiedLineIndex:o.unifiedLineIndex;a===`split`&&c!==`change`&&C.flush(),r>0&&T({hunkIndex:t,collapsedLines:r,rangeSize:Math.max(n?.collapsedBefore??0,0),hunkSpecs:n?.hunkSpecs,isFirstHunk:t===0,isLastHunk:!1,isExpandable:m});let h=a===`unified`?f:l,g={type:c,hunkIndex:t,lineIndex:h,unifiedLineIndex:f,splitLineIndex:l,deletionLine:s,additionLine:o};if(a===`unified`){let n=this.getUnifiedInjectedRowsForLine?.(g);n?.before!=null&&hk(n.before,x);let r=s==null?void 0:b[s.lineIndex],i=o==null?void 0:y[o.lineIndex];if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let a=c===`change`?o==null?`change-deletion`:`change-addition`:c,u=this.getUnifiedLineDecoration({type:c,lineType:a,additionLineIndex:o?.lineIndex,deletionLineIndex:s?.lineIndex});w(`unified`,u.gutterLineType,o==null?s.lineNumber:o.lineNumber,`${f},${l}`,u.gutterProperties),i==null?r!=null&&(r=yk(r,u.contentProperties,d&&s!=null?{"data-line":s.lineNumber,"data-line-index":`${f},${l}`}:void 0)):i=yk(i,u.contentProperties,d&&o!=null?{"data-line":o.lineNumber,"data-line-index":`${f},${l}`}:void 0),_k({diffStyle:`unified`,type:c,deletionLine:r,additionLine:i,unifiedSpan:this.getAnnotations(`unified`,s?.lineNumber,o?.lineNumber,t,h),createAnnotationElement:e=>this.createAnnotationElement(e),context:x}),n?.after!=null&&hk(n.after,x)}else{let n=this.getSplitInjectedRowsForLine?.(g);n?.before!=null&&gk(n.before,x,C);let r=s==null?void 0:b[s.lineIndex],i=o==null?void 0:y[o.lineIndex],a=this.getSplitLineDecoration({side:`deletions`,type:c,lineIndex:s?.lineIndex}),u=this.getSplitLineDecoration({side:`additions`,type:c,lineIndex:o?.lineIndex});if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let f=(()=>{if(c===`change`){if(i==null)return`additions`;if(r==null)return`deletions`}})();f==null?c===`change`&&C.flush():(C.side!=null&&C.side!==f&&C.flush(),C.side=f,C.increment());let p=this.getAnnotations(`split`,s?.lineNumber,o?.lineNumber,t,h);if(p!=null&&C.size>0&&C.flush(),s!=null){let e=yk(r,a.contentProperties,d?{"data-line":s.lineNumber,"data-line-index":`${s.unifiedLineIndex},${l}`}:void 0);w(`deletions`,a.gutterLineType,s.lineNumber,`${s.unifiedLineIndex},${l}`,a.gutterProperties),e!=null&&(r=e)}if(o!=null){let e=yk(i,u.contentProperties,d?{"data-line":o.lineNumber,"data-line-index":`${o.unifiedLineIndex},${l}`}:void 0);w(`additions`,u.gutterLineType,o.lineNumber,`${o.unifiedLineIndex},${l}`,u.gutterProperties),e!=null&&(i=e)}_k({diffStyle:`split`,type:c,additionLine:i,deletionLine:r,...p,createAnnotationElement:e=>this.createAnnotationElement(e),context:x}),n?.after!=null&&gk(n.after,x,C)}let _=a===`split`&&n!=null&&l===n.splitLineStart+n.splitLineCount-1,v=t===e.hunks.length-1&&n!=null&&(a===`split`?l===n.splitLineStart+n.splitLineCount-1:f===n.unifiedLineStart+n.unifiedLineCount-1),E=_?n.noEOFCRDeletions:!1,D=_?n.noEOFCRAdditions:!1,O=(s?.noEOFCR??!1)||E,k=(o?.noEOFCR??!1)||D;if(k||O){if(a===`split`&&C.flush(),O){let e=c===`context`||c===`context-expanded`?c:`change-deletion`;a===`unified`?(x.unifiedContentAST.push(ok(e)),x.pushToGutter(`unified`,aC(e,`metadata`,1))):(x.deletionsContentAST.push(ok(e)),x.pushToGutter(`deletions`,aC(e,`metadata`,1)),k||(x.pushToGutter(`additions`,aC(void 0,`buffer`,1)),x.additionsContentAST.push(ak(1))))}if(k){let e=c===`context`||c===`context-expanded`?c:`change-addition`;a===`unified`?(x.unifiedContentAST.push(ok(e)),x.pushToGutter(`unified`,aC(e,`metadata`,1))):(x.additionsContentAST.push(ok(e)),x.pushToGutter(`additions`,aC(e,`metadata`,1)),O||(x.pushToGutter(`deletions`,aC(void 0,`buffer`,1)),x.deletionsContentAST.push(ak(1))))}x.incrementRowCount(1)}u!==`simple`&&u!==`metadata`&&(i>0||v&&p)&&T({hunkIndex:c===`context-expanded`?t:t+1,collapsedLines:v&&p?`unknown`:i,rangeSize:S,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:m}),x.incrementRowCount(1)}}),a===`split`&&C.flush();let E=Math.max(uk(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),D=t.bufferBefore>0||t.bufferAfter>0,O=!f&&e.type!==`deleted`,k=!f&&e.type!==`new`,A=x.rowCount>0||D;h=O&&A?h:void 0,g=k&&A?g:void 0,_=f&&A?_:void 0;let j=this.createPreElement(g!=null&&h!=null,E);return{fileDiff:e,unifiedGutterAST:f&&A?x.unifiedGutterAST.children:void 0,unifiedContentAST:_,deletionsGutterAST:k&&A?x.deletionsGutterAST.children:void 0,deletionsContentAST:g,additionsGutterAST:O&&A?x.additionsGutterAST.children:void 0,additionsContentAST:h,hunkData:v,preNode:j,themeStyles:r,baseThemeType:i,headerElement:o?void 0:this.renderHeader(e),totalLines:E,rowCount:x.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:``}}renderCodeAST(e,t){let n=e===`unified`?t.unifiedGutterAST:e===`deletions`?t.deletionsGutterAST:t.additionsGutterAST,r=e===`unified`?t.unifiedContentAST:e===`deletions`?t.deletionsContentAST:t.additionsContentAST;if(n==null||r==null)return;let i=rC(n);return i.properties.style=`grid-row: span ${t.rowCount}`,[i,vE(r,t.rowCount)]}renderFullAST(e,t=[]){let n=this.getOptionsWithDefaults().hunkSeparators===`line-info`,r=this.renderCodeAST(`unified`,e);if(r!=null)return t.push(eC({tagName:`code`,children:r,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-unified":``}})),{...e.preNode,children:t};let i=this.renderCodeAST(`deletions`,e);i!=null&&t.push(eC({tagName:`code`,children:i,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-deletions":``}}));let a=this.renderCodeAST(`additions`,e);return a!=null&&t.push(eC({tagName:`code`,children:a,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-additions":``}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return w_(this.renderFullAST(e,t))}renderPartialHTML(e,t){return w_(t==null?e:eC({tagName:`code`,children:e,properties:{"data-code":``,"data-container-size":this.getOptionsWithDefaults().hunkSeparators===`line-info`?``:void 0,[`data-${t}`]:``}}))}pushFileLevelAnnotations(e,t,n,r){if(!IT(n))return;let i=e.type===`new`?[]:this.getAnnotationNames(FT(this.deletionAnnotations)),a=e.type===`deleted`?[]:this.getAnnotationNames(FT(this.additionAnnotations));if(i.length===0&&a.length===0)return;let{createAnnotationElement:o}=this;if(t===`unified`){_k({diffStyle:t,type:`context`,unifiedSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i.concat(a)},createAnnotationElement:o,context:r});return}_k({diffStyle:t,type:`context`,deletionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i},additionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:a},createAnnotationElement:o,context:r})}getAnnotations(e,t,n,r,i){let a={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(t!=null)for(let e of this.deletionAnnotations[t]??[])a.annotations.push(this.annotationSlotName(e));let o={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(n!=null)for(let t of this.additionAnnotations[n]??[])(e===`unified`?a:o).annotations.push(this.annotationSlotName(t));if(e===`unified`)return a.annotations.length>0?a:void 0;if(o.annotations.length!==0||a.annotations.length!==0)return{deletionSpan:a,additionSpan:o}}getAnnotationNames(e){return e?.map(e=>this.annotationSlotName(e))??[]}renderHeader(e){let{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return bE({fileOrDiff:e,mode:t,stickyHeader:n})}},pk=new Intl.PluralRules(`en-US`);function mk(e){return`${e} unmodified line${pk.select(e)===`one`?``:`s`}`}function hk(e,t){for(let n of e)t.unifiedContentAST.push(n.content),t.pushToGutter(`unified`,n.gutter),t.incrementRowCount(1)}function gk(e,t,n){for(let{deletion:r,addition:i}of e){if(r==null&&i==null)continue;let e=r!=null&&i!=null?void 0:r==null?`deletions`:`additions`;(e==null||n.side!==e)&&n.flush(),r!=null&&(t.deletionsContentAST.push(r.content),t.pushToGutter(`deletions`,r.gutter)),i!=null&&(t.additionsContentAST.push(i.content),t.pushToGutter(`additions`,i.gutter)),e!=null&&(n.side=e,n.increment()),t.incrementRowCount(1)}}function _k({diffStyle:e,type:t,deletionLine:n,additionLine:r,unifiedSpan:i,deletionSpan:a,additionSpan:o,createAnnotationElement:s,context:c}){let l=!1;if(e===`unified`){if(r==null?n!=null&&c.unifiedContentAST.push(n):c.unifiedContentAST.push(r),i!=null){let e=t===`change`?n==null?`change-addition`:`change-deletion`:t;c.unifiedContentAST.push(s(i)),c.pushToGutter(`unified`,aC(e,`annotation`,1)),l=!0}}else if(e===`split`){if(n!=null&&c.deletionsContentAST.push(n),r!=null&&c.additionsContentAST.push(r),a!=null){let e=t===`change`?n==null?`context`:`change-deletion`:t;c.deletionsContentAST.push(s(a)),c.pushToGutter(`deletions`,aC(e,`annotation`,1)),l=!0}if(o!=null){let e=t===`change`?r==null?`context`:`change-addition`:t;c.additionsContentAST.push(s(o)),c.pushToGutter(`additions`,aC(e,`annotation`,1)),l=!0}}l&&c.incrementRowCount(1)}function vk(e,{hunkIndex:t,collapsedLines:n,rangeSize:r,hunkSpecs:i,isFirstHunk:a,isLastHunk:o,isExpandable:s},c){if(typeof n==`number`&&n<=0)return;let l=e===`unified`?c.unifiedContentAST:e===`deletions`?c.deletionsContentAST:c.additionsContentAST;if(c.hunkSeparators===`metadata`){i!=null&&(c.pushToGutter(e,ck({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),l.push(ck({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1));return}if(c.hunkSeparators===`simple`){t>0&&(c.pushToGutter(e,ck({type:`simple`,isFirstHunk:a,isLastHunk:!1})),l.push(ck({type:`simple`,isFirstHunk:a,isLastHunk:!1})),e!==`additions`&&c.incrementRowCount(1));return}let u=lk(e,t),d=r>c.expansionLineCount,f=s?t:void 0,p=typeof n==`number`?mk(n):`More unchanged context may be available`;c.pushToGutter(e,ck({type:c.hunkSeparators,content:p,expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),l.push(ck({type:c.hunkSeparators,content:p,expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1),c.hunkData.push({slotName:u,hunkIndex:t,lines:typeof n==`number`?n:0,lineCountKnown:typeof n==`number`,type:e,expandable:s?{up:!a,down:!o,chunked:d}:void 0})}function yk(e,t,n){return e==null||e.type!==`element`||t==null&&n==null?e:{...e,properties:{...e.properties,...t,...n}}}function bk(e){return e.length>0&&e[e.length-1]===``?e.length-1:e.length}function xk(e,t,n,r){let i=bk(e),a=bk(t),o=Math.min(i,a),s=0;for(;s<o&&e[s]===t[s];)s++;let c=0;for(;c<o-s&&e[i-1-c]===t[a-1-c];)c++;let l=Array(t.length);for(let e=0;e<s;e++)l[e]=n[e];for(let e=0;e<c;e++)l[a-1-e]=n[i-1-e];i<e.length&&a<t.length&&(l[t.length-1]=n[e.length-1]);for(let e=s;e<t.length;e++)l[e]??=Sk(e,r.getLineText(e));return l}function Sk(e,t,n=e,r=e){return{type:`element`,tagName:`div`,properties:{"data-line":e+1,"data-line-index":`${n},${r}`,"data-line-type":`context`},children:[{type:`element`,tagName:`span`,properties:{"data-char":0},children:[{type:`text`,value:t}]}]}}function Ck(e){let t=[];for(let n=0;n<e.lineCount;n++)t.push(e.getLineText(n,!0));return t}function wk(e){if(e.lang!=null)return[e.lang];let t=HS(e.prevName??e.name),n=HS(e.name);return t===n?[n]:[t,n]}function Tk(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function Ek(e,t){return e.isPartial&&t&&(e.type===`change`||e.type===`rename-changed`)}function Dk(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function Ok(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.lineCountKnown===t.lineCountKnown&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}function kk(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:YE(e),tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators==`function`?`custom`:e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,loadDiffFiles:e?.loadDiffFiles,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`}}function Ak(e){return e.isPartial&&(e.type===`change`||e.type===`rename-changed`||e.type===`rename-pure`)}function jk(e){let t={...e};return delete t.cacheKey,t}function Mk(e,t){if(e.isPartial||t.isPartial)throw Error(`FileDiff.shouldResetEditorForExternalDiff: diffs must be fully hydrated`);let n=e.lang??HS(e.name),r=t.lang??HS(t.name),i=e.type!==`new`,a=t.type!==`new`;return e.name!==t.name||n!==r||i!==a||e.deletionLines.length!==t.deletionLines.length||e.deletionLines.some((e,n)=>e!==t.deletionLines[n])}function Nk(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function Pk(e,t){let{oldFile:n}=e;return n==null?t.type===`new`:t.type!==`new`&&n.name===(t.prevName??t.name)&&Nk(n.lines,t.deletionLines)}var Fk=-1,Ik=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++Fk}`;type=`file-diff`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerFilenameSuffix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;editSession;renderedDiff;renderRange;pendingFiles;appliedPreAttributes;headerCache={lastRenderedHTML:void 0,html:void 0,fileDiff:void 0};lastRowCount;mounted=!1;enabled=!0;editor;refreshViewTimeout;lineStateRefreshPending=!1;deferredSelectedLines;deferredEditorActiveLine;constructor(e={theme:xd},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new sE,this.scrollSyncManager=new fO,this.interactionManager=new BT(`diff`,VT(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`||e.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??xd}getHunksRendererOptions(e){return kk(e)}createHunksRenderer(e){return new fk(this.getHunksRendererOptions(e),this.getAnnotationSlotName,this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t=`additions`)=>this.getLineIndexForDiff(this.getDiffForLineIndex(),e,t);getDiffForLineIndex(){return this.getRenderedDiff()}getLineIndexForDiff(e,t,n){if(e==null)return;let r=e.hunks.at(-1),i,a;hunkIterator:for(let o of e.hunks){let e=n===`deletions`?o.deletionStart:o.additionStart,s=n===`deletions`?o.deletionCount:o.additionCount,c=Nd(e,s)+1,l=o.splitLineStart,u=o.unifiedLineStart;if(t<c){let e=c-t;i=Math.max(u-e,0),a=Math.max(l-e,0);break hunkIterator}if(t>=c+s){if(o===r){let e=t-(c+s);i=u+o.unifiedLineCount+e,a=l+o.splitLineCount+e;break hunkIterator}continue}for(let e of o.hunkContent)if(e.type===`context`){if(t<c+e.lines){let e=t-c;a=l+e,i=u+e;break hunkIterator}c+=e.lines,l+=e.lines,u+=e.lines}else{let r=n===`deletions`?e.deletions:e.additions;if(t<c+r){let r=t-c;i=u+(n===`additions`?e.deletions:0)+r,a=l+r;break hunkIterator}c+=r,l+=Math.max(e.deletions,e.additions),u+=e.deletions+e.additions}break hunkIterator}if(i!=null&&a!=null)return[i,a]}setOptions(e){e!=null&&(this.options=e,this.clearReusableHeader(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(VT(this.options,typeof this.options.hunkSeparators==`function`||(this.options.hunkSeparators??`line-info`)===`line-info`||this.options.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??`system`)!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if(typeof this.options.theme==`string`||this.fileContainer==null||this.appliedThemeCSS==null)return!1;let t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType!==t&&(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!IS(this.appliedThemeCSS.theme,this.getTheme())}getHoveredLine=()=>this.interactionManager.getHoveredLine();getAnnotationSlotName=e=>JE(this.editSession?.annotations,e,jd);getLatestAnnotations(){return this.editSession?.annotations?.current??this.lineAnnotations}isNewAnnotations(e){let t=this.editSession?.annotations;return e===this.lineAnnotations?!1:t==null||e!==t.provided&&e!==t.current}setLineAnnotations(e){let t=this.editSession?.annotations;if(t==null){this.lineAnnotations=e;return}this.isNewAnnotations(e)&&(this.lineAnnotations=e,qE(t,e,jd))}syncEditSessionAnnotationsFromEditor(e){let t=this.editSession?.annotations;return t==null||e===t.current?!1:(t.current=e,this.hunksRenderer.setLineAnnotations(e),this.renderAnnotations(),!0)}canPartiallyRender(e,t,n){return!(e||t||n||typeof this.options.hunkSeparators==`function`)}setSelectedLines(e,t){this.lineStateRefreshPending?this.deferredSelectedLines=[e,t]:this.interactionManager.setSelection(e,t)}setEditorActiveLine(e,t){this.lineStateRefreshPending?this.deferredEditorActiveLine=[e,t]:this.interactionManager.setEditorActiveLine(e,{lineNumberOnly:t?.lineNumberOnly,side:t?.side??`additions`})}flushDeferredLineState(){let{deferredEditorActiveLine:e,deferredSelectedLines:t}=this;this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,e!=null&&this.setEditorActiveLine(...e),t!=null&&this.interactionManager.setSelection(...t)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}let{diffStyle:e=`split`,overflow:t=`scroll`}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:t===`wrap`,columnVariables:this.shouldApplyColumnVariables(t)?`apply`:`measure`}),t===`scroll`&&e===`split`?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}shouldApplyColumnVariables(e){return typeof this.options.hunkSeparators==`function`||e===`scroll`&&(this.getLatestAnnotations().length>0||this.pre?.hasAttribute(`data-has-merge-conflict`)===!0)}getCodeScrollLeft(){return Math.max(this.codeUnified?.scrollLeft??0,this.codeDeletions?.scrollLeft??0,this.codeAdditions?.scrollLeft??0)}setCodeScrollLeft(e){this.codeUnified!=null&&(this.codeUnified.scrollLeft=e),this.codeAdditions!=null&&(this.codeAdditions.scrollLeft=e),this.codeDeletions!=null&&(this.codeDeletions.scrollLeft=e)}__getEffectiveCodeOptions(){return{...this.options,...this.hunksRenderer.getEffectiveCodeOptions()}}cleanUp(e=!1){let{editor:t}=this;DT(this.handleEditSessionRender),this.emitPostRender(!0),t?.cleanUp(e?`recycle`:`discard`),e||(this.editor=void 0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,e||(this.pendingFiles=void 0),this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,e||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder?.remove(),this.placeHolder=void 0,this.headerCache.lastRenderedHTML=void 0,e||this.clearReusableHeader(),this.errorWrapper?.remove(),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.editSession=void 0,this.renderedDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate({fileContainer:e,prerenderedHTML:t,preventEmit:n=!1,lineAnnotations:r,fileDiff:i,...a}){if(!this.enabled)throw Error(`FileDiff.hydrate: attempting to call hydrate after cleaned up`);if(this.fileContainer!=null)throw Error(`FileDiff.hydrate: hydrate can only be called before the instance has rendered or hydrated`);let o=cD(a,`FileDiff.hydrate`),s=o?.oldFile,c=o?.newFile;this.hydrateElements(e,t);let l=this.editor!=null;l||Vk(this.pre,zk({fileDiff:i,oldFile:s,newFile:c}),this.options.collapsed)||Hk(this.headerElement,Bk({fileDiff:i,oldFile:s,newFile:c}),this.options.disableFileHeader)?this.render({...a,fileContainer:e,lineAnnotations:r,fileDiff:i,forceRender:l||a.forceRender,preventEmit:!0}):this.hydrationSetup({fileDiff:i,lineAnnotations:r,...o}),n||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),nD(e,t);for(let t of e.shadowRoot?.children??[]){if(t instanceof SVGElement){this.spriteSVG=t;continue}if(t instanceof HTMLElement){if(t instanceof HTMLPreElement){this.pre=t;for(let e of t.children)e instanceof HTMLElement&&e.tagName.toLowerCase()===`code`&&(`deletions`in e.dataset&&(this.codeDeletions=e),`additions`in e.dataset&&(this.codeAdditions=e),`unified`in e.dataset&&(this.codeUnified=e));continue}if(`diffsHeader`in t.dataset){this.headerElement=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-theme-css`)){this.themeCSSStyle=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-unsafe-css`)){this.unsafeCSSStyle=t,this.appliedUnsafeCSS=t.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute(`data-dehydrated`)),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:r}){this.lineAnnotations=r??this.lineAnnotations,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(t!==void 0&&n!==void 0?uO(t,n,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderedDiff=this.fileDiff,this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.loadFilesIfNecessary(),this.rerender()};loadFilesIfNecessary(){let{fileDiff:e,options:{loadDiffFiles:t}}=this;if(e==null||t==null||!Ak(e)||this.pendingFiles?.fileDiff===e)return;let n=this.loadFilesForDiff(e,t),r=this.pendingFiles={fileDiff:e,promise:n};r.promise=n.finally(()=>{this.pendingFiles===r&&(this.pendingFiles=void 0)})}async loadFilesForDiff(e,t){try{let n=await t(e);if(!this.enabled||this.fileDiff!==e)return;await this.handleFilesLoaded(e,n)}catch(e){if(this.options.disableErrorHandling===!0)throw e;console.error(e)}}async handleFilesLoaded(e,t){if(this.fileDiff===e&&e.isPartial){if(mD(`merge`,e,t),this.setHydratedState(t),this.startHydratedEditSession(e)){this.rerender();return}await iD(()=>this.primeHighlightCache(e)),this.enabled&&this.fileDiff===e&&this.rerender()}}startHydratedEditSession(e){if(e.isPartial)throw Error(`FileDiff.startHydratedEditSession: diffs cannot be partial for editing`);if(this.fileDiff!==e)return!1;let{editor:t}=this;return this.editSession?.outgoingDiff==null?t==null||this.editSession!=null?!1:(this.installEditSession(e,t.__getDocumentContents(Lk(e)),t.__getDocumentSessionState()),!0):(this.installEditSession(e),!0)}updateExternalDiff(e,t){if(RC(this.fileDiff,e))return!1;let n=this.editSession?.outgoingDiff??this.editSession?.diff;return this.fileDiff=e,n==null?this.editor!=null&&(e.isPartial?this.loadFilesIfNecessary():this.installEditSession(e,this.editor.__getDocumentContents(Lk(e)),this.editor.__getDocumentSessionState())):(e.isPartial?this.loadFilesIfNecessary():this.installEditSession(e),this.editSession!=null&&(this.editSession.outgoingDiff=n)),this.editSession?.annotations!=null&&t!=null&&(this.lineAnnotations=t,this.editSession.annotations=KE(t,jd,this.editSession.annotations)),!0}installEditSession(e,t,n){let r=e.additionLines.join(``),i=t==null?void 0:pD(t.contents),a=n!=null&&Pk(n,e);if(n!=null&&!a)throw Error(`FileDiff: retained session cannot resume against a different old file`);if(t!=null&&t.contents!==r&&!a)throw Error(`FileDiff: retained edits are missing their diff session state`);let o=t==null||t.name===e.name&&t.lang===e.lang&&t.contents===r,s=jk(e);t!=null&&i!=null&&!o&&(s.name=t.name,s.lang=t.lang),a&&n!=null&&i!=null&&(s.additionLines=i,s.type=n.type,s.hunks=n.hunks,s.editSessionDirty=!0,jO(s)),this.editSession={diff:s,annotations:this.editSession?.annotations??KE(this.lineAnnotations,jd),outgoingDiff:this.editSession?.outgoingDiff},this.hunksRenderer.beginEditSession(s,o&&!a?e:void 0)}setHydratedState(e){this.deletionFile=e.oldFile,this.additionFile=e.newFile,this.workerManager?.cleanUpTasks(this.hunksRenderer),this.hunksRenderer.clearRenderCache()}render({fileDiff:e,deferManagers:t=!1,forceRender:n=!1,preventEmit:r=!1,lineAnnotations:i,fileContainer:a,containerWrapper:o,renderRange:s,...c}){if(!this.enabled)throw Error(`FileDiff.render: attempting to call render after cleaned up`);let l=cD(c,`FileDiff.render`),u=l?.oldFile,d=l?.newFile;this.editor?.__postponeBgTokenizeToNextFrame();let{collapsed:f=!1,themeType:p=`system`,expandUnchanged:m=!1}=this.options,h=f?void 0:s,g=this.hasThemeChanged(),_=l!=null,v=_&&(!Rk(u,this.deletionFile)||!Rk(d,this.additionFile)),y=e!=null&&!RC(e,this.fileDiff),b=i!=null&&(i.length>0||this.getLatestAnnotations().length>0)&&this.isNewAnnotations(i);if(!f&&hE(h,this.renderRange)&&!n&&!b&&!g&&(e!=null&&!y||e==null&&!v)){let e=this.applyCachedThemeState(p);return e&&this.finalizeRender(),e}let x;e==null&&_&&(v||this.fileDiff==null)&&(x=uO(l.oldFile,l.newFile,this.options.parseDiffOptions));let{renderRange:S}=this;this.renderRange=h,_?(this.deletionFile=u,this.additionFile=d):e!=null&&(this.deletionFile=void 0,this.additionFile=void 0),e!=null&&y?this.updateExternalDiff(e,i):x!=null&&(y=!0,this.updateExternalDiff(x,i)),y&&this.clearReusableHeader(),i!=null&&this.setLineAnnotations(i);let C=this.getLatestDiff();if(C==null)return!1;C.editSessionDirty===!0&&this.shouldSelfHealEditSession()&&(UO(C,this.options.parseDiffOptions),this.hunksRenderer.refreshHighlightedResult()),m&&this.loadFilesIfNecessary(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.getLatestAnnotations());let{disableErrorHandling:w=!1,disableFileHeader:T=!1}=this.options;if(T&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.headerCache.lastRenderedHTML=void 0),this.clearHeaderSlots()),a=this.getOrCreateFileContainer(a,o),this.applyCachedThemeState(p),f){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let e=this.hunksRenderer.renderDiff(C,Ad);e!=null&&this.applyThemeState(a,e.themeStyles,p,e.baseThemeType),e?.headerElement!=null&&this.applyHeaderToDOM(e.headerElement,a,e.fileDiff),this.renderSeparators([]),this.renderedDiff=e?.fileDiff??C,this.injectUnsafeCSS()}catch(e){if(w)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return this.finalizeRender(),r||this.emitPostRender(),!0}try{let e=this.getOrCreatePreNode(a);if(!(this.canPartiallyRender(n,b,v||y||g||!RC(this.renderedDiff,C))&&this.applyPartialRender({fileDiff:C,previousRenderRange:S,renderRange:h}))){let t=this.hunksRenderer.renderDiff(C,h);if(t==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.isWorkingPool()&&this.workerManager.initialize().catch(()=>{}).then(()=>this.rerender()),!1;this.applyThemeState(a,t.themeStyles,p,t.baseThemeType),t.headerElement!=null&&this.applyHeaderToDOM(t.headerElement,a,t.fileDiff),t.additionsContentAST!=null||t.deletionsContentAST!=null||t.unifiedContentAST!=null?this.applyHunksToDOM(e,t):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(t.hunkData),this.renderedDiff=t.fileDiff}this.applyBuffers(e,h),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,t||this.flushManagers(),this.finalizeRender(),this.editor!=null&&this.syncRenderViewToEditor()}catch(e){if(w)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return r||this.emitPostRender(),!0}finalizeRender(){}emitPostRender(e=!1){let{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;this.options.onPostRender?.(t,this,`unmount`);return}if(t==null)return;let r=this.mounted?`update`:`mount`;this.mounted=!0,n?.(t,this,r)}getLatestDiff(e=this.fileDiff){return this.editSession?.diff??e}getRenderedDiff(){return this.renderedDiff}syncRenderViewToEditor(){let{editor:e,fileContainer:t}=this,n=this.getLatestAnnotations(),r=this.computeEditorRenderRange(this.renderRange),i=this.getLatestDiff();if(e==null||t==null||i==null||i.isPartial)return;let a=a=>{if(!this.enabled||this.editor!==e||this.fileContainer!==t||this.getLatestDiff()!==i)return;let o=this.editSession?.outgoingDiff,s=this.fileDiff,c=o!=null&&s!=null&&o!==i,l=c?Mk(o,s):!1;e.__syncRenderView({highlighter:a,fileContainer:t,fileDiff:i,lineAnnotations:n,renderRange:r,externalDocument:c,resetHistory:l})},o=this.getTheme(),s=i.lang??HS(i.name),c=PS({theme:o,lang:s});c==null?NS({themes:Wd(o),langs:[`text`,s],preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter}).then(a):a(c)}computeEditorRenderRange(e){let t=this.getLatestDiff();if(e==null||t==null||EE(e))return e;let{diffStyle:n=`split`,expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a,o;return ow({diff:t,diffStyle:n,startingLine:e.startingLine,totalLines:e.totalLines,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,callback:({additionLine:e})=>{e!=null&&(a??=e.lineNumber,o=e.lineNumber)}}),a==null||o==null?{...e,startingLine:0,totalLines:0}:{...e,startingLine:a-1,totalLines:o-a+1}}__acknowledgeDocumentUpdate(){this.editSession!=null&&(this.editSession.outgoingDiff=void 0)}__acceptEditorChange(e){let{lineAnnotations:t}=e;t!=null&&this.syncEditSessionAnnotationsFromEditor(t)}emitEditChange(e){let{onEditChange:t}=this.options;t?.(e)}__captureDocumentSessionState(e=!0){let{fileDiff:t,editSession:{diff:n,outgoingDiff:r}={}}=this;if(r!=null&&t!=null){if(!t.isPartial&&Mk(r,t))return;n=r}if(!(n==null||n.isPartial))return{diffSession:{oldFile:n.type===`new`?null:{name:n.prevName??n.name,lines:e?[...n.deletionLines]:n.deletionLines},type:n.type,hunks:e?lD(n.hunks):n.hunks},hasChanges:n.editSessionDirty===!0}}__attachEditor(e){if(this.type!==`file-diff`)throw Error(`FileDiff.__attachEditor: cannot attach an editor to a "${this.type}" diff`);if(this.editor!=null)throw Error(`FileDiff.__attachEditor: an editor is already attached`);let t=()=>{this.editor=void 0,this.finishEditSession()};try{return this.resumeEditorRendering(e),t}catch(e){throw t(),e}}__resumeEditor(e){if(this.editor!==e)throw Error(`FileDiff.__resumeEditor: editor association changed`);this.resumeEditorRendering(e)}resumeEditorRendering(e){let{fileDiff:t}=this,n=this.editSession?.outgoingDiff;n!=null&&t!=null&&!t.isPartial&&this.editSession?.diff===n&&this.installEditSession(t);let r=this.editSession==null&&t!=null&&!t.isPartial?t:void 0;r==null?this.editSession!=null&&this.hunksRenderer.beginEditSession(this.editSession.diff):this.installEditSession(r,e.__getDocumentContents(Lk(r)),e.__getDocumentSessionState()),this.editor=e,this.fileDiff?.isPartial===!0&&this.loadFilesIfNecessary();let i=this.editSession?.diff;this.hunksRenderer.editorRenderReady()?(i!=null&&this.hunksRenderer.diffCache===i&&(this.renderedDiff=i),this.syncRenderViewToEditor()):this.rerender()}finishEditSession(){this.hunksRenderer.endEditSession(),this.finalizeEditSessionHunks()}__completeEditSession(e,t){this.settleEditSession(t===`install`,e)}settleEditSession(e,t){let{editSession:n,fileDiff:r,lineAnnotations:i}=this;if(n==null||r==null)return;let{diff:a,annotations:o}=n;if(this.editor!=null)throw Error(`FileDiff.__completeEditSession: detach the editor before completing the session`);this.hunksRenderer.endEditSession(),this.finalizeEditSessionHunks();let s=o?.current,c,l=null,u=null,d=!1,f;if(t==null)throw Error(`FileDiff.__completeEditSession: editor is required for completion`);let p=uD(a),m={name:p.name,contents:p.additionLines.join(``)};p.lang!=null&&(m.lang=p.lang);let h={fileDiff:p,editor:t,originalFileDiff:r,oldFile:p.type===`new`?null:{name:p.prevName??p.name,contents:p.deletionLines.join(``)},newFile:m,lineAnnotations:s,originalLineAnnotations:i};Object.freeze(h);try{if(t.__emitEditComplete(h),this.options.onEditComplete?.(h)===`accept`){if(p.cacheKey!=null&&p.cacheKey===r.cacheKey)throw Error(`FileDiff.__completeEditSession: an accepted diff must not reuse the replaced diff cacheKey`);c=p,l=h.oldFile,u=h.newFile}}catch(e){d=!0,f=e}if(e&&c!=null&&(this.fileDiff=c,this.additionFile!=null&&(this.deletionFile=l,this.additionFile=u),s!=null&&(this.lineAnnotations=s)),this.editSession=void 0,e&&this.fileContainer!=null&&this.rerender(),d)throw f}finalizeEditSessionHunks(){let e=this.getLatestDiff();if(e==null||e.editSessionDirty!==!0)return!1;let{collapsedContextThreshold:t=1}=this.options,n=VO(e,this.hunksRenderer.getExpandedHunksMap(),t);return UO(e,this.options.parseDiffOptions),this.hunksRenderer.setExpandedHunksMap(HO(e,n)),this.hunksRenderer.refreshHighlightedResult(),this.escalateEditSessionRender(),!0}applyDocumentChange(e,t){let n=this.editSession?.diff;if(n==null)throw Error(`FileDiff.applyDocumentChange: requires an active edit session`);this.detachAdditionLines(),this.hunksRenderer.beginEditSession(n),this.hunksRenderer.applyDocumentChange(e),t!=null&&this.syncEditSessionAnnotationsFromEditor(t),this.rerender(),this.interactionManager.setSelectionDirty()}updateRenderCache(e,t,n={}){let r=this.editSession?.diff;if(r==null)throw Error(`FileDiff.updateRenderCache: requires an active edit session`);this.detachAdditionLines(),this.hunksRenderer.beginEditSession(r);let{shouldRefreshDiffsView:i,lineCountChangeInFlight:a}=n;if(this.hunksRenderer.updateRenderCache(e,t,a)){this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!0,this.escalateEditSessionRender();return}i===!0&&(this.refreshViewTimeout!=null&&clearTimeout(this.refreshViewTimeout),this.lineStateRefreshPending=!0,this.refreshViewTimeout=setTimeout(()=>{this.refreshViewTimeout=void 0,this.options.diffStyle===`split`?this.refreshSplitDiffView():this.refreshUnifiedDiffView(),this.flushDeferredLineState()},150))}detachAdditionLines(){let e=this.editSession?.diff,{fileDiff:t}=this;e!=null&&(e.additionLines===t?.additionLines||e.additionLines===e.deletionLines)&&(e.additionLines=[...e.additionLines])}isLineRenderable(e){let t=this.getRenderedDiff();if(t==null)return!0;let{expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options;return QC({fileDiff:t,lineNumber:e,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r})}getNearestRenderableLine(e,t){let n=this.getRenderedDiff();if(n==null)return e;let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options;return $C({fileDiff:n,lineNumber:e,direction:t,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i})}revealLine(e){let t=this.getRenderedDiff(),{expandUnchanged:n=!1,collapsedContextThreshold:r=1,expansionLineCount:i=100}=this.options;if(t==null||t.isPartial||n)return!1;let a=this.hunksRenderer.getExpandedHunksMap();for(let[n,o]of t.hunks.entries()){let[s,c]=qC(o);if(e<s){let c=JC({isPartial:t.isPartial,rangeSize:o.collapsedBefore,expandedHunks:a,hunkIndex:n,collapsedContextThreshold:r}),l=s-c.rangeSize;if(c.renderAll||e<l+c.fromStart||e>=s-c.fromEnd)return!1;let u=e-(l+c.fromStart)+1,d=s-c.fromEnd-e;return u<=d?this.expandHunk(n,`up`,u+i):this.expandHunk(n,`down`,d+i),!0}if(e<c)return!1}let o=ZC({fileDiff:t,hunkIndex:t.hunks.length-1,expandedHunks:a,collapsedContextThreshold:r,errorPrefix:`FileDiff.revealLine`});if(o==null||o.renderAll)return!1;let s=t.hunks[t.hunks.length-1],[,c]=qC(s);return e<c+o.fromStart||e>=c+o.rangeSize?!1:(this.expandHunk(t.hunks.length,`up`,e-(c+o.fromStart)+1+i),!0)}shouldSelfHealEditSession(){return this.editor==null}escalateEditSessionRender(){ET(this.handleEditSessionRender)}handleEditSessionRender=()=>{this.rerender(),this.flushDeferredLineState()};removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:`open`});this.placeHolder=document.createElement(`div`),this.placeHolder.dataset.placeholder=``,e.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty(`height`,`${e}px`),!0}async primeHighlightCache(e=this.fileDiff){let{workerManager:t}=this;if(e==null||t==null||!t.isWorkingPool()||e.cacheKey==null||VC(e))return;let n=this.options.tokenizeMaxLength??1e5;Math.max(e.additionLines.length,e.deletionLines.length)>n||await t.primeDiffHighlightCache(e).catch(e=>{console.error(e)})}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.headerCache.lastRenderedHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(e){let{hunkSeparators:t}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof t!=`function`){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();return}let n=new Map(this.separatorCache);for(let r of e){let e=r.slotName,i=this.separatorCache.get(e);if(i==null||!Ok(r,i.hunkData)){i?.element.remove();let n=document.createElement(`div`);n.style.display=`contents`,n.slot=r.slotName;let a=t(r,this);a!=null&&n.appendChild(a),this.fileContainer.appendChild(n),i={element:n,hunkData:r},this.separatorCache.set(e,i)}n.delete(e)}for(let[e,{element:t}]of n.entries())this.separatorCache.delete(e),t.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderAnnotation:t}=this.options,n=this.getLatestAnnotations();if(t!=null&&n.length>0)for(let[r,i]of n.entries()){let n=this.getAnnotationSlotName(i),a=`${r}-${n}`,o=this.annotationCache.get(a);if(o==null||!Dk(i,o.annotation)){o?.element.remove();let e=t(i);if(e==null)continue;o={element:jE(n),annotation:i},o.element.appendChild(e),this.fileContainer.appendChild(o.element),this.annotationCache.set(a,o)}e.delete(a)}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=ME();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){let{fileContainer:n}=this,r=e??n??document.createElement(`diffs-container`),i=n!==r;return n!=null&&i&&this.editor?.__captureFocusForDOMReplacement(),i&&this.emitPostRender(!0),this.fileContainer=r,n!=null&&i&&(this.headerCache.lastRenderedHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),i&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){let{shadowRoot:t}=e;if(t!=null)for(let e of t.children)e instanceof SVGElement?this.spriteSVG??=e:jT(e)&&e.hasAttribute(`data-theme-css`)?(this.themeCSSStyle??=e,this.hasAdoptedThemeCSS=!0):jT(e)&&e.hasAttribute(`data-unsafe-css`)&&(this.unsafeCSSStyle??=e,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});if(this.spriteSVG==null){let e=document.createElement(`div`);e.innerHTML=DE;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});return this.pre==null?(this.pre=document.createElement(`pre`),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(this.editor?.__captureFocusForDOMReplacement(),t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(let t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute(`data-unified`)?this.codeUnified=t:t.hasAttribute(`data-deletions`)?this.codeDeletions=t:t.hasAttribute(`data-additions`)&&(this.codeAdditions=t))}applyHeaderToDOM(e,t,n){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let{headerCache:{fileDiff:r,html:i,lastRenderedHTML:a}}=this,o=(n!==this.editSession?.diff&&RC(r,n)?i:void 0)??w_(e);if(this.headerCache.html=o,this.headerCache.fileDiff=n,o!==a){let e=document.createElement(`div`);e.innerHTML=o;let n=e.firstElementChild;if(!(n instanceof HTMLElement))return;this.headerElement==null?t.shadowRoot?.prepend(n):t.shadowRoot?.replaceChild(n,this.headerElement),this.headerElement=n,this.headerCache.lastRenderedHTML=o}if(this.isContainerManaged)return;let{renderCustomHeader:s,renderHeaderPrefix:c,renderHeaderFilenameSuffix:l,renderHeaderMetadata:u}=this.options;if(s!=null){let e=s(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,bd,e),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0;return}let d=c?.(n)??void 0,f=l?.(n)??void 0,p=u?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,_d,d),this.headerFilenameSuffix=this.upsertHeaderSlotElement(t,this.headerFilenameSuffix,vd,f),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,yd,p),this.headerCustom?.remove(),this.headerCustom=void 0}clearReusableHeader(){this.headerCache.html=void 0,this.headerCache.fileDiff=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,r){if(r==null){t?.remove();return}let i=t??this.createHeaderSlotElement(n);return t??e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement(`div`);return t.slot=e,t}injectUnsafeCSS(){let{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===``){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}(this.unsafeCSSStyle?.parentNode!==t||this.appliedUnsafeCSS!==e)&&(this.unsafeCSSStyle??=NE(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=BE(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n,o=this.getTheme(),s=typeof o==`string`?o:{...o},c=FE(i);if(this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a&&this.appliedThemeCSS.scrollbarGutter===c){this.appliedThemeCSS.theme=s;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===i){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c};return}this.themeCSSStyle=QE({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:VE(t,a,c)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c}}hydrateMeasuredScrollbar(){let e=this.fileContainer?.shadowRoot;e!=null&&this.themeCSSStyle!=null&&(this.themeCSSStyle.textContent=HE(this.themeCSSStyle.textContent??``,FE(e)))}shouldGuardRebuildScroll(){return this.editor!=null&&tD()}applyHunksToDOM(e,t){this.shouldGuardRebuildScroll()?ZE(e,()=>this.replaceCodeColumns(e,t)):this.replaceCodeColumns(e,t)}applyCodeColumnsInPlace(e,t,n){let r=this.getColumnPair(e);if(r==null)return!1;let i=Uk(t[0]),a=Uk(t[1]);return i==null||a==null?!1:(r.gutter.innerHTML=w_(i),r.content.innerHTML=w_(a),n!==this.lastRowCount&&(r.gutter.style.setProperty(`grid-row`,`span ${n}`),r.content.style.setProperty(`grid-row`,`span ${n}`)),!0)}replaceCodeColumns(e,t){let{overflow:n=`scroll`}=this.options,r=(this.options.hunkSeparators??`line-info`)===`line-info`,i=n===`wrap`?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let a=!1,o=[],s=this.hunksRenderer.renderCodeAST(`unified`,t),c=this.hunksRenderer.renderCodeAST(`deletions`,t),l=this.hunksRenderer.renderCodeAST(`additions`,t);this.editor?.__captureFocusForDOMReplacement(),s==null?c!=null||l!=null?(c==null?(this.codeDeletions?.remove(),this.codeDeletions=void 0):(a=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=XE({code:this.codeDeletions,columnType:`deletions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeDeletions,c,t.rowCount)||(this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(c)),o.push(this.codeDeletions)),l==null?(this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=a||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=XE({code:this.codeAdditions,columnType:`additions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeAdditions,l,t.rowCount)||(this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(l)),o.push(this.codeAdditions))):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=XE({code:this.codeUnified,columnType:`unified`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeUnified,s,t.rowCount)||(this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(s)),o.push(this.codeUnified)),o.length===0?e.textContent=``:a&&e.replaceChildren(...o),this.lastRowCount=t.rowCount}applyPartialRender({fileDiff:e,previousRenderRange:t,renderRange:n}){let{pre:r,codeUnified:i,codeAdditions:a,codeDeletions:o,options:{diffStyle:s=`split`}}=this;if(r==null||t==null||n==null||!Number.isFinite(t.totalLines)||!Number.isFinite(n.totalLines)||this.lastRowCount==null)return!1;let c=this.getCodeColumns(s,i,o,a);if(c==null)return!1;let l=t.startingLine,u=n.startingLine,d=l+t.totalLines,f=u+n.totalLines,p=Math.max(l,u),m=Math.min(d,f);if(m<=p)return!1;let h=Math.max(0,p-l),g=Math.max(0,d-m),_=this.trimColumns({columns:c,trimStart:h,trimEnd:g,previousStart:l,overlapStart:p,overlapEnd:m,diffStyle:s});if(_<0)throw Error(`FileDiff.applyPartialRender: failed to trim to overlap`);if(this.lastRowCount<_)throw Error(`FileDiff.applyPartialRender: trimmed beyond DOM row count`);let v=this.lastRowCount-_,y=(t,n)=>{if(!(n<=0))return this.hunksRenderer.renderDiff(e,{startingLine:t,totalLines:n,bufferBefore:0,bufferAfter:0})},b=y(u,Math.max(p-u,0));if(b==null&&u<p)return!1;let x=y(m,Math.max(f-m,0));if(x==null&&f>m)return!1;let S=(e,t)=>{if(e!=null){if(s===`unified`&&!Array.isArray(c))this.insertPartialHTML(s,c,e,t);else if(s===`split`&&Array.isArray(c))this.insertPartialHTML(s,c,e,t);else throw Error(`FileDiff.applyPartialRender.applyChunk: invalid chunk application`);v+=e.rowCount,this.renderedDiff=e.fileDiff}};return this.cleanupErrorWrapper(),S(b,`afterbegin`),S(x,`beforeend`),this.lastRowCount!==v&&(this.applyRowSpan(s,c,v),this.lastRowCount=v),!0}insertPartialHTML(e,t,n,r){if(e===`unified`&&!Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`unified`,n);this.renderPartialColumn(t,e,r)}else if(e===`split`&&Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`deletions`,n),i=this.hunksRenderer.renderCodeAST(`additions`,n);this.renderPartialColumn(t[0],e,r),this.renderPartialColumn(t[1],i,r)}else throw Error(`FileDiff.insertPartialHTML: Invalid argument composition`)}refreshSplitDiffView(){let e=this.getLatestDiff();if(this.options.diffStyle!==`split`||e==null)return;let t=this.hunksRenderer.renderDiff(e,this.renderRange);if(t==null)return;let n=this.getCodeColumns(`split`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(!Array.isArray(n))return;let r=(e,n)=>{if(n==null)return;let r=this.hunksRenderer.renderCodeAST(e,t),i=Uk(r?.[0]),a=Uk(r?.[1]);for(let[e,t]of[[n.gutter,i],[n.content,a]])if(t!=null&&e.childElementCount===t.length)for(let n=0;n<t.length;n++){let r=e.children[n],i=t[n].properties[`data-line-type`];i!=null&&r.dataset.lineType!==i&&(r.dataset.lineType=i)}};r(`deletions`,n[0]),r(`additions`,n[1]),this.renderedDiff=t.fileDiff}refreshUnifiedDiffView(){let e=this.getLatestDiff();if(this.options.diffStyle!==`unified`||e==null)return;let t=this.hunksRenderer.renderDiff(e,this.renderRange);if(t==null)return;let n=this.getCodeColumns(`unified`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(n==null||Array.isArray(n))return;let r=this.hunksRenderer.renderCodeAST(`unified`,t),i=Uk(r?.[0]),a=Uk(r?.[1]),o=()=>{for(let[e,t]of[[n.gutter,i],[n.content,a]])t!=null&&(e.innerHTML=w_(t));t.rowCount!==this.lastRowCount&&(this.applyRowSpan(`unified`,n,t.rowCount),this.lastRowCount=t.rowCount),this.renderedDiff=t.fileDiff};this.shouldGuardRebuildScroll()?ZE(this.pre,o):o(),this.renderSeparators(t.hunkData),this.managersDirty=!0,this.flushManagers(),this.syncRenderViewToEditor()}renderPartialColumn(e,t,n){if(e==null||t==null)return;let r=Uk(t[0]),i=Uk(t[1]);if(r==null||i==null)throw Error(`FileDiff.insertPartialHTML: Unexpected AST structure`);let a=i.at(0);n===`beforeend`&&a?.type===`element`&&typeof a.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(a.properties[`data-buffer-size`],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],r,i,!0);let o=i.at(-1);n===`afterbegin`&&o?.type===`element`&&typeof o.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(o.properties[`data-buffer-size`],e.content.children[0],e.gutter.children[0],r,i,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i))}mergeBuffersIfNecessary(e,t,n,r,i,a){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;let o=this.getBufferSize(t.dataset);o!=null&&(a?(r.shift(),i.shift()):(r.pop(),i.pop()),this.updateBufferSize(t,o+e),this.updateBufferSize(n,o+e))}applyRowSpan(e,t,n){let r=e=>{e!=null&&(e.gutter.style.setProperty(`grid-row`,`span ${n}`),e.content.style.setProperty(`grid-row`,`span ${n}`))};if(e===`unified`&&!Array.isArray(t))r(t);else if(e===`split`&&Array.isArray(t))r(t[0]),r(t[1]);else throw Error(`dun fuuuuked up`)}trimColumnRows(e,t,n){let r=0,i=0,a=0,o=!1,s=n>=0;if(e==null)return 0;let c=Array.from(e.content.children),l=Array.from(e.gutter.children);if(c.length!==l.length)throw Error(`FileDiff.trimColumnRows: columns do not match`);for(;a<c.length&&!(t<=0&&!s&&!o);){let e=l[a],u=c[a];if(a++,!(e instanceof HTMLElement)||!(u instanceof HTMLElement))throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: invalid row elements`);if(o&&(o=!1,e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset||e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset)){e.remove(),u.remove(),i++;continue}if(`lineIndex`in e.dataset&&`lineIndex`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),t>0&&(t--,t===0&&(o=!0)),i++),r++;continue}if(`separator`in e.dataset&&`separator`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`buffer`&&`contentBuffer`in u.dataset){let a=this.getBufferSize(u.dataset);if(a==null)throw Error(`FileDiff.trimColumnRows: invalid element`);if(t>0){let n=Math.min(t,a),r=a-n;r>0?(this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=n):(e.remove(),u.remove(),i+=a),t-=n,t===0&&r===0&&(o=!0)}else if(s){let t=r,o=r+a-1;if(n<=t)e.remove(),u.remove(),i+=a;else if(n<=o){let t=o-n+1,r=a-t;this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=t}}r+=a;continue}throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: unknown row elements`)}return i}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:r,previousStart:i,trimEnd:a,trimStart:o}){let s=Math.max(0,r-i),c=n-i;if(c<0)throw Error(`FileDiff.trimColumns: overlap ends before previous`);let l=o>0,u=a>0;if(!l&&!u)return 0;let d=l?s:0,f=u?c:-1;if(t===`unified`&&!Array.isArray(e))return this.trimColumnRows(e,d,f);if(t===`split`&&Array.isArray(e)){let t=this.trimColumnRows(e[0],d,f),n=this.trimColumnRows(e[1],d,f);if(e[0]!=null&&e[1]!=null&&t!==n)throw Error(`FileDiff.trimColumns: split columns out of sync`);return e[0]==null?n:t}throw console.error({diffStyle:t,columns:e}),Error(`FileDiff.trimColumns: Invalid columns for diffType`)}getBufferSize(e){let t=Number.parseInt(e?.bufferSize??``,10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty(`grid-row`,`span ${t}`),e.style.setProperty(`min-height`,`calc(${t} * 1lh)`)}getColumnPair(e){if(e==null)return;let t=e.children[0],n=e.children[1];if(t instanceof HTMLElement&&n instanceof HTMLElement&&t.dataset.gutter!=null&&n.dataset.content!=null)return{gutter:t,content:n}}getCodeColumns(e,t,n,r){if(e===`unified`)return this.getColumnPair(t);{let e=this.getColumnPair(n),t=this.getColumnPair(r);return e!=null||t!=null?[e,t]:void 0}}updateBuffers(e){this.pre!=null&&this.applyBuffers(this.pre,e)}applyBuffers(e,t){if(t==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore??(this.bufferBefore=document.createElement(`div`),this.bufferBefore.dataset.virtualizerBuffer=`before`,e.before(this.bufferBefore)),this.bufferBefore.style.setProperty(`height`,`${t.bufferBefore}px`),this.bufferBefore.style.setProperty(`contain`,`strict`)):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter??(this.bufferAfter=document.createElement(`div`),this.bufferAfter.dataset.virtualizerBuffer=`after`,e.after(this.bufferAfter)),this.bufferAfter.style.setProperty(`height`,`${t.bufferAfter}px`),this.bufferAfter.style.setProperty(`contain`,`strict`)):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:r},i){let{diffIndicators:a=`bars`,disableBackground:o=!1,disableLineNumbers:s=!1,overflow:c=`scroll`,diffStyle:l=`split`}=this.options,u={type:`diff`,diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:l!==`unified`&&t!=null&&n!=null,totalLines:r,customProperties:i};OE(u,this.appliedPreAttributes)||(rD(e,u),this.appliedPreAttributes=u)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let n=t.shadowRoot??t.attachShadow({mode:`open`});this.errorWrapper??=document.createElement(`div`),this.errorWrapper.dataset.errorWrapper=``,this.errorWrapper.textContent=``,n.appendChild(this.errorWrapper);let r=document.createElement(`div`);r.dataset.errorMessage=``,r.innerText=e.message,this.errorWrapper.appendChild(r);let i=document.createElement(`pre`);i.dataset.errorStack=``,i.innerText=e.stack??`No Error Stack`,this.errorWrapper.appendChild(i)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function Lk(e){return{name:e.name,lang:e.lang,contents:e.additionLines.join(``)}}function Rk(e,t){return e==null||t==null?e==null&&t==null:zC(e,t)}function zk({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function Bk({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function Vk(e,t,n=!1){return!n&&e==null&&t}function Hk(e,t,n=!1){return e==null&&t&&!n}function Uk(e){if(e!=null&&e.type===`element`)return e.children??[]}var Wk=3e3,Gk=new Map,Kk=-1,qk=class extends Ik{__id=`little-virtualized-file-diff:${++Kk}`;renderType=`virtualized`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0,fileAnnotationHeight:0,ghostTextRows:Gk,ghostTextRowsByIndex:new Map};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;pendingHydratedDiff;pendingExpansions;pendingRender;constructor(e,t,n,r,i=!1){super(e,r,i),this.virtualizer=t,this.metrics=HC(n)}setMetrics(e,t=!1){let n=HC(e);(t||!xT(this.metrics,n))&&(this.metrics=n,this.resetLayoutCache({includeEstimatedHeights:!0}))}setLineAnnotations(e){this.syncLineAnnotations(e)&&this.resetLayoutCache({includeEstimatedHeights:!1})}syncLineAnnotations(e){return e==null||!this.isNewAnnotations(e)||e.length===0&&this.getLatestAnnotations().length===0?!1:(super.setLineAnnotations(e),!0)}syncEditSessionAnnotationsFromEditor(e){return super.syncEditSessionAnnotationsFromEditor(e)?(this.resetLayoutCache({includeEstimatedHeights:!1}),!0):!1}setFileAnnotationHeight(e){let t=this.cache.fileAnnotationHeight;return e!==t&&(this.cache.fileAnnotationHeight=e,this.cache.measuredHeightDeltaTotal+=e-t,!0)}hasFileAnnotations(e){let t=this.getLatestAnnotations();return PT(t)?t.some(t=>t.lineNumber===0?e.type===`new`?t.side===`additions`:e.type!==`deleted`||t.side===`deletions`:!1):!1}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){let t=e?2:1;return this.metrics.lineHeight*t}setOptions(e){if(this.isAdvancedMode())throw Error(`VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.`);if(e==null)return;let{options:t}=this,n=!ST(t,e),r=n&&tA(t,e);super.setOptions(e),r&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:nA(t,e)}),n&&(this.forceRenderOverride=!0),n&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,r)}setThemeType(e){if(this.isAdvancedMode())throw Error(`VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.`);super.setThemeType(e)}resetLayoutCache({forceSimpleRecompute:e=!1,includeEstimatedHeights:t=!1,resetRenderRange:n=!0}={}){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal=0,this.cache.ghostTextRows=Gk,this.cache.ghostTextRowsByIndex.size>0&&this.cache.ghostTextRowsByIndex.clear(),this.invalidateDerivedLayoutCache(t,n),e&&this.isSimpleMode()&&this.computeApproximateSize()}invalidateDerivedLayoutCache(e,t=!0){this.layoutDirty=!0,this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),e&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&t&&(this.renderRange=void 0)}applyGhostTextRows(e,t){let{cache:{heightDeltas:n,ghostTextRows:r,ghostTextRowsByIndex:i},metrics:{lineHeight:a}}=this;if(r===t)return!1;let o=this.getDiffStyle(),s=new Map;for(let[n,r]of t){let t=this.getLineIndexForDiff(e,n+1,`additions`);t!=null&&s.set(o===`split`?t[1]:t[0],r)}let c=!1;for(let e of new Set([...i.keys(),...s.keys()])){let t=((s.get(e)??0)-(i.get(e)??0))*a;if(t===0)continue;let r=(n.get(e)??0)+t;r===0?n.delete(e):n.set(e,r),this.cache.measuredHeightDeltaTotal+=t,c=!0}return this.cache.ghostTextRows=t,this.cache.ghostTextRowsByIndex=s,c}reconcileHeights(){let e=!1,{options:{overflow:t=`scroll`},cache:{ghostTextRowsByIndex:n},metrics:{lineHeight:r}}=this,i=this.getRenderedDiff();if(this.fileContainer==null||i==null)return this.height!==0&&(e=!0),this.height=0,e;this.top=this.getVirtualizedTop(),e=this.applyGhostTextRows(i,this.editor?.__getGhostTextRows()??Gk);let a=this.getLatestAnnotations();if(t===`scroll`&&a.length===0&&!this.isResizeDebuggingEnabled())return e&&this.computeApproximateSize(!0),e;let o=this.getDiffStyle(),s=o===`split`?[this.codeDeletions,this.codeAdditions]:[this.codeUnified],c=this.hasFileAnnotations(i);if(this.renderRange!=null&&c&&IT(this.renderRange)){let t=Jk(s)??0;this.setFileAnnotationHeight(t)&&(e=!0)}else!c&&this.setFileAnnotationHeight(0)&&(e=!0);for(let t of s){if(t==null)continue;let i=t.children[1];if(!(i instanceof HTMLElement))continue;let a=o===`split`&&t===this.codeDeletions;for(let t of i.children){if(!(t instanceof HTMLElement))continue;let i=t.dataset.lineIndex;if(i==null)continue;let s=oA(i,o),c=n.get(s)??0;if(a&&c>0)continue;let l=t.getBoundingClientRect().height+c*r,u=!1;t.nextElementSibling instanceof HTMLElement&&(`lineAnnotation`in t.nextElementSibling.dataset||`noNewline`in t.nextElementSibling.dataset)&&(`noNewline`in t.nextElementSibling.dataset&&(u=!0),l+=t.nextElementSibling.getBoundingClientRect().height);let d=this.getEstimatedLineHeight(u),f=this.cache.heightDeltas.get(s)??0,p=l-d;p!==f&&(e=!0,this.cache.measuredHeightDeltaTotal+=p-f,p===0?this.cache.heightDeltas.delete(s):this.cache.heightDeltas.set(s,p))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer!=null&&(e&&(this.top=this.getVirtualizedTop()),this.render());flushManagers(){super.flushManagers(),this.lineStateRefreshPending&&this.flushDeferredLineState()}updateCodeViewLayout(e,t,n,r){let i=!1,a=!1,{pendingExpansions:o,pendingHydratedDiff:s,options:{collapsed:c=!1}}=this;if(s!=null&&(this.pendingHydratedDiff=void 0,s.expectedDiff===e&&(Object.assign(e,s.nextDiff),this.setHydratedState(s.files),this.startHydratedEditSession(e),this.forceRenderOverride=!0,i=!0,a=!0)),o!=null){this.pendingExpansions=void 0;for(let{hunkIndex:e,direction:t,expansionLineCountOverride:n}of o)this.hunksRenderer.expandHunk(e,t,n),this.forceRenderOverride=!0,a=!0}let l=this.updateExternalDiff(e,r),{pendingRenderDiff:u,layoutDiffChanged:d,renderedDiffChanged:f,annotationsChanged:p}=this.updatePendingRender(e,r);return!this.forceRenderOverride&&(l||f||p)&&(this.forceRenderOverride=!0),(n?.resetDiffLayoutCache===!0||d||p)&&(i=!0),(d||n?.resetDiffLayoutCache===!0&&n.includeEstimatedDiffHeights)&&(a=!0),n?.metrics!=null&&(this.metrics=HC(n.metrics),i=!0,a=!0),this.currentCollapsed!==c&&(this.currentCollapsed=c,i=!0),i?this.resetLayoutCache({includeEstimatedHeights:a}):a&&this.invalidateDerivedLayoutCache(!0),this.top=t,this.computeApproximateSize(!1,u),this.height}getLinePosition(e,t=`additions`){let n=this.getLayoutDiff();if(n==null||e<1)return;let r=this.getLineIndexForDiff(n,e,t);if(r==null)return;let{disableFileHeader:i=!1,expandUnchanged:a=!1,collapsed:o=!1,collapsedContextThreshold:s=1}=this.options,c=this.getDiffStyle(),l=this.getHunkSeparatorType(),u=c===`split`?r[1]:r[0];this.approximateLayoutCheckpoints(n);let d=UC(this.metrics,i),f=this.getLayoutCheckpointBeforeLineIndex(u),p=f?.top??d+this.cache.fileAnnotationHeight;if(o)return{top:d,height:0};let m;return ow({diff:n,diffStyle:c,startingLine:f?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s,callback:({hunkIndex:e,hunk:t,collapsedBefore:n,collapsedAfter:r,deletionLine:i,additionLine:a})=>{let o=c===`split`?a?.splitLineIndex??i?.splitLineIndex:a?.unifiedLineIndex??i?.unifiedLineIndex;if(o==null)throw Error(`VirtualizedFileDiff.getLinePosition: missing line index data`);if(n>0){let r=iw({type:l,metrics:this.metrics,hunkIndex:e,hunkSpecs:t?.hunkSpecs});if(r!=null){if(p+=r.gapBefore,u>=o-n&&u<o)return m={top:p,height:r.height},!0;p+=r.height+r.gapAfter}}let s=this.getLineHeight(o,(a?.noEOFCR??!1)||(i?.noEOFCR??!1));if(o===u)return m={top:p,height:s},!0;if(p+=s,r>0){let e=aw({type:l,metrics:this.metrics});if(e!=null){if(u>o&&u<=o+r)return m={top:p+e.gapBefore,height:e.height},!0;p+=e.totalHeight}}return!1}}),m}getEditorViewport(){return this.virtualizer.type===`simple`?this.virtualizer.getRoot():this.virtualizer.getContainerElement()}getNumericScrollAnchor(e){let t=this.getLayoutDiff();if(t==null)return;let{disableFileHeader:n=!1,expandUnchanged:r=!1,collapsed:i=!1,collapsedContextThreshold:a=1}=this.options;if(i)return;let o=this.getDiffStyle(),s=this.getHunkSeparatorType();this.approximateLayoutCheckpoints(t);let c=this.getLayoutCheckpointBeforeTop(e),l=c?.top??UC(this.metrics,n)+this.cache.fileAnnotationHeight,u;return ow({diff:t,diffStyle:o,startingLine:c?.renderedLineIndex??0,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:a,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,deletionLine:a,additionLine:c})=>{let d=o===`split`?c?.splitLineIndex??a?.splitLineIndex:c?.unifiedLineIndex??a?.unifiedLineIndex;if(d==null)throw Error(`VirtualizedFileDiff.getNumericScrollAnchor: missing line index data`);if(r>0){let e=iw({type:s,metrics:this.metrics,hunkIndex:t,hunkSpecs:n?.hunkSpecs});e!=null&&(l+=e.totalHeight)}if(l>=e&&(a==null?c!=null&&(u={lineNumber:c.lineNumber,side:`additions`,top:l}):u={lineNumber:a.lineNumber,side:`deletions`,top:l},u!=null))return!0;let f=this.getLineHeight(d,(c?.noEOFCR??!1)||(a?.noEOFCR??!1));if(l+=f,i>0){let e=aw({type:s,metrics:this.metrics});e!=null&&(l+=e.totalHeight)}return!1}}),u}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){let t=this.getLayoutDiff();if(this.top==null||t==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};let n=e==null?this.renderRange:this.computeRenderRangeFromWindow(t,this.top,e);if(n==null)return;let{bufferBefore:r,bufferAfter:i,totalLines:a}=n,o=0;if(a===0){let t=e??this.virtualizer.getWindowSpecs();this.top<t.top&&(o=i)}return{topOffset:this.top+r+o,height:this.height-(r+i)}}cleanUp(e=!1){let t=this.cache.ghostTextRows.size>0;t&&(this.layoutDirty=!0);let n=e&&this.isAdvancedMode()&&this.fileContainer!=null&&(t||!RC(this.getRenderedDiff(),this.getLatestDiff()));this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||(this.resetLayoutCache({includeEstimatedHeights:!0}),this.pendingExpansions=void 0,this.pendingHydratedDiff=void 0),this.pendingRender=void 0,this.isSetup=!1,super.cleanUp(e),n&&this.virtualizer.instanceChanged(this,!0)}expandHunk=(e,t,n)=>{this.fileDiff!=null&&(this.isAdvancedMode()?(this.pendingExpansions??=[],this.pendingExpansions.push({hunkIndex:e,direction:t,expansionLineCountOverride:n})):(this.hunksRenderer.expandHunk(e,t,n),this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()),this.loadFilesIfNecessary(),this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))};async handleFilesLoaded(e,t){if(this.fileDiff===e&&e.isPartial){if(this.isAdvancedMode()){let n=mD(`clone`,e,t);if(await iD(()=>this.primeHighlightCache(n)),!this.enabled||this.fileDiff!==e)return;this.pendingHydratedDiff={expectedDiff:e,nextDiff:n,files:t}}else{if(mD(`merge`,e,t),this.setHydratedState(t),!this.startHydratedEditSession(e)&&(await iD(()=>this.primeHighlightCache(e)),!this.enabled||this.fileDiff!==e))return;this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}}loadFilesIfNecessary(){if(this.pendingHydratedDiff!=null){if(this.pendingHydratedDiff.expectedDiff===this.fileDiff)return;this.pendingHydratedDiff=void 0}super.loadFilesIfNecessary()}isLineRenderable(e){if(super.isLineRenderable(e))return!0;let{pendingExpansions:t}=this,n=this.getRenderedDiff();if(t==null||t.length===0||n==null)return!1;let{expansionLineCount:r=100,collapsedContextThreshold:i=1}=this.options,a=new Map(this.hunksRenderer.getExpandedHunksMap());for(let e of t){let t={...a.get(e.hunkIndex)??{fromStart:0,fromEnd:0}},n=e.expansionLineCountOverride??r;(e.direction===`up`||e.direction===`both`)&&(t.fromStart+=n),(e.direction===`down`||e.direction===`both`)&&(t.fromEnd+=n),a.set(e.hunkIndex,t)}return QC({fileDiff:n,lineNumber:e,expandedHunks:a,collapsedContextThreshold:i})}invalidateEditSessionLayout(){this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1}),this.isSimpleMode()||this.computeApproximateSize(!0),this.getSimpleVirtualizer()?.requestHeightReconcile(this)}escalateEditSessionRender(){this.invalidateEditSessionLayout(),this.enabled&&this.fileDiff!=null&&(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))}shouldSelfHealEditSession(){return!this.isAdvancedMode()&&super.shouldSelfHealEditSession()}setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){if(!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null)return;let e=this.getLatestDiff(),t=e==null?void 0:this.hunksRenderer.getDiffForNextRender(e);this.isSimpleMode()&&(this.pendingRender=void 0),this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!RC(this.getRenderedDiff(),t))}syncGhostTextRows(){let e=this.getAdvancedVirtualizer();e==null?this.getSimpleVirtualizer()?.requestHeightReconcile(this):(e.capturePendingLayoutAnchor(),this.layoutDirty=!0,e.instanceChanged(this,!0))}applyDocumentChange(e,t,n=!1){let{renderRange:r}=this;this.getAdvancedVirtualizer()?.capturePendingLayoutAnchor(),super.applyDocumentChange(e,t),this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1});let i=this.getRenderedDiff();if(!this.isSimpleMode())this.computeApproximateSize(!0);else if(n&&r!=null&&i!=null){let e=this.virtualizer.getWindowSpecs(),t=this.computeRenderRangeFromWindow(i,this.top??0,e);t.bufferAfter!==r.bufferAfter&&this.updateBuffers(t)}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}computeApproximateSize(e=!1,t=this.getLayoutDiff()){let n=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!n)return;let r=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,t==null){this.layoutDirty=!1;return}this.applyGhostTextRows(t,this.editor?.__getGhostTextRows()??Gk);let{disableFileHeader:i=!1,collapsed:a=!1}=this.options,o=UC(this.metrics,i);if(this.height+=o,a){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight(t)+this.cache.measuredHeightDeltaTotal,n&&!r&&this.validateComputedHeight(t),this.layoutDirty=!1}getLayoutDiff(){return this.pendingRender?.diff??this.getRenderedDiff()}getActiveEstimatedHeight(e=this.getLayoutDiff()){this.ensureEstimatedDiffHeights(e);let t=this.getDiffStyle()===`split`?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(t==null)throw Error(`VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height`);return t}ensureEstimatedDiffHeights(e=this.getLayoutDiff()){if(e==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;let{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options,{splitHeight:i,unifiedHeight:a}=aD({fileDiff:e,metrics:this.metrics,disableFileHeader:t,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:n,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r,canHydratePartialDiff:rA(e,this.options.loadDiffFiles!=null)});this.cache.estimatedSplitHeight=i,this.cache.estimatedUnifiedHeight=a}validateComputedHeight(e=this.getLayoutDiff()){if(this.fileContainer==null||e==null)return;let t=this.fileContainer.getBoundingClientRect();t.height===this.height?console.log(`VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT`):console.log(`VirtualizedFileDiff.computeApproximateSize: computed height doesnt match`,{name:e.name,elementHeight:t.height,computedHeight:this.height})}render({fileContainer:e,fileDiff:t,forceRender:n=!1,lineAnnotations:r,...i}={}){let a=cD(i,`VirtualizedFileDiff.render`),o=a!=null,s=a?.oldFile,c=a?.newFile,l=o&&(!aA(s,this.deletionFile)||!aA(c,this.additionFile)),u=t??this.fileDiff;t==null&&o&&(l||this.fileDiff==null)&&(u=uO(a.oldFile,a.newFile,this.options.parseDiffOptions));let{forceRenderOverride:d,isSetup:f}=this;this.forceRenderOverride=void 0;let p=u!=null&&!RC(this.fileDiff,u),m=p||l;if(e=this.getOrCreateFileContainer(e),u==null)return console.error(`VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data`),!1;p&&this.updateExternalDiff(u,r);let{pendingRenderDiff:h,layoutDiffChanged:g,renderedDiffChanged:_,annotationsChanged:v}=this.pendingRender!=null&&this.pendingRender.latestDiff===(this.getLatestDiff(u)??u)?{pendingRenderDiff:this.pendingRender.diff,layoutDiffChanged:!1,renderedDiffChanged:!1,annotationsChanged:!1}:this.updatePendingRender(u,r);if((v||g)&&this.resetLayoutCache({includeEstimatedHeights:g}),f)this.top??=this.getVirtualizedTop(),g&&(this.getSimpleVirtualizer()?.markDOMDirty(),this.computeApproximateSize(!1,h));else{this.computeApproximateSize(!1,h);let t=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(t==null)throw Error(`VirtualizedFileDiff.render: simple virtualizer is not available`);t.connect(e,this),this.isVisible=t.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode()&&(!m||!f))return a!=null&&(this.deletionFile=s,this.additionFile=c),p&&this.clearReusableHeader(),this.pendingRender=void 0,this.renderPlaceholder(this.height);let y=this.virtualizer.getWindowSpecs(),b=this.top??0,x=this.computeRenderRangeFromWindow(h,b,y);return super.render({fileDiff:u,fileContainer:e,renderRange:x,lineAnnotations:r,forceRender:(d??n)||v||_||p,...a,...i})}finalizeRender(){if(this.getRenderedDiff()!==this.pendingRender?.diff)throw Error(`VirtualizedFileDiff.render: rendered a different diff than its prepared layout`);this.pendingRender=void 0,this.isSimpleMode()&&this.getSimpleVirtualizer()?.requestHeightReconcile(this)}updatePendingRender(e,t){let n=this.getLatestDiff(e)??e,r=this.getRenderedDiff(),{pendingRender:i}=this,a=i?.diff??r,o=this.hunksRenderer.getDiffForNextRender(n);return this.pendingRender={latestDiff:n,diff:o},{pendingRenderDiff:o,annotationsChanged:this.syncLineAnnotations(t),layoutDiffChanged:!RC(a,o),renderedDiffChanged:!RC(r,o)}}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}shouldGuardRebuildScroll(){return!1}isSimpleMode(){return this.virtualizer.type===`simple`}isAdvancedMode(){return this.virtualizer.type===`advanced`}getVirtualizedTop(){return this.virtualizer.type===`advanced`?this.virtualizer.getLocalTopForInstance(this):this.fileContainer==null?0:this.virtualizer.getOffsetInScrollContainer(this.fileContainer)}getSimpleVirtualizer(){return this.virtualizer.type===`simple`?this.virtualizer:void 0}getAdvancedVirtualizer(){return this.virtualizer.type===`advanced`?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??`split`}getHunkSeparatorType(){return iA(this.options.hunkSeparators)}approximateLayoutCheckpoints(e){if(!this.layoutDirty&&this.cache.checkpoints.length>0||e.hunks.length===0||this.options.collapsed===!0)return;let{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options,i=e.hunks.length-1,a=rA(e,this.options.loadDiffFiles!=null),o=this.getDiffStyle(),s=this.getHunkSeparatorType(),c=n?!0:this.hunksRenderer.getExpandedHunksMap(),l=Yk(this.cache.heightDeltas),u=UC(this.metrics,t)+this.cache.fileAnnotationHeight,d=0,f=({rowCount:e,startLineIndex:t,preSeparatorHeight:n=0,postSeparatorHeight:r=0,metadataOffsets:i=[]})=>{if(e<=0)return;let a=d,o=d+e,s=Qk(a);for(;s<o;){let e=s-a,r=u+(e>0?n:0)+e*this.metrics.lineHeight+$k(i,e)*this.metrics.lineHeight+Xk(l,t,t+e);this.cache.checkpoints.push({renderedLineIndex:s,lineIndex:t+e,top:r}),s+=Wk}u+=n+e*this.metrics.lineHeight+i.length*this.metrics.lineHeight+Xk(l,t,t+e)+r,d=o};for(let t=0;t<e.hunks.length;t++){let n=e.hunks[t];if(n==null)throw Error(`VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index`);let l=JC({isPartial:e.isPartial,rangeSize:n.collapsedBefore,expandedHunks:c,hunkIndex:t,collapsedContextThreshold:r}),u=l.collapsedLines>0?iw({type:s,metrics:this.metrics,hunkIndex:t,hunkSpecs:n.hunkSpecs})?.totalHeight??0:0;f({rowCount:l.fromStart,startLineIndex:(o===`split`?n.splitLineStart:n.unifiedLineStart)-l.rangeSize});let d=u;f({rowCount:l.fromEnd,startLineIndex:(o===`split`?n.splitLineStart:n.unifiedLineStart)-l.fromEnd,preSeparatorHeight:d}),l.fromEnd>0&&(d=0);let p=t===i?ZC({fileDiff:e,hunkIndex:t,expandedHunks:c,collapsedContextThreshold:r,errorPrefix:`VirtualizedFileDiff`}):void 0,m=p!=null&&p.collapsedLines>0||t===i&&a?aw({type:s,metrics:this.metrics})?.totalHeight??0:0,h=p==null?0:p.fromStart+p.fromEnd,g=o===`split`?n.splitLineCount:n.unifiedLineCount,_=o===`split`?n.splitLineStart:n.unifiedLineStart;f({rowCount:g,startLineIndex:_,preSeparatorHeight:d,postSeparatorHeight:h===0?m:0,metadataOffsets:eA({diffStyle:o,hunk:n,rowCount:g})}),p!=null&&h>0&&f({rowCount:h,startLineIndex:_+g,postSeparatorHeight:m})}this.cache.totalLines=d}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,r;for(;t<=n;){let i=t+n>>1,a=this.cache.checkpoints[i];if(a==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);a.lineIndex<=e?(r=a,t=i+1):n=i-1}return r}getLayoutCheckpointBeforeTop(e,t){let n=0,r=this.cache.checkpoints.length-1,i=-1;for(;n<=r;){let t=n+r>>1,a=this.cache.checkpoints[t];if(a==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);a.top<=e?(i=t,n=t+1):r=t-1}if(t==null)return i>=0?this.cache.checkpoints[i]:void 0;for(let e=i;e>=0;e--){let n=this.cache.checkpoints[e];if(n==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);if(n.renderedLineIndex%t===0)return n}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(let r of e.hunks)n+=t===`split`?r.splitLineCount:r.unifiedLineCount;return n}let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a=r?!0:this.hunksRenderer.getExpandedHunksMap();for(let[r,o]of e.hunks.entries()){let s=t===`split`?o.splitLineCount:o.unifiedLineCount;n+=s;let c=Math.max(o.collapsedBefore,0),{fromStart:l,fromEnd:u,renderAll:d}=JC({isPartial:e.isPartial,rangeSize:c,expandedHunks:a,hunkIndex:r,collapsedContextThreshold:i});c>0&&(n+=d?c:l+u)}let o=ZC({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:a,collapsedContextThreshold:i,errorPrefix:`VirtualizedFileDiff`});return o!=null&&(n+=o.fromStart+o.fromEnd),n}getLayoutLineCount(e,t){let n=this.getExpandedLineCount(e,t),r=t===`split`?e.splitLineCount:e.unifiedLineCount;return Math.max(n,r,e.additionLines.length,e.deletionLines.length,this.cache.totalLines)}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){let{disableFileHeader:i=!1,expandUnchanged:a=!1,collapsedContextThreshold:o=1}=this.options,{hunkLineCount:s,lineHeight:c}=this.metrics,l=this.getDiffStyle(),u=this.getHunkSeparatorType(),d=rA(e,this.options.loadDiffFiles!=null),f=this.height,p=this.getLayoutLineCount(e,l),m=UC(this.metrics,i),h=e.hunks.length>0?GC(this.metrics):0,{fileAnnotationHeight:g}=this.cache,_=m+g,v=Math.max(0,f-m-g-h),y=this.hasFileAnnotations(e),b=t+m,x=g>0&&y&&b<r&&b+g>n;if(t<n-f||t>r)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-m-h};if(p<=s||e.hunks.length===0)return{startingLine:0,totalLines:s,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(e),p=this.getLayoutLineCount(e,l);let S=Math.ceil(Math.max(r-n,0)/c),C=Math.ceil(S/s)*s+s,w=C/s,T=w,E=[],D=(n+r)/2,O=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-C*c*2),s),k=t+(O?.top??_),A=O?.renderedLineIndex??0,j,M,N;if(ow({diff:e,diffStyle:l,startingLine:O?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:i,hunk:a,collapsedBefore:o,collapsedAfter:c,deletionLine:f,additionLine:p})=>{let m=p==null?f.splitLineIndex:p.splitLineIndex,h=p==null?f.unifiedLineIndex:p.unifiedLineIndex,g=(p?.noEOFCR??!1)||(f?.noEOFCR??!1),v=i===e.hunks.length-1&&a!=null&&(l===`split`?m===a.splitLineStart+a.splitLineCount-1:h===a.unifiedLineStart+a.unifiedLineCount-1),y=(o>0?iw({type:u,metrics:this.metrics,hunkIndex:i,hunkSpecs:a?.hunkSpecs}):void 0)?.totalHeight??0;k+=y;let b=A%s===0,x=Math.floor(A/s);if(b&&(E[x]=k-(t+_+y),N!=null)){if(N<=0)return!0;N--}let S=this.getLineHeight(l===`split`?m:h,g);if(k>n-S&&k<r&&(j??=x),M==null&&k+S>D&&(M=x),N==null&&k>=r&&b&&(N=T),A++,k+=S,c>0||v&&d){let e=aw({type:u,metrics:this.metrics});e!=null&&(k<r&&k+e.totalHeight>n&&(j??=x),M==null&&k+e.totalHeight>D&&(M=x),k+=e.totalHeight)}return!1}}),j==null){if(x)j=0,M=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-m-h}}M??=j;let P=Math.round(M-w/2),F=Math.max(0,Math.ceil(p/s)-w),I=Math.max(0,Math.min(P,F)),L=I*s,R=P<0?C+P*s:C,z=E[I]??0,B=L===0?0:g+z,V=I+R/s,H=V<E.length?v-E[V]:v-(k-t-_);return{startingLine:L,totalLines:R,bufferBefore:B,bufferAfter:Math.max(0,H)}}};function Jk(e){let t;for(let n of e){if(n==null)continue;let e=n.children[1];if(e instanceof HTMLElement)for(let n of e.children)n instanceof HTMLElement&&n.dataset.lineAnnotation===NT&&(t=Math.max(t??0,n.getBoundingClientRect().height))}return t}function Yk(e){let t=Array.from(e).sort((e,t)=>e[0]-t[0]),n=[],r=[0],i=0;for(let[e,a]of t)n.push(e),i+=a,r.push(i);return{lineIndexes:n,prefixTotals:r}}function Xk({lineIndexes:e,prefixTotals:t},n,r){if(n>=r||e.length===0)return 0;let i=Zk(e,n);return(t[Zk(e,r)]??0)-(t[i]??0)}function Zk(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>1,a=e[i];if(a==null)throw Error(`VirtualizedFileDiff: invalid prefix index`);a<t?n=i+1:r=i}return n}function Qk(e){return Math.ceil(e/Wk)*Wk}function $k(e,t){let n=0;for(let r of e)r<t&&n++;return n}function eA({diffStyle:e,hunk:t,rowCount:n}){if(n<=0||!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return[];let r=t.hunkContent.at(-1);if(r==null)return[];if(r.type===`context`)return[n-1];let i=Math.max(r.deletions,r.additions),a=r.deletions+r.additions;if(e===`split`)return i>0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[n-1]:[];let o=[],s=n-a;return r.deletions>0&&t.noEOFCRDeletions&&o.push(s+r.deletions-1),r.additions>0&&t.noEOFCRAdditions&&o.push(n-1),o}function tA(e,t){return(e.diffStyle??`split`)!==(t.diffStyle??`split`)||(e.overflow??`scroll`)!==(t.overflow??`scroll`)||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.diffIndicators??`bars`)!==(t.diffIndicators??`bars`)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||!!e.loadDiffFiles!=!!t.loadDiffFiles||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)||e.unsafeCSS!==t.unsafeCSS}function nA(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||!!e.loadDiffFiles!=!!t.loadDiffFiles||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function rA(e,t){return e.isPartial&&t&&(e.type===`change`||e.type===`rename-changed`)}function iA(e){return typeof e==`function`?`custom`:e??`line-info`}function aA(e,t){return e==null||t==null?e==null&&t==null:zC(e,t)}function oA(e,t){let[n,r]=e.split(`,`).map(Number);return t===`split`?r:n}function sA(e,t){return typeof window>`u`&&t!=null?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t}}),e]}):(0,Y.jsx)(Y.Fragment,{children:e})}function cA(e,t){return e==null||t==null?e===t:e.top===t.top&&e.bottom===t.bottom}var lA=1e3,uA=lA*4,dA=[0,1e-6,.99999,1],fA={overscrollSize:lA,intersectionObserverMargin:uA,resizeDebugging:!1},pA=0,mA=-1,hA=class e{static __STOP=!1;static __lastScrollPosition=0;__id=`virtualizer-${++mA}`;config;type=`simple`;intersectionObserver;scrollTop=0;height=0;scrollHeight=0;windowSpecs={top:0,bottom:0};root;contentContainer;resizeObserver;observers=new Map;visibleInstances=new Map;visibleInstancesDirty=!1;instancesChanged=new Set;reconcileQueue=new Set;scrollDirty=!0;heightDirty=!0;scrollHeightDirty=!0;renderedObservers=0;connectQueue=new Map;constructor(e){this.config={...fA,...e}}setup(t,n){if(this.root==null){this.root=t,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:dA,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),t instanceof Document?this.setupWindow():this.setupElement(n),window.__INSTANCE=this,window.__TOGGLE=()=>{e.__STOP?(e.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:e.__lastScrollPosition}),ET(this.computeRenderRangeAndEmit)):(e.__lastScrollPosition=this.getScrollTop(),e.__STOP=!0)};for(let[e,t]of this.connectQueue.entries())this.connect(e,t);this.connectQueue.clear(),this.markDOMDirty(),ET(this.computeRenderRangeAndEmit)}}instanceChanged(e,t){this.instancesChanged.add(e),t&&this.markDOMDirty(),ET(this.computeRenderRangeAndEmit)}requestHeightReconcile(e){this.reconcileQueue.add(e),ET(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=AT({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}getRoot(){return this.root}isInstanceVisible(e,t){let n=this.getScrollTop(),r=this.getHeight(),i=this.config.intersectionObserverMargin,a=n-i,o=n+r+i;return!(e<a-t||e>o)}handleContainerResize=e=>{if(this.root==null)return;let t=!1;for(let n of e){let e=n.borderBoxSize[0].blockSize;this.root instanceof Document?e!==this.scrollHeight&&(this.scrollHeightDirty=!0,t=!0,this.config.resizeDebugging&&(console.log(`Virtualizer: content size change`,this.__id,{sizeChange:e-pA,newSize:e}),pA=e)):n.target===this.root?e!==this.height&&(this.heightDirty=!0,t=!0):n.target===this.contentContainer&&(this.scrollHeightDirty=!0,t=!0,this.config.resizeDebugging&&(console.log(`Virtualizer: scroller size change`,this.__id,{sizeChange:e-pA,newSize:e}),pA=e))}t&&ET(this.computeRenderRangeAndEmit)};setupWindow(){if(this.root==null||!(this.root instanceof Document))throw Error(`Virtualizer.setupWindow: Invalid setup method`);window.addEventListener(`scroll`,this.handleWindowScroll,{passive:!0}),window.addEventListener(`resize`,this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(e){if(this.root==null||this.root instanceof Document)throw Error(`Virtualizer.setupElement: Invalid setup method`);this.root.addEventListener(`scroll`,this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),e??=this.root.firstElementChild??void 0,e instanceof HTMLElement&&(this.contentContainer=e,this.resizeObserver?.observe(e))}cleanUp(){DT(this.computeRenderRangeAndEmit),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener(`scroll`,this.handleElementScroll),window.removeEventListener(`scroll`,this.handleWindowScroll),window.removeEventListener(`resize`,this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.reconcileQueue.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.scrollHeightDirty=!0}getOffsetInScrollContainer(e){return this.getScrollTop()+gA(e,this.getScrollContainerElement())}connect(e,t){if(this.observers.has(e))throw Error(`Virtualizer.connect: instance is already connected...`);return this.intersectionObserver==null?this.connectQueue.set(e,t):(this.intersectionObserver.observe(e),this.observers.set(e,t),this.instancesChanged.add(t),this.markDOMDirty(),ET(this.computeRenderRangeAndEmit)),()=>this.disconnect(e)}disconnect(e){let t=this.observers.get(e);this.connectQueue.delete(e),t!=null&&(this.intersectionObserver?.unobserve(e),this.observers.delete(e),this.instancesChanged.delete(t),this.reconcileQueue.delete(t),this.visibleInstances.delete(e)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),ET(this.computeRenderRangeAndEmit))}handleWindowResize=()=>{e.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,ET(this.computeRenderRangeAndEmit))};handleWindowScroll=()=>{!e.__STOP&&this.root!=null&&this.root instanceof Document&&(this.scrollDirty=!0,ET(this.computeRenderRangeAndEmit))};handleElementScroll=()=>{e.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,ET(this.computeRenderRangeAndEmit))};computeRenderRangeAndEmit=()=>{if(e.__STOP)return;let t=this.heightDirty||this.scrollHeightDirty,n=this.instancesChanged.size>0;if(this.instancesChanged.size===0){let e=AT({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!t&&cA(this.windowSpecs,e)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.reconcileQueue.size===0)return;this.windowSpecs=e}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;let r=this.getScrollAnchor(this.height),i=new Set;for(let e of t?this.observers.values():this.visibleInstances.values())e.onRender(t)&&i.add(e);for(let e of this.instancesChanged)i.has(e)||e.onRender(t)&&i.add(e);this.scrollFix(r);for(let e of i)this.reconcileQueue.delete(e),e.reconcileHeights();for(let e of this.reconcileQueue)e.reconcileHeights()&&(n=!0);this.reconcileQueue.clear(),n||=this.instancesChanged.size>0,n&&this.markDOMDirty(),(n||t)&&ET(this.computeRenderRangeAndEmit),i.clear(),this.instancesChanged.clear()};scrollFix(e){if(e==null)return;let t=this.getScrollContainerElement(),{lineIndex:n,lineOffset:r,fileElement:i,fileOffset:a,fileTypeOffset:o}=e;if(n!=null&&r!=null){let e=i.shadowRoot?.querySelector(`[data-line][data-line-index="${n}"]`);if(e instanceof HTMLElement){let n=gA(e,t);if(n!==r){let e=n-r;this.applyScrollFix(e)}return}}let s=gA(i,t);if(o===`top`)s!==a&&this.applyScrollFix(s-a);else{let e=s+i.getBoundingClientRect().height;e!==a&&this.applyScrollFix(e-a)}}applyScrollFix(e){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+e,behavior:`instant`}):this.root.scrollTo({top:this.root.scrollTop+e,behavior:`instant`}),this.markDOMDirty()}getScrollAnchor(e){let t=this.getScrollContainerElement(),n;for(let[r]of this.visibleInstances.entries()){let i=gA(r,t),a=i+r.offsetHeight,o,s;a<=0?(o=a,s=`bottom`):(o=i,s=`top`);let c,l;if(a>0&&i<e)for(let e of r.shadowRoot?.querySelectorAll(`[data-line][data-line-index]`)??[]){if(!(e instanceof HTMLElement))continue;let n=e.dataset.lineIndex;if(n==null)continue;let r=gA(e,t);if(!(r<0)){c=n,l=r;break}}if(n?.lineOffset!=null&&l==null)continue;let u=!1;(n==null||l!=null&&(n.lineOffset==null||l<n.lineOffset)||l==null&&n.lineOffset==null&&(o>=0&&(n.fileOffset<0||o<n.fileOffset)||o<0&&n.fileOffset<0&&o>n.fileOffset))&&(u=!0),u&&(n={fileElement:r,fileTypeOffset:s,fileOffset:o,lineIndex:c,lineOffset:l})}return n}handleIntersectionChange=e=>{this.scrollDirty=!0;for(let{target:t,isIntersecting:n}of e){if(!(t instanceof HTMLElement))throw Error(`Virtualizer.handleIntersectionChange: target not an HTMLElement`);let e=this.observers.get(t);e!=null&&(n&&!this.visibleInstances.has(t)?(e.setVisibility(!0),this.visibleInstances.set(t,e),this.visibleInstancesDirty=!0):!n&&this.visibleInstances.has(t)&&(e.setVisibility(!1),this.visibleInstances.delete(t),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&ET(this.computeRenderRangeAndEmit)};getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let e=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return e=this.clampScrollTop(e),this.scrollTop=e,e}scrollTo({top:e,behavior:t=`auto`}){let{root:n}=this;if(n==null)return;let r=this.clampScrollTop(e);n instanceof Document?window.scrollTo({top:r,behavior:t}):n.scrollTo({top:r,behavior:t}),this.scrollDirty=!0,ET(this.computeRenderRangeAndEmit)}clampScrollTop(e){return Math.max(0,Math.min(e,this.getScrollHeight()-this.getHeight()))}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}};function gA(e,t){let n=e.getBoundingClientRect(),r=t?.getBoundingClientRect().top??0;return n.top-r}var _A=(0,b.createContext)(void 0);function vA({children:e,config:t,className:n,style:r,contentClassName:i,contentStyle:a}){let[o]=(0,b.useState)(()=>typeof window<`u`?new hA(t):void 0),s=(0,b.useCallback)(e=>{e==null?o?.cleanUp():o?.setup(e)},[o]);return(0,Y.jsx)(_A.Provider,{value:o,children:(0,Y.jsx)(`div`,{className:n,style:r,ref:s,children:(0,Y.jsx)(`div`,{className:i,style:a,children:e})})})}function yA(){return(0,b.useContext)(_A)}var bA=typeof window>`u`?b.useEffect:b.useLayoutEffect;function xA({fileDiff:e,oldFile:t,newFile:n,options:r,editorOptions:i,editStateKey:a,lineAnnotations:o,selectedLines:s,prerenderedHTML:c,metrics:l,hasGutterRenderUtility:u,hasCustomHeader:d,disableWorkerPool:f,edit:p,onEditChange:m,onEditComplete:h}){let g=yA(),_=s!==void 0,v=(0,b.useContext)(vT),y=ad(),x=rd(e=>m?.(e)),S=m==null?void 0:x,C=(0,b.useRef)(null),w=rd(r=>{let i=h?.(r)??`reject`;return i===`accept`&&(C.current={fileDiff:{installed:r.fileDiff,stale:r.originalFileDiff},filePair:e==null?{fileDiff:r.fileDiff,installed:{oldFile:r.oldFile,newFile:r.newFile},stale:{oldFile:t??null,newFile:n??null}}:null,annotations:{installed:r.lineAnnotations,stale:r.originalLineAnnotations}}),i}),T=h==null?void 0:w,E=SA({acceptedCache:C,fileDiff:e,newFile:n,oldFile:t,parseDiffOptions:r?.parseDiffOptions}),D=(0,b.useRef)(null),O=(0,b.useRef)(null),k=rd(()=>{if(y==null)throw Error(`FileDiff: EditContext is not attached`);return y(`file-diff`,i??{},a)}),A=rd(e=>{if(e!=null){if(D.current!=null)throw Error(`useFileDiffInstance: An instance should not already exist when a node is created`);g==null?D.current=new Ik(TA({controlledSelection:_,hasCustomHeader:d,hasGutterRenderUtility:u,onEditChange:S,onEditComplete:T,options:r}),f?void 0:v,!0):D.current=new qk(TA({controlledSelection:_,hasCustomHeader:d,hasGutterRenderUtility:u,onEditChange:S,onEditComplete:T,options:r}),g,l,f?void 0:v,!0),p&&O.current==null&&(O.current=EA(D.current,k)),D.current.hydrate({fileDiff:E,fileContainer:e,lineAnnotations:o,prerenderedHTML:c})}else{if(D.current==null)throw Error(`useFileDiffInstance: A FileDiff instance should exist when unmounting`);D.current.cleanUp(),D.current=null,O.current=null}});return bA(()=>{let{current:e}=D;if(e==null)return;let t=TA({controlledSelection:_,hasCustomHeader:d,hasGutterRenderUtility:u,onEditChange:S,onEditComplete:T,options:r}),n=t!==void 0&&!ST(e.options,t);if(e.setOptions(t),!p&&O.current!=null){let{current:e}=O;O.current=null,e()}let i=wA(E,o,C);e.render({forceRender:n,fileDiff:i.fileDiff,lineAnnotations:i.lineAnnotations}),s!==void 0&&e.setSelectedLines(s),p&&O.current==null&&(O.current=EA(e,k))}),{fileDiff:E,ref:A,getHoveredLine:(0,b.useCallback)(()=>D.current?.getHoveredLine(),[]),getAnnotationSlotName:(0,b.useCallback)(e=>D.current?.getAnnotationSlotName(e)??jd(e),[])}}function SA({acceptedCache:e,fileDiff:t,newFile:n,oldFile:r,parseDiffOptions:i}){return(0,b.useMemo)(()=>{if(t!=null)return t;let{current:a}=e,o=a?.filePair;if(a!=null&&o!=null){if(CA(r,n,o.stale)||CA(r,n,o.installed))return o.fileDiff;a.filePair=null}return uO(r??null,n??null,i)},[e,t,r,n,i])}function CA(e,t,n){return MT(e??void 0,n.oldFile??void 0)&&MT(t??void 0,n.newFile??void 0)}function wA(e,t,n){let{current:r}=n;if(r==null)return{fileDiff:e,lineAnnotations:t};let{fileDiff:i,annotations:a}=r,o=e;i!=null&&(RC(e,i.stale)?o=i.installed:r.fileDiff=null);let s=t;return a!=null&&(t===a.stale?s=a.installed:r.annotations=null),r.fileDiff==null&&r.annotations==null&&r.filePair==null&&(n.current=null),{fileDiff:o,lineAnnotations:s}}function TA({options:e,controlledSelection:t,hasCustomHeader:n,hasGutterRenderUtility:r,onEditChange:i,onEditComplete:a}){return t||r||n||i!=null||a!=null?{...e,controlledSelection:t,renderCustomHeader:n?cd:e?.renderCustomHeader,renderGutterUtility:r?cd:e?.renderGutterUtility,onEditChange:i,onEditComplete:a}:e}function EA(e,t){let n=t();try{return n.edit(e)}catch(e){throw n.cleanUp(),e}}function DA({fileDiff:e,options:t,editorOptions:n,editStateKey:r,metrics:i,lineAnnotations:a,selectedLines:o,className:s,style:c,prerenderedHTML:l,renderAnnotation:u,renderCustomHeader:d,renderHeaderPrefix:f,renderHeaderFilenameSuffix:p,renderHeaderMetadata:m,renderGutterUtility:h,disableWorkerPool:g=!1,edit:_=!1,onEditChange:v,onEditComplete:y}){let{ref:b,getHoveredLine:x,getAnnotationSlotName:S}=xA({fileDiff:e,options:t,editorOptions:n,editStateKey:r,metrics:i,lineAnnotations:a,selectedLines:o,prerenderedHTML:l,hasGutterRenderUtility:h!=null,hasCustomHeader:d!=null,disableWorkerPool:g,edit:_,onEditChange:v,onEditComplete:y}),C=Ld({fileDiff:e,renderCustomHeader:d,renderHeaderPrefix:f,renderHeaderFilenameSuffix:p,renderHeaderMetadata:m,renderAnnotation:u,renderGutterUtility:h,lineAnnotations:a,getHoveredLine:x,getAnnotationSlotName:S});return(0,Y.jsx)(ld,{ref:b,className:s,style:c,children:sA(C,l)})}var OA=_(),kA=y();function AA(e){return new Worker(`/assets/worker-ChAoQz0Q.js`,{name:e?.name})}var jA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z`}))]]),MA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M204,32V176a12,12,0,0,1-12,12H77l27.52,27.51a12,12,0,0,1-17,17l-48-48a12,12,0,0,1,0-17l48-48a12,12,0,1,1,17,17L77,164H180V32a12,12,0,0,1,24,0Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M96,128v96L48,176Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M192,24a8,8,0,0,0-8,8V168H104V128a8,8,0,0,0-13.66-5.66l-48,48a8,8,0,0,0,0,11.32l48,48A8,8,0,0,0,104,224V184h88a8,8,0,0,0,8-8V32A8,8,0,0,0,192,24ZM88,204.69,59.31,176,88,147.31Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M200,32V176a8,8,0,0,1-8,8H104v40a8,8,0,0,1-13.66,5.66l-48-48a8,8,0,0,1,0-11.32l48-48A8,8,0,0,1,104,128v40h80V32a8,8,0,0,1,16,0Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M198,32V176a6,6,0,0,1-6,6H62.49l37.75,37.76a6,6,0,1,1-8.48,8.48l-48-48a6,6,0,0,1,0-8.48l48-48a6,6,0,1,1,8.48,8.48L62.49,170H186V32a6,6,0,0,1,12,0Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M200,32V176a8,8,0,0,1-8,8H67.31l34.35,34.34a8,8,0,0,1-11.32,11.32l-48-48a8,8,0,0,1,0-11.32l48-48a8,8,0,0,1,11.32,11.32L67.31,168H184V32a8,8,0,0,1,16,0Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M196,32V176a4,4,0,0,1-4,4H57.66l41.17,41.17a4,4,0,0,1-5.66,5.66l-48-48a4,4,0,0,1,0-5.66l48-48a4,4,0,1,1,5.66,5.66L57.66,172H188V32a4,4,0,0,1,8,0Z`}))]]),NA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,128l-72,72V56Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M221.66,122.34l-72-72A8,8,0,0,0,136,56v64H40a8,8,0,0,0,0,16h96v64a8,8,0,0,0,13.66,5.66l72-72A8,8,0,0,0,221.66,122.34ZM152,180.69V75.31L204.69,128Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M221.66,133.66l-72,72A8,8,0,0,1,136,200V136H40a8,8,0,0,1,0-16h96V56a8,8,0,0,1,13.66-5.66l72,72A8,8,0,0,1,221.66,133.66Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M220.24,132.24l-72,72a6,6,0,0,1-8.48-8.48L201.51,134H40a6,6,0,0,1,0-12H201.51L139.76,60.24a6,6,0,0,1,8.48-8.48l72,72A6,6,0,0,1,220.24,132.24Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z`}))]]),PA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z`}))]]),FA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM119.51,96.49a12,12,0,0,0,17,0l32-32a12,12,0,0,0-17-17L140,59V16a12,12,0,0,0-24,0V59L104.49,47.51a12,12,0,0,0-17,17Zm17,63a12,12,0,0,0-17,0l-32,32a12,12,0,0,0,17,17L116,197v43a12,12,0,0,0,24,0V197l11.51,11.52a12,12,0,0,0,17-17Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,32V224a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V32A16,16,0,0,1,56,16H200A16,16,0,0,1,216,32Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM122.34,101.66a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32L136,76.69V16a8,8,0,0,0-16,0V76.69L101.66,58.34A8,8,0,0,0,90.34,69.66Zm11.32,52.68a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L120,179.31V240a8,8,0,0,0,16,0V179.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M90.34,69.66A8,8,0,0,1,96,56h24V16a8,8,0,0,1,16,0V56h24a8,8,0,0,1,5.66,13.66l-32,32a8,8,0,0,1-11.32,0Zm43.32,84.68a8,8,0,0,0-11.32,0l-32,32A8,8,0,0,0,96,200h24v40a8,8,0,0,0,16,0V200h24a8,8,0,0,0,5.66-13.66ZM216,120H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128Zm-98.24-27.76a6,6,0,0,0,8.48,0l32-32a6,6,0,0,0-8.48-8.48L134,81.51V16a6,6,0,0,0-12,0V81.51L100.24,59.76a6,6,0,0,0-8.48,8.48Zm8.48,55.52a6,6,0,0,0-8.48,0l-32,32a6,6,0,0,0,8.48,8.48L122,174.49V240a6,6,0,0,0,12,0V174.49l21.76,21.75a6,6,0,0,0,8.48-8.48Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM122.34,101.66a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32L136,76.69V16a8,8,0,0,0-16,0V76.69L101.66,58.34A8,8,0,0,0,90.34,69.66Zm11.32,52.68a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L120,179.31V240a8,8,0,0,0,16,0V179.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128ZM125.17,98.83a4,4,0,0,0,5.66,0l32-32a4,4,0,1,0-5.66-5.66L132,86.34V16a4,4,0,0,0-8,0V86.34L98.83,61.17a4,4,0,0,0-5.66,5.66Zm5.66,58.34a4,4,0,0,0-5.66,0l-32,32a4,4,0,0,0,5.66,5.66L124,169.66V240a4,4,0,0,0,8,0V169.66l25.17,25.17a4,4,0,0,0,5.66-5.66Z`}))]]),IA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM104.49,56.48,116,45V88a12,12,0,0,0,24,0V45l11.51,11.51a12,12,0,0,0,17-17l-32-32a12,12,0,0,0-17,0l-32,32a12,12,0,0,0,17,17Zm47,143L140,211V168a12,12,0,0,0-24,0v43l-11.51-11.52a12,12,0,0,0-17,17l32,32a12,12,0,0,0,17,0l32-32a12,12,0,0,0-17-17Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,32V224a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V32A16,16,0,0,1,56,16H200A16,16,0,0,1,216,32Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM101.66,53.66,120,35.31V96a8,8,0,0,0,16,0V35.31l18.34,18.35a8,8,0,0,0,11.32-11.32l-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32Zm52.68,148.68L136,220.69V160a8,8,0,0,0-16,0v60.69l-18.34-18.35a8,8,0,0,0-11.32,11.32l32,32a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M88.61,51.06a8,8,0,0,1,1.73-8.72l32-32a8,8,0,0,1,11.32,0l32,32A8,8,0,0,1,160,56H136V96a8,8,0,0,1-16,0V56H96A8,8,0,0,1,88.61,51.06ZM216,120H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Zm-56,80H136V160a8,8,0,0,0-16,0v40H96a8,8,0,0,0-5.66,13.66l32,32a8,8,0,0,0,11.32,0l32-32A8,8,0,0,0,160,200Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128ZM100.24,52.24,122,30.49V96a6,6,0,0,0,12,0V30.49l21.76,21.75a6,6,0,0,0,8.48-8.48l-32-32a6,6,0,0,0-8.48,0l-32,32a6,6,0,0,0,8.48,8.48Zm55.52,151.52L134,225.51V160a6,6,0,0,0-12,0v65.51l-21.76-21.75a6,6,0,0,0-8.48,8.48l32,32a6,6,0,0,0,8.48,0l32-32a6,6,0,0,0-8.48-8.48Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM101.66,53.66,120,35.31V96a8,8,0,0,0,16,0V35.31l18.34,18.35a8,8,0,0,0,11.32-11.32l-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32Zm52.68,148.68L136,220.69V160a8,8,0,0,0-16,0v60.69l-18.34-18.35a8,8,0,0,0-11.32,11.32l32,32a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128ZM98.83,50.83,124,25.66V96a4,4,0,0,0,8,0V25.66l25.17,25.17a4,4,0,1,0,5.66-5.66l-32-32a4,4,0,0,0-5.66,0l-32,32a4,4,0,0,0,5.66,5.66Zm58.34,154.34L132,230.34V160a4,4,0,0,0-8,0v70.34L98.83,205.17a4,4,0,0,0-5.66,5.66l32,32a4,4,0,0,0,5.66,0l32-32a4,4,0,0,0-5.66-5.66Z`}))]]),LA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,96l-80,80L48,96Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z`}))]]),RA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M176,128,96,208V48Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z`}))]]),zA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M80,176h96l-48,48ZM128,32,80,80h96Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z`}))]]),BA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z`}))]]),VA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]]),HA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M100,28H64A20,20,0,0,0,44,48V208a20,20,0,0,0,20,20h36a20,20,0,0,0,20-20V48A20,20,0,0,0,100,28ZM96,204H68V52H96ZM192,28H156a20,20,0,0,0-20,20V208a20,20,0,0,0,20,20h36a20,20,0,0,0,20-20V48A20,20,0,0,0,192,28Zm-4,176H160V52h28Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M112,48V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8h40A8,8,0,0,1,112,48Zm80-8H152a8,8,0,0,0-8,8V208a8,8,0,0,0,8,8h40a8,8,0,0,0,8-8V48A8,8,0,0,0,192,40Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M104,32H64A16,16,0,0,0,48,48V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,104,32Zm0,176H64V48h40ZM192,32H152a16,16,0,0,0-16,16V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,192,32Zm0,176H152V48h40Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M120,48V208a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V48A16,16,0,0,1,64,32h40A16,16,0,0,1,120,48Zm72-16H152a16,16,0,0,0-16,16V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,192,32Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M104,34H64A14,14,0,0,0,50,48V208a14,14,0,0,0,14,14h40a14,14,0,0,0,14-14V48A14,14,0,0,0,104,34Zm2,174a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2h40a2,2,0,0,1,2,2ZM192,34H152a14,14,0,0,0-14,14V208a14,14,0,0,0,14,14h40a14,14,0,0,0,14-14V48A14,14,0,0,0,192,34Zm2,174a2,2,0,0,1-2,2H152a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2h40a2,2,0,0,1,2,2Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M104,32H64A16,16,0,0,0,48,48V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,104,32Zm0,176H64V48h40ZM192,32H152a16,16,0,0,0-16,16V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,192,32Zm0,176H152V48h40Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M104,36H64A12,12,0,0,0,52,48V208a12,12,0,0,0,12,12h40a12,12,0,0,0,12-12V48A12,12,0,0,0,104,36Zm4,172a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4h40a4,4,0,0,1,4,4ZM192,36H152a12,12,0,0,0-12,12V208a12,12,0,0,0,12,12h40a12,12,0,0,0,12-12V48A12,12,0,0,0,192,36Zm4,172a4,4,0,0,1-4,4H152a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4h40a4,4,0,0,1,4,4Z`}))]]),UA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,40V168H168V88H88V40Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z`}))]]),WA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M180.49,143.51a12,12,0,0,1,0,17l-24,24a12,12,0,0,1-17-17L155,152l-15.52-15.51a12,12,0,1,1,17-17Zm-64-24a12,12,0,0,0-17,0l-24,24a12,12,0,0,0,0,17l24,24a12,12,0,0,0,17-17L101,152l15.52-15.51A12,12,0,0,0,116.49,119.51ZM220,88V216a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88ZM160,57V80h23Zm36,155V104H148a12,12,0,0,1-12-12V44H60V212Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,88H152V32Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M181.66,146.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32Zm-72-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L91.31,152l18.35-18.34A8,8,0,0,0,109.66,122.34ZM216,88V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm40,136V96H152a8,8,0,0,1-8-8V40H56V216H200Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34Zm-104,88a8,8,0,0,1-11.32,11.32l-24-24a8,8,0,0,1,0-11.32l24-24a8,8,0,0,1,11.32,11.32L91.31,152Zm72-12.68-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32l24,24A8,8,0,0,1,181.66,157.66ZM152,88V44l44,44Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M180.24,147.76a6,6,0,0,1,0,8.48l-24,24a6,6,0,0,1-8.48-8.48L167.51,152l-19.75-19.76a6,6,0,1,1,8.48-8.48Zm-72-24a6,6,0,0,0-8.48,0l-24,24a6,6,0,0,0,0,8.48l24,24a6,6,0,1,0,8.48-8.48L88.49,152l19.75-19.76A6,6,0,0,0,108.24,123.76ZM214,88V216a14,14,0,0,1-14,14H56a14,14,0,0,1-14-14V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88Zm-56-6h35.52L158,46.48Zm44,134V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2V216a2,2,0,0,0,2,2H200A2,2,0,0,0,202,216Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M181.66,146.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32Zm-72-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L91.31,152l18.35-18.34A8,8,0,0,0,109.66,122.34ZM216,88V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm40,136V96H152a8,8,0,0,1-8-8V40H56V216H200Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M178.83,149.17a4,4,0,0,1,0,5.66l-24,24a4,4,0,0,1-5.66-5.66L170.34,152l-21.17-21.17a4,4,0,1,1,5.66-5.66Zm-72-24a4,4,0,0,0-5.66,0l-24,24a4,4,0,0,0,0,5.66l24,24a4,4,0,1,0,5.66-5.66L85.66,152l21.17-21.17A4,4,0,0,0,106.83,125.17ZM212,88V216a12,12,0,0,1-12,12H56a12,12,0,0,1-12-12V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-56-4h42.34L156,41.65Zm48,132V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H200A4,4,0,0,0,204,216Z`}))]]),GA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M248.23,112.31A20,20,0,0,0,232,104H220V88a20,20,0,0,0-20-20H132L105.34,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V208a12,12,0,0,0,12,12H211.1a12,12,0,0,0,11.33-8l28.49-81.47.06-.17A20,20,0,0,0,248.23,112.31ZM92,68l28.8,21.6A12,12,0,0,0,128,92h68v12H69.77a20,20,0,0,0-18.94,13.58L44,137.15V68ZM202.59,196H48.89l23.72-68H226.37Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,88v24H69.77a8,8,0,0,0-7.59,5.47L32,208V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h72A8,8,0,0,1,208,88Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M243.36,111.81A14,14,0,0,0,232,106H214V88a14,14,0,0,0-14-14H130L101.74,52.8a14.06,14.06,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V208a6,6,0,0,0,6,6H211.1a6,6,0,0,0,5.69-4.1l28.49-85.47A14,14,0,0,0,243.36,111.81ZM40,62H93.34a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h72a2,2,0,0,1,2,2v18H69.77a14,14,0,0,0-13.28,9.57L38,171V64A2,2,0,0,1,40,62Zm193.9,58.63L206.78,202H40.33l27.54-82.63a2,2,0,0,1,1.9-1.37H232a2,2,0,0,1,1.9,2.63Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M241.72,113a11.88,11.88,0,0,0-9.73-5H212V88a12,12,0,0,0-12-12H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V208a4,4,0,0,0,4,4H211.09a4,4,0,0,0,3.79-2.74l28.49-85.47A11.86,11.86,0,0,0,241.72,113ZM40,60H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h72a4,4,0,0,1,4,4v20H69.76a12,12,0,0,0-11.38,8.21L36,183.35V64A4,4,0,0,1,40,60Zm195.78,61.26L208.2,204H37.55L66,118.74A4,4,0,0,1,69.76,116H232a4,4,0,0,1,3.79,5.26Z`}))]]),KA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228,56H160L133.33,36a20.12,20.12,0,0,0-12-4H76A20,20,0,0,0,56,52V72H36A20,20,0,0,0,16,92V204a20,20,0,0,0,20,20H188.89A19.13,19.13,0,0,0,208,204.89V184h20.89A19.13,19.13,0,0,0,248,164.89V76A20,20,0,0,0,228,56ZM184,200H40V96H80l28.8,21.6A12,12,0,0,0,116,120h68Zm40-40H208V116a20,20,0,0,0-20-20H120L93.33,76a20.12,20.12,0,0,0-12-4H80V56h40l28.8,21.6A12,12,0,0,0,156,80h68Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M232,80v88.89a7.11,7.11,0,0,1-7.11,7.11H200V112a8,8,0,0,0-8-8H120L90.13,81.6a8,8,0,0,0-4.8-1.6H64V56a8,8,0,0,1,8-8h45.33a8,8,0,0,1,4.8,1.6L152,72h72A8,8,0,0,1,232,80Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M224,64H154.67L126.93,43.2a16.12,16.12,0,0,0-9.6-3.2H72A16,16,0,0,0,56,56V72H40A16,16,0,0,0,24,88V200a16,16,0,0,0,16,16H192.89A15.13,15.13,0,0,0,208,200.89V184h16.89A15.13,15.13,0,0,0,240,168.89V80A16,16,0,0,0,224,64ZM192,200H40V88H85.33l29.87,22.4A8,8,0,0,0,120,112h72Zm32-32H208V112a16,16,0,0,0-16-16H122.67L94.93,75.2a16.12,16.12,0,0,0-9.6-3.2H72V56h45.33L147.2,78.4A8,8,0,0,0,152,80h72Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,64H154.67L126.93,43.2a16.12,16.12,0,0,0-9.6-3.2H72A16,16,0,0,0,56,56V72H40A16,16,0,0,0,24,88V200a16,16,0,0,0,16,16H192.89A15.13,15.13,0,0,0,208,200.89V184h16.89A15.13,15.13,0,0,0,240,168.89V80A16,16,0,0,0,224,64Zm0,104H208V112a16,16,0,0,0-16-16H122.67L94.93,75.2a16.12,16.12,0,0,0-9.6-3.2H72V56h45.33L147.2,78.4A8,8,0,0,0,152,80h72Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,66H154L125.73,44.8a14,14,0,0,0-8.4-2.8H72A14,14,0,0,0,58,56V74H40A14,14,0,0,0,26,88V200a14,14,0,0,0,14,14H192.89A13.12,13.12,0,0,0,206,200.89V182h18.89A13.12,13.12,0,0,0,238,168.89V80A14,14,0,0,0,224,66ZM194,200.89a1.11,1.11,0,0,1-1.11,1.11H40a2,2,0,0,1-2-2V88a2,2,0,0,1,2-2H85.33a2,2,0,0,1,1.2.4l29.87,22.4A6,6,0,0,0,120,110h72a2,2,0,0,1,2,2Zm32-32a1.11,1.11,0,0,1-1.11,1.11H206V112a14,14,0,0,0-14-14H122L93.73,76.8a14,14,0,0,0-8.4-2.8H70V56a2,2,0,0,1,2-2h45.33a2,2,0,0,1,1.2.4L148.4,76.8A6,6,0,0,0,152,78h72a2,2,0,0,1,2,2Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,64H154.67L126.93,43.2a16.12,16.12,0,0,0-9.6-3.2H72A16,16,0,0,0,56,56V72H40A16,16,0,0,0,24,88V200a16,16,0,0,0,16,16H192.89A15.13,15.13,0,0,0,208,200.89V184h16.89A15.13,15.13,0,0,0,240,168.89V80A16,16,0,0,0,224,64ZM192,200H40V88H85.33l29.87,22.4A8,8,0,0,0,120,112h72Zm32-32H208V112a16,16,0,0,0-16-16H122.67L94.93,75.2a16.12,16.12,0,0,0-9.6-3.2H72V56h45.33L147.2,78.4A8,8,0,0,0,152,80h72Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,68H153.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H72A12,12,0,0,0,60,56V76H40A12,12,0,0,0,28,88V200a12,12,0,0,0,12,12H192.89A11.12,11.12,0,0,0,204,200.89V180h20.89A11.12,11.12,0,0,0,236,168.89V80A12,12,0,0,0,224,68ZM196,200.89a3.12,3.12,0,0,1-3.11,3.11H40a4,4,0,0,1-4-4V88a4,4,0,0,1,4-4H85.33a4,4,0,0,1,2.4.8l29.87,22.4a4,4,0,0,0,2.4.8h72a4,4,0,0,1,4,4Zm32-32a3.12,3.12,0,0,1-3.11,3.11H204V112a12,12,0,0,0-12-12H121.33L92.53,78.4a12.05,12.05,0,0,0-7.2-2.4H68V56a4,4,0,0,1,4-4h45.33a4,4,0,0,1,2.4.8L149.6,75.2a4,4,0,0,0,2.4.8h72a4,4,0,0,1,4,4Z`}))]]),qA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm113.86-49.57A12,12,0,0,0,236,98.34L208.21,82.49l-.11-31.31a12,12,0,0,0-4.25-9.12,116,116,0,0,0-38-21.41,12,12,0,0,0-9.68.89L128,37.27,99.83,21.53a12,12,0,0,0-9.7-.9,116.06,116.06,0,0,0-38,21.47,12,12,0,0,0-4.24,9.1l-.14,31.34L20,98.35a12,12,0,0,0-5.85,8.11,110.7,110.7,0,0,0,0,43.11A12,12,0,0,0,20,157.66l27.82,15.85.11,31.31a12,12,0,0,0,4.25,9.12,116,116,0,0,0,38,21.41,12,12,0,0,0,9.68-.89L128,218.73l28.14,15.74a12,12,0,0,0,9.7.9,116.06,116.06,0,0,0,38-21.47,12,12,0,0,0,4.24-9.1l.14-31.34,27.81-15.81a12,12,0,0,0,5.85-8.11A110.7,110.7,0,0,0,241.86,106.43Zm-22.63,33.18-26.88,15.28a11.94,11.94,0,0,0-4.55,4.59c-.54,1-1.11,1.93-1.7,2.88a12,12,0,0,0-1.83,6.31L184.13,199a91.83,91.83,0,0,1-21.07,11.87l-27.15-15.19a12,12,0,0,0-5.86-1.53h-.29c-1.14,0-2.3,0-3.44,0a12.08,12.08,0,0,0-6.14,1.51L93,210.82A92.27,92.27,0,0,1,71.88,199l-.11-30.24a12,12,0,0,0-1.83-6.32c-.58-.94-1.16-1.91-1.7-2.88A11.92,11.92,0,0,0,63.7,155L36.8,139.63a86.53,86.53,0,0,1,0-23.24l26.88-15.28a12,12,0,0,0,4.55-4.58c.54-1,1.11-1.94,1.7-2.89a12,12,0,0,0,1.83-6.31L71.87,57A91.83,91.83,0,0,1,92.94,45.17l27.15,15.19a11.92,11.92,0,0,0,6.15,1.52c1.14,0,2.3,0,3.44,0a12.08,12.08,0,0,0,6.14-1.51L163,45.18A92.27,92.27,0,0,1,184.12,57l.11,30.24a12,12,0,0,0,1.83,6.32c.58.94,1.16,1.91,1.7,2.88A11.92,11.92,0,0,0,192.3,101l26.9,15.33A86.53,86.53,0,0,1,219.23,139.61Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M230.1,108.76,198.25,90.62c-.64-1.16-1.31-2.29-2-3.41l-.12-36A104.61,104.61,0,0,0,162,32L130,49.89c-1.34,0-2.69,0-4,0L94,32A104.58,104.58,0,0,0,59.89,51.25l-.16,36c-.7,1.12-1.37,2.26-2,3.41l-31.84,18.1a99.15,99.15,0,0,0,0,38.46l31.85,18.14c.64,1.16,1.31,2.29,2,3.41l.12,36A104.61,104.61,0,0,0,94,224l32-17.87c1.34,0,2.69,0,4,0L162,224a104.58,104.58,0,0,0,34.08-19.25l.16-36c.7-1.12,1.37-2.26,2-3.41l31.84-18.1A99.15,99.15,0,0,0,230.1,108.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm109.94-52.79a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A111.92,111.92,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.63a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21Zm-15,34.91-28.57,16.25a8,8,0,0,0-3,3c-.58,1-1.19,2.06-1.81,3.06a7.94,7.94,0,0,0-1.22,4.21l-.15,32.25a95.89,95.89,0,0,1-25.37,14.3L134,199.13a8,8,0,0,0-3.91-1h-.19c-1.21,0-2.43,0-3.64,0a8.1,8.1,0,0,0-4.1,1l-28.84,16.1A96,96,0,0,1,67.88,201l-.11-32.2a8,8,0,0,0-1.22-4.22c-.62-1-1.23-2-1.8-3.06a8.09,8.09,0,0,0-3-3.06l-28.6-16.29a90.49,90.49,0,0,1,0-28.26L61.67,97.63a8,8,0,0,0,3-3c.58-1,1.19-2.06,1.81-3.06a7.94,7.94,0,0,0,1.22-4.21l.15-32.25a95.89,95.89,0,0,1,25.37-14.3L122,56.87a8,8,0,0,0,4.1,1c1.21,0,2.43,0,3.64,0a8,8,0,0,0,4.1-1l28.84-16.1A96,96,0,0,1,188.12,55l.11,32.2a8,8,0,0,0,1.22,4.22c.62,1,1.23,2,1.8,3.06a8.09,8.09,0,0,0,3,3.06l28.6,16.29A90.49,90.49,0,0,1,222.9,142.12Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M237.94,107.21a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A111.92,111.92,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.63a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Zm108-54.4a6,6,0,0,0-2.92-4L202.64,86.22l-.42-.71L202.1,51.2A6,6,0,0,0,200,46.64a110.12,110.12,0,0,0-36.07-20.31,6,6,0,0,0-4.84.45L128.46,43.86h-1L96.91,26.76a6,6,0,0,0-4.86-.44A109.92,109.92,0,0,0,56,46.68a6,6,0,0,0-2.12,4.55l-.16,34.34c-.14.23-.28.47-.41.71L22.91,103.57A6,6,0,0,0,20,107.62a104.81,104.81,0,0,0,0,40.78,6,6,0,0,0,2.92,4l30.42,17.33.42.71.12,34.31A6,6,0,0,0,56,209.36a110.12,110.12,0,0,0,36.07,20.31,6,6,0,0,0,4.84-.45l30.61-17.08h1l30.56,17.1A6.09,6.09,0,0,0,162,230a5.83,5.83,0,0,0,1.93-.32,109.92,109.92,0,0,0,36-20.36,6,6,0,0,0,2.12-4.55l.16-34.34c.14-.23.28-.47.41-.71l30.42-17.29a6,6,0,0,0,2.92-4.05A104.81,104.81,0,0,0,236,107.6Zm-11.25,35.79L195.32,160.1a6.07,6.07,0,0,0-2.28,2.3c-.59,1-1.21,2.11-1.86,3.14a6,6,0,0,0-.91,3.16l-.16,33.21a98.15,98.15,0,0,1-27.52,15.53L133,200.88a6,6,0,0,0-2.93-.77h-.14c-1.24,0-2.5,0-3.74,0a6,6,0,0,0-3.07.76L93.45,217.43a98,98,0,0,1-27.56-15.49l-.12-33.17a6,6,0,0,0-.91-3.16c-.64-1-1.27-2.08-1.86-3.14a6,6,0,0,0-2.27-2.3L31.3,143.4a93,93,0,0,1,0-30.79L60.68,95.9A6.07,6.07,0,0,0,63,93.6c.59-1,1.21-2.11,1.86-3.14a6,6,0,0,0,.91-3.16l.16-33.21A98.15,98.15,0,0,1,93.41,38.56L123,55.12a5.81,5.81,0,0,0,3.07.76c1.24,0,2.5,0,3.74,0a6,6,0,0,0,3.07-.76l29.65-16.56a98,98,0,0,1,27.56,15.49l.12,33.17a6,6,0,0,0,.91,3.16c.64,1,1.27,2.08,1.86,3.14a6,6,0,0,0,2.27,2.3L224.7,112.6A93,93,0,0,1,224.73,143.39Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm109.94-52.79a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A112.1,112.1,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.62a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21Zm-15,34.91-28.57,16.25a8,8,0,0,0-3,3c-.58,1-1.19,2.06-1.81,3.06a7.94,7.94,0,0,0-1.22,4.21l-.15,32.25a95.89,95.89,0,0,1-25.37,14.3L134,199.13a8,8,0,0,0-3.91-1h-.19c-1.21,0-2.43,0-3.64,0a8.08,8.08,0,0,0-4.1,1l-28.84,16.1A96,96,0,0,1,67.88,201l-.11-32.2a8,8,0,0,0-1.22-4.22c-.62-1-1.23-2-1.8-3.06a8.09,8.09,0,0,0-3-3.06l-28.6-16.29a90.49,90.49,0,0,1,0-28.26L61.67,97.63a8,8,0,0,0,3-3c.58-1,1.19-2.06,1.81-3.06a7.94,7.94,0,0,0,1.22-4.21l.15-32.25a95.89,95.89,0,0,1,25.37-14.3L122,56.87a8,8,0,0,0,4.1,1c1.21,0,2.43,0,3.64,0a8.08,8.08,0,0,0,4.1-1l28.84-16.1A96,96,0,0,1,188.12,55l.11,32.2a8,8,0,0,0,1.22,4.22c.62,1,1.23,2,1.8,3.06a8.09,8.09,0,0,0,3,3.06l28.6,16.29A90.49,90.49,0,0,1,222.9,142.12Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm106-56a4,4,0,0,0-2-2.7l-30.89-17.6q-.47-.82-1-1.62L200.1,51.2a3.94,3.94,0,0,0-1.42-3,107.8,107.8,0,0,0-35.41-19.94,4,4,0,0,0-3.23.29L129,45.87h-2l-31-17.36a4,4,0,0,0-3.23-.3,108.05,108.05,0,0,0-35.39,20,4,4,0,0,0-1.41,3l-.16,34.9-1,1.62L23.9,105.3A4,4,0,0,0,22,108a102.76,102.76,0,0,0,0,40,4,4,0,0,0,1.95,2.7l30.89,17.6q.47.83,1,1.62l.12,34.87a3.94,3.94,0,0,0,1.42,3,107.8,107.8,0,0,0,35.41,19.94,4,4,0,0,0,3.23-.29L127,210.13h2l31,17.36a4,4,0,0,0,3.23.3,108.05,108.05,0,0,0,35.39-20,4,4,0,0,0,1.41-3l.16-34.9,1-1.62L232.1,150.7a4,4,0,0,0,2-2.71A102.76,102.76,0,0,0,234,108Zm-7.48,36.67L196.3,161.84a4,4,0,0,0-1.51,1.53c-.61,1.09-1.25,2.17-1.91,3.24a3.92,3.92,0,0,0-.61,2.1l-.16,34.15a99.8,99.8,0,0,1-29.7,16.77l-30.4-17a4.06,4.06,0,0,0-2-.51H130c-1.28,0-2.57,0-3.84,0a4.1,4.1,0,0,0-2.05.51l-30.45,17A100.23,100.23,0,0,1,63.89,202.9l-.12-34.12a3.93,3.93,0,0,0-.61-2.11c-.66-1-1.3-2.14-1.91-3.23a4,4,0,0,0-1.51-1.53L29.49,144.68a94.78,94.78,0,0,1,0-33.34L59.7,94.16a4,4,0,0,0,1.51-1.53c.61-1.09,1.25-2.17,1.91-3.23a4,4,0,0,0,.61-2.11l.16-34.15a99.8,99.8,0,0,1,29.7-16.77l30.4,17a4.1,4.1,0,0,0,2.05.51c1.28,0,2.57,0,3.84,0a4,4,0,0,0,2.05-.51l30.45-17A100.23,100.23,0,0,1,192.11,53.1l.12,34.12a3.93,3.93,0,0,0,.61,2.11c.66,1,1.3,2.14,1.91,3.23a4,4,0,0,0,1.51,1.53l30.25,17.23A94.78,94.78,0,0,1,226.54,144.66Z`}))]]),JA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M236,64a36,36,0,1,0-48,33.94V112a4,4,0,0,1-4,4H96a27.8,27.8,0,0,0-4,.29V97.94a36,36,0,1,0-24,0v60.12a36,36,0,1,0,24,0V144a4,4,0,0,1,4-4h88a28,28,0,0,0,28-28V97.94A36.07,36.07,0,0,0,236,64ZM80,52A12,12,0,1,1,68,64,12,12,0,0,1,80,52Zm0,152a12,12,0,1,1,12-12A12,12,0,0,1,80,204ZM200,76a12,12,0,1,1,12-12A12,12,0,0,1,200,76Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,64a24,24,0,1,1-24-24A24,24,0,0,1,224,64Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M232,64a32,32,0,1,0-40,31v17a8,8,0,0,1-8,8H96a23.84,23.84,0,0,0-8,1.38V95a32,32,0,1,0-16,0v66a32,32,0,1,0,16,0V144a8,8,0,0,1,8-8h88a24,24,0,0,0,24-24V95A32.06,32.06,0,0,0,232,64ZM64,64A16,16,0,1,1,80,80,16,16,0,0,1,64,64ZM96,192a16,16,0,1,1-16-16A16,16,0,0,1,96,192ZM200,80a16,16,0,1,1,16-16A16,16,0,0,1,200,80Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M232,64a32,32,0,1,0-40,31v17a8,8,0,0,1-8,8H96a23.84,23.84,0,0,0-8,1.38V95a32,32,0,1,0-16,0v66a32,32,0,1,0,16,0V144a8,8,0,0,1,8-8h88a24,24,0,0,0,24-24V95A32.06,32.06,0,0,0,232,64ZM64,64A16,16,0,1,1,80,80,16,16,0,0,1,64,64ZM96,192a16,16,0,1,1-16-16A16,16,0,0,1,96,192Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M230,64a30,30,0,1,0-36,29.4V112a10,10,0,0,1-10,10H96a21.84,21.84,0,0,0-10,2.42v-31a30,30,0,1,0-12,0v69.2a30,30,0,1,0,12,0V144a10,10,0,0,1,10-10h88a22,22,0,0,0,22-22V93.4A30.05,30.05,0,0,0,230,64ZM62,64A18,18,0,1,1,80,82,18,18,0,0,1,62,64ZM98,192a18,18,0,1,1-18-18A18,18,0,0,1,98,192ZM200,82a18,18,0,1,1,18-18A18,18,0,0,1,200,82Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M232,64a32,32,0,1,0-40,31v17a8,8,0,0,1-8,8H96a23.84,23.84,0,0,0-8,1.38V95a32,32,0,1,0-16,0v66a32,32,0,1,0,16,0V144a8,8,0,0,1,8-8h88a24,24,0,0,0,24-24V95A32.06,32.06,0,0,0,232,64ZM64,64A16,16,0,1,1,80,80,16,16,0,0,1,64,64ZM96,192a16,16,0,1,1-16-16A16,16,0,0,1,96,192ZM200,80a16,16,0,1,1,16-16A16,16,0,0,1,200,80Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228,64a28,28,0,1,0-32,27.71V112a12,12,0,0,1-12,12H96a19.91,19.91,0,0,0-12,4V91.71a28,28,0,1,0-8,0v72.58a28,28,0,1,0,8,0V144a12,12,0,0,1,12-12h88a20,20,0,0,0,20-20V91.71A28,28,0,0,0,228,64ZM60,64A20,20,0,1,1,80,84,20,20,0,0,1,60,64Zm40,128a20,20,0,1,1-20-20A20,20,0,0,1,100,192ZM200,84a20,20,0,1,1,20-20A20,20,0,0,1,200,84Z`}))]]),YA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M112,148a12,12,0,0,0-12,12v19L69.17,148.2A4,4,0,0,1,68,145.37V97.94a36,36,0,1,0-24,0v47.43a27.81,27.81,0,0,0,8.2,19.8L83,196H64a12,12,0,0,0,0,24h48a12,12,0,0,0,12-12V160A12,12,0,0,0,112,148ZM56,52A12,12,0,1,1,44,64,12,12,0,0,1,56,52ZM212,158.06V110.63a27.81,27.81,0,0,0-8.2-19.8L173,60h19a12,12,0,0,0,0-24H144a12,12,0,0,0-12,12V96a12,12,0,0,0,24,0V77l30.83,30.83a4,4,0,0,1,1.17,2.83v47.43a36,36,0,1,0,24,0ZM200,204a12,12,0,1,1,12-12A12,12,0,0,1,200,204Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M80,64A24,24,0,1,1,56,40,24,24,0,0,1,80,64ZM200,168a24,24,0,1,0,24,24A24,24,0,0,0,200,168Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M112,152a8,8,0,0,0-8,8v28.69L66.34,151A8,8,0,0,1,64,145.37V95a32,32,0,1,0-16,0v50.38a23.85,23.85,0,0,0,7,17L92.69,200H64a8,8,0,0,0,0,16h48a8,8,0,0,0,8-8V160A8,8,0,0,0,112,152ZM40,64A16,16,0,1,1,56,80,16,16,0,0,1,40,64Zm168,97V110.63a23.85,23.85,0,0,0-7-17L163.31,56H192a8,8,0,0,0,0-16H144a8,8,0,0,0-8,8V96a8,8,0,0,0,16,0V67.31L189.66,105a8,8,0,0,1,2.34,5.66V161a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,200,208Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M118.18,213.08c-.11.14-.24.27-.36.4l-.16.18-.17.15a4.83,4.83,0,0,1-.42.37,3.92,3.92,0,0,1-.32.25l-.3.22-.38.23a2.91,2.91,0,0,1-.3.17l-.37.19-.34.15-.36.13a2.84,2.84,0,0,1-.38.13l-.36.1c-.14,0-.26.07-.4.09l-.42.07-.35.05a7,7,0,0,1-.79,0H64a8,8,0,0,1,0-16H92.69L55,162.34a23.85,23.85,0,0,1-7-17V95a32,32,0,1,1,16,0v50.38A8,8,0,0,0,66.34,151L104,188.69V160a8,8,0,0,1,16,0v48a7,7,0,0,1,0,.8c0,.11,0,.21,0,.32s0,.3-.07.46a2.83,2.83,0,0,1-.09.37c0,.13-.06.26-.1.39s-.08.23-.12.35l-.14.39-.15.31c-.06.13-.12.27-.19.4s-.11.18-.16.28l-.24.39-.21.28ZM208,161V110.63a23.85,23.85,0,0,0-7-17L163.31,56H192a8,8,0,0,0,0-16H143.82l-.6,0c-.14,0-.28,0-.41.06l-.37,0-.43.11-.33.08-.4.14-.34.13-.35.16-.36.18a3.14,3.14,0,0,0-.31.18c-.12.07-.25.14-.36.22a3.55,3.55,0,0,0-.31.23,3.81,3.81,0,0,0-.32.24c-.15.12-.28.24-.42.37l-.17.15-.16.18c-.12.13-.25.26-.36.4l-.26.35-.21.28-.24.39c-.05.1-.11.19-.16.28s-.13.27-.19.4l-.15.31-.14.39c0,.12-.09.23-.12.35s-.07.26-.1.39a2.83,2.83,0,0,0-.09.37c0,.16,0,.31-.07.46s0,.21-.05.32a7,7,0,0,0,0,.8V96a8,8,0,0,0,16,0V67.31L189.66,105a8,8,0,0,1,2.34,5.66V161a32,32,0,1,0,16,0Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M112,154a6,6,0,0,0-6,6v33.52L64.93,152.44A9.93,9.93,0,0,1,62,145.37v-52a30,30,0,1,0-12,0v52a21.88,21.88,0,0,0,6.44,15.56L97.52,202H64a6,6,0,0,0,0,12h48a6,6,0,0,0,6-6V160A6,6,0,0,0,112,154ZM38,64A18,18,0,1,1,56,82,18,18,0,0,1,38,64Zm168,98.6v-52a21.88,21.88,0,0,0-6.44-15.56L158.48,54H192a6,6,0,0,0,0-12H144a6,6,0,0,0-6,6V96a6,6,0,0,0,12,0V62.48l41.07,41.08a9.93,9.93,0,0,1,2.93,7.07v52a30,30,0,1,0,12,0ZM200,210a18,18,0,1,1,18-18A18,18,0,0,1,200,210Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M112,152a8,8,0,0,0-8,8v28.69L66.34,151A8,8,0,0,1,64,145.37V95a32,32,0,1,0-16,0v50.38a23.85,23.85,0,0,0,7,17L92.69,200H64a8,8,0,0,0,0,16h48a8,8,0,0,0,8-8V160A8,8,0,0,0,112,152ZM40,64A16,16,0,1,1,56,80,16,16,0,0,1,40,64Zm168,97V110.63a23.85,23.85,0,0,0-7-17L163.31,56H192a8,8,0,0,0,0-16H144a8,8,0,0,0-8,8V96a8,8,0,0,0,16,0V67.31L189.66,105a8,8,0,0,1,2.34,5.66V161a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,200,208Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M112,156a4,4,0,0,0-4,4v38.34L63.51,153.86A12,12,0,0,1,60,145.37V91.71a28,28,0,1,0-8,0v53.66a19.85,19.85,0,0,0,5.86,14.14L102.34,204H64a4,4,0,0,0,0,8h48a4,4,0,0,0,4-4V160A4,4,0,0,0,112,156ZM36,64A20,20,0,1,1,56,84,20,20,0,0,1,36,64ZM204,164.29V110.63a19.85,19.85,0,0,0-5.86-14.14L153.66,52H192a4,4,0,0,0,0-8H144a4,4,0,0,0-4,4V96a4,4,0,0,0,8,0V57.66l44.49,44.48a12,12,0,0,1,3.51,8.49v53.66a28,28,0,1,0,8,0ZM200,212a20,20,0,1,1,20-20A20,20,0,0,1,200,212Z`}))]]),XA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),ZA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H72a8,8,0,0,1,0-16H184a8,8,0,0,1,0,16Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128Z`}))]]),QA=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z`}))]]),$A=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm52-84a12,12,0,0,1-12,12H140v28a12,12,0,0,1-24,0V140H88a12,12,0,0,1,0-24h28V88a12,12,0,0,1,24,0v28h28A12,12,0,0,1,180,128Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32A8,8,0,0,1,176,128Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.13,104.13,0,0,0,128,24Zm40,112H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32a8,8,0,0,1,0,16Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm46-90a6,6,0,0,1-6,6H134v34a6,6,0,0,1-12,0V134H88a6,6,0,0,1,0-12h34V88a6,6,0,0,1,12,0v34h34A6,6,0,0,1,174,128Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32A8,8,0,0,1,176,128Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm44-92a4,4,0,0,1-4,4H132v36a4,4,0,0,1-8,0V132H88a4,4,0,0,1,0-8h36V88a4,4,0,0,1,8,0v36h36A4,4,0,0,1,172,128Z`}))]]),ej=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,136H48a20,20,0,0,0-20,20v36a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V156A20,20,0,0,0,208,136Zm-4,52H52V160H204Zm4-144H48A20,20,0,0,0,28,64v36a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm-4,52H52V68H204Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,152v40a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8H208A8,8,0,0,1,216,152Zm-8-96H48a8,8,0,0,0-8,8v40a8,8,0,0,0,8,8H208a8,8,0,0,0,8-8V64A8,8,0,0,0,208,56Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M208,136H48a16,16,0,0,0-16,16v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V152A16,16,0,0,0,208,136Zm0,56H48V152H208v40Zm0-144H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Zm0,56H48V64H208v40Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,152v40a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V152a16,16,0,0,1,16-16H208A16,16,0,0,1,224,152ZM208,48H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,138H48a14,14,0,0,0-14,14v40a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V152A14,14,0,0,0,208,138Zm2,54a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2ZM208,50H48A14,14,0,0,0,34,64v40a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V64A14,14,0,0,0,208,50Zm2,54a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,136H48a16,16,0,0,0-16,16v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V152A16,16,0,0,0,208,136Zm0,56H48V152H208v40Zm0-144H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Zm0,56H48V64H208v40Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,140H48a12,12,0,0,0-12,12v40a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V152A12,12,0,0,0,208,140Zm4,52a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4ZM208,52H48A12,12,0,0,0,36,64v40a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V64A12,12,0,0,0,208,52Zm4,52a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z`}))]]),tj=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60H76V196H44ZM212,196H100V60H212Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M88,48V208H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H88V56H216V200Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM38,200V56a2,2,0,0,1,2-2H82V202H40A2,2,0,0,1,38,200Zm180,0a2,2,0,0,1-2,2H94V54H216a2,2,0,0,1,2,2Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM36,200V56a4,4,0,0,1,4-4H84V204H40A4,4,0,0,1,36,200Zm184,0a4,4,0,0,1-4,4H92V52H216a4,4,0,0,1,4,4Z`}))]]),nj=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M40,92H70.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24H137.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24Zm64-24A12,12,0,1,1,92,80,12,12,0,0,1,104,68Zm112,96H201.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24h94.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24Zm-48,24a12,12,0,1,1,12-12A12,12,0,0,1,168,188Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,80a24,24,0,1,1-24-24A24,24,0,0,1,128,80Zm40,72a24,24,0,1,0,24,24A24,24,0,0,0,168,152Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M32,80a8,8,0,0,1,8-8H77.17a28,28,0,0,1,53.66,0H216a8,8,0,0,1,0,16H130.83a28,28,0,0,1-53.66,0H40A8,8,0,0,1,32,80Zm184,88H194.83a28,28,0,0,0-53.66,0H40a8,8,0,0,0,0,16H141.17a28,28,0,0,0,53.66,0H216a8,8,0,0,0,0-16Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M40,86H74.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12H133.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12Zm64-24A18,18,0,1,1,86,80,18,18,0,0,1,104,62ZM216,170H197.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12h98.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12Zm-48,24a18,18,0,1,1,18-18A18,18,0,0,1,168,194Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M40,84H76.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8H131.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8Zm64-24A20,20,0,1,1,84,80,20,20,0,0,1,104,60ZM216,172H195.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8H140.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8Zm-48,24a20,20,0,1,1,20-20A20,20,0,0,1,168,196Z`}))]]),rj=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z`}))]]),ij=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z`}))]]),aj=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M168.49,104.49,145,128l23.52,23.51a12,12,0,0,1-17,17L128,145l-23.51,23.52a12,12,0,0,1-17-17L111,128,87.51,104.49a12,12,0,0,1,17-17L128,111l23.51-23.52a12,12,0,0,1,17,17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,130.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M164.24,100.24,136.48,128l27.76,27.76a6,6,0,1,1-8.48,8.48L128,136.48l-27.76,27.76a6,6,0,0,1-8.48-8.48L119.52,128,91.76,100.24a6,6,0,0,1,8.48-8.48L128,119.52l27.76-27.76a6,6,0,0,1,8.48,8.48ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M162.83,98.83,133.66,128l29.17,29.17a4,4,0,0,1-5.66,5.66L128,133.66,98.83,162.83a4,4,0,0,1-5.66-5.66L122.34,128,93.17,98.83a4,4,0,0,1,5.66-5.66L128,122.34l29.17-29.17a4,4,0,1,1,5.66,5.66ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]]),oj=(0,b.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),sj=b.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=b.useContext(oj);return b.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&b.createElement(`title`,null,n),s,c.get(a??f))});sj.displayName=`IconBase`;var cj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:jA}));cj.displayName=`ArrowCounterClockwiseIcon`;var lj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:MA}));lj.displayName=`ArrowElbowDownLeftIcon`;var uj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:NA}));uj.displayName=`ArrowRightIcon`;var dj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:PA}));dj.displayName=`ArrowsClockwiseIcon`;var fj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:FA}));fj.displayName=`ArrowsInLineVerticalIcon`;var pj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:IA}));pj.displayName=`ArrowsOutLineVerticalIcon`;var mj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:LA}));mj.displayName=`CaretDownIcon`;var hj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:RA}));hj.displayName=`CaretRightIcon`;var gj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:zA}));gj.displayName=`CaretUpDownIcon`;var _j=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:BA}));_j.displayName=`CheckIcon`;var vj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:VA}));vj.displayName=`CheckCircleIcon`;var yj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:HA}));yj.displayName=`ColumnsIcon`;var bj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:UA}));bj.displayName=`CopyIcon`;var xj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:WA}));xj.displayName=`FileCodeIcon`;var Sj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:GA}));Sj.displayName=`FolderOpenIcon`;var Cj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:KA}));Cj.displayName=`FoldersIcon`;var wj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:qA}));wj.displayName=`GearSixIcon`;var Tj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:JA}));Tj.displayName=`GitBranchIcon`;var Ej=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:YA}));Ej.displayName=`GitDiffIcon`;var Dj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:XA}));Dj.displayName=`MagnifyingGlassIcon`;var Oj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:ZA}));Oj.displayName=`MinusIcon`;var kj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:QA}));kj.displayName=`PlusIcon`;var Aj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:$A}));Aj.displayName=`PlusCircleIcon`;var jj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:ej}));jj.displayName=`RowsIcon`;var Mj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:tj}));Mj.displayName=`SidebarSimpleIcon`;var Nj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:nj}));Nj.displayName=`SlidersHorizontalIcon`;var Pj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:rj}));Pj.displayName=`WarningCircleIcon`;var Fj=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:ij}));Fj.displayName=`XIcon`;var Ij=b.forwardRef((e,t)=>b.createElement(sj,{ref:t,...e,weights:aj}));Ij.displayName=`XCircleIcon`;function Lj(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=jc({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=Ro(a,!0,!0),u=Js(),[d,f]=b.useState(),p=d===null?void 0:d??u,m=X(e=>{let t=!a,n=J(kt,e.nativeEvent);r(t,n),!n.isCanceled&&o(t)});return b.useMemo(()=>({defaultPanelId:u,disabled:i,handleTrigger:m,mounted:s,open:a,panelId:p,setMounted:c,setOpen:o,setPanelIdState:f,transitionStatus:l}),[u,i,m,s,a,p,c,o,f,l])}var Rj=b.createContext(void 0);function zj(){let e=b.useContext(Rj);if(e===void 0)throw Error(F(15));return e}var Bj=`data-open`,Vj=`data-closed`,Hj=Xe,Uj=`data-panel-open`,Wj={[Bj]:``},Gj={[Vj]:``},Kj={open(e){return e?{[Uj]:``}:null}},qj={open(e){return e?Wj:Gj},...et},Jj=b.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c,...l}=e,u=X(o),d=Lj({open:s,defaultOpen:i,onOpenChange:u,disabled:a}),f=b.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),p=b.useMemo(()=>({...d,onOpenChange:u,state:f}),[d,u,f]),m=Di(`div`,e,{state:f,ref:t,props:l,stateAttributesMapping:qj});return(0,Y.jsx)(Rj.Provider,{value:p,children:m})}),Yj={...Kj,...et},Xj=b.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=zj(),{className:s,disabled:c=o,render:l,nativeButton:u=!0,style:d,...f}=e,{getButtonProps:p,buttonRef:m}=hl({disabled:c,focusableWhenDisabled:!0,native:u});return Di(`button`,e,{state:a,ref:[t,m],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},f,p],stateAttributesMapping:Yj})}),Zj={height:void 0,width:void 0};function Qj(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:o,open:s,setMounted:c,setOpen:l,transitionStatus:u}=e,d=b.useRef(null),f=b.useRef(null),[p,m]=b.useState(Zj),h=b.useRef(Zj),g=b.useRef(!1),_=b.useRef(s),v=b.useRef(!1),[y,x]=b.useState(!1),S=b.useRef(null),C=ln(t,d),w=hn(s),T=Vo(d),E=!s&&!a,D=y?`idle`:u,O=s&&(_.current||v.current),k=!s&&a&&f.current===`css-animation`&&p.height===void 0&&p.width===void 0?h.current:p,A=n&&E&&f.current!==`css-animation`,j=X((e,t=!0)=>{t&&(h.current=e),m(e)}),M=X(()=>{S.current?.(),S.current=null}),P=X(e=>{M(),S.current=()=>{S.current=null,e()}}),F=X(()=>{s&&a&&f.current===`css-animation`&&(v.current=!0)});N(()=>{y&&u!==`starting`&&x(!1)},[y,u]),b.useEffect(()=>()=>{F(),M()},[F,M]),N(()=>{let e=d.current;if(!e)return;!s&&S.current&&M();let t=eM(e,O);if(f.current=t,s&&u===`idle`&&_.current&&t===`css-animation`){h.current=$j(e);return}if(s&&u===`starting`){let n=g.current;if(g.current=!1,t===`none`){j($j(e)),x(!0);return}if(t===`css-transition`){let t=rM(e);if(j($j(e)),!n)return t;let r=nM(e,`transition-duration`,`0s`);return P(r),x(!0),t}j($j(e));let r=nM(e,`animation-name`,`none`);if(!n){r();return}let i=nM(e,`animation-duration`,`0s`);r(),P(i),x(!0);return}if(!s&&a&&(u===`idle`||u===`starting`)){if(_.current=!1,v.current=!1,t===`none`){j(Zj,!1),c(!1);return}j($j(e));return}if(u!==`ending`)return;if(t===`none`){c(!1);return}let n=$j(e);if(!(n.height>0||n.width>0)){c(!1);return}j(n),t===`css-animation`&&nM(e,`animation-name`,`none`)()},[a,s,M,j,c,P,O,u]),Ho({enabled:s&&a&&D===`idle`,open:!0,ref:d,onComplete(){s&&j(Zj,!1)}}),b.useEffect(()=>{if(s||!a||D!==`ending`||!d.current)return;let e=new AbortController,t=-1;function n(){w.current||(c(!1),j(Zj,!1))}return t=wn.request(()=>{T(n,e.signal)}),()=>{wn.cancel(t),e.abort()}},[w,a,s,D,T,j,c]),N(()=>{let e=d.current;e&&n&&E&&e.setAttribute(`hidden`,`until-found`)},[E,n]),b.useEffect(function(){let e=d.current;if(!e)return;function t(e){let t=J(Ot,e);o(!0,t),!t.isCanceled&&(g.current=!0,l(!0))}return sn(e,`beforematch`,t)},[o,l]);let I=i||n||a||s;return{height:k.height,props:{...A?{[Hj]:``}:void 0,hidden:E,id:r},ref:C,shouldPreventOpenAnimation:O,shouldRender:I,transitionStatus:D,width:k.width}}function $j(e){return{height:e.scrollHeight,width:e.scrollWidth}}function eM(e,t){let n=ye(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&tM(n.animationDuration),i=tM(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function tM(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function nM(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===``){e.style.removeProperty(t);return}e.style.setProperty(t,r,i)}}function rM(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{if(n===``){e.style.removeProperty(t);return}e.style.setProperty(t,n)})}let r=wn.request(n);return()=>{wn.cancel(r),n()}}var iM=`--collapsible-panel-height`,aM=`--collapsible-panel-width`,oM=b.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s,...c}=e,{defaultPanelId:l,mounted:u,onOpenChange:d,open:f,setMounted:p,setPanelIdState:m,setOpen:h,state:g,transitionStatus:_}=zj(),v=r??!1,y=i??!1,b=o||void 0,x=b??l;N(()=>(m(e=>b??(e===null?void 0:e)),()=>{m(e=>e===b?null:e)}),[b,m]);let{height:S,props:C,ref:w,shouldPreventOpenAnimation:T,shouldRender:E,transitionStatus:D,width:O}=Qj({externalRef:t,hiddenUntilFound:v,id:x,keepMounted:y,mounted:u,onOpenChange:d,open:f,setMounted:p,setOpen:h,transitionStatus:_}),k={...g,transitionStatus:D},A=di(s,k),j=Di(`div`,{...e,style:void 0},{state:k,ref:w,props:[C,{style:{[iM]:S===void 0?`auto`:`${S}px`,[aM]:O===void 0?`auto`:`${O}px`}},c,A?{style:A}:void 0,T?{style:{animationName:`none`}}:void 0],stateAttributesMapping:qj});return E?j:null}),sM=`data-valid`,cM=`data-invalid`,lM={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},uM={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},dM={disabled:!1,...uM},fM={valid(e){return e===null?null:e?{[sM]:``}:{[cM]:``}}},pM={invalid:void 0,name:void 0,validityData:{state:lM,errors:[],error:``,value:``,initialValue:null},setValidityData:A,disabled:void 0,setTouched:A,setDirty:A,setFilled:A,setFocused:A,validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:dM,registerFieldControl:A,validation:{getValidationProps:(e,t=M)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:A,getInputControl:()=>null,commit:async()=>{},change:A}},mM=b.createContext(pM);function hM(e=!0){let t=b.useContext(mM);if(t.setValidityData===A&&!e)throw Error(F(28));return t}var gM=b.createContext(void 0);function _M(e=!1){let t=b.useContext(gM);if(!t&&!e)throw Error(F(86));return t}var vM=b.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:A,validationMode:`onSubmit`,submitCountRef:{current:0}});function yM(){return b.useContext(vM)}var bM=b.createContext({controlId:void 0,registerControlId:A,resetControlId:A,labelId:void 0,setLabelId:A,messageIds:[],setMessageIds:A,getDescriptionProps:e=>e});function xM(){return b.useContext(bM)}function SM(e,t,n,r=!0,i){let[a,o]=b.useState(),s=Js(i?`${i}-label`:void 0),c=e??t??a;return N(()=>{let i=e||t||!r?void 0:CM(n.current,s);a!==i&&o(i)}),c}function CM(e,t){let n=wM(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function wM(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}function TM(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=xM(),o=Js(),s=S(()=>Symbol()),c=b.useRef(!1),l=b.useRef(!1),u=X(()=>{c.current&&i!==A&&(c.current=!1,i(s.current,void 0))});return N(()=>{if(!n||i===A){u();return}let e;if(t!==void 0)l.current=!0,e=t;else if(l.current)e=o;else{a();return}if(e===void 0){u();return}c.current=!0,i(s.current,e)},[t,n,i,a,o,s,u]),N(()=>u,[u]),(n?r:void 0)??t??o}function EM(e,t){let n=Js(e);return N(()=>(t(n),()=>{t(e=>e===n?void 0:e)}),[n,t]),n}function DM(e={}){let{id:t,fallbackControlId:n,native:r=!1,setLabelId:i,focusControl:a}=e,{controlId:o,setLabelId:s}=xM(),c=EM(t,X(e=>{s(e),i?.(e)})),l=o??n;function u(e){if(a){a(e,l);return}if(!l)return;let t=En(e.currentTarget).getElementById(l);Ce(t)&&OM(t)}function d(e){Ue(e.nativeEvent)?.closest(`button,input,select,textarea`)||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),!r&&u(e))}return r?{id:c,htmlFor:l,onMouseDown:d}:{id:c,onClick:d,onPointerDown(e){e.preventDefault()}}}function OM(e){e.focus({focusVisible:!0})}var kM=b.createContext({disabled:!1});function AM(){return b.useContext(kM)}function jM(e,t,n,r,i=!0,a){let{registerFieldControl:o}=hM(),s=S(()=>Symbol());N(()=>{let c=s.current;if(!i){o(c,void 0);return}o(c,{controlRef:e,getValue:r,id:t,name:a,value:n})},[e,i,r,t,a,o,s,n]),N(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var MM=b.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFocused:y,setFilled:x,validationMode:S,validation:C}=hM(),{clearErrors:w,elementRef:T,submitCountRef:E}=yM(),D=h||s,O=m??a,k={...p,disabled:D},{labelId:A}=xM(),j=TM({id:i}),[M]=jc({controlled:o,default:l,name:`FieldControl`,state:`value`}),P=o!==void 0,F=P?M:void 0,I=F==null?void 0:String(F),L=X(()=>C.inputRef.current?.value);jM(C.inputRef,j,I,L,!D,a),N(()=>{let e=I??C.inputRef.current?.value;e!==void 0&&x(e!==``)},[I,C.inputRef,x]),tu(I,()=>{I!==void 0&&(w(O),_(I!==(v.initialValue??``)),C.change(I))});let R=b.useRef(null),z=V();return N(()=>{u&&R.current===He(En(R.current))&&y(!0)},[u,y]),Di(`input`,e,{ref:[t,R],state:k,props:[{id:j,disabled:D,name:O,ref:C.inputRef,"aria-labelledby":A,autoFocus:u,...P?{value:F}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=J(Ot,e.nativeEvent);c?.(t,n),!P&&(_(t!==(v.initialValue??``)),x(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(w(O),C.change(t)))},onFocus(){y(!0)},onBlur(e){if(g(!0),y(!1),S===`onBlur`){let t=e.currentTarget.value;C.commit(t),P&&queueMicrotask(()=>{let e=C.inputRef.current?.value;e!==void 0&&e!==t&&e!==(v.initialValue??``)&&C.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===T.current&&!e.defaultPrevented){let t=e.currentTarget,n=E.current;z.start(0,()=>{E.current===n&&C.commit(t.value)})}else C.commit(t)}}},f,e=>C.getValidationProps(D,e)],stateAttributesMapping:fM})}),NM=b.forwardRef(function(e,t){return(0,Y.jsx)(MM,{ref:t,...e})}),PM=`file-tree-container`,FM=`data-file-tree-style`,IM=`data-file-tree-unsafe-css`,LM=`data-file-tree-scrollbar-measure`,RM=`data-file-tree-scrollbar-gutter-measured`,zM=`--trees-scrollbar-gutter-measured`,BM=`header`,VM=`context-menu`,HM=`context-menu-trigger`,UM=typeof window>`u`?b.useEffect:b.useLayoutEffect;function WM(e,t,n){let r=e==null?null:(0,Y.jsx)(`div`,{slot:BM,children:e}),i=t!=null&&n!=null?(0,Y.jsx)(`div`,{slot:VM,children:t(n.item,n.context)}):null;return r==null&&i==null?null:(0,Y.jsxs)(Y.Fragment,{children:[r,i]})}function GM(e,t){return typeof window>`u`&&t!=null?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t.shadowHtml}}),e]}):(0,Y.jsx)(Y.Fragment,{children:e})}function KM(e){let t=e.shadowRoot;return t?.querySelector(`[data-file-tree-id]`)instanceof HTMLElement||t?.querySelector(`[data-file-tree-id]`)instanceof SVGElement||e.querySelector(`template[shadowrootmode="open"]`)instanceof HTMLTemplateElement}function qM(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 JM({header:e,id:t,model:n,preloadedData:r,renderContextMenu:i,...a}){let[o,s]=(0,b.useState)(null),[c,l]=(0,b.useState)(null),u=(0,b.useRef)(n.getComposition()),d=(0,b.useRef)(n);d.current!==n&&(d.current=n,u.current=n.getComposition());let f=i!=null,p=(0,b.useCallback)(()=>{s(null)},[]),m=(0,b.useCallback)((e,t)=>{s({context:t,item:e})},[]),h=u.current,g=(0,b.useMemo)(()=>qM(h,e,f,p,m),[h,p,m,f,e]),_=(0,b.useCallback)(e=>{l(e)},[]);(0,b.useEffect)(()=>{f||s(null)},[f]),UM(()=>{n.setComposition(g)},[g,n]),UM(()=>{if(c!=null)return r!=null&&KM(c)?n.hydrate({fileTreeContainer:c}):n.render({fileTreeContainer:c}),()=>{n.unmount(),n.setComposition(h)}},[h,c,n,r]);let v=GM(WM(e,i,o),r),y=t??r?.id,x={"--trees-item-height":`${String(n.getItemHeight())}px`,"--trees-density-override":n.getDensityFactor(),...a.style};return(0,Y.jsx)(PM,{...a,id:y,ref:_,style:x,suppressHydrationWarning:r!=null,children:v})}var YM=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
1536
1536
|
<symbol id="file-tree-icon-chevron" viewBox="0 0 16 16">
|
|
1537
1537
|
<path d="M12.4697 5.46973C12.7626 5.17684 13.2374 5.17684 13.5303 5.46973C13.8232 5.76262 13.8232 6.23738 13.5303 6.53028L8.53028 11.5303C8.23738 11.8232 7.76262 11.8232 7.46973 11.5303L2.46973 6.53028C2.17684 6.23738 2.17684 5.76262 2.46973 5.46973C2.76262 5.17684 3.23738 5.17684 3.53028 5.46973L8 9.93946L12.4697 5.46973Z" fill="currentcolor"/>
|
|
1538
1538
|
</symbol>
|
|
@@ -1549,72 +1549,72 @@ diff --git`)}function rO(e,t){if(e.length===0)return[``];let n=`\n${t}`,r=e.star
|
|
|
1549
1549
|
<symbol id="file-tree-icon-ellipsis" viewBox="0 0 16 16">
|
|
1550
1550
|
<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" />
|
|
1551
1551
|
</symbol>
|
|
1552
|
-
</svg>`,
|
|
1552
|
+
</svg>`,XM=`<symbol id="file-tree-builtin-astro" viewBox="0 0 16 16">
|
|
1553
1553
|
<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"/>
|
|
1554
1554
|
<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"/>
|
|
1555
|
-
</symbol>`,
|
|
1555
|
+
</symbol>`,ZM=`<symbol id="file-tree-builtin-babel" viewBox="0 0 16 16">
|
|
1556
1556
|
<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"/>
|
|
1557
|
-
</symbol>`,
|
|
1557
|
+
</symbol>`,QM=`<symbol id="file-tree-builtin-bash" 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="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"/>
|
|
1560
|
-
</symbol
|
|
1560
|
+
</symbol>`,$M=`<symbol id="file-tree-builtin-biome" viewBox="0 0 16 16">
|
|
1561
1561
|
<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"/>
|
|
1562
|
-
</symbol>`,
|
|
1562
|
+
</symbol>`,eN=`<symbol id="file-tree-builtin-bootstrap" viewBox="0 0 16 16">
|
|
1563
1563
|
<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"/>
|
|
1564
1564
|
<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"/>
|
|
1565
|
-
</symbol
|
|
1565
|
+
</symbol>`,tN=`<symbol id="file-tree-builtin-browserslist" viewBox="0 0 16 16">
|
|
1566
1566
|
<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"/>
|
|
1567
1567
|
<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"/>
|
|
1568
1568
|
<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"/>
|
|
1569
|
-
</symbol>`,
|
|
1569
|
+
</symbol>`,nN=`<symbol id="file-tree-builtin-bun" viewBox="0 0 16 16">
|
|
1570
1570
|
<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"/>
|
|
1571
|
-
</symbol>`,
|
|
1571
|
+
</symbol>`,rN=`<symbol id="file-tree-builtin-c" viewBox="0 0 16 16">
|
|
1572
1572
|
<path fill="currentColor" fill-rule="evenodd" d="M8 1q.084 0 .166.021.098.023.186.075c1.055.624 4.22 2.486 5.277 3.11.085.05.15.112.209.192h-.002l.028.037a.5.5 0 0 1 .103.21q.031.102.033.21v6.29a.71.71 0 0 1-.347.616l-5.307 3.144a.68.68 0 0 1-.693 0l-5.307-3.144A.72.72 0 0 1 2 11.145V4.832a.71.71 0 0 1 .346-.612l5.288-3.126A.7.7 0 0 1 7.992 1zm2.901 4.349a3.75 3.75 0 1 0 0 5.302l-1.06-1.06a2.25 2.25 0 1 1 0-3.182z" clip-rule="evenodd"/>
|
|
1573
|
-
</symbol>`,
|
|
1573
|
+
</symbol>`,iN=`<symbol id="file-tree-builtin-claude" viewBox="0 0 16 16">
|
|
1574
1574
|
<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"/>
|
|
1575
|
-
</symbol>`,
|
|
1575
|
+
</symbol>`,aN=`<symbol id="file-tree-builtin-cpp" viewBox="0 0 16 16">
|
|
1576
1576
|
<path fill="currentColor" fill-rule="evenodd" d="M8 1q.084 0 .166.021.098.023.186.075c1.055.624 4.22 2.486 5.277 3.11.085.05.15.112.209.192h-.002l.028.037a.5.5 0 0 1 .103.21q.031.102.033.21v6.29a.71.71 0 0 1-.347.616l-5.307 3.144a.68.68 0 0 1-.693 0l-5.307-3.144A.72.72 0 0 1 2 11.145V4.832a.71.71 0 0 1 .346-.612l5.288-3.126A.7.7 0 0 1 7.992 1zm2.901 4.349a3.75 3.75 0 1 0 0 5.302l-1.06-1.06a2.25 2.25 0 1 1 0-3.182z" clip-rule="evenodd"/>
|
|
1577
|
-
</symbol>`,
|
|
1577
|
+
</symbol>`,oN=`<symbol id="file-tree-builtin-css" viewBox="0 0 16 16">
|
|
1578
1578
|
<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"/>
|
|
1579
1579
|
<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"/>
|
|
1580
|
-
</symbol>`,
|
|
1580
|
+
</symbol>`,sN=`<symbol id="file-tree-builtin-database" viewBox="0 0 16 16">
|
|
1581
1581
|
<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"/>
|
|
1582
1582
|
<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"/>
|
|
1583
1583
|
<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"/>
|
|
1584
|
-
</symbol>`,
|
|
1584
|
+
</symbol>`,cN=`<symbol id="file-tree-builtin-default" viewBox="0 0 16 16">
|
|
1585
1585
|
<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"/>
|
|
1586
1586
|
<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"/>
|
|
1587
|
-
</symbol>`,
|
|
1587
|
+
</symbol>`,lN=`<symbol id="file-tree-builtin-docker" viewBox="0 0 16 16">
|
|
1588
1588
|
<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"/>
|
|
1589
1589
|
<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"/>
|
|
1590
|
-
</symbol>`,
|
|
1590
|
+
</symbol>`,uN=`<symbol id="file-tree-builtin-eslint" viewBox="0 0 16 16">
|
|
1591
1591
|
<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"/>
|
|
1592
1592
|
<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"/>
|
|
1593
|
-
</symbol>`,
|
|
1593
|
+
</symbol>`,dN=`<symbol id="file-tree-builtin-font" viewBox="0 0 16 16">
|
|
1594
1594
|
<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"/>
|
|
1595
|
-
</symbol>`,
|
|
1595
|
+
</symbol>`,fN=`<symbol id="file-tree-builtin-git" viewBox="0 0 16 16">
|
|
1596
1596
|
<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"/>
|
|
1597
|
-
</symbol>`,
|
|
1597
|
+
</symbol>`,pN=`<symbol id="file-tree-builtin-go" viewBox="0 0 16 16">
|
|
1598
1598
|
<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"/>
|
|
1599
|
-
</symbol>`,
|
|
1599
|
+
</symbol>`,mN=`<symbol id="file-tree-builtin-graphql" viewBox="0 0 16 16">
|
|
1600
1600
|
<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"/>
|
|
1601
|
-
</symbol>`,
|
|
1601
|
+
</symbol>`,hN=`<symbol id="file-tree-builtin-html" viewBox="0 0 16 16">
|
|
1602
1602
|
<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"/>
|
|
1603
1603
|
<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"/>
|
|
1604
|
-
</symbol>`,
|
|
1604
|
+
</symbol>`,gN=`<symbol id="file-tree-builtin-image" viewBox="0 0 16 16">
|
|
1605
1605
|
<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"/>
|
|
1606
1606
|
<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"/>
|
|
1607
|
-
</symbol>`,
|
|
1607
|
+
</symbol>`,_N=`<symbol id="file-tree-builtin-javascript" viewBox="0 0 16 16">
|
|
1608
1608
|
<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"/>
|
|
1609
1609
|
<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"/>
|
|
1610
|
-
</symbol>`,
|
|
1610
|
+
</symbol>`,vN=`<symbol id="file-tree-builtin-json" viewBox="0 0 16 16">
|
|
1611
1611
|
<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"/>
|
|
1612
|
-
</symbol>`,
|
|
1612
|
+
</symbol>`,yN=`<symbol id="file-tree-builtin-markdown" viewBox="0 0 16 16">
|
|
1613
1613
|
<path fill="currentColor" d="M1 12V4h2l2 2.5L7 4h2v8H7V7.5l-2 2-2-2V12zm9-3 3 3.5L16 9h-2V4h-2v5z"/>
|
|
1614
|
-
</symbol>`,
|
|
1614
|
+
</symbol>`,bN=`<symbol id="file-tree-builtin-mcp" viewBox="0 0 16 16">
|
|
1615
1615
|
<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"/>
|
|
1616
1616
|
<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"/>
|
|
1617
|
-
</symbol>`,
|
|
1617
|
+
</symbol>`,xN=`<symbol id="file-tree-builtin-nextjs" viewBox="0 0 16 16">
|
|
1618
1618
|
<defs>
|
|
1619
1619
|
<linearGradient id="a" x1="4.522" x2="14" y1="3.943" y2="16" gradientUnits="userSpaceOnUse">
|
|
1620
1620
|
<stop stop-color="currentColor"/>
|
|
@@ -1624,82 +1624,82 @@ diff --git`)}function rO(e,t){if(e.length===0)return[``];let n=`\n${t}`,r=e.star
|
|
|
1624
1624
|
<path fill="currentColor" d="M3 2h1.522v9.09H3z"/>
|
|
1625
1625
|
<path fill="url(#a)" d="M4.903 2 15 15.075q-.565.5-1.195.925L4.522 3.943z"/>
|
|
1626
1626
|
<path fill="currentColor" d="M12.172 2h-1.508v9.094h1.508z"/>
|
|
1627
|
-
</symbol>`,
|
|
1627
|
+
</symbol>`,SN=`<symbol id="file-tree-builtin-npm" viewBox="0 0 16 16">
|
|
1628
1628
|
<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"/>
|
|
1629
1629
|
<path fill="currentColor" d="M10.5 13H13V3H3v10h5V5.5h2.5z"/>
|
|
1630
|
-
</symbol>`,
|
|
1630
|
+
</symbol>`,CN=`<symbol id="file-tree-builtin-oxc" viewBox="0 0 16 16">
|
|
1631
1631
|
<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"/>
|
|
1632
|
-
</symbol>`,
|
|
1632
|
+
</symbol>`,wN=`<symbol id="file-tree-builtin-postcss" viewBox="0 0 16 16">
|
|
1633
1633
|
<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"/>
|
|
1634
|
-
</symbol>`,
|
|
1634
|
+
</symbol>`,TN=`<symbol id="file-tree-builtin-prettier" viewBox="0 0 16 16">
|
|
1635
1635
|
<path fill="currentColor" d="M6 12v1H4.93v-1zm1-2v1H2v-1zm6-4v1h-3V6zm-1-4v1H9V2z"/>
|
|
1636
1636
|
<path fill="currentColor" d="M11.5 10v1H8v-1zM5 6v1H2V6zm5-2v1H9V4z" opacity=".8"/>
|
|
1637
1637
|
<path fill="currentColor" d="M6 14v1H2v-1zm-.5-6v1H2V8zM13 4v1h-3V4zM4.93 2v1H2V2z" opacity=".6"/>
|
|
1638
1638
|
<path fill="currentColor" d="M4.93 12v1H2v-1zM13 8v1H9V8zM5.5 4v1H2V4zM9 2v1H4.93V2z" opacity=".4"/>
|
|
1639
|
-
</symbol>`,
|
|
1639
|
+
</symbol>`,EN=`<symbol id="file-tree-builtin-python" viewBox="0 0 16 16">
|
|
1640
1640
|
<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"/>
|
|
1641
1641
|
<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"/>
|
|
1642
|
-
</symbol>`,
|
|
1642
|
+
</symbol>`,DN=`<symbol id="file-tree-builtin-react" viewBox="0 0 16 16">
|
|
1643
1643
|
<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"/>
|
|
1644
1644
|
<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"/>
|
|
1645
|
-
</symbol>`,
|
|
1645
|
+
</symbol>`,ON=`<symbol id="file-tree-builtin-ruby" viewBox="0 0 16 16">
|
|
1646
1646
|
<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"/>
|
|
1647
|
-
</symbol>`,
|
|
1647
|
+
</symbol>`,kN=`<symbol id="file-tree-builtin-rust" viewBox="0 0 16 16">
|
|
1648
1648
|
<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"/>
|
|
1649
|
-
</symbol>`,
|
|
1649
|
+
</symbol>`,AN=`<symbol id="file-tree-builtin-sass" viewBox="0 0 16 16">
|
|
1650
1650
|
<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"/>
|
|
1651
|
-
</symbol>`,
|
|
1651
|
+
</symbol>`,jN=`<symbol id="file-tree-builtin-stylelint" viewBox="0 0 16 16">
|
|
1652
1652
|
<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"/>
|
|
1653
1653
|
<path fill="currentColor" d="M6.5 2.5V4l-2 1.5v-4zm5 3L9.5 4V2.5l2-1zM9 4H7V2.5h2z"/>
|
|
1654
|
-
</symbol>`,
|
|
1654
|
+
</symbol>`,MN=`<symbol id="file-tree-builtin-svelte" viewBox="0 0 16 16">
|
|
1655
1655
|
<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"/>
|
|
1656
|
-
</symbol>`,
|
|
1656
|
+
</symbol>`,NN=`<symbol id="file-tree-builtin-svg" viewBox="0 0 16 16">
|
|
1657
1657
|
<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"/>
|
|
1658
1658
|
<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"/>
|
|
1659
|
-
</symbol>`,
|
|
1659
|
+
</symbol>`,PN=`<symbol id="file-tree-builtin-svgo" viewBox="0 0 16 16">
|
|
1660
1660
|
<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"/>
|
|
1661
1661
|
<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"/>
|
|
1662
|
-
</symbol>`,
|
|
1662
|
+
</symbol>`,FN=`<symbol id="file-tree-builtin-swift" viewBox="0 0 16 16">
|
|
1663
1663
|
<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"/>
|
|
1664
|
-
</symbol>`,
|
|
1664
|
+
</symbol>`,IN=`<symbol id="file-tree-builtin-table" viewBox="0 0 16 16">
|
|
1665
1665
|
<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"/>
|
|
1666
1666
|
<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"/>
|
|
1667
|
-
</symbol>`,
|
|
1667
|
+
</symbol>`,LN=`<symbol id="file-tree-builtin-tailwind" viewBox="0 0 16 16">
|
|
1668
1668
|
<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"/>
|
|
1669
|
-
</symbol>`,
|
|
1669
|
+
</symbol>`,RN=`<symbol id="file-tree-builtin-terraform" viewBox="0 0 16 16">
|
|
1670
1670
|
<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"/>
|
|
1671
|
-
</symbol>`,
|
|
1671
|
+
</symbol>`,zN=`<symbol id="file-tree-builtin-text" viewBox="0 0 16 16">
|
|
1672
1672
|
<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"/>
|
|
1673
1673
|
<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"/>
|
|
1674
|
-
</symbol>`,
|
|
1674
|
+
</symbol>`,BN=`<symbol id="file-tree-builtin-typescript" viewBox="0 0 16 16">
|
|
1675
1675
|
<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"/>
|
|
1676
1676
|
<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"/>
|
|
1677
|
-
</symbol>`,
|
|
1677
|
+
</symbol>`,VN=`<symbol id="file-tree-builtin-vite" viewBox="0 0 16 16">
|
|
1678
1678
|
<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"/>
|
|
1679
|
-
</symbol>`,
|
|
1679
|
+
</symbol>`,HN=`<symbol id="file-tree-builtin-vscode" viewBox="0 0 16 16">
|
|
1680
1680
|
<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"/>
|
|
1681
1681
|
<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"/>
|
|
1682
1682
|
<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"/>
|
|
1683
|
-
</symbol>`,
|
|
1683
|
+
</symbol>`,UN=`<symbol id="file-tree-builtin-vue" viewBox="0 0 16 16">
|
|
1684
1684
|
<path fill="currentColor" d="M9.62 2.25 8 5.02 6.38 2.25H1l7 12 7-12z" opacity=".5"/>
|
|
1685
1685
|
<path fill="currentColor" d="M9.54 2.25 8 4.95l-1.54-2.7H4l4 7 4-7z"/>
|
|
1686
|
-
</symbol>`,
|
|
1686
|
+
</symbol>`,WN=`<symbol id="file-tree-builtin-wasm" viewBox="0 0 16 16">
|
|
1687
1687
|
<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"/>
|
|
1688
1688
|
<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"/>
|
|
1689
1689
|
<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"/>
|
|
1690
|
-
</symbol>`,
|
|
1690
|
+
</symbol>`,GN=`<symbol id="file-tree-builtin-webpack" viewBox="0 0 16 16">
|
|
1691
1691
|
<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"/>
|
|
1692
1692
|
<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"/>
|
|
1693
|
-
</symbol>`,
|
|
1693
|
+
</symbol>`,KN=`<symbol id="file-tree-builtin-yml" viewBox="0 0 16 16">
|
|
1694
1694
|
<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"/>
|
|
1695
|
-
</symbol>`,
|
|
1695
|
+
</symbol>`,qN=`<symbol id="file-tree-builtin-zig" viewBox="0 0 16 16">
|
|
1696
1696
|
<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"/>
|
|
1697
1697
|
<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"/>
|
|
1698
|
-
</symbol>`,
|
|
1698
|
+
</symbol>`,JN=[QM,rN,aN,oN,sN,cN,dN,fN,pN,hN,gN,_N,vN,yN,bN,EN,ON,kN,FN,IN,zN,BN,`<symbol id="file-tree-builtin-zip" viewBox="0 0 16 16">
|
|
1699
1699
|
<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"/>
|
|
1700
1700
|
<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"/>
|
|
1701
|
-
</symbol>`],
|
|
1702
|
-
`)}\n</svg>`)}var
|
|
1701
|
+
</symbol>`],YN=[XM,ZM,$M,eN,tN,nN,iN,lN,uN,mN,xN,SN,CN,wN,TN,DN,AN,jN,MN,NN,PN,LN,RN,VN,HN,UN,WN,GN,KN,qN];function XN(e,t){return t.length===0?e:e.replace(`</svg>`,`\n ${t.join(`
|
|
1702
|
+
`)}\n</svg>`)}var ZN=XN(YM,JN),QN={minimal:YM,standard:ZN,complete:XN(ZN,YN)},$N={".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`},eP={"7z":`zip`,astro:`astro`,AUTHORS:`text`,avif:`image`,bash:`bash`,bmp:`image`,bz2:`zip`,c:`c`,cc:`cpp`,cfg:`text`,CHANGELOG:`text`,cjs:`javascript`,"code-workspace":`vscode`,conf:`text`,CONTRIBUTORS:`text`,cpp:`cpp`,csh:`bash`,css:`css`,csv:`table`,cts:`typescript`,cxx:`cpp`,db:`database`,editorconfig:`text`,env:`text`,"env.development":`text`,"env.local":`text`,"env.production":`text`,eot:`font`,erb:`ruby`,fish:`bash`,gemspec:`ruby`,gif:`image`,go:`go`,gql:`graphql`,graphql:`graphql`,gz:`zip`,h:`c`,hh:`cpp`,hpp:`cpp`,htm:`html`,html:`html`,hxx:`cpp`,icns:`image`,ico:`image`,ini:`text`,inl:`cpp`,jar:`zip`,jpeg:`image`,jpg:`image`,js:`javascript`,json:`json`,json5:`json`,jsonc:`json`,jsonl:`json`,jsx:`javascript`,ksh:`bash`,less:`css`,LICENSE:`text`,log:`text`,markdown:`markdown`,mcp:`mcp`,md:`markdown`,mdx:`markdown`,"mdx.tsx":`markdown`,mjs:`javascript`,mm:`cpp`,mts:`typescript`,ods:`table`,otf:`font`,png:`image`,postcss:`css`,py:`python`,pyi:`python`,pyw:`python`,pyx:`python`,rake:`ruby`,rar:`zip`,rb:`ruby`,rs:`rust`,rst:`text`,rtf:`text`,sass:`css`,scss:`css`,sh:`bash`,sql:`database`,sqlite:`database`,sqlite3:`database`,styl:`css`,svelte:`svelte`,svg:`svg`,swift:`swift`,tar:`zip`,tf:`terraform`,tfstate:`terraform`,tfvars:`terraform`,tgz:`zip`,tif:`image`,tiff:`image`,ts:`typescript`,tsv:`table`,tsx:`typescript`,ttf:`font`,txt:`text`,vue:`vue`,war:`zip`,wasm:`wasm`,wast:`wasm`,wat:`wasm`,webp:`image`,woff:`font`,woff2:`font`,xhtml:`html`,xls:`table`,xlsx:`table`,xz:`zip`,yaml:`yml`,yml:`yml`,zig:`zig`,zip:`zip`,zsh:`bash`},tP={jsx:`react`,sass:`sass`,scss:`sass`,tsx:`react`},nP=new Set([`bash`,`c`,`cpp`,`css`,`database`,`default`,`font`,`git`,`go`,`html`,`image`,`javascript`,`json`,`markdown`,`mcp`,`python`,`ruby`,`rust`,`swift`,`table`,`text`,`typescript`,`zip`]),rP=new Set([`complete`]);function iP(e){return QN[e===`none`?`minimal`:e]}function aP(e){return`file-tree-builtin-${e}`}function oP(e){return e!==`none`&&rP.has(e)}function sP(e,t,n){if(e===`minimal`||e===`none`)return;let r=e===`complete`,i=$N[t.toLowerCase()];if(i!=null&&(r||nP.has(i)))return i;for(let e of n){if(r){let t=tP[e];if(t!=null)return t}let t=eP[e];if(t!=null&&(r||nP.has(t)))return t}return`default`}function cP(e){return e.spriteSheet!=null||e.remap!=null||e.byFileName!=null||e.byFileExtension!=null||e.byFileNameContains!=null}function lP(e){return e==null?{set:`complete`,colored:!0}:typeof e==`string`?{set:e,colored:!0}:{...e,set:e.set??(cP(e)?`none`:`complete`),colored:e.colored??!0}}var uP={compact:{itemHeight:24,factor:.8},default:{itemHeight:30,factor:1},relaxed:{itemHeight:36,factor:1.2}};function dP(e,t){if(typeof e==`number`)return{itemHeight:t??uP.default.itemHeight,factor:e};let n=uP[e??`default`];return{itemHeight:t??n.itemHeight,factor:n.factor}}var fP=uP.default.itemHeight,pP=`@layer base {
|
|
1703
1703
|
:host {
|
|
1704
1704
|
--trees-accent: var(--trees-accent-override, #009fff);
|
|
1705
1705
|
--trees-fg: var(--trees-fg-override, var(--trees-theme-sidebar-fg, light-dark(#6c6c71, #adadb1)));
|
|
@@ -2791,10 +2791,23 @@ diff --git`)}function rO(e,t){if(e.length===0)return[``];let n=`\n${t}`,r=e.star
|
|
|
2791
2791
|
}
|
|
2792
2792
|
|
|
2793
2793
|
@layer theme, unsafe;
|
|
2794
|
-
`,
|
|
2794
|
+
`,mP=`@layer base, unsafe;`;function hP(e){return`${mP}
|
|
2795
2795
|
@layer base {
|
|
2796
2796
|
${e}
|
|
2797
|
-
}`}function
|
|
2797
|
+
}`}function gP(e){return`${mP}
|
|
2798
2798
|
@layer unsafe {
|
|
2799
2799
|
${e}
|
|
2800
|
-
}`}var hP=new WeakMap;function gP(e){let t=hP.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(FM,`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(),hP.set(e,i),i}function _P(e,t){if(!e.isConnected)return;let n=gP(t);if(n==null)return;let r=t.querySelector(`style[${IM}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(IM,``),t.appendChild(i)),i.textContent=`:host { ${LM}: ${n}px; }`}var vP;function yP(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){vP??(vP=new CSSStyleSheet,vP.replaceSync(pP(dP)));let t=!1;try{e.adoptedStyleSheets=[vP],t=!0}catch{}if(t){e.querySelector(`style[${NM}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(NM,``),t.textContent=pP(dP),e.prepend(t)}}function bP(e,t){xP(e,t),yP(t),_P(e,t)}function xP(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`});bP(this,e)}}if(customElements.define(MM,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(MM)))e instanceof HTMLElement&&bP(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var SP=5,CP=32,wP=128;function TP(){return{childIdByNameId:new Map,childIds:[],childPositionById:new Map,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function EP(){return{childIdByNameId:null,childIds:[],childPositionById:null,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function DP(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 OP(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 kP(e,t){e.childPositionById!=null&&e.childPositionById.set(t,e.childIds.length),e.childIds.push(t)}function AP(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 jP(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,FP(e,t)}function MP(e,t,n,r){if(e.totalChildSubtreeNodeCount+=n,e.totalChildVisibleSubtreeCount+=r,e.childVisibleChunkSums==null||r===0)return;let i=OP(e).get(t);if(i===void 0)return;let a=i>>SP;e.childVisibleChunkSums[a]+=r}function NP(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=IP(e,t,a,i);return{...r,childVisibleIndex:n-r.localVisibleIndex}}i-=o,a+=CP}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 PP(e,t,n){let r=0,i=t.childVisibleChunkSums,a=0;if(i!=null){let e=n>>SP;for(let t=0;t<e;t+=1)r+=i[t]??0;a=e<<SP}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 FP(e,t){if(t.childIds.length<wP){t.childVisibleChunkSums=null;return}let n=Math.ceil(t.childIds.length/CP),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>>SP]+=a.visibleSubtreeCount)}t.childVisibleChunkSums=r}function IP(e,t,n,r){let i=Math.min(t.childIds.length,n+CP),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 LP=7,RP=3,zP=8,BP=4;function VP(e,t,n=0){return e<<BP|n<<RP|t}function HP(e){return e.depthAndFlags>>>BP}function UP(e){return(e.depthAndFlags&zP)>>RP}function WP(e){return(e.depthAndFlags&zP)!==0}function GP(e){return e.depthAndFlags&LP}function KP(e,t){return(GP(e)&t)!==0}function qP(e,t){e.depthAndFlags|=t}function JP(e,t){e.depthAndFlags=VP(t,GP(e),UP(e))}var YP=Symbol(`benchmarkInstrumentation`);function XP(e,t){return t==null||Object.defineProperty(e,YP,{configurable:!0,enumerable:!1,value:t,writable:!1}),e}function ZP(e){return e==null?null:e[YP]??null}function QP(e,t,n){return e==null?n():e.measurePhase(t,n)}function $P(e,t,n){Number.isFinite(n)&&e!=null&&e.setCounter(t,n)}function eF(e){return e>=48&&e<=57}function tF(e){let t=[],n=0,r=0;for(;r<e.length;){for(;r<e.length&&!eF(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&&eF(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 nF(e){let t=e.toLowerCase();return{lowerValue:t,tokens:tF(t)}}function rF(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 iF(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=rF(e.tokens,t.tokens);return n===0?e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1:n}function aF(e,t,n){let r=iF(n(e),n(t));return r===0?e===t?0:e<t?-1:1:r}function oF(e,t){return aF(e,t,nF)}function sF(e,t){return t===e.segments.length-1?+!!e.isDirectory:1}function cF(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=sF(e,r);return a===sF(t,r)?oF(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 lF(e,t){return cF(e,t)}function uF(e,t,n){let r=e=>{let t=n.get(e);if(t!=null)return t;let r=nF(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=sF(e,n);return o===sF(t,n)?aF(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 dF(e,t){let n=e.sortKeyById[t];if(n!==void 0)return n;let r=e.valueById[t],i=nF(r);return e.sortKeyById[t]=i,i}function fF(e={}){return{flattenEmptyDirectories:e.flattenEmptyDirectories!==!1,sort:e.sort??`default`}}function pF(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 mF(e){let{hasTrailingSlash:t,segments:n}=pF(e);return{basename:n[n.length-1]??``,isDirectory:t,path:e,segments:n}}function hF(e){if(e.length===0)return{requiresDirectory:!1,segments:[]};let{hasTrailingSlash:t,segments:n}=pF(e);return{requiresDirectory:t,segments:n}}function gF(){let e=new Map;return e.set(``,0),{idByValue:e,valueById:[``],sortKeyById:[nF(``)]}}function _F(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 vF(e,t){let n=e.valueById[t];if(n===void 0)throw Error(`Unknown segment ID: ${String(t)}`);return n}var yF=Symbol(`pathStorePreparedInputKind`);function bF(e,t){return e[yF]=t,e}function xF(e){return{basename:e.basename,depth:e.segments.length,isDirectory:e.isDirectory,path:e.path,segments:e.segments}}function SF(e,t,n){return n==="default"?lF(e,t):n(xF(e),xF(t))}function CF(){return{depthAndFlags:VP(0,3,1),nameId:0,parentId:0,subtreeNodeCount:1,visibleSubtreeCount:1}}function wF(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 TF(e){return e.isDirectory?e.segments.length:e.segments.length-1}function EF(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 DF(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function OF(e,t={}){return PF(e,t).map(e=>e.path)}function kF(e,t={}){let n=PF(e,t);return bF({paths:n.map(e=>e.path),preparedPaths:n},`prepared`)}function AF(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 bF({paths:e,presortedPaths:e,presortedPathsContainDirectories:n},`presorted`)}function jF(e){let t=e,n=t.preparedPaths;if(t[yF]===`prepared`&&n!=null)return n;if(!EF(n))throw Error(`preparedInput must come from PathStore.prepareInput()`);return n}function MF(e){let t=e;return t[yF]===`presorted`&&t.presortedPaths!=null||DF(t.presortedPaths)?t.presortedPaths:null}function NF(e){let t=e;return typeof t.presortedPathsContainDirectories==`boolean`?t.presortedPathsContainDirectories:null}function PF(e,t={}){let n=fF(t),r=ZP(t);$P(r,`workload.inputFiles`,e.length);let i=QP(r,`store.preparePathEntries.parse`,()=>e.map(e=>mF(e)));return QP(r,`store.preparePathEntries.sort`,()=>i.sort((e,t)=>SF(e,t,n.sort))),i}var FF=class{directories=new Map;directoryStack=[0];presortedDirectoryNodeIds=[];initialExpandedPathSet;createdDirectoriesAllExpanded=!1;createdDirectoryCount=0;lastPreparedPath=null;nodes=[CF()];options;instrumentation;segmentSortKeyCache=new Map;segmentTable=gF();hasDeferredDirectoryIndexes=!1;constructor(e={}){this.instrumentation=ZP(e),this.options=fF(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,TP())}appendPaths(e){return QP(this.instrumentation,`store.builder.appendPaths.parse`,()=>this.appendPreparedPaths(e.map(e=>mF(e))))}appendPreparedPaths(e,t=!0){return this.createdDirectoriesAllExpanded=!1,QP(this.instrumentation,`store.builder.appendPreparedPaths`,()=>{for(let n of e)this.appendPreparedPath(n,t)}),this}appendPresortedPaths(e,t=null){return QP(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:VP(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:VP(r,0,1),nameId:u,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),l++,c[l]=d,m=a+1}let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory node for "${t}"`);this.promoteDirectoryToExplicit(e,t)}else{let e=c[l];if(e===void 0)throw Error(`Unable to resolve file parent for "${t}"`);let n=t.slice(m),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n)),i.push({depthAndFlags:VP(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=mF(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:VP(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:VP(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=mF(t)),this.hasDeferredDirectoryIndexes=!0}finish(e={}){let t=e.skipSubtreeCountPass===!0;return this.hasDeferredDirectoryIndexes?(QP(this.instrumentation,`store.builder.buildDirectoryIndexes`,()=>this.buildPresortedFinish(t)),this.hasDeferredDirectoryIndexes=!1):t||QP(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"?uF(this.lastPreparedPath,e,this.segmentSortKeyCache):SF(this.lastPreparedPath,e,this.options.sort))>0)throw Error(`Builder input must be sorted before appendPaths(): "${e.path}"`)}let n=this.lastPreparedPath,r=TF(e),i=n==null?0:TF(n),a=n==null?0:wF(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=_F(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:VP(HP(o)+1,0),nameId:r,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),a?.set(r,s),kP(i,s),s}createFileChildUnchecked(e,t){let n=_F(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:VP(HP(i)+1,0),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),kP(r,a),a}getOrCreateDirectoryChild(e,t){let n=_F(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&&!WP(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:VP(HP(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),kP(r,a),this.directories.set(a,TP()),a}createDirectoryChild(e,t){let n=_F(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:VP(HP(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),kP(r,a),this.directories.set(a,TP()),a}promoteDirectoryToExplicit(e,t){let n=this.nodes[e];if(n===void 0)throw Error(`Unknown directory node ID: ${String(e)}`);if(!WP(n))throw Error(`Path is not a directory: "${t}"`);if(KP(n,1))throw Error(`Duplicate path: "${t}"`);qP(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,EP());let r=-1,i=null;for(let e=1;e<t.length;e++){let a=t[e];if(a==null)continue;if(WP(a)){let t=EP();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;WP(n)&&this.directories.set(t,TP());let r=this.directories.get(n.parentId);r!=null&&(r.childIdByNameId!=null&&r.childIdByNameId.set(n.nameId,t),kP(r,t))}}computeSubtreeCounts(e){let t=this.nodes[e];if(t===void 0)throw Error(`Unknown node ID: ${String(e)}`);if(!WP(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 jP(this.nodes,n),t.subtreeNodeCount=r,t.visibleSubtreeCount=r,r}};function IF(e,t=`closed`,n=null){let r=RF(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 LF(){return{affectedAncestorIds:new Set,affectedNodeIds:new Set,events:[]}}function RF(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 zF(e,t){return KP(t,2)||e.defaultExpansion===`open`?!0:e.defaultExpansion!==`closed`&&HP(t)<=e.defaultExpansion}function BF(e,t,n=e.snapshot.nodes[t]){return n==null||!WP(n)?!1:e.directoriesOpenByDefault&&!e.hasCollapsedDirectoryOverrides?!0:e.collapsedDirectoryIds.has(t)?!1:e.expandedDirectoryIds.has(t)?!0:zF(e,n)}function VF(e,t,n,r=e.snapshot.nodes[t]){if(r==null||!WP(r))return;let i=zF(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 HF(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 UF(e,t){return e.directoryLoadInfoById.get(t)?.state??`loaded`}function WF(e,t){let n=HF(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 GF(e,t){let n=HF(e,t);n.activeAttemptId=null,n.errorMessage=null,n.state=`unloaded`}function KF(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 qF(e,t,n){return e.directoryLoadInfoById.get(t)?.activeAttemptId===n}function JF(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 YF(e,t){e.directoryLoadInfoById.delete(t)}function XF(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 ZF(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`add`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function QF(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`remove`,path:e.path,projectionChanged:e.projectionChanged,recursive:e.recursive,visibleCountDelta:null}}function $F(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,from:e.from,operation:`move`,projectionChanged:e.projectionChanged,to:e.to,visibleCountDelta:null}}function eI(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`expand`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function tI(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`collapse`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function nI(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`mark-directory-unloaded`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function rI(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 iI(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 aI(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 oI(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 sI(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 cI(e,t,n){return{...n,visibleCountDelta:yI(e)-t}}function lI(e,t){let n=yI(e),r=LF();e.transactionStack.push(r);try{t()}catch(t){throw fI(e,r,!1),t}fI(e,r,!0,yI(e)-n)}function uI(e,t){let n=e.instrumentation;if(n==null){dI(e,t);return}QP(n,`store.events.record`,()=>dI(e,t))}function dI(e,t){let n=e.transactionStack[e.transactionStack.length-1]??null;if(n==null){_I(e,t);return}n.events.push(t),gI(n,t)}function fI(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?hI(i,t):QP(n,`store.events.batch.merge`,()=>hI(i,t));return}let a=pI(t,r),o=e.instrumentation;if(o==null){_I(e,a);return}QP(o,`store.events.batch.commit`,()=>_I(e,a))}function pI(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 mI(e,t){for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n);for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n)}function hI(e,t){for(let n of t.events)e.events.push(n);mI(e,t)}function gI(e,t){for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n);for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n)}function _I(e,t){let n=e.instrumentation;if(n==null){vI(e,t);return}QP(n,`store.events.emit`,()=>vI(e,t))}function vI(e,t){e.listeners.get(t.operation)?.forEach(e=>e(t)),e.listeners.get(`*`)?.forEach(e=>e(t))}function yI(e){return e.snapshot.nodes[e.snapshot.rootId]?.visibleSubtreeCount??0}function bI(e,t){if(e.snapshot.options.flattenEmptyDirectories!==!0)return null;let n=e.snapshot.nodes[t];if(n==null||!WP(n)||KP(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||!WP(a)?null:i}function xI(e,t){let n=t;for(;;){let t=bI(e,n);if(t==null)return n;n=t}}function SI(e,t){let n=[t],r=t;for(;;){let t=bI(e,r);if(t==null)return n;n.push(t),r=t}}function CI(e,t){let n=t==null?e.snapshot.rootId:NI(e,t);return n==null?[]:LI(e,n)}function wI(e,t){let n=mF(t),r=n.isDirectory?n.segments:n.segments.slice(0,-1),i=QI(e,ZI(e,r)),{createdNodeIds:a,directoryId:o}=RI(e,r),s=new Set(a),c=o;if(n.isDirectory){let n=II(e,o);if(KP(n,1))throw Error(`Path already exists: "${t}"`);qP(n,1),e.pathCacheByNodeId.set(o,{path:t,version:e.pathCacheVersion}),s.add(o)}else c=BI(e,o,n.basename),s.add(c);AI(e,o);let l=QI(e,o);return ZF({affectedAncestorIds:MI(e,c),affectedNodeIds:[...s],path:t,projectionChanged:$I(i,l)})}function TI(e,t,n){let r=NI(e,t);if(r==null)throw Error(`Path does not exist: "${t}"`);let i=II(e,r);if(KP(i,2))throw Error(`The root node cannot be removed`);if(WP(i)&&FI(e,r).childIds.length>0&&n.recursive!==!0)throw Error(`Cannot remove a non-empty directory without recursive: "${t}"`);let a=i.parentId,o=QI(e,a),s=YI(e,r);UI(e,a,r,i.nameId),XI(e,a),AI(e,a);let c=QI(e,a);return QF({affectedAncestorIds:MI(e,a),affectedNodeIds:s,path:t,projectionChanged:$I(o,c),recursive:n.recursive===!0})}function EI(e,t,n,r){let i=NI(e,t);if(i==null)throw Error(`Source path does not exist: "${t}"`);let a=II(e,i);if(KP(a,2))throw Error(`The root node cannot be moved`);let o=r.collision??`error`,s=qI(e,i,n),c=QI(e,a.parentId),l=QI(e,s.parentId),u=vF(e.snapshot.segmentTable,a.nameId),d=_F(e.snapshot.segmentTable,s.basename);if(s.parentId===a.parentId&&u===s.basename)return null;if(WP(a)&&rL(e,i,s.parentId))throw Error(`Cannot move a directory into one of its descendants`);let f=DP(e.snapshot.nodes,FI(e,s.parentId)).get(d),p=s.existingNodeId??f??null;if(p!=null&&p!==i&&JI(e,p,o,UP(a))===`skip`)return null;let m=a.parentId;UI(e,m,i,a.nameId),a.parentId=s.parentId,a.nameId=d,e.pathCacheByNodeId.delete(i),nL(e,i),HI(e,s.parentId,i),XI(e,m),e.pathCacheVersion++,AI(e,m),s.parentId!==m&&AI(e,s.parentId);let h=QI(e,m),g=QI(e,s.parentId);return $F({affectedAncestorIds:[...new Set([...MI(e,m),...MI(e,s.parentId)])],affectedNodeIds:[i],from:t,projectionChanged:eL([c,l],[h,g]),to:kI(e,i)})}function DI(e,t){let n=e.pathCacheByNodeId.get(t);return n!=null&&n.version===e.pathCacheVersion?n.path:null}function OI(e,t,n){return e.pathCacheByNodeId.set(t,{path:n,version:e.pathCacheVersion}),n}function kI(e,t){let n=II(e,t),r=DI(e,t);if(r!=null)return r;if(KP(n,2))return OI(e,t,``);let i=kI(e,n.parentId),a=vF(e.snapshot.segmentTable,n.nameId),o=i.length===0?a:`${i}${a}`;return OI(e,t,WP(n)?`${o}/`:o)}function AI(e,t){let n=e.instrumentation;if(n==null){aL(e,t);return}QP(n,`store.recomputeCountsUpwardFrom`,()=>aL(e,t))}function jI(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||!WP(o)){iL(e,a,o,!0),n.pop();continue}let s=i.get(a);if(s==null||t[1]>=s.childIds.length){iL(e,a,o,!0),n.pop();continue}let c=s.childIds[t[1]++];n.push([c,0])}}function MI(e,t){let n=[],r=t;for(;r!=null;){let t=II(e,r);if(n.push(r),r===e.snapshot.rootId)break;r=t.parentId}return n}function NI(e,t){if(t.length===0)return e.snapshot.rootId;let n=hF(t);return PI(e,n.segments,n.requiresDirectory)}function PI(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=FI(e,r),a=DP(e.snapshot.nodes,i).get(t);if(a===void 0)return null;r=a}let i=II(e,r);return n&&!WP(i)?null:r}function FI(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 II(e,t){let n=e.snapshot.nodes[t];if(n===void 0||KP(n,4))throw Error(`Unknown node ID: ${String(t)}`);return n}function LI(e,t){let n=e.snapshot.nodes[t];if(n===void 0||KP(n,4))return[];if(!WP(n))return[kI(e,t)];if(FI(e,t).childIds.length===0)return KP(n,1)&&!KP(n,2)?[kI(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||KP(n,4)){i.pop();continue}if(!WP(n)){r.push(kI(e,t.nodeId)),i.pop();continue}let a=FI(e,t.nodeId);if(a.childIds.length===0){KP(n,1)&&!KP(n,2)&&r.push(kI(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 RI(e,t){let n=[],r=e.snapshot.rootId;for(let i of t){let t=_F(e.snapshot.segmentTable,i),a=FI(e,r),o=DP(e.snapshot.nodes,a).get(t);if(o!==void 0){if(!WP(II(e,o)))throw Error(`Cannot create a directory that collides with an existing file: "${i}"`);r=o;continue}r=zI(e,r,t),n.push(r)}return{createdNodeIds:n,directoryId:r}}function zI(e,t,n){let r=II(e,t),i=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:VP(HP(r)+1,0,1),nameId:n,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),e.snapshot.directories.set(i,TP()),HI(e,t,i),e.collapseNewDirectoriesByDefault&&(e.collapsedDirectoryIds.add(i),e.hasCollapsedDirectoryOverrides=!0),e.activeNodeCount++,i}function BI(e,t,n){let r=_F(e.snapshot.segmentTable,n),i=FI(e,t);if(DP(e.snapshot.nodes,i).has(r))throw Error(`Path already exists: "${sL(e,t,n)}"`);let a=II(e,t),o=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:VP(HP(a)+1,0),nameId:r,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),HI(e,t,o),e.activeNodeCount++,o}function VI(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}WI(e,n,o)<0?i=a:r=a+1}return r}function HI(e,t,n){let r=FI(e,t),i=II(e,n);DP(e.snapshot.nodes,r).set(i.nameId,n),MP(r,n,i.subtreeNodeCount,i.visibleSubtreeCount);let a=VI(e,r,n);r.childIds.splice(a,0,n),AP(r,a),FP(e.snapshot.nodes,r)}function UI(e,t,n,r){let i=FI(e,t),a=OP(i),o=a.get(n)??-1;DP(e.snapshot.nodes,i).delete(r),a.delete(n);let s=e.snapshot.nodes[n];s!=null&&MP(i,n,-s.subtreeNodeCount,-s.visibleSubtreeCount),o>=0&&(i.childIds.splice(o,1),AP(i,o),FP(e.snapshot.nodes,i))}function WI(e,t,n){let r=e.snapshot.options.sort;return r==="default"?GI(e,t,n):r(KI(e,t),KI(e,n))}function GI(e,t,n){let r=II(e,t),i=II(e,n),a=WP(r);if(a!==WP(i))return a?-1:1;let o=iF(dF(e.snapshot.segmentTable,r.nameId),dF(e.snapshot.segmentTable,i.nameId));if(o!==0)return o;let s=vF(e.snapshot.segmentTable,r.nameId),c=vF(e.snapshot.segmentTable,i.nameId);return s===c?t<n?-1:1:s<c?-1:1}function KI(e,t){let n=II(e,t),r=kI(e,t),i=WP(n),a=i?r.slice(0,-1):r;return{basename:vF(e.snapshot.segmentTable,n.nameId),depth:HP(n),isDirectory:i,path:r,segments:a.length===0?[]:a.split(`/`)}}function qI(e,t,n){let r=II(e,t),i=NI(e,n);if(i!=null){let t=II(e,i);if(WP(t))return{basename:vF(e.snapshot.segmentTable,r.nameId),existingNodeId:null,parentId:i};let a=hF(n).segments;return{basename:a[a.length-1]??``,existingNodeId:i,parentId:t.parentId}}let a=hF(n),o=a.segments[a.segments.length-1]??``,s=a.segments.slice(0,-1),c=s.length===0?e.snapshot.rootId:PI(e,s,!0);if(c==null)throw Error(`Destination parent does not exist: "${n}"`);return{basename:o,existingNodeId:null,parentId:c}}function JI(e,t,n,r){if(n===`skip`)return`skip`;if(n===`error`)throw Error(`Destination already exists: "${kI(e,t)}"`);let i=II(e,t);if(UP(i)!==r)throw Error(`replace collision requires the same source and destination kinds`);if(WP(i)&&FI(e,t).childIds.length>0)throw Error(`replace collision does not support non-empty directories`);let a=i.parentId,o=i.nameId;return YI(e,t),UI(e,a,t,o),XI(e,a),AI(e,a),`handled`}function YI(e,t){let n=[],r=[{nodeId:t,visitedChildren:!1}];for(;r.length>0;){let t=r.pop();if(t==null)break;let i=II(e,t.nodeId);if(t.visitedChildren||!WP(i)){WP(i)&&e.snapshot.directories.delete(t.nodeId),qP(i,4),e.pathCacheByNodeId.delete(t.nodeId),e.collapsedDirectoryIds.delete(t.nodeId)&&(e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0),e.expandedDirectoryIds.delete(t.nodeId),YF(e,t.nodeId),e.activeNodeCount--,n.push(t.nodeId);continue}r.push({nodeId:t.nodeId,visitedChildren:!0});let a=FI(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 XI(e,t){let n=t;for(;n!=null;){let t=II(e,n);if(!WP(t)||KP(t,2)||FI(e,n).childIds.length>0)return;qP(t,1),n=t.parentId===n?null:t.parentId}}function ZI(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=DP(e.snapshot.nodes,FI(e,n)).get(t);if(i==null||!WP(II(e,i)))break;n=i}return n}function QI(e,t){let n=tL(e,t);if(n==null)return null;let r=xI(e,n),i=II(e,r),a=n===r?null:SI(e,n).map(t=>kI(e,t));return JSON.stringify({flattenedSegmentPaths:a,hasChildren:FI(e,r).childIds.length>0,path:kI(e,r),terminalKind:UP(i)})}function $I(e,t){return eL([e],[t])}function eL(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 tL(e,t){let n=t;for(;n!=null;){let t=II(e,n);if(!WP(t)||KP(t,2))return null;if(!BF(e,n,t))return n;n=t.parentId}return null}function nL(e,t){let n=II(e,t);if(JP(n,(t===e.snapshot.rootId?-1:HP(II(e,n.parentId)))+1),!WP(n))return;let r=FI(e,t);for(let t of r.childIds)nL(e,t)}function rL(e,t,n){let r=n;for(;r!=null;){if(r===t)return!0;let n=II(e,r);if(r===e.snapshot.rootId)return!1;r=n.parentId}return!1}function iL(e,t,n=II(e,t),r=!1){let i=e.instrumentation;if(i==null){oL(e,t,n,r);return}QP(i,`store.recomputeNodeCounts`,()=>oL(e,t,n,r))}function aL(e,t){let n=t;for(;n!=null;){let t=II(e,n),r=t.subtreeNodeCount,i=t.visibleSubtreeCount;if(iL(e,n,t),n===e.snapshot.rootId)return;let a=t.subtreeNodeCount-r,o=t.visibleSubtreeCount-i,s=t.parentId;(a!==0||o!==0)&&MP(FI(e,s),n,a,o),n=s}}function oL(e,t,n,r){if(!WP(n)){n.subtreeNodeCount=1,n.visibleSubtreeCount=1;return}let i=FI(e,t);if(r){let t=e.instrumentation;t==null?jP(e.snapshot.nodes,i):QP(t,`store.recomputeNodeCounts.rebuildChildAggregates`,()=>jP(e.snapshot.nodes,i))}let a=1+i.totalChildSubtreeNodeCount,o=i.totalChildVisibleSubtreeCount;if(n.subtreeNodeCount=a,KP(n,2)){n.visibleSubtreeCount=o;return}n.visibleSubtreeCount=bI(e,t)==null?BF(e,t,n)?1+o:1:o}function sL(e,t,n){let r=kI(e,t);return r.length===0?n:`${r}${n}`}function cL(e){return e!=null&&!KP(e,4)}function lL(e,t){let n=e.snapshot.nodes[t];return!cL(n)||!WP(n)||KP(n,2)?null:n}function uL(e){let t=0;for(let[n,r]of e.pathCacheByNodeId)r.version===e.pathCacheVersion&&cL(e.snapshot.nodes[n])&&(t+=1);return t}function dL(e){return Math.max(0,e.valueById.length-1)}function fL(e){return{activeNodeCount:e.activeNodeCount,cachedPathEntryCount:uL(e),loadInfoEntryCount:e.directoryLoadInfoById.size,segmentCount:dL(e.snapshot.segmentTable),totalNodeSlotCount:Math.max(0,e.snapshot.nodes.length-1)}}function pL(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 mL(e){let t=[],n=[];for(let n of e.collapsedDirectoryIds)lL(e,n)!=null&&t.push(kI(e,n));for(let t of e.expandedDirectoryIds)lL(e,t)!=null&&n.push(kI(e,t));return{collapsedPaths:t,expandedPaths:n}}function hL(e){let t=[];for(let[n,r]of e.directoryLoadInfoById)lL(e,n)!=null&&UF(e,n)!==`loaded`&&t.push({info:{activeAttemptId:null,errorMessage:r.errorMessage,nextAttemptId:r.nextAttemptId,state:r.state},path:kI(e,n)});return t}function gL(e,t){e.collapsedDirectoryIds.clear(),e.hasCollapsedDirectoryOverrides=!1,e.expandedDirectoryIds.clear();for(let n of t.expandedPaths){let t=NI(e,n);t!=null&&VF(e,t,!0,II(e,t))}for(let n of t.collapsedPaths){let t=NI(e,n);t!=null&&VF(e,t,!1,II(e,t))}}function _L(e,t){e.directoryLoadInfoById.clear();for(let n of t){let t=NI(e,n.path);t!=null&&lL(e,t)!=null&&e.directoryLoadInfoById.set(t,{activeAttemptId:null,errorMessage:n.info.errorMessage,nextAttemptId:n.info.nextAttemptId,state:n.info.state})}}function vL(e){e.pathCacheVersion+=1,e.pathCacheByNodeId.clear(),e.pathCacheByNodeId.set(e.snapshot.rootId,{path:``,version:e.pathCacheVersion})}function yL(e){let t=e.snapshot.segmentTable,n=gF();for(let r of e.snapshot.nodes)if(cL(r)){if(KP(r,2)){r.nameId=0;continue}r.nameId=_F(n,vF(t,r.nameId))}e.snapshot.segmentTable=n}function bL(e){for(let[t,n]of e.snapshot.directories){let r=e.snapshot.nodes[t];if(!cL(r)||!WP(r)){e.snapshot.directories.delete(t);continue}let i=n.childIds.filter(n=>{let r=e.snapshot.nodes[n];return cL(r)&&r.parentId===t});n.childIds=i,n.childIdByNameId=new Map(i.map(t=>[II(e,t).nameId,t])),n.childPositionById=new Map(i.map((e,t)=>[e,t])),jP(e.snapshot.nodes,n)}}function xL(e){let t=e.snapshot.nodes.length-1;for(;t>e.snapshot.rootId;){let n=e.snapshot.nodes[t];if(cL(n))break;--t}e.snapshot.nodes.length=t+1}function SL(e){let t=mL(e),n=hL(e);QP(e.instrumentation,`store.cleanup.stable.clearPathCaches`,()=>vL(e)),QP(e.instrumentation,`store.cleanup.stable.rebuildSegmentTable`,()=>yL(e)),QP(e.instrumentation,`store.cleanup.stable.rebuildDirectoryIndexes`,()=>bL(e)),QP(e.instrumentation,`store.cleanup.stable.trimTrailingRemovedNodeSlots`,()=>xL(e)),QP(e.instrumentation,`store.cleanup.stable.restoreExpansionOverrides`,()=>gL(e,t)),QP(e.instrumentation,`store.cleanup.stable.restoreDirectoryLoadInfos`,()=>_L(e,n)),QP(e.instrumentation,`store.cleanup.stable.recomputeCounts`,()=>jI(e,e.snapshot.rootId))}function CL(e){let t=mL(e),n=hL(e),r=QP(e.instrumentation,`store.cleanup.aggressive.listPaths`,()=>CI(e)),i=XP({...e.snapshot.options},e.instrumentation),a=QP(e.instrumentation,`store.cleanup.aggressive.rebuildSnapshot`,()=>{let e=new FF(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,QP(e.instrumentation,`store.cleanup.aggressive.restoreExpansionOverrides`,()=>gL(e,t)),QP(e.instrumentation,`store.cleanup.aggressive.restoreDirectoryLoadInfos`,()=>_L(e,n)),QP(e.instrumentation,`store.cleanup.aggressive.recomputeCounts`,()=>jI(e,e.snapshot.rootId))}function wL(e){for(let t of e.directoryLoadInfoById.values())if(t.state===`loading`&&t.activeAttemptId!=null)return!0;return!1}function TL(e,t){let n=fL(e);t===`stable`?QP(e.instrumentation,`store.cleanup.stable`,()=>SL(e)):QP(e.instrumentation,`store.cleanup.aggressive`,()=>CL(e));let r=fL(e);return pL(t,t===`stable`,n,r)}var EL=64;function DL(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 OL(e){return II(e,e.snapshot.rootId).visibleSubtreeCount}function kL(e,t,n,r){let i=II(e,t.terminalNodeId),a=Math.max(1,i.visibleSubtreeCount);return Math.min(r-1,n+a-1)}function AL(e,t,n,r){return{ancestorPaths:r,index:t.index,posInSet:t.posInSet,row:YL(e,t.cursor),setSize:t.setSize,subtreeEndIndex:kL(e,t.cursor,t.index,n)}}function jL(e,t,n,r,i,a){let o=FI(e,t),{childIndex:s,childVisibleIndex:c,localVisibleIndex:l}=NP(e.snapshot.nodes,o,n),u=o.childIds[s];if(u==null)throw Error(`Visible index ${String(n)} is out of range`);return ML(e,u,l,r+c,i+1,s,o.childIds.length,a)}function ML(e,t,n,r,i,a,o,s){if(!WP(II(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=UL(e,t,i);if(n===0)return{ancestors:s,cursor:c,index:r,posInSet:a,setSize:o};let l=II(e,c.terminalNodeId);if(!WP(l)||!BF(e,c.terminalNodeId,l))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return jL(e,c.terminalNodeId,n-1,r+1,c.visibleDepth,[...s,{cursor:c,index:r,posInSet:a,setSize:o}])}function NL(e,t){let n=OL(e);if(t<0||t>=n)return null;let r=jL(e,e.snapshot.rootId,t,0,-1,[]),i=r.ancestors.map(t=>kI(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=AL(e,a,n,[...i]);t.push(r),i.push(r.row.path)}return a=t,a},index:r.index,posInSet:r.posInSet,row:YL(e,r.cursor),setSize:r.setSize,subtreeEndIndex:kL(e,r.cursor,r.index,n)}}function PL(e,t,n){let r=e.instrumentation,i=OL(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 JL(e,o+1);let t=[],n=BL(e,a);for(let r=a;r<=o&&n!=null;r++){let r=YL(e,n);t.push(r),n=GL(e,n)}return t}let s=[],c=0,l=0,u=QP(r,`store.getVisibleSlice.selectFirstRow`,()=>BL(e,a));for(let t=a;t<=o&&u!=null;t++){let t=QP(r,`store.getVisibleSlice.materializeRow`,()=>YL(e,u));s.push(t),t.isFlattened&&(c++,l+=t.flattenedSegments?.length??0),u=QP(r,`store.getVisibleSlice.advanceCursor`,()=>GL(e,u))}return $P(r,`workload.visibleRowsRead`,s.length),$P(r,`workload.flattenedRowsRead`,c),$P(r,`workload.flattenedSegmentsRead`,l),s}function FL(e,t=OL(e)){let n=e.instrumentation;return n==null?qL(e,t):QP(n,`store.getVisibleTreeProjection`,()=>qL(e,t))}function IL(e){return KL(FL(e))}function LL(e,t){let n=NI(e,t);if(n==null||n===e.snapshot.rootId||WP(II(e,n))&&xI(e,n)!==n)return null;let r=0,i=n,{nodes:a,rootId:o}=e.snapshot;for(;i!==o;){let t=II(e,i).parentId,n=FI(e,t),s=OP(n).get(i);if(s==null)throw Error(`Child ${String(i)} was not found in its parent index`);if(r+=PP(a,n,s),t!==o){let n=II(e,t),a=bI(e,t);if(!BF(e,t,n)&&a!==i)return null;xI(e,t)===t&&(r+=1)}i=t}return r}function RL(e,t){let n=NI(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=II(e,n);if(!WP(r))throw Error(`Path is not a directory: "${t}"`);return BF(e,n,r)?null:(VF(e,n,!0,r),AI(e,n),eI({affectedAncestorIds:MI(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0}))}function zL(e,t){let n=NI(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=II(e,n);if(!WP(r))throw Error(`Path is not a directory: "${t}"`);return BF(e,n,r)?(VF(e,n,!1,r),AI(e,n),tI({affectedAncestorIds:MI(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0})):null}function BL(e,t){return t<0||t>=OL(e)?null:VL(e,e.snapshot.rootId,t,-1)}function VL(e,t,n,r){let i=FI(e,t),a=e.instrumentation,{childIndex:o,localVisibleIndex:s}=a==null?NP(e.snapshot.nodes,i,n):QP(a,`store.getVisibleSlice.selectChildIndex`,()=>NP(e.snapshot.nodes,i,n)),c=i.childIds[o];if(c!=null)return HL(e,c,s,r+1);throw Error(`Visible index ${String(n)} is out of range`)}function HL(e,t,n,r){if(!WP(II(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=UL(e,t,r);if(n===0)return i;let a=II(e,i.terminalNodeId);if(!WP(a)||!BF(e,i.terminalNodeId,a))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return VL(e,i.terminalNodeId,n-1,i.visibleDepth)}function UL(e,t,n){return WP(II(e,t))?e.instrumentation==null?{headNodeId:t,terminalNodeId:xI(e,t),visibleDepth:n}:{headNodeId:t,terminalNodeId:QP(e.instrumentation,`store.getVisibleSlice.flatten.resolveTerminalDirectory`,()=>xI(e,t)),visibleDepth:n}:{headNodeId:t,terminalNodeId:t,visibleDepth:n}}function WL(e,t){let n=II(e,t);if(!WP(n))return!0;let r=n.parentId;return r===e.snapshot.rootId||bI(e,r)!==t}function GL(e,t){let n=II(e,t.terminalNodeId);if(WP(n)){let r=FI(e,t.terminalNodeId);if(BF(e,t.terminalNodeId,n)&&r.childIds.length>0){let n=r.childIds[0];return n==null?null:HL(e,n,0,t.visibleDepth+1)}}let r=t.terminalNodeId,i=t.visibleDepth;for(;;){let t=II(e,r);if(r===e.snapshot.rootId)return null;let n=t.parentId,a=FI(e,n),o=OP(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 HL(e,s,0,i);WL(e,r)&&i--,r=n}}function KL(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 qL(e,t){let n=Array(t),r=new Int32Array(t),i=new Int32Array(t),a=new Int32Array(t),o=new Int32Array(EL);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=DL(o,y);let x,S=_;if(WP(v))S=f?xI(e,_):_,x=S===_?`${b}${h[v.nameId]}/`:kI(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&&WP(C)&&BF(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 JL(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(!WP(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:kI(e,f)};continue}let h=l?xI(e,f):f,g={headNodeId:f,terminalNodeId:h,visibleDepth:m};n[r++]=YL(e,g);let _=i[h];_!=null&&WP(_)&&BF(e,h,_)&&s.push([a.get(h),0,m])}return r<t&&(n.length=r),n}function YL(e,t){let n=II(e,t.terminalNodeId),r=WP(n)?XL(e,t):null,i=kI(e,t.terminalNodeId),a=vF(e.snapshot.segmentTable,n.nameId),o=WP(n)&&FI(e,t.terminalNodeId).childIds.length>0,s=t.headNodeId!==t.terminalNodeId,c=e.instrumentation,l=s?c==null?SI(e,t.headNodeId).map(n=>{let r=II(e,n);return{isTerminal:n===t.terminalNodeId,name:vF(e.snapshot.segmentTable,r.nameId),nodeId:n,path:kI(e,n)}}):QP(c,`store.getVisibleSlice.flatten.collectSegments`,()=>SI(e,t.headNodeId).map(n=>{let r=II(e,n);return{isTerminal:n===t.terminalNodeId,name:vF(e.snapshot.segmentTable,r.nameId),nodeId:n,path:kI(e,n)}})):void 0;return{depth:t.visibleDepth,flattenedSegments:l,hasChildren:o,id:t.terminalNodeId,isExpanded:WP(n)&&BF(e,t.terminalNodeId,n),isFlattened:s,isLoading:r===`loading`,kind:WP(n)?`directory`:`file`,loadState:r==null||r===`loaded`?void 0:r,name:a,path:i}}function XL(e,t){if(t.headNodeId===t.terminalNodeId)return UF(e,t.terminalNodeId);let n=SI(e,t.headNodeId),r=!1,i=!1;for(let t of n){let n=UF(e,t);if(n===`loading`)return`loading`;if(n===`error`){i=!0;continue}n===`unloaded`&&(r=!0)}return i?`error`:r?`unloaded`:`loaded`}var ZL=8;function QL(e){let{nodes:t,directories:n,rootId:r,options:i}=e,a=t.length,o=new Int32Array(a),s=new Int32Array(a),c=new Int32Array(a),l=new Int32Array(a),u=new Int32Array(a),d=new Int32Array(a),f=new Int32Array(a);for(let e=0;e<a;e+=1){let n=t[e];n!=null&&(o[e]=n.parentId,s[e]=n.nameId,c[e]=n.depthAndFlags,l[e]=n.subtreeNodeCount,u[e]=n.visibleSubtreeCount)}let p=0;for(let e of n.values())p+=e.childIds.length;let m=new Int32Array(p),h=0;for(let[e,t]of n){let n=t.childIds;d[e]=h,f[e]=n.length;for(let e=0;e<n.length;e+=1)m[h]=n[e],h+=1}return{nodeCount:a,rootId:r,flattenEmptyDirectories:i.flattenEmptyDirectories===!0,parentId:o,nameId:s,depthAndFlags:c,subtreeNodeCount:l,visibleSubtreeCount:u,childStart:d,childCount:f,childIdsFlat:m}}function $L(e){let{nodeCount:t,rootId:n,flattenEmptyDirectories:r,depthAndFlags:i,subtreeNodeCount:a,visibleSubtreeCount:o,childStart:s,childCount:c,childIdsFlat:l}=e;for(let e=t-1;e>=1;--e){if((i[e]&ZL)===0)continue;let t=s[e],n=c[e],u=0,d=0;for(let e=0;e<n;e+=1){let n=l[t+e];u+=a[n],d+=o[n]}a[e]=1+u;let f;f=r&&n===1?(i[l[t]]&ZL)===0?1+d:d:1+d,o[e]=f}let u=s[n],d=c[n],f=0,p=0;for(let e=0;e<d;e+=1){let t=l[u+e];f+=a[t],p+=o[t]}a[n]=1+f,o[n]=p}function eR(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||!WP(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&&FP(n,i),r.subtreeNodeCount=1+c;let u;if(o&&s===1){let e=n[a[0]];u=e!=null&&WP(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,FP(n,l),c.subtreeNodeCount=1+d,c.visibleSubtreeCount=f}function tR(e){let{directories:t,nodes:n,rootId:r}=e.snapshot,i=QL(e.snapshot);$L(i);let a=i.subtreeNodeCount,o=i.visibleSubtreeCount;for(let e=0;e<n.length;e+=1){let t=n[e];t!=null&&(t.subtreeNodeCount=a[e],t.visibleSubtreeCount=o[e])}for(let[e,i]of t){let t=i.childIds,a=t.length,o=0,s=0;for(let e=0;e<a;e++){let r=t[e];if(r==null)continue;let i=n[r];o+=i.subtreeNodeCount,s+=i.visibleSubtreeCount}i.totalChildSubtreeNodeCount=o,i.totalChildVisibleSubtreeCount=s,(e===r||a>=128)&&FP(n,i)}}function nR(e){return e.initialExpansion===`open`&&(e.initialExpandedPaths==null||e.initialExpandedPaths.length===0)}var rR=class e{#e;constructor(e={}){let t=ZP(e),n=QP(t,`store.builder.create`,()=>new FF(e));if(e.preparedInput!=null){let t=MF(e.preparedInput);t==null?n.appendPreparedPaths(jF(e.preparedInput),!1):n.appendPresortedPaths(t,NF(e.preparedInput))}else{let r=e.paths??[];e.presorted===!0?n.appendPaths(r):n.appendPreparedPaths(QP(t,`store.preparePathEntries`,()=>PF(r,e)))}let r=QP(t,`store.builder.finish`,()=>n.finish({skipSubtreeCountPass:!0})),i=QP(t,`store.state.detectAllDirectoriesExpanded`,()=>(e.initialExpansion??`closed`)===`closed`&&n.didMatchAllInitialExpandedPaths());this.#e=QP(t,`store.state.create`,()=>IF(r,i?`open`:e.initialExpansion??`closed`,t)),i&&(this.#e.collapseNewDirectoriesByDefault=!0);let a=i?this.#e.snapshot.directories.size-1:QP(t,`store.state.initializeExpandedPaths`,()=>this.initializeExpandedPaths(e.initialExpandedPaths));i||nR(e)||(e.initialExpansion??`closed`)===`closed`&&a===this.#e.snapshot.directories.size-1||(e.initialExpandedPaths?.length??0)>0&&QP(t,`store.state.checkAllDirectoriesExpanded`,()=>this.hasAllDirectoriesExpanded())?e.useSoaCountSweep===!0?QP(t,`store.state.initializeOpenVisibleCountsViaSoa`,()=>tR(this.#e)):QP(t,`store.state.initializeOpenVisibleCounts`,()=>eR(this.#e)):QP(t,`store.state.recomputeCounts`,()=>jI(this.#e,this.#e.snapshot.rootId))}static preparePaths(e,t={}){return OF(e,t)}static prepareInput(e,t={}){return kF(e,t)}static preparePresortedInput(e){return AF(e)}list(e){return QP(this.#e.instrumentation,`store.list`,()=>CI(this.#e,e))}add(e){QP(this.#e.instrumentation,`store.add`,()=>{let t=OL(this.#e);uI(this.#e,cI(this.#e,t,wI(this.#e,e)))})}remove(e,t={}){QP(this.#e.instrumentation,`store.remove`,()=>{let n=OL(this.#e);uI(this.#e,cI(this.#e,n,TI(this.#e,e,t)))})}move(e,t,n={}){QP(this.#e.instrumentation,`store.move`,()=>{let r=OL(this.#e),i=EI(this.#e,e,t,n);i!=null&&uI(this.#e,cI(this.#e,r,i))})}batch(e){lI(this.#e,()=>{if(typeof e==`function`){e(this);return}for(let t of e)switch(t.type){case`add`:this.add(t.path);break;case`remove`:this.remove(t.path,{recursive:t.recursive});break;case`move`:this.move(t.from,t.to,{collision:t.collision})}})}getVisibleCount(){return QP(this.#e.instrumentation,`store.getVisibleCount`,()=>OL(this.#e))}getVisibleSlice(e,t){return QP(this.#e.instrumentation,`store.getVisibleSlice`,()=>PL(this.#e,e,t))}getVisibleRowContext(e){return QP(this.#e.instrumentation,`store.getVisibleRowContext`,()=>NL(this.#e,e))}getVisibleTreeProjection(){return IL(this.#e)}getVisibleTreeProjectionData(e){return FL(this.#e,e)}getVisibleIndex(e){return QP(this.#e.instrumentation,`store.getVisibleIndex`,()=>LL(this.#e,e))}getPathInfo(e){return QP(this.#e.instrumentation,`store.getPathInfo`,()=>{let t=NI(this.#e,e);if(t==null)return null;let n=II(this.#e,t);return{depth:HP(n),kind:WP(n)?`directory`:`file`,path:kI(this.#e,t)}})}isExpanded(e){return QP(this.#e.instrumentation,`store.isExpanded`,()=>{let t=this.requireDirectoryNodeId(e),n=II(this.#e,t);return BF(this.#e,t,n)})}expand(e){QP(this.#e.instrumentation,`store.expand`,()=>{let t=OL(this.#e),n=RL(this.#e,e);n!=null&&uI(this.#e,cI(this.#e,t,n))})}collapse(e){QP(this.#e.instrumentation,`store.collapse`,()=>{let t=OL(this.#e),n=zL(this.#e,e);n!=null&&uI(this.#e,cI(this.#e,t,n))})}on(e,t){return XF(this.#e,e,t)}getDirectoryLoadState(e){let t=this.requireDirectoryNodeId(e);return UF(this.#e,t)}markDirectoryUnloaded(e){QP(this.#e.instrumentation,`store.markDirectoryUnloaded`,()=>{let t=this.requireDirectoryNodeId(e);if(FI(this.#e,t).childIds.length>0)throw Error(`Cannot mark a directory with known children as unloaded: "${e}"`);let n=OL(this.#e);GF(this.#e,t),uI(this.#e,cI(this.#e,n,nI({affectedAncestorIds:MI(this.#e,t),affectedNodeIds:[t],path:e,projectionChanged:this.isDirectoryProjectionVisible(t)})))})}beginChildLoad(e){return QP(this.#e.instrumentation,`store.beginChildLoad`,()=>{let t=this.requireDirectoryNodeId(e),n=OL(this.#e),r=WF(this.#e,t);return uI(this.#e,cI(this.#e,n,rI({affectedAncestorIds:MI(this.#e,t),affectedNodeIds:[t],attemptId:r.attemptId,path:e,projectionChanged:this.isDirectoryProjectionVisible(t),reused:r.reused}))),r})}applyChildPatch(e,t){return QP(this.#e.instrumentation,`store.applyChildPatch`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null||UF(this.#e,n)!==`loading`||!qF(this.#e,n,e.attemptId))return!1;let r=kI(this.#e,n);this.validateChildPatch(r,t);let i=OL(this.#e),a=[];for(let e of t.operations){iR(r,e);let t=OL(this.#e);switch(e.type){case`add`:a.push(cI(this.#e,t,wI(this.#e,e.path)));break;case`remove`:a.push(cI(this.#e,t,TI(this.#e,e.path,{recursive:e.recursive})));break;case`move`:{let n=EI(this.#e,e.from,e.to,{collision:e.collision});n!=null&&a.push(cI(this.#e,t,n));break}}}let o=a.some(e=>e.projectionChanged)||this.isDirectoryProjectionVisible(n);return uI(this.#e,cI(this.#e,i,iI({affectedAncestorIds:MI(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,childEvents:a,path:kI(this.#e,n),projectionChanged:o}))),!0})}completeChildLoad(e){return QP(this.#e.instrumentation,`store.completeChildLoad`,()=>{let t=this.resolveActiveDirectoryNodeId(e.nodeId);if(t==null)return!1;let n=OL(this.#e),r=KF(this.#e,t,e.attemptId);return uI(this.#e,cI(this.#e,n,aI({affectedAncestorIds:MI(this.#e,t),affectedNodeIds:[t],attemptId:e.attemptId,path:kI(this.#e,t),projectionChanged:this.isDirectoryProjectionVisible(t),stale:!r}))),r})}failChildLoad(e,t){return QP(this.#e.instrumentation,`store.failChildLoad`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null)return!1;let r=OL(this.#e),i=JF(this.#e,n,e.attemptId,t);return uI(this.#e,cI(this.#e,r,oI({affectedAncestorIds:MI(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,errorMessage:t,path:kI(this.#e,n),projectionChanged:this.isDirectoryProjectionVisible(n),stale:!i}))),i})}cleanup(e={}){return QP(this.#e.instrumentation,`store.cleanup`,()=>{if(this.#e.transactionStack.length>0)throw Error(`Cleanup cannot run during an open batch or transaction.`);if(wL(this.#e))throw Error(`Cleanup cannot run while directory loads are active.`);let t=OL(this.#e),n=TL(this.#e,e.mode??`stable`);return uI(this.#e,cI(this.#e,t,sI({...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=FI(this.#e,p).childIds,_=m===d?n[m]??0:0,v=_,y,b=l.get(a)??nF(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=iF(dF(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(!WP(II(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=II(this.#e,n);BF(this.#e,n,i)||(VF(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=II(this.#e,e);if(!BF(this.#e,e,t))return!1}return!0}requireDirectoryNodeId(e){let t=NI(this.#e,e);if(t==null)throw Error(`Path does not exist: "${e}"`);if(!WP(II(this.#e,t)))throw Error(`Path is not a directory: "${e}"`);return t}resolveActiveDirectoryNodeId(e){try{if(!WP(II(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=II(this.#e,t).parentId;if(e!==this.#e.snapshot.rootId){let n=II(this.#e,e),r=bI(this.#e,e);if(!BF(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 iR(e,t){switch(t.type){case`add`:case`remove`:if(!t.path.startsWith(e)||t.path===e)throw Error(`Child patch operation must stay within ${e}: "${t.path}"`);break;case`move`:if(!t.from.startsWith(e)||!t.to.startsWith(e)||t.from===e||t.to===e)throw Error(`Child patch move must stay within ${e}: "${t.from}" -> "${t.to}"`)}}var aR=e=>e.startsWith(`f::`)?e.slice(3):e;function oR(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function sR(e,t){return e===``?t:`${e}/${t}`}function cR({files:e,path:t,isFolder:n,nextBasename:r}){let i=aR(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}=oR(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=sR(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 lR(e){return e.endsWith(`/`)}function uR(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 dR(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 fR(e,t){return t.includes(e)?dR(t):[e]}function pR(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 mR(e,t){return{draggedPaths:e,target:t}}function hR(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(lR(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function gR(e,t){return t.kind===`root`||t.directoryPath==null?uR(e):t.directoryPath}function _R(e,t){let n=e.map(e=>{let n=gR(e,t);return n===e?null:{from:e,to:n,type:`move`}}).filter(e=>e!=null);return n.length===0?null:{operations:n,result:{draggedPaths:e,operation:n.length===1?`move`:`batch`,target:t}}}function vR(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 yR(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(!vR(rR.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 bR(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}function xR(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 SR(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function CR(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 SR(e,t.path)?n?e:null:e;case`move`:return xR(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=CR(r,e,n),r==null)return null;return r}}}function wR(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function TR(e){switch(e.operation){case`add`:return{...wR(e),operation:`add`,path:e.path};case`remove`:return{...wR(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...wR(e),from:e.from,operation:`move`,to:e.to}}}function ER(e){return{...wR(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>TR(e)),operation:`batch`}}function DR(e){switch(e.operation){case`add`:case`remove`:case`move`:return TR(e);case`batch`:return ER(e);default:return null}}function OR(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function kR(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 AR(e){return kR(e).at(-1)??null}function jR(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}function MR(e){return e.endsWith(`/`)}var NR=e=>e.toLowerCase();function PR(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function FR(e){return e.endsWith(`/`)?e.slice(0,-1):e}function IR(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}var LR=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},RR=Symbol(`FILE_TREE_RENAME_VIEW`),zR=512,BR=512;function VR(e){return e===`top`||e===`center`?e:`nearest`}function HR(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=kR(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 UR(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:HR(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var WR=class e{static{Object.defineProperty(e.prototype,RR,{configurable:!0,value(){return{cancel:()=>{this.#q()},commit:()=>{this.#J()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#Y(e)}}},writable:!0})}#e;#t=new Set;#n=new Map;#r=null;#i=null;#a=new Map;#o=new Map;#s=-1;#c=null;#l=!1;#u=e=>-1;#d=new Map;#f=null;#p=null;#m=null;#h=null;#g=null;#_;#v;#y;#b=[];#x=new Int32Array;#S=new Int32Array;#C=void 0;#w=!1;#T=null;#E=``;#D=!1;#O=new Set;#k=[];#A;#j=null;#M=null;#N=null;#P=null;#F=null;#I=null;#L=null;#R=0;#z=null;#B=new Set;#V=0;#H;#U=0;#W=!1;#G=0;#K;constructor(e){let{dragAndDrop:t,fileTreeSearchMode:n,initialSearchQuery:r,initialSelectedPaths:i,renaming:a,onSearchChange:o,paths:s,preparedInput:c,...l}=e,u=yR({paths:s,preparedInput:c},`constructor`,l.sort);this.#e=l,t!=null&&t!==!1&&(this.#r=t===!0?{}:t),this.#w=a!=null&&a!==!1,a!=null&&a!==!1&&a!==!0&&(this.#C=a.canRename,this.#v=a.onError,this.#_=a.onRename),this.#y=o,this.#A=n??`hide-non-matches`,this.#H=this.#le(u.paths,u.preparedInput);let d=i?.map(e=>this.#Ne(e)).filter(e=>e!=null)??[],f=d.at(-1)??null;d.length>0&&(this.#B=new Set(d),this.#z=f,this.#V=1),this.#je(f,!1),r!=null&&this.#Te(r,!1),this.#K=this.#Re()}destroy(){this.#K?.(),this.#K=null,this.#n.clear(),this.#t.clear(),this.#d.clear(),this.#i=null,this.#he()}focusFirstItem(){this.#be().length>0&&this.#Fe(0)}focusLastItem(){this.#G<=0||(this.#Ie(),this.#Fe(this.#G-1))}focusNextItem(){this.#Ae(1)}focusParentItem(){if(this.#c==null)return;let e=AR(this.#c);if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t)}focusPath(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;this.#Ie();let n=this.#Z(t);n>=0&&this.#Fe(n)}scrollToPath(e,t){let n=this.#H.getPathInfo(e)?.path??null;if(n==null)return;this.#Ie();let r=this.#xe(n);r<0||this.#Me(r)!=null&&(t?.focus!==!1&&this.#Fe(r,!1),this.#L={id:this.#R+=1,offset:VR(t?.offset),visibleIndex:r},this.#De())}focusMountedPathFromInput(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;let n=this.#Z(t);n>=0&&this.#Fe(n)}focusNearestPath(e){let t=this.resolveNearestVisiblePath(e);if(t==null)return null;let n=this.#Z(t);return n>=0?(this.#Fe(n),this.#be()[n]??t):null}focusPreviousItem(){this.#Ae(-1)}getFocusedIndex(){return this.#s}getFocusedItem(){return this.#c==null?null:this.#Q(this.#c)}getFocusedPath(){return this.#c}getScrollRequest(){return this.#L}clearScrollRequest(e){this.#L?.id===e&&(this.#L=null)}resolveNearestVisiblePath(e){let t=this.#be();if(this.#G===0)return null;if(e==null)return this.#c??t[0]??null;let n=this.#H.getPathInfo(e)?.path??e,r=this.#Z(n);return r>=0?t[r]??n:this.#X(n)??this.#c??t[0]??null}getSelectedPaths(){return[...this.#B]}getSelectionVersion(){return this.#V}getVisibleCount(){return this.#G}getVisibleRows(e,t){if(t<e||this.#G===0)return[];let n=Math.max(0,e),r=Math.min(this.#G-1,t);if(r<n)return[];let i=r-n+1;if(this.#F==null&&!this.#l&&r>=this.#b.length&&i<=BR){let e=[];for(let t=n;t<=r;t+=1){let n=this.#H.getVisibleRowContext(t);if(n==null)break;e.push(this.#ee(n))}return e}if(!this.#l&&r>=this.#b.length&&this.#Ie(),this.#F!=null){let e=Array.from({length:r-n+1},(e,t)=>this.#Se(n+t)),t=new Map,i=e[0]??-1,a=i;for(let n=1;n<=e.length;n+=1){let r=e[n];if(r!=null&&r===a+1){a=r;continue}if(i>=0&&this.#H.getVisibleSlice(i,a).forEach((e,n)=>{t.set(i+n,e)}),r==null){i=-1,a=-1;continue}i=r,a=r}return Array.from({length:r-n+1},(e,r)=>{let i=n+r,a=this.#Se(i),o=t.get(a),s=this.#b[a];if(o==null||s==null)throw Error(`Missing projection row for filtered visible index ${String(i)}`);return this.#$(o,i,a,{ancestorPaths:this.#re(a),path:s})})}return this.#H.getVisibleSlice(n,r).map((e,t)=>{let r=n+t,i=this.#b[r];if(i==null)throw Error(`Missing projection path for visible index ${String(r)}`);return this.#$(e,r,r,{ancestorPaths:this.#re(r),path:i})})}getStickyRowCandidates(e,t){if(this.#F!=null)return null;if(this.#G===0||e<=0||t<=0)return[];let n=[];for(let r=0;r<this.#G;r+=1){let i=e+r*t,a=Math.min(this.#G-1,Math.floor(i/t)),o=this.#te(a,r)??(a>0?this.#te(a-1,r):void 0);if(o==null)break;n.push({row:this.#ee(o),subtreeEndIndex:o.subtreeEndIndex})}return n}getItem(e){let t=this.#H.getPathInfo(e);return t==null?null:this.#Q(t.path,t)}resolveMountedDirectoryPathFromInput(e){let t=this.#H.getPathInfo(e);return t?.kind===`directory`?t.path:null}toggleMountedDirectoryFromInput(e){let t=this.resolveMountedDirectoryPathFromInput(e);t!=null&&this.#ze(t)}selectAllVisiblePaths(){this.#Ie();let e=[...this.#be()];this.#ae(e,this.#c??this.#z)}selectOnlyPath(e){let t=this.#Ne(e);t!=null&&this.#ae([t],t)}selectOnlyMountedPathFromInput(e){this.#ae([e],e)}selectPath(e){let t=this.#Ne(e);t==null||this.#B.has(t)||this.#ae([...this.#B,t])}deselectPath(e){let t=this.#Ne(e);t!=null&&this.#B.has(t)&&this.#ae([...this.#B].filter(e=>e!==t))}toggleFocusedSelection(){this.#c!=null&&this.togglePathSelectionFromInput(this.#c)}togglePathSelection(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.deselectPath(t);return}this.selectPath(t)}}togglePathSelectionFromInput(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.#ae([...this.#B].filter(e=>e!==t),t);return}this.#ae([...this.#B,t],t)}}selectPathRange(e,t){let n=this.#Ne(e);if(n==null)return;this.#Ie();let r=this.#z,i=r==null?-1:this.#Ce(r),a=this.#Ce(n);if(i===-1||a===-1){let e=t?[...this.#B,n]:[n];this.#ae(e,n);return}let[o,s]=i<=a?[i,a]:[a,i],c=this.#be().slice(o,s+1),l=t?[...this.#B,...c]:c;this.#ae(l,r)}extendSelectionFromFocused(e){if(this.#c==null)return;let t=this.#s;if(t===-1)return;let n=Math.min(this.#G-1,Math.max(0,t+e));if(n===t)return;!this.#l&&n>=this.#b.length&&this.#Ie();let r=this.#be(),i=r[t]??null,a=r[n]??null;if(i==null||a==null)return;let o=new Set(this.#B);o.has(i)&&o.has(a)?o.delete(i):o.add(a),this.#ae([...o],this.#z??i,!1),this.#Fe(n)}getDragAndDropConfig(){return this.#r}isDragAndDropEnabled(){return this.#r!=null}getDragSession(){return this.#i==null?null:{draggedPaths:[...this.#i.draggedPaths],primaryPath:this.#i.primaryPath,target:this.#i.target==null?null:{...this.#i.target}}}startDrag(e){if(this.#r==null)return!1;let t=this.#Ne(e);if(t==null||this.#M!=null&&this.#M.length>0)return!1;let n=this.getSelectedPaths(),r=fR(t,n);return this.#r.canDrag?.(r)!==!1&&(n.includes(t)||this.#ae([t],t,!1),this.#Pe(t),this.#i={draggedPaths:r,primaryPath:t,target:null},this.#De(),!0)}setDragTarget(e){let t=this.#i;if(t==null)return;let n=e;if(n!=null){let e=mR(t.draggedPaths,n);(hR(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}pR(t.target,n)||(this.#i={...t,target:n},this.#De())}cancelDrag(){this.#i!=null&&(this.#i=null,this.#De())}completeDrag(){let e=this.#i;if(e==null)return!1;this.#i=null;let t=e.target==null?null:{...e.target};if(t==null)return this.#De(),!1;let n=mR(e.draggedPaths,t);if(hR(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#De(),!1;let r=_R(e.draggedPaths,t);if(r==null)return this.#De(),!1;try{if(r.operations.length===1){let e=r.operations[0];if(e==null||e.type!==`move`)throw Error(`Expected a single move operation for one-item drops`);this.#H.move(e.from,e.to,{collision:e.collision})}else this.#ce(r.operations),this.#H.batch(r.operations)}catch(e){return this.#De(),this.#r?.onDropError?.(e instanceof Error?e.message:String(e),n),!1}return this.#r?.onDropComplete?.(r.result),!0}subscribe(e){return this.#t.add(e),e(),()=>{this.#t.delete(e)}}add(e){this.#H.add(e)}remove(e,t={}){this.#H.remove(e,t)}move(e,t,n={}){this.#H.move(e,t,n)}batch(e){this.#H.batch(e)}onMutation(e,t){let n=e,r=t,i=this.#n.get(n);return i??(i=new Set,this.#n.set(n,i)),i.add(r),()=>{let e=this.#n.get(n);e?.delete(r),e?.size===0&&this.#n.delete(n)}}setSearch(e){this.#Te(e,!0)}openSearch(e=``){this.#Te(e,!0)}closeSearch(){this.#Te(null,!0)}isSearchOpen(){return this.#M!==null}getSearchValue(){return this.#M??``}getSearchMatchingPaths(){return this.#k}focusNextSearchMatch(){this.#we(1)}focusPreviousSearchMatch(){this.#we(-1)}startRenaming(e=this.#c??``,t={}){if(!this.#w)return!1;let n=this.#H.getPathInfo(e);if(n==null)return!1;let r=n.path,i=MR(r),a=FR(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of kR(r))this.#H.isExpanded(e)||this.#H.expand(e);return this.#ae([r],r,!1),this.#M!=null&&(this.#Te(null,!1),this.#y?.(this.#M)),this.#Pe(r),this.#T=r,this.#E=PR(r),this.#D=t.removeIfCanceled??!1,this.#De(),!0}#q(){if(this.#T==null)return;let e=this.#T,t=this.#D;if(this.#T=null,this.#E=``,this.#D=!1,t){this.remove(e,MR(e)?{recursive:!0}:void 0);return}this.#Pe(e),this.#De()}#J(){let e=this.#T;if(e==null)return;if(this.#D&&this.#E.trim().length===0){this.#T=null,this.#E=``,this.#D=!1,this.remove(e,MR(e)?{recursive:!0}:void 0);return}let t=MR(e),n=cR({files:this.#H.list(),isFolder:t,nextBasename:this.#E,path:FR(e)});if(this.#T=null,this.#E=``,this.#D=!1,`error`in n){this.#Pe(e),this.#v?.(n.error),this.#De();return}if(n.sourcePath===n.destinationPath){this.#Pe(e),this.#De();return}this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(IR(n.sourcePath,t),IR(n.destinationPath,t))}#Y(e){this.#T!=null&&this.#E!==e&&(this.#E=e,this.#De())}resetPaths(e,t={}){let n=!Array.isArray(e),r=n?void 0:e,i=n?e:t,a=this.#H.list().length,o=this.#G,s=yR({paths:r,preparedInput:i.preparedInput},`resetPaths`,this.#e.sort),c=this.#le(s.paths,s.preparedInput,i.initialExpandedPaths),l=this.#c,u=this.#T,d=this.getSelectedPaths(),f=this.#z;this.#K?.(),this.#H=c,this.#d.clear(),this.#he();let p=d.map(e=>c.getPathInfo(e)?.path??null).filter(e=>e!=null),m=!OR(this.#B,p);this.#B=new Set(p),m&&(this.#V+=1),this.#z=f==null?null:c.getPathInfo(f)?.path??null,this.#T=u==null?null:c.getPathInfo(u)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#je(l,l!=null||p.length>0||this.#z!=null),this.#K=this.#Re(),this.#De(),this.#Oe({canonicalChanged:!0,operation:`reset`,pathCountAfter:s.paths.length,pathCountBefore:a,projectionChanged:!0,usedPreparedInput:i.preparedInput!=null,visibleCountDelta:this.#G-o})}#X(e){this.#Ie();let t=AR(e),n=jR(e,t),r=null,i=null;for(let e of this.#be()){if(AR(e)!==t)continue;let a=jR(e,t);if(a<n){r=e;continue}if(a>n){i=e;break}}return r??i}#Z(e){let t=this.#Ce(e);if(t!==-1)return t;let n=kR(e);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t==null)continue;let r=this.#Ce(t);if(r!==-1)return r}return this.#be().length>0?0:-1}#Q(e,t){let n=this.#d.get(e);if(n!=null)return n;let r=t??this.#H.getPathInfo(e);if(r==null)return null;let i=r.kind===`directory`?this.#oe(r.path):this.#se(r.path);return this.#d.set(r.path,i),i}#$(e,t,n,r){return{ancestorPaths:r.ancestorPaths,depth:e.depth,flattenedSegments:e.flattenedSegments?.map(e=>({isTerminal:e.isTerminal,name:e.name,path:e.path})),hasChildren:e.hasChildren,index:t,isExpanded:e.isExpanded,isFlattened:e.isFlattened,isFocused:r.path===this.#c,isSelected:this.#B.has(r.path),kind:e.kind,level:e.depth,name:e.name,path:r.path,posInSet:r.posInSet??this.#x[n]??0,setSize:r.setSize??this.#S[n]??0}}#ee(e){return this.#$(e.row,e.index,e.index,{ancestorPaths:e.ancestorPaths,path:e.row.path,posInSet:e.posInSet,setSize:e.setSize})}#te(e,t){let n=this.#H.getVisibleRowContext(e);return n==null?void 0:n.ancestorRows[t]??(t===n.ancestorRows.length&&n.row.kind===`directory`&&n.row.isExpanded?n:void 0)}#ne(e){let t=this.#a.get(e);if(t!=null)return t;let n=this.#u(e),r=n<0?[]:[...this.#ne(n),n];return this.#a.set(e,r),r}#re(e){let t=this.#o.get(e);if(t!=null)return t;let n=this.#ne(e).map(e=>this.#b[e]??``).filter(e=>e!==``);return this.#o.set(e,n),n}#ie(e){this.#H.collapse(e)}#ae(e,t=this.#z,n=!0){let r=[...new Set(e)],i=!OR(this.#B,r),a=this.#z!==t;(i||a)&&(this.#B=new Set(r),this.#z=t,i&&(this.#V+=1),n&&this.#De())}#oe(e){return{collapse:()=>{this.#ie(e)},deselect:()=>{this.deselectPath(e)},expand:()=>{this.#ke(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!0,isExpanded:()=>this.#H.isExpanded(e),isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)},toggle:()=>{this.#ze(e)}}}#se(e){return{deselect:()=>{this.deselectPath(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!1,isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)}}}#ce(e){let t=this.#H.list();this.#le(t).batch(e)}#le(e,t,n){return new rR({...this.#e,paths:e,preparedInput:t??void 0,...n===void 0?{}:{initialExpandedPaths:n}})}#ue(){return this.#h??=this.#H.list(),this.#h}#de(){if(this.#m!=null)return this.#m;let e=new Set;for(let t of this.#ue()){e.add(t);for(let n of kR(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#fe(){return this.#g??=this.#ue().map(NR),this.#g}#pe(){return this.#f??=this.#de().filter(e=>e.endsWith(`/`)),this.#f}#me(){return this.#p??=this.#pe().map(NR),this.#p}#he(){this.#f=null,this.#p=null,this.#m=null,this.#h=null,this.#g=null}#ge(){return this.#pe().filter(e=>this.#H.isExpanded(e))}#_e(e){let t=new Set(this.#j??[]);if(e)for(let e of this.#B)for(let n of kR(e))t.add(n);this.#ve(t)}#ve(e){this.#W=!0;try{for(let t of this.#pe()){let n=e.has(t),r=this.#H.isExpanded(t);n&&!r?this.#H.expand(t):!n&&r&&this.#H.collapse(t)}}finally{this.#W=!1}}#ye(){if(this.#M==null||this.#M.length===0){this.#k=[],this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let e=this.#b;if(this.#k=e.filter(e=>this.#O.has(e)),this.#A!==`hide-non-matches`||this.#O.size===0){this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let t=[],n=[],r=new Map;for(let[i,a]of e.entries())this.#N?.has(a)===!0&&(r.set(a,n.length),t.push(i),n.push(a));this.#F=t,this.#I=n,this.#P=r,this.#G=n.length}#be(){return this.#I??this.#b}#xe(e){return this.#I==null?this.#H.getVisibleIndex(e)??-1:this.#P?.get(e)??-1}#Se(e){return this.#F?.[e]??e}#Ce(e){return this.#P?.get(e)??this.#H.getVisibleIndex(e)??-1}#we(e){let t=this.#k;if(t.length===0)return;let n=this.#c,r=n==null?-1:t.indexOf(n),i=t[r<0?e>0?0:t.length-1:Math.min(t.length-1,Math.max(0,r+e))];i!=null&&this.focusPath(i)}#Te(e,t){let n=e==null?null:LR(e),r=this.#M;if(r!==n){if(r==null&&n!=null&&(this.#j=this.#ge()),this.#M=n,n==null)this.#_e(!0),this.#j=null,this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else if(n.length===0)this.#_e(!1),this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else{let e=this.#Ee();this.#je(e,!0)}t&&(this.#y?.(this.#M),this.#De())}}#Ee(){if(this.#M==null||this.#M.length===0)return this.#O.clear(),this.#c;let e=this.#M,t=this.#ue(),n=this.#fe(),r=[],i=new Set,a=null;for(let o=0;o<t.length;o+=1){if(!n[o].includes(e))continue;let s=t[o];r.push(s),i.add(s),a??=s}let o=this.#pe(),s=this.#me();for(let t=0;t<o.length;t+=1){if(!s[t].includes(e))continue;let n=o[t];i.has(n)||(r.push(n),i.add(n),a??=n)}this.#O=i;let c=this.#A===`hide-non-matches`&&r.length>0?new Set:null;this.#N=c;let l=this.#A===`expand-matches`?new Set(this.#j??[]):new Set;for(let e of r){c?.add(e),e.endsWith(`/`)&&l.add(e);for(let t of kR(e))l.add(t),c?.add(t)}return this.#ve(l),a??this.#c}#De(){for(let e of this.#t)e()}#Oe(e){this.#n.get(e.operation)?.forEach(t=>{t(e)}),this.#n.get(`*`)?.forEach(t=>{t(e)})}#ke(e){for(let t of kR(e))this.#H.isExpanded(t)||this.#H.expand(t);this.#H.isExpanded(e)||this.#H.expand(e)}#Ae(e){let t=this.#G;if(t===0)return;let n=this.#s===-1?0:this.#s,r=Math.min(t-1,Math.max(0,n+e));(r!==n||this.#s===-1)&&(!this.#l&&this.#F==null&&r>=this.#b.length&&this.#Ie(),this.#Fe(r))}#je(e,t=!0){let n=this.#H.getVisibleCount();this.#U=n;let r=UR(this.#H.getVisibleTreeProjectionData(t?void 0:Math.min(n,zR)),e,t?e=>this.#H.getVisibleIndex(e):void 0);this.#a.clear(),this.#o.clear(),this.#l=r.paths.length>=n,this.#u=r.getParentIndex,this.#b=r.paths,this.#x=r.posInSetByIndex,this.#S=r.setSizeByIndex,this.#ye(),this.#s=e==null?this.#be().length>0?0:-1:this.#Z(e),this.#c=this.#s<0?null:this.#Me(this.#s)}#Me(e){return this.#be()[e]??(this.#F==null?this.#H.getVisibleRowContext(e)?.row.path??null:null)}#Ne(e){return this.#H.getPathInfo(e)?.path??null}#Pe(e){if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t,!1)}#Fe(e,t=!0){let n=this.#Me(e);n!=null&&(this.#s!==e||this.#c!==n)&&(this.#s=e,this.#c=n,t&&this.#De())}#Ie(){this.#l||this.#je(this.#c,!0)}#Le(e){let t=CR(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=CR(this.#c,e,!0),r=[...this.#B].map(t=>CR(t,e)).filter(e=>e!=null).map(e=>this.#H.getPathInfo(e)?.path??null).filter(e=>e!=null),i=CR(this.#z,e),a=i==null?null:this.#H.getPathInfo(i)?.path??null,o=[...new Set(r)];return OR(this.#B,o)||(this.#B=new Set(o),this.#V+=1),this.#z=a,n}#Re(){return this.#H.on(`*`,e=>{if(this.#W)return;e.canonicalChanged&&(this.#d.clear(),this.#he()),this.#i!=null&&bR(e)&&(this.#i=null);let t=bR(e)?this.#Le(e):this.#c,n=this.#M!=null&&this.#M.length>0?this.#Ee():this.#M===``?this.#c:t,r=this.#M!=null||e.operation!==`expand`&&e.operation!==`collapse`;this.#je(n,r),this.#De();let i=DR(e);i!=null&&this.#Oe(i)})}#ze(e){if(this.#H.isExpanded(e)){this.#ie(e);return}this.#ke(e)}},GR=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 KR(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 qR(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=[],r=0;for(;;){let e=t.indexOf(`/`,r);if(e===-1)break;n.push(t.slice(0,e+1)),r=e+1}return n}function JR(e,t){return t?`${e}/`:e}function YR(e,t=null){let n=GR(e==null?void 0:[...e]);if(n===`0`)return null;if(t?.signature===n)return t;let r=new Map,i=new Set,a=new Set,o=new Map;for(let t of e??[]){let e=ZR(t);e!=null&&ez({canonicalPath:e.canonicalPath,changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,isDirectory:e.isDirectory,status:t.status,statusByPath:r})}return r.size===0?null:{changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}function XR(e,t){let n=t?.remove??[],r=t?.set??[];if(n.length===0&&r.length===0)return e;let i=new Map(e?.statusByPath),a=new Set(e?.directoriesWithChanges),o=new Set(e?.ignoredDirectoryPaths),s=new Map(e?.changeCountByDirectoryPath),c=!1;for(let e of n){let t=QR(e);t!=null&&(c=$R({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,statusByPath:i})||c)}for(let e of r){let t=ZR(e);t!=null&&(c=ez({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,isDirectory:t.isDirectory,status:e.status,statusByPath:i})||c)}return c?i.size===0?null:{changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,signature:rz(i),statusByPath:i}:e}function ZR(e){return QR(e.path)}function QR(e){let t=KR(e);if(t!=null)return{canonicalPath:JR(t.path,t.isDirectory),isDirectory:t.isDirectory}}function $R({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,statusByPath:i}){let a=i.get(e);return a!=null&&(i.delete(e),a===`ignored`&&e.endsWith(`/`)&&r.delete(e),nz(t,n,e),!0)}function ez({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,isDirectory:i,status:a,statusByPath:o}){let s=o.get(e);return s!==a&&(s??tz(t,n,e),o.set(e,a),a===`ignored`&&i?r.add(e):i&&r.delete(e),!0)}function tz(e,t,n){for(let r of qR(n))e.set(r,(e.get(r)??0)+1),t.add(r)}function nz(e,t,n){for(let r of qR(n)){let n=(e.get(r)??0)-1;n>0?e.set(r,n):(e.delete(r),t.delete(r))}}function rz(e){let t=`${e.size}`;for(let[n,r]of e)t+=`\0${n}\0${r}`;return t}var iz=e=>e.trim().toLowerCase(),az=e=>e.split(`/`).at(-1)??e,oz=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 sz(e,t){return typeof e==`string`?{name:e,remappedFrom:t}:{...e,remappedFrom:t}}function cz(e){let t=sP(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(iz(e),n);let a=Object.entries(t.byFileNameContains??{}).map(([e,t])=>[e.toLowerCase(),t]);return{resolveIcon:(e,o)=>{if(e===`file-tree-icon-file`&&o!=null){let s=az(o),c=s.toLowerCase(),l=r.get(c);if(l!=null)return sz(l,e);for(let[t,n]of a)if(c.includes(t))return sz(n,e);let u=oz(s);for(let t of u){let n=i.get(t);if(n!=null)return sz(n,e)}let d=aP(t.set,s,u);if(d!=null&&t.set!==`none`){if(d==="default"){let t=n?.[e];if(t!=null)return sz(t,e)}return{name:rP(d),remappedFrom:e,token:d}}}let s=n?.[e];return s==null?{name:e}:sz(s,e)}}}var lz,uz,dz,fz,pz,mz,hz,gz,_z,vz,yz={},bz=[],xz=Array.isArray,Sz=bz.slice,Cz=Object.assign;function wz(e){e&&e.parentNode&&e.remove()}function Tz(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?Sz.call(arguments,2):n),Ez(e,o,r,i,null)}function Ez(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??++uz,__i:-1,__u:0};return i==null&&lz.vnode!=null&&lz.vnode(a),a}function Dz(e){return e.children}function Oz(e,t){this.props=e,this.context=t,this.__g=0}function kz(e,t){if(t==null)return e.__?kz(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`?kz(e):null}function Az(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 Az(e)}}function jz(e){(8&e.__g||!(e.__g|=8)||!dz.push(e)||pz++)&&fz==lz.debounceRendering||((fz=lz.debounceRendering)||queueMicrotask)(Mz)}function Mz(){for(var e,t,n,r,i,a,o,s,c=1;dz.length;)dz.length>c&&dz.sort(mz),e=dz.shift(),c=dz.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=Cz({},r)).__v=r.__v+1,lz.vnode&&lz.vnode(n),Bz(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??kz(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,Hz(a,n,o),n.__e!=i&&Az(n)));pz=0}function Nz(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||bz,b=t.length;for(c=Pz(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?yz:y[m.__i]||yz,m.__i=f,_=Bz(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&Gz(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=Fz(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function Pz(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?Ez(null,o,null,null,null):xz(o)?Ez(Dz,{children:o},null,null,null):o.constructor==null&&o.__b>0?Ez(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=Iz(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=kz(s)),Kz(s,s));return r}function Fz(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=Fz(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=kz(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Iz(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&e.key==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function Lz(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function Rz(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||Lz(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||Lz(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(hz,`$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=gz,e.addEventListener(t,a?vz:_z,a)):e.removeEventListener(t,a?vz:_z,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 zz(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=gz++;else if(t.u<n.l)return;return n(lz.event?lz.event(t):t)}}}function Bz(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=lz.__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 Oz(v,x),f.constructor=M,f.render=qz),b&&b.sub(f),f.props=v,f.state||(f.state={}),f.context=x,f.__n=r,p=!0,f.__g|=8,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&M.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=Cz({},f.__s)),Cz(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=lz.__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=Cz({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),E=d,d!=null&&d.type===Dz&&d.key==null&&(E=Uz(d.props.children)),s=Nz(e,xz(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--;)wz(a[j]);Vz(t)}}else t.__e=n.__e,t.__k=n.__k,e.then||Vz(t);lz.__e(e,t,n)}else s=t.__e=Wz(n.__e,t,n,r,i,a,o,c,l,u);return(d=lz.diffed)&&d(t),128&t.__u?void 0:s}function Vz(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(Vz)}function Hz(e,t,n){for(var r=0;r<n.length;r++)Gz(n[r],n[++r],n[++r]);lz.__c&&lz.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){lz.__e(e,t.__v)}})}function Uz(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:xz(e)?e.map(Uz):Cz({},e)}function Wz(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&&=(lz.__m&&lz.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=Sz.call(e.childNodes),v=n.props||yz,!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;Rz(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&&!_||Rz(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=``),Nz(b==`template`?e.content:e,xz(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&kz(n,0),s,c,l),a!=null)for(u=a.length;u--;)wz(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||Rz(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&Rz(e,u,g,v[u],i))}return e}function Gz(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){lz.__e(e,n)}}function Kz(e,t,n){var r,i;if(lz.unmount&&lz.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Gz(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){lz.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Kz(r[i],t,n||typeof e.type!=`function`);n||wz(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function qz(e,t,n){return this.constructor(e,n)}function Jz(e,t){var n,r,i,a;t==document&&(t=document.documentElement),lz.__&&lz.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=Tz(Dz,null,[e]),i=[],a=[],Bz(t,e,r||yz,yz,t.namespaceURI,r?null:t.firstChild?Sz.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),Hz(i,e,a)}function Yz(e,t){e.__u|=32,Jz(e,t)}lz={__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 pz=0,e}},uz=0,Oz.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Cz({},this.state);typeof e==`function`&&(e=e(Cz({},n),this.props)),e&&Cz(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),jz(this))},Oz.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),jz(this))},Oz.prototype.render=Dz,dz=[],pz=0,mz=function(e,t){return e.__v.__b-t.__v.__b},hz=/(PointerCapture)$|Capture$/i,gz=0,_z=zz(!1),vz=zz(!0);var Xz=0;Array.isArray;function $(e,t,n,r,i,a){t||={};var o,s,c=t;if(`ref`in c&&typeof e!=`function`)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Xz,__i:-1,__u:0,__source:i,__self:a};return lz.vnode&&lz.vnode(l),l}var Zz=16,Qz=16,$z={};function eB({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}=$z[e]??{width:Zz,height:Qz},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return $(`svg`,{"data-icon-name":t??e,"data-icon-token":n,"data-align-capitals":s,...o==null?{"aria-hidden":!0}:{"aria-label":o,role:`img`},viewBox:m,width:f,height:p,children:$(`use`,{href:c})})}var tB=e=>e!==void 0&&/\s/.test(e),nB=(e,t)=>{let n=t=>tB(e[t-1])||tB(e[t]);if(!n(t))return t;for(let r=1;r<e.length;r++){let i=t-r;if(i>0&&!n(i))return i;let a=t+r;if(a<e.length&&!n(a))return a}return t},rB=e=>nB(e,Math.ceil(e.length/2)),iB=e=>{if(e.length<2)return[e,``];let t=rB(e);return[e.slice(0,t),e.slice(t)]},aB=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:rB(e);return[e.slice(0,r),e.slice(r)]},oB=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)]},sB=(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)]},cB=(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)]},lB=(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 uB({children:e,marker:t,variant:n=`default`}){"use no memo";return $(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:$(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?$(`span`,{"data-truncate-fade":!0}):t})})}function dB(e){"use no memo";let{mode:t,children:n}=e;return $(`div`,{children:[$(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?$(`span`,{children:n}):n}),$(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?$(`span`,{children:n}):n})]})}function fB({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=$(dB,{mode:t,children:e},`content`),o=$(uB,{marker:n,mode:t,variant:r},`marker`),s=$(`div`,{"data-truncate-fill":!0},`fill`);return $(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:$(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function pB({children:e,...t}){"use no memo";return $(fB,{mode:`truncate`,...t,children:e})}function mB({children:e,...t}){"use no memo";return $(fB,{mode:`fruncate`,...t,children:e})}function hB({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=$(pB,{...s,children:t[0]}),l=$(mB,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return $(`div`,{className:a,style:o});if(e.length<i)return $(n===`end`?mB:pB,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=iB:r===`extension`?t=aB:r===`leaf-path`&&(t=oB);else if(typeof r==`number`)t=sB,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=cB:e===`first`&&(t=lB)}else typeof r==`function`&&(t=r);t??=iB;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=$(pB,{...s,..._,children:f}),l=$(mB,{...s,...v,children:p})}return $(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[$(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),$(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var gB={endIndex:-1,startIndex:-1};function _B(e,t,n){return Math.min(Math.max(e,t),n)}function vB(e,t){return e<0||t<e?gB:{endIndex:t,startIndex:e}}function yB(e){return e.startIndex<0||e.endIndex<e.startIndex}function bB(e,t){return yB(e)?0:(e.endIndex-e.startIndex+1)*t}function xB(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function SB(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function CB(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 wB(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 TB(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 EB(e,t,n){if(e.length===0||t<=0)return[];let r=TB(e),i=CB(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=wB(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 DB(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=_B(t.scrollTop,0,o),c=t.stickyRows??EB(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=xB(s,n,t.itemHeight),m=xB(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?gB:vB(m,SB(u+d,n,t.itemHeight)),y=g+1,b=yB(v)?gB:vB(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=bB(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:yB(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var OB={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},kB={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},AB=`Contains git status items`;function jB(e){return e.current?!0:(e.current=!0,!1)}function MB(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 NB(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,offset:i,topInset:a=0,totalHeight:o,viewportHeight:s}=e;if(i===`nearest`)return MB({currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:a,viewportHeight:s});if(n<0)return null;let c=Math.max(0,a),l=n*r,u=Math.max(0,s-c),d=i===`center`?c+Math.max(0,(u-r)/2):c,f=Math.max(0,o-s),p=Math.max(0,Math.min(l-d,f));return p===t?null:p}function PB(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,targetViewportOffset:i,totalHeight:a,viewportHeight:o}=e;if(n<0)return null;let s=Math.max(0,i),c=n*r,l=c+r,u=t+s,d=t+o;if(c>=u&&l<=d)return null;let f=Math.max(0,a-o),p=Math.max(0,Math.min(c-s,f));return p===t?null:p}function FB(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 IB(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 LB(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function RB(e,t){return e!=null&&e>0?e:t}function zB(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 BB(e,t,n,r,i=0){let a=MB({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a!=null&&(e.scrollTop=a,!0)}function VB(e,t,n,r,i,a,o=0){let s=NB({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,offset:a,topInset:o,totalHeight:i,viewportHeight:r});return s!=null&&(e.scrollTop=s,!0)}function HB(e,t,n,r,i,a){let o=PB({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o!=null&&(e.scrollTop=o,!0)}function UB(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function WB(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function GB({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return $(`input`,{ref:n,"data-item-rename-input":!0,...t?{"data-item-flattened-rename-input":!0}:{},"aria-label":e,value:r,onBlur:i,onInput:a,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()})}function KB(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 qB(e){let{event:t,mode:n,isSearchOpen:r,isDirectory:i}=e,a=t.ctrlKey||t.metaKey,o=t.shiftKey||a,s=t.shiftKey?{additive:a,kind:`range`}:a?{kind:`toggle`}:{kind:`single`};return{closeSearch:r,revealCanonical:n===`sticky`,selection:s,toggleDirectory:!o&&i}}var JB,YB,XB,ZB,QB=Object.is,$B=0,eV=[],tV=lz,nV=tV.__b,rV=tV.__r,iV=tV.diffed,aV=tV.__c,oV=tV.unmount,sV=tV.__;function cV(e,t){tV.__h&&tV.__h(YB,e,$B||t),$B=0;var n=YB.__H||(YB.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function lV(e){return $B=1,uV(SV,e)}function uV(e,t,n){var r=cV(JB++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):SV(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);QB(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=YB,!YB.__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,QB(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};YB.__f=!0;var a=YB.shouldComponentUpdate,o=YB.componentWillUpdate;YB.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)},YB.shouldComponentUpdate=i}return r.__N||r.__}function dV(e,t){var n=cV(JB++,3);!tV.__s&&xV(n.__H,t)&&(n.__=e,n.u=t,YB.__H.__h.push(n))}function fV(e,t){var n=cV(JB++,4);!tV.__s&&xV(n.__H,t)&&(n.__=e,n.u=t,YB.__h.push(n))}function pV(e){return $B=5,mV(function(){return{current:e}},[])}function mV(e,t){var n=cV(JB++,7);return xV(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function hV(e,t){return $B=8,mV(function(){return e},t)}function gV(){for(var e;e=eV.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(yV),e.__H.__h.forEach(bV),e.__H.__h=[]}catch(t){e.__H.__h=[],tV.__e(t,e.__v)}}tV.__b=function(e){YB=null,nV&&nV(e)},tV.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),sV&&sV(e,t)},tV.__r=function(e){rV&&rV(e),JB=0;var t=(YB=e.__c).__H;t&&(XB===YB?(t.__h=[],YB.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(yV),t.__h.forEach(bV),t.__h=[],JB=0)),XB=YB},tV.diffed=function(e){iV&&iV(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(eV.push(t)!==1&&ZB===tV.requestAnimationFrame||((ZB=tV.requestAnimationFrame)||vV)(gV)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),XB=YB=null},tV.__c=function(e,t){t.some(function(e){try{e.__h.forEach(yV),e.__h=e.__h.filter(function(e){return!e.__||bV(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],tV.__e(n,e.__v)}}),aV&&aV(e,t)},tV.unmount=function(e){oV&&oV(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{yV(e)}catch(e){t=e}}),n.__H=void 0,t&&tV.__e(t,n.__v))};var _V=typeof requestAnimationFrame==`function`;function vV(e){var t,n=function(){clearTimeout(r),_V&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);_V&&(t=requestAnimationFrame(n))}function yV(e){var t=YB,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),YB=t}function bV(e){var t=YB;e.__c=e.__(),YB=t}function xV(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!QB(t,e[n])})}function SV(e,t){return typeof t==`function`?t(e):t}function CV(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:$(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return $(Dz,{children:[$(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:$(pB,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function wV(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function TV(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function EV(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 DV({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=DB(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:EV(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?EV(u,1,t,o):i&&r<=0&&c.length>0?EB(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 OV=400,kV=40,AV=18;function jV(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))?MV(e,t,n):a instanceof HTMLElement?a:null}function MV(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 NV(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 PV(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 FV(){return navigator.vendor!==`Apple Computer, Inc.`}function IV(e,t){let n=e-t.top;if(n<kV)return-Math.ceil((kV-Math.max(0,n))/kV*AV);let r=t.bottom-e;return r<kV?Math.ceil((kV-Math.max(0,r))/kV*AV):0}function LV(e,t){if(e!=null){let t=OB[e];return t==null?null:{text:t,title:kB[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:AB}:null}function RV(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 zV(e){return e!=null&&`toggle`in e}function BV(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function VV(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function HV(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function UV(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function WV(e,t){return t&&UV(e)||(e.ctrlKey||e.metaKey)&&BV(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var GV=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function KV(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 qV(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 JV(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function YV(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function XV(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function ZV(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 QV(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 $V(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 eH(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=$V(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 tH(e,t){return{kind:e.kind,name:TV(e),path:t}}function nH(e){return e==null?void 0:`${e}__tree`}function rH(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function iH(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function aH(e,t){if(e==null)return null;if(`text`in e)return e.parts==null?$(`span`,{title:e.title,children:e.text}):$(`span`,{title:e.title,children:e.parts.map((e,t)=>$(`span`,{style:{color:e.color},children:e.text},t))});let n=typeof e.icon==`string`?iH(e.icon)?t(e.icon):{name:e.icon}:iH(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return $(`span`,{title:e.title,children:$(eB,{...n})})}function oH(e){e!=null&&FB(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function sH(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=wV(e);return $(Dz,{children:[e.depth>0?$(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>$(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,$(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?$(eB,{...t(`file-tree-icon-chevron`)}):$(eB,{...t(`file-tree-icon-file`,u)})}),$(`div`,{"data-item-section":`content`,children:e.isFlattened?CV(e,c,a):c??$(hB,{minimumLength:5,split:`extension`,children:e.name})}),i?$(`div`,{"data-item-section":`decoration`,children:r==null?null:aH(r,t)}):null,s?$(`div`,{"data-item-section":`git`,children:aH(o,t)}):null,n?$(`div`,{"data-item-section":`action`,children:l?$(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:$(eB,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function cH(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=wV(t),{isParked:F=!1,mode:I=`flow`,style:L}=r,R=I===`sticky`,z=_?.get(P)??null??RV(t.ancestorPaths,v,y),B=t.kind===`directory`&&(b?.has(P)??!1),V=A(t,P),H=LV(z,B),U=S&&w,ee=V!=null||x||U,te=U&&T===`always`,ne=a.getPath()===P,W=ne?a.getValue():``,re=R||!ne?null:$(GB,{ref:D,ariaLabel:`Rename ${TV(t)}`,isFlattened:t.isFlattened,value:W,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),ie=sH(t,k,{actionLaneEnabled:U,customDecoration:V,decorationLaneEnabled:ee,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:H,gitLaneActive:x,renameInput:re,showDecorativeActionAffordance:te}),ae={...KB({ariaLabel:TV(t),domId:t.isFocused?rH(h,P,F):void 0,extraStyle:L,features:{actionLaneEnabled:U,contextMenuButtonVisibility:U?T:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:F,itemHeight:g,mode:I,row:t,state:{containsGitChange:B,effectiveGitStatus:z,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.focusMountedPathFromInput(P),j(t,P,{anchorRect:JV(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:R?void 0:()=>{i.focusMountedPathFromInput(P)},onKeyDown:R?void 0:N,ref:e=>{O(P,e)}};return!R&&ne?$(`div`,{...ae,children:ie}):$(`button`,{...ae,type:`button`,draggable:u&&!F,onDragEnd:u&&!F?p:void 0,onDragStart:u&&!F?e=>{f(e,t,P)}:void 0,onMouseDown:e=>{if(R){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!F?e=>{m(e,t,P)}:void 0,onClick:e=>{M(e,t,P,I)},children:ie})}function lH(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(wV(e))).map((n,r)=>cH(e,n,t.start+r))}function uH({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=uP,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 _=pV(null),v=pV(null),y=pV(!1),b=pV(null),x=pV(null),S=pV(null),C=pV(null),w=pV(null),T=pV(new Map),E=pV(new Map),D=pV(()=>{}),O=pV(null),k=pV(0),A=pV(!1),j=pV(null);j.current!==t&&(A.current=!1,j.current=t);let M=pV(!1),N=pV(null),P=pV(null),F=pV(!1),I=pV(null),L=pV(null),R=pV(null),z=pV(null),B=pV(null),V=pV(null),H=pV(null),U=pV(null),ee=pV(!1),te=pV(null),ne=pV(null),W=pV(null),re=pV(null),ie=mV(()=>new Map,[]),[,ae]=lV(0),G=pV(!1),[oe,se]=lV(null),[ce,le]=lV(null),[ue,de]=lV(null),[fe,pe]=lV(null),[me,he]=lV(0),[ge,_e]=lV(null),ve=pV(ge);ve.current=ge;let ye=pV(null),be=pV(null),xe=pV(null),Se=pV(null),Ce=pV(null),we=pV(!1),Te=()=>{be.current=null,xe.current=null,Se.current=null},Ee=(e,t)=>{be.current=e,xe.current=null,Se.current=t==null?null:{path:e,scrollTop:t}},De=(e,t)=>{be.current=null,xe.current={path:e,viewportOffset:t},Se.current=null},Oe=pV(d===`retain`&&t.isSearchOpen()),[ke,Ae]=lV(p);dV(()=>{p||Ae(!1)},[p]);let je=pV(!1),Me=hV(()=>{je.current=!0,Ae(e=>e&&!1)},[]),[Ne,Pe]=lV(()=>DV({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[Fe,Ie]=lV(!1);dV(()=>{Ie(!0)},[]);let Le=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,Re=e?.contextMenu?.triggerMode??(Le?`right-click`:`both`),ze=Re===`both`||Re===`button`,Be=e?.contextMenu?.buttonVisibility??`when-needed`,Ve=Re===`both`||Re===`right-click`;fV(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;Ce.current=t,le(t),pe(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(we.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 He=hV((e,t)=>{XV(T.current,e,t)},[]),K=hV((e,t)=>{XV(E.current,e,t)},[]),Ue=hV(e=>{x.current=e},[]),We=hV(e=>ZV(e,E.current,T.current),[]),Ge=n!=null||r!=null||i!=null,{resolveIcon:Ke}=mV(()=>cz(a),[a]),qe=t[RR](),Je=qe.getPath(),Ye=Je!=null,Xe=t.isSearchOpen(),Ze=t.getSearchValue(),Qe=t.getFocusedPath(),$e=t.getFocusedIndex(),et=t.getScrollRequest(),tt=t.isDragAndDropEnabled(),nt=t.getDragSession(),rt=mV(()=>nt==null?null:new Set(nt.draggedPaths),[nt]),it=nt?.target??null,at=nt?.primaryPath??null,ot=nH(o),{overlayHeight:st,overlayRows:ct,snapshot:lt,visibleRows:ut}=Ne,dt=lt.physical.viewportHeight,ft=mV(()=>({end:lt.window.endIndex,start:lt.window.startIndex}),[lt.window.endIndex,lt.window.startIndex]),pt=ct,mt=lt.sticky.rows,ht=lt.physical.totalHeight,gt=lt.sticky.height,q=mV(()=>new Set(mt.map(e=>wV(e.row))),[mt]),_t=$e>=0&&$e>=ft.start&&$e<=ft.end,vt=hV((e,t)=>u?.({item:tH(e,t),row:e})??null,[u]),yt=hV(e=>FB(e==null?null:T.current.get(e)??null)?!0:FB(S.current),[]),bt=hV(e=>{yt(t.focusNearestPath(e))},[t,yt]),xt=pV(bt);xt.current=bt;let St=pV(!0),Ct=pV(()=>{}),wt=hV((t=!0)=>{let n=ve.current;n!=null&&(St.current=St.current&&t,_e(null),e?.contextMenu?.onClose?.(),St.current&&bt(n.path))},[e?.contextMenu,bt]);Ct.current=wt;let Tt=hV(e=>{let t=e==null?null:YV(S.current,e);de(e=>e===t?e:t)},[]),Et=hV((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=We(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;Ee(n,e?.scrollTop??null),M.current=!0,se(e=>e===n?e:n)}i.focus(),Tt(a),St.current=!0,_e({anchorRect:r?.anchorRect??null,item:tH(e,n),path:n,source:r?.source??`keyboard`})},[t,We,Tt]),Dt=hV(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=LB(e,dt);I.current=$e<0||e==null?null:Math.max(0,Math.min($e*s-e.scrollTop,Math.max(0,t-s))),F.current=!0}t.startRenaming(e)!==!1&&(pe(`focus`),ae(e=>e+1))}},[t,$e,s,l,dt]),Ot=hV((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=LB(i,dt),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:DV({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return M.current=!0,HB(i,a,s,l,u,d),D.current(),ye.current=n?e:null,!0},[t,s,c,dt,h]),kt=()=>y.current===!0||re.current!=null||ee.current===!0,At=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),jt=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},Mt=()=>{z.current!=null&&(clearTimeout(z.current),z.current=null),R.current=null},Nt=()=>{V.current?.remove(),V.current=null},Pt=()=>{jt(L.current),L.current=null,B.current=null},Ft=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},It=()=>{U.current?.(),U.current=null,re.current!=null&&(clearTimeout(re.current),re.current=null),ee.current=!1,te.current=null,W.current=null,ne.current!=null&&(ne.current.setAttribute(`draggable`,`true`),ne.current.style.removeProperty(`touch-action`),ne.current=null),Nt(),Mt(),Pt(),H.current=null},Lt=(e,n)=>{let r=S.current?.getRootNode(),i=NV(jV(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},Rt=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){Mt();return}let r=t.getItem(e.directoryPath),i=zV(r)?r:null;if(i==null||i.isExpanded()){Mt();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;R.current!==a&&(Mt(),R.current=a,z.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind===`directory`&&n.directoryPath===e.directoryPath&&n.flattenedSegmentPath===e.flattenedSegmentPath&&i.expand()},n))},zt=()=>{L.current=null;let e=B.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=IV(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()),Rt(Lt(e.clientX,e.clientY)),L.current=At(zt)},Bt=(e,t)=>{B.current={clientX:e,clientY:t},L.current??=At(zt)},Vt=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(It(),Nt(),Mt(),Pt(),t.startDrag(r)===!1){e.preventDefault();return}if(H.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),FV())){let t=PV(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),Ft(t),V.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},Ht=()=>{Nt(),Mt(),Pt(),H.current=null,t.cancelDrag()},Ut=(e,n,r)=>{if(re.current!=null||ee.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;W.current={clientX:i.clientX,clientY:i.clientY},ne.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!ee.current;re.current!=null&&(clearTimeout(re.current),re.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),U.current===o&&(U.current=null),t&&(a.setAttribute(`draggable`,`true`),ne.current===a&&(ne.current=null),W.current=null)},s=e=>{let t=e.touches[0],n=W.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=100||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),U.current=o,re.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),ne.current===a&&(ne.current=null),W.current=null;return}ee.current=!0,ne.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),H.current=n;let e=a.getBoundingClientRect(),s=PV(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`}),Ft(s),V.current=s,te.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=te.current;n!=null&&V.current!=null&&(V.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),Rt(Lt(t.clientX,t.clientY)),Bt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Lt(n.clientX,n.clientY),t.completeDrag(),It()},u=()=>{t.cancelDrag(),It()};U.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)},OV)},Wt=e=>{if(ge!=null){if(e.key===`Escape`){wt(),e.preventDefault(),e.stopPropagation();return}GV.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(qe.isActive()){if(e.isComposing||e.keyCode===229)return;if(e.key===`Escape`)qe.cancel();else if(e.key===`Enter`)qe.commit();else return;pe(`focus`),ae(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){Dt(Qe??void 0),e.preventDefault(),e.stopPropagation();return}if(Xe){if(e.key===`Escape`)F.current=!1,I.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=LB(n,dt);I.current=$e<0||n==null?null:Math.max(0,Math.min($e*s-n.scrollTop,Math.max(0,r-s))),F.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;pe(`focus`),ae(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&VV(e)){t.openSearch(e.key),ae(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=Le&&UV(e),r=WV(e,Le),i=r&&S.current!=null?IB(S.current):null,a=r?new Set(QV(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==Qe&&a.has(o)){let e=C.current;Ee(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=zV(p)?p:null,h=u!=null&&(q.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=ZV(u,E.current,T.current);e==null||n==null?y=!1:Et(e,u)}else if((e.ctrlKey||e.metaKey)&&BV(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;pe(`focus`);let b=t.getFocusedPath(),x=b!=null&&(q.has(b)||a.has(b)),w=g&&b!==u,D=n&&c&&o===u&&b===u;if((h||D)&&b!=null&&(w&&x||D))Ee(b,v?.scrollTop??null),M.current=!0,se(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(De(b,eH(S.current,v,i,u,s,gt,dt)),M.current=!0,se(e=>e===b?e:b)):Te()}ae(e=>e+1),e.preventDefault(),e.stopPropagation()};fV(()=>{if(f&&Xe){if(Oe.current){Oe.current=!1;return}FB(w.current)}},[Xe,f]),fV(()=>{let e=x.current;switch(WB({hasRenderedInput:e!=null,previousRenamingPath:P.current,renamingPath:Je})){case`reset`:P.current=null;return;case`reveal-canonical`:Je!=null&&Ot(Je,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(ye.current=null,P.current=Je,FB(e),e.select());return}},[ft.end,ft.start,Je,Ot,q]),fV(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=IB(e)?.dataset.itemPath??null;se(e=>e===t?e:t)},i=()=>{n(),M.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,IB(e)!=null){r();return}M.current=!1,se(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),M.current=!1,se(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;se(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),fV(()=>{let e=S.current;e!=null&&(lt.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[lt.physical.scrollTop]),fV(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;O.current=LB(n,g);let a=()=>{let e=t.getVisibleCount(),r=RB(O.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),Pe(DV({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};if(!A.current){A.current=!0;let e=t.getFocusedIndex();if(e>=0){let r=RB(O.current,g),i=t.getVisibleRows(e,e)[0]??null;BB(n,e,s,r,h&&i!=null?Math.max(0,Math.min(i.ancestorPaths.length*s,Math.max(0,r-s))):0)}}D.current=a;let o=t.subscribe(()=>{jB(G)&&ae(e=>e+1),a()}),l=()=>{we.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,he(e=>e+1),e=null},50))},u=null,d=()=>{i!=null&&delete i.dataset.overlayReveal,u!=null&&(clearTimeout(u),u=null)},f=()=>{i!=null&&we.current!==!0&&(n.scrollTop>0||(i.dataset.overlayReveal=`true`,u!=null&&clearTimeout(u),u=setTimeout(()=>{d()},200)))},p=()=>{if(a(),n.scrollTop>0&&d(),ve.current!=null&&y.current&&Ct.current(),we.current===!0){y.current=!1;return}le(e=>e==null?e:null),l()},m=()=>{l(),f()},_=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),v=e=>{_.has(e.key)&&m()};n.addEventListener(`scroll`,p,{passive:!0}),n.addEventListener(`wheel`,m,{passive:!0}),n.addEventListener(`touchmove`,m,{passive:!0}),n.addEventListener(`keydown`,v);let x=typeof ResizeObserver<`u`?new ResizeObserver(e=>{O.current=(e[0]==null?null:zB(e[0]))??LB(n,g),a()}):null;return x?.observe(n),()=>{D.current=()=>{},o(),n.removeEventListener(`scroll`,p),n.removeEventListener(`wheel`,m),n.removeEventListener(`touchmove`,m),n.removeEventListener(`keydown`,v),e!=null&&clearTimeout(e),u!=null&&clearTimeout(u),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,O.current=null,x?.disconnect()}},[t,g,s,c,h]),fV(()=>{Le||ge==null||wt(!1)},[wt,Le,ge]);let Gt=mV(()=>ge==null?null:`${ge.path}::${ge.source}`,[ge]);fV(()=>{if(Gt==null){m?.clearSlotContent(zM);return}let t=ve.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??qV(n.getBoundingClientRect()),close:e=>{Ct.current(e?.restoreFocus??!0)},restoreFocus:()=>{St.current&&xt.current(ve.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(zM,i),e?.contextMenu?.onOpen?.(t.item,r),oH(i),queueMicrotask(()=>{i!=null&&i.isConnected&&document.activeElement===i&&oH(i)}),()=>{m?.clearSlotContent(zM)}},[Gt,e?.contextMenu,m]),fV(()=>{ge!=null&&t.getItem(ge.path)==null&&wt()},[wt,ge,t]),fV(()=>{if(ge==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(KV(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&wt())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),wt())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[wt,ge]),fV(()=>{let e=C.current,n=S.current;if(e==null||n==null){N.current=Qe;return}let r=Qe==null?null:T.current.get(Qe)??null,i=IB(n),a=i?.dataset.itemPath??null,o=Ye&&x.current===i,c=f&&w.current===i,l=F.current&&!Xe,u=I.current??0,d=ye.current,p=be.current,m=xe.current,g=Se.current,_=i!=null,v=M.current||_,y=N.current!==Qe,b=p!=null&&p===Qe&&Qe!=null,E=!1,O=!1;if(et!=null&&et.id!==k.current){k.current=et.id;let n=et.visibleIndex,r=t.getVisibleRows(n,n)[0]??null;if(r!=null){let t=h?Math.max(0,Math.min(r.ancestorPaths.length*s,Math.max(0,dt-s))):gt;E=!0,O=VB(e,n,s,dt,ht,et.offset,t)}t.clearScrollRequest(et.id)}let A=!E&&l&&HB(e,$e,s,dt,ht,u),j=!E&&d!=null&&d===Qe&&HB(e,$e,s,dt,ht,gt),P=!E&&m!=null&&m.path===Qe&&HB(e,$e,s,dt,ht,m.viewportOffset),L=!E&&g!=null&&g.path===Qe&&e.scrollTop!==g.scrollTop;if(L&&(e.scrollTop=g.scrollTop),(L||O||j||P||A||v&&y&&d!==Qe&&!b&&BB(e,$e,s,dt,gt))&&D.current(),E){N.current=Qe;return}if(!v){N.current=Qe;return}if(o){N.current=Qe;return}if(c&&!l){N.current=Qe;return}if(r==null){l&&$e>=0&&(HB(e,$e,s,dt,ht,u),D.current()),N.current=Qe;return}(y||l||d===Qe||p===Qe||m?.path===Qe||g?.path===Qe||a==null||a!==Qe)&&(FB(r),d===Qe&&(ye.current=null),p===Qe&&(be.current=null),m?.path===Qe&&(xe.current=null),g?.path===Qe&&(Se.current=null),F.current=!1,I.current=null),N.current=Qe},[t,$e,Qe,_t,s,Ye,Xe,ft,dt,f,et,h,gt,ht,ut]);let Kt=$e>=0&&$e>=lt.visible.startIndex&&$e<=lt.visible.endIndex,qt=Qe!=null&&pt.some(e=>wV(e.row)===Qe),Jt=Kt||qt,Yt=ze&&M.current===!0&&Jt?Qe:null,Xt=fe===`pointer`?ce:null,Zt=ge?.path??Ce.current??Xt??Yt??ce,Qt=ge?.source===`right-click`;fV(()=>{y.current&&ge==null||Tt(We(Zt))},[ge,We,ft,dt,me,pt,Zt,Tt,ut]);let $t=hV(e=>{if(y.current||KV(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&&pe(e=>e===`pointer`?e:`pointer`),le(e=>e===i?e:i)},[]),J=hV(()=>{le(null)},[]);fV(()=>{if(!tt)return;let e=()=>{It(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),It(),t.cancelDrag()}},[t,tt]);let en=e=>{if(!tt||t.getDragSession()==null||ee.current)return;let n=NV(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),Rt(t.getDragSession()?.target??null),Bt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},tn=e=>{if(!tt||t.getDragSession()==null||ee.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(Mt(),Pt(),t.setDragTarget(null))},Y=e=>{tt&&t.getDragSession()!=null&&!ee.current&&(e.preventDefault(),Lt(e.clientX,e.clientY),t.completeDrag(),Nt(),Mt(),Pt(),H.current=null)},nn=lt.window.height,rn=lt.window.offsetTop,an=Math.min(0,dt-nn),on=Math.min(0,dt-nn-gt),sn=oe===Qe||F.current,cn=Qe!=null&&sn&&!_t&&$e>=0?ut[$e]??t.getVisibleRows($e,$e)[0]??null:null,ln=cn==null?null:UB($e,s,ft,nn),un=H.current,dn=at!=null&&un!=null&&un.path===at&&un.index>=ft.start&&un.index<=ft.end,fn=at!=null&&un!=null&&un.path===at&&!dn&&un.path!==cn?.path?un:null,pn=fn==null?null:UB(fn.index,s,ft,nn),mn=HV(($e>=0?ut[$e]??t.getVisibleRows($e,$e)[0]??null:null)?.ancestorPaths.at(-1)??null),hn=Xe&&Qe!=null?rH(o,Qe,!_t):void 0,gn=ge?.path??(Xe?Qe:oe),_n=ge?.path??ce,vn=We(Zt),yn=Le&&ze&&!Qt&&!Ye&&vn!=null&&ue!=null&&Zt!=null,X=Le&&(yn||ge!=null),bn=ge?.anchorRect,xn=bn==null&&vn!=null&&ue!=null&&(ge!=null||yn)?ue:null,Sn=bn==null?xn==null?void 0:{top:`${xn}px`}:{left:`${bn.left}px`,position:`fixed`,right:`auto`,top:`${bn.top}px`},Cn=Qt?{opacity:`0`}:void 0,wn=hV((e,n,r,i)=>{let a=qB({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:Xe,mode:i}),o=a.toggleDirectory&&n.kind===`directory`,s=o?t.resolveMountedDirectoryPathFromInput(r):null;if(o&&s==null)return;let c=s??r;switch(a.selection.kind){case`range`:t.selectPathRange(c,a.selection.additive);break;case`toggle`:t.togglePathSelectionFromInput(c);break;case`single`:t.selectOnlyMountedPathFromInput(c)}let l=e.currentTarget instanceof HTMLElement?e.currentTarget:null,u=n.index>=lt.visible.startIndex&&n.index<=lt.visible.endIndex,d=i===`flow`&&u&&l!=null&&l.dataset.itemParked!==`true`;t.focusMountedPathFromInput(c),d&&(M.current=!0,se(e=>e===c?e:c),pe(`focus`)),o&&t.toggleMountedDirectoryFromInput(c),a.closeSearch&&t.closeSearch(),a.revealCanonical&&Ot(c,{targetOffset:`sticky-parents`})},[t,Xe,lt.visible.endIndex,lt.visible.startIndex,Ot]),Tn=()=>{if(y.current||!ze||Zt==null||vn==null)return;let e=t.getItem(Zt);e!=null&&(Tt(vn),St.current=!0,_e({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:vn.getAttribute(`aria-label`)??Zt,path:e.getPath()},path:e.getPath(),source:`button`}))},En={contextHoverPath:_n,contextMenuButtonTriggerEnabled:ze,contextMenuButtonVisibility:Be,contextMenuEnabled:Le,contextMenuRightClickEnabled:Ve,contextMenuTriggerMode:Re,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:tt,draggedPathSet:rt,dragTarget:it,gitLaneActive:Ge,gitStatusByPath:n,handleRowDragEnd:Ht,handleRowDragStart:Vt,handleRowTouchStart:Ut,ignoredGitDirectories:r,ignoredInheritanceCache:ie,instanceId:o,itemHeight:s,onKeyDown:Wt,onRowClick:wn,openContextMenuForRow:Et,registerButton:He,registerRenameInput:Ue,renameView:qe,renderDecorationForRow:vt,resolveIcon:Ke,shouldSuppressContextMenu:kt,visualFocusPath:gn},Dn={...En,registerButton:K};return $(`div`,{ref:S,id:ot,"data-file-tree-context-menu-button-visibility":Le&&ze?Be:void 0,"data-file-tree-context-menu-trigger-mode":Le?Re:void 0,"data-file-tree-has-context-menu-action-lane":Le&&ze?`true`:void 0,"data-file-tree-has-git-lane":Ge?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:tt?tn:void 0,onDragOver:tt?en:void 0,onDrop:tt?Y:void 0,onKeyDown:Wt,onPointerLeave:Le?J:void 0,onPointerOver:Le?$t:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[$(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:mn}}),$(`slot`,{name:RM,"data-type":`header-slot`}),f?$(`div`,{"data-file-tree-search-container":!0,"data-open":Xe?`true`:`false`,children:$(`input`,{ref:w,"aria-activedescendant":hn,"aria-controls":ot,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":ke?`true`:void 0,value:Ze,onBlur:()=>{(d!==`retain`||je.current)&&t.closeSearch()},onFocus:Me,onPointerDown:Me,onInput:e=>{Me();let n=e.currentTarget;t.setSearch(n.value)}})}):null,$(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&Fe&&pt.length>0?$(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:$(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${st}px`},children:pt.map((e,t)=>cH(Dn,e.row,`sticky:${wV(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${pt.length-t}`}}))})}):null,$(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${ht}px`},children:[$(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${rn}px`}}),$(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${nn}px`,top:`${an}px`,bottom:`${on}px`},children:[lH(En,ft,q),cn!=null&&ln!=null?cH(En,cn,`parked:${cn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:at===cn.path?`none`:void 0,position:`absolute`,right:`0`,top:`${ln}px`}}):null,fn!=null&&pn!=null?cH(En,fn,`parked-drag:${fn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${pn}px`}}):null]})]})]}),Le?$(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":X?`true`:`false`,style:Sn,children:[$(`button`,{ref:v,type:`button`,"data-type":BM,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":ge==null?`false`:`true`,"data-visible":yn?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),ge!=null){wt();return}Tn()},tabIndex:-1,style:Cn,children:$(eB,{...Ke(`file-tree-icon-ellipsis`)})}),ge==null?null:$(`slot`,{name:zM})]}):null,ge==null?null:$(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),wt()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),wt()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var dH={hydrateRoot:(e,t)=>{Yz(Tz(uH,t),e)},renderRoot:(e,t)=>{Jz(Tz(uH,t),e)},unmountRoot:e=>{Jz(null,e)}};function fH(e,t){dH.renderRoot(e,t)}function pH(e,t){dH.hydrateRoot(e,t)}function mH(e){dH.unmountRoot(e)}var hH=class{#e=new Map;#t=null;clearAll(){for(let e of this.#e.values())e.remove();this.#e.clear()}clearSlotContent(e){let t=this.#n(e);t!=null&&(t.remove(),this.#e.delete(e))}setHost(e){if(this.#t=e,e!=null){this.#i(e);for(let[e,t]of this.#e)this.#r(e,t)}}setSlotContent(e,t){let n=this.#n(e);if(n===t){t!=null&&(this.#e.set(e,t),this.#r(e,t));return}if(n?.remove(),t==null){this.#e.delete(e);return}this.#e.set(e,t),this.#r(e,t)}setSlotHtml(e,t){let n=t?.trim()??``;if(n.length===0){this.setSlotContent(e,null);return}let r=this.#n(e);if(r!=null&&r.innerHTML===n){this.#e.set(e,r),this.#r(e,r);return}let i=document.createElement(`div`);i.innerHTML=n,this.setSlotContent(e,i)}#n(e){let t=this.#e.get(e)??null;if(t!=null)return t;let n=this.#t;if(n==null)return null;for(let t of Array.from(n.children))if(t instanceof HTMLElement&&t.dataset.fileTreeManagedSlot===e)return t;return null}#r(e,t){t.slot=e,t.dataset.fileTreeManagedSlot=e,this.#t!=null&&t.parentNode!==this.#t&&this.#t.appendChild(t)}#i(e){for(let t of Array.from(e.children)){if(!(t instanceof HTMLElement))continue;let e=t.dataset.fileTreeManagedSlot;e==null||this.#e.has(e)||this.#e.set(e,t)}}};Array.isArray;var gH=0;function _H(e){return e!=null&&e.length>0?e:(gH+=1,`pst_ft_${gH}`)}function vH({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??uP)}function yH(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 bH(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 xH(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var SH=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new hH;#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=_H(a),this.#p=YR(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=lP(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new WR({...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&&(mH(this.#b),delete this.#b.dataset.fileTreeVirtualizedWrapper,this.#b=void 0),this.#l.clearAll(),this.#l.setHost(null),this.#f!=null&&(delete this.#f.dataset.fileTreeVirtualized,this.#I(this.#f),this.#f=void 0)}cleanUp(){this.unmount(),this.#y?.(),this.#y=null,this.#t.destroy()}getFileTreeContainer(){return this.#f}getItem(e){return this.#t.getItem(e)}getFocusedItem(){return this.#t.getFocusedItem()}getFocusedPath(){return this.#t.getFocusedPath()}getFocusedIndex(){return this.#t.getFocusedIndex()}getVisibleCount(){return this.#t.getVisibleCount()}getVisibleRows(e,t){return this.#t.getVisibleRows(e,t)}getSelectedPaths(){return this.#t.getSelectedPaths()}getComposition(){return this.#e}getItemHeight(){return this.#u.itemHeight}getDensityFactor(){return this.#u.factor}subscribe(e){let t=!1;return this.#t.subscribe(()=>{if(!t){t=!0;return}e()})}focusPath(e){this.#t.focusPath(e)}focusFirstItem(){this.#t.focusFirstItem()}focusLastItem(){this.#t.focusLastItem()}focusNextItem(){this.#t.focusNextItem()}focusPreviousItem(){this.#t.focusPreviousItem()}focusParentItem(){this.#t.focusParentItem()}scrollToPath(e,t){this.#t.scrollToPath(e,t)}focusNearestPath(e){return this.#t.focusNearestPath(e)}add(e){this.#t.add(e)}batch(e){this.#t.batch(e)}applyGitStatusPatch(e){let t=XR(this.#p,e);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&fH(n.wrapper,this.#w())}move(e,t,n){this.#t.move(e,t,n)}onMutation(e,t){return this.#t.onMutation(e,t)}setSearch(e){this.#t.setSearch(e)}openSearch(e){this.#t.openSearch(e)}closeSearch(){this.#t.closeSearch()}isSearchOpen(){return this.#t.isSearchOpen()}getSearchValue(){return this.#t.getSearchValue()}getSearchMatchingPaths(){return this.#t.getSearchMatchingPaths()}focusNextSearchMatch(){this.#t.focusNextSearchMatch()}focusPreviousSearchMatch(){this.#t.focusPreviousSearchMatch()}startRenaming(e,t){return this.#t.startRenaming(e,t)}remove(e,t){this.#t.remove(e,t)}resetPaths(e,t){Array.isArray(e)?this.#t.resetPaths(e,t):this.#t.resetPaths(e)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),fH(t.wrapper,this.#w()))}setGitStatus(e){let t=YR(e,this.#p);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&fH(n.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),fH(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),pH(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),fH(r,this.#w())}#C(){return{initialViewportHeight:vH({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(RM,e());return}this.#l.setSlotHtml(RM,this.#e?.header?.html??null)}#k(e){let t=xH(e).find(e=>bH(e)),n=yH(nP(sP(this.#m).set));n!=null&&(t==null||t.outerHTML!==n.outerHTML)&&(t==null?e.prepend(n):t.replaceWith(n))}#A(e){let t=xH(e),n=t.find(e=>bH(e)),r=t.filter(e=>e!==n),i=sP(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=yH(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=sP(this.#m);t.colored&&iP(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${PM}]`);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(PM,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=mP(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 bP(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 CH(e){let[t]=(0,b.useState)(()=>new SH(e)),n=(0,b.useRef)({timeout:null,model:t});return(0,b.useEffect)(()=>{let{current:e}=n;return e.timeout!=null&&(clearTimeout(e.timeout),e.timeout=null),()=>{e.timeout=setTimeout(()=>e.model.cleanUp(),1)}},[]),{model:t}}function wH(e,t,n){return Object.is(e,t)||n?.(e,t)===!0}function TH(e,t,n){let r=(0,b.useRef)({hasValue:!1,model:null,selector:null,value:void 0}),i=(0,b.useCallback)(t=>e.subscribe(t),[e]),a=(0,b.useCallback)(()=>{let i=r.current,a=t(e);if(i.model!==e||i.selector!==t||!i.hasValue)return i.hasValue=!0,i.model=e,i.selector=t,i.value=a,a;let o=i.value;return wH(o,a,n)?o:(i.value=a,a)},[n,e,t]);return(0,b.useSyncExternalStore)(i,a,a)}function EH(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}var DH=`data-checked`,OH=`data-unchecked`;function kH(e){return{checked(t){return e.indeterminate?{}:t?{[DH]:``}:{[OH]:``}},...uM}}var AH=b.createContext(void 0);function jH(){return b.useContext(AH)}var MH=b.createContext(void 0);function NH(){let e=b.useContext(MH);if(e===void 0)throw Error(F(14));return e}var PH=`data-parent`,FH=b.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i=!1,"aria-labelledby":a,disabled:o=!1,form:s,id:c,indeterminate:l=!1,inputRef:u,name:d,onCheckedChange:f,parent:p=!1,readOnly:m=!1,render:h,required:g=!1,uncheckedValue:_,value:v,nativeButton:y=!1,style:x,...S}=e,{clearErrors:C}=_M(),{disabled:w,name:T,setDirty:E,setFilled:D,setFocused:O,setTouched:k,state:A,validationMode:j,validityData:P,validation:F}=pM(),I=OM(),{labelId:L,registerControlId:R,getDescriptionProps:z}=yM(),B=jH(),V=B?.allValues===void 0?void 0:B.parent,H=V!==void 0,U=w||I.disabled||B?.disabled||o,ee=T??d,te=v??ee,ne=Js(),W=B?.registerControlId!==R,re=CM({id:c||void 0,enabled:W}),ie=y?re:ne,ae={};H&&(p?ae=V.getParentProps():te!==void 0&&(ae=V.getChildProps(te)));let{checked:G=n,indeterminate:oe=l,onCheckedChange:se,...ce}=ae,le=B?.value,ue=b.useRef(null),{getButtonProps:de,buttonRef:fe}=hl({disabled:U,native:y}),pe=B?.validation??F,[me,he]=jc({controlled:te!==void 0&&le!==void 0&&!p?le.includes(te):G,default:i,name:`Checkbox`,state:`checked`}),ge=H?!!G:me,_e=H&&oe||l;kM(ue,ne,me,void 0,!B&&!U,d);let ve=V?.registerChildId,be=b.useRef(null),xe=pe.registerInput,Se=B?te:void 0,Ce=b.useCallback(e=>xe(e,{controlRef:ue,value:Se}),[xe,Se]),we=ln(u,be,p?void 0:Ce),Te=bM(a,L,be,!y,re);N(()=>{be.current&&(be.current.indeterminate=_e),B||D(me)},[me,_e,B,D]),tu(me,()=>{B||(C(ee),E(me!==P.initialValue),pe.change(me))});let Ee=pi({checked:me,disabled:U,form:s,name:p?void 0:ee,id:y?void 0:re,required:g,ref:we,style:ee?kn:On,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(m){e.preventDefault();return}let t=e.currentTarget.checked,n=J(Ot,e.nativeEvent);if(f?.(t,n),!n.isCanceled&&(se?.(t,n),!n.isCanceled&&(he(t),te!==void 0&&B!==void 0&&!p&&!H))){let e=t?[...B.value,te]:B.value.filter(e=>e!==te);B.setValue(e,n)}},onClick(e){e.stopPropagation()},onFocus(){ue.current?.focus()}},v===void 0?M:{value:(B?me&&v:v)||``},z,e=>pe.getValidationProps(U,e));b.useEffect(()=>{if(!V||te===void 0)return;let e=V.disabledStatesRef.current;return e.set(te,U),()=>{e.delete(te)}},[V,U,te]);let De=b.useMemo(()=>({...A,checked:ge,disabled:U,readOnly:m,required:g,indeterminate:_e}),[A,ge,U,m,g,_e]),Oe=kH(De),ke=Di(`span`,e,{state:De,ref:[fe,ue,t],props:[{id:ie,role:`checkbox`,"aria-checked":_e?`mixed`:ge,"aria-readonly":m||void 0,"aria-required":g||void 0,"aria-labelledby":Te,[PH]:p?``:void 0,onFocus(){U||O(!0)},onBlur(){let e=be.current;e&&(k(!0),O(!1),j===`onBlur`&&pe.commit(B?le:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=be.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),ye(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||EH(t)?.click()})},onClick(e){if(m||U)return;e.preventDefault();let t=be.current;t&&ml(t,e)}},S,ce,de,z,e=>pe.getValidationProps(U,e)],stateAttributesMapping:Oe}),Ae=ke.props.id;return N(()=>{if(ve&&!p&&te!==void 0&&Ae!==void 0)return ve(te,Ae)},[ve,p,te,Ae]),(0,Y.jsxs)(MH.Provider,{value:De,children:[ke,!me&&!B&&ee&&!p&&_!==void 0&&(0,Y.jsx)(`input`,{type:`hidden`,form:s,name:ee,value:_,disabled:U}),(0,Y.jsx)(`input`,{...Ee,suppressHydrationWarning:!0})]})}),IH=b.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=NH(),c=s.checked||s.indeterminate,{mounted:l,transitionStatus:u,setMounted:d}=Ro(c),f=b.useRef(null),p={...s,transitionStatus:u};Ho({batch:!0,enabled:!c,open:c,ref:f,onComplete(){c||d(!1)}});let m={...kH(s),...et},h=a||l,g=Di(`span`,e,{ref:[t,f],state:p,stateAttributesMapping:m,props:o});return h?g:null}),LH=b.createContext(void 0);function RH(e){let t=b.useContext(LH);if(t===void 0&&!e)throw Error(F(47));return t}var zH={...us,disabled:e=>e.disabled,instantType:e=>e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,modal:e=>e.modal,focusManagerModal:e=>e.focusManagerModal,stickIfOpen:e=>e.stickIfOpen,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},BH=class extends No{constructor(e,t,n){let r=new rs;super(VH(e,r,t,n),HH(r),zH)}setOpen=(e,t)=>{let n=t.reason===At,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=Xo(t),o=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&o!=null&&(t.trigger=this.context.triggerElements.getById(o)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n=Yo(this.state,e,t.trigger,a());n.openChangeReason=t.reason,this.update(n)};n?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),zi.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function VH(e,t,n,r=!1){let i={...is(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function HH(e){return{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),stickIfOpenTimeout:new B,triggerElements:e}}var UH=D(function({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=GH(s,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),ns(u,d),$o(u);let{forceUnmount:m}=es(d,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});u.useSyncedValues({modal:o}),b.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]),b.useImperativeHandle(e.actionsRef,()=>({unmount:m,close:()=>u.setOpen(!1,J($t))}),[m,u]);let h=d||f;return(0,Y.jsxs)(LH.Provider,{value:u,children:[s&&(0,Y.jsx)(Ko,{handle:s,store:u}),h&&(0,Y.jsx)(KH,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});function WH(e){return RH(!0)?(0,Y.jsx)(UH,{props:e}):(0,Y.jsx)($i,{children:(0,Y.jsx)(UH,{props:e})})}function GH(e,t){let n=Go((e,n)=>new BH(t,e,n));return b.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function KH({store:e,modal:t}){let n=ga(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),r=n.reference,i=n.floating;return ts(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:i}),null}var qH=O(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,handle:s,payload:c,openOnHover:l=!1,delay:u=300,closeDelay:d=0,id:f,...p}=e,m=RH(!0),h=ds(s)??m;if(!h)throw Error(F(74));let g=Js(f),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),x=h.useState(`triggerPopupId`,g),S=b.useRef(null),{registerTrigger:C,isMountedByThisTrigger:w}=Qo(g,S,h,{payload:c,disabled:a,openOnHover:l,closeDelay:d}),T=h.useState(`openChangeReason`),E=h.useState(`stickIfOpen`),D=h.useState(`openMethod`),O=h.useState(`focusManagerModal`),k=ws(v,{enabled:!a&&l&&(D!==`touch`||T!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:Vs(),restMs:u,delay:{close:d},triggerElementRef:S,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),A=ua(v,{stickIfOpen:E}),j=nu(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),M=h.useState(`triggerProps`,w),{getButtonProps:N,buttonRef:P}=hl({disabled:a,native:o}),I={open(e){return e&&T===`trigger-press`?ft.open(e):dt.open(e)}},{preFocusGuardRef:L,handlePreFocusGuardFocus:R,handleFocusTargetFocus:z}=Qu(h,S),B=Di(`button`,e,{state:{disabled:a,open:y},ref:[P,t,C,S],props:[A.reference,k,M,j,{[Fi]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":y,"aria-controls":x},p,N],stateAttributesMapping:I}),V=(0,Y.jsx)(b.Fragment,{children:B},g);return w&&!O?(0,Y.jsxs)(b.Fragment,{children:[(0,Y.jsx)(An,{ref:L,onFocus:R}),V,(0,Y.jsx)(An,{ref:h.context.triggerFocusTargetRef,onFocus:z})]}):V}),JH=b.createContext(void 0);function YH(){let e=b.useContext(JH);if(e===void 0)throw Error(F(45));return e}var XH=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return RH().useState(`mounted`)||n?(0,Y.jsx)(JH.Provider,{value:n,children:(0,Y.jsx)(Wi,{ref:t,...r})}):null}),ZH=b.createContext(void 0);function QH(){let e=b.useContext(ZH);if(!e)throw Error(F(46));return e}var $H=b.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=Li,..._}=e,v=RH(),y=YH(),x=Zi(),S=v.useState(`floatingRootContext`),C=v.useState(`mounted`),w=v.useState(`open`),T=v.useState(`openChangeReason`),E=v.useState(`activeTriggerElement`),D=v.useState(`modal`),O=v.useState(`openMethod`),k=v.useState(`positionerElement`),A=v.useState(`instantType`),j=v.useState(`transitionStatus`),M=v.useState(`adaptiveOrigin`),P=b.useRef(null),F=Vo(k),I=Sc({anchor:a,floatingRootContext:S,positionMethod:o,mounted:C,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:y,nodeId:x,collisionAvoidance:g,adaptiveOrigin:M}),L=S.useState(`domReferenceElement`);N(()=>{let e=L,t=P.current;if(e&&(P.current=e),t&&e&&e!==t){v.set(`instantType`,void 0);let e=new AbortController;return F(()=>{v.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[L,F,v]);let R=D===!0&&T!==`trigger-hover`;Iu(w&&R,O===`touch`,k,E);let z=v.useStateSetter(`positionerElement`),B=Ec(e,{open:w,side:I.side,align:I.align,anchorHidden:I.anchorHidden,instant:A},{styles:I.positionerStyles,transitionStatus:j,props:_,refs:[t,z],hidden:!C,inert:!w});return(0,Y.jsxs)(ZH.Provider,{value:I,children:[C&&R&&(0,Y.jsx)(Nl,{inert:Ac(!w),cutout:E}),(0,Y.jsx)(Qi,{id:x,children:B})]})}),eU=b.createContext(void 0);function tU(){let[e,t]=b.useState(0),n=X(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:b.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}function nU(){let e=b.useContext(eU);N(()=>e?.register(),[e])}var rU=b.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=RH(),l=QH(),u=sl(!0)!=null,{context:d,hasClosePart:f}=tU(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),y=c.useState(`descriptionElementId`),b=c.useState(`modal`),x=c.useState(`mounted`),S=c.useState(`openChangeReason`),C=c.useState(`activeTriggerElement`),w=c.useState(`floatingRootContext`),T=w.useState(`floatingId`),E=c.useState(`disabled`),D=c.useState(`openOnHover`),O=c.useState(`closeDelay`);Ho({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),Ss(w,{enabled:D&&!E,closeDelay:O});let k=a===void 0?Wo(c.context.popupRef):a,A=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,A);let j=c.useStateSetter(`popupElement`),M=Di(`div`,e,{state:{open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},ref:[t,c.context.popupRef,j],props:[_,{id:T,role:`dialog`,...Uo,"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&Kc.has(e.key)&&e.stopPropagation()}},Tc(g),s],stateAttributesMapping:mt});return(0,Y.jsx)(la,{context:w,openInteractionType:m,modal:A,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:o,restoreFocus:`popup`,previousFocusableElement:Ce(C)?C:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,Y.jsx)(eU.Provider,{value:d,children:M})})}),iU=b.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=RH(),s=Js(a.id);return o.useSyncedValueWithCleanup(`titleElementId`,s),Di(`h2`,e,{ref:t,props:[{id:s},a]})}),aU=b.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=RH(),s=Js(a.id);return o.useSyncedValueWithCleanup(`descriptionElementId`,s),Di(`p`,e,{ref:t,props:[{id:s},a]})}),oU=b.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,{buttonRef:c,getButtonProps:l}=hl({disabled:a,focusableWhenDisabled:!1,native:o}),u=RH();return nU(),Di(`button`,e,{ref:[t,c],props:[{onClick(e){u.setOpen(!1,J(Pt,e.nativeEvent))}},s,l]})});function sU(e){let t=b.useRef(!0);t.current&&(t.current=!1,e())}function cU(e,t,n,r,i,a,o,s,c,l=2){let u=lr(n.current,{event:e,orientation:r,loopFocus:i,rtl:a,cols:l,disabledIndices:o,minIndex:s,maxIndex:c,prevIndex:t>c?s:t,stopEvent:!0});return ar(n.current,u)?void 0:u}var lU=b.createContext(void 0),uU=b.createContext(void 0),dU=b.createContext(void 0),fU=b.createContext(!1),pU=b.createContext(``);function mU(){let e=b.useContext(lU);if(!e)throw Error(F(22));return e}function hU(){let e=b.useContext(uU);if(!e)throw Error(F(23));return e}function gU(){let e=b.useContext(dU);if(!e)throw Error(F(24));return e}function _U(){return b.useContext(pU)}function vU(){return b.useContext(fU)}function yU(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}var bU=(e,t)=>Object.is(e,t);function xU(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function SU(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!yU(e,t,(e,t)=>xU(e,t,n)):e!==t}function CU(e,t,n){return e?e.some(e=>e!==void 0&&xU(t,e,n)):!1}function wU(e,t,n){return e?e.findIndex(e=>e!==void 0&&xU(e,t,n)):-1}function TU(e,t){if(t!==bU)return n=>CU(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(t!==0||e.some(e=>Object.is(t,e)))}function EU(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(TU(t,n)):wU(e,t,n);return i===-1?null:i}function DU(e,t,n,r,i,a){return CU(r,t,i)?a!=null&&e>a&&CU(r,n[a],i)?a:e:e===a?EU(n,r,i,!0):a}function OU(e,t,n){return e.filter(e=>!xU(t,e,n))}function kU(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function AU(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function jU(e){return AU(e?.[0])}function MU(e){return jU(e)?e.flatMap(e=>e.items):e}function NU(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(jU(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function PU(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return kU(e)}function FU(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?kU(e.value):kU(e)}function IU(e,t,n){function r(){return PU(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){let n=MU(t);if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function LU(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,Y.jsx)(b.Fragment,{children:IU(r,t,n)},i)),e),[])}var RU={id:e=>e.id,labelId:e=>e.labelId,items:e=>e.items,selectedValue:e=>e.selectedValue,hasSelectionChips:e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0},hasSelectedValue:e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0},hasNullItemLabel:(e,t)=>t?NU(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMounted:e=>e.forceMounted,inline:e=>e.inline,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>xU(t,e,n)):xU(t,r,n)},transitionStatus:e=>e.transitionStatus,popupProps:e=>e.popupProps,listProps:e=>e.listProps,inputProps:e=>e.inputProps,triggerProps:e=>e.triggerProps,itemProps:e=>e.itemProps,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupId:e=>e.popupId,triggerElement:e=>e.triggerElement,inputElement:e=>e.inputElement,inputGroupElement:e=>e.inputGroupElement,popupSide:e=>e.popupSide,openMethod:e=>e.openMethod,inputInsidePopup:e=>e.inputInsidePopup,inputOwnsFormValue:e=>e.inputOwnsFormValue,selectionMode:e=>e.selectionMode,name:e=>e.name,form:e=>e.form,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,grid:e=>e.grid,virtualized:e=>e.virtualized,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,modal:e=>e.modal,autoHighlight:e=>e.autoHighlight};function zU(e){return e==null?void 0:`${e}-popup`}function BU(e,t){return(n,r)=>n!=null&&e.contains(n,r,t)}function VU(e){return Array.isArray(e)?e.map(e=>VU(e)).join(`,`):e==null?``:String(e)}var HU=new Map;function UU(e={}){let t={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...e},n=`${VU(e.locale)}|${JSON.stringify(t)}`,r=HU.get(n);if(r)return r;let i=new Intl.Collator(e.locale,t),a={contains(e,t,n){if(!t)return!0;let r=PU(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(i.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=PU(e,n);return i.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=PU(e,n),a=t.length;return r.length>=a&&i.compare(r.slice(r.length-a),t)===0}};return HU.set(n,a),a}var WU=UU;function GU(e,t=!1){let{overflowY:n}=Ie(e);return n!==`auto`&&n!==`scroll`?!1:t?e.clientHeight>0:e.scrollHeight>e.clientHeight}var KU=Symbol(`none`),qU={value:KU,index:-1};function JU(e,t,n){let r=e.get(t);if(r!==void 0||n===bU)return r;for(let[r,i]of e)if(xU(r,t,n))return i}function YU(e){let{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:i,onSelectedValueChange:a,defaultInputValue:o,inputValue:s,open:c,defaultOpen:l=!1,selectionMode:u,onItemHighlighted:d,name:f,form:p,disabled:m=!1,readOnly:h=!1,required:g=!1,inputRef:_,grid:v=!1,items:y,filteredItems:x,filter:C,filterQuery:w,openOnInputClick:T=!0,autoHighlight:E=!1,keepHighlight:D=!1,highlightItemOnHover:O=!0,loopFocus:k=!0,itemToStringLabel:P,itemToStringValue:I,isItemEqualToValue:L=bU,virtualized:R=!1,inline:z=!1,fillInputOnItemPress:B=!0,modal:V=!1,limit:H=-1,autoComplete:U=`list`,formAutoComplete:ee,locale:te,submitOnItemClick:ne=!1}=e,{clearErrors:W}=_M(),{setDirty:re,validityData:ie,setFilled:ae,name:G,disabled:oe,setTouched:se,setFocused:ce,validationMode:le,validation:ue}=pM(),de=cc(),fe=CM({id:t}),pe=WU({locale:te}),me=Array.isArray(y)?null:y;if(me&&typeof me.label!=`function`)throw Error(F(100));let he=me?me.data:y,ge=me?.value,_e=ge?void 0:he,ve=b.useMemo(()=>{if(!x||!ge)return;let e=MU(x),t=e.map(ge),n;return{values:t,findItem(r,i){if(!n){n=new Map;for(let r=0;r<t.length;r+=1)n.has(t[r])||n.set(t[r],e[r])}return JU(n,r,i)}}},[x,ge]),ye=b.useMemo(()=>me?e=>me.label(e,L,e=>{let t=ve?.findItem(e,L);return t==null?PU(e,P):me.itemLabel(t)}):P,[me,P,ve,L]),be=b.useMemo(()=>me?Object.assign(e=>me.itemLabel(e),{selected:e=>PU(e,ye)}):P,[me,ye,P]);function xe(e){return PU(e,ye)}let[Se,we]=b.useState(!1),[Te,Ee]=b.useState(null),De=b.useRef(Te),Oe=b.useRef([]),ke=b.useRef([]),Ae=b.useRef(null),je=b.useRef(null),Me=b.useRef(null),Ne=b.useRef(null),Pe=b.useRef(null),Fe=b.useRef(!0),Ie=b.useRef(!1),Le=b.useRef(null),Re=b.useRef(null),ze=b.useRef(null),Ve=b.useRef(qU),He=b.useRef(null),We=b.useRef([]),Ge=b.useRef(null),Ke=oe||m,qe=G??f,Je=u===`multiple`,Ye=u===`single`,Xe=s!==void 0||o!==void 0,Ze=he!==void 0,Qe=x!==void 0,$e;$e=E===`always`?`always`:E?`input-change`:!1;let[et,tt]=jc({controlled:i,default:Je?r??j:r,name:`Combobox`,state:`selectedValue`}),nt=b.useMemo(()=>C===null?()=>!0:C===void 0?BU(pe,be):C,[C,pe,be]),rt=S(()=>Xe?o??``:Ye?xe(et):``).current,[it,at]=jc({controlled:s,default:rt,name:`Combobox`,state:`inputValue`}),[ot,st]=jc({controlled:c,default:l,name:`Combobox`,state:`open`}),ct=jU(he),lt=!ot&&Te!==null?Te:String(it).trim(),ut=Ye?xe(et):``,dt=Ye&&!Se&<!==``&&ut.length===lt.length&&pe.contains(ut,lt),ft=dt?``:w??lt,pt=Ze&&Qe&&dt&&(!me||me.hasValue(et,L)),mt=b.useMemo(()=>he?MU(he):j,[he]),ht=b.useMemo(()=>{if(x&&!pt)return x;if(!he)return j;if(ct){let e=he,t=[],n=0;for(let r of e){if(H>-1&&n>=H)break;let e=H>-1?H-n:1/0,i=ft===``?r.items.slice(0,e):[];if(ft!==``)for(let t of r.items){if(i.length>=e)break;nt(t,ft,be)&&i.push(t)}if(i.length>0){let e={...r,items:i};t.push(e),n+=i.length}}return t}if(ft===``)return H>-1?mt.slice(0,H):mt;let e=[];for(let t of mt){if(H>-1&&e.length>=H)break;nt(t,ft,be)&&e.push(t)}return e},[x,pt,he,ct,ft,H,nt,be,mt]),gt=b.useMemo(()=>{if(ve&&ht===x)return ve.values;let e=MU(ht);return ge?e.map(e=>ge(e)):e},[ht,x,ve,ge]),q=S(()=>{let e=null;return z&&ot&&Ze&&u!==`none`&&(e=EU(gt,et,L,Je)),new No({id:fe,labelId:void 0,selectedValue:et,open:ot,items:_e,selectionMode:u,name:qe,form:p,disabled:Ke,readOnly:h,required:g,grid:v,virtualized:R,openOnInputClick:T,itemToStringLabel:ye,isItemEqualToValue:L,modal:V,autoHighlight:$e,submitOnItemClick:ne,hasInputValue:Xe,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:z,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemProps:M,positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:u===`none`},{onOpenChangeComplete:A,setOpen:A,setInputValue:A,setSelectedValue:A,setIndices:A,handleSelection:A,forceMount:A,requestSubmit:A,listRef:Oe,labelsRef:ke,popupRef:Ae,emptyRef:Pe,inputRef:je,startDismissRef:Me,endDismissRef:Ne,keyboardActiveRef:Fe,chipsContainerRef:Le,clearRef:Re,valuesRef:We,pointerDownItemRef:Ge,selectionEventRef:ze},RU)}).current,_t=u===`none`?it:et,vt=b.useMemo(()=>u===`none`?_t:Array.isArray(et)?et.map(e=>FU(e,I)):FU(et,I),[_t,I,u,et]),yt=X(d),bt=X(n),xt=q.useState(`activeIndex`),St=q.useState(`selectedIndex`),Ct=q.useState(`positionerElement`),wt=q.useState(`listElement`),Tt=q.useState(`triggerElement`),Et=q.useState(`inputElement`),Dt=q.useState(`inputGroupElement`),kt=q.useState(`inline`),At=q.useState(`inputInsidePopup`),jt=q.useState(`inputOwnsFormValue`),Mt=Ye&&!At&&it===ut,Pt=hn(Tt),{mounted:Ft,setMounted:It,transitionStatus:zt}=Ro(ot),{openMethod:Bt,triggerProps:Ht}=ru(ot),Ut=X(()=>vt);kM(At?Pt:je,fe,_t,Ut,!Ke,f);let Wt=X(()=>{he?ke.current=gt.map(xe):q.set(`forceMounted`,!0)}),qt=X((e,t,n)=>{if(t===-1){if(Ve.current===qU)return;Ve.current=qU}else Ve.current={value:e,index:t};yt(e,en(n,void 0,{index:t}))}),Jt=X(e=>{let t={};e.activeIndex!==void 0&&(t.activeIndex=e.activeIndex),e.selectedIndex!==void 0&&(t.selectedIndex=e.selectedIndex),q.update(t);let n=e.activeIndex;if(n===void 0)return;let r=e.type||`none`;n===null?qt(void 0,-1,r):qt(We.current[n],n,r)}),Yt=X((t,n)=>{if(e.onInputValueChange?.(t,n),!n.isCanceled){if(Ie.current=n.reason===Rt,n.reason===`input-change`){ot&&Te!==null&&Ee(null);let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&we(!0),He.current={hasQuery:e};let n=q.state.listElement;if(!q.state.virtualized&&n){let e=Ae.current;for(let t of Be(n.firstElementChild??n)){if(!Ce(t)||(e?!K(e,t):t.getAttribute(`role`)===`dialog`))break;if(GU(t)){t.scrollTop=0;break}}}e&&$e&&q.state.activeIndex==null&&(ot||kt)&&q.set(`activeIndex`,0)}}else n.reason===`input-clear`&&t===``&&q.state.inputInsidePopup&&(He.current={hasQuery:!1,selection:!0});at(t)}}),Xt=X(e=>{let t=!e&&At&&!kt&&it!==``&&(String(it).trim()===Te||it===ut);!e&&(t||it===``||Mt)&&we(!1),Ee(null),t&&Yt(``,J(Rt))}),Zt=X((t,n)=>{if(ot!==t&&(n.reason===`escape-key`&&Ze&>.length===0&&!Pe.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(t&&Te!==null&&Xt(n.reason===Lt),!t&&Se&&(Ye?(kt||Ee(lt),lt===``&&we(!1)):Je&&(kt||Ee(lt),At&&Jt({activeIndex:null}),(!At||kt)&&Yt(``,J(Rt,n.event,void 0,{isItemPress:n.reason===Nt})))),st(t),!t&&At&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(se(!0),ce(!1),le===`onBlur`)))){let e=u===`none`?it:et;ue.commit(e)}}),Qt=X((e,t)=>{a?.(e,t),!t.isCanceled&&(tt(e),(u===`none`&&Ae.current&&B||Ye&&!q.state.inputInsidePopup)&&Yt(xe(e),J(t.reason,t.event)))}),$t=X((e,t)=>{let n=Ue(e),r=ze.current??e;ze.current=null;let i=J(Nt,r),a=n?.closest(`a`)?.getAttribute(`href`);if(a){a.startsWith(`#`)&&Zt(!1,i);return}if(Je){let e=Array.isArray(et)?et:[],n=CU(e,t,L),r=n?OU(e,t,L):[...e,t];if(Qt(r,i),i.isCanceled||!(je.current&&je.current.value.trim()!==``))return;if(q.state.inputInsidePopup){Yt(``,J(Rt,i.event,void 0,{isItemPress:!0}));let e=He.current;e&&!n&&(e.toggledValue=t)}else Zt(!1,i)}else{if(Qt(t,i),i.isCanceled)return;Zt(!1,i)}}),tn=X(()=>{let e=ue.inputRef.current?.form??q.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),nn=X(()=>{if(It(!1),bt?.(!1),we(!1),Ee(null),Jt(u===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Je&&je.current&&je.current.value!==``&&!Ie.current&&Yt(``,J(Rt)),Ye){if(q.state.inputInsidePopup)je.current&&je.current.value!==``&&Yt(``,J(Rt));else{let e=xe(et);je.current&&je.current.value!==e&&Yt(e,J(e===``?Rt:Ot))}}}),rn=b.useMemo(()=>kt&&Ct?{current:Ct.closest(`[role="dialog"]`)}:Ae,[kt,Ct]);Ho({enabled:!e.actionsRef,open:ot,ref:rn,onComplete(){ot||nn()}}),b.useImperativeHandle(e.actionsRef,()=>({unmount:nn}),[nn]),N(function(){let e=De.current!==null&&Te===null;if(De.current=Te,ot&&(!e||!Ze)||(ot||(Ge.current=null),u===`none`))return;let t=Ze?gt:We.current;Jt({selectedIndex:EU(t,et,L,Je)})},[ot,Te,et,u,Je,Ze,gt,L,Jt]),N(()=>{he&&(We.current=gt,Oe.current.length=gt.length)},[he,gt]),N(()=>{let e=He.current;if(e){let t=ot||kt||q.state.positionerElement?.hidden===!1;if(e.hasQuery)$e&&t&&q.set(`activeIndex`,0),He.current=null;else if(String(it).trim()===``&&(He.current=null,t)){let t=e.selection;$e===`always`&&!t&&q.state.selectionMode===`none`&&q.set(`activeIndex`,0),queueMicrotask(()=>{if(!q.state.open&&!q.state.inline||je.current&&je.current.value.trim()!==``)return;let n=q.state.selectedValue,r=q.state.selectionMode===`multiple`;if(r&&Array.isArray(n)?n.length>0:q.state.selectionMode!==`none`&&n!=null){let t=Ze||Qe?gt:We.current,i=wU(t,e.toggledValue,q.state.isItemEqualToValue);q.set(`activeIndex`,i===-1?EU(t,n,q.state.isItemEqualToValue,r):i)}else t?q.set(`activeIndex`,null):$e===`always`&&q.set(`activeIndex`,0)})}}if(!ot&&!kt)return;let t=Ze||Qe?gt:We.current,n=q.state.activeIndex;if(n==null){if($e===`always`&&t.length>0){q.set(`activeIndex`,0);return}qt(void 0,-1,Ot);return}if(n>=t.length){qt(void 0,-1,Ot),q.set(`activeIndex`,null);return}let r=t[n],i=Ve.current.value,a=i!==KU&&xU(r,i,q.state.isItemEqualToValue);(Ve.current.index!==n||!a)&&qt(r,n,Ot)},[xt,$e,qt,Qe,Ze,gt,kt,ot,q,it]),N(()=>{if(u===`none`){ae(String(it)!==``);return}ae(Je?Array.isArray(et)&&et.length>0:et!=null)},[ae,u,it,et,Je]),b.useEffect(()=>{Ze&&$e&>.length===0&&Jt({activeIndex:null})},[Ze,$e,gt.length,Jt]);function an(){ot&<!==``&<!==String(rt)&&!Mt&&we(!0)}function on(){ot&&Te!==null&&Xt(!1)}let sn=!1;function cn(){!sn&&it!==ut&&(sn=!0,Yt(ut,J(Ot)))}function un(){u!==`none`&&(W(qe),re(SU(et,ie.initialValue,L)),ue.change(et),Ye&&!Xe&&!At&&cn())}function dn(){Ye&&!Xe&&!At&&!Se&&cn()}function fn(){u===`none`&&(W(qe),re(it!==ie.initialValue),ue.change(it))}tu(lt,an),tu(ot,on),tu(et,un),tu(ut,dn),tu(he,dn),tu(it,fn);let pn=fs({open:kt?!0:ot,onOpenChange:Zt,elements:{reference:At?Tt:Et,floating:Ct}}),mn=v?`grid`:`listbox`,gn=ot||kt,_n=gn?`true`:`false`,vn=b.useMemo(()=>{let e=Et?.tagName===`INPUT`,t=Et==null||e,n=t||gn,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=_n,r[`aria-haspopup`]=mn,r[`aria-controls`]=gn?wt?.id:void 0,r[`aria-autocomplete`]=h?`none`:U),{reference:r,floating:{role:`presentation`}}},[Et,gn,_n,mn,wt?.id,U,h]),yn=ua(pn,{enabled:!Ke&&T,event:`mousedown-only`,toggle:!1,touchOpenDelay:At?0:100,reason:Vt}),bn=ga(pn,{enabled:!Ke&&!kt,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:kt?!0:void 0,outsidePress(e){let t=Ue(e);return!K(Tt,t)&&!K(Re.current,t)&&!K(Le.current,t)&&!K(Dt,t)}}),xn=Ms(pn,{enabled:!Ke,id:fe,listRef:Oe,activeIndex:xt,selectedIndex:St,virtual:!0,loopFocus:k,allowEscape:k&&!$e,focusItemOnOpen:Se||u===`none`&&!$e?!1:`auto`,focusItemOnHover:O,resetOnPointerLeave:!D,orientation:v?`horizontal`:void 0,rtl:de===`rtl`,disabledIndices:j,grid:v?cU:void 0,onNavigate(e,t){(t||ot)&&zt!==`ending`&&Jt(t?{activeIndex:e,type:Fe.current?Gt:Kt}:{activeIndex:e})}}),Sn=b.useMemo(()=>pi(xn.reference,{onKeyDown(e){v&&q.state.activeIndex==null&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.preventBaseUIHandler()}},bn.reference,yn.reference,vn.reference),[xn.reference,bn.reference,yn.reference,vn.reference,v,q]),Cn=b.useMemo(()=>pi(Uo,bn.floating),[bn.floating]),wn=b.useMemo(()=>pi(xn.floating,vn.floating),[xn.floating,vn.floating]),Tn=b.useMemo(()=>{let e=xn.item;return e?{...e,onFocus:void 0}:M},[xn.item]);q.useContextCallback(`setOpen`,Zt),q.useContextCallback(`setInputValue`,Yt),q.useContextCallback(`setSelectedValue`,Qt),q.useContextCallback(`setIndices`,Jt),q.useContextCallback(`handleSelection`,$t),q.useContextCallback(`forceMount`,Wt),q.useContextCallback(`requestSubmit`,tn),q.useContextCallback(`onOpenChangeComplete`,n),sU(()=>{q.update({inline:z,popupProps:Cn,listProps:wn,inputProps:Sn,triggerProps:Ht,itemProps:Tn})});let En={id:fe,selectedValue:et,open:ot,mounted:Ft,transitionStatus:zt,items:_e,inline:z,popupProps:Cn,listProps:wn,inputProps:Sn,triggerProps:Ht,itemProps:Tn,openMethod:Bt,selectionMode:u,name:qe,form:p,disabled:Ke,readOnly:h,required:g,grid:v,virtualized:R,openOnInputClick:T,itemToStringLabel:ye,modal:V,autoHighlight:$e,isItemEqualToValue:L,submitOnItemClick:ne,hasInputValue:Xe};N(()=>{q.update({...En,inputOwnsFormValue:u===`none`&&(z||!q.state.inputInsidePopup)})},[q,...Object.values(En)]);let Dn=ln(_,ue.inputRef),An=b.useMemo(()=>({query:lt,hasItems:Ze,filteredItems:ht,flatFilteredValues:gt}),[lt,Ze,ht,gt]),jn=b.useMemo(()=>Array.isArray(_t)?``:FU(_t,I),[_t,I]),Mn=Je&&Array.isArray(et)&&et.length>0,Nn=Je||u===`none`&&jt?void 0:qe,Pn=b.useMemo(()=>!Je||!Array.isArray(et)||!qe?null:et.map(e=>{let t=FU(e,I);return(0,Y.jsx)(`input`,{type:`hidden`,form:p,name:qe,value:t,disabled:Ke},t)}),[Je,et,p,qe,I,Ke]),Fn=(0,Y.jsxs)(b.Fragment,{children:[e.children,(0,Y.jsx)(`input`,{...ue.getValidationProps(Ke,{onFocus(){if(At){Tt?.focus();return}(je.current||Tt)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||Ke||h)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=J(Ot,e.nativeEvent),i=()=>We.current.findIndex(e=>FU(e,I).toLowerCase()===n||xe(e).toLowerCase()===n);function a(){if(Je)return;if(u===`none`){Yt(t,r);return}let e=i();e===-1&&(e=We.current.findIndex((e,t)=>{let r=ke.current[t];return r!=null&&r.toLowerCase()===n}));let a=e===-1?void 0:We.current[e];a!=null&&Qt?.(a,r)}Ye&&(Wt(),he&&i()===-1&&q.set(`forceMounted`,!0)),queueMicrotask(a)}}),id:fe&&Nn==null?`${fe}-hidden-input`:void 0,form:p,name:Nn,autoComplete:ee,disabled:Ke,required:g&&!Mn,readOnly:h,value:jn,ref:Dn,style:Nn?kn:On,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Pn]});return(0,Y.jsx)(lU.Provider,{value:q,children:(0,Y.jsx)(uU.Provider,{value:pn,children:(0,Y.jsx)(fU.Provider,{value:Ze,children:(0,Y.jsx)(dU.Provider,{value:An,children:(0,Y.jsx)(pU.Provider,{value:it,children:Fn})})})})})}function XU(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,Y.jsx)(YU,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}function ZU(e){return e==null?void 0:`${e}-label`}function QU(e,t){return e??t}var $U=b.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=a;delete o.id;let s=pM(),c=mU(),l=c.useState(`inputInsidePopup`),u=c.useState(`triggerElement`);c.useState(`inputElement`);let d=c.useState(`id`),f=TM({id:ZU(d),fallbackControlId:u?.id??(l?d:void 0),setLabelId(e){let t=typeof e==`function`?e(c.state.labelId):e;c.set(`labelId`,t)}});return Di(`div`,e,{ref:t,state:s.state,props:[f,a],stateAttributesMapping:uM})});function eW(e){let{children:t,placeholder:n}=e,r=mU(),i=r.useState(`itemToStringLabel`),a=r.useState(`selectedValue`),o=r.useState(`items`),s=r.useState(`selectionMode`)===`multiple`,c=r.useState(`hasSelectedValue`),l=!c&&n!=null&&t==null,u=r.useState(`hasNullItemLabel`,l),d=null;return d=typeof t==`function`?t(a):t??(!c&&n!=null&&!u?n:s&&Array.isArray(a)?LU(a,o,i):IU(a,o,i)),(0,Y.jsx)(b.Fragment,{children:d})}var tW=`data-popup-side`,nW=`data-list-empty`,rW={...ft,...uM,popupSide:e=>e?{[tW]:e}:null,listEmpty:e=>e?{[nW]:``}:null},iW=b.createContext(void 0);function aW(){return b.useContext(iW)}var oW=b.createContext(void 0);function sW(e){let t=b.useContext(oW);if(t===void 0&&!e)throw Error(F(21));return t}var cW=b.forwardRef(function(e,t){let n=mU(),{buttonRef:r,getButtonProps:i}=hl({native:!1}),a=ln(t,r);function o(e){n.context.setOpen(!1,J(Pt,e.nativeEvent,e.currentTarget))}let s=i({onClick:o});return(0,Y.jsx)(`span`,{ref:a,...s,"aria-label":`Dismiss`,tabIndex:void 0,style:kn})});function lW(e){let t=e.useState(`mounted`),n=e.useState(`popupSide`),r=e.useState(`positionerElement`);return t&&r?n:null}function uW(){return gU().filteredItems.length===0}function dW(e){return e===`rtl`?[`ArrowRight`,`ArrowLeft`]:[`ArrowLeft`,`ArrowRight`]}function fW(e,t){let n=e>=t-1?t-2:e;return n>=0?n:void 0}function pW(e,t,n){let r=e.context.listRef.current[t];r&&(e.context.selectionEventRef.current=n,r.click(),e.context.selectionEventRef.current=null)}var mW=b.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,id:a,style:o,...s}=e,{state:c,disabled:l,setTouched:u,setFocused:d,validationMode:f,validation:p}=pM(),{labelId:m}=yM(),h=aW(),g=!!sW(!0),_=mU(),v=_U(),y=cc(),x=_.useState(`required`),S=_.useState(`disabled`),C=_.useState(`readOnly`),w=_.useState(`name`),T=_.useState(`form`),E=_.useState(`selectionMode`),D=_.useState(`autoHighlight`),O=_.useState(`inputProps`),k=_.useState(`triggerProps`),A=_.useState(`open`),j=_.useState(`mounted`),M=_.useState(`selectedValue`),N=_.useState(`id`),P=_.useState(`inline`),F=_.useState(`modal`),I=!!D,L=lW(_),R=l||S||i,z=uW(),B=g||P,V=!B||F,H=Js(a??(B?void 0:N)),U=g?cM:c,[ee,te]=b.useState(null),ne=b.useRef(!1),W=b.useRef(null),re=b.useRef(!1),ie=E===`none`&&!g,G=X(e=>{let t=g||_.state.inline;t&&!_.state.hasInputValue&&_.context.setInputValue(``,J(Ot)),_.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:ie})}),oe=g?s:p.getValidationProps(R,s);function se(){_.context.setIndices({activeIndex:null,selectedIndex:null,type:_.context.keyboardActiveRef.current?Gt:Kt})}function le(){_.context.keyboardActiveRef.current=!1}let ue={...U,open:A,disabled:R,readOnly:C,popupSide:L,listEmpty:z};function fe(e){if(!h)return;let t,{highlightedChipIndex:n}=h,r=h.chipsRef.current.length,[i,a]=dW(y);return n===void 0?(e.key===i&&(e.currentTarget.selectionStart??0)===0&&M.length>0&&(e.preventDefault(),t=r>0?r-1:void 0),t):(e.key===i?(e.preventDefault(),t=n>0?n-1:void 0):e.key===a?(e.preventDefault(),t=n<r-1?n+1:void 0):(e.key===`Backspace`||e.key===`Delete`)&&(e.preventDefault(),t=fW(n,M.length),se()),t)}let pe=Di(`input`,e,{state:ue,ref:[t,_.context.inputRef,G],props:[O,k,{value:ee??v,"aria-readonly":C||void 0,"aria-required":x||void 0,"aria-labelledby":m,disabled:R,readOnly:C,required:E===`none`?x:void 0,form:T,...ie&&w&&{name:w},id:H,onFocus(){if(d(!0),!P||!re.current)return;re.current=!1;let e=W.current;e!=null&&Object.hasOwn(_.context.valuesRef.current,e)&&_.context.setIndices({activeIndex:e})},onBlur(){u(!0),d(!1);let e=_.state.activeIndex;if(P&&e!==null&&D!==`always`&&(W.current=e,re.current=!0,_.context.setIndices({activeIndex:null})),f===`onBlur`){let e=E===`none`?v:M;p.commit(e)}},onCompositionStart(e){ae||(ne.current=!0,te(e.currentTarget.value))},onCompositionEnd(e){ne.current=!1;let t=e.currentTarget.value;te(null),_.context.setInputValue(t,J(Lt,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=!n||n===`insertReplacementText`,i=ne.current||!r;function a(e){!C&&!R&&e&&i&&(_.context.setOpen(!0,J(Lt,t)),I||se())}if(ne.current){let n=e.currentTarget.value;te(n),n===``&&!_.state.openOnInputClick&&!_.state.inputInsidePopup&&_.context.setOpen(!1,J(Rt,t));let r=n.trim(),i=I&&r!==``;a(r),A&&_.state.activeIndex!==null&&!i&&se();return}let o=J(Lt,t);if(_.context.setInputValue(e.currentTarget.value,o),o.isCanceled)return;let s=e.currentTarget.value===``,c=J(Rt,t);s&&!_.state.inputInsidePopup&&(E===`single`&&_.context.setSelectedValue(null,c),_.state.openOnInputClick||_.context.setOpen(!1,c)),a(e.currentTarget.value.trim()),A&&_.state.activeIndex!==null&&!I&&se()},onKeyDown(e){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(_.context.keyboardActiveRef.current=!0,R||C){C&&e.key===`Enter`&&A&&_.state.activeIndex!==null&&de(e);return}let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=y===`rtl`;if(e.key===`Home`){de(e);let n=ce&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){de(e);let i=ce&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!j&&e.key===`Escape`){let t=E===`multiple`&&Array.isArray(M)?M.length===0:M===null,n=J(Ut,e.nativeEvent),r=E===`multiple`?[]:null;_.context.setInputValue(``,n),_.context.setSelectedValue(r,n),!t&&!_.state.inline&&!n.isPropagationAllowed&&e.stopPropagation();return}if(h&&e.key===`Backspace`&&t.value===``&&h.highlightedChipIndex===void 0&&Array.isArray(M)&&M.length>0){let t=h.chipsRef.current.length,n=t>0?t-1:M.length-1,r=M.filter((e,t)=>t!==n);se(),_.context.setSelectedValue(r,J(Ot,e.nativeEvent));return}let i=h?.highlightedChipIndex!==void 0,a=fe(e);if(h?.setHighlightedChipIndex(a),a===void 0?i&&_.context.inputRef.current?.focus():h?.chipsRef.current[a]?.focus(),e.which!==229&&e.key===`Enter`&&A){let t=_.state.activeIndex,n=e.nativeEvent;if(t===null){if(P)return;_.context.setOpen(!1,J(Ot,n));return}de(e),pW(_,t,n)}},onPointerMove:le,onPointerDown:le},oe],stateAttributesMapping:rW}),me=g?(0,Y.jsx)(fM.Provider,{value:dM,children:pe}):pe;return(0,Y.jsxs)(b.Fragment,{children:[A&&V&&(0,Y.jsx)(cW,{ref:_.context.startDismissRef}),me]})}),hW=b.forwardRef(function(e,t){let{render:n,className:r,nativeButton:i=!0,disabled:a=!1,id:o,style:s,...c}=e,{state:l,disabled:u,setTouched:d,setFocused:f,validationMode:p,validation:m}=pM(),{labelId:h}=yM(),g=mU(),_=g.useState(`selectionMode`),v=g.useState(`disabled`),y=g.useState(`readOnly`),x=g.useState(`required`),S=g.useState(`positionerElement`),C=g.useState(`listElement`),w=g.useState(`popupId`),T=g.useState(`triggerProps`),E=g.useState(`inputInsidePopup`),D=g.useState(`id`),O=g.useState(`labelId`),k=g.useState(`open`),A=g.useState(`selectedValue`),j=g.useState(`activeIndex`),M=g.useState(`selectedIndex`),N=g.useState(`hasSelectedValue`),P=hU(),F=_U(),I=V(),L=u||v||a,R=uW(),z=lW(g);CM({id:E?o:void 0});let B=E?o??D:o,H=QU(h,O),U;k&&E?U=w??zU(D):k&&(U=C?.id);let ee=b.useRef(``);function te(e){ee.current=e.pointerType}let{reference:ne}=Ns(P,{enabled:!k&&!y&&!v&&_===`single`,listRef:g.context.labelsRef,activeIndex:j,selectedIndex:M,onMatch(e){let t=g.context.valuesRef.current[e];t!==void 0&&g.context.setSelectedValue(t,J(Ot))}}),{reference:W}=ua(P,{enabled:!v,event:`mousedown`}),{buttonRef:re,getButtonProps:ie}=hl({native:i,disabled:L}),ae={...l,readOnly:y,open:k,disabled:L,popupSide:z,listEmpty:R,placeholder:_!==`none`&&!N};return Di(`button`,e,{ref:[t,re,X(e=>{g.set(`triggerElement`,e)})],state:ae,props:[T,W,ne,{id:B,tabIndex:E?0:-1,role:E?`combobox`:void 0,"aria-expanded":k,"aria-haspopup":E?`dialog`:`listbox`,"aria-controls":U,"aria-required":E&&x||void 0,"aria-readonly":E&&y||void 0,"aria-labelledby":H,onPointerDown:te,onPointerEnter:te,onFocus(){f(!0),!L&&I.start(0,g.context.forceMount)},onBlur(e){if(!K(S,e.relatedTarget)&&(d(!0),f(!1),p===`onBlur`)){let e=_===`none`?F:A;m.commit(e)}},onMouseDown(e){if(L||(E||P.set(`domReferenceElement`,e.currentTarget),g.context.forceMount(),ee.current!==`touch`&&(g.context.inputRef.current?.focus(),E||e.preventDefault()),k))return;let t=En(e.currentTarget);function n(e){let t=g.state.triggerElement;if(!t)return;let n=Ue(e),r=g.state.positionerElement,i=g.state.listElement;K(t,n)||K(r,n)||K(i,n)||Yu(e,t)||g.context.setOpen(!1,J(Jt,e))}E&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(de(e),g.context.setOpen(!0,J(Wt,e.nativeEvent)),g.context.inputRef.current?.focus())}},m.getValidationProps(L,c),ie],stateAttributesMapping:rW})}),gW=b.createContext(null);function _W(){return b.useContext(gW)}function vW(e){let{children:t,items:n}=e,r=b.useMemo(()=>({items:n}),[n]);return(0,Y.jsx)(gW.Provider,{value:r,children:t})}function yW(e){let{children:t}=e,{filteredItems:n}=gU(),r=_W(),i=r?r.items:n;return(0,Y.jsx)(b.Fragment,{children:i.map(t)})}var bW=b.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...s}=e,c=mU(),l=hU(),u=!!sW(!0),{filteredItems:d,hasItems:f}=gU(),p=c.useState(`selectionMode`),m=c.useState(`grid`),h=c.useState(`readOnly`),g=c.useState(`listProps`),_=c.useState(`virtualized`),v=c.useState(`forceMounted`),y=p===`multiple`,x=d.length===0,S=X(e=>{c.set(`positionerElement`,e)}),C=X(e=>{c.set(`listElement`,e)}),w=b.useMemo(()=>typeof o==`function`?n||=(0,Y.jsx)(yW,{children:o}):o,[o]),T={empty:x},E=l.useState(`floatingId`),D=Di(`div`,e,{state:T,ref:[t,C,u?null:S],props:[g,{children:w,tabIndex:-1,id:E,role:m?`grid`:`listbox`,"aria-multiselectable":y?`true`:void 0,"aria-readonly":!m&&h?!0:void 0,onKeyDown(e){if(!(c.state.disabled||c.state.readOnly)&&e.key===`Enter`){let t=c.state.activeIndex;if(t==null)return;de(e),pW(c,t,e.nativeEvent)}},onKeyDownCapture(){c.context.keyboardActiveRef.current=!0},onPointerMoveCapture(){c.context.keyboardActiveRef.current=!1}},s]});if(_)return D;let O=f&&!v?void 0:c.context.labelsRef;return(0,Y.jsx)(Pc,{elementsRef:c.context.listRef,labelsRef:O,children:D})}),xW=``;function SW(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;e.nodeValue!==``&&(n=e)}return n}function CW(){let e=V(),t=b.useRef(null);return b.useEffect(()=>{if(re)return;let n=t.current;if(n==null)return;let r=SW(n);if(r==null)return;let i=r.data,a=`${i}${xW}`;return r.nodeValue=a,e.start(200,()=>{r.nodeValue===a&&(r.nodeValue=i)}),()=>{e.clear(),r.nodeValue===a&&(r.nodeValue=i)}},[t,e]),t}var wW=b.createContext(void 0);function TW(){let e=b.useContext(wW);if(e===void 0)throw Error(F(20));return e}var EW=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=mU(),a=i.useState(`mounted`),o=i.useState(`forceMounted`);return a||n||o?(0,Y.jsx)(wW.Provider,{value:n,children:(0,Y.jsx)(Wi,{ref:t,...r})}):null}),DW=b.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m=!1,collisionAvoidance:h=Ii,style:g,..._}=e,v=mU(),y=hU(),b=TW(),x=v.useState(`modal`),S=v.useState(`open`),C=v.useState(`mounted`),w=v.useState(`openMethod`),T=v.useState(`positionerElement`),E=v.useState(`triggerElement`),D=v.useState(`inputElement`),O=v.useState(`inputGroupElement`),k=v.useState(`inputInsidePopup`),A=v.useState(`transitionStatus`),j=uW(),M=Sc({anchor:i??(k?E:O??D),floatingRootContext:y,positionMethod:a,mounted:C,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:b,collisionAvoidance:h,lazyFlip:!0});Iu(S&&x,w===`touch`,T,E);let P={open:S,side:M.side,align:M.align,anchorHidden:M.anchorHidden,empty:j};N(()=>{v.set(`popupSide`,M.side)},[v,M.side]);let F=X(e=>{v.set(`positionerElement`,e)}),I=Ec(e,P,{styles:M.positionerStyles,transitionStatus:A,props:_,refs:[t,F],hidden:!C,inert:!S});return(0,Y.jsxs)(oW.Provider,{value:M,children:[C&&x&&(0,Y.jsx)(Nl,{inert:Ac(!S),cutout:O??D??E}),I]})}),OW={...pt,...et},kW=b.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=mU(),l=sW(),u=hU(),d=c.useState(`mounted`),f=c.useState(`open`),p=c.useState(`openMethod`),m=c.useState(`popupProps`),h=c.useState(`transitionStatus`),g=c.useState(`inputInsidePopup`),_=c.useState(`inputElement`),v=c.useState(`modal`),y=c.useState(`id`),x=uW(),S=s.id??(g?zU(y):void 0);N(()=>(c.set(`popupId`,c.context.popupRef.current?.id||S),()=>{c.set(`popupId`,void 0)}),[c,S]),Ho({open:f,ref:c.context.popupRef,onComplete(){f&&c.context.onOpenChangeComplete(!0)}});let C=Di(`div`,e,{state:{open:f,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:h,empty:x},ref:[t,c.context.popupRef],props:[m,{id:S,role:g?`dialog`:`presentation`,onFocus(e){let t=Ue(e.nativeEvent);p!==`touch`&&(K(c.state.listElement,t)||t===e.currentTarget)&&c.context.inputRef.current?.focus()}},Tc(h),s],stateAttributesMapping:OW}),w=a===void 0?g?e=>e===`touch`?c.context.popupRef.current:_:!1:a,T;T=o??(g?void 0:!1);let E=!g||v;return(0,Y.jsx)(la,{context:u,disabled:!d,modal:E,openInteractionType:p,initialFocus:w,returnFocus:T,getInsideElements:()=>[c.context.startDismissRef.current,c.context.endDismissRef.current],children:(0,Y.jsxs)(b.Fragment,{children:[C,E&&(0,Y.jsx)(cW,{ref:c.context.endDismissRef})]})})}),AW=b.createContext(void 0);function jW(){let e=b.useContext(AW);if(e===void 0)throw Error(F(18));return e}var MW=b.forwardRef(function(e,t){let{render:n,className:r,style:i,items:a,...o}=e,s=mU().useState(`grid`),[c,l]=b.useState(),u=b.useMemo(()=>({labelId:c,setLabelId:l,items:a}),[c,l,a]),d=Di(`div`,e,{ref:t,props:[{role:s?`rowgroup`:`group`,"aria-labelledby":c},o]}),f=(0,Y.jsx)(AW.Provider,{value:u,children:d});return a?(0,Y.jsx)(vW,{items:a,children:f}):f}),NW=b.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=jW(),c=Js(a);return N(()=>(s(c),()=>{s(e=>e===c?void 0:e)}),[c,s]),Di(`div`,e,{ref:t,props:[{id:c,"aria-hidden":!0},o]})}),PW=b.createContext(void 0);function FW(){let e=b.useContext(PW);if(!e)throw Error(F(19));return e}var IW=b.createContext(!1);function LW(){return b.useContext(IW)}function RW(e){let{componentProps:t,forwardedRef:n,virtualized:r,indexFromFilter:i}=e,{render:a,className:o,style:s,value:c=null,index:l,disabled:u=!1,nativeButton:d=!1,...f}=t,p=b.useRef(null),m=vl({guess:!0,index:l,textRef:p}),h=mU(),g=LW(),_=vU(),v=h.useState(`selectionMode`),y=h.useState(`disabled`),x=h.useState(`readOnly`),S=h.useState(`isItemEqualToValue`),C=y||u,w=v!==`none`,T=l??i??m.index,E=T!==-1,D=h.useState(`id`),O=h.useState(`isActive`,T),k=h.useState(`isSelected`,c),A=h.useState(`itemProps`),j=b.useRef(null),M=D!=null&&E?`${D}-${T}`:void 0,P=k&&w;N(()=>{if(!E||!r&&l==null)return;let e=h.context.listRef.current;return e[T]=j.current,()=>{delete e[T]}},[E,r,T,l,h]),N(()=>{if(!E||_)return;let e=h.context.valuesRef.current;return e[T]=c,()=>{delete e[T]}},[E,_,T,c,h]),N(()=>{if(!E||_)return;let e=h.state.selectedValue,t=h.state.selectedIndex;h.state.selectionMode===`multiple`&&Array.isArray(e)?t=DU(T,c,h.context.valuesRef.current,e,S,t):xU(c,e,S)&&(t=T),h.set(`selectedIndex`,t)},[E,_,h,T,c,S]);let{getButtonProps:F,buttonRef:I}=hl({disabled:C,focusableWhenDisabled:!0,native:d,composite:!0}),L={disabled:C,selected:P,highlighted:O};function R(e){function t(){h.context.handleSelection(e,c)}h.state.submitOnItemClick?(zi.flushSync(t),h.context.requestSubmit()):t()}let z={id:M,role:g?`gridcell`:`option`,"aria-selected":w?P:void 0,tabIndex:void 0,onPointerDownCapture(e){e.isPrimary&&(h.context.pointerDownItemRef.current=e.currentTarget),e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){C||x||R(e.nativeEvent)},onMouseUp(e){let t=h.context.pointerDownItemRef.current===e.currentTarget;h.context.pointerDownItemRef.current=null,!(C||x||e.button!==0||t||!O)&&R(e.nativeEvent)}},B=Di(`div`,t,{ref:[I,n,m.ref,j],state:L,props:[A,z,f,F]}),V=b.useMemo(()=>({selected:P,textRef:p}),[P,p]);return(0,Y.jsx)(PW.Provider,{value:V,children:B})}function zW(e){let{componentProps:t,forwardedRef:n}=e,r=mU().useState(`isItemEqualToValue`),{flatFilteredValues:i}=gU(),a=wU(i,t.value??null,r);return(0,Y.jsx)(RW,{componentProps:t,forwardedRef:n,virtualized:!0,indexFromFilter:a})}var BW=b.memo(b.forwardRef(function(e,t){let n=mU().useState(`virtualized`);return n&&e.index==null?(0,Y.jsx)(zW,{componentProps:e,forwardedRef:t}):(0,Y.jsx)(RW,{componentProps:e,forwardedRef:t,virtualized:n,indexFromFilter:void 0})})),VW=b.forwardRef(function(e,t){let{selected:n}=FW();return e.keepMounted||n?(0,Y.jsx)(HW,{...e,ref:t}):null}),HW=b.memo(b.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=FW(),c=b.useRef(null),{transitionStatus:l,setMounted:u}=Ro(s),d=Di(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:et});return Ho({batch:!0,enabled:!s,open:s,ref:c,onComplete(){s||u(!1)}}),d})),UW=b.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=gU(),c=mU(),l=CW(),u=s.length===0?a:null;return Di(`div`,e,{ref:[t,c.context.emptyRef,l],props:[{children:u,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})});function WW(e){let t=(0,kA.c)(13),{label:n,children:r,onClick:i,disabled:a,pressed:o,className:s}=e,c=s===void 0?``:s,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Y.jsx)(bu,{}),t[0]=l):l=t[0];let u=`icon-button ${c}`,d;t[1]!==r||t[2]!==a||t[3]!==n||t[4]!==i||t[5]!==o||t[6]!==u?(d=(0,Y.jsx)(ec,{render:l,className:u,"aria-label":n,"aria-pressed":o,disabled:a,onClick:i,children:r}),t[1]=r,t[2]=a,t[3]=n,t[4]=i,t[5]=o,t[6]=u,t[7]=d):d=t[7];let f;t[8]===n?f=t[9]:(f=(0,Y.jsx)(ic,{children:(0,Y.jsx)(Dc,{sideOffset:8,children:(0,Y.jsx)(Oc,{className:`tooltip`,children:n})})}),t[8]=n,t[9]=f);let p;return t[10]!==d||t[11]!==f?(p=(0,Y.jsxs)(Ks,{children:[d,f]}),t[10]=d,t[11]=f,t[12]=p):p=t[12],p}function GW(e){let t=(0,kA.c)(35),{label:n,value:r,groups:i,onChange:a}=e,o;if(t[0]!==i||t[1]!==r){let e;t[3]===r?e=t[4]:(e=e=>e.value===r,t[3]=r,t[4]=e),o=i.flatMap(XW).find(e),t[0]=i,t[1]=r,t[2]=o}else o=t[2];let s=o,c;t[5]===i?c=t[6]:(c=i.filter(YW),t[5]=i,t[6]=c);let l;t[7]!==s||t[8]!==r?(l=s||{value:r,label:r},t[7]=s,t[8]=r,t[9]=l):l=t[9];let u;t[10]===a?u=t[11]:(u=e=>{e&&a(e.value)},t[10]=a,t[11]=u);let d;t[12]===n?d=t[13]:(d=(0,Y.jsx)($U,{className:`control-label`,children:n}),t[12]=n,t[13]=d);let f,p,m;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Y.jsx)(wj,{}),p=(0,Y.jsx)(`span`,{children:(0,Y.jsx)(eW,{})}),m=(0,Y.jsx)(hj,{}),t[14]=f,t[15]=p,t[16]=m):(f=t[14],p=t[15],m=t[16]);let h;t[17]===n?h=t[18]:(h=(0,Y.jsxs)(hW,{className:`branch-trigger`,"aria-label":n,children:[f,p,m]}),t[17]=n,t[18]=h);let g;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Y.jsx)(Ej,{}),t[19]=g):g=t[19];let _;t[20]===n?_=t[21]:(_=n.toLowerCase(),t[20]=n,t[21]=_);let v=`Search ${_}`,y;t[22]===v?y=t[23]:(y=(0,Y.jsxs)(`div`,{className:`search-field`,children:[g,(0,Y.jsx)(mW,{"aria-label":v,placeholder:`Find a branch…`})]}),t[22]=v,t[23]=y);let b,x;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,Y.jsx)(UW,{className:`popup-empty`,children:`No matching branches.`}),x=(0,Y.jsx)(bW,{className:`option-list`,children:KW}),t[24]=b,t[25]=x):(b=t[24],x=t[25]);let S;t[26]===y?S=t[27]:(S=(0,Y.jsx)(EW,{children:(0,Y.jsx)(DW,{sideOffset:6,align:`start`,className:`floating`,children:(0,Y.jsxs)(kW,{className:`popup branch-popup`,children:[y,b,x]})})}),t[26]=y,t[27]=S);let C;return t[28]!==S||t[29]!==c||t[30]!==l||t[31]!==u||t[32]!==d||t[33]!==h?(C=(0,Y.jsxs)(XU,{items:c,value:l,onValueChange:u,isItemEqualToValue:JW,limit:60,children:[d,h,S]}),t[28]=S,t[29]=c,t[30]=l,t[31]=u,t[32]=d,t[33]=h,t[34]=C):C=t[34],C}function KW(e){return(0,Y.jsxs)(MW,{items:e.items,className:`option-group`,children:[(0,Y.jsx)(NW,{className:`option-group-label`,children:e.value}),(0,Y.jsx)(yW,{children:qW})]},e.value)}function qW(e){return(0,Y.jsxs)(BW,{className:`option`,value:e,children:[(0,Y.jsx)(wj,{}),(0,Y.jsx)(`span`,{children:e.label}),(0,Y.jsx)(VW,{children:(0,Y.jsx)(gj,{})})]},e.value)}function JW(e,t){return e.value===t.value}function YW(e){return e.items.length}function XW(e){return e.items}function ZW(e){let t=(0,kA.c)(7),{lines:n,children:r}=e,i=n===void 0?2:n,a;t[0]===r?a=t[1]:(a=(0,Y.jsx)(`span`,{children:r}),t[0]=r,t[1]=a);let o;t[2]===i?o=t[3]:(o=Array.from({length:i},QW),t[2]=i,t[3]=o);let s;return t[4]!==a||t[5]!==o?(s=(0,Y.jsxs)(`div`,{className:`review-loading`,role:`status`,children:[a,o]}),t[4]=a,t[5]=o,t[6]=s):s=t[6],s}function QW(e,t){return(0,Y.jsx)(`div`,{},t)}function $W(e){let t=(0,kA.c)(10),{icon:n,title:r,children:i}=e,a;t[0]===n?a=t[1]:(a=(0,Y.jsx)(`div`,{className:`empty-icon`,children:n}),t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=(0,Y.jsx)(`h2`,{children:r}),t[2]=r,t[3]=o);let s;t[4]===i?s=t[5]:(s=(0,Y.jsx)(`p`,{children:i}),t[4]=i,t[5]=s);let c;return t[6]!==a||t[7]!==o||t[8]!==s?(c=(0,Y.jsxs)(`div`,{className:`empty-state`,children:[a,o,s]}),t[6]=a,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}var eG=window.location.hash.slice(1);async function tG(e,t={},n){let r;try{r=await fetch(`/api/${e}?${new URLSearchParams(t)}`,{...n,headers:{Authorization:`Bearer ${eG}`}})}catch(e){throw e instanceof DOMException&&e.name===`AbortError`?e:Error(`The polydiff server stopped responding. Is it still running?`,{cause:e})}if(!r.headers.get(`content-type`)?.includes(`application/json`))throw Error(`Start the local server with pnpm start to browse repositories.`);let i=await r.json();if(!r.ok)throw Error(i.error||`Request failed.`);return i}function nG(e,t){return tG(e,{},{method:`POST`,body:JSON.stringify(t)})}var rG={loading:!0};function iG(e,t){return`diff-${encodeURIComponent(e)}${t?`-${encodeURIComponent(t)}`:``}`}function aG(e){return e===`@working`?`working tree`:e}function oG(e){return e.flatMap(e=>e.hunks).reduce((e,t)=>({added:e.added+t.additionLines,removed:e.removed+t.deletionLines}),{added:0,removed:0})}function sG(e,t,n){let r={};return t.base&&t.base!==e.base&&(r.base=t.base),t.target&&t.target!==`@working`&&(r.target=t.target),n===`custom`&&t.selected!==void 0&&(r.selected=t.selected),r}function cG(e,t){let[n,r]=(0,b.useState)(e.root),[i,a]=(0,b.useState)([]),[o,s]=(0,b.useState)(e.repos),[c,l]=(0,b.useState)(e.selection),[u,d]=(0,b.useState)({}),[f,p]=(0,b.useState)(!0),[m,h]=(0,b.useState)(``),[g,_]=(0,b.useState)([]),v=(0,b.useRef)(null),y=(0,b.useRef)(new Map),x=(0,b.useRef)(0),S=(0,b.useRef)(o),C=(0,b.useRef)(``);(0,b.useEffect)(()=>{S.current=o},[o]);let w=(0,b.useMemo)(()=>i.map(e=>{let t=o[e.path];return{repo:e,base:t?.base||e.base,target:t?.target||`@working`,selected:t?.selected,...u[e.path]||rG}}),[i,o,u]),T=(0,b.useCallback)(e=>c===`all`?!0:c===`none`?!1:c===`custom`&&e.selected!==void 0?e.selected:!!e.data?.files.length,[c]),E=(0,b.useMemo)(()=>w.filter(T),[w,T]),D=(0,b.useCallback)(async(e,t,n,r)=>{if(r?.aborted)return;y.current.get(e.path)?.abort();let i=new AbortController;y.current.set(e.path,i);let a=()=>i.abort();r?.addEventListener(`abort`,a,{once:!0});let o=++x.current;d(t=>({...t,[e.path]:{...t[e.path],loading:!0}}));try{let r=await tG(`diff`,{repo:e.path,base:t,target:n},{signal:i.signal});if(i.signal.aborted)return;let a=VD(r.patch,`${e.path}:${o}`,!0).flatMap(e=>e.files);d(t=>({...t,[e.path]:{loading:!1,data:{files:a,mergeBase:r.mergeBase,targetRef:r.targetRef,warnings:r.warnings,version:o}}}))}catch(t){i.signal.aborted||d(n=>({...n,[e.path]:{loading:!1,error:t instanceof Error?t.message:`Could not load changes.`}}))}finally{r?.removeEventListener(`abort`,a),y.current.get(e.path)===i&&y.current.delete(e.path)}},[]),O=(0,b.useCallback)(async(e,t=!1)=>{v.current?.abort(),y.current.forEach(e=>e.abort()),y.current.clear();let n=new AbortController;v.current=n,p(!0),h(``);try{let i=await tG(`workspace`,{path:e},{signal:n.signal});if(n.signal.aborted)return;r(i.root),_(i.warnings),a(i.repos),t||d({}),p(!1);let o=0;await Promise.all(Array.from({length:Math.min(4,i.repos.length)},async()=>{for(;o<i.repos.length&&!n.signal.aborted;){let e=i.repos[o++],t=S.current[e.path];await D(e,t?.base||e.base,t?.target||`@working`,n.signal)}}))}catch(e){n.signal.aborted||(h(e instanceof Error?e.message:`Could not scan workspace.`),p(!1))}},[D]);return(0,b.useEffect)(()=>{O(e.root);let t=y.current;return()=>{v.current?.abort(),t.forEach(e=>e.abort())}},[O,e.root]),(0,b.useEffect)(()=>{if(!i.length)return;let e={};for(let t of i)e[t.path]=sG(t,o[t.path]||{},c);let n=JSON.stringify({repos:e,selection:c});n!==C.current&&(C.current=n,t({repos:e,selection:c}))},[i,o,c,t]),{root:n,entries:w,selected:E,included:T,selection:c,scanning:f,error:m,warnings:g,open:O,reload:(0,b.useCallback)(e=>D(e.repo,e.base,e.target),[D]),configure:(0,b.useCallback)((e,t)=>{s(n=>({...n,[e.repo.path]:{...n[e.repo.path],...t}})),D(e.repo,t.base??e.base,t.target??e.target)},[D]),select:(0,b.useCallback)((e,t)=>{s(n=>{let r={...n};if(c!==`custom`)for(let e of w)r[e.repo.path]={...r[e.repo.path],selected:T(e)};return r[e]={...r[e],selected:t},r}),l(`custom`)},[w,T,c]),setSelection:(0,b.useCallback)(e=>{l(e),e!==`custom`&&s(e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{base:t.base,target:t.target}])))},[])}}var lG=[{value:`changed`,label:`Changed`,hint:`Follow repositories that have changes`},{value:`all`,label:`All`,hint:`Include every repository`},{value:`none`,label:`None`,hint:`Clear the selection`}];function uG(e,t){let{local:n,remote:r}=e.repo.branches;return[{value:`Current`,items:[...t?[{value:`@working`,label:`working tree (${e.repo.branch})`}]:[],{value:`HEAD`,label:t?`HEAD (committed only)`:`HEAD`}]},{value:`Local`,items:n.map(e=>({value:e,label:e}))},{value:`Remote`,items:r.map(e=>({value:e,label:e}))}]}function dG(e){let t=(0,kA.c)(45),{entry:n,workspace:r}=e,i=`Comparison for ${n.repo.name}`,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Y.jsx)(wj,{}),t[0]=a):a=t[0];let o=n.base,s;t[1]===n.target?s=t[2]:(s=aG(n.target),t[1]=n.target,t[2]=s);let c=`${o} → ${s}`,l=n.base,u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Y.jsx)(lj,{}),t[3]=u):u=t[3];let d;t[4]===n.target?d=t[5]:(d=aG(n.target),t[4]=n.target,t[5]=d);let f;t[6]!==n.base||t[7]!==c||t[8]!==d?(f=(0,Y.jsxs)(`span`,{title:c,children:[l,u,d]}),t[6]=n.base,t[7]=c,t[8]=d,t[9]=f):f=t[9];let p;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Y.jsx)(pj,{}),t[10]=p):p=t[10];let m;t[11]!==i||t[12]!==f?(m=(0,Y.jsxs)(qH,{className:`compare-chip`,"aria-label":i,children:[a,f,p]}),t[11]=i,t[12]=f,t[13]=m):m=t[13];let h;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Y.jsx)(iU,{children:`Compare`}),t[14]=h):h=t[14];let g=n.repo.worktree?` · worktree`:``,_;t[15]!==n.repo.name||t[16]!==g?(_=(0,Y.jsxs)(aU,{className:`muted`,children:[n.repo.name,g]}),t[15]=n.repo.name,t[16]=g,t[17]=_):_=t[17];let v=n.base,y;t[18]===n?y=t[19]:(y=uG(n,!1),t[18]=n,t[19]=y);let b;t[20]!==n||t[21]!==r?(b=e=>r.configure(n,{base:e}),t[20]=n,t[21]=r,t[22]=b):b=t[22];let x;t[23]!==n.base||t[24]!==y||t[25]!==b?(x=(0,Y.jsx)(GW,{label:`Base`,value:v,groups:y,onChange:b}),t[23]=n.base,t[24]=y,t[25]=b,t[26]=x):x=t[26];let S;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Y.jsx)(`div`,{className:`compare-connector`,children:(0,Y.jsx)(lj,{})}),t[27]=S):S=t[27];let C=n.target,w;t[28]===n?w=t[29]:(w=uG(n,!0),t[28]=n,t[29]=w);let T;t[30]!==n||t[31]!==r?(T=e=>r.configure(n,{target:e}),t[30]=n,t[31]=r,t[32]=T):T=t[32];let E;t[33]!==n.target||t[34]!==w||t[35]!==T?(E=(0,Y.jsx)(GW,{label:`Compare`,value:C,groups:w,onChange:T}),t[33]=n.target,t[34]=w,t[35]=T,t[36]=E):E=t[36];let D;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,Y.jsx)(`p`,{className:`popup-note`,children:`Changes since the common ancestor. Uncommitted edits are included only for the working tree.`}),t[37]=D):D=t[37];let O;t[38]!==_||t[39]!==x||t[40]!==E?(O=(0,Y.jsx)(XH,{children:(0,Y.jsx)($H,{side:`right`,align:`start`,sideOffset:10,className:`floating`,children:(0,Y.jsxs)(rU,{className:`popup comparison-popup`,children:[h,_,x,S,E,D]})})}),t[38]=_,t[39]=x,t[40]=E,t[41]=O):O=t[41];let k;return t[42]!==m||t[43]!==O?(k=(0,Y.jsxs)(WH,{children:[m,O]}),t[42]=m,t[43]=O,t[44]=k):k=t[44],k}function fG(e){let t=(0,kA.c)(34),{entry:n,workspace:r}=e,i=n.repo,a;t[0]!==n||t[1]!==r?(a=r.included(n),t[0]=n,t[1]=r,t[2]=a):a=t[2];let o=a,s=`selector-row ${o?`is-selected`:``}`,c=`Include ${i.name}`,l;t[3]!==i.path||t[4]!==r?(l=e=>r.select(i.path,e),t[3]=i.path,t[4]=r,t[5]=l):l=t[5];let u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Y.jsx)(IH,{children:(0,Y.jsx)(gj,{weight:`bold`})}),t[6]=u):u=t[6];let d;t[7]!==o||t[8]!==c||t[9]!==l?(d=(0,Y.jsx)(FH,{className:`checkbox`,"aria-label":c,checked:o,onCheckedChange:l,children:u}),t[7]=o,t[8]=c,t[9]=l,t[10]=d):d=t[10];let f;t[11]===i.worktree?f=t[12]:(f=i.worktree&&(0,Y.jsx)(`span`,{className:`worktree-label`,children:`worktree`}),t[11]=i.worktree,t[12]=f);let p;t[13]!==i.name||t[14]!==i.path||t[15]!==f?(p=(0,Y.jsxs)(`span`,{className:`selector-name`,title:i.path,children:[i.name,f]}),t[13]=i.name,t[14]=i.path,t[15]=f,t[16]=p):p=t[16];let m=`selector-count ${n.error?`has-error`:``}`,h=n.error||`${n.data?.files.length||0} changed files`,g;t[17]!==n.data?.files||t[18]!==n.error||t[19]!==n.loading?(g=n.loading?(0,Y.jsx)(`span`,{className:`busy-dot`}):n.error?(0,Y.jsx)(Nj,{}):n.data?.files.length||`—`,t[17]=n.data?.files,t[18]=n.error,t[19]=n.loading,t[20]=g):g=t[20];let _;t[21]!==h||t[22]!==g||t[23]!==m?(_=(0,Y.jsx)(`span`,{className:m,title:h,children:g}),t[21]=h,t[22]=g,t[23]=m,t[24]=_):_=t[24];let v;t[25]!==n||t[26]!==r?(v=(0,Y.jsx)(dG,{entry:n,workspace:r}),t[25]=n,t[26]=r,t[27]=v):v=t[27];let y;return t[28]!==_||t[29]!==v||t[30]!==s||t[31]!==d||t[32]!==p?(y=(0,Y.jsxs)(`div`,{className:s,children:[d,p,_,v]}),t[28]=_,t[29]=v,t[30]=s,t[31]=d,t[32]=p,t[33]=y):y=t[33],y}function pG(e){let t=(0,kA.c)(71),{workspace:n}=e,[r,i]=(0,b.useState)(``),a,o,s,c,l,u,d,f,p,m,h,g,_,v;if(t[0]!==r||t[1]!==n){let e;t[16]===r?e=t[17]:(e=e=>e.repo.name.toLowerCase().includes(r.toLowerCase()),t[16]=r,t[17]=e),v=n.entries.filter(e),c=WH;let y,b;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Y.jsx)(Sj,{}),b=(0,Y.jsx)(`strong`,{children:`Repositories`}),t[18]=y,t[19]=b):(y=t[18],b=t[19]);let x=n.scanning?`Scanning…`:`${n.selected.length} of ${n.entries.length}`,S;t[20]===x?S=t[21]:(S=(0,Y.jsx)(`small`,{children:x}),t[20]=x,t[21]=S);let C;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Y.jsx)(pj,{}),t[22]=C):C=t[22],t[23]===S?_=t[24]:(_=(0,Y.jsxs)(qH,{className:`selector-trigger`,"aria-label":`Repositories`,children:[y,b,S,C]}),t[23]=S,t[24]=_),s=XH,o=$H,m=8,h=`start`,g=`floating`,a=rU,d=`popup selector-popup`;let w;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Y.jsx)(Ej,{}),t[25]=w):w=t[25],t[26]===r?f=t[27]:(f=(0,Y.jsxs)(`div`,{className:`search-field`,children:[w,(0,Y.jsx)(jM,{"aria-label":`Filter repositories`,placeholder:`Find a repository…`,value:r,onValueChange:i})]}),t[26]=r,t[27]=f);let T;t[28]===n.selection?T=t[29]:(T=n.selection===`custom`?[]:[n.selection],t[28]=n.selection,t[29]=T);let E;t[30]===n?E=t[31]:(E=e=>{e[0]&&n.setSelection(e[0])},t[30]=n,t[31]=E);let D;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(D=lG.map(mG),t[32]=D):D=t[32];let O;t[33]!==T||t[34]!==E?(O=(0,Y.jsx)(fl,{className:`segmented`,"aria-label":`Which repositories to review`,value:T,onValueChange:E,children:D}),t[33]=T,t[34]=E,t[35]=O):O=t[35];let k=n.selection===`custom`?`Custom · `:``,A;t[36]!==k||t[37]!==n.entries.length||t[38]!==n.selected.length?(A=(0,Y.jsxs)(`span`,{className:`selector-summary`,children:[k,n.selected.length,` of `,n.entries.length]}),t[36]=k,t[37]=n.entries.length,t[38]=n.selected.length,t[39]=A):A=t[39],t[40]!==O||t[41]!==A?(p=(0,Y.jsxs)(`div`,{className:`selector-actions`,children:[O,A]}),t[40]=O,t[41]=A,t[42]=p):p=t[42],l=`selector-list`;let j;t[43]===n?j=t[44]:(j=e=>(0,Y.jsx)(fG,{entry:e,workspace:n},e.repo.path),t[43]=n,t[44]=j),u=v.map(j),t[0]=r,t[1]=n,t[2]=a,t[3]=o,t[4]=s,t[5]=c,t[6]=l,t[7]=u,t[8]=d,t[9]=f,t[10]=p,t[11]=m,t[12]=h,t[13]=g,t[14]=_,t[15]=v}else a=t[2],o=t[3],s=t[4],c=t[5],l=t[6],u=t[7],d=t[8],f=t[9],p=t[10],m=t[11],h=t[12],g=t[13],_=t[14],v=t[15];let y;t[45]!==v.length||t[46]!==n.scanning?(y=!v.length&&(0,Y.jsx)(`p`,{className:`popup-empty`,children:n.scanning?`Discovering repositories…`:`No matching repositories.`}),t[45]=v.length,t[46]=n.scanning,t[47]=y):y=t[47];let x;t[48]!==l||t[49]!==y||t[50]!==u?(x=(0,Y.jsxs)(`div`,{className:l,children:[u,y]}),t[48]=l,t[49]=y,t[50]=u,t[51]=x):x=t[51];let S;t[52]!==a||t[53]!==x||t[54]!==d||t[55]!==f||t[56]!==p?(S=(0,Y.jsxs)(a,{className:d,children:[f,p,x]}),t[52]=a,t[53]=x,t[54]=d,t[55]=f,t[56]=p,t[57]=S):S=t[57];let C;t[58]!==o||t[59]!==S||t[60]!==m||t[61]!==h||t[62]!==g?(C=(0,Y.jsx)(o,{sideOffset:m,align:h,className:g,children:S}),t[58]=o,t[59]=S,t[60]=m,t[61]=h,t[62]=g,t[63]=C):C=t[63];let w;t[64]!==s||t[65]!==C?(w=(0,Y.jsx)(s,{children:C}),t[64]=s,t[65]=C,t[66]=w):w=t[66];let T;return t[67]!==c||t[68]!==w||t[69]!==_?(T=(0,Y.jsxs)(c,{children:[_,w]}),t[67]=c,t[68]=w,t[69]=_,t[70]=T):T=t[70],T}function mG(e){return(0,Y.jsx)(xl,{value:e.value,title:e.hint,children:e.label},e.value)}var hG=20;function gG(e){let t=(0,kA.c)(24),{entry:n,search:r,density:i,navigate:a}=e,o;t[0]===n.data?.files?o=t[1]:(o=n.data?.files||[],t[0]=n.data?.files,t[1]=o);let s=o,c;t[2]===s?c=t[3]:(c=s.map(yG),t[2]=s,t[3]=c);let l=c,u;t[4]===s?u=t[5]:(u=s.map(vG),t[4]=s,t[5]=u);let d;t[6]!==n.repo||t[7]!==s||t[8]!==a?(d=e=>{e[0]&&s.some(t=>t.name===e[0])&&a(n.repo.path,e[0])},t[6]=n.repo,t[7]=s,t[8]=a,t[9]=d):d=t[9];let f;t[10]!==i||t[11]!==l||t[12]!==u||t[13]!==d?(f={paths:u,gitStatus:l,initialExpansion:`open`,flattenEmptyDirectories:!0,density:i,onSelectionChange:d},t[10]=i,t[11]=l,t[12]=u,t[13]=d,t[14]=f):f=t[14];let{model:p}=CH(f),m,h;t[15]!==p||t[16]!==r?(m=()=>{p.setSearch(r||null)},h=[p,r],t[15]=p,t[16]=r,t[17]=m,t[18]=h):(m=t[17],h=t[18]),(0,b.useEffect)(m,h);let g=TH(p,_G),_=cP[i].itemHeight,v=Math.min(hG,g)*_,y;t[19]===v?y=t[20]:(y={height:v},t[19]=v,t[20]=y);let x;return t[21]!==p||t[22]!==y?(x=(0,Y.jsx)(KM,{model:p,className:`file-tree`,style:y}),t[21]=p,t[22]=y,t[23]=x):x=t[23],x}function _G(e){return e.getVisibleCount()}function vG(e){return e.name}function yG(e){return{path:e.name,status:e.type===`new`?`added`:e.type===`deleted`?`deleted`:e.type.startsWith(`rename`)?`renamed`:`modified`}}function bG(e){let t=(0,kA.c)(24),{entry:n,search:r,density:i,workspace:a,navigate:o}=e,[s,c]=(0,b.useState)(!0),l;t[0]===n.data?.files?l=t[1]:(l=n.data?.files||[],t[0]=n.data?.files,t[1]=l);let u;t[2]===l?u=t[3]:(u=oG(l),t[2]=l,t[3]=u);let d=u,f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Y.jsx)(mj,{className:`disclosure`}),t[4]=f):f=t[4];let p;t[5]===n.repo.name?p=t[6]:(p=(0,Y.jsx)(`span`,{children:n.repo.name}),t[5]=n.repo.name,t[6]=p);let m;t[7]!==n.loading||t[8]!==d?(m=n.loading?(0,Y.jsx)(`span`,{className:`busy-dot`}):(0,Y.jsxs)(`span`,{className:`diff-stat`,children:[(0,Y.jsx)(`span`,{className:`added`,children:d.added?`+${d.added}`:``}),(0,Y.jsx)(`span`,{className:`removed`,children:d.removed?`−${d.removed}`:``})]}),t[7]=n.loading,t[8]=d,t[9]=m):m=t[9];let h;t[10]!==n.repo.path||t[11]!==p||t[12]!==m?(h=(0,Y.jsxs)(Jj,{className:`sidebar-repo-heading`,title:n.repo.path,children:[f,p,m]}),t[10]=n.repo.path,t[11]=p,t[12]=m,t[13]=h):h=t[13];let g;t[14]!==i||t[15]!==n||t[16]!==o||t[17]!==r||t[18]!==a?(g=(0,Y.jsx)(iM,{className:`sidebar-repo-panel`,children:n.error?(0,Y.jsxs)(`p`,{className:`sidebar-error`,children:[(0,Y.jsx)(Nj,{}),n.error,(0,Y.jsx)(bu,{className:`text-button`,onClick:()=>void a.reload(n),children:`Retry`})]}):n.loading&&!n.data?(0,Y.jsxs)(`div`,{className:`tree-skeleton`,"aria-label":`Loading changed files`,children:[(0,Y.jsx)(`i`,{}),(0,Y.jsx)(`i`,{}),(0,Y.jsx)(`i`,{})]}):n.data?.files.length?(0,Y.jsx)(gG,{entry:n,search:r,density:i,navigate:o},n.data.version):(0,Y.jsx)(`p`,{className:`repo-note`,children:`No changes in this comparison.`})}),t[14]=i,t[15]=n,t[16]=o,t[17]=r,t[18]=a,t[19]=g):g=t[19];let _;return t[20]!==s||t[21]!==h||t[22]!==g?(_=(0,Y.jsxs)(Kj,{className:`sidebar-repo`,open:s,onOpenChange:c,children:[h,g]}),t[20]=s,t[21]=h,t[22]=g,t[23]=_):_=t[23],_}function xG(e){let t=(0,kA.c)(47),{workspace:n,density:r,navigate:i}=e,[a,o]=(0,b.useState)(``),s;t[0]===n.entries?s=t[1]:(s=n.entries.some(SG),t[0]=n.entries,t[1]=s);let c=s,l,u,d,f,p,m,h,g;if(t[2]!==r||t[3]!==i||t[4]!==c||t[5]!==a||t[6]!==n){let e=a.trim().toLowerCase();g=n.selected.flatMap(t=>!e||t.repo.name.toLowerCase().includes(e)?[{entry:t,search:``}]:t.data?.files.some(t=>t.name.toLowerCase().includes(e))?[{entry:t,search:a}]:[]),f=`sidebar`,p=`Workspace navigation`;let s;t[15]===n?s=t[16]:(s=(0,Y.jsx)(pG,{workspace:n}),t[15]=n,t[16]=s);let _=n.scanning||c,v;t[17]===n?v=t[18]:(v=()=>void n.open(n.root,!0),t[17]=n,t[18]=v);let y=c||n.scanning?`spinning`:``,b;t[19]===y?b=t[20]:(b=(0,Y.jsx)(uj,{className:y}),t[19]=y,t[20]=b);let x;t[21]!==_||t[22]!==v||t[23]!==b?(x=(0,Y.jsx)(WW,{label:`Rescan and reload changes`,disabled:_,onClick:v,children:b}),t[21]=_,t[22]=v,t[23]=b,t[24]=x):x=t[24],t[25]!==x||t[26]!==s?(m=(0,Y.jsxs)(`div`,{className:`sidebar-top`,children:[s,x]}),t[25]=x,t[26]=s,t[27]=m):m=t[27];let S;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Y.jsx)(Ej,{}),t[28]=S):S=t[28],t[29]===a?h=t[30]:(h=(0,Y.jsxs)(`div`,{className:`sidebar-search search-field`,children:[S,(0,Y.jsx)(jM,{"aria-label":`Filter changed files`,placeholder:`Find a file…`,value:a,onValueChange:o})]}),t[29]=a,t[30]=h),l=`repository-list`,u=`Changed files`,d=n.scanning&&!n.entries.length?(0,Y.jsxs)(`div`,{className:`tree-skeleton`,role:`status`,children:[(0,Y.jsx)(`i`,{}),(0,Y.jsx)(`i`,{}),(0,Y.jsx)(`i`,{}),(0,Y.jsx)(`span`,{children:`Discovering repositories…`})]}):g.map(e=>{let{entry:t,search:a}=e;return(0,Y.jsx)(bG,{entry:t,search:a,density:r,workspace:n,navigate:i},t.repo.path)}),t[2]=r,t[3]=i,t[4]=c,t[5]=a,t[6]=n,t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m,t[13]=h,t[14]=g}else l=t[7],u=t[8],d=t[9],f=t[10],p=t[11],m=t[12],h=t[13],g=t[14];let _;t[31]!==a||t[32]!==g||t[33]!==n.scanning||t[34]!==n.selected.length?(_=!n.scanning&&!g.length&&(0,Y.jsx)(`p`,{className:`repo-note`,children:a?`No matching files.`:n.selected.length?`No changes in the current comparisons.`:`Choose repositories to review.`}),t[31]=a,t[32]=g,t[33]=n.scanning,t[34]=n.selected.length,t[35]=_):_=t[35];let v;t[36]!==l||t[37]!==u||t[38]!==d||t[39]!==_?(v=(0,Y.jsxs)(`nav`,{className:l,"aria-label":u,children:[d,_]}),t[36]=l,t[37]=u,t[38]=d,t[39]=_,t[40]=v):v=t[40];let y;return t[41]!==v||t[42]!==f||t[43]!==p||t[44]!==m||t[45]!==h?(y=(0,Y.jsxs)(`aside`,{className:f,"aria-label":p,children:[m,h,v]}),t[41]=v,t[42]=f,t[43]=p,t[44]=m,t[45]=h,t[46]=y):y=t[46],y}function SG(e){return e.loading}function CG({entry:e,file:t,settings:n,collapsed:r,onCollapse:i}){let[a,o]=(0,b.useState)(``),[s,c]=(0,b.useState)(!1),l=(0,b.useRef)(null),u=(0,b.useRef)(null),d=oG([t]),f=(0,b.useCallback)(async t=>{o(``),c(!0);try{return await tG(`file`,{repo:e.repo.path,name:t.name,oldName:t.prevName||t.name,oldRef:e.data.mergeBase,newRef:e.data.targetRef,expectedHash:t.newObjectId||``})}catch(e){throw o(e instanceof Error?e.message:`Could not expand context.`),e}finally{c(!1)}},[e.repo.path,e.data]);return(0,Y.jsxs)(`div`,{className:`diff-file`,id:iG(e.repo.path,t.name),children:[(0,Y.jsxs)(`button`,{className:`file-heading`,"aria-expanded":!r,onClick:()=>i(!r),children:[(0,Y.jsx)(mj,{className:`disclosure`}),(0,Y.jsx)(bj,{}),(0,Y.jsxs)(`span`,{className:`file-path`,children:[t.prevName&&(0,Y.jsxs)(`span`,{className:`muted`,children:[t.prevName,` → `]}),t.name]}),(0,Y.jsx)(`span`,{className:`file-status`,children:t.type===`new`?`Added`:t.type===`deleted`?`Deleted`:t.type.startsWith(`rename`)?`Renamed`:``}),(0,Y.jsxs)(`span`,{className:`diff-stat`,children:[(0,Y.jsx)(`span`,{className:`added`,children:d.added?`+${d.added}`:``}),(0,Y.jsx)(`span`,{className:`removed`,children:d.removed?`−${d.removed}`:``})]})]}),(0,Y.jsx)(`div`,{className:`file-panel`,"data-collapsed":r||void 0,ref:u,onMouseDownCapture:e=>{let t=e.nativeEvent.composedPath()[0];l.current=t instanceof Element?t:u.current},children:t.hunks.length?(0,Y.jsx)(DA,{fileDiff:t,options:{theme:{light:`pierre-light`,dark:`pierre-dark`},themeType:n.theme,diffStyle:n.layout,overflow:n.wrap?`wrap`:`scroll`,lineDiffType:n.wordDiff,expansionLineCount:n.expansionLines,disableFileHeader:!0,hunkSeparators:`line-info`,collapsed:r,loadDiffFiles:f}}):!r&&(0,Y.jsx)(`p`,{className:`file-note`,children:t.type===`rename-pure`?`File renamed without content changes.`:`No text hunks. Binary content, an empty file, or a file mode change.`})}),(0,Y.jsx)(WH,{open:!!a||s,onOpenChange:e=>!e&&o(``),children:(0,Y.jsx)(XH,{children:(0,Y.jsx)($H,{anchor:()=>l.current||u.current,side:`top`,align:`center`,sideOffset:6,className:`floating`,children:(0,Y.jsx)(rU,{className:`popup context-status`,role:a?`alert`:`status`,children:a?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Nj,{}),(0,Y.jsx)(`span`,{children:a}),(0,Y.jsx)(oU,{className:`text-button`,children:`Dismiss`})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`span`,{className:`busy-dot`}),(0,Y.jsx)(`span`,{children:`Loading the full file…`})]})})})})})]})}var wG=b.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,...o}=e,[s,c]=b.useState(void 0),l=hM(!0)?.disabled||a,u=Di(`fieldset`,e,{ref:t,state:{disabled:l},props:[{"aria-labelledby":s,disabled:l},o]}),d=b.useMemo(()=>({legendId:s,setLegendId:c,disabled:l}),[s,c,l]);return(0,Y.jsx)(mM.Provider,{value:d,children:u})}),TG=b.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{disabled:s,setLegendId:c}=hM(),l=wM(a,c);return Di(`div`,e,{state:{disabled:s},ref:t,props:[{id:l},o]})}),EG=new Map;function DG(e,t){let n=JSON.stringify({locale:VU(e),options:t}),r=EG.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return EG.set(n,i),i}function OG(e,t,n){return e==null?``:DG(t,n).format(e)}var kG=b.createContext(void 0);function AG(){let e=b.useContext(kG);if(e===void 0)throw Error(F(43));return e}var jG={inputValue:()=>null,value:()=>null,...uM},MG=`零〇一二三四五六七八九`,NG=/[٠-٩۰-۹0-9]/g,PG=/[零〇一二三四五六七八九]/g,FG=[`%`,`٪`,`%`,`﹪`],IG=[`‰`,`؉`],LG=/[%٪%﹪]/,RG=/[‰؉]/,zG=/[%٪%﹪]/g,BG=/[‰؉]/g,VG=/[٠-٩۰-۹]/,HG=/[零〇一二三四五六七八九]/,UG=/[0-9٠-٩۰-۹0-9零〇一二三四五六七八九]/;function WG(e){return UG.test(e)}var GG=[`.`,`,`,`.`,`,`,`٫`,`٬`],KG=/\p{Zs}/u,qG=/\p{Cf}/u,JG=/\p{Cf}/gu,YG=[`+`,`+`,`﹢`],XG=[`-`,`−`,`-`,`‒`,`–`,`—`,`﹣`],ZG=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function QG(e,t){let[n,r=`0`]=String(e).split(`e`);return Number(`${n}e${Number(r)+t}`)}var $G=/[-−-‒–—﹣]/gu,eK=/[++﹢]/gu,tK=/[-−-‒–—﹣]/,nK=/[++﹢]/,rK=11111.1;function iK(e,t){return DG(e,t).formatToParts(rK)}function aK(e,t){let n=iK(e,t),r={};n.forEach(e=>{r[e.type]=e.value});let i=`.`;return DG(e).formatToParts(.1).forEach(e=>{e.type===`decimal`&&(i=e.value)}),{...r,decimal:i}}function oK(e,t,n){let r=e.replace(JG,``).trim();r=r.replace($G,`-`).replace(eK,`+`);let i=!1,a=(e,t)=>(t===`-`&&(i=!0),``);r=r.replace(/([+-])\s*$/,a).replace(/^\s*([+-])/,a);let o=t;o===void 0&&(VG.test(r)?o=`ar`:HG.test(r)&&(o=`zh`));let{group:s,decimal:c,currency:l,exponentSeparator:u}=aK(o,n),d=DG(o,n).formatToParts(1).filter(e=>e.type===`unit`).map(e=>ZG(e.value)),f=d.length?new RegExp(d.join(`|`),`g`):null,p=null;s&&(p=/\p{Zs}/u.test(s)?/\p{Zs}/gu:s===`'`||s===`’`?/['’]/g:new RegExp(ZG(s),`g`));let m=[[p,``],[new RegExp(ZG(c),`g`),`.`],[/[.٫]/g,`.`],[/[,٬]/g,``],[l?new RegExp(ZG(l),`g`):null,``],[f,``],[zG,``],[BG,``],[u?new RegExp(ZG(u),`g`):null,`e`],[NG,e=>String(e.charCodeAt(0)%16)],[PG,e=>String(Math.max(MG.indexOf(e)-1,0))]].reduce((e,[t,n])=>t?e.replace(t,n):e,r),h=m.lastIndexOf(`.`);if(h!==-1&&(m=`${m.slice(0,h).replace(/\./g,``)}.${m.slice(h+1).replace(/\./g,``)}`),/^[-+]?Infinity$/i.test(r)||r.includes(`∞`))return null;let g=(i?`-`:``)+m,_=parseFloat(g),v=n?.style,y=v===`unit`&&n?.unit===`percent`,b=LG.test(e)||v===`percent`;return RG.test(e)?_=QG(_,-3):!y&&b&&(_=QG(_,-2)),Number.isFinite(_)?_:null}function sK(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var cK=1e-10,lK=1e-10;function uK(e){return e?.maximumFractionDigits!=null||e?.minimumFractionDigits!=null||e?.maximumSignificantDigits!=null||e?.minimumSignificantDigits!=null||e?.roundingIncrement!=null||e?.roundingMode!=null||e?.roundingPriority!=null}function dK(e,t){if(!Number.isFinite(e))return e;if(!uK(t)){let t=parseFloat(e.toPrecision(15));return Math.abs(t-e)<=Math.min(2**-52*Math.max(1,Math.abs(e)),lK)?t:e}let n=DG(`en-US`,{...t,signDisplay:`auto`,currencySign:`standard`,notation:t.notation===`compact`?`standard`:t.notation,useGrouping:!1}),r=n.format(e),i=oK(r,`en-US`,t);return i===null?e:n.format(i)===r?i:e}function fK(e,t,n,r){let i=Math.abs(n),a=Math.sign(n),o=i*cK*a,s=e-t+o;return r?t+Math.round(s/n)*n:t+(a>0?Math.floor(s/i):Math.ceil(s/i))*i}function pK(e,t,n,r,i,a,o,s,c){if(e===null)return e;let l=e;if(t!=null&&o&&t!==0&&(l=fK(l,s||n===-(2**53-1)?i:n,t,s)),c&&(l=sK(l,n,r)),t==null&&!uK(a))return l;let u=dK(l,a);return c?sK(u,n,r):u}var mK=b.forwardRef(function(e,t){let{id:n,min:r,max:i,smallStep:a=.1,step:o=1,largeStep:s=10,required:c=!1,disabled:l=!1,readOnly:u=!1,form:d,name:f,defaultValue:p=null,value:m,onValueChange:h,onValueCommitted:g,allowWheelScrub:_=!1,snapOnStep:v=!1,allowOutOfRange:y=!1,format:x,locale:S,render:C,className:w,inputRef:T,style:E,...D}=e,{setDirty:O,validityData:k,disabled:A,setFilled:j,name:M,state:P,validation:F}=pM(),{clearErrors:I}=_M(),L=A||l,R=M??f,z=o===`any`?1:o,[B,V]=b.useState(!1),H=r??-(2**53-1),U=i??2**53-1,ee=r??0,te=x?.style,ne=b.useRef(null),W=ln(T,F.inputRef),ie=CM({id:n}),[ae,G]=jc({controlled:m,default:p,name:`NumberField`,state:`value`}),oe=hn(ae);N(()=>{j(ae!==null)},[j,ae]);let se=Po(),ce=hn(x),le=b.useRef(!1),ue=X((e,t)=>{le.current=!1,g?.(e,t)}),de=b.useRef(!0),fe=b.useRef(null),[pe,me]=b.useState(()=>OG(ae,S,x)),[he,ge]=b.useState(`numeric`),_e=X(()=>{let e=iK(S,x),t=new Set(GG),n=e=>e.forEach(e=>t.add(e)),r=e.find(e=>e.type===`decimal`)?.value??aK(S,x).decimal;t.add(r),e.forEach(e=>{e.type!==`integer`&&e.type!==`fraction`&&e.type!==`exponentInteger`&&e.type!==`compact`&&(n(Array.from(e.value)),KG.test(e.value)&&t.add(` `))});let i=te===`percent`||te===`unit`&&x?.unit===`percent`,a=te===`percent`||te===`unit`&&x?.unit===`permille`;return i&&n(FG),a&&n(IG),n(YG),(H<0||y)&&n(XG),t}),ve=X(e=>e?.altKey?a:e?.shiftKey?s:z),ye=X((e,t)=>{let n=t.event,r=t.direction,i=t.reason.startsWith(`input-`)||t.reason===`none`,a=!y||!i,o=pK(e,r?ve(n)*r:void 0,H,U,ee,ce.current,v,n?.altKey??!1,a),s=o!==ae||i&&(e!==ae||de.current===!1);if(s){if(h?.(o,t),t.isCanceled)return!1;G(o),O(o!==k.initialValue),le.current=!0}return fe.current=o,de.current&&me(OG(o,S,x)),se(),s}),be=X((e,{direction:t,currentValue:n,event:r,reason:i})=>{let a=n??oe.current,o=r;return typeof a==`number`?ye(a+e*t,J(i,o,void 0,{direction:t})):ye(0,J(i,o))});N(function(){if(!de.current)return;let e=OG(ae,S,x);e!==pe&&me(e)}),N(function(){if(!re)return;let e=`text`;H>=0&&(e=`decimal`),ge(e)},[H]);let xe=X(()=>{let e=ne.current;if(!e)return;let t=e.value.length;e.setSelectionRange(t,t),e.focus()});b.useEffect(function(){let e=ne.current;if(L||u||!_||!e)return;function t(e){if(e.ctrlKey||He(En(ne.current))!==ne.current)return;let t=Math.abs(e.deltaX)>Math.abs(e.deltaY),n=e.shiftKey&&t?e.deltaX:e.deltaY;if(n===0||!e.shiftKey&&t)return;e.preventDefault(),de.current=!0;let r=ve(e);be(r,{direction:n>0?-1:1,event:e,reason:`wheel`})&&ue(fe.current,en(qt,e))}return sn(e,`wheel`,t)},[_,be,L,u,ve,ue,fe,oe]);let Se=b.useMemo(()=>({...P,disabled:L,readOnly:u,required:c,value:ae,inputValue:pe,scrubbing:B}),[P,L,u,c,ae,pe,B]),Ce=b.useMemo(()=>({inputRef:ne,focusInput:xe,minWithDefault:H,maxWithDefault:U,id:ie,setValue:ye,incrementValue:be,getStepAmount:ve,allowInputSyncRef:de,formatOptionsRef:ce,valueRef:oe,lastChangedValueRef:fe,hasPendingCommitRef:le,name:R,nameProp:f,inputMode:he,getAllowedNonNumericKeys:_e,min:r,max:i,setInputValue:me,locale:S,setIsScrubbing:V,state:Se,onValueCommitted:ue}),[ne,xe,H,U,ie,ye,be,ve,ce,oe,R,f,he,_e,r,i,me,S,Se,ue]),we=Di(`div`,e,{ref:t,state:Se,props:D,stateAttributesMapping:jG});return(0,Y.jsxs)(kG.Provider,{value:Ce,children:[we,(0,Y.jsx)(`input`,{...F.getValidationProps(L,{onFocus(){xe()},onChange(e){if(e.nativeEvent.defaultPrevented||L||u)return;let t=e.currentTarget.valueAsNumber,n=Number.isNaN(t)?null:t,r=J(Ot,e.nativeEvent);ye(n,r),I(R),F.change(fe.current??n)}}),ref:W,type:`number`,form:d,name:R,value:ae??``,min:r,max:i,step:o,disabled:L,readOnly:u,required:c,"aria-hidden":!0,tabIndex:-1,style:R?kn:On,suppressHydrationWarning:!0})]})}),hK=b.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=AG();return Di(`div`,e,{ref:t,state:o,props:[{role:`group`},a],stateAttributesMapping:jG})}),gK=0,_K=class e extends B{static create(){return new e}start(e,t){this.clear(),this.currentId=setInterval(()=>{t()},e)}clear=()=>{this.currentId!==gK&&(clearInterval(this.currentId),this.currentId=gK)}};function vK(){let e=S(_K.create).current;return R(e.disposeEffect),e}var yK=60,bK=400,xK=8,SK=50,CK=3;function wK(e){return e===`touch`||e===`pen`}function TK(e){let{disabled:t,tick:n,onStop:r,tickDelay:i=yK,startDelay:a=bK,scrollDistance:o=xK,elementRef:s}=e,c=V(),l=vK(),u=V(),d=b.useRef(!1),f=b.useRef(0),p=b.useRef({x:0,y:0}),m=b.useRef(!1),h=b.useRef(!1),g=b.useRef(``),_=b.useRef(A),v=b.useRef(A),y=X(()=>{u.clear(),c.clear(),l.clear(),_.current(),f.current=0});function x(e){y();let t=s.current;if(!t)return;let o=ye(t);function u(e){e.preventDefault()}if(_.current=sn(o,`contextmenu`,u),v.current(),v.current=sn(o,`pointerup`,e=>{d.current=!1,y(),r?.(e)},{once:!0}),!n(e)){y();return}c.start(a,()=>{l.start(i,()=>{n(e)||y()})})}return b.useEffect(()=>()=>{y(),v.current()},[y]),b.useEffect(()=>{t&&(d.current=!1,m.current=!1,g.current=``,y())},[t,y]),{pointerHandlers:{onTouchStart(){m.current=!0},onTouchEnd(){m.current=!1},onPointerDown(e){e.defaultPrevented||e.button||t||(g.current=e.pointerType,h.current=!1,d.current=!0,p.current={x:e.clientX,y:e.clientY},wK(e.pointerType)?u.start(SK,()=>{let t=f.current;f.current=0,d.current&&t<CK?(x(e.nativeEvent),h.current=!0):(h.current=!1,y())}):(e.preventDefault(),x(e.nativeEvent)))},onPointerUp(e){wK(e.pointerType)&&(d.current=!1)},onPointerMove(e){if(t||!wK(e.pointerType)||!d.current)return;f.current+=1;let{x:n,y:r}=p.current,i=n-e.clientX,a=r-e.clientY;i**2+a**2>o**2&&y()},onMouseEnter(e){e.defaultPrevented||t||!d.current||m.current||wK(g.current)||x(e.nativeEvent)},onMouseLeave(){m.current||y()},onMouseUp(){m.current||y()}},shouldSkipClick:X(e=>e.defaultPrevented?!0:wK(g.current)?h.current:e.detail!==0)}}var EK={WebkitUserSelect:`none`,userSelect:`none`};function DK(e,t,n){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{allowInputSyncRef:l,formatOptionsRef:u,getStepAmount:d,id:f,incrementValue:p,inputRef:m,focusInput:h,maxWithDefault:g,minWithDefault:_,setValue:v,state:y,valueRef:b,locale:x,lastChangedValueRef:S,onValueCommitted:C}=AG(),{disabled:w,readOnly:T,value:E,inputValue:D}=y,O=a||w||E!=null&&(n?E>=g:E<=_),k=n?Ft:It;function A(e){let t=!l.current;if(l.current=!0,!t){S.current=b.current;return}let n=oK(D,x,u.current);if(n!==null){let t=J(k,e);v(n,t),t.isCanceled||(b.current=n)}}let{pointerHandlers:j,shouldSkipClick:M}=TK({disabled:O||T,elementRef:m,tick(e){let t=d(e);return p(t,{direction:n?1:-1,event:e,reason:k})},onStop(e){let t=S.current??b.current;C(t,en(k,e))}}),N={disabled:O,"aria-label":n?`Increase`:`Decrease`,"aria-controls":f,tabIndex:-1,style:EK,...j,onClick(e){let t=O||T;if(e.defaultPrevented||t||M(e))return;A(e.nativeEvent);let r=d(e),i=b.current;p(r,{direction:n?1:-1,event:e.nativeEvent,reason:k});let a=S.current??b.current;a!==i&&C(a,en(k,e.nativeEvent))},onPointerDown(e){e.defaultPrevented||T||e.button||O||(A(e.nativeEvent),S.current=null,wK(e.pointerType)||h(),j.onPointerDown(e))}},{getButtonProps:P,buttonRef:F}=hl({disabled:O||T,native:o,focusableWhenDisabled:!0}),I={...y,disabled:O};return Di(`button`,e,{ref:[t,F],state:I,props:[N,c,P],stateAttributesMapping:jG})}var OK=b.forwardRef(function(e,t){return DK(e,t,!0)}),kK=b.forwardRef(function(e,t){return DK(e,t,!1)}),AK=new Set([`Backspace`,`Delete`,`ArrowLeft`,`ArrowRight`,`Tab`,`Enter`,`Escape`]),jK=b.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{allowInputSyncRef:o,formatOptionsRef:s,getAllowedNonNumericKeys:c,getStepAmount:l,id:u,incrementValue:d,inputMode:f,max:p,min:m,name:h,nameProp:g,setValue:_,state:v,setInputValue:y,locale:x,inputRef:S,onValueCommitted:C,lastChangedValueRef:w,hasPendingCommitRef:T,valueRef:E}=AG(),{disabled:D,readOnly:O,required:k,value:A,inputValue:j}=v,{clearErrors:M}=_M(),{validationMode:P,setTouched:F,setFocused:I,invalid:L,shouldValidateOnChange:R,validation:z}=pM(),{labelId:B}=yM(),V=b.useRef(!1),H=b.useRef(null);return kM(S,u,A,void 0,!D,g),N(()=>{if(H.current!=null){let e=H.current;H.current=null,S.current?.setSelectionRange(e,e)}}),tu(A,()=>{if(M(h),V.current&&!R()){V.current=!1;return}z.change(A)}),Di(`input`,e,{ref:[t,S],state:v,props:[{id:u,required:k,disabled:D,readOnly:O,inputMode:f,value:j,type:`text`,autoComplete:`off`,autoCorrect:`off`,spellCheck:`false`,"aria-roledescription":`Number field`,"aria-invalid":!D&&L?!0:void 0,"aria-labelledby":B,suppressHydrationWarning:!0,onFocus(e){e.defaultPrevented||D||I(!0)},onBlur(e){if(e.defaultPrevented||D||(F(!0),I(!1),O))return;let t=!o.current,n=T.current;if(o.current=!0,j.trim()===``){let r=J(Rt,e.nativeEvent);if(_(null,r),r.isCanceled)return;P===`onBlur`&&z.commit(null),(t||n||A!==null)&&C(null,en(Rt,e.nativeEvent));return}let r=s.current,i=oK(j,x,r);if(i===null)return;let a=uK(r),c;c=!t&&!a?A:a?dK(i,r):i;let l=en(zt,e.nativeEvent),u=A!==c,d=t||u||n,f=c;if(u){let t=J(zt,e.nativeEvent);if(V.current=!0,_(c,t),t.isCanceled){V.current=!1;return}f=w.current,f===A&&(V.current=!1)}P===`onBlur`&&z.commit(f),d&&C(f,l);let p=OG(f,x,r);j!==p&&y(p)},onChange(e){if(e.nativeEvent.defaultPrevented)return;o.current=!1;let t=e.currentTarget.value;if(t.trim()===``){y(t),_(null,J(Rt,e.nativeEvent));return}let n=c();if(!Array.from(t).every(e=>WG(e)||tK.test(e)||n.has(e)||qG.test(e)))return;let r=oK(t,x,s.current);y(t),r!==null&&_(r,J(Lt,e.nativeEvent))},onKeyDown(e){if(e.defaultPrevented||O||D)return;let t=e.nativeEvent,n=!o.current,r=c(),i=r.has(e.key),{decimal:a,currency:u,percentSign:f}=aK(x,s.current),h=e.currentTarget.selectionStart,g=e.currentTarget.selectionEnd,v=h===0&&g===j.length,y=e=>h!=null&&g!=null&&e>=h&&e<g;[[tK,$G],[nK,eK]].forEach(([t,n])=>{if(t.test(e.key)&&Array.from(r).some(e=>t.test(e))){let e=j.search(n),t=e!==-1&&y(e);i=!(tK.test(j)||nK.test(j))||v||t}}),[a,u,f].forEach(t=>{if(e.key===t){let e=j.indexOf(t),n=y(e);i=e===-1||v||n}});let b=AK.has(e.key),S=e.key===`ArrowUp`||e.key===`ArrowDown`;if(e.which===229||e.altKey&&!S||e.ctrlKey||e.metaKey||i||WG(e.key)||b)return;let T=null;if(e.key===`Home`&&m!=null?T=m:e.key===`End`&&p!=null&&(T=p),e.key.length>1&&!S&&T===null)return;let k=n?oK(j,x,s.current):null,A=l(e);e.preventDefault(),e.stopPropagation();let M=en(Gt,t),N=!1;(S||T!==null)&&(o.current=!0),S?(n||(w.current=E.current),N=d(A,{direction:e.key===`ArrowUp`?1:-1,currentValue:k,event:t,reason:Gt})):T!==null&&(N=_(T,J(Gt,t))),N&&C(w.current,M)},onPaste(e){if(e.defaultPrevented||O||D)return;let t=``;try{t=e.clipboardData?.getData(`text/plain`)??``}catch{return}e.preventDefault();let n=e.currentTarget,r=n.selectionStart,i=n.selectionEnd,a=j.slice(0,r)+t+j.slice(i),c=oK(a,x,s.current);c!==null&&(o.current=!1,H.current=r+t.length,_(c,J(Bt,e.nativeEvent)),y(a))}},a,e=>z.getValidationProps(D,e)],stateAttributesMapping:jG})}),MK=b.createContext(void 0);function NK(){let e=b.useContext(MK);if(e===void 0)throw Error(F(63));return e}var PK=`data-checked`,FK=`data-unchecked`,IK={...uM,checked(e){return e?{[PK]:``}:{[FK]:``}}},LK=b.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i,"aria-labelledby":a,form:o,id:s,inputRef:c,name:l,nativeButton:u=!1,onCheckedChange:d,readOnly:f=!1,required:p=!1,disabled:m=!1,render:h,uncheckedValue:g,value:_,style:v,...y}=e,{clearErrors:x}=_M(),{state:S,setTouched:C,setDirty:w,validityData:T,setFilled:E,setFocused:D,validationMode:O,disabled:k,name:A,validation:j}=pM(),{labelId:P}=yM(),F=k||m,I=A??l,L=b.useRef(null),R=ln(L,c,j.inputRef),z=b.useRef(null),B=Js(),V=CM({id:s}),H=u?void 0:V,[U,ee]=jc({controlled:n,default:!!i,name:`Switch`,state:`checked`});kM(z,B,U,void 0,!F,l),N(()=>{E(U)},[U,E]),tu(U,()=>{x(I),w(U!==T.initialValue),j.change(U)});let{getButtonProps:te,buttonRef:ne}=hl({disabled:F,native:u}),W=bM(a,P,L,!u,H),re={id:u?V:B,role:`switch`,"aria-checked":U,"aria-readonly":f||void 0,"aria-required":p||void 0,"aria-labelledby":W,onFocus(){F||D(!0)},onBlur(){let e=L.current;e&&!F&&(C(!0),D(!1),O===`onBlur`&&j.commit(e.checked))},onClick(e){if(f||F)return;e.preventDefault();let t=L.current;t&&ml(t,e)}},ie={...j.getValidationProps(F),checked:U,disabled:F,form:o,id:H,name:I,required:p,style:I?kn:On,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:R,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(f){e.preventDefault();return}let t=e.currentTarget.checked,n=J(Ot,e.nativeEvent);d?.(t,n),!n.isCanceled&&ee(t)},onClick(e){e.stopPropagation()},onFocus(){z.current?.focus()},..._===void 0?M:{value:_}},ae=b.useMemo(()=>({...S,checked:U,disabled:F,readOnly:f,required:p}),[S,U,F,f,p]),G=Di(`span`,e,{state:ae,ref:[t,z,ne],props:[re,y,te,e=>j.getValidationProps(F,e)],stateAttributesMapping:IK});return(0,Y.jsxs)(MK.Provider,{value:ae,children:[G,!U&&I&&g!==void 0&&(0,Y.jsx)(`input`,{type:`hidden`,form:o,name:I,value:g,disabled:F}),(0,Y.jsx)(`input`,{...ie,suppressHydrationWarning:!0})]})}),RK=b.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return Di(`span`,e,{state:NK(),ref:t,stateAttributesMapping:IK,props:a})});function zK(e){let t=(0,kA.c)(8),{label:n,hint:r,children:i}=e,a;t[0]===r?a=t[1]:(a=r&&(0,Y.jsx)(`small`,{children:r}),t[0]=r,t[1]=a);let o;t[2]!==n||t[3]!==a?(o=(0,Y.jsxs)(`span`,{className:`setting-text`,children:[n,a]}),t[2]=n,t[3]=a,t[4]=o):o=t[4];let s;return t[5]!==i||t[6]!==o?(s=(0,Y.jsxs)(`div`,{className:`setting`,children:[o,i]}),t[5]=i,t[6]=o,t[7]=s):s=t[7],s}function BK(e){let t=(0,kA.c)(11),{label:n,value:r,options:i,onChange:a}=e,o;t[0]===r?o=t[1]:(o=[r],t[0]=r,t[1]=o);let s;t[2]===a?s=t[3]:(s=e=>{e[0]&&a(e[0])},t[2]=a,t[3]=s);let c;t[4]===i?c=t[5]:(c=i.map(VK),t[4]=i,t[5]=c);let l;return t[6]!==n||t[7]!==o||t[8]!==s||t[9]!==c?(l=(0,Y.jsx)(fl,{className:`segmented`,"aria-label":n,value:o,onValueChange:s,children:c}),t[6]=n,t[7]=o,t[8]=s,t[9]=c,t[10]=l):l=t[10],l}function VK(e){return(0,Y.jsx)(xl,{value:e.value,children:e.label},e.value)}function HK(e){let t=(0,kA.c)(20),{label:n,value:r,min:i,max:a,step:o,onChange:s}=e,c;t[0]===s?c=t[1]:(c=e=>e!==null&&s(e),t[0]=s,t[1]=c);let l=`Fewer ${n}`,u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Y.jsx)(Dj,{}),t[2]=u):u=t[2];let d;t[3]===l?d=t[4]:(d=(0,Y.jsx)(kK,{"aria-label":l,children:u}),t[3]=l,t[4]=d);let f;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Y.jsx)(jK,{}),t[5]=f):f=t[5];let p=`More ${n}`,m;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Y.jsx)(Oj,{}),t[6]=m):m=t[6];let h;t[7]===p?h=t[8]:(h=(0,Y.jsx)(OK,{"aria-label":p,children:m}),t[7]=p,t[8]=h);let g;t[9]!==d||t[10]!==h?(g=(0,Y.jsxs)(hK,{className:`counter-group`,children:[d,f,h]}),t[9]=d,t[10]=h,t[11]=g):g=t[11];let _;return t[12]!==n||t[13]!==a||t[14]!==i||t[15]!==o||t[16]!==c||t[17]!==g||t[18]!==r?(_=(0,Y.jsx)(mK,{className:`counter`,"aria-label":n,value:r,min:i,max:a,step:o,onValueCommitted:c,children:g}),t[12]=n,t[13]=a,t[14]=i,t[15]=o,t[16]=c,t[17]=g,t[18]=r,t[19]=_):_=t[19],_}function UK(e){let t=(0,kA.c)(79),{settings:n,onChange:r}=e,i;t[0]===n.ignore?i=t[1]:(i=n.ignore.join(`, `),t[0]=n.ignore,t[1]=i);let[a,o]=(0,b.useState)(i),s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Y.jsx)(bu,{}),t[2]=s):s=t[2];let c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Y.jsx)(iu,{render:s,className:`icon-button`,"aria-label":`Settings`,children:(0,Y.jsx)(Cj,{})}),t[3]=c):c=t[3];let l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Y.jsx)(wl,{className:`dialog-backdrop`}),t[4]=l):l=t[4];let u,d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Y.jsxs)(`header`,{className:`settings-header`,children:[(0,Y.jsx)(Mj,{}),(0,Y.jsx)($l,{children:`Settings`})]}),d=(0,Y.jsx)(El,{className:`muted`,children:`These apply to every tab. What each tab compares stays with the tab.`}),t[5]=u,t[6]=d):(u=t[5],d=t[6]);let f;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Y.jsx)(TG,{className:`settings-legend`,children:`Appearance`}),t[7]=f):f=t[7];let p;t[8]===r?p=t[9]:(p=e=>r({theme:e}),t[8]=r,t[9]=p);let m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=[{value:`system`,label:`System`},{value:`light`,label:`Light`},{value:`dark`,label:`Dark`}],t[10]=m):m=t[10];let h;t[11]!==n.theme||t[12]!==p?(h=(0,Y.jsx)(zK,{label:`Theme`,children:(0,Y.jsx)(BK,{label:`Theme`,value:n.theme,onChange:p,options:m})}),t[11]=n.theme,t[12]=p,t[13]=h):h=t[13];let g;t[14]===r?g=t[15]:(g=e=>r({layout:e}),t[14]=r,t[15]=g);let _;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(_=[{value:`unified`,label:`Unified`},{value:`split`,label:`Split`}],t[16]=_):_=t[16];let v;t[17]!==n.layout||t[18]!==g?(v=(0,Y.jsx)(zK,{label:`Diff layout`,children:(0,Y.jsx)(BK,{label:`Diff layout`,value:n.layout,onChange:g,options:_})}),t[17]=n.layout,t[18]=g,t[19]=v):v=t[19];let y;t[20]===r?y=t[21]:(y=e=>r({wrap:e}),t[20]=r,t[21]=y);let x;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Y.jsx)(RK,{className:`switch-thumb`}),t[22]=x):x=t[22];let S;t[23]!==n.wrap||t[24]!==y?(S=(0,Y.jsx)(zK,{label:`Wrap long lines`,children:(0,Y.jsx)(LK,{className:`switch`,checked:n.wrap,onCheckedChange:y,children:x})}),t[23]=n.wrap,t[24]=y,t[25]=S):S=t[25];let C;t[26]===r?C=t[27]:(C=e=>r({density:e}),t[26]=r,t[27]=C);let w;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(w=[{value:`compact`,label:`Compact`},{value:`default`,label:`Default`},{value:`relaxed`,label:`Relaxed`}],t[28]=w):w=t[28];let T;t[29]!==n.density||t[30]!==C?(T=(0,Y.jsx)(zK,{label:`Sidebar density`,hint:`Row height in the changed file trees`,children:(0,Y.jsx)(BK,{label:`Sidebar density`,value:n.density,onChange:C,options:w})}),t[29]=n.density,t[30]=C,t[31]=T):T=t[31];let E;t[32]!==h||t[33]!==v||t[34]!==S||t[35]!==T?(E=(0,Y.jsxs)(wG,{className:`settings-group`,children:[f,h,v,S,T]}),t[32]=h,t[33]=v,t[34]=S,t[35]=T,t[36]=E):E=t[36];let D;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,Y.jsx)(TG,{className:`settings-legend`,children:`Diffs`}),t[37]=D):D=t[37];let O;t[38]===r?O=t[39]:(O=e=>r({wordDiff:e}),t[38]=r,t[39]=O);let k;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(k=[{value:`word-alt`,label:`Words`},{value:`char`,label:`Characters`},{value:`none`,label:`Off`}],t[40]=k):k=t[40];let A;t[41]!==n.wordDiff||t[42]!==O?(A=(0,Y.jsx)(zK,{label:`Highlight changes within a line`,children:(0,Y.jsx)(BK,{label:`Highlight changes within a line`,value:n.wordDiff,onChange:O,options:k})}),t[41]=n.wordDiff,t[42]=O,t[43]=A):A=t[43];let j;t[44]===r?j=t[45]:(j=e=>r({expansionLines:e}),t[44]=r,t[45]=j);let M;t[46]!==n.expansionLines||t[47]!==j?(M=(0,Y.jsx)(zK,{label:`Context lines per expansion`,hint:`How much surrounding code each expand reveals`,children:(0,Y.jsx)(HK,{label:`context lines`,value:n.expansionLines,min:5,max:200,step:5,onChange:j})}),t[46]=n.expansionLines,t[47]=j,t[48]=M):M=t[48];let N;t[49]!==A||t[50]!==M?(N=(0,Y.jsxs)(wG,{className:`settings-group`,children:[D,A,M]}),t[49]=A,t[50]=M,t[51]=N):N=t[51];let P;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,Y.jsx)(TG,{className:`settings-legend`,children:`Discovery`}),t[52]=P):P=t[52];let F;t[53]===r?F=t[54]:(F=e=>r({scanDepth:e}),t[53]=r,t[54]=F);let I;t[55]!==n.scanDepth||t[56]!==F?(I=(0,Y.jsx)(zK,{label:`Search depth`,hint:`Directory levels below a workspace folder`,children:(0,Y.jsx)(HK,{label:`levels`,value:n.scanDepth,min:1,max:16,step:1,onChange:F})}),t[55]=n.scanDepth,t[56]=F,t[57]=I):I=t[57];let L;t[58]===r?L=t[59]:(L=e=>r({scanBudget:e}),t[58]=r,t[59]=L);let R;t[60]!==n.scanBudget||t[61]!==L?(R=(0,Y.jsx)(zK,{label:`Directory budget`,hint:`Stop searching after this many directories`,children:(0,Y.jsx)(HK,{label:`directories`,value:n.scanBudget,min:100,max:2e5,step:1e3,onChange:L})}),t[60]=n.scanBudget,t[61]=L,t[62]=R):R=t[62];let z;t[63]!==a||t[64]!==r?(z=()=>r({ignore:a.split(`,`).map(WK).filter(Boolean)}),t[63]=a,t[64]=r,t[65]=z):z=t[65];let B;t[66]!==a||t[67]!==z?(B=(0,Y.jsx)(zK,{label:`Skip these folders`,hint:`Added to the built-in list of dependency and cache folders`,children:(0,Y.jsx)(jM,{className:`input`,"aria-label":`Skip these folders`,placeholder:`target, Build`,value:a,onValueChange:o,onBlur:z})}),t[66]=a,t[67]=z,t[68]=B):B=t[68];let V;t[69]!==I||t[70]!==R||t[71]!==B?(V=(0,Y.jsxs)(wG,{className:`settings-group`,children:[P,I,R,B]}),t[69]=I,t[70]=R,t[71]=B,t[72]=V):V=t[72];let H;t[73]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,Y.jsx)(`p`,{className:`popup-note`,children:`Discovery never walks inside a repository, so .gitignore never applies. Changes here take effect on the next rescan.`}),t[73]=H):H=t[73];let U;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Y.jsx)(`div`,{className:`settings-actions`,children:(0,Y.jsx)(Tl,{className:`primary-button`,children:`Done`})}),t[74]=U):U=t[74];let ee;return t[75]!==E||t[76]!==N||t[77]!==V?(ee=(0,Y.jsxs)(Ql,{children:[c,(0,Y.jsxs)(Pl,{children:[l,(0,Y.jsxs)(Ml,{className:`settings-dialog`,children:[u,d,E,N,V,H,U]})]})]}),t[75]=E,t[76]=N,t[77]=V,t[78]=ee):ee=t[78],ee}function WK(e){return e.trim()}var GK=/[\\/]+/;function KK(e){return e.split(GK).filter(Boolean)}function qK(e,t){let n=KK(e.root),r=n.at(-1)||e.root,i=t.some(t=>t.root!==e.root&&(KK(t.root).at(-1)||``)===r)&&n.length>1?`${n.at(-2)}/${r}`:r,a=t.filter(t=>t.root===e.root);if(a.length<2)return i;let o=a.findIndex(t=>t.id===e.id);return o>0?`${i} ${o+1}`:i}function JK(){let[e,t]=(0,b.useState)(null),[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)([]),c=(0,b.useRef)(null),l=(0,b.useRef)(Promise.resolve()),u=(0,b.useRef)(new Map),d=(0,b.useRef)(void 0),f=(0,b.useCallback)(e=>{c.current=e,t(e)},[]),p=(0,b.useCallback)(e=>{let t=l.current.then(()=>nG(`state`,e));return l.current=t.then(()=>{},()=>{}),t.then(e=>(f(e),e),e=>{throw r(e.message),e})},[f]),m=(0,b.useCallback)(async e=>{let t=await p(e),n=t.activeTab;return n&&s(e=>e.includes(n)?e:[...e,n]),t},[p]);(0,b.useEffect)(()=>{let e=!0;return tG(`state`).then(t=>{e&&(f(t),t.activeTab&&s([t.activeTab]))}).catch(t=>e&&r(t.message)),()=>{e=!1}},[f]);let h=(0,b.useCallback)(()=>{clearTimeout(d.current);let e=[...u.current];u.current.clear();for(let[t,n]of e)m({op:`tab`,id:t,...n}).catch(()=>{})},[m]);(0,b.useEffect)(()=>()=>clearTimeout(d.current),[]);let g=(0,b.useCallback)((e,t)=>{let n=u.current.get(e);u.current.set(e,{...n,...t,...n?.repos||t.repos?{repos:{...n?.repos,...t.repos}}:{}}),clearTimeout(d.current),d.current=setTimeout(h,400)},[h]),_=(0,b.useCallback)(e=>{s(t=>t.includes(e)?t:[...t,e]),t(t=>t&&{...t,activeTab:e}),p({op:`activate`,id:e}).catch(()=>{})},[p]),v=(0,b.useCallback)(e=>{t(t=>t&&{...t,settings:{...t.settings,...e}}),p({op:`settings`,settings:e}).catch(()=>{})},[p]),y=(0,b.useCallback)(async()=>{a(!0),r(``);try{let e=(c.current?.tabs||[]).find(e=>e.id===c.current?.activeTab),t=await tG(`choose-directory`,e?{path:e.root}:{});t.path&&await m({op:`open`,root:t.path})}catch(e){r(e instanceof Error?e.message:`Could not open a folder.`)}finally{a(!1)}},[m]),x=(0,b.useCallback)(e=>{s(t=>t.filter(t=>t!==e)),m({op:`close`,id:e}).catch(()=>{})},[m]),S=(0,b.useCallback)(e=>void m({op:`duplicate`,id:e}).catch(()=>{}),[m]),C=(0,b.useCallback)(()=>void m({op:`reopen`}).catch(()=>{}),[m]);return{settings:e?.settings,tabs:e?.tabs||[],recent:e?.recent||[],activeTab:e?.activeTab||null,ready:e!==null,visited:o,error:n,browsing:i,activate:_,browse:y,close:x,duplicate:S,reopen:C,saveTab:g,setSettings:v}}var YK={workerFactory:()=>new AA};function XK(e){let t=(0,kA.c)(31),{store:n,settings:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={weight:`duotone`,size:16},t[0]=i):i=t[0];let a;t[1]===n?a=t[2]:(a=n.tabs.map(e=>{let t=qK(e,n.tabs);return(0,Y.jsxs)($u,{children:[(0,Y.jsxs)(td,{render:(0,Y.jsx)(`span`,{className:`tab`}),children:[(0,Y.jsx)(mu,{className:`tab-label`,value:e.id,title:e.root,children:t}),(0,Y.jsx)(bu,{className:`tab-close`,"aria-label":`Close ${t}`,onClick:()=>n.close(e.id),children:(0,Y.jsx)(Pj,{})})]}),(0,Y.jsx)(Pu,{children:(0,Y.jsx)(nd,{className:`floating`,children:(0,Y.jsxs)(ju,{className:`popup menu`,children:[(0,Y.jsxs)(Au,{className:`menu-item`,onClick:()=>n.duplicate(e.id),children:[(0,Y.jsx)(yj,{}),`Duplicate tab`]}),(0,Y.jsxs)(Au,{className:`menu-item`,onClick:()=>n.close(e.id),children:[(0,Y.jsx)(Pj,{}),`Close tab`]})]})})})]},e.id)}),t[1]=n,t[2]=a);let o;t[3]===a?o=t[4]:(o=(0,Y.jsx)(vu,{className:`tab-list`,"aria-label":`Open workspaces`,children:a}),t[3]=a,t[4]=o);let s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Y.jsx)(yu,{orientation:`vertical`,className:`tab-separator`}),t[5]=s):s=t[5];let c;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Y.jsx)(bu,{}),t[6]=c):c=t[6];let l;t[7]===n?l=t[8]:(l=()=>void n.browse(),t[7]=n,t[8]=l);let u;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Y.jsx)(kj,{}),t[9]=u):u=t[9];let d;t[10]!==n.browsing||t[11]!==l?(d=(0,Y.jsx)(ec,{render:c,className:`tab-new`,"aria-label":`Open a workspace folder`,disabled:n.browsing,onClick:l,children:u}),t[10]=n.browsing,t[11]=l,t[12]=d):d=t[12];let f;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Y.jsx)(ic,{children:(0,Y.jsx)(Dc,{sideOffset:6,children:(0,Y.jsx)(Oc,{className:`tooltip`,children:`Open a workspace folder`})})}),t[13]=f):f=t[13];let p;t[14]===d?p=t[15]:(p=(0,Y.jsxs)(Ks,{children:[d,f]}),t[14]=d,t[15]=p);let m;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Y.jsx)(`div`,{className:`push`}),t[16]=m):m=t[16];let h;t[17]===n.error?h=t[18]:(h=n.error&&(0,Y.jsx)(`span`,{className:`tab-bar-error`,role:`alert`,children:n.error}),t[17]=n.error,t[18]=h);let g;t[19]!==n.recent||t[20]!==n.reopen?(g=!!n.recent.length&&(0,Y.jsx)(WW,{label:`Reopen ${qK(n.recent[0],n.recent)}`,onClick:n.reopen,children:(0,Y.jsx)(sj,{})}),t[19]=n.recent,t[20]=n.reopen,t[21]=g):g=t[21];let _;t[22]!==r||t[23]!==n.setSettings?(_=(0,Y.jsx)(UK,{settings:r,onChange:n.setSettings}),t[22]=r,t[23]=n.setSettings,t[24]=_):_=t[24];let v;return t[25]!==p||t[26]!==h||t[27]!==g||t[28]!==_||t[29]!==o?(v=(0,Y.jsx)(aj.Provider,{value:i,children:(0,Y.jsxs)(`div`,{className:`tab-bar`,children:[o,s,p,m,h,g,_]})}),t[25]=p,t[26]=h,t[27]=g,t[28]=_,t[29]=o,t[30]=v):v=t[30],v}function ZK(e){let t=(0,kA.c)(112),{tab:n,settings:r,setSettings:i,saveTab:a}=e,o;t[0]!==a||t[1]!==n.id?(o=e=>a(n.id,e),t[0]=a,t[1]=n.id,t[2]=o):o=t[2];let s=cG(n,o),[c,l]=(0,b.useState)(!1),u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=new Set,t[3]=u):u=t[3];let[d,f]=(0,b.useState)(u),{selected:p}=s,m,h;t[4]===p?(m=t[5],h=t[6]):(m=p.flatMap(nq),h=oG(m),t[4]=p,t[5]=m,t[6]=h);let g=h,_;t[7]!==s.entries||t[8]!==s.scanning?(_=s.scanning||s.entries.some(tq),t[7]=s.entries,t[8]=s.scanning,t[9]=_):_=t[9];let v=_,y;t[10]!==d||t[11]!==m.length||t[12]!==p?(y=m.length>0&&p.every(e=>e.data?.files.every(t=>d.has(iG(e.repo.path,t.name)))),t[10]=d,t[11]=m.length,t[12]=p,t[13]=y):y=t[13];let x=y,S;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(S=function(e,t){let n=iG(e,t);f(e=>{let t=new Set(e);return t.delete(n),t}),l(!1),requestAnimationFrame(()=>requestAnimationFrame(()=>document.getElementById(n)?.scrollIntoView({block:`start`})))},t[14]=S):S=t[14];let C=S,w;t[15]!==x||t[16]!==p?(w=function(){f(x?new Set:new Set(p.flatMap(eq)))},t[15]=x,t[16]=p,t[17]=w):w=t[17];let T=w,E;t[18]!==r.density||t[19]!==s?(E=(0,Y.jsx)(`div`,{className:`desktop-sidebar`,children:(0,Y.jsx)(xG,{workspace:s,density:r.density,navigate:C})}),t[18]=r.density,t[19]=s,t[20]=E):E=t[20];let D;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,Y.jsx)(iu,{className:`icon-button mobile-only`,"aria-label":`Open sidebar`,children:(0,Y.jsx)(jj,{})}),t[21]=D):D=t[21];let O;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,Y.jsx)(wl,{className:`dialog-backdrop`}),t[22]=O):O=t[22];let k;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,Y.jsx)($l,{className:`sr-only`,children:`Workspace navigation`}),t[23]=k):k=t[23];let A;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Y.jsx)(Tl,{className:`icon-button mobile-close`,"aria-label":`Close sidebar`,children:(0,Y.jsx)(Pj,{})}),t[24]=A):A=t[24];let j;t[25]!==r.density||t[26]!==s?(j=(0,Y.jsxs)(Pl,{children:[O,(0,Y.jsxs)(Ml,{className:`mobile-sidebar`,children:[k,A,(0,Y.jsx)(xG,{workspace:s,density:r.density,navigate:C})]})]}),t[25]=r.density,t[26]=s,t[27]=j):j=t[27];let M;t[28]!==c||t[29]!==j?(M=(0,Y.jsxs)(Ql,{open:c,onOpenChange:l,children:[D,j]}),t[28]=c,t[29]=j,t[30]=M):M=t[30];let N,P;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Y.jsx)(Tj,{}),P=(0,Y.jsx)(`strong`,{children:`Changes`}),t[31]=N,t[32]=P):(N=t[31],P=t[32]);let F;t[33]===m.length?F=t[34]:(F=(0,Y.jsx)(`span`,{className:`count-badge`,children:m.length}),t[33]=m.length,t[34]=F);let I=p.length===1?`repository`:`repositories`,L;t[35]!==p.length||t[36]!==I?(L=(0,Y.jsxs)(`span`,{className:`toolbar-caption`,children:[p.length,` `,I]}),t[35]=p.length,t[36]=I,t[37]=L):L=t[37];let R;t[38]!==F||t[39]!==L?(R=(0,Y.jsxs)(`div`,{className:`review-title`,children:[N,P,F,L]}),t[38]=F,t[39]=L,t[40]=R):R=t[40];let z;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,Y.jsx)(`div`,{className:`push`}),t[41]=z):z=t[41];let B=g.added?`+${g.added}`:``,V;t[42]===B?V=t[43]:(V=(0,Y.jsx)(`span`,{className:`added`,children:B}),t[42]=B,t[43]=V);let H=g.removed?`−${g.removed}`:``,U;t[44]===H?U=t[45]:(U=(0,Y.jsx)(`span`,{className:`removed`,children:H}),t[44]=H,t[45]=U);let ee;t[46]!==V||t[47]!==U?(ee=(0,Y.jsxs)(`span`,{className:`diff-stat toolbar-stat`,children:[V,U]}),t[46]=V,t[47]=U,t[48]=ee):ee=t[48];let te;t[49]===r.layout?te=t[50]:(te=[r.layout],t[49]=r.layout,t[50]=te);let ne;t[51]===i?ne=t[52]:(ne=e=>{(e[0]===`split`||e[0]===`unified`)&&i({layout:e[0]})},t[51]=i,t[52]=ne);let W;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,Y.jsx)(xl,{value:`unified`,"aria-label":`Unified view`,title:`Unified view`,children:(0,Y.jsx)(Aj,{})}),t[53]=W):W=t[53];let re;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,Y.jsx)(xl,{value:`split`,"aria-label":`Split view`,title:`Split view`,children:(0,Y.jsx)(vj,{})}),t[54]=re):re=t[54];let ie;t[55]!==te||t[56]!==ne?(ie=(0,Y.jsxs)(fl,{className:`view-toggle`,"aria-label":`Diff layout`,value:te,onValueChange:ne,children:[W,re]}),t[55]=te,t[56]=ne,t[57]=ie):ie=t[57];let ae;t[58]!==i||t[59]!==r.wrap?(ae=()=>i({wrap:!r.wrap}),t[58]=i,t[59]=r.wrap,t[60]=ae):ae=t[60];let G;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,Y.jsx)(cj,{}),t[61]=G):G=t[61];let oe;t[62]!==r.wrap||t[63]!==ae?(oe=(0,Y.jsx)(WW,{label:`Wrap lines`,pressed:r.wrap,onClick:ae,children:G}),t[62]=r.wrap,t[63]=ae,t[64]=oe):oe=t[64];let se=x?`Expand all files`:`Collapse all files`,ce=!m.length,le;t[65]===x?le=t[66]:(le=x?(0,Y.jsx)(fj,{}):(0,Y.jsx)(dj,{}),t[65]=x,t[66]=le);let ue;t[67]!==T||t[68]!==se||t[69]!==ce||t[70]!==le?(ue=(0,Y.jsx)(WW,{label:se,disabled:ce,onClick:T,children:le}),t[67]=T,t[68]=se,t[69]=ce,t[70]=le,t[71]=ue):ue=t[71];let de;t[72]!==M||t[73]!==R||t[74]!==ee||t[75]!==ie||t[76]!==oe||t[77]!==ue?(de=(0,Y.jsxs)(`header`,{className:`review-toolbar`,children:[M,R,z,ee,ie,oe,ue]}),t[72]=M,t[73]=R,t[74]=ee,t[75]=ie,t[76]=oe,t[77]=ue,t[78]=de):de=t[78];let fe;t[79]===s.error?fe=t[80]:(fe=s.error&&(0,Y.jsx)(`p`,{className:`notice`,role:`alert`,children:s.error}),t[79]=s.error,t[80]=fe);let pe;t[81]===s.warnings?pe=t[82]:(pe=s.warnings.map($K),t[81]=s.warnings,t[82]=pe);let me;t[83]!==v||t[84]!==p.length||t[85]!==s.entries?(me=!p.length&&(v?(0,Y.jsx)(ZW,{lines:3,children:`Finding changes across your workspace…`}):(0,Y.jsx)($W,{icon:s.entries.length?(0,Y.jsx)(_j,{}):(0,Y.jsx)(xj,{}),title:s.entries.length?`Nothing selected`:`No repositories here`,children:s.entries.length?`Repositories without changes start deselected. Open the Repositories control to include more, or change what they compare against.`:`This folder has no Git repositories or worktrees inside it.`})),t[83]=v,t[84]=p.length,t[85]=s.entries,t[86]=me):me=t[86];let he;if(t[87]!==d||t[88]!==p||t[89]!==r||t[90]!==s){let e;t[92]!==d||t[93]!==r||t[94]!==s?(e=e=>(0,Y.jsxs)(`section`,{id:iG(e.repo.path),className:`repo-diffs`,"aria-label":`Changes in ${e.repo.name}`,children:[(0,Y.jsxs)(`div`,{className:`repo-divider`,children:[(0,Y.jsx)(`strong`,{children:e.repo.name}),(0,Y.jsxs)(`span`,{children:[e.data?.files.length||0,` files`]}),e.repo.worktree&&(0,Y.jsx)(`span`,{className:`worktree-label`,children:`worktree`}),(0,Y.jsxs)(`span`,{className:`divider-comparison`,children:[e.base,` → `,aG(e.target)]}),(0,Y.jsx)(`span`,{className:`divider-line`}),e.loading&&(0,Y.jsx)(`span`,{role:`status`,children:`Updating…`})]}),e.error?(0,Y.jsxs)(`p`,{role:`alert`,className:`notice`,children:[e.error,(0,Y.jsx)(bu,{className:`text-button`,onClick:()=>void s.reload(e),children:`Retry`})]}):e.loading&&!e.data?(0,Y.jsxs)(ZW,{lines:2,children:[`Loading `,e.repo.name,`…`]}):(0,Y.jsxs)(Y.Fragment,{children:[e.data?.warnings.map(QK),!e.data?.files.length&&(0,Y.jsxs)(`p`,{className:`file-note`,children:[`No changes against `,e.base,`.`]}),(0,Y.jsx)(`div`,{className:`diff-files`,"data-updating":e.loading||void 0,children:e.data?.files.map(t=>(0,Y.jsx)(CG,{entry:e,file:t,settings:r,collapsed:d.has(iG(e.repo.path,t.name)),onCollapse:n=>f(r=>{let i=new Set(r),a=iG(e.repo.path,t.name);return n?i.add(a):i.delete(a),i})},`${e.data.version}:${t.name}`))})]})]},e.repo.path),t[92]=d,t[93]=r,t[94]=s,t[95]=e):e=t[95],he=p.map(e),t[87]=d,t[88]=p,t[89]=r,t[90]=s,t[91]=he}else he=t[91];let ge;t[96]!==m.length||t[97]!==v?(ge=!!m.length&&!v&&(0,Y.jsxs)(`div`,{className:`review-end`,children:[(0,Y.jsx)(_j,{}),(0,Y.jsx)(`span`,{children:`End of changes`})]}),t[96]=m.length,t[97]=v,t[98]=ge):ge=t[98];let _e;t[99]!==fe||t[100]!==pe||t[101]!==me||t[102]!==he||t[103]!==ge?(_e=(0,Y.jsxs)(vA,{className:`review-scroll`,contentClassName:`review-content`,children:[fe,pe,me,he,ge]}),t[99]=fe,t[100]=pe,t[101]=me,t[102]=he,t[103]=ge,t[104]=_e):_e=t[104];let ve;t[105]!==v||t[106]!==de||t[107]!==_e?(ve=(0,Y.jsxs)(`main`,{className:`review-pane`,"aria-busy":v,children:[de,_e]}),t[105]=v,t[106]=de,t[107]=_e,t[108]=ve):ve=t[108];let ye;return t[109]!==ve||t[110]!==E?(ye=(0,Y.jsxs)(Y.Fragment,{children:[E,ve]}),t[109]=ve,t[110]=E,t[111]=ye):ye=t[111],ye}function QK(e){return(0,Y.jsx)(`p`,{className:`notice`,children:e},e)}function $K(e){return(0,Y.jsx)(`p`,{className:`notice`,children:e},e)}function eq(e){return e.data?.files.map(t=>iG(e.repo.path,t.name))||[]}function tq(e){return e.loading}function nq(e){return e.data?.files||[]}function rq(){let e=(0,kA.c)(27),t=JK(),n=t.settings,r=n?.theme,i,a;e[0]===r?(i=e[1],a=e[2]):(i=()=>{r&&(document.documentElement.dataset.theme=r)},a=[r],e[0]=r,e[1]=i,e[2]=a),(0,b.useEffect)(i,a);let o;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(o={weight:`duotone`,size:18},e[3]=o):o=e[3];let s;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(s={},e[4]=s):s=e[4];let c;e[5]===t?c=e[6]:(c=e=>t.activate(String(e)),e[5]=t,e[6]=c);let l;e[7]!==n||e[8]!==t?(l=n&&(0,Y.jsx)(XK,{store:t,settings:n}),e[7]=n,e[8]=t,e[9]=l):l=e[9];let u;e[10]!==n||e[11]!==t.saveTab||e[12]!==t.setSettings||e[13]!==t.tabs||e[14]!==t.visited?(u=n&&t.tabs.filter(e=>t.visited.includes(e.id)).map(e=>(0,Y.jsx)(_u,{value:e.id,keepMounted:!0,className:`workspace-view`,children:(0,Y.jsx)(ZK,{tab:e,settings:n,setSettings:t.setSettings,saveTab:t.saveTab})},e.id)),e[10]=n,e[11]=t.saveTab,e[12]=t.setSettings,e[13]=t.tabs,e[14]=t.visited,e[15]=u):u=e[15];let d;e[16]===t.ready?d=e[17]:(d=!t.ready&&(0,Y.jsx)(`div`,{className:`workspace-view`,children:(0,Y.jsx)(ZW,{lines:2,children:`Restoring your workspaces…`})}),e[16]=t.ready,e[17]=d);let f;e[18]===t?f=e[19]:(f=t.ready&&!t.tabs.length&&(0,Y.jsx)(`div`,{className:`workspace-view`,children:(0,Y.jsxs)($W,{icon:(0,Y.jsx)(xj,{}),title:`Open a workspace`,children:[`Choose a directory containing your repositories and feature worktrees. Every tab remembers its own directory, repositories, and comparison branches.`,(0,Y.jsxs)(bu,{className:`primary-button`,onClick:()=>void t.browse(),disabled:t.browsing,children:[(0,Y.jsx)(xj,{}),t.browsing?`Choosing…`:`Choose a folder`]})]})}),e[18]=t,e[19]=f);let p;return e[20]!==t.activeTab||e[21]!==c||e[22]!==l||e[23]!==u||e[24]!==d||e[25]!==f?(p=(0,Y.jsx)(aj.Provider,{value:o,children:(0,Y.jsx)(kc,{delay:350,children:(0,Y.jsx)(bT,{poolOptions:YK,highlighterOptions:s,children:(0,Y.jsxs)(lu,{className:`app-shell`,value:t.activeTab,onValueChange:c,children:[l,u,d,f]})})})}),e[20]=t.activeTab,e[21]=c,e[22]=l,e[23]=u,e[24]=d,e[25]=f,e[26]=p):p=e[26],p}(0,OA.createRoot)(document.getElementById(`root`)).render((0,Y.jsx)(b.StrictMode,{children:(0,Y.jsx)(rq,{})}));export{s as t};
|
|
2800
|
+
}`}var _P=new WeakMap;function vP(e){let t=_P.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(LM,`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(),_P.set(e,i),i}function yP(e,t){if(!e.isConnected)return;let n=vP(t);if(n==null)return;let r=t.querySelector(`style[${RM}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(RM,``),t.appendChild(i)),i.textContent=`:host { ${zM}: ${n}px; }`}var bP;function xP(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){bP??(bP=new CSSStyleSheet,bP.replaceSync(hP(pP)));let t=!1;try{e.adoptedStyleSheets=[bP],t=!0}catch{}if(t){e.querySelector(`style[${FM}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(FM,``),t.textContent=hP(pP),e.prepend(t)}}function SP(e,t){CP(e,t),xP(t),yP(e,t)}function CP(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`});SP(this,e)}}if(customElements.define(PM,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(PM)))e instanceof HTMLElement&&SP(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var wP=5,TP=32,EP=128;function DP(){return{childIdByNameId:new Map,childIds:[],childPositionById:new Map,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function OP(){return{childIdByNameId:null,childIds:[],childPositionById:null,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function kP(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 AP(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 jP(e,t){e.childPositionById!=null&&e.childPositionById.set(t,e.childIds.length),e.childIds.push(t)}function MP(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 NP(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,LP(e,t)}function PP(e,t,n,r){if(e.totalChildSubtreeNodeCount+=n,e.totalChildVisibleSubtreeCount+=r,e.childVisibleChunkSums==null||r===0)return;let i=AP(e).get(t);if(i===void 0)return;let a=i>>wP;e.childVisibleChunkSums[a]+=r}function FP(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=RP(e,t,a,i);return{...r,childVisibleIndex:n-r.localVisibleIndex}}i-=o,a+=TP}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 IP(e,t,n){let r=0,i=t.childVisibleChunkSums,a=0;if(i!=null){let e=n>>wP;for(let t=0;t<e;t+=1)r+=i[t]??0;a=e<<wP}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 LP(e,t){if(t.childIds.length<EP){t.childVisibleChunkSums=null;return}let n=Math.ceil(t.childIds.length/TP),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>>wP]+=a.visibleSubtreeCount)}t.childVisibleChunkSums=r}function RP(e,t,n,r){let i=Math.min(t.childIds.length,n+TP),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 zP=7,BP=3,VP=8,HP=4;function UP(e,t,n=0){return e<<HP|n<<BP|t}function WP(e){return e.depthAndFlags>>>HP}function GP(e){return(e.depthAndFlags&VP)>>BP}function KP(e){return(e.depthAndFlags&VP)!==0}function qP(e){return e.depthAndFlags&zP}function JP(e,t){return(qP(e)&t)!==0}function YP(e,t){e.depthAndFlags|=t}function XP(e,t){e.depthAndFlags=UP(t,qP(e),GP(e))}var ZP=Symbol(`benchmarkInstrumentation`);function QP(e,t){return t==null||Object.defineProperty(e,ZP,{configurable:!0,enumerable:!1,value:t,writable:!1}),e}function $P(e){return e==null?null:e[ZP]??null}function eF(e,t,n){return e==null?n():e.measurePhase(t,n)}function tF(e,t,n){Number.isFinite(n)&&e!=null&&e.setCounter(t,n)}function nF(e){return e>=48&&e<=57}function rF(e){let t=[],n=0,r=0;for(;r<e.length;){for(;r<e.length&&!nF(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&&nF(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 iF(e){let t=e.toLowerCase();return{lowerValue:t,tokens:rF(t)}}function aF(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 oF(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=aF(e.tokens,t.tokens);return n===0?e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1:n}function sF(e,t,n){let r=oF(n(e),n(t));return r===0?e===t?0:e<t?-1:1:r}function cF(e,t){return sF(e,t,iF)}function lF(e,t){return t===e.segments.length-1?+!!e.isDirectory:1}function uF(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=lF(e,r);return a===lF(t,r)?cF(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 dF(e,t){return uF(e,t)}function fF(e,t,n){let r=e=>{let t=n.get(e);if(t!=null)return t;let r=iF(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=lF(e,n);return o===lF(t,n)?sF(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 pF(e,t){let n=e.sortKeyById[t];if(n!==void 0)return n;let r=e.valueById[t],i=iF(r);return e.sortKeyById[t]=i,i}function mF(e={}){return{flattenEmptyDirectories:e.flattenEmptyDirectories!==!1,sort:e.sort??`default`}}function hF(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 gF(e){let{hasTrailingSlash:t,segments:n}=hF(e);return{basename:n[n.length-1]??``,isDirectory:t,path:e,segments:n}}function _F(e){if(e.length===0)return{requiresDirectory:!1,segments:[]};let{hasTrailingSlash:t,segments:n}=hF(e);return{requiresDirectory:t,segments:n}}function vF(){let e=new Map;return e.set(``,0),{idByValue:e,valueById:[``],sortKeyById:[iF(``)]}}function yF(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 bF(e,t){let n=e.valueById[t];if(n===void 0)throw Error(`Unknown segment ID: ${String(t)}`);return n}var xF=Symbol(`pathStorePreparedInputKind`);function SF(e,t){return e[xF]=t,e}function CF(e){return{basename:e.basename,depth:e.segments.length,isDirectory:e.isDirectory,path:e.path,segments:e.segments}}function wF(e,t,n){return n==="default"?dF(e,t):n(CF(e),CF(t))}function TF(){return{depthAndFlags:UP(0,3,1),nameId:0,parentId:0,subtreeNodeCount:1,visibleSubtreeCount:1}}function EF(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 DF(e){return e.isDirectory?e.segments.length:e.segments.length-1}function OF(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 kF(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function AF(e,t={}){return IF(e,t).map(e=>e.path)}function jF(e,t={}){let n=IF(e,t);return SF({paths:n.map(e=>e.path),preparedPaths:n},`prepared`)}function MF(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 SF({paths:e,presortedPaths:e,presortedPathsContainDirectories:n},`presorted`)}function NF(e){let t=e,n=t.preparedPaths;if(t[xF]===`prepared`&&n!=null)return n;if(!OF(n))throw Error(`preparedInput must come from PathStore.prepareInput()`);return n}function PF(e){let t=e;return t[xF]===`presorted`&&t.presortedPaths!=null||kF(t.presortedPaths)?t.presortedPaths:null}function FF(e){let t=e;return typeof t.presortedPathsContainDirectories==`boolean`?t.presortedPathsContainDirectories:null}function IF(e,t={}){let n=mF(t),r=$P(t);tF(r,`workload.inputFiles`,e.length);let i=eF(r,`store.preparePathEntries.parse`,()=>e.map(e=>gF(e)));return eF(r,`store.preparePathEntries.sort`,()=>i.sort((e,t)=>wF(e,t,n.sort))),i}var LF=class{directories=new Map;directoryStack=[0];presortedDirectoryNodeIds=[];initialExpandedPathSet;createdDirectoriesAllExpanded=!1;createdDirectoryCount=0;lastPreparedPath=null;nodes=[TF()];options;instrumentation;segmentSortKeyCache=new Map;segmentTable=vF();hasDeferredDirectoryIndexes=!1;constructor(e={}){this.instrumentation=$P(e),this.options=mF(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,DP())}appendPaths(e){return eF(this.instrumentation,`store.builder.appendPaths.parse`,()=>this.appendPreparedPaths(e.map(e=>gF(e))))}appendPreparedPaths(e,t=!0){return this.createdDirectoriesAllExpanded=!1,eF(this.instrumentation,`store.builder.appendPreparedPaths`,()=>{for(let n of e)this.appendPreparedPath(n,t)}),this}appendPresortedPaths(e,t=null){return eF(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:UP(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:UP(r,0,1),nameId:u,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),l++,c[l]=d,m=a+1}let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory node for "${t}"`);this.promoteDirectoryToExplicit(e,t)}else{let e=c[l];if(e===void 0)throw Error(`Unable to resolve file parent for "${t}"`);let n=t.slice(m),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n)),i.push({depthAndFlags:UP(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=gF(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:UP(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:UP(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=gF(t)),this.hasDeferredDirectoryIndexes=!0}finish(e={}){let t=e.skipSubtreeCountPass===!0;return this.hasDeferredDirectoryIndexes?(eF(this.instrumentation,`store.builder.buildDirectoryIndexes`,()=>this.buildPresortedFinish(t)),this.hasDeferredDirectoryIndexes=!1):t||eF(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"?fF(this.lastPreparedPath,e,this.segmentSortKeyCache):wF(this.lastPreparedPath,e,this.options.sort))>0)throw Error(`Builder input must be sorted before appendPaths(): "${e.path}"`)}let n=this.lastPreparedPath,r=DF(e),i=n==null?0:DF(n),a=n==null?0:EF(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=yF(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:UP(WP(o)+1,0),nameId:r,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),a?.set(r,s),jP(i,s),s}createFileChildUnchecked(e,t){let n=yF(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:UP(WP(i)+1,0),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),jP(r,a),a}getOrCreateDirectoryChild(e,t){let n=yF(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&&!KP(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:UP(WP(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),jP(r,a),this.directories.set(a,DP()),a}createDirectoryChild(e,t){let n=yF(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:UP(WP(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),jP(r,a),this.directories.set(a,DP()),a}promoteDirectoryToExplicit(e,t){let n=this.nodes[e];if(n===void 0)throw Error(`Unknown directory node ID: ${String(e)}`);if(!KP(n))throw Error(`Path is not a directory: "${t}"`);if(JP(n,1))throw Error(`Duplicate path: "${t}"`);YP(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,OP());let r=-1,i=null;for(let e=1;e<t.length;e++){let a=t[e];if(a==null)continue;if(KP(a)){let t=OP();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;KP(n)&&this.directories.set(t,DP());let r=this.directories.get(n.parentId);r!=null&&(r.childIdByNameId!=null&&r.childIdByNameId.set(n.nameId,t),jP(r,t))}}computeSubtreeCounts(e){let t=this.nodes[e];if(t===void 0)throw Error(`Unknown node ID: ${String(e)}`);if(!KP(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 NP(this.nodes,n),t.subtreeNodeCount=r,t.visibleSubtreeCount=r,r}};function RF(e,t=`closed`,n=null){let r=BF(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 zF(){return{affectedAncestorIds:new Set,affectedNodeIds:new Set,events:[]}}function BF(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 VF(e,t){return JP(t,2)||e.defaultExpansion===`open`?!0:e.defaultExpansion!==`closed`&&WP(t)<=e.defaultExpansion}function HF(e,t,n=e.snapshot.nodes[t]){return n==null||!KP(n)?!1:e.directoriesOpenByDefault&&!e.hasCollapsedDirectoryOverrides?!0:e.collapsedDirectoryIds.has(t)?!1:e.expandedDirectoryIds.has(t)?!0:VF(e,n)}function UF(e,t,n,r=e.snapshot.nodes[t]){if(r==null||!KP(r))return;let i=VF(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 WF(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 GF(e,t){return e.directoryLoadInfoById.get(t)?.state??`loaded`}function KF(e,t){let n=WF(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 qF(e,t){let n=WF(e,t);n.activeAttemptId=null,n.errorMessage=null,n.state=`unloaded`}function JF(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 YF(e,t,n){return e.directoryLoadInfoById.get(t)?.activeAttemptId===n}function XF(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 ZF(e,t){e.directoryLoadInfoById.delete(t)}function QF(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 $F(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`add`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function eI(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`remove`,path:e.path,projectionChanged:e.projectionChanged,recursive:e.recursive,visibleCountDelta:null}}function tI(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,from:e.from,operation:`move`,projectionChanged:e.projectionChanged,to:e.to,visibleCountDelta:null}}function nI(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`expand`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function rI(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`collapse`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function iI(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`mark-directory-unloaded`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function aI(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 oI(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 sI(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 cI(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 lI(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 uI(e,t,n){return{...n,visibleCountDelta:xI(e)-t}}function dI(e,t){let n=xI(e),r=zF();e.transactionStack.push(r);try{t()}catch(t){throw mI(e,r,!1),t}mI(e,r,!0,xI(e)-n)}function fI(e,t){let n=e.instrumentation;if(n==null){pI(e,t);return}eF(n,`store.events.record`,()=>pI(e,t))}function pI(e,t){let n=e.transactionStack[e.transactionStack.length-1]??null;if(n==null){yI(e,t);return}n.events.push(t),vI(n,t)}function mI(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?_I(i,t):eF(n,`store.events.batch.merge`,()=>_I(i,t));return}let a=hI(t,r),o=e.instrumentation;if(o==null){yI(e,a);return}eF(o,`store.events.batch.commit`,()=>yI(e,a))}function hI(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 gI(e,t){for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n);for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n)}function _I(e,t){for(let n of t.events)e.events.push(n);gI(e,t)}function vI(e,t){for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n);for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n)}function yI(e,t){let n=e.instrumentation;if(n==null){bI(e,t);return}eF(n,`store.events.emit`,()=>bI(e,t))}function bI(e,t){e.listeners.get(t.operation)?.forEach(e=>e(t)),e.listeners.get(`*`)?.forEach(e=>e(t))}function xI(e){return e.snapshot.nodes[e.snapshot.rootId]?.visibleSubtreeCount??0}function SI(e,t){if(e.snapshot.options.flattenEmptyDirectories!==!0)return null;let n=e.snapshot.nodes[t];if(n==null||!KP(n)||JP(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||!KP(a)?null:i}function CI(e,t){let n=t;for(;;){let t=SI(e,n);if(t==null)return n;n=t}}function wI(e,t){let n=[t],r=t;for(;;){let t=SI(e,r);if(t==null)return n;n.push(t),r=t}}function TI(e,t){let n=t==null?e.snapshot.rootId:FI(e,t);return n==null?[]:zI(e,n)}function EI(e,t){let n=gF(t),r=n.isDirectory?n.segments:n.segments.slice(0,-1),i=eL(e,$I(e,r)),{createdNodeIds:a,directoryId:o}=BI(e,r),s=new Set(a),c=o;if(n.isDirectory){let n=RI(e,o);if(JP(n,1))throw Error(`Path already exists: "${t}"`);YP(n,1),e.pathCacheByNodeId.set(o,{path:t,version:e.pathCacheVersion}),s.add(o)}else c=HI(e,o,n.basename),s.add(c);MI(e,o);let l=eL(e,o);return $F({affectedAncestorIds:PI(e,c),affectedNodeIds:[...s],path:t,projectionChanged:tL(i,l)})}function DI(e,t,n){let r=FI(e,t);if(r==null)throw Error(`Path does not exist: "${t}"`);let i=RI(e,r);if(JP(i,2))throw Error(`The root node cannot be removed`);if(KP(i)&&LI(e,r).childIds.length>0&&n.recursive!==!0)throw Error(`Cannot remove a non-empty directory without recursive: "${t}"`);let a=i.parentId,o=eL(e,a),s=ZI(e,r);GI(e,a,r,i.nameId),QI(e,a),MI(e,a);let c=eL(e,a);return eI({affectedAncestorIds:PI(e,a),affectedNodeIds:s,path:t,projectionChanged:tL(o,c),recursive:n.recursive===!0})}function OI(e,t,n,r){let i=FI(e,t);if(i==null)throw Error(`Source path does not exist: "${t}"`);let a=RI(e,i);if(JP(a,2))throw Error(`The root node cannot be moved`);let o=r.collision??`error`,s=YI(e,i,n),c=eL(e,a.parentId),l=eL(e,s.parentId),u=bF(e.snapshot.segmentTable,a.nameId),d=yF(e.snapshot.segmentTable,s.basename);if(s.parentId===a.parentId&&u===s.basename)return null;if(KP(a)&&aL(e,i,s.parentId))throw Error(`Cannot move a directory into one of its descendants`);let f=kP(e.snapshot.nodes,LI(e,s.parentId)).get(d),p=s.existingNodeId??f??null;if(p!=null&&p!==i&&XI(e,p,o,GP(a))===`skip`)return null;let m=a.parentId;GI(e,m,i,a.nameId),a.parentId=s.parentId,a.nameId=d,e.pathCacheByNodeId.delete(i),iL(e,i),WI(e,s.parentId,i),QI(e,m),e.pathCacheVersion++,MI(e,m),s.parentId!==m&&MI(e,s.parentId);let h=eL(e,m),g=eL(e,s.parentId);return tI({affectedAncestorIds:[...new Set([...PI(e,m),...PI(e,s.parentId)])],affectedNodeIds:[i],from:t,projectionChanged:nL([c,l],[h,g]),to:jI(e,i)})}function kI(e,t){let n=e.pathCacheByNodeId.get(t);return n!=null&&n.version===e.pathCacheVersion?n.path:null}function AI(e,t,n){return e.pathCacheByNodeId.set(t,{path:n,version:e.pathCacheVersion}),n}function jI(e,t){let n=RI(e,t),r=kI(e,t);if(r!=null)return r;if(JP(n,2))return AI(e,t,``);let i=jI(e,n.parentId),a=bF(e.snapshot.segmentTable,n.nameId),o=i.length===0?a:`${i}${a}`;return AI(e,t,KP(n)?`${o}/`:o)}function MI(e,t){let n=e.instrumentation;if(n==null){sL(e,t);return}eF(n,`store.recomputeCountsUpwardFrom`,()=>sL(e,t))}function NI(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||!KP(o)){oL(e,a,o,!0),n.pop();continue}let s=i.get(a);if(s==null||t[1]>=s.childIds.length){oL(e,a,o,!0),n.pop();continue}let c=s.childIds[t[1]++];n.push([c,0])}}function PI(e,t){let n=[],r=t;for(;r!=null;){let t=RI(e,r);if(n.push(r),r===e.snapshot.rootId)break;r=t.parentId}return n}function FI(e,t){if(t.length===0)return e.snapshot.rootId;let n=_F(t);return II(e,n.segments,n.requiresDirectory)}function II(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=LI(e,r),a=kP(e.snapshot.nodes,i).get(t);if(a===void 0)return null;r=a}let i=RI(e,r);return n&&!KP(i)?null:r}function LI(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 RI(e,t){let n=e.snapshot.nodes[t];if(n===void 0||JP(n,4))throw Error(`Unknown node ID: ${String(t)}`);return n}function zI(e,t){let n=e.snapshot.nodes[t];if(n===void 0||JP(n,4))return[];if(!KP(n))return[jI(e,t)];if(LI(e,t).childIds.length===0)return JP(n,1)&&!JP(n,2)?[jI(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||JP(n,4)){i.pop();continue}if(!KP(n)){r.push(jI(e,t.nodeId)),i.pop();continue}let a=LI(e,t.nodeId);if(a.childIds.length===0){JP(n,1)&&!JP(n,2)&&r.push(jI(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 BI(e,t){let n=[],r=e.snapshot.rootId;for(let i of t){let t=yF(e.snapshot.segmentTable,i),a=LI(e,r),o=kP(e.snapshot.nodes,a).get(t);if(o!==void 0){if(!KP(RI(e,o)))throw Error(`Cannot create a directory that collides with an existing file: "${i}"`);r=o;continue}r=VI(e,r,t),n.push(r)}return{createdNodeIds:n,directoryId:r}}function VI(e,t,n){let r=RI(e,t),i=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:UP(WP(r)+1,0,1),nameId:n,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),e.snapshot.directories.set(i,DP()),WI(e,t,i),e.collapseNewDirectoriesByDefault&&(e.collapsedDirectoryIds.add(i),e.hasCollapsedDirectoryOverrides=!0),e.activeNodeCount++,i}function HI(e,t,n){let r=yF(e.snapshot.segmentTable,n),i=LI(e,t);if(kP(e.snapshot.nodes,i).has(r))throw Error(`Path already exists: "${lL(e,t,n)}"`);let a=RI(e,t),o=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:UP(WP(a)+1,0),nameId:r,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),WI(e,t,o),e.activeNodeCount++,o}function UI(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}KI(e,n,o)<0?i=a:r=a+1}return r}function WI(e,t,n){let r=LI(e,t),i=RI(e,n);kP(e.snapshot.nodes,r).set(i.nameId,n),PP(r,n,i.subtreeNodeCount,i.visibleSubtreeCount);let a=UI(e,r,n);r.childIds.splice(a,0,n),MP(r,a),LP(e.snapshot.nodes,r)}function GI(e,t,n,r){let i=LI(e,t),a=AP(i),o=a.get(n)??-1;kP(e.snapshot.nodes,i).delete(r),a.delete(n);let s=e.snapshot.nodes[n];s!=null&&PP(i,n,-s.subtreeNodeCount,-s.visibleSubtreeCount),o>=0&&(i.childIds.splice(o,1),MP(i,o),LP(e.snapshot.nodes,i))}function KI(e,t,n){let r=e.snapshot.options.sort;return r==="default"?qI(e,t,n):r(JI(e,t),JI(e,n))}function qI(e,t,n){let r=RI(e,t),i=RI(e,n),a=KP(r);if(a!==KP(i))return a?-1:1;let o=oF(pF(e.snapshot.segmentTable,r.nameId),pF(e.snapshot.segmentTable,i.nameId));if(o!==0)return o;let s=bF(e.snapshot.segmentTable,r.nameId),c=bF(e.snapshot.segmentTable,i.nameId);return s===c?t<n?-1:1:s<c?-1:1}function JI(e,t){let n=RI(e,t),r=jI(e,t),i=KP(n),a=i?r.slice(0,-1):r;return{basename:bF(e.snapshot.segmentTable,n.nameId),depth:WP(n),isDirectory:i,path:r,segments:a.length===0?[]:a.split(`/`)}}function YI(e,t,n){let r=RI(e,t),i=FI(e,n);if(i!=null){let t=RI(e,i);if(KP(t))return{basename:bF(e.snapshot.segmentTable,r.nameId),existingNodeId:null,parentId:i};let a=_F(n).segments;return{basename:a[a.length-1]??``,existingNodeId:i,parentId:t.parentId}}let a=_F(n),o=a.segments[a.segments.length-1]??``,s=a.segments.slice(0,-1),c=s.length===0?e.snapshot.rootId:II(e,s,!0);if(c==null)throw Error(`Destination parent does not exist: "${n}"`);return{basename:o,existingNodeId:null,parentId:c}}function XI(e,t,n,r){if(n===`skip`)return`skip`;if(n===`error`)throw Error(`Destination already exists: "${jI(e,t)}"`);let i=RI(e,t);if(GP(i)!==r)throw Error(`replace collision requires the same source and destination kinds`);if(KP(i)&&LI(e,t).childIds.length>0)throw Error(`replace collision does not support non-empty directories`);let a=i.parentId,o=i.nameId;return ZI(e,t),GI(e,a,t,o),QI(e,a),MI(e,a),`handled`}function ZI(e,t){let n=[],r=[{nodeId:t,visitedChildren:!1}];for(;r.length>0;){let t=r.pop();if(t==null)break;let i=RI(e,t.nodeId);if(t.visitedChildren||!KP(i)){KP(i)&&e.snapshot.directories.delete(t.nodeId),YP(i,4),e.pathCacheByNodeId.delete(t.nodeId),e.collapsedDirectoryIds.delete(t.nodeId)&&(e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0),e.expandedDirectoryIds.delete(t.nodeId),ZF(e,t.nodeId),e.activeNodeCount--,n.push(t.nodeId);continue}r.push({nodeId:t.nodeId,visitedChildren:!0});let a=LI(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 QI(e,t){let n=t;for(;n!=null;){let t=RI(e,n);if(!KP(t)||JP(t,2)||LI(e,n).childIds.length>0)return;YP(t,1),n=t.parentId===n?null:t.parentId}}function $I(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=kP(e.snapshot.nodes,LI(e,n)).get(t);if(i==null||!KP(RI(e,i)))break;n=i}return n}function eL(e,t){let n=rL(e,t);if(n==null)return null;let r=CI(e,n),i=RI(e,r),a=n===r?null:wI(e,n).map(t=>jI(e,t));return JSON.stringify({flattenedSegmentPaths:a,hasChildren:LI(e,r).childIds.length>0,path:jI(e,r),terminalKind:GP(i)})}function tL(e,t){return nL([e],[t])}function nL(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 rL(e,t){let n=t;for(;n!=null;){let t=RI(e,n);if(!KP(t)||JP(t,2))return null;if(!HF(e,n,t))return n;n=t.parentId}return null}function iL(e,t){let n=RI(e,t);if(XP(n,(t===e.snapshot.rootId?-1:WP(RI(e,n.parentId)))+1),!KP(n))return;let r=LI(e,t);for(let t of r.childIds)iL(e,t)}function aL(e,t,n){let r=n;for(;r!=null;){if(r===t)return!0;let n=RI(e,r);if(r===e.snapshot.rootId)return!1;r=n.parentId}return!1}function oL(e,t,n=RI(e,t),r=!1){let i=e.instrumentation;if(i==null){cL(e,t,n,r);return}eF(i,`store.recomputeNodeCounts`,()=>cL(e,t,n,r))}function sL(e,t){let n=t;for(;n!=null;){let t=RI(e,n),r=t.subtreeNodeCount,i=t.visibleSubtreeCount;if(oL(e,n,t),n===e.snapshot.rootId)return;let a=t.subtreeNodeCount-r,o=t.visibleSubtreeCount-i,s=t.parentId;(a!==0||o!==0)&&PP(LI(e,s),n,a,o),n=s}}function cL(e,t,n,r){if(!KP(n)){n.subtreeNodeCount=1,n.visibleSubtreeCount=1;return}let i=LI(e,t);if(r){let t=e.instrumentation;t==null?NP(e.snapshot.nodes,i):eF(t,`store.recomputeNodeCounts.rebuildChildAggregates`,()=>NP(e.snapshot.nodes,i))}let a=1+i.totalChildSubtreeNodeCount,o=i.totalChildVisibleSubtreeCount;if(n.subtreeNodeCount=a,JP(n,2)){n.visibleSubtreeCount=o;return}n.visibleSubtreeCount=SI(e,t)==null?HF(e,t,n)?1+o:1:o}function lL(e,t,n){let r=jI(e,t);return r.length===0?n:`${r}${n}`}function uL(e){return e!=null&&!JP(e,4)}function dL(e,t){let n=e.snapshot.nodes[t];return!uL(n)||!KP(n)||JP(n,2)?null:n}function fL(e){let t=0;for(let[n,r]of e.pathCacheByNodeId)r.version===e.pathCacheVersion&&uL(e.snapshot.nodes[n])&&(t+=1);return t}function pL(e){return Math.max(0,e.valueById.length-1)}function mL(e){return{activeNodeCount:e.activeNodeCount,cachedPathEntryCount:fL(e),loadInfoEntryCount:e.directoryLoadInfoById.size,segmentCount:pL(e.snapshot.segmentTable),totalNodeSlotCount:Math.max(0,e.snapshot.nodes.length-1)}}function hL(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 gL(e){let t=[],n=[];for(let n of e.collapsedDirectoryIds)dL(e,n)!=null&&t.push(jI(e,n));for(let t of e.expandedDirectoryIds)dL(e,t)!=null&&n.push(jI(e,t));return{collapsedPaths:t,expandedPaths:n}}function _L(e){let t=[];for(let[n,r]of e.directoryLoadInfoById)dL(e,n)!=null&&GF(e,n)!==`loaded`&&t.push({info:{activeAttemptId:null,errorMessage:r.errorMessage,nextAttemptId:r.nextAttemptId,state:r.state},path:jI(e,n)});return t}function vL(e,t){e.collapsedDirectoryIds.clear(),e.hasCollapsedDirectoryOverrides=!1,e.expandedDirectoryIds.clear();for(let n of t.expandedPaths){let t=FI(e,n);t!=null&&UF(e,t,!0,RI(e,t))}for(let n of t.collapsedPaths){let t=FI(e,n);t!=null&&UF(e,t,!1,RI(e,t))}}function yL(e,t){e.directoryLoadInfoById.clear();for(let n of t){let t=FI(e,n.path);t!=null&&dL(e,t)!=null&&e.directoryLoadInfoById.set(t,{activeAttemptId:null,errorMessage:n.info.errorMessage,nextAttemptId:n.info.nextAttemptId,state:n.info.state})}}function bL(e){e.pathCacheVersion+=1,e.pathCacheByNodeId.clear(),e.pathCacheByNodeId.set(e.snapshot.rootId,{path:``,version:e.pathCacheVersion})}function xL(e){let t=e.snapshot.segmentTable,n=vF();for(let r of e.snapshot.nodes)if(uL(r)){if(JP(r,2)){r.nameId=0;continue}r.nameId=yF(n,bF(t,r.nameId))}e.snapshot.segmentTable=n}function SL(e){for(let[t,n]of e.snapshot.directories){let r=e.snapshot.nodes[t];if(!uL(r)||!KP(r)){e.snapshot.directories.delete(t);continue}let i=n.childIds.filter(n=>{let r=e.snapshot.nodes[n];return uL(r)&&r.parentId===t});n.childIds=i,n.childIdByNameId=new Map(i.map(t=>[RI(e,t).nameId,t])),n.childPositionById=new Map(i.map((e,t)=>[e,t])),NP(e.snapshot.nodes,n)}}function CL(e){let t=e.snapshot.nodes.length-1;for(;t>e.snapshot.rootId;){let n=e.snapshot.nodes[t];if(uL(n))break;--t}e.snapshot.nodes.length=t+1}function wL(e){let t=gL(e),n=_L(e);eF(e.instrumentation,`store.cleanup.stable.clearPathCaches`,()=>bL(e)),eF(e.instrumentation,`store.cleanup.stable.rebuildSegmentTable`,()=>xL(e)),eF(e.instrumentation,`store.cleanup.stable.rebuildDirectoryIndexes`,()=>SL(e)),eF(e.instrumentation,`store.cleanup.stable.trimTrailingRemovedNodeSlots`,()=>CL(e)),eF(e.instrumentation,`store.cleanup.stable.restoreExpansionOverrides`,()=>vL(e,t)),eF(e.instrumentation,`store.cleanup.stable.restoreDirectoryLoadInfos`,()=>yL(e,n)),eF(e.instrumentation,`store.cleanup.stable.recomputeCounts`,()=>NI(e,e.snapshot.rootId))}function TL(e){let t=gL(e),n=_L(e),r=eF(e.instrumentation,`store.cleanup.aggressive.listPaths`,()=>TI(e)),i=QP({...e.snapshot.options},e.instrumentation),a=eF(e.instrumentation,`store.cleanup.aggressive.rebuildSnapshot`,()=>{let e=new LF(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,eF(e.instrumentation,`store.cleanup.aggressive.restoreExpansionOverrides`,()=>vL(e,t)),eF(e.instrumentation,`store.cleanup.aggressive.restoreDirectoryLoadInfos`,()=>yL(e,n)),eF(e.instrumentation,`store.cleanup.aggressive.recomputeCounts`,()=>NI(e,e.snapshot.rootId))}function EL(e){for(let t of e.directoryLoadInfoById.values())if(t.state===`loading`&&t.activeAttemptId!=null)return!0;return!1}function DL(e,t){let n=mL(e);t===`stable`?eF(e.instrumentation,`store.cleanup.stable`,()=>wL(e)):eF(e.instrumentation,`store.cleanup.aggressive`,()=>TL(e));let r=mL(e);return hL(t,t===`stable`,n,r)}var OL=64;function kL(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 AL(e){return RI(e,e.snapshot.rootId).visibleSubtreeCount}function jL(e,t,n,r){let i=RI(e,t.terminalNodeId),a=Math.max(1,i.visibleSubtreeCount);return Math.min(r-1,n+a-1)}function ML(e,t,n,r){return{ancestorPaths:r,index:t.index,posInSet:t.posInSet,row:ZL(e,t.cursor),setSize:t.setSize,subtreeEndIndex:jL(e,t.cursor,t.index,n)}}function NL(e,t,n,r,i,a){let o=LI(e,t),{childIndex:s,childVisibleIndex:c,localVisibleIndex:l}=FP(e.snapshot.nodes,o,n),u=o.childIds[s];if(u==null)throw Error(`Visible index ${String(n)} is out of range`);return PL(e,u,l,r+c,i+1,s,o.childIds.length,a)}function PL(e,t,n,r,i,a,o,s){if(!KP(RI(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=GL(e,t,i);if(n===0)return{ancestors:s,cursor:c,index:r,posInSet:a,setSize:o};let l=RI(e,c.terminalNodeId);if(!KP(l)||!HF(e,c.terminalNodeId,l))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return NL(e,c.terminalNodeId,n-1,r+1,c.visibleDepth,[...s,{cursor:c,index:r,posInSet:a,setSize:o}])}function FL(e,t){let n=AL(e);if(t<0||t>=n)return null;let r=NL(e,e.snapshot.rootId,t,0,-1,[]),i=r.ancestors.map(t=>jI(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=ML(e,a,n,[...i]);t.push(r),i.push(r.row.path)}return a=t,a},index:r.index,posInSet:r.posInSet,row:ZL(e,r.cursor),setSize:r.setSize,subtreeEndIndex:jL(e,r.cursor,r.index,n)}}function IL(e,t,n){let r=e.instrumentation,i=AL(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 XL(e,o+1);let t=[],n=HL(e,a);for(let r=a;r<=o&&n!=null;r++){let r=ZL(e,n);t.push(r),n=qL(e,n)}return t}let s=[],c=0,l=0,u=eF(r,`store.getVisibleSlice.selectFirstRow`,()=>HL(e,a));for(let t=a;t<=o&&u!=null;t++){let t=eF(r,`store.getVisibleSlice.materializeRow`,()=>ZL(e,u));s.push(t),t.isFlattened&&(c++,l+=t.flattenedSegments?.length??0),u=eF(r,`store.getVisibleSlice.advanceCursor`,()=>qL(e,u))}return tF(r,`workload.visibleRowsRead`,s.length),tF(r,`workload.flattenedRowsRead`,c),tF(r,`workload.flattenedSegmentsRead`,l),s}function LL(e,t=AL(e)){let n=e.instrumentation;return n==null?YL(e,t):eF(n,`store.getVisibleTreeProjection`,()=>YL(e,t))}function RL(e){return JL(LL(e))}function zL(e,t){let n=FI(e,t);if(n==null||n===e.snapshot.rootId||KP(RI(e,n))&&CI(e,n)!==n)return null;let r=0,i=n,{nodes:a,rootId:o}=e.snapshot;for(;i!==o;){let t=RI(e,i).parentId,n=LI(e,t),s=AP(n).get(i);if(s==null)throw Error(`Child ${String(i)} was not found in its parent index`);if(r+=IP(a,n,s),t!==o){let n=RI(e,t),a=SI(e,t);if(!HF(e,t,n)&&a!==i)return null;CI(e,t)===t&&(r+=1)}i=t}return r}function BL(e,t){let n=FI(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=RI(e,n);if(!KP(r))throw Error(`Path is not a directory: "${t}"`);return HF(e,n,r)?null:(UF(e,n,!0,r),MI(e,n),nI({affectedAncestorIds:PI(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0}))}function VL(e,t){let n=FI(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=RI(e,n);if(!KP(r))throw Error(`Path is not a directory: "${t}"`);return HF(e,n,r)?(UF(e,n,!1,r),MI(e,n),rI({affectedAncestorIds:PI(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0})):null}function HL(e,t){return t<0||t>=AL(e)?null:UL(e,e.snapshot.rootId,t,-1)}function UL(e,t,n,r){let i=LI(e,t),a=e.instrumentation,{childIndex:o,localVisibleIndex:s}=a==null?FP(e.snapshot.nodes,i,n):eF(a,`store.getVisibleSlice.selectChildIndex`,()=>FP(e.snapshot.nodes,i,n)),c=i.childIds[o];if(c!=null)return WL(e,c,s,r+1);throw Error(`Visible index ${String(n)} is out of range`)}function WL(e,t,n,r){if(!KP(RI(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=GL(e,t,r);if(n===0)return i;let a=RI(e,i.terminalNodeId);if(!KP(a)||!HF(e,i.terminalNodeId,a))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return UL(e,i.terminalNodeId,n-1,i.visibleDepth)}function GL(e,t,n){return KP(RI(e,t))?e.instrumentation==null?{headNodeId:t,terminalNodeId:CI(e,t),visibleDepth:n}:{headNodeId:t,terminalNodeId:eF(e.instrumentation,`store.getVisibleSlice.flatten.resolveTerminalDirectory`,()=>CI(e,t)),visibleDepth:n}:{headNodeId:t,terminalNodeId:t,visibleDepth:n}}function KL(e,t){let n=RI(e,t);if(!KP(n))return!0;let r=n.parentId;return r===e.snapshot.rootId||SI(e,r)!==t}function qL(e,t){let n=RI(e,t.terminalNodeId);if(KP(n)){let r=LI(e,t.terminalNodeId);if(HF(e,t.terminalNodeId,n)&&r.childIds.length>0){let n=r.childIds[0];return n==null?null:WL(e,n,0,t.visibleDepth+1)}}let r=t.terminalNodeId,i=t.visibleDepth;for(;;){let t=RI(e,r);if(r===e.snapshot.rootId)return null;let n=t.parentId,a=LI(e,n),o=AP(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 WL(e,s,0,i);KL(e,r)&&i--,r=n}}function JL(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 YL(e,t){let n=Array(t),r=new Int32Array(t),i=new Int32Array(t),a=new Int32Array(t),o=new Int32Array(OL);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=kL(o,y);let x,S=_;if(KP(v))S=f?CI(e,_):_,x=S===_?`${b}${h[v.nameId]}/`:jI(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&&KP(C)&&HF(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 XL(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(!KP(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:jI(e,f)};continue}let h=l?CI(e,f):f,g={headNodeId:f,terminalNodeId:h,visibleDepth:m};n[r++]=ZL(e,g);let _=i[h];_!=null&&KP(_)&&HF(e,h,_)&&s.push([a.get(h),0,m])}return r<t&&(n.length=r),n}function ZL(e,t){let n=RI(e,t.terminalNodeId),r=KP(n)?QL(e,t):null,i=jI(e,t.terminalNodeId),a=bF(e.snapshot.segmentTable,n.nameId),o=KP(n)&&LI(e,t.terminalNodeId).childIds.length>0,s=t.headNodeId!==t.terminalNodeId,c=e.instrumentation,l=s?c==null?wI(e,t.headNodeId).map(n=>{let r=RI(e,n);return{isTerminal:n===t.terminalNodeId,name:bF(e.snapshot.segmentTable,r.nameId),nodeId:n,path:jI(e,n)}}):eF(c,`store.getVisibleSlice.flatten.collectSegments`,()=>wI(e,t.headNodeId).map(n=>{let r=RI(e,n);return{isTerminal:n===t.terminalNodeId,name:bF(e.snapshot.segmentTable,r.nameId),nodeId:n,path:jI(e,n)}})):void 0;return{depth:t.visibleDepth,flattenedSegments:l,hasChildren:o,id:t.terminalNodeId,isExpanded:KP(n)&&HF(e,t.terminalNodeId,n),isFlattened:s,isLoading:r===`loading`,kind:KP(n)?`directory`:`file`,loadState:r==null||r===`loaded`?void 0:r,name:a,path:i}}function QL(e,t){if(t.headNodeId===t.terminalNodeId)return GF(e,t.terminalNodeId);let n=wI(e,t.headNodeId),r=!1,i=!1;for(let t of n){let n=GF(e,t);if(n===`loading`)return`loading`;if(n===`error`){i=!0;continue}n===`unloaded`&&(r=!0)}return i?`error`:r?`unloaded`:`loaded`}var $L=8;function eR(e){let{nodes:t,directories:n,rootId:r,options:i}=e,a=t.length,o=new Int32Array(a),s=new Int32Array(a),c=new Int32Array(a),l=new Int32Array(a),u=new Int32Array(a),d=new Int32Array(a),f=new Int32Array(a);for(let e=0;e<a;e+=1){let n=t[e];n!=null&&(o[e]=n.parentId,s[e]=n.nameId,c[e]=n.depthAndFlags,l[e]=n.subtreeNodeCount,u[e]=n.visibleSubtreeCount)}let p=0;for(let e of n.values())p+=e.childIds.length;let m=new Int32Array(p),h=0;for(let[e,t]of n){let n=t.childIds;d[e]=h,f[e]=n.length;for(let e=0;e<n.length;e+=1)m[h]=n[e],h+=1}return{nodeCount:a,rootId:r,flattenEmptyDirectories:i.flattenEmptyDirectories===!0,parentId:o,nameId:s,depthAndFlags:c,subtreeNodeCount:l,visibleSubtreeCount:u,childStart:d,childCount:f,childIdsFlat:m}}function tR(e){let{nodeCount:t,rootId:n,flattenEmptyDirectories:r,depthAndFlags:i,subtreeNodeCount:a,visibleSubtreeCount:o,childStart:s,childCount:c,childIdsFlat:l}=e;for(let e=t-1;e>=1;--e){if((i[e]&$L)===0)continue;let t=s[e],n=c[e],u=0,d=0;for(let e=0;e<n;e+=1){let n=l[t+e];u+=a[n],d+=o[n]}a[e]=1+u;let f;f=r&&n===1?(i[l[t]]&$L)===0?1+d:d:1+d,o[e]=f}let u=s[n],d=c[n],f=0,p=0;for(let e=0;e<d;e+=1){let t=l[u+e];f+=a[t],p+=o[t]}a[n]=1+f,o[n]=p}function nR(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||!KP(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&&LP(n,i),r.subtreeNodeCount=1+c;let u;if(o&&s===1){let e=n[a[0]];u=e!=null&&KP(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,LP(n,l),c.subtreeNodeCount=1+d,c.visibleSubtreeCount=f}function rR(e){let{directories:t,nodes:n,rootId:r}=e.snapshot,i=eR(e.snapshot);tR(i);let a=i.subtreeNodeCount,o=i.visibleSubtreeCount;for(let e=0;e<n.length;e+=1){let t=n[e];t!=null&&(t.subtreeNodeCount=a[e],t.visibleSubtreeCount=o[e])}for(let[e,i]of t){let t=i.childIds,a=t.length,o=0,s=0;for(let e=0;e<a;e++){let r=t[e];if(r==null)continue;let i=n[r];o+=i.subtreeNodeCount,s+=i.visibleSubtreeCount}i.totalChildSubtreeNodeCount=o,i.totalChildVisibleSubtreeCount=s,(e===r||a>=128)&&LP(n,i)}}function iR(e){return e.initialExpansion===`open`&&(e.initialExpandedPaths==null||e.initialExpandedPaths.length===0)}var aR=class e{#e;constructor(e={}){let t=$P(e),n=eF(t,`store.builder.create`,()=>new LF(e));if(e.preparedInput!=null){let t=PF(e.preparedInput);t==null?n.appendPreparedPaths(NF(e.preparedInput),!1):n.appendPresortedPaths(t,FF(e.preparedInput))}else{let r=e.paths??[];e.presorted===!0?n.appendPaths(r):n.appendPreparedPaths(eF(t,`store.preparePathEntries`,()=>IF(r,e)))}let r=eF(t,`store.builder.finish`,()=>n.finish({skipSubtreeCountPass:!0})),i=eF(t,`store.state.detectAllDirectoriesExpanded`,()=>(e.initialExpansion??`closed`)===`closed`&&n.didMatchAllInitialExpandedPaths());this.#e=eF(t,`store.state.create`,()=>RF(r,i?`open`:e.initialExpansion??`closed`,t)),i&&(this.#e.collapseNewDirectoriesByDefault=!0);let a=i?this.#e.snapshot.directories.size-1:eF(t,`store.state.initializeExpandedPaths`,()=>this.initializeExpandedPaths(e.initialExpandedPaths));i||iR(e)||(e.initialExpansion??`closed`)===`closed`&&a===this.#e.snapshot.directories.size-1||(e.initialExpandedPaths?.length??0)>0&&eF(t,`store.state.checkAllDirectoriesExpanded`,()=>this.hasAllDirectoriesExpanded())?e.useSoaCountSweep===!0?eF(t,`store.state.initializeOpenVisibleCountsViaSoa`,()=>rR(this.#e)):eF(t,`store.state.initializeOpenVisibleCounts`,()=>nR(this.#e)):eF(t,`store.state.recomputeCounts`,()=>NI(this.#e,this.#e.snapshot.rootId))}static preparePaths(e,t={}){return AF(e,t)}static prepareInput(e,t={}){return jF(e,t)}static preparePresortedInput(e){return MF(e)}list(e){return eF(this.#e.instrumentation,`store.list`,()=>TI(this.#e,e))}add(e){eF(this.#e.instrumentation,`store.add`,()=>{let t=AL(this.#e);fI(this.#e,uI(this.#e,t,EI(this.#e,e)))})}remove(e,t={}){eF(this.#e.instrumentation,`store.remove`,()=>{let n=AL(this.#e);fI(this.#e,uI(this.#e,n,DI(this.#e,e,t)))})}move(e,t,n={}){eF(this.#e.instrumentation,`store.move`,()=>{let r=AL(this.#e),i=OI(this.#e,e,t,n);i!=null&&fI(this.#e,uI(this.#e,r,i))})}batch(e){dI(this.#e,()=>{if(typeof e==`function`){e(this);return}for(let t of e)switch(t.type){case`add`:this.add(t.path);break;case`remove`:this.remove(t.path,{recursive:t.recursive});break;case`move`:this.move(t.from,t.to,{collision:t.collision})}})}getVisibleCount(){return eF(this.#e.instrumentation,`store.getVisibleCount`,()=>AL(this.#e))}getVisibleSlice(e,t){return eF(this.#e.instrumentation,`store.getVisibleSlice`,()=>IL(this.#e,e,t))}getVisibleRowContext(e){return eF(this.#e.instrumentation,`store.getVisibleRowContext`,()=>FL(this.#e,e))}getVisibleTreeProjection(){return RL(this.#e)}getVisibleTreeProjectionData(e){return LL(this.#e,e)}getVisibleIndex(e){return eF(this.#e.instrumentation,`store.getVisibleIndex`,()=>zL(this.#e,e))}getPathInfo(e){return eF(this.#e.instrumentation,`store.getPathInfo`,()=>{let t=FI(this.#e,e);if(t==null)return null;let n=RI(this.#e,t);return{depth:WP(n),kind:KP(n)?`directory`:`file`,path:jI(this.#e,t)}})}isExpanded(e){return eF(this.#e.instrumentation,`store.isExpanded`,()=>{let t=this.requireDirectoryNodeId(e),n=RI(this.#e,t);return HF(this.#e,t,n)})}expand(e){eF(this.#e.instrumentation,`store.expand`,()=>{let t=AL(this.#e),n=BL(this.#e,e);n!=null&&fI(this.#e,uI(this.#e,t,n))})}collapse(e){eF(this.#e.instrumentation,`store.collapse`,()=>{let t=AL(this.#e),n=VL(this.#e,e);n!=null&&fI(this.#e,uI(this.#e,t,n))})}on(e,t){return QF(this.#e,e,t)}getDirectoryLoadState(e){let t=this.requireDirectoryNodeId(e);return GF(this.#e,t)}markDirectoryUnloaded(e){eF(this.#e.instrumentation,`store.markDirectoryUnloaded`,()=>{let t=this.requireDirectoryNodeId(e);if(LI(this.#e,t).childIds.length>0)throw Error(`Cannot mark a directory with known children as unloaded: "${e}"`);let n=AL(this.#e);qF(this.#e,t),fI(this.#e,uI(this.#e,n,iI({affectedAncestorIds:PI(this.#e,t),affectedNodeIds:[t],path:e,projectionChanged:this.isDirectoryProjectionVisible(t)})))})}beginChildLoad(e){return eF(this.#e.instrumentation,`store.beginChildLoad`,()=>{let t=this.requireDirectoryNodeId(e),n=AL(this.#e),r=KF(this.#e,t);return fI(this.#e,uI(this.#e,n,aI({affectedAncestorIds:PI(this.#e,t),affectedNodeIds:[t],attemptId:r.attemptId,path:e,projectionChanged:this.isDirectoryProjectionVisible(t),reused:r.reused}))),r})}applyChildPatch(e,t){return eF(this.#e.instrumentation,`store.applyChildPatch`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null||GF(this.#e,n)!==`loading`||!YF(this.#e,n,e.attemptId))return!1;let r=jI(this.#e,n);this.validateChildPatch(r,t);let i=AL(this.#e),a=[];for(let e of t.operations){oR(r,e);let t=AL(this.#e);switch(e.type){case`add`:a.push(uI(this.#e,t,EI(this.#e,e.path)));break;case`remove`:a.push(uI(this.#e,t,DI(this.#e,e.path,{recursive:e.recursive})));break;case`move`:{let n=OI(this.#e,e.from,e.to,{collision:e.collision});n!=null&&a.push(uI(this.#e,t,n));break}}}let o=a.some(e=>e.projectionChanged)||this.isDirectoryProjectionVisible(n);return fI(this.#e,uI(this.#e,i,oI({affectedAncestorIds:PI(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,childEvents:a,path:jI(this.#e,n),projectionChanged:o}))),!0})}completeChildLoad(e){return eF(this.#e.instrumentation,`store.completeChildLoad`,()=>{let t=this.resolveActiveDirectoryNodeId(e.nodeId);if(t==null)return!1;let n=AL(this.#e),r=JF(this.#e,t,e.attemptId);return fI(this.#e,uI(this.#e,n,sI({affectedAncestorIds:PI(this.#e,t),affectedNodeIds:[t],attemptId:e.attemptId,path:jI(this.#e,t),projectionChanged:this.isDirectoryProjectionVisible(t),stale:!r}))),r})}failChildLoad(e,t){return eF(this.#e.instrumentation,`store.failChildLoad`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null)return!1;let r=AL(this.#e),i=XF(this.#e,n,e.attemptId,t);return fI(this.#e,uI(this.#e,r,cI({affectedAncestorIds:PI(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,errorMessage:t,path:jI(this.#e,n),projectionChanged:this.isDirectoryProjectionVisible(n),stale:!i}))),i})}cleanup(e={}){return eF(this.#e.instrumentation,`store.cleanup`,()=>{if(this.#e.transactionStack.length>0)throw Error(`Cleanup cannot run during an open batch or transaction.`);if(EL(this.#e))throw Error(`Cleanup cannot run while directory loads are active.`);let t=AL(this.#e),n=DL(this.#e,e.mode??`stable`);return fI(this.#e,uI(this.#e,t,lI({...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=LI(this.#e,p).childIds,_=m===d?n[m]??0:0,v=_,y,b=l.get(a)??iF(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=oF(pF(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(!KP(RI(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=RI(this.#e,n);HF(this.#e,n,i)||(UF(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=RI(this.#e,e);if(!HF(this.#e,e,t))return!1}return!0}requireDirectoryNodeId(e){let t=FI(this.#e,e);if(t==null)throw Error(`Path does not exist: "${e}"`);if(!KP(RI(this.#e,t)))throw Error(`Path is not a directory: "${e}"`);return t}resolveActiveDirectoryNodeId(e){try{if(!KP(RI(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=RI(this.#e,t).parentId;if(e!==this.#e.snapshot.rootId){let n=RI(this.#e,e),r=SI(this.#e,e);if(!HF(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 oR(e,t){switch(t.type){case`add`:case`remove`:if(!t.path.startsWith(e)||t.path===e)throw Error(`Child patch operation must stay within ${e}: "${t.path}"`);break;case`move`:if(!t.from.startsWith(e)||!t.to.startsWith(e)||t.from===e||t.to===e)throw Error(`Child patch move must stay within ${e}: "${t.from}" -> "${t.to}"`)}}var sR=e=>e.startsWith(`f::`)?e.slice(3):e;function cR(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function lR(e,t){return e===``?t:`${e}/${t}`}function uR({files:e,path:t,isFolder:n,nextBasename:r}){let i=sR(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}=cR(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=lR(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 dR(e){return e.endsWith(`/`)}function fR(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 pR(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 mR(e,t){return t.includes(e)?pR(t):[e]}function hR(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 gR(e,t){return{draggedPaths:e,target:t}}function _R(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(dR(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function vR(e,t){return t.kind===`root`||t.directoryPath==null?fR(e):t.directoryPath}function yR(e,t){let n=e.map(e=>{let n=vR(e,t);return n===e?null:{from:e,to:n,type:`move`}}).filter(e=>e!=null);return n.length===0?null:{operations:n,result:{draggedPaths:e,operation:n.length===1?`move`:`batch`,target:t}}}function bR(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 xR(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(!bR(aR.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 SR(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}function CR(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 wR(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function TR(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 wR(e,t.path)?n?e:null:e;case`move`:return CR(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=TR(r,e,n),r==null)return null;return r}}}function ER(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function DR(e){switch(e.operation){case`add`:return{...ER(e),operation:`add`,path:e.path};case`remove`:return{...ER(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...ER(e),from:e.from,operation:`move`,to:e.to}}}function OR(e){return{...ER(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>DR(e)),operation:`batch`}}function kR(e){switch(e.operation){case`add`:case`remove`:case`move`:return DR(e);case`batch`:return OR(e);default:return null}}function AR(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function jR(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 MR(e){return jR(e).at(-1)??null}function NR(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}function PR(e){return e.endsWith(`/`)}var FR=e=>e.toLowerCase();function IR(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function LR(e){return e.endsWith(`/`)?e.slice(0,-1):e}function RR(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}var zR=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},BR=Symbol(`FILE_TREE_RENAME_VIEW`),VR=512,HR=512;function UR(e){return e===`top`||e===`center`?e:`nearest`}function WR(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=jR(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 GR(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:WR(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var KR=class e{static{Object.defineProperty(e.prototype,BR,{configurable:!0,value(){return{cancel:()=>{this.#q()},commit:()=>{this.#J()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#Y(e)}}},writable:!0})}#e;#t=new Set;#n=new Map;#r=null;#i=null;#a=new Map;#o=new Map;#s=-1;#c=null;#l=!1;#u=e=>-1;#d=new Map;#f=null;#p=null;#m=null;#h=null;#g=null;#_;#v;#y;#b=[];#x=new Int32Array;#S=new Int32Array;#C=void 0;#w=!1;#T=null;#E=``;#D=!1;#O=new Set;#k=[];#A;#j=null;#M=null;#N=null;#P=null;#F=null;#I=null;#L=null;#R=0;#z=null;#B=new Set;#V=0;#H;#U=0;#W=!1;#G=0;#K;constructor(e){let{dragAndDrop:t,fileTreeSearchMode:n,initialSearchQuery:r,initialSelectedPaths:i,renaming:a,onSearchChange:o,paths:s,preparedInput:c,...l}=e,u=xR({paths:s,preparedInput:c},`constructor`,l.sort);this.#e=l,t!=null&&t!==!1&&(this.#r=t===!0?{}:t),this.#w=a!=null&&a!==!1,a!=null&&a!==!1&&a!==!0&&(this.#C=a.canRename,this.#v=a.onError,this.#_=a.onRename),this.#y=o,this.#A=n??`hide-non-matches`,this.#H=this.#le(u.paths,u.preparedInput);let d=i?.map(e=>this.#Ne(e)).filter(e=>e!=null)??[],f=d.at(-1)??null;d.length>0&&(this.#B=new Set(d),this.#z=f,this.#V=1),this.#je(f,!1),r!=null&&this.#Te(r,!1),this.#K=this.#Re()}destroy(){this.#K?.(),this.#K=null,this.#n.clear(),this.#t.clear(),this.#d.clear(),this.#i=null,this.#he()}focusFirstItem(){this.#be().length>0&&this.#Fe(0)}focusLastItem(){this.#G<=0||(this.#Ie(),this.#Fe(this.#G-1))}focusNextItem(){this.#Ae(1)}focusParentItem(){if(this.#c==null)return;let e=MR(this.#c);if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t)}focusPath(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;this.#Ie();let n=this.#Z(t);n>=0&&this.#Fe(n)}scrollToPath(e,t){let n=this.#H.getPathInfo(e)?.path??null;if(n==null)return;this.#Ie();let r=this.#xe(n);r<0||this.#Me(r)!=null&&(t?.focus!==!1&&this.#Fe(r,!1),this.#L={id:this.#R+=1,offset:UR(t?.offset),visibleIndex:r},this.#De())}focusMountedPathFromInput(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;let n=this.#Z(t);n>=0&&this.#Fe(n)}focusNearestPath(e){let t=this.resolveNearestVisiblePath(e);if(t==null)return null;let n=this.#Z(t);return n>=0?(this.#Fe(n),this.#be()[n]??t):null}focusPreviousItem(){this.#Ae(-1)}getFocusedIndex(){return this.#s}getFocusedItem(){return this.#c==null?null:this.#Q(this.#c)}getFocusedPath(){return this.#c}getScrollRequest(){return this.#L}clearScrollRequest(e){this.#L?.id===e&&(this.#L=null)}resolveNearestVisiblePath(e){let t=this.#be();if(this.#G===0)return null;if(e==null)return this.#c??t[0]??null;let n=this.#H.getPathInfo(e)?.path??e,r=this.#Z(n);return r>=0?t[r]??n:this.#X(n)??this.#c??t[0]??null}getSelectedPaths(){return[...this.#B]}getSelectionVersion(){return this.#V}getVisibleCount(){return this.#G}getVisibleRows(e,t){if(t<e||this.#G===0)return[];let n=Math.max(0,e),r=Math.min(this.#G-1,t);if(r<n)return[];let i=r-n+1;if(this.#F==null&&!this.#l&&r>=this.#b.length&&i<=HR){let e=[];for(let t=n;t<=r;t+=1){let n=this.#H.getVisibleRowContext(t);if(n==null)break;e.push(this.#ee(n))}return e}if(!this.#l&&r>=this.#b.length&&this.#Ie(),this.#F!=null){let e=Array.from({length:r-n+1},(e,t)=>this.#Se(n+t)),t=new Map,i=e[0]??-1,a=i;for(let n=1;n<=e.length;n+=1){let r=e[n];if(r!=null&&r===a+1){a=r;continue}if(i>=0&&this.#H.getVisibleSlice(i,a).forEach((e,n)=>{t.set(i+n,e)}),r==null){i=-1,a=-1;continue}i=r,a=r}return Array.from({length:r-n+1},(e,r)=>{let i=n+r,a=this.#Se(i),o=t.get(a),s=this.#b[a];if(o==null||s==null)throw Error(`Missing projection row for filtered visible index ${String(i)}`);return this.#$(o,i,a,{ancestorPaths:this.#re(a),path:s})})}return this.#H.getVisibleSlice(n,r).map((e,t)=>{let r=n+t,i=this.#b[r];if(i==null)throw Error(`Missing projection path for visible index ${String(r)}`);return this.#$(e,r,r,{ancestorPaths:this.#re(r),path:i})})}getStickyRowCandidates(e,t){if(this.#F!=null)return null;if(this.#G===0||e<=0||t<=0)return[];let n=[];for(let r=0;r<this.#G;r+=1){let i=e+r*t,a=Math.min(this.#G-1,Math.floor(i/t)),o=this.#te(a,r)??(a>0?this.#te(a-1,r):void 0);if(o==null)break;n.push({row:this.#ee(o),subtreeEndIndex:o.subtreeEndIndex})}return n}getItem(e){let t=this.#H.getPathInfo(e);return t==null?null:this.#Q(t.path,t)}resolveMountedDirectoryPathFromInput(e){let t=this.#H.getPathInfo(e);return t?.kind===`directory`?t.path:null}toggleMountedDirectoryFromInput(e){let t=this.resolveMountedDirectoryPathFromInput(e);t!=null&&this.#ze(t)}selectAllVisiblePaths(){this.#Ie();let e=[...this.#be()];this.#ae(e,this.#c??this.#z)}selectOnlyPath(e){let t=this.#Ne(e);t!=null&&this.#ae([t],t)}selectOnlyMountedPathFromInput(e){this.#ae([e],e)}selectPath(e){let t=this.#Ne(e);t==null||this.#B.has(t)||this.#ae([...this.#B,t])}deselectPath(e){let t=this.#Ne(e);t!=null&&this.#B.has(t)&&this.#ae([...this.#B].filter(e=>e!==t))}toggleFocusedSelection(){this.#c!=null&&this.togglePathSelectionFromInput(this.#c)}togglePathSelection(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.deselectPath(t);return}this.selectPath(t)}}togglePathSelectionFromInput(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.#ae([...this.#B].filter(e=>e!==t),t);return}this.#ae([...this.#B,t],t)}}selectPathRange(e,t){let n=this.#Ne(e);if(n==null)return;this.#Ie();let r=this.#z,i=r==null?-1:this.#Ce(r),a=this.#Ce(n);if(i===-1||a===-1){let e=t?[...this.#B,n]:[n];this.#ae(e,n);return}let[o,s]=i<=a?[i,a]:[a,i],c=this.#be().slice(o,s+1),l=t?[...this.#B,...c]:c;this.#ae(l,r)}extendSelectionFromFocused(e){if(this.#c==null)return;let t=this.#s;if(t===-1)return;let n=Math.min(this.#G-1,Math.max(0,t+e));if(n===t)return;!this.#l&&n>=this.#b.length&&this.#Ie();let r=this.#be(),i=r[t]??null,a=r[n]??null;if(i==null||a==null)return;let o=new Set(this.#B);o.has(i)&&o.has(a)?o.delete(i):o.add(a),this.#ae([...o],this.#z??i,!1),this.#Fe(n)}getDragAndDropConfig(){return this.#r}isDragAndDropEnabled(){return this.#r!=null}getDragSession(){return this.#i==null?null:{draggedPaths:[...this.#i.draggedPaths],primaryPath:this.#i.primaryPath,target:this.#i.target==null?null:{...this.#i.target}}}startDrag(e){if(this.#r==null)return!1;let t=this.#Ne(e);if(t==null||this.#M!=null&&this.#M.length>0)return!1;let n=this.getSelectedPaths(),r=mR(t,n);return this.#r.canDrag?.(r)!==!1&&(n.includes(t)||this.#ae([t],t,!1),this.#Pe(t),this.#i={draggedPaths:r,primaryPath:t,target:null},this.#De(),!0)}setDragTarget(e){let t=this.#i;if(t==null)return;let n=e;if(n!=null){let e=gR(t.draggedPaths,n);(_R(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}hR(t.target,n)||(this.#i={...t,target:n},this.#De())}cancelDrag(){this.#i!=null&&(this.#i=null,this.#De())}completeDrag(){let e=this.#i;if(e==null)return!1;this.#i=null;let t=e.target==null?null:{...e.target};if(t==null)return this.#De(),!1;let n=gR(e.draggedPaths,t);if(_R(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#De(),!1;let r=yR(e.draggedPaths,t);if(r==null)return this.#De(),!1;try{if(r.operations.length===1){let e=r.operations[0];if(e==null||e.type!==`move`)throw Error(`Expected a single move operation for one-item drops`);this.#H.move(e.from,e.to,{collision:e.collision})}else this.#ce(r.operations),this.#H.batch(r.operations)}catch(e){return this.#De(),this.#r?.onDropError?.(e instanceof Error?e.message:String(e),n),!1}return this.#r?.onDropComplete?.(r.result),!0}subscribe(e){return this.#t.add(e),e(),()=>{this.#t.delete(e)}}add(e){this.#H.add(e)}remove(e,t={}){this.#H.remove(e,t)}move(e,t,n={}){this.#H.move(e,t,n)}batch(e){this.#H.batch(e)}onMutation(e,t){let n=e,r=t,i=this.#n.get(n);return i??(i=new Set,this.#n.set(n,i)),i.add(r),()=>{let e=this.#n.get(n);e?.delete(r),e?.size===0&&this.#n.delete(n)}}setSearch(e){this.#Te(e,!0)}openSearch(e=``){this.#Te(e,!0)}closeSearch(){this.#Te(null,!0)}isSearchOpen(){return this.#M!==null}getSearchValue(){return this.#M??``}getSearchMatchingPaths(){return this.#k}focusNextSearchMatch(){this.#we(1)}focusPreviousSearchMatch(){this.#we(-1)}startRenaming(e=this.#c??``,t={}){if(!this.#w)return!1;let n=this.#H.getPathInfo(e);if(n==null)return!1;let r=n.path,i=PR(r),a=LR(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of jR(r))this.#H.isExpanded(e)||this.#H.expand(e);return this.#ae([r],r,!1),this.#M!=null&&(this.#Te(null,!1),this.#y?.(this.#M)),this.#Pe(r),this.#T=r,this.#E=IR(r),this.#D=t.removeIfCanceled??!1,this.#De(),!0}#q(){if(this.#T==null)return;let e=this.#T,t=this.#D;if(this.#T=null,this.#E=``,this.#D=!1,t){this.remove(e,PR(e)?{recursive:!0}:void 0);return}this.#Pe(e),this.#De()}#J(){let e=this.#T;if(e==null)return;if(this.#D&&this.#E.trim().length===0){this.#T=null,this.#E=``,this.#D=!1,this.remove(e,PR(e)?{recursive:!0}:void 0);return}let t=PR(e),n=uR({files:this.#H.list(),isFolder:t,nextBasename:this.#E,path:LR(e)});if(this.#T=null,this.#E=``,this.#D=!1,`error`in n){this.#Pe(e),this.#v?.(n.error),this.#De();return}if(n.sourcePath===n.destinationPath){this.#Pe(e),this.#De();return}this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(RR(n.sourcePath,t),RR(n.destinationPath,t))}#Y(e){this.#T!=null&&this.#E!==e&&(this.#E=e,this.#De())}resetPaths(e,t={}){let n=!Array.isArray(e),r=n?void 0:e,i=n?e:t,a=this.#H.list().length,o=this.#G,s=xR({paths:r,preparedInput:i.preparedInput},`resetPaths`,this.#e.sort),c=this.#le(s.paths,s.preparedInput,i.initialExpandedPaths),l=this.#c,u=this.#T,d=this.getSelectedPaths(),f=this.#z;this.#K?.(),this.#H=c,this.#d.clear(),this.#he();let p=d.map(e=>c.getPathInfo(e)?.path??null).filter(e=>e!=null),m=!AR(this.#B,p);this.#B=new Set(p),m&&(this.#V+=1),this.#z=f==null?null:c.getPathInfo(f)?.path??null,this.#T=u==null?null:c.getPathInfo(u)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#je(l,l!=null||p.length>0||this.#z!=null),this.#K=this.#Re(),this.#De(),this.#Oe({canonicalChanged:!0,operation:`reset`,pathCountAfter:s.paths.length,pathCountBefore:a,projectionChanged:!0,usedPreparedInput:i.preparedInput!=null,visibleCountDelta:this.#G-o})}#X(e){this.#Ie();let t=MR(e),n=NR(e,t),r=null,i=null;for(let e of this.#be()){if(MR(e)!==t)continue;let a=NR(e,t);if(a<n){r=e;continue}if(a>n){i=e;break}}return r??i}#Z(e){let t=this.#Ce(e);if(t!==-1)return t;let n=jR(e);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t==null)continue;let r=this.#Ce(t);if(r!==-1)return r}return this.#be().length>0?0:-1}#Q(e,t){let n=this.#d.get(e);if(n!=null)return n;let r=t??this.#H.getPathInfo(e);if(r==null)return null;let i=r.kind===`directory`?this.#oe(r.path):this.#se(r.path);return this.#d.set(r.path,i),i}#$(e,t,n,r){return{ancestorPaths:r.ancestorPaths,depth:e.depth,flattenedSegments:e.flattenedSegments?.map(e=>({isTerminal:e.isTerminal,name:e.name,path:e.path})),hasChildren:e.hasChildren,index:t,isExpanded:e.isExpanded,isFlattened:e.isFlattened,isFocused:r.path===this.#c,isSelected:this.#B.has(r.path),kind:e.kind,level:e.depth,name:e.name,path:r.path,posInSet:r.posInSet??this.#x[n]??0,setSize:r.setSize??this.#S[n]??0}}#ee(e){return this.#$(e.row,e.index,e.index,{ancestorPaths:e.ancestorPaths,path:e.row.path,posInSet:e.posInSet,setSize:e.setSize})}#te(e,t){let n=this.#H.getVisibleRowContext(e);return n==null?void 0:n.ancestorRows[t]??(t===n.ancestorRows.length&&n.row.kind===`directory`&&n.row.isExpanded?n:void 0)}#ne(e){let t=this.#a.get(e);if(t!=null)return t;let n=this.#u(e),r=n<0?[]:[...this.#ne(n),n];return this.#a.set(e,r),r}#re(e){let t=this.#o.get(e);if(t!=null)return t;let n=this.#ne(e).map(e=>this.#b[e]??``).filter(e=>e!==``);return this.#o.set(e,n),n}#ie(e){this.#H.collapse(e)}#ae(e,t=this.#z,n=!0){let r=[...new Set(e)],i=!AR(this.#B,r),a=this.#z!==t;(i||a)&&(this.#B=new Set(r),this.#z=t,i&&(this.#V+=1),n&&this.#De())}#oe(e){return{collapse:()=>{this.#ie(e)},deselect:()=>{this.deselectPath(e)},expand:()=>{this.#ke(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!0,isExpanded:()=>this.#H.isExpanded(e),isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)},toggle:()=>{this.#ze(e)}}}#se(e){return{deselect:()=>{this.deselectPath(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!1,isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)}}}#ce(e){let t=this.#H.list();this.#le(t).batch(e)}#le(e,t,n){return new aR({...this.#e,paths:e,preparedInput:t??void 0,...n===void 0?{}:{initialExpandedPaths:n}})}#ue(){return this.#h??=this.#H.list(),this.#h}#de(){if(this.#m!=null)return this.#m;let e=new Set;for(let t of this.#ue()){e.add(t);for(let n of jR(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#fe(){return this.#g??=this.#ue().map(FR),this.#g}#pe(){return this.#f??=this.#de().filter(e=>e.endsWith(`/`)),this.#f}#me(){return this.#p??=this.#pe().map(FR),this.#p}#he(){this.#f=null,this.#p=null,this.#m=null,this.#h=null,this.#g=null}#ge(){return this.#pe().filter(e=>this.#H.isExpanded(e))}#_e(e){let t=new Set(this.#j??[]);if(e)for(let e of this.#B)for(let n of jR(e))t.add(n);this.#ve(t)}#ve(e){this.#W=!0;try{for(let t of this.#pe()){let n=e.has(t),r=this.#H.isExpanded(t);n&&!r?this.#H.expand(t):!n&&r&&this.#H.collapse(t)}}finally{this.#W=!1}}#ye(){if(this.#M==null||this.#M.length===0){this.#k=[],this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let e=this.#b;if(this.#k=e.filter(e=>this.#O.has(e)),this.#A!==`hide-non-matches`||this.#O.size===0){this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let t=[],n=[],r=new Map;for(let[i,a]of e.entries())this.#N?.has(a)===!0&&(r.set(a,n.length),t.push(i),n.push(a));this.#F=t,this.#I=n,this.#P=r,this.#G=n.length}#be(){return this.#I??this.#b}#xe(e){return this.#I==null?this.#H.getVisibleIndex(e)??-1:this.#P?.get(e)??-1}#Se(e){return this.#F?.[e]??e}#Ce(e){return this.#P?.get(e)??this.#H.getVisibleIndex(e)??-1}#we(e){let t=this.#k;if(t.length===0)return;let n=this.#c,r=n==null?-1:t.indexOf(n),i=t[r<0?e>0?0:t.length-1:Math.min(t.length-1,Math.max(0,r+e))];i!=null&&this.focusPath(i)}#Te(e,t){let n=e==null?null:zR(e),r=this.#M;if(r!==n){if(r==null&&n!=null&&(this.#j=this.#ge()),this.#M=n,n==null)this.#_e(!0),this.#j=null,this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else if(n.length===0)this.#_e(!1),this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else{let e=this.#Ee();this.#je(e,!0)}t&&(this.#y?.(this.#M),this.#De())}}#Ee(){if(this.#M==null||this.#M.length===0)return this.#O.clear(),this.#c;let e=this.#M,t=this.#ue(),n=this.#fe(),r=[],i=new Set,a=null;for(let o=0;o<t.length;o+=1){if(!n[o].includes(e))continue;let s=t[o];r.push(s),i.add(s),a??=s}let o=this.#pe(),s=this.#me();for(let t=0;t<o.length;t+=1){if(!s[t].includes(e))continue;let n=o[t];i.has(n)||(r.push(n),i.add(n),a??=n)}this.#O=i;let c=this.#A===`hide-non-matches`&&r.length>0?new Set:null;this.#N=c;let l=this.#A===`expand-matches`?new Set(this.#j??[]):new Set;for(let e of r){c?.add(e),e.endsWith(`/`)&&l.add(e);for(let t of jR(e))l.add(t),c?.add(t)}return this.#ve(l),a??this.#c}#De(){for(let e of this.#t)e()}#Oe(e){this.#n.get(e.operation)?.forEach(t=>{t(e)}),this.#n.get(`*`)?.forEach(t=>{t(e)})}#ke(e){for(let t of jR(e))this.#H.isExpanded(t)||this.#H.expand(t);this.#H.isExpanded(e)||this.#H.expand(e)}#Ae(e){let t=this.#G;if(t===0)return;let n=this.#s===-1?0:this.#s,r=Math.min(t-1,Math.max(0,n+e));(r!==n||this.#s===-1)&&(!this.#l&&this.#F==null&&r>=this.#b.length&&this.#Ie(),this.#Fe(r))}#je(e,t=!0){let n=this.#H.getVisibleCount();this.#U=n;let r=GR(this.#H.getVisibleTreeProjectionData(t?void 0:Math.min(n,VR)),e,t?e=>this.#H.getVisibleIndex(e):void 0);this.#a.clear(),this.#o.clear(),this.#l=r.paths.length>=n,this.#u=r.getParentIndex,this.#b=r.paths,this.#x=r.posInSetByIndex,this.#S=r.setSizeByIndex,this.#ye(),this.#s=e==null?this.#be().length>0?0:-1:this.#Z(e),this.#c=this.#s<0?null:this.#Me(this.#s)}#Me(e){return this.#be()[e]??(this.#F==null?this.#H.getVisibleRowContext(e)?.row.path??null:null)}#Ne(e){return this.#H.getPathInfo(e)?.path??null}#Pe(e){if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t,!1)}#Fe(e,t=!0){let n=this.#Me(e);n!=null&&(this.#s!==e||this.#c!==n)&&(this.#s=e,this.#c=n,t&&this.#De())}#Ie(){this.#l||this.#je(this.#c,!0)}#Le(e){let t=TR(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=TR(this.#c,e,!0),r=[...this.#B].map(t=>TR(t,e)).filter(e=>e!=null).map(e=>this.#H.getPathInfo(e)?.path??null).filter(e=>e!=null),i=TR(this.#z,e),a=i==null?null:this.#H.getPathInfo(i)?.path??null,o=[...new Set(r)];return AR(this.#B,o)||(this.#B=new Set(o),this.#V+=1),this.#z=a,n}#Re(){return this.#H.on(`*`,e=>{if(this.#W)return;e.canonicalChanged&&(this.#d.clear(),this.#he()),this.#i!=null&&SR(e)&&(this.#i=null);let t=SR(e)?this.#Le(e):this.#c,n=this.#M!=null&&this.#M.length>0?this.#Ee():this.#M===``?this.#c:t,r=this.#M!=null||e.operation!==`expand`&&e.operation!==`collapse`;this.#je(n,r),this.#De();let i=kR(e);i!=null&&this.#Oe(i)})}#ze(e){if(this.#H.isExpanded(e)){this.#ie(e);return}this.#ke(e)}},qR=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 JR(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 YR(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=[],r=0;for(;;){let e=t.indexOf(`/`,r);if(e===-1)break;n.push(t.slice(0,e+1)),r=e+1}return n}function XR(e,t){return t?`${e}/`:e}function ZR(e,t=null){let n=qR(e==null?void 0:[...e]);if(n===`0`)return null;if(t?.signature===n)return t;let r=new Map,i=new Set,a=new Set,o=new Map;for(let t of e??[]){let e=$R(t);e!=null&&nz({canonicalPath:e.canonicalPath,changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,isDirectory:e.isDirectory,status:t.status,statusByPath:r})}return r.size===0?null:{changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}function QR(e,t){let n=t?.remove??[],r=t?.set??[];if(n.length===0&&r.length===0)return e;let i=new Map(e?.statusByPath),a=new Set(e?.directoriesWithChanges),o=new Set(e?.ignoredDirectoryPaths),s=new Map(e?.changeCountByDirectoryPath),c=!1;for(let e of n){let t=ez(e);t!=null&&(c=tz({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,statusByPath:i})||c)}for(let e of r){let t=$R(e);t!=null&&(c=nz({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,isDirectory:t.isDirectory,status:e.status,statusByPath:i})||c)}return c?i.size===0?null:{changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,signature:az(i),statusByPath:i}:e}function $R(e){return ez(e.path)}function ez(e){let t=JR(e);if(t!=null)return{canonicalPath:XR(t.path,t.isDirectory),isDirectory:t.isDirectory}}function tz({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,statusByPath:i}){let a=i.get(e);return a!=null&&(i.delete(e),a===`ignored`&&e.endsWith(`/`)&&r.delete(e),iz(t,n,e),!0)}function nz({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,isDirectory:i,status:a,statusByPath:o}){let s=o.get(e);return s!==a&&(s??rz(t,n,e),o.set(e,a),a===`ignored`&&i?r.add(e):i&&r.delete(e),!0)}function rz(e,t,n){for(let r of YR(n))e.set(r,(e.get(r)??0)+1),t.add(r)}function iz(e,t,n){for(let r of YR(n)){let n=(e.get(r)??0)-1;n>0?e.set(r,n):(e.delete(r),t.delete(r))}}function az(e){let t=`${e.size}`;for(let[n,r]of e)t+=`\0${n}\0${r}`;return t}var oz=e=>e.trim().toLowerCase(),sz=e=>e.split(`/`).at(-1)??e,cz=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 lz(e,t){return typeof e==`string`?{name:e,remappedFrom:t}:{...e,remappedFrom:t}}function uz(e){let t=lP(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(oz(e),n);let a=Object.entries(t.byFileNameContains??{}).map(([e,t])=>[e.toLowerCase(),t]);return{resolveIcon:(e,o)=>{if(e===`file-tree-icon-file`&&o!=null){let s=sz(o),c=s.toLowerCase(),l=r.get(c);if(l!=null)return lz(l,e);for(let[t,n]of a)if(c.includes(t))return lz(n,e);let u=cz(s);for(let t of u){let n=i.get(t);if(n!=null)return lz(n,e)}let d=sP(t.set,s,u);if(d!=null&&t.set!==`none`){if(d==="default"){let t=n?.[e];if(t!=null)return lz(t,e)}return{name:aP(d),remappedFrom:e,token:d}}}let s=n?.[e];return s==null?{name:e}:lz(s,e)}}}var dz,fz,pz,mz,hz,gz,_z,vz,yz,bz,xz={},Sz=[],Cz=Array.isArray,wz=Sz.slice,Tz=Object.assign;function Ez(e){e&&e.parentNode&&e.remove()}function Dz(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?wz.call(arguments,2):n),Oz(e,o,r,i,null)}function Oz(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??++fz,__i:-1,__u:0};return i==null&&dz.vnode!=null&&dz.vnode(a),a}function kz(e){return e.children}function Az(e,t){this.props=e,this.context=t,this.__g=0}function jz(e,t){if(t==null)return e.__?jz(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`?jz(e):null}function Mz(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 Mz(e)}}function Nz(e){(8&e.__g||!(e.__g|=8)||!pz.push(e)||hz++)&&mz==dz.debounceRendering||((mz=dz.debounceRendering)||queueMicrotask)(Pz)}function Pz(){for(var e,t,n,r,i,a,o,s,c=1;pz.length;)pz.length>c&&pz.sort(gz),e=pz.shift(),c=pz.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=Tz({},r)).__v=r.__v+1,dz.vnode&&dz.vnode(n),Hz(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??jz(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,Wz(a,n,o),n.__e!=i&&Mz(n)));hz=0}function Fz(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||Sz,b=t.length;for(c=Iz(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?xz:y[m.__i]||xz,m.__i=f,_=Hz(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&qz(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=Lz(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function Iz(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?Oz(null,o,null,null,null):Cz(o)?Oz(kz,{children:o},null,null,null):o.constructor==null&&o.__b>0?Oz(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=Rz(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=jz(s)),Jz(s,s));return r}function Lz(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=Lz(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=jz(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Rz(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&e.key==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function zz(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function Bz(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||zz(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||zz(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(_z,`$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=vz,e.addEventListener(t,a?bz:yz,a)):e.removeEventListener(t,a?bz:yz,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 Vz(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=vz++;else if(t.u<n.l)return;return n(dz.event?dz.event(t):t)}}}function Hz(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=dz.__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 Az(v,x),f.constructor=M,f.render=Yz),b&&b.sub(f),f.props=v,f.state||(f.state={}),f.context=x,f.__n=r,p=!0,f.__g|=8,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&M.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=Tz({},f.__s)),Tz(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=dz.__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=Tz({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),E=d,d!=null&&d.type===kz&&d.key==null&&(E=Gz(d.props.children)),s=Fz(e,Cz(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--;)Ez(a[j]);Uz(t)}}else t.__e=n.__e,t.__k=n.__k,e.then||Uz(t);dz.__e(e,t,n)}else s=t.__e=Kz(n.__e,t,n,r,i,a,o,c,l,u);return(d=dz.diffed)&&d(t),128&t.__u?void 0:s}function Uz(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(Uz)}function Wz(e,t,n){for(var r=0;r<n.length;r++)qz(n[r],n[++r],n[++r]);dz.__c&&dz.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){dz.__e(e,t.__v)}})}function Gz(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:Cz(e)?e.map(Gz):Tz({},e)}function Kz(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&&=(dz.__m&&dz.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=wz.call(e.childNodes),v=n.props||xz,!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;Bz(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&&!_||Bz(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=``),Fz(b==`template`?e.content:e,Cz(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&jz(n,0),s,c,l),a!=null)for(u=a.length;u--;)Ez(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||Bz(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&Bz(e,u,g,v[u],i))}return e}function qz(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){dz.__e(e,n)}}function Jz(e,t,n){var r,i;if(dz.unmount&&dz.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||qz(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){dz.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Jz(r[i],t,n||typeof e.type!=`function`);n||Ez(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function Yz(e,t,n){return this.constructor(e,n)}function Xz(e,t){var n,r,i,a;t==document&&(t=document.documentElement),dz.__&&dz.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=Dz(kz,null,[e]),i=[],a=[],Hz(t,e,r||xz,xz,t.namespaceURI,r?null:t.firstChild?wz.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),Wz(i,e,a)}function Zz(e,t){e.__u|=32,Xz(e,t)}dz={__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 hz=0,e}},fz=0,Az.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Tz({},this.state);typeof e==`function`&&(e=e(Tz({},n),this.props)),e&&Tz(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Nz(this))},Az.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),Nz(this))},Az.prototype.render=kz,pz=[],hz=0,gz=function(e,t){return e.__v.__b-t.__v.__b},_z=/(PointerCapture)$|Capture$/i,vz=0,yz=Vz(!1),bz=Vz(!0);var Qz=0;Array.isArray;function $(e,t,n,r,i,a){t||={};var o,s,c=t;if(`ref`in c&&typeof e!=`function`)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Qz,__i:-1,__u:0,__source:i,__self:a};return dz.vnode&&dz.vnode(l),l}var $z=16,eB=16,tB={};function nB({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}=tB[e]??{width:$z,height:eB},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return $(`svg`,{"data-icon-name":t??e,"data-icon-token":n,"data-align-capitals":s,...o==null?{"aria-hidden":!0}:{"aria-label":o,role:`img`},viewBox:m,width:f,height:p,children:$(`use`,{href:c})})}var rB=e=>e!==void 0&&/\s/.test(e),iB=(e,t)=>{let n=t=>rB(e[t-1])||rB(e[t]);if(!n(t))return t;for(let r=1;r<e.length;r++){let i=t-r;if(i>0&&!n(i))return i;let a=t+r;if(a<e.length&&!n(a))return a}return t},aB=e=>iB(e,Math.ceil(e.length/2)),oB=e=>{if(e.length<2)return[e,``];let t=aB(e);return[e.slice(0,t),e.slice(t)]},sB=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:aB(e);return[e.slice(0,r),e.slice(r)]},cB=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)]},lB=(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)]},uB=(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)]},dB=(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 fB({children:e,marker:t,variant:n=`default`}){"use no memo";return $(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:$(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?$(`span`,{"data-truncate-fade":!0}):t})})}function pB(e){"use no memo";let{mode:t,children:n}=e;return $(`div`,{children:[$(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?$(`span`,{children:n}):n}),$(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?$(`span`,{children:n}):n})]})}function mB({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=$(pB,{mode:t,children:e},`content`),o=$(fB,{marker:n,mode:t,variant:r},`marker`),s=$(`div`,{"data-truncate-fill":!0},`fill`);return $(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:$(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function hB({children:e,...t}){"use no memo";return $(mB,{mode:`truncate`,...t,children:e})}function gB({children:e,...t}){"use no memo";return $(mB,{mode:`fruncate`,...t,children:e})}function _B({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=$(hB,{...s,children:t[0]}),l=$(gB,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return $(`div`,{className:a,style:o});if(e.length<i)return $(n===`end`?gB:hB,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=oB:r===`extension`?t=sB:r===`leaf-path`&&(t=cB);else if(typeof r==`number`)t=lB,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=uB:e===`first`&&(t=dB)}else typeof r==`function`&&(t=r);t??=oB;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=$(hB,{...s,..._,children:f}),l=$(gB,{...s,...v,children:p})}return $(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[$(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),$(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var vB={endIndex:-1,startIndex:-1};function yB(e,t,n){return Math.min(Math.max(e,t),n)}function bB(e,t){return e<0||t<e?vB:{endIndex:t,startIndex:e}}function xB(e){return e.startIndex<0||e.endIndex<e.startIndex}function SB(e,t){return xB(e)?0:(e.endIndex-e.startIndex+1)*t}function CB(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function wB(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function TB(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 EB(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 DB(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 OB(e,t,n){if(e.length===0||t<=0)return[];let r=DB(e),i=TB(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=EB(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 kB(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=yB(t.scrollTop,0,o),c=t.stickyRows??OB(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=CB(s,n,t.itemHeight),m=CB(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?vB:bB(m,wB(u+d,n,t.itemHeight)),y=g+1,b=xB(v)?vB:bB(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=SB(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:xB(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var AB={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},jB={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},MB=`Contains git status items`;function NB(e){return e.current?!0:(e.current=!0,!1)}function PB(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 FB(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,offset:i,topInset:a=0,totalHeight:o,viewportHeight:s}=e;if(i===`nearest`)return PB({currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:a,viewportHeight:s});if(n<0)return null;let c=Math.max(0,a),l=n*r,u=Math.max(0,s-c),d=i===`center`?c+Math.max(0,(u-r)/2):c,f=Math.max(0,o-s),p=Math.max(0,Math.min(l-d,f));return p===t?null:p}function IB(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,targetViewportOffset:i,totalHeight:a,viewportHeight:o}=e;if(n<0)return null;let s=Math.max(0,i),c=n*r,l=c+r,u=t+s,d=t+o;if(c>=u&&l<=d)return null;let f=Math.max(0,a-o),p=Math.max(0,Math.min(c-s,f));return p===t?null:p}function LB(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 RB(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 zB(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function BB(e,t){return e!=null&&e>0?e:t}function VB(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 HB(e,t,n,r,i=0){let a=PB({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a!=null&&(e.scrollTop=a,!0)}function UB(e,t,n,r,i,a,o=0){let s=FB({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,offset:a,topInset:o,totalHeight:i,viewportHeight:r});return s!=null&&(e.scrollTop=s,!0)}function WB(e,t,n,r,i,a){let o=IB({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o!=null&&(e.scrollTop=o,!0)}function GB(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function KB(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function qB({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return $(`input`,{ref:n,"data-item-rename-input":!0,...t?{"data-item-flattened-rename-input":!0}:{},"aria-label":e,value:r,onBlur:i,onInput:a,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()})}function JB(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 YB(e){let{event:t,mode:n,isSearchOpen:r,isDirectory:i}=e,a=t.ctrlKey||t.metaKey,o=t.shiftKey||a,s=t.shiftKey?{additive:a,kind:`range`}:a?{kind:`toggle`}:{kind:`single`};return{closeSearch:r,revealCanonical:n===`sticky`,selection:s,toggleDirectory:!o&&i}}var XB,ZB,QB,$B,eV=Object.is,tV=0,nV=[],rV=dz,iV=rV.__b,aV=rV.__r,oV=rV.diffed,sV=rV.__c,cV=rV.unmount,lV=rV.__;function uV(e,t){rV.__h&&rV.__h(ZB,e,tV||t),tV=0;var n=ZB.__H||(ZB.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function dV(e){return tV=1,fV(wV,e)}function fV(e,t,n){var r=uV(XB++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):wV(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);eV(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=ZB,!ZB.__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,eV(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};ZB.__f=!0;var a=ZB.shouldComponentUpdate,o=ZB.componentWillUpdate;ZB.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)},ZB.shouldComponentUpdate=i}return r.__N||r.__}function pV(e,t){var n=uV(XB++,3);!rV.__s&&CV(n.__H,t)&&(n.__=e,n.u=t,ZB.__H.__h.push(n))}function mV(e,t){var n=uV(XB++,4);!rV.__s&&CV(n.__H,t)&&(n.__=e,n.u=t,ZB.__h.push(n))}function hV(e){return tV=5,gV(function(){return{current:e}},[])}function gV(e,t){var n=uV(XB++,7);return CV(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function _V(e,t){return tV=8,gV(function(){return e},t)}function vV(){for(var e;e=nV.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(xV),e.__H.__h.forEach(SV),e.__H.__h=[]}catch(t){e.__H.__h=[],rV.__e(t,e.__v)}}rV.__b=function(e){ZB=null,iV&&iV(e)},rV.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),lV&&lV(e,t)},rV.__r=function(e){aV&&aV(e),XB=0;var t=(ZB=e.__c).__H;t&&(QB===ZB?(t.__h=[],ZB.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(xV),t.__h.forEach(SV),t.__h=[],XB=0)),QB=ZB},rV.diffed=function(e){oV&&oV(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(nV.push(t)!==1&&$B===rV.requestAnimationFrame||(($B=rV.requestAnimationFrame)||bV)(vV)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),QB=ZB=null},rV.__c=function(e,t){t.some(function(e){try{e.__h.forEach(xV),e.__h=e.__h.filter(function(e){return!e.__||SV(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],rV.__e(n,e.__v)}}),sV&&sV(e,t)},rV.unmount=function(e){cV&&cV(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{xV(e)}catch(e){t=e}}),n.__H=void 0,t&&rV.__e(t,n.__v))};var yV=typeof requestAnimationFrame==`function`;function bV(e){var t,n=function(){clearTimeout(r),yV&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);yV&&(t=requestAnimationFrame(n))}function xV(e){var t=ZB,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),ZB=t}function SV(e){var t=ZB;e.__c=e.__(),ZB=t}function CV(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!eV(t,e[n])})}function wV(e,t){return typeof t==`function`?t(e):t}function TV(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:$(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return $(kz,{children:[$(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:$(hB,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function EV(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function DV(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function OV(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 kV({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=kB(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:OV(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?OV(u,1,t,o):i&&r<=0&&c.length>0?OB(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 AV=400,jV=40,MV=18;function NV(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))?PV(e,t,n):a instanceof HTMLElement?a:null}function PV(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 FV(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 IV(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 LV(){return navigator.vendor!==`Apple Computer, Inc.`}function RV(e,t){let n=e-t.top;if(n<jV)return-Math.ceil((jV-Math.max(0,n))/jV*MV);let r=t.bottom-e;return r<jV?Math.ceil((jV-Math.max(0,r))/jV*MV):0}function zV(e,t){if(e!=null){let t=AB[e];return t==null?null:{text:t,title:jB[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:MB}:null}function BV(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 VV(e){return e!=null&&`toggle`in e}function HV(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function UV(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function WV(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function GV(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function KV(e,t){return t&&GV(e)||(e.ctrlKey||e.metaKey)&&HV(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var qV=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function JV(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 YV(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 XV(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function ZV(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function QV(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function $V(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 eH(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 tH(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 nH(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=tH(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 rH(e,t){return{kind:e.kind,name:DV(e),path:t}}function iH(e){return e==null?void 0:`${e}__tree`}function aH(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function oH(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function sH(e,t){if(e==null)return null;if(`text`in e)return e.parts==null?$(`span`,{title:e.title,children:e.text}):$(`span`,{title:e.title,children:e.parts.map((e,t)=>$(`span`,{style:{color:e.color},children:e.text},t))});let n=typeof e.icon==`string`?oH(e.icon)?t(e.icon):{name:e.icon}:oH(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return $(`span`,{title:e.title,children:$(nB,{...n})})}function cH(e){e!=null&&LB(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function lH(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=EV(e);return $(kz,{children:[e.depth>0?$(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>$(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,$(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?$(nB,{...t(`file-tree-icon-chevron`)}):$(nB,{...t(`file-tree-icon-file`,u)})}),$(`div`,{"data-item-section":`content`,children:e.isFlattened?TV(e,c,a):c??$(_B,{minimumLength:5,split:`extension`,children:e.name})}),i?$(`div`,{"data-item-section":`decoration`,children:r==null?null:sH(r,t)}):null,s?$(`div`,{"data-item-section":`git`,children:sH(o,t)}):null,n?$(`div`,{"data-item-section":`action`,children:l?$(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:$(nB,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function uH(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=EV(t),{isParked:F=!1,mode:I=`flow`,style:L}=r,R=I===`sticky`,z=_?.get(P)??null??BV(t.ancestorPaths,v,y),B=t.kind===`directory`&&(b?.has(P)??!1),V=A(t,P),H=zV(z,B),U=S&&w,ee=V!=null||x||U,te=U&&T===`always`,ne=a.getPath()===P,W=ne?a.getValue():``,re=R||!ne?null:$(qB,{ref:D,ariaLabel:`Rename ${DV(t)}`,isFlattened:t.isFlattened,value:W,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),ie=lH(t,k,{actionLaneEnabled:U,customDecoration:V,decorationLaneEnabled:ee,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:H,gitLaneActive:x,renameInput:re,showDecorativeActionAffordance:te}),ae={...JB({ariaLabel:DV(t),domId:t.isFocused?aH(h,P,F):void 0,extraStyle:L,features:{actionLaneEnabled:U,contextMenuButtonVisibility:U?T:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:F,itemHeight:g,mode:I,row:t,state:{containsGitChange:B,effectiveGitStatus:z,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.focusMountedPathFromInput(P),j(t,P,{anchorRect:XV(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:R?void 0:()=>{i.focusMountedPathFromInput(P)},onKeyDown:R?void 0:N,ref:e=>{O(P,e)}};return!R&&ne?$(`div`,{...ae,children:ie}):$(`button`,{...ae,type:`button`,draggable:u&&!F,onDragEnd:u&&!F?p:void 0,onDragStart:u&&!F?e=>{f(e,t,P)}:void 0,onMouseDown:e=>{if(R){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!F?e=>{m(e,t,P)}:void 0,onClick:e=>{M(e,t,P,I)},children:ie})}function dH(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(EV(e))).map((n,r)=>uH(e,n,t.start+r))}function fH({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=fP,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 _=hV(null),v=hV(null),y=hV(!1),b=hV(null),x=hV(null),S=hV(null),C=hV(null),w=hV(null),T=hV(new Map),E=hV(new Map),D=hV(()=>{}),O=hV(null),k=hV(0),A=hV(!1),j=hV(null);j.current!==t&&(A.current=!1,j.current=t);let M=hV(!1),N=hV(null),P=hV(null),F=hV(!1),I=hV(null),L=hV(null),R=hV(null),z=hV(null),B=hV(null),V=hV(null),H=hV(null),U=hV(null),ee=hV(!1),te=hV(null),ne=hV(null),W=hV(null),re=hV(null),ie=gV(()=>new Map,[]),[,ae]=dV(0),G=hV(!1),[oe,se]=dV(null),[ce,le]=dV(null),[ue,de]=dV(null),[fe,pe]=dV(null),[me,he]=dV(0),[ge,_e]=dV(null),ve=hV(ge);ve.current=ge;let ye=hV(null),be=hV(null),xe=hV(null),Se=hV(null),Ce=hV(null),we=hV(!1),Te=()=>{be.current=null,xe.current=null,Se.current=null},Ee=(e,t)=>{be.current=e,xe.current=null,Se.current=t==null?null:{path:e,scrollTop:t}},De=(e,t)=>{be.current=null,xe.current={path:e,viewportOffset:t},Se.current=null},Oe=hV(d===`retain`&&t.isSearchOpen()),[ke,Ae]=dV(p);pV(()=>{p||Ae(!1)},[p]);let je=hV(!1),Me=_V(()=>{je.current=!0,Ae(e=>e&&!1)},[]),[Ne,Pe]=dV(()=>kV({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[Fe,Ie]=dV(!1);pV(()=>{Ie(!0)},[]);let Le=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,Re=e?.contextMenu?.triggerMode??(Le?`right-click`:`both`),ze=Re===`both`||Re===`button`,Be=e?.contextMenu?.buttonVisibility??`when-needed`,Ve=Re===`both`||Re===`right-click`;mV(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;Ce.current=t,le(t),pe(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(we.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 He=_V((e,t)=>{QV(T.current,e,t)},[]),K=_V((e,t)=>{QV(E.current,e,t)},[]),Ue=_V(e=>{x.current=e},[]),We=_V(e=>$V(e,E.current,T.current),[]),Ge=n!=null||r!=null||i!=null,{resolveIcon:Ke}=gV(()=>uz(a),[a]),qe=t[BR](),Je=qe.getPath(),Ye=Je!=null,Xe=t.isSearchOpen(),Ze=t.getSearchValue(),Qe=t.getFocusedPath(),$e=t.getFocusedIndex(),et=t.getScrollRequest(),tt=t.isDragAndDropEnabled(),nt=t.getDragSession(),rt=gV(()=>nt==null?null:new Set(nt.draggedPaths),[nt]),it=nt?.target??null,at=nt?.primaryPath??null,ot=iH(o),{overlayHeight:st,overlayRows:ct,snapshot:lt,visibleRows:ut}=Ne,dt=lt.physical.viewportHeight,ft=gV(()=>({end:lt.window.endIndex,start:lt.window.startIndex}),[lt.window.endIndex,lt.window.startIndex]),pt=ct,mt=lt.sticky.rows,ht=lt.physical.totalHeight,gt=lt.sticky.height,q=gV(()=>new Set(mt.map(e=>EV(e.row))),[mt]),_t=$e>=0&&$e>=ft.start&&$e<=ft.end,vt=_V((e,t)=>u?.({item:rH(e,t),row:e})??null,[u]),yt=_V(e=>LB(e==null?null:T.current.get(e)??null)?!0:LB(S.current),[]),bt=_V(e=>{yt(t.focusNearestPath(e))},[t,yt]),xt=hV(bt);xt.current=bt;let St=hV(!0),Ct=hV(()=>{}),wt=_V((t=!0)=>{let n=ve.current;n!=null&&(St.current=St.current&&t,_e(null),e?.contextMenu?.onClose?.(),St.current&&bt(n.path))},[e?.contextMenu,bt]);Ct.current=wt;let Tt=_V(e=>{let t=e==null?null:ZV(S.current,e);de(e=>e===t?e:t)},[]),Et=_V((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=We(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;Ee(n,e?.scrollTop??null),M.current=!0,se(e=>e===n?e:n)}i.focus(),Tt(a),St.current=!0,_e({anchorRect:r?.anchorRect??null,item:rH(e,n),path:n,source:r?.source??`keyboard`})},[t,We,Tt]),Dt=_V(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=zB(e,dt);I.current=$e<0||e==null?null:Math.max(0,Math.min($e*s-e.scrollTop,Math.max(0,t-s))),F.current=!0}t.startRenaming(e)!==!1&&(pe(`focus`),ae(e=>e+1))}},[t,$e,s,l,dt]),Ot=_V((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=zB(i,dt),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:kV({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return M.current=!0,WB(i,a,s,l,u,d),D.current(),ye.current=n?e:null,!0},[t,s,c,dt,h]),kt=()=>y.current===!0||re.current!=null||ee.current===!0,At=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),jt=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},Mt=()=>{z.current!=null&&(clearTimeout(z.current),z.current=null),R.current=null},Nt=()=>{V.current?.remove(),V.current=null},Pt=()=>{jt(L.current),L.current=null,B.current=null},Ft=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},It=()=>{U.current?.(),U.current=null,re.current!=null&&(clearTimeout(re.current),re.current=null),ee.current=!1,te.current=null,W.current=null,ne.current!=null&&(ne.current.setAttribute(`draggable`,`true`),ne.current.style.removeProperty(`touch-action`),ne.current=null),Nt(),Mt(),Pt(),H.current=null},Lt=(e,n)=>{let r=S.current?.getRootNode(),i=FV(NV(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},Rt=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){Mt();return}let r=t.getItem(e.directoryPath),i=VV(r)?r:null;if(i==null||i.isExpanded()){Mt();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;R.current!==a&&(Mt(),R.current=a,z.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind===`directory`&&n.directoryPath===e.directoryPath&&n.flattenedSegmentPath===e.flattenedSegmentPath&&i.expand()},n))},zt=()=>{L.current=null;let e=B.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=RV(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()),Rt(Lt(e.clientX,e.clientY)),L.current=At(zt)},Bt=(e,t)=>{B.current={clientX:e,clientY:t},L.current??=At(zt)},Vt=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(It(),Nt(),Mt(),Pt(),t.startDrag(r)===!1){e.preventDefault();return}if(H.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),LV())){let t=IV(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),Ft(t),V.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},Ht=()=>{Nt(),Mt(),Pt(),H.current=null,t.cancelDrag()},Ut=(e,n,r)=>{if(re.current!=null||ee.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;W.current={clientX:i.clientX,clientY:i.clientY},ne.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!ee.current;re.current!=null&&(clearTimeout(re.current),re.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),U.current===o&&(U.current=null),t&&(a.setAttribute(`draggable`,`true`),ne.current===a&&(ne.current=null),W.current=null)},s=e=>{let t=e.touches[0],n=W.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=100||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),U.current=o,re.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),ne.current===a&&(ne.current=null),W.current=null;return}ee.current=!0,ne.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),H.current=n;let e=a.getBoundingClientRect(),s=IV(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`}),Ft(s),V.current=s,te.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=te.current;n!=null&&V.current!=null&&(V.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),Rt(Lt(t.clientX,t.clientY)),Bt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Lt(n.clientX,n.clientY),t.completeDrag(),It()},u=()=>{t.cancelDrag(),It()};U.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)},AV)},Wt=e=>{if(ge!=null){if(e.key===`Escape`){wt(),e.preventDefault(),e.stopPropagation();return}qV.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(qe.isActive()){if(e.isComposing||e.keyCode===229)return;if(e.key===`Escape`)qe.cancel();else if(e.key===`Enter`)qe.commit();else return;pe(`focus`),ae(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){Dt(Qe??void 0),e.preventDefault(),e.stopPropagation();return}if(Xe){if(e.key===`Escape`)F.current=!1,I.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=zB(n,dt);I.current=$e<0||n==null?null:Math.max(0,Math.min($e*s-n.scrollTop,Math.max(0,r-s))),F.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;pe(`focus`),ae(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&UV(e)){t.openSearch(e.key),ae(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=Le&&GV(e),r=KV(e,Le),i=r&&S.current!=null?RB(S.current):null,a=r?new Set(eH(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==Qe&&a.has(o)){let e=C.current;Ee(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=VV(p)?p:null,h=u!=null&&(q.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=$V(u,E.current,T.current);e==null||n==null?y=!1:Et(e,u)}else if((e.ctrlKey||e.metaKey)&&HV(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;pe(`focus`);let b=t.getFocusedPath(),x=b!=null&&(q.has(b)||a.has(b)),w=g&&b!==u,D=n&&c&&o===u&&b===u;if((h||D)&&b!=null&&(w&&x||D))Ee(b,v?.scrollTop??null),M.current=!0,se(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(De(b,nH(S.current,v,i,u,s,gt,dt)),M.current=!0,se(e=>e===b?e:b)):Te()}ae(e=>e+1),e.preventDefault(),e.stopPropagation()};mV(()=>{if(f&&Xe){if(Oe.current){Oe.current=!1;return}LB(w.current)}},[Xe,f]),mV(()=>{let e=x.current;switch(KB({hasRenderedInput:e!=null,previousRenamingPath:P.current,renamingPath:Je})){case`reset`:P.current=null;return;case`reveal-canonical`:Je!=null&&Ot(Je,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(ye.current=null,P.current=Je,LB(e),e.select());return}},[ft.end,ft.start,Je,Ot,q]),mV(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=RB(e)?.dataset.itemPath??null;se(e=>e===t?e:t)},i=()=>{n(),M.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,RB(e)!=null){r();return}M.current=!1,se(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),M.current=!1,se(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;se(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),mV(()=>{let e=S.current;e!=null&&(lt.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[lt.physical.scrollTop]),mV(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;O.current=zB(n,g);let a=()=>{let e=t.getVisibleCount(),r=BB(O.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),Pe(kV({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};if(!A.current){A.current=!0;let e=t.getFocusedIndex();if(e>=0){let r=BB(O.current,g),i=t.getVisibleRows(e,e)[0]??null;HB(n,e,s,r,h&&i!=null?Math.max(0,Math.min(i.ancestorPaths.length*s,Math.max(0,r-s))):0)}}D.current=a;let o=t.subscribe(()=>{NB(G)&&ae(e=>e+1),a()}),l=()=>{we.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,he(e=>e+1),e=null},50))},u=null,d=()=>{i!=null&&delete i.dataset.overlayReveal,u!=null&&(clearTimeout(u),u=null)},f=()=>{i!=null&&we.current!==!0&&(n.scrollTop>0||(i.dataset.overlayReveal=`true`,u!=null&&clearTimeout(u),u=setTimeout(()=>{d()},200)))},p=()=>{if(a(),n.scrollTop>0&&d(),ve.current!=null&&y.current&&Ct.current(),we.current===!0){y.current=!1;return}le(e=>e==null?e:null),l()},m=()=>{l(),f()},_=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),v=e=>{_.has(e.key)&&m()};n.addEventListener(`scroll`,p,{passive:!0}),n.addEventListener(`wheel`,m,{passive:!0}),n.addEventListener(`touchmove`,m,{passive:!0}),n.addEventListener(`keydown`,v);let x=typeof ResizeObserver<`u`?new ResizeObserver(e=>{O.current=(e[0]==null?null:VB(e[0]))??zB(n,g),a()}):null;return x?.observe(n),()=>{D.current=()=>{},o(),n.removeEventListener(`scroll`,p),n.removeEventListener(`wheel`,m),n.removeEventListener(`touchmove`,m),n.removeEventListener(`keydown`,v),e!=null&&clearTimeout(e),u!=null&&clearTimeout(u),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,O.current=null,x?.disconnect()}},[t,g,s,c,h]),mV(()=>{Le||ge==null||wt(!1)},[wt,Le,ge]);let Gt=gV(()=>ge==null?null:`${ge.path}::${ge.source}`,[ge]);mV(()=>{if(Gt==null){m?.clearSlotContent(VM);return}let t=ve.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??YV(n.getBoundingClientRect()),close:e=>{Ct.current(e?.restoreFocus??!0)},restoreFocus:()=>{St.current&&xt.current(ve.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(VM,i),e?.contextMenu?.onOpen?.(t.item,r),cH(i),queueMicrotask(()=>{i!=null&&i.isConnected&&document.activeElement===i&&cH(i)}),()=>{m?.clearSlotContent(VM)}},[Gt,e?.contextMenu,m]),mV(()=>{ge!=null&&t.getItem(ge.path)==null&&wt()},[wt,ge,t]),mV(()=>{if(ge==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(JV(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&wt())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),wt())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[wt,ge]),mV(()=>{let e=C.current,n=S.current;if(e==null||n==null){N.current=Qe;return}let r=Qe==null?null:T.current.get(Qe)??null,i=RB(n),a=i?.dataset.itemPath??null,o=Ye&&x.current===i,c=f&&w.current===i,l=F.current&&!Xe,u=I.current??0,d=ye.current,p=be.current,m=xe.current,g=Se.current,_=i!=null,v=M.current||_,y=N.current!==Qe,b=p!=null&&p===Qe&&Qe!=null,E=!1,O=!1;if(et!=null&&et.id!==k.current){k.current=et.id;let n=et.visibleIndex,r=t.getVisibleRows(n,n)[0]??null;if(r!=null){let t=h?Math.max(0,Math.min(r.ancestorPaths.length*s,Math.max(0,dt-s))):gt;E=!0,O=UB(e,n,s,dt,ht,et.offset,t)}t.clearScrollRequest(et.id)}let A=!E&&l&&WB(e,$e,s,dt,ht,u),j=!E&&d!=null&&d===Qe&&WB(e,$e,s,dt,ht,gt),P=!E&&m!=null&&m.path===Qe&&WB(e,$e,s,dt,ht,m.viewportOffset),L=!E&&g!=null&&g.path===Qe&&e.scrollTop!==g.scrollTop;if(L&&(e.scrollTop=g.scrollTop),(L||O||j||P||A||v&&y&&d!==Qe&&!b&&HB(e,$e,s,dt,gt))&&D.current(),E){N.current=Qe;return}if(!v){N.current=Qe;return}if(o){N.current=Qe;return}if(c&&!l){N.current=Qe;return}if(r==null){l&&$e>=0&&(WB(e,$e,s,dt,ht,u),D.current()),N.current=Qe;return}(y||l||d===Qe||p===Qe||m?.path===Qe||g?.path===Qe||a==null||a!==Qe)&&(LB(r),d===Qe&&(ye.current=null),p===Qe&&(be.current=null),m?.path===Qe&&(xe.current=null),g?.path===Qe&&(Se.current=null),F.current=!1,I.current=null),N.current=Qe},[t,$e,Qe,_t,s,Ye,Xe,ft,dt,f,et,h,gt,ht,ut]);let Kt=$e>=0&&$e>=lt.visible.startIndex&&$e<=lt.visible.endIndex,qt=Qe!=null&&pt.some(e=>EV(e.row)===Qe),Jt=Kt||qt,Yt=ze&&M.current===!0&&Jt?Qe:null,Xt=fe===`pointer`?ce:null,Zt=ge?.path??Ce.current??Xt??Yt??ce,Qt=ge?.source===`right-click`;mV(()=>{y.current&&ge==null||Tt(We(Zt))},[ge,We,ft,dt,me,pt,Zt,Tt,ut]);let $t=_V(e=>{if(y.current||JV(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&&pe(e=>e===`pointer`?e:`pointer`),le(e=>e===i?e:i)},[]),J=_V(()=>{le(null)},[]);mV(()=>{if(!tt)return;let e=()=>{It(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),It(),t.cancelDrag()}},[t,tt]);let en=e=>{if(!tt||t.getDragSession()==null||ee.current)return;let n=FV(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),Rt(t.getDragSession()?.target??null),Bt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},tn=e=>{if(!tt||t.getDragSession()==null||ee.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(Mt(),Pt(),t.setDragTarget(null))},Y=e=>{tt&&t.getDragSession()!=null&&!ee.current&&(e.preventDefault(),Lt(e.clientX,e.clientY),t.completeDrag(),Nt(),Mt(),Pt(),H.current=null)},nn=lt.window.height,rn=lt.window.offsetTop,an=Math.min(0,dt-nn),on=Math.min(0,dt-nn-gt),sn=oe===Qe||F.current,cn=Qe!=null&&sn&&!_t&&$e>=0?ut[$e]??t.getVisibleRows($e,$e)[0]??null:null,ln=cn==null?null:GB($e,s,ft,nn),un=H.current,dn=at!=null&&un!=null&&un.path===at&&un.index>=ft.start&&un.index<=ft.end,fn=at!=null&&un!=null&&un.path===at&&!dn&&un.path!==cn?.path?un:null,pn=fn==null?null:GB(fn.index,s,ft,nn),mn=WV(($e>=0?ut[$e]??t.getVisibleRows($e,$e)[0]??null:null)?.ancestorPaths.at(-1)??null),hn=Xe&&Qe!=null?aH(o,Qe,!_t):void 0,gn=ge?.path??(Xe?Qe:oe),_n=ge?.path??ce,vn=We(Zt),yn=Le&&ze&&!Qt&&!Ye&&vn!=null&&ue!=null&&Zt!=null,X=Le&&(yn||ge!=null),bn=ge?.anchorRect,xn=bn==null&&vn!=null&&ue!=null&&(ge!=null||yn)?ue:null,Sn=bn==null?xn==null?void 0:{top:`${xn}px`}:{left:`${bn.left}px`,position:`fixed`,right:`auto`,top:`${bn.top}px`},Cn=Qt?{opacity:`0`}:void 0,wn=_V((e,n,r,i)=>{let a=YB({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:Xe,mode:i}),o=a.toggleDirectory&&n.kind===`directory`,s=o?t.resolveMountedDirectoryPathFromInput(r):null;if(o&&s==null)return;let c=s??r;switch(a.selection.kind){case`range`:t.selectPathRange(c,a.selection.additive);break;case`toggle`:t.togglePathSelectionFromInput(c);break;case`single`:t.selectOnlyMountedPathFromInput(c)}let l=e.currentTarget instanceof HTMLElement?e.currentTarget:null,u=n.index>=lt.visible.startIndex&&n.index<=lt.visible.endIndex,d=i===`flow`&&u&&l!=null&&l.dataset.itemParked!==`true`;t.focusMountedPathFromInput(c),d&&(M.current=!0,se(e=>e===c?e:c),pe(`focus`)),o&&t.toggleMountedDirectoryFromInput(c),a.closeSearch&&t.closeSearch(),a.revealCanonical&&Ot(c,{targetOffset:`sticky-parents`})},[t,Xe,lt.visible.endIndex,lt.visible.startIndex,Ot]),Tn=()=>{if(y.current||!ze||Zt==null||vn==null)return;let e=t.getItem(Zt);e!=null&&(Tt(vn),St.current=!0,_e({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:vn.getAttribute(`aria-label`)??Zt,path:e.getPath()},path:e.getPath(),source:`button`}))},En={contextHoverPath:_n,contextMenuButtonTriggerEnabled:ze,contextMenuButtonVisibility:Be,contextMenuEnabled:Le,contextMenuRightClickEnabled:Ve,contextMenuTriggerMode:Re,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:tt,draggedPathSet:rt,dragTarget:it,gitLaneActive:Ge,gitStatusByPath:n,handleRowDragEnd:Ht,handleRowDragStart:Vt,handleRowTouchStart:Ut,ignoredGitDirectories:r,ignoredInheritanceCache:ie,instanceId:o,itemHeight:s,onKeyDown:Wt,onRowClick:wn,openContextMenuForRow:Et,registerButton:He,registerRenameInput:Ue,renameView:qe,renderDecorationForRow:vt,resolveIcon:Ke,shouldSuppressContextMenu:kt,visualFocusPath:gn},Dn={...En,registerButton:K};return $(`div`,{ref:S,id:ot,"data-file-tree-context-menu-button-visibility":Le&&ze?Be:void 0,"data-file-tree-context-menu-trigger-mode":Le?Re:void 0,"data-file-tree-has-context-menu-action-lane":Le&&ze?`true`:void 0,"data-file-tree-has-git-lane":Ge?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:tt?tn:void 0,onDragOver:tt?en:void 0,onDrop:tt?Y:void 0,onKeyDown:Wt,onPointerLeave:Le?J:void 0,onPointerOver:Le?$t:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[$(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:mn}}),$(`slot`,{name:BM,"data-type":`header-slot`}),f?$(`div`,{"data-file-tree-search-container":!0,"data-open":Xe?`true`:`false`,children:$(`input`,{ref:w,"aria-activedescendant":hn,"aria-controls":ot,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":ke?`true`:void 0,value:Ze,onBlur:()=>{(d!==`retain`||je.current)&&t.closeSearch()},onFocus:Me,onPointerDown:Me,onInput:e=>{Me();let n=e.currentTarget;t.setSearch(n.value)}})}):null,$(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&Fe&&pt.length>0?$(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:$(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${st}px`},children:pt.map((e,t)=>uH(Dn,e.row,`sticky:${EV(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${pt.length-t}`}}))})}):null,$(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${ht}px`},children:[$(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${rn}px`}}),$(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${nn}px`,top:`${an}px`,bottom:`${on}px`},children:[dH(En,ft,q),cn!=null&&ln!=null?uH(En,cn,`parked:${cn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:at===cn.path?`none`:void 0,position:`absolute`,right:`0`,top:`${ln}px`}}):null,fn!=null&&pn!=null?uH(En,fn,`parked-drag:${fn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${pn}px`}}):null]})]})]}),Le?$(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":X?`true`:`false`,style:Sn,children:[$(`button`,{ref:v,type:`button`,"data-type":HM,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":ge==null?`false`:`true`,"data-visible":yn?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),ge!=null){wt();return}Tn()},tabIndex:-1,style:Cn,children:$(nB,{...Ke(`file-tree-icon-ellipsis`)})}),ge==null?null:$(`slot`,{name:VM})]}):null,ge==null?null:$(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),wt()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),wt()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var pH={hydrateRoot:(e,t)=>{Zz(Dz(fH,t),e)},renderRoot:(e,t)=>{Xz(Dz(fH,t),e)},unmountRoot:e=>{Xz(null,e)}};function mH(e,t){pH.renderRoot(e,t)}function hH(e,t){pH.hydrateRoot(e,t)}function gH(e){pH.unmountRoot(e)}var _H=class{#e=new Map;#t=null;clearAll(){for(let e of this.#e.values())e.remove();this.#e.clear()}clearSlotContent(e){let t=this.#n(e);t!=null&&(t.remove(),this.#e.delete(e))}setHost(e){if(this.#t=e,e!=null){this.#i(e);for(let[e,t]of this.#e)this.#r(e,t)}}setSlotContent(e,t){let n=this.#n(e);if(n===t){t!=null&&(this.#e.set(e,t),this.#r(e,t));return}if(n?.remove(),t==null){this.#e.delete(e);return}this.#e.set(e,t),this.#r(e,t)}setSlotHtml(e,t){let n=t?.trim()??``;if(n.length===0){this.setSlotContent(e,null);return}let r=this.#n(e);if(r!=null&&r.innerHTML===n){this.#e.set(e,r),this.#r(e,r);return}let i=document.createElement(`div`);i.innerHTML=n,this.setSlotContent(e,i)}#n(e){let t=this.#e.get(e)??null;if(t!=null)return t;let n=this.#t;if(n==null)return null;for(let t of Array.from(n.children))if(t instanceof HTMLElement&&t.dataset.fileTreeManagedSlot===e)return t;return null}#r(e,t){t.slot=e,t.dataset.fileTreeManagedSlot=e,this.#t!=null&&t.parentNode!==this.#t&&this.#t.appendChild(t)}#i(e){for(let t of Array.from(e.children)){if(!(t instanceof HTMLElement))continue;let e=t.dataset.fileTreeManagedSlot;e==null||this.#e.has(e)||this.#e.set(e,t)}}};Array.isArray;var vH=0;function yH(e){return e!=null&&e.length>0?e:(vH+=1,`pst_ft_${vH}`)}function bH({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??fP)}function xH(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 SH(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 CH(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var wH=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new _H;#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=yH(a),this.#p=ZR(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=dP(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new KR({...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&&(gH(this.#b),delete this.#b.dataset.fileTreeVirtualizedWrapper,this.#b=void 0),this.#l.clearAll(),this.#l.setHost(null),this.#f!=null&&(delete this.#f.dataset.fileTreeVirtualized,this.#I(this.#f),this.#f=void 0)}cleanUp(){this.unmount(),this.#y?.(),this.#y=null,this.#t.destroy()}getFileTreeContainer(){return this.#f}getItem(e){return this.#t.getItem(e)}getFocusedItem(){return this.#t.getFocusedItem()}getFocusedPath(){return this.#t.getFocusedPath()}getFocusedIndex(){return this.#t.getFocusedIndex()}getVisibleCount(){return this.#t.getVisibleCount()}getVisibleRows(e,t){return this.#t.getVisibleRows(e,t)}getSelectedPaths(){return this.#t.getSelectedPaths()}getComposition(){return this.#e}getItemHeight(){return this.#u.itemHeight}getDensityFactor(){return this.#u.factor}subscribe(e){let t=!1;return this.#t.subscribe(()=>{if(!t){t=!0;return}e()})}focusPath(e){this.#t.focusPath(e)}focusFirstItem(){this.#t.focusFirstItem()}focusLastItem(){this.#t.focusLastItem()}focusNextItem(){this.#t.focusNextItem()}focusPreviousItem(){this.#t.focusPreviousItem()}focusParentItem(){this.#t.focusParentItem()}scrollToPath(e,t){this.#t.scrollToPath(e,t)}focusNearestPath(e){return this.#t.focusNearestPath(e)}add(e){this.#t.add(e)}batch(e){this.#t.batch(e)}applyGitStatusPatch(e){let t=QR(this.#p,e);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&mH(n.wrapper,this.#w())}move(e,t,n){this.#t.move(e,t,n)}onMutation(e,t){return this.#t.onMutation(e,t)}setSearch(e){this.#t.setSearch(e)}openSearch(e){this.#t.openSearch(e)}closeSearch(){this.#t.closeSearch()}isSearchOpen(){return this.#t.isSearchOpen()}getSearchValue(){return this.#t.getSearchValue()}getSearchMatchingPaths(){return this.#t.getSearchMatchingPaths()}focusNextSearchMatch(){this.#t.focusNextSearchMatch()}focusPreviousSearchMatch(){this.#t.focusPreviousSearchMatch()}startRenaming(e,t){return this.#t.startRenaming(e,t)}remove(e,t){this.#t.remove(e,t)}resetPaths(e,t){Array.isArray(e)?this.#t.resetPaths(e,t):this.#t.resetPaths(e)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),mH(t.wrapper,this.#w()))}setGitStatus(e){let t=ZR(e,this.#p);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&mH(n.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),mH(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),hH(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),mH(r,this.#w())}#C(){return{initialViewportHeight:bH({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(BM,e());return}this.#l.setSlotHtml(BM,this.#e?.header?.html??null)}#k(e){let t=CH(e).find(e=>SH(e)),n=xH(iP(lP(this.#m).set));n!=null&&(t==null||t.outerHTML!==n.outerHTML)&&(t==null?e.prepend(n):t.replaceWith(n))}#A(e){let t=CH(e),n=t.find(e=>SH(e)),r=t.filter(e=>e!==n),i=lP(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=xH(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=lP(this.#m);t.colored&&oP(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${IM}]`);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(IM,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=gP(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 SP(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 TH(e){let[t]=(0,b.useState)(()=>new wH(e)),n=(0,b.useRef)({timeout:null,model:t});return(0,b.useEffect)(()=>{let{current:e}=n;return e.timeout!=null&&(clearTimeout(e.timeout),e.timeout=null),()=>{e.timeout=setTimeout(()=>e.model.cleanUp(),1)}},[]),{model:t}}function EH(e,t,n){return Object.is(e,t)||n?.(e,t)===!0}function DH(e,t,n){let r=(0,b.useRef)({hasValue:!1,model:null,selector:null,value:void 0}),i=(0,b.useCallback)(t=>e.subscribe(t),[e]),a=(0,b.useCallback)(()=>{let i=r.current,a=t(e);if(i.model!==e||i.selector!==t||!i.hasValue)return i.hasValue=!0,i.model=e,i.selector=t,i.value=a,a;let o=i.value;return EH(o,a,n)?o:(i.value=a,a)},[n,e,t]);return(0,b.useSyncExternalStore)(i,a,a)}function OH(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}var kH=`data-checked`,AH=`data-unchecked`;function jH(e){return{checked(t){return e.indeterminate?{}:t?{[kH]:``}:{[AH]:``}},...fM}}var MH=b.createContext(void 0);function NH(){return b.useContext(MH)}var PH=b.createContext(void 0);function FH(){let e=b.useContext(PH);if(e===void 0)throw Error(F(14));return e}var IH=`data-parent`,LH=b.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i=!1,"aria-labelledby":a,disabled:o=!1,form:s,id:c,indeterminate:l=!1,inputRef:u,name:d,onCheckedChange:f,parent:p=!1,readOnly:m=!1,render:h,required:g=!1,uncheckedValue:_,value:v,nativeButton:y=!1,style:x,...S}=e,{clearErrors:C}=yM(),{disabled:w,name:T,setDirty:E,setFilled:D,setFocused:O,setTouched:k,state:A,validationMode:j,validityData:P,validation:F}=hM(),I=AM(),{labelId:L,registerControlId:R,getDescriptionProps:z}=xM(),B=NH(),V=B?.allValues===void 0?void 0:B.parent,H=V!==void 0,U=w||I.disabled||B?.disabled||o,ee=T??d,te=v??ee,ne=Js(),W=B?.registerControlId!==R,re=TM({id:c||void 0,enabled:W}),ie=y?re:ne,ae={};H&&(p?ae=V.getParentProps():te!==void 0&&(ae=V.getChildProps(te)));let{checked:G=n,indeterminate:oe=l,onCheckedChange:se,...ce}=ae,le=B?.value,ue=b.useRef(null),{getButtonProps:de,buttonRef:fe}=hl({disabled:U,native:y}),pe=B?.validation??F,[me,he]=jc({controlled:te!==void 0&&le!==void 0&&!p?le.includes(te):G,default:i,name:`Checkbox`,state:`checked`}),ge=H?!!G:me,_e=H&&oe||l;jM(ue,ne,me,void 0,!B&&!U,d);let ve=V?.registerChildId,be=b.useRef(null),xe=pe.registerInput,Se=B?te:void 0,Ce=b.useCallback(e=>xe(e,{controlRef:ue,value:Se}),[xe,Se]),we=ln(u,be,p?void 0:Ce),Te=SM(a,L,be,!y,re);N(()=>{be.current&&(be.current.indeterminate=_e),B||D(me)},[me,_e,B,D]),tu(me,()=>{B||(C(ee),E(me!==P.initialValue),pe.change(me))});let Ee=pi({checked:me,disabled:U,form:s,name:p?void 0:ee,id:y?void 0:re,required:g,ref:we,style:ee?kn:On,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(m){e.preventDefault();return}let t=e.currentTarget.checked,n=J(Ot,e.nativeEvent);if(f?.(t,n),!n.isCanceled&&(se?.(t,n),!n.isCanceled&&(he(t),te!==void 0&&B!==void 0&&!p&&!H))){let e=t?[...B.value,te]:B.value.filter(e=>e!==te);B.setValue(e,n)}},onClick(e){e.stopPropagation()},onFocus(){ue.current?.focus()}},v===void 0?M:{value:(B?me&&v:v)||``},z,e=>pe.getValidationProps(U,e));b.useEffect(()=>{if(!V||te===void 0)return;let e=V.disabledStatesRef.current;return e.set(te,U),()=>{e.delete(te)}},[V,U,te]);let De=b.useMemo(()=>({...A,checked:ge,disabled:U,readOnly:m,required:g,indeterminate:_e}),[A,ge,U,m,g,_e]),Oe=jH(De),ke=Di(`span`,e,{state:De,ref:[fe,ue,t],props:[{id:ie,role:`checkbox`,"aria-checked":_e?`mixed`:ge,"aria-readonly":m||void 0,"aria-required":g||void 0,"aria-labelledby":Te,[IH]:p?``:void 0,onFocus(){U||O(!0)},onBlur(){let e=be.current;e&&(k(!0),O(!1),j===`onBlur`&&pe.commit(B?le:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=be.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),ye(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||OH(t)?.click()})},onClick(e){if(m||U)return;e.preventDefault();let t=be.current;t&&ml(t,e)}},S,ce,de,z,e=>pe.getValidationProps(U,e)],stateAttributesMapping:Oe}),Ae=ke.props.id;return N(()=>{if(ve&&!p&&te!==void 0&&Ae!==void 0)return ve(te,Ae)},[ve,p,te,Ae]),(0,Y.jsxs)(PH.Provider,{value:De,children:[ke,!me&&!B&&ee&&!p&&_!==void 0&&(0,Y.jsx)(`input`,{type:`hidden`,form:s,name:ee,value:_,disabled:U}),(0,Y.jsx)(`input`,{...Ee,suppressHydrationWarning:!0})]})}),RH=b.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=FH(),c=s.checked||s.indeterminate,{mounted:l,transitionStatus:u,setMounted:d}=Ro(c),f=b.useRef(null),p={...s,transitionStatus:u};Ho({batch:!0,enabled:!c,open:c,ref:f,onComplete(){c||d(!1)}});let m={...jH(s),...et},h=a||l,g=Di(`span`,e,{ref:[t,f],state:p,stateAttributesMapping:m,props:o});return h?g:null}),zH=b.createContext(void 0);function BH(e){let t=b.useContext(zH);if(t===void 0&&!e)throw Error(F(47));return t}var VH={...us,disabled:e=>e.disabled,instantType:e=>e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,modal:e=>e.modal,focusManagerModal:e=>e.focusManagerModal,stickIfOpen:e=>e.stickIfOpen,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},HH=class extends No{constructor(e,t,n){let r=new rs;super(UH(e,r,t,n),WH(r),VH)}setOpen=(e,t)=>{let n=t.reason===At,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=Xo(t),o=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&o!=null&&(t.trigger=this.context.triggerElements.getById(o)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n=Yo(this.state,e,t.trigger,a());n.openChangeReason=t.reason,this.update(n)};n?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),zi.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function UH(e,t,n,r=!1){let i={...is(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function WH(e){return{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),stickIfOpenTimeout:new B,triggerElements:e}}var GH=D(function({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=qH(s,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),ns(u,d),$o(u);let{forceUnmount:m}=es(d,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});u.useSyncedValues({modal:o}),b.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]),b.useImperativeHandle(e.actionsRef,()=>({unmount:m,close:()=>u.setOpen(!1,J($t))}),[m,u]);let h=d||f;return(0,Y.jsxs)(zH.Provider,{value:u,children:[s&&(0,Y.jsx)(Ko,{handle:s,store:u}),h&&(0,Y.jsx)(JH,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});function KH(e){return BH(!0)?(0,Y.jsx)(GH,{props:e}):(0,Y.jsx)($i,{children:(0,Y.jsx)(GH,{props:e})})}function qH(e,t){let n=Go((e,n)=>new HH(t,e,n));return b.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function JH({store:e,modal:t}){let n=ga(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),r=n.reference,i=n.floating;return ts(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:i}),null}var YH=O(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,handle:s,payload:c,openOnHover:l=!1,delay:u=300,closeDelay:d=0,id:f,...p}=e,m=BH(!0),h=ds(s)??m;if(!h)throw Error(F(74));let g=Js(f),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),x=h.useState(`triggerPopupId`,g),S=b.useRef(null),{registerTrigger:C,isMountedByThisTrigger:w}=Qo(g,S,h,{payload:c,disabled:a,openOnHover:l,closeDelay:d}),T=h.useState(`openChangeReason`),E=h.useState(`stickIfOpen`),D=h.useState(`openMethod`),O=h.useState(`focusManagerModal`),k=ws(v,{enabled:!a&&l&&(D!==`touch`||T!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:Vs(),restMs:u,delay:{close:d},triggerElementRef:S,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),A=ua(v,{stickIfOpen:E}),j=nu(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),M=h.useState(`triggerProps`,w),{getButtonProps:N,buttonRef:P}=hl({disabled:a,native:o}),I={open(e){return e&&T===`trigger-press`?ft.open(e):dt.open(e)}},{preFocusGuardRef:L,handlePreFocusGuardFocus:R,handleFocusTargetFocus:z}=Qu(h,S),B=Di(`button`,e,{state:{disabled:a,open:y},ref:[P,t,C,S],props:[A.reference,k,M,j,{[Fi]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":y,"aria-controls":x},p,N],stateAttributesMapping:I}),V=(0,Y.jsx)(b.Fragment,{children:B},g);return w&&!O?(0,Y.jsxs)(b.Fragment,{children:[(0,Y.jsx)(An,{ref:L,onFocus:R}),V,(0,Y.jsx)(An,{ref:h.context.triggerFocusTargetRef,onFocus:z})]}):V}),XH=b.createContext(void 0);function ZH(){let e=b.useContext(XH);if(e===void 0)throw Error(F(45));return e}var QH=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return BH().useState(`mounted`)||n?(0,Y.jsx)(XH.Provider,{value:n,children:(0,Y.jsx)(Wi,{ref:t,...r})}):null}),$H=b.createContext(void 0);function eU(){let e=b.useContext($H);if(!e)throw Error(F(46));return e}var tU=b.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=Li,..._}=e,v=BH(),y=ZH(),x=Zi(),S=v.useState(`floatingRootContext`),C=v.useState(`mounted`),w=v.useState(`open`),T=v.useState(`openChangeReason`),E=v.useState(`activeTriggerElement`),D=v.useState(`modal`),O=v.useState(`openMethod`),k=v.useState(`positionerElement`),A=v.useState(`instantType`),j=v.useState(`transitionStatus`),M=v.useState(`adaptiveOrigin`),P=b.useRef(null),F=Vo(k),I=Sc({anchor:a,floatingRootContext:S,positionMethod:o,mounted:C,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:y,nodeId:x,collisionAvoidance:g,adaptiveOrigin:M}),L=S.useState(`domReferenceElement`);N(()=>{let e=L,t=P.current;if(e&&(P.current=e),t&&e&&e!==t){v.set(`instantType`,void 0);let e=new AbortController;return F(()=>{v.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[L,F,v]);let R=D===!0&&T!==`trigger-hover`;Iu(w&&R,O===`touch`,k,E);let z=v.useStateSetter(`positionerElement`),B=Ec(e,{open:w,side:I.side,align:I.align,anchorHidden:I.anchorHidden,instant:A},{styles:I.positionerStyles,transitionStatus:j,props:_,refs:[t,z],hidden:!C,inert:!w});return(0,Y.jsxs)($H.Provider,{value:I,children:[C&&R&&(0,Y.jsx)(Nl,{inert:Ac(!w),cutout:E}),(0,Y.jsx)(Qi,{id:x,children:B})]})}),nU=b.createContext(void 0);function rU(){let[e,t]=b.useState(0),n=X(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:b.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}function iU(){let e=b.useContext(nU);N(()=>e?.register(),[e])}var aU=b.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=BH(),l=eU(),u=sl(!0)!=null,{context:d,hasClosePart:f}=rU(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),y=c.useState(`descriptionElementId`),b=c.useState(`modal`),x=c.useState(`mounted`),S=c.useState(`openChangeReason`),C=c.useState(`activeTriggerElement`),w=c.useState(`floatingRootContext`),T=w.useState(`floatingId`),E=c.useState(`disabled`),D=c.useState(`openOnHover`),O=c.useState(`closeDelay`);Ho({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),Ss(w,{enabled:D&&!E,closeDelay:O});let k=a===void 0?Wo(c.context.popupRef):a,A=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,A);let j=c.useStateSetter(`popupElement`),M=Di(`div`,e,{state:{open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},ref:[t,c.context.popupRef,j],props:[_,{id:T,role:`dialog`,...Uo,"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&Kc.has(e.key)&&e.stopPropagation()}},Tc(g),s],stateAttributesMapping:mt});return(0,Y.jsx)(la,{context:w,openInteractionType:m,modal:A,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:o,restoreFocus:`popup`,previousFocusableElement:Ce(C)?C:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,Y.jsx)(nU.Provider,{value:d,children:M})})}),oU=b.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=BH(),s=Js(a.id);return o.useSyncedValueWithCleanup(`titleElementId`,s),Di(`h2`,e,{ref:t,props:[{id:s},a]})}),sU=b.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=BH(),s=Js(a.id);return o.useSyncedValueWithCleanup(`descriptionElementId`,s),Di(`p`,e,{ref:t,props:[{id:s},a]})}),cU=b.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,{buttonRef:c,getButtonProps:l}=hl({disabled:a,focusableWhenDisabled:!1,native:o}),u=BH();return iU(),Di(`button`,e,{ref:[t,c],props:[{onClick(e){u.setOpen(!1,J(Pt,e.nativeEvent))}},s,l]})});function lU(e){let t=b.useRef(!0);t.current&&(t.current=!1,e())}function uU(e,t,n,r,i,a,o,s,c,l=2){let u=lr(n.current,{event:e,orientation:r,loopFocus:i,rtl:a,cols:l,disabledIndices:o,minIndex:s,maxIndex:c,prevIndex:t>c?s:t,stopEvent:!0});return ar(n.current,u)?void 0:u}var dU=b.createContext(void 0),fU=b.createContext(void 0),pU=b.createContext(void 0),mU=b.createContext(!1),hU=b.createContext(``);function gU(){let e=b.useContext(dU);if(!e)throw Error(F(22));return e}function _U(){let e=b.useContext(fU);if(!e)throw Error(F(23));return e}function vU(){let e=b.useContext(pU);if(!e)throw Error(F(24));return e}function yU(){return b.useContext(hU)}function bU(){return b.useContext(mU)}function xU(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}var SU=(e,t)=>Object.is(e,t);function CU(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function wU(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!xU(e,t,(e,t)=>CU(e,t,n)):e!==t}function TU(e,t,n){return e?e.some(e=>e!==void 0&&CU(t,e,n)):!1}function EU(e,t,n){return e?e.findIndex(e=>e!==void 0&&CU(e,t,n)):-1}function DU(e,t){if(t!==SU)return n=>TU(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(t!==0||e.some(e=>Object.is(t,e)))}function OU(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(DU(t,n)):EU(e,t,n);return i===-1?null:i}function kU(e,t,n,r,i,a){return TU(r,t,i)?a!=null&&e>a&&TU(r,n[a],i)?a:e:e===a?OU(n,r,i,!0):a}function AU(e,t,n){return e.filter(e=>!CU(t,e,n))}function jU(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function MU(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function NU(e){return MU(e?.[0])}function PU(e){return NU(e)?e.flatMap(e=>e.items):e}function FU(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(NU(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function IU(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return jU(e)}function LU(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?jU(e.value):jU(e)}function RU(e,t,n){function r(){return IU(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){let n=PU(t);if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function zU(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,Y.jsx)(b.Fragment,{children:RU(r,t,n)},i)),e),[])}var BU={id:e=>e.id,labelId:e=>e.labelId,items:e=>e.items,selectedValue:e=>e.selectedValue,hasSelectionChips:e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0},hasSelectedValue:e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0},hasNullItemLabel:(e,t)=>t?FU(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMounted:e=>e.forceMounted,inline:e=>e.inline,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>CU(t,e,n)):CU(t,r,n)},transitionStatus:e=>e.transitionStatus,popupProps:e=>e.popupProps,listProps:e=>e.listProps,inputProps:e=>e.inputProps,triggerProps:e=>e.triggerProps,itemProps:e=>e.itemProps,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupId:e=>e.popupId,triggerElement:e=>e.triggerElement,inputElement:e=>e.inputElement,inputGroupElement:e=>e.inputGroupElement,popupSide:e=>e.popupSide,openMethod:e=>e.openMethod,inputInsidePopup:e=>e.inputInsidePopup,inputOwnsFormValue:e=>e.inputOwnsFormValue,selectionMode:e=>e.selectionMode,name:e=>e.name,form:e=>e.form,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,grid:e=>e.grid,virtualized:e=>e.virtualized,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,modal:e=>e.modal,autoHighlight:e=>e.autoHighlight};function VU(e){return e==null?void 0:`${e}-popup`}function HU(e,t){return(n,r)=>n!=null&&e.contains(n,r,t)}function UU(e){return Array.isArray(e)?e.map(e=>UU(e)).join(`,`):e==null?``:String(e)}var WU=new Map;function GU(e={}){let t={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...e},n=`${UU(e.locale)}|${JSON.stringify(t)}`,r=WU.get(n);if(r)return r;let i=new Intl.Collator(e.locale,t),a={contains(e,t,n){if(!t)return!0;let r=IU(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(i.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=IU(e,n);return i.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=IU(e,n),a=t.length;return r.length>=a&&i.compare(r.slice(r.length-a),t)===0}};return WU.set(n,a),a}var KU=GU;function qU(e,t=!1){let{overflowY:n}=Ie(e);return n!==`auto`&&n!==`scroll`?!1:t?e.clientHeight>0:e.scrollHeight>e.clientHeight}var JU=Symbol(`none`),YU={value:JU,index:-1};function XU(e,t,n){let r=e.get(t);if(r!==void 0||n===SU)return r;for(let[r,i]of e)if(CU(r,t,n))return i}function ZU(e){let{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:i,onSelectedValueChange:a,defaultInputValue:o,inputValue:s,open:c,defaultOpen:l=!1,selectionMode:u,onItemHighlighted:d,name:f,form:p,disabled:m=!1,readOnly:h=!1,required:g=!1,inputRef:_,grid:v=!1,items:y,filteredItems:x,filter:C,filterQuery:w,openOnInputClick:T=!0,autoHighlight:E=!1,keepHighlight:D=!1,highlightItemOnHover:O=!0,loopFocus:k=!0,itemToStringLabel:P,itemToStringValue:I,isItemEqualToValue:L=SU,virtualized:R=!1,inline:z=!1,fillInputOnItemPress:B=!0,modal:V=!1,limit:H=-1,autoComplete:U=`list`,formAutoComplete:ee,locale:te,submitOnItemClick:ne=!1}=e,{clearErrors:W}=yM(),{setDirty:re,validityData:ie,setFilled:ae,name:G,disabled:oe,setTouched:se,setFocused:ce,validationMode:le,validation:ue}=hM(),de=cc(),fe=TM({id:t}),pe=KU({locale:te}),me=Array.isArray(y)?null:y;if(me&&typeof me.label!=`function`)throw Error(F(100));let he=me?me.data:y,ge=me?.value,_e=ge?void 0:he,ve=b.useMemo(()=>{if(!x||!ge)return;let e=PU(x),t=e.map(ge),n;return{values:t,findItem(r,i){if(!n){n=new Map;for(let r=0;r<t.length;r+=1)n.has(t[r])||n.set(t[r],e[r])}return XU(n,r,i)}}},[x,ge]),ye=b.useMemo(()=>me?e=>me.label(e,L,e=>{let t=ve?.findItem(e,L);return t==null?IU(e,P):me.itemLabel(t)}):P,[me,P,ve,L]),be=b.useMemo(()=>me?Object.assign(e=>me.itemLabel(e),{selected:e=>IU(e,ye)}):P,[me,ye,P]);function xe(e){return IU(e,ye)}let[Se,we]=b.useState(!1),[Te,Ee]=b.useState(null),De=b.useRef(Te),Oe=b.useRef([]),ke=b.useRef([]),Ae=b.useRef(null),je=b.useRef(null),Me=b.useRef(null),Ne=b.useRef(null),Pe=b.useRef(null),Fe=b.useRef(!0),Ie=b.useRef(!1),Le=b.useRef(null),Re=b.useRef(null),ze=b.useRef(null),Ve=b.useRef(YU),He=b.useRef(null),We=b.useRef([]),Ge=b.useRef(null),Ke=oe||m,qe=G??f,Je=u===`multiple`,Ye=u===`single`,Xe=s!==void 0||o!==void 0,Ze=he!==void 0,Qe=x!==void 0,$e;$e=E===`always`?`always`:E?`input-change`:!1;let[et,tt]=jc({controlled:i,default:Je?r??j:r,name:`Combobox`,state:`selectedValue`}),nt=b.useMemo(()=>C===null?()=>!0:C===void 0?HU(pe,be):C,[C,pe,be]),rt=S(()=>Xe?o??``:Ye?xe(et):``).current,[it,at]=jc({controlled:s,default:rt,name:`Combobox`,state:`inputValue`}),[ot,st]=jc({controlled:c,default:l,name:`Combobox`,state:`open`}),ct=NU(he),lt=!ot&&Te!==null?Te:String(it).trim(),ut=Ye?xe(et):``,dt=Ye&&!Se&<!==``&&ut.length===lt.length&&pe.contains(ut,lt),ft=dt?``:w??lt,pt=Ze&&Qe&&dt&&(!me||me.hasValue(et,L)),mt=b.useMemo(()=>he?PU(he):j,[he]),ht=b.useMemo(()=>{if(x&&!pt)return x;if(!he)return j;if(ct){let e=he,t=[],n=0;for(let r of e){if(H>-1&&n>=H)break;let e=H>-1?H-n:1/0,i=ft===``?r.items.slice(0,e):[];if(ft!==``)for(let t of r.items){if(i.length>=e)break;nt(t,ft,be)&&i.push(t)}if(i.length>0){let e={...r,items:i};t.push(e),n+=i.length}}return t}if(ft===``)return H>-1?mt.slice(0,H):mt;let e=[];for(let t of mt){if(H>-1&&e.length>=H)break;nt(t,ft,be)&&e.push(t)}return e},[x,pt,he,ct,ft,H,nt,be,mt]),gt=b.useMemo(()=>{if(ve&&ht===x)return ve.values;let e=PU(ht);return ge?e.map(e=>ge(e)):e},[ht,x,ve,ge]),q=S(()=>{let e=null;return z&&ot&&Ze&&u!==`none`&&(e=OU(gt,et,L,Je)),new No({id:fe,labelId:void 0,selectedValue:et,open:ot,items:_e,selectionMode:u,name:qe,form:p,disabled:Ke,readOnly:h,required:g,grid:v,virtualized:R,openOnInputClick:T,itemToStringLabel:ye,isItemEqualToValue:L,modal:V,autoHighlight:$e,submitOnItemClick:ne,hasInputValue:Xe,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:z,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemProps:M,positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:u===`none`},{onOpenChangeComplete:A,setOpen:A,setInputValue:A,setSelectedValue:A,setIndices:A,handleSelection:A,forceMount:A,requestSubmit:A,listRef:Oe,labelsRef:ke,popupRef:Ae,emptyRef:Pe,inputRef:je,startDismissRef:Me,endDismissRef:Ne,keyboardActiveRef:Fe,chipsContainerRef:Le,clearRef:Re,valuesRef:We,pointerDownItemRef:Ge,selectionEventRef:ze},BU)}).current,_t=u===`none`?it:et,vt=b.useMemo(()=>u===`none`?_t:Array.isArray(et)?et.map(e=>LU(e,I)):LU(et,I),[_t,I,u,et]),yt=X(d),bt=X(n),xt=q.useState(`activeIndex`),St=q.useState(`selectedIndex`),Ct=q.useState(`positionerElement`),wt=q.useState(`listElement`),Tt=q.useState(`triggerElement`),Et=q.useState(`inputElement`),Dt=q.useState(`inputGroupElement`),kt=q.useState(`inline`),At=q.useState(`inputInsidePopup`),jt=q.useState(`inputOwnsFormValue`),Mt=Ye&&!At&&it===ut,Pt=hn(Tt),{mounted:Ft,setMounted:It,transitionStatus:zt}=Ro(ot),{openMethod:Bt,triggerProps:Ht}=ru(ot),Ut=X(()=>vt);jM(At?Pt:je,fe,_t,Ut,!Ke,f);let Wt=X(()=>{he?ke.current=gt.map(xe):q.set(`forceMounted`,!0)}),qt=X((e,t,n)=>{if(t===-1){if(Ve.current===YU)return;Ve.current=YU}else Ve.current={value:e,index:t};yt(e,en(n,void 0,{index:t}))}),Jt=X(e=>{let t={};e.activeIndex!==void 0&&(t.activeIndex=e.activeIndex),e.selectedIndex!==void 0&&(t.selectedIndex=e.selectedIndex),q.update(t);let n=e.activeIndex;if(n===void 0)return;let r=e.type||`none`;n===null?qt(void 0,-1,r):qt(We.current[n],n,r)}),Yt=X((t,n)=>{if(e.onInputValueChange?.(t,n),!n.isCanceled){if(Ie.current=n.reason===Rt,n.reason===`input-change`){ot&&Te!==null&&Ee(null);let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&we(!0),He.current={hasQuery:e};let n=q.state.listElement;if(!q.state.virtualized&&n){let e=Ae.current;for(let t of Be(n.firstElementChild??n)){if(!Ce(t)||(e?!K(e,t):t.getAttribute(`role`)===`dialog`))break;if(qU(t)){t.scrollTop=0;break}}}e&&$e&&q.state.activeIndex==null&&(ot||kt)&&q.set(`activeIndex`,0)}}else n.reason===`input-clear`&&t===``&&q.state.inputInsidePopup&&(He.current={hasQuery:!1,selection:!0});at(t)}}),Xt=X(e=>{let t=!e&&At&&!kt&&it!==``&&(String(it).trim()===Te||it===ut);!e&&(t||it===``||Mt)&&we(!1),Ee(null),t&&Yt(``,J(Rt))}),Zt=X((t,n)=>{if(ot!==t&&(n.reason===`escape-key`&&Ze&>.length===0&&!Pe.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(t&&Te!==null&&Xt(n.reason===Lt),!t&&Se&&(Ye?(kt||Ee(lt),lt===``&&we(!1)):Je&&(kt||Ee(lt),At&&Jt({activeIndex:null}),(!At||kt)&&Yt(``,J(Rt,n.event,void 0,{isItemPress:n.reason===Nt})))),st(t),!t&&At&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(se(!0),ce(!1),le===`onBlur`)))){let e=u===`none`?it:et;ue.commit(e)}}),Qt=X((e,t)=>{a?.(e,t),!t.isCanceled&&(tt(e),(u===`none`&&Ae.current&&B||Ye&&!q.state.inputInsidePopup)&&Yt(xe(e),J(t.reason,t.event)))}),$t=X((e,t)=>{let n=Ue(e),r=ze.current??e;ze.current=null;let i=J(Nt,r),a=n?.closest(`a`)?.getAttribute(`href`);if(a){a.startsWith(`#`)&&Zt(!1,i);return}if(Je){let e=Array.isArray(et)?et:[],n=TU(e,t,L),r=n?AU(e,t,L):[...e,t];if(Qt(r,i),i.isCanceled||!(je.current&&je.current.value.trim()!==``))return;if(q.state.inputInsidePopup){Yt(``,J(Rt,i.event,void 0,{isItemPress:!0}));let e=He.current;e&&!n&&(e.toggledValue=t)}else Zt(!1,i)}else{if(Qt(t,i),i.isCanceled)return;Zt(!1,i)}}),tn=X(()=>{let e=ue.inputRef.current?.form??q.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),nn=X(()=>{if(It(!1),bt?.(!1),we(!1),Ee(null),Jt(u===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Je&&je.current&&je.current.value!==``&&!Ie.current&&Yt(``,J(Rt)),Ye){if(q.state.inputInsidePopup)je.current&&je.current.value!==``&&Yt(``,J(Rt));else{let e=xe(et);je.current&&je.current.value!==e&&Yt(e,J(e===``?Rt:Ot))}}}),rn=b.useMemo(()=>kt&&Ct?{current:Ct.closest(`[role="dialog"]`)}:Ae,[kt,Ct]);Ho({enabled:!e.actionsRef,open:ot,ref:rn,onComplete(){ot||nn()}}),b.useImperativeHandle(e.actionsRef,()=>({unmount:nn}),[nn]),N(function(){let e=De.current!==null&&Te===null;if(De.current=Te,ot&&(!e||!Ze)||(ot||(Ge.current=null),u===`none`))return;let t=Ze?gt:We.current;Jt({selectedIndex:OU(t,et,L,Je)})},[ot,Te,et,u,Je,Ze,gt,L,Jt]),N(()=>{he&&(We.current=gt,Oe.current.length=gt.length)},[he,gt]),N(()=>{let e=He.current;if(e){let t=ot||kt||q.state.positionerElement?.hidden===!1;if(e.hasQuery)$e&&t&&q.set(`activeIndex`,0),He.current=null;else if(String(it).trim()===``&&(He.current=null,t)){let t=e.selection;$e===`always`&&!t&&q.state.selectionMode===`none`&&q.set(`activeIndex`,0),queueMicrotask(()=>{if(!q.state.open&&!q.state.inline||je.current&&je.current.value.trim()!==``)return;let n=q.state.selectedValue,r=q.state.selectionMode===`multiple`;if(r&&Array.isArray(n)?n.length>0:q.state.selectionMode!==`none`&&n!=null){let t=Ze||Qe?gt:We.current,i=EU(t,e.toggledValue,q.state.isItemEqualToValue);q.set(`activeIndex`,i===-1?OU(t,n,q.state.isItemEqualToValue,r):i)}else t?q.set(`activeIndex`,null):$e===`always`&&q.set(`activeIndex`,0)})}}if(!ot&&!kt)return;let t=Ze||Qe?gt:We.current,n=q.state.activeIndex;if(n==null){if($e===`always`&&t.length>0){q.set(`activeIndex`,0);return}qt(void 0,-1,Ot);return}if(n>=t.length){qt(void 0,-1,Ot),q.set(`activeIndex`,null);return}let r=t[n],i=Ve.current.value,a=i!==JU&&CU(r,i,q.state.isItemEqualToValue);(Ve.current.index!==n||!a)&&qt(r,n,Ot)},[xt,$e,qt,Qe,Ze,gt,kt,ot,q,it]),N(()=>{if(u===`none`){ae(String(it)!==``);return}ae(Je?Array.isArray(et)&&et.length>0:et!=null)},[ae,u,it,et,Je]),b.useEffect(()=>{Ze&&$e&>.length===0&&Jt({activeIndex:null})},[Ze,$e,gt.length,Jt]);function an(){ot&<!==``&<!==String(rt)&&!Mt&&we(!0)}function on(){ot&&Te!==null&&Xt(!1)}let sn=!1;function cn(){!sn&&it!==ut&&(sn=!0,Yt(ut,J(Ot)))}function un(){u!==`none`&&(W(qe),re(wU(et,ie.initialValue,L)),ue.change(et),Ye&&!Xe&&!At&&cn())}function dn(){Ye&&!Xe&&!At&&!Se&&cn()}function fn(){u===`none`&&(W(qe),re(it!==ie.initialValue),ue.change(it))}tu(lt,an),tu(ot,on),tu(et,un),tu(ut,dn),tu(he,dn),tu(it,fn);let pn=fs({open:kt?!0:ot,onOpenChange:Zt,elements:{reference:At?Tt:Et,floating:Ct}}),mn=v?`grid`:`listbox`,gn=ot||kt,_n=gn?`true`:`false`,vn=b.useMemo(()=>{let e=Et?.tagName===`INPUT`,t=Et==null||e,n=t||gn,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=_n,r[`aria-haspopup`]=mn,r[`aria-controls`]=gn?wt?.id:void 0,r[`aria-autocomplete`]=h?`none`:U),{reference:r,floating:{role:`presentation`}}},[Et,gn,_n,mn,wt?.id,U,h]),yn=ua(pn,{enabled:!Ke&&T,event:`mousedown-only`,toggle:!1,touchOpenDelay:At?0:100,reason:Vt}),bn=ga(pn,{enabled:!Ke&&!kt,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:kt?!0:void 0,outsidePress(e){let t=Ue(e);return!K(Tt,t)&&!K(Re.current,t)&&!K(Le.current,t)&&!K(Dt,t)}}),xn=Ms(pn,{enabled:!Ke,id:fe,listRef:Oe,activeIndex:xt,selectedIndex:St,virtual:!0,loopFocus:k,allowEscape:k&&!$e,focusItemOnOpen:Se||u===`none`&&!$e?!1:`auto`,focusItemOnHover:O,resetOnPointerLeave:!D,orientation:v?`horizontal`:void 0,rtl:de===`rtl`,disabledIndices:j,grid:v?uU:void 0,onNavigate(e,t){(t||ot)&&zt!==`ending`&&Jt(t?{activeIndex:e,type:Fe.current?Gt:Kt}:{activeIndex:e})}}),Sn=b.useMemo(()=>pi(xn.reference,{onKeyDown(e){v&&q.state.activeIndex==null&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.preventBaseUIHandler()}},bn.reference,yn.reference,vn.reference),[xn.reference,bn.reference,yn.reference,vn.reference,v,q]),Cn=b.useMemo(()=>pi(Uo,bn.floating),[bn.floating]),wn=b.useMemo(()=>pi(xn.floating,vn.floating),[xn.floating,vn.floating]),Tn=b.useMemo(()=>{let e=xn.item;return e?{...e,onFocus:void 0}:M},[xn.item]);q.useContextCallback(`setOpen`,Zt),q.useContextCallback(`setInputValue`,Yt),q.useContextCallback(`setSelectedValue`,Qt),q.useContextCallback(`setIndices`,Jt),q.useContextCallback(`handleSelection`,$t),q.useContextCallback(`forceMount`,Wt),q.useContextCallback(`requestSubmit`,tn),q.useContextCallback(`onOpenChangeComplete`,n),lU(()=>{q.update({inline:z,popupProps:Cn,listProps:wn,inputProps:Sn,triggerProps:Ht,itemProps:Tn})});let En={id:fe,selectedValue:et,open:ot,mounted:Ft,transitionStatus:zt,items:_e,inline:z,popupProps:Cn,listProps:wn,inputProps:Sn,triggerProps:Ht,itemProps:Tn,openMethod:Bt,selectionMode:u,name:qe,form:p,disabled:Ke,readOnly:h,required:g,grid:v,virtualized:R,openOnInputClick:T,itemToStringLabel:ye,modal:V,autoHighlight:$e,isItemEqualToValue:L,submitOnItemClick:ne,hasInputValue:Xe};N(()=>{q.update({...En,inputOwnsFormValue:u===`none`&&(z||!q.state.inputInsidePopup)})},[q,...Object.values(En)]);let Dn=ln(_,ue.inputRef),An=b.useMemo(()=>({query:lt,hasItems:Ze,filteredItems:ht,flatFilteredValues:gt}),[lt,Ze,ht,gt]),jn=b.useMemo(()=>Array.isArray(_t)?``:LU(_t,I),[_t,I]),Mn=Je&&Array.isArray(et)&&et.length>0,Nn=Je||u===`none`&&jt?void 0:qe,Pn=b.useMemo(()=>!Je||!Array.isArray(et)||!qe?null:et.map(e=>{let t=LU(e,I);return(0,Y.jsx)(`input`,{type:`hidden`,form:p,name:qe,value:t,disabled:Ke},t)}),[Je,et,p,qe,I,Ke]),Fn=(0,Y.jsxs)(b.Fragment,{children:[e.children,(0,Y.jsx)(`input`,{...ue.getValidationProps(Ke,{onFocus(){if(At){Tt?.focus();return}(je.current||Tt)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||Ke||h)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=J(Ot,e.nativeEvent),i=()=>We.current.findIndex(e=>LU(e,I).toLowerCase()===n||xe(e).toLowerCase()===n);function a(){if(Je)return;if(u===`none`){Yt(t,r);return}let e=i();e===-1&&(e=We.current.findIndex((e,t)=>{let r=ke.current[t];return r!=null&&r.toLowerCase()===n}));let a=e===-1?void 0:We.current[e];a!=null&&Qt?.(a,r)}Ye&&(Wt(),he&&i()===-1&&q.set(`forceMounted`,!0)),queueMicrotask(a)}}),id:fe&&Nn==null?`${fe}-hidden-input`:void 0,form:p,name:Nn,autoComplete:ee,disabled:Ke,required:g&&!Mn,readOnly:h,value:jn,ref:Dn,style:Nn?kn:On,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Pn]});return(0,Y.jsx)(dU.Provider,{value:q,children:(0,Y.jsx)(fU.Provider,{value:pn,children:(0,Y.jsx)(mU.Provider,{value:Ze,children:(0,Y.jsx)(pU.Provider,{value:An,children:(0,Y.jsx)(hU.Provider,{value:it,children:Fn})})})})})}function QU(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,Y.jsx)(ZU,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}function $U(e){return e==null?void 0:`${e}-label`}function eW(e,t){return e??t}var tW=b.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=a;delete o.id;let s=hM(),c=gU(),l=c.useState(`inputInsidePopup`),u=c.useState(`triggerElement`);c.useState(`inputElement`);let d=c.useState(`id`),f=DM({id:$U(d),fallbackControlId:u?.id??(l?d:void 0),setLabelId(e){let t=typeof e==`function`?e(c.state.labelId):e;c.set(`labelId`,t)}});return Di(`div`,e,{ref:t,state:s.state,props:[f,a],stateAttributesMapping:fM})});function nW(e){let{children:t,placeholder:n}=e,r=gU(),i=r.useState(`itemToStringLabel`),a=r.useState(`selectedValue`),o=r.useState(`items`),s=r.useState(`selectionMode`)===`multiple`,c=r.useState(`hasSelectedValue`),l=!c&&n!=null&&t==null,u=r.useState(`hasNullItemLabel`,l),d=null;return d=typeof t==`function`?t(a):t??(!c&&n!=null&&!u?n:s&&Array.isArray(a)?zU(a,o,i):RU(a,o,i)),(0,Y.jsx)(b.Fragment,{children:d})}var rW=`data-popup-side`,iW=`data-list-empty`,aW={...ft,...fM,popupSide:e=>e?{[rW]:e}:null,listEmpty:e=>e?{[iW]:``}:null},oW=b.createContext(void 0);function sW(){return b.useContext(oW)}var cW=b.createContext(void 0);function lW(e){let t=b.useContext(cW);if(t===void 0&&!e)throw Error(F(21));return t}var uW=b.forwardRef(function(e,t){let n=gU(),{buttonRef:r,getButtonProps:i}=hl({native:!1}),a=ln(t,r);function o(e){n.context.setOpen(!1,J(Pt,e.nativeEvent,e.currentTarget))}let s=i({onClick:o});return(0,Y.jsx)(`span`,{ref:a,...s,"aria-label":`Dismiss`,tabIndex:void 0,style:kn})});function dW(e){let t=e.useState(`mounted`),n=e.useState(`popupSide`),r=e.useState(`positionerElement`);return t&&r?n:null}function fW(){return vU().filteredItems.length===0}function pW(e){return e===`rtl`?[`ArrowRight`,`ArrowLeft`]:[`ArrowLeft`,`ArrowRight`]}function mW(e,t){let n=e>=t-1?t-2:e;return n>=0?n:void 0}function hW(e,t,n){let r=e.context.listRef.current[t];r&&(e.context.selectionEventRef.current=n,r.click(),e.context.selectionEventRef.current=null)}var gW=b.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,id:a,style:o,...s}=e,{state:c,disabled:l,setTouched:u,setFocused:d,validationMode:f,validation:p}=hM(),{labelId:m}=xM(),h=sW(),g=!!lW(!0),_=gU(),v=yU(),y=cc(),x=_.useState(`required`),S=_.useState(`disabled`),C=_.useState(`readOnly`),w=_.useState(`name`),T=_.useState(`form`),E=_.useState(`selectionMode`),D=_.useState(`autoHighlight`),O=_.useState(`inputProps`),k=_.useState(`triggerProps`),A=_.useState(`open`),j=_.useState(`mounted`),M=_.useState(`selectedValue`),N=_.useState(`id`),P=_.useState(`inline`),F=_.useState(`modal`),I=!!D,L=dW(_),R=l||S||i,z=fW(),B=g||P,V=!B||F,H=Js(a??(B?void 0:N)),U=g?uM:c,[ee,te]=b.useState(null),ne=b.useRef(!1),W=b.useRef(null),re=b.useRef(!1),ie=E===`none`&&!g,G=X(e=>{let t=g||_.state.inline;t&&!_.state.hasInputValue&&_.context.setInputValue(``,J(Ot)),_.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:ie})}),oe=g?s:p.getValidationProps(R,s);function se(){_.context.setIndices({activeIndex:null,selectedIndex:null,type:_.context.keyboardActiveRef.current?Gt:Kt})}function le(){_.context.keyboardActiveRef.current=!1}let ue={...U,open:A,disabled:R,readOnly:C,popupSide:L,listEmpty:z};function fe(e){if(!h)return;let t,{highlightedChipIndex:n}=h,r=h.chipsRef.current.length,[i,a]=pW(y);return n===void 0?(e.key===i&&(e.currentTarget.selectionStart??0)===0&&M.length>0&&(e.preventDefault(),t=r>0?r-1:void 0),t):(e.key===i?(e.preventDefault(),t=n>0?n-1:void 0):e.key===a?(e.preventDefault(),t=n<r-1?n+1:void 0):(e.key===`Backspace`||e.key===`Delete`)&&(e.preventDefault(),t=mW(n,M.length),se()),t)}let pe=Di(`input`,e,{state:ue,ref:[t,_.context.inputRef,G],props:[O,k,{value:ee??v,"aria-readonly":C||void 0,"aria-required":x||void 0,"aria-labelledby":m,disabled:R,readOnly:C,required:E===`none`?x:void 0,form:T,...ie&&w&&{name:w},id:H,onFocus(){if(d(!0),!P||!re.current)return;re.current=!1;let e=W.current;e!=null&&Object.hasOwn(_.context.valuesRef.current,e)&&_.context.setIndices({activeIndex:e})},onBlur(){u(!0),d(!1);let e=_.state.activeIndex;if(P&&e!==null&&D!==`always`&&(W.current=e,re.current=!0,_.context.setIndices({activeIndex:null})),f===`onBlur`){let e=E===`none`?v:M;p.commit(e)}},onCompositionStart(e){ae||(ne.current=!0,te(e.currentTarget.value))},onCompositionEnd(e){ne.current=!1;let t=e.currentTarget.value;te(null),_.context.setInputValue(t,J(Lt,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=!n||n===`insertReplacementText`,i=ne.current||!r;function a(e){!C&&!R&&e&&i&&(_.context.setOpen(!0,J(Lt,t)),I||se())}if(ne.current){let n=e.currentTarget.value;te(n),n===``&&!_.state.openOnInputClick&&!_.state.inputInsidePopup&&_.context.setOpen(!1,J(Rt,t));let r=n.trim(),i=I&&r!==``;a(r),A&&_.state.activeIndex!==null&&!i&&se();return}let o=J(Lt,t);if(_.context.setInputValue(e.currentTarget.value,o),o.isCanceled)return;let s=e.currentTarget.value===``,c=J(Rt,t);s&&!_.state.inputInsidePopup&&(E===`single`&&_.context.setSelectedValue(null,c),_.state.openOnInputClick||_.context.setOpen(!1,c)),a(e.currentTarget.value.trim()),A&&_.state.activeIndex!==null&&!I&&se()},onKeyDown(e){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(_.context.keyboardActiveRef.current=!0,R||C){C&&e.key===`Enter`&&A&&_.state.activeIndex!==null&&de(e);return}let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=y===`rtl`;if(e.key===`Home`){de(e);let n=ce&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){de(e);let i=ce&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!j&&e.key===`Escape`){let t=E===`multiple`&&Array.isArray(M)?M.length===0:M===null,n=J(Ut,e.nativeEvent),r=E===`multiple`?[]:null;_.context.setInputValue(``,n),_.context.setSelectedValue(r,n),!t&&!_.state.inline&&!n.isPropagationAllowed&&e.stopPropagation();return}if(h&&e.key===`Backspace`&&t.value===``&&h.highlightedChipIndex===void 0&&Array.isArray(M)&&M.length>0){let t=h.chipsRef.current.length,n=t>0?t-1:M.length-1,r=M.filter((e,t)=>t!==n);se(),_.context.setSelectedValue(r,J(Ot,e.nativeEvent));return}let i=h?.highlightedChipIndex!==void 0,a=fe(e);if(h?.setHighlightedChipIndex(a),a===void 0?i&&_.context.inputRef.current?.focus():h?.chipsRef.current[a]?.focus(),e.which!==229&&e.key===`Enter`&&A){let t=_.state.activeIndex,n=e.nativeEvent;if(t===null){if(P)return;_.context.setOpen(!1,J(Ot,n));return}de(e),hW(_,t,n)}},onPointerMove:le,onPointerDown:le},oe],stateAttributesMapping:aW}),me=g?(0,Y.jsx)(mM.Provider,{value:pM,children:pe}):pe;return(0,Y.jsxs)(b.Fragment,{children:[A&&V&&(0,Y.jsx)(uW,{ref:_.context.startDismissRef}),me]})}),_W=b.forwardRef(function(e,t){let{render:n,className:r,nativeButton:i=!0,disabled:a=!1,id:o,style:s,...c}=e,{state:l,disabled:u,setTouched:d,setFocused:f,validationMode:p,validation:m}=hM(),{labelId:h}=xM(),g=gU(),_=g.useState(`selectionMode`),v=g.useState(`disabled`),y=g.useState(`readOnly`),x=g.useState(`required`),S=g.useState(`positionerElement`),C=g.useState(`listElement`),w=g.useState(`popupId`),T=g.useState(`triggerProps`),E=g.useState(`inputInsidePopup`),D=g.useState(`id`),O=g.useState(`labelId`),k=g.useState(`open`),A=g.useState(`selectedValue`),j=g.useState(`activeIndex`),M=g.useState(`selectedIndex`),N=g.useState(`hasSelectedValue`),P=_U(),F=yU(),I=V(),L=u||v||a,R=fW(),z=dW(g);TM({id:E?o:void 0});let B=E?o??D:o,H=eW(h,O),U;k&&E?U=w??VU(D):k&&(U=C?.id);let ee=b.useRef(``);function te(e){ee.current=e.pointerType}let{reference:ne}=Ns(P,{enabled:!k&&!y&&!v&&_===`single`,listRef:g.context.labelsRef,activeIndex:j,selectedIndex:M,onMatch(e){let t=g.context.valuesRef.current[e];t!==void 0&&g.context.setSelectedValue(t,J(Ot))}}),{reference:W}=ua(P,{enabled:!v,event:`mousedown`}),{buttonRef:re,getButtonProps:ie}=hl({native:i,disabled:L}),ae={...l,readOnly:y,open:k,disabled:L,popupSide:z,listEmpty:R,placeholder:_!==`none`&&!N};return Di(`button`,e,{ref:[t,re,X(e=>{g.set(`triggerElement`,e)})],state:ae,props:[T,W,ne,{id:B,tabIndex:E?0:-1,role:E?`combobox`:void 0,"aria-expanded":k,"aria-haspopup":E?`dialog`:`listbox`,"aria-controls":U,"aria-required":E&&x||void 0,"aria-readonly":E&&y||void 0,"aria-labelledby":H,onPointerDown:te,onPointerEnter:te,onFocus(){f(!0),!L&&I.start(0,g.context.forceMount)},onBlur(e){if(!K(S,e.relatedTarget)&&(d(!0),f(!1),p===`onBlur`)){let e=_===`none`?F:A;m.commit(e)}},onMouseDown(e){if(L||(E||P.set(`domReferenceElement`,e.currentTarget),g.context.forceMount(),ee.current!==`touch`&&(g.context.inputRef.current?.focus(),E||e.preventDefault()),k))return;let t=En(e.currentTarget);function n(e){let t=g.state.triggerElement;if(!t)return;let n=Ue(e),r=g.state.positionerElement,i=g.state.listElement;K(t,n)||K(r,n)||K(i,n)||Yu(e,t)||g.context.setOpen(!1,J(Jt,e))}E&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(de(e),g.context.setOpen(!0,J(Wt,e.nativeEvent)),g.context.inputRef.current?.focus())}},m.getValidationProps(L,c),ie],stateAttributesMapping:aW})}),vW=b.createContext(null);function yW(){return b.useContext(vW)}function bW(e){let{children:t,items:n}=e,r=b.useMemo(()=>({items:n}),[n]);return(0,Y.jsx)(vW.Provider,{value:r,children:t})}function xW(e){let{children:t}=e,{filteredItems:n}=vU(),r=yW(),i=r?r.items:n;return(0,Y.jsx)(b.Fragment,{children:i.map(t)})}var SW=b.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...s}=e,c=gU(),l=_U(),u=!!lW(!0),{filteredItems:d,hasItems:f}=vU(),p=c.useState(`selectionMode`),m=c.useState(`grid`),h=c.useState(`readOnly`),g=c.useState(`listProps`),_=c.useState(`virtualized`),v=c.useState(`forceMounted`),y=p===`multiple`,x=d.length===0,S=X(e=>{c.set(`positionerElement`,e)}),C=X(e=>{c.set(`listElement`,e)}),w=b.useMemo(()=>typeof o==`function`?n||=(0,Y.jsx)(xW,{children:o}):o,[o]),T={empty:x},E=l.useState(`floatingId`),D=Di(`div`,e,{state:T,ref:[t,C,u?null:S],props:[g,{children:w,tabIndex:-1,id:E,role:m?`grid`:`listbox`,"aria-multiselectable":y?`true`:void 0,"aria-readonly":!m&&h?!0:void 0,onKeyDown(e){if(!(c.state.disabled||c.state.readOnly)&&e.key===`Enter`){let t=c.state.activeIndex;if(t==null)return;de(e),hW(c,t,e.nativeEvent)}},onKeyDownCapture(){c.context.keyboardActiveRef.current=!0},onPointerMoveCapture(){c.context.keyboardActiveRef.current=!1}},s]});if(_)return D;let O=f&&!v?void 0:c.context.labelsRef;return(0,Y.jsx)(Pc,{elementsRef:c.context.listRef,labelsRef:O,children:D})}),CW=``;function wW(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;e.nodeValue!==``&&(n=e)}return n}function TW(){let e=V(),t=b.useRef(null);return b.useEffect(()=>{if(re)return;let n=t.current;if(n==null)return;let r=wW(n);if(r==null)return;let i=r.data,a=`${i}${CW}`;return r.nodeValue=a,e.start(200,()=>{r.nodeValue===a&&(r.nodeValue=i)}),()=>{e.clear(),r.nodeValue===a&&(r.nodeValue=i)}},[t,e]),t}var EW=b.createContext(void 0);function DW(){let e=b.useContext(EW);if(e===void 0)throw Error(F(20));return e}var OW=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=gU(),a=i.useState(`mounted`),o=i.useState(`forceMounted`);return a||n||o?(0,Y.jsx)(EW.Provider,{value:n,children:(0,Y.jsx)(Wi,{ref:t,...r})}):null}),kW=b.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m=!1,collisionAvoidance:h=Ii,style:g,..._}=e,v=gU(),y=_U(),b=DW(),x=v.useState(`modal`),S=v.useState(`open`),C=v.useState(`mounted`),w=v.useState(`openMethod`),T=v.useState(`positionerElement`),E=v.useState(`triggerElement`),D=v.useState(`inputElement`),O=v.useState(`inputGroupElement`),k=v.useState(`inputInsidePopup`),A=v.useState(`transitionStatus`),j=fW(),M=Sc({anchor:i??(k?E:O??D),floatingRootContext:y,positionMethod:a,mounted:C,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:b,collisionAvoidance:h,lazyFlip:!0});Iu(S&&x,w===`touch`,T,E);let P={open:S,side:M.side,align:M.align,anchorHidden:M.anchorHidden,empty:j};N(()=>{v.set(`popupSide`,M.side)},[v,M.side]);let F=X(e=>{v.set(`positionerElement`,e)}),I=Ec(e,P,{styles:M.positionerStyles,transitionStatus:A,props:_,refs:[t,F],hidden:!C,inert:!S});return(0,Y.jsxs)(cW.Provider,{value:M,children:[C&&x&&(0,Y.jsx)(Nl,{inert:Ac(!S),cutout:O??D??E}),I]})}),AW={...pt,...et},jW=b.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=gU(),l=lW(),u=_U(),d=c.useState(`mounted`),f=c.useState(`open`),p=c.useState(`openMethod`),m=c.useState(`popupProps`),h=c.useState(`transitionStatus`),g=c.useState(`inputInsidePopup`),_=c.useState(`inputElement`),v=c.useState(`modal`),y=c.useState(`id`),x=fW(),S=s.id??(g?VU(y):void 0);N(()=>(c.set(`popupId`,c.context.popupRef.current?.id||S),()=>{c.set(`popupId`,void 0)}),[c,S]),Ho({open:f,ref:c.context.popupRef,onComplete(){f&&c.context.onOpenChangeComplete(!0)}});let C=Di(`div`,e,{state:{open:f,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:h,empty:x},ref:[t,c.context.popupRef],props:[m,{id:S,role:g?`dialog`:`presentation`,onFocus(e){let t=Ue(e.nativeEvent);p!==`touch`&&(K(c.state.listElement,t)||t===e.currentTarget)&&c.context.inputRef.current?.focus()}},Tc(h),s],stateAttributesMapping:AW}),w=a===void 0?g?e=>e===`touch`?c.context.popupRef.current:_:!1:a,T;T=o??(g?void 0:!1);let E=!g||v;return(0,Y.jsx)(la,{context:u,disabled:!d,modal:E,openInteractionType:p,initialFocus:w,returnFocus:T,getInsideElements:()=>[c.context.startDismissRef.current,c.context.endDismissRef.current],children:(0,Y.jsxs)(b.Fragment,{children:[C,E&&(0,Y.jsx)(uW,{ref:c.context.endDismissRef})]})})}),MW=b.createContext(void 0);function NW(){let e=b.useContext(MW);if(e===void 0)throw Error(F(18));return e}var PW=b.forwardRef(function(e,t){let{render:n,className:r,style:i,items:a,...o}=e,s=gU().useState(`grid`),[c,l]=b.useState(),u=b.useMemo(()=>({labelId:c,setLabelId:l,items:a}),[c,l,a]),d=Di(`div`,e,{ref:t,props:[{role:s?`rowgroup`:`group`,"aria-labelledby":c},o]}),f=(0,Y.jsx)(MW.Provider,{value:u,children:d});return a?(0,Y.jsx)(bW,{items:a,children:f}):f}),FW=b.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=NW(),c=Js(a);return N(()=>(s(c),()=>{s(e=>e===c?void 0:e)}),[c,s]),Di(`div`,e,{ref:t,props:[{id:c,"aria-hidden":!0},o]})}),IW=b.createContext(void 0);function LW(){let e=b.useContext(IW);if(!e)throw Error(F(19));return e}var RW=b.createContext(!1);function zW(){return b.useContext(RW)}function BW(e){let{componentProps:t,forwardedRef:n,virtualized:r,indexFromFilter:i}=e,{render:a,className:o,style:s,value:c=null,index:l,disabled:u=!1,nativeButton:d=!1,...f}=t,p=b.useRef(null),m=vl({guess:!0,index:l,textRef:p}),h=gU(),g=zW(),_=bU(),v=h.useState(`selectionMode`),y=h.useState(`disabled`),x=h.useState(`readOnly`),S=h.useState(`isItemEqualToValue`),C=y||u,w=v!==`none`,T=l??i??m.index,E=T!==-1,D=h.useState(`id`),O=h.useState(`isActive`,T),k=h.useState(`isSelected`,c),A=h.useState(`itemProps`),j=b.useRef(null),M=D!=null&&E?`${D}-${T}`:void 0,P=k&&w;N(()=>{if(!E||!r&&l==null)return;let e=h.context.listRef.current;return e[T]=j.current,()=>{delete e[T]}},[E,r,T,l,h]),N(()=>{if(!E||_)return;let e=h.context.valuesRef.current;return e[T]=c,()=>{delete e[T]}},[E,_,T,c,h]),N(()=>{if(!E||_)return;let e=h.state.selectedValue,t=h.state.selectedIndex;h.state.selectionMode===`multiple`&&Array.isArray(e)?t=kU(T,c,h.context.valuesRef.current,e,S,t):CU(c,e,S)&&(t=T),h.set(`selectedIndex`,t)},[E,_,h,T,c,S]);let{getButtonProps:F,buttonRef:I}=hl({disabled:C,focusableWhenDisabled:!0,native:d,composite:!0}),L={disabled:C,selected:P,highlighted:O};function R(e){function t(){h.context.handleSelection(e,c)}h.state.submitOnItemClick?(zi.flushSync(t),h.context.requestSubmit()):t()}let z={id:M,role:g?`gridcell`:`option`,"aria-selected":w?P:void 0,tabIndex:void 0,onPointerDownCapture(e){e.isPrimary&&(h.context.pointerDownItemRef.current=e.currentTarget),e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){C||x||R(e.nativeEvent)},onMouseUp(e){let t=h.context.pointerDownItemRef.current===e.currentTarget;h.context.pointerDownItemRef.current=null,!(C||x||e.button!==0||t||!O)&&R(e.nativeEvent)}},B=Di(`div`,t,{ref:[I,n,m.ref,j],state:L,props:[A,z,f,F]}),V=b.useMemo(()=>({selected:P,textRef:p}),[P,p]);return(0,Y.jsx)(IW.Provider,{value:V,children:B})}function VW(e){let{componentProps:t,forwardedRef:n}=e,r=gU().useState(`isItemEqualToValue`),{flatFilteredValues:i}=vU(),a=EU(i,t.value??null,r);return(0,Y.jsx)(BW,{componentProps:t,forwardedRef:n,virtualized:!0,indexFromFilter:a})}var HW=b.memo(b.forwardRef(function(e,t){let n=gU().useState(`virtualized`);return n&&e.index==null?(0,Y.jsx)(VW,{componentProps:e,forwardedRef:t}):(0,Y.jsx)(BW,{componentProps:e,forwardedRef:t,virtualized:n,indexFromFilter:void 0})})),UW=b.forwardRef(function(e,t){let{selected:n}=LW();return e.keepMounted||n?(0,Y.jsx)(WW,{...e,ref:t}):null}),WW=b.memo(b.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=LW(),c=b.useRef(null),{transitionStatus:l,setMounted:u}=Ro(s),d=Di(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:et});return Ho({batch:!0,enabled:!s,open:s,ref:c,onComplete(){s||u(!1)}}),d})),GW=b.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=vU(),c=gU(),l=TW(),u=s.length===0?a:null;return Di(`div`,e,{ref:[t,c.context.emptyRef,l],props:[{children:u,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})});function KW(e){let t=(0,kA.c)(13),{label:n,children:r,onClick:i,disabled:a,pressed:o,className:s}=e,c=s===void 0?``:s,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Y.jsx)(bu,{}),t[0]=l):l=t[0];let u=`icon-button ${c}`,d;t[1]!==r||t[2]!==a||t[3]!==n||t[4]!==i||t[5]!==o||t[6]!==u?(d=(0,Y.jsx)(ec,{render:l,className:u,"aria-label":n,"aria-pressed":o,disabled:a,onClick:i,children:r}),t[1]=r,t[2]=a,t[3]=n,t[4]=i,t[5]=o,t[6]=u,t[7]=d):d=t[7];let f;t[8]===n?f=t[9]:(f=(0,Y.jsx)(ic,{children:(0,Y.jsx)(Dc,{sideOffset:8,children:(0,Y.jsx)(Oc,{className:`tooltip`,children:n})})}),t[8]=n,t[9]=f);let p;return t[10]!==d||t[11]!==f?(p=(0,Y.jsxs)(Ks,{children:[d,f]}),t[10]=d,t[11]=f,t[12]=p):p=t[12],p}function qW(e){let t=(0,kA.c)(35),{label:n,value:r,groups:i,onChange:a}=e,o;if(t[0]!==i||t[1]!==r){let e;t[3]===r?e=t[4]:(e=e=>e.value===r,t[3]=r,t[4]=e),o=i.flatMap(QW).find(e),t[0]=i,t[1]=r,t[2]=o}else o=t[2];let s=o,c;t[5]===i?c=t[6]:(c=i.filter(ZW),t[5]=i,t[6]=c);let l;t[7]!==s||t[8]!==r?(l=s||{value:r,label:r},t[7]=s,t[8]=r,t[9]=l):l=t[9];let u;t[10]===a?u=t[11]:(u=e=>{e&&a(e.value)},t[10]=a,t[11]=u);let d;t[12]===n?d=t[13]:(d=(0,Y.jsx)(tW,{className:`control-label`,children:n}),t[12]=n,t[13]=d);let f,p,m;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Y.jsx)(Tj,{}),p=(0,Y.jsx)(`span`,{children:(0,Y.jsx)(nW,{})}),m=(0,Y.jsx)(gj,{}),t[14]=f,t[15]=p,t[16]=m):(f=t[14],p=t[15],m=t[16]);let h;t[17]===n?h=t[18]:(h=(0,Y.jsxs)(_W,{className:`branch-trigger`,"aria-label":n,children:[f,p,m]}),t[17]=n,t[18]=h);let g;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Y.jsx)(Dj,{}),t[19]=g):g=t[19];let _;t[20]===n?_=t[21]:(_=n.toLowerCase(),t[20]=n,t[21]=_);let v=`Search ${_}`,y;t[22]===v?y=t[23]:(y=(0,Y.jsxs)(`div`,{className:`search-field`,children:[g,(0,Y.jsx)(gW,{"aria-label":v,placeholder:`Find a branch…`})]}),t[22]=v,t[23]=y);let b,x;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,Y.jsx)(GW,{className:`popup-empty`,children:`No matching branches.`}),x=(0,Y.jsx)(SW,{className:`option-list`,children:JW}),t[24]=b,t[25]=x):(b=t[24],x=t[25]);let S;t[26]===y?S=t[27]:(S=(0,Y.jsx)(OW,{children:(0,Y.jsx)(kW,{sideOffset:6,align:`start`,className:`floating`,children:(0,Y.jsxs)(jW,{className:`popup branch-popup`,children:[y,b,x]})})}),t[26]=y,t[27]=S);let C;return t[28]!==S||t[29]!==c||t[30]!==l||t[31]!==u||t[32]!==d||t[33]!==h?(C=(0,Y.jsxs)(QU,{items:c,value:l,onValueChange:u,isItemEqualToValue:XW,limit:60,children:[d,h,S]}),t[28]=S,t[29]=c,t[30]=l,t[31]=u,t[32]=d,t[33]=h,t[34]=C):C=t[34],C}function JW(e){return(0,Y.jsxs)(PW,{items:e.items,className:`option-group`,children:[(0,Y.jsx)(FW,{className:`option-group-label`,children:e.value}),(0,Y.jsx)(xW,{children:YW})]},e.value)}function YW(e){return(0,Y.jsxs)(HW,{className:`option`,value:e,children:[(0,Y.jsx)(Tj,{}),(0,Y.jsx)(`span`,{children:e.label}),(0,Y.jsx)(UW,{children:(0,Y.jsx)(_j,{})})]},e.value)}function XW(e,t){return e.value===t.value}function ZW(e){return e.items.length}function QW(e){return e.items}function $W(e){let t=(0,kA.c)(7),{lines:n,children:r}=e,i=n===void 0?2:n,a;t[0]===r?a=t[1]:(a=(0,Y.jsx)(`span`,{children:r}),t[0]=r,t[1]=a);let o;t[2]===i?o=t[3]:(o=Array.from({length:i},eG),t[2]=i,t[3]=o);let s;return t[4]!==a||t[5]!==o?(s=(0,Y.jsxs)(`div`,{className:`review-loading`,role:`status`,children:[a,o]}),t[4]=a,t[5]=o,t[6]=s):s=t[6],s}function eG(e,t){return(0,Y.jsx)(`div`,{},t)}function tG(e){let t=(0,kA.c)(10),{icon:n,title:r,children:i}=e,a;t[0]===n?a=t[1]:(a=(0,Y.jsx)(`div`,{className:`empty-icon`,children:n}),t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=(0,Y.jsx)(`h2`,{children:r}),t[2]=r,t[3]=o);let s;t[4]===i?s=t[5]:(s=(0,Y.jsx)(`p`,{children:i}),t[4]=i,t[5]=s);let c;return t[6]!==a||t[7]!==o||t[8]!==s?(c=(0,Y.jsxs)(`div`,{className:`empty-state`,children:[a,o,s]}),t[6]=a,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}var nG=window.location.hash.slice(1);async function rG(e,t={},n){let r;try{r=await fetch(`/api/${e}?${new URLSearchParams(t)}`,{...n,headers:{Authorization:`Bearer ${nG}`}})}catch(e){throw e instanceof DOMException&&e.name===`AbortError`?e:Error(`The polydiff server stopped responding. Is it still running?`,{cause:e})}if(!r.headers.get(`content-type`)?.includes(`application/json`))throw Error(`Start polydiff in your terminal and open the URL it prints.`);let i=await r.json();if(!r.ok)throw Error(i.error||`Request failed.`);return i}function iG(e,t){return rG(e,{},{method:`POST`,body:JSON.stringify(t)})}var aG={loading:!0};function oG(e,t){return`diff-${encodeURIComponent(e)}${t?`-${encodeURIComponent(t)}`:``}`}function sG(e){return e===`@working`?`working tree`:e}function cG(e){return e.flatMap(e=>e.hunks).reduce((e,t)=>({added:e.added+t.additionLines,removed:e.removed+t.deletionLines}),{added:0,removed:0})}function lG(e,t,n){let r={};return t.base&&t.base!==e.base&&(r.base=t.base),t.target&&t.target!==`@working`&&(r.target=t.target),n===`custom`&&t.selected!==void 0&&(r.selected=t.selected),r}function uG(e,t){let[n,r]=(0,b.useState)(e.root),[i,a]=(0,b.useState)([]),[o,s]=(0,b.useState)(e.repos),[c,l]=(0,b.useState)(e.selection),[u,d]=(0,b.useState)({}),[f,p]=(0,b.useState)(!0),[m,h]=(0,b.useState)(``),[g,_]=(0,b.useState)([]),v=(0,b.useRef)(null),y=(0,b.useRef)(new Map),x=(0,b.useRef)(0),S=(0,b.useRef)(o),C=(0,b.useRef)(``);(0,b.useEffect)(()=>{S.current=o},[o]);let w=(0,b.useMemo)(()=>i.map(e=>{let t=o[e.path];return{repo:e,base:t?.base||e.base,target:t?.target||`@working`,selected:t?.selected,...u[e.path]||aG}}),[i,o,u]),T=(0,b.useCallback)(e=>c===`all`?!0:c===`none`?!1:c===`custom`&&e.selected!==void 0?e.selected:!!e.data?.files.length,[c]),E=(0,b.useMemo)(()=>w.filter(T),[w,T]),D=(0,b.useCallback)(async(e,t,n,r)=>{if(r?.aborted)return;y.current.get(e.path)?.abort();let i=new AbortController;y.current.set(e.path,i);let a=()=>i.abort();r?.addEventListener(`abort`,a,{once:!0});let o=++x.current;d(t=>({...t,[e.path]:{...t[e.path],loading:!0}}));try{let r=await rG(`diff`,{repo:e.path,base:t,target:n},{signal:i.signal});if(i.signal.aborted)return;let a=VD(r.patch,`${e.path}:${o}`,!0).flatMap(e=>e.files);d(t=>({...t,[e.path]:{loading:!1,data:{files:a,mergeBase:r.mergeBase,targetRef:r.targetRef,warnings:r.warnings,version:o}}}))}catch(t){i.signal.aborted||d(n=>({...n,[e.path]:{loading:!1,error:t instanceof Error?t.message:`Could not load changes.`}}))}finally{r?.removeEventListener(`abort`,a),y.current.get(e.path)===i&&y.current.delete(e.path)}},[]),O=(0,b.useCallback)(async(e,t=!1)=>{v.current?.abort(),y.current.forEach(e=>e.abort()),y.current.clear();let n=new AbortController;v.current=n,p(!0),h(``);try{let i=await rG(`workspace`,{path:e},{signal:n.signal});if(n.signal.aborted)return;r(i.root),_(i.warnings),a(i.repos),t||d({}),p(!1);let o=0;await Promise.all(Array.from({length:Math.min(4,i.repos.length)},async()=>{for(;o<i.repos.length&&!n.signal.aborted;){let e=i.repos[o++],t=S.current[e.path];await D(e,t?.base||e.base,t?.target||`@working`,n.signal)}}))}catch(e){n.signal.aborted||(h(e instanceof Error?e.message:`Could not scan workspace.`),p(!1))}},[D]);return(0,b.useEffect)(()=>{O(e.root);let t=y.current;return()=>{v.current?.abort(),t.forEach(e=>e.abort())}},[O,e.root]),(0,b.useEffect)(()=>{if(!i.length)return;let e={};for(let t of i)e[t.path]=lG(t,o[t.path]||{},c);let n=JSON.stringify({repos:e,selection:c});n!==C.current&&(C.current=n,t({repos:e,selection:c}))},[i,o,c,t]),{root:n,entries:w,selected:E,included:T,selection:c,scanning:f,error:m,warnings:g,open:O,reload:(0,b.useCallback)(e=>D(e.repo,e.base,e.target),[D]),configure:(0,b.useCallback)((e,t)=>{s(n=>({...n,[e.repo.path]:{...n[e.repo.path],...t}})),D(e.repo,t.base??e.base,t.target??e.target)},[D]),select:(0,b.useCallback)((e,t)=>{s(n=>{let r={...n};if(c!==`custom`)for(let e of w)r[e.repo.path]={...r[e.repo.path],selected:T(e)};return r[e]={...r[e],selected:t},r}),l(`custom`)},[w,T,c]),setSelection:(0,b.useCallback)(e=>{l(e),e!==`custom`&&s(e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{base:t.base,target:t.target}])))},[])}}var dG=[{value:`changed`,label:`Changed`,hint:`Follow repositories that have changes`},{value:`all`,label:`All`,hint:`Include every repository`},{value:`none`,label:`None`,hint:`Clear the selection`}];function fG(e,t){let{local:n,remote:r}=e.repo.branches;return[{value:`Current`,items:[...t?[{value:`@working`,label:`working tree (${e.repo.branch})`}]:[],{value:`HEAD`,label:t?`HEAD (committed only)`:`HEAD`}]},{value:`Local`,items:n.map(e=>({value:e,label:e}))},{value:`Remote`,items:r.map(e=>({value:e,label:e}))}]}function pG(e){let t=(0,kA.c)(45),{entry:n,workspace:r}=e,i=`Comparison for ${n.repo.name}`,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Y.jsx)(Tj,{}),t[0]=a):a=t[0];let o=n.base,s;t[1]===n.target?s=t[2]:(s=sG(n.target),t[1]=n.target,t[2]=s);let c=`${o} → ${s}`,l=n.base,u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Y.jsx)(uj,{}),t[3]=u):u=t[3];let d;t[4]===n.target?d=t[5]:(d=sG(n.target),t[4]=n.target,t[5]=d);let f;t[6]!==n.base||t[7]!==c||t[8]!==d?(f=(0,Y.jsxs)(`span`,{title:c,children:[l,u,d]}),t[6]=n.base,t[7]=c,t[8]=d,t[9]=f):f=t[9];let p;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Y.jsx)(mj,{}),t[10]=p):p=t[10];let m;t[11]!==i||t[12]!==f?(m=(0,Y.jsxs)(YH,{className:`compare-chip`,"aria-label":i,children:[a,f,p]}),t[11]=i,t[12]=f,t[13]=m):m=t[13];let h;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Y.jsx)(oU,{children:`Compare`}),t[14]=h):h=t[14];let g=n.repo.worktree?` · worktree`:``,_;t[15]!==n.repo.name||t[16]!==g?(_=(0,Y.jsxs)(sU,{className:`muted`,children:[n.repo.name,g]}),t[15]=n.repo.name,t[16]=g,t[17]=_):_=t[17];let v=n.base,y;t[18]===n?y=t[19]:(y=fG(n,!1),t[18]=n,t[19]=y);let b;t[20]!==n||t[21]!==r?(b=e=>r.configure(n,{base:e}),t[20]=n,t[21]=r,t[22]=b):b=t[22];let x;t[23]!==n.base||t[24]!==y||t[25]!==b?(x=(0,Y.jsx)(qW,{label:`Base`,value:v,groups:y,onChange:b}),t[23]=n.base,t[24]=y,t[25]=b,t[26]=x):x=t[26];let S;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Y.jsx)(`div`,{className:`compare-connector`,children:(0,Y.jsx)(uj,{})}),t[27]=S):S=t[27];let C=n.target,w;t[28]===n?w=t[29]:(w=fG(n,!0),t[28]=n,t[29]=w);let T;t[30]!==n||t[31]!==r?(T=e=>r.configure(n,{target:e}),t[30]=n,t[31]=r,t[32]=T):T=t[32];let E;t[33]!==n.target||t[34]!==w||t[35]!==T?(E=(0,Y.jsx)(qW,{label:`Compare`,value:C,groups:w,onChange:T}),t[33]=n.target,t[34]=w,t[35]=T,t[36]=E):E=t[36];let D;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,Y.jsx)(`p`,{className:`popup-note`,children:`Changes since the common ancestor. Uncommitted edits are included only for the working tree.`}),t[37]=D):D=t[37];let O;t[38]!==_||t[39]!==x||t[40]!==E?(O=(0,Y.jsx)(QH,{children:(0,Y.jsx)(tU,{side:`right`,align:`start`,sideOffset:10,className:`floating`,children:(0,Y.jsxs)(aU,{className:`popup comparison-popup`,children:[h,_,x,S,E,D]})})}),t[38]=_,t[39]=x,t[40]=E,t[41]=O):O=t[41];let k;return t[42]!==m||t[43]!==O?(k=(0,Y.jsxs)(KH,{children:[m,O]}),t[42]=m,t[43]=O,t[44]=k):k=t[44],k}function mG(e){let t=(0,kA.c)(34),{entry:n,workspace:r}=e,i=n.repo,a;t[0]!==n||t[1]!==r?(a=r.included(n),t[0]=n,t[1]=r,t[2]=a):a=t[2];let o=a,s=`selector-row ${o?`is-selected`:``}`,c=`Include ${i.name}`,l;t[3]!==i.path||t[4]!==r?(l=e=>r.select(i.path,e),t[3]=i.path,t[4]=r,t[5]=l):l=t[5];let u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Y.jsx)(RH,{children:(0,Y.jsx)(_j,{weight:`bold`})}),t[6]=u):u=t[6];let d;t[7]!==o||t[8]!==c||t[9]!==l?(d=(0,Y.jsx)(LH,{className:`checkbox`,"aria-label":c,checked:o,onCheckedChange:l,children:u}),t[7]=o,t[8]=c,t[9]=l,t[10]=d):d=t[10];let f;t[11]===i.worktree?f=t[12]:(f=i.worktree&&(0,Y.jsx)(`span`,{className:`worktree-label`,children:`worktree`}),t[11]=i.worktree,t[12]=f);let p;t[13]!==i.name||t[14]!==i.path||t[15]!==f?(p=(0,Y.jsxs)(`span`,{className:`selector-name`,title:i.path,children:[i.name,f]}),t[13]=i.name,t[14]=i.path,t[15]=f,t[16]=p):p=t[16];let m=`selector-count ${n.error?`has-error`:``}`,h=n.error||`${n.data?.files.length||0} changed ${n.data?.files.length===1?`file`:`files`}`,g;t[17]!==n.data?.files||t[18]!==n.error||t[19]!==n.loading?(g=n.loading?(0,Y.jsx)(`span`,{className:`busy-dot`}):n.error?(0,Y.jsx)(Pj,{}):n.data?.files.length||`—`,t[17]=n.data?.files,t[18]=n.error,t[19]=n.loading,t[20]=g):g=t[20];let _;t[21]!==h||t[22]!==g||t[23]!==m?(_=(0,Y.jsx)(`span`,{className:m,title:h,children:g}),t[21]=h,t[22]=g,t[23]=m,t[24]=_):_=t[24];let v;t[25]!==n||t[26]!==r?(v=(0,Y.jsx)(pG,{entry:n,workspace:r}),t[25]=n,t[26]=r,t[27]=v):v=t[27];let y;return t[28]!==_||t[29]!==v||t[30]!==s||t[31]!==d||t[32]!==p?(y=(0,Y.jsxs)(`div`,{className:s,children:[d,p,_,v]}),t[28]=_,t[29]=v,t[30]=s,t[31]=d,t[32]=p,t[33]=y):y=t[33],y}function hG(e){let t=(0,kA.c)(71),{workspace:n}=e,[r,i]=(0,b.useState)(``),a,o,s,c,l,u,d,f,p,m,h,g,_,v;if(t[0]!==r||t[1]!==n){let e;t[16]===r?e=t[17]:(e=e=>e.repo.name.toLowerCase().includes(r.toLowerCase()),t[16]=r,t[17]=e),v=n.entries.filter(e),c=KH;let y,b;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Y.jsx)(Cj,{}),b=(0,Y.jsx)(`strong`,{children:`Repositories`}),t[18]=y,t[19]=b):(y=t[18],b=t[19]);let x=n.scanning?`Scanning…`:`${n.selected.length} of ${n.entries.length}`,S;t[20]===x?S=t[21]:(S=(0,Y.jsx)(`small`,{children:x}),t[20]=x,t[21]=S);let C;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Y.jsx)(mj,{}),t[22]=C):C=t[22],t[23]===S?_=t[24]:(_=(0,Y.jsxs)(YH,{className:`selector-trigger`,"aria-label":`Repositories`,children:[y,b,S,C]}),t[23]=S,t[24]=_),s=QH,o=tU,m=8,h=`start`,g=`floating`,a=aU,d=`popup selector-popup`;let w;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Y.jsx)(Dj,{}),t[25]=w):w=t[25],t[26]===r?f=t[27]:(f=(0,Y.jsxs)(`div`,{className:`search-field`,children:[w,(0,Y.jsx)(NM,{"aria-label":`Filter repositories`,placeholder:`Find a repository…`,value:r,onValueChange:i})]}),t[26]=r,t[27]=f);let T;t[28]===n.selection?T=t[29]:(T=n.selection===`custom`?[]:[n.selection],t[28]=n.selection,t[29]=T);let E;t[30]===n?E=t[31]:(E=e=>{e[0]&&n.setSelection(e[0])},t[30]=n,t[31]=E);let D;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(D=dG.map(gG),t[32]=D):D=t[32];let O;t[33]!==T||t[34]!==E?(O=(0,Y.jsx)(fl,{className:`segmented`,"aria-label":`Which repositories to review`,value:T,onValueChange:E,children:D}),t[33]=T,t[34]=E,t[35]=O):O=t[35];let k=n.selection===`custom`?`Custom · `:``,A;t[36]!==k||t[37]!==n.entries.length||t[38]!==n.selected.length?(A=(0,Y.jsxs)(`span`,{className:`selector-summary`,children:[k,n.selected.length,` of `,n.entries.length]}),t[36]=k,t[37]=n.entries.length,t[38]=n.selected.length,t[39]=A):A=t[39],t[40]!==O||t[41]!==A?(p=(0,Y.jsxs)(`div`,{className:`selector-actions`,children:[O,A]}),t[40]=O,t[41]=A,t[42]=p):p=t[42],l=`selector-list`;let j;t[43]===n?j=t[44]:(j=e=>(0,Y.jsx)(mG,{entry:e,workspace:n},e.repo.path),t[43]=n,t[44]=j),u=v.map(j),t[0]=r,t[1]=n,t[2]=a,t[3]=o,t[4]=s,t[5]=c,t[6]=l,t[7]=u,t[8]=d,t[9]=f,t[10]=p,t[11]=m,t[12]=h,t[13]=g,t[14]=_,t[15]=v}else a=t[2],o=t[3],s=t[4],c=t[5],l=t[6],u=t[7],d=t[8],f=t[9],p=t[10],m=t[11],h=t[12],g=t[13],_=t[14],v=t[15];let y;t[45]!==v.length||t[46]!==n.scanning?(y=!v.length&&(0,Y.jsx)(`p`,{className:`popup-empty`,children:n.scanning?`Discovering repositories…`:`No matching repositories.`}),t[45]=v.length,t[46]=n.scanning,t[47]=y):y=t[47];let x;t[48]!==l||t[49]!==y||t[50]!==u?(x=(0,Y.jsxs)(`div`,{className:l,children:[u,y]}),t[48]=l,t[49]=y,t[50]=u,t[51]=x):x=t[51];let S;t[52]!==a||t[53]!==x||t[54]!==d||t[55]!==f||t[56]!==p?(S=(0,Y.jsxs)(a,{className:d,children:[f,p,x]}),t[52]=a,t[53]=x,t[54]=d,t[55]=f,t[56]=p,t[57]=S):S=t[57];let C;t[58]!==o||t[59]!==S||t[60]!==m||t[61]!==h||t[62]!==g?(C=(0,Y.jsx)(o,{sideOffset:m,align:h,className:g,children:S}),t[58]=o,t[59]=S,t[60]=m,t[61]=h,t[62]=g,t[63]=C):C=t[63];let w;t[64]!==s||t[65]!==C?(w=(0,Y.jsx)(s,{children:C}),t[64]=s,t[65]=C,t[66]=w):w=t[66];let T;return t[67]!==c||t[68]!==w||t[69]!==_?(T=(0,Y.jsxs)(c,{children:[_,w]}),t[67]=c,t[68]=w,t[69]=_,t[70]=T):T=t[70],T}function gG(e){return(0,Y.jsx)(xl,{value:e.value,title:e.hint,children:e.label},e.value)}var _G=20;function vG(e){let t=(0,kA.c)(24),{entry:n,search:r,density:i,navigate:a}=e,o;t[0]===n.data?.files?o=t[1]:(o=n.data?.files||[],t[0]=n.data?.files,t[1]=o);let s=o,c;t[2]===s?c=t[3]:(c=s.map(xG),t[2]=s,t[3]=c);let l=c,u;t[4]===s?u=t[5]:(u=s.map(bG),t[4]=s,t[5]=u);let d;t[6]!==n.repo||t[7]!==s||t[8]!==a?(d=e=>{e[0]&&s.some(t=>t.name===e[0])&&a(n.repo.path,e[0])},t[6]=n.repo,t[7]=s,t[8]=a,t[9]=d):d=t[9];let f;t[10]!==i||t[11]!==l||t[12]!==u||t[13]!==d?(f={paths:u,gitStatus:l,initialExpansion:`open`,flattenEmptyDirectories:!0,density:i,unsafeCSS:`
|
|
2801
|
+
[data-item-section="content"] {
|
|
2802
|
+
flex-shrink: 0;
|
|
2803
|
+
min-width: max-content;
|
|
2804
|
+
max-width: none;
|
|
2805
|
+
overflow: visible;
|
|
2806
|
+
}
|
|
2807
|
+
[data-type="item"] {
|
|
2808
|
+
min-width: max-content;
|
|
2809
|
+
}
|
|
2810
|
+
[data-file-tree-virtualized-scroll="true"] {
|
|
2811
|
+
overflow-x: auto;
|
|
2812
|
+
}
|
|
2813
|
+
`,onSelectionChange:d},t[10]=i,t[11]=l,t[12]=u,t[13]=d,t[14]=f):f=t[14];let{model:p}=TH(f),m,h;t[15]!==p||t[16]!==r?(m=()=>{p.setSearch(r||null)},h=[p,r],t[15]=p,t[16]=r,t[17]=m,t[18]=h):(m=t[17],h=t[18]),(0,b.useEffect)(m,h);let g=DH(p,yG),_=uP[i].itemHeight,v=Math.min(_G,g)*_,y;t[19]===v?y=t[20]:(y={height:v},t[19]=v,t[20]=y);let x;return t[21]!==p||t[22]!==y?(x=(0,Y.jsx)(JM,{model:p,className:`file-tree`,style:y}),t[21]=p,t[22]=y,t[23]=x):x=t[23],x}function yG(e){return e.getVisibleCount()}function bG(e){return e.name}function xG(e){return{path:e.name,status:e.type===`new`?`added`:e.type===`deleted`?`deleted`:e.type.startsWith(`rename`)?`renamed`:`modified`}}function SG(e){let t=(0,kA.c)(24),{entry:n,search:r,density:i,workspace:a,navigate:o}=e,[s,c]=(0,b.useState)(!0),l;t[0]===n.data?.files?l=t[1]:(l=n.data?.files||[],t[0]=n.data?.files,t[1]=l);let u;t[2]===l?u=t[3]:(u=cG(l),t[2]=l,t[3]=u);let d=u,f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Y.jsx)(hj,{className:`disclosure`}),t[4]=f):f=t[4];let p;t[5]===n.repo.name?p=t[6]:(p=(0,Y.jsx)(`span`,{children:n.repo.name}),t[5]=n.repo.name,t[6]=p);let m;t[7]!==n.loading||t[8]!==d?(m=n.loading?(0,Y.jsx)(`span`,{className:`busy-dot`}):(0,Y.jsxs)(`span`,{className:`diff-stat`,children:[(0,Y.jsx)(`span`,{className:`added`,children:d.added?`+${d.added}`:``}),(0,Y.jsx)(`span`,{className:`removed`,children:d.removed?`−${d.removed}`:``})]}),t[7]=n.loading,t[8]=d,t[9]=m):m=t[9];let h;t[10]!==n.repo.path||t[11]!==p||t[12]!==m?(h=(0,Y.jsxs)(Xj,{className:`sidebar-repo-heading`,title:n.repo.path,children:[f,p,m]}),t[10]=n.repo.path,t[11]=p,t[12]=m,t[13]=h):h=t[13];let g;t[14]!==i||t[15]!==n||t[16]!==o||t[17]!==r||t[18]!==a?(g=(0,Y.jsx)(oM,{className:`sidebar-repo-panel`,children:n.error?(0,Y.jsxs)(`p`,{className:`sidebar-error`,children:[(0,Y.jsx)(Pj,{}),n.error,(0,Y.jsx)(bu,{className:`text-button`,onClick:()=>void a.reload(n),children:`Retry`})]}):n.loading&&!n.data?(0,Y.jsxs)(`div`,{className:`tree-skeleton`,"aria-label":`Loading changed files`,children:[(0,Y.jsx)(`i`,{}),(0,Y.jsx)(`i`,{}),(0,Y.jsx)(`i`,{})]}):n.data?.files.length?(0,Y.jsx)(vG,{entry:n,search:r,density:i,navigate:o},n.data.version):(0,Y.jsx)(`p`,{className:`repo-note`,children:`No changes in this comparison.`})}),t[14]=i,t[15]=n,t[16]=o,t[17]=r,t[18]=a,t[19]=g):g=t[19];let _;return t[20]!==s||t[21]!==h||t[22]!==g?(_=(0,Y.jsxs)(Jj,{className:`sidebar-repo`,open:s,onOpenChange:c,children:[h,g]}),t[20]=s,t[21]=h,t[22]=g,t[23]=_):_=t[23],_}function CG(e){let t=(0,kA.c)(47),{workspace:n,density:r,navigate:i}=e,[a,o]=(0,b.useState)(``),s;t[0]===n.entries?s=t[1]:(s=n.entries.some(wG),t[0]=n.entries,t[1]=s);let c=s,l,u,d,f,p,m,h,g;if(t[2]!==r||t[3]!==i||t[4]!==c||t[5]!==a||t[6]!==n){let e=a.trim().toLowerCase();g=n.selected.flatMap(t=>!e||t.repo.name.toLowerCase().includes(e)?[{entry:t,search:``}]:t.data?.files.some(t=>t.name.toLowerCase().includes(e))?[{entry:t,search:a}]:[]),f=`sidebar`,p=`Workspace navigation`;let s;t[15]===n?s=t[16]:(s=(0,Y.jsx)(hG,{workspace:n}),t[15]=n,t[16]=s);let _=n.scanning||c,v;t[17]===n?v=t[18]:(v=()=>void n.open(n.root,!0),t[17]=n,t[18]=v);let y=c||n.scanning?`spinning`:``,b;t[19]===y?b=t[20]:(b=(0,Y.jsx)(dj,{className:y}),t[19]=y,t[20]=b);let x;t[21]!==_||t[22]!==v||t[23]!==b?(x=(0,Y.jsx)(KW,{label:`Rescan and reload changes`,disabled:_,onClick:v,children:b}),t[21]=_,t[22]=v,t[23]=b,t[24]=x):x=t[24],t[25]!==x||t[26]!==s?(m=(0,Y.jsxs)(`div`,{className:`sidebar-top`,children:[s,x]}),t[25]=x,t[26]=s,t[27]=m):m=t[27];let S;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Y.jsx)(Dj,{}),t[28]=S):S=t[28],t[29]===a?h=t[30]:(h=(0,Y.jsxs)(`div`,{className:`sidebar-search search-field`,children:[S,(0,Y.jsx)(NM,{"aria-label":`Filter changed files`,placeholder:`Find a file…`,value:a,onValueChange:o})]}),t[29]=a,t[30]=h),l=`repository-list`,u=`Changed files`,d=n.scanning&&!n.entries.length?(0,Y.jsxs)(`div`,{className:`tree-skeleton`,role:`status`,children:[(0,Y.jsx)(`i`,{}),(0,Y.jsx)(`i`,{}),(0,Y.jsx)(`i`,{}),(0,Y.jsx)(`span`,{children:`Discovering repositories…`})]}):g.map(e=>{let{entry:t,search:a}=e;return(0,Y.jsx)(SG,{entry:t,search:a,density:r,workspace:n,navigate:i},t.repo.path)}),t[2]=r,t[3]=i,t[4]=c,t[5]=a,t[6]=n,t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m,t[13]=h,t[14]=g}else l=t[7],u=t[8],d=t[9],f=t[10],p=t[11],m=t[12],h=t[13],g=t[14];let _;t[31]!==a||t[32]!==g||t[33]!==n.scanning||t[34]!==n.selected.length?(_=!n.scanning&&!g.length&&(0,Y.jsx)(`p`,{className:`repo-note`,children:a?`No matching files.`:n.selected.length?`No changes in the current comparisons.`:`Choose repositories to review.`}),t[31]=a,t[32]=g,t[33]=n.scanning,t[34]=n.selected.length,t[35]=_):_=t[35];let v;t[36]!==l||t[37]!==u||t[38]!==d||t[39]!==_?(v=(0,Y.jsxs)(`nav`,{className:l,"aria-label":u,children:[d,_]}),t[36]=l,t[37]=u,t[38]=d,t[39]=_,t[40]=v):v=t[40];let y;return t[41]!==v||t[42]!==f||t[43]!==p||t[44]!==m||t[45]!==h?(y=(0,Y.jsxs)(`aside`,{className:f,"aria-label":p,children:[m,h,v]}),t[41]=v,t[42]=f,t[43]=p,t[44]=m,t[45]=h,t[46]=y):y=t[46],y}function wG(e){return e.loading}function TG(e){let t=(0,kA.c)(17),{width:n,onResize:r,children:i}=e,[a,o]=(0,b.useState)(null),s=(0,b.useRef)(null),c=EG,l=a??n,u;t[0]===l?u=t[1]:(u={width:l},t[0]=l,t[1]=u);let d=a??n,f,p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>{if(e.button!==0)return;e.preventDefault();let t=e.currentTarget.parentElement.getBoundingClientRect().width;s.current={x:e.clientX,width:t,current:t},e.currentTarget.setPointerCapture(e.pointerId)},p=e=>{if(!s.current)return;let t=c(s.current.width+e.clientX-s.current.x);s.current.current=t,o(t)},t[2]=f,t[3]=p):(f=t[2],p=t[3]);let m;t[4]===r?m=t[5]:(m=e=>{s.current&&(r(s.current.current),s.current=null,o(null),e.currentTarget.releasePointerCapture(e.pointerId))},t[4]=r,t[5]=m);let h;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>{s.current=null,o(null)},t[6]=h):h=t[6];let g;t[7]===r?g=t[8]:(g=e=>{let t=e.currentTarget.parentElement.getBoundingClientRect().width,n={ArrowLeft:t-20,ArrowRight:t+20,Home:220,End:640}[e.key];n!==void 0&&(e.preventDefault(),r(c(n)))},t[7]=r,t[8]=g);let _;t[9]!==d||t[10]!==m||t[11]!==g?(_=(0,Y.jsx)(`div`,{className:`sidebar-resizer`,role:`separator`,"aria-label":`Sidebar width`,"aria-orientation":`vertical`,"aria-valuemin":220,"aria-valuemax":640,"aria-valuenow":d,tabIndex:0,onPointerDown:f,onPointerMove:p,onPointerUp:m,onLostPointerCapture:h,onKeyDown:g}),t[9]=d,t[10]=m,t[11]=g,t[12]=_):_=t[12];let v;return t[13]!==i||t[14]!==u||t[15]!==_?(v=(0,Y.jsxs)(`div`,{className:`desktop-sidebar`,style:u,children:[i,_]}),t[13]=i,t[14]=u,t[15]=_,t[16]=v):v=t[16],v}function EG(e){return Math.max(220,Math.min(640,window.innerWidth-360,e))}function DG({entry:e,file:t,settings:n,collapsed:r,onCollapse:i}){let[a,o]=(0,b.useState)(``),[s,c]=(0,b.useState)(!1),l=(0,b.useRef)(null),u=(0,b.useRef)(null),d=cG([t]),f=(0,b.useCallback)(async t=>{o(``),c(!0);try{return await rG(`file`,{repo:e.repo.path,name:t.name,oldName:t.prevName||t.name,oldRef:e.data.mergeBase,newRef:e.data.targetRef,expectedHash:t.newObjectId||``})}catch(e){throw o(e instanceof Error?e.message:`Could not expand context.`),e}finally{c(!1)}},[e.repo.path,e.data]);return(0,Y.jsxs)(`div`,{className:`diff-file`,id:oG(e.repo.path,t.name),children:[(0,Y.jsxs)(`button`,{className:`file-heading`,"aria-expanded":!r,onClick:()=>i(!r),children:[(0,Y.jsx)(hj,{className:`disclosure`}),(0,Y.jsx)(xj,{}),(0,Y.jsxs)(`span`,{className:`file-path`,children:[t.prevName&&(0,Y.jsxs)(`span`,{className:`muted`,children:[t.prevName,` → `]}),t.name]}),(0,Y.jsx)(`span`,{className:`file-status`,children:t.type===`new`?`Added`:t.type===`deleted`?`Deleted`:t.type.startsWith(`rename`)?`Renamed`:``}),(0,Y.jsxs)(`span`,{className:`diff-stat`,children:[(0,Y.jsx)(`span`,{className:`added`,children:d.added?`+${d.added}`:``}),(0,Y.jsx)(`span`,{className:`removed`,children:d.removed?`−${d.removed}`:``})]})]}),(0,Y.jsx)(`div`,{className:`file-panel`,"data-collapsed":r||void 0,ref:u,onMouseDownCapture:e=>{let t=e.nativeEvent.composedPath()[0];l.current=t instanceof Element?t:u.current},children:t.hunks.length?(0,Y.jsx)(DA,{fileDiff:t,options:{theme:{light:`pierre-light`,dark:`pierre-dark`},themeType:n.theme,diffStyle:n.layout,overflow:n.wrap?`wrap`:`scroll`,lineDiffType:n.wordDiff,expansionLineCount:n.expansionLines,disableFileHeader:!0,hunkSeparators:`line-info`,collapsed:r,loadDiffFiles:f}}):!r&&(0,Y.jsx)(`p`,{className:`file-note`,children:t.type===`rename-pure`?`File renamed without content changes.`:`No text hunks. Binary content, an empty file, or a file mode change.`})}),(0,Y.jsx)(KH,{open:!!a||s,onOpenChange:e=>!e&&o(``),children:(0,Y.jsx)(QH,{children:(0,Y.jsx)(tU,{anchor:()=>l.current||u.current,side:`top`,align:`center`,sideOffset:6,className:`floating`,children:(0,Y.jsx)(aU,{className:`popup context-status`,role:a?`alert`:`status`,children:a?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Pj,{}),(0,Y.jsx)(`span`,{children:a}),(0,Y.jsx)(cU,{className:`text-button`,children:`Dismiss`})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`span`,{className:`busy-dot`}),(0,Y.jsx)(`span`,{children:`Loading the full file…`})]})})})})})]})}var OG=b.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,...o}=e,[s,c]=b.useState(void 0),l=_M(!0)?.disabled||a,u=Di(`fieldset`,e,{ref:t,state:{disabled:l},props:[{"aria-labelledby":s,disabled:l},o]}),d=b.useMemo(()=>({legendId:s,setLegendId:c,disabled:l}),[s,c,l]);return(0,Y.jsx)(gM.Provider,{value:d,children:u})}),kG=b.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{disabled:s,setLegendId:c}=_M(),l=EM(a,c);return Di(`div`,e,{state:{disabled:s},ref:t,props:[{id:l},o]})}),AG=new Map;function jG(e,t){let n=JSON.stringify({locale:UU(e),options:t}),r=AG.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return AG.set(n,i),i}function MG(e,t,n){return e==null?``:jG(t,n).format(e)}var NG=b.createContext(void 0);function PG(){let e=b.useContext(NG);if(e===void 0)throw Error(F(43));return e}var FG={inputValue:()=>null,value:()=>null,...fM},IG=`零〇一二三四五六七八九`,LG=/[٠-٩۰-۹0-9]/g,RG=/[零〇一二三四五六七八九]/g,zG=[`%`,`٪`,`%`,`﹪`],BG=[`‰`,`؉`],VG=/[%٪%﹪]/,HG=/[‰؉]/,UG=/[%٪%﹪]/g,WG=/[‰؉]/g,GG=/[٠-٩۰-۹]/,KG=/[零〇一二三四五六七八九]/,qG=/[0-9٠-٩۰-۹0-9零〇一二三四五六七八九]/;function JG(e){return qG.test(e)}var YG=[`.`,`,`,`.`,`,`,`٫`,`٬`],XG=/\p{Zs}/u,ZG=/\p{Cf}/u,QG=/\p{Cf}/gu,$G=[`+`,`+`,`﹢`],eK=[`-`,`−`,`-`,`‒`,`–`,`—`,`﹣`],tK=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function nK(e,t){let[n,r=`0`]=String(e).split(`e`);return Number(`${n}e${Number(r)+t}`)}var rK=/[-−-‒–—﹣]/gu,iK=/[++﹢]/gu,aK=/[-−-‒–—﹣]/,oK=/[++﹢]/,sK=11111.1;function cK(e,t){return jG(e,t).formatToParts(sK)}function lK(e,t){let n=cK(e,t),r={};n.forEach(e=>{r[e.type]=e.value});let i=`.`;return jG(e).formatToParts(.1).forEach(e=>{e.type===`decimal`&&(i=e.value)}),{...r,decimal:i}}function uK(e,t,n){let r=e.replace(QG,``).trim();r=r.replace(rK,`-`).replace(iK,`+`);let i=!1,a=(e,t)=>(t===`-`&&(i=!0),``);r=r.replace(/([+-])\s*$/,a).replace(/^\s*([+-])/,a);let o=t;o===void 0&&(GG.test(r)?o=`ar`:KG.test(r)&&(o=`zh`));let{group:s,decimal:c,currency:l,exponentSeparator:u}=lK(o,n),d=jG(o,n).formatToParts(1).filter(e=>e.type===`unit`).map(e=>tK(e.value)),f=d.length?new RegExp(d.join(`|`),`g`):null,p=null;s&&(p=/\p{Zs}/u.test(s)?/\p{Zs}/gu:s===`'`||s===`’`?/['’]/g:new RegExp(tK(s),`g`));let m=[[p,``],[new RegExp(tK(c),`g`),`.`],[/[.٫]/g,`.`],[/[,٬]/g,``],[l?new RegExp(tK(l),`g`):null,``],[f,``],[UG,``],[WG,``],[u?new RegExp(tK(u),`g`):null,`e`],[LG,e=>String(e.charCodeAt(0)%16)],[RG,e=>String(Math.max(IG.indexOf(e)-1,0))]].reduce((e,[t,n])=>t?e.replace(t,n):e,r),h=m.lastIndexOf(`.`);if(h!==-1&&(m=`${m.slice(0,h).replace(/\./g,``)}.${m.slice(h+1).replace(/\./g,``)}`),/^[-+]?Infinity$/i.test(r)||r.includes(`∞`))return null;let g=(i?`-`:``)+m,_=parseFloat(g),v=n?.style,y=v===`unit`&&n?.unit===`percent`,b=VG.test(e)||v===`percent`;return HG.test(e)?_=nK(_,-3):!y&&b&&(_=nK(_,-2)),Number.isFinite(_)?_:null}function dK(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var fK=1e-10,pK=1e-10;function mK(e){return e?.maximumFractionDigits!=null||e?.minimumFractionDigits!=null||e?.maximumSignificantDigits!=null||e?.minimumSignificantDigits!=null||e?.roundingIncrement!=null||e?.roundingMode!=null||e?.roundingPriority!=null}function hK(e,t){if(!Number.isFinite(e))return e;if(!mK(t)){let t=parseFloat(e.toPrecision(15));return Math.abs(t-e)<=Math.min(2**-52*Math.max(1,Math.abs(e)),pK)?t:e}let n=jG(`en-US`,{...t,signDisplay:`auto`,currencySign:`standard`,notation:t.notation===`compact`?`standard`:t.notation,useGrouping:!1}),r=n.format(e),i=uK(r,`en-US`,t);return i===null?e:n.format(i)===r?i:e}function gK(e,t,n,r){let i=Math.abs(n),a=Math.sign(n),o=i*fK*a,s=e-t+o;return r?t+Math.round(s/n)*n:t+(a>0?Math.floor(s/i):Math.ceil(s/i))*i}function _K(e,t,n,r,i,a,o,s,c){if(e===null)return e;let l=e;if(t!=null&&o&&t!==0&&(l=gK(l,s||n===-(2**53-1)?i:n,t,s)),c&&(l=dK(l,n,r)),t==null&&!mK(a))return l;let u=hK(l,a);return c?dK(u,n,r):u}var vK=b.forwardRef(function(e,t){let{id:n,min:r,max:i,smallStep:a=.1,step:o=1,largeStep:s=10,required:c=!1,disabled:l=!1,readOnly:u=!1,form:d,name:f,defaultValue:p=null,value:m,onValueChange:h,onValueCommitted:g,allowWheelScrub:_=!1,snapOnStep:v=!1,allowOutOfRange:y=!1,format:x,locale:S,render:C,className:w,inputRef:T,style:E,...D}=e,{setDirty:O,validityData:k,disabled:A,setFilled:j,name:M,state:P,validation:F}=hM(),{clearErrors:I}=yM(),L=A||l,R=M??f,z=o===`any`?1:o,[B,V]=b.useState(!1),H=r??-(2**53-1),U=i??2**53-1,ee=r??0,te=x?.style,ne=b.useRef(null),W=ln(T,F.inputRef),ie=TM({id:n}),[ae,G]=jc({controlled:m,default:p,name:`NumberField`,state:`value`}),oe=hn(ae);N(()=>{j(ae!==null)},[j,ae]);let se=Po(),ce=hn(x),le=b.useRef(!1),ue=X((e,t)=>{le.current=!1,g?.(e,t)}),de=b.useRef(!0),fe=b.useRef(null),[pe,me]=b.useState(()=>MG(ae,S,x)),[he,ge]=b.useState(`numeric`),_e=X(()=>{let e=cK(S,x),t=new Set(YG),n=e=>e.forEach(e=>t.add(e)),r=e.find(e=>e.type===`decimal`)?.value??lK(S,x).decimal;t.add(r),e.forEach(e=>{e.type!==`integer`&&e.type!==`fraction`&&e.type!==`exponentInteger`&&e.type!==`compact`&&(n(Array.from(e.value)),XG.test(e.value)&&t.add(` `))});let i=te===`percent`||te===`unit`&&x?.unit===`percent`,a=te===`percent`||te===`unit`&&x?.unit===`permille`;return i&&n(zG),a&&n(BG),n($G),(H<0||y)&&n(eK),t}),ve=X(e=>e?.altKey?a:e?.shiftKey?s:z),ye=X((e,t)=>{let n=t.event,r=t.direction,i=t.reason.startsWith(`input-`)||t.reason===`none`,a=!y||!i,o=_K(e,r?ve(n)*r:void 0,H,U,ee,ce.current,v,n?.altKey??!1,a),s=o!==ae||i&&(e!==ae||de.current===!1);if(s){if(h?.(o,t),t.isCanceled)return!1;G(o),O(o!==k.initialValue),le.current=!0}return fe.current=o,de.current&&me(MG(o,S,x)),se(),s}),be=X((e,{direction:t,currentValue:n,event:r,reason:i})=>{let a=n??oe.current,o=r;return typeof a==`number`?ye(a+e*t,J(i,o,void 0,{direction:t})):ye(0,J(i,o))});N(function(){if(!de.current)return;let e=MG(ae,S,x);e!==pe&&me(e)}),N(function(){if(!re)return;let e=`text`;H>=0&&(e=`decimal`),ge(e)},[H]);let xe=X(()=>{let e=ne.current;if(!e)return;let t=e.value.length;e.setSelectionRange(t,t),e.focus()});b.useEffect(function(){let e=ne.current;if(L||u||!_||!e)return;function t(e){if(e.ctrlKey||He(En(ne.current))!==ne.current)return;let t=Math.abs(e.deltaX)>Math.abs(e.deltaY),n=e.shiftKey&&t?e.deltaX:e.deltaY;if(n===0||!e.shiftKey&&t)return;e.preventDefault(),de.current=!0;let r=ve(e);be(r,{direction:n>0?-1:1,event:e,reason:`wheel`})&&ue(fe.current,en(qt,e))}return sn(e,`wheel`,t)},[_,be,L,u,ve,ue,fe,oe]);let Se=b.useMemo(()=>({...P,disabled:L,readOnly:u,required:c,value:ae,inputValue:pe,scrubbing:B}),[P,L,u,c,ae,pe,B]),Ce=b.useMemo(()=>({inputRef:ne,focusInput:xe,minWithDefault:H,maxWithDefault:U,id:ie,setValue:ye,incrementValue:be,getStepAmount:ve,allowInputSyncRef:de,formatOptionsRef:ce,valueRef:oe,lastChangedValueRef:fe,hasPendingCommitRef:le,name:R,nameProp:f,inputMode:he,getAllowedNonNumericKeys:_e,min:r,max:i,setInputValue:me,locale:S,setIsScrubbing:V,state:Se,onValueCommitted:ue}),[ne,xe,H,U,ie,ye,be,ve,ce,oe,R,f,he,_e,r,i,me,S,Se,ue]),we=Di(`div`,e,{ref:t,state:Se,props:D,stateAttributesMapping:FG});return(0,Y.jsxs)(NG.Provider,{value:Ce,children:[we,(0,Y.jsx)(`input`,{...F.getValidationProps(L,{onFocus(){xe()},onChange(e){if(e.nativeEvent.defaultPrevented||L||u)return;let t=e.currentTarget.valueAsNumber,n=Number.isNaN(t)?null:t,r=J(Ot,e.nativeEvent);ye(n,r),I(R),F.change(fe.current??n)}}),ref:W,type:`number`,form:d,name:R,value:ae??``,min:r,max:i,step:o,disabled:L,readOnly:u,required:c,"aria-hidden":!0,tabIndex:-1,style:R?kn:On,suppressHydrationWarning:!0})]})}),yK=b.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=PG();return Di(`div`,e,{ref:t,state:o,props:[{role:`group`},a],stateAttributesMapping:FG})}),bK=0,xK=class e extends B{static create(){return new e}start(e,t){this.clear(),this.currentId=setInterval(()=>{t()},e)}clear=()=>{this.currentId!==bK&&(clearInterval(this.currentId),this.currentId=bK)}};function SK(){let e=S(xK.create).current;return R(e.disposeEffect),e}var CK=60,wK=400,TK=8,EK=50,DK=3;function OK(e){return e===`touch`||e===`pen`}function kK(e){let{disabled:t,tick:n,onStop:r,tickDelay:i=CK,startDelay:a=wK,scrollDistance:o=TK,elementRef:s}=e,c=V(),l=SK(),u=V(),d=b.useRef(!1),f=b.useRef(0),p=b.useRef({x:0,y:0}),m=b.useRef(!1),h=b.useRef(!1),g=b.useRef(``),_=b.useRef(A),v=b.useRef(A),y=X(()=>{u.clear(),c.clear(),l.clear(),_.current(),f.current=0});function x(e){y();let t=s.current;if(!t)return;let o=ye(t);function u(e){e.preventDefault()}if(_.current=sn(o,`contextmenu`,u),v.current(),v.current=sn(o,`pointerup`,e=>{d.current=!1,y(),r?.(e)},{once:!0}),!n(e)){y();return}c.start(a,()=>{l.start(i,()=>{n(e)||y()})})}return b.useEffect(()=>()=>{y(),v.current()},[y]),b.useEffect(()=>{t&&(d.current=!1,m.current=!1,g.current=``,y())},[t,y]),{pointerHandlers:{onTouchStart(){m.current=!0},onTouchEnd(){m.current=!1},onPointerDown(e){e.defaultPrevented||e.button||t||(g.current=e.pointerType,h.current=!1,d.current=!0,p.current={x:e.clientX,y:e.clientY},OK(e.pointerType)?u.start(EK,()=>{let t=f.current;f.current=0,d.current&&t<DK?(x(e.nativeEvent),h.current=!0):(h.current=!1,y())}):(e.preventDefault(),x(e.nativeEvent)))},onPointerUp(e){OK(e.pointerType)&&(d.current=!1)},onPointerMove(e){if(t||!OK(e.pointerType)||!d.current)return;f.current+=1;let{x:n,y:r}=p.current,i=n-e.clientX,a=r-e.clientY;i**2+a**2>o**2&&y()},onMouseEnter(e){e.defaultPrevented||t||!d.current||m.current||OK(g.current)||x(e.nativeEvent)},onMouseLeave(){m.current||y()},onMouseUp(){m.current||y()}},shouldSkipClick:X(e=>e.defaultPrevented?!0:OK(g.current)?h.current:e.detail!==0)}}var AK={WebkitUserSelect:`none`,userSelect:`none`};function jK(e,t,n){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{allowInputSyncRef:l,formatOptionsRef:u,getStepAmount:d,id:f,incrementValue:p,inputRef:m,focusInput:h,maxWithDefault:g,minWithDefault:_,setValue:v,state:y,valueRef:b,locale:x,lastChangedValueRef:S,onValueCommitted:C}=PG(),{disabled:w,readOnly:T,value:E,inputValue:D}=y,O=a||w||E!=null&&(n?E>=g:E<=_),k=n?Ft:It;function A(e){let t=!l.current;if(l.current=!0,!t){S.current=b.current;return}let n=uK(D,x,u.current);if(n!==null){let t=J(k,e);v(n,t),t.isCanceled||(b.current=n)}}let{pointerHandlers:j,shouldSkipClick:M}=kK({disabled:O||T,elementRef:m,tick(e){let t=d(e);return p(t,{direction:n?1:-1,event:e,reason:k})},onStop(e){let t=S.current??b.current;C(t,en(k,e))}}),N={disabled:O,"aria-label":n?`Increase`:`Decrease`,"aria-controls":f,tabIndex:-1,style:AK,...j,onClick(e){let t=O||T;if(e.defaultPrevented||t||M(e))return;A(e.nativeEvent);let r=d(e),i=b.current;p(r,{direction:n?1:-1,event:e.nativeEvent,reason:k});let a=S.current??b.current;a!==i&&C(a,en(k,e.nativeEvent))},onPointerDown(e){e.defaultPrevented||T||e.button||O||(A(e.nativeEvent),S.current=null,OK(e.pointerType)||h(),j.onPointerDown(e))}},{getButtonProps:P,buttonRef:F}=hl({disabled:O||T,native:o,focusableWhenDisabled:!0}),I={...y,disabled:O};return Di(`button`,e,{ref:[t,F],state:I,props:[N,c,P],stateAttributesMapping:FG})}var MK=b.forwardRef(function(e,t){return jK(e,t,!0)}),NK=b.forwardRef(function(e,t){return jK(e,t,!1)}),PK=new Set([`Backspace`,`Delete`,`ArrowLeft`,`ArrowRight`,`Tab`,`Enter`,`Escape`]),FK=b.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{allowInputSyncRef:o,formatOptionsRef:s,getAllowedNonNumericKeys:c,getStepAmount:l,id:u,incrementValue:d,inputMode:f,max:p,min:m,name:h,nameProp:g,setValue:_,state:v,setInputValue:y,locale:x,inputRef:S,onValueCommitted:C,lastChangedValueRef:w,hasPendingCommitRef:T,valueRef:E}=PG(),{disabled:D,readOnly:O,required:k,value:A,inputValue:j}=v,{clearErrors:M}=yM(),{validationMode:P,setTouched:F,setFocused:I,invalid:L,shouldValidateOnChange:R,validation:z}=hM(),{labelId:B}=xM(),V=b.useRef(!1),H=b.useRef(null);return jM(S,u,A,void 0,!D,g),N(()=>{if(H.current!=null){let e=H.current;H.current=null,S.current?.setSelectionRange(e,e)}}),tu(A,()=>{if(M(h),V.current&&!R()){V.current=!1;return}z.change(A)}),Di(`input`,e,{ref:[t,S],state:v,props:[{id:u,required:k,disabled:D,readOnly:O,inputMode:f,value:j,type:`text`,autoComplete:`off`,autoCorrect:`off`,spellCheck:`false`,"aria-roledescription":`Number field`,"aria-invalid":!D&&L?!0:void 0,"aria-labelledby":B,suppressHydrationWarning:!0,onFocus(e){e.defaultPrevented||D||I(!0)},onBlur(e){if(e.defaultPrevented||D||(F(!0),I(!1),O))return;let t=!o.current,n=T.current;if(o.current=!0,j.trim()===``){let r=J(Rt,e.nativeEvent);if(_(null,r),r.isCanceled)return;P===`onBlur`&&z.commit(null),(t||n||A!==null)&&C(null,en(Rt,e.nativeEvent));return}let r=s.current,i=uK(j,x,r);if(i===null)return;let a=mK(r),c;c=!t&&!a?A:a?hK(i,r):i;let l=en(zt,e.nativeEvent),u=A!==c,d=t||u||n,f=c;if(u){let t=J(zt,e.nativeEvent);if(V.current=!0,_(c,t),t.isCanceled){V.current=!1;return}f=w.current,f===A&&(V.current=!1)}P===`onBlur`&&z.commit(f),d&&C(f,l);let p=MG(f,x,r);j!==p&&y(p)},onChange(e){if(e.nativeEvent.defaultPrevented)return;o.current=!1;let t=e.currentTarget.value;if(t.trim()===``){y(t),_(null,J(Rt,e.nativeEvent));return}let n=c();if(!Array.from(t).every(e=>JG(e)||aK.test(e)||n.has(e)||ZG.test(e)))return;let r=uK(t,x,s.current);y(t),r!==null&&_(r,J(Lt,e.nativeEvent))},onKeyDown(e){if(e.defaultPrevented||O||D)return;let t=e.nativeEvent,n=!o.current,r=c(),i=r.has(e.key),{decimal:a,currency:u,percentSign:f}=lK(x,s.current),h=e.currentTarget.selectionStart,g=e.currentTarget.selectionEnd,v=h===0&&g===j.length,y=e=>h!=null&&g!=null&&e>=h&&e<g;[[aK,rK],[oK,iK]].forEach(([t,n])=>{if(t.test(e.key)&&Array.from(r).some(e=>t.test(e))){let e=j.search(n),t=e!==-1&&y(e);i=!(aK.test(j)||oK.test(j))||v||t}}),[a,u,f].forEach(t=>{if(e.key===t){let e=j.indexOf(t),n=y(e);i=e===-1||v||n}});let b=PK.has(e.key),S=e.key===`ArrowUp`||e.key===`ArrowDown`;if(e.which===229||e.altKey&&!S||e.ctrlKey||e.metaKey||i||JG(e.key)||b)return;let T=null;if(e.key===`Home`&&m!=null?T=m:e.key===`End`&&p!=null&&(T=p),e.key.length>1&&!S&&T===null)return;let k=n?uK(j,x,s.current):null,A=l(e);e.preventDefault(),e.stopPropagation();let M=en(Gt,t),N=!1;(S||T!==null)&&(o.current=!0),S?(n||(w.current=E.current),N=d(A,{direction:e.key===`ArrowUp`?1:-1,currentValue:k,event:t,reason:Gt})):T!==null&&(N=_(T,J(Gt,t))),N&&C(w.current,M)},onPaste(e){if(e.defaultPrevented||O||D)return;let t=``;try{t=e.clipboardData?.getData(`text/plain`)??``}catch{return}e.preventDefault();let n=e.currentTarget,r=n.selectionStart,i=n.selectionEnd,a=j.slice(0,r)+t+j.slice(i),c=uK(a,x,s.current);c!==null&&(o.current=!1,H.current=r+t.length,_(c,J(Bt,e.nativeEvent)),y(a))}},a,e=>z.getValidationProps(D,e)],stateAttributesMapping:FG})}),IK=b.createContext(void 0);function LK(){let e=b.useContext(IK);if(e===void 0)throw Error(F(63));return e}var RK=`data-checked`,zK=`data-unchecked`,BK={...fM,checked(e){return e?{[RK]:``}:{[zK]:``}}},VK=b.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i,"aria-labelledby":a,form:o,id:s,inputRef:c,name:l,nativeButton:u=!1,onCheckedChange:d,readOnly:f=!1,required:p=!1,disabled:m=!1,render:h,uncheckedValue:g,value:_,style:v,...y}=e,{clearErrors:x}=yM(),{state:S,setTouched:C,setDirty:w,validityData:T,setFilled:E,setFocused:D,validationMode:O,disabled:k,name:A,validation:j}=hM(),{labelId:P}=xM(),F=k||m,I=A??l,L=b.useRef(null),R=ln(L,c,j.inputRef),z=b.useRef(null),B=Js(),V=TM({id:s}),H=u?void 0:V,[U,ee]=jc({controlled:n,default:!!i,name:`Switch`,state:`checked`});jM(z,B,U,void 0,!F,l),N(()=>{E(U)},[U,E]),tu(U,()=>{x(I),w(U!==T.initialValue),j.change(U)});let{getButtonProps:te,buttonRef:ne}=hl({disabled:F,native:u}),W=SM(a,P,L,!u,H),re={id:u?V:B,role:`switch`,"aria-checked":U,"aria-readonly":f||void 0,"aria-required":p||void 0,"aria-labelledby":W,onFocus(){F||D(!0)},onBlur(){let e=L.current;e&&!F&&(C(!0),D(!1),O===`onBlur`&&j.commit(e.checked))},onClick(e){if(f||F)return;e.preventDefault();let t=L.current;t&&ml(t,e)}},ie={...j.getValidationProps(F),checked:U,disabled:F,form:o,id:H,name:I,required:p,style:I?kn:On,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:R,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(f){e.preventDefault();return}let t=e.currentTarget.checked,n=J(Ot,e.nativeEvent);d?.(t,n),!n.isCanceled&&ee(t)},onClick(e){e.stopPropagation()},onFocus(){z.current?.focus()},..._===void 0?M:{value:_}},ae=b.useMemo(()=>({...S,checked:U,disabled:F,readOnly:f,required:p}),[S,U,F,f,p]),G=Di(`span`,e,{state:ae,ref:[t,z,ne],props:[re,y,te,e=>j.getValidationProps(F,e)],stateAttributesMapping:BK});return(0,Y.jsxs)(IK.Provider,{value:ae,children:[G,!U&&I&&g!==void 0&&(0,Y.jsx)(`input`,{type:`hidden`,form:o,name:I,value:g,disabled:F}),(0,Y.jsx)(`input`,{...ie,suppressHydrationWarning:!0})]})}),HK=b.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return Di(`span`,e,{state:LK(),ref:t,stateAttributesMapping:BK,props:a})}),UK=`0.2.0`;function WK(e){let t=(0,kA.c)(8),{label:n,hint:r,children:i}=e,a;t[0]===r?a=t[1]:(a=r&&(0,Y.jsx)(`small`,{children:r}),t[0]=r,t[1]=a);let o;t[2]!==n||t[3]!==a?(o=(0,Y.jsxs)(`span`,{className:`setting-text`,children:[n,a]}),t[2]=n,t[3]=a,t[4]=o):o=t[4];let s;return t[5]!==i||t[6]!==o?(s=(0,Y.jsxs)(`div`,{className:`setting`,children:[o,i]}),t[5]=i,t[6]=o,t[7]=s):s=t[7],s}function GK(e){let t=(0,kA.c)(11),{label:n,value:r,options:i,onChange:a}=e,o;t[0]===r?o=t[1]:(o=[r],t[0]=r,t[1]=o);let s;t[2]===a?s=t[3]:(s=e=>{e[0]&&a(e[0])},t[2]=a,t[3]=s);let c;t[4]===i?c=t[5]:(c=i.map(KK),t[4]=i,t[5]=c);let l;return t[6]!==n||t[7]!==o||t[8]!==s||t[9]!==c?(l=(0,Y.jsx)(fl,{className:`segmented`,"aria-label":n,value:o,onValueChange:s,children:c}),t[6]=n,t[7]=o,t[8]=s,t[9]=c,t[10]=l):l=t[10],l}function KK(e){return(0,Y.jsx)(xl,{value:e.value,children:e.label},e.value)}function qK(e){let t=(0,kA.c)(20),{label:n,value:r,min:i,max:a,step:o,onChange:s}=e,c;t[0]===s?c=t[1]:(c=e=>e!==null&&s(e),t[0]=s,t[1]=c);let l=`Fewer ${n}`,u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Y.jsx)(Oj,{}),t[2]=u):u=t[2];let d;t[3]===l?d=t[4]:(d=(0,Y.jsx)(NK,{"aria-label":l,children:u}),t[3]=l,t[4]=d);let f;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Y.jsx)(FK,{}),t[5]=f):f=t[5];let p=`More ${n}`,m;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Y.jsx)(kj,{}),t[6]=m):m=t[6];let h;t[7]===p?h=t[8]:(h=(0,Y.jsx)(MK,{"aria-label":p,children:m}),t[7]=p,t[8]=h);let g;t[9]!==d||t[10]!==h?(g=(0,Y.jsxs)(yK,{className:`counter-group`,children:[d,f,h]}),t[9]=d,t[10]=h,t[11]=g):g=t[11];let _;return t[12]!==n||t[13]!==a||t[14]!==i||t[15]!==o||t[16]!==c||t[17]!==g||t[18]!==r?(_=(0,Y.jsx)(vK,{className:`counter`,"aria-label":n,value:r,min:i,max:a,step:o,onValueCommitted:c,children:g}),t[12]=n,t[13]=a,t[14]=i,t[15]=o,t[16]=c,t[17]=g,t[18]=r,t[19]=_):_=t[19],_}function JK({settings:e,onChange:t,onReset:n}){let[r,i]=(0,b.useState)(``);return(0,Y.jsxs)(Ql,{children:[(0,Y.jsx)(iu,{render:(0,Y.jsx)(bu,{}),className:`icon-button`,"aria-label":`Settings`,children:(0,Y.jsx)(wj,{})}),(0,Y.jsxs)(Pl,{children:[(0,Y.jsx)(wl,{className:`dialog-backdrop`}),(0,Y.jsxs)(Ml,{className:`settings-dialog`,children:[(0,Y.jsxs)(`header`,{className:`settings-header`,children:[(0,Y.jsx)(Nj,{}),(0,Y.jsx)($l,{children:`Settings`})]}),(0,Y.jsx)(El,{className:`muted`,children:`These apply to every tab. What each tab compares stays with the tab.`}),(0,Y.jsxs)(OG,{className:`settings-group`,children:[(0,Y.jsx)(kG,{className:`settings-legend`,children:`Appearance`}),(0,Y.jsx)(WK,{label:`Theme`,children:(0,Y.jsx)(GK,{label:`Theme`,value:e.theme,onChange:e=>t({theme:e}),options:[{value:`system`,label:`System`},{value:`light`,label:`Light`},{value:`dark`,label:`Dark`}]})}),(0,Y.jsx)(WK,{label:`Diff layout`,children:(0,Y.jsx)(GK,{label:`Diff layout`,value:e.layout,onChange:e=>t({layout:e}),options:[{value:`unified`,label:`Unified`},{value:`split`,label:`Split`}]})}),(0,Y.jsx)(WK,{label:`Wrap long lines`,children:(0,Y.jsx)(VK,{className:`switch`,checked:e.wrap,onCheckedChange:e=>t({wrap:e}),children:(0,Y.jsx)(HK,{className:`switch-thumb`})})}),(0,Y.jsx)(WK,{label:`Sidebar density`,hint:`Row height in the changed file trees`,children:(0,Y.jsx)(GK,{label:`Sidebar density`,value:e.density,onChange:e=>t({density:e}),options:[{value:`compact`,label:`Compact`},{value:`default`,label:`Default`},{value:`relaxed`,label:`Relaxed`}]})})]}),(0,Y.jsxs)(OG,{className:`settings-group`,children:[(0,Y.jsx)(kG,{className:`settings-legend`,children:`Diffs`}),(0,Y.jsx)(WK,{label:`Highlight changes within a line`,children:(0,Y.jsx)(GK,{label:`Highlight changes within a line`,value:e.wordDiff,onChange:e=>t({wordDiff:e}),options:[{value:`word-alt`,label:`Words`},{value:`char`,label:`Characters`},{value:`none`,label:`Off`}]})}),(0,Y.jsx)(WK,{label:`Context lines per expansion`,hint:`How much surrounding code each expand reveals`,children:(0,Y.jsx)(qK,{label:`context lines`,value:e.expansionLines,min:5,max:200,step:5,onChange:e=>t({expansionLines:e})})})]}),(0,Y.jsxs)(OG,{className:`settings-group`,children:[(0,Y.jsx)(kG,{className:`settings-legend`,children:`Discovery`}),(0,Y.jsx)(WK,{label:`Search depth`,hint:`Directory levels below a workspace folder`,children:(0,Y.jsx)(qK,{label:`levels`,value:e.scanDepth,min:1,max:16,step:1,onChange:e=>t({scanDepth:e})})}),(0,Y.jsx)(WK,{label:`Directory budget`,hint:`Stop searching after this many directories`,children:(0,Y.jsx)(qK,{label:`directories`,value:e.scanBudget,min:100,max:2e5,step:1e3,onChange:e=>t({scanBudget:e})})}),(0,Y.jsxs)(`div`,{className:`skip-folders`,children:[(0,Y.jsx)(`label`,{htmlFor:`skip-folder`,children:`Skip these folders`}),(0,Y.jsx)(`p`,{className:`popup-note`,children:`Remove a name to include that folder in discovery.`}),(0,Y.jsxs)(`div`,{className:`folder-chips`,"aria-label":`Skipped folders`,children:[e.ignore.map(n=>(0,Y.jsxs)(bu,{className:`folder-chip`,"aria-label":`Include ${n} in discovery`,onClick:()=>t({ignore:e.ignore.filter(e=>e!==n)}),children:[n,(0,Y.jsx)(Fj,{})]},n)),!e.ignore.length&&(0,Y.jsx)(`span`,{className:`muted`,children:`No folder names are skipped.`})]}),(0,Y.jsxs)(`form`,{className:`folder-add`,onSubmit:n=>{n.preventDefault();let a=r.trim();a&&!e.ignore.includes(a)&&t({ignore:[...e.ignore,a]}),i(``)},children:[(0,Y.jsx)(NM,{id:`skip-folder`,className:`input`,placeholder:`Folder name, e.g. target`,value:r,onValueChange:i,maxLength:63,pattern:String.raw`[^/\\]+`,title:`Enter a folder name without path separators.`}),(0,Y.jsx)(bu,{type:`submit`,className:`text-button`,disabled:!r.trim()||e.ignore.length>=200,children:`Add`})]})]})]}),(0,Y.jsx)(`p`,{className:`popup-note`,children:`Discovery never walks inside a repository, so .gitignore never applies. Changes here take effect on the next rescan.`}),(0,Y.jsxs)(`div`,{className:`settings-actions`,children:[(0,Y.jsx)(bu,{className:`text-button`,onClick:()=>{i(``),n()},title:`Restore all app preferences. Tabs and comparisons are kept.`,children:`Reset preferences`}),(0,Y.jsx)(`div`,{className:`push`}),(0,Y.jsxs)(`span`,{className:`muted`,children:[`polydiff v`,UK]}),(0,Y.jsx)(Tl,{className:`primary-button`,children:`Done`})]})]})]})]})}var YK=/[\\/]+/;function XK(e){return e.split(YK).filter(Boolean)}function ZK(e,t){let n=XK(e.root),r=n.at(-1)||e.root,i=t.some(t=>t.root!==e.root&&(XK(t.root).at(-1)||``)===r)&&n.length>1?`${n.at(-2)}/${r}`:r,a=t.filter(t=>t.root===e.root);if(a.length<2)return i;let o=a.findIndex(t=>t.id===e.id);return o>0?`${i} ${o+1}`:i}function QK(){let[e,t]=(0,b.useState)(null),[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)([]),c=(0,b.useRef)(null),l=(0,b.useRef)(Promise.resolve()),u=(0,b.useRef)(new Map),d=(0,b.useRef)(void 0),f=(0,b.useCallback)(e=>{c.current=e,t(e)},[]),p=(0,b.useCallback)(e=>{let t=l.current.then(()=>iG(`state`,e));return l.current=t.then(()=>{},()=>{}),t.then(e=>(f(e),e),e=>{throw r(e.message),e})},[f]),m=(0,b.useCallback)(async e=>{let t=await p(e),n=t.activeTab;return n&&s(e=>e.includes(n)?e:[...e,n]),t},[p]);(0,b.useEffect)(()=>{let e=!0;return rG(`state`).then(t=>{e&&(f(t),t.activeTab&&s([t.activeTab]))}).catch(t=>e&&r(t.message)),()=>{e=!1}},[f]);let h=(0,b.useCallback)(()=>{clearTimeout(d.current);let e=[...u.current];u.current.clear();for(let[t,n]of e)m({op:`tab`,id:t,...n}).catch(()=>{})},[m]);(0,b.useEffect)(()=>()=>clearTimeout(d.current),[]);let g=(0,b.useCallback)((e,t)=>{let n=u.current.get(e);u.current.set(e,{...n,...t,...n?.repos||t.repos?{repos:{...n?.repos,...t.repos}}:{}}),clearTimeout(d.current),d.current=setTimeout(h,400)},[h]),_=(0,b.useCallback)(e=>{s(t=>t.includes(e)?t:[...t,e]),t(t=>t&&{...t,activeTab:e}),p({op:`activate`,id:e}).catch(()=>{})},[p]),v=(0,b.useCallback)(e=>{t(t=>t&&{...t,settings:{...t.settings,...e}}),p({op:`settings`,settings:e}).catch(()=>{})},[p]),y=(0,b.useCallback)(async()=>{a(!0),r(``);try{let e=(c.current?.tabs||[]).find(e=>e.id===c.current?.activeTab),t=await rG(`choose-directory`,e?{path:e.root}:{});t.path&&await m({op:`open`,root:t.path})}catch(e){r(e instanceof Error?e.message:`Could not open a folder.`)}finally{a(!1)}},[m]),x=(0,b.useCallback)(e=>{s(t=>t.filter(t=>t!==e)),m({op:`close`,id:e}).catch(()=>{})},[m]),S=(0,b.useCallback)(e=>void m({op:`duplicate`,id:e}).catch(()=>{}),[m]),C=(0,b.useCallback)(()=>void m({op:`reopen`}).catch(()=>{}),[m]);return{settings:e?.settings,tabs:e?.tabs||[],recent:e?.recent||[],activeTab:e?.activeTab||null,ready:e!==null,visited:o,error:n,browsing:i,activate:_,browse:y,close:x,duplicate:S,reopen:C,saveTab:g,setSettings:v,resetSettings:()=>void p({op:`reset-settings`}).catch(()=>{})}}var $K={workerFactory:()=>new AA};function eq(e){let t=(0,kA.c)(32),{store:n,settings:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={weight:`duotone`,size:16},t[0]=i):i=t[0];let a;t[1]===n?a=t[2]:(a=n.tabs.map(e=>{let t=ZK(e,n.tabs);return(0,Y.jsxs)($u,{children:[(0,Y.jsxs)(td,{render:(0,Y.jsx)(`span`,{className:`tab`}),children:[(0,Y.jsx)(mu,{className:`tab-label`,value:e.id,title:e.root,children:t}),(0,Y.jsx)(bu,{className:`tab-close`,"aria-label":`Close ${t}`,onClick:()=>n.close(e.id),children:(0,Y.jsx)(Ij,{})})]}),(0,Y.jsx)(Pu,{children:(0,Y.jsx)(nd,{className:`floating`,children:(0,Y.jsxs)(ju,{className:`popup menu`,children:[(0,Y.jsxs)(Au,{className:`menu-item`,onClick:()=>n.duplicate(e.id),children:[(0,Y.jsx)(bj,{}),`Duplicate tab`]}),(0,Y.jsxs)(Au,{className:`menu-item`,onClick:()=>n.close(e.id),children:[(0,Y.jsx)(Ij,{}),`Close tab`]})]})})})]},e.id)}),t[1]=n,t[2]=a);let o;t[3]===a?o=t[4]:(o=(0,Y.jsx)(vu,{className:`tab-list`,"aria-label":`Open workspaces`,children:a}),t[3]=a,t[4]=o);let s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Y.jsx)(yu,{orientation:`vertical`,className:`tab-separator`}),t[5]=s):s=t[5];let c;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Y.jsx)(bu,{}),t[6]=c):c=t[6];let l;t[7]===n?l=t[8]:(l=()=>void n.browse(),t[7]=n,t[8]=l);let u;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Y.jsx)(Aj,{}),t[9]=u):u=t[9];let d;t[10]!==n.browsing||t[11]!==l?(d=(0,Y.jsx)(ec,{render:c,className:`tab-new`,"aria-label":`Open a workspace folder`,disabled:n.browsing,onClick:l,children:u}),t[10]=n.browsing,t[11]=l,t[12]=d):d=t[12];let f;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Y.jsx)(ic,{children:(0,Y.jsx)(Dc,{sideOffset:6,children:(0,Y.jsx)(Oc,{className:`tooltip`,children:`Open a workspace folder`})})}),t[13]=f):f=t[13];let p;t[14]===d?p=t[15]:(p=(0,Y.jsxs)(Ks,{children:[d,f]}),t[14]=d,t[15]=p);let m;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Y.jsx)(`div`,{className:`push`}),t[16]=m):m=t[16];let h;t[17]===n.error?h=t[18]:(h=n.error&&(0,Y.jsx)(`span`,{className:`tab-bar-error`,role:`alert`,children:n.error}),t[17]=n.error,t[18]=h);let g;t[19]!==n.recent||t[20]!==n.reopen?(g=!!n.recent.length&&(0,Y.jsx)(KW,{label:`Reopen ${ZK(n.recent[0],n.recent)}`,onClick:n.reopen,children:(0,Y.jsx)(cj,{})}),t[19]=n.recent,t[20]=n.reopen,t[21]=g):g=t[21];let _;t[22]!==r||t[23]!==n.resetSettings||t[24]!==n.setSettings?(_=(0,Y.jsx)(JK,{settings:r,onChange:n.setSettings,onReset:n.resetSettings}),t[22]=r,t[23]=n.resetSettings,t[24]=n.setSettings,t[25]=_):_=t[25];let v;return t[26]!==p||t[27]!==h||t[28]!==g||t[29]!==_||t[30]!==o?(v=(0,Y.jsx)(oj.Provider,{value:i,children:(0,Y.jsxs)(`div`,{className:`tab-bar`,children:[o,s,p,m,h,g,_]})}),t[26]=p,t[27]=h,t[28]=g,t[29]=_,t[30]=o,t[31]=v):v=t[31],v}function tq(e){let t=(0,kA.c)(118),{tab:n,settings:r,setSettings:i,saveTab:a}=e,o;t[0]!==a||t[1]!==n.id?(o=e=>a(n.id,e),t[0]=a,t[1]=n.id,t[2]=o):o=t[2];let s=uG(n,o),[c,l]=(0,b.useState)(!1),u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=new Set,t[3]=u):u=t[3];let[d,f]=(0,b.useState)(u),{selected:p}=s,m,h;t[4]===p?(m=t[5],h=t[6]):(m=p.flatMap(oq),h=cG(m),t[4]=p,t[5]=m,t[6]=h);let g=h,_;t[7]!==s.entries||t[8]!==s.scanning?(_=s.scanning||s.entries.some(aq),t[7]=s.entries,t[8]=s.scanning,t[9]=_):_=t[9];let v=_,y;t[10]!==d||t[11]!==m.length||t[12]!==p?(y=m.length>0&&p.every(e=>e.data?.files.every(t=>d.has(oG(e.repo.path,t.name)))),t[10]=d,t[11]=m.length,t[12]=p,t[13]=y):y=t[13];let x=y,S;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(S=function(e,t){let n=oG(e,t);f(e=>{let t=new Set(e);return t.delete(n),t}),l(!1),requestAnimationFrame(()=>requestAnimationFrame(()=>document.getElementById(n)?.scrollIntoView({block:`start`})))},t[14]=S):S=t[14];let C=S,w;t[15]!==x||t[16]!==p?(w=function(){f(x?new Set:new Set(p.flatMap(iq)))},t[15]=x,t[16]=p,t[17]=w):w=t[17];let T=w,E;t[18]===i?E=t[19]:(E=e=>i({sidebarWidth:e}),t[18]=i,t[19]=E);let D;t[20]!==r.density||t[21]!==s?(D=(0,Y.jsx)(CG,{workspace:s,density:r.density,navigate:C}),t[20]=r.density,t[21]=s,t[22]=D):D=t[22];let O;t[23]!==r.sidebarWidth||t[24]!==E||t[25]!==D?(O=(0,Y.jsx)(TG,{width:r.sidebarWidth,onResize:E,children:D}),t[23]=r.sidebarWidth,t[24]=E,t[25]=D,t[26]=O):O=t[26];let k;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,Y.jsx)(iu,{className:`icon-button mobile-only`,"aria-label":`Open sidebar`,children:(0,Y.jsx)(Mj,{})}),t[27]=k):k=t[27];let A;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Y.jsx)(wl,{className:`dialog-backdrop`}),t[28]=A):A=t[28];let j;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Y.jsx)($l,{className:`sr-only`,children:`Workspace navigation`}),t[29]=j):j=t[29];let M;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Y.jsx)(Tl,{className:`icon-button mobile-close`,"aria-label":`Close sidebar`,children:(0,Y.jsx)(Ij,{})}),t[30]=M):M=t[30];let N;t[31]!==r.density||t[32]!==s?(N=(0,Y.jsxs)(Pl,{children:[A,(0,Y.jsxs)(Ml,{className:`mobile-sidebar`,children:[j,M,(0,Y.jsx)(CG,{workspace:s,density:r.density,navigate:C})]})]}),t[31]=r.density,t[32]=s,t[33]=N):N=t[33];let P;t[34]!==c||t[35]!==N?(P=(0,Y.jsxs)(Ql,{open:c,onOpenChange:l,children:[k,N]}),t[34]=c,t[35]=N,t[36]=P):P=t[36];let F,I;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Y.jsx)(Ej,{}),I=(0,Y.jsx)(`strong`,{children:`Changes`}),t[37]=F,t[38]=I):(F=t[37],I=t[38]);let L;t[39]===m.length?L=t[40]:(L=(0,Y.jsx)(`span`,{className:`count-badge`,children:m.length}),t[39]=m.length,t[40]=L);let R=p.length===1?`repository`:`repositories`,z;t[41]!==p.length||t[42]!==R?(z=(0,Y.jsxs)(`span`,{className:`toolbar-caption`,children:[p.length,` `,R]}),t[41]=p.length,t[42]=R,t[43]=z):z=t[43];let B;t[44]!==L||t[45]!==z?(B=(0,Y.jsxs)(`div`,{className:`review-title`,children:[F,I,L,z]}),t[44]=L,t[45]=z,t[46]=B):B=t[46];let V;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,Y.jsx)(`div`,{className:`push`}),t[47]=V):V=t[47];let H=g.added?`+${g.added}`:``,U;t[48]===H?U=t[49]:(U=(0,Y.jsx)(`span`,{className:`added`,children:H}),t[48]=H,t[49]=U);let ee=g.removed?`−${g.removed}`:``,te;t[50]===ee?te=t[51]:(te=(0,Y.jsx)(`span`,{className:`removed`,children:ee}),t[50]=ee,t[51]=te);let ne;t[52]!==U||t[53]!==te?(ne=(0,Y.jsxs)(`span`,{className:`diff-stat toolbar-stat`,children:[U,te]}),t[52]=U,t[53]=te,t[54]=ne):ne=t[54];let W;t[55]===r.layout?W=t[56]:(W=[r.layout],t[55]=r.layout,t[56]=W);let re;t[57]===i?re=t[58]:(re=e=>{(e[0]===`split`||e[0]===`unified`)&&i({layout:e[0]})},t[57]=i,t[58]=re);let ie;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,Y.jsx)(xl,{value:`unified`,"aria-label":`Unified view`,title:`Unified view`,children:(0,Y.jsx)(jj,{})}),t[59]=ie):ie=t[59];let ae;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,Y.jsx)(xl,{value:`split`,"aria-label":`Split view`,title:`Split view`,children:(0,Y.jsx)(yj,{})}),t[60]=ae):ae=t[60];let G;t[61]!==W||t[62]!==re?(G=(0,Y.jsxs)(fl,{className:`view-toggle`,"aria-label":`Diff layout`,value:W,onValueChange:re,children:[ie,ae]}),t[61]=W,t[62]=re,t[63]=G):G=t[63];let oe;t[64]!==i||t[65]!==r.wrap?(oe=()=>i({wrap:!r.wrap}),t[64]=i,t[65]=r.wrap,t[66]=oe):oe=t[66];let se;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,Y.jsx)(lj,{}),t[67]=se):se=t[67];let ce;t[68]!==r.wrap||t[69]!==oe?(ce=(0,Y.jsx)(KW,{label:`Wrap lines`,pressed:r.wrap,onClick:oe,children:se}),t[68]=r.wrap,t[69]=oe,t[70]=ce):ce=t[70];let le=x?`Expand all files`:`Collapse all files`,ue=!m.length,de;t[71]===x?de=t[72]:(de=x?(0,Y.jsx)(pj,{}):(0,Y.jsx)(fj,{}),t[71]=x,t[72]=de);let fe;t[73]!==T||t[74]!==le||t[75]!==ue||t[76]!==de?(fe=(0,Y.jsx)(KW,{label:le,disabled:ue,onClick:T,children:de}),t[73]=T,t[74]=le,t[75]=ue,t[76]=de,t[77]=fe):fe=t[77];let pe;t[78]!==P||t[79]!==B||t[80]!==ne||t[81]!==G||t[82]!==ce||t[83]!==fe?(pe=(0,Y.jsxs)(`header`,{className:`review-toolbar`,children:[P,B,V,ne,G,ce,fe]}),t[78]=P,t[79]=B,t[80]=ne,t[81]=G,t[82]=ce,t[83]=fe,t[84]=pe):pe=t[84];let me;t[85]===s.error?me=t[86]:(me=s.error&&(0,Y.jsx)(`p`,{className:`notice`,role:`alert`,children:s.error}),t[85]=s.error,t[86]=me);let he;t[87]===s.warnings?he=t[88]:(he=s.warnings.map(rq),t[87]=s.warnings,t[88]=he);let ge;t[89]!==v||t[90]!==p.length||t[91]!==s.entries?(ge=!p.length&&(v?(0,Y.jsx)($W,{lines:3,children:`Finding changes across your workspace…`}):(0,Y.jsx)(tG,{icon:s.entries.length?(0,Y.jsx)(vj,{}):(0,Y.jsx)(Sj,{}),title:s.entries.length?`Nothing selected`:`No repositories here`,children:s.entries.length?`Repositories without changes start deselected. Open the Repositories control to include more, or change what they compare against.`:`This folder has no Git repositories or worktrees inside it.`})),t[89]=v,t[90]=p.length,t[91]=s.entries,t[92]=ge):ge=t[92];let _e;if(t[93]!==d||t[94]!==p||t[95]!==r||t[96]!==s){let e;t[98]!==d||t[99]!==r||t[100]!==s?(e=e=>(0,Y.jsxs)(`section`,{id:oG(e.repo.path),className:`repo-diffs`,"aria-label":`Changes in ${e.repo.name}`,children:[(0,Y.jsxs)(`div`,{className:`repo-divider`,children:[(0,Y.jsx)(`strong`,{children:e.repo.name}),(0,Y.jsxs)(`span`,{children:[e.data?.files.length||0,` `,e.data?.files.length===1?`file`:`files`]}),e.repo.worktree&&(0,Y.jsx)(`span`,{className:`worktree-label`,children:`worktree`}),(0,Y.jsxs)(`span`,{className:`divider-comparison`,children:[e.base,` → `,sG(e.target)]}),(0,Y.jsx)(`span`,{className:`divider-line`}),e.loading&&(0,Y.jsx)(`span`,{role:`status`,children:`Updating…`})]}),e.error?(0,Y.jsxs)(`p`,{role:`alert`,className:`notice`,children:[e.error,(0,Y.jsx)(bu,{className:`text-button`,onClick:()=>void s.reload(e),children:`Retry`})]}):e.loading&&!e.data?(0,Y.jsxs)($W,{lines:2,children:[`Loading `,e.repo.name,`…`]}):(0,Y.jsxs)(Y.Fragment,{children:[e.data?.warnings.map(nq),!e.data?.files.length&&(0,Y.jsxs)(`p`,{className:`file-note`,children:[`No changes against `,e.base,`.`]}),(0,Y.jsx)(`div`,{className:`diff-files`,"data-updating":e.loading||void 0,children:e.data?.files.map(t=>(0,Y.jsx)(DG,{entry:e,file:t,settings:r,collapsed:d.has(oG(e.repo.path,t.name)),onCollapse:n=>f(r=>{let i=new Set(r),a=oG(e.repo.path,t.name);return n?i.add(a):i.delete(a),i})},`${e.data.version}:${t.name}`))})]})]},e.repo.path),t[98]=d,t[99]=r,t[100]=s,t[101]=e):e=t[101],_e=p.map(e),t[93]=d,t[94]=p,t[95]=r,t[96]=s,t[97]=_e}else _e=t[97];let ve;t[102]!==m.length||t[103]!==v?(ve=!!m.length&&!v&&(0,Y.jsxs)(`div`,{className:`review-end`,children:[(0,Y.jsx)(vj,{}),(0,Y.jsx)(`span`,{children:`End of changes`})]}),t[102]=m.length,t[103]=v,t[104]=ve):ve=t[104];let ye;t[105]!==me||t[106]!==he||t[107]!==ge||t[108]!==_e||t[109]!==ve?(ye=(0,Y.jsxs)(vA,{className:`review-scroll`,contentClassName:`review-content`,children:[me,he,ge,_e,ve]}),t[105]=me,t[106]=he,t[107]=ge,t[108]=_e,t[109]=ve,t[110]=ye):ye=t[110];let be;t[111]!==v||t[112]!==pe||t[113]!==ye?(be=(0,Y.jsxs)(`main`,{className:`review-pane`,"aria-busy":v,children:[pe,ye]}),t[111]=v,t[112]=pe,t[113]=ye,t[114]=be):be=t[114];let xe;return t[115]!==O||t[116]!==be?(xe=(0,Y.jsxs)(Y.Fragment,{children:[O,be]}),t[115]=O,t[116]=be,t[117]=xe):xe=t[117],xe}function nq(e){return(0,Y.jsx)(`p`,{className:`notice`,children:e},e)}function rq(e){return(0,Y.jsx)(`p`,{className:`notice`,children:e},e)}function iq(e){return e.data?.files.map(t=>oG(e.repo.path,t.name))||[]}function aq(e){return e.loading}function oq(e){return e.data?.files||[]}function sq(){let e=(0,kA.c)(27),t=QK(),n=t.settings,r=n?.theme,i,a;e[0]===r?(i=e[1],a=e[2]):(i=()=>{r&&(document.documentElement.dataset.theme=r)},a=[r],e[0]=r,e[1]=i,e[2]=a),(0,b.useEffect)(i,a);let o;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(o={weight:`duotone`,size:18},e[3]=o):o=e[3];let s;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(s={},e[4]=s):s=e[4];let c;e[5]===t?c=e[6]:(c=e=>t.activate(String(e)),e[5]=t,e[6]=c);let l;e[7]!==n||e[8]!==t?(l=n&&(0,Y.jsx)(eq,{store:t,settings:n}),e[7]=n,e[8]=t,e[9]=l):l=e[9];let u;e[10]!==n||e[11]!==t.saveTab||e[12]!==t.setSettings||e[13]!==t.tabs||e[14]!==t.visited?(u=n&&t.tabs.filter(e=>t.visited.includes(e.id)).map(e=>(0,Y.jsx)(_u,{value:e.id,keepMounted:!0,className:`workspace-view`,children:(0,Y.jsx)(tq,{tab:e,settings:n,setSettings:t.setSettings,saveTab:t.saveTab})},e.id)),e[10]=n,e[11]=t.saveTab,e[12]=t.setSettings,e[13]=t.tabs,e[14]=t.visited,e[15]=u):u=e[15];let d;e[16]===t.ready?d=e[17]:(d=!t.ready&&(0,Y.jsx)(`div`,{className:`workspace-view`,children:(0,Y.jsx)($W,{lines:2,children:`Restoring your workspaces…`})}),e[16]=t.ready,e[17]=d);let f;e[18]===t?f=e[19]:(f=t.ready&&!t.tabs.length&&(0,Y.jsx)(`div`,{className:`workspace-view`,children:(0,Y.jsxs)(tG,{icon:(0,Y.jsx)(Sj,{}),title:`Open a workspace`,children:[`Choose a directory containing your repositories and feature worktrees. Every tab remembers its own directory, repositories, and comparison branches.`,(0,Y.jsxs)(bu,{className:`primary-button`,onClick:()=>void t.browse(),disabled:t.browsing,children:[(0,Y.jsx)(Sj,{}),t.browsing?`Choosing…`:`Choose a folder`]})]})}),e[18]=t,e[19]=f);let p;return e[20]!==t.activeTab||e[21]!==c||e[22]!==l||e[23]!==u||e[24]!==d||e[25]!==f?(p=(0,Y.jsx)(oj.Provider,{value:o,children:(0,Y.jsx)(kc,{delay:350,children:(0,Y.jsx)(bT,{poolOptions:$K,highlighterOptions:s,children:(0,Y.jsxs)(lu,{className:`app-shell`,value:t.activeTab,onValueChange:c,children:[l,u,d,f]})})})}),e[20]=t.activeTab,e[21]=c,e[22]=l,e[23]=u,e[24]=d,e[25]=f,e[26]=p):p=e[26],p}(0,OA.createRoot)(document.getElementById(`root`)).render((0,Y.jsx)(b.StrictMode,{children:(0,Y.jsx)(sq,{})}));export{s as t};
|